{"version":3,"file":"index.es.min.js","sources":["../../../packages/helpers/src/props.helpers.js","../../../packages/components/src/card-labels/cardLabels.js","../../../packages/components/src/constants.mjs","../../../packages/components/src/nespressoElement/nespressoElement.js","../../../packages/helpers/src/viewport.helpers.ts","../../../packages/helpers/src/utils.ts","../../../packages/components/src/sku/constants.mjs","../../../packages/components/src/sku/fragments/heading.js","../../../packages/components/src/sku/fragments/headline.js","../../../packages/components/src/sku/fragments/labelTechnology.js","../../../packages/components/src/sku/fragments/labelRange.js","../../../packages/helpers/src/catalog.js","../../../packages/helpers/src/getCurrency.js","../../../packages/components/src/sku/fragments/strikethroughPrice.js","../../../packages/components/src/sku/fragments/price.js","../../../packages/helpers/src/dataLayer.js","../../../packages/components/src/sku/fragments/addToCart.js","../../../packages/components/src/sku/fragments/additionalMessage.js","../../../packages/helpers/src/cremaDataHelper.js","../../../packages/components/src/sku-coffee/services/index.js","../../../packages/page-builder-sections/src/cross-sell-natural/dataTransform/product.coffee.dto.js","../../../services/plp/services.js","../../../packages/components/src/sku/services/index.js","../../../packages/components/src/sku-quick-view/shared-quick-view-types.ts","../../../packages/components/src/sku-quick-view/shared-quick-view.ts","../../../packages/page-builder-sections/src/cross-sell-natural/dataTransform/product.dto.js","../../../packages/page-builder-sections/src/cross-sell-natural/dataTransform/product.machine.dto.js","../../../packages/page-builder-sections/src/cross-sell-natural/dataTransform/product.accessory.dto.js","../../../packages/page-builder-sections/src/cross-sell-natural/dataTransform/product.giftCard.dto.js","../../../packages/helpers/src/assets/js/eventDispatch.js","../../../packages/helpers/src/events.helpers.ts","../../../packages/helpers/src/gtmEvents.js","../../../packages/components/src/sku/sku.js","../../../packages/components/src/sku/fragments/setCardTheme.js","../../../packages/components/src/sku/fragments/labels.js","../../../packages/helpers/src/logos.helpers.js","../../../packages/components/src/sku/fragments/image.js","../../../packages/components/src/sku/fragments/quickView.js","../../../packages/components/src/sku-coffee/fragments/bundle.js","../../../node_modules/classnames/index.js","../../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","../../../packages/components/src/compatibility/CompatibilityButton/CompatibilityButton.tsx","../../../packages/components/src/compatibility/CompatibilityModal/modalUtils.ts","../../../packages/apps/src/components/ModalDrawer/ModalDrawer.tsx","../../../packages/apps/src/utils/isOldSafari.ts","../../../packages/components/src/compatibility/CompatibilityModal/CompatibilityModal.tsx","../../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js","../../../packages/helpers/src/asWebComponent.ts","../../../packages/components/src/compatibility/compatibility-section/compatibility-section.tsx","../../../packages/components/src/sku-coffee/fragments/heading.js","../../../packages/components/src/sku-coffee/fragments/sleeve.js","../../../packages/components/src/sku-coffee/sku-coffee.js","../../../packages/components/src/sku-coffee/fragments/skuQuickViewLink.js","../../../packages/components/src/sku-coffee/fragments/intensity.js","../../../packages/components/src/sku-coffee/fragments/boxTube.js","../../../packages/helpers/src/productCompatibility.ts","../../../packages/components/src/sku-coffee/fragments/packFormat.js","../../../packages/components/src/sku-coffee/fragments/priceCapsule.js"],"sourcesContent":["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","import createProps from '@kissui/helpers/src/props.helpers'\n\nclass CardLabels extends HTMLElement {\n    constructor() {\n        super()\n        this.props = {}\n        this.labels = []\n    }\n\n    connectedCallback() {\n        this.props = createProps(this.attributes)\n        this.render()\n    }\n\n    render() {\n        const { labels = [], direction = 'column' } = this.props\n        this.classList.add(`${direction === 'row' ? 'direction-row' : 'direction-' + direction}`)\n\n        if (labels.length === 0) {\n            return ''\n        }\n        this.labels = labels\n\n        this.innerHTML = `${this.renderLabels()}`\n    }\n\n    renderLabels() {\n        return this.labels\n            .map(label => {\n                const { name = '', bgColor = '', color = '' } = label\n                return `<mark class=\"t-3xs-500-caps-sl\"\n                            ${\n                                bgColor &&\n                                color &&\n                                `style=\"background: ${bgColor}; color: ${color}\"`\n                            }>\n                            <span>${name}</span>\n                        </mark>`\n            })\n            .join('')\n    }\n}\n\ncustomElements.get('nb-card-labels') || customElements.define('nb-card-labels', CardLabels)\n\nexport default CardLabels\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","export class NespressoElement extends HTMLElement {\n    constructor() {\n        super()\n        this.template = ''\n    }\n\n    connectedCallback() {\n        this.props = this._createProps()\n        this.onStart?.()\n        this.loadTemplate()\n        this.onReady?.()\n    }\n\n    /**\n     * Load the attributes and create the props object\n     * @returns {any}\n     * @private\n     */\n    _createProps(forceAttributes = null) {\n        const attributes = forceAttributes || this.attributes\n\n        const getData = attr => attr.find(attribute => attribute.nodeName === 'data')\n\n        let props\n        try {\n            props = [...attributes].reduce((all, attr) => {\n                return { ...all, [attr.nodeName]: attr.nodeValue }\n            }, {})\n\n            const data = getData([...attributes])\n\n            if (data === undefined || data === null) {\n                return props\n            }\n\n            return { ...props, ...JSON.parse(data.nodeValue) }\n        } catch (error) {\n            console.log(this.nodeName, 'ERROR: No data', error)\n        }\n    }\n\n    /**\n     * Render by DOM diff\n     */\n    render(force = false) {\n        if (force) {\n            // todo review the performance of this\n            this.innerHTML = ''\n        }\n        /**\n         * Convert a template string into HTML DOM nodes\n         * @param  {String} str The template string\n         * @return {Node}       The template HTML\n         */\n        const _stringToHTML = str => {\n            const parser = new DOMParser()\n            const doc = parser.parseFromString(str, 'text/html')\n            return doc.body\n        }\n\n        /**\n         * Compare the template to the UI and make updates\n         * @param  {Node} template The template HTML\n         * @param  {Node} elem     The UI HTML\n         */\n        const _diff = (template, elem) => {\n            /**\n             * Get the type for a node\n             * @param  {Node}   node The node\n             * @return {String}      The type\n             */\n            const _getNodeType = node => {\n                if (node.nodeType === 3) {\n                    return 'text'\n                }\n                if (node.nodeType === 8) {\n                    return 'comment'\n                }\n                return node.tagName.toLowerCase()\n            }\n\n            /**\n             * Get the content from a node\n             * @param  {Node}   node The node\n             * @return {String}      The type\n             */\n            const _getNodeContent = node => {\n                if (node.childNodes && node.childNodes.length > 0) {\n                    return null\n                }\n                return node.textContent\n            }\n\n            // Get arrays of child nodes\n            const domNodes = Array.prototype.slice.call(elem.childNodes)\n            const templateNodes = Array.prototype.slice.call(template.childNodes)\n\n            // If extra elements in DOM, remove them\n            var count = domNodes.length - templateNodes.length\n            if (count > 0) {\n                for (; count > 0; count--) {\n                    domNodes[domNodes.length - count].parentNode.removeChild(\n                        domNodes[domNodes.length - count]\n                    )\n                }\n            }\n\n            // Diff each item in the templateNodes\n            templateNodes.forEach(function (node, index) {\n                // If element doesn't exist, create it\n                if (!domNodes[index]) {\n                    elem.appendChild(node.cloneNode(true))\n                    return\n                }\n\n                // If element is not the same type, replace it with new element\n                if (_getNodeType(node) !== _getNodeType(domNodes[index])) {\n                    domNodes[index].parentNode.replaceChild(node.cloneNode(true), domNodes[index])\n                    return\n                }\n\n                // If content is different, update it\n                const templateContent = _getNodeContent(node)\n                if (templateContent && templateContent !== _getNodeContent(domNodes[index])) {\n                    domNodes[index].textContent = templateContent\n                }\n\n                // If target element should be empty, wipe it\n                if (domNodes[index].childNodes.length > 0 && node.childNodes.length < 1) {\n                    domNodes[index].innerHTML = ''\n                    return\n                }\n\n                // If element is empty and shouldn't be, build it up\n                // This uses a document fragment to minimize reflows\n                if (domNodes[index].childNodes.length < 1 && node.childNodes.length > 0) {\n                    const fragment = document.createDocumentFragment()\n                    _diff(node, fragment)\n                    domNodes[index].appendChild(fragment)\n                    return\n                }\n\n                // If there are existing child elements that need to be modified, diff them\n                if (node.childNodes.length > 0) {\n                    _diff(node, domNodes[index])\n                }\n            })\n        }\n\n        // todo - add support to reactivity\n        // this.template(this.state)\n        const templateHTML = _stringToHTML(this.template)\n        _diff(templateHTML, this)\n    }\n\n    /**\n     * Set the HTML to be used in the template\n     * @param {String} html The HTML to use\n     *\n     * This function is overwritten by the extended class to set the HTML\n     *\n     */\n    loadTemplate(template = '', force = false) {\n        this.template = template === '' ? this.template : `${template}`\n        this.render(force)\n    }\n\n    disconnectedCallback() {\n        this.onDestroy?.()\n    }\n}\n\ncustomElements.get('nb-nespresso-element') ||\n    customElements.define('nb-nespresso-element', NespressoElement)\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","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        '&': '&amp;',\n        '<': '&lt;',\n        '>': '&gt;',\n        '\"': '&quot;',\n        \"'\": '&#039;'\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, '&quot;').replace(/'/g, '&apos;')\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","export const VARIATION_PLP = 'plp'\nexport const VARIATION_PDP = 'pdp'\nexport const VARIATION_CROSS_SELL = 'cross-sell'\nexport const VARIATION_SMALL = 'small'\n","import { VARIATION_PDP } from '@kissui/components/src/sku/constants'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\n\nconst isPdp = variation => variation === VARIATION_PDP\n\nconst getHeadingLevel = ({ variation }) => (isPdp(variation) ? 'h1' : 'h3')\n\nconst renderLink = ({ url, a11y_product_card = '', name = '', name_custom = '' }) => {\n    const a11yProductName = a11y_product_card.replace('{productName}', name)\n    const productName = name_custom !== '' ? name_custom : name\n\n    return `<a href=\"${url}\" target=\"_self\" title=\"${a11yProductName}\" aria-label=\"${a11yProductName}\">${productName}</a>`\n}\n\nexport const renderHeading = props => {\n    const { url, name = '', name_custom = '' } = props\n\n    if (!name) {\n        return ''\n    }\n\n    const finalName = name_custom !== '' ? name_custom : name\n    const result = []\n    const headingLevel = getHeadingLevel(props)\n\n    result.push(\n        `<${headingLevel} class=\"cb-heading ${\n            viewportHelper.is.mobile ? 't-md-700-sl' : 'h-lg-700'\n        }\">`\n    )\n\n    if (url && !isPdp(props.variation)) {\n        result.push(renderLink(props))\n    } else {\n        result.push(`${finalName}`)\n    }\n\n    result.push(`</${headingLevel}>`)\n\n    return result.join('')\n}\n","import viewportHelper from '@kissui/helpers/src/viewport.helpers'\nexport const renderHeadline = ({ headline = '', is_headline_hidden = false }) => {\n    if ((is_headline_hidden && viewportHelper.is.mobile) || !headline) {\n        return ''\n    }\n\n    return `<p class=\"cb-text t-sm-400-sl\">${headline}</p>`\n}\n","export const renderLabelTechnology = ({ label_technology }) => {\n    if (!label_technology) {\n        return ''\n    }\n\n    return `<p class=\"cb-technology t-xs-700-sl\">${label_technology}</p>`\n}\n","export const renderLabelRange = ({ label_range }) => {\n    if (!label_range) {\n        return ''\n    }\n\n    return `<p class=\"cb-range t-xs-500-sl\">${label_range}</p>`\n}\n","import { COFFEE_VERTUO } from '@kissui/components/src/constants.mjs'\nimport { getCurrency } from './getCurrency'\nexport { getCurrency } from './getCurrency'\n\nexport const ECAPI_TYPE_CAPSULE = 'capsule'\nexport const ECAPI_TYPE_MACHINE = 'machine'\nexport const ECAPI_TYPE_ACCESSORY = 'accessory'\nexport const ECAPI_TYPE_GIFT_CARD = 'giftcard'\n\nconst TECHNOLOGY_CATEGORY_IDENTIFIER = '/machineTechno/'\nconst SLEEVE_OF_10 = 10\nconst SLEEVE_OF_7 = 7\n\nconst trimSku = sku => sku.replace(/[^a-z0-9- +./]/gi, '')\n\nexport const getLegacySKU = productId => productId.split('prod/').pop()\n\nexport const getPriceFormatter = async () => await window.napi.priceFormat()\n\nexport const getProduct = sku => window.napi.catalog().getProduct(trimSku(sku))\n\nexport function getTechnologyName(productData) {\n    const techno = productData.technologies[0]\n    return techno.substring(\n        techno.indexOf(TECHNOLOGY_CATEGORY_IDENTIFIER) + TECHNOLOGY_CATEGORY_IDENTIFIER.length\n    )\n}\n\nfunction isMultipleOf(quantity, multiple) {\n    return quantity % multiple === 0\n}\n\nexport function getSleeveNumber(product, getTechnologyNameFn = getTechnologyName) {\n    if (product.sales_multiple !== 1 && isMultipleOf(product.sales_multiple, SLEEVE_OF_10)) {\n        // Sleeve of original or vertuo\n        return product.sales_multiple / SLEEVE_OF_10\n    }\n\n    if (\n        product.sales_multiple !== 1 &&\n        getTechnologyNameFn(product) === COFFEE_VERTUO &&\n        isMultipleOf(product.sales_multiple, SLEEVE_OF_7)\n    ) {\n        // Sleeve of vertuo\n        return product.sales_multiple / SLEEVE_OF_7\n    }\n\n    if (product.sales_multiple === 1 && isMultipleOf(product.unitQuantity, SLEEVE_OF_10)) {\n        // Bundle of original or vertuo\n        return product.unitQuantity / SLEEVE_OF_10\n    }\n\n    if (\n        product.sales_multiple === 1 &&\n        getTechnologyNameFn(product) === COFFEE_VERTUO &&\n        isMultipleOf(product.unitQuantity, SLEEVE_OF_7)\n    ) {\n        // Bundle of vertuo\n        return product.unitQuantity / SLEEVE_OF_7\n    }\n\n    return NaN\n}\n\n/**\n * Guess if the product is part of a bundle.\n * This is determined by checking the 'sales_multiple' and 'unitQuantity' properties.\n */\nexport function isBundled(productData) {\n    // TODO: this function should not change the productData, but some components still need it\n    productData.sales_multiple = productData.sales_multiple || productData.salesMultiple\n\n    const isSalesMultipleGreaterThanOne = productData.sales_multiple > 1\n    const isUnitQuantityEqualToOne = productData.unitQuantity === 1\n    const isSalesMultipleEqualToOne = productData.sales_multiple === 1\n    const isUnitQuantityGreaterThanOne = productData.unitQuantity > 1\n\n    // The product is not bundled if sales_multiple > 1 and unitQuantity = 1\n    if (isSalesMultipleGreaterThanOne && isUnitQuantityEqualToOne) {\n        return false\n    }\n\n    // The product is bundled if sales_multiple = 1 and unitQuantity > 1\n    return isSalesMultipleEqualToOne && isUnitQuantityGreaterThanOne\n}\n\n/**\n * Replace an array of SKU with product data\n * Remove the element inside the list if sku fail. It prevents to get an empty item.\n * @param {Array.<String>} skus\n * @param getProductFn\n * @returns {Promise<Awaited<unknown>[]>}\n */\nexport function getProductAndClean(skus, getProductFn = getProduct, napi = window.napi) {\n    const promises = []\n\n    if (!napi) {\n        return Promise.reject()\n    }\n\n    if (!Array.isArray(skus)) {\n        skus = [skus]\n    }\n\n    // Load manually the product to delete SKU fail\n    for (const sku of skus) {\n        promises.push(\n            getProductFn(sku)\n                .then(data => skus.splice(skus.indexOf(sku), 1, data))\n                .catch(() => {\n                    skus.splice(skus.indexOf(sku), 1)\n                    console.error(`getProduct fail on sku ${sku}`)\n                })\n        )\n    }\n\n    return Promise.all(promises)\n}\n\nexport const getFormattedPrice = async price => {\n    const priceFormatter = await getPriceFormatter()\n    const currency = getCurrency()\n\n    return priceFormatter.html\n        ? priceFormatter.html(currency, price)\n        : priceFormatter.short(currency, price) || ''\n}\n\nexport const getProductCategories = async sku => {\n    const productDetails = await getProduct(sku)\n    const productCategories = productDetails ? productDetails.supercategories : []\n    const productCategoriesNew = await Promise.all(\n        productCategories.map(async categoryEncoded => {\n            const productCategoryData = await window.napi.catalog().getCategory(categoryEncoded)\n            return productCategoryData\n        })\n    )\n    return productCategoriesNew\n}\n","export const getCurrency = () => window[window.config.padl.namespace].dataLayer.app.app.currency\n","import { getFormattedPrice } from '@kissui/helpers/src/catalog'\n\nconst getStrikethroughPriceElement = component => {\n    return component.querySelector('.cb-price-old')\n}\n\nconst fetchStrikethroughPrice = strikethroughPrice => {\n    return getFormattedPrice(strikethroughPrice)\n}\n\nexport const renderStrikethroughPrice = ({ strikethrough_price }, component) => {\n    if (!strikethrough_price) {\n        return ''\n    }\n\n    fetchStrikethroughPrice(strikethrough_price)\n        .then(payload => {\n            const element = getStrikethroughPriceElement(component)\n            if (!element) {\n                return\n            }\n\n            element.innerHTML = payload\n        })\n        .catch(e => {\n            console.error(`Error: Component SKU - Strike Through Price  - ${e}`)\n\n            const element = getStrikethroughPriceElement(component)\n            if (!element) {\n                return\n            }\n\n            element.style.display = 'none'\n        })\n\n    return `<p class=\"cb-price-old t-sm-400-sl\"></p>`\n}\n","import { ECAPI_TYPE_CAPSULE } from '@kissui/helpers/src/catalog'\nexport const renderPrice = ({\n    price,\n    hidePrice,\n    giftcard_price,\n    price_per_capsule,\n    show_sleeve_price,\n    type\n}) => {\n    if ((!price && !giftcard_price) || hidePrice) {\n        return ''\n    }\n    let finalPrice = null\n    if (!show_sleeve_price && price_per_capsule) {\n        finalPrice = price_per_capsule\n    } else {\n        finalPrice = price\n    }\n    if (type !== ECAPI_TYPE_CAPSULE) {\n        finalPrice = price\n    }\n\n    return `<p class=\"cb-price-current\"><span>${finalPrice || giftcard_price}</span></p>`\n}\n","export const getDataLayer = () => {\n    return window[window?.padlNamespace]?.dataLayer\n}\n\nexport const getMarketCode = () => {\n    const dataLayer = getDataLayer()\n    if (!dataLayer) {\n        return 'ch'\n    }\n\n    return dataLayer.app.app.market.toLocaleLowerCase()\n}\n\nexport const getLangCode = () => {\n    const dataLayer = getDataLayer()\n    if (!dataLayer) {\n        return 'en'\n    }\n\n    return getDataLayer().page.page.pageInfo.language.toLocaleLowerCase()\n}\n\nexport const getSegmentCode = () => {\n    const dataLayer = getDataLayer()\n    if (!dataLayer) {\n        return 'B2C'\n    }\n\n    return getDataLayer().page.page.pageInfo.segmentBusiness\n}\n\nexport const isLoggedIn = () => {\n    const dataLayer = getDataLayer()\n    if (!dataLayer || !dataLayer.user) {\n        return false\n    }\n\n    return dataLayer.user.isLoggedIn\n}\n\nexport const interpolateMarketLang = (string, market, lang) => {\n    return string.replace('{market}', market).replace('{lang}', lang)\n}\n","import viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport {\n    VARIATION_PLP,\n    VARIATION_SMALL,\n    VARIATION_CROSS_SELL,\n    VARIATION_PDP\n} from '@kissui/components/src/sku/constants'\nimport { isLoggedIn } from '@kissui/helpers/src/dataLayer'\n\nconst getButtonSize = variation => {\n    switch (variation) {\n        case VARIATION_PLP:\n            return viewportHelper.is.mobile ? 'small' : 'large'\n        case VARIATION_SMALL:\n            return 'small'\n        default:\n            return 'large'\n    }\n}\n\nfunction getComputedProps(activeSku, activeLongSku, sku, longSku, disableTracking) {\n    const skuProp = activeSku || sku\n    const activeLongSkuProp = activeLongSku || longSku\n    const disableTrackingProp = disableTracking && `disableTracking=true`\n\n    return { skuProp, activeLongSkuProp, disableTrackingProp }\n}\n\nexport const renderAddToCart = props => {\n    const {\n        activeLongSku,\n        activeSku,\n        category_name = '',\n        contact_cta = {},\n        hidePrice,\n        longSku = '',\n        position,\n        rendererName = '',\n        show_view_details = false,\n        sku,\n        url,\n        variation = VARIATION_PLP,\n        view_details_label = 'View details',\n        technologies = [],\n        disableTracking = false\n    } = props\n\n    const buttonSize = getButtonSize(variation)\n    let cta_url = url,\n        cta_label = view_details_label,\n        contact_cta_text = contact_cta.contact_cta_text || '',\n        contact_url_anchor = contact_cta.contact_url_anchor || '',\n        is_b2b = checkForB2B(technologies)\n\n    // CONTACT US BUTTON\n    const { skuProp, activeLongSkuProp, disableTrackingProp } = getComputedProps(\n        activeSku,\n        activeLongSku,\n        sku,\n        longSku,\n        disableTracking\n    )\n\n    function b2bNotLoggedIn(contact_url_anchor, cta_url, cta_label) {\n        //CONTACT US BUTTON[ hidePrice = true]\n        const linkAttribute = contact_url_anchor ? `link=\"${cta_url}\"` : ''\n\n        return `<nb-cta ${linkAttribute} variation=\"primary\" data-disabletracking=\"true\">${cta_label}</nb-cta>`\n    }\n\n    function b2bLoggedIn({\n        skuProp,\n        activeLongSkuProp,\n        buttonSize,\n        category_name,\n        position,\n        rendererName,\n        variation,\n        disableTrackingProp\n    }) {\n        return `\n                    <nb-add-to-cart\n                        sku=\"${skuProp}\"\n                        longSku=\"${activeLongSkuProp}\"\n                        buttonSize=\"${buttonSize}\"\n                        showPrice\n                        range='${category_name}'\n                        position='${position}'\n                        rendererName='${rendererName}'\n                        tracking_no_impression=\"${variation === VARIATION_PDP}\"\n                        ${disableTrackingProp}\n                    >\n                    </nb-add-to-cart>\n                `\n    }\n\n    function remainingCases(cta_url, cta_label) {\n        //VIEW DETAILS BUTTON [ hidePrice = false]\n        return `<nb-cta link=\"${cta_url}\" variation=\"primary\">${cta_label}</nb-cta>`\n    }\n\n    if (hidePrice || show_view_details) {\n        if (\n            is_b2b &&\n            (variation === VARIATION_PDP || variation === VARIATION_CROSS_SELL) &&\n            !isLoggedIn()\n        ) {\n            cta_url = contact_url_anchor\n            cta_label = contact_cta_text\n\n            return b2bNotLoggedIn(contact_url_anchor, cta_url, cta_label)\n        } else if (is_b2b && variation === VARIATION_PDP && isLoggedIn()) {\n            return b2bLoggedIn({\n                skuProp,\n                activeLongSkuProp,\n                buttonSize,\n                category_name,\n                position,\n                rendererName,\n                variation,\n                disableTrackingProp\n            })\n        }\n\n        return remainingCases(cta_url, cta_label)\n    }\n\n    // ADD TO CART BUTTON\n    return `\n            <nb-add-to-cart\n                sku=\"${skuProp}\"\n                longSku=\"${activeLongSkuProp}\"\n                buttonSize=\"${buttonSize}\"\n                showPrice\n                range='${category_name}'\n                position='${position}'\n                rendererName='${rendererName}'\n                tracking_no_impression=\"${variation === VARIATION_PDP}\"\n                ${disableTrackingProp}\n            ></nb-add-to-cart>\n        `\n}\n\nfunction checkForB2B(technologies) {\n    return Array.isArray(technologies) && technologies.some(tech => tech.includes('pro'))\n}\n","export const renderAdditionalMessage = ({\n    additional_message_icon,\n    additional_message,\n    additional_message_link\n}) => {\n    if (!additional_message && !additional_message_link) {\n        return ''\n    }\n\n    let additionalMessageFinal = ''\n\n    if (additional_message) {\n        let renderIcon = ''\n        if (additional_message_icon) {\n            renderIcon = `<nb-icon icon=\"${additional_message_icon}\" class=\"additionalMsgIcon\"></nb-icon>`\n        }\n\n        additionalMessageFinal = `<p class=\"cb-warn t-sm-500-sl\">\n            ${renderIcon}\n            ${additional_message}</p>`\n    }\n\n    const hasAdditionalMessageLink =\n        additional_message_link && additional_message_link.link && additional_message_link.label\n\n    if (!hasAdditionalMessageLink) {\n        return additionalMessageFinal\n    }\n\n    return (\n        additionalMessageFinal +\n        `<nb-link\n            link='${additional_message_link.link}'\n            color=\"${additional_message_link.color}\"\n            size=\"${additional_message_link.size}\"\n            seo_label=\"${additional_message_link.seo_label}\">\n            ${additional_message_link.label}\n        </nb-link>`\n    )\n}\n","import { getMarketCode } from './dataLayer'\n\nconst LABEL_CATEGORY_NAME = 'cat/capsule-range-label'\nconst LABEL_CATEGORY_NAME_MACHINE = 'cat/machine-range-label'\nexport const RANGE_CATEGORY_NAME = 'cat/capsule-range'\nconst FAIR_TRADE_CATEGORY_NAME = 'cat/capsule-range-fair-trade'\nconst VERTUO_NEXT_CATEGORY_NAME = 'cat/capsule-attribute-only-vertuo-next'\nconst ORGANIC_EU_CATEGORY_NAME = 'capsule-attribute-organic-eu'\nconst RAINFOREST_CATEGORY_NAME = 'capsule-attribute-rainforest'\nconst SUSTAINABILITY_CATEGORY_NAME = 'capsule-attribute-sustainability'\nconst ARABICA_CATEGORY_NAME = 'capsule-attribute-arabica'\nconst PRODUCT_HIGHLIGHT_CATEGORY_NAME = 'cat/capsule-attribute-highlight'\nconst TECHNOLOGY_CATEGORY_IDENTIFIER = '/machineTechno/'\n\nconst COMMON_URL = 'https://www.nespresso.com/shared_res/agility/commons/img/icons/'\n\nexport const FAIR_TRADE_IMG = COMMON_URL + 'fairTrade.svg'\nexport const ORGANIC_LOGO_IMG_EU = COMMON_URL + 'logo-organic-eu.svg'\nexport const ORGANIC_LOGO_IMG_US = COMMON_URL + 'logo-organic-us.svg'\nexport const ORGANIC_LOGO_IMG_CA = COMMON_URL + 'logo-organic-ca.svg'\nexport const ORGANIC_LOGO_IMG_BR = COMMON_URL + 'logo-organic-br.svg'\nexport const ORGANIC_LOGO_IMG_JP = COMMON_URL + 'logo-organic-jp.svg'\nexport const ORGANIC_LOGO_IMG_BE = COMMON_URL + 'logo-organic-be.png'\n\nexport const VERTUONEXT_LOGO_IMG = COMMON_URL + 'logo-only-vertuo-next.svg'\nexport const RAINFOREST_LOGO_IMG = COMMON_URL + 'logo-rainforest.svg'\nexport const SUSTAINABILITY_LOGO_IMG = COMMON_URL + 'logo-sustainability.svg'\nexport const Q_CERTIFICATION_ARABICA_LOGO_IMG = COMMON_URL + 'q_grade_certification_arabica.svg'\nexport const DESIGN_AWARD_2021_IMG = COMMON_URL + 'design_award_2021.svg'\n\nexport const LOGO_IMG_MAP = {\n    fair_trade: FAIR_TRADE_IMG,\n    is_organic: getOrganicLogo(),\n    only_vertuo_next: VERTUONEXT_LOGO_IMG,\n    is_q_certified_arabica: Q_CERTIFICATION_ARABICA_LOGO_IMG,\n    is_rainforest: RAINFOREST_LOGO_IMG,\n    is_sustainable: SUSTAINABILITY_LOGO_IMG,\n    is_design_award_2021: DESIGN_AWARD_2021_IMG\n}\n\nexport function getOrganicLogo() {\n    let organicLogoImg = ORGANIC_LOGO_IMG_EU\n\n    switch (getMarketCode()) {\n        case 'us':\n            organicLogoImg = ORGANIC_LOGO_IMG_US\n            break\n        case 'ca':\n            organicLogoImg = ORGANIC_LOGO_IMG_CA\n            break\n        case 'br':\n            organicLogoImg = ORGANIC_LOGO_IMG_BR\n            break\n        case 'jp':\n            organicLogoImg = ORGANIC_LOGO_IMG_JP\n            break\n        case 'be':\n            organicLogoImg = ORGANIC_LOGO_IMG_BE\n            break\n    }\n\n    return organicLogoImg\n}\n\n/**\n * retrieves the list of categories of type Vertuo Next\n * @param {category[]} categories\n */\nexport function getVertuoNext(categories) {\n    return categories.find(category => isVertuoNext(category))\n}\n\n/**\n * returns true when the category is product vertuo next\n * @param {category} category\n */\nfunction isVertuoNext(category) {\n    return getCategoryRegEx(VERTUO_NEXT_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type organic EU\n * @param {category[]} categories\n */\nexport function getOrganicEu(categories) {\n    return categories.find(category => isOrganicEu(category))\n}\n\n/**\n * returns true when the category is product organic EU\n * @param {category} category\n */\nfunction isOrganicEu(category) {\n    return getCategoryRegEx(ORGANIC_EU_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type rainforest\n * @param {category[]} categories\n */\nexport function getRainforest(categories) {\n    return categories.find(category => isRainforest(category))\n}\n\n/**\n * returns true when the category is rainforest\n * @param {category} category\n */\nfunction isRainforest(category) {\n    return getCategoryRegEx(RAINFOREST_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type sustainability\n * @param {category[]} categories\n */\nexport function getSustainability(categories) {\n    return categories.find(category => isSustainability(category))\n}\n\n/**\n * retrieves the list of categories of type arabica\n * @param {category[]} categories\n */\nexport function getArabica(categories) {\n    return categories.find(category => isArabica(category))\n}\n\n/**\n * returns true when the category is arabica\n * @param {category} category\n */\nfunction isArabica(category) {\n    return getCategoryRegEx(ARABICA_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * returns true when the category is sustainability\n * @param {category} category\n */\nfunction isSustainability(category) {\n    return getCategoryRegEx(SUSTAINABILITY_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getLabels(categories) {\n    return categories.filter(category => isLabel(category))\n}\n\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getProductHighlight(categories) {\n    return categories.find(category => isProductHighlight(category))\n}\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getFairTrade(categories) {\n    return categories.find(category => isFairTrade(category))\n}\n\n/**\n * returns a regex to match the tail (global) of a given local category ID\n * @param {string} categoryIdTail : should contain the end of the category ID\n */\nexport function getCategoryRegEx(categoryIdTail) {\n    return new RegExp(categoryIdTail.replace(/\\//g, '\\\\/'))\n}\n\n/**\n * returns true when the category is child of the label category (is type label)\n * @param {category} category\n */\nfunction isLabel(category) {\n    return (\n        getCategoryRegEx(LABEL_CATEGORY_NAME).test(category.id) ||\n        getCategoryRegEx(LABEL_CATEGORY_NAME_MACHINE).test(category.id)\n    )\n}\n\n/**\n * returns true when the category is product highlight\n * @param {category} category\n */\nfunction isProductHighlight(category) {\n    return getCategoryRegEx(PRODUCT_HIGHLIGHT_CATEGORY_NAME).test(category.id)\n}\n/**\n * returns true when the category is fair trade\n * @param {category} category\n */\nfunction isFairTrade(category) {\n    return getCategoryRegEx(FAIR_TRADE_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * returns true when the category is child of the range category (is type range)\n * @param {category} category\n */\nexport function isRange(category) {\n    return category.superCategories.some(superCategory =>\n        getCategoryRegEx(RANGE_CATEGORY_NAME).test(superCategory)\n    )\n}\n\nexport function getTechnologyName(productData, categories) {\n    if (!productData || !productData.technologies || !productData.technologies.length) {\n        return null\n    }\n\n    const techno = productData.technologies[0]\n    const categoryNameAsSubstring = techno.substring(\n        techno.indexOf(TECHNOLOGY_CATEGORY_IDENTIFIER) + TECHNOLOGY_CATEGORY_IDENTIFIER.length\n    )\n    const category = categories?.find(cat => cat.id === techno)\n\n    // Backward compatibility, return name as substring if the list of categories are not available\n    return category?.name || categoryNameAsSubstring\n}\n\nexport function isCategoryHidden(categoryId) {\n    let hideCategory = false\n    // To enable AB testing: exclude categories which are to be hidden\n    if (\n        window.PLP_HIDE_CATEGORIES?.length &&\n        window.PLP_HIDE_CATEGORIES.findIndex(c => categoryId.indexOf(c) >= 0) >= 0\n    ) {\n        hideCategory = true\n    }\n\n    // To enable AB testing: exclude categories except those which are to be shown\n    if (window.PLP_ONLY_SHOW_CATEGORIES?.length) {\n        // Default to hide\n        hideCategory = true\n        if (window.PLP_ONLY_SHOW_CATEGORIES.findIndex(c => categoryId.indexOf(c) >= 0) >= 0) {\n            hideCategory = false\n        }\n    }\n    return hideCategory\n}\n","import { INTENSITY_MAX_OL, INTENSITY_MAX_VL } from '@kissui/components'\n\nexport const getMaxIntensity = ({ technologies }) =>\n    technologies.indexOf('original') !== -1 ? INTENSITY_MAX_OL : INTENSITY_MAX_VL\n","import { getFinalPrice } from '@kissui/plp/services'\nimport { isBundled } from '@kissui/helpers/src/catalog'\nimport { getMaxIntensity } from '@kissui/components/src/sku-coffee/services'\n\nexport const getMergedProductCoffeeData = (\n    product,\n    pageBuilderProductProps,\n    pageBuilderProps,\n    priceFormatter,\n    currency\n) => {\n    const { bundle_details } = pageBuilderProductProps\n    const { options } = pageBuilderProps\n    const { show_sleeve_price } = options\n\n    const isBundledResult = isBundled(product)\n\n    const { showCapsulePrice, price_per_capsule, final_price } = getFinalPrice(\n        show_sleeve_price,\n        product,\n        isBundled\n    )\n\n    const option = {\n        bundled: isBundledResult,\n        intensity: product.capsuleProperties?.intensity || product.intensity || null,\n        max_intensity: getMaxIntensity(product),\n        price_per_capsule: price_per_capsule\n            ? priceFormatter.short(currency, price_per_capsule)\n            : null,\n        show_capsule_price: showCapsulePrice\n    }\n\n    if (show_sleeve_price) {\n        option.price = priceFormatter.short(currency, final_price)\n    }\n\n    if (bundle_details) {\n        option.bundle_details = bundle_details\n    }\n\n    return option\n}\n","import {\n    getVertuoNext,\n    getOrganicEu,\n    getRainforest,\n    getLabels,\n    getProductHighlight,\n    getFairTrade,\n    getSustainability,\n    isRange,\n    getCategoryRegEx,\n    RANGE_CATEGORY_NAME,\n    getArabica\n} from '@kissui/helpers/src/cremaDataHelper'\n\n/**\n * Modifies the structure to make it easier to use in components\n * Applies all the data customization mixing Page builder with HMC data\n * @param {object} plpData : original PLP data\n */\nexport async function getMergedPLPData(plpData) {\n    const { data } = plpData\n    if (!data) {\n        return []\n    }\n\n    const eCommerceData = data.configuration.eCommerceData\n\n    addLabels(eCommerceData)\n\n    addProductAttribute(\n        eCommerceData,\n        getFairTrade,\n        (prod, category) => (prod.fairTrade = category.name)\n    )\n    addProductAttribute(eCommerceData, getProductHighlight, prod => (prod.highlighted = true))\n    addProductAttribute(eCommerceData, getVertuoNext, prod => (prod.onlyVertuoNext = true))\n    addProductAttribute(eCommerceData, getOrganicEu, prod => (prod.organicEu = true))\n    addProductAttribute(eCommerceData, getRainforest, prod => (prod.rainforest = true))\n    addProductAttribute(eCommerceData, getSustainability, prod => (prod.sustainability = true))\n    addProductAttribute(eCommerceData, getArabica, prod => (prod.arabica = true))\n\n    addSubSegments(eCommerceData)\n\n    return eCommerceData.categories\n}\n\nfunction addSubSegments(eCommerceData) {\n    const { categories, productGroups, products } = eCommerceData\n    // should be forEach if nothing returned/assigned\n    categories.forEach(category => {\n        const hasSegment = category.subCategories.length > 0 && isRange(category)\n        if (hasSegment) {\n            category.segments = category.subCategories.map(categoryId => {\n                const segment = categories.find(subCategory => subCategory.id === categoryId)\n                if (segment && isSubsegment(categories, segment)) {\n                    segment.products = getProductsData(productGroups, segment.id, products)\n                    segment.isSegment = true\n                }\n                return segment\n            })\n        }\n\n        category.products = getProductsData(productGroups, category.id, products)\n    })\n}\n\nexport function getProductsData(productGroups, categoryId, products) {\n    let result = []\n    try {\n        const currentCategory = productGroups.find(category => category.categoryId === categoryId)\n\n        if (!currentCategory) {\n            return result\n        }\n\n        const { productIds } = currentCategory\n        return productIds.map(productId => {\n            const product = products.find(product => product.id === productId)\n            return product\n        })\n    } catch (e) {\n        //generally an anti pattern to only log the error, with no try catch the result would be the same\n        console.log(e)\n    }\n\n    return result\n}\n\n/**\n * adds labels property to products containing each label's category data (JSON parsed description property) assigned to it\n * labels are categories that have the label base category as parent\n * to apply a label on a given product, the label has to contain the product\n * this function has to clean the productGroups as well by removing the label ones\n * @param {category[]} categories\n * @param {productGroup[]} productGroups\n * @param {product[]} products\n */\nfunction addLabels(eCommerceData) {\n    const { categories, productGroups, products } = eCommerceData\n    const labels = getLabels(categories)\n    const labelGroups = getLabelGroups(productGroups, labels)\n    labelGroups.forEach(group => {\n        const label = labels.find(label => label.id === group.categoryId)\n        group.productIds.forEach(productId => {\n            const prod = products.find(product => product.id === productId)\n            prod.labels = prod.labels || []\n            prod.labels.push(label.description)\n        })\n    })\n    //removing label categories from productGroups\n    labelGroups.forEach(labelGroup => {\n        const indexToRemove = productGroups.findIndex(\n            productGroup => productGroup.categoryId === labelGroup.categoryId\n        )\n        productGroups.splice(indexToRemove, 1)\n    })\n}\n\n/**\n * adds a property to products containing the given category assigned to it\n * The category is recognized by ID\n * to apply a the category on a given product, the category's productGroup has to contain the product\n * this function has to clean the productGroups as well by removing the given's one to not let it display as a range in the PLP\n * @param {category[]} categories\n * @param {productGroup[]} productGroups\n * @param {product[]} products\n */\nfunction addProductAttribute(eCommerceData, categoryFetcher, assignHandler) {\n    const { categories, productGroups, products } = eCommerceData\n    const category = categoryFetcher(categories)\n    if (!category) {\n        return\n    }\n    const categoryGroup = getCategoryGroup(productGroups, category)\n    if (!categoryGroup) {\n        return\n    }\n    categoryGroup.productIds.forEach(productId => {\n        const prod = products.find(product => product.id === productId)\n        if (categoryFetcher === getArabica) {\n            console.log('addProductAttribute', prod)\n        }\n        assignHandler(prod, category)\n    })\n    const indexToRemove = productGroups.findIndex(\n        productGroup => productGroup.categoryId === categoryGroup.categoryId\n    )\n    productGroups.splice(indexToRemove, 1)\n}\n\n/**\n * retrieve all the productGroup that are labels\n * @param {productGroup[]} productGroups\n * @param {category[]} labels\n */\nfunction getLabelGroups(productGroups, labels) {\n    return productGroups.filter(group => labels.some(label => label.id === group.categoryId))\n}\n\n/**\n * retrieve the productGroup which correspond to a category\n * @param {productGroup[]} productGroups\n * @param {category} fairTrade\n */\nfunction getCategoryGroup(productGroups, category) {\n    return productGroups.find(group => category.id === group.categoryId)\n}\n\n/**\n * returns true when the category is child of the range category (is type range)\n * @param {category} category\n */\nexport function isSubsegment(categories, category) {\n    /*category.superCategories.some(superCategoryId => {\n        const superCategoryData = categories.find(categoryToFind => categoryToFind.id === superCategoryId)\n    })*/\n    const result = category.superCategories.some(superCategory =>\n        getCategoryRegEx(RANGE_CATEGORY_NAME).test(superCategory)\n    )\n    return result\n}\nexport function getFinalPrice(show_sleeve_price, product, isBundled) {\n    let showCapsulePrice = show_sleeve_price\n    let final_price\n    let price_per_capsule\n\n    const bundled = isBundled(product)\n\n    if (product.type === 'capsule' && !bundled) {\n        final_price = product.price * product.salesMultiple\n        // this isn't necessary in prod but the mock price formatter needs it\n        final_price = Math.round(final_price * 100) / 100\n        price_per_capsule = product.price\n    } else {\n        showCapsulePrice = false\n        final_price = product.price\n    }\n\n    return { showCapsulePrice, final_price, price_per_capsule }\n}\n","import {\n    ECAPI_TYPE_ACCESSORY,\n    ECAPI_TYPE_CAPSULE,\n    ECAPI_TYPE_GIFT_CARD,\n    ECAPI_TYPE_MACHINE\n} from '@kissui/helpers/src/catalog'\n\nexport const getSkuComponentByType = ({ type, is_machine_b2b }) => {\n    let result = 'nb-sku'\n\n    if (type === ECAPI_TYPE_CAPSULE) {\n        result = 'nb-sku-coffee'\n    } else if (type === ECAPI_TYPE_MACHINE && is_machine_b2b) {\n        result = 'nb-sku-machine-b2b'\n    } else if (type === ECAPI_TYPE_MACHINE) {\n        result = 'nb-sku-machine'\n    } else if (type === ECAPI_TYPE_ACCESSORY) {\n        result = 'nb-sku-accessory'\n    } else if (type === ECAPI_TYPE_GIFT_CARD) {\n        result = 'nb-sku-gift-card'\n    }\n\n    return result\n}\n\nexport const apiOverride = (productData, pageBuilderData) => {\n    if (!productData || !pageBuilderData) {\n        return {}\n    }\n\n    const { images, name, headline, description } = productData\n    const { api_override } = pageBuilderData\n\n    if (!api_override) {\n        return {}\n    }\n\n    return {\n        image: api_override.image || images?.icon || images?.url || images?.push || images?.main,\n        name: api_override.name || name,\n        headline: api_override.headline || headline,\n        description: api_override.description || description\n    }\n}\n","export const VARIATION_CROSS_SELL = 'cross-sell'\nexport const VARIATION_PLP = 'plp'\n\nexport interface CapsuleFeaturesInputType {\n    acidity?: number | null\n    bitterness?: number | null\n    body?: number | null\n    intensity?: number | null\n    roastLevel?: number | null\n}\n\nexport interface CapsuleFeatureType {\n    value: number | null\n}\n\nexport interface CapsuleFeaturesOutputType {\n    acidity: CapsuleFeatureType\n    bitterness: CapsuleFeatureType\n    body: CapsuleFeatureType\n    intensity: CapsuleFeatureType\n    roast: CapsuleFeatureType\n}\n\nexport type QuickViewProductType = {\n    modelType: string\n    id: string\n    legacyId: string\n    internationalId: string\n    name: string\n    urlFriendlyName: string\n    internationalName: string\n    headline: string\n    rootCategory: string\n    category: string\n    supercategories: string[]\n    mobileImages: {\n        modelType: string\n        icon: string\n        main: string\n    }\n    responsiveImages: {\n        standard: string\n    }\n    pdpURLs: {\n        opr: string\n        desktop: string\n        mobile: string\n    }\n    unitQuantity: number\n    salesMultiple: number\n    maxOrderQuantity: number\n    technologies: string[]\n    comingSoon: boolean\n    unit_quantity: number\n    productSelections: string[]\n    type: string\n    priceDisplay: string\n    isOrderable: boolean\n    bundled: boolean\n    capsuleProperties: {\n        intensity: number\n        bitterness: number\n        acidity: number\n        roastLevel: number\n    }\n    capsuleProductAromatics: string[]\n    aromaticProfileDescription: string\n    roastingDescription: string\n    capsuleCupSizes: string[]\n    capsuleCupSizesDetails: {\n        id: string\n        name: string\n        capacityLabel: string\n    }[]\n    capsuleAromatics: {\n        id: string\n        name: string\n    }[]\n    decaffeinated: boolean\n}\n\n//Confirmed this props are not available in Product Type\nexport type ProductNewPropsType = {\n    currency: string\n    pdpURLs: {\n        desktop: string\n        mobile: string\n    }\n    responsiveImages: {\n        standard: string\n    }\n    supercategories: string[]\n    productSelections: string[]\n    capsuleProperties?: CapsuleFeaturesInputType\n    capsuleProductAromatics: string[]\n    unitPrice: number\n    cupSizesDetails?: {\n        icon: string\n        label: string\n        size: string\n        capacityLabel: string | null\n        category: {\n            id: string\n            name: string\n            description: string | null\n            icon: {\n                url: string\n                altText: string\n            }\n            detailsIcon: {\n                url: string\n                altText: string\n            }\n            url: string | null\n            capacityLabel: string | null\n            rangeLink: string | null\n            subCategories: []\n            superCategories: string[]\n        }\n    }[]\n    category_name: string\n    url: string\n}\n\n// This is the Product Type signature Combined\nexport type ProductPropsType = QuickViewProductType & ProductNewPropsType\n\nexport type AddToCartPropsType = {\n    sku?: string\n    longSku?: string\n    category_name?: string\n    price?: string\n    strikethrough_price?: number\n    hidePrice?: boolean\n    type?: string\n    price_per_capsule?: number | string\n    show_capsule_price?: boolean\n    label_capsules?: string\n    capsule_price_label?: string\n    capsule_price_syntax?: string\n    show_sleeve_price?: boolean\n    show_sleeve?: boolean\n    sleeve_syntax?: string\n    number_of_sleeves?: number\n    label_sleeves?: string\n    label_sleeve?: string\n    technologies: string[]\n    sales_multiple?: number\n    unitQuantity?: number\n    unit_quantity?: number\n    bundled?: boolean\n    url?: string\n}\n\nexport type PageBuilderProductPropsType = {\n    sku: string\n    highlighted: boolean\n    labels: {\n        bgColor: string\n        color: string\n        name: string\n    }[]\n    strikethrough_price: string\n    variant: {\n        is_capsule: boolean\n        number_of_sleeves: number\n        number_of_capsules: string\n        bundle_details: {\n            popin_link_text: string\n            popin_label_close: string\n            description: string\n            other_skus: string\n            other_skus_quantity: string\n        }\n        logos: {\n            fair_trade: boolean\n            alt_fair_trade: string\n            is_organic: boolean\n            alt_organic: string\n            only_vertuo_next: boolean\n            alt_vertuo_next: string\n            is_rainforest: boolean\n            alt_rainforest: string\n            is_sustainable: boolean\n            alt_sustainable: string\n            is_q_certified_arabica: boolean\n            alt_q_certification_arabica: string\n        }\n        sku_timer: {\n            launch_date: string\n            remaining_days: string\n            remaining_day: string\n            label: string\n            a11y_label: string\n        }\n        ingredients: {\n            heading: string\n            description: string\n        }\n    }\n}\n\nexport type PageBuilderPropsType = {\n    quick_view_plp?: {\n        popin?: {\n            close?: string\n        }\n        cup_sizes?: {\n            heading: string\n            unit_is_oz: boolean\n            items: string[]\n        }\n        aromatic_profile?: {\n            heading: string\n            items: string[]\n        }\n        link?: {\n            label: string\n            url: string\n        }\n        levels?: {\n            a11y_level_of: string\n            acidity_label: string\n            bitterness_label: string\n            roastiness_label: string\n            body_label: string\n        }\n    }\n    campaign?: {\n        id?: string\n        name?: string\n        creative?: string\n        position?: string\n    }\n    tracking_position: string\n    tracking_list: string\n    capsuleProperties?: CapsuleFeaturesInputType\n    price_per_capsule?: number | string\n    show_capsule_price?: boolean\n    label_capsules?: string\n    capsule_price_label?: string\n    capsule_price_syntax?: string\n    show_sleeve_price?: boolean\n    show_sleeve?: boolean\n    sleeve_syntax?: string\n    number_of_sleeves?: number\n    label_sleeves?: string\n    label_sleeve?: string\n    technologies: string[]\n    sales_multiple?: number\n    unit_quantity?: number\n    bundled?: boolean\n    pdpURLs: {\n        desktop: string\n        mobile: string\n    }\n    intensity_label: string\n    products: {\n        sku: string\n        longSku: string\n        price: number\n        strikethrough_price: number\n        hidePrice: boolean\n        url: string\n    }[]\n    priceFormatter: {\n        formatPrice: (price: number) => string\n    }\n    currency: string\n    options: {\n        intensity_label: string\n        show_sleeve: boolean\n        label_sleeve: string\n        label_sleeves: string\n        label_capsules: string\n        sleeve_syntax: string\n        show_sleeve_price: boolean\n        capsule_price_label: string\n        capsule_price_syntax: string\n        a11y_intensity_max: string\n        label_decaffeinato: string\n        is_headline_hidden: boolean\n        sizes_title: string\n        notes_title: string\n        enabledExperiments: string[]\n    }\n    copywriting: {\n        sku_quick_view: {\n            more_info: string\n            a11y_more_info: string\n            popin: {\n                close: string\n            }\n            cup_sizes: {\n                heading: string\n                unit_is_oz: boolean\n                items: string[]\n            }\n            aromatic_profile: {\n                heading: string\n                items: string[]\n            }\n            link: {\n                label: string\n            }\n        }\n        aromatic_profile: {\n            heading: string\n            items: string[]\n        }\n    }\n}\n\nexport type SkuType = {\n    tracking_list: string\n    tracking_position: string\n    id: string\n    sku: string\n    longSku: string\n    name: string\n    name_custom: string\n    available: boolean\n    description: string | null\n    hidePrice: boolean\n    image_alt_text: string\n    inStock: boolean\n    internationalId: string\n    internationalName: string\n    legacyId: string\n    maxOrderQuantity: number | null\n    packagingType: string | null\n    price: string\n    pushRatingEnabled: boolean\n    ranges: string[]\n    salesMultiple: number\n    technologies: string[]\n    type: string\n    unitQuantity: number\n    url: string\n    labels: []\n    category_name: string\n    category: {\n        id: string\n        name: string\n        description: string | null\n        icon: {\n            url: string\n            altText: string | null\n        }\n        detailsIcon: string | null\n        url: string | null\n        capacityLabel: string | null\n        rangeLink: string | null\n        subCategories: []\n        superCategories: string[]\n    }\n    highlighted: boolean\n    strikethrough_price: string\n    view_details_label: string\n    headline: string\n    cupSizes: string[]\n    cupSizesDetails: {\n        icon: string\n        label: string\n        size: string\n        capacityLabel: string | null\n        category: {\n            id: string\n            name: string\n            description: string | null\n            icon: {\n                url: string\n                altText: string | null\n            }\n            detailsIcon: string | null\n            url: string | null\n            capacityLabel: string | null\n            rangeLink: string | null\n            subCategories: []\n            superCategories: string[]\n        }\n    }[]\n    flavors: string[]\n    in_stock: boolean\n    sales_multiple: number\n    bundled: boolean\n    logos: []\n    is_headline_hidden: boolean\n    a11y_price: string\n    a11y_product_card: string\n    label_sleeve: string\n    label_sleeves: string\n    label_capsules: string\n    intensity: number\n    a11y_intensity_max: string\n    label_decaffeinato: string\n    show_sleeve_price: boolean\n    show_sleeve: boolean\n    price_per_capsule: number | string\n    final_price: string | null\n    capsule_price_label: string\n    capsule_price_syntax: string\n    sleeve_syntax: string\n    perSleeveLabel: string\n    number_of_sleeves: number\n    number_of_capsules: string\n    show_capsule_price: boolean\n    sort_price: number\n    bundle_details: any\n    quick_view_plp: {\n        show_view: boolean\n        quick_view_text: string\n        popin: {\n            close: string\n        }\n        cup_sizes: {\n            heading: string\n            unit_is_oz: boolean\n            items: string[]\n        }\n        aromatic_profile: {\n            heading: string\n            items: string[]\n        }\n        link: {\n            label: string\n        }\n        levels: {\n            a11y_level_of: string\n            acidity_label: string\n            bitterness_label: string\n            roastiness_label: string\n            body_label: string\n        }\n    }\n    hasPricePerSleeve: boolean\n    sleevePrice: string\n    rendererName: string\n    position: number\n    rawPrice: number\n    variation: string\n    intensity_label: string\n    campaign: {\n        id: string\n        name: string\n        creative: string\n        position: string\n    }\n    capsuleProductAromatics: string[]\n    copywriting: {\n        heading: string\n        sku_quick_view: {\n            more_info: string\n            a11y_more_info: string\n            popin: {\n                close: string\n            }\n            cup_sizes: {\n                heading: string\n                unit_is_oz: false\n                items: string[]\n            }\n            aromatic_profile: {\n                heading: string\n                items: string[]\n            }\n            link: {\n                label: string\n            }\n        }\n        aromatic_profile: {\n            heading: string\n            items: string[]\n        }\n    }\n    options: {\n        intensity_label: string\n        show_sleeve: boolean\n        label_sleeve: string\n        label_sleeves: string\n        label_capsules: string\n        sleeve_syntax: string\n        show_sleeve_price: boolean\n        capsule_price_label: string\n        capsule_price_syntax: string\n        a11y_intensity_max: string\n        label_decaffeinato: string\n        is_headline_hidden: boolean\n        sizes_title: string\n        notes_title: string\n        enabledExperiments: string[]\n    }\n    products: {\n        sku: string\n        longSku: string\n        price: number\n        strikethrough_price: number\n        hidePrice: boolean\n        url: string\n    }[]\n    priceFormatter: {\n        formatPrice: (price: number) => string\n    }\n    currency: string\n}\n\nexport type MergedProductType = {\n    intensity_label: string\n    capsuleProductAromatics?: string[]\n    pdpURLs?: {\n        desktop: string\n        mobile: string\n    }\n}\n\nexport type AddToCardPropertiesType = SkuType & MergedProductType\n\ntype CupSizeType = {\n    icon: string\n    label: string\n    size: string\n    capacityLabel: string | null\n    category: {\n        id: string\n        name: string\n        description: string | null\n        icon: {\n            url: string\n            altText: string\n        }\n        detailsIcon: {\n            url: string\n            altText: string\n        }\n        url: string | null\n        capacityLabel: string | null\n        rangeLink: string | null\n        subCategories: []\n        superCategories: string[]\n    }\n}[]\n\nexport type QuickViewPropsType = {\n    popin: {\n        popin_id: string\n        close?: string\n        footer: boolean\n    }\n    product: MergedProductType\n    intensity: {\n        intensity_label?: string\n        a11y_intensity_max: string\n    }\n    cup_sizes: {\n        heading: string\n        unit_is_oz: boolean\n        items?: [] | CupSizeType\n    }\n    aromatic_profile: {\n        heading: string\n        items: string[]\n    }\n    link: {\n        label: string\n        url?: string\n    }\n    levels: any\n    pricing: {\n        add_to_cart: AddToCartPropsType & {\n            position: string\n            variation: string\n            url: string\n            view_details_label: string\n            rendererName: string\n        }\n        showSleeve: any\n        showCapsulePrice: any\n    }\n    campaign: any\n}\n","import { getMergedProductData } from '@kissui/page-builder-sections/src/cross-sell-natural/dataTransform'\n\nimport {\n    CapsuleFeaturesInputType,\n    CapsuleFeaturesOutputType,\n    ProductPropsType,\n    AddToCartPropsType,\n    SkuType,\n    ProductNewPropsType,\n    MergedProductType,\n    AddToCardPropertiesType,\n    QuickViewPropsType,\n    VARIATION_PLP,\n    VARIATION_CROSS_SELL\n} from './shared-quick-view-types'\n\nexport const getCapsuleFeatures = ({\n    acidity = null,\n    bitterness = null,\n    body = null,\n    intensity = null,\n    roastLevel = null\n}: CapsuleFeaturesInputType = {}): CapsuleFeaturesOutputType => ({\n    acidity: { value: acidity },\n    bitterness: { value: bitterness },\n    body: { value: body },\n    intensity: { value: intensity },\n    roast: { value: roastLevel }\n})\n\nexport const getSkuQuickViewData = async (\n    product: ProductPropsType,\n    popinId: string,\n    skuData: SkuType,\n    componentType: string\n) => {\n    const { tracking_position, tracking_list } = skuData\n\n    const handlePLPVariation = () => {\n        if (!product) return\n        let quickViewElement = document.createElement('nb-sku-quick-view')\n        quickViewElement.setAttribute(\n            'data',\n            JSON.stringify(getSkuQuickViewProp(popinId, product, skuData, componentType))\n        )\n        quickViewElement.setAttribute('id', popinId)\n        quickViewElement.setAttribute('tracking_no_impression', 'true')\n        quickViewElement.setAttribute('tracking_position', tracking_position)\n        quickViewElement.setAttribute('tracking_list', tracking_list)\n        quickViewElement.setAttribute('campaign_position', skuData.campaign.position)\n        quickViewElement.setAttribute('listname_text', skuData?.copywriting?.heading)\n        document.body.appendChild(quickViewElement)\n    }\n\n    const handleCrossSellVariation = () => {\n        const { sku_quick_view } = skuData.copywriting\n        if (!sku_quick_view.more_info) return ''\n\n        const quickViewElement = document.querySelector(\n            `nb-sku-quick-view > nb-popin[id=\"${popinId}\"]`\n        )?.parentElement\n\n        if (quickViewElement) quickViewElement.remove()\n\n        let newQuickViewElement = document.createElement('nb-sku-quick-view')\n        newQuickViewElement.setAttribute(\n            'data',\n            JSON.stringify(getSkuQuickViewProp(popinId, product, skuData, componentType))\n        )\n        newQuickViewElement.setAttribute('tracking_no_impression', 'true')\n        newQuickViewElement.setAttribute('tracking_position', tracking_position)\n        newQuickViewElement.setAttribute('tracking_list', tracking_list)\n        newQuickViewElement.setAttribute('campaign_position', skuData.campaign.position)\n        newQuickViewElement.setAttribute('listname_text', skuData?.copywriting?.heading)\n        document.body.appendChild(newQuickViewElement)\n    }\n\n    const variationHandlers: { [key: string]: () => void | string } = {\n        [VARIATION_PLP]: handlePLPVariation,\n        [VARIATION_CROSS_SELL]: handleCrossSellVariation\n    }\n\n    const handleVariation = variationHandlers[componentType]\n    if (handleVariation) {\n        handleVariation()\n    }\n}\n\nexport const getSkuQuickViewProp = (\n    popinId: string,\n    product: ProductPropsType,\n    skuData: SkuType,\n    componentType: string\n) => {\n    let mergedProductData = getMergedProductDataForComponentType(product, skuData, componentType)\n    let addToCartProps = getAddToCartProperties(componentType, skuData, mergedProductData)\n\n    return isVariationOnPLP(componentType)\n        ? getPlpQuickViewProps(popinId, skuData, mergedProductData, addToCartProps)\n        : getCrossSellQuickViewProps(popinId, product, skuData, mergedProductData, addToCartProps)\n}\n\nconst getMergedProductDataForComponentType = (\n    product: ProductPropsType,\n    skuData: SkuType,\n    componentType: string\n) => {\n    switch (componentType) {\n        case VARIATION_PLP:\n            return {\n                ...skuData,\n                ...product,\n                ...getCapsuleFeatures(product?.capsuleProperties)\n            }\n        case VARIATION_CROSS_SELL: {\n            const matchedProduct =\n                skuData.products?.find(\n                    productPageBuilder => productPageBuilder.sku === product?.legacyId\n                ) || {}\n            return getMergedProductData(\n                product,\n                matchedProduct,\n                skuData,\n                skuData?.priceFormatter,\n                skuData?.currency\n            )\n        }\n        default:\n            return {}\n    }\n}\n\nexport const getAddToCartProperties = (\n    componentType: string,\n    skuData: SkuType,\n    mergedProductData: MergedProductType\n): AddToCartPropsType => {\n    const data: AddToCardPropertiesType = isVariationOnPLP(componentType)\n        ? skuData\n        : (mergedProductData as AddToCardPropertiesType)\n    return getAddToCartProps(data, componentType)\n}\n\nexport const getAddToCartProps = (\n    data: AddToCardPropertiesType,\n    componentType: string\n): AddToCartPropsType => {\n    const commonProps: AddToCartPropsType = {\n        sku: data.sku,\n        longSku: data.longSku,\n        category_name: data.category_name,\n        price: data.price ?? 0,\n        strikethrough_price: Number(data.strikethrough_price),\n        hidePrice: data.hidePrice,\n        technologies: data.technologies || [],\n        url: data.url || ''\n    }\n\n    if (isVariationOnPLP(componentType)) {\n        return {\n            ...commonProps,\n            type: data.type,\n            price_per_capsule: data.price_per_capsule,\n            show_capsule_price: data.show_capsule_price,\n            label_capsules: data.label_capsules,\n            capsule_price_label: data.capsule_price_label,\n            capsule_price_syntax: data.capsule_price_syntax,\n            show_sleeve_price: data.show_sleeve_price,\n            show_sleeve: data.show_sleeve,\n            sleeve_syntax: data.sleeve_syntax,\n            number_of_sleeves: data.number_of_sleeves,\n            label_sleeves: data.label_sleeves,\n            label_sleeve: data.label_sleeve,\n            technologies: data.technologies || [],\n            sales_multiple: data.sales_multiple,\n            unit_quantity: data.unitQuantity,\n            bundled: data.bundled,\n            url: data.url || ''\n        }\n    }\n\n    return commonProps\n}\n\nexport const getPlpQuickViewProps = (\n    popinId: string,\n    skuData: SkuType,\n    mergedProductData: MergedProductType,\n    addToCartProps: AddToCartPropsType\n): QuickViewPropsType => {\n    return {\n        popin: {\n            popin_id: popinId,\n            close: skuData?.quick_view_plp?.popin?.close,\n            footer: true\n        },\n        product: {\n            ...mergedProductData\n        },\n        intensity: {\n            intensity_label: mergedProductData?.intensity_label,\n            a11y_intensity_max: 'max of {max_intensity}'\n        },\n        cup_sizes: {\n            ...skuData?.quick_view_plp?.cup_sizes,\n            items: skuData?.cupSizesDetails\n        },\n        aromatic_profile: {\n            ...skuData?.quick_view_plp?.aromatic_profile,\n            items: skuData?.capsuleProductAromatics || mergedProductData?.capsuleProductAromatics\n        },\n        link: {\n            ...skuData?.quick_view_plp?.link,\n            url: skuData?.url\n        },\n        levels: {\n            ...skuData?.quick_view_plp?.levels\n        },\n        pricing: {\n            add_to_cart: {\n                ...addToCartProps,\n                position: '',\n                variation: 'small',\n                url: '',\n                view_details_label: 'View details',\n                rendererName: ''\n            },\n            showSleeve: {},\n            showCapsulePrice: {}\n        },\n        campaign: skuData.campaign\n    }\n}\n\nexport const getCrossSellQuickViewProps = (\n    popinId: string,\n    product: ProductNewPropsType,\n    skuData: SkuType,\n    mergedProductData: MergedProductType,\n    addToCartProps: AddToCartPropsType\n): QuickViewPropsType => {\n    const props: QuickViewPropsType = {\n        popin: {\n            popin_id: popinId,\n            close: skuData?.copywriting?.sku_quick_view?.popin?.close,\n            footer: true\n        },\n        product: {\n            ...mergedProductData\n        },\n        intensity: {\n            intensity_label: skuData?.options?.intensity_label,\n            a11y_intensity_max: 'max of {max_intensity}'\n        },\n        cup_sizes: {\n            ...skuData?.copywriting?.sku_quick_view?.cup_sizes,\n            items: product?.cupSizesDetails\n        },\n        aromatic_profile: {\n            ...skuData?.copywriting?.sku_quick_view?.aromatic_profile,\n            items: product?.capsuleProductAromatics || mergedProductData?.capsuleProductAromatics\n        },\n        link: {\n            ...skuData?.copywriting?.sku_quick_view?.link,\n            url: mergedProductData?.pdpURLs?.desktop\n        },\n        levels: {\n            ...skuData?.quick_view_plp?.levels\n        },\n        pricing: {\n            add_to_cart: {\n                ...addToCartProps,\n                position: '',\n                variation: 'small',\n                url: '',\n                view_details_label: 'View details',\n                rendererName: ''\n            },\n            showSleeve: {},\n            showCapsulePrice: {}\n        },\n        campaign: {}\n    }\n    return props\n}\nconst isVariationOnPLP = (componentType: string) => componentType === VARIATION_PLP\n","import { sanitizeString } from '@kissui/helpers/src/utils'\nimport { getMergedProductCoffeeData } from './product.coffee.dto'\nimport { getMergedProductMachineData } from './product.machine.dto'\nimport { VARIATION_PLP } from '@kissui/components/src/sku/constants'\nimport { getMergedProductGiftCardData } from './product.giftCard.dto'\nimport { getMergedProductAccessoryData } from './product.accessory.dto'\nimport { apiOverride } from '@kissui/components/src/sku/services'\nimport {\n    ECAPI_TYPE_ACCESSORY,\n    ECAPI_TYPE_CAPSULE,\n    ECAPI_TYPE_GIFT_CARD,\n    ECAPI_TYPE_MACHINE\n} from '@kissui/helpers/src/catalog'\n\nexport const getMergedProductData = (\n    product,\n    pageBuilderProductProps,\n    pageBuilderProps,\n    priceFormatter,\n    currency\n) => {\n    const { options } = pageBuilderProps\n    const {\n        variant = {},\n        labels = [],\n        strikethrough_price,\n        additional_message,\n        additional_message_icon,\n        additional_message_link,\n        contact_cta\n    } = pageBuilderProductProps || {}\n\n    // lists header props not coming from this.props\n    let data = {\n        sku: product.internationalId,\n        technologies: product.technologies,\n        longSku: product.id,\n        name: product.name,\n        headline: sanitizeString(product.headline),\n        sales_multiple: product.salesMultiple,\n        unit_quantity: product.unitQuantity,\n        type: product.type,\n        category_name: product.rangeData?.name || '',\n        label_range: product.rangeData?.name || '',\n        price: product.price ? priceFormatter.short(currency, product.price) : null,\n        rawPrice: product.price,\n        strikethrough_price: strikethrough_price || '',\n        variation: VARIATION_PLP,\n        image_alt_text: product.name,\n        image: product.images?.icon || product.images?.push || product.images?.main,\n        additional_message: additional_message || '',\n        additional_message_icon: additional_message_icon || '',\n        additional_message_link: additional_message_link || {},\n        contact_cta: contact_cta || {},\n        ...apiOverride(product, pageBuilderProductProps)\n    }\n\n    if (labels && labels.length) {\n        data.labels = labels\n    }\n\n    if (product.highlighted) {\n        data.highlighted = product.highlighted\n    }\n\n    let dataTransformObjectProductType = {}\n    if (product.type === ECAPI_TYPE_CAPSULE) {\n        dataTransformObjectProductType = getMergedProductCoffeeData(\n            product,\n            pageBuilderProductProps,\n            pageBuilderProps,\n            priceFormatter,\n            currency\n        )\n    } else if (product.type === ECAPI_TYPE_MACHINE) {\n        dataTransformObjectProductType = getMergedProductMachineData(\n            product,\n            pageBuilderProductProps,\n            pageBuilderProps\n        )\n    } else if (product.type === ECAPI_TYPE_ACCESSORY) {\n        dataTransformObjectProductType = getMergedProductAccessoryData(\n            product,\n            pageBuilderProductProps,\n            pageBuilderProps\n        )\n    } else if (product.type === ECAPI_TYPE_GIFT_CARD) {\n        dataTransformObjectProductType = getMergedProductGiftCardData(\n            product,\n            pageBuilderProductProps,\n            pageBuilderProps\n        )\n    }\n\n    return {\n        ...product,\n        ...options,\n        ...variant,\n        ...data,\n        ...dataTransformObjectProductType\n    }\n}\n","export const getMergedProductMachineData = (product, pageBuilderProductProps, pageBuilderProps) => {\n    const { strikethrough_price, variant = {} } = pageBuilderProductProps\n    const { ratingsAndReviews } = product\n\n    // lists header props not coming from this.props\n    const options = {\n        ratings: ratingsAndReviews\n    }\n\n    if (variant?.colors) {\n        options.colors = variant.colors\n        options.activeSku = product.internationalId\n        options.max_colors = 99\n    }\n\n    options.strikethrough_price = strikethrough_price || ''\n    options.show_ratings = (pageBuilderProps && pageBuilderProps.options.show_ratings) || false\n    options.minimum_rating = (pageBuilderProps && pageBuilderProps.options.minimum_rating) || 0\n\n    return options\n}\n","export const getMergedProductAccessoryData = () => ({})\n","export const getMergedProductGiftCardData = (_, pageBuilderProductProps) => {\n    const { variant = {} } = pageBuilderProductProps\n\n    return {\n        image: variant && variant.default_image\n    }\n}\n","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","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 { 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","import { EVENT_POPIN_OPEN } from '@kissui/components'\nimport { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport { renderLabels } from './fragments/labels'\nimport { renderLogos } from '@kissui/helpers/src/logos.helpers'\nimport { renderImage } from './fragments/image'\nimport { renderHeading } from './fragments/heading'\nimport { renderHeadline } from './fragments/headline'\nimport { renderLabelTechnology } from './fragments/labelTechnology'\nimport { renderLabelRange } from './fragments/labelRange'\nimport { renderQuickView } from './fragments/quickView'\nimport { renderStrikethroughPrice } from './fragments/strikethroughPrice'\nimport { renderPrice } from './fragments/price'\nimport { renderAddToCart } from './fragments/addToCart'\nimport { renderAdditionalMessage } from './fragments/additionalMessage'\nimport { setCardTheme } from './fragments/setCardTheme'\nimport { getSkuQuickViewData } from '@kissui/components/src/sku-quick-view/shared-quick-view'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { getTechnologyName, getProduct } from '@kissui/helpers/src/catalog'\nimport { trackComponentInteraction, productClick } from '@kissui/helpers/src/gtmEvents'\nimport { isLoggedIn } from '@kissui/helpers/src/dataLayer'\nimport { VARIATION_PLP } from '@kissui/components/src/sku/constants'\n\nclass Sku extends NespressoElement {\n    constructor() {\n        super()\n        this.type = 'default'\n        this.popinId = ''\n        this.isQuickViewPlp = false\n        this.boundOnPDPLinkClick = this.onPDPLinkClick.bind(this)\n        this.boundOnQuickViewOpen = this.onQuickViewOpen.bind(this)\n        this.clickMethod = this.boundOnPDPLinkClick\n    }\n\n    loadTemplate() {\n        this.classList.add('nb-sku')\n        this.classList.add(`nb-sku__${this.type}`)\n        setCardTheme(this.props, this)\n\n        Object.assign(this.props, this.getSleevePrice(this.props))\n        Object.assign(this.props, this.checkHiddenPriceForLoggedInUser(this.props))\n\n        const { quick_view_plp = {} } = this.props\n        this.isQuickViewPlp = quick_view_plp?.show_view || false\n        this.clickMethod = this.isQuickViewPlp\n            ? this.boundOnQuickViewOpen\n            : this.boundOnPDPLinkClick\n\n        this.template = `${this.renderVisual()}\n                          ${this.renderHeader()}\n                          <div class=\"cb-content\">\n                              ${this.renderInformation()}\n                              ${this.isQuickViewPlp ? this.renderQuickView() : ''}\n                              <div class=\"cb-shop\">\n                                  <div class=\"cb-price\">\n                                      ${this.renderPricing()}\n                                  </div>\n                                  ${this.renderAction()}\n                              </div>\n                              ${this.renderFooter()}\n                          </div>`\n\n        this.render()\n    }\n\n    onReady() {\n        const { activeSku, sku } = this.props\n        this.setAttribute('data-product-short-sku', activeSku || sku)\n        this.bindEvent()\n    }\n\n    renderHeaderDefault() {\n        return `${renderLabels(this.props, this)}${renderLogos(this.props, this)}`\n    }\n\n    renderHeader() {\n        return this.renderHeaderDefault()\n    }\n\n    renderVisualDefault() {\n        const theme = this.hasAttribute('portrait') ? 'portrait' : 'landscape'\n        return renderImage(this.props, theme)\n    }\n\n    getSleevePrice({ number_of_sleeves, price }) {\n        let hasPricePerSleeve = true\n        let sleevePrice\n        if (number_of_sleeves === '1') {\n            sleevePrice = price\n        } else {\n            hasPricePerSleeve = false\n        }\n        return { hasPricePerSleeve, sleevePrice }\n    }\n\n    checkHiddenPriceForLoggedInUser({ hidePrice, show_view_details }) {\n        return {\n            hidePrice: isLoggedIn() ? false : hidePrice,\n            show_view_details: isLoggedIn() ? false : show_view_details\n        }\n    }\n\n    renderVisual() {\n        return this.renderVisualDefault()\n    }\n\n    renderInformationDefault() {\n        return `${renderLabelTechnology(this.props)}\n        ${renderLabelRange(this.props)}\n        ${renderHeading(this.props)}\n        ${renderHeadline(this.props)}`\n    }\n\n    renderInformation() {\n        return this.renderInformationDefault()\n    }\n\n    renderQuickView() {\n        return renderQuickView(this.props)\n    }\n\n    renderPricingDefault() {\n        const isPortrait = this.hasAttribute('portrait')\n\n        const pricingWithClass = `\n        ${renderStrikethroughPrice(this.props, this)}\n        <div class=\"${isPortrait ? 't-md-700-sl' : 't-sm-700-sl'}\">\n            ${renderPrice(this.props)}\n        </div>`\n\n        return pricingWithClass\n    }\n\n    renderPricing() {\n        return this.renderPricingDefault()\n    }\n\n    renderActionDefault() {\n        return renderAddToCart(this.props, false, this)\n    }\n\n    renderAction() {\n        const actionSlot = this.querySelector('[slot=\"action\"]')?.outerHTML\n        if (actionSlot) {\n            return actionSlot\n        }\n        return this.renderActionDefault()\n    }\n\n    renderFooterDefault() {\n        return renderAdditionalMessage(this.props)\n    }\n\n    renderFooter() {\n        return this.renderFooterDefault()\n    }\n\n    async onPDPLinkClick() {\n        const productIndex = this.getAttribute('tracking_position') || 0\n        const list = this.getAttribute('tracking_list') || ''\n\n        await productClick(productIndex, list, this.props.longSku)\n    }\n\n    renderSkuQuickView(product) {\n        this.popinId = `plp-quick-view`\n\n        let quickViewElement = document.querySelector(`#${this.popinId}`)\n        if (quickViewElement) {\n            quickViewElement.remove()\n        }\n\n        getSkuQuickViewData(product, this.popinId, this.props, VARIATION_PLP)\n    }\n\n    async onQuickViewOpen(e) {\n        e.preventDefault()\n\n        const { sku } = this.props\n        if (!sku) {\n            return\n        }\n\n        try {\n            const product = await getProduct(sku)\n\n            this.renderSkuQuickView(product)\n            trackComponentInteraction({\n                creative: this.props.campaign?.creative,\n                actionType: 'pdp quick view',\n                internationalId: product.internationalId,\n                internationalName: product.internationalName,\n                productType: product.type,\n                technology: getTechnologyName(product),\n                category: product.category,\n                rawPrice: product.price,\n                eventAction: 'PDP Quick View'\n            })\n            dispatchEvent({ eventName: EVENT_POPIN_OPEN, args: { id: this.popinId } })\n        } catch (e) {\n            console.error(`getProduct fail on sku ${sku}`)\n        }\n        return false\n    }\n\n    bindEvent() {\n        this.unbindEvent()\n        const showQuickView = this.props.quick_view_plp?.show_view\n        const quickViewTextExists = this.props.quick_view_plp?.quick_view_text\n\n        if (!quickViewTextExists) {\n            this.classList.add('sku-hover')\n        }\n\n        if (showQuickView && this.props.variation === VARIATION_PLP) {\n            const elements = quickViewTextExists ? this.querySelectorAll('nb-link button') : [this]\n\n            elements.forEach(element => {\n                element.addEventListener('click', this.clickMethod)\n            })\n\n            // to avoid adding click event to the button inside the sku card\n            this.addStopPropagationEvent('nb-add-to-cart')\n            this.addStopPropagationEvent('nb-cta')\n        }\n    }\n\n    unbindEvent() {\n        const showQuickView = this.props.quick_view_plp?.show_view\n        const quickViewTextExists = this.props.quick_view_plp?.quick_view_text\n\n        if (showQuickView && this.props.variation === VARIATION_PLP) {\n            const elements = quickViewTextExists ? this.querySelectorAll('nb-link button') : [this]\n\n            elements.forEach(element => {\n                element.removeEventListener('click', this.clickMethod)\n            })\n\n            this.removeStopPropagationEvent('nb-add-to-cart')\n            this.removeStopPropagationEvent('nb-cta')\n        }\n    }\n\n    addStopPropagationEvent(selector) {\n        const element = this.querySelector(selector)\n        if (element) {\n            element.addEventListener('click', this.stopPropagationHandler)\n        }\n    }\n\n    removeStopPropagationEvent(selector) {\n        const element = this.querySelector(selector)\n        if (element) {\n            element.removeEventListener('click', this.stopPropagationHandler)\n        }\n    }\n\n    stopPropagationHandler(event) {\n        event.stopPropagation()\n    }\n\n    disconnectedCallback() {\n        this.unbindEvent()\n    }\n}\n\ncustomElements.get('nb-sku') || customElements.define('nb-sku', Sku)\n\nexport default Sku\n","import viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { VARIATION_PDP, VARIATION_PLP } from '@kissui/components/src/sku/constants'\nimport { ECAPI_TYPE_CAPSULE } from '@kissui/helpers/src/catalog'\n\nexport const setCardTheme = ({ variation, type }, component) => {\n    // PDP\n    if (variation === VARIATION_PDP) {\n        component.setAttribute('pdp', 'true') // Used by CSS to increase font-size, etc.\n    }\n\n    // COFFEE on PLP on MOBILE\n    if (variation === VARIATION_PLP && type === ECAPI_TYPE_CAPSULE && viewportHelper.is.mobile) {\n        component.setAttribute('landscape', 'true')\n        return\n    }\n\n    component.setAttribute('portrait', 'true')\n}\n","import viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { stringifyForAttribute } from '@kissui/helpers/src/utils'\n\n/**\n * Display labels\n * @param {Object[]} labels - List of labels\n * @param {string} labels[].name - Text\n * @param {string} labels[].bgColor - Background\n * @param {string} labels[].color - Font color\n * @param {HTMLElement} component - Apply css on component\n * @returns {String} - Render of labels\n */\nexport const renderLabels = ({ labels = [] }, component = null) => {\n    if (!component || !labels || !labels.length) {\n        return ''\n    }\n\n    if (component && labels.length) {\n        component.classList.add('has-labels')\n    }\n\n    const direction = viewportHelper.is.mobile ? 'row' : 'column'\n    const data = stringifyForAttribute({ labels })\n\n    return `<nb-card-labels data=\"${data}\" direction=\"${direction}\"></nb-card-labels>`\n}\n","import { stringifyForAttribute } from '@kissui/helpers/src/utils'\n\nexport const renderLogos = (props, component) => {\n    const {\n        fair_trade,\n        alt_fair_trade,\n        is_organic,\n        alt_organic,\n        only_vertuo_next,\n        alt_vertuo_next,\n        is_rainforest,\n        alt_rainforest,\n        is_sustainable,\n        alt_sustainable,\n        is_q_certified_arabica,\n        alt_q_certification_arabica,\n        logos\n    } = props\n\n    if (\n        !fair_trade &&\n        !is_organic &&\n        !only_vertuo_next &&\n        !is_rainforest &&\n        !is_sustainable &&\n        !is_q_certified_arabica &&\n        (logos == null || logos.length < 1)\n    ) {\n        return ''\n    }\n\n    component.classList.add('has-logos')\n\n    const data = {\n        fair_trade,\n        alt_fair_trade,\n        is_organic,\n        alt_organic,\n        only_vertuo_next,\n        alt_vertuo_next,\n        is_rainforest,\n        alt_rainforest,\n        is_sustainable,\n        alt_sustainable,\n        is_q_certified_arabica,\n        alt_q_certification_arabica,\n        logos\n    }\n    return `<nb-card-logos data='${stringifyForAttribute(data)}'></nb-card-logos>`\n}\n","import './image.scss'\n\nexport const renderImage = (\n    { url, image_alt_text, image, quick_view_plp = {} },\n    theme = 'portrait'\n) => {\n    if (!image) {\n        return ''\n    }\n\n    let img = `<nb-img file=\"${image}\"\n        description=\"${image_alt_text}\"\n        aspect_ratio=\"${theme === 'portrait' ? '16/9' : '1/1'}\"\n        object_fit=\"contain\"\n        force_height=\"${theme === 'portrait' ? '160' : '120'}\">\n    </nb-img>`\n\n    const renderClass = url ? '' : 'class=\"cursor-default\"'\n\n    if (url || quick_view_plp?.show_view) {\n        const linkHref = url || 'javascript:void(0)'\n        img = `<a ${renderClass.trim()} href=\"${linkHref}\" target=\"_self\" aria-hidden=\"true\" tabindex=\"-1\">${img}</a>`\n    }\n\n    return `<div class=\"cb-image\">\n                ${img}\n            </div>`\n}\n","import { getTechnologyName } from '@kissui/helpers/src/catalog'\n\nexport const renderQuickView = ({\n    sku,\n    quick_view,\n    tracking_list,\n    tracking_position,\n    campaign_creative,\n    internationalId,\n    internationalName,\n    type,\n    technologies,\n    category,\n    rawPrice,\n    colors\n}) => {\n    if (!quick_view || !quick_view.label || !quick_view.popin_id) {\n        return ''\n    }\n\n    const skuData = JSON.stringify({\n        internationalId: internationalId,\n        internationalName: internationalName,\n        type: type,\n        technology: getTechnologyName({ technologies }),\n        category: category,\n        rawPrice: rawPrice\n    })\n    let colorsSkusList = []\n    if (typeof colors !== 'undefined') {\n        colors.map(color => {\n            colorsSkusList.push(color.sku)\n        })\n    }\n\n    return `<nb-link\n        color=\"gold\"\n        size=\"large\"\n        sku_colors=\"${colorsSkusList}\"\n        popin_id=\"${quick_view.popin_id}\"\n        sku='${sku}'\n        sku_data='${skuData}'\n        campaign_creative='${campaign_creative}'\n        tracking_list='${tracking_list}'\n        tracking_position='${tracking_position}'>${quick_view.label}</nb-link>`\n}\n","import { EVENT_POPIN_OPEN } from '@kissui/components'\nimport { setAttributes } from '@kissui/helpers/src/utils'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\n\nconst bundlePopinIDPrefix = 'bundle-popin-id-'\nlet bundlePopinContent = ''\nlet label_close\n\nexport const renderBundlePopinLink = (\n    { type, bundle_details, bundled, sku, position, range },\n    component\n) => {\n    if (\n        type === 'capsule' &&\n        bundle_details &&\n        bundle_details.popin_link_text &&\n        bundled === true\n    ) {\n        bundlePopinContent = `<nb-bundle-details\n                main_sku='${sku}'\n                description='${bundle_details.description}'\n                other_skus='${bundle_details.other_skus}'\n                other_skus_quantity= '${bundle_details.other_skus_quantity}'\n                range='${range}'\n                position='${position}'>\n            </nb-bundle-details>`\n\n        component.variation = 'white'\n\n        label_close = bundle_details.popin_label_close\n        return `<nb-link class=\"cb-cta-bundle\" size=\"large\" color=\"gold\" label=\"${bundle_details.popin_link_text}\"></nb-link>`\n    }\n    return ''\n}\n\nexport const openBundlePopin = component => {\n    const sku = component.props.legacyId || ''\n    renderPopinBundleDetail(component)\n    let bundlePopinID = bundlePopinIDPrefix + sku\n    component.bundlePopIn = document.getElementById(bundlePopinID)\n    component.appendChild(component.bundlePopIn)\n\n    setAttributes(component.bundlePopIn, {\n        variation: 'before',\n        bgcolor: 'white',\n        size: 'L',\n        padding: 'false',\n        label_close,\n        content: bundlePopinContent\n    })\n\n    component.bundlePopIn.classList.add('nb-popin--bundle')\n\n    dispatchEvent({\n        eventName: EVENT_POPIN_OPEN,\n        args: { id: bundlePopinID }\n    })\n}\n\nconst renderPopinBundleDetail = component => {\n    const sku = component.props.legacyId || ''\n    let bundlePopinID = bundlePopinIDPrefix + sku\n    if (document.getElementById(bundlePopinID) != null) return\n\n    let popin = document.createElement('nb-popin')\n\n    popin = component.appendChild(popin)\n    popin.setAttribute('id', bundlePopinID)\n    popin.setAttribute('content', '')\n}\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import{options as r}from\"preact\";export{Fragment}from\"preact\";var _=0;function o(o,e,n,t,f,l){var s,u,a={};for(u in e)\"ref\"==u?s=e[u]:a[u]=e[u];var i={type:o,props:a,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_,__source:f,__self:l};if(\"function\"==typeof o&&(s=o.defaultProps))for(u in s)void 0===a[u]&&(a[u]=s[u]);return r.vnode&&r.vnode(i),i}export{o as jsx,o as jsxDEV,o as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import cn from 'classnames'\nimport styles from './CompatibilityButton.module.scss'\n\nexport type CompatibilityButtonProps = {\n    /** The button text */\n    text: string\n    /** If set, the text will be text aligned center */\n    textCentered?: boolean\n    /** Button click handler */\n    onClick: (event: MouseEvent) => void\n    /** If true, the focus styles will be persistently applied after clicking */\n    maintainElementFocus?: boolean\n    /** Additional class */\n    class?: string\n}\n\nexport default function CompatibilityButton({\n    class: className,\n    onClick,\n    text,\n    textCentered,\n    maintainElementFocus\n}: CompatibilityButtonProps) {\n    const classes = cn(\n        styles.button,\n        maintainElementFocus ? styles.buttonFocus : null,\n        className\n    )\n    return (\n        <button class={classes} type=\"button\" onClick={onClick}>\n            <span class={styles.inner}>\n                <span class={styles.contents}>\n                    <span class={styles.icon} />\n                    <span class={cn(\n                        styles.text,\n                        textCentered ? styles.textCentered : null\n                    )}>{text}</span>\n                    <span class={styles.chevron} />\n                </span>\n            </span>\n        </button>\n    )\n}\n","async function fetchHtml(url: string): Promise<string | null> {\n    try {\n        const response = await fetch(url)\n        if (response.ok) {\n            const html = await response.text()\n            return html\n        }\n        return null\n    } catch (error) {\n        return null\n    }\n}\n\nfunction parseHtml(html: string): Document | null {\n    const parser = new DOMParser()\n    try {\n        const result = parser.parseFromString(html, 'text/html')\n        return result\n    } catch (error) {\n        return null\n    }\n}\n\nexport async function fetchAndParse(url: string): Promise<string> {\n    const document = await fetchHtml(url)\n    if (!document) return ''\n    const parser = parseHtml(document)\n    if (!parser) return '' // error parsing\n    const { body } = parser\n    const mainTag = Array.from<HTMLElement>(body.querySelectorAll('main#main')) // there's 2 <main>s on the page!\n    if (mainTag.length === 0) return '' // no main tag!\n\n    // filter out span.visually-hidden!\n    if (mainTag[0].children.length > 0) {\n        Array.from(mainTag[0].children).forEach(child => {\n            if (child.classList.contains('visually-hidden')) {\n                child.remove()\n            }\n        })\n    }\n    return mainTag[0].innerHTML\n}\n","import { createContext, type ComponentChildren } from 'preact'\nimport {\n    useRef,\n    useEffect,\n    useState,\n    useMemo,\n    useContext,\n    type StateUpdater\n} from 'preact/hooks'\nimport cn from 'classnames'\nimport styles from './ModalDrawer.module.scss'\nimport isOldSafari from '@kissui/apps/src/utils/isOldSafari'\n\nexport type ModalDrawerParentContext = {\n    setFooter: StateUpdater<ComponentChildren>\n}\n\nconst Context = createContext<ModalDrawerParentContext>({ setFooter: () => { } })\n\nexport type ModalDrawerProps = {\n    children: ComponentChildren\n    title: ComponentChildren\n    closeIconAltText: string\n    isOpen?: boolean\n    maxHeightMobile?: 25 | 33 | 50 | 66 | 75 | 87 | 100\n    onClose?: () => void\n}\n\nexport default function ModalDrawer({\n    children,\n    title,\n    closeIconAltText,\n    isOpen = false,\n    maxHeightMobile = 75,\n    onClose = () => { }\n}: ModalDrawerProps) {\n    const dialogRef = useRef<HTMLDialogElement>(null)\n    const [isClosing, setIsClosing] = useState<boolean>(false)\n    const [footer, setFooter] = useState<ComponentChildren>(null)\n\n    function hideModal() {\n        setIsClosing(true)\n        // have to manually close after animation due to Safari\n        const close = () => {\n            setIsClosing(false)\n            dialogRef.current?.close()\n            dialogRef.current?.removeEventListener('animationend', close)\n        }\n        dialogRef.current?.addEventListener('animationend', close)\n    }\n\n    useEffect(() => {\n        if (!dialogRef || !dialogRef.current) return undefined\n\n        // handles old safari + <dialog> support with dynamic import polyfill\n        if (isOldSafari(navigator?.userAgent)) {\n            (async () => {\n                if (dialogRef.current) {\n                    try {\n                        const { default: dialogPolyfill } = await import('dialog-polyfill')\n                        dialogPolyfill.registerDialog(dialogRef.current)\n                    } catch (error) {\n\n                    }\n                }\n            })()\n        }\n\n        function onDialogClick(event: MouseEvent) {\n            if (event.target === dialogRef.current) {\n                onClose()\n            }\n        }\n\n        dialogRef.current?.addEventListener('click', onDialogClick)\n\n        return () => {\n            dialogRef.current?.removeEventListener('click', onDialogClick)\n        }\n    }, [dialogRef.current])\n\n    useEffect(() => {\n        if (!dialogRef || !dialogRef.current) return\n\n        if (isOpen) {\n            dialogRef.current.showModal()\n        } else if (dialogRef.current.open) {\n            hideModal()\n        }\n    }, [dialogRef?.current, isOpen])\n\n    const parentContext = useMemo<ModalDrawerParentContext>(\n        () => ({\n            setFooter\n        }),\n        [setFooter]\n    )\n\n    return (\n        <dialog\n            ref={dialogRef}\n            onClose={onClose}\n            class={cn(\n                styles.container,\n                { [styles.isClosing]: isClosing },\n                styles[`h${maxHeightMobile}`]\n            )}\n        >\n            {(isOpen || isClosing) && (\n                <article class={styles.article}>\n                    <Context.Provider value={parentContext}>\n                        <header class={styles.header}>\n                            <h2 class={styles.title}>{title}</h2>\n                            <button\n                                class={styles.closeButton}\n                                type=\"button\"\n                                onClick={onClose}\n                                // eslint-disable-next-line jsx-a11y/no-autofocus\n                                autoFocus\n                                aria-label={closeIconAltText}\n                            />\n                        </header>\n                        <div class={styles.content}>{children}</div>\n                        {footer && <footer class={styles.footer}>{footer}</footer>}\n                    </Context.Provider>\n                </article>\n            )}\n        </dialog>\n    )\n}\n\nexport type ModalDrawerFooterProps = {\n    children: ComponentChildren\n}\n\nModalDrawer.Footer = function Footer({ children }: ModalDrawerFooterProps) {\n    const { setFooter } = useContext(Context)\n    setFooter(children)\n    return null\n}\n","/** Returns true if user agent is Safari/iPhone and version is lower than 15.3 */\nexport default function isOldSafari(userAgent?: string) {\n  const agent = userAgent ?? navigator.userAgent;\n  const versionMatch = agent.match(/Version\\/(\\d+\\.\\d+)/);\n  const safariVersion = versionMatch ? parseFloat(versionMatch[1]) : 0;\n  const isOlderThan153 = safariVersion < 15.3;\n  const isSafari = agent.includes('Safari') && agent.includes('iPhone');\n\n  return isSafari && isOlderThan153;\n}\n","import {\n    useEffect,\n    useState\n} from 'preact/hooks'\nimport { Product } from '@kissui/apps/src/product.type'\nimport { fetchAndParse } from './modalUtils'\nimport useAppData from '@kissui/apps/src/hooks/useAppData'\nimport plpAppData from '@kissui/apps/src/plp-core/store/plp.data'\nimport ModalDrawer from '@kissui/apps/src/components/ModalDrawer/ModalDrawer'\nimport styles from './CompatibilityModal.module.scss'\n\nexport type CompatibilityModalProps = {\n    isOpen: boolean\n    product: Product | null\n    onClose: () => void\n    modalSettings: {\n        url: string\n        title: string\n        loadingLabel: string\n        loadingLabelError: string\n        closeButtonLabel: string\n    }\n}\nexport default function CompatibilityModal({\n    isOpen,\n    product,\n    onClose,\n    modalSettings: {\n        url: compatibilityUrl,\n        title: modalTitle,\n        loadingLabel,\n        loadingLabelError: errorLoadingLabel,\n        closeButtonLabel\n    }\n}: CompatibilityModalProps) {\n    const [data, setData] = useState<CompatibilityState>({\n        status: 'INITIAL',\n        html: ''\n    })\n\n    async function fetchData() {\n        if (!compatibilityUrl) {\n            return\n        }\n        if (data.status === 'LOADED' || data.status === 'PENDING') {\n            return\n        }\n        setData({ status: 'PENDING', html: '' })\n\n        const html = await fetchAndParse(compatibilityUrl)\n        if (!html) {\n            setData({ status: 'ERROR', html: '' })\n            return\n        }\n        setData({ status: 'LOADED', html })\n    }\n\n    useEffect(() => {\n        if (!isOpen) {\n            return\n        }\n        (async () => {\n            try {\n                await fetchData()\n            } catch (error: any) {\n                console.error(error)\n            }\n        })()\n    }, [isOpen])\n\n    if (!compatibilityUrl) {\n        return null\n    }\n\n    return (\n        <ModalDrawer\n            title={modalTitle}\n            isOpen={isOpen}\n            closeIconAltText={closeButtonLabel}\n            onClose={onClose}\n            maxHeightMobile={87}>\n            {data.status === 'LOADED' && <Loaded html={data.html} />}\n            {data.status === 'PENDING' && <Pending label={loadingLabel}></Pending>}\n            {data.status === 'ERROR' && <Error label={errorLoadingLabel}></Error>}\n        </ModalDrawer>\n    )\n}\n\nfunction Loaded({ html }: { html: string }) {\n    return (\n        <div class={styles.stateLoaded} dangerouslySetInnerHTML={{ __html: html }} />\n    )\n}\n\nfunction Pending({ label }: { label: string }) {\n    return (\n        <div class={styles.statePending}>{label}</div>\n    )\n}\n\nfunction Error({ label }: { label: string }) {\n    return (\n        <div class={styles.stateError}>{label}</div>\n    )\n}\n\ntype CompatibilityState = {\n    status: 'INITIAL' | 'PENDING' | 'LOADED' | 'ERROR'\n    html: string\n}\n","import{h as t,hydrate as e,render as n,cloneElement as o}from\"preact\";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function i(t){this.getChildContext=function(){return t.context};var e=t.children,n=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)e.indexOf(n=i[o])>=0||(r[n]=t[n]);return r}(t,[\"context\",\"children\"]);return o(e,n)}function a(){var o=new CustomEvent(\"_preact\",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(o),this._vdom=t(i,r({},this._props,{context:o.detail.context}),function e(n,o){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var r=[],i={},a=0,c=n.attributes,l=n.childNodes;for(a=c.length;a--;)\"slot\"!==c[a].name&&(i[c[a].name]=c[a].value,i[s(c[a].name)]=c[a].value);for(a=l.length;a--;){var p=e(l[a],null),d=l[a].slot;d?i[d]=t(u,{name:d},p):r[a]=p}var h=o?t(u,null,r):r;return t(o||n.nodeName.toLowerCase(),i,h)}(this,this._vdomComponent)),(this.hasAttribute(\"hydrate\")?e:n)(this._vdom,this._root)}function s(t){return t.replace(/-(\\w)/g,function(t,e){return e?e.toUpperCase():\"\"})}function c(t,e,r){if(this._vdom){var i={};i[t]=r=null==r?void 0:r,i[s(t)]=r,this._vdom=o(this._vdom,i),n(this._vdom,this._root)}}function l(){n(this._vdom=null,this._root)}function u(e,n){var o=this;return t(\"slot\",r({},e,{ref:function(t){t?(o.ref=t,o._listener||(o._listener=function(t){t.stopPropagation(),t.detail.context=n},t.addEventListener(\"_preact\",o._listener))):o.ref.removeEventListener(\"_preact\",o._listener)}}))}export default function(t,e,n,o){function r(){var e=Reflect.construct(HTMLElement,[],r);return e._vdomComponent=t,e._root=o&&o.shadow?e.attachShadow({mode:\"open\"}):e,e}return(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=a,r.prototype.attributeChangedCallback=c,r.prototype.disconnectedCallback=l,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),r.observedAttributes=n,n.forEach(function(t){Object.defineProperty(r.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&\"string\"!==n&&\"boolean\"!==n&&\"number\"!==n||this.setAttribute(t,e)}})}),customElements.define(e||t.tagName||t.displayName||t.name,r)}\n//# sourceMappingURL=preact-custom-element.esm.js.map\n","import register from 'preact-custom-element'\nimport { useRef, useEffect, useState } from 'preact/hooks'\nimport type { Ref } from 'preact/hooks'\nimport type { FunctionComponent } from 'preact'\n\n/**\n * Turns a Preact component into a Web Component,\n * allowing the component to be used in either context\n * @param func A (P)React function component\n * @param tagName The Web Component tag name, like 'my-component'\n * @param observedAttributes Array of element attributes to observe for changes\n * @param options Additional web component options\n * @returns The custom element\n */\nexport default function asWebComponent(\n    func: FunctionComponent<any>,\n    tagName: string,\n    observedAttributes?: string[],\n    options?: { shadow: boolean }\n): CustomElementConstructor {\n    if (customElements.get(tagName)) {\n        return customElements.get(tagName) as CustomElementConstructor\n    }\n    register(func, tagName, observedAttributes, options)\n    return customElements.get(tagName) as CustomElementConstructor\n}\n\ninterface useCustomElementReturn {\n    immediateChildRef: Ref<any>\n    customElement: HTMLElement | null | undefined\n}\n\n/**\n * Allows access to the Web Component wrapper, from within the Preact Component\n */\nexport function useCustomElement(): useCustomElementReturn {\n    const ref = useRef<any>(null)\n    const [customElement, setCustomElement] = useState(undefined)\n    useEffect(() => {\n        setCustomElement(ref.current?.parentElement)\n    }, [ref])\n\n    return { immediateChildRef: ref, customElement }\n}\n","import CompatibilityButton from \"@kissui/components/src/compatibility/CompatibilityButton/CompatibilityButton\"\nimport CompatibilityModal, { CompatibilityModalProps } from \"@kissui/components/src/compatibility/CompatibilityModal/CompatibilityModal\"\nimport { Product } from \"@kissui/apps/src/product.type\"\nimport asWebComponent from \"@kissui/helpers/src/asWebComponent\"\nimport { useState } from \"preact/hooks\"\nimport styles from './compatibility-section.module.scss'\n\n/** Should match the schema data structure */\ntype SkuMainInfoCompatibilitySchema = {\n    compatibility_modal_url: string\n    compatibility_modal_title: string\n    compatibility_modal_loading_text: string\n    compatibility_modal_loading_text_error: string\n    compatibility_modal_close_button_ally: string\n    compatibility_card_button_text: string\n}\n\ntype CompatibilityProps = {\n    /** A stringified version of the product */\n    product: string\n    compatibility: string\n}\nfunction Compatibility({ product: productStringified, compatibility: compatibilityStringified }: CompatibilityProps) {\n    const [modalState, setModalState] = useState<Product | null>(null)\n\n    let product: Product | null = null\n    let compatibilityDataParsed: SkuMainInfoCompatibilitySchema | null = null\n\n\n    try {\n        product = JSON.parse(productStringified) as Product\n        compatibilityDataParsed = JSON.parse(compatibilityStringified) as SkuMainInfoCompatibilitySchema\n    } catch (error) {\n        return null // do not render the compatibility button\n    }\n    if (!product || !compatibilityDataParsed) return null\n\n\n    const toggleCompatibilityModal = (product: Product) => {\n        setModalState(product)\n    }\n    const hideModal = () => {\n        setModalState(null)\n    }\n\n    function handleCompatibilityClick(event: MouseEvent, product: Product) {\n        event.stopPropagation()\n        event.preventDefault()\n        toggleCompatibilityModal(product)\n    }\n\n    const compatibilityButtonLabel = compatibilityDataParsed?.compatibility_card_button_text ?? ''\n    const modalSettings: CompatibilityModalProps['modalSettings'] = {\n        url: compatibilityDataParsed?.compatibility_modal_url ?? '',\n        title: compatibilityDataParsed?.compatibility_modal_title ?? '',\n        loadingLabel: compatibilityDataParsed?.compatibility_modal_loading_text ?? '',\n        loadingLabelError: compatibilityDataParsed?.compatibility_modal_loading_text_error ?? '',\n        closeButtonLabel: compatibilityDataParsed?.compatibility_modal_close_button_ally ?? ''\n    }\n\n    if (!compatibilityButtonLabel) return null\n\n    // we don't want to persist the compat button focus on the PDP\n    const isPDP = (product.variation ?? '') === 'pdp'\n\n    return (<>\n        <CompatibilityButton\n            text={compatibilityButtonLabel}\n            textCentered\n            onClick={(e) => handleCompatibilityClick(e, product)}\n            class={styles.button}\n            maintainElementFocus={!isPDP}\n        ></CompatibilityButton>\n        <CompatibilityModal\n            isOpen={!!modalState}\n            product={modalState}\n            onClose={hideModal}\n            modalSettings={modalSettings}\n        ></CompatibilityModal>\n    </>)\n}\n\nexport default asWebComponent(Compatibility, 'nb-compatibility-section')\n","import viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { renderHeading as renderHeadingSku } from '@kissui/components/src/sku/fragments/heading'\n\nconst getDecaffeinatoRegExp = props => {\n    const { label_decaffeinato } = props\n    return new RegExp(label_decaffeinato, 'ig')\n}\n\nconst hasDecaffeinato = (props, heading) => {\n    const { label_decaffeinato } = props\n\n    return (\n        label_decaffeinato &&\n        label_decaffeinato !== '' &&\n        getDecaffeinatoRegExp(props).test(heading)\n    )\n}\n\nexport const renderHeading = props => {\n    const { name } = props\n\n    if (hasDecaffeinato(props, name)) {\n        const { label_decaffeinato } = props\n        const className = viewportHelper.is.mobile ? 't-xs-700-sl' : 't-md-700-sl'\n\n        props.name_custom = name\n            .replace(\n                getDecaffeinatoRegExp(props),\n                `<span class='cb-heading__label ${className}'>${label_decaffeinato}</span>`\n            )\n            .trim()\n    }\n\n    return renderHeadingSku(props)\n}\n","import { interpolate } from '@kissui/helpers/src/utils'\nimport { getSleeveNumber } from '@kissui/helpers/src/catalog'\n\nconst getSleeveLabel = props => {\n    const { number_of_sleeves, label_sleeves, label_sleeve } = props\n    const sleeveNumber = number_of_sleeves || getSleeveNumber(props)\n    return sleeveNumber > 1 && label_sleeves ? label_sleeves : label_sleeve\n}\n\nconst getQuantity = ({ bundled, sales_multiple, unit_quantity, unitQuantity }) =>\n    bundled === false ? sales_multiple : unit_quantity || unitQuantity || 0\n\nexport const renderShowSleeve = props => {\n    const { show_sleeve = false } = props\n\n    if (!show_sleeve) {\n        return ''\n    }\n\n    const { label_capsules, sleeve_syntax } = props\n    const label = getSleeveLabel(props)\n    const quantity = props.number_of_capsules ? props.number_of_capsules : getQuantity(props)\n    const sleeveNumber = props.number_of_sleeves ? props.number_of_sleeves : getSleeveNumber(props)\n\n    if (!quantity || !sleeveNumber) {\n        return ''\n    }\n\n    const showSleeve = interpolate(\n        sleeve_syntax,\n        {\n            numberOfSleeves: sleeveNumber,\n            sleeveLabel: label,\n            quantity,\n            label_capsules,\n            sleevePrice: props.hasPricePerSleeve ? props.sleevePrice : '',\n            perSleeveLabel: props.hasPricePerSleeve ? props.perSleeveLabel : ''\n        },\n        '{',\n        '}'\n    )\n\n    if (!showSleeve) {\n        return ''\n    }\n\n    return `<p class=\"cb-price-items cb-show-sleeve t-xs-500-sl\">${showSleeve}</p>`\n}\n","import Sku from '@kissui/components/src/sku'\nimport { renderLabelTechnology } from '@kissui/components/src/sku/fragments/labelTechnology'\nimport { renderLabelRange } from '@kissui/components/src/sku/fragments/labelRange'\nimport { renderHeadline } from '@kissui/components/src/sku/fragments/headline'\nimport { renderStrikethroughPrice } from '@kissui/components/src/sku/fragments/strikethroughPrice'\nimport { renderPrice } from '@kissui/components/src/sku/fragments/price'\nimport { renderBundlePopinLink, openBundlePopin } from './fragments/bundle'\nimport { renderIntensity } from './fragments/intensity'\nimport '@kissui/components/src/compatibility/compatibility-section/compatibility-section' // registers the compatibility Preact Web Component!\nimport { renderHeading } from './fragments/heading'\nimport { renderShowSleeve } from './fragments/sleeve'\nimport { renderCapsulePrice } from './fragments/priceCapsule'\nimport { renderBoxTube } from './fragments/boxTube'\nimport { renderPackFormat } from './fragments/packFormat'\nimport { renderSkuQuickViewLink } from './fragments/skuQuickViewLink'\nimport { stringifyForAttribute } from '@kissui/helpers/src/utils'\nimport { capsuleHasMachineCompatibilityIssue } from '@kissui/helpers/src/productCompatibility'\n\nclass SkuCoffee extends Sku {\n    constructor() {\n        super()\n        this.type = 'coffee'\n        this.boundHandleBundleOpen = this.handleBundleOpen.bind(this)\n    }\n\n    onReady() {\n        this.bundlePopinLink = this.querySelector('.cb-cta-bundle')\n        super.onReady()\n    }\n\n    renderInformation() {\n        return `${renderLabelTechnology(this.props)}\n                ${renderLabelRange(this.props)}\n                ${renderHeading(this.props)}\n                ${renderHeadline(this.props)}\n                ${renderSkuQuickViewLink(this.props)}\n                ${renderIntensity(this.props)}\n                ${this.renderCompatibility(this.props)}\n                ${renderBundlePopinLink(this.props, this)}\n                ${renderBoxTube(this.props)}`\n    }\n\n    renderCompatibility() {\n        // only show the feature on the PDP\n        if (this.props.variation !== 'pdp') {\n            return ''\n        }\n        // only show compatibility button if capsule exists in specific range\n        if (!capsuleHasMachineCompatibilityIssue(this.props?.ranges ?? [])) {\n            return ''\n        }\n        const compatibilityStringified = this.dataset?.compatibility ?? ''\n        if (!compatibilityStringified) {\n            return ''\n        }\n        const compatibilityDataParsed = JSON.parse(compatibilityStringified)\n        return `<nb-compatibility-section product=\"${stringifyForAttribute(\n            this.props\n        )}\" compatibility=\"${stringifyForAttribute(\n            compatibilityDataParsed\n        )}\"></nb-compatibility-section>`\n    }\n\n    renderPricingDefault() {\n        const isPortrait = this.hasAttribute('portrait')\n\n        const pricingWithClass = `\n        ${renderStrikethroughPrice(this.props, this)}\n        <div class=\"${isPortrait ? 't-md-700-sl' : 't-sm-700-sl'}\">\n            ${renderPrice(this.props)}\n        </div>`\n\n        return pricingWithClass\n    }\n\n    renderPricing() {\n        return `${this.renderPricingDefault()}\n                ${renderPackFormat(this.props)}\n                ${renderShowSleeve(this.props)}\n                ${renderCapsulePrice(this.props)}`\n    }\n\n    handleBundleOpen() {\n        openBundlePopin(this)\n    }\n\n    bindEvent() {\n        super.bindEvent()\n        if (this.bundlePopinLink) {\n            this.bundlePopinLink.addEventListener('click', this.boundHandleBundleOpen)\n        }\n    }\n\n    unbindEvent() {\n        super.unbindEvent()\n        if (this.bundlePopinLink) {\n            this.bundlePopinLink.removeEventListener('click', this.boundHandleBundleOpen)\n        }\n    }\n}\n\ncustomElements.get('nb-sku-coffee') || customElements.define('nb-sku-coffee', SkuCoffee)\n\nexport default SkuCoffee\n","import { escapeHtml, stringifyForAttribute } from '@kissui/helpers/src/utils'\n\nexport const renderSkuQuickViewLink = props => {\n    const { quick_view_plp, id, campaign, tracking_list, tracking_position } = props\n\n    let quickViewLabel = quick_view_plp?.quick_view_text\n\n    if (!quick_view_plp?.show_view || !quickViewLabel) {\n        return ''\n    }\n\n    return `<div class=\"cb-link sku-quick-view-link\">\n                <nb-link\n                    target=\"_self\"\n                    size=\"small\"\n                    campaign_id=\"${escapeHtml(campaign?.id || '')}\"\n                    campaign_name=\"${escapeHtml(campaign?.name || '')}\"\n                    campaign_position=\"${escapeHtml(campaign?.position || '')}\"\n                    campaign_creative=\"${escapeHtml(campaign?.creative || '')}\"\n                    data=\"${stringifyForAttribute({ product: { id: id } })}\"\n                    long_sku=\"${id}\"\n                    tracking_position=\"${tracking_position}\"\n                    tracking_list=\"${tracking_list}\"\n                    >\n                        ${quickViewLabel}\n                </nb-link>\n            </div>`\n}\n","import { getMaxIntensity } from '@kissui/components/src/sku-coffee/services'\n\nexport const renderIntensity = ({\n    technologies,\n    intensity,\n    a11y_intensity_max,\n    intensity_label = ''\n}) => {\n    const maxIntensity = getMaxIntensity({ technologies })\n\n    if (intensity === 0) {\n        return ''\n    }\n\n    return `<nb-intensity\n        intensity=\"${intensity}\"\n        max_intensity=\"${maxIntensity}\"\n        a11y_intensity_max=\"${a11y_intensity_max}\"\n        intensity_label=\"${intensity_label}\">\n    </nb-intensity>`\n}\n","export const renderBoxTube = ({ packaging }) => {\n    if (!packaging) {\n        return ''\n    }\n    const { show_packaging, packaging_list, a11y_packaging_label } = packaging\n    if (!show_packaging || !packaging_list || !packaging_list.length) {\n        return ''\n    }\n\n    const packagingItem = packaging_list\n        .map(({ label, url, selected }) => {\n            if (url && !selected) {\n                return `<a href=\"${url}\" target=\"_self\"><span class=\"t-sm-400-sl\">${label}</span></a>`\n            }\n\n            return `<div aria-current=\"page\"><span class=\"t-sm-700-sl\">${label}</span></div>`\n        })\n        .join('')\n\n    return `<div class=\"cb-sku-tab\">\n        <span class=\"sr-only\">${a11y_packaging_label}</span>\n        ${packagingItem}\n    </div>`\n}\n","import { Product } from '@kissui/apps/src/product.type'\n\nconst COMPATIBILITY_RANGE_IDENTIFIER = 'capsule-range-label-compatibility-vertuo' as const\n\n/** Capsules tagged to certain range categories will show the machine compatibility button/modal */\nexport function capsuleHasMachineCompatibilityIssue(ranges: Product['ranges']) {\n    const rangesSimple = simplifyRangeIds(ranges)\n    return rangesSimple.some(id => id === COMPATIBILITY_RANGE_IDENTIFIER)\n}\n\n/**\n * Full range strings are like: 'nesclub2.es.b2c/cat/capsule-range-label-compatibility-vertuo'\n * @returns The range string without the website/market info\n */\nfunction simplifyRangeIds(ranges: string[]) {\n    return ranges.map(range => range.split('/').pop())\n}\n","export const renderPackFormat = ({ packaging }) => {\n    if (!packaging) {\n        return ''\n    }\n    const { show_packaging, packaging_list } = packaging\n    if (!show_packaging || !packaging_list || !packaging_list.length) {\n        return ''\n    }\n\n    const selectedPack = packaging_list.find(obj => {\n        return obj.selected === true\n    })\n\n    return `<p class=\"cb-price-items cb-pack-format t-xs-500-sl\">${selectedPack.pack_format}</p>`\n}\n","import { interpolate } from '@kissui/helpers/src/utils'\n\nexport const renderCapsulePrice = props => {\n    const {\n        show_capsule_price = false,\n        capsule_price_label,\n        capsule_price_syntax = '{capsule_price_label}: {price_per_capsule}',\n        price_per_capsule,\n        show_sleeve_price\n    } = props\n    if (!show_capsule_price || !capsule_price_label || !show_sleeve_price) {\n        return ''\n    }\n\n    const pricePerCapsule = interpolate(\n        capsule_price_syntax,\n        {\n            capsule_price_label,\n            price_per_capsule\n        },\n        '{',\n        '}'\n    )\n\n    if (!pricePerCapsule || !price_per_capsule) {\n        return ''\n    }\n\n    return `<p class=\"cb-price-items cb-price-capsule t-xs-500-sl\">${pricePerCapsule}</p>`\n}\n"],"names":["isNil","obj","CardLabels","HTMLElement","constructor","super","this","props","labels","connectedCallback","attributes","data","find","attribute","nodeName","getData","filter","reduce","all","attr","nodeValue","JSON","parse","error","console","log","createProps","render","direction","classList","add","length","innerHTML","renderLabels","map","label","name","bgColor","color","join","customElements","get","define","BREAKPOINT_TABLET","EVENT_POPIN_OPEN","COFFEE_VERTUO","NespressoElement","template","_createProps","onStart","loadTemplate","onReady","forceAttributes","force","_diff","elem","_getNodeType","node","nodeType","tagName","toLowerCase","_getNodeContent","childNodes","textContent","domNodes","Array","prototype","slice","call","templateNodes","count","parentNode","removeChild","forEach","index","appendChild","cloneNode","replaceChild","templateContent","fragment","document","createDocumentFragment","templateHTML","str","DOMParser","parseFromString","body","disconnectedCallback","onDestroy","helper","is","innerWidth","vw","devicePixelRatio","window","mobile","mobile_tablet","tablet","desktop","retina","lt","ref","interpolate","txt","vars","stChr","enChr","curIdx","stIdx","indexOf","enIdx","hashId","substring","substr","stringifyForAttribute","escapeHtml","stringify","text","replace","m","sanitizeString","toString","VARIATION_PLP","VARIATION_PDP","isPdp","variation","renderHeading","url","name_custom","finalName","result","headingLevel","getHeadingLevel","push","viewportHelper","renderLink","a11y_product_card","a11yProductName","renderHeadline","headline","is_headline_hidden","renderLabelTechnology","label_technology","renderLabelRange","label_range","ECAPI_TYPE_CAPSULE","TECHNOLOGY_CATEGORY_IDENTIFIER","getProduct","sku","napi","catalog","trimSku","getTechnologyName","productData","techno","technologies","isMultipleOf","quantity","multiple","getSleeveNumber","product","getTechnologyNameFn","sales_multiple","unitQuantity","NaN","isBundled","salesMultiple","isSalesMultipleGreaterThanOne","isUnitQuantityEqualToOne","isSalesMultipleEqualToOne","isUnitQuantityGreaterThanOne","getFormattedPrice","async","price","priceFormatter","priceFormat","getPriceFormatter","currency","config","padl","namespace","dataLayer","app","html","short","getStrikethroughPriceElement","component","querySelector","renderStrikethroughPrice","strikethrough_price","strikethroughPrice","fetchStrikethroughPrice","then","payload","element","catch","e","style","display","renderPrice","hidePrice","giftcard_price","price_per_capsule","show_sleeve_price","type","finalPrice","getDataLayer","padlNamespace","isLoggedIn","user","renderAddToCart","activeLongSku","activeSku","category_name","contact_cta","longSku","position","rendererName","show_view_details","view_details_label","disableTracking","buttonSize","getButtonSize","cta_url","cta_label","contact_cta_text","contact_url_anchor","is_b2b","isArray","some","tech","includes","checkForB2B","skuProp","activeLongSkuProp","disableTrackingProp","getComputedProps","b2bLoggedIn","remainingCases","b2bNotLoggedIn","COMMON_URL","ORGANIC_LOGO_IMG_EU","ORGANIC_LOGO_IMG_US","ORGANIC_LOGO_IMG_CA","ORGANIC_LOGO_IMG_BR","ORGANIC_LOGO_IMG_JP","ORGANIC_LOGO_IMG_BE","organicLogoImg","getMarketCode","market","toLocaleLowerCase","getOrganicLogo","getMaxIntensity","INTENSITY_MAX_OL","getMergedProductCoffeeData","pageBuilderProductProps","pageBuilderProps","bundle_details","options","isBundledResult","showCapsulePrice","final_price","bundled","Math","round","getFinalPrice","option","intensity","capsuleProperties","max_intensity","show_capsule_price","apiOverride","pageBuilderData","images","description","api_override","image","icon","main","VARIATION_CROSS_SELL","getCapsuleFeatures","acidity","bitterness","roastLevel","value","roast","getSkuQuickViewProp","popinId","skuData","componentType","mergedProductData","getMergedProductDataForComponentType","addToCartProps","getAddToCartProperties","isVariationOnPLP","getPlpQuickViewProps","getCrossSellQuickViewProps","matchedProduct","products","productPageBuilder","legacyId","getMergedProductData","variant","additional_message","additional_message_icon","additional_message_link","internationalId","id","unit_quantity","rangeData","rawPrice","image_alt_text","highlighted","dataTransformObjectProductType","getMergedProductMachineData","ratingsAndReviews","ratings","colors","max_colors","show_ratings","minimum_rating","getMergedProductGiftCardData","_","default_image","getAddToCartProps","commonProps","Number","label_capsules","capsule_price_label","capsule_price_syntax","show_sleeve","sleeve_syntax","number_of_sleeves","label_sleeves","label_sleeve","popin","popin_id","close","quick_view_plp","footer","intensity_label","a11y_intensity_max","cup_sizes","items","cupSizesDetails","aromatic_profile","capsuleProductAromatics","link","levels","pricing","add_to_cart","showSleeve","campaign","copywriting","sku_quick_view","pdpURLs","dispatchEvent","eventName","args","Error","event","CustomEvent","detail","bubbles","Event","createEvent","initEvent","emitCustomEvent","customEvent","cancelable","composed","raisedByPB","productClick","list","productInfo","getProductInfo","productPayload","getProductPayload","actionField","internationalName","category","unitPrice","inStock","technology","item","split","pop","dimension44","dimension53","dimension54","dimension55","dimension56","dimension57","dimension192","brand","gtmDataObject","eventData","eventAction","currencyCode","eventRaisedBy","ecommerce","click","Sku","isQuickViewPlp","boundOnPDPLinkClick","onPDPLinkClick","bind","boundOnQuickViewOpen","onQuickViewOpen","clickMethod","setCardTheme","setAttribute","Object","assign","getSleevePrice","checkHiddenPriceForLoggedInUser","show_view","renderVisual","renderHeader","renderInformation","renderQuickView","renderPricing","renderAction","renderFooter","bindEvent","renderHeaderDefault","renderLogos","fair_trade","alt_fair_trade","is_organic","alt_organic","only_vertuo_next","alt_vertuo_next","is_rainforest","alt_rainforest","is_sustainable","alt_sustainable","is_q_certified_arabica","alt_q_certification_arabica","logos","renderVisualDefault","theme","hasAttribute","renderImage","img","renderClass","linkHref","trim","sleevePrice","hasPricePerSleeve","renderInformationDefault","quick_view","tracking_list","tracking_position","campaign_creative","colorsSkusList","renderPricingDefault","isPortrait","renderActionDefault","actionSlot","outerHTML","renderFooterDefault","renderAdditionalMessage","additionalMessageFinal","renderIcon","size","seo_label","productIndex","getAttribute","renderSkuQuickView","quickViewElement","remove","handleVariation","G","handlePLPVariation","createElement","heading","we","handleCrossSellVariation","more_info","parentElement","newQuickViewElement","getSkuQuickViewData","preventDefault","trackComponentInteraction","creative","actionType","productType","event_raised_by","component_name","action_type","item_id_event","item_name_event","item_category_event","item_technology_event","item_range_event","item_price_event","eventCategory","eventLabel","unbindEvent","showQuickView","quickViewTextExists","quick_view_text","querySelectorAll","addEventListener","addStopPropagationEvent","removeEventListener","removeStopPropagationEvent","selector","stopPropagationHandler","stopPropagation","bundlePopinIDPrefix","label_close","bundlePopinContent","renderPopinBundleDetail","bundlePopinID","getElementById","hasOwn","hasOwnProperty","classNames","classes","i","arguments","arg","appendClass","parseValue","apply","key","newClass","module","exports","default","o","n","t","f","l","s","u","a","__k","__","__b","__e","__d","__c","__h","__v","__source","__self","defaultProps","r","vnode","CompatibilityButton","class","className","onClick","textCentered","maintainElementFocus","_jsx","cn","styles","button","buttonFocus","children","inner","_jsxs","contents","chevron","fetchAndParse","response","fetch","ok","fetchHtml","parser","parseHtml","mainTag","from","child","contains","Context","createContext","setFooter","ModalDrawer","title","closeIconAltText","isOpen","maxHeightMobile","onClose","dialogRef","useRef","isClosing","setIsClosing","useState","useEffect","current","userAgent","agent","navigator","versionMatch","match","isOlderThan153","parseFloat","isOldSafari","dialogPolyfill","import","registerDialog","onDialogClick","target","showModal","open","hideModal","parentContext","useMemo","container","article","Provider","header","closeButton","autoFocus","content","Footer","useContext","CompatibilityModal","modalSettings","compatibilityUrl","modalTitle","loadingLabel","loadingLabelError","errorLoadingLabel","closeButtonLabel","setData","status","fetchData","Loaded","Pending","stateLoaded","dangerouslySetInnerHTML","__html","statePending","stateError","getChildContext","context","keys","_vdom","_props","c","p","d","slot","h","_vdomComponent","_root","toUpperCase","_listener","func","observedAttributes","Reflect","construct","shadow","attachShadow","mode","create","attributeChangedCallback","propTypes","defineProperty","set","displayName","asWebComponent","productStringified","compatibility","compatibilityStringified","modalState","setModalState","compatibilityDataParsed","handleCompatibilityClick","toggleCompatibilityModal","compatibilityButtonLabel","compatibility_card_button_text","compatibility_modal_url","compatibility_modal_title","compatibility_modal_loading_text","compatibility_modal_loading_text_error","compatibility_modal_close_button_ally","isPDP","_Fragment","getDecaffeinatoRegExp","label_decaffeinato","RegExp","hasDecaffeinato","test","renderHeadingSku","renderShowSleeve","getSleeveLabel","number_of_capsules","getQuantity","sleeveNumber","numberOfSleeves","sleeveLabel","perSleeveLabel","SkuCoffee","boundHandleBundleOpen","handleBundleOpen","bundlePopinLink","quickViewLabel","renderSkuQuickViewLink","renderIntensity","maxIntensity","renderCompatibility","renderBundlePopinLink","range","popin_link_text","other_skus","other_skus_quantity","popin_label_close","renderBoxTube","packaging","show_packaging","packaging_list","a11y_packaging_label","selected","ranges","simplifyRangeIds","capsuleHasMachineCompatibilityIssue","dataset","renderPackFormat","pack_format","pricePerCapsule","renderCapsulePrice","bundlePopIn","setAttributes","attrs","bg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