{"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/helpers/src/catalog.js","../../../packages/helpers/src/getCurrency.js","../../../packages/components/src/sku/fragments/strikethroughPrice.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/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/labelTechnology.js","../../../packages/components/src/sku/fragments/labelRange.js","../../../packages/components/src/sku/fragments/headline.js","../../../packages/components/src/sku/fragments/quickView.js","../../../packages/components/src/sku/fragments/price.js","../../../packages/helpers/src/assets/js/eventDispatch.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}\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 { 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","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        const quickViewElement = document.querySelector('nb-sku-quick-view')\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 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            eventCategory: 'User Engagement',\n            eventAction: 'Click',\n            eventLabel: '',\n            nonInteraction: 0,\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","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 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","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 { 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 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"],"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","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","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","ECAPI_TYPE_CAPSULE","TECHNOLOGY_CATEGORY_IDENTIFIER","getProduct","sku","napi","catalog","trimSku","getTechnologyName","productData","techno","technologies","substring","indexOf","isBundled","sales_multiple","salesMultiple","isSalesMultipleGreaterThanOne","isUnitQuantityEqualToOne","unitQuantity","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","getDataLayer","padlNamespace","isLoggedIn","user","renderAddToCart","activeLongSku","activeSku","category_name","contact_cta","hidePrice","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","product","pageBuilderProductProps","pageBuilderProps","bundle_details","options","show_sleeve_price","isBundledResult","showCapsulePrice","price_per_capsule","final_price","bundled","type","Math","round","getFinalPrice","option","intensity","capsuleProperties","max_intensity","show_capsule_price","apiOverride","pageBuilderData","images","headline","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","label_range","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","emitCustomEvent","eventName","customEvent","CustomEvent","detail","bubbles","cancelable","composed","dispatchEvent","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","event","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","renderLabelTechnology","label_technology","renderLabelRange","renderHeadline","is_headline_hidden","quick_view","tracking_list","tracking_position","campaign_creative","colorsSkusList","renderPricingDefault","isPortrait","renderPrice","giftcard_price","finalPrice","renderActionDefault","actionSlot","outerHTML","renderFooterDefault","renderAdditionalMessage","additionalMessageFinal","renderIcon","size","seo_label","productIndex","getAttribute","renderSkuQuickView","quickViewElement","remove","handleVariation","L","handlePLPVariation","createElement","heading","B","handleCrossSellVariation","more_info","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","args","Error","Event","createEvent","initEvent","unbindEvent","showQuickView","quickViewTextExists","quick_view_text","querySelectorAll","addEventListener","addStopPropagationEvent","removeEventListener","removeStopPropagationEvent","selector","stopPropagationHandler","stopPropagation"],"mappings":"AAAA,MAqBMA,EAAQC,GAAoC,MAARA,ECnB1C,MAAMC,UAAmBC,YACrBC,WAAAA,GACI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