{"version":3,"file":"common-state.module-Ctb9OGLZ.js","sources":["../../../../../Flow.Showcase.Static.Bundler/Root/modules/common-state.module.ts"],"sourcesContent":["// @ts-nocheck\n\nconst commonStateElement = document.querySelector('#common-state');\n\n/**\n * parse common state\n * @returns {{ cart: { version: string, code: string }, translations: Object, localization: Object }}\n */\nfunction parseCommonState() {\n try {\n return JSON.parse(commonStateElement.innerHTML);\n } catch (e) {\n console.error(\"error on parse common state\", e);\n throw e;\n }\n}\nexport const commonState = parseCommonState();\n\nexport function updateCommonState(newState) {\n Object.assign(commonState, newState);\n}\n"],"names":["commonStateElement","parseCommonState","e","commonState","updateCommonState","newState"],"mappings":"AAEA,MAAMA,EAAqB,SAAS,cAAc,eAAe,EAMjE,SAAUC,GAAmB,CACrB,GAAA,CACO,OAAA,KAAK,MAAMD,EAAmB,SAAS,QACzCE,EAAG,CACA,cAAA,MAAM,8BAA+BA,CAAC,EACxCA,CAAA,CAEd,CACO,MAAMC,EAAcF,EAAiB,EAErC,SAASG,EAAkBC,EAAU,CACjC,OAAA,OAAOF,EAAaE,CAAQ,CACvC"}