{"version":3,"sources":["webpack:///./src/frontend/components/quick-view/module.js","webpack:///./src/EbaySweden.TouchWeb/static/script/utils/environment.js"],"names":["warnIfDevBuild","El","document","querySelectorAll","render","e","logger","mountQuickView","moduleName","process","onModuleLoaded","callback","isModuleLoaded","window","body","getAttribute","MutationObserver","mutationsList","item","attributeName","observe","attributes","error"],"mappings":"6PASAA,YAAe,cAgBA,qBACX,IAAMC,EAAK,IAAWC,SAASC,iBAAiB,gBAC5CF,GAhBe,SAAAA,GACnB,GAAIA,EACA,IACIG,iBACI,kBAAC,IAAD,KACI,kBAAC,IAAD,OAEJH,GAEN,MAAOI,GACLC,YAAOD,IAOXE,CAAeN,EAAG,M,oJC5BbD,EAAiB,SAAAQ,GACtBC,GAAWA,gCAAXA,GAeKC,EAAiB,SAAAC,GAC1B,IAAMC,EAAiB,iBACyC,SAA5DC,OAAOX,SAASY,KAAKC,aAAa,uBAEtC,IACQH,KACAD,IAEW,IAAIK,kBAAiB,SAAAC,GAIhB,OAHA,IAAAA,GAAa,KAAbA,GACZ,SAAAC,GAAI,MAA2B,uBAAvBA,EAAKC,kBAEOP,KACpBD,OAGCS,QAAQP,OAAOX,SAASY,KAAM,CAAEO,YAAY,IAEvD,MAAOC,Q","file":"script/chunks/chunk.quick-view.f206e7e6da.js","sourcesContent":["import { render } from 'react-dom';\nimport React from 'react';\n\nimport { ProviderWithGlobalStore } from 'tradera-state/configure-store';\nimport { warnIfDevBuild } from 'utils/environment';\nimport { logger } from 'packages';\nimport QuickView from './quick-view-modal';\nimport './quick-view-modal.scss';\n\nwarnIfDevBuild('quick-view');\n\nconst mountQuickView = El => {\n if (El) {\n try {\n render(\n \n \n ,\n El\n );\n } catch (e) {\n logger(e);\n }\n }\n};\nexport default () => {\n const El = Array.from(document.querySelectorAll('#quick-view'));\n if (El) {\n mountQuickView(El[0]);\n }\n};\n","export const warnIfDevBuild = moduleName => {\n if (process && process.env && process.env.NODE_ENV !== 'production') {\n /* eslint-disable no-console */\n console.log(\n `%c Warning: This is a Dev build of ${moduleName}`,\n 'background:red; color:white; font-size:18px;'\n );\n /* eslint-enable no-console */\n }\n};\n\n/**\n * helper function that is called after the header has been loaded. useful when you want to have the redux loaded before you start\n * to dispatch actions.\n * @param {func} callback\n */\nexport const onModuleLoaded = callback => {\n const isModuleLoaded = () =>\n window.document.body.getAttribute('data-module-loaded') === 'true';\n\n try {\n if (isModuleLoaded()) {\n callback();\n }\n let observer = new MutationObserver(mutationsList => {\n const element = mutationsList.filter(\n item => item.attributeName === 'data-module-loaded'\n );\n if (element !== null && isModuleLoaded()) {\n callback();\n }\n });\n observer.observe(window.document.body, { attributes: true });\n // eslint-disable-next-line no-empty\n } catch (error) {}\n};\n"],"sourceRoot":""}