Your IP : 3.141.30.234


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/landing/env/dist/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/landing/env/dist/env.bundle.js.map

{"version":3,"file":"env.bundle.js","sources":["../src/internal/default-options.js","../src/env.js"],"sourcesContent":["const defaultOptions = {\n\tparams: {\n\t\ttype: 'EXTERNAL',\n\t},\n};\n\nexport default defaultOptions;","import {Reflection, Runtime} from 'main.core';\nimport defaultOptions from './internal/default-options';\nimport type {EnvOptions} from './types/env.options.types';\n\nconst optionsKey = Symbol('options');\n\n/**\n * @memberOf BX.Landing\n */\nexport class Env\n{\n\tstatic instance = null;\n\n\tstatic getInstance(): Env\n\t{\n\t\treturn Env.instance || Env.createInstance();\n\t}\n\n\tstatic createInstance(options: EnvOptions = {}): Env\n\t{\n\t\tEnv.instance = new Env(options);\n\n\t\tconst parentEnv = Reflection.getClass('parent.BX.Landing.Env');\n\t\tif (parentEnv)\n\t\t{\n\t\t\tparentEnv.instance = Env.instance;\n\t\t}\n\n\t\treturn Env.instance;\n\t}\n\n\tconstructor(options: EnvOptions = {})\n\t{\n\t\tthis[optionsKey] = Object.seal(\n\t\t\tRuntime.merge(defaultOptions, options),\n\t\t);\n\t}\n\n\tgetOptions(): EnvOptions\n\t{\n\t\treturn {...this[optionsKey]};\n\t}\n\n\tsetOptions(options: {[key: string]: any})\n\t{\n\t\tthis[optionsKey] = Runtime.merge(this[optionsKey], options);\n\t}\n\n\tgetType(): string\n\t{\n\t\treturn this.getOptions().params.type;\n\t}\n\n\tgetSiteId(): number\n\t{\n\t\treturn this.getOptions().site_id || -1;\n\t}\n\n\tgetLandingEditorUrl(options: {site?: number, landing: number} = {}): string\n\t{\n\t\tconst envOptions = this.getOptions();\n\t\tconst urlMask = envOptions.params.sef_url.landing_view;\n\n\t\tconst siteId = options.site ? options.site : envOptions.site_id;\n\n\t\treturn urlMask\n\t\t\t.replace('#site_show#', siteId)\n\t\t\t.replace('#landing_edit#', options.landing);\n\t}\n}"],"names":["defaultOptions","params","type","optionsKey","Symbol","Env","instance","createInstance","options","parentEnv","Reflection","getClass","Object","seal","Runtime","merge","getOptions","site_id","envOptions","urlMask","sef_url","landing_view","siteId","site","replace","landing"],"mappings":";;;;CAAA,IAAMA,cAAc,GAAG;CACtBC,EAAAA,MAAM,EAAE;CACPC,IAAAA,IAAI,EAAE;CADC;CADc,CAAvB;;;;;CCIA,IAAMC,UAAU,GAAGC,MAAM,CAAC,SAAD,CAAzB;CAEA;;;;AAGA,KAAaC,GAAb;CAAA;CAAA;CAAA,kCAKC;CACC,aAAOA,GAAG,CAACC,QAAJ,IAAgBD,GAAG,CAACE,cAAJ,EAAvB;CACA;CAPF;CAAA;CAAA,qCAUC;CAAA,UADsBC,OACtB,uEAD4C,EAC5C;CACCH,MAAAA,GAAG,CAACC,QAAJ,GAAe,IAAID,GAAJ,CAAQG,OAAR,CAAf;CAEA,UAAMC,SAAS,GAAGC,oBAAU,CAACC,QAAX,CAAoB,uBAApB,CAAlB;;CACA,UAAIF,SAAJ,EACA;CACCA,QAAAA,SAAS,CAACH,QAAV,GAAqBD,GAAG,CAACC,QAAzB;CACA;;CAED,aAAOD,GAAG,CAACC,QAAX;CACA;CApBF;;CAsBC,iBACA;CAAA,QADYE,OACZ,uEADkC,EAClC;CAAA;CACC,SAAKL,UAAL,IAAmBS,MAAM,CAACC,IAAP,CAClBC,iBAAO,CAACC,KAAR,CAAcf,cAAd,EAA8BQ,OAA9B,CADkB,CAAnB;CAGA;;CA3BF;CAAA;CAAA,iCA8BC;CACC,+BAAW,KAAKL,UAAL,CAAX;CACA;CAhCF;CAAA;CAAA,+BAkCYK,OAlCZ,EAmCC;CACC,WAAKL,UAAL,IAAmBW,iBAAO,CAACC,KAAR,CAAc,KAAKZ,UAAL,CAAd,EAAgCK,OAAhC,CAAnB;CACA;CArCF;CAAA;CAAA,8BAwCC;CACC,aAAO,KAAKQ,UAAL,GAAkBf,MAAlB,CAAy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