{"version":3,"file":"index.es.min.js","sources":["../../../packages/components/src/nespressoElement/nespressoElement.js","../../../packages/helpers/src/utils.ts","../../../packages/components/src/constants.mjs","../../../packages/helpers/src/viewport.helpers.ts","../../../packages/page-builder-sections/src/informative-stripe/informative-stripe.js","../../../packages/helpers/src/waitForSelector.ts"],"sourcesContent":["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","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 MAX_WIDTH_CONTAINER = 1160\n\nexport const BREAKPOINT_XL = 1920\nexport const BREAKPOINT_TABLET = 1024\nexport const BREAKPOINT_L = 996\nexport const BREAKPOINT_M = 768\nexport const BREAKPOINT_S = 750\nexport const BREAKPOINT_XS = 375\n\nexport const CTA_PRIMARY = 'primary'\nexport const CTA_PRIMARY_TRANSPARENT = 'primary_transparent'\nexport const CTA_SUBTLE = 'subtle'\nexport const CTA_LINK = 'link'\nexport const CTA_LINK_UNDERLINE = 'link-underline'\nexport const CTA_LINK_GOLD = 'link-gold'\nexport const CTA_LINK_ADD_TO_CART_SMALL = 'AddToCart_small'\nexport const CTA_LINK_ADD_TO_CART_LARGE = 'AddToCart_large'\n\nexport const EVENT_TAB_CHANGE = 'EVENT_TAB_CHANGE'\n\nexport const EVENT_VIDEO = 'WEB_COMPONENT_VIDEO'\nexport const EVENT_POPIN_OPEN = 'WEB_COMPONENT_POPIN_OPEN'\nexport const EVENT_POPIN_OPENED = 'WEB_COMPONENT_POPIN_OPENED'\nexport const EVENT_POPIN_CLOSE = 'WEB_COMPONENT_POPIN_CLOSE'\nexport const EVENT_POPIN_CLOSED = 'WEB_COMPONENT_POPIN_CLOSED'\nexport const EVENT_POPIN_CLOSE_CLICK = 'WEB_COMPONENT_POPIN_CLOSE_CLICK'\nexport const EVENT_POPIN_KEY_DOWN = 'keydown'\nexport const EVENT_POPIN_FORM_TOGGLE_TITLE = 'WEB_COMPONENT_POPIN_FORM_TOGGLE_TITLE'\nexport const EVENT_CTA_CLICK = 'WEB_COMPONENT_CTA_CLICK'\nexport const EVENT_HERO_REORDER_OPEN = 'WEB_COMPONENT_HERO_REORDER_OPEN'\nexport const EVENT_HERO_REORDER_CLOSE = 'WEB_COMPONENT_HERO_REORDER_CLOSE'\nexport const EVENT_QUICKVIEW_OPEN = 'WEB_COMPONENT_QUICKVIEW_OPEN'\nexport const EVENT_QS_OPEN = 'WEB_COMPONENT_QS_OPEN'\nexport const EVENT_QS_OPENED = 'WEB_COMPONENT_QS_OPENED'\nexport const EVENT_QS_CLOSE = 'WEB_COMPONENT_QS_CLOSE'\nexport const EVENT_QS_CLOSED = 'WEB_COMPONENT_QS_CLOSED'\nexport const EVENT_QS_CLOSE_CLICK = 'WEB_COMPONENT_QS_CLOSE_CLICK'\nexport const EVENT_QS_KEY_DOWN = 'keydown'\nexport const EVENT_ADD_TO_CART = 'WEB_COMPONENT_ADD_TO_CART'\nexport const EVENT_CART_UPDATED = 'WEB_COMPONENT_CART_UPDATED'\nexport const EVENT_VIDEO_TOGGLE = 'WEB_COMPONENT_VIDEO_TOGGLE'\nexport const VIDEO_ON_HOVER = 'VIDEO_ON_HOVER'\nexport const VIDEO_ON_OUT = 'VIDEO_ON_OUT'\nexport const EVENT_DETAIL_OPEN = 'WEB_COMPONENT_DETAIL_OPEN'\nexport const EVENT_SLIDER_READY = 'WEB_COMPONENT_SLIDER_READY'\nexport const EVENT_SLIDE_CHANGE = 'WEB_COMPONENT_SLIDE_CHANGE'\nexport const EVENT_OVERLAY_OPEN = 'WEB_COMPONENT_OVERLAY_OPEN'\nexport const EVENT_OVERLAY_CLOSE = 'WEB_COMPONENT_OVERLAY_CLOSE'\nexport const EVENT_OVERLAY_CLICKED = 'WEB_COMPONENT_OVERLAY_CLICKED'\nexport const EVENT_OPEN_PRODUCT_AR_CLICKED = 'OPEN_PRODUCT_AR_CLICKED'\nexport const EVENT_SORT_BY_CHANGE = 'WEB_COMPONENT_SORT_BY_CHANGE'\n\nexport const EVENT_BUBBLE_SELECTED = 'EVENT_BUBBLE_SELECTED'\nexport const EVENT_RECO_TOOL_OPTION_CLICKED = 'EVENT_RECO_TOOL_OPTION_CLICKED'\nexport const WEB_COMPONENT_PROJECTS_LOADED = 'WEB_COMPONENT_PROJECTS_LOADED'\nexport const WEB_COMPONENT_ANCHOR_LOADED = 'WEB_COMPONENT_ANCHOR_LOADED'\n\nexport const EVENT_SWIPED_UP = 'swiped-up'\nexport const EVENT_SWIPED_DOWN = 'swiped-down'\nexport const EVENT_SWIPED_LEFT = 'swiped-left'\nexport const EVENT_SWIPED_RIGHT = 'swiped-right'\n\nexport const EVENT_HEADER_POSITION_CHANGED = 'EVENT_HEADER_POSITION_CHANGED'\n\nexport const keys = { ESC: 'Escape' }\n\nexport const ADD_TO_CART_MODIFIER_MINI = 'mini'\nexport const ADD_TO_CART_MODIFIER_DEFAULT = ADD_TO_CART_MODIFIER_MINI\n\nexport const COFFEE_ORIGINAL = 'original'\nexport const COFFEE_VERTUO = 'vertuo'\nexport const COFFEE_PRO = 'pro'\nexport const COFFEE_OL = 'OL'\nexport const COFFEE_VL = 'VL'\nexport const INTENSITY_MAX_OL = 14\nexport const INTENSITY_MAX_VL = 12\nexport const DEFAULT_BUBBLE_ICON = ''\n\nexport const NUMBER_PRODUCTS_SLIDER = 8\nexport const NUMBER_FEATURES_PDP = 8\n\nexport const ALIGNMENT = ['center', 'left', 'right']\nexport const POSITION = ['top', 'right', 'bottom', 'left']\nexport const TRANSLATION_ADD_TO_CART = 'Add to cart'\nexport const TRANSLATION_UPDATE_BASKET = 'Update basket'\n\nexport const TIME_INSTANT = 1\nexport const TIME_FAST = 300\nexport const TIME_MEDIUM = 600\nexport const TIME_SLOW = 1200\n\nexport const APP_APPLE_LINK = {\n    default: 'https://apps.apple.com/us/app/nespresso/id342879434',\n    us: 'https://apps.apple.com/us/app/nespresso-new/id1609639566',\n    uk: 'https://apps.apple.com/gb/app/nespresso-new/id1609639566',\n    kr: 'https://apps.apple.com/kr/app/%EB%84%A4%EC%8A%A4%ED%94%84%EB%A0%88%EC%86%8C-%EB%B6%80%ED%8B%B0%ED%81%AC/id1609639566'\n}\nexport const APP_ANDROID_LINK =\n    'https://play.google.com/store/apps/details?id=com.nespresso.activities'\nexport const APP_HUAWEI_LINK = 'https://appgallery.huawei.com/app/C102571517'\n\nexport const SRC_PAGE_PLP = 'plp'\nexport const SRC_PAGE_PDP = 'pdp'\n\nexport const PLP_TYPE_COFFEE = 'coffee'\nexport const PLP_TYPE_MACHINE = 'machine'\nexport const PLP_TYPE_ACCESSORY = 'accessory'\nexport const CALLEO_API_DOMAIN = 'https://www.contact.nespresso.com/'\n\n// SCSS RELATED\n// Todo : should be shared by JS and SCSS\nexport const BROWSER_CONTEXT = 16 // 1rem = 16px\nexport const COLOR_WHITE_1000 = '#FFFFFF' // Do not change for #FFF shortcut, it will break slider-natural gradients !\n\nexport const CONTRAST_DARK = 'dark'\nexport const CONTRAST_LIGHT = 'light'\n\nexport const B2B_CONTACT_FORM_POPIN_ID = 'b2b-contact-form-popin-id'\nexport const B2B_CONTACT_FORM_POPIN_SRC_SEARCH = 'coveo-search'\n\nexport const B2B_CONTACT_FORM_POPIN_SRC_SKU_MAIN_INFO = 'sku-main-info'\n\nexport const B2B_CONTACT_FORM_POPIN_SRC_SKU_MAIN_INFO_AUTO = 'sku-main-info-auto'\n\nexport const ASPECT_RATIO_16_9 = '16/9'\nexport const ASPECT_RATIO_1_1 = '1/1'\n\nexport const NESPRESSO_PRODUCTION_DOMAIN = 'https://www.nespresso.com'\nexport const NESPRESSO_ROLLOUT_DOMAIN = 'https://nc2-env-rollout.nespresso.com'\n\nexport const EVENT_QUIZ_ON_GO_BACK = 'WEB_COMPONENT_EVENT_QUIZ_ON_GO_BACK'\nexport const EVENT_QUIZ_SUBMIT = 'WEB_COMPONENT_EVENT_QUIZ_SUBMIT'\n","import { BREAKPOINT_M, BREAKPOINT_TABLET } from '@kissui/components'\n\nconst viewport = () => {\n    const lt = (ref: number) => {\n        return window.innerWidth < ref\n    }\n\n    return {\n        get is() {\n            const { innerWidth: vw, devicePixelRatio } = window\n            return {\n                mobile: vw < BREAKPOINT_M,\n                mobile_tablet: vw < BREAKPOINT_TABLET,\n                tablet: vw >= BREAKPOINT_M && vw < BREAKPOINT_TABLET,\n                desktop: vw >= BREAKPOINT_TABLET && devicePixelRatio <= 1,\n                retina: vw >= BREAKPOINT_TABLET && devicePixelRatio > 1\n            }\n        },\n        lt\n    }\n}\n\nconst helper = viewport()\n\nexport default helper\n","import { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport { debounce, waitForSelector } from '@kissui/helpers/src/utils'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\n\nclass InformativeStripe extends NespressoElement {\n    constructor() {\n        super()\n\n        this.boundSetStickyTop = this.setStickyTop.bind(this)\n        this.debouncedSetStickyTop = debounce(this.boundSetStickyTop, 250)\n    }\n\n    loadTemplate() {\n        const { campaign } = this.props\n        const { style, secondary_substyle, link, is_sticky, sticky_top, sticky_top_mobile } =\n            this.props.copywriting\n\n        const renderedLink = this.renderLink()\n        const renderedDesc = this.renderDescription()\n\n        this.template = `\n            <div class=\"nb-informative-stripe ${this.getInformativeStripeCSSClasses(\n                style,\n                secondary_substyle\n            )} ${is_sticky === 'true' ? 'nb-is-sticky' : ''}\">\n                <nb-container\n                    campaign_id=\"${campaign.id}\"\n                    campaign_name=\"${campaign.name}\"\n                    campaign_position=\"${campaign.position}\"\n                    campaign_creative=\"${campaign.creative}\">\n                    <div class=\"nb-informative-stripe__inner\">\n                        ${this.renderIcon(style)}\n                        ${\n                            renderedLink || renderedDesc\n                                ? `<p class=\"nb-informative-stripe__inner--info ${this.getTextSize()}\">\n                                    ${renderedDesc || ''}\n                                    ${renderedLink || ''}\n                                </p>`\n                                : ''\n                        }\n                    </div>\n\n                </nb-container>\n            </div>\n            ${link.has_popin ? this.renderPopin() : ''}\n        `\n\n        this.render()\n\n        waitForSelector('plp-navigation').then(() => {\n            this.setStaticPLPBelow()\n        })\n\n        this.observeAppBanner()\n\n        if (is_sticky === 'true' && (sticky_top || sticky_top_mobile)) {\n            this.setStickyTop()\n\n            window.addEventListener('resize', this.debouncedSetStickyTop)\n        }\n    }\n\n    setStickyTop() {\n        const { sticky_top, sticky_top_mobile } = this.props.copywriting\n\n        this.querySelector('.nb-informative-stripe').style.top = `${\n            viewportHelper.is.mobile || viewportHelper.is.tablet ? sticky_top_mobile : sticky_top\n        }px`\n    }\n\n    setStaticPLPBelow() {\n        const plp = document.querySelector('nb-informative-stripe + nb-plp')\n        if (plp) {\n            const previousPLP = plp.previousElementSibling\n            if (previousPLP) {\n                const informativeStripe = previousPLP.querySelector('.nb-informative-stripe')\n                if (informativeStripe) {\n                    informativeStripe.classList.add('nb-has-plp-below')\n                }\n            }\n        }\n    }\n\n    isAppBannerAvailable() {\n        const appBanner = document.querySelector('nb-app-banner')\n        if (!appBanner) {\n            return false\n        }\n\n        return appBanner.style.display !== 'none'\n    }\n\n    observeAppBanner() {\n        const appBanner = document.querySelector('nb-app-banner')\n        const stickyInformativeStripe = document.querySelectorAll(\n            'nb-informative-stripe .nb-is-sticky'\n        )[0] // Sticky only first match\n\n        if (appBanner && stickyInformativeStripe) {\n            const observer = new MutationObserver(function (mutations) {\n                const el = document.querySelector('.is-plp-nav-positioned')\n                mutations.forEach(function (mutation) {\n                    if (mutation.type === 'attributes') {\n                        stickyInformativeStripe.style.removeProperty('top')\n\n                        if (el) {\n                            const navigationProps = el.getBoundingClientRect()\n                            const navigationBottom = navigationProps.bottom\n\n                            stickyInformativeStripe.style.top = `${navigationBottom}px`\n                        }\n                    }\n                })\n            })\n\n            observer.observe(appBanner, {\n                attributes: true,\n                childList: true,\n                subtree: true\n            })\n        }\n    }\n\n    getTextSize() {\n        const { style, secondary_substyle } = this.props.copywriting\n\n        if (style === 'secondary') {\n            if (secondary_substyle === 'large') {\n                if (!viewportHelper.is.mobile) {\n                    return `t-md-700-sl`\n                }\n                return `t-sm-700-sl`\n            } else if (secondary_substyle === 'medium') {\n                if (!viewportHelper.is.mobile) {\n                    return `t-md-400-sl`\n                }\n                return `t-sm-400-sl`\n            } else {\n                return `t-sm-400-sl`\n            }\n        } else if (style === 'tertiary') {\n            return `t-sm-400`\n        } else {\n            if (!viewportHelper.is.mobile) {\n                return `t-xs-500-sl`\n            }\n            return `t-2xs-500-sl`\n        }\n    }\n\n    getInformativeStripeCSSClasses(style, secondary_substyle = 'medium') {\n        const { background_color } = this.props.layout\n\n        if (style === 'primary' && background_color) {\n            return `nb-informative-stripe--color-${background_color}`\n        }\n\n        if (style === 'secondary') {\n            return `nb-informative-stripe--secondary nb-informative-stripe--secondary--${secondary_substyle}`\n        }\n\n        if (style === 'tertiary') {\n            return `nb-informative-stripe--tertiary`\n        }\n\n        return ''\n    }\n\n    renderIcon(style) {\n        const { icon_left } = this.props.copywriting.description\n\n        if (!icon_left || style === 'tertiary') {\n            return ''\n        }\n\n        return `\n            <span><nb-icon icon=\"${icon_left}\"></nb-icon></span>\n        `\n    }\n\n    renderDescription() {\n        const { label } = this.props.copywriting.description\n        return label ? `<span>${label}</span>` : ''\n    }\n\n    renderLink() {\n        const { style, link, popin } = this.props.copywriting\n        const { background_color } = this.props.layout\n        const { id, name, position, creative } = this.props.campaign\n        let linkContent = ''\n\n        if (!link.label) {\n            return linkContent\n        }\n\n        if (link.is_tooltip === 'true') {\n            linkContent = `\n                <nb-tooltip\n                    content=\"${link.label}\"\n                    position=\"top\"\n                    alignment=\"${!viewportHelper.is.mobile ? 'center' : 'right'}\"\n                    class=\"${!viewportHelper.is.mobile ? 't-xs-500-sl' : 't-2xs-500-sl'}\">\n                </nb-tooltip>\n            `\n        }\n\n        if ((viewportHelper.is.mobile || viewportHelper.is.tablet) && style === 'secondary') {\n            linkContent = `\n                <nb-link\n                    seo_label=\"${link.seo_label}\"\n                    campaign_id=\"${id}\"\n                    link_new_tab=\"${link.target_blank}\"\n                    campaign_name=\"${name}\"\n                    campaign_position=\"${position}\"\n                    campaign_creative=\"${creative}\"\n                    ${link.has_popin === 'true' ? `popin_id=\"${popin.id}\"` : `link=\"${link.link}\"`}\n                    size=\"small\"\n                    color=\"black\"\n                    class=\"${this.getTextSize()}\"\n                >\n                <nb-icon icon=\"24/symbol/chevron-right\"></nb-icon></nb-link>\n            `\n        }\n\n        if (style !== 'tertiary') {\n            linkContent = `\n                <nb-link\n                    ${link.has_popin === 'true' ? `popin_id=\"${popin.id}\"` : `link=\"${link.link}\"`}\n                    link_new_tab=\"${link.target_blank}\"\n                    seo_label=\"${link.seo_label}\"\n                    campaign_id=\"${id}\"\n                    campaign_name=\"${name}\"\n                    campaign_position=\"${position}\"\n                    campaign_creative=\"${creative}\"\n                    size=\"${style === 'secondary' ? 'large' : 'small'}\"\n                    color=\"${\n                        style === 'primary'\n                            ? background_color === 'highlight_250'\n                                ? 'black'\n                                : 'white'\n                            : 'gold'\n                    }\"\n                    class=\"${this.getTextSize()}\"\n                >${link.label}</nb-link>\n            `\n        }\n\n        return linkContent ? `<span>${linkContent}</span>` : ''\n    }\n\n    renderPopin() {\n        const { copywriting: { popin = {} } = {} } = this.props\n        const {\n            id = '',\n            image = '',\n            heading = '',\n            description = '',\n            image_alt = '',\n            close = ''\n        } = popin\n\n        return (\n            id &&\n            `<nb-popin\n                id=\"${id}\"\n                heading=\"${heading}\"\n                variation=\"next\"\n                bgcolor=\"highlight\"\n                label_close=\"${close}\"\n                image=\"${image}\"\n                image_alt=\"${image_alt}\"\n            >\n                ${description}\n            </nb-popin>`\n        )\n    }\n\n    onDestroy() {\n        window.removeEventListener('resize', this.debouncedSetStickyTop)\n    }\n}\n\ncustomElements.get('nb-informative-stripe') ||\n    customElements.define('nb-informative-stripe', InformativeStripe)\n\nexport default InformativeStripe\n","\n\ntype Options = {\n    timeout: number;\n}\n/**\n * @throws {Error} if there is no match for {@link selector} under {@link targetNode} after {@link Options.timeout}\n */\nexport async function waitForSelector(\n    selector: string,\n    targetNode = document.body as Element,\n    options: Options = { timeout: 10000 }\n): Promise<Element>{\n    const initiallyPresentElement = targetNode.querySelector(selector)\n    if (initiallyPresentElement) {\n        return initiallyPresentElement\n    }\n    let observer: MutationObserver;\n    return new Promise<Element>((resolve, reject) => {\n        observer = new MutationObserver(() => {\n            const awaitedElement = targetNode.querySelector(selector)\n            if (!awaitedElement) {\n                return\n            }\n            resolve(awaitedElement)\n        })\n        observer.observe(targetNode, { attributes: true, childList: true, subtree: true })\n        setTimeout(() => {\n            const awaitedElement = targetNode.querySelector<Element>(selector)\n            if (!awaitedElement) {\n                console.info(`Could not find ${selector} in ${options.timeout}ms`)\n                // reject(new Error(`Could not find ${selector} in ${options.timeout}ms`))\n                return\n            }\n            resolve(awaitedElement)\n        }, options.timeout)\n    }).finally(() => observer?.disconnect())\n}\n"],"names":["NespressoElement","HTMLElement","constructor","this","template","connectedCallback","props","_createProps","onStart","loadTemplate","onReady","forceAttributes","attributes","reduce","all","attr","nodeName","nodeValue","data","find","attribute","getData","JSON","parse","error","console","log","render","force","innerHTML","_diff","elem","_getNodeType","node","nodeType","tagName","toLowerCase","_getNodeContent","childNodes","length","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","customElements","get","define","BREAKPOINT_TABLET","helper","is","innerWidth","vw","devicePixelRatio","window","mobile","mobile_tablet","tablet","desktop","retina","lt","ref","InformativeStripe","super","boundSetStickyTop","setStickyTop","bind","debouncedSetStickyTop","debounce","func","time","timer","event","clearTimeout","setTimeout","campaign","style","secondary_substyle","link","is_sticky","sticky_top","sticky_top_mobile","copywriting","renderedLink","renderLink","renderedDesc","renderDescription","getInformativeStripeCSSClasses","id","name","position","creative","renderIcon","getTextSize","has_popin","renderPopin","async","selector","targetNode","options","timeout","initiallyPresentElement","querySelector","observer","Promise","resolve","reject","MutationObserver","awaitedElement","observe","childList","subtree","info","finally","disconnect","waitForSelector","then","setStaticPLPBelow","observeAppBanner","addEventListener","top","viewportHelper","plp","previousPLP","previousElementSibling","informativeStripe","classList","add","isAppBannerAvailable","appBanner","display","stickyInformativeStripe","querySelectorAll","mutations","el","mutation","type","removeProperty","navigationBottom","getBoundingClientRect","bottom","background_color","layout","icon_left","description","label","popin","linkContent","is_tooltip","seo_label","target_blank","image","heading","image_alt","close","removeEventListener"],"mappings":"AAAO,MAAMA,UAAyBC,YAClCC,WAAAA,WAEIC,KAAKC,SAAW,EACpB,CAEAC,iBAAAA,GACSC,KAAAA,MAAQH,KAAKI,eAClBJ,KAAKK,YACLL,KAAKM,eACLN,KAAKO,WACT,CAOAH,YAAAA,CAAaI,EAAkB,MA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