{"version":3,"file":"index.es.min.js","sources":["../../../packages/helpers/src/assets/js/eventDispatch.js","../../../packages/helpers/src/resize.js","../../../packages/helpers/src/props.helpers.js","../../../packages/helpers/src/utils.ts","../../../packages/helpers/src/viewport.helpers.ts","../../../packages/helpers/src/visual.helpers.ts","../../../packages/helpers/src/gtmEvents.js","../../../packages/helpers/src/events.helpers.ts","../../../packages/page-builder-sections/src/image-text/image-text.js","../../../packages/components/src/constants.mjs"],"sourcesContent":["export const dispatchEvent = ({ eventName, args, element }) => {\n // Use the provided element or fallback to window if available\n if (!element) {\n if (typeof window !== 'undefined') {\n element = window\n } else {\n throw new Error(\n '`element` is not provided and `window` is unavailable. Provide a valid element to dispatch the event.'\n )\n }\n }\n\n let event\n if (args) {\n event = new CustomEvent(eventName, { detail: args, bubbles: true })\n } else {\n if (typeof Event === 'function') {\n event = new Event(eventName)\n } else {\n event = document.createEvent('Event')\n event.initEvent(eventName, true, true)\n }\n }\n element.dispatchEvent(event)\n}\n\nexport const readEvent = e => {\n if (!e.detail) {\n return\n }\n return e.detail\n}\n","import { BREAKPOINT_M } from '@kissui/components'\n\nconst visual = () => {\n let observer = null\n let size = 'L'\n\n const createObserver = callback =>\n new ResizeObserver(entries =>\n entries.forEach(entry => {\n if (entry.contentBoxSize) {\n const contentBoxSize = Array.isArray(entry.contentBoxSize)\n ? entry.contentBoxSize[0]\n : entry.contentBoxSize\n const newSize = getSize(contentBoxSize.inlineSize)\n if (newSize !== size) {\n size = newSize\n callback()\n }\n }\n })\n )\n\n const getSize = width => {\n if (width >= BREAKPOINT_M) {\n return 'L'\n } else {\n return 'S'\n }\n }\n\n const setSuffix = visual => {\n const regExt = /(?:\\.([^.]+))?$/\n return visual.replace(regExt, `_${size}.$1`)\n }\n\n const observe = ($el, callback) => {\n if (!$el) {\n return\n }\n\n size = getSize(window.innerWidth)\n observer = createObserver(callback)\n observer.observe($el)\n }\n\n const unobserve = $el => {\n if (!$el) {\n return\n }\n\n observer.unobserve($el)\n }\n\n return { observe, unobserve, setSuffix }\n}\n\nconst helper = visual()\n\nexport default helper\n","const getData = attributes => attributes.find(attribute => attribute.nodeName === 'data')\n\nconst createProps = attributes => {\n const data = getData([...attributes])\n const props = [...attributes]\n .filter(attribute => attribute.nodeName !== 'data')\n .reduce((all, attr) => {\n return { ...all, [attr.nodeName]: attr.nodeValue }\n }, {})\n\n if (isNil(data)) {\n return props\n }\n\n try {\n return { ...props, ...JSON.parse(data.nodeValue) }\n } catch (error) {\n console.log('ERROR: No data', error, data?.nodeValue)\n }\n}\n\nconst isNil = obj => obj === undefined || obj === null\n\nexport const parseBool = value => (!value || value === 'false' ? false : true)\n\nexport default createProps\n","export { waitForSelector } from './waitForSelector'\n\nexport const constants = {\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n ESC: 27,\n SPACE: 32,\n ENTER: 13,\n TAB: 9\n}\n\nexport function capitalize(s = '') {\n return s[0].toUpperCase() + s.slice(1)\n}\n\nexport const convertToCamelCase = (str: string): string => {\n const arr = str.match(/[a-z]+|\\d+/gi)\n if (!arr) { return str }\n return arr.map((m, i) => {\n let low = m.toLowerCase()\n if (i !== 0) {\n low = low.split('').map((s, k) => (k === 0 ? s.toUpperCase() : s)).join(\"\")\n }\n return low\n }).join(\"\")\n}\n\nexport function slug(s = '') {\n return s\n .toLowerCase()\n .trim()\n .replace(/\\s+/g, '-') // Replace spaces with -\n .replace(/[^\\w-]+/g, '') // Remove all non-word chars\n .replace(/--+/g, '-') // Replace multiple - with single -\n}\n\nexport function pxToEm(target: number, stripedInnerFontSize = 1) {\n return target / 14 / stripedInnerFontSize + 'em'\n}\n\nexport function percent(target: number) {\n return target + '%'\n}\n\nexport function parseHTML(str: string) {\n const tmp = document.implementation.createHTMLDocument('')\n tmp.body.innerHTML = str\n return tmp.body.childNodes\n}\n\nexport function stripHTML(str: string) {\n const tmp = document.implementation.createHTMLDocument('')\n tmp.body.innerHTML = str\n return (tmp.body.textContent ?? \"\").replace(RegExp('[\\\\s|\\'|\"]', 'g'), '')\n}\n\nexport function makeId(length: number) {\n var result = ''\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n var charactersLength = characters.length\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength))\n }\n return result\n}\n\nexport function removeEmptyValues(obj: { [key: string]: any }): { [key: string]: any } {\n const findText = [\n 'Default campaign ID (tracking missing in Page Builder export)',\n 'Default campaign name (tracking missing in Page Builder export)',\n 'promoname', \n 'promoid', \n 'promocreative', \n 'undefined'\n ];\n \n for (let key in obj) {\n const value = obj[key];\n \n if (value === null || value === undefined || value === '') {\n delete obj[key];\n continue;\n }\n \n if (typeof value === 'string') {\n for (const text of findText) {\n if (value.includes(text)) {\n delete obj[key];\n break;\n }\n }\n }\n }\n \n return obj;\n}\n\nexport function makeHash(str: string) {\n var hash = 0,\n i,\n chr\n if (!str) {\n return hash\n }\n for (i = 0; i < str.length; i++) {\n chr = str.charCodeAt(i)\n hash = (hash << 5) - hash + chr\n hash |= 0 // Convert to 32bit integer\n }\n return 'id-' + hash\n}\n\nexport function getHashLink(link: string) {\n let linkHash = link\n let linkNoHash = link\n if (link.indexOf('#') !== -1) {\n linkNoHash = link.replace('#', '')\n } else {\n linkHash = '#' + link\n }\n\n return { linkNoHash, linkHash }\n}\n\nexport function lazyLoad(node: Element, attribute: string, value: any, url: string) {\n const CLASSNAME_OUT_OF_SCREEN = 'lazy-load'\n const CLASSNAME_IN_SCREEN = 'lazy-loaded'\n const CLASSNAME_ON_ERROR = 'lazy-loaded-error'\n\n const isOldIOS = () => {\n var agent = window.navigator.userAgent,\n start = agent.indexOf('OS ')\n if ((agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1) && start > -1) {\n return window.Number(agent.substr(start + 3, 3).replace('_', '.')) < 14\n }\n return false\n }\n\n const inViewPort = (attribute: string, value: any) => {\n node.setAttribute(attribute, value)\n\n const cb = () => node.classList.add(CLASSNAME_IN_SCREEN)\n\n if (url) {\n const img = new Image()\n img.src = url\n img.onload = cb\n img.onerror = () => {\n cb()\n node.classList.add(CLASSNAME_ON_ERROR)\n throw new Error(`Image ${url} cannot be loaded`)\n }\n\n return\n }\n\n cb()\n }\n\n if (/Trident\\/|MSIE/.test(window.navigator.userAgent) || isOldIOS()) {\n inViewPort(attribute, value)\n } else {\n if ('IntersectionObserver' in window) {\n node.classList.add(CLASSNAME_OUT_OF_SCREEN)\n let lazyBackgroundObserver = new IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (entry.isIntersecting) {\n inViewPort(attribute, value)\n lazyBackgroundObserver.unobserve(entry.target)\n }\n })\n })\n lazyBackgroundObserver.observe(node)\n } else {\n inViewPort(attribute, value)\n }\n }\n}\n\nexport function lazyLoadCallback(node: Element, cb: () => void) {\n const isOldIOS = () => {\n var agent = window.navigator.userAgent,\n start = agent.indexOf('OS ')\n if ((agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1) && start > -1) {\n return window.Number(agent.substr(start + 3, 3).replace('_', '.')) < 14\n }\n return false\n }\n\n if (/Trident\\/|MSIE/.test(window.navigator.userAgent) || isOldIOS()) {\n cb()\n } else {\n if ('IntersectionObserver' in window) {\n let lazyBackgroundObserver = new IntersectionObserver(\n function (entries) {\n entries.forEach(function (entry) {\n if (entry.isIntersecting) {\n cb()\n lazyBackgroundObserver.unobserve(entry.target)\n }\n })\n },\n { rootMargin: '150% 0px' }\n )\n lazyBackgroundObserver.observe(node)\n }\n }\n}\n\n// Debounce\nexport function debounce<T>(func: (v: T) => void, time = 100) {\n let timer: number\n return function (event: T) {\n if (timer) {\n window.clearTimeout(timer)\n }\n timer = window.setTimeout(func, time, event)\n }\n}\n\n// isIE - to check for internet explorer\nexport function isIE() {\n let ua = window.navigator.userAgent,\n isIE = /MSIE|Trident/.test(ua)\n\n return isIE\n}\n\n// Load external script\nexport const loadExternalScript = ({\n src,\n callback = null,\n async = false,\n defer = false,\n module = false,\n id = ''\n}: {\n src: string;\n callback: null | GlobalEventHandlers[\"onload\"]\n module: boolean,\n defer: boolean,\n async: boolean,\n id: string\n}) => {\n const script = document.createElement('script')\n script.type = module ? 'module' : 'text/javascript'\n script.src = src\n id ? (script.id = id) : false // add id attribute only if passed\n if (typeof callback === 'function') {\n script.onload = callback\n }\n script.async = async\n script.defer = defer\n document.body.appendChild(script)\n}\n\n// Load external css\nexport const loadExternalCss = ({ src }: { src: string }) => {\n const script = document.createElement('link')\n script.rel = 'stylesheet'\n script.href = src\n document.body.appendChild(script)\n}\n// Lazy load vendor script\nexport const lazyLoadVendorScript = (handler, el) => {\n const observer = new IntersectionObserver(handler)\n observer.observe(el)\n}\n\n/**\n * Replaces variable inside a given string\n * Each variable have to be enclosed between stChr and enChr\n * The values have to be contained in the vars object, they key must match\n * example :\n * txt : 'See {resultsLength} Results'\n * vars : {resultsLength:'30'}\n * stChr : '{'\n * enChr : '}'\n *\n * will return : 'See 30 Results'\n *\n * @param {string} txt\n * @param {object} vars\n * @param {string} stChr\n * @param {string} enChr\n */\nexport function interpolate(txt: string, vars: Record<string, null | undefined | string>, stChr: string, enChr: string) {\n let curIdx = 0\n\n while (txt) {\n const stIdx = txt.indexOf(stChr, curIdx)\n if (stIdx === -1) {\n break\n }\n const enIdx = txt.indexOf(enChr, stIdx + 1)\n if (enIdx === -1) {\n break\n }\n const hashId = txt.substring(stIdx + stChr.length, enIdx)\n if (vars[hashId] != null) {\n txt = txt.substr(0, stIdx) + vars[hashId] + txt.substr(enIdx + enChr.length)\n curIdx = stIdx\n } else {\n curIdx = enIdx\n }\n }\n return txt\n}\n\n/**\n * Find in container element, add height to equal size of element\n * @param container css path where my element is contain e.g. `.c-container`\n * @param el css path of elements to equalized\n */\nexport const equalHeight = (containerSelector: string, el: string, elementScope: HTMLElement) => {\n const container = elementScope.querySelector<HTMLElement>(containerSelector)\n if (!container) {\n return\n }\n\n const items = container.querySelectorAll<HTMLElement>(el)\n let max = -1\n\n for (let i = 0; i < [...items].length; i++) {\n const item = [...items][i]\n let h = item.offsetHeight\n max = h > max ? h : max\n }\n\n if (max <= 0) {\n return\n }\n\n for (let i = 0; i < [...items].length; i++) {\n const item = [...items][i]\n item.style.height = `${max}px`\n }\n}\n\nexport const stringifyCurlyQuote = (data: {}) => JSON.stringify(data).replace(\"'\", '’')\n\nexport const stringifyForAttribute = (data = {}) => {\n return escapeHtml(JSON.stringify(data))\n}\n\n/**\n * This function is included instead of sanitizeString because for\n * inserting HTML into innerHTML we need to make sure all HTML\n * entities are escaped.\n */\nexport const escapeHtml = (text: string) => {\n const map = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n } as { [s: string]: string }\n\n return text.replace(/[&<>\"']/g, (m) => map[m])\n}\n\n/**\n * Because setting attributes escapes more than the characters above and then preact also\n * escapes text we need a more complete way of unescaping all html entities (not just the ones\n * above)\n */\nconst domParser = new DOMParser()\nexport const unescapeHtml = (text: string) => {\n return domParser.parseFromString(text, \"text/html\").body.textContent\n}\n\nexport const sanitizeString = (data: {}) => {\n if (!data) {\n return ''\n }\n\n return data.toString().replace(/\"/g, '"').replace(/'/g, ''')\n}\n\nexport const stripTags = (s: string) => {\n return (s || '').replace(/(<([^>]+)>)/gi, '')\n}\n\nexport const setAttributes = (element: Element, attrs: Record<string, any>) => {\n for (let key in attrs) {\n element.setAttribute(key, attrs[key])\n }\n return element\n}\n\nexport const getMetaContent = (metaName: string) => {\n const metaTag = document.querySelector(`meta[name=${metaName}]`)\n if (!metaTag) {\n return ''\n }\n return metaTag.getAttribute('content')\n}\n\nexport const isObjectEmpty = (obj: {}) => {\n return Object.keys(obj).length === 0\n}\n","import { BREAKPOINT_M, BREAKPOINT_TABLET } from '@kissui/components'\n\nconst viewport = () => {\n const lt = (ref: number) => {\n return window.innerWidth < ref\n }\n\n return {\n get is() {\n const { innerWidth: vw, devicePixelRatio } = window\n return {\n mobile: vw < BREAKPOINT_M,\n mobile_tablet: vw < BREAKPOINT_TABLET,\n tablet: vw >= BREAKPOINT_M && vw < BREAKPOINT_TABLET,\n desktop: vw >= BREAKPOINT_TABLET && devicePixelRatio <= 1,\n retina: vw >= BREAKPOINT_TABLET && devicePixelRatio > 1\n }\n },\n lt\n }\n}\n\nconst helper = viewport()\n\nexport default helper\n","import viewportHelper from './viewport.helpers'\n\nconst devices = ['mobile', 'tablet', 'desktop', 'retina'] as const\ntype Device = typeof devices[number]\ntype Sources = { [P in Device]?: string; }\n\nconst getDevice = (sources: Sources) => {\n if (!Array.isArray(sources) && typeof sources !== 'object') {\n return null\n }\n\n return devices.find(\n device => viewportHelper.is[device] === true && device in sources && sources[device] !== ''\n )\n}\n\nconst visual = () => {\n const getResponsiveSrc = (src: Sources) => {\n const device = getDevice(src)\n return device ? src[device] : src['desktop']\n }\n\n return { getResponsiveSrc }\n}\n\nconst helper = visual()\n\nexport default helper\n","import { getProduct } from '@kissui/helpers/src/catalog'\nimport { emitCustomEvent } from './events.helpers'\nimport { removeEmptyValues } from '@kissui/helpers/src/utils'\n\nconst raisedByPB = 'page builder'\nconst raisedByWC = 'Web component'\n\n/**\n * helper method for 'itemDisplay' GTM event\n * @param {*} event : 'itemDisplay' - Mandatory as is\n * @param {*} eventRaisedBy : 'Web component' - Mandatory as is\n * @param {*} eventAction : 'Click' - Action that led to the item display. For example, click\n * @param {*} itemTypes : ['products'] - Mandatory as is\n * @param {*} rootElement : ['nb-slider'] - Root DOM element for item detection. Closest common ancestor element of the inserted/displayed promotions and products. It will help the detection to reduce its performance consumption. Set to 0 (zero) in order to request detection through the entire document.\n */\nexport const itemDisplay = args => {\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'itemDisplay',\n eventRaisedBy: raisedByWC,\n eventAction: 'Click',\n itemTypes: ['products'],\n ...args\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('itemDisplay', eventData)\n}\n\n/**\n *\n * helper method for 'customEvent' GTM event\n * @param {*} args (event, eventRaisedBy, eventCategory, eventAction, eventLabel, nonInteraction)\n */\n\nexport const customEvent = args => {\n window.gtmDataObject = window.gtmDataObject || []\n var eventData\n if (args.event_GA4 === undefined || args.event_GA4 === false) {\n eventData = {\n event: 'customEvent',\n eventRaisedBy: raisedByWC,\n ...args\n }\n } else {\n eventData = {\n event_raised_by: raisedByPB,\n ...args\n }\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('customEvent', eventData)\n}\n\n/**\n * Helper method for tracking component interactions, compatible with GA4.\n *\n * @param {String} creative : component raising the event, e.g. 'before_coffees_list', 'before_machines_list', 'before_accessories_list'\n * @param {String} actionType : description of the interaction, e.g 'pdp quick view'\n * @param {String} internationalId : long SKU, e.g. 'erp.pt.b2c/prod/7243.30'\n * @param {String} internationalName : international name of the product, e.g. 'Vertuo Carafe Pour-Over Style Mild'\n * @param {String} productType : type of product, i.e. 'capsule', 'machine', 'accessory'\n * @param {String} range : product range, e.g. 'ispirazione italiana'\n * @param {String} technology : technology, i.e. 'original', 'vertuo'\n * @param {Number} price : price, e.g. .51\n * @param {String} eventAction : description of the action, e.g. 'PDP Quick View'\n *\n * Initally created for PDP Quick View tracking:\n * https://dsu-confluence.nestle.biz/display/DIANA/BEFORE+-+PDP+Quick+View\n * Will probably be rolled out across all components, update this comment accordingly.\n */\nexport const trackComponentInteraction = ({\n creative = '',\n actionType = '',\n internationalId = '',\n internationalName = '',\n productType = '',\n technology = '',\n category = '',\n rawPrice = '',\n eventAction = ''\n}) => {\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'page_builder_component_interaction',\n event_raised_by: raisedByPB,\n component_name: creative,\n action_type: actionType,\n item_id_event: internationalId,\n item_name_event: internationalName,\n item_category_event: productType,\n item_technology_event: technology,\n item_range_event: category,\n item_price_event: rawPrice,\n eventCategory: 'User Engagement',\n eventAction: eventAction,\n eventLabel: `${productType} - ${technology} - ${internationalName}`\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\n/**\n *\n * Push 'view_promotion' event for GA 4\n * @param {*} args (event, event_raised_by, ecommerce: {promotion_id, promotion_name, creative_slot, creative_name})\n */\nexport const viewPromotion = args => {\n const event = 'view_promotion'\n const eventData = {\n event,\n event_raised_by: raisedByPB,\n ecommerce: {}\n }\n if (Object.keys(args).length) {\n const { id = '', creative = '', name = '', position = '' } = args\n let ecommerceData = {\n promotion_id: id,\n promotion_name: name,\n creative_slot: position,\n creative_name: creative\n }\n ecommerceData = removeEmptyValues(ecommerceData)\n eventData.ecommerce = ecommerceData\n }\n window.gtmDataObject ??= []\n window.gtmDataObject.push(eventData)\n emitCustomEvent(event, eventData)\n}\n\nexport const handlePromoClick = args => {\n const { campaign, cta_name } = args\n\n const cleanedData = removeEmptyValues(campaign)\n selectPromotion({ cta_name, ...cleanedData })\n}\n\n/**\n *\n * Push 'select_promotion' event for GA 4\n * @param {*} args (event, event_raised_by, cta_name, ecommerce: {promotion_id, promotion_name, creative_slot, creative_name})\n */\nexport const selectPromotion = args => {\n const event = 'select_promotion'\n const eventData = {\n event: 'select_promotion',\n cta_name: args?.cta_name ?? '(not set)',\n event_raised_by: raisedByPB,\n ecommerce: {}\n }\n if (Object.keys(args).length) {\n const { id = '', creative = '', name = '', position = '' } = args\n let ecommerceData = {\n promotion_id: id,\n promotion_name: name,\n creative_slot: position,\n creative_name: creative\n }\n ecommerceData = removeEmptyValues(ecommerceData)\n eventData.ecommerce = ecommerceData\n }\n\n window.gtmDataObject ??= []\n window.gtmDataObject.push(eventData)\n emitCustomEvent(event, eventData)\n}\n\nexport const interactionClick = (nameComponent, ctaName) => {\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'page_builder_component_interaction',\n event_raised_by: raisedByPB,\n eventCategory: 'User Engagement',\n eventAction: 'Click CTA',\n eventLabel: `Page Builder - ${nameComponent} - ${ctaName}`,\n component_name: nameComponent,\n action_type: 'web component click',\n cta_name: ctaName\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\nexport const getProductInfo = async (sku, data) => {\n let product = data\n if (!product) {\n product = await getProduct(sku)\n }\n return product\n}\n\nexport const getProductPayload = (data, actionField = {}) => {\n const {\n internationalName,\n internationalId,\n category,\n unitPrice,\n legacyId,\n name,\n technologies,\n bundled,\n inStock,\n type\n } = data\n\n const technology = technologies.map(item => item.split('/').pop()).join('|')\n const isDiscovery = category.toLowerCase().includes('discovery')\n\n return [\n // Array consists of one product details for PDP Product Detail View\n {\n ...actionField,\n name: internationalName, // '[[International Product Name]]' NIE, Contract\n id: internationalId, // '[[International Product ID]]'\n price: unitPrice, // '[[Product Price]'\n // dimension43: '[[true/false]]', // '[[true/false]]' // Signifies if this product is part of a standing order or not\n dimension44: isDiscovery.toString(), // '[[true/false]]', // Signifies if this product is part of a discovery offer\n dimension53: legacyId, // '[[Product Local market ID]]', // Local market id for product\n dimension54: name, // '[[Product Local market Name]]', // Local market name for product\n dimension55: category, // '[[Product Range]]', // Range of the product, eg: Barista Creations for Ice (Nessoft Category)\n dimension56: technology, // '[[Product Technology]]', //Product technology according to Nespresso categorization (original, vertuo, pro)\n dimension57: bundled ? 'bundle' : 'single', // '[[Product Type]]', //If the product is single or bundle\n dimension192: inStock ? 'in stock' : 'out of stock', // '[in stock]', // \"in stock\" or \"out of stock\"\n category: type, // '[[Product Category]]', //Product category according to Nespresso categorization (Nessoft type): capsule, accessory, machine\n brand: 'Nespresso' // Static value set to Nespresso\n }\n ]\n}\n\nexport const trackDetailView = async (sku, data) => {\n // https://dsu-confluence.nestle.biz/display/DIANA/HQ+PB+Tracking+-+Product+Detail+View\n if (window.pbTrackDetailViewPDP || !sku || !window.napi) {\n return\n }\n\n const productInfo = await getProductInfo(sku, data)\n const productPayload = getProductPayload(productInfo)\n const currency = productInfo.currency\n\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'detailView',\n currencyCode: currency,\n eventRaisedBy: raisedByPB,\n ecommerce: {\n detail: {\n actionField: {},\n products: productPayload\n }\n }\n }\n window.gtmDataObject.push(eventData)\n // Track only once per page\n window.pbTrackDetailViewPDP = true\n emitCustomEvent('detailView', eventData)\n}\n\nexport const trackAddToCartImpression = (product, isStickyBar) => {\n // https://dsu-confluence.nestle.biz/pages/viewpage.action?spaceKey=DIANA&title=PDP+-+Sticky+Add+To+Cart+Custom+Event\n\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'page_builder_component_interaction',\n event_raised_by: raisedByPB,\n component_name: 'before_sku_main_info',\n action_type: isStickyBar\n ? 'sticky add to cart impression'\n : 'standard add to cart impression',\n //product info\n item_id_event: product.internationalId,\n item_name_event: product.internationalName,\n item_category_event: product.type,\n item_price_event: product.price_per_capsule?.split(' ')[0],\n item_market_id_event: product.legacyId,\n item_market_name_event: product.name,\n item_range_event: product.category_name,\n item_technology_event: product.technology?.[0]?.split('/').slice(-1) ?? '',\n item_type_event: product.bundled ? 'bundle' : 'single'\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\nexport const productImpression = async (position, list, sku, data) => {\n // https://dsu-confluence.nestle.biz/pages/viewpage.action?pageId=225612781\n // don't track already tracked products\n window.gtmDataObject = window.gtmDataObject || []\n const hasDetailView = window.gtmDataObject.find(item => item.event === 'detailView')\n const alreadyTracked = !!hasDetailView?.ecommerce?.detail?.products.find(p =>\n sku.includes(p.id)\n )\n if (alreadyTracked) {\n return\n }\n\n const productInfo = await getProductInfo(sku, data)\n const productPayload = getProductPayload(productInfo, { list: list, position: position })\n const currency = productInfo.currency\n const eventData = {\n event: 'impression',\n eventAction: 'Product Impression',\n currencyCode: currency,\n eventRaisedBy: raisedByPB,\n ecommerce: {\n impressions: productPayload\n }\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('impression', eventData)\n}\n\nexport const productClick = async (position, list, sku, data) => {\n // https://dsu-confluence.nestle.biz/pages/viewpage.action?pageId=225612781\n\n if (typeof list !== 'string') return\n\n const productInfo = await getProductInfo(sku, data)\n const productPayload = getProductPayload(productInfo, { position: position })\n const currency = productInfo.currency\n\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'productClick',\n eventAction: 'Product Click',\n currencyCode: currency,\n eventRaisedBy: raisedByPB,\n ecommerce: {\n click: {\n actionField: {\n list: list\n },\n products: productPayload\n }\n }\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('productClick', eventData)\n}\n\nexport function filterTrackingFromPlpFilters(filtersSelected) {\n const grouped = groupSelectedFilters(filtersSelected)\n const groupKeys = Object.keys(grouped)\n const typesFiltersSelected = groupKeys.join('|').substring(0, 99)\n const valuesFiltersSelected = groupKeys\n .map(key => grouped[key].values.map(value => value.split('/').at(-1)).join(','))\n .join('|')\n .substring(0, 99)\n\n return [typesFiltersSelected, valuesFiltersSelected]\n}\n\nexport const filterActionEvent = (\n actionType,\n filterType,\n filterValues,\n clickLocation,\n dataType\n) => {\n // https://dsu-confluence.nestle.biz/display/DIANA/PLP+-+Filter+Revamp\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = getExplicitFilterEventData(\n actionType,\n filterType,\n filterValues,\n clickLocation\n )\n\n window.gtmDataObject.push(eventData)\n if (window.NEXT_V1_PLP_EXPLICIT_FILTER_TRACKING && dataType) {\n window.gtmDataObject.push({\n ...window.NEXT_V1_PLP_EXPLICIT_FILTER_TRACKING,\n experiment_action: `${actionType} - ${dataType}`,\n cta_name: 'All filters'\n })\n }\n\n emitCustomEvent('plp_filter', eventData)\n}\n\nconst getExplicitFilterEventData = (actionType, filterType, filterValues, clickLocation) => {\n return {\n event: 'plp_filter',\n event_raised_by: raisedByPB,\n action_type: actionType,\n filter_type: filterType,\n ...(filterValues ? { filter_values: filterValues } : {}),\n ...(clickLocation ? { click_location: clickLocation } : {})\n }\n}\n\nfunction groupSelectedFilters(filtersSelected = []) {\n return filtersSelected.reduce((grouped, { key, value }) => {\n if (!grouped[key]) grouped[key] = { key, values: [] }\n grouped[key].values.push(value.replaceAll(',', '-'))\n return grouped\n }, {})\n}\n\nfunction arrTolastURLElementMapper(arr) {\n if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n return arr.map(item => item.split('/').pop()?.trim() || '')\n}\n\nfunction arrToJoinedString(arr, joiner = '|') {\n if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n return arr.map(item => item.trim()).join(joiner)\n}\n\nfunction findTechnogiesText(arr) {\n if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n if (arr.length === 1) return cleanText(arrTolastURLElementMapper(arr)?.[0])\n else return 'multiple'\n}\n\nfunction cleanText(str) {\n if (typeof str === 'undefined') return undefined\n\n return str.toString().trim()\n}\n\nconst generateEcommerceObject = async (productIds, options) => {\n const productRequests = productIds.map(SKU => getProduct(SKU))\n const productData = await Promise.all(productRequests)\n\n return {\n ecommerce: {\n currency: window[window.config.padl.namespace].dataLayer.app.app.currency,\n value: productData.reduce((ac, product) => {\n return ac + product.price\n }, 0),\n items: productData.map((product, index) => {\n if (product.type === 'bundle' || product.type === 'giftcard') {\n return {\n item_id: cleanText(product.internationalId),\n item_name: cleanText(product.internationalName),\n item_brand: 'nespresso',\n item_category: cleanText(product.type),\n index: index + 1\n }\n }\n\n let output = {\n item_id: cleanText(product.internationalId),\n item_name: cleanText(product.internationalName),\n item_brand: 'nespresso',\n item_category: cleanText(product.type),\n item_category2: arrToJoinedString(\n arrTolastURLElementMapper(product.technologies)\n ),\n item_category3: cleanText(product.category),\n price: product.price,\n quantity: product.salesMultiple,\n affiliation: 'nespresso online store',\n coupon: undefined,\n discount: undefined,\n location_id: undefined,\n item_list_name: cleanText(options?.listName),\n item_list_id: cleanText(options?.listId),\n index: index + 1,\n item_market_id: cleanText(product.legacyId),\n item_market_name: cleanText(product.name),\n item_technology: findTechnogiesText(product.technologies),\n item_range: cleanText(product.category),\n item_discovery_offer: product.category.includes('discovery').toString(),\n item_added_by_user: undefined,\n item_ecotax_applicable: product?.displayEcoTax\n ? cleanText(product?.displayEcoTax.toString())\n : undefined,\n item_selection_list: cleanText(arrToJoinedString(product.productSelections)),\n item_in_stock: product?.inStock\n ? cleanText(product?.inStock.toString())\n : undefined,\n item_subscription_name: undefined,\n item_subscription_category: undefined,\n item_subscription_price: undefined,\n item_subscription_duration: undefined,\n item_subscription_fee: undefined\n }\n\n switch (product.type) {\n case 'capsule': {\n const capsuleProduct = product\n\n output.item_category4 = capsuleProduct.bundled ? 'bundle' : 'single'\n\n output.item_type = capsuleProduct.bundled ? 'bundle' : 'single'\n\n output.item_coffee_aromatic_profile = cleanText(\n arrToJoinedString(capsuleProduct.capsuleProductAromatics)?.toLowerCase()\n )\n\n output.item_coffee_intensity =\n cleanText(capsuleProduct.capsuleProperties.intensity) ?? undefined\n\n output.item_coffee_cup_size = cleanText(\n arrToJoinedString(capsuleProduct.capsuleCupSizes)\n )?.toLowerCase()\n\n break\n }\n case 'machine': {\n const machineProduct = product\n\n output.item_machine_shade = cleanText(machineProduct.colorShade?.name)\n\n break\n }\n }\n\n if (product.type === 'machine' || product.type === 'accessory') {\n output.item_avg_rating = product.ratingCode\n output.item_number_of_reviews = product.ratingCode\n }\n\n return output\n })\n }\n }\n}\n\nexport const selectItems = async (productIds, options) => {\n const ecommerceObject = await generateEcommerceObject(productIds, options)\n\n const output = {\n event: 'select_item',\n event_raised_by: options?.eventRaisedBy ?? 'before_cross_sell_v3',\n click_location: options?.clickLocation ?? 'page builder cross sell quick view',\n item_list_id: options?.listId ?? 'before_cross_sell_v3',\n subscription_product_included: 'false',\n discovery_offer_included: 'false',\n ...ecommerceObject\n }\n\n window.gtmDataObject.push({ ecommerce: null })\n window.gtmDataObject.push(output)\n}\n\nexport const viewItemList = async (productIds, options) => {\n const ecommerceObject = await generateEcommerceObject(productIds, options)\n\n const output = {\n event: 'view_item_list',\n event_raised_by: options?.eventRaisedBy,\n subscription_product_included: 'false',\n discovery_offer_included: 'false',\n ...ecommerceObject\n }\n\n if (options?.eventRaisedBy === undefined) delete output.event_raised_by\n\n window.gtmDataObject.push({ ecommerce: null })\n window.gtmDataObject.push(output)\n}\n\nexport const isGtmTrackingExists = trackingData => {\n window.gtmDataObject = window.gtmDataObject || []\n\n return window.gtmDataObject.some(\n event =>\n event.event === trackingData.event &&\n event.ecommerce?.creative_slot === trackingData.campaign.position &&\n event.ecommerce?.promotion_id === trackingData.campaign.id &&\n event.ecommerce?.promotion_name === trackingData.campaign.name &&\n event.ecommerce?.creative_name === trackingData.campaign.creative\n )\n}\n","export type EventListener = {\n element: HTMLElement\n type: string\n listener: (e: Event) => void\n options?: boolean | AddEventListenerOptions\n}\n\nconst add = (eventListeners: EventListener[] = []) => {\n eventListeners.forEach(eventListener => {\n if (!eventListener || !eventListener.element) {\n return\n }\n return eventListener.element.addEventListener(\n eventListener.type,\n eventListener.listener,\n eventListener.options\n )\n })\n}\n\nconst remove = (eventListeners: EventListener[] = []) => {\n eventListeners.forEach(eventListener => {\n if (!eventListener || !eventListener.element) {\n return\n }\n eventListener.element.removeEventListener(eventListener.type, eventListener.listener)\n })\n}\n\nconst busNamespace = 'pageBuilder'\n\nexport const emitCustomEvent = (eventName: string, data: unknown) => {\n const customEvent = new CustomEvent(`${busNamespace}.${eventName}`, {\n detail: data,\n bubbles: true,\n cancelable: true,\n composed: false\n })\n\n window.dispatchEvent(customEvent)\n}\n\nexport default { add, emitCustomEvent, remove }\n","import { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { EVENT_POPIN_OPEN } from '@kissui/components'\nimport resize from '@kissui/helpers/src/resize'\nimport createProps from '@kissui/helpers/src/props.helpers.js'\nimport {\n stripHTML,\n makeHash,\n setAttributes,\n stringifyForAttribute\n} from '@kissui/helpers/src/utils'\nimport visualHelper from '@kissui/helpers/src/visual.helpers'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { handlePromoClick } from '@kissui/helpers/src/gtmEvents'\nclass ImageText extends HTMLElement {\n constructor() {\n super()\n this.videoPopinElement = null\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.render()\n this.eventListeners = this.createEventListeners()\n this.addEventListeners()\n }\n\n createEventListeners() {\n const eventListeners = []\n const videoButton = this.querySelector('button.visual')\n if (videoButton) {\n eventListeners.push({\n element: videoButton,\n type: 'click',\n listener: this.openPlayer.bind(this)\n })\n }\n return eventListeners\n }\n\n createLayout() {\n const { position = 'left', mobile_image_position = 'bottom' } = this.props.copywriting\n this.classList.add(`text-${position}`)\n this.classList.add(`mobile-${mobile_image_position}`)\n }\n\n render() {\n const { layout, campaign, copywriting } = this.props\n const {\n heading = '',\n heading_size = 'h-3xl-300',\n hide_title,\n subtitle = '',\n visual_secondary,\n video_autoplay = { video_id: '' },\n video\n } = copywriting\n const { mobile = '', desktop = '' } = visual_secondary\n const { video_id = '', video_service = '' } = video\n const { background_color, padding_top, padding_bottom } = layout\n const { id, name, creative, position } = campaign\n\n const classTitle = `${heading_size} ${hide_title !== 'false' ? 'sr-only' : ''}`\n this.hasSecondary =\n (viewportHelper.is.mobile && mobile !== '') ||\n (!viewportHelper.is.mobile && desktop !== '')\n this.hasVideo = video_id !== '' && video_service !== ''\n this.hasAutoPlayVideo = video_autoplay.video_id !== ''\n\n this.createLayout()\n this.innerHTML = `<nb-container\n campaign_id=\"${id}\"\n campaign_name=\"${name}\"\n campaign_creative=\"${creative}\"\n campaign_position=\"${position}\"\n background_color='${background_color}'\n classname=\"${padding_top} ${padding_bottom}\"\n contrast=\"light\">\n <div class=\"caption\">\n ${heading && `<h2 class=\"${classTitle}\">${heading}</h2>`}\n ${subtitle && `<p class=\"t-md-400-sl\">${subtitle}</p>`}\n ${this.renderContent()}\n ${this.renderLink()}\n <div class=\"cta-holder\">\n ${this.renderCta()}\n ${this.renderCtaSecondary()}\n </div>\n </div>\n <div class=\"cover ${this.hasSecondary && 'cover-secondary'}\">\n ${this.renderCover()}\n </div>\n </nb-container>`\n\n if (this.hasAutoPlayVideo) {\n this.renderSelfVideoButton = this.querySelector('#autoplay-toggle')\n if (this.renderSelfVideoButton) {\n this.renderSelfVideoButton.addEventListener(\n 'click',\n this.boundOnButtonSelfVideoClick\n )\n }\n }\n }\n\n renderCover() {\n const {\n visual,\n visual_secondary = {},\n video = {},\n video_autoplay = {}\n } = this.props.copywriting\n\n if (!visual) {\n return ''\n }\n\n if (typeof visual === 'string') {\n return this.renderSimpleVisual()\n }\n\n const srcPrimary = visualHelper.getResponsiveSrc(visual)\n const srcSecondary = this.hasSecondary\n ? visualHelper.getResponsiveSrc(visual_secondary)\n : ''\n\n let primary = ''\n if (!this.hasVideo) {\n primary = `<div class=\"visual\">\n <img loading=\"lazy\" src=\"${srcPrimary}\" alt=\"${visual.alt_text}\"/>\n </div>`\n } else {\n if (!this.hasAutoPlayVideo) {\n this.classList.add('has-video')\n primary = `<button class=\"visual\">\n <nb-icon icon=\"24/symbol/play-solid\"></nb-icon>\n <img loading=\"lazy\" src=\"${srcPrimary}\" alt=\"${visual.alt_text + '.'}\"/>\n ${\n video.a11y_play_video !== ''\n ? `<span class=\"sr-only\">${video.a11y_play_video}</span>`\n : ''\n }\n </button>`\n }\n }\n\n if (this.hasAutoPlayVideo) {\n primary = `\n <div class=\"autoplay-container\">\n <nb-video class=\"autoplay-video\" data=\"${stringifyForAttribute(\n video_autoplay\n )}\"></nb-video>\n <button id=\"autoplay-toggle\" class=\"autoplay-button video_button icon-pause\" tabindex=\"0\" aria-pressed=\"false\" data-status=\"pause\">\n <span class=\"video_button__icon\">\n <nb-icon icon=\"24/symbol/play-solid\" class=\"playButton\"></nb-icon>\n <nb-icon icon=\"24/symbol/pause-solid\" class=\"pauseButton\"></nb-icon>\n </span>\n </button>\n </div>\n\n `\n }\n\n let secondary = ''\n if (this.hasSecondary) {\n secondary = `<img alt=\"${visual_secondary.alt_text}\" loading=\"lazy\" class=\"visual secondary\" src=\"${srcSecondary}\" aria-hidden=\"true\" />`\n }\n\n return `${secondary + primary}`\n }\n\n boundOnButtonSelfVideoClick(e) {\n const targetElement = e.target || e.srcElement\n const video = document.querySelector('.autoplay-video video')\n if (targetElement.dataset.status === 'pause') {\n video.pause()\n targetElement.dataset.status = 'play'\n targetElement.classList.remove('icon-pause')\n targetElement.classList.add('icon-play')\n } else {\n video.play()\n targetElement.dataset.status = 'pause'\n targetElement.classList.remove('icon-play')\n targetElement.classList.add('icon-pause')\n }\n }\n\n renderSimpleVisual() {\n const { visual, visual_alt = '' } = this.props.copywriting\n const src = resize.setSuffix(visual)\n return `<div class=\"visual\">\n <img loading=\"lazy\" src=\"${src}\" alt=\"${visual_alt}\"/>\n </div>`\n }\n\n renderLink() {\n const { label, link, color, size, seo_label } = this.props.copywriting.link\n\n if (!label || !link) {\n return ''\n }\n\n const { id, name, creative, position } = this.props.campaign\n\n return `<nb-link\n campaign_id=\"${id}\"\n campaign_name=\"${name}\"\n campaign_creative=\"${creative}\"\n campaign_position=\"${position}\"\n link=\"${link}\"\n color=\"${color}\"\n size=\"${size}\"\n seo_label=\"${seo_label}\"\n >${label}</nb-link>`\n }\n\n renderCta() {\n const { label, link, variation, seo_label, popin_id } = this.props.copywriting.cta\n\n if (!label || (!link && !popin_id)) {\n return ''\n }\n\n const { id, name, creative, position } = this.props.campaign\n\n return `<nb-cta\n campaign_id=\"${id}\"\n campaign_name=\"${name}\"\n campaign_creative=\"${creative}\"\n campaign_position=\"${position}\"\n ${link ? `link=\"${link}\"` : ''}\n ${popin_id ? `popin_id=\"${popin_id}\"` : ''}\n variation=\"${variation}\"\n seo_label=\"${seo_label}\"\n >${label}</nb-cta>`\n }\n\n renderCtaSecondary() {\n if (!this.props.copywriting.cta_secondary) {\n return ''\n }\n\n const { label, link, variation, seo_label, popin_id, icon_right } =\n this.props.copywriting.cta_secondary\n\n if (!label || (!link && !popin_id)) {\n return ''\n }\n\n const { id, name, creative, position } = this.props.campaign\n\n return `<nb-cta\n campaign_id=\"${id}\"\n campaign_name=\"${name}\"\n campaign_creative=\"${creative}\"\n campaign_position=\"${position}\"\n ${link ? `link=\"${link}\"` : ''}\n ${popin_id ? `popin_id=\"${popin_id}\"` : ''}\n variation=\"${variation}\"\n seo_label=\"${seo_label}\"\n icon_right=\"${icon_right}\"\n >${label}</nb-cta>`\n }\n\n renderContent() {\n const { text } = this.props.copywriting\n\n if (!text) {\n return ''\n }\n\n const replacedText = text.replaceAll(\n new RegExp(/<li>([^<>]*)<\\/li>/, 'g'),\n '<li><nb-icon icon=\"24/symbol/check\"></nb-icon>$1</li>'\n )\n return `<div class=\"content t-sm-400\">${replacedText}</div>`\n }\n\n renderPlayer() {\n const {\n video_id,\n video_mobile = '',\n display_ui_controls,\n cc_policy_language,\n video_service\n } = this.props.copywriting.video\n if (!this.hasVideo) {\n return ''\n }\n this.popinId = this.createPopinID(video_id)\n this.videoPopinElement = document.createElement('nb-popin')\n setAttributes(this.videoPopinElement, {\n id: this.popinId,\n variation: 'before',\n bgcolor: 'white'\n })\n this.videoElement = document.createElement('nb-video')\n setAttributes(this.videoElement, {\n container_id: 'player-' + this.popinId,\n video_id,\n video_mobile,\n video_service,\n popin_id: this.popinId,\n display_controls: display_ui_controls,\n ccPolicy_language: cc_policy_language,\n allow_popin_autoplay: 'true'\n })\n this.videoPopinElement.appendChild(this.videoElement)\n this.appendChild(this.videoPopinElement)\n }\n\n createPopinID(videoId) {\n const { heading = '' } = this.props.copywriting\n this.stripedHeading = stripHTML(heading).substring(0, 15)\n return `image-text-${makeHash(this.stripedHeading)}-${videoId}`\n }\n\n addEventListeners() {\n if (!this.eventListeners) {\n return\n }\n this.eventListeners.forEach(eventListener =>\n eventListener.element.addEventListener(\n eventListener.type,\n eventListener.listener,\n eventListener.options\n )\n )\n }\n\n removeEventListeners() {\n if (!this.eventListeners) {\n return\n }\n\n this.eventListeners.forEach(eventListener =>\n eventListener.element.removeEventListener(eventListener.type, eventListener.listener)\n )\n }\n\n openPlayer() {\n if (!this.videoPopinElement) {\n this.renderPlayer()\n }\n dispatchEvent({ eventName: EVENT_POPIN_OPEN, args: { id: this.popinId } })\n\n const { campaign = {}, copywriting = {} } = this.props\n const { video = {} } = copywriting\n\n const label = video.video_id ? video.video_id : 'not set'\n handlePromoClick({ campaign: campaign, cta_name: `VIDEO - ${label}` })\n }\n\n disconnectedCallback() {\n this.removeEventListeners()\n }\n}\n\ncustomElements.get('nb-image-text') || customElements.define('nb-image-text', ImageText)\n\nexport default ImageText\n","export const MAX_WIDTH_CONTAINER = 1160\n\nexport const BREAKPOINT_XL = 1920\nexport const BREAKPOINT_TABLET = 1024\nexport const BREAKPOINT_L = 996\nexport const BREAKPOINT_M = 768\nexport const BREAKPOINT_S = 750\nexport const BREAKPOINT_XS = 375\n\nexport const CTA_PRIMARY = 'primary'\nexport const CTA_PRIMARY_TRANSPARENT = 'primary_transparent'\nexport const CTA_SUBTLE = 'subtle'\nexport const CTA_LINK = 'link'\nexport const CTA_LINK_UNDERLINE = 'link-underline'\nexport const CTA_LINK_GOLD = 'link-gold'\nexport const CTA_LINK_ADD_TO_CART_SMALL = 'AddToCart_small'\nexport const CTA_LINK_ADD_TO_CART_LARGE = 'AddToCart_large'\n\nexport const EVENT_TAB_CHANGE = 'EVENT_TAB_CHANGE'\n\nexport const EVENT_VIDEO = 'WEB_COMPONENT_VIDEO'\nexport const EVENT_POPIN_OPEN = 'WEB_COMPONENT_POPIN_OPEN'\nexport const EVENT_POPIN_OPENED = 'WEB_COMPONENT_POPIN_OPENED'\nexport const EVENT_POPIN_CLOSE = 'WEB_COMPONENT_POPIN_CLOSE'\nexport const EVENT_POPIN_CLOSED = 'WEB_COMPONENT_POPIN_CLOSED'\nexport const EVENT_POPIN_CLOSE_CLICK = 'WEB_COMPONENT_POPIN_CLOSE_CLICK'\nexport const EVENT_POPIN_KEY_DOWN = 'keydown'\nexport const EVENT_POPIN_FORM_TOGGLE_TITLE = 'WEB_COMPONENT_POPIN_FORM_TOGGLE_TITLE'\nexport const EVENT_CTA_CLICK = 'WEB_COMPONENT_CTA_CLICK'\nexport const EVENT_HERO_REORDER_OPEN = 'WEB_COMPONENT_HERO_REORDER_OPEN'\nexport const EVENT_HERO_REORDER_CLOSE = 'WEB_COMPONENT_HERO_REORDER_CLOSE'\nexport const EVENT_QUICKVIEW_OPEN = 'WEB_COMPONENT_QUICKVIEW_OPEN'\nexport const EVENT_QS_OPEN = 'WEB_COMPONENT_QS_OPEN'\nexport const EVENT_QS_OPENED = 'WEB_COMPONENT_QS_OPENED'\nexport const EVENT_QS_CLOSE = 'WEB_COMPONENT_QS_CLOSE'\nexport const EVENT_QS_CLOSED = 'WEB_COMPONENT_QS_CLOSED'\nexport const EVENT_QS_CLOSE_CLICK = 'WEB_COMPONENT_QS_CLOSE_CLICK'\nexport const EVENT_QS_KEY_DOWN = 'keydown'\nexport const EVENT_ADD_TO_CART = 'WEB_COMPONENT_ADD_TO_CART'\nexport const EVENT_CART_UPDATED = 'WEB_COMPONENT_CART_UPDATED'\nexport const EVENT_VIDEO_TOGGLE = 'WEB_COMPONENT_VIDEO_TOGGLE'\nexport const VIDEO_ON_HOVER = 'VIDEO_ON_HOVER'\nexport const VIDEO_ON_OUT = 'VIDEO_ON_OUT'\nexport const EVENT_DETAIL_OPEN = 'WEB_COMPONENT_DETAIL_OPEN'\nexport const EVENT_SLIDER_READY = 'WEB_COMPONENT_SLIDER_READY'\nexport const EVENT_SLIDE_CHANGE = 'WEB_COMPONENT_SLIDE_CHANGE'\nexport const EVENT_OVERLAY_OPEN = 'WEB_COMPONENT_OVERLAY_OPEN'\nexport const EVENT_OVERLAY_CLOSE = 'WEB_COMPONENT_OVERLAY_CLOSE'\nexport const EVENT_OVERLAY_CLICKED = 'WEB_COMPONENT_OVERLAY_CLICKED'\nexport const EVENT_OPEN_PRODUCT_AR_CLICKED = 'OPEN_PRODUCT_AR_CLICKED'\nexport const EVENT_SORT_BY_CHANGE = 'WEB_COMPONENT_SORT_BY_CHANGE'\n\nexport const EVENT_BUBBLE_SELECTED = 'EVENT_BUBBLE_SELECTED'\nexport const EVENT_RECO_TOOL_OPTION_CLICKED = 'EVENT_RECO_TOOL_OPTION_CLICKED'\nexport const WEB_COMPONENT_PROJECTS_LOADED = 'WEB_COMPONENT_PROJECTS_LOADED'\nexport const WEB_COMPONENT_ANCHOR_LOADED = 'WEB_COMPONENT_ANCHOR_LOADED'\n\nexport const EVENT_SWIPED_UP = 'swiped-up'\nexport const EVENT_SWIPED_DOWN = 'swiped-down'\nexport const EVENT_SWIPED_LEFT = 'swiped-left'\nexport const EVENT_SWIPED_RIGHT = 'swiped-right'\n\nexport const EVENT_HEADER_POSITION_CHANGED = 'EVENT_HEADER_POSITION_CHANGED'\n\nexport const keys = { ESC: 'Escape' }\n\nexport const ADD_TO_CART_MODIFIER_MINI = 'mini'\nexport const ADD_TO_CART_MODIFIER_DEFAULT = ADD_TO_CART_MODIFIER_MINI\n\nexport const COFFEE_ORIGINAL = 'original'\nexport const COFFEE_VERTUO = 'vertuo'\nexport const COFFEE_PRO = 'pro'\nexport const COFFEE_OL = 'OL'\nexport const COFFEE_VL = 'VL'\nexport const INTENSITY_MAX_OL = 14\nexport const INTENSITY_MAX_VL = 12\nexport const DEFAULT_BUBBLE_ICON = ''\n\nexport const NUMBER_PRODUCTS_SLIDER = 8\nexport const NUMBER_FEATURES_PDP = 8\n\nexport const ALIGNMENT = ['center', 'left', 'right']\nexport const POSITION = ['top', 'right', 'bottom', 'left']\nexport const TRANSLATION_ADD_TO_CART = 'Add to cart'\nexport const TRANSLATION_UPDATE_BASKET = 'Update basket'\n\nexport const TIME_INSTANT = 1\nexport const TIME_FAST = 300\nexport const TIME_MEDIUM = 600\nexport const TIME_SLOW = 1200\n\nexport const APP_APPLE_LINK = {\n default: 'https://apps.apple.com/us/app/nespresso/id342879434',\n us: 'https://apps.apple.com/us/app/nespresso-new/id1609639566',\n uk: 'https://apps.apple.com/gb/app/nespresso-new/id1609639566',\n kr: 'https://apps.apple.com/kr/app/%EB%84%A4%EC%8A%A4%ED%94%84%EB%A0%88%EC%86%8C-%EB%B6%80%ED%8B%B0%ED%81%AC/id1609639566'\n}\nexport const APP_ANDROID_LINK =\n 'https://play.google.com/store/apps/details?id=com.nespresso.activities'\nexport const APP_HUAWEI_LINK = 'https://appgallery.huawei.com/app/C102571517'\n\nexport const SRC_PAGE_PLP = 'plp'\nexport const SRC_PAGE_PDP = 'pdp'\n\nexport const PLP_TYPE_COFFEE = 'coffee'\nexport const PLP_TYPE_MACHINE = 'machine'\nexport const PLP_TYPE_ACCESSORY = 'accessory'\nexport const CALLEO_API_DOMAIN = 'https://www.contact.nespresso.com/'\n\n// SCSS RELATED\n// Todo : should be shared by JS and SCSS\nexport const BROWSER_CONTEXT = 16 // 1rem = 16px\nexport const COLOR_WHITE_1000 = '#FFFFFF' // Do not change for #FFF shortcut, it will break slider-natural gradients !\n\nexport const CONTRAST_DARK = 'dark'\nexport const CONTRAST_LIGHT = 'light'\n\nexport const B2B_CONTACT_FORM_POPIN_ID = 'b2b-contact-form-popin-id'\nexport const B2B_CONTACT_FORM_POPIN_SRC_SEARCH = 'coveo-search'\n\nexport const B2B_CONTACT_FORM_POPIN_SRC_SKU_MAIN_INFO = 'sku-main-info'\n\nexport const B2B_CONTACT_FORM_POPIN_SRC_SKU_MAIN_INFO_AUTO = 'sku-main-info-auto'\n\nexport const ASPECT_RATIO_16_9 = '16/9'\nexport const ASPECT_RATIO_1_1 = '1/1'\n\nexport const NESPRESSO_PRODUCTION_DOMAIN = 'https://www.nespresso.com'\nexport const NESPRESSO_ROLLOUT_DOMAIN = 'https://nc2-env-rollout.nespresso.com'\n\nexport const EVENT_QUIZ_ON_GO_BACK = 'WEB_COMPONENT_EVENT_QUIZ_ON_GO_BACK'\nexport const EVENT_QUIZ_SUBMIT = 'WEB_COMPONENT_EVENT_QUIZ_SUBMIT'\n"],"names":["helper","visual","observer","size","createObserver","getSize","width","BREAKPOINT_M","observe","$el","callback","window","innerWidth","ResizeObserver","entries","forEach","entry","contentBoxSize","Array","isArray","newSize","inlineSize","unobserve","setSuffix","replace","isNil","obj","removeEmptyValues","findText","key","value","text","includes","escapeHtml","map","m","DOMParser","setAttributes","element","attrs","setAttribute","is","vw","devicePixelRatio","mobile","mobile_tablet","BREAKPOINT_TABLET","tablet","desktop","retina","lt","ref","devices","getResponsiveSrc","src","device","sources","find","viewportHelper","getDevice","selectPromotion","args","event","eventData","cta_name","event_raised_by","ecommerce","Object","keys","length","id","creative","name","position","ecommerceData","promotion_id","promotion_name","creative_slot","creative_name","gtmDataObject","push","emitCustomEvent","eventName","data","customEvent","CustomEvent","detail","bubbles","cancelable","composed","dispatchEvent","ImageText","HTMLElement","constructor","this","videoPopinElement","connectedCallback","props","attributes","attribute","nodeName","getData","filter","reduce","all","attr","nodeValue","JSON","parse","error","console","log","createProps","render","eventListeners","createEventListeners","addEventListeners","videoButton","querySelector","type","listener","openPlayer","bind","createLayout","mobile_image_position","copywriting","classList","add","layout","campaign","heading","heading_size","hide_title","subtitle","visual_secondary","video_autoplay","video_id","video","video_service","background_color","padding_top","padding_bottom","classTitle","hasSecondary","hasVideo","hasAutoPlayVideo","innerHTML","renderContent","renderLink","renderCta","renderCtaSecondary","renderCover","renderSelfVideoButton","addEventListener","boundOnButtonSelfVideoClick","renderSimpleVisual","srcPrimary","visualHelper","srcSecondary","primary","alt_text","a11y_play_video","stringifyForAttribute","stringify","secondary","e","targetElement","target","srcElement","document","dataset","status","pause","remove","play","visual_alt","resize","label","link","color","seo_label","variation","popin_id","cta","cta_secondary","icon_right","replaceAll","RegExp","renderPlayer","video_mobile","display_ui_controls","cc_policy_language","popinId","createPopinID","createElement","bgcolor","videoElement","container_id","display_controls","ccPolicy_language","allow_popin_autoplay","appendChild","videoId","stripedHeading","str","tmp","implementation","createHTMLDocument","body","textContent","stripHTML","substring","hash","i","charCodeAt","makeHash","eventListener","options","removeEventListeners","removeEventListener","Error","Event","createEvent","initEvent","cleanedData","handlePromoClick","disconnectedCallback","customElements","get","define"],"mappings":"AAAO,MCwDDA,EAtDSC,MACPC,IAAAA,EAAW,KACXC,EAAO,IAELC,MAgBAC,EAAUC,GACRA,GAASC,IACF,IAEA,IA2BR,MAAA,CAAEC,QAlBOA,CAACC,EAAKC,KACbD,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