Your IP : 13.58.73.59


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

{"version":3,"file":"backend.bundle.js","sources":["../src/backend.js"],"sourcesContent":["import {Uri, Cache, Loc, Reflection, Type, Http, ajax, Text} from 'main.core';\nimport {Env} from 'landing.env';\nimport type {Block, Landing, Site, Template, CreatePageOptions, SourceResponse, PreparedResponse} from './types';\n\nlet additionalRequestCompleted = true;\n\n/**\n * @memberOf BX.Landing\n */\nexport class Backend\n{\n\tstatic +instance: Backend = null;\n\tstatic getInstance(): Backend\n\t{\n\t\tif (!Backend.instance)\n\t\t{\n\t\t\tBackend.instance = new Backend();\n\t\t}\n\n\t\treturn Backend.instance;\n\t}\n\n\tstatic makeResponse(xhr: XMLHttpRequest, sourceResponse: SourceResponse = {}): PreparedResponse\n\t{\n\t\tconst type = (() => {\n\t\t\tif (Type.isStringFilled(sourceResponse.type))\n\t\t\t{\n\t\t\t\treturn sourceResponse.type;\n\t\t\t}\n\n\t\t\tif (Type.isPlainObject(sourceResponse) && Object.values(sourceResponse).length > 0)\n\t\t\t{\n\t\t\t\tconst allSuccess = Object.values(sourceResponse).every((item) => {\n\t\t\t\t\treturn item.type === 'success';\n\t\t\t\t});\n\n\t\t\t\tif (allSuccess)\n\t\t\t\t{\n\t\t\t\t\treturn 'success';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Type.isArray(sourceResponse))\n\t\t\t{\n\t\t\t\treturn 'other';\n\t\t\t}\n\n\t\t\treturn 'error';\n\t\t})();\n\n\t\tif (type === 'other')\n\t\t{\n\t\t\treturn sourceResponse;\n\t\t}\n\n\t\treturn {\n\t\t\tresult: null,\n\t\t\ttype,\n\t\t\t...sourceResponse,\n\t\t\tstatus: xhr.status,\n\t\t\tauthorized: xhr.getResponseHeader('X-Bitrix-Ajax-Status') !== 'Authorize',\n\t\t};\n\t}\n\n\tstatic request({url, data}): Promise<any, any>\n\t{\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst fd = data instanceof FormData ? data : Http.Data.convertObjectToFormData(data);\n\t\t\tconst xhr = ajax({\n\t\t\t\tmethod: 'POST',\n\t\t\t\tdataType: 'json',\n\t\t\t\turl,\n\t\t\t\tdata: fd,\n\t\t\t\tstart: false,\n\t\t\t\tpreparePost: false,\n\t\t\t\tonsuccess: (sourceResponse) => {\n\t\t\t\t\tconst response = Backend.makeResponse(xhr, sourceResponse);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tType.isStringFilled(response.sessid) &&\n\t\t\t\t\t\tLoc.getMessage('bitrix_sessid') !== response.sessid &&\n\t\t\t\t\t\tadditionalRequestCompleted\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tLoc.setMessage('bitrix_sessid', response.sessid);\n\t\t\t\t\t\tadditionalRequestCompleted = false;\n\n\t\t\t\t\t\tconst newData = {...data, sessid: Loc.getMessage('bitrix_sessid')};\n\n\t\t\t\t\t\tBackend\n\t\t\t\t\t\t\t.request({url, data: newData})\n\t\t\t\t\t\t\t.then((newResponse) => {\n\t\t\t\t\t\t\t\tadditionalRequestCompleted = true;\n\t\t\t\t\t\t\t\tresolve(newResponse);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.catch((newResponse) => {\n\t\t\t\t\t\t\t\tadditionalRequestCompleted = true;\n\t\t\t\t\t\t\t\treject(newResponse);\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!Type.isPlainObject(response))\n\t\t\t\t\t{\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tresponse.type === 'error'\n\t\t\t\t\t\t|| response.authorized === false\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (response.authorized === false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttop.window.location.reload();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treject(response);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(response);\n\t\t\t\t},\n\t\t\t\tonfailure: (sourceResponse) => {\n\t\t\t\t\tif (sourceResponse === 'auth')\n\t\t\t\t\t{\n\t\t\t\t\t\ttop.window.location.reload();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treject(\n\t\t\t\t\t\t\tBackend.makeResponse(xhr, sourceResponse),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t});\n\n\t\t\txhr.send(fd);\n\t\t});\n\t}\n\n\tcache = new Cache.MemoryCache();\n\n\tgetControllerUrl(): string\n\t{\n\t\treturn this.cache.remember('controllerUrl', () => {\n\t\t\tconst uri = new Uri('/bitrix/tools/landing/ajax.php');\n\t\t\turi.setQueryParams({\n\t\t\t\tsite: Loc.getMessage('SITE_ID') || undefined,\n\t\t\t\ttype: this.getSitesType(),\n\t\t\t});\n\t\t\treturn uri.toString();\n\t\t});\n\t}\n\n\tgetSiteId(): number\n\t{\n\t\treturn this.cache.remember('siteId', () => {\n\t\t\tconst landing = Reflection.getClass('BX.Landing.Main');\n\n\t\t\tif (landing)\n\t\t\t{\n\t\t\t\tconst instance = landing.getInstance();\n\n\t\t\t\tif (\n\t\t\t\t\t'options' in instance\n\t\t\t\t\t&& 'site_id' in instance.options\n\t\t\t\t\t&& !Type.isUndefined(instance.options.site_id)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\treturn instance.options.site_id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t});\n\t}\n\n\tgetLandingId(): number\n\t{\n\t\treturn this.cache.remember('landingId', () => {\n\t\t\tconst landing = Reflection.getClass('BX.Landing.Main');\n\n\t\t\tif (landing)\n\t\t\t{\n\t\t\t\treturn landing.getInstance().id;\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t});\n\t}\n\n\tgetSitesType(): 'PAGE' | 'STORE'\n\t{\n\t\treturn this.cache.remember('siteType', () => {\n\t\t\treturn Env.getInstance().getType();\n\t\t});\n\t}\n\n\taction(\n\t\taction: string,\n\t\tdata: {[key: string]: any} = {},\n\t\tqueryParams = {},\n\t\tuploadParams = {},\n\t): Promise<{[key: string]: any}, any>\n\t{\n\t\tif (!queryParams.site_id)\n\t\t{\n\t\t\tqueryParams.site_id = this.getSiteId();\n\t\t}\n\n\t\tconst requestBody = {\n\t\t\tsessid: Loc.getMessage('bitrix_sessid'),\n\t\t\taction: uploadParams.action || action.replace('Landing\\\\Block', 'Block'),\n\t\t\tdata: {...data, uploadParams, lid: data.lid || this.getLandingId()},\n\t\t};\n\n\t\tconst uri = new Uri(this.getControllerUrl());\n\t\turi.setQueryParams({\n\t\t\taction: requestBody.action,\n\t\t\t...queryParams,\n\t\t});\n\n\t\treturn Backend\n\t\t\t.request({\n\t\t\t\turl: uri.toString(),\n\t\t\t\tdata: requestBody,\n\t\t\t})\n\t\t\t.then((response) => {\n\t\t\t\tif (\n\t\t\t\t\trequestBody.action === 'Block::updateNodes'\n\t\t\t\t\t|| requestBody.action === 'Block::removeCard'\n\t\t\t\t\t|| requestBody.action === 'Block::cloneCard'\n\t\t\t\t\t|| requestBody.action === 'Block::addCard'\n\t\t\t\t\t|| requestBody.action === 'Block::updateStyles'\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\tBX.Landing.UI.Panel.StatusPanel.getInstance().update();\n\t\t\t\t}\n\n\t\t\t\tBX.onCustomEvent(\n\t\t\t\t\tBX.Landing.PageObject.getRootWindow(),\n\t\t\t\t\t'BX.Landing.Backend:action',\n\t\t\t\t\t[action, data]\n\t\t\t\t);\n\n\t\t\t\t/*if (!response.result) {\n\t\t\t\t\tBX.Landing.ErrorManager.getInstance().add({\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t}*/\n\n\t\t\t\treturn response.result;\n\t\t\t})\n\t\t\t.catch((err) => {\n\t\t\t\tif (\n\t\t\t\t\trequestBody.action !== 'Landing::downBlock'\n\t\t\t\t\t&& requestBody.action !== 'Landing::upBlock'\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tif (\n\t\t\t\t\t\trequestBody.action !== 'Block::getById'\n\t\t\t\t\t\t&& requestBody.action !== 'Block::publication'\n\t\t\t\t\t\t&& requestBody.action !== 'Landing::move'\n\t\t\t\t\t\t&& requestBody.action !== 'Landing::copy'\n\t\t\t\t\t\t&& requestBody.action !== 'Landing::publication'\n\t\t\t\t\t\t&& requestBody.action !== 'Site::publication'\n\t\t\t\t\t\t&& requestBody.action !== 'Site::moveFolder'\n\t\t\t\t\t\t&& requestBody.action !== 'Site::markDelete'\n\t\t\t\t\t\t&& requestBody.action !== 'Vk::getVideoInfo'\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tconst error = Type.isString(err) ? {type: 'error'} : err;\n\t\t\t\t\t\terr.action = requestBody.action;\n\n\t\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\t\tBX.Landing.ErrorManager.getInstance().add(error);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.reject(err);\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tbatch(action, data = {}, queryParams = {}): Promise<{[key: string]: any}, any>\n\t{\n\t\tqueryParams.site_id = this.getSiteId();\n\n\t\tconst requestBody = {\n\t\t\tsessid: Loc.getMessage('bitrix_sessid'),\n\t\t\taction: action.replace('Landing\\\\Block', 'Block'),\n\t\t\tdata: {lid: data.lid || this.getLandingId()},\n\t\t\tbatch: data,\n\t\t};\n\n\t\tconst uri = new Uri(this.getControllerUrl());\n\t\turi.setQueryParams({\n\t\t\taction: requestBody.action,\n\t\t\t...queryParams,\n\t\t});\n\n\t\treturn Backend\n\t\t\t.request({\n\t\t\t\turl: uri.toString(),\n\t\t\t\tdata: requestBody,\n\t\t\t})\n\t\t\t.then((response) => {\n\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tBX.Landing.UI.Panel.StatusPanel.getInstance().update();\n\n\t\t\t\tBX.onCustomEvent(\n\t\t\t\t\tBX.Landing.PageObject.getRootWindow(),\n\t\t\t\t\t'BX.Landing.Backend:batch',\n\t\t\t\t\t[action, data]\n\t\t\t\t);\n\n\t\t\t\t/*if (!response.result) {\n\t\t\t\t\tBX.Landing.ErrorManager.getInstance().add({\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t}*/\n\n\t\t\t\treturn response;\n\t\t\t})\n\t\t\t.catch((err) => {\n\t\t\t\tif (\n\t\t\t\t\trequestBody.action !== 'Landing::downBlock'\n\t\t\t\t\t&& requestBody.action !== 'Landing::upBlock'\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tif (requestBody.action !== 'Block::getById')\n\t\t\t\t\t{\n\t\t\t\t\t\tconst error = Type.isString(err) ? {type: 'error'} : err;\n\t\t\t\t\t\terror.action = requestBody.action;\n\t\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\t\tBX.Landing.ErrorManager.getInstance().add(error);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.reject(err);\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tupload(file: File | Blob, uploadParams = {}): Promise<{[key: string]: any}, any>\n\t{\n\t\tconst formData = new FormData();\n\n\t\tformData.append('sessid', Loc.getMessage('bitrix_sessid'));\n\t\tformData.append('picture', file, file.name);\n\n\t\tif ('block' in uploadParams)\n\t\t{\n\t\t\tformData.append('action', 'Block::uploadFile');\n\t\t\tformData.append('data[block]', uploadParams.block);\n\t\t}\n\n\t\tif ('lid' in uploadParams)\n\t\t{\n\t\t\tformData.set('action', 'Landing::uploadFile');\n\t\t\tformData.append('data[lid]', uploadParams.lid);\n\t\t}\n\n\t\tif ('id' in uploadParams)\n\t\t{\n\t\t\tformData.set('action', 'Site::uploadFile');\n\t\t\tformData.append('data[id]', uploadParams.id);\n\t\t}\n\n\t\tif ('temp' in uploadParams)\n\t\t{\n\t\t\tformData.append('data[temp]', true);\n\t\t}\n\n\t\tconst uri = new Uri(this.getControllerUrl());\n\t\turi.setQueryParams({\n\t\t\taction: formData.get('action'),\n\t\t\tsite_id: this.getSiteId(),\n\t\t});\n\n\t\tif (uploadParams.context)\n\t\t{\n\t\t\turi.setQueryParam('context', uploadParams.context);\n\t\t}\n\n\t\treturn Backend\n\t\t\t.request({\n\t\t\t\turl: uri.toString(),\n\t\t\t\tdata: formData,\n\t\t\t})\n\t\t\t.then((response) => response.result)\n\t\t\t.catch((err) => {\n\t\t\t\tconst error = Type.isString(err) ? {type: 'error'} : err;\n\t\t\t\terror.action = 'Block::uploadFile';\n\t\t\t\t// eslint-disable-next-line\n\t\t\t\tBX.Landing.ErrorManager.getInstance().add(error);\n\t\t\t\treturn Promise.reject(err);\n\t\t\t});\n\t}\n\n\tgetSites({filter = {}} = {}): Promise<Array<Site>>\n\t{\n\t\treturn this.cache.remember(`sites+${JSON.stringify(filter)}`, () => {\n\t\t\treturn this\n\t\t\t\t.action('Site::getList', {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\tfilter,\n\t\t\t\t\t\torder: {ID: 'DESC'}\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t.then((response) => response);\n\t\t});\n\t}\n\n\tgetLandings({siteId = []}: {siteId?: number | Array<number>} = {}, filter: {}): Promise<Array<Landing>>\n\t{\n\t\tlet skipFilter = false;\n\t\tif (!BX.Type.isPlainObject(filter))\n\t\t{\n\t\t\tfilter = {};\n\t\t\tskipFilter = true;\n\t\t}\n\n\t\tconst ids = Type.isArray(siteId) ? siteId : [siteId];\n\t\tfilter.SITE_ID = ids;\n\n\t\tconst getBathItem = (id) => ({\n\t\t\taction: 'Landing::getList',\n\t\t\tdata: {\n\t\t\t\tparams: {\n\t\t\t\t\tfilter: (() => {\n\t\t\t\t\t\tif (skipFilter)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tSITE_ID: id,\n\t\t\t\t\t\t\t\tDELETED: 'N',\n\t\t\t\t\t\t\t\tFOLDER: 'N',\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn filter;\n\t\t\t\t\t})(),\n\t\t\t\t\torder: {ID: 'DESC'},\n\t\t\t\t\tget_preview: true,\n\t\t\t\t\tcheck_area: 1,\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\n\t\tconst prepareResponse = (response) => {\n\t\t\treturn response.reduce((acc, item) => {\n\t\t\t\treturn [...acc, ...item.result];\n\t\t\t}, []);\n\t\t};\n\n\t\treturn this.cache.remember(`landings+${JSON.stringify(ids)}`, () => {\n\t\t\tif (ids.filter((id) => !Type.isNil(id)).length === 0)\n\t\t\t{\n\t\t\t\treturn this.getSites()\n\t\t\t\t\t.then((sites) => {\n\t\t\t\t\t\tconst data = sites.map((site) => getBathItem(site.ID));\n\t\t\t\t\t\treturn this.batch('Landing::getList', data);\n\t\t\t\t\t})\n\t\t\t\t\t.then((response) => prepareResponse(response))\n\t\t\t\t\t.then((response) => {\n\t\t\t\t\t\tresponse.forEach((landing) => {\n\t\t\t\t\t\t\tthis.cache.set(`landing+${landing.ID}`, Promise.resolve(landing));\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst data = ids.map((id) => getBathItem(id));\n\t\t\treturn this.batch('Landing::getList', data)\n\t\t\t\t.then((response) => prepareResponse(response))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tresponse.forEach((landing) => {\n\t\t\t\t\t\tthis.cache.set(`landing+${landing.ID}`, Promise.resolve(landing));\n\t\t\t\t\t});\n\t\t\t\t\treturn response;\n\t\t\t\t});\n\t\t});\n\t}\n\n\tgetLanding({landingId}: {landingId: string}): Promise<Landing>\n\t{\n\t\treturn this.cache.remember(`landing+${landingId}`, () => {\n\t\t\treturn this\n\t\t\t\t.action('Landing::getList', {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\tfilter: {ID: landingId},\n\t\t\t\t\t\tget_preview: true,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t.then((response) => {\n\t\t\t\t\tif (Type.isArray(response) && response.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn response[0];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t});\n\t\t});\n\t}\n\n\tgetBlocks({landingId}: {landingId: string}): Promise<Array<Block>>\n\t{\n\t\treturn this.cache.remember(`blocks+${landingId}`, () => {\n\t\t\treturn this\n\t\t\t\t.action('Block::getList', {\n\t\t\t\t\tlid: landingId,\n\t\t\t\t\tparams: {\n\t\t\t\t\t\tget_content: true,\n\t\t\t\t\t\tedit_mode: true,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t.then((blocks) => {\n\t\t\t\t\tblocks.forEach((block) => {\n\t\t\t\t\t\tthis.cache.set(`block+${block.id}`, Promise.resolve(block));\n\t\t\t\t\t});\n\n\t\t\t\t\treturn blocks;\n\t\t\t\t});\n\t\t});\n\t}\n\n\tgetBlock({blockId}: {blockId: string}): Promise<Block>\n\t{\n\t\treturn this.cache.remember(`blockId+${blockId}`, () => {\n\t\t\treturn this.action('Block::getById', {\n\t\t\t\tblock: blockId,\n\t\t\t\tparams: {\n\t\t\t\t\tedit_mode: true,\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t}\n\n\tgetTemplates({type = 'page', filter = {}} = {}): Promise<Array<Template>>\n\t{\n\t\treturn this.cache.remember(`templates+${JSON.stringify(filter)}`, () => {\n\t\t\treturn this\n\t\t\t\t.action('Demos::getPageList', {type, filter})\n\t\t\t\t.then((response) => Object.values(response));\n\t\t});\n\t}\n\n\tgetDynamicTemplates(sourceId: string = ''): Promise<Array<Template>>\n\t{\n\t\treturn this.cache.remember(`dynamicTemplates:${sourceId}`, () => {\n\t\t\treturn this.getTemplates({filter: {section: `dynamic${sourceId ? `:${sourceId}` : ''}`}});\n\t\t});\n\t}\n\n\tcreatePage(options: CreatePageOptions = {})\n\t{\n\t\tconst envOptions = Env.getInstance().getOptions();\n\t\tconst {\n\t\t\ttitle,\n\t\t\tsiteId = envOptions.site_id,\n\t\t\tsiteType = envOptions.params.type,\n\t\t\tcode = Text.getRandom(16),\n\t\t\tblockId,\n\t\t\tmenuCode,\n\t\t\tfolderId,\n\t\t} = options;\n\n\t\tconst templateCode = (() => {\n\t\t\tconst {theme} = envOptions;\n\t\t\tif (\n\t\t\t\tType.isPlainObject(theme)\n\t\t\t\t&& Type.isArray(theme.newPageTemplate)\n\t\t\t\t&& Type.isStringFilled(theme.newPageTemplate[0])\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn theme.newPageTemplate[0];\n\t\t\t}\n\n\t\t\treturn 'empty';\n\t\t})();\n\n\t\tconst requestBody = {\n\t\t\tsiteId,\n\t\t\tcode: templateCode,\n\t\t\tfields: {\n\t\t\t\tTITLE: title,\n\t\t\t\tCODE: code,\n\t\t\t\t//@todo: refactor\n\t\t\t\tADD_IN_MENU: (siteType === 'KNOWLEDGE' || siteType === 'GROUP') ? 'Y' : 'N'\n\t\t\t},\n\t\t};\n\n\t\tif (Type.isNumber(blockId) && Type.isString(menuCode))\n\t\t{\n\t\t\trequestBody.fields.BLOCK_ID = blockId;\n\t\t\trequestBody.fields.MENU_CODE = menuCode;\n\t\t}\n\n\t\tif (Type.isNumber(folderId))\n\t\t{\n\t\t\trequestBody.fields.FOLDER_ID = folderId;\n\t\t}\n\n\t\treturn this.action('Landing::addByTemplate', requestBody);\n\t}\n}\n"],"names":["additionalRequestCompleted","Backend","Cache","MemoryCache","cache","remember","uri","Uri","setQueryParams","site","Loc","getMessage","undefined","type","getSitesType","toString","landing","Reflection","getClass","instance","getInstance","options","Type","isUndefined","site_id","id","Env","getType","action","data","queryParams","uploadParams","getSiteId","requestBody","sessid","replace","lid","getLandingId","getControllerUrl","request","url","then","response","BX","Landing","UI","Panel","StatusPanel","update","onCustomEvent","PageObject","getRootWindow","result","err","error","isString","ErrorManager","add","Promise","reject","batch","file","formData","FormData","append","name","block","set","get","context","setQueryParam","filter","JSON","stringify","params","order","ID","siteId","skipFilter","isPlainObject","ids","isArray","SITE_ID","getBathItem","DELETED","FOLDER","get_preview","check_area","prepareResponse","reduce","acc","item","isNil","length","getSites","sites","map","forEach","resolve","landingId","get_content","edit_mode","blocks","blockId","Object","values","sourceId","getTemplates","section","envOptions","getOptions","title","siteType","code","Text","getRandom","menuCode","folderId","templateCode","theme","newPageTemplate","isStringFilled","fields","TITLE","CODE","ADD_IN_MENU","isNumber","BLOCK_ID","MENU_CODE","FOLDER_ID","xhr","sourceResponse","allSuccess","every","status","authorized","getResponseHeader","fd","Http","Data","convertObjectToFormData","ajax","method","dataType","start","preparePost","onsuccess","makeResponse","setMessage","newData","newResponse","top","window","location","reload","onfailure","send"],"mappings":";;;;;;;AAAA,CAIA,IAAIA,0BAA0B,GAAG,IAAI;;CAErC;CACA;CACA;AACA,KAAaC,OAAO;GAAA;KAAA;KAAA,2CAwIX,IAAIC,eAAK,CAACC,WAAW,EAAE;;GAAA;KAAA;KAAA,mCAG/B;OAAA;OACC,OAAO,IAAI,CAACC,KAAK,CAACC,QAAQ,CAAC,eAAe,EAAE,YAAM;SACjD,IAAMC,GAAG,GAAG,IAAIC,aAAG,CAAC,gCAAgC,CAAC;SACrDD,GAAG,CAACE,cAAc,CAAC;WAClBC,IAAI,EAAEC,aAAG,CAACC,UAAU,CAAC,SAAS,CAAC,IAAIC,SAAS;WAC5CC,IAAI,EAAE,KAAI,CAACC,YAAY;UACvB,CAAC;SACF,OAAOR,GAAG,CAACS,QAAQ,EAAE;QACrB,CAAC;;;KACF;KAAA,4BAGD;OACC,OAAO,IAAI,CAACX,KAAK,CAACC,QAAQ,CAAC,QAAQ,EAAE,YAAM;SAC1C,IAAMW,OAAO,GAAGC,oBAA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