{"version":3,"file":"../login-card.js","names":["loginActivate","iframeId","currentIframe","document","getElementById","currentCard","closest","querySelector","parentElement","classList","add","currentIFrameHeight","window","addEventListener","event","eventName","data","payload","height","forgotPassword","loginIframe","passwordButton","loginCulture","value","src","style","visibility","cancelLogin","successfulLogin","userId","searchParams","URLSearchParams","location","search","set","toString","accountId","googleDataLayer","userLogin","reload","querySelectorAll","forEach","loginCard","forgotPasswordButton"],"sources":["modules/animation.js","modules/cookie.js"],"sourcesContent":["// Add loaded class to body\r\nvar ageGateElement = document.getElementById(\"ageGate\");\r\n\r\nif (!ageGateElement) {\r\n    window.addEventListener('load', function () {\r\n        document.querySelector('body').classList.add('body--loaded')\r\n    });\r\n\r\n}\r\n\r\n// Header\r\ndocument.addEventListener('DOMContentLoaded', function () {\r\n    let header = document.querySelector('.header');\r\n    let isScrolling;\r\n    let lastScroll = 0;\r\n\r\n    window.addEventListener('scroll', function () {\r\n        window.clearTimeout(isScrolling);\r\n        const currentScroll = window.scrollY;\r\n\r\n        if (window.scrollY < 120) {\r\n            header.classList.remove('header--hide');\r\n        } else {\r\n            isScrolling = setTimeout(function () {\r\n                if (currentScroll > lastScroll) {\r\n                    // show if scroll down\r\n                    header.classList.add('header--hide');\r\n                } else {\r\n                    // hide if scroll up\r\n                    header.classList.remove('header--hide');\r\n                }\r\n                lastScroll = currentScroll;\r\n            }, 25);\r\n        }\r\n\r\n    });\r\n\r\n\r\n    var productDetailHero = document.querySelector('.productDetail');\r\n    if (productDetailHero) {\r\n        productDetailHero.classList.add('section--visible');\r\n    }\r\n\r\n});\r\n\r\n\r\n// Sections\r\nfunction isNearTop(element, offset = 200) {\r\n    var rect = element.getBoundingClientRect();\r\n    return rect.top <= (window.innerHeight || document.documentElement.clientHeight) - offset;\r\n}\r\n\r\nfunction handleLayoutItems() {\r\n    var layoutItems = document.querySelectorAll('.umb-block-grid__layout-item, .divider--products, .divider--template');\r\n    if (layoutItems) {\r\n        layoutItems.forEach(function (el) {\r\n            if (isNearTop(el, 200)) {\r\n                el.classList.add('section--visible');\r\n            }\r\n        });\r\n    }\r\n\r\n    var productContainers = document.querySelectorAll('.container--products');\r\n    if (productContainers) {\r\n        productContainers.forEach((productContainer) => {\r\n            var items = productContainer.querySelectorAll('.products__item');\r\n            items.forEach(function (el) {\r\n                if (isNearTop(el, 200)) {\r\n                    el.classList.add('item--visible');\r\n                }\r\n            });\r\n        });\r\n    }\r\n\r\n}\r\n\r\nwindow.addEventListener(\"scroll\", handleLayoutItems);\r\nwindow.addEventListener(\"load\", handleLayoutItems);\r\n\r\n\r\n","/*! \r\n * js-cookie v3.0.1 | MIT\r\n * https://github.com/js-cookie/js-cookie/releases\r\n */\r\n;\r\n(function (global, factory) {\r\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n        typeof define === 'function' && define.amd ? define(factory) :\r\n            (global = global || self, (function () {\r\n                var current = global.Cookies;\r\n                var exports = global.Cookies = factory();\r\n                exports.noConflict = function () { global.Cookies = current; return exports; };\r\n            }()));\r\n}(this, (function () {\r\n    'use strict';\r\n\r\n    /* eslint-disable no-var */\r\n    function assign(target) {\r\n        for (var i = 1; i < arguments.length; i++) {\r\n            var source = arguments[i];\r\n            for (var key in source) {\r\n                target[key] = source[key];\r\n            }\r\n        }\r\n        return target\r\n    }\r\n    /* eslint-enable no-var */\r\n\r\n    /* eslint-disable no-var */\r\n    var defaultConverter = {\r\n        read: function (value) {\r\n            if (value[0] === '\"') {\r\n                value = value.slice(1, -1);\r\n            }\r\n            return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\r\n        },\r\n        write: function (value) {\r\n            return encodeURIComponent(value).replace(\r\n                /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\r\n                decodeURIComponent\r\n            )\r\n        }\r\n    };\r\n    /* eslint-enable no-var */\r\n\r\n    /* eslint-disable no-var */\r\n\r\n    function init(converter, defaultAttributes) {\r\n        function set(key, value, attributes) {\r\n            if (typeof document === 'undefined') {\r\n                return\r\n            }\r\n\r\n            attributes = assign({}, defaultAttributes, attributes);\r\n\r\n            if (typeof attributes.expires === 'number') {\r\n                attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\r\n            }\r\n            if (attributes.expires) {\r\n                attributes.expires = attributes.expires.toUTCString();\r\n            }\r\n\r\n            key = encodeURIComponent(key)\r\n                .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\r\n                .replace(/[()]/g, escape);\r\n\r\n            var stringifiedAttributes = '';\r\n            for (var attributeName in attributes) {\r\n                if (!attributes[attributeName]) {\r\n                    continue\r\n                }\r\n\r\n                stringifiedAttributes += '; ' + attributeName;\r\n\r\n                if (attributes[attributeName] === true) {\r\n                    continue\r\n                }\r\n\r\n                // Considers RFC 6265 section 5.2:\r\n                // ...\r\n                // 3.  If the remaining unparsed-attributes contains a %x3B (\";\")\r\n                //     character:\r\n                // Consume the characters of the unparsed-attributes up to,\r\n                // not including, the first %x3B (\";\") character.\r\n                // ...\r\n                stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\r\n            }\r\n\r\n            return (document.cookie =\r\n                key + '=' + converter.write(value, key) + stringifiedAttributes)\r\n        }\r\n\r\n        function get(key) {\r\n            if (typeof document === 'undefined' || (arguments.length && !key)) {\r\n                return\r\n            }\r\n\r\n            // To prevent the for loop in the first place assign an empty array\r\n            // in case there are no cookies at all.\r\n            var cookies = document.cookie ? document.cookie.split('; ') : [];\r\n            var jar = {};\r\n            for (var i = 0; i < cookies.length; i++) {\r\n                var parts = cookies[i].split('=');\r\n                var value = parts.slice(1).join('=');\r\n\r\n                try {\r\n                    var foundKey = decodeURIComponent(parts[0]);\r\n                    jar[foundKey] = converter.read(value, foundKey);\r\n\r\n                    if (key === foundKey) {\r\n                        break\r\n                    }\r\n                } catch (e) { }\r\n            }\r\n\r\n            return key ? jar[key] : jar\r\n        }\r\n\r\n        return Object.create(\r\n            {\r\n                set: set,\r\n                get: get,\r\n                remove: function (key, attributes) {\r\n                    set(\r\n                        key,\r\n                        '',\r\n                        assign({}, attributes, {\r\n                            expires: -1\r\n                        })\r\n                    );\r\n                },\r\n                withAttributes: function (attributes) {\r\n                    return init(this.converter, assign({}, this.attributes, attributes))\r\n                },\r\n                withConverter: function (converter) {\r\n                    return init(assign({}, this.converter, converter), this.attributes)\r\n                }\r\n            },\r\n            {\r\n                attributes: { value: Object.freeze(defaultAttributes) },\r\n                converter: { value: Object.freeze(converter) }\r\n            }\r\n        )\r\n    }\r\n\r\n    var api = init(defaultConverter, { path: '/' });\r\n    /* eslint-enable no-var */\r\n\r\n    return api;\r\n\r\n})));\r\n"],"mappings":"AA4BA,SAAAA,cAAAC,GACA,IAAAC,EAAAC,SAAAC,eAAAH,GACAI,EAAAH,EAAAI,QAAA,qBACAD,IACAA,EAAAE,cAAA,8BAAAC,cAAAC,UAAAC,IAAA,UACAL,EAAAE,cAAA,yBAAAE,UAAAC,IAAA,UACAL,EAAAE,cAAA,0BAAAE,UAAAC,IAAA,WAEA,IAAAC,EAAA,EAYAC,OAAAC,iBAAA,WAVAC,IACA,MAAAC,EAAAD,GAAAE,MAAAD,UACAE,EAAAH,GAAAE,MAAAC,QACA,eAAAF,GAAAE,GAAAC,SACAP,EAAAM,EAAAC,OAEAhB,EAAAgB,OAAAP,EACA,GAIA,CAEA,SAAAQ,eAAAC,EAAAC,GACAC,aAAAnB,SAAAC,eAAA,gBAAAmB,MACAH,EAAAI,IAAA,wCAAAF,aACAD,EAAAI,MAAAC,WAAA,QACA,CAEA,SAAAC,YAAA1B,GACAqB,aAAAnB,SAAAC,eAAA,gBAAAmB,MACApB,SAAAC,eAAAH,GAAAuB,IAAA,oCAAAF,aACAnB,SAAAC,eAAAH,GAAAK,QAAA,kBAAAC,cAAA,8BAAAkB,MAAAC,WAAA,SACA,CAEA,SAAAE,gBAAAC,GACA,IAAAC,EAAA,IAAAC,gBAAAnB,OAAAoB,SAAAC,QACAH,EAAAI,IAAA,wBACAtB,OAAAoB,SAAAC,OAAAH,EAAAK,WAEA,IAAAC,EAAAP,EAIAO,GACA,oBAAAC,iBACAA,gBAAAC,UAAAF,EALA,WACA,OCrEAJ,SAAAO,QACA,CDFApC,SAAAU,iBAAA,+BACAV,SAAAqC,iBAAA,kBAEAC,SAAAC,IACA,IAAAC,EAAAD,EAAAnC,cAAA,8BACAa,EAAAsB,EAAAnC,cAAA,mBACAoC,EAAA9B,iBAAA,cACAM,eAAAC,EAAAuB,EAAA,IAGA,IAAAhC,EAAA,EAcAC,OAAAC,iBAAA,WAXAC,IACA,MAAAC,EAAAD,GAAAE,MAAAD,UACAE,EAAAH,GAAAE,MAAAC,QACA,eAAAF,GAAAE,GAAAC,SAEAP,EAAAM,EAAAC,OAEAE,EAAAF,OAAAP,EACA,GAGA,GAEA"}