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,GAAM/K,GAAG,+BAAgC03C,GAC7C,GC5REM,GAAiBz2C,EAAQ,MAE/BvyB,SAAS2Y,iBAAiB,oBAAoB,WAC1CqwD,GAAeC,IACfD,GAAez2C,EAAQ,OACvBy2C,GAAeE,GACnB","sources":["webpack://app_custom_jw/../link_secretsauce/cartridges/link_secretsauce_ext/cartridge/client/default/js/product/secretsauce.js","webpack://app_custom_jw/../node_modules/.pnpm/cleave.js@1.6.0/node_modules/cleave.js/dist/cleave-esm.js","webpack://app_custom_jw/../node_modules/.pnpm/hammerjs@2.0.8/node_modules/hammerjs/hammer.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/clientSideValidation.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/components/carousel.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/components/etmc.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/components/imageSlider.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/components/shippingPreference/constants.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/components/shippingPreference/shippingPreferenceHelper.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/constants.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/domUtil.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/product/helper.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/templates.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/util.js","webpack://app_custom_jw/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/checkout/formErrors.js","webpack://app_custom_jw/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/focus.js","webpack://app_custom_jw/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/formValidation.js","webpack://app_custom_jw/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/scrollAnimate.js","webpack://app_custom_jw/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack://app_custom_jw/webpack/bootstrap","webpack://app_custom_jw/webpack/runtime/compat get default export","webpack://app_custom_jw/webpack/runtime/define property getters","webpack://app_custom_jw/webpack/runtime/global","webpack://app_custom_jw/webpack/runtime/hasOwnProperty shorthand","webpack://app_custom_jw/webpack/runtime/make namespace object","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/product/base.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/product/detail.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/giftCard/giftCard.js","webpack://app_custom_jw/./cartridges/app_custom_jw/cartridge/client/default/js/giftCardProductDetail.js"],"sourcesContent":["'use strict';\n\nconst isFitPredictorEnabled = !!document.getElementById('fitPredictorEnabled');\nconst noop = function () { };\n\n/**\n * Native querySelector to find first element in the dom with given selector\n *\n * @param  {string | Object} selector Target selector element.\n * @param  {string | Object} parent  Parent element, if it not provided\n * fallback to document.\n * @return {Object} returns the target as a DOM node\n */\nconst queryFirst = (selector, parent = document) => {\n    if (!parent) return null;\n    return parent.querySelector(selector);\n};\n\n/**\n * Native querySelectorAll to find all the dom element with given selector.\n *\n * @param  {string | Object} selector Target selector element.\n * @param  {string | Object} parent Parent element, if it not provided\n * fallback to document.\n * @return {nodeList | Array} Returns the target as a DOM node.\n */\nconst queryAll = (selector, parent = document) => {\n    if (!parent) return null;\n    return [].slice.call(parent.querySelectorAll(selector), 0);\n};\n\n/**\n * Looks for availability of class or classes in the classList of particular element.\n *\n * @param  {string | Object} el Target  element.\n * @param  {string | Array} val class name or class names as list of arguments.\n * @return {boolean} Returns availability of class in the target element.\n */\nconst hasClass = (el, ...classes) => {\n    const { classList } = el;\n    for (let c = 0, n = classes.length; c < n; c++) {\n        if (!classList.contains(classes[c])) return false;\n    }\n    return true;\n};\n\n/**\n * Wraps a method to set up feature flagging\n * \n * @param  {function} method The method to run\n * @return {function} Returns the method passed in if the feature is enabled, otherwise returns a noop method\n */\nconst featureSwitch = method => (isFitPredictorEnabled && method) || noop;\n\n/**\n * This function sets the site context for Secret Sauce based on the channel type\n */\nfunction siteContext() {\n    const deviceWidth = window.screen.width;\n    let channelValue = 'desktop';\n    if (deviceWidth >= 768 && deviceWidth < 1024) {\n        channelValue = 'tablet';\n    } else if (deviceWidth < 768) {\n        channelValue = 'mobile';\n    }\n    ssp('set', 'site', {\n        layout: channelValue,\n        currency: 'USD',\n        language: 'en',\n        market: 'US',\n        shippingCountry: 'US'\n    });\n}\n\n/**\n * This function sets the customer context for Secret Sauce\n */\nfunction custContext() {\n    const custID = document.getElementById('ssCustomer').value;\n    const email = document.getElementById('ssEmail').value;\n    if (custID && custID !== '') {\n        ssp('set', 'user', {\n            userId: custID,\n            emailHash: email\n        });\n    }\n}\n\n/**\n * This function sets the page context for Secret Sauce based on the product page type\n * @param  {string | Object} bc breadcrumb value.\n * @param  {string | Object} pt  product page type.\n */\nfunction pageContext(pt) {\n    ssp('set', 'page', {\n        type: pt // 'cat', 'pdp', 'pdp-set', 'quickview'\n    });\n}\n\n/**\n * This function retrieves the price of the product from price container for Secret Sauce\n * @param {Object} container product container\n * @param  {string | Object} priceContainerId price container Id.\n * @return {float} returns price\n */\nfunction getPriceFromContainer(priceContainerId, container) {\n    const price = queryFirst(priceContainerId, container);\n    if (price && price.value) {\n        return parseFloat(price.value.replace('$', ''));\n    }\n    return 0.0;\n}\n\n/**\n * This function retrieves the standard price of the product for Secret Sauce\n * @param {Object} container product continer\n * @return {float} returns standard price\n */\nfunction getPrice(container) {\n    return getPriceFromContainer('.ssPrice', container);\n}\n\n/**\n * This function sets the standard price of the product for Secret Sauce\n * @param {float} newPrice standard price\n * @param {Object} container product container\n */\nfunction setPrice(newPrice, container) {\n    const priceElement = queryFirst('.ssPrice', container);\n    if (priceElement) {\n        priceElement.value = newPrice;\n    }\n}\n\n/**\n * This function retrieves the sale price of the product for Secret Sauce\n * @param {Object} container product container\n * @return {float} returns sale price\n */\nfunction getSalePrice(container) {\n    return getPriceFromContainer('.ssSalesPrice', container);\n}\n\n/**\n * This function sets the sale price of the product for Secret Sauce\n * @param {float} newSalePrice sale price\n * @param {Object} container product container\n */\nfunction setSalePrice(newSalePrice, container) {\n    const salesPriceElement = queryFirst('.ssSalesPrice', container);\n    if (salesPriceElement) {\n        salesPriceElement.value = newSalePrice;\n    }\n}\n\n/**\n * This function retrieves the selected color of the product for Secret Sauce\n * @param {Object} container product container\n * @return {string} returns selected product color\n */\nfunction getSelectedColor(container) {\n    const colorElement = queryFirst('.ssColor', container);\n    return (colorElement && colorElement.value) ? colorElement.value.replace(/\\s*\\n\\s*/g, '') : 'unknown';\n}\n\n/**\n * This function sets the selected color of the product for Secret Sauce\n * @param {string} newColor selected product color\n * @param {Object} container product container\n */\nfunction setSelectedColor(newColor, container) {\n    const colorElement = queryFirst('.ssColor', container);\n    if (colorElement) {\n        colorElement.value = newColor;\n    }\n}\n\n/**\n * This function retrieves the selected size of the product for Secret Sauce\n * @param {Object} container product container\n * @return {string} returns selected product size\n */\nfunction getSelectedSize(container) {\n    const sizeElement = queryFirst('.ssSize', container);\n    return (sizeElement && sizeElement.value != 'unknown') ? sizeElement.value : '';\n}\n\n/**\n * This function sets the selected size of the product for Secret Sauce\n * @param {string} newSize selected product size\n * @param {Object} container product container\n */\nfunction setSelectedSize(newSize, container) {\n    const sizeElement = queryFirst('.ssSize', container);\n    if (sizeElement) {\n        sizeElement.value = newSize;\n    }\n}\n\n/**\n * This function updates product data for Secret Sauce\n * @param {string} color selected product color\n * @param {string} size selected product size\n * @param {float} price selected product standard price\n * @param {float} salePrice selected product sale price\n * @param {Object} container product container\n */\nfunction updateProductData(color, size, price, salePrice, container) {\n    if (getSelectedColor(container) !== color) setSelectedColor(color, container);\n    if (getSelectedSize(container) !== size) setSelectedSize(size, container);\n    if (getPrice(container) !== price) setPrice(price, container);\n    if (getSalePrice(container) !== salePrice) setSalePrice(salePrice, container);\n}\n\n/**\n * This function retrieves the available sizes for the product swatch selected\n * @param {Object} container product container\n * @return {Array} returns sizes list of the product\n */\nfunction getSizes(container) {\n    let sizeArray = [];\n    if (hasClass(container, 'pdp-container')) {\n        queryAll('.scrollable-product-item .size-container .size-list .size-btn', container).forEach((element) => {\n            const size = element.dataset.attrValue;\n            if (size !== '' && size !== undefined) {\n                sizeArray.push(size);\n            }\n        });\n       \n    } else  {\n        queryAll('.size-container .size-list .size-btn', container).forEach((element) => {\n            const size = element.dataset.attrValue;\n            if (size !== '' && size !== undefined) {\n                sizeArray.push(size);\n            }\n        });\n    }\n  \n    return sizeArray;\n}\n\n/**\n * This function retrieves the variant ID of the selected product\n * @return {string} returns product ID\n */\nfunction getVariant() {\n    return $('.product-detail').attr('data-masterid');\n}\n\n/**\n * This function enables the Fit Predictor link from Secret Sauce\n */\nfunction startFP() {\n    ssp('start', 'fitpredictor');\n}\n\n/**\n * This function enables the Style Finder link from Secret Sauce\n */\nfunction startSF() {\n    ssp('show', 'stylefinder');\n}\n\n/**\n * This function enables the Outfit Maker link from Secret Sauce\n */\nfunction startOM() {\n    ssp('show', 'outfitmaker');\n}\n\n/**\n * This function retrieves the available sizes that are in stock for the product swatch selected\n * @param {Object} container product container\n * @return {Array} returns sizes list of the product\n */\nfunction getAvailableSizes(container) {\n    let sizeArray = [];\n    if (hasClass(container, 'pdp-container')) {\n        queryAll('.scrollable-product-item .size-container .size-list .size-btn', container).forEach((element) => {\n            let size = element.dataset.attrValue;\n            if (size !== '') {\n                if (!hasClass(element, 'not-available')) {\n                    sizeArray.push(size);\n                }\n            }\n        }); \n    } else {\n        queryAll('.size-container .size-list .size-btn', container).forEach((element) => {\n            let size = element.dataset.attrValue;\n            if (size !== '') {\n                if (!hasClass(element, 'not-available')) {\n                    sizeArray.push(size);\n                }\n            }\n        });\n    }\n    return sizeArray;\n}\n\n\n/**\n * This function extracts the selected Fit\n */\nfunction getFitName() {\n    const selectedFitElement = document.querySelector('.non-color-container .non-color-list.fitsize-swatches .fit-product-type.selected');\n    let fitName = '';\n    if (selectedFitElement && selectedFitElement.hasAttribute('data-fitsizeswatch-name')) {\n        const fitSwatchName = selectedFitElement.getAttribute('data-fitsizeswatch-name');\n        // Get the data attribute value\n        if (fitSwatchName === 'Standard') {\n            fitName = 'regular';\n        } else if (fitSwatchName === 'Plus') {\n            fitName = 'plus';\n        } else if (fitSwatchName === 'Petite') {\n            fitName = 'petite';\n        }\n    }\n    return fitName;\n}\n\n/**\n * This function updates the product context for Secret Sauce\n * @param {Object} $container product container\n * @param {string} context secret sauce initiation context\n */\nfunction updateProductSetData($container, context) {\n    if ($container && $container.length > 0) {\n        let sizes = [];\n        let availableSizes = [];\n        $container.find('.scrollable-product-item .size-container .size-list .size-btn').each(function () {\n            let size = $(this).attr('data-attr-value');\n            if (size && size !== '') {\n                sizes.push(size);\n                if (!$(this).hasClass('not-available')) {\n                    availableSizes.push(size);\n                }\n            }\n        });\n        const productId = $container.data('masterid').toString();\n        const price = $container.find('.ssPrice').first().val();\n        const salePrice = $container.find('.ssSalesPrice').first().val();\n        const color = $container.find('.ssColor').first().val();\n        const size = $container.find('.ssSize').first().val();\n        const selectedFitName = getFitName();\n        ssp('set', 'product', {\n            productId,\n            sizeType: selectedFitName,\n            price,\n            salePrice,\n            color,\n            sizes: sizes,\n            availableSizes: availableSizes,\n            size\n        });\n        if (context && context === 'variationUpdate') {\n            startFP();\n        }\n    }\n}\n\n\n/**\n * This function sets the product context for Secret Sauce\n * @param {string} context secret sauce initiation context\n */\nfunction productContext(context, container) {\n    // skip call for gift cards\n    const $giftCardAmount = $('input[name=\"giftcert_amount\"]');\n    if ($giftCardAmount && $giftCardAmount.length > 0) {\n        // If we are on gift card, do not fire secretsauce\n        return;\n    }\n\n    const isMaster = 'true';\n    const selectedFitName = getFitName();\n    if (context === 'load') {\n        const pid = container[0].dataset.masterid;\n        const price = getPrice(container[0]);\n        const salePrice = getSalePrice(container[0]);\n        let useSale = true;\n        if (price === salePrice) {\n            useSale = false;\n        }\n        if (container[0].closest('.set-items')) {\n            $('.set-items .product-detail.product-wrapper').each(function () {\n                let $container = $(this);\n                updateProductSetData($container, context);\n            });\n            return;\n        }\n\n        if (isMaster === 'true') {\n            if (useSale) {\n                ssp('set', 'product', {\n                    productId: pid,\n                    sizeType: selectedFitName,\n                    price,\n                    salePrice,\n                    color: getSelectedColor(container[0]),\n                    sizes: getSizes(container[0]),\n                    availableSizes: getAvailableSizes(container[0])\n                });\n            } else {\n                ssp('set', 'product', {\n                    productId: pid,\n                    sizeType: selectedFitName,\n                    price,\n                    color: getSelectedColor(container[0]),\n                    sizes: getSizes(container[0]),\n                    availableSizes: getAvailableSizes(container[0])\n                });\n            }\n        } else if (useSale) {\n            ssp('set', 'product', {\n                productId: $('#ssMasterPID').val(),\n                variantId: getVariant(),\n                sizeType: selectedFitName,\n                price,\n                salePrice,\n                color: getSelectedColor(container[0]),\n                sizes: getSizes(container[0]),\n                availableSizes: getAvailableSizes(container[0]),\n                size: getSelectedSize(container[0])\n            });\n        } else {\n            ssp('set', 'product', {\n                productId: $('#ssMasterPID').val(),\n                variantId: getVariant(),\n                sizeType: selectedFitName,\n                price,\n                color: getSelectedColor(container[0]),\n                sizes: getSizes(container[0]),\n                availableSizes: getAvailableSizes(container[0]),\n                size: getSelectedSize(container[0])\n            });\n        }\n    }\n    if (context === 'color') {\n        const pid = container.dataset.masterid;\n        const price = getPrice(container);\n        const salePrice = getSalePrice(container);\n        let useSale = true;\n        if (price === salePrice) {\n            useSale = false;\n        }\n        if (isMaster === 'true') {\n            if (useSale) {\n                ssp('set', 'product', {\n                    productId: pid,\n                    color: getSelectedColor(container),\n                    sizes: getSizes(container),\n                    sizeType: selectedFitName,\n                    availableSizes: getAvailableSizes(container),\n                    price,\n                    salePrice\n                });\n            } else {\n                ssp('set', 'product', {\n                    productId: pid,\n                    color: getSelectedColor(container),\n                    sizes: getSizes(container),\n                    sizeType: selectedFitName,\n                    availableSizes: getAvailableSizes(container),\n                    price\n                });\n            }\n        } else if (useSale) {\n            ssp('set', 'product', {\n                productId: $('#ssMasterPID').val(),\n                variantId: getVariant(),\n                color: getSelectedColor(container),\n                sizes: getSizes(container),\n                availableSizes: getAvailableSizes(container),\n                price,\n                salePrice\n            });\n        } else {\n            ssp('set', 'product', {\n                productId: $('#ssMasterPID').val(),\n                variantId: getVariant(),\n                color: getSelectedColor(container),\n                sizes: getSizes(container),\n                availableSizes: getAvailableSizes(container),\n                price\n            });\n        }\n    }\n    if (context === 'size') {\n        const pid = container.dataset.masterid;\n        const price = getPrice(container);\n        if (isMaster === 'true') {\n            ssp('set', 'product', {\n                productId: pid,\n                color: getSelectedColor(container),\n                sizes: getSizes(container),\n                availableSizes: getAvailableSizes(container),\n                size: getSelectedSize(container),\n                price\n            });\n        } else {\n            ssp('set', 'product', {\n                productId: $('#ssMasterPID').val(),\n                variantId: getVariant(),\n                color: getSelectedColor(container),\n                sizes: getSizes(container),\n                availableSizes: getAvailableSizes(container),\n                size: getSelectedSize(container),\n                price\n            });\n        }\n    }\n}\n\n/**\n * This function initiates Secret Sauce based on product's color change\n * @param {Object} container product container\n */\nfunction handleColor(container) {\n    const attribute = queryFirst('.ssColor', container);\n    if (attribute && attribute.value !== null || 'unknown') {\n        productContext('color', container);\n    }\n}\n\n/**\n * This function initiates Secret Sauce based on product's size change\n * @param {Object} container product container\n */\nfunction handleSize(container) {\n    const attribute = queryFirst('.ssSize', container);\n    if (attribute && attribute.value !== 'unknown' || null) {\n        productContext('size', container);\n    }\n}\n\n/**\n * This function returns page bread crumb\n * @return {string} returns page bread crumb\n */\nfunction getCrumbs() {\n    let crumb = '';\n    $('.breadcrumb .breadcrumb-item').each(function () {\n        if (crumb === '') {\n            crumb = $(this).html;\n        } else {\n            crumb = crumb + ' > ' + $(this).html;\n        }\n    });\n    return crumb;\n}\n\n/**\n * This function fires at the beginning\n * To prevent looping of the change event, which fires an ajax call which reloads everything, then concludes\n * with calling the predictor again, we need to setup some way to track, hence the use of a trigger.\n * @param {Object} container product container\n */\nfunction prediction(container) {\n    // The subscription seems to only allow itself to be set once.\n    // i.e. future subscription handlers are discarded.\n    // References to container will revert to the initial subscription,\n    // which won't always be what we were looking for.\n    // So I'm attaching the container to the function itself.\n    prediction.container = container;\n\n    ssp('subscribe', 'prediction', function (event) {\n        queryAll('.product-detail.product-wrapper[data-masterid=\"' + event.productId + '\"]').forEach(productContainer => {\n            //check for an instance of the trigger\n            const trigger = productContainer.getAttribute('data-sstrigger-first-time');\n            if (trigger === 'true' && event.service === 'fitpredictor' && event.size) {\n                const sizeOption = $('.size-container .size-list .size-btn[data-attr-value=\"' + event.size + '\"]', productContainer);\n                if (sizeOption) {\n                    sizeOption.trigger('click');\n                }\n                productContainer.setAttribute('data-sstrigger-first-time', 'false');\n                $('body').trigger('fitPredictorSizeSelected', productContainer);\n            }\n        });\n    });\n}\n\n/**\n * This function sets Add to Cart context for Secret Sauce\n * @param {Object} container product container\n * @return {boolean} returns status if or not add to cart context is set for secret sauce\n */\nfunction ssAddToCart(container) {\n    if (ssp) {\n        const { pid, masterid } = container.dataset;\n        ssp('track', 'addVariantToCart', {\n            variantId: pid,\n            productId: masterid,\n            quantity: 1\n        });\n        return true;\n    }\n    return false;\n}\n\n/**\n * This function sets flag for Secret Sauce initiation\n * @param {Object} container product's container\n */\nfunction setupTrigger(container) {\n    container.attr('data-sstrigger-first-time', 'true');\n}\n\n/**\n * This function sets all the context for Secret Sauce initiation and triggers Secret Sauce services\n * @param {Object} container product's container\n */\nfunction initializeDom(container) {\n    siteContext();\n    custContext();\n    let pt = 'pdp';\n    if (container[0].closest('.search-results-container')) {\n        pt = 'cat';\n    } else if (container[0].closest('.product-set-detail')) {\n        pt = 'pdp-set';\n    } else if (hasClass(container[0], 'product-quickview')) {\n        pt = 'quickview';\n    }\n    pageContext(pt);\n    productContext('load', container);\n    startFP();\n    setupTrigger(container);\n    prediction(container);\n}\n\n/**\n * This function initiates Secret Sauce\n * @param {Object} container product's container\n */\nfunction sauce(container) {\n    initializeDom(container);\n}\n\nmodule.exports = Object.entries({\n    handleColor,\n    handleSize,\n    prediction,\n    sauce,\n    ssAddToCart,\n    startFP,\n    startOM,\n    startSF,\n    updateProductData,\n    updateProductSetData\n}).reduce((exported, [alias, method]) => {\n    exported[alias] = featureSwitch(method);\n    return exported;\n}, {});\n","var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nvar NumeralFormatter = function (numeralDecimalMark,\n                                 numeralIntegerScale,\n                                 numeralDecimalScale,\n                                 numeralThousandsGroupStyle,\n                                 numeralPositiveOnly,\n                                 stripLeadingZeroes,\n                                 prefix,\n                                 signBeforePrefix,\n                                 tailPrefix,\n                                 delimiter) {\n    var owner = this;\n\n    owner.numeralDecimalMark = numeralDecimalMark || '.';\n    owner.numeralIntegerScale = numeralIntegerScale > 0 ? numeralIntegerScale : 0;\n    owner.numeralDecimalScale = numeralDecimalScale >= 0 ? numeralDecimalScale : 2;\n    owner.numeralThousandsGroupStyle = numeralThousandsGroupStyle || NumeralFormatter.groupStyle.thousand;\n    owner.numeralPositiveOnly = !!numeralPositiveOnly;\n    owner.stripLeadingZeroes = stripLeadingZeroes !== false;\n    owner.prefix = (prefix || prefix === '') ? prefix : '';\n    owner.signBeforePrefix = !!signBeforePrefix;\n    owner.tailPrefix = !!tailPrefix;\n    owner.delimiter = (delimiter || delimiter === '') ? delimiter : ',';\n    owner.delimiterRE = delimiter ? new RegExp('\\\\' + delimiter, 'g') : '';\n};\n\nNumeralFormatter.groupStyle = {\n    thousand: 'thousand',\n    lakh:     'lakh',\n    wan:      'wan',\n    none:     'none'    \n};\n\nNumeralFormatter.prototype = {\n    getRawValue: function (value) {\n        return value.replace(this.delimiterRE, '').replace(this.numeralDecimalMark, '.');\n    },\n\n    format: function (value) {\n        var owner = this, parts, partSign, partSignAndPrefix, partInteger, partDecimal = '';\n\n        // strip alphabet letters\n        value = value.replace(/[A-Za-z]/g, '')\n            // replace the first decimal mark with reserved placeholder\n            .replace(owner.numeralDecimalMark, 'M')\n\n            // strip non numeric letters except minus and \"M\"\n            // this is to ensure prefix has been stripped\n            .replace(/[^\\dM-]/g, '')\n\n            // replace the leading minus with reserved placeholder\n            .replace(/^\\-/, 'N')\n\n            // strip the other minus sign (if present)\n            .replace(/\\-/g, '')\n\n            // replace the minus sign (if present)\n            .replace('N', owner.numeralPositiveOnly ? '' : '-')\n\n            // replace decimal mark\n            .replace('M', owner.numeralDecimalMark);\n\n        // strip any leading zeros\n        if (owner.stripLeadingZeroes) {\n            value = value.replace(/^(-)?0+(?=\\d)/, '$1');\n        }\n\n        partSign = value.slice(0, 1) === '-' ? '-' : '';\n        if (typeof owner.prefix != 'undefined') {\n            if (owner.signBeforePrefix) {\n                partSignAndPrefix = partSign + owner.prefix;\n            } else {\n                partSignAndPrefix = owner.prefix + partSign;\n            }\n        } else {\n            partSignAndPrefix = partSign;\n        }\n        \n        partInteger = value;\n\n        if (value.indexOf(owner.numeralDecimalMark) >= 0) {\n            parts = value.split(owner.numeralDecimalMark);\n            partInteger = parts[0];\n            partDecimal = owner.numeralDecimalMark + parts[1].slice(0, owner.numeralDecimalScale);\n        }\n\n        if(partSign === '-') {\n            partInteger = partInteger.slice(1);\n        }\n\n        if (owner.numeralIntegerScale > 0) {\n          partInteger = partInteger.slice(0, owner.numeralIntegerScale);\n        }\n\n        switch (owner.numeralThousandsGroupStyle) {\n        case NumeralFormatter.groupStyle.lakh:\n            partInteger = partInteger.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1' + owner.delimiter);\n\n            break;\n\n        case NumeralFormatter.groupStyle.wan:\n            partInteger = partInteger.replace(/(\\d)(?=(\\d{4})+$)/g, '$1' + owner.delimiter);\n\n            break;\n\n        case NumeralFormatter.groupStyle.thousand:\n            partInteger = partInteger.replace(/(\\d)(?=(\\d{3})+$)/g, '$1' + owner.delimiter);\n\n            break;\n        }\n\n        if (owner.tailPrefix) {\n            return partSign + partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '') + owner.prefix;\n        }\n\n        return partSignAndPrefix + partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '');\n    }\n};\n\nvar NumeralFormatter_1 = NumeralFormatter;\n\nvar DateFormatter = function (datePattern, dateMin, dateMax) {\n    var owner = this;\n\n    owner.date = [];\n    owner.blocks = [];\n    owner.datePattern = datePattern;\n    owner.dateMin = dateMin\n      .split('-')\n      .reverse()\n      .map(function(x) {\n        return parseInt(x, 10);\n      });\n    if (owner.dateMin.length === 2) owner.dateMin.unshift(0);\n\n    owner.dateMax = dateMax\n      .split('-')\n      .reverse()\n      .map(function(x) {\n        return parseInt(x, 10);\n      });\n    if (owner.dateMax.length === 2) owner.dateMax.unshift(0);\n    \n    owner.initBlocks();\n};\n\nDateFormatter.prototype = {\n    initBlocks: function () {\n        var owner = this;\n        owner.datePattern.forEach(function (value) {\n            if (value === 'Y') {\n                owner.blocks.push(4);\n            } else {\n                owner.blocks.push(2);\n            }\n        });\n    },\n\n    getISOFormatDate: function () {\n        var owner = this,\n            date = owner.date;\n\n        return date[2] ? (\n            date[2] + '-' + owner.addLeadingZero(date[1]) + '-' + owner.addLeadingZero(date[0])\n        ) : '';\n    },\n\n    getBlocks: function () {\n        return this.blocks;\n    },\n\n    getValidatedDate: function (value) {\n        var owner = this, result = '';\n\n        value = value.replace(/[^\\d]/g, '');\n\n        owner.blocks.forEach(function (length, index) {\n            if (value.length > 0) {\n                var sub = value.slice(0, length),\n                    sub0 = sub.slice(0, 1),\n                    rest = value.slice(length);\n\n                switch (owner.datePattern[index]) {\n                case 'd':\n                    if (sub === '00') {\n                        sub = '01';\n                    } else if (parseInt(sub0, 10) > 3) {\n                        sub = '0' + sub0;\n                    } else if (parseInt(sub, 10) > 31) {\n                        sub = '31';\n                    }\n\n                    break;\n\n                case 'm':\n                    if (sub === '00') {\n                        sub = '01';\n                    } else if (parseInt(sub0, 10) > 1) {\n                        sub = '0' + sub0;\n                    } else if (parseInt(sub, 10) > 12) {\n                        sub = '12';\n                    }\n\n                    break;\n                }\n\n                result += sub;\n\n                // update remaining string\n                value = rest;\n            }\n        });\n\n        return this.getFixedDateString(result);\n    },\n\n    getFixedDateString: function (value) {\n        var owner = this, datePattern = owner.datePattern, date = [],\n            dayIndex = 0, monthIndex = 0, yearIndex = 0,\n            dayStartIndex = 0, monthStartIndex = 0, yearStartIndex = 0,\n            day, month, year, fullYearDone = false;\n\n        // mm-dd || dd-mm\n        if (value.length === 4 && datePattern[0].toLowerCase() !== 'y' && datePattern[1].toLowerCase() !== 'y') {\n            dayStartIndex = datePattern[0] === 'd' ? 0 : 2;\n            monthStartIndex = 2 - dayStartIndex;\n            day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);\n            month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n\n            date = this.getFixedDate(day, month, 0);\n        }\n\n        // yyyy-mm-dd || yyyy-dd-mm || mm-dd-yyyy || dd-mm-yyyy || dd-yyyy-mm || mm-yyyy-dd\n        if (value.length === 8) {\n            datePattern.forEach(function (type, index) {\n                switch (type) {\n                case 'd':\n                    dayIndex = index;\n                    break;\n                case 'm':\n                    monthIndex = index;\n                    break;\n                default:\n                    yearIndex = index;\n                    break;\n                }\n            });\n\n            yearStartIndex = yearIndex * 2;\n            dayStartIndex = (dayIndex <= yearIndex) ? dayIndex * 2 : (dayIndex * 2 + 2);\n            monthStartIndex = (monthIndex <= yearIndex) ? monthIndex * 2 : (monthIndex * 2 + 2);\n\n            day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);\n            month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n            year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);\n\n            fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;\n\n            date = this.getFixedDate(day, month, year);\n        }\n\n        // mm-yy || yy-mm\n        if (value.length === 4 && (datePattern[0] === 'y' || datePattern[1] === 'y')) {\n            monthStartIndex = datePattern[0] === 'm' ? 0 : 2;\n            yearStartIndex = 2 - monthStartIndex;\n            month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n            year = parseInt(value.slice(yearStartIndex, yearStartIndex + 2), 10);\n\n            fullYearDone = value.slice(yearStartIndex, yearStartIndex + 2).length === 2;\n\n            date = [0, month, year];\n        }\n\n        // mm-yyyy || yyyy-mm\n        if (value.length === 6 && (datePattern[0] === 'Y' || datePattern[1] === 'Y')) {\n            monthStartIndex = datePattern[0] === 'm' ? 0 : 4;\n            yearStartIndex = 2 - 0.5 * monthStartIndex;\n            month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);\n            year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);\n\n            fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;\n\n            date = [0, month, year];\n        }\n\n        date = owner.getRangeFixedDate(date);\n        owner.date = date;\n\n        var result = date.length === 0 ? value : datePattern.reduce(function (previous, current) {\n            switch (current) {\n            case 'd':\n                return previous + (date[0] === 0 ? '' : owner.addLeadingZero(date[0]));\n            case 'm':\n                return previous + (date[1] === 0 ? '' : owner.addLeadingZero(date[1]));\n            case 'y':\n                return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2], false) : '');\n            case 'Y':\n                return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2], true) : '');\n            }\n        }, '');\n\n        return result;\n    },\n\n    getRangeFixedDate: function (date) {\n        var owner = this,\n            datePattern = owner.datePattern,\n            dateMin = owner.dateMin || [],\n            dateMax = owner.dateMax || [];\n\n        if (!date.length || (dateMin.length < 3 && dateMax.length < 3)) return date;\n\n        if (\n          datePattern.find(function(x) {\n            return x.toLowerCase() === 'y';\n          }) &&\n          date[2] === 0\n        ) return date;\n\n        if (dateMax.length && (dateMax[2] < date[2] || (\n          dateMax[2] === date[2] && (dateMax[1] < date[1] || (\n            dateMax[1] === date[1] && dateMax[0] < date[0]\n          ))\n        ))) return dateMax;\n\n        if (dateMin.length && (dateMin[2] > date[2] || (\n          dateMin[2] === date[2] && (dateMin[1] > date[1] || (\n            dateMin[1] === date[1] && dateMin[0] > date[0]\n          ))\n        ))) return dateMin;\n\n        return date;\n    },\n\n    getFixedDate: function (day, month, year) {\n        day = Math.min(day, 31);\n        month = Math.min(month, 12);\n        year = parseInt((year || 0), 10);\n\n        if ((month < 7 && month % 2 === 0) || (month > 8 && month % 2 === 1)) {\n            day = Math.min(day, month === 2 ? (this.isLeapYear(year) ? 29 : 28) : 30);\n        }\n\n        return [day, month, year];\n    },\n\n    isLeapYear: function (year) {\n        return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);\n    },\n\n    addLeadingZero: function (number) {\n        return (number < 10 ? '0' : '') + number;\n    },\n\n    addLeadingZeroForYear: function (number, fullYearMode) {\n        if (fullYearMode) {\n            return (number < 10 ? '000' : (number < 100 ? '00' : (number < 1000 ? '0' : ''))) + number;\n        }\n\n        return (number < 10 ? '0' : '') + number;\n    }\n};\n\nvar DateFormatter_1 = DateFormatter;\n\nvar TimeFormatter = function (timePattern, timeFormat) {\n    var owner = this;\n\n    owner.time = [];\n    owner.blocks = [];\n    owner.timePattern = timePattern;\n    owner.timeFormat = timeFormat;\n    owner.initBlocks();\n};\n\nTimeFormatter.prototype = {\n    initBlocks: function () {\n        var owner = this;\n        owner.timePattern.forEach(function () {\n            owner.blocks.push(2);\n        });\n    },\n\n    getISOFormatTime: function () {\n        var owner = this,\n            time = owner.time;\n\n        return time[2] ? (\n            owner.addLeadingZero(time[0]) + ':' + owner.addLeadingZero(time[1]) + ':' + owner.addLeadingZero(time[2])\n        ) : '';\n    },\n\n    getBlocks: function () {\n        return this.blocks;\n    },\n\n    getTimeFormatOptions: function () {\n        var owner = this;\n        if (String(owner.timeFormat) === '12') {\n            return {\n                maxHourFirstDigit: 1,\n                maxHours: 12,\n                maxMinutesFirstDigit: 5,\n                maxMinutes: 60\n            };\n        }\n\n        return {\n            maxHourFirstDigit: 2,\n            maxHours: 23,\n            maxMinutesFirstDigit: 5,\n            maxMinutes: 60\n        };\n    },\n\n    getValidatedTime: function (value) {\n        var owner = this, result = '';\n\n        value = value.replace(/[^\\d]/g, '');\n\n        var timeFormatOptions = owner.getTimeFormatOptions();\n\n        owner.blocks.forEach(function (length, index) {\n            if (value.length > 0) {\n                var sub = value.slice(0, length),\n                    sub0 = sub.slice(0, 1),\n                    rest = value.slice(length);\n\n                switch (owner.timePattern[index]) {\n\n                case 'h':\n                    if (parseInt(sub0, 10) > timeFormatOptions.maxHourFirstDigit) {\n                        sub = '0' + sub0;\n                    } else if (parseInt(sub, 10) > timeFormatOptions.maxHours) {\n                        sub = timeFormatOptions.maxHours + '';\n                    }\n\n                    break;\n\n                case 'm':\n                case 's':\n                    if (parseInt(sub0, 10) > timeFormatOptions.maxMinutesFirstDigit) {\n                        sub = '0' + sub0;\n                    } else if (parseInt(sub, 10) > timeFormatOptions.maxMinutes) {\n                        sub = timeFormatOptions.maxMinutes + '';\n                    }\n                    break;\n                }\n\n                result += sub;\n\n                // update remaining string\n                value = rest;\n            }\n        });\n\n        return this.getFixedTimeString(result);\n    },\n\n    getFixedTimeString: function (value) {\n        var owner = this, timePattern = owner.timePattern, time = [],\n            secondIndex = 0, minuteIndex = 0, hourIndex = 0,\n            secondStartIndex = 0, minuteStartIndex = 0, hourStartIndex = 0,\n            second, minute, hour;\n\n        if (value.length === 6) {\n            timePattern.forEach(function (type, index) {\n                switch (type) {\n                case 's':\n                    secondIndex = index * 2;\n                    break;\n                case 'm':\n                    minuteIndex = index * 2;\n                    break;\n                case 'h':\n                    hourIndex = index * 2;\n                    break;\n                }\n            });\n\n            hourStartIndex = hourIndex;\n            minuteStartIndex = minuteIndex;\n            secondStartIndex = secondIndex;\n\n            second = parseInt(value.slice(secondStartIndex, secondStartIndex + 2), 10);\n            minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10);\n            hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10);\n\n            time = this.getFixedTime(hour, minute, second);\n        }\n\n        if (value.length === 4 && owner.timePattern.indexOf('s') < 0) {\n            timePattern.forEach(function (type, index) {\n                switch (type) {\n                case 'm':\n                    minuteIndex = index * 2;\n                    break;\n                case 'h':\n                    hourIndex = index * 2;\n                    break;\n                }\n            });\n\n            hourStartIndex = hourIndex;\n            minuteStartIndex = minuteIndex;\n\n            second = 0;\n            minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10);\n            hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10);\n\n            time = this.getFixedTime(hour, minute, second);\n        }\n\n        owner.time = time;\n\n        return time.length === 0 ? value : timePattern.reduce(function (previous, current) {\n            switch (current) {\n            case 's':\n                return previous + owner.addLeadingZero(time[2]);\n            case 'm':\n                return previous + owner.addLeadingZero(time[1]);\n            case 'h':\n                return previous + owner.addLeadingZero(time[0]);\n            }\n        }, '');\n    },\n\n    getFixedTime: function (hour, minute, second) {\n        second = Math.min(parseInt(second || 0, 10), 60);\n        minute = Math.min(minute, 60);\n        hour = Math.min(hour, 60);\n\n        return [hour, minute, second];\n    },\n\n    addLeadingZero: function (number) {\n        return (number < 10 ? '0' : '') + number;\n    }\n};\n\nvar TimeFormatter_1 = TimeFormatter;\n\nvar PhoneFormatter = function (formatter, delimiter) {\n    var owner = this;\n\n    owner.delimiter = (delimiter || delimiter === '') ? delimiter : ' ';\n    owner.delimiterRE = delimiter ? new RegExp('\\\\' + delimiter, 'g') : '';\n\n    owner.formatter = formatter;\n};\n\nPhoneFormatter.prototype = {\n    setFormatter: function (formatter) {\n        this.formatter = formatter;\n    },\n\n    format: function (phoneNumber) {\n        var owner = this;\n\n        owner.formatter.clear();\n\n        // only keep number and +\n        phoneNumber = phoneNumber.replace(/[^\\d+]/g, '');\n\n        // strip non-leading +\n        phoneNumber = phoneNumber.replace(/^\\+/, 'B').replace(/\\+/g, '').replace('B', '+');\n\n        // strip delimiter\n        phoneNumber = phoneNumber.replace(owner.delimiterRE, '');\n\n        var result = '', current, validated = false;\n\n        for (var i = 0, iMax = phoneNumber.length; i < iMax; i++) {\n            current = owner.formatter.inputDigit(phoneNumber.charAt(i));\n\n            // has ()- or space inside\n            if (/[\\s()-]/g.test(current)) {\n                result = current;\n\n                validated = true;\n            } else {\n                if (!validated) {\n                    result = current;\n                }\n                // else: over length input\n                // it turns to invalid number again\n            }\n        }\n\n        // strip ()\n        // e.g. US: 7161234567 returns (716) 123-4567\n        result = result.replace(/[()]/g, '');\n        // replace library delimiter with user customized delimiter\n        result = result.replace(/[\\s-]/g, owner.delimiter);\n\n        return result;\n    }\n};\n\nvar PhoneFormatter_1 = PhoneFormatter;\n\nvar CreditCardDetector = {\n    blocks: {\n        uatp:          [4, 5, 6],\n        amex:          [4, 6, 5],\n        diners:        [4, 6, 4],\n        discover:      [4, 4, 4, 4],\n        mastercard:    [4, 4, 4, 4],\n        dankort:       [4, 4, 4, 4],\n        instapayment:  [4, 4, 4, 4],\n        jcb15:         [4, 6, 5],\n        jcb:           [4, 4, 4, 4],\n        maestro:       [4, 4, 4, 4],\n        visa:          [4, 4, 4, 4],\n        mir:           [4, 4, 4, 4],\n        unionPay:      [4, 4, 4, 4],\n        general:       [4, 4, 4, 4]\n    },\n\n    re: {\n        // starts with 1; 15 digits, not starts with 1800 (jcb card)\n        uatp: /^(?!1800)1\\d{0,14}/,\n\n        // starts with 34/37; 15 digits\n        amex: /^3[47]\\d{0,13}/,\n\n        // starts with 6011/65/644-649; 16 digits\n        discover: /^(?:6011|65\\d{0,2}|64[4-9]\\d?)\\d{0,12}/,\n\n        // starts with 300-305/309 or 36/38/39; 14 digits\n        diners: /^3(?:0([0-5]|9)|[689]\\d?)\\d{0,11}/,\n\n        // starts with 51-55/2221–2720; 16 digits\n        mastercard: /^(5[1-5]\\d{0,2}|22[2-9]\\d{0,1}|2[3-7]\\d{0,2})\\d{0,12}/,\n\n        // starts with 5019/4175/4571; 16 digits\n        dankort: /^(5019|4175|4571)\\d{0,12}/,\n\n        // starts with 637-639; 16 digits\n        instapayment: /^63[7-9]\\d{0,13}/,\n\n        // starts with 2131/1800; 15 digits\n        jcb15: /^(?:2131|1800)\\d{0,11}/,\n\n        // starts with 2131/1800/35; 16 digits\n        jcb: /^(?:35\\d{0,2})\\d{0,12}/,\n\n        // starts with 50/56-58/6304/67; 16 digits\n        maestro: /^(?:5[0678]\\d{0,2}|6304|67\\d{0,2})\\d{0,12}/,\n\n        // starts with 22; 16 digits\n        mir: /^220[0-4]\\d{0,12}/,\n\n        // starts with 4; 16 digits\n        visa: /^4\\d{0,15}/,\n\n        // starts with 62/81; 16 digits\n        unionPay: /^(62|81)\\d{0,14}/\n    },\n\n    getStrictBlocks: function (block) {\n      var total = block.reduce(function (prev, current) {\n        return prev + current;\n      }, 0);\n\n      return block.concat(19 - total);\n    },\n\n    getInfo: function (value, strictMode) {\n        var blocks = CreditCardDetector.blocks,\n            re = CreditCardDetector.re;\n\n        // Some credit card can have up to 19 digits number.\n        // Set strictMode to true will remove the 16 max-length restrain,\n        // however, I never found any website validate card number like\n        // this, hence probably you don't want to enable this option.\n        strictMode = !!strictMode;\n\n        for (var key in re) {\n            if (re[key].test(value)) {\n                var matchedBlocks = blocks[key];\n                return {\n                    type: key,\n                    blocks: strictMode ? this.getStrictBlocks(matchedBlocks) : matchedBlocks\n                };\n            }\n        }\n\n        return {\n            type: 'unknown',\n            blocks: strictMode ? this.getStrictBlocks(blocks.general) : blocks.general\n        };\n    }\n};\n\nvar CreditCardDetector_1 = CreditCardDetector;\n\nvar Util = {\n    noop: function () {\n    },\n\n    strip: function (value, re) {\n        return value.replace(re, '');\n    },\n\n    getPostDelimiter: function (value, delimiter, delimiters) {\n        // single delimiter\n        if (delimiters.length === 0) {\n            return value.slice(-delimiter.length) === delimiter ? delimiter : '';\n        }\n\n        // multiple delimiters\n        var matchedDelimiter = '';\n        delimiters.forEach(function (current) {\n            if (value.slice(-current.length) === current) {\n                matchedDelimiter = current;\n            }\n        });\n\n        return matchedDelimiter;\n    },\n\n    getDelimiterREByDelimiter: function (delimiter) {\n        return new RegExp(delimiter.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1'), 'g');\n    },\n\n    getNextCursorPosition: function (prevPos, oldValue, newValue, delimiter, delimiters) {\n      // If cursor was at the end of value, just place it back.\n      // Because new value could contain additional chars.\n      if (oldValue.length === prevPos) {\n          return newValue.length;\n      }\n\n      return prevPos + this.getPositionOffset(prevPos, oldValue, newValue, delimiter ,delimiters);\n    },\n\n    getPositionOffset: function (prevPos, oldValue, newValue, delimiter, delimiters) {\n        var oldRawValue, newRawValue, lengthOffset;\n\n        oldRawValue = this.stripDelimiters(oldValue.slice(0, prevPos), delimiter, delimiters);\n        newRawValue = this.stripDelimiters(newValue.slice(0, prevPos), delimiter, delimiters);\n        lengthOffset = oldRawValue.length - newRawValue.length;\n\n        return (lengthOffset !== 0) ? (lengthOffset / Math.abs(lengthOffset)) : 0;\n    },\n\n    stripDelimiters: function (value, delimiter, delimiters) {\n        var owner = this;\n\n        // single delimiter\n        if (delimiters.length === 0) {\n            var delimiterRE = delimiter ? owner.getDelimiterREByDelimiter(delimiter) : '';\n\n            return value.replace(delimiterRE, '');\n        }\n\n        // multiple delimiters\n        delimiters.forEach(function (current) {\n            current.split('').forEach(function (letter) {\n                value = value.replace(owner.getDelimiterREByDelimiter(letter), '');\n            });\n        });\n\n        return value;\n    },\n\n    headStr: function (str, length) {\n        return str.slice(0, length);\n    },\n\n    getMaxLength: function (blocks) {\n        return blocks.reduce(function (previous, current) {\n            return previous + current;\n        }, 0);\n    },\n\n    // strip prefix\n    // Before type  |   After type    |     Return value\n    // PEFIX-...    |   PEFIX-...     |     ''\n    // PREFIX-123   |   PEFIX-123     |     123\n    // PREFIX-123   |   PREFIX-23     |     23\n    // PREFIX-123   |   PREFIX-1234   |     1234\n    getPrefixStrippedValue: function (value, prefix, prefixLength, prevResult, delimiter, delimiters, noImmediatePrefix, tailPrefix, signBeforePrefix) {\n        // No prefix\n        if (prefixLength === 0) {\n          return value;\n        }\n\n        // Value is prefix\n        if (value === prefix && value !== '') {\n          return '';\n        }\n\n        if (signBeforePrefix && (value.slice(0, 1) == '-')) {\n            var prev = (prevResult.slice(0, 1) == '-') ? prevResult.slice(1) : prevResult;\n            return '-' + this.getPrefixStrippedValue(value.slice(1), prefix, prefixLength, prev, delimiter, delimiters, noImmediatePrefix, tailPrefix, signBeforePrefix);\n        }\n\n        // Pre result prefix string does not match pre-defined prefix\n        if (prevResult.slice(0, prefixLength) !== prefix && !tailPrefix) {\n            // Check if the first time user entered something\n            if (noImmediatePrefix && !prevResult && value) return value;\n            return '';\n        } else if (prevResult.slice(-prefixLength) !== prefix && tailPrefix) {\n            // Check if the first time user entered something\n            if (noImmediatePrefix && !prevResult && value) return value;\n            return '';\n        }\n\n        var prevValue = this.stripDelimiters(prevResult, delimiter, delimiters);\n\n        // New value has issue, someone typed in between prefix letters\n        // Revert to pre value\n        if (value.slice(0, prefixLength) !== prefix && !tailPrefix) {\n            return prevValue.slice(prefixLength);\n        } else if (value.slice(-prefixLength) !== prefix && tailPrefix) {\n            return prevValue.slice(0, -prefixLength - 1);\n        }\n\n        // No issue, strip prefix for new value\n        return tailPrefix ? value.slice(0, -prefixLength) : value.slice(prefixLength);\n    },\n\n    getFirstDiffIndex: function (prev, current) {\n        var index = 0;\n\n        while (prev.charAt(index) === current.charAt(index)) {\n            if (prev.charAt(index++) === '') {\n                return -1;\n            }\n        }\n\n        return index;\n    },\n\n    getFormattedValue: function (value, blocks, blocksLength, delimiter, delimiters, delimiterLazyShow) {\n        var result = '',\n            multipleDelimiters = delimiters.length > 0,\n            currentDelimiter = '';\n\n        // no options, normal input\n        if (blocksLength === 0) {\n            return value;\n        }\n\n        blocks.forEach(function (length, index) {\n            if (value.length > 0) {\n                var sub = value.slice(0, length),\n                    rest = value.slice(length);\n\n                if (multipleDelimiters) {\n                    currentDelimiter = delimiters[delimiterLazyShow ? (index - 1) : index] || currentDelimiter;\n                } else {\n                    currentDelimiter = delimiter;\n                }\n\n                if (delimiterLazyShow) {\n                    if (index > 0) {\n                        result += currentDelimiter;\n                    }\n\n                    result += sub;\n                } else {\n                    result += sub;\n\n                    if (sub.length === length && index < blocksLength - 1) {\n                        result += currentDelimiter;\n                    }\n                }\n\n                // update remaining string\n                value = rest;\n            }\n        });\n\n        return result;\n    },\n\n    // move cursor to the end\n    // the first time user focuses on an input with prefix\n    fixPrefixCursor: function (el, prefix, delimiter, delimiters) {\n        if (!el) {\n            return;\n        }\n\n        var val = el.value,\n            appendix = delimiter || (delimiters[0] || ' ');\n\n        if (!el.setSelectionRange || !prefix || (prefix.length + appendix.length) <= val.length) {\n            return;\n        }\n\n        var len = val.length * 2;\n\n        // set timeout to avoid blink\n        setTimeout(function () {\n            el.setSelectionRange(len, len);\n        }, 1);\n    },\n\n    // Check if input field is fully selected\n    checkFullSelection: function(value) {\n      try {\n        var selection = window.getSelection() || document.getSelection() || {};\n        return selection.toString().length === value.length;\n      } catch (ex) {\n        // Ignore\n      }\n\n      return false;\n    },\n\n    setSelection: function (element, position, doc) {\n        if (element !== this.getActiveElement(doc)) {\n            return;\n        }\n\n        // cursor is already in the end\n        if (element && element.value.length <= position) {\n          return;\n        }\n\n        if (element.createTextRange) {\n            var range = element.createTextRange();\n\n            range.move('character', position);\n            range.select();\n        } else {\n            try {\n                element.setSelectionRange(position, position);\n            } catch (e) {\n                // eslint-disable-next-line\n                console.warn('The input element type does not support selection');\n            }\n        }\n    },\n\n    getActiveElement: function(parent) {\n        var activeElement = parent.activeElement;\n        if (activeElement && activeElement.shadowRoot) {\n            return this.getActiveElement(activeElement.shadowRoot);\n        }\n        return activeElement;\n    },\n\n    isAndroid: function () {\n        return navigator && /android/i.test(navigator.userAgent);\n    },\n\n    // On Android chrome, the keyup and keydown events\n    // always return key code 229 as a composition that\n    // buffers the user’s keystrokes\n    // see https://github.com/nosir/cleave.js/issues/147\n    isAndroidBackspaceKeydown: function (lastInputValue, currentInputValue) {\n        if (!this.isAndroid() || !lastInputValue || !currentInputValue) {\n            return false;\n        }\n\n        return currentInputValue === lastInputValue.slice(0, -1);\n    }\n};\n\nvar Util_1 = Util;\n\n/**\n * Props Assignment\n *\n * Separate this, so react module can share the usage\n */\nvar DefaultProperties = {\n    // Maybe change to object-assign\n    // for now just keep it as simple\n    assign: function (target, opts) {\n        target = target || {};\n        opts = opts || {};\n\n        // credit card\n        target.creditCard = !!opts.creditCard;\n        target.creditCardStrictMode = !!opts.creditCardStrictMode;\n        target.creditCardType = '';\n        target.onCreditCardTypeChanged = opts.onCreditCardTypeChanged || (function () {});\n\n        // phone\n        target.phone = !!opts.phone;\n        target.phoneRegionCode = opts.phoneRegionCode || 'AU';\n        target.phoneFormatter = {};\n\n        // time\n        target.time = !!opts.time;\n        target.timePattern = opts.timePattern || ['h', 'm', 's'];\n        target.timeFormat = opts.timeFormat || '24';\n        target.timeFormatter = {};\n\n        // date\n        target.date = !!opts.date;\n        target.datePattern = opts.datePattern || ['d', 'm', 'Y'];\n        target.dateMin = opts.dateMin || '';\n        target.dateMax = opts.dateMax || '';\n        target.dateFormatter = {};\n\n        // numeral\n        target.numeral = !!opts.numeral;\n        target.numeralIntegerScale = opts.numeralIntegerScale > 0 ? opts.numeralIntegerScale : 0;\n        target.numeralDecimalScale = opts.numeralDecimalScale >= 0 ? opts.numeralDecimalScale : 2;\n        target.numeralDecimalMark = opts.numeralDecimalMark || '.';\n        target.numeralThousandsGroupStyle = opts.numeralThousandsGroupStyle || 'thousand';\n        target.numeralPositiveOnly = !!opts.numeralPositiveOnly;\n        target.stripLeadingZeroes = opts.stripLeadingZeroes !== false;\n        target.signBeforePrefix = !!opts.signBeforePrefix;\n        target.tailPrefix = !!opts.tailPrefix;\n\n        // others\n        target.swapHiddenInput = !!opts.swapHiddenInput;\n        \n        target.numericOnly = target.creditCard || target.date || !!opts.numericOnly;\n\n        target.uppercase = !!opts.uppercase;\n        target.lowercase = !!opts.lowercase;\n\n        target.prefix = (target.creditCard || target.date) ? '' : (opts.prefix || '');\n        target.noImmediatePrefix = !!opts.noImmediatePrefix;\n        target.prefixLength = target.prefix.length;\n        target.rawValueTrimPrefix = !!opts.rawValueTrimPrefix;\n        target.copyDelimiter = !!opts.copyDelimiter;\n\n        target.initValue = (opts.initValue !== undefined && opts.initValue !== null) ? opts.initValue.toString() : '';\n\n        target.delimiter =\n            (opts.delimiter || opts.delimiter === '') ? opts.delimiter :\n                (opts.date ? '/' :\n                    (opts.time ? ':' :\n                        (opts.numeral ? ',' :\n                            (opts.phone ? ' ' :\n                                ' '))));\n        target.delimiterLength = target.delimiter.length;\n        target.delimiterLazyShow = !!opts.delimiterLazyShow;\n        target.delimiters = opts.delimiters || [];\n\n        target.blocks = opts.blocks || [];\n        target.blocksLength = target.blocks.length;\n\n        target.root = (typeof commonjsGlobal === 'object' && commonjsGlobal) ? commonjsGlobal : window;\n        target.document = opts.document || target.root.document;\n\n        target.maxLength = 0;\n\n        target.backspace = false;\n        target.result = '';\n\n        target.onValueChanged = opts.onValueChanged || (function () {});\n\n        return target;\n    }\n};\n\nvar DefaultProperties_1 = DefaultProperties;\n\n/**\n * Construct a new Cleave instance by passing the configuration object\n *\n * @param {String | HTMLElement} element\n * @param {Object} opts\n */\nvar Cleave = function (element, opts) {\n    var owner = this;\n    var hasMultipleElements = false;\n\n    if (typeof element === 'string') {\n        owner.element = document.querySelector(element);\n        hasMultipleElements = document.querySelectorAll(element).length > 1;\n    } else {\n      if (typeof element.length !== 'undefined' && element.length > 0) {\n        owner.element = element[0];\n        hasMultipleElements = element.length > 1;\n      } else {\n        owner.element = element;\n      }\n    }\n\n    if (!owner.element) {\n        throw new Error('[cleave.js] Please check the element');\n    }\n\n    if (hasMultipleElements) {\n      try {\n        // eslint-disable-next-line\n        console.warn('[cleave.js] Multiple input fields matched, cleave.js will only take the first one.');\n      } catch (e) {\n        // Old IE\n      }\n    }\n\n    opts.initValue = owner.element.value;\n\n    owner.properties = Cleave.DefaultProperties.assign({}, opts);\n\n    owner.init();\n};\n\nCleave.prototype = {\n    init: function () {\n        var owner = this, pps = owner.properties;\n\n        // no need to use this lib\n        if (!pps.numeral && !pps.phone && !pps.creditCard && !pps.time && !pps.date && (pps.blocksLength === 0 && !pps.prefix)) {\n            owner.onInput(pps.initValue);\n\n            return;\n        }\n\n        pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n\n        owner.isAndroid = Cleave.Util.isAndroid();\n        owner.lastInputValue = '';\n        owner.isBackward = '';\n\n        owner.onChangeListener = owner.onChange.bind(owner);\n        owner.onKeyDownListener = owner.onKeyDown.bind(owner);\n        owner.onFocusListener = owner.onFocus.bind(owner);\n        owner.onCutListener = owner.onCut.bind(owner);\n        owner.onCopyListener = owner.onCopy.bind(owner);\n\n        owner.initSwapHiddenInput();\n\n        owner.element.addEventListener('input', owner.onChangeListener);\n        owner.element.addEventListener('keydown', owner.onKeyDownListener);\n        owner.element.addEventListener('focus', owner.onFocusListener);\n        owner.element.addEventListener('cut', owner.onCutListener);\n        owner.element.addEventListener('copy', owner.onCopyListener);\n\n\n        owner.initPhoneFormatter();\n        owner.initDateFormatter();\n        owner.initTimeFormatter();\n        owner.initNumeralFormatter();\n\n        // avoid touch input field if value is null\n        // otherwise Firefox will add red box-shadow for <input required />\n        if (pps.initValue || (pps.prefix && !pps.noImmediatePrefix)) {\n            owner.onInput(pps.initValue);\n        }\n    },\n\n    initSwapHiddenInput: function () {\n        var owner = this, pps = owner.properties;\n        if (!pps.swapHiddenInput) return;\n\n        var inputFormatter = owner.element.cloneNode(true);\n        owner.element.parentNode.insertBefore(inputFormatter, owner.element);\n\n        owner.elementSwapHidden = owner.element;\n        owner.elementSwapHidden.type = 'hidden';\n\n        owner.element = inputFormatter;\n        owner.element.id = '';\n    },\n\n    initNumeralFormatter: function () {\n        var owner = this, pps = owner.properties;\n\n        if (!pps.numeral) {\n            return;\n        }\n\n        pps.numeralFormatter = new Cleave.NumeralFormatter(\n            pps.numeralDecimalMark,\n            pps.numeralIntegerScale,\n            pps.numeralDecimalScale,\n            pps.numeralThousandsGroupStyle,\n            pps.numeralPositiveOnly,\n            pps.stripLeadingZeroes,\n            pps.prefix,\n            pps.signBeforePrefix,\n            pps.tailPrefix,\n            pps.delimiter\n        );\n    },\n\n    initTimeFormatter: function() {\n        var owner = this, pps = owner.properties;\n\n        if (!pps.time) {\n            return;\n        }\n\n        pps.timeFormatter = new Cleave.TimeFormatter(pps.timePattern, pps.timeFormat);\n        pps.blocks = pps.timeFormatter.getBlocks();\n        pps.blocksLength = pps.blocks.length;\n        pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n    },\n\n    initDateFormatter: function () {\n        var owner = this, pps = owner.properties;\n\n        if (!pps.date) {\n            return;\n        }\n\n        pps.dateFormatter = new Cleave.DateFormatter(pps.datePattern, pps.dateMin, pps.dateMax);\n        pps.blocks = pps.dateFormatter.getBlocks();\n        pps.blocksLength = pps.blocks.length;\n        pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);\n    },\n\n    initPhoneFormatter: function () {\n        var owner = this, pps = owner.properties;\n\n        if (!pps.phone) {\n            return;\n        }\n\n        // Cleave.AsYouTypeFormatter should be provided by\n        // external google closure lib\n        try {\n            pps.phoneFormatter = new Cleave.PhoneFormatter(\n                new pps.root.Cleave.AsYouTypeFormatter(pps.phoneRegionCode),\n                pps.delimiter\n            );\n        } catch (ex) {\n            throw new Error('[cleave.js] Please include phone-type-formatter.{country}.js lib');\n        }\n    },\n\n    onKeyDown: function (event) {\n        var owner = this,\n            charCode = event.which || event.keyCode;\n\n        owner.lastInputValue = owner.element.value;\n        owner.isBackward = charCode === 8;\n    },\n\n    onChange: function (event) {\n        var owner = this, pps = owner.properties,\n            Util = Cleave.Util;\n\n        owner.isBackward = owner.isBackward || event.inputType === 'deleteContentBackward';\n\n        var postDelimiter = Util.getPostDelimiter(owner.lastInputValue, pps.delimiter, pps.delimiters);\n\n        if (owner.isBackward && postDelimiter) {\n            pps.postDelimiterBackspace = postDelimiter;\n        } else {\n            pps.postDelimiterBackspace = false;\n        }\n\n        this.onInput(this.element.value);\n    },\n\n    onFocus: function () {\n        var owner = this,\n            pps = owner.properties;\n        owner.lastInputValue = owner.element.value;\n\n        if (pps.prefix && pps.noImmediatePrefix && !owner.element.value) {\n            this.onInput(pps.prefix);\n        }\n\n        Cleave.Util.fixPrefixCursor(owner.element, pps.prefix, pps.delimiter, pps.delimiters);\n    },\n\n    onCut: function (e) {\n        if (!Cleave.Util.checkFullSelection(this.element.value)) return;\n        this.copyClipboardData(e);\n        this.onInput('');\n    },\n\n    onCopy: function (e) {\n        if (!Cleave.Util.checkFullSelection(this.element.value)) return;\n        this.copyClipboardData(e);\n    },\n\n    copyClipboardData: function (e) {\n        var owner = this,\n            pps = owner.properties,\n            Util = Cleave.Util,\n            inputValue = owner.element.value,\n            textToCopy = '';\n\n        if (!pps.copyDelimiter) {\n            textToCopy = Util.stripDelimiters(inputValue, pps.delimiter, pps.delimiters);\n        } else {\n            textToCopy = inputValue;\n        }\n\n        try {\n            if (e.clipboardData) {\n                e.clipboardData.setData('Text', textToCopy);\n            } else {\n                window.clipboardData.setData('Text', textToCopy);\n            }\n\n            e.preventDefault();\n        } catch (ex) {\n            //  empty\n        }\n    },\n\n    onInput: function (value) {\n        var owner = this, pps = owner.properties,\n            Util = Cleave.Util;\n\n        // case 1: delete one more character \"4\"\n        // 1234*| -> hit backspace -> 123|\n        // case 2: last character is not delimiter which is:\n        // 12|34* -> hit backspace -> 1|34*\n        // note: no need to apply this for numeral mode\n        var postDelimiterAfter = Util.getPostDelimiter(value, pps.delimiter, pps.delimiters);\n        if (!pps.numeral && pps.postDelimiterBackspace && !postDelimiterAfter) {\n            value = Util.headStr(value, value.length - pps.postDelimiterBackspace.length);\n        }\n\n        // phone formatter\n        if (pps.phone) {\n            if (pps.prefix && (!pps.noImmediatePrefix || value.length)) {\n                pps.result = pps.prefix + pps.phoneFormatter.format(value).slice(pps.prefix.length);\n            } else {\n                pps.result = pps.phoneFormatter.format(value);\n            }\n            owner.updateValueState();\n\n            return;\n        }\n\n        // numeral formatter\n        if (pps.numeral) {\n            // Do not show prefix when noImmediatePrefix is specified\n            // This mostly because we need to show user the native input placeholder\n            if (pps.prefix && pps.noImmediatePrefix && value.length === 0) {\n                pps.result = '';\n            } else {\n                pps.result = pps.numeralFormatter.format(value);\n            }\n            owner.updateValueState();\n\n            return;\n        }\n\n        // date\n        if (pps.date) {\n            value = pps.dateFormatter.getValidatedDate(value);\n        }\n\n        // time\n        if (pps.time) {\n            value = pps.timeFormatter.getValidatedTime(value);\n        }\n\n        // strip delimiters\n        value = Util.stripDelimiters(value, pps.delimiter, pps.delimiters);\n\n        // strip prefix\n        value = Util.getPrefixStrippedValue(value, pps.prefix, pps.prefixLength, pps.result, pps.delimiter, pps.delimiters, pps.noImmediatePrefix, pps.tailPrefix, pps.signBeforePrefix);\n\n        // strip non-numeric characters\n        value = pps.numericOnly ? Util.strip(value, /[^\\d]/g) : value;\n\n        // convert case\n        value = pps.uppercase ? value.toUpperCase() : value;\n        value = pps.lowercase ? value.toLowerCase() : value;\n\n        // prevent from showing prefix when no immediate option enabled with empty input value\n        if (pps.prefix) {\n            if (pps.tailPrefix) {\n                value = value + pps.prefix;\n            } else {\n                value = pps.prefix + value;\n            }\n\n\n            // no blocks specified, no need to do formatting\n            if (pps.blocksLength === 0) {\n                pps.result = value;\n                owner.updateValueState();\n\n                return;\n            }\n        }\n\n        // update credit card props\n        if (pps.creditCard) {\n            owner.updateCreditCardPropsByValue(value);\n        }\n\n        // strip over length characters\n        value = Util.headStr(value, pps.maxLength);\n\n        // apply blocks\n        pps.result = Util.getFormattedValue(\n            value,\n            pps.blocks, pps.blocksLength,\n            pps.delimiter, pps.delimiters, pps.delimiterLazyShow\n        );\n\n        owner.updateValueState();\n    },\n\n    updateCreditCardPropsByValue: function (value) {\n        var owner = this, pps = owner.properties,\n            Util = Cleave.Util,\n            creditCardInfo;\n\n        // At least one of the first 4 characters has changed\n        if (Util.headStr(pps.result, 4) === Util.headStr(value, 4)) {\n            return;\n        }\n\n        creditCardInfo = Cleave.CreditCardDetector.getInfo(value, pps.creditCardStrictMode);\n\n        pps.blocks = creditCardInfo.blocks;\n        pps.blocksLength = pps.blocks.length;\n        pps.maxLength = Util.getMaxLength(pps.blocks);\n\n        // credit card type changed\n        if (pps.creditCardType !== creditCardInfo.type) {\n            pps.creditCardType = creditCardInfo.type;\n\n            pps.onCreditCardTypeChanged.call(owner, pps.creditCardType);\n        }\n    },\n\n    updateValueState: function () {\n        var owner = this,\n            Util = Cleave.Util,\n            pps = owner.properties;\n\n        if (!owner.element) {\n            return;\n        }\n\n        var endPos = owner.element.selectionEnd;\n        var oldValue = owner.element.value;\n        var newValue = pps.result;\n\n        endPos = Util.getNextCursorPosition(endPos, oldValue, newValue, pps.delimiter, pps.delimiters);\n\n        // fix Android browser type=\"text\" input field\n        // cursor not jumping issue\n        if (owner.isAndroid) {\n            window.setTimeout(function () {\n                owner.element.value = newValue;\n                Util.setSelection(owner.element, endPos, pps.document, false);\n                owner.callOnValueChanged();\n            }, 1);\n\n            return;\n        }\n\n        owner.element.value = newValue;\n        if (pps.swapHiddenInput) owner.elementSwapHidden.value = owner.getRawValue();\n\n        Util.setSelection(owner.element, endPos, pps.document, false);\n        owner.callOnValueChanged();\n    },\n\n    callOnValueChanged: function () {\n        var owner = this,\n            pps = owner.properties;\n\n        pps.onValueChanged.call(owner, {\n            target: {\n                name: owner.element.name,\n                value: pps.result,\n                rawValue: owner.getRawValue()\n            }\n        });\n    },\n\n    setPhoneRegionCode: function (phoneRegionCode) {\n        var owner = this, pps = owner.properties;\n\n        pps.phoneRegionCode = phoneRegionCode;\n        owner.initPhoneFormatter();\n        owner.onChange();\n    },\n\n    setRawValue: function (value) {\n        var owner = this, pps = owner.properties;\n\n        value = value !== undefined && value !== null ? value.toString() : '';\n\n        if (pps.numeral) {\n            value = value.replace('.', pps.numeralDecimalMark);\n        }\n\n        pps.postDelimiterBackspace = false;\n\n        owner.element.value = value;\n        owner.onInput(value);\n    },\n\n    getRawValue: function () {\n        var owner = this,\n            pps = owner.properties,\n            Util = Cleave.Util,\n            rawValue = owner.element.value;\n\n        if (pps.rawValueTrimPrefix) {\n            rawValue = Util.getPrefixStrippedValue(rawValue, pps.prefix, pps.prefixLength, pps.result, pps.delimiter, pps.delimiters, pps.noImmediatePrefix, pps.tailPrefix, pps.signBeforePrefix);\n        }\n\n        if (pps.numeral) {\n            rawValue = pps.numeralFormatter.getRawValue(rawValue);\n        } else {\n            rawValue = Util.stripDelimiters(rawValue, pps.delimiter, pps.delimiters);\n        }\n\n        return rawValue;\n    },\n\n    getISOFormatDate: function () {\n        var owner = this,\n            pps = owner.properties;\n\n        return pps.date ? pps.dateFormatter.getISOFormatDate() : '';\n    },\n\n    getISOFormatTime: function () {\n        var owner = this,\n            pps = owner.properties;\n\n        return pps.time ? pps.timeFormatter.getISOFormatTime() : '';\n    },\n\n    getFormattedValue: function () {\n        return this.element.value;\n    },\n\n    destroy: function () {\n        var owner = this;\n\n        owner.element.removeEventListener('input', owner.onChangeListener);\n        owner.element.removeEventListener('keydown', owner.onKeyDownListener);\n        owner.element.removeEventListener('focus', owner.onFocusListener);\n        owner.element.removeEventListener('cut', owner.onCutListener);\n        owner.element.removeEventListener('copy', owner.onCopyListener);\n    },\n\n    toString: function () {\n        return '[Cleave Object]';\n    }\n};\n\nCleave.NumeralFormatter = NumeralFormatter_1;\nCleave.DateFormatter = DateFormatter_1;\nCleave.TimeFormatter = TimeFormatter_1;\nCleave.PhoneFormatter = PhoneFormatter_1;\nCleave.CreditCardDetector = CreditCardDetector_1;\nCleave.Util = Util_1;\nCleave.DefaultProperties = DefaultProperties_1;\n\n// for angular directive\n((typeof commonjsGlobal === 'object' && commonjsGlobal) ? commonjsGlobal : window)['Cleave'] = Cleave;\n\n// CommonJS\nvar Cleave_1 = Cleave;\n\nexport default Cleave_1;\n","/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n  'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n    return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n    if (Array.isArray(arg)) {\n        each(arg, context[fn], context);\n        return true;\n    }\n    return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n    var i;\n\n    if (!obj) {\n        return;\n    }\n\n    if (obj.forEach) {\n        obj.forEach(iterator, context);\n    } else if (obj.length !== undefined) {\n        i = 0;\n        while (i < obj.length) {\n            iterator.call(context, obj[i], i, obj);\n            i++;\n        }\n    } else {\n        for (i in obj) {\n            obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n        }\n    }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n    var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n    return function() {\n        var e = new Error('get-stack-trace');\n        var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n            .replace(/^\\s+at\\s+/gm, '')\n            .replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n        var log = window.console && (window.console.warn || window.console.log);\n        if (log) {\n            log.call(window.console, deprecationMessage, stack);\n        }\n        return method.apply(this, arguments);\n    };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n    assign = function assign(target) {\n        if (target === undefined || target === null) {\n            throw new TypeError('Cannot convert undefined or null to object');\n        }\n\n        var output = Object(target);\n        for (var index = 1; index < arguments.length; index++) {\n            var source = arguments[index];\n            if (source !== undefined && source !== null) {\n                for (var nextKey in source) {\n                    if (source.hasOwnProperty(nextKey)) {\n                        output[nextKey] = source[nextKey];\n                    }\n                }\n            }\n        }\n        return output;\n    };\n} else {\n    assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n    var keys = Object.keys(src);\n    var i = 0;\n    while (i < keys.length) {\n        if (!merge || (merge && dest[keys[i]] === undefined)) {\n            dest[keys[i]] = src[keys[i]];\n        }\n        i++;\n    }\n    return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n    return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n    var baseP = base.prototype,\n        childP;\n\n    childP = child.prototype = Object.create(baseP);\n    childP.constructor = child;\n    childP._super = baseP;\n\n    if (properties) {\n        assign(childP, properties);\n    }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n    return function boundFn() {\n        return fn.apply(context, arguments);\n    };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n    if (typeof val == TYPE_FUNCTION) {\n        return val.apply(args ? args[0] || undefined : undefined, args);\n    }\n    return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n    return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n    each(splitStr(types), function(type) {\n        target.addEventListener(type, handler, false);\n    });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n    each(splitStr(types), function(type) {\n        target.removeEventListener(type, handler, false);\n    });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n    while (node) {\n        if (node == parent) {\n            return true;\n        }\n        node = node.parentNode;\n    }\n    return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n    return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n    return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n    if (src.indexOf && !findByKey) {\n        return src.indexOf(find);\n    } else {\n        var i = 0;\n        while (i < src.length) {\n            if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n                return i;\n            }\n            i++;\n        }\n        return -1;\n    }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n    return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n    var results = [];\n    var values = [];\n    var i = 0;\n\n    while (i < src.length) {\n        var val = key ? src[i][key] : src[i];\n        if (inArray(values, val) < 0) {\n            results.push(src[i]);\n        }\n        values[i] = val;\n        i++;\n    }\n\n    if (sort) {\n        if (!key) {\n            results = results.sort();\n        } else {\n            results = results.sort(function sortUniqueArray(a, b) {\n                return a[key] > b[key];\n            });\n        }\n    }\n\n    return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n    var prefix, prop;\n    var camelProp = property[0].toUpperCase() + property.slice(1);\n\n    var i = 0;\n    while (i < VENDOR_PREFIXES.length) {\n        prefix = VENDOR_PREFIXES[i];\n        prop = (prefix) ? prefix + camelProp : property;\n\n        if (prop in obj) {\n            return prop;\n        }\n        i++;\n    }\n    return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n    return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n    var doc = element.ownerDocument || element;\n    return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n    var self = this;\n    this.manager = manager;\n    this.callback = callback;\n    this.element = manager.element;\n    this.target = manager.options.inputTarget;\n\n    // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n    // so when disabled the input events are completely bypassed.\n    this.domHandler = function(ev) {\n        if (boolOrFn(manager.options.enable, [manager])) {\n            self.handler(ev);\n        }\n    };\n\n    this.init();\n\n}\n\nInput.prototype = {\n    /**\n     * should handle the inputEvent data and trigger the callback\n     * @virtual\n     */\n    handler: function() { },\n\n    /**\n     * bind the events\n     */\n    init: function() {\n        this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n        this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n        this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n    },\n\n    /**\n     * unbind the events\n     */\n    destroy: function() {\n        this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n        this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n        this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n    }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n    var Type;\n    var inputClass = manager.options.inputClass;\n\n    if (inputClass) {\n        Type = inputClass;\n    } else if (SUPPORT_POINTER_EVENTS) {\n        Type = PointerEventInput;\n    } else if (SUPPORT_ONLY_TOUCH) {\n        Type = TouchInput;\n    } else if (!SUPPORT_TOUCH) {\n        Type = MouseInput;\n    } else {\n        Type = TouchMouseInput;\n    }\n    return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n    var pointersLen = input.pointers.length;\n    var changedPointersLen = input.changedPointers.length;\n    var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n    var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n    input.isFirst = !!isFirst;\n    input.isFinal = !!isFinal;\n\n    if (isFirst) {\n        manager.session = {};\n    }\n\n    // source event is the normalized value of the domEvents\n    // like 'touchstart, mouseup, pointerdown'\n    input.eventType = eventType;\n\n    // compute scale, rotation etc\n    computeInputData(manager, input);\n\n    // emit secret event\n    manager.emit('hammer.input', input);\n\n    manager.recognize(input);\n    manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n    var session = manager.session;\n    var pointers = input.pointers;\n    var pointersLength = pointers.length;\n\n    // store the first input to calculate the distance and direction\n    if (!session.firstInput) {\n        session.firstInput = simpleCloneInputData(input);\n    }\n\n    // to compute scale and rotation we need to store the multiple touches\n    if (pointersLength > 1 && !session.firstMultiple) {\n        session.firstMultiple = simpleCloneInputData(input);\n    } else if (pointersLength === 1) {\n        session.firstMultiple = false;\n    }\n\n    var firstInput = session.firstInput;\n    var firstMultiple = session.firstMultiple;\n    var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n    var center = input.center = getCenter(pointers);\n    input.timeStamp = now();\n    input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n    input.angle = getAngle(offsetCenter, center);\n    input.distance = getDistance(offsetCenter, center);\n\n    computeDeltaXY(session, input);\n    input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n    var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n    input.overallVelocityX = overallVelocity.x;\n    input.overallVelocityY = overallVelocity.y;\n    input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n    input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n    input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n    input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n        session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n    computeIntervalInputData(session, input);\n\n    // find the correct target\n    var target = manager.element;\n    if (hasParent(input.srcEvent.target, target)) {\n        target = input.srcEvent.target;\n    }\n    input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n    var center = input.center;\n    var offset = session.offsetDelta || {};\n    var prevDelta = session.prevDelta || {};\n    var prevInput = session.prevInput || {};\n\n    if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n        prevDelta = session.prevDelta = {\n            x: prevInput.deltaX || 0,\n            y: prevInput.deltaY || 0\n        };\n\n        offset = session.offsetDelta = {\n            x: center.x,\n            y: center.y\n        };\n    }\n\n    input.deltaX = prevDelta.x + (center.x - offset.x);\n    input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n    var last = session.lastInterval || input,\n        deltaTime = input.timeStamp - last.timeStamp,\n        velocity, velocityX, velocityY, direction;\n\n    if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n        var deltaX = input.deltaX - last.deltaX;\n        var deltaY = input.deltaY - last.deltaY;\n\n        var v = getVelocity(deltaTime, deltaX, deltaY);\n        velocityX = v.x;\n        velocityY = v.y;\n        velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n        direction = getDirection(deltaX, deltaY);\n\n        session.lastInterval = input;\n    } else {\n        // use latest velocity info if it doesn't overtake a minimum period\n        velocity = last.velocity;\n        velocityX = last.velocityX;\n        velocityY = last.velocityY;\n        direction = last.direction;\n    }\n\n    input.velocity = velocity;\n    input.velocityX = velocityX;\n    input.velocityY = velocityY;\n    input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n    // make a simple copy of the pointers because we will get a reference if we don't\n    // we only need clientXY for the calculations\n    var pointers = [];\n    var i = 0;\n    while (i < input.pointers.length) {\n        pointers[i] = {\n            clientX: round(input.pointers[i].clientX),\n            clientY: round(input.pointers[i].clientY)\n        };\n        i++;\n    }\n\n    return {\n        timeStamp: now(),\n        pointers: pointers,\n        center: getCenter(pointers),\n        deltaX: input.deltaX,\n        deltaY: input.deltaY\n    };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n    var pointersLength = pointers.length;\n\n    // no need to loop when only one touch\n    if (pointersLength === 1) {\n        return {\n            x: round(pointers[0].clientX),\n            y: round(pointers[0].clientY)\n        };\n    }\n\n    var x = 0, y = 0, i = 0;\n    while (i < pointersLength) {\n        x += pointers[i].clientX;\n        y += pointers[i].clientY;\n        i++;\n    }\n\n    return {\n        x: round(x / pointersLength),\n        y: round(y / pointersLength)\n    };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n    return {\n        x: x / deltaTime || 0,\n        y: y / deltaTime || 0\n    };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n    if (x === y) {\n        return DIRECTION_NONE;\n    }\n\n    if (abs(x) >= abs(y)) {\n        return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n    }\n    return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n    if (!props) {\n        props = PROPS_XY;\n    }\n    var x = p2[props[0]] - p1[props[0]],\n        y = p2[props[1]] - p1[props[1]];\n\n    return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n    if (!props) {\n        props = PROPS_XY;\n    }\n    var x = p2[props[0]] - p1[props[0]],\n        y = p2[props[1]] - p1[props[1]];\n    return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n    return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n    return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n    mousedown: INPUT_START,\n    mousemove: INPUT_MOVE,\n    mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n    this.evEl = MOUSE_ELEMENT_EVENTS;\n    this.evWin = MOUSE_WINDOW_EVENTS;\n\n    this.pressed = false; // mousedown state\n\n    Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n    /**\n     * handle mouse events\n     * @param {Object} ev\n     */\n    handler: function MEhandler(ev) {\n        var eventType = MOUSE_INPUT_MAP[ev.type];\n\n        // on start we want to have the left mouse button down\n        if (eventType & INPUT_START && ev.button === 0) {\n            this.pressed = true;\n        }\n\n        if (eventType & INPUT_MOVE && ev.which !== 1) {\n            eventType = INPUT_END;\n        }\n\n        // mouse must be down\n        if (!this.pressed) {\n            return;\n        }\n\n        if (eventType & INPUT_END) {\n            this.pressed = false;\n        }\n\n        this.callback(this.manager, eventType, {\n            pointers: [ev],\n            changedPointers: [ev],\n            pointerType: INPUT_TYPE_MOUSE,\n            srcEvent: ev\n        });\n    }\n});\n\nvar POINTER_INPUT_MAP = {\n    pointerdown: INPUT_START,\n    pointermove: INPUT_MOVE,\n    pointerup: INPUT_END,\n    pointercancel: INPUT_CANCEL,\n    pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n    2: INPUT_TYPE_TOUCH,\n    3: INPUT_TYPE_PEN,\n    4: INPUT_TYPE_MOUSE,\n    5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n    POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n    POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n    this.evEl = POINTER_ELEMENT_EVENTS;\n    this.evWin = POINTER_WINDOW_EVENTS;\n\n    Input.apply(this, arguments);\n\n    this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n    /**\n     * handle mouse events\n     * @param {Object} ev\n     */\n    handler: function PEhandler(ev) {\n        var store = this.store;\n        var removePointer = false;\n\n        var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n        var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n        var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n        var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n        // get index of the event in the store\n        var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n        // start and mouse must be down\n        if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n            if (storeIndex < 0) {\n                store.push(ev);\n                storeIndex = store.length - 1;\n            }\n        } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n            removePointer = true;\n        }\n\n        // it not found, so the pointer hasn't been down (so it's probably a hover)\n        if (storeIndex < 0) {\n            return;\n        }\n\n        // update the event in the store\n        store[storeIndex] = ev;\n\n        this.callback(this.manager, eventType, {\n            pointers: store,\n            changedPointers: [ev],\n            pointerType: pointerType,\n            srcEvent: ev\n        });\n\n        if (removePointer) {\n            // remove from the store\n            store.splice(storeIndex, 1);\n        }\n    }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n    touchstart: INPUT_START,\n    touchmove: INPUT_MOVE,\n    touchend: INPUT_END,\n    touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n    this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n    this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n    this.started = false;\n\n    Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n    handler: function TEhandler(ev) {\n        var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n        // should we handle the touch events?\n        if (type === INPUT_START) {\n            this.started = true;\n        }\n\n        if (!this.started) {\n            return;\n        }\n\n        var touches = normalizeSingleTouches.call(this, ev, type);\n\n        // when done, reset the started state\n        if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n            this.started = false;\n        }\n\n        this.callback(this.manager, type, {\n            pointers: touches[0],\n            changedPointers: touches[1],\n            pointerType: INPUT_TYPE_TOUCH,\n            srcEvent: ev\n        });\n    }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n    var all = toArray(ev.touches);\n    var changed = toArray(ev.changedTouches);\n\n    if (type & (INPUT_END | INPUT_CANCEL)) {\n        all = uniqueArray(all.concat(changed), 'identifier', true);\n    }\n\n    return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n    touchstart: INPUT_START,\n    touchmove: INPUT_MOVE,\n    touchend: INPUT_END,\n    touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n    this.evTarget = TOUCH_TARGET_EVENTS;\n    this.targetIds = {};\n\n    Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n    handler: function MTEhandler(ev) {\n        var type = TOUCH_INPUT_MAP[ev.type];\n        var touches = getTouches.call(this, ev, type);\n        if (!touches) {\n            return;\n        }\n\n        this.callback(this.manager, type, {\n            pointers: touches[0],\n            changedPointers: touches[1],\n            pointerType: INPUT_TYPE_TOUCH,\n            srcEvent: ev\n        });\n    }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n    var allTouches = toArray(ev.touches);\n    var targetIds = this.targetIds;\n\n    // when there is only one touch, the process can be simplified\n    if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n        targetIds[allTouches[0].identifier] = true;\n        return [allTouches, allTouches];\n    }\n\n    var i,\n        targetTouches,\n        changedTouches = toArray(ev.changedTouches),\n        changedTargetTouches = [],\n        target = this.target;\n\n    // get target touches from touches\n    targetTouches = allTouches.filter(function(touch) {\n        return hasParent(touch.target, target);\n    });\n\n    // collect touches\n    if (type === INPUT_START) {\n        i = 0;\n        while (i < targetTouches.length) {\n            targetIds[targetTouches[i].identifier] = true;\n            i++;\n        }\n    }\n\n    // filter changed touches to only contain touches that exist in the collected target ids\n    i = 0;\n    while (i < changedTouches.length) {\n        if (targetIds[changedTouches[i].identifier]) {\n            changedTargetTouches.push(changedTouches[i]);\n        }\n\n        // cleanup removed touches\n        if (type & (INPUT_END | INPUT_CANCEL)) {\n            delete targetIds[changedTouches[i].identifier];\n        }\n        i++;\n    }\n\n    if (!changedTargetTouches.length) {\n        return;\n    }\n\n    return [\n        // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n        uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n        changedTargetTouches\n    ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n    Input.apply(this, arguments);\n\n    var handler = bindFn(this.handler, this);\n    this.touch = new TouchInput(this.manager, handler);\n    this.mouse = new MouseInput(this.manager, handler);\n\n    this.primaryTouch = null;\n    this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n    /**\n     * handle mouse and touch events\n     * @param {Hammer} manager\n     * @param {String} inputEvent\n     * @param {Object} inputData\n     */\n    handler: function TMEhandler(manager, inputEvent, inputData) {\n        var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n            isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n        if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n            return;\n        }\n\n        // when we're in a touch event, record touches to  de-dupe synthetic mouse event\n        if (isTouch) {\n            recordTouches.call(this, inputEvent, inputData);\n        } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n            return;\n        }\n\n        this.callback(manager, inputEvent, inputData);\n    },\n\n    /**\n     * remove the event listeners\n     */\n    destroy: function destroy() {\n        this.touch.destroy();\n        this.mouse.destroy();\n    }\n});\n\nfunction recordTouches(eventType, eventData) {\n    if (eventType & INPUT_START) {\n        this.primaryTouch = eventData.changedPointers[0].identifier;\n        setLastTouch.call(this, eventData);\n    } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n        setLastTouch.call(this, eventData);\n    }\n}\n\nfunction setLastTouch(eventData) {\n    var touch = eventData.changedPointers[0];\n\n    if (touch.identifier === this.primaryTouch) {\n        var lastTouch = {x: touch.clientX, y: touch.clientY};\n        this.lastTouches.push(lastTouch);\n        var lts = this.lastTouches;\n        var removeLastTouch = function() {\n            var i = lts.indexOf(lastTouch);\n            if (i > -1) {\n                lts.splice(i, 1);\n            }\n        };\n        setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n    }\n}\n\nfunction isSyntheticEvent(eventData) {\n    var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n    for (var i = 0; i < this.lastTouches.length; i++) {\n        var t = this.lastTouches[i];\n        var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n        if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n            return true;\n        }\n    }\n    return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n    this.manager = manager;\n    this.set(value);\n}\n\nTouchAction.prototype = {\n    /**\n     * set the touchAction value on the element or enable the polyfill\n     * @param {String} value\n     */\n    set: function(value) {\n        // find out the touch-action by the event handlers\n        if (value == TOUCH_ACTION_COMPUTE) {\n            value = this.compute();\n        }\n\n        if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n            this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n        }\n        this.actions = value.toLowerCase().trim();\n    },\n\n    /**\n     * just re-set the touchAction value\n     */\n    update: function() {\n        this.set(this.manager.options.touchAction);\n    },\n\n    /**\n     * compute the value for the touchAction property based on the recognizer's settings\n     * @returns {String} value\n     */\n    compute: function() {\n        var actions = [];\n        each(this.manager.recognizers, function(recognizer) {\n            if (boolOrFn(recognizer.options.enable, [recognizer])) {\n                actions = actions.concat(recognizer.getTouchAction());\n            }\n        });\n        return cleanTouchActions(actions.join(' '));\n    },\n\n    /**\n     * this method is called on each input cycle and provides the preventing of the browser behavior\n     * @param {Object} input\n     */\n    preventDefaults: function(input) {\n        var srcEvent = input.srcEvent;\n        var direction = input.offsetDirection;\n\n        // if the touch action did prevented once this session\n        if (this.manager.session.prevented) {\n            srcEvent.preventDefault();\n            return;\n        }\n\n        var actions = this.actions;\n        var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n        var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n        var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n        if (hasNone) {\n            //do not prevent defaults if this is a tap gesture\n\n            var isTapPointer = input.pointers.length === 1;\n            var isTapMovement = input.distance < 2;\n            var isTapTouchTime = input.deltaTime < 250;\n\n            if (isTapPointer && isTapMovement && isTapTouchTime) {\n                return;\n            }\n        }\n\n        if (hasPanX && hasPanY) {\n            // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n            return;\n        }\n\n        if (hasNone ||\n            (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n            (hasPanX && direction & DIRECTION_VERTICAL)) {\n            return this.preventSrc(srcEvent);\n        }\n    },\n\n    /**\n     * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n     * @param {Object} srcEvent\n     */\n    preventSrc: function(srcEvent) {\n        this.manager.session.prevented = true;\n        srcEvent.preventDefault();\n    }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n    // none\n    if (inStr(actions, TOUCH_ACTION_NONE)) {\n        return TOUCH_ACTION_NONE;\n    }\n\n    var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n    var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n    // if both pan-x and pan-y are set (different recognizers\n    // for different directions, e.g. horizontal pan but vertical swipe?)\n    // we need none (as otherwise with pan-x pan-y combined none of these\n    // recognizers will work, since the browser would handle all panning\n    if (hasPanX && hasPanY) {\n        return TOUCH_ACTION_NONE;\n    }\n\n    // pan-x OR pan-y\n    if (hasPanX || hasPanY) {\n        return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n    }\n\n    // manipulation\n    if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n        return TOUCH_ACTION_MANIPULATION;\n    }\n\n    return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n    if (!NATIVE_TOUCH_ACTION) {\n        return false;\n    }\n    var touchMap = {};\n    var cssSupports = window.CSS && window.CSS.supports;\n    ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n        // If css.supports is not supported but there is native touch-action assume it supports\n        // all values. This is the case for IE 10 and 11.\n        touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n    });\n    return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n *               Possible\n *                  |\n *            +-----+---------------+\n *            |                     |\n *      +-----+-----+               |\n *      |           |               |\n *   Failed      Cancelled          |\n *                          +-------+------+\n *                          |              |\n *                      Recognized       Began\n *                                         |\n *                                      Changed\n *                                         |\n *                                  Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n    this.options = assign({}, this.defaults, options || {});\n\n    this.id = uniqueId();\n\n    this.manager = null;\n\n    // default is enable true\n    this.options.enable = ifUndefined(this.options.enable, true);\n\n    this.state = STATE_POSSIBLE;\n\n    this.simultaneous = {};\n    this.requireFail = [];\n}\n\nRecognizer.prototype = {\n    /**\n     * @virtual\n     * @type {Object}\n     */\n    defaults: {},\n\n    /**\n     * set options\n     * @param {Object} options\n     * @return {Recognizer}\n     */\n    set: function(options) {\n        assign(this.options, options);\n\n        // also update the touchAction, in case something changed about the directions/enabled state\n        this.manager && this.manager.touchAction.update();\n        return this;\n    },\n\n    /**\n     * recognize simultaneous with an other recognizer.\n     * @param {Recognizer} otherRecognizer\n     * @returns {Recognizer} this\n     */\n    recognizeWith: function(otherRecognizer) {\n        if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n            return this;\n        }\n\n        var simultaneous = this.simultaneous;\n        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n        if (!simultaneous[otherRecognizer.id]) {\n            simultaneous[otherRecognizer.id] = otherRecognizer;\n            otherRecognizer.recognizeWith(this);\n        }\n        return this;\n    },\n\n    /**\n     * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n     * @param {Recognizer} otherRecognizer\n     * @returns {Recognizer} this\n     */\n    dropRecognizeWith: function(otherRecognizer) {\n        if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n            return this;\n        }\n\n        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n        delete this.simultaneous[otherRecognizer.id];\n        return this;\n    },\n\n    /**\n     * recognizer can only run when an other is failing\n     * @param {Recognizer} otherRecognizer\n     * @returns {Recognizer} this\n     */\n    requireFailure: function(otherRecognizer) {\n        if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n            return this;\n        }\n\n        var requireFail = this.requireFail;\n        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n        if (inArray(requireFail, otherRecognizer) === -1) {\n            requireFail.push(otherRecognizer);\n            otherRecognizer.requireFailure(this);\n        }\n        return this;\n    },\n\n    /**\n     * drop the requireFailure link. it does not remove the link on the other recognizer.\n     * @param {Recognizer} otherRecognizer\n     * @returns {Recognizer} this\n     */\n    dropRequireFailure: function(otherRecognizer) {\n        if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n            return this;\n        }\n\n        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n        var index = inArray(this.requireFail, otherRecognizer);\n        if (index > -1) {\n            this.requireFail.splice(index, 1);\n        }\n        return this;\n    },\n\n    /**\n     * has require failures boolean\n     * @returns {boolean}\n     */\n    hasRequireFailures: function() {\n        return this.requireFail.length > 0;\n    },\n\n    /**\n     * if the recognizer can recognize simultaneous with an other recognizer\n     * @param {Recognizer} otherRecognizer\n     * @returns {Boolean}\n     */\n    canRecognizeWith: function(otherRecognizer) {\n        return !!this.simultaneous[otherRecognizer.id];\n    },\n\n    /**\n     * You should use `tryEmit` instead of `emit` directly to check\n     * that all the needed recognizers has failed before emitting.\n     * @param {Object} input\n     */\n    emit: function(input) {\n        var self = this;\n        var state = this.state;\n\n        function emit(event) {\n            self.manager.emit(event, input);\n        }\n\n        // 'panstart' and 'panmove'\n        if (state < STATE_ENDED) {\n            emit(self.options.event + stateStr(state));\n        }\n\n        emit(self.options.event); // simple 'eventName' events\n\n        if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n            emit(input.additionalEvent);\n        }\n\n        // panend and pancancel\n        if (state >= STATE_ENDED) {\n            emit(self.options.event + stateStr(state));\n        }\n    },\n\n    /**\n     * Check that all the require failure recognizers has failed,\n     * if true, it emits a gesture event,\n     * otherwise, setup the state to FAILED.\n     * @param {Object} input\n     */\n    tryEmit: function(input) {\n        if (this.canEmit()) {\n            return this.emit(input);\n        }\n        // it's failing anyway\n        this.state = STATE_FAILED;\n    },\n\n    /**\n     * can we emit?\n     * @returns {boolean}\n     */\n    canEmit: function() {\n        var i = 0;\n        while (i < this.requireFail.length) {\n            if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n                return false;\n            }\n            i++;\n        }\n        return true;\n    },\n\n    /**\n     * update the recognizer\n     * @param {Object} inputData\n     */\n    recognize: function(inputData) {\n        // make a new copy of the inputData\n        // so we can change the inputData without messing up the other recognizers\n        var inputDataClone = assign({}, inputData);\n\n        // is is enabled and allow recognizing?\n        if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n            this.reset();\n            this.state = STATE_FAILED;\n            return;\n        }\n\n        // reset when we've reached the end\n        if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n            this.state = STATE_POSSIBLE;\n        }\n\n        this.state = this.process(inputDataClone);\n\n        // the recognizer has recognized a gesture\n        // so trigger an event\n        if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n            this.tryEmit(inputDataClone);\n        }\n    },\n\n    /**\n     * return the state of the recognizer\n     * the actual recognizing happens in this method\n     * @virtual\n     * @param {Object} inputData\n     * @returns {Const} STATE\n     */\n    process: function(inputData) { }, // jshint ignore:line\n\n    /**\n     * return the preferred touch-action\n     * @virtual\n     * @returns {Array}\n     */\n    getTouchAction: function() { },\n\n    /**\n     * called when the gesture isn't allowed to recognize\n     * like when another is being recognized or it is disabled\n     * @virtual\n     */\n    reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n    if (state & STATE_CANCELLED) {\n        return 'cancel';\n    } else if (state & STATE_ENDED) {\n        return 'end';\n    } else if (state & STATE_CHANGED) {\n        return 'move';\n    } else if (state & STATE_BEGAN) {\n        return 'start';\n    }\n    return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n    if (direction == DIRECTION_DOWN) {\n        return 'down';\n    } else if (direction == DIRECTION_UP) {\n        return 'up';\n    } else if (direction == DIRECTION_LEFT) {\n        return 'left';\n    } else if (direction == DIRECTION_RIGHT) {\n        return 'right';\n    }\n    return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n    var manager = recognizer.manager;\n    if (manager) {\n        return manager.get(otherRecognizer);\n    }\n    return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n    Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n    /**\n     * @namespace\n     * @memberof AttrRecognizer\n     */\n    defaults: {\n        /**\n         * @type {Number}\n         * @default 1\n         */\n        pointers: 1\n    },\n\n    /**\n     * Used to check if it the recognizer receives valid input, like input.distance > 10.\n     * @memberof AttrRecognizer\n     * @param {Object} input\n     * @returns {Boolean} recognized\n     */\n    attrTest: function(input) {\n        var optionPointers = this.options.pointers;\n        return optionPointers === 0 || input.pointers.length === optionPointers;\n    },\n\n    /**\n     * Process the input and return the state for the recognizer\n     * @memberof AttrRecognizer\n     * @param {Object} input\n     * @returns {*} State\n     */\n    process: function(input) {\n        var state = this.state;\n        var eventType = input.eventType;\n\n        var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n        var isValid = this.attrTest(input);\n\n        // on cancel input and we've recognized before, return STATE_CANCELLED\n        if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n            return state | STATE_CANCELLED;\n        } else if (isRecognized || isValid) {\n            if (eventType & INPUT_END) {\n                return state | STATE_ENDED;\n            } else if (!(state & STATE_BEGAN)) {\n                return STATE_BEGAN;\n            }\n            return state | STATE_CHANGED;\n        }\n        return STATE_FAILED;\n    }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n    AttrRecognizer.apply(this, arguments);\n\n    this.pX = null;\n    this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n    /**\n     * @namespace\n     * @memberof PanRecognizer\n     */\n    defaults: {\n        event: 'pan',\n        threshold: 10,\n        pointers: 1,\n        direction: DIRECTION_ALL\n    },\n\n    getTouchAction: function() {\n        var direction = this.options.direction;\n        var actions = [];\n        if (direction & DIRECTION_HORIZONTAL) {\n            actions.push(TOUCH_ACTION_PAN_Y);\n        }\n        if (direction & DIRECTION_VERTICAL) {\n            actions.push(TOUCH_ACTION_PAN_X);\n        }\n        return actions;\n    },\n\n    directionTest: function(input) {\n        var options = this.options;\n        var hasMoved = true;\n        var distance = input.distance;\n        var direction = input.direction;\n        var x = input.deltaX;\n        var y = input.deltaY;\n\n        // lock to axis?\n        if (!(direction & options.direction)) {\n            if (options.direction & DIRECTION_HORIZONTAL) {\n                direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n                hasMoved = x != this.pX;\n                distance = Math.abs(input.deltaX);\n            } else {\n                direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n                hasMoved = y != this.pY;\n                distance = Math.abs(input.deltaY);\n            }\n        }\n        input.direction = direction;\n        return hasMoved && distance > options.threshold && direction & options.direction;\n    },\n\n    attrTest: function(input) {\n        return AttrRecognizer.prototype.attrTest.call(this, input) &&\n            (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n    },\n\n    emit: function(input) {\n\n        this.pX = input.deltaX;\n        this.pY = input.deltaY;\n\n        var direction = directionStr(input.direction);\n\n        if (direction) {\n            input.additionalEvent = this.options.event + direction;\n        }\n        this._super.emit.call(this, input);\n    }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n    AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n    /**\n     * @namespace\n     * @memberof PinchRecognizer\n     */\n    defaults: {\n        event: 'pinch',\n        threshold: 0,\n        pointers: 2\n    },\n\n    getTouchAction: function() {\n        return [TOUCH_ACTION_NONE];\n    },\n\n    attrTest: function(input) {\n        return this._super.attrTest.call(this, input) &&\n            (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n    },\n\n    emit: function(input) {\n        if (input.scale !== 1) {\n            var inOut = input.scale < 1 ? 'in' : 'out';\n            input.additionalEvent = this.options.event + inOut;\n        }\n        this._super.emit.call(this, input);\n    }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n    Recognizer.apply(this, arguments);\n\n    this._timer = null;\n    this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n    /**\n     * @namespace\n     * @memberof PressRecognizer\n     */\n    defaults: {\n        event: 'press',\n        pointers: 1,\n        time: 251, // minimal time of the pointer to be pressed\n        threshold: 9 // a minimal movement is ok, but keep it low\n    },\n\n    getTouchAction: function() {\n        return [TOUCH_ACTION_AUTO];\n    },\n\n    process: function(input) {\n        var options = this.options;\n        var validPointers = input.pointers.length === options.pointers;\n        var validMovement = input.distance < options.threshold;\n        var validTime = input.deltaTime > options.time;\n\n        this._input = input;\n\n        // we only allow little movement\n        // and we've reached an end event, so a tap is possible\n        if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n            this.reset();\n        } else if (input.eventType & INPUT_START) {\n            this.reset();\n            this._timer = setTimeoutContext(function() {\n                this.state = STATE_RECOGNIZED;\n                this.tryEmit();\n            }, options.time, this);\n        } else if (input.eventType & INPUT_END) {\n            return STATE_RECOGNIZED;\n        }\n        return STATE_FAILED;\n    },\n\n    reset: function() {\n        clearTimeout(this._timer);\n    },\n\n    emit: function(input) {\n        if (this.state !== STATE_RECOGNIZED) {\n            return;\n        }\n\n        if (input && (input.eventType & INPUT_END)) {\n            this.manager.emit(this.options.event + 'up', input);\n        } else {\n            this._input.timeStamp = now();\n            this.manager.emit(this.options.event, this._input);\n        }\n    }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n    AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n    /**\n     * @namespace\n     * @memberof RotateRecognizer\n     */\n    defaults: {\n        event: 'rotate',\n        threshold: 0,\n        pointers: 2\n    },\n\n    getTouchAction: function() {\n        return [TOUCH_ACTION_NONE];\n    },\n\n    attrTest: function(input) {\n        return this._super.attrTest.call(this, input) &&\n            (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n    }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n    AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n    /**\n     * @namespace\n     * @memberof SwipeRecognizer\n     */\n    defaults: {\n        event: 'swipe',\n        threshold: 10,\n        velocity: 0.3,\n        direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n        pointers: 1\n    },\n\n    getTouchAction: function() {\n        return PanRecognizer.prototype.getTouchAction.call(this);\n    },\n\n    attrTest: function(input) {\n        var direction = this.options.direction;\n        var velocity;\n\n        if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n            velocity = input.overallVelocity;\n        } else if (direction & DIRECTION_HORIZONTAL) {\n            velocity = input.overallVelocityX;\n        } else if (direction & DIRECTION_VERTICAL) {\n            velocity = input.overallVelocityY;\n        }\n\n        return this._super.attrTest.call(this, input) &&\n            direction & input.offsetDirection &&\n            input.distance > this.options.threshold &&\n            input.maxPointers == this.options.pointers &&\n            abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n    },\n\n    emit: function(input) {\n        var direction = directionStr(input.offsetDirection);\n        if (direction) {\n            this.manager.emit(this.options.event + direction, input);\n        }\n\n        this.manager.emit(this.options.event, input);\n    }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n    Recognizer.apply(this, arguments);\n\n    // previous time and center,\n    // used for tap counting\n    this.pTime = false;\n    this.pCenter = false;\n\n    this._timer = null;\n    this._input = null;\n    this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n    /**\n     * @namespace\n     * @memberof PinchRecognizer\n     */\n    defaults: {\n        event: 'tap',\n        pointers: 1,\n        taps: 1,\n        interval: 300, // max time between the multi-tap taps\n        time: 250, // max time of the pointer to be down (like finger on the screen)\n        threshold: 9, // a minimal movement is ok, but keep it low\n        posThreshold: 10 // a multi-tap can be a bit off the initial position\n    },\n\n    getTouchAction: function() {\n        return [TOUCH_ACTION_MANIPULATION];\n    },\n\n    process: function(input) {\n        var options = this.options;\n\n        var validPointers = input.pointers.length === options.pointers;\n        var validMovement = input.distance < options.threshold;\n        var validTouchTime = input.deltaTime < options.time;\n\n        this.reset();\n\n        if ((input.eventType & INPUT_START) && (this.count === 0)) {\n            return this.failTimeout();\n        }\n\n        // we only allow little movement\n        // and we've reached an end event, so a tap is possible\n        if (validMovement && validTouchTime && validPointers) {\n            if (input.eventType != INPUT_END) {\n                return this.failTimeout();\n            }\n\n            var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n            var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n            this.pTime = input.timeStamp;\n            this.pCenter = input.center;\n\n            if (!validMultiTap || !validInterval) {\n                this.count = 1;\n            } else {\n                this.count += 1;\n            }\n\n            this._input = input;\n\n            // if tap count matches we have recognized it,\n            // else it has began recognizing...\n            var tapCount = this.count % options.taps;\n            if (tapCount === 0) {\n                // no failing requirements, immediately trigger the tap event\n                // or wait as long as the multitap interval to trigger\n                if (!this.hasRequireFailures()) {\n                    return STATE_RECOGNIZED;\n                } else {\n                    this._timer = setTimeoutContext(function() {\n                        this.state = STATE_RECOGNIZED;\n                        this.tryEmit();\n                    }, options.interval, this);\n                    return STATE_BEGAN;\n                }\n            }\n        }\n        return STATE_FAILED;\n    },\n\n    failTimeout: function() {\n        this._timer = setTimeoutContext(function() {\n            this.state = STATE_FAILED;\n        }, this.options.interval, this);\n        return STATE_FAILED;\n    },\n\n    reset: function() {\n        clearTimeout(this._timer);\n    },\n\n    emit: function() {\n        if (this.state == STATE_RECOGNIZED) {\n            this._input.tapCount = this.count;\n            this.manager.emit(this.options.event, this._input);\n        }\n    }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n    options = options || {};\n    options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n    return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n    /**\n     * set if DOM events are being triggered.\n     * But this is slower and unused by simple implementations, so disabled by default.\n     * @type {Boolean}\n     * @default false\n     */\n    domEvents: false,\n\n    /**\n     * The value for the touchAction property/fallback.\n     * When set to `compute` it will magically set the correct value based on the added recognizers.\n     * @type {String}\n     * @default compute\n     */\n    touchAction: TOUCH_ACTION_COMPUTE,\n\n    /**\n     * @type {Boolean}\n     * @default true\n     */\n    enable: true,\n\n    /**\n     * EXPERIMENTAL FEATURE -- can be removed/changed\n     * Change the parent input target element.\n     * If Null, then it is being set the to main element.\n     * @type {Null|EventTarget}\n     * @default null\n     */\n    inputTarget: null,\n\n    /**\n     * force an input class\n     * @type {Null|Function}\n     * @default null\n     */\n    inputClass: null,\n\n    /**\n     * Default recognizer setup when calling `Hammer()`\n     * When creating a new Manager these will be skipped.\n     * @type {Array}\n     */\n    preset: [\n        // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n        [RotateRecognizer, {enable: false}],\n        [PinchRecognizer, {enable: false}, ['rotate']],\n        [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n        [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n        [TapRecognizer],\n        [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n        [PressRecognizer]\n    ],\n\n    /**\n     * Some CSS properties can be used to improve the working of Hammer.\n     * Add them to this method and they will be set when creating a new Manager.\n     * @namespace\n     */\n    cssProps: {\n        /**\n         * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n         * @type {String}\n         * @default 'none'\n         */\n        userSelect: 'none',\n\n        /**\n         * Disable the Windows Phone grippers when pressing an element.\n         * @type {String}\n         * @default 'none'\n         */\n        touchSelect: 'none',\n\n        /**\n         * Disables the default callout shown when you touch and hold a touch target.\n         * On iOS, when you touch and hold a touch target such as a link, Safari displays\n         * a callout containing information about the link. This property allows you to disable that callout.\n         * @type {String}\n         * @default 'none'\n         */\n        touchCallout: 'none',\n\n        /**\n         * Specifies whether zooming is enabled. Used by IE10>\n         * @type {String}\n         * @default 'none'\n         */\n        contentZooming: 'none',\n\n        /**\n         * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n         * @type {String}\n         * @default 'none'\n         */\n        userDrag: 'none',\n\n        /**\n         * Overrides the highlight color shown when the user taps a link or a JavaScript\n         * clickable element in iOS. This property obeys the alpha value, if specified.\n         * @type {String}\n         * @default 'rgba(0,0,0,0)'\n         */\n        tapHighlightColor: 'rgba(0,0,0,0)'\n    }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n    this.options = assign({}, Hammer.defaults, options || {});\n\n    this.options.inputTarget = this.options.inputTarget || element;\n\n    this.handlers = {};\n    this.session = {};\n    this.recognizers = [];\n    this.oldCssProps = {};\n\n    this.element = element;\n    this.input = createInputInstance(this);\n    this.touchAction = new TouchAction(this, this.options.touchAction);\n\n    toggleCssProps(this, true);\n\n    each(this.options.recognizers, function(item) {\n        var recognizer = this.add(new (item[0])(item[1]));\n        item[2] && recognizer.recognizeWith(item[2]);\n        item[3] && recognizer.requireFailure(item[3]);\n    }, this);\n}\n\nManager.prototype = {\n    /**\n     * set options\n     * @param {Object} options\n     * @returns {Manager}\n     */\n    set: function(options) {\n        assign(this.options, options);\n\n        // Options that need a little more setup\n        if (options.touchAction) {\n            this.touchAction.update();\n        }\n        if (options.inputTarget) {\n            // Clean up existing event listeners and reinitialize\n            this.input.destroy();\n            this.input.target = options.inputTarget;\n            this.input.init();\n        }\n        return this;\n    },\n\n    /**\n     * stop recognizing for this session.\n     * This session will be discarded, when a new [input]start event is fired.\n     * When forced, the recognizer cycle is stopped immediately.\n     * @param {Boolean} [force]\n     */\n    stop: function(force) {\n        this.session.stopped = force ? FORCED_STOP : STOP;\n    },\n\n    /**\n     * run the recognizers!\n     * called by the inputHandler function on every movement of the pointers (touches)\n     * it walks through all the recognizers and tries to detect the gesture that is being made\n     * @param {Object} inputData\n     */\n    recognize: function(inputData) {\n        var session = this.session;\n        if (session.stopped) {\n            return;\n        }\n\n        // run the touch-action polyfill\n        this.touchAction.preventDefaults(inputData);\n\n        var recognizer;\n        var recognizers = this.recognizers;\n\n        // this holds the recognizer that is being recognized.\n        // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n        // if no recognizer is detecting a thing, it is set to `null`\n        var curRecognizer = session.curRecognizer;\n\n        // reset when the last recognizer is recognized\n        // or when we're in a new session\n        if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n            curRecognizer = session.curRecognizer = null;\n        }\n\n        var i = 0;\n        while (i < recognizers.length) {\n            recognizer = recognizers[i];\n\n            // find out if we are allowed try to recognize the input for this one.\n            // 1.   allow if the session is NOT forced stopped (see the .stop() method)\n            // 2.   allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n            //      that is being recognized.\n            // 3.   allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n            //      this can be setup with the `recognizeWith()` method on the recognizer.\n            if (session.stopped !== FORCED_STOP && ( // 1\n                    !curRecognizer || recognizer == curRecognizer || // 2\n                    recognizer.canRecognizeWith(curRecognizer))) { // 3\n                recognizer.recognize(inputData);\n            } else {\n                recognizer.reset();\n            }\n\n            // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n            // current active recognizer. but only if we don't already have an active recognizer\n            if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n                curRecognizer = session.curRecognizer = recognizer;\n            }\n            i++;\n        }\n    },\n\n    /**\n     * get a recognizer by its event name.\n     * @param {Recognizer|String} recognizer\n     * @returns {Recognizer|Null}\n     */\n    get: function(recognizer) {\n        if (recognizer instanceof Recognizer) {\n            return recognizer;\n        }\n\n        var recognizers = this.recognizers;\n        for (var i = 0; i < recognizers.length; i++) {\n            if (recognizers[i].options.event == recognizer) {\n                return recognizers[i];\n            }\n        }\n        return null;\n    },\n\n    /**\n     * add a recognizer to the manager\n     * existing recognizers with the same event name will be removed\n     * @param {Recognizer} recognizer\n     * @returns {Recognizer|Manager}\n     */\n    add: function(recognizer) {\n        if (invokeArrayArg(recognizer, 'add', this)) {\n            return this;\n        }\n\n        // remove existing\n        var existing = this.get(recognizer.options.event);\n        if (existing) {\n            this.remove(existing);\n        }\n\n        this.recognizers.push(recognizer);\n        recognizer.manager = this;\n\n        this.touchAction.update();\n        return recognizer;\n    },\n\n    /**\n     * remove a recognizer by name or instance\n     * @param {Recognizer|String} recognizer\n     * @returns {Manager}\n     */\n    remove: function(recognizer) {\n        if (invokeArrayArg(recognizer, 'remove', this)) {\n            return this;\n        }\n\n        recognizer = this.get(recognizer);\n\n        // let's make sure this recognizer exists\n        if (recognizer) {\n            var recognizers = this.recognizers;\n            var index = inArray(recognizers, recognizer);\n\n            if (index !== -1) {\n                recognizers.splice(index, 1);\n                this.touchAction.update();\n            }\n        }\n\n        return this;\n    },\n\n    /**\n     * bind event\n     * @param {String} events\n     * @param {Function} handler\n     * @returns {EventEmitter} this\n     */\n    on: function(events, handler) {\n        if (events === undefined) {\n            return;\n        }\n        if (handler === undefined) {\n            return;\n        }\n\n        var handlers = this.handlers;\n        each(splitStr(events), function(event) {\n            handlers[event] = handlers[event] || [];\n            handlers[event].push(handler);\n        });\n        return this;\n    },\n\n    /**\n     * unbind event, leave emit blank to remove all handlers\n     * @param {String} events\n     * @param {Function} [handler]\n     * @returns {EventEmitter} this\n     */\n    off: function(events, handler) {\n        if (events === undefined) {\n            return;\n        }\n\n        var handlers = this.handlers;\n        each(splitStr(events), function(event) {\n            if (!handler) {\n                delete handlers[event];\n            } else {\n                handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n            }\n        });\n        return this;\n    },\n\n    /**\n     * emit event to the listeners\n     * @param {String} event\n     * @param {Object} data\n     */\n    emit: function(event, data) {\n        // we also want to trigger dom events\n        if (this.options.domEvents) {\n            triggerDomEvent(event, data);\n        }\n\n        // no handlers, so skip it all\n        var handlers = this.handlers[event] && this.handlers[event].slice();\n        if (!handlers || !handlers.length) {\n            return;\n        }\n\n        data.type = event;\n        data.preventDefault = function() {\n            data.srcEvent.preventDefault();\n        };\n\n        var i = 0;\n        while (i < handlers.length) {\n            handlers[i](data);\n            i++;\n        }\n    },\n\n    /**\n     * destroy the manager and unbinds all events\n     * it doesn't unbind dom events, that is the user own responsibility\n     */\n    destroy: function() {\n        this.element && toggleCssProps(this, false);\n\n        this.handlers = {};\n        this.session = {};\n        this.input.destroy();\n        this.element = null;\n    }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n    var element = manager.element;\n    if (!element.style) {\n        return;\n    }\n    var prop;\n    each(manager.options.cssProps, function(value, name) {\n        prop = prefixed(element.style, name);\n        if (add) {\n            manager.oldCssProps[prop] = element.style[prop];\n            element.style[prop] = value;\n        } else {\n            element.style[prop] = manager.oldCssProps[prop] || '';\n        }\n    });\n    if (!add) {\n        manager.oldCssProps = {};\n    }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n    var gestureEvent = document.createEvent('Event');\n    gestureEvent.initEvent(event, true, true);\n    gestureEvent.gesture = data;\n    data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n    INPUT_START: INPUT_START,\n    INPUT_MOVE: INPUT_MOVE,\n    INPUT_END: INPUT_END,\n    INPUT_CANCEL: INPUT_CANCEL,\n\n    STATE_POSSIBLE: STATE_POSSIBLE,\n    STATE_BEGAN: STATE_BEGAN,\n    STATE_CHANGED: STATE_CHANGED,\n    STATE_ENDED: STATE_ENDED,\n    STATE_RECOGNIZED: STATE_RECOGNIZED,\n    STATE_CANCELLED: STATE_CANCELLED,\n    STATE_FAILED: STATE_FAILED,\n\n    DIRECTION_NONE: DIRECTION_NONE,\n    DIRECTION_LEFT: DIRECTION_LEFT,\n    DIRECTION_RIGHT: DIRECTION_RIGHT,\n    DIRECTION_UP: DIRECTION_UP,\n    DIRECTION_DOWN: DIRECTION_DOWN,\n    DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n    DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n    DIRECTION_ALL: DIRECTION_ALL,\n\n    Manager: Manager,\n    Input: Input,\n    TouchAction: TouchAction,\n\n    TouchInput: TouchInput,\n    MouseInput: MouseInput,\n    PointerEventInput: PointerEventInput,\n    TouchMouseInput: TouchMouseInput,\n    SingleTouchInput: SingleTouchInput,\n\n    Recognizer: Recognizer,\n    AttrRecognizer: AttrRecognizer,\n    Tap: TapRecognizer,\n    Pan: PanRecognizer,\n    Swipe: SwipeRecognizer,\n    Pinch: PinchRecognizer,\n    Rotate: RotateRecognizer,\n    Press: PressRecognizer,\n\n    on: addEventListeners,\n    off: removeEventListeners,\n    each: each,\n    merge: merge,\n    extend: extend,\n    assign: assign,\n    inherit: inherit,\n    bindFn: bindFn,\n    prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n//  style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (typeof define === 'function' && define.amd) {\n    define(function() {\n        return Hammer;\n    });\n} else if (typeof module != 'undefined' && module.exports) {\n    module.exports = Hammer;\n} else {\n    window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n","// OOTB Code\n'use strict';\nconst { queryFirst, addClass, queryAll, isInViewport, removeClass, hasClass, scrollTo } = require('./domUtil');\nconst { errorTextTemplate } = require('./templates');\nconst checkoutContainerEl = document.getElementById('checkout-main');\nconst checkoutContainer = queryFirst('.data-checkout-stage');\nconst showClass = 'show';\n\n/**\n * Function to scroll to th first invalid input if it is not in view port\n * @param {HTMLElement} formEl - Form to be validated\n */\nfunction scrollToError(formEl) {\n    const headerEl = queryFirst('.main-header');\n    const headerHeight = headerEl ? headerEl.offsetHeight : 0;\n    const invalidEl = $(formEl)\n        .find('.is-invalid')\n        .first();\n\n    if (invalidEl[0] && !isInViewport(invalidEl[0])) {\n        scrollTo(invalidEl.offset().top - headerHeight);\n    }\n}\n\n/**\n * Validate whole form. Requires `this` to be set to form object\n * @param {jQuery.event} event - Event to be canceled if form is invalid.\n * @returns {boolean} - Flag to indicate if form is valid\n */\nfunction validateForm(event) {\n    var valid = true;\n    if (checkoutContainer) {\n        const billingForm = queryFirst('.billing-address-form', checkoutContainer);\n        if (this === billingForm) {\n            return valid;\n        }\n    }\n    if (this.checkValidity && !this.checkValidity()) {\n        // safari\n        valid = false;\n        if (event) {\n            event.preventDefault();\n            event.stopPropagation();\n            event.stopImmediatePropagation();\n        }\n        scrollToError(this);\n        $(this)\n            .find('input, select')\n            .each(function () {\n                if (!this.validity.valid) {\n                    $(this).trigger('invalid', this.validity);\n                }\n            });\n    }\n    return valid;\n}\n\n/**\n * Remove all validation. Should be called every time before revalidating form\n * @param {element} form - Form to be cleared\n * @returns {void}\n */\nfunction clearForm(form) {\n    $(form)\n        .find('.form-control.is-invalid')\n        .removeClass('is-invalid');\n}\n\n// LP custom changes start\n/**\n * Enable or disable button based on form validity status\n * @param {Object} formElement - form to be validated\n */\nfunction enableOrDisableButton(form) {\n    const button = queryFirst('.enable-button-onvalidate', form);\n    const isValid = queryAll('.is-invalid', form).length === 0;\n\n    button.disabled = !isValid;\n}\n\n// LP custom changes end\n\n/**\n * function returns validation message basedd on fields invalid state\n * @returns {string} Validation message\n */\nfunction getValidationMessage() {\n    let { validationMessage } = this;\n    const $this = $(this);\n    const patternMismatchValue = $this.data('pattern-mismatch');\n    const rangeErrorValue = $this.data('range-error');\n    const missingErrorValue = $this.data('missing-error');\n    const badInputErrorValue = $this.data('bad-input-error');\n    const stepMismatchErrorValue = $this.data('step-mismatch-error');\n    const { patternMismatch, rangeOverflow, rangeUnderflow, tooLong, tooShort, valueMissing, badInput, stepMismatch } = this.validity;\n\n    addClass(this, 'is-invalid');\n    enableOrDisableButton(this.closest('form'));\n\n    if (patternMismatch && patternMismatchValue) {\n        validationMessage = patternMismatchValue;\n    } else if ((rangeOverflow || rangeUnderflow) && rangeErrorValue) {\n        validationMessage = rangeErrorValue;\n    } else if ((tooLong || tooShort) && rangeErrorValue) {\n        validationMessage = rangeErrorValue;\n    } else if (valueMissing && missingErrorValue) {\n        validationMessage = missingErrorValue;\n    } else if (badInput && badInputErrorValue) {\n        validationMessage = badInputErrorValue;\n    } else if (stepMismatch && stepMismatchErrorValue) {\n        validationMessage = stepMismatchErrorValue;\n    }\n    return validationMessage;\n}\n\n/**\n * Displays invalid forms error messages\n * @param {jQuery.event} e - Form invalid event object\n */\nfunction onFormInvalidHandler(e) {\n    e.preventDefault();\n    this.setCustomValidity('');\n    if (!this.validity.valid) {\n        $('.btn-show-details').trigger('click');\n        $(this)\n            .parents('.form-group, .input-group')\n            .find('.invalid-feedback')\n            .text(getValidationMessage.apply(this));\n        if (!checkoutContainerEl) {\n            scrollToError(this.form);\n        }\n    }\n}\n\n/**\n * Form submission event handler\n * @param {jQuery.event} e - Form submit event object\n * @returns {boolean} true if the form is valid\n */\nfunction onFormSubmit(e) {\n    return validateForm.call(this, e);\n}\n\n\n/**\n * Function to check if the password/email and confirm password/email matches in form\n * @param {string} fieldId - ID of the form field\n * @param {boolean} isFieldsMatched - describes if fields matched\n * @param {Object} thisEl - this element\n * @return {Object} - updated form validity and password/email match\n */\nfunction checkFieldsMatch(fieldId, isFieldsMatched, thisEl) {\n    const newFieldValue = queryFirst(fieldId).value;\n    const confirmFieldValue = thisEl.value;\n\n    if (confirmFieldValue && newFieldValue && confirmFieldValue !== newFieldValue) {\n        isFieldsMatched = false;\n    }\n\n    return isFieldsMatched;\n}\n\n/**\n * Runs validation on all INPUT elements within the specified containing element.\n * @param {element} container - The containing element to validate all inputs within\n */\nfunction validateInputs(container) {\n    if (!container) return;\n\n    container.querySelectorAll('input').forEach(element => element.checkValidity());\n}\n\n/**\n * @description Returns function that checks address length, display error and cut input value\n * @param {number} addressLengthLimit - max address length from site preference\n * @param {element} addressForm - address form element\n * @returns {function} - function that checks address length, display error and cut input value\n */\nconst getAddressValidationHandler = (addressLengthLimit, addressForm) => {\n    const formHelpers = require('base/checkout/formErrors');\n    let timeoutID;\n\n    return function (event) {\n        if (timeoutID) {\n            clearTimeout(timeoutID);\n        }\n\n        const addressEl = event.target;\n        timeoutID = setTimeout(() => {\n            if (addressEl.value.length > addressLengthLimit) {\n                formHelpers.loadFormErrors(addressForm, {\n                    [addressEl.getAttribute('name')]: addressEl.getAttribute('data-config-limit-error')\n                });\n                addressEl.value = addressEl.value.slice(0, addressLengthLimit);\n            }\n        }, 500);\n    };\n};\n\nmodule.exports = {\n    invalid: function () {\n        $('form input, form textarea, form select').on('invalid', onFormInvalidHandler);\n    },\n\n    ajaxFormInvalid: function (formElSelector) {\n        if (!formElSelector) return;\n        $(`${formElSelector} input, ${formElSelector} textarea, ${formElSelector} select`).on('invalid', onFormInvalidHandler);\n    },\n\n    submit: function () {\n        $('form').on('submit', onFormSubmit);\n    },\n\n    ajaxFormSubmit: function (formElSelector) {\n        if (!formElSelector) return;\n        $(`${formElSelector}`).on('submit', onFormSubmit);\n    },\n\n    validateAddressForm: function () {\n        const addressForm = queryFirst('.address-form');\n        if (addressForm) {\n            const address1 = queryFirst('#address1', addressForm);\n            const address2 = queryFirst('#address2', addressForm);\n            const addressLimit = address1.getAttribute('data-address-lengt-limit');\n            if (addressLimit) {\n                const addressValidationHandler = getAddressValidationHandler(addressLimit, addressForm);\n                address1.addEventListener('keyup', addressValidationHandler);\n                address2.addEventListener('keyup', addressValidationHandler);\n            }\n        }\n    },\n\n    validateCheckoutForm: function () {\n        // LP custom changes start\n        if (checkoutContainer) {\n            const guestCustomerForm = queryFirst('.guest-form', checkoutContainer);\n            const registeredCustomerForm = queryFirst('.registered-form', checkoutContainer);\n            const shippingForm = queryFirst('.shipping-form', checkoutContainer);\n            const billingForm = queryFirst('.billing-address-form', checkoutContainer);\n            const submitShippingBtn = queryFirst('.submit-shipping', checkoutContainer);\n            const billingAddress = queryFirst('.billing-address', billingForm);\n            const reauthForm = queryFirst('.reauth-payment-form', checkoutContainer);\n\n            if (submitShippingBtn !== null) {\n                submitShippingBtn.disabled = false;\n            }\n            // LP custom changes end\n\n            $('.guest-form, .registered-form, .shipping-form, .billing-address-form, .gift-card-container')\n                .find('input, textarea')\n                .on('blur', function () {\n                    if (this.validity.valid) {\n                        removeClass(this, 'is-invalid');\n                    } else {\n                        $(this)\n                            .parents('.form-group, .input-group')\n                            .find('.invalid-feedback')\n                            .text(getValidationMessage.apply(this));\n                    }\n                });\n            $('.shipping-form, .billing-address-form')\n                .find('select, input[type=\"radio\"], input[type=\"checkbox\"]')\n                .on('change', function () {\n                    if (this.validity.valid) {\n                        removeClass(this, 'is-invalid');\n                    } else {\n                        $(this)\n                            .parents('.form-group')\n                            .find('.invalid-feedback')\n                            .text(getValidationMessage.apply(this));\n                    }\n                });\n            if (!reauthForm) {\n                const submitCustomerBtn = queryFirst('.submit-customer', checkoutContainer);\n                const submitCustomerLoginBtn = queryFirst('.submit-customer-login', checkoutContainer);\n                if (submitCustomerBtn) {\n                    submitCustomerBtn.addEventListener('click', function (event) {\n                        if (guestCustomerForm.checkValidity && !guestCustomerForm.checkValidity()) {\n                            event.stopPropagation();\n                            scrollToError(guestCustomerForm);\n                        }\n                    });\n                }\n                if (submitCustomerLoginBtn) {\n                    submitCustomerLoginBtn.addEventListener('click', function (event) {\n                        if (registeredCustomerForm.checkValidity && !registeredCustomerForm.checkValidity()) {\n                            event.stopPropagation();\n                            scrollToError(registeredCustomerForm);\n                        }\n                    });\n                }\n\n                const shippingAddress1 = queryFirst('.shippingAddressOne', shippingForm);\n                const shippingAddress2 = queryFirst('.shippingAddressTwo', shippingForm);\n                const shippingAddressLimit = shippingAddress1.getAttribute('data-address-lengt-limit');\n                if (shippingAddressLimit) {\n                    const shippingAddressValidationHandler = getAddressValidationHandler(shippingAddressLimit, shippingForm);\n                    shippingAddress1.addEventListener('keyup', shippingAddressValidationHandler);\n                    shippingAddress2.addEventListener('keyup', shippingAddressValidationHandler);\n                }\n\n                const billingAddress1 = queryFirst('.billingAddressOne', billingForm);\n                const billingAddress2 = queryFirst('.billingAddressTwo', billingForm);\n                const billingAddressLimit = billingAddress1.getAttribute('data-address-lengt-limit');\n                const billingAddressValidationHandler = getAddressValidationHandler(billingAddressLimit, billingForm);\n                if (billingAddressLimit) {\n                    billingAddress1.addEventListener('keyup', billingAddressValidationHandler);\n                    billingAddress2.addEventListener('keyup', billingAddressValidationHandler);\n                }\n\n                shippingForm.addEventListener('submit', function (event) {\n                    event.preventDefault();\n                    setTimeout(function () {\n                        submitShippingBtn.click();\n                    }, 0);\n                });\n\n                submitShippingBtn.addEventListener('click', function (event) {\n                    const shippingForm = queryFirst('.shipping-form');\n                    const errorElement = queryFirst('.error-message');\n                    const { shippingError } = this.dataset;\n                    const { addressMode } = shippingForm.dataset;\n                    const { customerType } = checkoutContainer.dataset;\n\n                    removeClass(errorElement, showClass);\n\n                    if (customerType === 'registered') {\n                        if (addressMode === 'new' || addressMode === 'details') {\n                            if (shippingForm.checkValidity && !shippingForm.checkValidity()) {\n                                event.stopPropagation();\n                                errorElement.innerHTML = errorTextTemplate(shippingError);\n                                addClass(errorElement, showClass);\n                                scrollTo(0);\n                            }\n                        } else {\n                            const giftMessageEl = document.getElementById('giftMessage');\n                            if (giftMessageEl && !giftMessageEl.validity.valid) {\n                                addClass(giftMessageEl, 'is-invalid');\n                                event.stopPropagation();\n                            } else {\n                                removeClass(giftMessageEl, 'is-invalid');\n                            }\n                        }\n                    } else if (shippingForm.checkValidity && !shippingForm.checkValidity()) {\n                        event.stopPropagation();\n                        errorElement.innerHTML = errorTextTemplate(shippingError);\n                        addClass(errorElement, showClass);\n                        scrollTo(0);\n                    }\n                });\n\n                const submitPaymentBtn = queryFirst('.submit-payment', checkoutContainer);\n\n                submitPaymentBtn.addEventListener('click', function (event) {\n                    const { customerType } = checkoutContainer.dataset;\n                    const isPaymentDisabled = hasClass(queryFirst('.payment-information'), 'disabled-section');\n                    const isCreditTabActive = hasClass(queryFirst('.credit-card-tab', checkoutContainer), 'active');\n                    const isNewPayment = $('.payment-information').data('is-new-payment');\n                    const isRequired = !isPaymentDisabled && isCreditTabActive;\n\n                    if (customerType === 'registered') {\n                        const savedPaymentCvv = queryFirst('.saved-payment-security-code');\n                        if (savedPaymentCvv) {\n                            savedPaymentCvv.required = isRequired && !isNewPayment;\n                        }\n                    }\n                    if (billingForm.checkValidity && !billingForm.checkValidity()) {\n                        scrollToError(billingForm);\n                        event.stopPropagation();\n                    }\n                });\n\n                billingForm.addEventListener('submit', function (event) {\n                    event.preventDefault();\n                    setTimeout(function () {\n                        // if the payment button is hidden, it's because CC is not active\n                        // and therefore we shouldn't click it\n                        if (!hasClass(submitPaymentBtn, 'd-none')) {\n                            submitPaymentBtn.click();\n                        }\n                    }, 0);\n                });\n\n                queryFirst('#billingAddressSelector').addEventListener('change', () => {\n                    if (checkoutContainer.dataset.checkoutStage === 'payment') {\n                        clearForm(billingAddress.closest('form'));\n                        validateInputs(billingAddress);\n                    }\n                });\n\n                const addressLinks = queryAll('.billing-address-block .address-links a');\n\n                addressLinks.forEach(link => {\n                    link.addEventListener('click', () => {\n                        clearForm(billingAddress.closest('form'));\n                    });\n                });\n\n                if (checkoutContainer.dataset.checkoutStage === 'payment') {\n                    $(() => {\n                        validateInputs(billingAddress);\n                    });\n                }\n            } else {\n                const submitReauthBtn = queryFirst('.submit-payment-button', checkoutContainer);\n                submitReauthBtn.addEventListener('click', function (event) {\n                    event.preventDefault();\n                    $.spinner().start();\n                    submitReauthBtn.disabled = true;\n                    if (billingForm.checkValidity && !billingForm.checkValidity()) {\n                        scrollToError(billingForm);\n                        submitReauthBtn.disabled = false;\n                        $.spinner().stop();\n                        event.stopPropagation();\n                    } else {\n                        billingForm.submit();\n                    }\n                });\n            }\n        }\n    },\n\n    enableFormSubmitButton: function () {\n        const formElements = queryAll('.enable-form-validate');\n\n        formElements.forEach(form => {\n            const button = queryFirst('.enable-button-onvalidate', form);\n\n            const callback = function () {\n                if (this.validity.valid) {\n                    removeClass(this, 'is-invalid');\n                } else {\n                    addClass(this, 'is-invalid');\n                    queryFirst('.invalid-feedback', this.closest('.form-group')).textContent = getValidationMessage.apply(this);\n                }\n\n                enableOrDisableButton(form);\n            };\n\n            const checkMatchedFields = function () {\n                const { matchId } = this.dataset;\n                const confirmEl = queryFirst(`.js-matched-confirm-field[type=${this.type}]`, form);\n                let isFieldMatched = checkFieldsMatch(matchId, true, this);\n\n                if (confirmEl && this.validity.valid) {\n                    if (isFieldMatched) {\n                        removeClass(confirmEl, 'is-invalid');\n                    } else {\n                        addClass(confirmEl, 'is-invalid');\n                        queryFirst('.invalid-feedback', confirmEl.closest('.form-group')).textContent = confirmEl.dataset.mismatchError;\n                    }\n                }\n\n                enableOrDisableButton(form);\n            };\n\n            const checkPasswordFields = function () {\n                const selectorContainer = $('.valid-password-info li');\n                const notMatchedClass = 'pwd-criteria-not-matched';\n                const matchedClass = 'pwd-criteria-matched';\n\n                if (this.validity.valid) {\n                    removeClass(this, 'is-invalid');\n                    selectorContainer.removeClass(notMatchedClass);\n                    selectorContainer.addClass(matchedClass);\n                } else {\n                    const $this = $(this);\n                    const thisValue = $this.val();\n\n                    if (hasClass(form, 'change-password-form') && thisValue) {\n                        selectorContainer.each(function (i) {\n                            const item = selectorContainer[i];\n                            const regexPattern = item.dataset.regexpattern;\n                            const regexValue = new RegExp(regexPattern);\n                            if (regexValue.test(thisValue)) {\n                                removeClass(item, notMatchedClass);\n                                addClass(item, matchedClass);\n                            } else {\n                                removeClass(item, matchedClass);\n                                addClass(item, notMatchedClass);\n                            }\n                        });\n\n                        selectorContainer.closest('ul').addClass('padding-none');\n                        queryFirst('.invalid-feedback', this.closest('.form-group')).textContent = '';\n                    }\n                }\n            };\n\n            if (form && button) {\n                const $form = $(form);\n\n                $form.find('input, textarea').on('blur', callback);\n                $form.find('.js-matched-field').on('blur', checkMatchedFields);\n                $form.find('#newPassword, #registration-form-password').on('keyup', checkPasswordFields);\n                $form.find('select, input[type=\"radio\"], input[type=\"checkbox\"]').on('change', callback);\n                $form.on('change', '.g-recaptcha-response', callback);\n            }\n        });\n    },\n\n    buttonClick: function () {\n        $('form button[type=\"submit\"], form input[type=\"submit\"]').on('click', function () {\n            // clear all errors when trying to submit the form\n            if (!$('.reauth-payment-form').length) {\n                clearForm($(this).parents('form'));\n            }\n        });\n    },\n\n    functions: {\n        validateForm: function (form, event) {\n            validateForm.call($(form), event || null);\n        },\n        validateInputs,\n        clearForm,\n        enableOrDisableButton,\n        getValidationMessage\n    }\n};\n","'use strict';\n\nconst { queryFirst, queryAll, addClass, removeClass, hasClass, debounce } = require('../domUtil');\n\nconst SCROLLABLE_CONTENT_SELECTOR = queryAll('.scrollable-content');\nconst LEFT_ARROW_SELECTOR = '.scroll-left-arrow';\nconst RIGHT_ARROW_SELECTOR = '.scroll-right-arrow';\n\n/**\n * Initialize the carousel.\n * @param {HTMLElement} scrollableContainerEl - The scrollable container element.\n */\nfunction initSpecificCarousel(scrollableContainerEl) {\n    const parentEl = scrollableContainerEl.parentElement;\n\n    // Attaching events on Left arrow click\n    const leftArrowEl = queryFirst(LEFT_ARROW_SELECTOR, parentEl);\n    if (leftArrowEl) {\n        leftArrowEl.addEventListener('click', () => {\n            scrollableContainerEl.scrollTo({\n                left: Math.max(0, scrollableContainerEl.scrollLeft - scrollableContainerEl.offsetWidth),\n                behavior: 'smooth'\n            });\n        });\n    }\n\n    // Attaching events on Right arrow click\n    const rightArrowEl = queryFirst(RIGHT_ARROW_SELECTOR, parentEl);\n    if (rightArrowEl) {\n        rightArrowEl.addEventListener('click', () => {\n            scrollableContainerEl.scrollTo({\n                left: Math.min(scrollableContainerEl.scrollWidth, scrollableContainerEl.scrollLeft + scrollableContainerEl.offsetWidth),\n                behavior: 'smooth'\n            });\n        });\n    }\n\n    // Hide left arrow on carousel initialization.\n    addClass(leftArrowEl, 'hide');\n\n    // Hide both the arrows, if the items are not scrollable.\n    if (scrollableContainerEl.scrollWidth <= scrollableContainerEl.offsetWidth) {\n        addClass(rightArrowEl, 'hide');\n    } else {\n        removeClass(rightArrowEl, 'hide');\n        const callback = () => {\n            const { scrollWidth, scrollLeft, offsetWidth } = scrollableContainerEl;\n            const offsetValue = 5;\n            if (scrollWidth - scrollLeft - offsetWidth < offsetValue) {\n                // Hide the right arrow, if content is scrolled to right end.\n                if (hasClass(leftArrowEl, 'hide')) {\n                    removeClass(leftArrowEl, 'hide');\n                }\n                if (!hasClass(rightArrowEl, 'hide')) {\n                    addClass(rightArrowEl, 'hide');\n                }\n            } else if (scrollLeft === 0) {\n                // Hide the left arrow, if content is scrolled to left end.\n                if (!hasClass(leftArrowEl, 'hide')) {\n                    addClass(leftArrowEl, 'hide');\n                }\n                if (hasClass(rightArrowEl, 'hide')) {\n                    removeClass(rightArrowEl, 'hide');\n                }\n            } else {\n                // Display both the arrows, if content is scrolled neither of the ends.\n                if (hasClass(leftArrowEl, 'hide')) {\n                    removeClass(leftArrowEl, 'hide');\n                }\n                if (hasClass(rightArrowEl, 'hide')) {\n                    removeClass(rightArrowEl, 'hide');\n                }\n            }\n        };\n        scrollableContainerEl.addEventListener('scroll', debounce(callback, 300));\n    }\n}\n\nmodule.exports = {\n    initCarousel: function() {\n        SCROLLABLE_CONTENT_SELECTOR.forEach(scrollableContainerEl => {\n            initSpecificCarousel(scrollableContainerEl);\n        });\n    },\n    initSpecificCarousel: initSpecificCarousel\n};\n","/* global _etmc */\n'use strict';\n\nconst hasEtmc = typeof _etmc !== 'undefined';\n\n/**\n * Send trackCart event to SFMC\n * @param {Object} data data to send to SFMC\n */\nexport function trackCart(data) {\n    if (hasEtmc && 'trackCart' in _etmc) {\n        _etmc.trackCart(data);\n    }\n}\n\n/**\n * Send trackPageView event to SFMC\n * @param {Object} data data to send to SFMC\n */\nexport function trackPageView(data) {\n    if (hasEtmc && 'trackPageView' in _etmc) {\n        _etmc.trackPageView(data);\n    }\n}\n\n/**\n * Send trackWishlist event to SFMC\n * @param {Object} data data to send to SFMC\n */\nexport function trackWishlist(data) {\n    if (hasEtmc && 'trackWishlist' in _etmc) {\n        _etmc.trackWishlist(data);\n    }\n}\n\n/**\n * Send setUserInfo event to SFMC\n * @param {Object} data data to send to SFMC\n */\nexport function setUserInfo(data) {\n    if (hasEtmc && 'setUserInfo' in _etmc) {\n        _etmc.setUserInfo(data);\n    }\n}\n","'use strict';\n\nimport { queryFirst, queryAll, addClass, removeClass, remove, scrollTo, throttle } from '../domUtil';\n\nimport { initOnce, getNestedValue } from '../util';\n\nconst $window = $(window);\nconst $document = $(document);\nconst $body = $('body');\nconst activeClass = 'active';\n\nconst getOffsetTop = element => {\n    let offsetTop = 0;\n    while (element) {\n        offsetTop += element.offsetTop;\n        element = element.offsetParent;\n    }\n    return offsetTop;\n};\n\nconst handleDesktopCarousel = carousel => {\n    let indicators = queryFirst('.image-slide-indicators', carousel);\n\n    if (window.matchMedia('(min-width: 768px)').matches) {\n        removeClass(carousel, 'slide');\n\n        let slideItem = queryFirst('.slider-inner .slider-item:first-of-type', carousel);\n\n        if (slideItem && indicators) {\n            if (!slideItem.offsetHeight) {\n                setTimeout(() => {\n                    slideItem = queryFirst('.slider-inner .slider-item:first-of-type', carousel);\n\n                    if (slideItem) {\n                        const slideIndicatorPosition = slideItem.offsetTop + (slideItem.offsetHeight - indicators.offsetHeight) / 2;\n\n                        indicators.style.top = slideIndicatorPosition + 'px';\n                    }\n                }, 2400);\n            } else {\n                const slideIndicatorPosition = slideItem.offsetTop + (slideItem.offsetHeight - indicators.offsetHeight) / 2;\n\n                indicators.style.top = slideIndicatorPosition + 'px';\n            }\n        }\n\n        $(carousel).on('slide.bs.carousel', function (e) {\n            e.preventDefault();\n\n            const headerHeight = queryFirst('header.main-header').offsetHeight;\n\n            scrollTo($(e.relatedTarget).offset().top - headerHeight);\n        });\n    } else {\n        addClass(carousel, 'slide');\n\n        if (indicators) {\n            removeClass(indicators, 'position-fixed');\n            indicators.style.top = '';\n        }\n    }\n};\n\nconst handleCarouselOnScroll = carousel => {\n    let currentScrollPos = window.scrollY || window.pageYOffset;\n    let ticking = false;\n\n    const carouselIndicatorScroll = () => {\n        ticking = false;\n        if (window.matchMedia('(min-width: 768px)').matches) {\n            const indicators = queryFirst('.image-slide-indicators', carousel);\n            const sliderContainer = carousel.closest('.scrollable-product-item');\n            const sliderContainerOffsetTop = getOffsetTop(sliderContainer);\n            const sliderContainerOffsetEnd = sliderContainerOffsetTop + sliderContainer.offsetHeight - queryFirst('.slider-item', carousel).offsetHeight + indicators.offsetHeight / 2;\n            if (sliderContainerOffsetTop < currentScrollPos && sliderContainerOffsetEnd >= currentScrollPos) {\n                addClass(indicators, 'position-fixed');\n            } else {\n                removeClass(indicators, 'position-fixed');\n            }\n\n            const scrollDistance = -sliderContainer.getBoundingClientRect().top + 200;\n\n            let activeIndex = 1;\n            queryAll('.slider-item', carousel).some((el, i) => {\n                if (el.offsetTop < scrollDistance && scrollDistance < el.offsetTop + el.offsetHeight) {\n                    activeIndex = i + 1;\n                    return true;\n                }\n                return false;\n            });\n            removeClass(queryAll('.slider-item', carousel), activeClass);\n            removeClass(queryAll('.image-slide-indicators li', carousel), activeClass);\n            addClass(queryFirst('.image-slide-indicators li:nth-child(' + activeIndex + ')', carousel), activeClass);\n            addClass(queryFirst('.slider-item:nth-child(' + activeIndex + ')', carousel), activeClass);\n        }\n    };\n    const requestTick = () => {\n        if (!ticking) {\n            requestAnimationFrame(carouselIndicatorScroll);\n        }\n        ticking = true;\n    };\n    const onScroll = () => {\n        currentScrollPos = window.scrollY || window.pageYOffset;\n        requestTick(carousel);\n    };\n    $window.scroll(onScroll);\n};\n\nconst initScrollSlider = carousels => {\n    if (!Array.isArray(carousels)) {\n        const array = [].slice.call(carousels, 0);\n        carousels = array.length ? array : [carousels];\n    }\n\n    carousels.forEach(carousel => {\n        if (queryFirst('.carousel-indicators:not(.jw-pdp)', carousel)) {\n            handleDesktopCarousel(carousel);\n        }\n\n        initOnce(\n            carousel,\n            undefined,\n            () => {\n                if (queryFirst('.carousel-indicators:not(.jw-pdp)', carousel)) {\n                    handleCarouselOnScroll(carousel);\n                }\n            },\n            'scrollSlider'\n        );\n    });\n};\n\n$document.ready(function () {\n    $('.carousel').each(function () {\n        // Initilize carousel and stop swipe propagations only if slides count is more than 1\n        if ($(this).find('.carousel-inner').length > 1) {\n            $(this).carousel();\n        }\n\n    });\n    if (window.matchMedia('(min-width: 768px)').matches) {\n        $('.scrollable-product-item:not(.grid-product) .primary-images .carousel').carousel('dispose');\n    }\n    initScrollSlider(queryAll('.scrollable-product-item:not(.grid-product) .carousel'));\n\n    $body.on('product:imageLoad', (e, response) => {\n        let carousel = queryFirst('.carousel', response.container);\n        const isScrollableProductItem = carousel && $(carousel).closest('.scrollable-product-item:not(.grid-product)').length;\n\n        if (isScrollableProductItem) {\n            let carouselIndicatorsElement = queryFirst('.carousel-indicators:not(.jw-pdp)', carousel);\n            if (carouselIndicatorsElement) {\n                addClass(carouselIndicatorsElement, 'image-slide-indicators');\n                addClass(queryFirst('.carousel-inner', carousel), 'slider-inner');\n                addClass(queryAll('.carousel-item', carousel), 'slider-item');\n                remove(queryAll('.carousel > a'));\n                initScrollSlider(carousel);\n            }\n        }\n    });\n});\n\n$window.resize(\n    throttle(() => {\n        initScrollSlider(queryAll('.scrollable-product-item:not(.grid-product) .carousel'));\n        const pdpCarouselEl = queryFirst('.pdp-container .carousel.image-slider');\n        if (pdpCarouselEl) {\n            pdpCarouselEl.style.minHeight = '';\n        }\n    })\n);\n\n/**\n * Fixes a bug in Safari 15 where swiping on images is very difficult\n * due to safari being overly sensitive to diagonal scrolling\n * Solution adapted from: http://web.archive.org/web/20220415194859/https://wpdevdesign.com/fixing-flickitys-issue-with-ios15-safari/\n */\nfunction initCarouselSwipeListener() {\n    let isTouchingCarousel = false;\n    let startCoord;\n\n    document.addEventListener('touchstart', e => {\n        isTouchingCarousel = !!e.target.closest('.carousel.image-slider');\n        startCoord = getNestedValue(e, 'touches[0].pageX');\n    });\n\n    document.addEventListener('touchmove', e => {\n        const currentCoord = getNestedValue(e, 'touches[0].pageX');\n        const coordsAreNumbers = typeof startCoord === 'number' && typeof currentCoord === 'number';\n\n        // don't do anything if the user isn't touching the carousel,\n        // if the event isn't cancelable,\n        // or if the user didn't scroll enough in the x direction (i.e. is scrolling vertically)\n        if (!isTouchingCarousel || !e.cancelable || (coordsAreNumbers && Math.abs(currentCoord - startCoord) < 16)) {\n            return;\n        }\n\n        e.preventDefault();\n        e.stopPropagation();\n    }, { passive: false });\n}\n\ninitCarouselSwipeListener();","// Classnames\nconst DISABLED_CLASS = 'disabled-section';\nconst NOT_AVAILABLE_CLASS = 'not-available';\nconst ISPU_STORE_NAME_CLASS = 'store-name';\nconst ISPU_SERVICE_ERROR_ATTR_NAME = 'data-ispu-service-down';\nconst ISPU_SERVICE_BLOCKED = 'service-blocked';\nconst PRE_ORDER_CLASS = 'pre-order';\nconst SHIP_TO_LOW_INVENTORY_CLASS = 'ship-to-low-inventory';\nconst CHECKOUT_HIDDEN_CLASS = 'checkout-hidden';\nconst PDP_SET_PAGE = 'product-set-item';\n\n// Container selectors\nconst PRODUCT_DETAIL_CONTAINER_SELECTOR = '.product-detail';\nconst PDP_CONTAINER_SELECTOR = '.pdp-container';\nconst SHIPPING_PREFERENCES_CONTAINER_SELECTOR = '.shipping-preferences';\nconst STORE_DETAIL_CONTAINER_SELECTOR = SHIPPING_PREFERENCES_CONTAINER_SELECTOR + ' .store-detail-container';\n\n// Radio buttons classes\nconst PREFERENCE_SELECTOR = 'input[name=\"shipping-preference\"]:checked';\nconst ISPU_PREFERENCE_CONTAINER_SELECTOR = '.ispu-preference-container';\nconst ISPU_PREFERENCE_CONTENT_SELECTOR = ISPU_PREFERENCE_CONTAINER_SELECTOR + ' .content';\nconst SHIPPING_PREFERENCE_RADIO_BUTTON_SELECTOR = 'input[name=shipping-preference]';\nconst ISPU_RADIO_SELECTOR = SHIPPING_PREFERENCES_CONTAINER_SELECTOR + ' .preference-ispu';\nconst SHIP_TO_ADDRESS_RADIO_SELECTOR = SHIPPING_PREFERENCES_CONTAINER_SELECTOR + ' .preference-ship-to-address';\nconst SHIP_TO_ADDRESS_CONTENT_SELECTOR = '.ship-to-address-preference-container .content';\nconst RADIO_BUTTON_LABEL_SELECTOR = '.form-check-label';\n\n// Radio button values\nconst SHIPPING_PREFERENCE_KEY = 'SHIPPING_PREFERENCE';\nconst ISPU_RADIO_VALUE = 'ISPU';\nconst SHIP_TO_RADIO_VALUE = 'SHIP_TO_ADDRESS';\nconst BOLT_PAY = 'BOLT_PAY';\n\n// Change Store link\nconst CHANGE_STORE_LINK_SELECTOR = '.change-store-link';\n\n// Store name and store address section\nconst STORE_DETAIL_SELECTOR = SHIPPING_PREFERENCES_CONTAINER_SELECTOR + ' .store-detail';\n\n// Inventory and service messages\nconst STORE_SERVICE_INFO_MESSAGE_SELECTOR = SHIPPING_PREFERENCES_CONTAINER_SELECTOR + ' .service-info-message';\nconst STORE_AVAILABILITY_MESSAGE_SELECTOR = SHIPPING_PREFERENCES_CONTAINER_SELECTOR + ' .inventory-message';\n\nconst ISPU_INFO_MESSAGE_SELECTOR = SHIPPING_PREFERENCES_CONTAINER_SELECTOR + ' .ispu-info-message';\nconst SHIP_TO_INFO_MESSAGE_SELECTOR = SHIPPING_PREFERENCES_CONTAINER_SELECTOR + ' .ship-to-info-message';\n\nconst ISPU_SELECT_STYLE_MESSAGE_SELECTOR = ISPU_PREFERENCE_CONTAINER_SELECTOR + ' .select-size-info-msg';\n\n//Availability Message Element\nconst AVAILABILITY_MSG_SELECTOR = '.product-availability .availability-message-text';\n//Inventory Message Element of ISPU\nconst INVENTORY_MSG_SELECTOR = '.inventory-message .availability-message-text';\n//Low Stock Message Element of ISPU\nconst LOW_STOCK_ISPU_SELECTOR = '.product-availability .ispu-low-stock-msg';\n//Regular Expression for Valid WishList Name\nconst WISHLIST_NAME_REGEX = /^[ A-Za-z0-9\\]\\.()[{},;:\"'?!\\u2026\\u2018\\u2019\\u201B\\u201C\\u201D\\u2014\\u2013-]*$/;\n//Regular Expression for Valid Postal Code for Loyalty\nconst LOYALTY_POSTAL_CODE_REGEX = /^\\d{5}$/;\n\nconst TRACKER_FUNCTIONAL_COOKIE = 'C0003';\nconst MY_ACCOUNT = 'myAccount';\nconst ORDER_CONFIRMATION = 'orderConfirmation';\n\nmodule.exports = {\n    DISABLED_CLASS,\n    NOT_AVAILABLE_CLASS,\n    ISPU_STORE_NAME_CLASS,\n    PRE_ORDER_CLASS,\n    SHIP_TO_LOW_INVENTORY_CLASS,\n    ISPU_SERVICE_ERROR_ATTR_NAME,\n    ISPU_SERVICE_BLOCKED,\n    CHECKOUT_HIDDEN_CLASS,\n    PDP_SET_PAGE,\n\n    PRODUCT_DETAIL_CONTAINER_SELECTOR,\n    PDP_CONTAINER_SELECTOR,\n    SHIPPING_PREFERENCES_CONTAINER_SELECTOR,\n    STORE_DETAIL_CONTAINER_SELECTOR,\n\n    PREFERENCE_SELECTOR,\n    ISPU_PREFERENCE_CONTAINER_SELECTOR,\n    ISPU_PREFERENCE_CONTENT_SELECTOR,\n    SHIP_TO_ADDRESS_CONTENT_SELECTOR,\n    SHIPPING_PREFERENCE_RADIO_BUTTON_SELECTOR,\n    ISPU_RADIO_SELECTOR,\n    SHIP_TO_ADDRESS_RADIO_SELECTOR,\n    RADIO_BUTTON_LABEL_SELECTOR,\n    SHIPPING_PREFERENCE_KEY,\n    ISPU_RADIO_VALUE,\n    SHIP_TO_RADIO_VALUE,\n    BOLT_PAY,\n\n    CHANGE_STORE_LINK_SELECTOR,\n    STORE_DETAIL_SELECTOR,\n    STORE_SERVICE_INFO_MESSAGE_SELECTOR,\n    STORE_AVAILABILITY_MESSAGE_SELECTOR,\n    ISPU_INFO_MESSAGE_SELECTOR,\n    SHIP_TO_INFO_MESSAGE_SELECTOR,\n    ISPU_SELECT_STYLE_MESSAGE_SELECTOR,\n    AVAILABILITY_MSG_SELECTOR,\n    INVENTORY_MSG_SELECTOR,\n    LOW_STOCK_ISPU_SELECTOR,\n    WISHLIST_NAME_REGEX,\n    TRACKER_FUNCTIONAL_COOKIE,\n    LOYALTY_POSTAL_CODE_REGEX,\n    MY_ACCOUNT,\n    ORDER_CONFIRMATION\n};\n","'use strict';\n\nconst { queryFirst, addClass, removeClass, hasClass } = require('../../domUtil');\nconst { getNestedValue } = require('../../util');\nconst {\n    PREFERENCE_SELECTOR, ISPU_STORE_NAME_CLASS, SHIPPING_PREFERENCES_CONTAINER_SELECTOR,\n    ISPU_RADIO_SELECTOR, SHIP_TO_ADDRESS_RADIO_SELECTOR, CHANGE_STORE_LINK_SELECTOR,\n    ISPU_PREFERENCE_CONTENT_SELECTOR, SHIP_TO_ADDRESS_CONTENT_SELECTOR, DISABLED_CLASS,\n    SHIP_TO_RADIO_VALUE, RADIO_BUTTON_LABEL_SELECTOR, SHIP_TO_LOW_INVENTORY_CLASS,\n    STORE_AVAILABILITY_MESSAGE_SELECTOR, INVENTORY_MSG_SELECTOR, ISPU_RADIO_VALUE, AVAILABILITY_MSG_SELECTOR, LOW_STOCK_ISPU_SELECTOR\n} = require('./constants');\nconst { HIDDEN_CLASS } = require('../../constants');\nconst { handleNotifyMe } = require('../../product/helper');\n\n/**\n * Function to get shipping preferences container within product container\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {Object} returns the target as a DOM node\n */\nfunction getChangeStoreLinkEl(productContainerEl) {\n    return queryFirst(CHANGE_STORE_LINK_SELECTOR, productContainerEl);\n}\n\n/**\n * Function to get shipping preferences container within product container\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {Object} returns the target as a DOM node\n */\nfunction getShippingPreferencesContainerEl(productContainerEl) {\n    return queryFirst(SHIPPING_PREFERENCES_CONTAINER_SELECTOR, productContainerEl);\n}\n\n/**\n * Function to get ISPU radio button within product container\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {Object} returns the target as a DOM node\n */\nfunction getISPUradioButtonEl(productContainerEl) {\n    return queryFirst(ISPU_RADIO_SELECTOR, productContainerEl);\n}\n\n/**\n * Function to get Ship To section's content within product container\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {Object} returns the target as a DOM node\n */\nfunction getShipToAddressContentEl(productContainerEl) {\n    return queryFirst(SHIP_TO_ADDRESS_CONTENT_SELECTOR, productContainerEl);\n}\n\n/**\n * Function to get ship to address radio button within product container\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {Object} returns the target as a DOM node\n */\nfunction getShipToAddressradioButtonEl(productContainerEl) {\n    return queryFirst(SHIP_TO_ADDRESS_RADIO_SELECTOR, productContainerEl);\n}\n\n/**\n * Function to get ISPU content radio button within product container\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {Object} returns the target as a DOM node\n */\nfunction getISPUPreferenceContentEl(productContainerEl) {\n    return queryFirst(ISPU_PREFERENCE_CONTENT_SELECTOR, productContainerEl);\n}\n\n/**\n * Function to get selected radio button preference within product container\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {Object} returns the target as a DOM node\n */\nfunction getSelectedPreferenceEl(productContainerEl) {\n    return queryFirst(PREFERENCE_SELECTOR, productContainerEl);\n}\n\n/**\n * Function to get add a ISPU required class to make ISPU - ADD TO CART work\n * @param {HTMLElement} productContainerEl - Product container Element\n * @param {HTMLElement?} storeNameEl - optional store name element\n */\nfunction addStoreNameClass(productContainerEl, storeNameEl) {\n    storeNameEl = storeNameEl || queryFirst('.store-detail .name', productContainerEl);\n    if (storeNameEl) {\n        addClass(storeNameEl, ISPU_STORE_NAME_CLASS);\n    }\n}\n\n/**\n * Function to get remove a ISPU required class to make SHIP TO - ADD TO CART work\n * @param {HTMLElement} productContainerEl - Product container Element\n * @param {HTMLElement?} storeNameEl - optional store name element\n */\nfunction removeStoreNameClass(productContainerEl, storeNameEl) {\n    storeNameEl = storeNameEl || queryFirst('.store-detail .name', productContainerEl);\n    if (storeNameEl) {\n        removeClass(storeNameEl, ISPU_STORE_NAME_CLASS);\n    }\n}\n\n/**\n * Function to check if a size is selected or not\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {Object} returns the target as a DOM node\n */\nfunction getSelectedSizeEl(productContainerEl) {\n    return queryFirst('.size-btn.selected', productContainerEl);\n}\n\n/**\n * Function to update Visibility Of Low Inventory Msg for ISPU and Ship To an address\n * @param {HTMLElement} productContainerEl - Product container Element\n */\nfunction updateVisibilityOfLowInventoryMsg(productContainerEl) {\n    const ispuLowStockEl = queryFirst(LOW_STOCK_ISPU_SELECTOR, productContainerEl);\n    const availabilityElement = queryFirst(AVAILABILITY_MSG_SELECTOR, productContainerEl);\n    const ispuLowInventory = queryFirst(STORE_AVAILABILITY_MESSAGE_SELECTOR);\n    const ispuLowInventoryMsg = queryFirst(INVENTORY_MSG_SELECTOR, productContainerEl);\n    const ispuRadioButtonEl = getISPUradioButtonEl(productContainerEl);\n    const notifyMeButton = queryFirst('.notify-me-btn', productContainerEl);\n    const notifyMeDesc = queryFirst('.notify-me-desc', productContainerEl);\n    const addToCartSection = queryFirst('.prices-add-to-cart-actions', productContainerEl);\n    const selectedSizeElement = queryFirst('.size-btn.selected', productContainerEl);\n    // If ISPU enabled, setting the message only after ispu inventory is created\n    // one of the radio button is selected\n    if (ispuRadioButtonEl && window.ispuProductInventory) {\n        if (ispuRadioButtonEl.checked) {\n            removeClass(addToCartSection, HIDDEN_CLASS);\n            addClass([notifyMeDesc, notifyMeButton], HIDDEN_CLASS);\n            removeClass(selectedSizeElement, 'not-available')\n            addClass(availabilityElement, HIDDEN_CLASS);\n            if (ispuLowInventoryMsg) {\n                removeClass([ispuLowInventory, ispuLowStockEl], HIDDEN_CLASS);\n            }\n            else {\n                addClass(ispuLowStockEl, HIDDEN_CLASS)\n            }\n        }\n        else if (!ispuRadioButtonEl.disabled) {\n            addClass([ispuLowInventory, ispuLowStockEl], HIDDEN_CLASS);\n            removeClass(availabilityElement, HIDDEN_CLASS);\n            if (selectedSizeElement) {\n                const masterId = productContainerEl.dataset.masterid;\n                const isSetPage = queryFirst('.custom-set-detail');\n                const selectedSizeValue = selectedSizeElement ? selectedSizeElement.dataset.attrValue : '';\n                const selectedColorElement = queryFirst('.color-attribute .swatch-circle.selected', productContainerEl);\n                const selectedColorId = selectedColorElement.dataset.attrValue;\n                const productInfo = window.productInfo[masterId];\n                const variantGroupData = productInfo.variants[selectedColorId];\n                const { sizes, images, formattedPrice } = variantGroupData;\n                const selectedSizeData = sizes[selectedSizeValue];\n                const { isNotifyMeEnabled, ID, forceOutOfStock } = selectedSizeData;\n                const { variants } = isSetPage ? window.productInventory[masterId] : window.productInventory;\n                const inventoryData = variants[ID];\n                const { availabilityStatus } = inventoryData;\n                if (availabilityStatus !== 'NOT_AVAILABLE') {\n                    removeClass(selectedSizeElement, 'not-available');\n                } else {\n                    addClass(selectedSizeElement, 'not-available')\n                }\n                if (selectedSizeValue === '') {\n                    addClass(availabilityElement, HIDDEN_CLASS);\n                }\n                const productData = {\n                    available: !hasClass(selectedSizeElement, 'not-available'),\n                    isNotifyMeEnabled,\n                    id: ID,\n                    formattedPrice,\n                    forceOutOfStock,\n                    imageData: images && images.ispu ? images.ispu : ''\n                };\n                handleNotifyMe(productData, productContainerEl);\n            }\n        }\n    }\n}\n/**\n * Function to select ISPU radio button\n * @param {HTMLElement} productContainerEl - Product container Element\n * @param {HTMLElement} ispuRadioButtonEl - ISPU radio button element\n * @param {boolean} enableISPUSection - flag to remove fade out style to ispu section's content\n */\nfunction selectISPURadioButton(productContainerEl, ispuRadioButtonEl, enableISPUSection) {\n    ispuRadioButtonEl = ispuRadioButtonEl || getISPUradioButtonEl(productContainerEl);\n    if (!ispuRadioButtonEl) return;\n\n    ispuRadioButtonEl.disabled = false;\n    removeClass(queryFirst(RADIO_BUTTON_LABEL_SELECTOR, ispuRadioButtonEl.parentElement), DISABLED_CLASS);\n\n    ispuRadioButtonEl.checked = true;\n\n    addStoreNameClass(productContainerEl);\n\n    if (enableISPUSection) {\n        const ispuContentEl = getISPUPreferenceContentEl(productContainerEl);\n        removeClass(ispuContentEl, DISABLED_CLASS);\n    }\n}\n\n/**\n * Function to disable & deselect Ship To radio button\n * @param {HTMLElement} productContainerEl - Product container Element\n * @param {HTMLElement} ispuRadioButtonEl - ISPU radio button element\n * @param {boolean} disableISPUSection - flag to add fade out style ispu section's content\n */\nfunction disableISPURadioButton(productContainerEl, ispuRadioButtonEl, disableISPUSection) {\n    ispuRadioButtonEl = ispuRadioButtonEl || getISPUradioButtonEl(productContainerEl);\n    if (!ispuRadioButtonEl) return;\n\n    ispuRadioButtonEl.disabled = true;\n    addClass(queryFirst(RADIO_BUTTON_LABEL_SELECTOR, ispuRadioButtonEl.parentElement), DISABLED_CLASS);\n\n    ispuRadioButtonEl.checked = false;\n\n    removeStoreNameClass(productContainerEl);\n\n    if (disableISPUSection) {\n        const ispuContentEl = getISPUPreferenceContentEl(productContainerEl);\n        addClass(ispuContentEl, DISABLED_CLASS);\n    }\n}\n\n/**\n * Function to select Ship To radio button\n * @param {HTMLElement} productContainerEl - Product container Element\n * @param {HTMLElement} shipToRadioButtonEl - Ship to address radio button element\n * @param {boolean} enableShipToContent - flag to add fade out style shipTo section's content\n */\nfunction selectShipToRadioButton(productContainerEl, shipToRadioButtonEl, enableShipToContent) {\n    shipToRadioButtonEl = shipToRadioButtonEl || getShipToAddressradioButtonEl(productContainerEl);\n    if (!shipToRadioButtonEl) return;\n\n    shipToRadioButtonEl.disabled = false;\n    removeClass(queryFirst(RADIO_BUTTON_LABEL_SELECTOR, shipToRadioButtonEl.parentElement), DISABLED_CLASS);\n\n    shipToRadioButtonEl.checked = true;\n\n    removeStoreNameClass(productContainerEl);\n\n    if (enableShipToContent) {\n        const shipToContentEl = getShipToAddressContentEl(productContainerEl);\n        removeClass(shipToContentEl, DISABLED_CLASS);\n    }\n}\n\n/**\n * Function to disable & deselect Ship To radio button\n * @param {HTMLElement} productContainerEl - Product container Element\n * @param {HTMLElement} shipToRadioButtonEl - Ship to address radio button element\n * @param {boolean} disableShipToContent - flag to remove fade out style from shipTo section's content\n */\nfunction disableShipToRadioButton(productContainerEl, shipToRadioButtonEl, disableShipToContent) {\n    shipToRadioButtonEl = shipToRadioButtonEl || getISPUradioButtonEl(productContainerEl);\n    if (!shipToRadioButtonEl) return;\n\n    shipToRadioButtonEl.disabled = true;\n    addClass(queryFirst(RADIO_BUTTON_LABEL_SELECTOR, shipToRadioButtonEl.parentElement), DISABLED_CLASS);\n\n    shipToRadioButtonEl.checked = false;\n\n    if (disableShipToContent) {\n        const shipToContentEl = getShipToAddressContentEl(productContainerEl);\n        addClass(shipToContentEl, DISABLED_CLASS);\n    }\n}\n\n/**\n * Function to get preferred shipping preference\n * @returns {string} - Preferred shipping preference value\n */\nfunction getPreferedShippingPreference() {\n    const shippingPreferencesConfig = getNestedValue(window, 'johnnyWasUtils.shippingPreferencesConfig') || {};\n    const { activeStoreFilter } = shippingPreferencesConfig;\n    return activeStoreFilter ? ISPU_RADIO_VALUE : SHIP_TO_RADIO_VALUE;\n}\n\n/**\n * Function to check if selected size is available for in-store pickup\n * @param {HTMLElement} productContainerEl - Product container Element\n * @returns {boolean} - ISPU availability for selected size\n */\nfunction getAvailableForInStorePickup(productContainerEl) {\n    const selectedSizeElement = getSelectedSizeEl(productContainerEl);\n    const masterId = productContainerEl.dataset.masterid;\n    const selectedSizeValue = selectedSizeElement ? selectedSizeElement.dataset.attrValue : '';\n    const selectedColorElement = queryFirst('.color-attribute .swatch-circle.selected', productContainerEl);\n    const selectedColorId = selectedColorElement.dataset.attrValue;\n    const productInfo = window.productInfo[masterId];\n    const variantGroupData = productInfo.variants[selectedColorId];\n    const { sizes } = variantGroupData;\n    const selectedSizeData = sizes[selectedSizeValue];\n    return selectedSizeData.availableForInStorePickup;\n}\n\nmodule.exports = {\n    getChangeStoreLinkEl,\n    getSelectedPreferenceEl,\n    getShippingPreferencesContainerEl,\n    getISPUradioButtonEl,\n    getShipToAddressradioButtonEl,\n    getShipToAddressContentEl,\n    getISPUPreferenceContentEl,\n    getSelectedSizeEl,\n    addStoreNameClass,\n    removeStoreNameClass,\n    selectISPURadioButton,\n    disableISPURadioButton,\n    selectShipToRadioButton,\n    disableShipToRadioButton,\n    getPreferedShippingPreference,\n    updateVisibilityOfLowInventoryMsg,\n    getAvailableForInStorePickup\n};\n","module.exports = {\n    breakpoints: {\n        xs: 0,\n        sm: 576,\n        md: 768,\n        lg: 1024,\n        xl: 1362\n    },\n\n    // Stores\n    PREFERRED_STORE_ID: 'PREFERRED_STORE_ID',\n\n    // Constant values\n    EMPTY_STRING: '',\n\n    // DOM Class\n    HIDDEN_CLASS: 'd-none',\n    INVALID_CLASS: 'is-invalid',\n    INVISIBLE_CLASS: 'invisible',\n    NO_SCROLL_CLASS: 'no-scroll',\n    IS_STICKY_CLASS: 'is-sticky',\n    SELECTED_CLASS: 'selected',\n\n    // Product status\n    PREORDER_STATUS: 'PREORDER',\n    IN_STOCK_STATUS: 'IN_STOCK',\n    NOT_AVAILABLE_STATUS: 'NOT_AVAILABLE',\n\n    // Custom DOM events\n\n    // Control keys\n\n    // Event KeyCodes\n    KEYCODE_TAB: 9,\n    KEYCODE_ESCAPE: 27,\n    KEYCODE_UP: 38,\n    KEYCODE_DOWN: 40\n};\n","/**\n * DOM utilities to use native browser capabilities and avoid dependencies.\n *\n * @module dom.dom-util\n * @version 1.0.0\n * @since Sept 26 2019\n *\n * @typedef {Object} ProductData\n * @property {string} colorCode - The product color code (E.g. 002)\n * @property {string} masterId - The product master ID (E.g. 003168)\n * @property {string} originalPrice - The product original price (E.g. 148.00)\n * @property {string} productColor - The product color name (E.g. Onyx)\n * @property {string} productId - The product SKU (E.g. 889069580469)\n * @property {string} productName - The product name (E.g. Keegan Lace Top)\n * @property {string} productPrice - The product sale price (E.g. 98.00)\n * @property {string} productSize - The product size (E.g. M)\n * @property {string} variationGroupId - The product variation group ID (E.g. 003168-onyx)\n */\n\nconst { breakpoints } = require('./constants');\n\n/**\n * Native querySelector to find first element in the dom with given selector\n *\n * @param  {string | Object} selector Target selector element.\n * @param  {string | Object} parent  Parent element, if it not provided\n * fallback to document.\n * @return {Object} returns the target as a DOM node\n */\nconst queryFirst = exports.queryFirst = (selector, parent = document) => {\n    if (!parent) return null;\n    return parent.querySelector(selector);\n};\n/**\n * loadScript to asynchronously load a script tag in DOM\n *\n * @param  {string} source Script tag src value\n * @param {boolean} isAsync Set script to async true or false\n */\nexports.loadScript = (source, isAsync = false) => {\n    return new Promise((resolve) => {\n        const script = document.createElement('script');\n        script.src = source;\n        script.async = isAsync;\n        script.onload = () => {\n            resolve();\n        }\n        document.body.append(script);\n    });\n};\n/**\n * loadInput to load an input tag in DOM\n *\n * @param  {string} referrerID Referrer ID value\n * @param {Array} formElement Form element\n */\nexports.loadInput = (referrerID, formElement) => {\n    const input = document.createElement('input');\n    input.setAttribute('type', 'hidden');\n    input.setAttribute('name', 'referrerID');\n    input.setAttribute('class', 'referrerID');\n    input.setAttribute('value', referrerID);\n    formElement.appendChild(input);\n};\n/**\n * Native querySelectorAll to find all the dom element with given selector.\n *\n * @param  {string | Object} selector Target selector element.\n * @param  {string | Object} parent Parent element, if it not provided\n * fallback to document.\n * @return {nodeList | Array} Returns the target as a DOM node.\n */\nconst queryAll = exports.queryAll = (selector, parent = document) => {\n    if (!parent) return null;\n    return [].slice.call(parent.querySelectorAll(selector), 0);\n};\n\n/**\n * Returns the value(s) for the specified CSS rule(s), or all computed styles if no rule is specified\n *\n * @param  {Element} element Target element\n * @param  {string} rule CSS rule name (E.g. padding-top)\n * @return {string | Array | Object} Returns a string value, array of values, or styles object\n */\nconst getStyles = exports.getStyles = (element, ...rules) => {\n    const styles = getComputedStyle(element);\n\n    if (!rules.length) {\n        return styles;\n    } else if (rules.length === 1) {\n        return styles[rules[0]];\n    }\n    return rules.map(rule => styles[rule]);\n};\n\n/**\n * Remove DOM element\n *\n * @param  {string | Object} el Target element.\n */\nexports.remove = el => {\n    if (!el) return;\n    if (Array.isArray(el) || el instanceof NodeList) {\n        for (let i = 0, n = el.length; i < n; i++) {\n            const node = el[i];\n            if (node) node.parentElement.removeChild(node);\n        }\n    } else {\n        el.parentElement.removeChild(el);\n    }\n};\n\n/**\n * Set attribute to single or multiple elements\n *\n * @param  {string | Object} el Target  element.\n * @param  {string} attr attribute that need to be added.\n * @param  {string | boolean} val value that need to be set for an attribute.\n */\nexports.setAttribute = (el, attr, val) => {\n    if (!el) return;\n    if (Array.isArray(el) || el instanceof NodeList) {\n        for (let i = 0, n = el.length; i < n; i++) {\n            const node = el[i];\n            if (node) node.setAttribute(attr, val);\n        }\n    } else {\n        el.setAttribute(attr, val);\n    }\n};\n\n/**\n * Remove attribute to single or multiple elements\n *\n * @param  {string | Object} el Target  element.\n * @param  {string} attr attribute that need to be removed.\n */\nexports.removeAttribute = (el, attr) => {\n    if (!el) return;\n    if (Array.isArray(el) || el instanceof NodeList) {\n        for (let i = 0, n = el.length; i < n; i++) {\n            const node = el[i];\n            if (node) node.removeAttribute(attr);\n        }\n    } else {\n        el.removeAttribute(attr);\n    }\n};\n\n/**\n * Adds class or classes to the classList of particular element.\n *\n * @param  {string | Object} el Target  element.\n * @param  {string | Array} val class name or class names as list of arguments.\n */\nexports.addClass = (el, ...val) => {\n    if (!el) return;\n    if (Array.isArray(el) || el instanceof NodeList) {\n        for (let i = 0, n = el.length; i < n; i++) {\n            const node = el[i];\n            if (node) node.classList.add(...val);\n        }\n    } else {\n        el.classList.add(...val);\n    }\n};\n\n/**\n * Removes class or classes from the classList of particular element.\n *\n * @param  {string | Object} el Target  element.\n * @param  {string | Array} val class name or class names as list of arguments.\n */\nexports.removeClass = (el, ...val) => {\n    if (!el) return;\n    if (Array.isArray(el) || el instanceof NodeList) {\n        for (let i = 0, n = el.length; i < n; i++) {\n            const node = el[i];\n            if (node) node.classList.remove(...val);\n        }\n    } else {\n        el.classList.remove(...val);\n    }\n};\n\n/**\n * Toggles class or classes to the classList of particular element.\n *\n * @param  {string | Object} el Target  element.\n * @param  {string | Array} val class name or class names as list of arguments.\n */\nexports.toggleClass = (el, ...val) => {\n    if (!el) return;\n    if (Array.isArray(el) || el instanceof NodeList) {\n        for (let i = 0, n = el.length; i < n; i++) {\n            const node = el[i];\n            if (node) node.classList.toggle(...val);\n        }\n    } else {\n        el.classList.toggle(...val);\n    }\n};\n\n/**\n * Looks for availability of class or classes in the classList of particular element.\n *\n * @param  {string | Object} el Target  element.\n * @param  {string | Array} val class name or class names as list of arguments.\n * @return {boolean} Returns availability of class in the target element.\n */\nexports.hasClass = (el, ...classes) => {\n    if (!el) return false;\n\n    const { classList } = el;\n\n    return !!classList && classes.every(className => classList.contains(className));\n};\n\n/**\n * Throttle util to prevent repeatative callbacks\n *\n * @param  {function} callback Callback function.\n * @param  {number} limit Timeout upon which throttle callback need to be called.\n * fallback to document.\n * @param  {function} waitCallback The callback to fire while the function is being throttled.\n * @return {function} Throttle closure function.\n */\nexports.throttle = (callback, limit = 250, waitCallback = function () { }) => {\n    let isThrottling = false;\n\n    return (...args) => {\n        if (isThrottling) return waitCallback(...args);\n\n        const returnValue = callback.apply(this, args);\n        isThrottling = true;\n\n        setTimeout(() => {\n            isThrottling = false;\n        }, limit);\n\n        return returnValue;\n    };\n};\n\n/**\n * Throttle util to prevent repeatative callbacks\n *\n * @param {function} callback - Callback function.\n * @param {number} minimumDelay - Delay upon which debounce callback need to be called.\n * @param {object} [options] - Additional options to control debouncing behavior\n * @param {function} [options.condition] - A function that will cause debouncing to be ignored for one cycle if it returns true\n * @param {function} [options.callback] - A function that will run without restriction, each time the debounced method is called\n * @return {function} Debounce closure function.\n */\nexports.debounce = (callback, minimumDelay = 250, options = {}) => {\n    const { condition, callback: unrestrictedCallback } = options;\n    let timer;\n\n    return (...args) => {\n        clearTimeout(timer);\n\n        if (typeof unrestrictedCallback === 'function') unrestrictedCallback(...args);\n\n        if (typeof condition === 'function' && condition(...args)) {\n            callback(...args);\n        } else {\n            timer = setTimeout(() => {\n                callback(...args);\n            }, minimumDelay);\n        }\n    };\n};\n\nexports.toArray = (...args) => {\n    const makeArray = target => {\n        let newTarget;\n        if (!Array.isArray(target)) {\n            const array = [].slice.call(target);\n            newTarget = array.length ? array : [target];\n        }\n        return newTarget;\n    };\n    return args.reduce((results, arg) => {\n        return results.concat(makeArray(arg));\n    }, []);\n};\n\n/**\n * Height util to get outer height of element including margins\n *\n * @param  {string | Object} el target element\n * @return  {string} height of element\n */\nexports.outerHeight = el => {\n    const styles = getStyles(el);\n\n    return el.offsetHeight + parseInt(styles.marginTop, 0) + parseInt(styles.marginBottom, 0);\n};\n\n/**\n * Determine if an element is in the viewport\n * (c) 2017 Chris Ferdinandi, MIT License, https://gomakethings.com\n * @param  {Node} el The element\n * @return {boolean} Returns true if element is in the viewport\n */\nexports.isInViewportCheck = el => {\n    const scroll = window.scrollY || window.pageYOffset;\n    const boundsTop = el.getBoundingClientRect().top + scroll;\n\n    const numberOfViewportToCheck = el.dataset.nextViewportLazyLoad ? 2 : 1;\n\n    const viewport = {\n        top: scroll,\n        bottom: scroll + window.innerHeight * numberOfViewportToCheck\n    };\n\n    const bounds = {\n        top: boundsTop,\n        bottom: boundsTop + el.clientHeight\n    };\n\n    return (bounds.bottom >= viewport.top && bounds.bottom <= viewport.bottom) || (bounds.top <= viewport.bottom && bounds.top >= viewport.top);\n};\n\n/**\n * Determine if an element is in the viewport\n * (c) 2017 Chris Ferdinandi, MIT License, https://gomakethings.com\n * @param  {Node} el The element\n * @return {boolean} Returns true if element is in the viewport\n */\nexports.isInViewport = el => {\n    var rect = el.getBoundingClientRect();\n\n    return rect.bottom > 0 &&\n        rect.right > 0 &&\n        rect.left < (window.innerWidth || document.documentElement.clientWidth) &&\n        rect.top < (window.innerHeight || document.documentElement.clientHeight);\n};\n\n/**\n * Displays empty cart message\n * @param {string} message - Error message to display\n */\nexports.emptyCart = message => {\n    const cartElements = queryAll('.cart');\n    cartElements.forEach(cartElement => {\n        cartElement.innerHTML = `<div class=\"cart-empty text-center\"><p class=\"empty-message\">${message}</p><a href=\"/\" class=\"d-inline-block tertiary-link continue-shop-link\" role=\"link\">Continue Shopping</a></div>`;\n    });\n};\n\n/**\n * Animates scrolling the page to the specified Y coordinate\n * @param {number} y - The Y coordinate to scroll to\n * @param {number} duration - The duration of the animation in milliseconds\n * @param {function} callback - The callback to run when the animation is complete\n * @returns {JQuery}\n */\nexports.scrollTo = (y, duration = 600, callback = function () { }) => $('html, body').scrollTo(y, duration, callback);\n\n/**\n * Finds the last element sibling on the same line as the specified element\n * @param {Element} element - The element to reference when looking for siblings\n * @returns {Element} - returns last element in the row\n */\nexports.getLastElementInRow = element => {\n    if (!element.nextElementSibling) return element;\n\n    const bottom = element.offsetTop + element.scrollHeight;\n    let sibling;\n\n    while ((sibling = element.nextElementSibling)) {\n        if (sibling.offsetTop >= bottom) return sibling.previousElementSibling;\n        element = sibling;\n    }\n\n    return element;\n};\n\n/**\n * Update url with query parameter to handle remember placement\n *\n * @param {DocumentFragment} fragment - A DocumentFragment object\n * @return {undefined}\n */\nexports.updateUrlQueryParam = fragment => {\n    const queryParamsElement = queryFirst('.append-params', fragment);\n    const permaLink = queryFirst('.permalink', fragment);\n\n    if (permaLink) {\n        window.history.pushState({ path: permaLink.value }, '', permaLink.value);\n    } else if (queryParamsElement) {\n        const newUrl = window.location.href.split('?')[0] + '?' + queryParamsElement.value;\n        window.history.pushState({ path: newUrl }, '', newUrl);\n    }\n};\n\n/**\n * This method returns character count\n * @param {HTMLElement} element - current element for which count has to be calculated\n * @return {number} character count\n */\nexports.getCharacterCount = function (element) {\n    if (!element) {\n        return 0;\n    }\n    return element.value.length;\n};\n\n/**\n *  Waits for a specified element to exist.\n *  @param {string} selector - The selector to match\n *  @param {element} scope - The containing element to search within (default: document)\n *  @param {number} timeout - How long (in milliseconds) to wait before rejecting the promise\n *  @returns a Promise containing all matched elements\n */\nexports.waitForElement = (selector, scope = document, timeout = 0) =>\n    new Promise((resolve, reject) => {\n        const elements = queryAll(selector, scope);\n\n        if (elements.length) return resolve(elements);\n\n        const observer = new MutationObserver((mutations, self) => {\n            const elements = queryAll(selector, scope);\n\n            if (elements.length) {\n                self.disconnect();\n                resolve(elements);\n            }\n        });\n\n        observer.observe(scope, { childList: true, subtree: true });\n\n        if (timeout) {\n            setTimeout(() => {\n                observer.disconnect();\n                reject('Timed out');\n            }, timeout);\n        }\n    });\n\n/**\n *  Binds an event listener to a callback using native methods and selector matching.\n *  @param {element} element - The element to attach the listener to\n *  @param {string|array} eventTypes - The type of events to listen for\n *  @param {function} callback - The method to run when the event is fired\n *  @param {object} [options={}] - Additional options to configure the event binding\n *  @param {function} [options.eventCondition] - A function that returns a boolean indicating whether to proceed with the callback when the event is triggered\n *  @param {string} [options.bindEngine='native'] - The engine to use when binding the event (native or jQuery)\n *  @param {boolean} [options.once=false] - Whether to fire the event callback only once and then unbind\n */\nexports.bind = (element, eventTypes, callback, options = {}) => {\n    const {\n        eventCondition,\n        bindEngine = 'native',\n        once = false\n    } = options;\n\n    if (!Array.isArray(eventTypes)) eventTypes = eventTypes.split(',').map(type => type.trim());\n\n    const useJQuery = (String(bindEngine).toLowerCase() === 'jquery');\n    let { targetSelectors = [] } = options;\n\n    if (typeof targetSelectors === 'string') {\n        targetSelectors = [targetSelectors];\n    }\n\n    const handler = (e, extraData) => {\n        let { target } = e;\n\n        if (extraData instanceof Element || extraData === document) {\n            target = extraData;\n        } else if (extraData instanceof jQuery.Event) {\n            target = extraData.target;\n        } else {\n            e.data = extraData;\n        }\n\n        let targetElement = target;\n\n        if (Array.isArray(targetSelectors) && targetSelectors.length) {\n            // If an array of selectors is provided, store a reference to the closest element that is matched\n            targetElement = targetSelectors.reduce((result, selector) => {\n                if (result) return result;\n                const node = target.closest(selector);\n                if (node) result = { node, selector };\n                return result;\n            }, false);\n        }\n\n        // We need a target element as context or we don't execute our callback\n        if (!targetElement) return;\n\n        const { node, selector } = targetElement;\n\n        // Only execute the callback if the eventCondition allows\n        if (typeof eventCondition === 'function' && !eventCondition(e, node || targetElement)) {\n            return;\n        }\n\n        if (once) {\n            if (useJQuery) {\n                const $element = $(element);\n\n                eventTypes.forEach(eventType => {\n                    $element.off(eventType, handler);\n                });\n            } else {\n                eventTypes.forEach(eventType => {\n                    element.removeEventListener(eventType, handler, true);\n                });\n            }\n        }\n\n        if (node && selector) {\n            callback(e, node, selector);\n        } else {\n            callback(e, targetElement);\n        }\n    };\n\n    if (useJQuery) {\n        const $element = $(element);\n\n        eventTypes.forEach(eventType => {\n            $element.on(eventType, handler);\n        });\n    } else {\n        eventTypes.forEach(eventType => {\n            element.addEventListener(eventType, handler, true);\n        });\n    }\n};\n\n/**\n * Function to get product data\n * @param {HTMLElement} element - Product container element or srcElement\n * @returns {ProductData} - Product data\n */\nexports.getProductData = element => {\n    const { getNestedValue } = require('./util');\n    const PREORDER_STATUS = 'PREORDER';\n\n    element = element.closest('.color-attribute, .product-tile-swatch, .tile-img-link') || element;\n\n    const container = element.closest('.product, .product-detail') || element.closest('.product-info') || element.closest('.cart-product-line-item') || element;\n    const { dataset } = element;\n    const { dataset: containerData } = container;\n    const { monetatePid } = containerData;\n    const isQuickview = !!container.closest('.product-quickview');\n\n    let { productInfo, productInventory } = window;\n\n    // Update the product data where possible\n    let pid = containerData.wishlistId || containerData.pid || dataset.pid;\n    let masterId = dataset.masterid || containerData.masterid;\n    let productName = dataset.productName || containerData.productName;\n    let productSize = dataset.productSize || containerData.productSize;\n    let swatchName = dataset.swatchName || containerData.swatchName;\n    let colorCode = dataset.attrValue;\n\n    let variationGroupId;\n    let originalPrice;\n    let productPrice;\n    let isPreorder;\n\n    let productId = [dataset.productId, containerData.productId, pid].find(id => {\n        if (id && ~id.indexOf('-')) {\n            if (!variationGroupId) variationGroupId = id;\n\n            return false;\n        }\n\n        return id;\n    }) || '';\n\n    // We need the color code, which is only available on the swatch\n    if (!swatchName || !element.closest('.color-attribute, .product-tile-swatch')) {\n        const colorEl = queryFirst('.color-attribute .swatch-circle.selected, .product-tile-swatch.selected', container) || queryFirst('.selected-swatch-name', container) || queryFirst('.tile-img-link', container);\n        const swatchButton = (colorEl && colorEl.closest('.color-attribute'));\n\n        swatchName = (colorEl && (colorEl.dataset.attrDisplayvalue || colorEl.dataset.swatchName || colorEl.textContent.trim())) || '';\n        colorCode = (colorEl && colorEl.dataset.attrValue) || '';\n        variationGroupId = variationGroupId || (swatchButton && swatchButton.dataset.productId) || '';\n    }\n\n    // Use the PID if the productId is missing or set to master\n    if (!productId || (productId.length <= 6 && pid)) productId = pid;\n\n    // We need the master ID to look up the product\n    if (!masterId && monetatePid) {\n        masterId = monetatePid.split('-')[0] || '';\n    }\n\n    if (!masterId) {\n        if (pid && (~pid.indexOf('-') || pid.length <= 6)) {\n            masterId = pid.split('-')[0];\n        } else if (productId && ~productId.indexOf('-')) {\n            masterId = productId.split('-')[0];\n        } else {\n            const tileEl = element.closest('.product-tile');\n            masterId = ((tileEl && tileEl.dataset.monetatePid) || '').split('-')[0];\n        }\n    }\n\n    // QuickView productInfo\n    if (isQuickview) {\n        productInfo = getNestedValue(window, 'quickviewProductInfo.productInfo');\n        productInventory = getNestedValue(window, 'quickviewProductInfo.productInventory');\n    }\n\n    // Now we can check the productInfo\n    if (productInfo && masterId && colorCode) {\n        let productData;\n        if (isQuickview) {\n            productData = getNestedValue(productInfo, 'variants.{0}', colorCode);\n        } else {\n            productData = getNestedValue(productInfo, '{0}.variants.{1}', masterId, colorCode);\n        }\n\n        if (productData) {\n            originalPrice = productData.standardPrice + '.00';\n            productPrice = productData.price + '.00';\n            variationGroupId = productData.groupId;\n            isPreorder = productData.isPreorder;\n        }\n    }\n\n    if (!productName) {\n        const productNameEl = queryFirst('.product-name, .line-item-name', container);\n        productName = (productNameEl && productNameEl.textContent.trim()) || '';\n    }\n\n    if (!productSize) {\n        const productSizeEl = queryFirst('.size-btn.selected, .wishlist-item-attribute-size .wishlist-detail-value', container);\n        productSize = (productSizeEl && (productSizeEl.dataset.valueId || productSizeEl.textContent.trim())) || '';\n    }\n\n    if (productSize && pid) {\n        isPreorder = getNestedValue(productInventory, 'variants[{0}].availabilityStatus', pid) === PREORDER_STATUS;\n    }\n\n    if (!originalPrice) {\n        const originalPriceEl = queryFirst('.price-section .ssPrice', container);\n        originalPrice = ((originalPriceEl && originalPriceEl.value) || '').split('$').pop();\n    }\n\n    if (originalPrice && !~originalPrice.indexOf('.')) {\n        originalPrice += '.00';\n    }\n\n    if (!productPrice) {\n        const productPriceEl = queryFirst('.price-section .sales .ssSalesPrice', container);\n        productPrice = ((productPriceEl && productPriceEl.value) || '').split('$').pop();\n    }\n\n    if (productPrice && !~productPrice.indexOf('.')) {\n        productPrice += '.00';\n    }\n\n    if (!swatchName) {\n        const productColorEl = queryFirst('.wishlist-item-attribute-color .wishlist-detail-value', container);\n        swatchName = (productColorEl && productColorEl.textContent.trim()) || '';\n    }\n\n    // Sanity check\n    if (masterId && masterId.length > 6) masterId = '';\n    if (productId && (~productId.indexOf('-') || productId.length <= 6)) productId = '';\n    if (variationGroupId && !~variationGroupId.indexOf('-')) variationGroupId = '';\n\n    return {\n        colorCode,\n        masterId,\n        originalPrice,\n        productColor: swatchName,\n        productId,\n        productName,\n        productPrice,\n        productSize,\n        variationGroupId,\n        isPreorder\n    };\n};\n\n/**\n * Check whether the device matches the specified breakpoint at a minimum (i.e. min-width)\n * @param {string} breakpoint - The breakpoint to match against (xs; sm; md; lg; xl)\n * @returns {boolean} - Whether the device matches the breakpoint\n */\nexports.matchesBreakpoint = breakpoint => breakpoint in breakpoints && window.matchMedia(`(min-width: ${breakpoints[breakpoint]}px)`).matches;\n\nexports.getCSRFToken = (scope = document.body) => {\n    const token = scope.querySelector('.csrf-token');\n    return (token && token.value) || '';\n};\n\n/**\n * Renders a string into a template and returns the DOM Fragment.\n * @param {string} html - the html content.\n * @returns {DocumentFragment} - The input string as a document fragment\n */\nexports.renderFragment = html => {\n    const template = document.createElement('template');\n    template.innerHTML = html;\n    return template.content;\n};\n\n/**\n * Gets all accessible cookies and creates a plain key/value object\n * @returns {Object} Plain object containing cookie names and values\n */\nexports.getCookieMap = () => document.cookie.split(';').reduce((result, keyValue) => {\n    const [key, value] = keyValue.trim().split('=');\n    result[key] = decodeURIComponent(value);\n    return result;\n}, {});\n\n/**\n * Validating the date as per month\n */\nexports.validateDate = () => {\n    let monthSelector = document.getElementById('birthdaymonth');\n    let dateSelector = document.getElementById('birthdaydate');\n    const { message } = dateSelector.dataset;\n    /**\n     * Validating date\n     */\n    function validateDateOption() {\n        let m = monthSelector.value;\n        let d = dateSelector.value;\n        const mlength = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][m];\n        dateSelector.length = 0;\n        const labelOption = new Option();\n        labelOption.text = message;\n        labelOption.value = '';\n        dateSelector.add(labelOption);\n        for (let i = 1; i <= mlength; i++) {\n            let option = new Option();\n            option.value = i;\n            option.text = i;\n            if (i.toString() === d) option.selected = true;\n            dateSelector.add(option);\n        }\n    }\n    monthSelector.addEventListener('change', validateDateOption);\n    validateDateOption();\n};\n\nexports.getStyles = getStyles;\nexports.queryAll = queryAll;\n","'use strict';\n\nconst { queryFirst, addClass, removeClass, hasClass, matchesBreakpoint } = require('../domUtil');\nconst { getNestedValue } = require('../util');\nconst { selectStyleMessageTmpl, ispuSelectStyleMessageTmpl } = require('../templates').productDetail;\nconst { EMPTY_STRING } = require('../constants');\n\n/**\n * Function to check if shipping preferences view is enabled or not\n * @returns { boolean } - returns isEnabled flag value\n */\nfunction isShippingPreferencesViewEnabled() {\n    return getNestedValue(window, 'johnnyWasUtils.shippingPreferencesConfig.isEnabled') || false;\n}\n\n\n/**\n * This method manages Notify me container content\n * @param {Object} productData - Product data\n * @param {Object} productContainer - Product Container DOM element\n */\nfunction handleNotifyMe(productData, productContainer) {\n    const $body = $('body');\n    const addToCartSection = queryFirst('.prices-add-to-cart-actions', productContainer);\n    const notifyContainer = queryFirst('.notify-me-container', productContainer);\n    const notifyMeButton = queryFirst('.notify-me-btn', productContainer);\n    const notifyMeDesc = queryFirst('.notify-me-desc', productContainer);\n    const availabilityMessageEl = queryFirst('.product-availability', productContainer);\n    const isPDPPage = queryFirst('.product-detail');\n    const mainImageEle = queryFirst('.primary-images .carousel-item.active img', productContainer);\n    const hiddenClass = 'd-none';\n    const { available, isNotifyMeEnabled, id, forceOutOfStock, imageData } = productData;\n    if (!available && isNotifyMeEnabled && !forceOutOfStock) {\n        addClass(addToCartSection, hiddenClass);\n        if (availabilityMessageEl) {\n            addClass(availabilityMessageEl, hiddenClass);\n        }\n        removeClass([notifyMeDesc, notifyMeButton], hiddenClass);\n        const notifyImageElement = queryFirst('.notify-product-img img', notifyContainer);\n        if (imageData && notifyImageElement) {\n            const { alt, url, srcset, src } = isPDPPage ? mainImageEle : imageData[0];\n            const imageHasLoaded = hasClass(notifyImageElement, 'lz-loaded');\n\n            notifyImageElement.setAttribute(imageHasLoaded ? 'src' : 'data-src', isPDPPage ? src : url);\n            notifyImageElement.setAttribute(imageHasLoaded ? 'srcset' : 'data-srcset', srcset);\n            notifyImageElement.setAttribute('alt', alt);\n        }\n        const notifySize = queryFirst('.notify-size', notifyContainer);\n        const notifySizeSeperator = queryFirst('.size-seperator', notifyContainer);\n        const notifySelectedSize = queryFirst('.selected-size', notifyContainer);\n        queryFirst('.size-label', notifySize).textContent = queryFirst('.size-display-name', productContainer).value;\n        queryFirst('.selected-size', notifySize).textContent = queryFirst('.size-btn.selected', productContainer).dataset.attrValue;\n        removeClass(notifySizeSeperator, 'd-none');\n        removeClass(notifySelectedSize, 'd-none');\n        if (id) {\n            queryFirst('.notify-pid', notifyContainer).value = id;\n        }\n        const custEmail = (document.getElementById('notifyEmail') || {}).value;\n        if (custEmail) {\n            queryFirst('.notify-email', notifyContainer).value = custEmail;\n        }\n        removeClass(queryFirst('.notify-me-desc', notifyContainer), hiddenClass);\n        removeClass(queryFirst('.notify-form', notifyContainer), hiddenClass);\n        addClass(queryFirst('.notify-me-confirm', notifyContainer), hiddenClass);\n        addClass(queryFirst('.footer-close-link', notifyContainer), hiddenClass);\n\n        $body.trigger('product:notifyMeShown', productContainer);\n    } else {\n        removeClass(addToCartSection, hiddenClass);\n        if (availabilityMessageEl) {\n            removeClass(availabilityMessageEl, hiddenClass);\n        }\n        addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n\n        $body.trigger('product:notifyMeHidden', productContainer);\n    }\n}\n\n/**\n * Function to toggle select color or size info\n * @param {HTMLElement} productContainer - current product element\n */\nfunction toggleSelectSizeInfo(productContainer) {\n    const selectedSizeEl = queryFirst('.size-btn.selected', productContainer);\n    const availabilityMessageEl = queryFirst('.select-size-message', productContainer);\n    if (availabilityMessageEl) {\n        if (!selectedSizeEl) {\n            removeClass(availabilityMessageEl, 'd-none');\n            availabilityMessageEl.innerHTML = selectStyleMessageTmpl(availabilityMessageEl.dataset.selectStylesMessage);\n        }\n    }\n\n    if (isShippingPreferencesViewEnabled()) {\n        const ispuAvailabilityMessageEl = queryFirst('.ispu-preference-container .select-size-info-msg', productContainer);\n        if (ispuAvailabilityMessageEl) {\n            const messages = getNestedValue(window, 'johnnyWasUtils.shippingPreferencesConfig.messages') || {};\n            const { selectStylesMessage } = messages;\n            if (!selectedSizeEl && selectStylesMessage) {\n                ispuAvailabilityMessageEl.innerHTML = ispuSelectStyleMessageTmpl(selectStylesMessage);\n            }\n        }\n    }\n}\n/**\n * Helper method to check if product is on early access or not\n * @param {Object|String} earlyAccess - product | early access date\n * @return {Boolean} true, if early access product or false for not\n */\nfunction isEarlyAccessElement(earlyAccess) {\n    let isEarlyAccessItem = false;\n    const earlyAccessDate = earlyAccess && earlyAccess.earlyAccessUntilDate || earlyAccess;\n    if (earlyAccessDate && earlyAccessDate !== 'false') {\n        if (new Date(earlyAccessDate).getTime() > new Date().getTime()) {\n            isEarlyAccessItem = true;\n        }\n    }\n    return isEarlyAccessItem;\n}\n\nconst updatePLPTileHeight = (element) => {\n    let cards = $('.tile-img-link');\n    let carouselImageHeight = cards;\n\n    if (element) {\n        carouselImageHeight = $('.carousel-inner');\n    }\n\n    // Find the maximum height among the cards\n    let maxHeight = Math.max.apply(null, carouselImageHeight.map(function () {\n        return $(this).height();\n    }).get());\n\n    // Set the same height for all cards\n    cards.height(maxHeight);\n};\n\n\nmodule.exports = {\n    toggleSelectSizeInfo: toggleSelectSizeInfo,\n    isEarlyAccessElement: isEarlyAccessElement,\n    isShippingPreferencesViewEnabled: isShippingPreferencesViewEnabled,\n    handleNotifyMe: handleNotifyMe,\n    updatePLPTileHeight: updatePLPTileHeight\n};\n\n","/**\n * HTML Templates for use in client-side rendering.\n *\n * @module dom.templates\n * @version 1.0.0\n */\n\n'use strict';\n\n/**\n * QuickView Templates\n */\nexports.quickView = {\n    container: '<div class=\"quickview-container col-12 hidden-md-down\"></div>',\n    quickViewModal: `\n        <div class=\"modal fade\" id=\"quickViewModal\" role=\"dialog\" tabindex=\"-1\">\n            <span class=\"enter-message sr-only\"></span>\n            <div class=\"modal-dialog modal-dialog-centered quick-view-dialog\">\n                <div class=\"modal-content\">\n                    <div class=\"modal-body\"></div>\n                </div>\n            </div>\n        </div>\n    `\n};\n\n/**\n * Get All Wishlist Collection Templates\n */\nexports.addToWishlist = {\n    container: '<div class=\"addToWishlist-container col-12 hidden-md-down\"></div>',\n    addToWishlistModal: `\n    <div class=\"modal fade add-product-to-wishlist-dialog\" id=\"addToWishlistModal\" tabindex=\"-1\" role=\"dialog\">\n            <span class=\"enter-message sr-only\"></span>\n            <div class=\"modal-dialog\">\n                <div class=\"modal-content\">\n                    <div class=\"generic-confirmation-header\">\n                        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                            <svg role=\"img\" aria-describedby=\"add-to-wishlist-cross-title add-to-wishlist-cross-desc\" class=\"icon svg-icon svg-logo-dims\" width=\"16.0\" height=\"16.0\">\n                                <title id=\"add-to-wishlist-cross-title\">Close dialog</title>\n                                <desc id=\"add-to-wishlist-cross-desc\">Cross mark icon to close this dialog</desc>\n                                <use xlink:href=\"#cross\" role=\"img\"></use>\n                            </svg>\n                        </button>\n                    </div>\n                    <div class=\"modal-body\"></div>\n                </div>\n            </div>\n    </div>\n    <isinclude template=\"wishlist/components/createWishlist\" />\n\n    `\n};\n\n/**\n * Cart error message template\n */\nexports.cart = {\n    errorMessage: '<p class=\"cart-error-message\">{0}</p>',\n    cartAvailabilityMessageOOS: (message, url) => (`\n        <li><p class=\"availability-message-text\" role=\"alert\">${message}\n            <a href=\"${url}\" class=\"similar-styles-category-link\">Browse Similar Styles</a></p>\n        </li>\n    `),\n};\n\n/**\n * Cart & Checkout promo template\n */\nexports.promo = {\n    shippingMethod: `\n        <div class=\"row leading-lines shipping-item\">\n            <div class=\"col-9 start-lines\">\n                <p class=\"order-receipt-label\">\n                    <span>{0}:<span class=\"shipping-method-name\">{1}</span></span>\n                </p>\n                <p class=\"shipping-arrival\">\n                    <span class=\"shipping-arrival-time\">{3}</span>\n                </p>\n            </div>\n            <div class=\"col-3 end-lines\">\n                <p class=\"text-right\">\n                    <span class=\"shipping-total-cost\">{2}</span>\n                </p>\n            </div>\n        </div>`,\n    checkoutNormalShipping: '<span class=\"text-right pricing shipping-method-price\">{0}</span>',\n    checkoutDiscountShipping: `\n        <del class=\"text-right pricing shipping-method-price\">{0}</del>\n        <span>{1}</span>\n    `\n};\n\n/**\n * Checkout template\n */\nexports.checkout = {\n    discountPrice: '<del class=\"shipping-cost\">{0}</del><span>{1}</span>'\n};\n\n/**\n * Selected swatch name template\n */\nexports.swatchNameTemplate = {\n    swatchNameHtml: '<p class=\"selected-swatch-name\">Color: {0}</p>'\n};\n\nexports.emptySwatchTemplate = '<span class=\"swatches-empty\">{0}</span>';\n\n/*\n * Address Suggestions template\n */\nexports.addressSuggestions = {\n    suggestionTextTemplate: '<p class=\"address-suggestion-text\"></p>',\n    suggestionsTemplate: `\n        <div id=\"address-suggestions-template\">\n            <div class=\"form-check custom-radio\">\n            <input type=\"radio\" class=\"form-check-input\" id=\"addressSuggestion\" name=\"addressSuggestion\">\n            <label class=\"form-check-label shipping-address-option\" for=\"addressSuggestion\">\n                <span class=\"address-suggestion\"></span>\n            </label>\n            </div>\n        </div>`\n};\n\n/*\n * Approaching Discounts template\n */\nexports.approachingDiscounts = {\n    discountContainerTemplate: '<ul class=\"approaching-discounts\"></ul>',\n    singleDiscountTemplate: '<li class=\"single-approaching-discount\">{0}</li>',\n    multipleDiscountsTemplate: `\n        <li id=\"cart-approaching-discounts-accordion\" class=\"accordion-container\">\n            <div class=\"card\">\n                <div id=\"cart-approaching-discounts-collapse\" class=\"collapse\"\n                    aria-labelledby=\"cart-approaching-discounts-heading\" data-parent=\"#cart-approaching-discounts-accordion\">\n                    <ul class=\"card-body\">{0}</ul>\n                </div>\n                <div class=\"card-header\" id=\"cart-approaching-discounts-heading\">\n                    <h5 class=\"mb-0 text-center\">\n                        <button class=\"btn btn-link show-more-less-button collapsed\" data-toggle=\"collapse\"\n                            data-target=\"#cart-approaching-discounts-collapse\" aria-expanded=\"false\"\n                            aria-controls=\"cart-approaching-discounts-collapse\">\n                            <span class=\"collapsed\">{1}</span>\n                            <span class=\"expanded\">{2}</span>\n                        </button>\n                    </h5>\n                </div>\n            </div>\n        </li>`,\n    nonCouponBasedAdjustmentTemplate: `<div class=\"price-container leading-lines\">\n        <div class=\"flex justify-content-between align-items-center\">\n            <p class=\"price-text\">{0}\n                <span class=\"promo-description non-coupon-price\">{2}</span>\n            </p>\n            <p class=\"end-lines price-value\">\n            <span>{1}</span>\n            </p>\n        </div>\n    </div>`\n};\n\n/**\n * Video Template\n * @param  {Object} options video setting values\n * @return {html} video html template\n */\nexports.videoTemplate = (options = {}) => {\n    // Note: I don't believe this template is used anywhere anymore\n    const { loop = '', videoUrl = '', imgUrl = '', classNames = '', autoplay = false, muted = true, controls = false, icontitle = '', icondesc = '' } = options;\n\n    return `\n        <div class=\"video-component ${classNames}\">\n            <video class=\"video\" playsinline ${autoplay ? 'autoplay' : ''} ${loop ? 'loop' : ''}  ${muted ? 'muted' : ''} poster=\"${imgUrl} ${controls ? 'controls' : ''}>\n                <source src=\"${videoUrl}\" type=\"video/mp4\" />\n            </video>\n            <button class=\"play-video\">\n                <svg role=\"img\" class=\"icon svg-icon svg-video-play\" width=\"16\" height=\"16\" aria-labelledby=\"title\" aria-describedby=\"desc\">\n                    <title>${icontitle}</title>\n                    <desc>${icondesc}</desc>\n                    <use xlink:href=\"#play\" role=\"img\"></use>\n                </svg>\n            </button>\n        </div>\n    `;\n};\n\n/**\n * Image Template\n * @param  {string} imgUrl value\n * @param  {string} altText value\n * @param  {string} classNames value\n * @return {html} video html template\n */\nexports.imageTemplate = (imgUrl, altText, classNames) => {\n    return `\n        <div class=\"image-component ${classNames}\">\n            <img class=\"w-100\" src=\"${imgUrl}\" alt=\"${altText}\"/>\n        </div>\n    `;\n};\n\n/**\n * Video Thumbnail Template on PDP\n * @param {string} carouselId - Carousel id value\n * @param {Object[]} imgs - Array of large product images,along with related information\n * @param {string} videoUrl - Selected variant group video url\n * @param {string} videoThumbnailImage - Selected variant group poster url\n * @return {html} List item html template\n */\nexports.videoThumbnailTemplate = (carouselId, imgs, videoUrl, videoThumbnailImage) => {\n    return `\n        <li data-target=\"#${carouselId}\" \n            data-slide-to=\"${imgs.length}\" \n            class=\"video-thumbnail\">\n            <a href=\"${videoUrl}\" class=\"mz-thumb-selected\">\n                ${videoThumbnailImage ? '<img src=\"' + videoThumbnailImage + '\" class=\"img-fluid\" alt=\"' + imgs[0].alt + ' video\" itemprop=\"image\" />' : '<video playsinline controlslist=\"nodownload\"><source type=\"video/mp4\" src=\"' + videoUrl + '\"></video>'}\n                <svg role=\"img\" \n                    aria-describedby=\"play-title play-desc\" \n                    class=\"icon svg-icon svg-video-play\" \n                    width=\"40\" \n                    height=\"40\">\n                    <title id=\"play-title\">Play</title>\n                    <use xlink:href=\"#play\" \n                        role=\"img\" \n                        title=\"Play\"></use>\n                </svg>\n            </a>\n        </li>\n    `;\n};\n\n/**\n * Size option template\n * @param  {string} url - Size variant url\n * @param  {string} value - Size value\n * @return {html} size option html template\n */\nexports.sizeOptionTemplate = (url, value) => {\n    return `<option value=\"${url}\" data-attr-value=\"${value}\">${value}</option>`;\n};\n\n/**\n * Function to rerender size button element\n * @param {Object} variantData - variant details\n * @param {string} ariaLabel - aria label\n * @param {string} ariaDescribedby - aria described by\n * @param {string} selectedText - selected text\n * @param {string} oosMessage - out of the stock text\n * @return {html} size button html template\n */\nexports.sizeButtonTemplate = (variantData, ariaLabel, ariaDescribedby, selectedText, oosMessage) => {\n    const { selected, forceOutOfStock, inStock, value, url, sizeSwatchNotAvailable } = variantData;\n    return `<li class=\"size-list ${sizeSwatchNotAvailable ? 'd-none' : ''}\">\n                <button class=\"btn size-btn ${selected ? 'selected' : ''} ${!inStock || forceOutOfStock ? ' not-available' : ''}\" data-attr-url=\"${url ||\n        ''}\" data-attr-value=\"${value}\" data-value-id=\"${value}\" aria-label=\"${ariaLabel}\" aria-describedby=\"${ariaDescribedby}\">${value}</button>\n                <span id=\"${ariaDescribedby}\" class=\"sr-only selected-assistive-text\" data-selected-text=\"${selectedText}\" data-out-of-stock=\"${oosMessage}\">${selected ? selectedText : ''} ${!inStock || forceOutOfStock ? oosMessage : ''}</span>\n            </li>`;\n};\n\n/**\n * Function to render empty wishlist markup for guest user\n * @param {string} emptyWishlistMessage - empty wishlist message\n * @return {html} wishlist html template\n */\nexports.guestEmptyWishlistTemplate = (emptyWishlistMessage, emptyWishlistContentAssetBody) => {\n    return `<div class=\"col-12 col-md-6 empty-wishlist\">\n                <div class=\"empty-list-user-section\">\n                    <p class=\"non-logged-user-message\">${emptyWishlistMessage}</p>\n                    ${emptyWishlistContentAssetBody}\n                </div>\n            </div>`;\n};\n\n/**\n * Function to render empty wishlist markup for guest user\n * @param {string} emptySFLMessage - empty SFL message\n * @param {string} continueShopURL - continue shopping URL\n * @param {string} continueShopMsg - continue shopping message\n * @param {string} signInMsg - sign In message\n * @param {string} signInSFLURL - sign in URL\n * @return {html} SFL html template\n */\nexports.emptySFL = (emptySFLMessage, continueShopURL, continueShopMsg, signInMsg, signInSFLURL) => {\n    return `<div class=\"sfl-cart-products\">\n                <div class=\"container cart-empty sfl-empty\">\n                    <div class=\"row\">\n                        <div class=\"col-12 text-center\">\n                            <p class=\"sfl-empty-msg empty-message\">${emptySFLMessage}</p>\n                            <a href=\"${signInSFLURL}\"\n                                class=\"btn btn-block button-secondary account-login-btn enable-button-onvalidate sfl-login-btn col-md-6\">${signInMsg}\n                            </a>\n                            <a href=\"${continueShopURL}\" class=\"d-inline-block tertiary-link continue-shop-link\" role=\"link\">${continueShopMsg}</a></div>\n                        </div>\n                    </div>\n                </div>\n            </div>`;\n};\n\n/**\n * GWP Site Templates\n */\nexports.gwpSizeTemplate = {\n    singleSize: '<span class=\"selected-size\">{0}</span>',\n    multiSize: `\n        <div class=\"size-list\">\n            <span class=\"sr-only selected-assistive-text\"></span>\n            <select class=\"custom-select form-control select-size\" id=\"{0}\">\n                {1}\n            </select>\n        </div>\n    `,\n    multiDefaultSizeOption: '<option value=\"{0}\">{1}</option>',\n    multiSizeOption: '<option value=\"{0}\" data-attr-value=\"{1}\" class=\"{4}\" {2} {5}>{3}</option>'\n};\n\n/**\n * Address autocomplete templates\n */\nexports.autoComplete = {\n    suggestionLink: (suggestion, addressLine, secondaryEntryAddressLine) => (`\n        <a href=\"javascript:void(0);\"\n            class=\"autocomplete-suggestion list-group-item\"\n            data-address-one=\"${suggestion.street_line}\"\n            data-address-two=\"${suggestion.secondary || ''}\"\n            data-state=\"${suggestion.state}\"\n            data-city=\"${suggestion.city}\"\n            data-zipcode=\"${suggestion.zipcode}\"\n            data-has-secondary-entries=\"${suggestion.entries > 1}\"\n            data-secondary-entry-search-value=\"${secondaryEntryAddressLine}\"\n        >${addressLine}</a>\n    `),\n    suggestionContainer: containerClass => (`<div class=\"autocomplete-suggestions list-group ${containerClass || ''}\"></div>`)\n};\n\nexports.contactUsTemplate = {\n    signupMessage: (status, msg) => (`\n        <div class=\"contact-us-signup-alert text-center ${status}\" role=\"alert\">\n            ${msg}\n        </div>\n    `)\n};\n\nexports.browserWarningTemplate = `\n    We're sorry, this browser is no longer supported.<br/>\n    Please update your browser for a smoother, more secure shopping experience. We recommend downloading the latest version of\n    <a href=\"https://www.google.com/chrome/browser/desktop/index.html\" target=\"_blank\" rel=\"nofollow\">Google Chrome</a>,\n    <a href=\"https://www.microsoft.com/en-us/edge\" target=\"_blank\" rel=\"nofollow\">Microsoft Edge</a> or\n    <a href=\"https://www.mozilla.org/en-US/firefox/desktop/\" target=\"_blank\" rel=\"nofollow\">Mozilla Firefox</a>.\n`;\n\n/*\n * Shipping preference radio buttons\n */\nexports.shippingPreferenceTemplates = {\n    shippingPreferences: (ispuRadioLabel, ispuRadioValue, shipToRadioLabel, shipToRadioValue, changeStoreLabel, preferISPU = false) => (`\n        <div class=\"form-check custom-control custom-checkbox preference-container ispu-preference-container\">\n            <input id=\"preference-ispu\" name=\"shipping-preference\" type=\"checkbox\" class=\"custom-control-input shipping-preference preference-ispu\" ${preferISPU ? 'checked' : ''} value=\"${ispuRadioValue}\">\n            <label class=\"custom-control-label\" for=\"preference-ispu\">${ispuRadioLabel}</label>\n            <button class=\"btn-link tertiary-link change-store-link\">${changeStoreLabel}</button>\n            <div class=\"content\">\n                <div class=\"select-size-info-msg\"></div>\n                <div class=\"ispu-info-message\"></div>\n                <div class=\"message-wrapper\">\n                    <div class=\"inventory-message\"></div>\n                    <div class=\"ispu-delivery-estimation-message\"></div>\n                </div>\n                <div class=\"service-info-message\"></div>\n                <div class=\"store-detail-container\"></div>\n            </div>\n        </div>\n        <div class=\"form-check custom-radio preference-container ship-to-address-preference-container d-none\">\n            <input id=\"preference-ship-to-address\" name=\"shipping-preference\" type=\"radio\" class=\"form-check-input shipping-preference preference-ship-to-address\" value=\"${shipToRadioValue}\" ${!preferISPU ? 'checked' : ''}>\n            <label class=\"form-check-label\" for=\"preference-ship-to-address\">${shipToRadioLabel}</label>\n            <div class=\"content\">\n                <div class=\"narvar-edd-info\"></div>\n                <div class=\"ship-to-info-message\"></div>\n            </div>\n        </div>\n    `),\n    storeDetail: (storeId, name, address1, city, stateCode, postalCode) => (`\n        <div class=\"store-detail\">\n            <div class=\"name\" data-store-id=\"${storeId}\">${name}</div>\n            <div class=\"address\">\n                <div class=\"address-line-1\">${address1}<span class=\"comma-separate\">,</span>\n                    <span class=\"city-state-postalcode\"> ${city}<span class=\"city-comma-separate\">,</span> ${stateCode} ${postalCode}</span>\n                </div>\n            </div>\n        </div>\n    `)\n};\n\n/*\n * Product detail page - messaging templates\n */\nexports.productDetail = {\n    selectStyleMessageTmpl: message => `<li><p class=\"availability-message-text select-size-info\" role=\"alert\">${message}</p></li>`,\n    availabilityMessageTmpl: message => `<li><p class=\"availability-message-text\" role=\"alert\">${message}</p></li>`,\n    restrictedMessageTmpl: message => `<li><p class=\"availability-message-text mt-2\" role=\"alert\">${message}</p></li>`,\n    availabilityMessageOOS: (message, url) => (`\n        <li><p class=\"availability-message-text\" role=\"alert\">${message}\n            <a href=\"${url}\" class=\"similar-styles-category-link\">Browse Similar Styles</a></p>\n        </li>\n    `),\n    availabilityMessagePreorder: (message, url) => (`\n        <li><div class=\"availability-message-text-preorder\" role=\"alert\">\n            <p class=\"message\">${message}</p>\n            <a href=\"${url}\" class=\"similar-styles-category-link-preorder\">Shop for Similar Styles</a></div>\n        </li>\n    `),\n    ispuSelectStyleMessageTmpl: message => `<p class=\"availability-message-text\" role=\"alert\">${message}</p>`,\n    ispuAvailabilityMessageTmpl: message => `<p class=\"availability-message-text\" role=\"alert\">${message}</p>`,\n    ispuLowStockMessageTmpl: message => `<li><p class=\"ispu-availability-message-text\" role=\"alert\">${message}</p></li>`\n};\n\nexports.dialogTemplate = options => {\n    const {\n        buttons = [{ text: 'OK', primary: true, link: '' }],\n        className = '',\n        modalContentHeading = '',\n        modalContentBody = '',\n        id = 'dialog-' + Date.now(),\n        slideOut = false\n    } = options;\n\n    const buttonSpace = Math.floor(12 / buttons.length);\n\n    return `\n        <div class=\"modal fade ${slideOut ? 'lp-slideout-modal' : 'generic-modal-dialog'} ${className}\" id=\"${id}\" tabindex=\"-1\" role=\"dialog\">\n            <div class=\"modal-dialog\" role=\"document\">\n                <div class=\"modal-content${slideOut ? ' lp-scrollbar' : ''}\">\n                    <div class=\"${slideOut ? 'modal-header' : 'generic-confirmation-header'}\">\n                        ${slideOut && modalContentHeading ? `<h4>${modalContentHeading}</h4>` : ''}\n                        <button type=\"button\" class=\"close close-current-modal\" data-dismiss=\"modal\" aria-label=\"Close\">\n                            <svg role=\"img\" aria-describedby=\"${id}-cross-title ${id}-cross-desc\" class=\"icon svg-icon svg-logo-dims\" width=\"16.0\" height=\"16.0\">\n                                <title id=\"${id}-cross-title\">Close dialog</title>\n                                <desc id=\"${id}-cross-desc\">Cross mark icon to close this dialog</desc>\n                                <use xlink:href=\"#cross\" role=\"img\"></use>\n                            </svg>\n                        </button>\n                    </div>\n                    ${!slideOut && modalContentHeading ? `<p class=\"modal-body generic-confirmation-body-heading\">${modalContentHeading}</p>` : ''}\n                    <div class=\"modal-body generic-confirmation-body-body${slideOut ? ' veiled' : ''}\">${modalContentBody}</div>\n                    <div class=\"row\">\n                        ${buttons.map(button => `\n                            <div class=\"col-${buttonSpace}\">\n                            ${button.link ?\n            `<a href=\"${button.link}\" class=\"btn btn-block button-${button.primary ? 'primary' : 'secondary'}\">${button.text}</a>` :\n            `<button type=\"button\" class=\"btn btn-block button-${button.primary ? 'primary' : 'secondary'}\" data-dismiss=\"modal\">${button.text}</button>`\n        }\n                            </div>`).join('')\n        }\n                    </div>\n                </div>\n            </div>\n        </div>\n    `;\n};\n\nexports.errorTextTemplate = errorMessage => `<div class=\"container\"><p class=\"error-message-text\">${errorMessage}</p></div>`;\n\nexports.oneTrust = {\n    privacyDialogCookieBanner: `\n        <div class=\"onetrust-dialog-cookie-banner\">\n            <div class=\"onetrust-dialog-cookie-banner-text\">\n                You can opt out of 3rd party cookies by clicking <button class=\"cookie-preferences\">Cookie Preferences</button>.\n            </div>\n        </div>\n    `\n};\nexports.loyalty = {\n    carouselBadge: '<div class=\"loyalty-product-pdp-badge product-tile-badge align-items-center justify-content-center d-none\"><span class=\"loyalty-product-pdp-badge-text product-tile-badge-text\">{0}</span></div>'\n};\n","const { addClass, hasClass, queryFirst } = require('./domUtil');\n\n/**\n * Tokenize strings\n *\n * @param  {string | Object} string Resource message that need to be tokenized\n * @param  {string | Object} values Values that need to be replaced.\n * @param  {string | Object} leftToken Left token type with default as {{\n * @param  {string | Object} rightToken Right token type with defaulat as }}\n * @return  {string} Updated string.\n */\nexports.tokenize = (string, values, leftToken = '{{', rightToken = '}}') => {\n    if (typeof values !== 'object') return string;\n    const operators = /([{}+.\\-!?[\\]])/g;\n    return string.replace(new RegExp(leftToken.replace(operators, '\\\\$1') + '[\\\\r\\\\n\\\\s\\\\t]*([\\\\s\\\\S]+?)[\\\\r\\\\n\\\\s\\\\t]*' + rightToken.replace(operators, '\\\\$1'), 'igm'), (_, code) => {\n        return values[code] || '';\n    });\n};\n\n/**\n *  Transforms all text to a kebab-case string.\n *  @param {string} text - The text to transform\n *  @returns {string} - The transformed string value\n *  @example toKebabCase('.suggestions-related-products', ['.product-tile', '.link']) // suggestions-related-products-product-tile-link\n */\nconst toKebabCase = exports.toKebabCase = (...values) => values.map(value => {\n    if (!Array.isArray(value)) value = [value];\n    return value.map(text => typeof text === 'undefined' ? '' : String(text).toLowerCase().replace(/\\W/g, '-').trim()).join('-');\n}).join('-').replace(/-+/g, '-').replace(/^-+|-+$/g, '');\n\n/**\n *  Transforms any input into a hash value.\n *  @param {*} input - The input to transform\n *  @returns {string} - The transformed string hash value\n *  @example hashValue(function(a){ return a++; }) // 66756e6374696f6e2861297b2072657475726e20612b2b3b207d\n */\nexports.hashValue = input => {\n    let value = JSON.stringify(String(input));\n\n    if (value === '\"[object Object]\"') {\n        // Sort the object first so hashes match despite key order\n        value = JSON.stringify(Object.keys(input).sort().reduce((result, key) => {\n            result[key] = input[key];\n            return result;\n        }, {}));\n    }\n\n    if (value.startsWith('\"') && value.endsWith('\"')) {\n        value = value.substr(1, value.length - 2);\n    }\n\n    return value.split(\"\").map(digit => digit.charCodeAt(0).toString(16)).join('');\n};\n\n/**\n *  Transforms all text to a valid dataset key.\n *  @param {string} text - The text to transform\n *  @returns {string} - The transformed string value\n *  @example toDatasetKey('.suggestions-related-products', ['.product-tile', '.link']) // suggestionsRelatedProductsProductTileLink\n */\nexports.toDatasetKey = (...values) => toKebabCase(...values).split('-').map((text, index) => index === 0 ? text : text.charAt(0).toUpperCase() + text.substr(1)).join('');\n\n/**\n * Format dynamic resource messages.\n *\n * @param  {string | Object} string Resource message that need to be tokenized\n * @param  {string | Object} tokens Tokens that need to be replaced.\n * @return  {string} Updated string.\n */\nexports.formatMessage = (string, ...tokens) => {\n    return this.tokenize(\n        string,\n        tokens.reduce((result, item, index) => {\n            result[index] = item;\n            return result;\n        }, {}),\n        '{',\n        '}'\n    );\n};\n\n/**\n * Safely gets nested object properties. Returns the value if found, undefined if not found.\n * @param {*} obj The parent object in which the property exists\n * @param {*} keyString String denoting where in the parent object your target property should exist\n * @param  {...any} replaceValues Values in the keyString to replace -- reference in the keyString with a number encapsulated in {} (e.g. {0}, {1}, etc)\n * @return {Object} returns nested object properties\n */\nexports.getNestedValue = function (obj, keyString, ...replaceValues) {\n    const keys = keyString.split(/\\[|\\]|\\./).filter(el => el !== '');\n\n    return keys.reduce((o, i) => (o || {})[/\\{\\d+\\}/.test(i) ? replaceValues[i.split(/\\{|\\}/)[1]] : i], obj);\n};\n\n/**\n * Ensures an event handler is only bound to an element once\n * @param {HTMLElement} element The element to bind the event to\n * @param {string} eventType The type of event\n * @param {function} handler The handler to execute when the event occurs, or the immediate callback if not defined\n * @param {string} initFlag The name of the flag to use for init\n */\nexports.initOnce = (element, eventType = '', handler, initFlag = '') => {\n    const flag = 'init' + initFlag + eventType.toLowerCase();\n\n    if (!element || element.dataset[flag]) return;\n\n    element.dataset[flag] = true;\n    if (eventType) {\n        element.addEventListener(eventType, handler);\n    } else {\n        handler();\n    }\n};\n\n/**\n * appends params to a url\n * @param {string} url - Original url\n * @param {Object} params - Parameters to append\n * @returns {string} result url with appended parameters\n */\nexports.appendToUrl = (url, params) => {\n    let newUrl = url;\n    newUrl +=\n        (newUrl.indexOf('?') !== -1 ? '&' : '?') +\n        Object.keys(params)\n            .map(key => key + '=' + encodeURIComponent(params[key]))\n            .join('&');\n\n    return newUrl;\n};\n\n/**\n * This method performs an ajax call\n * @param {string} url endpoint url\n * @param {string} type ajax method type\n * @param {Object} data data for an ajax call\n * @param {function} onSuccess success call back function\n * @param {function} onError error call back function\n * @return {function} returns ajax function\n */\nexports.getJSON = (url, type, data = {}, onSuccess = function () { }, onError = function () { }) => {\n    return $.ajax({\n        url,\n        type,\n        dataType: 'json',\n        data,\n        success: onSuccess,\n        error: onError\n    });\n};\n\n/**\n * This method renders geo location\n * @param {function} successCallback Success callback function\n * @param {Object} mixin additional parameters\n * @param {function} errorCallback Error callback function\n */\nexports.geolocate = (successCallback, mixin = {}, errorCallback) => {\n    if (!navigator.geolocation) return;\n    const data = Object.assign({}, mixin);\n    const successHandler = response => {\n        const { coords } = response;\n        if (coords) {\n            const { latitude, longitude } = coords;\n            data.latitude = latitude;\n            data.longitude = longitude;\n        }\n\n        if (successCallback) {\n            successCallback(data);\n        }\n    };\n    const errorHandler = error => {\n        if (errorCallback) {\n            errorCallback(data);\n        }\n    };\n    navigator.geolocation.getCurrentPosition(successHandler, errorHandler);\n};\n\n/**\n * This method stores data in key-value pair into browser's localStorage\n * @param {string} key Identifier to be stored\n * @param {string | Object} value Value to be stored\n */\nexports.setItemInLocalStorage = function (key, value) {\n    if (!window.localStorage || !key) {\n        return;\n    }\n\n    localStorage.setItem(key, JSON.stringify(value));\n};\n\n/**\n * This method stores data into browser's localStorage\n * @param {string} key Identifier for retrieving the value\n * @return {string | Object | boolean} returns parsed value\n */\nexports.getItemFromLocalStorage = function (key) {\n    if (!window.localStorage || !key) {\n        return false;\n    }\n\n    const value = localStorage.getItem(key);\n\n    if (!value) {\n        return false;\n    }\n\n    return JSON.parse(value);\n};\n\n/**\n * This method removes data from browser's localStorage\n * @param {string} key Identifier\n */\nexports.removeItemFromLocalStorage = function (key) {\n    if (!window.localStorage || !key) {\n        return;\n    }\n\n    localStorage.removeItem(key);\n};\n\n/**\n * This method formats phone number\n * @param {HTMLElement} element - current element for which formatting should be one\n */\nexports.formatPhoneNumber = function (element) {\n    const Cleave = require('cleave.js').default;\n    if (element) {\n        let selector = '#' + element.id;\n        setTimeout(() => {\n            var cleave = new Cleave(selector, {\n                delimiters: ['(', ') ', '-'],\n                blocks: [0, 3, 3, 9],\n                numericOnly: true\n            });\n\n            $(element).data('cleave', cleave);\n        }, 0);\n    }\n}\n\n/**\n * @function\n * @desc Determines if the device that is being used is mobile\n * @returns {Boolean}\n */\nexports.isMobile = function () {\n    const mobileAgentHash = ['mobile', 'tablet', 'phone', 'ipad', 'ipod', 'android', 'blackberry', 'windows ce', 'opera mini', 'palm'];\n    let idx = 0;\n    let isMobile = false;\n    const userAgent = navigator.userAgent.toLowerCase();\n\n    while (mobileAgentHash[idx] && !isMobile) {\n        isMobile = userAgent.indexOf(mobileAgentHash[idx]) >= 0;\n        idx++;\n    }\n    return isMobile;\n};\n\n/**\n * @function\n * @desc Fixes position sticky scrolling behavior for elements with greater height than widnow height. Ensures content is scrollable above the fold\n * @param {Array} items - items to set scroll height position\n * @param {Boolean} isTopOnly - Whether stick to top side only\n * @param {Number} topOffset - additional top space\n */\nexports.stickyScrollPosition = (items, isTopOnly, topOffset = 0) => {\n    const $window = $(window);\n    const handleStickyPositionOnScroll = item => {\n        let ticking = false;\n        const detailStickyScroll = () => {\n            ticking = false;\n            const itemHeight = item.getBoundingClientRect().height;\n            const windowHeight = window.innerHeight;\n            const headerHeight = $('.main-header').outerHeight();\n            const newTop = itemHeight - windowHeight + headerHeight;\n\n            if (!isTopOnly && itemHeight > windowHeight - headerHeight) {\n                item.style.setProperty('--top', `${-newTop}px`);\n            } else {\n                item.style.setProperty('--top', `${headerHeight + topOffset}px`);\n            }\n        };\n        const requestTick = () => {\n            if (!ticking) {\n                requestAnimationFrame(detailStickyScroll);\n            }\n            ticking = true;\n        };\n        const onScroll = () => {\n            requestTick(item);\n        };\n        $window.scroll(onScroll);\n    };\n\n    items.forEach(item => {\n        handleStickyPositionOnScroll(item);\n    });\n};\n\n/**\n * Determines whether the user is browsing with an old/unsupported browser.\n * @returns {boolean} True if the browser is old/unsupported.\n */\nexports.isUnsupportedBrowser = () => {\n    const { userAgent } = navigator;\n    const sitePrefs = document.getElementById('site-prefs');\n\n    if (!sitePrefs) return false;\n\n    let unsupportedBrowserTypes;\n\n    if (sitePrefs.dataset) {\n        ({ unsupportedBrowserTypes } = sitePrefs.dataset);\n    } else {\n        // For old IE\n        unsupportedBrowserTypes = sitePrefs.getAttribute('data-unsupported-browser-types');\n    }\n\n    return JSON.parse(unsupportedBrowserTypes).some(function (uaFragment) {\n        return ~userAgent.indexOf(uaFragment);\n    });\n};\n\n/**\n * Get remaining time object for given time string \n * @param {string} endtime - remaining time string comes as parameter\n * @return {Object} remainTimeObject - Date Object with day, hours, minutes, Sec\n */\nexports.getTimeRemaining = (endtime) => {\n    const total = Date.parse(endtime) - Date.now();\n    const seconds = Math.floor((total / 1000) % 60).toString();\n    const minutes = Math.floor((total / 1000 / 60) % 60).toString();\n    const hours = Math.floor((total / (1000 * 60 * 60)) % 24).toString();\n    const days = Math.floor(total / (1000 * 60 * 60 * 24));\n\n    return {\n        total,\n        days,\n        hours,\n        minutes,\n        seconds\n    };\n};\n\n\n/**\n * Converts the range to Absolute, according to the Rounding Rules configured on Global-e side.\n * @param {number} price - Price\n * @param {Object} range - Range\n * @returns {Object} - result Absolute\n */\nfunction convertRangeToAbsolute(price, range) {\n    let result;\n    let intPart;\n    let base;\n    if (range.RangeBehavior === 1) {\n        // range already has absolute behavior\n        result = range;\n    } else {\n        result = {};\n        result.RangeBehavior = range.RangeBehavior;\n        result.RoundingExceptions = [];\n        result.From = range.From;\n        result.To = range.To;\n\n        intPart = Math.floor(price);\n\n        if (range.RangeBehavior === 2) {\n            // Relative Decimal\n            result.LowerTarget = intPart - 1;\n            result.LowerTarget += range.LowerTarget;\n            result.UpperTarget = intPart + range.UpperTarget;\n            result.Threshold = intPart + range.Threshold;\n            for (let i = 0; i < range.RoundingExceptions.length; i++) {\n                let ex = range.RoundingExceptions[i];\n                ex.ExceptionValue += intPart;\n                result.RoundingExceptions.push(ex);\n            }\n        } else if (range.RangeBehavior === 3) {\n            // Relative Whole\n            if (range.TargetBehaviorHelperValue === 0) {\n                range.TargetBehaviorHelperValue = 10; // eslint-disable-line no-param-reassign\n            }\n            base = Math.floor(price / range.TargetBehaviorHelperValue) * range.TargetBehaviorHelperValue;\n            result.LowerTarget = (base - range.TargetBehaviorHelperValue) + range.LowerTarget;\n            result.UpperTarget = base + range.UpperTarget;\n            result.Threshold = base + range.Threshold;\n            for (let i = 0; i < range.RoundingExceptions.length; i++) {\n                let ex = range.RoundingExceptions[i];\n                ex.ExceptionValue += base;\n                result.RoundingExceptions.push(ex);\n            }\n        } else if (range.RangeBehavior === 4) {\n            // Nearest target\n            if (range.TargetBehaviorHelperValue === 0) {\n                range.TargetBehaviorHelperValue = 5; // eslint-disable-line no-param-reassign\n            }\n            base = Math.floor(price / range.TargetBehaviorHelperValue) * range.TargetBehaviorHelperValue;\n            result.LowerTarget = (base - 1) + range.LowerTarget;\n            result.UpperTarget = ((base - 1) + range.TargetBehaviorHelperValue) + range.UpperTarget;\n            result.Threshold = base + range.Threshold;\n            for (let i = 0; i < range.RoundingExceptions.length; i++) {\n                let ex = range.RoundingExceptions[i];\n                ex.ExceptionValue += base;\n                result.RoundingExceptions.push(ex);\n            }\n        }\n    }\n    return (result || null);\n}\n\n/**\n * Rounds the given price, according to the Rounding Rules configured on Global-e side\n * @param {number} price - Price\n * @param {Object} range - Range\n * @returns {number} - Absolute\n */\nfunction absoluteRounding(price, range) {\n    let result = null;\n    // check exceptions\n    if (range.RoundingExceptions.length > 0) {\n        for (let i = 0; i < range.RoundingExceptions.length; i++) {\n            let ex = range.RoundingExceptions[i];\n            if (price === ex.ExceptionValue) {\n                result = price;\n            }\n        }\n    }\n    // no exception was found\n    if (!result) {\n        // check threshold\n        if (price < range.Threshold) {\n            result = range.LowerTarget;\n        } else {\n            result = range.UpperTarget;\n        }\n    }\n    return result;\n}\n\n/**\n * Calculate and returns currecy price for Stylitics widget\n * @param {string} gePrice - price\n * @param {Object} roundingRanges - globale rouding rules json\n * @return {string} - Rounded price\n */\nfunction roundPrice(gePrice, roundingRanges) {\n    let range = null;\n    let price = gePrice;\n    for (let i = 0; i < roundingRanges.length; i++) {\n        let rg = roundingRanges[i];\n        if (rg.From < price && price <= rg.To) {\n            range = rg;\n            break;\n        }\n    }\n    if (range) {\n        range = convertRangeToAbsolute(price, range);\n        price = absoluteRounding(price, range); // eslint-disable-line no-param-reassign\n    }\n    if (price < 0) {\n        price = 0; // eslint-disable-line no-param-reassign\n    }\n    return price;\n}\n\n/**\n * Calculate and returns currecy price for Stylitics widget\n * @param {string} price - list price\n * @param {string} salesPrice - sales price\n * @return {Object} - localized price object with list and sales price\n */\nexports.globaleCalculation = (price, salesPrice) => {\n    const countryCurrency = window.currencySymbol;\n    if (price.innerText.indexOf(countryCurrency) === -1) {\n        let salesPriceText;\n        let geSalesPrice;\n\n        let priceText = price.innerText.replace('$', '');\n        let gePrice = priceText;\n\n        if (salesPrice) {\n            salesPriceText = salesPrice.innerText.replace('$', '');\n            geSalesPrice = salesPriceText;\n        }\n\n        const countryCoefficientIncludeVAT = window.countryCoefficientIncludeVAT;\n        const countryVATRate = parseFloat(window.countryVATRate);\n        const merchantTaxRate = parseFloat(window.merchantTaxRate);\n        const currenyRate = parseFloat(window.currenyRate);\n        const coefficientRate = parseFloat(window.coefficientRate);\n\n        if (['2', '4', '6'].indexOf(countryCoefficientIncludeVAT) !== -1) {\n            gePrice += gePrice * countryVATRate;\n            if (geSalesPrice) {\n                geSalesPrice += (geSalesPrice * countryVATRate);\n            }\n        } else if (['0', '8'].indexOf(countryCoefficientIncludeVAT) !== -1\n            || (parseInt(countryCoefficientIncludeVAT) === 6 && window.useCountryVAT)) {\n            gePrice /= (1 + (merchantTaxRate / 100));\n            geSalesPrice /= (1 + (merchantTaxRate / 100));\n            if (parseInt(countryCoefficientIncludeVAT) === 6) {\n                gePrice += gePrice * countryVATRate;\n                if (geSalesPrice) {\n                    geSalesPrice += geSalesPrice * countryVATRate;\n                }\n            }\n        }\n\n        gePrice = gePrice * currenyRate * coefficientRate;\n        geSalesPrice = geSalesPrice ? geSalesPrice * currenyRate * coefficientRate : null;\n\n        const globaleRoundingRanges = JSON.parse(JSON.stringify(window.roundingRanges));\n        if (globaleRoundingRanges) {\n            const roundingRanges = JSON.parse(globaleRoundingRanges);\n            gePrice = roundPrice(gePrice, roundingRanges);\n            geSalesPrice = geSalesPrice ? roundPrice(geSalesPrice, roundingRanges) : '';\n        }\n\n        return {\n            gePrice: countryCurrency + ' ' + gePrice,\n            geSalesPrice: countryCurrency + ' ' + geSalesPrice\n        };\n    }\n    return {\n        gePrice: price.innerText,\n        geSalesPrice: salesPrice ? salesPrice.innerText : ''\n    };\n};\n","'use strict';\n\nvar scrollAnimate = require('../components/scrollAnimate');\n\n/**\n * Display error messages and highlight form fields with errors.\n * @param {string} parentSelector - the form which contains the fields\n * @param {Object} fieldErrors - the fields with errors\n */\nfunction loadFormErrors(parentSelector, fieldErrors) { // eslint-disable-line\n    // Display error messages and highlight form fields with errors.\n    $.each(fieldErrors, function (attr) {\n        $('*[name=' + attr + ']', parentSelector)\n            .addClass('is-invalid')\n            .siblings('.invalid-feedback')\n            .html(fieldErrors[attr]);\n    });\n    // Animate to top of form that has errors\n    scrollAnimate($(parentSelector));\n}\n\n/**\n * Clear the form errors.\n * @param {string} parentSelector - the parent form selector.\n */\nfunction clearPreviousErrors(parentSelector) {\n    $(parentSelector).find('.form-control.is-invalid').removeClass('is-invalid');\n    $('.error-message').hide();\n}\n\nmodule.exports = {\n    loadFormErrors: loadFormErrors,\n    clearPreviousErrors: clearPreviousErrors\n};\n","'use strict';\n\nmodule.exports = {\n    setTabNextFocus: function (focusParams) {\n        var KEYCODE_TAB = 9;\n        var isTabPressed = (focusParams.event.key === 'Tab' || focusParams.event.keyCode === KEYCODE_TAB);\n\n        if (!isTabPressed) {\n            return;\n        }\n\n        var firstFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.firstElementSelector);\n        var lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.lastElementSelector);\n\n        if ($(focusParams.containerSelector + ' ' + focusParams.lastElementSelector).is(':disabled')) {\n            lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.nextToLastElementSelector);\n            if ($('.product-quickview.product-set').length > 0) {\n                var linkElements = $(focusParams.containerSelector + ' a#fa-link.share-icons');\n                lastFocusableEl = linkElements[linkElements.length - 1];\n            }\n        }\n\n        if (focusParams.event.shiftKey) /* shift + tab */ {\n            if ($(':focus').is(firstFocusableEl)) {\n                lastFocusableEl.focus();\n                focusParams.event.preventDefault();\n            }\n        } else /* tab */ {\n            if ($(':focus').is(lastFocusableEl)) { // eslint-disable-line\n                firstFocusableEl.focus();\n                focusParams.event.preventDefault();\n            }\n        }\n    }\n};\n","'use strict';\n\n/**\n * Remove all validation. Should be called every time before revalidating form\n * @param {element} form - Form to be cleared\n * @returns {void}\n */\nfunction clearFormErrors(form) {\n    $(form).find('.form-control.is-invalid').removeClass('is-invalid');\n}\n\nmodule.exports = function (formElement, payload) {\n    // clear form validation first\n    clearFormErrors(formElement);\n    $('.alert', formElement).remove();\n\n    if (typeof payload === 'object' && payload.fields) {\n        Object.keys(payload.fields).forEach(function (key) {\n            if (payload.fields[key]) {\n                var feedbackElement = $(formElement).find('[name=\"' + key + '\"]')\n                    .parent()\n                    .children('.invalid-feedback');\n\n                if (feedbackElement.length > 0) {\n                    if (Array.isArray(payload[key])) {\n                        feedbackElement.html(payload.fields[key].join('<br/>'));\n                    } else {\n                        feedbackElement.html(payload.fields[key]);\n                    }\n                    feedbackElement.siblings('.form-control').addClass('is-invalid');\n                }\n            }\n        });\n    }\n    if (payload && payload.error) {\n        var form = $(formElement).prop('tagName') === 'FORM'\n            ? $(formElement)\n            : $(formElement).parents('form');\n\n        form.prepend('<div class=\"alert alert-danger\" role=\"alert\">'\n            + payload.error.join('<br/>') + '</div>');\n    }\n};\n","'use strict';\n\nmodule.exports = function (element) {\n    var position = element && element.length ? element.offset().top : 0;\n    $('html, body').animate({\n        scrollTop: position\n    }, 500);\n    if (!element) {\n        $('.logo-home').focus();\n    }\n};\n","'use strict';\n\nmodule.exports = function (include) {\n    if (typeof include === 'function') {\n        include();\n    } else if (typeof include === 'object') {\n        Object.keys(include).forEach(function (key) {\n            if (typeof include[key] === 'function') {\n                include[key]();\n            }\n        });\n    }\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * OOTBS SFRA JS code\n * DRP-180 updated addToCart product set code on line 772 for custom designs\n */\n\n'use strict';\nvar focusHelper = require('base/components/focus');\nimport { queryFirst, queryAll, addClass, removeClass, hasClass, remove, renderFragment } from '../domUtil';\nimport { formatMessage, getJSON, getNestedValue, tokenize } from '../util';\nimport { updateProductData, handleColor, ssAddToCart } from 'fitpredictor/product/secretsauce';\nconst { trackPageView } = require('../components/etmc');\nconst { toggleSelectSizeInfo, isEarlyAccessElement } = require('./helper');\nconst { swatchNameTemplate, sizeOptionTemplate, sizeButtonTemplate, gwpSizeTemplate, dialogTemplate, loyalty: loyaltyTemplates, videoThumbnailTemplate } = require('../templates');\nconst $body = $('body');\nconst $gwpDialog = $('#chooseBonusProductModal');\nconst hiddenClass = 'd-none';\nconst readyClass = 'ready-to-add';\nconst selectedProductClass = 'selected-product';\nconst notAvailable = 'not-available';\nconst { updateVisibilityOfLowInventoryMsg, getSelectedSizeEl } = require('../components/shippingPreference/shippingPreferenceHelper');\nconst isFitPredictorEnabled = !!queryFirst('#fitPredictorEnabled');\nconst { PRODUCT_DETAIL_CONTAINER_SELECTOR } = require('../components/shippingPreference/constants');\nconst { HIDDEN_CLASS } = require('../constants');\nconst loyaltyProfile = getNestedValue(window, 'johnnyWasUtils.profile') || {};\nconst { isLoyaltyProgramMember, isLoyaltyAuthenticated, isLoyaltyEnabled } = loyaltyProfile;\nconst isMcEnable = $('#mcEnableAnalytics').val();\nlet selectedSizeCTA = '';\n/**\n * Retrieves the relevant pid value\n * @param {jquery} $el - DOM container for a given add to cart button\n * @return {string} - value to be used when adding product to cart\n */\nfunction getPidValue($el) {\n    var pid;\n\n    if ($('#quickViewModal').hasClass('show') && !$('.product-set').length) {\n        pid = $($el)\n            .closest('.modal-content')\n            .find('.product-quickview')\n            .attr('data-pid');\n    } else if ($('.quickview-container').length && !$('.product-set').length) {\n        pid = $($el)\n            .closest('.quickview-container')\n            .find('.product-quickview')\n            .attr('data-pid');\n    } else if ($('.product-set-detail').length || $('.product-set').length) {\n        pid = $($el)\n            .closest('.product-detail')\n            .find('.product-id')\n            .first()\n            .text();\n    } else {\n        pid = $($el)\n            .closest('.product-detail')\n            .find('.product-id')\n            .first()\n            .text();\n    }\n\n    return pid;\n}\n\n/**\n * Retrieve contextual quantity selector\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {jquery} - quantity selector DOM container\n */\nfunction getQuantitySelector($el) {\n    return $el && $('.set-items').length ? $el.closest('.product-detail').find('.quantity-select') : $('.quantity-select');\n}\n\n/**\n * Retrieves the value associated with the Quantity pull-down menu\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {string} - value found in the quantity input\n */\nfunction getQuantitySelected($el) {\n    return getQuantitySelector($el).val();\n}\n\n/**\n * Process the attribute values for an attribute that has image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n *     selected.  If there is no variant that corresponds to a specific combination of attribute\n *     values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n * @param {Object} msgs - object containing resource messages\n */\nfunction processSwatchValues(attr, $productContainer, msgs, product) {\n    if (attr.id === 'fitSize') {\n        const fitSizes = attr.filteredValues ? attr.filteredValues : {};\n        let selected = '';\n        let fitSizeLi = '';\n        let counter = 0;\n        const elFitSizeContainer = queryFirst('ul.non-color-container', $productContainer[0]);\n        if (Object.keys(fitSizes).length) {\n            fitSizes.forEach((fitSize, i) => {\n                elFitSizeContainer.innerHTML = '';\n                selected = fitSize.selected;\n                counter++\n                fitSizeLi += `\n                            <li class=\"non-color-list fitsize-swatches\" data-url=\"${fitSize.url}\">\n                                <button title=\"Select FitSize: ${fitSize.id}\"\n                                class=\"btn non-color-attribute fit-product-type ${selected ? 'selected' : ''} ${fitSize.forceOutOfStock || product.isDirectlyPurchasable === false ? 'not-available' : ''}\"\n                                aria-label=\"${attr.displayName} ${fitSize.displayValue}\"\n                                data-fitsizeswatch-name=\"${fitSize.displayValue}\" data-product-id=\"${product.id}\"\n                                data-product-name=\"${product.productName}\" data-url=\"${fitSize.url}\" data-attr-value=\"${fitSize.value}\"\n                                data-attr-displayValue=\"${fitSize.displayValue}\" data-size-fitsize=\"${fitSize.id}\" >\n                                    <span class=\"oos-indicator\"></span>\n                                    <span data-attr-value=\"${fitSize.value}\"\n                                        class=\"${fitSize.id}-value swatch-value ${selected ? 'selected' : ''} ${fitSize.selectable ? 'selectable' : 'unselectable'}\"\n                                        data-attr-displayValue=\"${fitSize.displayValue}\" >\n                                        ${fitSize.displayValue}\n                                    </span>\n                                </button>\n                                <span id=\"pdp${product.productName.replace(/[^a-zA-Z]/g, '')}${fitSize.displayValue}${i}\" class=\"sr-only selected-assistive-text\" data-selected-text=\"${selected ? 'selected' : ''}\"></span>\n                            </li>`;\n            });\n            fitSizeLi += `<span class=\"selectableCount\" data-selectable-count=\"${counter}\"></span>`\n            elFitSizeContainer.innerHTML = fitSizeLi;\n            if (fitSizes.length === 1) {\n                $productContainer.find('ul.non-color-container').parent().hide();\n            } else {\n                $productContainer.find('ul.non-color-container').parent().show();\n            }\n        }\n    } else {\n        var isChoiceOfBonusProducts = $productContainer.parents('.choose-bonus-product-dialog').length > 0;\n        attr.values.forEach(function (attrValue) {\n            var $attrValue = $productContainer.find('[data-attr=\"' + attr.id + '\"] [data-attr-value=\"' + attrValue.value + '\"]');\n            var $swatchButton = $attrValue.parent();\n\n            if (attrValue.selected) {\n                $attrValue.addClass('selected');\n                $attrValue.siblings('.selected-assistive-text').text(msgs.assistiveSelectedText);\n            } else {\n                $attrValue.removeClass('selected');\n                $attrValue.siblings('.selected-assistive-text').empty();\n            }\n\n            const { bonusVariationUrl, url } = attrValue;\n\n            if (isChoiceOfBonusProducts) {\n                if (bonusVariationUrl) {\n                    $swatchButton.attr('data-url', bonusVariationUrl);\n                } else {\n                    $swatchButton.removeAttr('data-url');\n                }\n            } else if (url) {\n                $swatchButton.attr('data-url', url);\n            } else {\n                $swatchButton.removeAttr('data-url');\n            }\n\n            // Disable if not selectable\n            $attrValue.removeClass('selectable unselectable');\n\n            $attrValue.addClass(attrValue.selectable ? 'selectable' : 'unselectable');\n        });\n        if (!$productContainer.hasClass('custom-set-product')) {\n            $body.trigger('product:updateStoreInventory', {\n                productContainer: $productContainer[0]\n            });\n        }\n    }\n}\n\n/**\n * Process attribute values associated with an attribute that does not have image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n *     selected.  If there is no variant that corresponds to a specific combination of attribute\n *     values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction processNonSwatchValues(attr, $productContainer, product) {\n    const $bonusProductItem = $productContainer.parent('.bonus-product-item');\n    if ($bonusProductItem.length) {\n        const sizes = attr.values;\n        const sizeContainer = queryFirst('.selected-size-container', $bonusProductItem[0]);\n        if (!sizes.length || !sizeContainer) {\n            return;\n        }\n\n        if (sizes.length === 1) {\n            sizeContainer.innerHTML = formatMessage(gwpSizeTemplate.singleSize, sizes[0].displayValue);\n        } else {\n            const loopStatus = sizeContainer.dataset.loopStatus;\n            const resetUrl = attr.resetUrl;\n            const selectLabel = sizeContainer.dataset.selectLabel;\n            const selectId = `bonus-size-${loopStatus.count || '1'}`;\n\n            let sizeOptions = formatMessage(gwpSizeTemplate.multiDefaultSizeOption, resetUrl, selectLabel);\n            sizeOptions += sizes\n                .map(function (size) {\n                    const selected = size.selected ? ' selected ' : '';\n                    const className = !size.inStock || size.forceOutOfStock ? notAvailable : '';\n                    if (className) {\n                        const outOfStockMsg = sizeContainer.dataset.outOfStock;\n                        size.displayValue += ' - ' + outOfStockMsg;\n                    }\n                    return formatMessage(gwpSizeTemplate.multiSizeOption, size.url, size.value, selected, size.displayValue, className, className ? 'disabled' : '');\n                })\n                .join('');\n            sizeContainer.innerHTML = formatMessage(gwpSizeTemplate.multiSize, selectId, sizeOptions);\n        }\n    } else {\n        const productContainerEle = $productContainer[0];\n        if (hasClass(productContainerEle, 'product-set-item')) {\n            let isPDPSetPage = true;\n            $body.trigger('product:updateOOSSize', {\n                productContainer: productContainerEle,\n                isPDPSetPage: isPDPSetPage\n            });\n        } else {\n            const sizeContainer = queryFirst('ul.size-container', productContainerEle);\n            $(sizeContainer).css('visibility', 'hidden');\n            let li = '';\n            let sizes = attr.filteredValues ? attr.filteredValues : {};\n            if (Object.keys(sizes).length <= 0) {\n                sizes = attr.values ? attr.values : {};\n            }\n            sizeContainer.innerHTML = '';\n            let selectedSize = '';\n            if (Object.keys(sizes).length) {\n                sizes.forEach((size, i) => {\n                    if (size.selected) {\n                        selectedSize = size;\n                    }\n                    li += `\n                <li class=\"size-list\">\n                    <button value=\"${size.url}\"\n                    class=\"btn size-btn ${size.selected || (selectedSizeCTA && selectedSizeCTA.dataset.valueId === size.id) ? 'selected' : ''} ${!size.inStock || size.forceOutOfStock ? 'not-available' : ''}\"\n                    data-attr-url=\"${size.url}\" data-attr-value=\"${size.id}\"\n                    data-value-id=\"${size.id}\"\n                    aria-label=\"Select Size ${size.id}\"\n                    aria-describedby=\"pdp${product.productName.replace(/[^a-zA-Z]/g, '')}${size.displayValue}${i}\"\n                    data-variation-id=\"${size.variantID}\"\n                    data-manufacturer-sku=\"${size.manufacturerSKU}\">\n                    ${size.id}\n                    </button>\n                    <span id=\"pdp${product.productName.replace(/[^a-zA-Z]/g, '')}${size.displayValue}${i}\" class=\"sr-only selected-assistive-text\" data-selected-text=\"${size.selected ? 'selected' : ''}\" data-out-of-stock=\"${!size.inStock || size.forceOutOfStock ? 'Out of Stock' : ''}\">${size.selected ? 'selected' : ''} ${!size.inStock || size.forceOutOfStock ? 'Out of Stock' : ''}</span>\n                </li>`;\n                });\n\n                let ssSize = `<input type=\"hidden\" class=\"ssSize\" value=\"${selectedSize}\">`\n                sizeContainer.innerHTML = li;\n                sizeContainer.insertAdjacentHTML('beforeend', ssSize);\n            }\n            const selectedSizeEle = queryFirst('.size-btn.selected', sizeContainer);\n            setTimeout(function () {\n                $(sizeContainer).css('visibility', 'visible');\n                $(selectedSizeEle).trigger('click');\n            }, 0);\n        }\n    }\n}\n\n/**\n * Routes the handling of attribute processing depending on whether the attribute has image\n *     swatches or not\n *\n * @param {Object} attrs - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {jQuery} $productContainer - DOM element for a given product\n * @param {Object} msgs - object containing resource messages\n */\nfunction updateAttrs(attrs, $productContainer, msgs, product) {\n    // Currently, the only attribute type that has image swatches is Color.\n    var attrsWithSwatches = ['color', 'fitSize'];\n\n    attrs.forEach(function (attr) {\n        if (attrsWithSwatches.indexOf(attr.id) > -1) {\n            processSwatchValues(attr, $productContainer, msgs, product);\n        } else {\n            processNonSwatchValues(attr, $productContainer, product);\n        }\n    });\n}\n\n/**\n * Updates the availability status in the Product Detail Page\n *\n * @param {Object} response - Ajax response object after an\n *                            attribute value has been [de]selected\n * @param {jQuery} $productContainer - DOM element for a given product\n */\nfunction updateAvailability(response, $productContainer) {\n    var availabilityValue = '';\n    var availabilityMessages = response.product.availability.messages;\n    const { isDirectlyPurchasable } = response.product;\n    const availabilityMsgEl = queryFirst('.availability-msg', $productContainer[0]);\n    if (isDirectlyPurchasable === false && availabilityMsgEl) {\n        availabilityValue = `<li><p class=\"availability-message-text\" role=\"alert\">${availabilityMsgEl.dataset.notPurchasable}</p></li>`;\n    } else if (response.product.readyToOrder) {\n        availabilityMessages.forEach(function (message) {\n            availabilityValue += `<li><p class=\"availability-message-text\" role=\"alert\">\n                ${message}\n                </p></li>`;\n        });\n    }\n\n    $($productContainer).trigger('product:updateAvailability', {\n        product: response.product,\n        $productContainer: $productContainer,\n        message: availabilityValue,\n        resources: response.resources\n    });\n}\n\n/**\n * Generates html for product attributes section\n *\n * @param {array} attributes - list of attributes\n * @return {string} - Compiled HTML\n */\nfunction getAttributesHtml(attributes) {\n    if (!attributes) {\n        return '';\n    }\n\n    var html = '';\n\n    attributes.forEach(function (attributeGroup) {\n        if (attributeGroup.ID === 'mainAttributes') {\n            attributeGroup.attributes.forEach(function (attribute) {\n                html += '<div class=\"attribute-values\">' + attribute.label + ': ' + attribute.value + '</div>';\n            });\n        }\n    });\n\n    return html;\n}\n\n/**\n * Updates DOM using post-option selection Ajax response\n *\n * @param {OptionSelectionResponse} options - Ajax response options from selecting a product option\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateOptions(options, $productContainer) {\n    options.forEach(function (option) {\n        var $optionEl = $productContainer.find('.product-option[data-option-id*=\"' + option.id + '\"]');\n        option.values.forEach(function (value) {\n            var valueEl = $optionEl.find('option[data-value-id*=\"' + value.id + '\"]');\n            valueEl.val(value.url);\n        });\n    });\n}\n\n/**\n * Handles the CTAs to be shown for Early Access Product\n * @param {jQuery} productContainer - DOM element for current product\n * @param {boolean} isEarlyAccessProduct - Is the product Early Access Product\n */\nfunction handleEarlyAccessCta(productContainer, isEarlyAccessProduct) {\n    const earlyAccessLockIcon = queryFirst('.loyalty-early-access-lock-container', productContainer);\n    const earlyAccessWishlistIcon = queryFirst('.add-to-wish-list-container', productContainer);\n    const earlyAccessCta = queryFirst('.loyalty-early-access-restricted', productContainer);\n    const addToCartCta = queryFirst('.add-to-cart', productContainer);\n    const earlyAccessPdpEl = queryFirst('.loyalty-product-pdp-badge', productContainer);\n    if (isLoyaltyEnabled && earlyAccessCta) {\n        if (earlyAccessPdpEl) {\n            addClass([earlyAccessPdpEl, earlyAccessCta], hiddenClass);\n        }\n        if (isEarlyAccessProduct) {\n            if (isLoyaltyProgramMember) {\n                addClass([earlyAccessLockIcon, earlyAccessCta], HIDDEN_CLASS);\n                if (earlyAccessWishlistIcon && addToCartCta) {\n                    removeClass([earlyAccessWishlistIcon, addToCartCta], HIDDEN_CLASS);\n                }\n            } else {\n                removeClass([earlyAccessLockIcon, earlyAccessCta], HIDDEN_CLASS);\n                if (earlyAccessWishlistIcon && addToCartCta) {\n                    addClass([earlyAccessWishlistIcon, addToCartCta], HIDDEN_CLASS);\n                }\n                const earlyAccessGuest = queryFirst('.early-access-guest', earlyAccessCta);\n                const earlyAccessRegistered = queryFirst('.early-access-registered', earlyAccessCta);\n                if (isLoyaltyAuthenticated) {\n                    addClass(earlyAccessGuest, HIDDEN_CLASS);\n                    removeClass(earlyAccessRegistered, HIDDEN_CLASS);\n                } else {\n                    removeClass(earlyAccessGuest, HIDDEN_CLASS);\n                    addClass(earlyAccessRegistered, HIDDEN_CLASS);\n                }\n            }\n            if (earlyAccessPdpEl) {\n                removeClass(earlyAccessPdpEl, hiddenClass);\n            }\n        } else {\n            if (earlyAccessWishlistIcon && addToCartCta) {\n                removeClass([earlyAccessWishlistIcon, addToCartCta], hiddenClass);\n            }\n            addClass([earlyAccessLockIcon, earlyAccessCta], hiddenClass);\n        }\n    }\n}\n/**\n * Dynamically creates Bootstrap carousel from response containing images\n * @param {Object[]} imgs - Array of large product images,along with related information\n * @param {jQuery} $productContainer - DOM element for a given product\n * @param {boolean} isEarlyAccess - Check if the product is early access product\n * @param {string} videoUrl - Selected variant group video url\n * @param {string} videoThumbnailImage - Selected variant group poster url\n */\nfunction createCarousel(imgs, $productContainer, isEarlyAccess, videoUrl, videoThumbnailImage) {\n    let carousel = $productContainer.find('.primary-images .carousel');\n    $(carousel).carousel('dispose');\n    var carouselId = $(carousel).attr('id');\n\n    const displayCounter = $productContainer.hasClass('product-quickview');\n    const pdpPageCarousels = queryFirst('.carousel', $productContainer[0]);\n    const pId = $productContainer[0].dataset.pid;\n    const EGCPage = queryFirst('.egc-product');\n    const isSetPage = queryFirst('.pdp-set-page')\n    let pdpCarouselClass = '';\n    if (hasClass($productContainer[0], 'product-detail')) {\n        pdpCarouselClass = 'pdp-carousel-arrow';\n    }\n\n    $(carousel)\n        .empty()\n        .append(\n            '<ol class=\"carousel-indicators jw-pdp\"></ol><ul class=\"carousel-indicators-images lp-scrollbar m-scrollbar-hidden\"></ul><div class=\"carousel-inner\" role=\"listbox\"></div><a class=\"carousel-control-prev d-lg-none ' + pdpCarouselClass + '\" href=\"#' +\n            carouselId +\n            '\" role=\"button\" data-slide=\"prev\"><span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span><span class=\"sr-only\">' +\n            $(carousel).data('prev') +\n            '</span></a><a class=\"carousel-control-next d-lg-none ' + pdpCarouselClass + '\" href=\"#' +\n            carouselId +\n            '\" role=\"button\" data-slide=\"next\"><span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span><span class=\"sr-only\">' +\n            $(carousel).data('next') +\n            '</span></a>'\n        );\n    let i;\n    for (i = 0; i < imgs.length; i++) {\n        let counterHtml = '';\n        if (displayCounter && imgs.length > 1) {\n            counterHtml = `<span class='carousel-counter'>${i + 1} ${'/'} ${imgs.length}</span>`;\n        }\n\n        const imageZoomUrl = carousel.data('image');\n        const imagePresetUrl = carousel.data('preset');\n        const enableCache = carousel.data('cache');\n\n        let dataSrc = '';\n        if (imgs[i].url.includes(imagePresetUrl)) {\n            dataSrc = imgs[i].url.replace(imagePresetUrl, imageZoomUrl);\n        } else {\n            dataSrc = imgs[i].url + '?$' + imageZoomUrl + '$';\n        }\n        $(\n            '<div class=\"carousel-item\">' +\n            (EGCPage ? '' : '<a href=\"' + imgs[i].url + '\" data-options=\"zoomPosition: inner\" class=\"MagicZoom\" id=\"mz_' + pId + '\">') +\n            '<img srcset=\"' +\n            imgs[i].srcset +\n            '\" src=\"' +\n            imgs[i].url +\n            '\" data-src=\"' +\n            dataSrc +\n            (enableCache ? '&cache_img=true' : '') +\n            '\" class=\"d-block img-fluid\" alt=\"' +\n            imgs[i].alt +\n            ' image number ' +\n            parseInt(imgs[i].index, 10) +\n            '\" title=\"' +\n            imgs[i].title +\n            '\" itemprop=\"image\" />' + (EGCPage ? '' : '</a>') +\n            counterHtml +\n            '</div>'\n        ).appendTo($(carousel).find('.carousel-inner'));\n        $(\n            '<li data-target=\"#' + carouselId + '\" data-slide-to=\"' + i + '\" class=\"\"><button class=\"pip-content\" role=\"button\" aria-label=\"Product Carousel Image ' + (i + 1) + '\"><span class=\"sr-only\">' + imgs[i].alt + '' + (i + 1) + '</span></button></li>'\n        ).appendTo($(carousel).find('.carousel-indicators'));\n        if (pdpPageCarousels && !EGCPage) {\n            $('<li data-target=\"#' + carouselId + '\" data-slide-to=\"' + i + '\" class=\"' + (i == 0 ? \"active\" : \"\") + '\"><a href=\"' + imgs[i].url + '\" data-options=\"zoomPosition: inner\" data-zoom-id=\"mz_' + pId + '\" class=\"MagicZoom\"><img src=\"' + imgs[i].url + '\" class=\"img-fluid\" alt=\"' + imgs[i].alt + ' image number ' + (i + 1) + '\" itemprop=\"image\" /></a></li>'\n            ).appendTo($(carousel).find('.carousel-indicators-images'));\n        }\n    }\n    const productContainer = $productContainer[0];\n    const earlyAccessPdpEl = queryFirst('.loyalty-product-pdp-badge', productContainer);\n    const addToWishlistIconPdp = queryFirst('.add-to-wish-list-container', productContainer);\n    const loyaltyEarlyAccessEl = queryFirst('.loyalty-early-access-restricted', productContainer);\n    const addToCartButtonPdp = queryFirst('.pdp-container .add-to-cart', productContainer);\n    if (addToCartButtonPdp) {\n        removeClass(addToCartButtonPdp, hiddenClass);\n    }\n    if (earlyAccessPdpEl && loyaltyEarlyAccessEl) {\n        addClass([earlyAccessPdpEl, loyaltyEarlyAccessEl], hiddenClass);\n    }\n    removeClass(addToWishlistIconPdp, hiddenClass);\n    if (isEarlyAccess) {\n        const loyaltyEarlyAccessLockContainer = queryFirst('.primary-images .loyalty-early-access-lock-container', productContainer);\n        if (loyaltyEarlyAccessLockContainer) {\n            addClass(loyaltyEarlyAccessLockContainer, hiddenClass);\n        }\n    }\n    handleEarlyAccessCta(productContainer, isEarlyAccess);\n\n    const firstImageElement = queryFirst('.carousel-inner .carousel-item img.img-fluid', $productContainer[0]);\n    if (firstImageElement) {\n        firstImageElement.addEventListener('load', () => {\n            $body.trigger('product:imageLoad', {\n                container: $productContainer[0]\n            });\n        });\n    }\n    if (videoUrl) {\n        // LP customizations start\n        const productContainer = $productContainer[0];\n        const videoTemplate = queryFirst('.product-video-template').cloneNode(true);\n        const templateVideoElement = queryFirst('.carousel-item video', videoTemplate);\n        if (templateVideoElement) {\n            templateVideoElement.setAttribute('poster', videoThumbnailImage);\n            queryAll('source', templateVideoElement).forEach(eachElement => {\n                eachElement.setAttribute('src', videoUrl);\n            });\n            queryFirst('.carousel-inner', carousel[0]).appendChild(queryFirst('.carousel-item', videoTemplate));\n            queryFirst('.carousel-item video', productContainer).load();\n        }\n        // LP customizations end\n\n        $('<li data-target=\"#' + carouselId + '\" data-slide-to=\"' + imgs.length + '\" class=\"\"><button class=\"pip-content\" role=\"button\" aria-label=\"Product Carousel Image ' + (i + 1) + '\"></button></li>').appendTo(\n            $(carousel).find('.carousel-indicators')\n        );\n\n        if (pdpPageCarousels && !EGCPage) {\n            $(videoThumbnailTemplate(carouselId, imgs, videoUrl, videoThumbnailImage)).appendTo($(carousel).find('.carousel-indicators-images'));\n        }\n    }\n    $($(carousel).find('.carousel-item'))\n        .first()\n        .addClass('active');\n    $($(carousel).find('.carousel-indicators > li'))\n        .first()\n        .addClass('active');\n    if (imgs.length === 1) {\n        $($(carousel).find('.carousel-indicators, a[class^=\"carousel-control-\"]')).detach();\n    }\n    $(carousel).carousel();\n    if (!isSetPage) {\n        MagicZoom.stop();\n    }\n    if (!EGCPage) {\n        MagicZoom.start(\"mz_\" + pId);\n    }\n\n    $(carousel).on('slid.bs.carousel', function () {\n        $(\".primary-images .carousel-item\").each(function () {\n            if (!$(this).hasClass(\"active\")) {\n                $(this).find('a').removeAttr('id');\n            } else {\n                $(this).find('a').attr('id', \"mz_\" + pId);\n            }\n        });\n        MagicZoom.start(\"mz_\" + pId);\n    })\n    $($(carousel).find('.carousel-indicators')).attr('aria-hidden', true);\n}\n\n/**\n * Update PDP URL based on selected swatch\n * @param {Object} masterId - product master id\n * @param {Object} variantGroupId - Variation Group Value\n */\nfunction updatePDPUrl(masterId, variantGroupId) {\n    // Updated logic here\n    const swatchParam = `?dwvar_${masterId}_color`;\n    const queryParams = location.search;\n    let UpdatedParams = `${swatchParam}=${variantGroupId}`;\n    if (queryParams) {\n        UpdatedParams = queryParams\n            .split('&')\n            .map(eachParam => {\n                if (eachParam.indexOf(swatchParam) > -1) {\n                    return `${swatchParam}=${variantGroupId}`;\n                }\n                return eachParam;\n            })\n            .join('&');\n    }\n    history.replaceState({ variantGroupId }, document.title, UpdatedParams);\n}\n\n/**\n * Parses JSON from Ajax call made whenever an attribute value is [de]selected\n * @param {Object} response - response from Ajax call\n * @param {Object} response.product - Product object\n * @param {string} response.product.id - Product ID\n * @param {Object[]} response.product.variationAttributes - Product attributes\n * @param {Object[]} response.product.images - Product images\n * @param {boolean} response.product.hasRequiredAttrsSelected - Flag as to whether all required\n *     attributes have been selected.  Used partially to\n *     determine whether the Add to Cart button can be enabled\n * @param {jQuery} $productContainer - DOM element for a given product.\n */\nfunction handleVariantResponse(response, $productContainer, triggerColorAction) {\n    var isChoiceOfBonusProducts = $productContainer.parents('.choose-bonus-product-dialog').length > 0;\n    const { variationAttributes, productType, readyToOrder, bonusVariationAtrributes, isFinalSale, isDirectlyPurchasable, earlyAccess, manufacturerSKU, videoFile, videoThumbnailImage } = response.product;\n    const saleMessageEl = queryFirst('.on-sale-message', $productContainer[0]);\n    if (saleMessageEl) {\n        if (isFinalSale) {\n            removeClass(saleMessageEl, hiddenClass);\n        } else {\n            addClass(saleMessageEl, hiddenClass);\n        }\n    }\n\n    if (isChoiceOfBonusProducts) {\n        if (bonusVariationAtrributes) {\n            updateAttrs(bonusVariationAtrributes, $productContainer, response.resources, response.product);\n        }\n        if (productType === 'variant') {\n            $productContainer.parent('.bonus-product-item').data('ready-to-order', readyToOrder);\n        }\n    } else if (variationAttributes) {\n        updateAttrs(variationAttributes, $productContainer, response.resources, response.product);\n        if (isDirectlyPurchasable === false) {\n            const sizeElements = queryAll('.size-btn', $productContainer[0]);\n            addClass(sizeElements, notAvailable);\n        }\n    }\n\n    // Update primary images\n    var primaryImageUrls = isChoiceOfBonusProducts ? response.product.images.checkout : response.product.images.large;\n\n    const productContainer = $productContainer[0];\n    if (isChoiceOfBonusProducts) {\n        // LP customization changes start\n        const { alt, url, srcset } = primaryImageUrls[0] || {};\n        const productImageElement = queryFirst('.product-image', productContainer);\n        productImageElement.setAttribute('src', url);\n        productImageElement.setAttribute('srcset', srcset);\n        productImageElement.setAttribute('alt', alt);\n        // LP customization changes end\n    } else if (hasClass(productContainer, 'custom-set-product')) {\n        const setModalImages = response.product.images.ispu;\n        if (setModalImages) {\n            const { alt, url, srcset } = setModalImages[0] || {};\n            const productImageElement = queryFirst('.custom-set-detail-modal-img img', productContainer);\n            productImageElement.setAttribute('src', url);\n            productImageElement.setAttribute('srcset', srcset);\n            productImageElement.setAttribute('alt', alt);\n        }\n    } else {\n        createCarousel(primaryImageUrls, $productContainer, earlyAccess && earlyAccess.isEarlyAccessProduct, videoFile, videoThumbnailImage);\n        if (videoFile !== '') {\n            $body.trigger('product:initVideos');\n        }\n    }\n\n    // Updated logic here\n    const swatchNameElement = queryFirst('.selected-swatch-name', productContainer);\n    const selectedSwatch = queryFirst('.swatch-circle.selected', productContainer);\n    let selectedSwatchName = '';\n    if (selectedSwatch) {\n        selectedSwatchName = selectedSwatch.dataset.swatchName;\n    }\n    if (swatchNameElement) {\n        swatchNameElement.textContent = selectedSwatchName;\n    } else {\n        const swatchHtml = formatMessage(swatchNameTemplate.swatchNameHtml, selectedSwatchName);\n        const selectedSwatchElement = queryFirst('.selected-swatch', productContainer);\n        if (selectedSwatchElement) {\n            selectedSwatchElement.innerHTML = swatchHtml;\n        }\n    }\n\n    // Update product SKU in Product Details section\n    if (manufacturerSKU) {\n        const manufacturerID = queryFirst('.product-manufacturer-id', productContainer);\n        if (manufacturerID) {\n            manufacturerID.textContent = manufacturerSKU;\n        }\n    }\n\n    // Update pricing\n    if (!isChoiceOfBonusProducts) {\n        let $priceSelector = $('.prices .price', $productContainer);\n        if (!$priceSelector.length) $priceSelector = $('.prices .price');\n        $priceSelector.replaceWith(response.product.price.html);\n    }\n\n    // Update promotions\n    const promotionElement = queryFirst('.promotions', productContainer);\n    if (promotionElement) {\n        promotionElement.innerHTML = response.product.promotionsHtml;\n    }\n\n    const promotionsPopover = queryFirst('.promotions-info-popover .promotions-info-popover-content');\n    $('.custom-set-detail')\n        .find('.promotions-info')\n        .popover({\n            trigger: 'click',\n            placement: 'bottom',\n            html: true,\n            content: promotionsPopover\n        });\n    $('[data-toggle=\"popover\"]').on('shown.bs.popover', function (e) {\n        var target = e.target;\n        $(document).one('click', function (clickEvent) {\n            var clicked = clickEvent.target;\n            if (clicked !== target && clicked.parentElement !== target) {\n                $(target).trigger('click');\n            }\n        });\n    });\n\n    updateAvailability(response, $productContainer);\n\n    if (isChoiceOfBonusProducts) {\n        var $selectButton = $productContainer.find('.select-bonus-product');\n        $selectButton.trigger('bonusproduct:updateSelectButton', {\n            product: response.product,\n            $productContainer: $productContainer\n        });\n    } else if ($productContainer.closest('#productSetModal').length > 0) {\n        // Enable \"Add to Cart\" button if all required attributes have been selected\n        $('button.add-to-cart-global, button.update-cart-product-global')\n            .trigger('product:updateAddToCart', {\n                product: response.product,\n                $productContainer: $productContainer\n            })\n            .trigger('product:statusUpdate', response.product);\n    }\n\n    // Update attributes\n    $productContainer\n        .find('.main-attributes')\n        .empty()\n        .html(getAttributesHtml(response.product.attributes));\n    if (triggerColorAction && triggerColorAction.closest('button.clickable-color-swatch').length > 0) {\n        const fitSizeEle = $productContainer.find('ul.non-color-container li');\n        let requestedFitSize = response.queryString.split('&').find(param => param.includes('fitSize'))?.split('=')[1];\n        let fitSizeIncluded = variationAttributes.find(attr => attr.attributeId === 'fitSize')?.filteredValues?.find(fitSize => fitSize.id === requestedFitSize);\n        if (fitSizeEle.length && !fitSizeIncluded) {\n            $(fitSizeEle).first().find('button.non-color-attribute').trigger('click');\n        }\n        updatePDPUrl($productContainer.attr('data-masterid'), triggerColorAction.attr('data-attr-value'));\n    }\n}\n\n/**\n * Updates the quantity DOM elements post Ajax call\n * @param {UpdatedQuantity[]} quantities -\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction updateQuantities(quantities, $productContainer) {\n    const $bonusProductItem = $productContainer.parent('.bonus-product-item');\n    if (!($bonusProductItem.length > 0)) {\n        var optionsHtml = quantities\n            .map(function (quantity) {\n                var selected = quantity.selected ? ' selected ' : '';\n                return '<option value=\"' + quantity.value + '\"  data-url=\"' + quantity.url + '\"' + selected + '>' + quantity.value + '</option>';\n            })\n            .join('');\n        getQuantitySelector($productContainer)\n            .empty()\n            .html(optionsHtml);\n    }\n}\n\n/**\n * updates the product view when a product attribute is selected or deselected or when\n *         changing quantity\n * @param {string} selectedValueUrl - the Url for the selected variation value\n * @param {jQuery} $productContainer - DOM element for current product\n * @param {Object} selectedSizeElement - DOM element for selected size button\n */\nfunction attributeSelect(selectedValueUrl, $productContainer, selectedSizeElement) {\n    if (selectedValueUrl) {\n        $body.trigger('product:beforeAttributeSelect', {\n            url: selectedValueUrl,\n            container: $productContainer\n        });\n\n        // Updated logic here\n        const $choiceOfBonusProductEl = $productContainer.closest('.choice-of-bonus-product');\n        if ($choiceOfBonusProductEl.length) {\n            $productContainer.spinner().start();\n        }\n\n        $.ajax({\n            url: selectedValueUrl,\n            method: 'GET',\n            success: function (data) {\n                handleVariantResponse(data, $productContainer);\n                updateOptions(data.product.options, $productContainer);\n                updateQuantities(data.product.quantities, $productContainer);\n                $body.trigger('product:afterAttributeSelect', {\n                    data: data,\n                    container: $productContainer,\n                    selectedSizeElement\n                });\n                if ($choiceOfBonusProductEl.length) {\n                    $choiceOfBonusProductEl.trigger('bonus:afterAttributeSelect');\n                }\n                updatedimageSlideArrowPDP();\n            },\n            error: function () {\n                $.spinner().stop();\n            }\n        });\n    }\n}\n/**\n * Added function to updated the carousel Arrows vertically align on PDP main image after zoom loaded\n * */\nconst updatedimageSlideArrowPDP = () => {\n    let carouselArrows = $('.pdp-carousel-arrow');\n    if (window.matchMedia('(max-width: 1023px)').matches) {\n        setTimeout(function () {\n            carouselArrows.css('top', ($('div[id^=\"pdpCarousel\"]').find('.carousel-item').height() - carouselArrows.height()) / 2).css('display', 'inline');\n        }, 2000)\n    }\n}\n\n/**\n * updates the product view when a product attribute is selected or deselected or when\n *         changing quantity\n * @param {string} selectedValueUrl - the Url for the selected variation value\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction selectColorAttribute(selectedValueUrl, $productContainer, triggerColorAction) {\n    if (selectedValueUrl) {\n        $body.trigger('product:beforeAttributeSelect', {\n            url: selectedValueUrl,\n            container: $productContainer\n        });\n\n        // Updated logic here\n        const $choiceOfBonusProductEl = $productContainer.closest('.choice-of-bonus-product');\n        if ($choiceOfBonusProductEl.length) {\n            $productContainer.spinner().start();\n        }\n\n        getJSON(\n            selectedValueUrl,\n            'GET',\n            null,\n            data => {\n                const { options, quantities, uuid } = data.product;\n                handleVariantResponse(data, $productContainer, triggerColorAction);\n                updateOptions(options, $productContainer);\n                updateQuantities(quantities, $productContainer, uuid);\n                const selectedSizeElement = queryFirst('.size-btn.selected', $productContainer[0]);\n                $body.trigger('product:afterAttributeSelect', {\n                    data: data,\n                    container: $productContainer,\n                    selectedSizeElement\n                });\n                if ($choiceOfBonusProductEl.length) {\n                    const sizeEl = queryFirst('.select-size', $choiceOfBonusProductEl[0]);\n                    if (sizeEl) sizeEl.selectedIndex = 0;\n                    $choiceOfBonusProductEl.trigger('bonus:afterAttributeSelect');\n                }\n                const swatchContainer = queryFirst('.color-container', $productContainer[0]);\n                const assistiveElements = queryAll('.selected-assistive-text', swatchContainer);\n                const selectedSwatchElement = queryFirst('.swatch-circle.selected', $productContainer[0]);\n                const assistiveTextElement = queryFirst('.selected-assistive-text', selectedSwatchElement.closest('.color-list'));\n                $('.selected-size').addClass('d-none');\n                $('.size-seperator').addClass('d-none');\n                assistiveElements.forEach(eachElement => {\n                    eachElement.textContent = '';\n                });\n                assistiveTextElement.textContent = assistiveTextElement.dataset.selectedText;\n                if (!getSelectedSizeEl($productContainer[0])) {\n                    $('.availability-message-text').addClass('d-none');\n                    $('.notify-me-desc').addClass('d-none');\n                    $('.select-size-info-msg .availability-message-text').removeClass('d-none');\n                } else {\n                    $('.availability-message-text').removeClass('d-none');\n                }\n                updatedimageSlideArrowPDP();\n            },\n            () => {\n                $.spinner().stop();\n            }\n        );\n    }\n}\n\n/**\n * Process attribute values associated with an attribute that does not have image swatches\n *\n * @param {Object} data - Shop the print data\n * @param {Object} productContainer - DOM container for a given product\n */\nfunction updateShopThePrint(data, productContainer) {\n    const shopThePrintElement = queryFirst('.shop-the-print', productContainer);\n    if (shopThePrintElement) {\n        if (data) {\n            shopThePrintElement.outerHTML = data;\n        } else {\n            shopThePrintElement.outerHTML = '<div class=\"shop-the-print\"></div>';\n        }\n    }\n}\n\n/**\n * Process attribute values associated with an attribute that does not have image swatches\n *\n * @param {int} price - product sale price\n * @param {int} standardPrice - product standard price\n * @param {Object} productContainer - DOM container for a given product\n */\nfunction updateProductPrice(price, standardPrice, productContainer) {\n    const priceTemplate = document.getElementById('price-template').cloneNode(true);\n    const priceSection = queryFirst('.prices .price', productContainer);\n    const priceContainer = queryFirst('.price-section', priceTemplate);\n    const strikeThroughContainer = queryFirst('.strike-through-section', priceContainer);\n    const priceElement = queryFirst('.strike-through-price', strikeThroughContainer);\n    const salesContainer = queryFirst('.sales', priceContainer);\n    const salesPriceElement = queryFirst('.price-value', salesContainer);\n    let fixedPrice = price;\n    let fixedStandardPrice = standardPrice;\n\n    // Fix decimal places for non-whole-number prices\n    if (price % 1 !== 0) {\n        fixedPrice = price.toFixed(2);\n    }\n    if (standardPrice % 1 !== 0) {\n        fixedStandardPrice = standardPrice.toFixed(2);\n    }\n\n    removeClass(strikeThroughContainer, hiddenClass);\n    priceElement.textContent = `$${fixedStandardPrice}`;\n    salesPriceElement.textContent = `$${fixedPrice}`;\n    if (price === standardPrice) {\n        addClass(strikeThroughContainer, hiddenClass);\n    }\n    priceSection.innerHTML = priceTemplate.innerHTML;\n}\n\n/**\n * Process attribute values associated with an attribute that does not have image swatches\n *\n * @param {Object} sizes - sizes object\n * @param {Object} productContainer - DOM container for a given product\n * @param {Object} variantsList - Variations list data\n */\nfunction updateSizeElements(sizes, productContainer, variantsList) {\n    const isQuickView = hasClass(productContainer, 'cached-quick-view');\n    const { variants } = isQuickView ? window.quickviewProductInfo.productInventory : window.productInventory;\n    const sizeContainer = queryFirst('.size-container', productContainer);\n\n    if (!sizeContainer) return;\n\n    const { selectedText, outOfStock, label, describedby, attrValue } = sizeContainer.dataset;\n    let sizeButtonHtml = '';\n\n    variantsList.forEach((eachVariant, index) => {\n        const eachSize = sizes[eachVariant];\n        const sizeElement = queryFirst('[data-attr=\"size\"] [data-attr-value=\"' + eachVariant + '\"]', productContainer);\n        const sizeId = eachSize.ID;\n        const { forceOutOfStock } = eachSize;\n        const inventoryData = variants[sizeId];\n        const variantData = {\n            value: eachVariant,\n            forceOutOfStock,\n            selected: sizeElement ? hasClass(sizeElement, 'selected') : false,\n            inStock: inventoryData.availabilityStatus !== 'NOT_AVAILABLE',\n            sizeSwatchNotAvailable: sizeElement && sizeElement.dataset.sizeswatchnotavailable === 'true' ? true : false\n        };\n        const ariaLabelValue = label + ' ' + attrValue + ' ' + eachVariant;\n        sizeButtonHtml += sizeButtonTemplate(variantData, ariaLabelValue, describedby + eachVariant + index, selectedText, outOfStock);\n    });\n    remove(queryAll('.size-list', sizeContainer));\n    sizeButtonHtml += sizeContainer.innerHTML;\n    sizeContainer.innerHTML = sizeButtonHtml;\n}\n\n/**\n * Function tto update ways to wear content based on the response\n * @param {string} groupId - selected variatiion group id\n * @param {*} variationUrl - url to fecth the content\n */\nfunction updateContentModules(groupId, variationUrl) {\n    $.spinner().start();\n    $.ajax({\n        url: variationUrl,\n        method: 'post',\n        data: {\n            variationGroup: groupId\n        },\n        success: function (response) {\n            const waysToWearContainer = queryFirst('.ways-to-wear');\n            if (response) {\n                waysToWearContainer.innerHTML = response;\n            } else {\n                waysToWearContainer.innerHTML = '';\n            }\n            $.spinner().stop();\n            $body.trigger('search:updateProducts');\n        },\n        error: function () {\n            $.spinner().stop();\n        }\n    });\n}\n\n/**\n * updates image urls and presets by appending the scene7 url\n * @param {Object} images - images array to be updated\n * @returns {Object} - updated images array\n */\nfunction updateImageDetails(images) {\n    const updatedImages = images.map(imageObj => {\n        const srcsetPresets = JSON.parse(imageObj.srcset);\n        let srcsetString = [];\n        srcsetPresets.forEach(function (item) {\n            srcsetString.push(imageObj.imageScene7 + '?' + item.preset + ' ' + item.breakpoint);\n        });\n        return {\n            alt: imageObj.alt,\n            url: imageObj.imageScene7 + imageObj.url,\n            srcset: srcsetString.join(', '),\n            title: imageObj.title\n        };\n    });\n    return updatedImages;\n}\n\n/**\n * updates the product view when a product attribute is selected or deselected or when\n *         changing quantity\n * @param {Object} currentElement - selected color element\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateProductDetails(currentElement, $productContainer) {\n    const elementData = currentElement.dataset;\n    const variantGroupId = elementData.attrValue;\n    const productContainer = $productContainer[0];\n    const swatchNameElement = queryFirst('.selected-swatch-name', productContainer);\n    const swatchContainer = queryFirst('.color-container', productContainer);\n    const assistiveElements = queryAll('.selected-assistive-text', swatchContainer);\n    const assistiveTextElement = queryFirst('.selected-assistive-text', currentElement.closest('.color-list'));\n    const monogramBtn = queryFirst('.monogram-btn', productContainer);\n    const masterId = productContainer.dataset.masterid;\n    const productInfo = window.productInfo[masterId];\n    const { groupId, sizes, images, shopThePrint, price, standardPrice, videoUrl, videoThumbnailImage, variantsList, mgFlag, mgLocs, hasWaysToWear, isFinalSale, isDirectlyPurchasable, earlyAccess } = productInfo.variants[variantGroupId];\n    productContainer.dataset.wishlistId = groupId;\n    const colorElements = queryAll('.color-attribute .swatch-circle', productContainer);\n    const { attrDisplayvalue, customPageTitle, pageTitle, includeLillyColor, lillyColorName, customPageDescription, pageDescription } = elementData;\n    const titleElement = queryFirst('.meta-page-title');\n    const descriptionElement = queryFirst('.meta-page-description');\n    const waysToWearEl = queryFirst('.ways-to-wear', productContainer);\n    const variationGridUrl = waysToWearEl.dataset.variationGridUrl;\n    if (isMcEnable === 'true') {\n        // update Marketing Analytics trackWishlist event\n        let marketingCloudPageAnalytics = [{ item: groupId }];\n        trackPageView(marketingCloudPageAnalytics);\n    }\n    // Updated logic here\n    if (swatchNameElement) {\n        const selectedSwatchElement = queryFirst('.selected-swatch', productContainer);\n        const colorlabel = selectedSwatchElement.dataset.colorLabel;\n        swatchNameElement.textContent = colorlabel + attrDisplayvalue;\n    } else {\n        const swatchHtml = formatMessage(swatchNameTemplate.swatchNameHtml, attrDisplayvalue);\n        queryFirst('.selected-swatch', productContainer).innerHTML = swatchHtml;\n    }\n\n    if (customPageTitle && titleElement) {\n        titleElement.textContent = customPageTitle;\n    } else if (pageTitle && titleElement) {\n        titleElement.textContent = pageTitle;\n    }\n    const longDescriptionElement = queryFirst('.long-description-container .long-description', productContainer);\n    if (longDescriptionElement) {\n        const { longDescription } = longDescriptionElement.dataset;\n        let description;\n        if (includeLillyColor !== 'false' && lillyColorName) {\n            description = tokenize(longDescription, { lillyColor: lillyColorName }, '{{', '}}');\n        } else {\n            description = tokenize(longDescription, { lillyColor: '' }, '<li>{{', '}}</li>');\n        }\n        longDescriptionElement.innerHTML = description;\n    }\n    if (customPageDescription && descriptionElement) {\n        descriptionElement.content = customPageDescription;\n    } else if (pageDescription && descriptionElement) {\n        descriptionElement.content = pageDescription;\n    }\n\n    removeClass(colorElements, 'selected');\n    addClass(queryFirst('.swatch-circle', currentElement), 'selected');\n    queryFirst('.product-id', productContainer).textContent = masterId;\n\n    assistiveElements.forEach(eachElement => {\n        eachElement.textContent = '';\n    });\n\n    assistiveTextElement.textContent = assistiveTextElement.dataset.selectedText;\n\n    const productFinalSaleMessage = queryFirst('.on-sale-message', productContainer);\n    const productFreeReturnsMessage = queryFirst('.pdp-header-promo');\n    if (productFinalSaleMessage) {\n        if (isFinalSale) {\n            removeClass(productFinalSaleMessage, hiddenClass);\n            addClass(productFreeReturnsMessage, 'd-none');\n        } else {\n            addClass([productFinalSaleMessage], hiddenClass);\n            removeClass(productFreeReturnsMessage, 'd-none');\n        }\n    }\n\n    if (mgFlag && mgLocs && mgLocs.length > 0) {\n        removeClass(monogramBtn, hiddenClass);\n    } else {\n        addClass(monogramBtn, hiddenClass);\n    }\n\n    if (hasWaysToWear) {\n        updateContentModules(groupId, variationGridUrl);\n    } else {\n        waysToWearEl.innerHTML = '';\n    }\n    updateSizeElements(sizes, productContainer, variantsList);\n    $body.trigger('product:updateStoreInventory', {\n        productContainer\n    });\n    if (!isDirectlyPurchasable) {\n        const sizeElements = queryAll('.size-btn', productContainer);\n        addClass(sizeElements, notAvailable);\n    }\n    updateShopThePrint(shopThePrint, productContainer);\n    updateProductPrice(price, standardPrice, productContainer);\n    const ssColor = currentElement.dataset.attrDisplayvalue;\n    const ssSizeElement = queryFirst('.size-btn.selected', productContainer);\n    const ssSize = ssSizeElement ? ssSizeElement.dataset.attrValue : 'unknown';\n\n    if (isFitPredictorEnabled) {\n        updateProductData(ssColor, ssSize, standardPrice, price, productContainer);\n        handleColor(productContainer);\n    }\n\n    if (!ssSizeElement) {\n        $('.availability-msg', $productContainer).empty();\n    }\n    // Update primary images\n    var primaryImageUrls = updateImageDetails(images.large);\n\n    if (window.matchMedia('(max-width: 767.98px)').matches) {\n        const carouselContainerEl = queryFirst('.carousel.image-slider', productContainer);\n        const carouselContainerHeight = carouselContainerEl.offsetHeight;\n        carouselContainerEl.style.minHeight = carouselContainerHeight + 'px';\n    }\n    const isEarlyAccessItem = isEarlyAccessElement(earlyAccess);\n    createCarousel(primaryImageUrls, $productContainer, isEarlyAccessItem, videoUrl, videoThumbnailImage);\n    $body.trigger('product:afterAttributeChange', {\n        container: $productContainer,\n        variantGroupId,\n        groupId\n    });\n    $body.trigger('product:handleImageZoom');\n    const wishlistButton = queryFirst('.add-to-wish-list', productContainer);\n    if (wishlistButton && hasClass(wishlistButton, 'added-to-wish-list')) {\n        removeClass(wishlistButton, 'added-to-wish-list');\n        wishlistButton.disabled = false;\n        const assistiveText = wishlistButton.getAttribute('data-assistive-text');\n        wishlistButton.setAttribute('aria-label', assistiveText);\n    }\n    // Updated logic here\n    const swatchParam = `?dwvar_${masterId}_color`;\n    const queryParams = location.search;\n    let UpdatedParams = `${swatchParam}=${variantGroupId}`;\n    if (queryParams) {\n        UpdatedParams = queryParams\n            .split('&')\n            .map(eachParam => {\n                if (eachParam.indexOf(swatchParam) > -1) {\n                    return `${swatchParam}=${variantGroupId}`;\n                }\n                return eachParam;\n            })\n            .join('&');\n    }\n    history.replaceState({ variantGroupId }, document.title, UpdatedParams);\n}\n\n/**\n * updates the quick view when a product attribute is selected or deselected or when\n *         changing quantity\n * @param {Object} currentElement - selected color element\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateQuickViewDetails(currentElement, $productContainer) {\n    const elementData = currentElement.dataset;\n    const variantGroupId = elementData.attrValue;\n    const productContainer = $productContainer[0];\n    const swatchNameElement = queryFirst('.selected-swatch-name', productContainer);\n    const swatchContainer = queryFirst('.color-container', productContainer);\n    const assistiveElements = queryAll('.selected-assistive-text', swatchContainer);\n    const assistiveTextElement = queryFirst('.selected-assistive-text', currentElement.closest('.color-list'));\n    const quickViewInfo = window.quickviewProductInfo;\n    const { productInfo } = quickViewInfo;\n    const { groupId, sizes, images, price, standardPrice, variantsList, isDirectlyPurchasable, pdpBreadCrumbs, earlyAccess } = productInfo.variants[variantGroupId];\n    productContainer.dataset.wishlistId = groupId;\n    handleEarlyAccessCta(productContainer, (earlyAccess && earlyAccess.isEarlyAccessProduct));\n    const colorElements = queryAll('.color-attribute .swatch-circle', productContainer);\n    const { attrDisplayvalue } = elementData;\n    // Updated logic here\n    if (swatchNameElement) {\n        swatchNameElement.textContent = attrDisplayvalue;\n    } else {\n        const swatchHtml = formatMessage(swatchNameTemplate.swatchNameHtml, attrDisplayvalue);\n        queryFirst('.selected-swatch', productContainer).innerHTML = swatchHtml;\n    }\n    removeClass(colorElements, 'selected');\n    addClass(queryFirst('.swatch-circle', currentElement), 'selected');\n\n    assistiveElements.forEach(eachElement => {\n        eachElement.textContent = '';\n    });\n\n    assistiveTextElement.textContent = assistiveTextElement.dataset.selectedText;\n\n    updateSizeElements(sizes, productContainer, variantsList);\n    if (!isDirectlyPurchasable) {\n        const sizeElements = queryAll('.size-btn', productContainer);\n        addClass(sizeElements, notAvailable);\n    }\n\n    updateProductPrice(price, standardPrice, productContainer);\n    const ssColor = currentElement.dataset.attrDisplayvalue;\n    const ssSizeElement = queryFirst('.size-btn.selected', productContainer);\n    const ssSize = ssSizeElement ? ssSizeElement.dataset.attrValue : 'unknown';\n\n    if (isFitPredictorEnabled) {\n        updateProductData(ssColor, ssSize, standardPrice, price, productContainer);\n        handleColor(productContainer);\n    }\n\n    if (!ssSizeElement) {\n        $('.availability-msg', $productContainer).empty();\n    }\n    // Update primary images\n    var primaryImageUrls = updateImageDetails(images.large);\n    if (window.matchMedia('(min-width: 1024px)').matches) {\n        const carouselContainerEl = queryFirst('.carousel', productContainer);\n        const carouselContainerHeight = carouselContainerEl.offsetHeight;\n        carouselContainerEl.style.minHeight = carouselContainerHeight + 'px';\n    }\n    const isEarlyAccessItem = isEarlyAccessElement(earlyAccess);\n    createCarousel(primaryImageUrls, $productContainer, isEarlyAccessItem);\n    $body.trigger('product:quickViewAttributeChange', {\n        container: $productContainer,\n        variantGroupId,\n        groupId,\n        productContainer,\n        monetateData: {\n            pdpBreadCrumbs\n        }\n    });\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @return {string} - The provided URL to use when adding a product to the cart\n */\nfunction getAddToCartUrl() {\n    return $('.add-to-cart-url').val();\n}\n\n/**\n * Parses the html for a modal window\n * @param {string} html - representing the body and footer of the modal window\n *\n * @return {Object} - Object with properties body and footer.\n */\nfunction parseHtml(html) {\n    var $html = $('<div>').append($.parseHTML(html));\n\n    var body = $html.find('.bonus-acordion-container');\n    var selectedProducts = $html.find('.selected-products-container');\n    var footer = $html.find('.modal-footer');\n\n    return {\n        body,\n        footer,\n        selectedProducts\n    };\n}\n\n/**\n * Function to update GWP elements on swatch or size change\n */\nfunction updateGwpElements() {\n    $('.choice-of-bonus-product').on('bonus:afterAttributeSelect', function () {\n        const productDialog = queryFirst('.choose-bonus-product-dialog');\n        const accordionContainer = this.closest('.bonus-acordion-container', productDialog);\n        const bonusAccordionElements = queryAll('.bonus-acordion-container', productDialog);\n        const addToCart = queryFirst('.add-bonus-products', productDialog);\n        const sizeEl = queryFirst('.select-size', this);\n        const isSizeSelected = sizeEl ? !!sizeEl.selectedIndex : true;\n        const selectedSwatch = queryFirst('.color-attribute .swatch-circle.selected', this);\n        const isSelectedSizeUnavailable = sizeEl && hasClass($(sizeEl).children('option:selected')[0], notAvailable);\n\n        if (sizeEl) {\n            const firstOption = queryFirst('option', sizeEl);\n\n            // Force this option's resetUrl to remove the size\n            firstOption.value = firstOption.value.replace(/(_size=)[^&]+/, '$1');\n        }\n\n        if (isSelectedSizeUnavailable) {\n            addClass(sizeEl, notAvailable);\n        } else {\n            removeClass(sizeEl, notAvailable);\n        }\n\n        let isEnabled = true;\n        const maxItems = parseInt(accordionContainer.dataset.maxItems, 10);\n        const selectedItemsCount = queryAll('.select-bonus-product:checked', accordionContainer).length;\n\n        if (selectedItemsCount < maxItems) {\n            isEnabled = false;\n        }\n\n        if (isEnabled && isSizeSelected && !!selectedSwatch && !isSelectedSizeUnavailable) {\n            addClass(accordionContainer, readyClass);\n        } else {\n            isEnabled = false;\n            removeClass(accordionContainer, readyClass);\n        }\n\n        const validProducts = queryAll('.bonus-acordion-container.ready-to-add', productDialog);\n\n        addToCart.disabled = !isEnabled || hasClass(addToCart, notAvailable) || bonusAccordionElements.length !== validProducts.length;\n    });\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @param {Object} data - data object used to fill in dynamic portions of the html\n */\nfunction chooseBonusProducts(data) {\n    $('.modal-body')\n        .spinner()\n        .start();\n\n    var bonusUrl;\n    if (data.bonusChoiceRuleBased) {\n        bonusUrl = data.showProductsUrlRuleBased;\n    } else {\n        bonusUrl = data.showProductsUrlListBased;\n    }\n\n    const { maxBonusItems, addToCartUrl, uuid, pliUUID, pageSize, showProductsUrlRuleBased, bonusChoiceRuleBased, bonusDiscountLineItems } = data;\n    $('.choose-bonus-product-dialog').attr({\n        'data-total-qty': maxBonusItems,\n        'data-addToCartUrl': addToCartUrl,\n        'data-UUID': uuid,\n        'data-pliUUID': pliUUID,\n        'data-pageStart': 0,\n        'data-pageSize': pageSize,\n        'data-moreURL': showProductsUrlRuleBased,\n        'data-bonusChoiceRuleBased': bonusChoiceRuleBased,\n        'data-bonus-items': JSON.stringify(bonusDiscountLineItems)\n    });\n\n    $.ajax({\n        url: bonusUrl,\n        method: 'GET',\n        dataType: 'json',\n        success: function (response) {\n            var parsedHtml = parseHtml(response.renderedTemplate);\n            $gwpDialog.find('.enter-message').text(response.enterDialogMessage);\n            $gwpDialog.find('.modal-body').html(parsedHtml.body);\n            $gwpDialog\n                .find('.modal-footer, .selected-products-container')\n                .remove();\n            $gwpDialog.find('.modal-content').append(parsedHtml.footer);\n            $(parsedHtml.selectedProducts).insertAfter($gwpDialog.find('.modal-header'));\n            // LP custom changes start\n            const { selectedBonusProducts } = response;\n            if ((selectedBonusProducts || []).length) {\n                const modalDialog = queryFirst('.choose-bonus-product-dialog');\n                let selectedProductsCount = 0;\n                selectedBonusProducts.forEach(eachProductList => {\n                    if (eachProductList.length) {\n                        const bonusAccordionContainer = queryFirst(`.bonus-acordion-container[data-uuid=\"${eachProductList[0].uuid}\"]`, modalDialog);\n                        const maxCount = parseInt(bonusAccordionContainer.dataset.maxItems, 10);\n                        const productListLength = eachProductList.length;\n                        if (maxCount === productListLength) {\n                            addClass(bonusAccordionContainer, 'selected');\n                            addClass(bonusAccordionContainer, readyClass);\n                        }\n                        const bonusItemCount = queryFirst('.bonus-item-count span', bonusAccordionContainer);\n                        bonusItemCount.textContent = productListLength;\n                        selectedProductsCount += productListLength;\n                        eachProductList.forEach(eachProduct => {\n                            const selectedProduct = queryFirst(`.choice-of-bonus-product[data-pid=\"${eachProduct.pid}\"][data-uuid=\"${eachProduct.uuid}\"]`);\n                            const selectBonusCheckbox = queryFirst('.select-bonus-product', selectedProduct);\n\n                            if (selectBonusCheckbox) {\n                                selectBonusCheckbox.checked = true;\n                            }\n\n                            addClass(selectedProduct, selectedProductClass);\n                            setControlsEnabled(selectedProduct, true);\n                        });\n                    }\n                });\n                const addToCart = queryFirst('.add-bonus-products', modalDialog);\n                addToCart.disabled = maxBonusItems !== selectedProductsCount;\n            }\n\n            // Default all size dropdowns that aren't selected products\n            $('.bonus-product-item:not(.selected-product) .select-size').each(function () {\n                this.selectedIndex = 0;\n            });\n\n            updateGwpElements();\n            // LP custom changes end\n            $gwpDialog.modal('show');\n            $.spinner().stop();\n        },\n        error: function () {\n            $.spinner().stop();\n        }\n    });\n}\n\n/**\n * Updates the Mini-Cart quantity value after the customer has pressed the \"Add to Cart\" button\n * @param {string} response - ajax response from clicking the add to cart button\n */\nfunction handlePostCartAdd(response) {\n    $('.minicart').trigger('count:update', response);\n    if (!response.error) {\n        return;\n    }\n\n    if (response.displayModal) {\n        let addToCartWarningDialog = queryFirst('#add-to-cart-warning-dialog');\n\n        if (!addToCartWarningDialog) {\n            const isOnCartPage = (window.location.pathname === '/cart/');\n            const fragment = renderFragment(dialogTemplate({\n                buttons: isOnCartPage ? [{ text: 'OK', primary: true }] : [{ text: 'Close' }, { text: 'Review Tote', primary: true, link: response.redirectLink }],\n                modalContentHeading: response.messageHeading,\n                modalContentBody: isOnCartPage ? response.messageBodyOnCart : response.messageBodyOffCart,\n                id: 'add-to-cart-warning-dialog'\n            }));\n\n            document.body.appendChild(fragment);\n            addToCartWarningDialog = queryFirst('#add-to-cart-warning-dialog');\n        }\n\n        $(addToCartWarningDialog).modal('show');\n    } else {\n        var messageType = response.error ? 'alert-danger' : 'alert-success';\n        // show add to cart toast\n        $('.add-to-cart-messages').remove();\n        if ($('.add-to-cart-messages').length === 0) {\n            $body.append('<div class=\"add-to-cart-messages\"></div>');\n        }\n\n        $('.add-to-cart-messages').append('<div class=\"alert ' + messageType + ' add-to-basket-alert text-center\" role=\"alert\">' + response.message + '</div>');\n\n        setTimeout(function () {\n            $('.add-to-basket-alert').remove();\n        }, 5000);\n    }\n}\n\n/**\n * Retrieves the bundle product item ID's for the Controller to replace bundle master product\n * items with their selected variants\n *\n * @return {string[]} - List of selected bundle product item ID's\n */\nfunction getChildProducts() {\n    var childProducts = [];\n    $('.bundle-item').each(function () {\n        childProducts.push({\n            pid: $(this)\n                .find('.product-id')\n                .text(),\n            quantity: parseInt(\n                $(this)\n                    .find('label.quantity')\n                    .data('quantity'),\n                10\n            )\n        });\n    });\n\n    return childProducts.length ? JSON.stringify(childProducts) : [];\n}\n\n/**\n * Retrieve product options\n *\n * @param {jQuery} $productContainer - DOM element for current product\n * @return {string} - Product options and their selected values\n */\nfunction getOptions($productContainer) {\n    var options = $productContainer\n        .find('.product-option')\n        .map(function () {\n            var $elOption = $(this).find('.options-select');\n            var urlValue = $elOption.val();\n            var selectedValueId = $elOption.find('option[value=\"' + urlValue + '\"]').data('value-id');\n            return {\n                optionId: $(this).data('option-id'),\n                selectedValueId: selectedValueId\n            };\n        })\n        .toArray();\n\n    return JSON.stringify(options);\n}\n\n/**\n * Enables or disables the color/size controls in a container\n * @param {HTMLElement} container - The container element\n * @param {boolean} enable - Whether to enable the controls (false to disable)\n */\nfunction setControlsEnabled(container, enable) {\n    const controls = queryAll('button, select', container);\n\n    controls.forEach(control => {\n        control.disabled = !enable;\n    });\n}\n\nexport default {\n    methods: {\n        editBonusProducts: function (data) {\n            chooseBonusProducts(data);\n        }\n    },\n    attributeSelect,\n    updateProductDetails,\n    updateImageDetails,\n    focusChooseBonusProductModal: function () {\n        $gwpDialog.on('shown.bs.modal', () => {\n            $gwpDialog.siblings().attr('aria-hidden', 'true');\n            $gwpDialog.find('.close').trigger('focus');\n        });\n    },\n\n    onClosingChooseBonusProductModal: function () {\n        $gwpDialog.on('hidden.bs.modal', () => {\n            $gwpDialog.siblings().attr('aria-hidden', 'false');\n            removeClass(queryFirst('.choose-bonus-product-dialog'), 'selected');\n        });\n    },\n\n    trapChooseBonusProductModalFocus: function () {\n        $body.on('keydown', '#chooseBonusProductModal', function (e) {\n            var focusParams = {\n                event: e,\n                containerSelector: '#chooseBonusProductModal',\n                firstElementSelector: '.close',\n                lastElementSelector: '.add-bonus-products'\n            };\n            focusHelper.setTabNextFocus(focusParams);\n        });\n    },\n\n    colorAttribute: function () {\n        $(document).on('click', '[data-attr=\"color\"] button.color-attribute, [data-attr=\"fitSize\"] button.non-color-attribute', function (e) {\n            e.preventDefault();\n            if (($('.size-container').length > 0) && !($('.size-container .size-list .size-btn.selected').length > 0)) {\n                $('.pdp-details .notify-me-desc').addClass('d-none')\n            }\n            const productDetailContainer = this.closest(PRODUCT_DETAIL_CONTAINER_SELECTOR);\n            if ($(this).hasClass('fit-product-type') || $(this).hasClass('color-attribute')) {\n                const selectedSizeBtn = queryFirst('.size-btn.selected', productDetailContainer);\n                const notifyMeCTA = queryFirst('.notify-me-btn', productDetailContainer);\n                const addToCartSection = queryFirst('.prices-add-to-cart-actions', productDetailContainer);\n                const addToCartCTA = queryFirst('.prices-add-to-cart-actions .add-to-cart', productDetailContainer);\n                removeClass(selectedSizeBtn, 'selected');\n                addClass(notifyMeCTA, 'd-none');\n                removeClass(addToCartSection, 'd-none');\n                $(addToCartCTA).attr('disabled', false);\n                selectedSizeCTA = selectedSizeBtn;\n            }\n\n            if ($(this).attr('disabled') || hasClass(queryFirst('.swatch-circle', this), 'selected')) {\n                return;\n            }\n            var $productContainer = $(this).closest('.pdp-container.product-detail, .set-items .product-detail, .choose-bonus-product-modal .product-detail, .gift-card-main, .product-quickview');\n            if ($productContainer.hasClass('cached-quick-view')) {\n                updateQuickViewDetails(this, $productContainer);\n            } else if ($productContainer.length) {\n                selectColorAttribute($(this).attr('data-url'), $productContainer, $(this));\n            }\n            $body.trigger('swatchChangeEvent', this);\n            $body.trigger('search:updateProducts');\n            updateVisibilityOfLowInventoryMsg(productDetailContainer);\n        });\n    },\n\n    renderSizeElements: function () {\n        const swatchEl = queryFirst('.pdp-container:not(.gift-card-main) button.color-attribute .swatch-circle.selected');\n\n        if (swatchEl) {\n            const productContainer = queryFirst('.pdp-container');\n            const selectedSizeEl = queryFirst('.size-btn.selected', productContainer);\n\n            if (!selectedSizeEl) {\n                const selectedSwtachBtn = swatchEl.parentElement;\n                const variantGroupId = selectedSwtachBtn.dataset.attrValue;\n                const masterId = productContainer.dataset.masterid;\n                const productInfo = window.productInfo[masterId];\n                const { sizes, variantsList, isDirectlyPurchasable } = productInfo.variants[variantGroupId];\n                if (!isDirectlyPurchasable) {\n                    const sizeElements = queryAll('.size-btn', productContainer);\n                    addClass(sizeElements, notAvailable);\n                }\n            }\n\n            $body.trigger('product:updateStoreInventory', {\n                productContainer: productContainer\n            });\n        }\n        updatedimageSlideArrowPDP();\n    },\n\n    selectAttribute: function () {\n        $(document).on('change', 'select[class*=\"select-\"], .options-select', function (e) {\n            if (!e.target.closest('.fp-root')) {\n                e.preventDefault();\n                var $productContainer = $(this).closest('.set-item');\n                if (!$productContainer.length) {\n                    $productContainer = $(this).closest('.product-detail');\n                }\n                attributeSelect(e.currentTarget.value, $productContainer);\n            }\n        });\n    },\n\n    availability: function () {\n        $(document).on('change', '.quantity-select', function (e) {\n            e.preventDefault();\n\n            var $productContainer = $(this).closest('.product-detail');\n            if (!$productContainer.length) {\n                $productContainer = $(this)\n                    .closest('.modal-content')\n                    .find('.product-quickview');\n            }\n\n            if ($('.bundle-items', $productContainer).length === 0) {\n                attributeSelect(\n                    $(e.currentTarget)\n                        .find('option:selected')\n                        .data('url'),\n                    $productContainer\n                );\n            }\n        });\n    },\n\n    addToCart: function () {\n        $(document).on('click', '.prices-add-to-cart-actions button.add-to-cart, .prices-add-to-cart-actions button.add-to-cart-global, button.quick-buy-add-to-cart', function () {\n            var addToCartUrl;\n            var pid;\n            var pidsObj;\n            var setPids;\n            var setMasterPid;\n            const storeLocatoreContainer = queryFirst('.store-locator-container');\n            const ispuAddToCart = storeLocatoreContainer && queryFirst('.add-to-cart', storeLocatoreContainer);\n            const ispuModalContainer = $(this)\n                .closest('.product-detail')\n                .find('.lp-slideout-modal[id*=\"pick-up-in-store\"]');\n            if (ispuAddToCart) {\n                ispuAddToCart.disabled = true;\n            }\n            let isSet = false;\n            let triggerSSAddToCart = true;\n            var $productContainer = $(this).closest('.product-detail');\n            const isAddAllToCart = hasClass(this, 'add-to-cart-global');\n            if (isAddAllToCart) {\n                const setModal = this.closest('.custom-set-detail-modal');\n                const setProducts = queryAll('.custom-set-items.set-items .product-detail', setModal).filter(item => !hasClass(item.closest('.product-detail'), 'hidden-set'));\n                const fillteredProducts = setProducts.filter(eachProduct => {\n                    toggleSelectSizeInfo(eachProduct);\n                    return !!queryFirst('.size-btn.selected', eachProduct);\n                });\n                if (fillteredProducts.length !== setProducts.length) {\n                    return;\n                }\n            } else {\n                toggleSelectSizeInfo($productContainer[0]);\n                if (!queryFirst('.size-btn.selected', $productContainer[0])) {\n                    return;\n                }\n            }\n\n            $body.trigger('product:beforeAddToCart', this);\n            if ($('.set-items').length && $(this).hasClass('add-to-cart-global')) {\n                isSet = true;\n                triggerSSAddToCart = false;\n                setMasterPid = $('.product-detail.product-set-detail').data('pid');\n                setPids = [];\n\n                // DRP-180 updated class from \".product-detail\" to \".custom-set-items .custom-set-product\" to only check products within set modal for add all to tote\n                $('.custom-set-items .custom-set-product').each(function () {\n                    if (!$(this).hasClass('product-set-detail')) {\n                        setPids.push({\n                            pid: $(this)\n                                .find('.product-id')\n                                .text(),\n                            qty: $(this)\n                                .find('.quantity-select')\n                                .val(),\n                            options: getOptions($(this))\n                        });\n                    }\n                });\n                pidsObj = JSON.stringify(setPids);\n            }\n\n            if ($(this).next('ul.size-container').find('li button.size-btn').hasClass('selected')) {\n                pid = $(this).next('ul.size-container').find('li button.size-btn.selected').data('variation-id');\n            } else {\n                pid = getPidValue($(this));\n            }\n\n            if (!$productContainer.length) {\n                $productContainer = $(this)\n                    .closest('.quick-view-dialog')\n                    .find('.product-detail');\n            }\n\n            addToCartUrl = getAddToCartUrl();\n\n            var form = {\n                pid: pid,\n                pidsObj: pidsObj,\n                childProducts: getChildProducts(),\n                quantity: getQuantitySelected($(this)),\n                setMasterPid: setMasterPid\n            };\n\n            if (!$('.bundle-item').length) {\n                form.options = getOptions($productContainer);\n            }\n\n            $(this).trigger('updateAddToCartFormData', form);\n\n            if (addToCartUrl) {\n                $.ajax({\n                    url: addToCartUrl,\n                    method: 'POST',\n                    data: form,\n                    success: function (data) {\n                        if (isSet) {\n                            $('#productSetModal').modal('hide');\n                        }\n\n                        if (ispuAddToCart) {\n                            ispuAddToCart.disabled = false;\n                            ispuModalContainer.modal('hide');\n                        }\n\n                        handlePostCartAdd(data);\n\n                        if (triggerSSAddToCart && isFitPredictorEnabled) {\n                            ssAddToCart($productContainer[0]);\n                        }\n\n                        $.spinner().stop();\n                        $body.trigger('product:afterAddToCart', data);\n                        const productContainerPrice = queryFirst('.price-section .sales .value', $productContainer[0]);\n                        if (productContainerPrice) {\n                            // note, that this event will not function on PLP, because of DOM structure (price section in different place)\n                            $body.trigger('stylitics:main:addItem', {\n                                pid: pid,\n                                price: productContainerPrice.getAttribute('content')\n                            });\n                        }\n                    },\n                    error: function () {\n                        $.spinner().stop();\n                        if (ispuAddToCart) {\n                            ispuAddToCart.disabled = false;\n                        }\n                    }\n                });\n            }\n        });\n    },\n    selectBonusProduct: function () {\n        $(document).on('click', '.select-bonus-product', function () {\n            var $choiceOfBonusProduct = $(this).parents('.choice-of-bonus-product');\n            var pid = $choiceOfBonusProduct.data('pid');\n            var uuid = $choiceOfBonusProduct.data('uuid');\n            var maxPids = $('.choose-bonus-product-dialog').data('total-qty');\n            var submittedQty = 1;\n            var totalQty = 0;\n            $.each($('#chooseBonusProductModal .selected-bonus-products .selected-pid'), function () {\n                totalQty += $(this).data('qty');\n            });\n\n            // LP customization changes start\n            const { checked } = this;\n            const productDialog = queryFirst('.choose-bonus-product-dialog');\n            const choiceOfBonusProduct = $choiceOfBonusProduct[0];\n            const addToCart = queryFirst('.add-bonus-products', productDialog);\n            const selectedProductElement = queryFirst(`.selected-pid[data-pid=\"${pid}\"][data-uuid=\"${uuid}\"]`, productDialog);\n            let bonusAccordionElements = queryAll('.bonus-acordion-container', productDialog);\n            let accordionContainer = this.closest('.bonus-acordion-container', productDialog);\n            const bonusCountElement = queryFirst('.bonus-item-count span', accordionContainer);\n            const selectedCount = queryAll('.select-bonus-product:checked', accordionContainer).length;\n            const maxCount = parseInt(accordionContainer.dataset.maxItems, 10);\n            let sizeEl = queryFirst('.select-size', choiceOfBonusProduct);\n            let selectedSwatch = queryFirst('.color-attribute .swatch-circle.selected', choiceOfBonusProduct);\n            let isSizeSelected = sizeEl ? !!sizeEl.selectedIndex : true;\n\n            if (selectedCount < maxCount) {\n                removeClass(accordionContainer, 'selected');\n            } else {\n                addClass(accordionContainer, 'selected');\n            }\n            bonusCountElement.textContent = selectedCount;\n\n            let enableAddTocart = true;\n            const maxItems = parseInt(accordionContainer.dataset.maxItems, 10);\n            const selectedItemsCount = queryAll('.select-bonus-product:checked', accordionContainer).length;\n            if (selectedItemsCount < maxItems) {\n                enableAddTocart = false;\n            }\n            enableAddTocart = isSizeSelected && !!selectedSwatch && enableAddTocart;\n\n            if (enableAddTocart) {\n                addClass(accordionContainer, readyClass);\n            } else {\n                removeClass(accordionContainer, readyClass);\n            }\n\n            let validProducts = queryAll('.bonus-acordion-container.ready-to-add', productDialog);\n\n            if (!hasClass(addToCart, notAvailable)) {\n                addToCart.disabled = bonusAccordionElements.length !== validProducts.length;\n            }\n\n            if (checked) {\n                addClass(choiceOfBonusProduct, selectedProductClass);\n            } else {\n                removeClass(choiceOfBonusProduct, selectedProductClass);\n                if (selectedProductElement) {\n                    selectedProductElement.click();\n                }\n            }\n            if (selectedCount < maxCount) {\n                $(accordionContainer)\n                    .find('.choice-of-bonus-product')\n                    .find('.select-bonus-product, .color-attribute, select')\n                    .removeAttr('tabindex').prop('disabled', false);\n            } else {\n                $(accordionContainer)\n                    .find('.choice-of-bonus-product:not(.selected-product)')\n                    .find('.select-bonus-product, .color-attribute, select')\n                    .attr('tabindex', -1).prop('disabled', true);\n            }\n            if (!checked) {\n                return;\n            }\n            // LP customization changes end\n\n            totalQty += submittedQty;\n            var optionID = $choiceOfBonusProduct.find('.product-option').data('option-id');\n            var valueId = $choiceOfBonusProduct.find('.options-select option:selected').data('valueId');\n            if (totalQty <= maxPids) {\n                var selectedBonusProductHtml =\n                    '' +\n                    '<div class=\"selected-pid row\" ' +\n                    'data-pid=\"' +\n                    pid +\n                    '\"' +\n                    'data-uuid=\"' +\n                    uuid +\n                    '\"' +\n                    'data-qty=\"' +\n                    submittedQty +\n                    '\"' +\n                    'data-optionID=\"' +\n                    (optionID || '') +\n                    '\"' +\n                    'data-option-selected-value=\"' +\n                    (valueId || '') +\n                    '\"' +\n                    '>' +\n                    '<div class=\"col-sm-11 col-9 bonus-product-name\" >' +\n                    $choiceOfBonusProduct.find('.product-name').html() +\n                    '</div>' +\n                    '<div class=\"col-1\"><i class=\"fa fa-times\" aria-hidden=\"true\"></i></div>' +\n                    '</div>';\n                $('#chooseBonusProductModal .selected-bonus-products').append(selectedBonusProductHtml);\n                $('.pre-cart-products').html(totalQty);\n                $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\n            } else {\n                $('.selected-bonus-products .bonus-summary').addClass('alert-danger');\n            }\n        });\n    },\n    removeBonusProduct: function () {\n        $(document).on('click', '.selected-pid', function () {\n            $(this).remove();\n            var $selected = $('#chooseBonusProductModal .selected-bonus-products .selected-pid');\n            var count = 0;\n            if ($selected.length) {\n                $selected.each(function () {\n                    count += parseInt($(this).data('qty'), 10);\n                });\n            }\n\n            $('.pre-cart-products').html(count);\n            $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\n        });\n    },\n    enableBonusProductSelection: function () {\n        $body.on('bonusproduct:updateSelectButton', function (e, response) {\n            $('button.select-bonus-product', response.$productContainer).attr('disabled', !response.product.readyToOrder || !response.product.available);\n            var pid = response.product.id;\n            $('button.select-bonus-product', response.$productContainer).data('pid', pid);\n        });\n\n        const bonusProductDialog = queryFirst('.choose-bonus-product-dialog');\n\n        if (bonusProductDialog) {\n            bonusProductDialog.addEventListener('click', e => {\n                const target = e.target.closest('.select-bonus-product');\n\n                if (!target) return;\n\n                setControlsEnabled(target.closest('.row'), target.checked);\n            });\n        }\n    },\n    showMoreBonusProducts: function () {\n        $(document).on('click', '.show-more-bonus-products', function () {\n            var url = $(this).data('url');\n            $('.modal-content')\n                .spinner()\n                .start();\n            $.ajax({\n                url: url,\n                method: 'GET',\n                success: function (html) {\n                    var parsedHtml = parseHtml(html);\n                    $('.modal-body').append(parsedHtml.body);\n                    $('.show-more-bonus-products:first').remove();\n                    $('.modal-content')\n                        .spinner()\n                        .stop();\n                },\n                error: function () {\n                    $('.modal-content')\n                        .spinner()\n                        .stop();\n                }\n            });\n        });\n    },\n    addBonusProductsToCart: function () {\n        $(document).on('click', '.add-bonus-products', function () {\n            var $readyToOrderBonusProducts = $('.choose-bonus-product-dialog .selected-pid');\n            var queryString = '?pids=';\n            var url = $('.choose-bonus-product-dialog').data('addtocarturl');\n            var pidsObject = {\n                bonusProducts: []\n            };\n\n            $.each($readyToOrderBonusProducts, function () {\n                var qtyOption = parseInt($(this).data('qty'), 10);\n                const pid = $(this).data('pid');\n                const uuid = $(this).data('uuid');\n                const productId = $(`.choice-of-bonus-product.selected-product[data-pid=\"${pid}\"][data-uuid=\"${uuid}\"] .product-detail`).attr('data-pid');\n                var option = null;\n                if (qtyOption > 0) {\n                    if ($(this).data('optionid') && $(this).data('option-selected-value')) {\n                        option = {};\n                        option.optionId = $(this).data('optionid');\n                        option.productId = productId;\n                        option.selectedValueId = $(this).data('option-selected-value');\n                    }\n                    pidsObject.bonusProducts.push({\n                        uuid: uuid,\n                        pid: productId,\n                        qty: qtyOption,\n                        options: option ? [option] : []\n                    });\n                    pidsObject.totalQty = parseInt($('.pre-cart-products').html(), 10);\n                }\n            });\n            queryString += JSON.stringify(pidsObject);\n            queryString = queryString + '&bonusItems=' + JSON.stringify($('.choose-bonus-product-dialog').data('bonusItems'));\n            $.spinner().start();\n            $.ajax({\n                url: url + queryString,\n                method: 'POST',\n                success: function (data) {\n                    $.spinner().stop();\n                    if (data.error) {\n                        $('#chooseBonusProductModal').modal('hide');\n                        if ($('.add-to-cart-messages').length === 0) {\n                            $body.append('<div class=\"add-to-cart-messages\"></div>');\n                        }\n                        $('.add-to-cart-messages').append('<div class=\"alert alert-danger add-to-basket-alert text-center\" role=\"alert\">' + data.errorMessage + '</div>');\n                        setTimeout(function () {\n                            $('.add-to-basket-alert').remove();\n                        }, 3000);\n                    } else {\n                        $('.configure-bonus-product-attributes').html(data);\n                        $('.bonus-products-step2').removeClass('hidden-xl-down');\n                        $('#chooseBonusProductModal').modal('hide');\n                        $('.minicart-quantity').html(data.totalQty);\n                        if ($('.cart-page').length) {\n                            location.reload();\n                        }\n                    }\n                },\n                error: function () {\n                    $.spinner().stop();\n                }\n            });\n        });\n    },\n    revealRecommendations: function () {\n        const { initSpecificCarousel } = require('../components/carousel');\n        queryAll('.recommendations:not(.product-listing-header)').forEach(eachRecommendation => {\n            const titleEl = queryFirst('.title', eachRecommendation);\n            const productEl = queryFirst('.grid-tile', eachRecommendation);\n            const scrollableContent = queryFirst('.scrollable-content', eachRecommendation);\n\n            if (titleEl && !productEl) {\n                eachRecommendation.outerHTML = '';\n            } else if (titleEl && productEl) {\n                eachRecommendation.style.display = 'block';\n                if (scrollableContent) initSpecificCarousel(scrollableContent);\n            }\n        });\n    },\n    handleEarlyAccessPLPLockIcon: function () {\n        const earlyAccessPLPContainer = queryAll('.early-access-plp-container');\n        if (earlyAccessPLPContainer.length) {\n            earlyAccessPLPContainer.forEach(earlyAccessPlpIcon => {\n                const lockIconContainer = queryFirst('.loyalty-early-access-lock-container', earlyAccessPlpIcon);\n                const earlyAccessWishlistIcon = queryFirst('.product-tile .add-to-wish-list-container', earlyAccessPlpIcon);\n                const earlyAccessPLPBadge = queryFirst('.loyalty-product-tile-badge', earlyAccessPlpIcon);\n                const { earlyAccessDate } = lockIconContainer.dataset;\n                const isEarlyAccessItem = isEarlyAccessElement(earlyAccessDate);\n                if (isLoyaltyProgramMember || !isEarlyAccessItem) {\n                    removeClass(earlyAccessWishlistIcon, HIDDEN_CLASS);\n                    addClass(lockIconContainer, HIDDEN_CLASS);\n                    if (!isEarlyAccessItem) {\n                        addClass(earlyAccessPLPBadge, HIDDEN_CLASS);\n                    }\n                } else {\n                    addClass(earlyAccessWishlistIcon, HIDDEN_CLASS);\n                    removeClass([lockIconContainer, earlyAccessPLPBadge], HIDDEN_CLASS);\n                }\n            });\n        }\n    },\n\n    getPidValue: getPidValue,\n    getQuantitySelected: getQuantitySelected,\n    handleEarlyAccessCta: handleEarlyAccessCta,\n    updatedimageSlideArrowPDP: updatedimageSlideArrowPDP,\n};\nwindow.onload = () => {\n    updatedimageSlideArrowPDP();\n};\n","'use strict';\n\nimport { queryFirst, addClass, removeClass, hasClass, queryAll, scrollTo, setAttribute, throttle } from '../domUtil';\nimport base from './base';\nimport { updateProductData, handleColor, handleSize } from 'fitpredictor/product/secretsauce';\nconst { isShippingPreferencesViewEnabled, isEarlyAccessElement, handleNotifyMe } = require('./helper');\nconst { availabilityMessageTmpl, restrictedMessageTmpl, availabilityMessageOOS, availabilityMessagePreorder, ispuAvailabilityMessageTmpl, ispuLowStockMessageTmpl } = require('../templates').productDetail;\nconst $body = $('body');\nconst sizeChartClasses = 'no-scroll size-chart-visible';\nvar Hammer = require('hammerjs');\nconst KEYCODE_TAB = 9;\nconst TabKey = 'Tab';\nconst ACTIVE_CLASS = 'active';\nconst { IN_STOCK_STATUS: IN_STOCK, NOT_AVAILABLE_STATUS: NOT_AVAILABLE, PREORDER_STATUS: PREORDER, HIDDEN_CLASS } = require('../constants');\nconst { SHIP_TO_LOW_INVENTORY_CLASS } = require('../components/shippingPreference/constants');\n/**\n * Handling zoomin effect on product image slider\n */\nfunction handleProductImageZoom() {\n    const pdpPageCarousels = queryFirst('.product-detail');\n    const carousel = $('.primary-images .carousel:not(.tile-carousel)');\n    const imageZoomUrl = carousel.data('image');\n    const imagePresetUrl = carousel.data('preset');\n\n    const imageObserver = new MutationObserver(function (mutationList) {\n        for (let mutation of mutationList) {\n            if (mutation.type === 'childList') {\n                const { target, addedNodes } = mutation;\n                const baseImg = queryFirst('.img-fluid', target);\n                const zoomAlt = baseImg.getAttribute('alt') + ' Zoomed';\n                setAttribute(addedNodes, 'alt', zoomAlt);\n            }\n        }\n    });\n\n    if (pdpPageCarousels && pdpPageCarousels.length > 0) {\n        const pdpImages = queryAll('.primary-images .carousel-item');\n        const pdpIndicators = queryAll('.primary-images .carousel-indicators li');\n\n        pdpImages.forEach((img, index) => {\n            const imageEl = queryFirst('img', img);\n            if (!imageEl) {\n                return;\n            }\n            imageEl.setAttribute('data-src-hires', imageEl.getAttribute('data-src').replace(imagePresetUrl, imageZoomUrl));\n            let scale = 0.35;\n            let zoomed = false;\n            let mobileZoomed = false;\n            /**\n             * Handling zoomin effect logic\n             * @param {jQuery} elm -  DOM element for current image\n             * @param {boolean} zoomed - boolean value if zoomed or not\n             */\n            function createTouchZoom(elm) {\n                var thisHammer = new Hammer(elm, {});\n                thisHammer.domEvents = true;\n                thisHammer.get('pinch').set({ enable: true });\n\n                let transform = '';\n                let el = elm;\n                let panSpeed = 1.1;\n                let xPos = { current: 0, last: 0, max: 0 };\n                let yPos = { current: 0, last: 0, max: 0 };\n                let scale = { current: 2, last: 2, max: 4 };\n\n                el.style.transform = `translate(${xPos.current}px,${yPos.current}px) scale(${scale.current},${scale.current})`;\n\n                thisHammer.on('tap pan pinch panend pinchend', function (e) {\n                    // Prevent tap events from interfering\n                    e.srcEvent.stopPropagation();\n                    e.srcEvent.preventDefault();\n                    // If zoomed in, pan the image\n                    if (scale.current !== 1) {\n                        xPos.current = xPos.last + e.deltaX * panSpeed;\n                        yPos.current = yPos.last + e.deltaY * panSpeed;\n                        xPos.max = Math.ceil(((scale.current - 1) * el.clientWidth) / 2);\n                        yPos.max = Math.ceil(((scale.current - 1) * el.clientHeight) / 2);\n                        // Keep coordinates within image bounds\n                        if (xPos.current > xPos.max) {\n                            xPos.current = xPos.max;\n                        }\n                        if (xPos.current < -xPos.max) {\n                            xPos.current = -xPos.max;\n                        }\n                        if (yPos.current > yPos.max) {\n                            yPos.current = yPos.max;\n                        }\n                        if (yPos.current < -yPos.max) {\n                            yPos.current = -yPos.max;\n                        }\n                    }\n\n                    if (e.type === 'tap') {\n                        e.preventDefault();\n                        scale.current++;\n                        scale.last = scale.current;\n\n                        if (scale.current > scale.max) {\n                            scale.current = 1;\n                            xPos.current = 0;\n                            yPos.current = 0;\n                            xPos.last = xPos.current;\n                            yPos.last = yPos.current;\n                            scale.last = scale.current;\n                            transform = `translate(${xPos.current}px,${yPos.current}px) scale(${scale.current},${scale.current})`;\n                            mobileZoomed = true;\n                        } else mobileZoomed = false;\n                    }\n                    // Scale image with pinch\n                    if (e.type === 'pinch') {\n                        scale.current = Math.max(0.99, Math.min(scale.last * e.scale, scale.max));\n                    }\n                    // Finish scaling\n                    if (e.type === 'pinchend') {\n                        scale.last = scale.current;\n                    }\n                    // Finish panning\n                    if (e.type === 'panend') {\n                        xPos.last = xPos.current;\n                        yPos.last = yPos.current;\n                    }\n\n                    // Create scale/pan changes if zoomed in\n                    if (scale.current !== 1) {\n                        transform = `translate(${xPos.current}px,${yPos.current}px) scale(${scale.current},${scale.current})`;\n                    }\n                    // Apply transformation\n                    if (transform) {\n                        el.style.transform = transform;\n                    }\n                });\n\n                $(el).on('zoom:imageChange', () => {\n                    thisHammer.off('tap pan pinch panend pinchend');\n                    scale.current = 1;\n                    xPos.current = 0;\n                    yPos.current = 0;\n                    xPos.last = xPos.current;\n                    yPos.last = yPos.current;\n                    scale.last = scale.current;\n                    el.style.transform = `translate(${xPos.current}px,${yPos.current}px) scale(${scale.current},${scale.current})`;\n                    el.style['touch-action'] = 'initial';\n                    mobileZoomed = false;\n                    zoomed = false;\n                });\n            }\n\n            /** function to create zoom effect on hover\n             * @param {jQuery} el - DOM element for current product image\n             * @param {number} scale - scale value for the zoom\n             */\n            function createHoverZoom(el, scale) {\n                let hiresUrl = $(el).find('img').attr('data-src-hires');\n                if (hiresUrl && hiresUrl !== 'null' && hiresUrl.indexOf('noimagelarge') === -1) {\n                    $(el).zoom({\n                        on: 'click',\n                        url: hiresUrl,\n                        touch: false,\n                        magnify: scale\n                    });\n                }\n            }\n\n            const setZoomOffset = function () {\n                if (!zoomed) {\n                    scale *= 1.5;\n                    if (scale === 1.18125) {\n                        zoomed = true;\n                    }\n                    createHoverZoom(img, scale);\n                } else {\n                    $(img).trigger('zoom-destroy');\n                    $(img).find('.zoomImg').remove();\n                    zoomed = false;\n                    scale = 0.35;\n                    createHoverZoom(img, scale);\n                }\n            };\n\n            const allMobileZoom = function (event) {\n                const img = event.target;\n                if (!zoomed) {\n                    img.src = img.getAttribute('data-src-hires');\n                    createTouchZoom(img);\n                }\n                zoomed = true;\n                if (!mobileZoomed) {\n                    addClass(img.parentNode, 'touch-zoom');\n                    $('.primary-images .carousel').carousel('dispose');\n                    img.style['touch-action'] = 'none';\n                }\n\n                if (mobileZoomed) {\n                    removeClass(img.parentNode, 'touch-zoom');\n                    $('.primary-images .carousel.image-slider').carousel();\n                    $('.primary-images .carousel').on('slide.bs.carousel', () => {\n                        $('.primary-images .carousel-item img').trigger('zoom:imageChange');\n                    });\n                    img.style['touch-action'] = 'initial';\n                }\n            };\n\n            if (window.matchMedia('(max-width: 1024px)').matches) {\n                if (window.matchMedia('(max-width: 768px)').matches) {\n                    if (pdpIndicators) {\n                        $(pdpIndicators).on('click', () => {\n                            const touchZoom = queryFirst('.primary-images .carousel-item.touch-zoom');\n                            zoomed = false;\n                            mobileZoomed = false;\n                            if (touchZoom) {\n                                $('.primary-images .carousel-item.touch-zoom img').trigger('zoom:imageChange');\n                                removeClass(queryFirst('.primary-images .carousel-item.touch-zoom'), 'touch-zoom');\n                            }\n                            $('.primary-images .carousel.image-slider').carousel();\n                            $('.primary-images .carousel').on('slide.bs.carousel', () => {\n                                $('.primary-images .carousel-item img').trigger('zoom:imageChange');\n                            });\n                        });\n                        if (index === 0) {\n                            $('.primary-images .carousel').on('slide.bs.carousel', () => {\n                                $('.primary-images .carousel-item img').trigger('zoom:imageChange');\n                            });\n                        }\n                    }\n                }\n                img.addEventListener('click', allMobileZoom);\n            } else {\n                $(img).one('mouseenter', function () {\n                    createHoverZoom(img, scale);\n                });\n                img.addEventListener('click', () => {\n                    $(pdpImages).not($(img)).each(function () {\n                        if ($(this).find('.zoomImg').length > 1) {\n                            $(this).find('.zoomImg').remove();\n                            scale = 0.35;\n                            createHoverZoom($(this), scale);\n                        }\n                    });\n                    setZoomOffset();\n                });\n\n                imageObserver.observe(img, { childList: true });\n            }\n        });\n    }\n}\n\n/**\n * updates the product view when a product attribute is selected or deselected or when\n *         changing quantity\n * @param {Array} variationAttributes - the Url for the selected variation value\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateSelectedSwatchProductName(variationAttributes, $productContainer) {\n    if (Array.isArray(variationAttributes) && variationAttributes.length) {\n        const colorVariationObject = variationAttributes.find(attribute => attribute.attributeId === 'color');\n\n        if (colorVariationObject && Array.isArray(colorVariationObject.values) && colorVariationObject.values.length) {\n            const selectedSwatchObject = colorVariationObject.values.find(eachValue => eachValue.selected);\n            let $swatchSection = $productContainer.find('.selected-swatch');\n            $swatchSection.find('.selected-swatch-name').text(selectedSwatchObject && $swatchSection.data('color-label') ? $swatchSection.data('color-label').toUpperCase() + selectedSwatchObject.displayValue : '');\n        }\n    }\n}\n\n/**\n * handles size change\n * @param {Object} productContainer - product container html element\n * @param {string} selectedSizeValue - Selected size value\n */\nfunction onSizeChangeHandler(productContainer, selectedSizeValue) {\n    const sizeDetailsContainer = queryFirst('.details-text:not(.d-none)', productContainer);\n    const selectedSize = queryFirst('.selected-size', sizeDetailsContainer);\n    const selectedSizeErrMsg = queryFirst('.select-size-message', productContainer);\n\n    removeClass(queryAll('.size-btn', productContainer), 'selected');\n    addClass(this, 'selected');\n    addClass(selectedSizeErrMsg, 'd-none');\n    const sizeContainer = this.closest('.size-container');\n    const assistiveElements = queryAll('.selected-assistive-text', sizeContainer);\n    assistiveElements.forEach(eachElement => {\n        if (eachElement.textContent.includes(eachElement.dataset.outOfStock)) {\n            eachElement.textContent = eachElement.dataset.outOfStock;\n        } else {\n            eachElement.textContent = '';\n        }\n    });\n    const assistiveElementOfSelected = queryFirst('.selected-assistive-text', this.closest('.size-list'));\n    const { selectedText, outOfStock } = assistiveElementOfSelected.dataset;\n    assistiveElementOfSelected.textContent = selectedText;\n    if (hasClass(this, 'not-available')) {\n        assistiveElementOfSelected.textContent += ' ' + outOfStock;\n    }\n    removeClass(queryFirst('.size-seperator', sizeDetailsContainer), 'd-none');\n    selectedSize.textContent = selectedSizeValue;\n    removeClass(selectedSize, 'd-none');\n}\n\n/**\n * update quickview product info on product variation change\n * @param {string} selectedSizeValue - Selected size value\n * @param {int} selectedColorId - selected color id\n * @param {Object} productContainer - product container html element\n * @param {Object} currentSizeElement - current active size element\n */\nfunction updateQuickViewProductInfo(selectedSizeValue, selectedColorId, productContainer, currentSizeElement) {\n    const quickViewInfo = window.quickviewProductInfo;\n    const { productInfo } = quickViewInfo;\n    const variantGroupData = productInfo.variants[selectedColorId];\n    const { sizes, images, formattedPrice, standardPrice, price, vgProductDetailsUrl, isDirectlyPurchasable } = variantGroupData;\n    const ispu = base.updateImageDetails(images.ispu);\n    const selectedSizeData = sizes[selectedSizeValue];\n    const addToCartButton = queryFirst('.add-to-cart', productContainer);\n    const hiddenClass = 'd-none';\n    const notifyMeButton = queryFirst('.notify-me-btn', productContainer);\n    const notifyMeDesc = queryFirst('.notify-me-desc', productContainer);\n    const addToCartSection = queryFirst('.prices-add-to-cart-actions', productContainer);\n    const availabilityMsgEl = queryFirst('.availability-msg', productContainer);\n    let availabilityValue = '';\n    let productDetailsUrl = vgProductDetailsUrl;\n    const fullPDPLink = queryFirst('.full-pdp-link', productContainer);\n    const wishlistButton = queryFirst('.add-to-wish-list', productContainer);\n\n    if (wishlistButton && hasClass(wishlistButton, 'added-to-wish-list')) {\n        removeClass(wishlistButton, 'added-to-wish-list');\n        wishlistButton.disabled = false;\n    }\n\n    if (!selectedSizeData || !currentSizeElement) {\n        removeClass(addToCartSection, hiddenClass);\n        addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n        fullPDPLink.href = productDetailsUrl;\n        if (!isDirectlyPurchasable) {\n            addToCartButton.disabled = true;\n            availabilityValue = availabilityMessageTmpl(availabilityMsgEl.dataset.notPurchasable);\n            availabilityMsgEl.innerHTML = availabilityValue;\n        } else {\n            addToCartButton.disabled = false;\n        }\n        return;\n    }\n\n    const { isNotifyMeEnabled, ID, forceOutOfStock, variantProductDetailsUrl } = selectedSizeData;\n    productDetailsUrl = variantProductDetailsUrl;\n    const { productInventory } = quickViewInfo;\n    const { variants } = productInventory;\n    const inventoryData = variants[ID];\n    const { message, availabilityStatus, isLowInventory } = inventoryData;\n    const selectedColorName = queryFirst('.selected-swatch-name').textContent;\n\n    if (!isDirectlyPurchasable) {\n        availabilityValue = availabilityMessageTmpl(availabilityMsgEl.dataset.notPurchasable);\n    } else if (availabilityStatus !== IN_STOCK || isLowInventory) {\n        availabilityValue = availabilityMessageTmpl(message);\n    }\n    fullPDPLink.href = productDetailsUrl;\n\n    if (!isDirectlyPurchasable) {\n        addToCartButton.disabled = true;\n        removeClass(addToCartSection, hiddenClass);\n        addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n    } else if (availabilityStatus !== NOT_AVAILABLE && !forceOutOfStock) {\n        addToCartButton.disabled = false;\n        removeClass(currentSizeElement, 'not-available');\n    } else {\n        addClass(currentSizeElement, 'not-available');\n        addToCartButton.disabled = true;\n        if (isNotifyMeEnabled) {\n            addClass(addToCartSection, hiddenClass);\n            removeClass([notifyMeDesc, notifyMeButton], hiddenClass);\n        } else {\n            removeClass(addToCartSection, hiddenClass);\n            addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n        }\n    }\n\n    availabilityMsgEl.innerHTML = availabilityValue;\n    productContainer.dataset.pid = ID;\n    productContainer.dataset.wishlistId = ID;\n    const productData = {\n        available: !hasClass(currentSizeElement, 'not-available'),\n        isNotifyMeEnabled,\n        id: ID,\n        formattedPrice,\n        forceOutOfStock,\n        imageData: ispu\n    };\n    handleNotifyMe(productData, productContainer);\n\n    // secret sauce integration to update product data\n    updateProductData(selectedColorName, selectedSizeValue, standardPrice, price, productContainer);\n    handleSize(productContainer);\n    $('body').trigger('product:afterQuickViewSizeChange', {\n        ID,\n        productContainer,\n        monetateData: {\n            pdpBreadCrumbs: variantGroupData.pdpBreadCrumbs\n        }\n    });\n}\n\n/**\n * Update Scarcity Message on product variation change\n * @param {string} message - Scarcity Message\n * @param {Object} productContainer - product container html element\n */\nfunction updateScarcityMessage(message, productContainer) {\n    const fitSizeScarcityLabel = queryFirst('.js-size-scarcity-message', productContainer);\n    const ctaScarcityLabel = queryFirst('.js-cta-scarcity-message', productContainer);\n\n    if (fitSizeScarcityLabel) {\n        fitSizeScarcityLabel.innerHTML = message\n            ? `<span class=\"delimiter\"> - </span>${message}`\n            : '';\n\n        if (message === fitSizeScarcityLabel.dataset.oosMsg) {\n            addClass(fitSizeScarcityLabel, 'accent');\n        } else {\n            removeClass(fitSizeScarcityLabel, 'accent');\n        }\n    }\n\n    if (ctaScarcityLabel) {\n        if (message && message !== ctaScarcityLabel.dataset.oosMsg) {\n            ctaScarcityLabel.innerHTML = `<span class=\"delimiter\"> - </span>${message}`;\n        } else {\n            ctaScarcityLabel.innerHTML = '';\n        }\n    }\n}\n\n/**\n * update product info on product variation change\n * @param {string} selectedSizeValue - Selected size value\n * @param {int} selectedColorId - selected color id\n * @param {Object} productContainer - product container html element\n * @param {Object} currentSizeElement - current active size element\n * @param {boolean} isPDPSetPage - is PDP set page\n */\nfunction updateProductInfo(selectedSizeValue, selectedColorId, productContainer, currentSizeElement, isPDPSetPage) {\n    const masterId = productContainer.dataset.masterid;\n    const productInfo = window.productInfo[masterId];\n    const variantGroupData = productInfo.variants[selectedColorId];\n    const { sizes, images, formattedPrice, formattedStandardPrice, totalPrice, monogramProductPrice, standardPrice, price, mgFlag, mgLocs, isDirectlyPurchasable } = variantGroupData;\n    const ispu = base.updateImageDetails(images.ispu);\n    const selectedSizeData = sizes[selectedSizeValue];\n    let addToCartButton = '';\n    if (hasClass(productContainer, 'custom-set-product')) {\n        addToCartButton = queryFirst('.add-to-cart-global');\n    } else {\n        addToCartButton = queryFirst('.add-to-cart', productContainer);\n    }\n    const ispuButton = queryFirst('.btn-in-store-pickup', productContainer);\n    const hiddenClass = 'd-none';\n    const notifyMeButton = queryFirst('.notify-me-btn', productContainer);\n    const notifyMeDesc = queryFirst('.notify-me-desc', productContainer);\n    const addToCartSection = queryFirst('.prices-add-to-cart-actions', productContainer);\n    const availabilityMsgEl = queryFirst('.availability-msg', productContainer);\n    const ispuLowStockMsgEl = queryFirst('.ispu-low-stock-msg', productContainer);\n    const restrictedMsg = availabilityMsgEl.dataset.restrictedItem;\n    const isGlobaleSession = availabilityMsgEl.dataset.isGlobaleSession;\n    let availabilityValue = '';\n\n    if (!selectedSizeData || !currentSizeElement) {\n        if (ispuButton) {\n            ispuButton.disabled = true;\n        }\n        removeClass(addToCartSection, hiddenClass);\n        addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n        if (!isDirectlyPurchasable) {\n            addToCartButton.disabled = true;\n            availabilityValue = availabilityMessageTmpl(availabilityMsgEl.dataset.notPurchasable);\n            availabilityMsgEl.innerHTML = availabilityValue;\n            if (ispuButton) {\n                ispuButton.disabled = true;\n            }\n        } else {\n            addToCartButton.disabled = false;\n        }\n        return;\n    }\n\n    const { isNotifyMeEnabled, ID, forceOutOfStock, manufacturerSKU, availableForInStorePickup } = selectedSizeData;\n    const { variants } = isPDPSetPage ? window.productInventory[masterId] : window.productInventory;\n    const inventoryData = variants[ID];\n    const {\n        message, availabilityStatus, isLowInventory, scarcityMessage\n    } = inventoryData;\n\n    updateScarcityMessage(scarcityMessage, productContainer);\n\n    // Shipping preference view\n    const shippingPreferencesEnabled = isShippingPreferencesViewEnabled();\n    let ispuAvailabilityValue = '';\n    let ispuLowStockValue = '';\n    let ispuVariants;\n    let ispuInventoryData;\n    let ispuMessage;\n    let ispuLowStockMessage;\n    let ispuAvailabilityStatus;\n    let isISPULowInventory;\n    let isNotEligibleForISPU;\n    if (shippingPreferencesEnabled && window.ispuProductInventory) {\n        const { variants } = isPDPSetPage ? window.ispuProductInventory[masterId] : window.ispuProductInventory;\n        if (variants) {\n            ispuInventoryData = variants[ID];\n        }\n        if (ispuInventoryData) {\n            ispuMessage = ispuInventoryData.message;\n            ispuLowStockMessage = ispuInventoryData.lowStockAvailabilityMessage;\n            ispuAvailabilityStatus = ispuInventoryData.availabilityStatus;\n            isISPULowInventory = ispuInventoryData.isLowInventory;\n        }\n    }\n\n    const selectedColorName = queryFirst('.selected-swatch-name', productContainer).textContent;\n    if (!isDirectlyPurchasable) {\n        availabilityValue = availabilityMessageTmpl(availabilityMsgEl.dataset.notPurchasable);\n    } else {\n        if (availabilityStatus !== IN_STOCK || isLowInventory) {\n            const breadcrumbItems = queryAll('.breadcrumb-item');\n            const categoryUrl = breadcrumbItems && breadcrumbItems.length > 1 && breadcrumbItems.pop().lastElementChild && breadcrumbItems.pop().lastElementChild.href;\n            if (availabilityStatus === NOT_AVAILABLE && categoryUrl) {\n                availabilityValue = availabilityMessageOOS(message, categoryUrl);\n            } else if (availabilityStatus === PREORDER && categoryUrl) {\n                availabilityValue = availabilityMessagePreorder(message, categoryUrl);\n            }\n            else {\n                availabilityValue = availabilityMessageTmpl(message);\n            }\n            if (isLowInventory) addClass(currentSizeElement, SHIP_TO_LOW_INVENTORY_CLASS);\n        }\n\n        // Shipping preference view\n        if (ispuAvailabilityStatus && (ispuAvailabilityStatus !== IN_STOCK || isISPULowInventory)) {\n            ispuAvailabilityValue = ispuAvailabilityMessageTmpl(ispuMessage);\n            ispuLowStockValue = ispuLowStockMessage ? ispuLowStockMessageTmpl(ispuLowStockMessage) : '';\n        }\n    }\n\n    if (!isDirectlyPurchasable) {\n        addToCartButton.disabled = true;\n        removeClass(addToCartSection, hiddenClass);\n        addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n    } else if (((availabilityStatus !== NOT_AVAILABLE || (ispuAvailabilityStatus && ispuAvailabilityStatus !== NOT_AVAILABLE)) &&\n        !forceOutOfStock) && !(isGlobaleSession === 'true' && availabilityStatus === PREORDER)) {\n        addToCartButton.disabled = false;\n        removeClass(currentSizeElement, 'not-available');\n    } else {\n        addClass(currentSizeElement, 'not-available');\n        addToCartButton.disabled = true;\n        if (isNotifyMeEnabled) {\n            addClass(addToCartSection, hiddenClass);\n            removeClass([notifyMeDesc, notifyMeButton], hiddenClass);\n        } else {\n            removeClass(addToCartSection, hiddenClass);\n            addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n        }\n    }\n    availabilityMsgEl.innerHTML = availabilityValue;\n\n    if (availabilityStatus === PREORDER) {\n        addClass(currentSizeElement, 'pre-order');\n        if (restrictedMsg !== '' && isGlobaleSession === 'true') {\n            availabilityValue = restrictedMessageTmpl(restrictedMsg);\n            availabilityMsgEl.innerHTML += availabilityValue;\n        }\n        addClass(queryFirst('.afterpay-paragraph', productContainer), hiddenClass)\n    } else {\n        removeClass(queryFirst('.afterpay-paragraph', productContainer), hiddenClass)\n    }\n\n    if (shippingPreferencesEnabled) {\n        $body.trigger('product:inventoryStatus', {\n            shipToAddressAvailabilityStatus: availabilityStatus,\n            inStorePickUpAvailabilityStatus: ispuAvailabilityStatus || NOT_AVAILABLE,\n            isStorePickUpLowInventory: isISPULowInventory,\n            inStorePickUpAvailabilityMessage: ispuAvailabilityValue,\n            inStorePickUpLowStockMessage: ispuLowStockValue,\n            availableForInStorePickup: availableForInStorePickup,\n            productContainer\n        });\n    }\n    productContainer.dataset.pid = ID;\n    queryFirst('.product-id', productContainer).textContent = ID;\n    const manufacturerID = queryFirst('.product-manufacturer-id', productContainer);\n    if (null != manufacturerID) {\n        manufacturerID.textContent = manufacturerSKU;\n    }\n    productContainer.dataset.wishlistId = ID;\n    const productData = {\n        available: !hasClass(currentSizeElement, 'not-available'),\n        isNotifyMeEnabled,\n        id: ID,\n        formattedPrice,\n        forceOutOfStock,\n        imageData: ispu\n    };\n    handleNotifyMe(productData, productContainer);\n    if (!isDirectlyPurchasable) {\n        if (ispuButton) {\n            ispuButton.disabled = true;\n        }\n    } else if (ispuButton) {\n        ispuButton.disabled = false;\n        ispuButton.dataset.pid = ID;\n        const pickupImageElement = queryFirst('.pickup-product-img img', productContainer);\n        if (pickupImageElement && ispu) {\n            const { alt, url, srcset } = ispu[0];\n            const imageHasLoaded = hasClass(pickupImageElement, 'lz-loaded');\n\n            pickupImageElement.setAttribute(imageHasLoaded ? 'src' : 'data-src', url);\n            pickupImageElement.setAttribute(imageHasLoaded ? 'srcset' : 'data-srcset', srcset);\n            pickupImageElement.setAttribute('alt', alt);\n        }\n        const pickupSalesPrice = queryFirst('.pickup-price .sale-price', productContainer);\n        pickupSalesPrice.textContent = formattedPrice;\n        const pickupStandardPrice = queryFirst('.pickup-price .standard-price', productContainer);\n        if (formattedStandardPrice !== formattedPrice) {\n            pickupStandardPrice.classList.add('mr-2');\n            pickupStandardPrice.textContent = formattedStandardPrice;\n            pickupSalesPrice.classList.add('has-marked-price');\n        }\n        queryFirst('.pickup-color .selected-color', productContainer).textContent = selectedColorName.split(':')[1];\n        const pickupSize = queryFirst('.pickup-size', productContainer);\n        queryFirst('.size-label', pickupSize).textContent = queryFirst('.size-display-name', productContainer).value;\n        const sizeSelected = queryFirst('.size-card .size-btn.selected', productContainer);\n        if (sizeSelected) {\n            queryFirst('.selected-size', pickupSize).textContent = sizeSelected.dataset.attrValue;\n        }\n    }\n    const ispuCheckBoxChecked = queryFirst('.shipping-preferences .preference-ispu', productContainer);\n    const availabilityElement = queryFirst('.product-availability .availability-message-text', productContainer);\n    if (ispuCheckBoxChecked && ispuCheckBoxChecked.checked) {\n        addClass(availabilityElement, HIDDEN_CLASS);\n    }\n    const product = {};\n    if (mgFlag && mgLocs && mgLocs.length > 0) {\n        const monogramImages = images.monogram || [];\n        let url = '';\n        let srcset = '';\n        if (monogramImages.length) {\n            const updatedImageData = base.updateImageDetails(monogramImages)[0];\n            url = updatedImageData.url;\n            srcset = updatedImageData.srcset;\n        }\n        const monogramObject = {\n            monogramProductID: ID,\n            monogramImageURL: url,\n            monogramImageSrcSetURL: srcset,\n            monogramLocations: mgLocs,\n            monogramSelectedColor: selectedColorName,\n            monogramSelectedSize: selectedSizeValue,\n            productPrice: formattedPrice,\n            monogramProductPrice,\n            totalPrice: totalPrice\n        };\n        product.monogramObject = monogramObject;\n    }\n\n    // secret sauce integration to update product data\n    updateProductData(selectedColorName, selectedSizeValue, standardPrice, price, productContainer);\n    handleSize(productContainer);\n}\n\nconst init = () => {\n    $('body').on('product:handleImageZoom', handleProductImageZoom);\n    $('.carousel.image-slider').carousel();\n    $('.primary-images').on('click', '.carousel-indicators-images li,.carousel-indicators li ', function (e) {\n        const clickedContainerEle = this.closest('.primary-images');\n        const carouselIndicatorsActivedImages = queryFirst('.carousel-indicators-images li.active', clickedContainerEle);\n        const carouselIndicatorsActivedPips = queryFirst('.carousel-indicators li.active', clickedContainerEle);\n        removeClass(carouselIndicatorsActivedImages, ACTIVE_CLASS);\n        removeClass(carouselIndicatorsActivedPips, ACTIVE_CLASS);\n        let idx = $(this).index() + 1;\n        const carouselIndicatorsToBeActivedImages = queryFirst('.carousel-indicators-images li:nth-child(' + idx + ')', clickedContainerEle);\n        const carouselIndicatorsToBeActivedPips = queryFirst('.carousel-indicators li:nth-child(' + idx + ')', clickedContainerEle);\n        addClass(carouselIndicatorsToBeActivedImages, ACTIVE_CLASS);\n        addClass(carouselIndicatorsToBeActivedPips, ACTIVE_CLASS);\n        const carouselMzThumbSelected = queryFirst('.carousel-indicators-images li:nth-child(' + idx + ') a.mz-thumb-selected', clickedContainerEle);\n        const carouselInnerItem = queryFirst('.carousel-inner .carousel-item:nth-child(' + idx + ') a', clickedContainerEle);\n        const carouselItemImage = queryAll('.carousel-inner .carousel-item:nth-child(' + idx + ') a img', clickedContainerEle);\n        const carouselMzZoomWindow = queryAll('.mz-zoom-window img');\n        const newImgSrc = carouselInnerItem?.getAttribute('href') ?? '';\n        const newImgAlt = carouselItemImage.length > 0 ? carouselItemImage[0].getAttribute('alt') : '';\n        $(carouselMzThumbSelected).triggerHandler('click');\n        carouselItemImage.forEach((imgEle) => {\n            imgEle.setAttribute('src', newImgSrc);\n        });\n        carouselMzZoomWindow.forEach((mzZoomImg) => {\n            if (mzZoomImg.alt === newImgAlt) {\n                mzZoomImg.setAttribute('src', newImgSrc);\n                mzZoomImg.setAttribute('alt', newImgAlt);\n            }\n        });\n    });\n\n    setTimeout(() => {\n        setDynamicHeight();\n    }, 3000); // Adjust the debounce delay as needed\n    updateFitSizeTab();\n    const productName = queryFirst('.product-name-row .product-name');\n    if (productName) {\n        productName.innerHTML = productName.innerHTML.replace(/-/g, '‑');\n    }\n    let carouselIns = $('.product-detail .primary-images .carousel');\n    carouselIns.carousel(0);\n};\n\n/**\n * Show the Fit Size Tab if fit size selectable count is greater than one\n */\nfunction updateFitSizeTab() {\n    const fitSizeSelectableCountEle = queryAll('.selectableCount');\n    fitSizeSelectableCountEle.forEach(fitSizeSelectableCount => {\n        const fitSizeSelectableConatiner = fitSizeSelectableCount.closest('.fit-size-tab');\n        const sizeAccordionEle = fitSizeSelectableCount.closest('.size-card');\n        const fitSizeText = queryFirst('.fitsize-detail-text', sizeAccordionEle);\n        const sizeText = queryFirst('.size-detail-text', sizeAccordionEle);\n        if (fitSizeSelectableCount) {\n            const fitSizeCount = fitSizeSelectableCount.dataset.selectableCount;\n            const fitSizes = queryAll('.non-color-attribute.fit-product-type', fitSizeSelectableConatiner);\n            if (fitSizes && fitSizes.length > 0) {\n                let selectedFit = queryFirst('.non-color-attribute.fit-product-type.selected', fitSizeSelectableConatiner);\n                if (!selectedFit) {\n                    let firstAvailableFit = fitSizes[0];\n                    $(firstAvailableFit).trigger('click');\n                }\n            }\n            if (fitSizeCount > 1) {\n                removeClass(fitSizeSelectableConatiner, 'fit-size-tab');\n                addClass(sizeText, 'd-none');\n                removeClass(fitSizeText, 'd-none');\n            } else {\n                removeClass(sizeText, 'd-none');\n                addClass(fitSizeText, 'd-none');\n            }\n        }\n    });\n\n    updateScarcityMessage('', queryFirst('.product-detail'));\n}\nconst handleLastLinkTab = e => {\n    const sizeChartCatBtn = queryFirst('#sizechart-menu-toggle');\n    const isTabPressed = e.key === TabKey || e.keyCode === KEYCODE_TAB;\n    if (!isTabPressed) {\n        return;\n    }\n\n    if (!e.shiftKey) {\n        sizeChartCatBtn.focus();\n    }\n};\n\nexport default {\n    init: init,\n\n    availability: base.availability,\n\n    addToCart: base.addToCart,\n\n    scrollFitRatingToReviews: function () {\n        $(document).on('click', 'button.fit-review, button.no-fit-review', function (e) {\n            e.preventDefault();\n            const bvReviews = document.getElementById('bazaarvoiceReviews');\n            if (bvReviews) {\n                scrollTo(window.scrollY + bvReviews.getBoundingClientRect().top, 0);\n            }\n        });\n    },\n\n    handleProductImageZoom: handleProductImageZoom,\n\n    updateAttribute: function () {\n        $('body').on('product:afterAttributeSelect', function (e, response) {\n            const { container } = response;\n            const {\n                id,\n                variationAttributes,\n                gtmData,\n                gtmGA4Data\n            } = response.data.product;\n            if ($('.product-detail>.bundle-items').length) {\n                container.data('pid', id);\n                container.find('.product-id').text(id);\n            } else if ($('.product-set-detail').eq(0)) {\n                container.data('pid', id);\n                container.find('.product-id').text(id);\n            } else {\n                $('.product-id').text(id);\n                $('.product-detail:not(\".bundle-item\")').data('pid', id);\n            }\n\n            const $addToCart = $('.add-to-cart');\n\n            if (gtmData) {\n                $addToCart.data('gtmdata', gtmData);\n            }\n\n            if (gtmGA4Data) {\n                $addToCart.data('gtmga4data', gtmGA4Data);\n            }\n\n            updateSelectedSwatchProductName(variationAttributes, container);\n            $('body').trigger('product:handleImageZoom');\n            updateFitSizeTab();\n        });\n    },\n\n    selectSizeAttribute: function () {\n        $('body').off('click').on('click', '.set-items .size-btn, .product-quickview .size-btn, .quick-buy .size-btn', function (e) {\n            e.preventDefault();\n            const buttonElement = e.target;\n            const $productContainer = $(this).closest('.product-detail');\n            if ($productContainer.hasClass('quick-buy')) {\n                const $body = $('body');\n                const productTileItem = $(this).closest('.product-tile-container')[0];\n                const productName = queryFirst('.product-name a', productTileItem).textContent;\n                const selectedColor = $(this).closest('.product-tile-container').find('.product-tile-swatch.selected').data('swatch-name');\n                const plpItemImage = queryFirst('.tile-image', productTileItem);\n                const notifyImageElementMarkup = `<img class=\"p-img\" src=\"${plpItemImage.getAttribute('src')}\" srcset=\"${plpItemImage.getAttribute('srcset')}\"\n                    alt=\"${plpItemImage.getAttribute('alt')}\" title=\"${plpItemImage.getAttribute('alt')}\" />`;\n                const size = $(this).data('attr-value');\n                if ($(this).hasClass('not-available')) {\n                    if ($(this).data('stock-notification')) {\n                        $('.quick-buy-modal').modal('hide')\n                        const notifyContainer = queryFirst('.notify-me-container');\n                        const notifyImageElement = queryFirst('.notify-product-img', notifyContainer);\n                        notifyImageElement.innerHTML = notifyImageElementMarkup;\n                        queryFirst('.notify-product-name', notifyContainer).textContent = productName;\n                        const productPrice = queryFirst('.price-section .sales .value', productTileItem).innerText;\n                        queryFirst('.notify-price', notifyContainer).textContent = productPrice;\n                        const pid = $(this).data('variation-id');\n                        const sizeLabel = $('.size-display-name').val();\n                        const notifySize = queryFirst('.notify-size', notifyContainer);\n                        const notifySizeSeperator = queryFirst('.size-seperator', notifyContainer);\n                        const notifySelectedSize = queryFirst('.selected-size', notifyContainer);\n                        queryFirst('.size-label', notifySize).textContent = sizeLabel;\n                        queryFirst('.selected-size', notifySize).textContent = size;\n                        removeClass(notifySizeSeperator, 'd-none');\n                        removeClass(notifySelectedSize, 'd-none');\n                        if (pid) {\n                            document.getElementById('notifySku').value = pid;\n                        }\n                        const custEmail = (document.getElementById('notifyEmail') || {}).value;\n                        if (custEmail) {\n                            queryFirst('.notify-email', notifyContainer).value = custEmail;\n                        }\n                        const notifyForm = queryFirst('.notify-form.enable-form-validate', notifyContainer);\n                        removeClass(notifyForm, 'd-none');\n                        const notifyConfirm = queryFirst('.notify-me-confirm', notifyContainer);\n                        addClass(notifyConfirm, 'd-none');\n                        $('div.quick-buy-notifyme').find('#notifyMe').modal('show');\n                    }\n                } else {\n                    $('.quick-buy-modal').modal('hide');\n                    $body.removeClass('modal-open');\n                    $('.quick-buy-add-toast .sizeVal').text(size);\n                    $('.quick-buy-add-toast .colorVal').text(selectedColor);\n                    $('.quick-buy-add-toast .title').text(productName);\n                    $('.quick-buy-add-toast .image-container').html(notifyImageElementMarkup);\n                    $('.quick-buy-add-toast').attr('is-quick-buy', true);\n                    $('.quick-buy .size-btn').removeClass('selected');\n                    $(this).addClass('selected');\n                    if ($('.pdp-container').length === 0) {\n                        queryFirst('.quick-buy-add-to-cart', $productContainer[0]).click();\n                    }\n                }\n            } else {\n                const isPDPSetPage = this.closest('.product-set-item');\n                if ($productContainer.hasClass('cached-quick-view') && !hasClass(buttonElement, 'selected')) {\n                    const productContainer = this.closest('.product-detail');\n                    const selectedColorElement = queryFirst('.color-attribute .swatch-circle.selected', productContainer);\n                    const selectedColorId = selectedColorElement.dataset.attrValue;\n                    const selectedSizeValue = this.dataset.attrValue;\n                    onSizeChangeHandler.apply(this, productContainer, selectedSizeValue);\n                    updateQuickViewProductInfo(selectedSizeValue, selectedColorId, productContainer, this);\n                } else if (isPDPSetPage) {\n                    const productContainerEle = isPDPSetPage;\n                    if (!hasClass(productContainerEle, 'scrollable-product-item')) {\n                        const url = buttonElement.dataset.attrUrl;\n                        base.attributeSelect(url, $productContainer, buttonElement);\n                    } else {\n                        const selectedColorElement = queryFirst('.color-attribute .swatch-circle.selected', productContainerEle);\n                        const selectedColorIdValue = selectedColorElement.dataset.attrValue;\n                        const selectedSizeEleValue = this.dataset.attrValue;\n                        onSizeChangeHandler.apply(this, [productContainerEle, selectedSizeEleValue]);\n                        $body.trigger('product:pdpSizeSelected', {\n                            selectedColorElement,\n                            selectedSizeElement: buttonElement,\n                            productContainer: productContainerEle\n                        });\n                        updateProductInfo(selectedSizeEleValue, selectedColorIdValue, productContainerEle, this, isPDPSetPage);\n                    }\n                    //Code echange to Fix the Scrolling issue on PDP Set page on click on Add all to Cart CTA\n                    const availabilityEle = queryFirst('.product-availability', productContainerEle);\n                    if (availabilityEle) {\n                        $(availabilityEle).attr('data-ready-to-order', true);\n                    }\n                }\n            }\n        });\n        $('body').on('product:quickViewAttributeChange', (e, response) => {\n            const selectedSizeElement = queryFirst('.product-quickview.cached-quick-view .size-btn.selected');\n            const selectedValue = selectedSizeElement ? selectedSizeElement.dataset.attrValue : '';\n            updateQuickViewProductInfo(selectedValue, response.variantGroupId, response.container[0], selectedSizeElement);\n        });\n        window.addEventListener('resize', throttle(() => {\n            const quickViewCarouselEl = queryFirst('.product-quickview.cached-quick-view .carousel');\n            if (quickViewCarouselEl) {\n                quickViewCarouselEl.style.minHeight = '';\n            }\n        }, 16));\n    },\n    afterAttributeSelect: function () {\n        $('body').on('product:afterAttributeSelect', (event, response) => {\n            const { selectedSizeElement } = response;\n            const { product } = response.data;\n            const { id, readyToOrder, available, formattedPrice, formattedStandardPrice, forceOutOfStock, price, wishListID, images, isDirectlyPurchasable } = product;\n            const { ispu } = images;\n            const responseContainer = response.container[0];\n            const addToCartButton = queryFirst('.add-to-cart', responseContainer);\n            responseContainer.dataset.pid = id;\n            responseContainer.dataset.wishlistId = wishListID;\n\n            let ssSize = 'unknown';\n            const hiddenClass = 'd-none';\n            if (hasClass(responseContainer, 'product-quickview') && addToCartButton) {\n                addToCartButton.disabled = false;\n            }\n            if (selectedSizeElement) {\n                ssSize = selectedSizeElement.dataset.attrValue;\n                removeClass(queryAll('.size-btn', responseContainer), 'selected');\n                addClass(selectedSizeElement, 'selected');\n                const sizeCard = selectedSizeElement.closest('.size-card');\n                const selectedSize = queryFirst('.selected-size', sizeCard);\n                if (selectedSize) {\n                    const sizeSeparator = queryFirst('.size-seperator', sizeCard);\n                    selectedSize.textContent = selectedSizeElement.dataset.attrValue;\n                    removeClass([sizeSeparator, selectedSize], hiddenClass);\n                }\n                const sizeContainer = selectedSizeElement.closest('.size-container');\n                const assistiveElements = queryAll('.selected-assistive-text', sizeContainer);\n                assistiveElements.forEach(eachElement => {\n                    if (eachElement.textContent.includes(eachElement.dataset.outOfStock)) {\n                        eachElement.textContent = eachElement.dataset.outOfStock;\n                    } else {\n                        eachElement.textContent = '';\n                    }\n                });\n                const assistiveElementOfSelected = queryFirst('.selected-assistive-text', selectedSizeElement.closest('.size-list'));\n                const { selectedText, outOfStock } = assistiveElementOfSelected.dataset;\n                assistiveElementOfSelected.textContent = selectedText;\n                if (hasClass(selectedSizeElement, 'not-available')) {\n                    assistiveElementOfSelected.textContent += ' ' + outOfStock;\n                }\n                if (addToCartButton) {\n                    addToCartButton.disabled = !readyToOrder || !available || forceOutOfStock;\n                }\n\n                const quickviewContainer = selectedSizeElement.closest('.product-quickview');\n                if (quickviewContainer) {\n                    const addToCartSection = queryFirst('.prices-add-to-cart-actions', responseContainer);\n                    const notifyMeButton = queryFirst('.notify-me-btn', responseContainer);\n                    const notifyMeDesc = queryFirst('.notify-me-desc', responseContainer);\n                    const availabilityMessageEl = queryFirst('.product-availability', responseContainer);\n                    const { isNotifyMeEnabled, isDirectlyPurchasable } = product;\n                    const salesPrice = price.type === 'range' ? price.min.sales : price.sales;\n                    const productData = {\n                        available,\n                        isNotifyMeEnabled,\n                        id,\n                        formattedPrice: salesPrice.formatted,\n                        forceOutOfStock,\n                        imageData: ispu\n                    };\n                    handleNotifyMe(productData, quickviewContainer);\n                    const updateCartButton = queryFirst('.update-cart-product-global', quickviewContainer);\n                    if (updateCartButton) {\n                        const { giftWrapAvailableFlag } = product;\n                        updateCartButton.dataset.giftWrapAvailable = giftWrapAvailableFlag;\n                    }\n                    if (isDirectlyPurchasable === false) {\n                        removeClass(addToCartSection, hiddenClass);\n                        if (availabilityMessageEl) {\n                            removeClass(availabilityMessageEl, hiddenClass);\n                        }\n                        addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n                    }\n                }\n\n                const ispuButton = queryFirst('.btn-in-store-pickup', responseContainer);\n                if (ispuButton) {\n                    ispuButton.dataset.pid = id;\n                    ispuButton.disabled = false;\n                    const pickupImageElement = queryFirst('.pickup-product-img img', responseContainer);\n                    if (pickupImageElement && ispu) {\n                        const { alt, url, srcset } = ispu[0];\n                        pickupImageElement.setAttribute('src', url);\n                        pickupImageElement.setAttribute('srcset', srcset);\n                        pickupImageElement.setAttribute('alt', alt);\n                    }\n                    queryFirst('.pickup-product-name', responseContainer).textContent = product.productName;\n                    const pickupSalesPrice = queryFirst('.pickup-price .sale-price');\n                    if (pickupSalesPrice) {\n                        pickupSalesPrice.textContent = (product.price && product.price.sales) ? product.price.sales.formatted : '';\n                    }\n                    const pickupStandardPrice = queryFirst('.pickup-price .standard-price');\n                    if (formattedStandardPrice !== formattedPrice && pickupStandardPrice) {\n                        pickupStandardPrice.classList.add('mr-2');\n                        pickupStandardPrice.textContent = formattedStandardPrice;\n                        pickupSalesPrice.classList.add('has-marked-price');\n                    }\n                    const selectedSwatchName = queryFirst('.selected-swatch-name', responseContainer);\n                    if (selectedSwatchName) {\n                        queryFirst('.pickup-color .selected-color', responseContainer).textContent = selectedSwatchName.textContent;\n                    }\n                    const pickupSize = queryFirst('.pickup-size', responseContainer);\n                    queryFirst('.size-label', pickupSize).textContent = queryFirst('.size-display-name', responseContainer).value;\n                    const sizeSelected = queryFirst('.size-card .size-btn.selected', responseContainer);\n                    if (sizeSelected) {\n                        queryFirst('.selected-size', pickupSize).textContent = sizeSelected.dataset.attrValue;\n                    }\n                }\n            }\n            if (hasClass(responseContainer, 'product-quickview') && isDirectlyPurchasable === false) {\n                const addToCartSection = queryFirst('.prices-add-to-cart-actions', responseContainer);\n                const notifyMeButton = queryFirst('.notify-me-btn', responseContainer);\n                const notifyMeDesc = queryFirst('.notify-me-desc', responseContainer);\n                const availabilityMessageEl = queryFirst('.product-availability', responseContainer);\n                removeClass(addToCartSection, hiddenClass);\n                if (addToCartButton) {\n                    addToCartButton.disabled = true;\n                }\n                if (availabilityMessageEl) {\n                    removeClass(availabilityMessageEl, hiddenClass);\n                }\n                addClass([notifyMeDesc, notifyMeButton], hiddenClass);\n            }\n            const wishlistButton = queryFirst('.add-to-wish-list', responseContainer);\n            if (wishlistButton && hasClass(wishlistButton, 'added-to-wish-list')) {\n                removeClass(wishlistButton, 'added-to-wish-list');\n                wishlistButton.disabled = false;\n                const assistiveText = wishlistButton.getAttribute('data-assistive-text');\n                wishlistButton.setAttribute('aria-label', assistiveText);\n            }\n            if (!hasClass(responseContainer, 'gift-card-main') && !document.getElementById('chooseBonusProductModal')) {\n                const ssColorElement = queryFirst('.color-container .color-attribute.selected', responseContainer);\n                const ssColor = (ssColorElement && ssColorElement.dataset.attrDisplayvalue) || 'unknown';\n                const { type } = price;\n                const pricesObject = type === 'range' ? price.min : price;\n                const { sales, list } = pricesObject;\n                const ssSalesPrice = ((sales && sales.value) ? sales.value.toString() : 'unknown') || 'unknown';\n                const ssPrice = ((list && list.value) ? list.value.toString() : ssSalesPrice) || ssSalesPrice;\n                updateProductData(ssColor, ssSize, ssPrice, ssSalesPrice, responseContainer);\n                if (ssSize === 'unknown') {\n                    handleColor(responseContainer);\n                } else {\n                    handleSize(responseContainer);\n                }\n            }\n            if (selectedSizeElement) {\n                const productSetModal = selectedSizeElement.closest('#productSetModal');\n                if (productSetModal) {\n                    const addAllToToteButton = queryFirst('.add-to-cart-global', productSetModal);\n                    if (addAllToToteButton) {\n                        const productsAvailability = queryAll('.product-availability', productSetModal).filter(item => !hasClass(item.closest('.product-detail'), 'hidden-set'));\n                        const numberOfProducts = productsAvailability.length;\n\n                        // Check to enable add to tote button, if atleast one product exists\n                        let enable = true;\n                        if (!numberOfProducts) {\n                            enable = false;\n                        }\n                        addAllToToteButton.disabled = !enable;\n                    }\n                }\n            }\n            setTimeout(() => {\n                setDynamicHeight();\n            }, 200);\n            updateFitSizeTab();\n            $.spinner().stop();\n        });\n    },\n    selectPdpSizeAttribute: function () {\n        $(document).on('click', '.pdp-container .size-btn', function (e) {\n            e.preventDefault();\n\n            const productContainer = this.closest('.product-detail');\n            const selectedColorElement = queryFirst('.color-attribute .swatch-circle.selected', productContainer);\n            const selectedColorId = selectedColorElement.dataset.attrValue;\n            const selectedSizeValue = this.dataset.attrValue;\n            onSizeChangeHandler.apply(this, [productContainer, selectedSizeValue]);\n            $body.trigger('product:pdpSizeSelected', {\n                selectedColorElement,\n                selectedSizeElement: this,\n                productContainer\n            });\n            $('.sku-section').removeClass('d-none');\n            updateProductInfo(selectedSizeValue, selectedColorId, productContainer, this);\n        });\n        $('body').on('product:afterAttributeChange', (e, response) => {\n            const selectedSizeElement = queryFirst('.pdp-container .size-btn.selected');\n            const selectedValue = selectedSizeElement ? selectedSizeElement.dataset.attrValue : '';\n            updateProductInfo(selectedValue, response.variantGroupId, response.container[0], selectedSizeElement);\n        });\n\n        const swatchEl = queryFirst('.pdp-container button.color-attribute .swatch-circle.selected');\n\n        if (swatchEl) {\n            const sizeElements = queryAll('.pdp-container .size-btn');\n\n            if (sizeElements.length) {\n                if (sizeElements.length === 1) {\n                    queryFirst('.pdp-container .size-btn').click();\n                } else {\n                    const selectedSizeEl = queryFirst('.pdp-container .size-btn.selected');\n\n                    if (selectedSizeEl) {\n                        selectedSizeEl.click();\n                    }\n                }\n\n                if (!queryFirst('.pdp-container .size-btn.not-purchasable')) {\n                    const allSizesSoldOut = sizeElements.every((sizeElement) => hasClass(sizeElement, 'not-available'));\n\n                    if (allSizesSoldOut) {\n                        removeClass(swatchEl, 'selectable');\n\n                        const allSelectableSwatches = queryAll('.pdp-container button.color-attribute .swatch-circle.selectable');\n                        const notifyMeDesc = queryFirst('.notify-me-desc.d-none');\n\n                        if (allSelectableSwatches.length && notifyMeDesc.length) {\n                            // Hide the selected swatch because it's out of stock\n                            addClass(swatchEl.closest('li'), 'd-none');\n                            allSelectableSwatches[0].click();\n                        }\n                    }\n                }\n            }\n        }\n    },\n\n    updateAttributesAndDetails: function () {\n        $('body').on('product:statusUpdate', function (e, data) {\n            var $productContainer = $('.product-detail[data-pid=\"' + data.id + '\"]');\n\n            $productContainer\n                .find('.description-and-detail .product-attributes')\n                .empty()\n                .html(data.attributesHtml);\n\n            if (data.shortDescription) {\n                $productContainer.find('.description-and-detail .description').removeClass('hidden-xl-down');\n                $productContainer\n                    .find('.description-and-detail .description .content')\n                    .empty()\n                    .html(data.shortDescription);\n            } else {\n                $productContainer.find('.description-and-detail .description').addClass('hidden-xl-down');\n            }\n\n            if (data.longDescription) {\n                $productContainer.find('.description-and-detail .details').removeClass('hidden-xl-down');\n                $productContainer\n                    .find('.description-and-detail .details .content')\n                    .empty()\n                    .html(data.longDescription);\n            } else {\n                $productContainer.find('.description-and-detail .details').addClass('hidden-xl-down');\n            }\n        });\n    },\n\n    showSpinner: function () {\n        $('body').on('product:beforeAddToCart product:beforeAttributeSelect', function () {\n            const productSetModal = document.getElementById('productSetModal');\n            const quickViewModal = document.getElementById('quickViewModal');\n            if (productSetModal && hasClass(productSetModal, 'show')) {\n                $(productSetModal)\n                    .spinner()\n                    .start();\n            } else if (quickViewModal && hasClass(quickViewModal, 'show')) {\n                $(quickViewModal)\n                    .spinner()\n                    .start();\n            } else {\n                $.spinner().start();\n            }\n        });\n    },\n    updateAvailability: function () {\n        $('body').on('product:updateAvailability', function (e, response) {\n            $('div.availability', response.$productContainer)\n                .attr('data-ready-to-order', response.product.readyToOrder)\n                .attr('data-available', response.product.available);\n\n            var availabilityValue = '';\n            var availabilityMessages = response.product.availability.messages;\n            if (response.product.readyToOrder) {\n                availabilityMessages.forEach(message => {\n                    availabilityValue += availabilityMessageTmpl(message);\n                });\n            }\n\n            $('.availability-msg', response.$productContainer)\n                .empty()\n                .html(availabilityValue);\n\n            if ($('.global-availability').length) {\n                var allAvailable = $('.product-availability')\n                    .toArray()\n                    .every(function (item) {\n                        return $(item).data('available');\n                    });\n\n                var allReady = $('.product-availability')\n                    .toArray()\n                    .every(function (item) {\n                        return $(item).data('ready-to-order');\n                    });\n\n                $('.global-availability')\n                    .data('ready-to-order', allReady)\n                    .data('available', allAvailable);\n\n                $('.global-availability .availability-msg')\n                    .empty()\n                    .html(allReady ? response.message : response.resources.info_selectforstock);\n            }\n        });\n    },\n    sizeChart: function () {\n        var $prodSizeChart = $('.size-chart-collapsible');\n        $('body').on('click', '.size-chart .size-chart-link', function (e) {\n            e.preventDefault();\n            var url = $(this).data('href');\n            var $lpSlideout = $('.lp-sizechart');\n            var activeCategoryVal = $(this).data('sizefamily');\n            var defaultText = $(this).data('defaulttext');\n            const setStickyNav = queryFirst('.custom-set-detail-sticky-nav');\n            if ($prodSizeChart.is(':empty')) {\n                $.ajax({\n                    url: url,\n                    type: 'get',\n                    dataType: 'json',\n                    success: function (data) {\n                        $prodSizeChart.append(data.content);\n                    },\n                    complete: function () {\n                        var $activeCategoryEl = $prodSizeChart.find(`a[href=\"#${activeCategoryVal}-size\"]`);\n                        var $lpSizechartTitle = $prodSizeChart.find('.lp-sizechart-category-btn');\n                        $lpSizechartTitle.focus();\n                        $activeCategoryEl.tab('show');\n                        $lpSizechartTitle.text($activeCategoryEl.text().length ? $activeCategoryEl.text() : defaultText);\n\n                        $prodSizeChart.animate(\n                            {\n                                right: '0'\n                            },\n                            500\n                        );\n                        $prodSizeChart.addClass('active');\n                        $lpSlideout.toggleClass('lp-slideout-open');\n                        $body.toggleClass(sizeChartClasses);\n\n                        const lastLinkEl = queryFirst('.return-policy-link');\n                        // console.log(lastLinkEl);\n                        if (lastLinkEl) {\n                            lastLinkEl.addEventListener('keydown', handleLastLinkTab);\n                        }\n                    }\n                });\n            } else {\n                $prodSizeChart.toggleClass('active');\n                $lpSlideout.toggleClass('lp-slideout-open');\n                $body.toggleClass(sizeChartClasses);\n            }\n            if (setStickyNav) {\n                addClass(setStickyNav, 'd-none');\n            }\n            $lpSlideout.trigger('shown.lp.sizeguide');\n        });\n\n        $('body').on('click touchstart', function (e) {\n            if (e.target.matches('#sizechart-close') || (e.target.matches('.size-chart-bg') && $prodSizeChart.hasClass('active'))) {\n                $prodSizeChart.removeClass('active');\n                $('.lp-slideout').removeClass('lp-slideout-open');\n                $body.removeClass(sizeChartClasses);\n            }\n        });\n    },\n\n    focusChooseBonusProductModal: base.focusChooseBonusProductModal(),\n    renderSizeElements: base.renderSizeElements,\n    handleEarlyAccessPLPLockIcon: base.handleEarlyAccessPLPLockIcon(),\n    handleEarlyAccessLockIcon: function () {\n        const productContainer = queryFirst('.pdp-container');\n        const productContainerEarlyAccessIcon = queryFirst('.loyalty-early-access-lock-container', productContainer);\n        if (productContainerEarlyAccessIcon) {\n            const { earlyAccessDate } = productContainerEarlyAccessIcon.dataset;\n            const earlyAccessItem = isEarlyAccessElement(earlyAccessDate);\n            base.handleEarlyAccessCta(productContainer, earlyAccessItem);\n        }\n    },\n    handleOflineProduct: function () {\n        const offlineContainerEl = queryFirst('.offline-product-detail');\n        if (offlineContainerEl) {\n            const pid = offlineContainerEl.dataset.pid;\n            const inventoryData = window.productInventory;\n            if (inventoryData && inventoryData.variants) {\n                const data = inventoryData.variants[pid];\n                if (data && data.availabilityStatus === IN_STOCK) {\n                    location.search = (location.search ? location.search + '&' : '') + 'timestamp=' + new Date().getTime();\n                }\n            }\n        }\n    },\n};\n\n/**\n * Set dynamic height for carousel indicators based on main image height.\n */\nfunction setDynamicHeight() {\n    const pdpContainer = document.querySelector('.container-fluid.product-detail');\n    if (!pdpContainer) return;\n\n    const carousels = document.querySelectorAll('.container-fluid.product-detail .carousel');\n    carousels.forEach((carousel) => {\n        const imgContainer = document.querySelector('.primary-images');\n        const carouselIndicators = carousel.querySelector('.carousel-indicators-images');\n        const mainImageHeight = imgContainer ? imgContainer.clientHeight : 0;\n        if (carouselIndicators) {\n            carouselIndicators.style.maxHeight = `${mainImageHeight}px`;\n        }\n    })\n}\n\n/**\n * Debounce function to handle window resize event.\n */\nfunction handleResize() {\n    clearTimeout(resizeTimeout);\n    let resizeTimeout = setTimeout(() => {\n        setDynamicHeight();\n        base.updatedimageSlideArrowPDP();\n    }, 200); // Adjust the debounce delay as needed\n}\n\n/**\n * Attach event listener for window resize using the debounce mechanism.\n */\nwindow.addEventListener('resize', handleResize);\n\n","'use strict';\n\nimport { queryFirst, queryAll, removeClass, addClass, hasClass } from '../domUtil';\n\nconst formValidation = require('base/components/formValidation');\nconst { clearForm } = require('../clientSideValidation').functions;\nconst { guestEmptyWishlistTemplate } = require('../templates');\nconst $body = $('body');\n\nconst giftCardContainerSelector = '.gift-card-main ';\nconst selectedClass = 'selected';\n\n/**\n * Function that sets hidden input value\n * @param { string } value - Gift card amount\n * @param { HTMLElement } giftCardContainer - Gift card container element\n */\nfunction updateHiddenAmountField(value, giftCardContainer) {\n    const amountHiddenInput = queryFirst('.gift-card-amount', giftCardContainer);\n\n    if (amountHiddenInput) {\n        amountHiddenInput.value = value;\n    }\n}\n\n/**\n * Displays error message in case of invalid swatch state\n * @param { HTMLElement } giftCardContainer - Gift card container Element\n */\nfunction displaySwatchErrorMessage(giftCardContainer) {\n    const amountHiddenInput = queryFirst('.gift-card-amount', giftCardContainer);\n    const attributesEl = queryFirst('.attributes', giftCardContainer);\n\n    if (amountHiddenInput && attributesEl) {\n        addClass(amountHiddenInput, 'is-invalid');\n        amountHiddenInput.nextElementSibling.innerText = attributesEl.dataset.invalidSwatchError;\n    }\n}\n\n/**\n * Checks if a selected swatch is not selectable/unavailable one\n * @param { HTMLElement } giftCardContainer - Gift card container Element\n * @returns { boolean } - a flag that states if currently selected swatch is valid or not\n */\nfunction isInvalidSwatchSelected(giftCardContainer) {\n    const selectedColorAttributeEl = queryFirst('.color-attribute .color-value.selected', giftCardContainer);\n\n    if (selectedColorAttributeEl && hasClass(selectedColorAttributeEl, 'unselectable')) {\n        return true;\n    }\n    return false;\n}\n\n/**\n * Clears giftcard error message\n * @param { HTMLElement } giftCardContainer - Gift card container element\n */\nfunction clearAmountErrorMessage(giftCardContainer) {\n    const amountHiddenInput = queryFirst('.gift-card-amount', giftCardContainer);\n    if (hasClass(amountHiddenInput, 'is-invalid')) {\n        removeClass(amountHiddenInput, 'is-invalid');\n    }\n}\n\n/**\n * Method is taken from OOTB\n * Function that runs after adding GC to cart\n * @param { Object } response - Response Object\n */\nfunction postAddToCart(response) {\n    $('.minicart').trigger('count:update', response);\n    if (!response.error) {\n        return;\n    }\n    var messageType = response.error ? 'alert-danger' : 'alert-success';\n    if ($('.add-to-cart-messages').length === 0) {\n        $('body').append('<div class=\"add-to-cart-messages\"></div>');\n    }\n\n    $('.add-to-cart-messages').append(\n        '<div class=\"alert ' +\n        messageType +\n        ' add-to-basket-alert text-center\" role=\"alert\">' +\n        response.message +\n        '</div>'\n    );\n\n    setTimeout(function () {\n        $('.add-to-basket-alert').remove();\n    }, 5000);\n}\n\n/**\n * Event handler that runs on denomination change\n * @param { jQuery.event } event - event Object\n */\nfunction amountSelectionHandler(event) {\n    event.preventDefault();\n    const { target } = event;\n    const { attrValue } = target.dataset;\n\n    const giftCardContainer = target.closest(giftCardContainerSelector);\n\n    queryAll('.pill', giftCardContainer).forEach((item) => {\n        if (attrValue === item.dataset.attrValue) {\n            addClass(item, selectedClass);\n        } else {\n            removeClass(item, selectedClass);\n        }\n    });\n\n    const customAmountInput = queryFirst('.custom-amount .form-control', giftCardContainer);\n    const inputOverlay = queryFirst('.input-hidden-overlay', giftCardContainer);\n    if (customAmountInput && attrValue && parseInt(attrValue, 10)) {\n        addClass(inputOverlay, 'show');\n        customAmountInput.setAttribute('disabled', true);\n\n        clearAmountErrorMessage(giftCardContainer);\n        updateHiddenAmountField(attrValue, giftCardContainer);\n    }\n\n    const wishlistProductCard = target.closest('.wishlist-card-item');\n    if (wishlistProductCard) {\n        const addToToteButton = queryFirst('.btn.gift-card-add-to-cart', wishlistProductCard);\n        removeClass(addToToteButton, 'disabled');\n    }\n}\n\n/**\n * Event handler that runs on disabled custom input element\n * @param { jQuery.event } event - event Object\n */\nfunction amountInputEnableHandler(event) {\n    const inputOverlay = event.target;\n    const giftCardContainer = inputOverlay.closest(giftCardContainerSelector);\n    const customAmountInput = queryFirst('.custom-amount .form-control', giftCardContainer);\n\n    removeClass(inputOverlay, 'show');\n\n    if (customAmountInput.hasAttribute('disabled')) {\n        customAmountInput.removeAttribute('disabled');\n    }\n\n    customAmountInput.focus();\n}\n\n/**\n * Event handler that runs on custom input element value changes\n * @param { jQuery.event } event - event Object\n */\nfunction amountInputHandler(event) {\n    const { target } = event;\n    const giftCardContainer = target.closest(giftCardContainerSelector);\n\n    const items = queryAll('.pill', giftCardContainer);\n    removeClass(items, selectedClass);\n\n    const { value } = target;\n    if (value && parseInt(value, 10)) {\n        items.forEach(item => item.setAttribute('disabled', true));\n    } else {\n        items.forEach(item => item.removeAttribute('disabled'));\n    }\n\n    clearAmountErrorMessage(giftCardContainer);\n    updateHiddenAmountField(value, giftCardContainer);\n    const wishlistProductCard = target.closest('.wishlist-card-item');\n    if (wishlistProductCard) {\n        const addToToteButton = queryFirst('.btn.gift-card-add-to-cart', wishlistProductCard);\n        const disabledClass = 'disabled';\n        value ? removeClass(addToToteButton, disabledClass) : addClass(addToToteButton, disabledClass);\n    }\n}\n\n/**\n * Handles Gift card add to cart functionality\n * @param { jQuery.event } event - Event Object\n */\nfunction addToCart(event) {\n    event.preventDefault();\n\n    const { target } = event;\n\n    if (target.closest('.cart-page')) {\n        return;\n    }\n\n    // Display an error message when an unselectable swatch is selected on page load\n    const pGiftCardContainer = target.closest('.p-gift-card-main');\n    if (pGiftCardContainer && isInvalidSwatchSelected(pGiftCardContainer)) {\n        displaySwatchErrorMessage(pGiftCardContainer);\n        return;\n    }\n\n    const { actionUrl } = target.dataset;\n\n    const formEl = $(target);\n    const wishlistCardItem = target.closest('.wishlist-card-item');\n    const spinner = $.spinner();\n    spinner.start();\n    if (actionUrl) {\n        $.ajax({\n            url: actionUrl,\n            method: 'POST',\n            data: formEl.serialize(),\n            success: function (response) {\n                spinner.stop();\n                if (response.success) {\n                    if (wishlistCardItem) {\n                        const wishlistId = queryFirst('.wishlist-id', target).value;\n                        const { removedWishListItem, wishListCountMessage, updatedWishListCount, itemsMsg, shopNewAsset } = response;\n                        const selectedListDiv = queryFirst('.wishlists-lists-' + wishlistId);\n                        const detailsTabItemCount = queryFirst('.header-items-count');\n                        const listItemCount = queryFirst('.list-items-count', selectedListDiv);\n                        if (removedWishListItem & updatedWishListCount > 0) {\n                            wishlistCardItem.remove();\n                            detailsTabItemCount.textContent = updatedWishListCount + ' items';\n                            listItemCount.textContent = updatedWishListCount + ' items';\n                        } else if (removedWishListItem) {\n                            const emptyWishlistMarkup = guestEmptyWishlistTemplate(wishListCountMessage, shopNewAsset);\n                            const wishlistCardItems = queryFirst('.wishlistItemCards');\n                            if (wishlistCardItems) {\n                                detailsTabItemCount.textContent = updatedWishListCount + ' ' + itemsMsg;\n                                listItemCount.textContent = updatedWishListCount + ' ' + itemsMsg;\n                                wishlistCardItems.outerHTML = emptyWishlistMarkup;\n                            }\n                        }\n                    }\n                    postAddToCart(response);\n                    formEl.find('.form-control.is-invalid').removeClass('is-invalid');\n                    $body.trigger('product:afterAddToCart', response);\n                } else {\n                    formValidation(formEl, response);\n                }\n            },\n            error: function () {\n                spinner.stop();\n            }\n        });\n    }\n}\n\n/**\n * Function that sets PID on swatch selection\n * @param { jQuery.event } _event - Event object\n * @param { Object } response - Response object\n */\nfunction setPid(_event, response) {\n    const giftCardContainer = response.container[0];\n    if (!hasClass(giftCardContainer, 'gift-card-main')) {\n        return;\n    }\n\n    // Update hidden fields on swatch changes\n    const giftCardProductIdInputs = queryAll('.gift-card-pid', giftCardContainer);\n    if (giftCardProductIdInputs.length) {\n        const { id } = response.data.product;\n\n        giftCardProductIdInputs.forEach(\n            giftCardProductIdInput => (giftCardProductIdInput.value = id)\n        );\n        giftCardContainer.dataset.wishlistId = id;\n    }\n\n    // Clear Form errors on swatch changes\n    if (hasClass(giftCardContainer, 'p-gift-card-main')) {\n        const pGiftCardForm = queryFirst('form', giftCardContainer);\n        if (pGiftCardForm) {\n            clearForm(pGiftCardForm);\n        }\n    }\n}\n\nexport default {\n    initializeEvents: function () {\n        // Default Amount selection event\n        $body.on('click', giftCardContainerSelector + '.amount-selector .pill', amountSelectionHandler);\n\n        // Custom amount input field enabling event\n        $body.on('click', giftCardContainerSelector + '.input-hidden-overlay', amountInputEnableHandler);\n\n        // Custom amount field value changes event\n        $body.on('keyup', giftCardContainerSelector + '.custom-amount .form-control', amountInputHandler);\n\n        // Gift card form submit event\n        $body.off('submit.gcSubmit').on('submit.gcSubmit', giftCardContainerSelector + '.gift-card', addToCart);\n\n        // Gift card swatch selection - Product ID updation event\n        $body.on('product:afterAttributeSelect', setPid);\n    }\n};\n","'use strict';\n\nimport detail from './product/detail';\nimport giftCardDetail from './giftCard/giftCard';\n\nconst processInclude = require('base/util');\n\ndocument.addEventListener('DOMContentLoaded', () => {\n    processInclude(detail);\n    processInclude(require('./components/imageSlider'));\n    processInclude(giftCardDetail);\n});\n"],"names":["_arrayLikeToArray","r","a","length","e","n","Array","isFitPredictorEnabled","document","getElementById","noop","queryFirst","selector","parent","arguments","undefined","querySelector","queryAll","slice","call","querySelectorAll","hasClass","el","classList","c","contains","getPriceFromContainer","priceContainerId","container","price","value","parseFloat","replace","getPrice","getSalePrice","getSelectedColor","colorElement","getSelectedSize","sizeElement","getSizes","sizeArray","forEach","element","size","dataset","attrValue","push","startFP","ssp","getAvailableSizes","getFitName","selectedFitElement","fitName","hasAttribute","fitSwatchName","getAttribute","updateProductSetData","$container","context","sizes","availableSizes","find","each","$","this","attr","productId","data","toString","first","val","salePrice","color","selectedFitName","sizeType","productContext","$giftCardAmount","pid","masterid","useSale","closest","prediction","event","productContainer","service","sizeOption","trigger","setAttribute","module","exports","Object","entries","handleColor","attribute","handleSize","sauce","deviceWidth","channelValue","custID","email","window","screen","width","layout","currency","language","market","shippingCountry","userId","emailHash","pt","type","pageContext","setupTrigger","initializeDom","ssAddToCart","_container$dataset","variantId","quantity","startOM","startSF","updateProductData","newColor","setSelectedColor","newSize","setSelectedSize","newPrice","priceElement","setPrice","newSalePrice","salesPriceElement","setSalePrice","reduce","exported","_ref","_ref2","isArray","_arrayWithHoles","l","t","Symbol","iterator","i","u","f","o","next","done","return","_iterableToArrayLimit","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","alias","method","featureSwitch","commonjsGlobal","global","self","NumeralFormatter","numeralDecimalMark","numeralIntegerScale","numeralDecimalScale","numeralThousandsGroupStyle","numeralPositiveOnly","stripLeadingZeroes","prefix","signBeforePrefix","tailPrefix","delimiter","owner","groupStyle","thousand","delimiterRE","RegExp","lakh","wan","none","prototype","getRawValue","format","parts","partSign","partSignAndPrefix","partInteger","partDecimal","indexOf","split","NumeralFormatter_1","DateFormatter","datePattern","dateMin","dateMax","date","blocks","reverse","map","x","parseInt","unshift","initBlocks","getISOFormatDate","addLeadingZero","getBlocks","getValidatedDate","result","index","sub","sub0","rest","getFixedDateString","day","month","year","dayIndex","monthIndex","yearIndex","dayStartIndex","monthStartIndex","yearStartIndex","fullYearDone","toLowerCase","getFixedDate","getRangeFixedDate","previous","current","addLeadingZeroForYear","Math","min","isLeapYear","number","fullYearMode","DateFormatter_1","TimeFormatter","timePattern","timeFormat","time","getISOFormatTime","getTimeFormatOptions","String","maxHourFirstDigit","maxHours","maxMinutesFirstDigit","maxMinutes","getValidatedTime","timeFormatOptions","getFixedTimeString","second","minute","hour","secondIndex","minuteIndex","hourIndex","secondStartIndex","minuteStartIndex","hourStartIndex","getFixedTime","TimeFormatter_1","PhoneFormatter","formatter","setFormatter","phoneNumber","clear","validated","iMax","inputDigit","charAt","PhoneFormatter_1","CreditCardDetector","uatp","amex","diners","discover","mastercard","dankort","instapayment","jcb15","jcb","maestro","visa","mir","unionPay","general","re","getStrictBlocks","block","total","prev","concat","getInfo","strictMode","key","matchedBlocks","CreditCardDetector_1","Util_1","strip","getPostDelimiter","delimiters","matchedDelimiter","getDelimiterREByDelimiter","getNextCursorPosition","prevPos","oldValue","newValue","getPositionOffset","oldRawValue","newRawValue","lengthOffset","stripDelimiters","abs","letter","headStr","str","getMaxLength","getPrefixStrippedValue","prefixLength","prevResult","noImmediatePrefix","prevValue","getFirstDiffIndex","getFormattedValue","blocksLength","delimiterLazyShow","multipleDelimiters","currentDelimiter","fixPrefixCursor","appendix","setSelectionRange","len","setTimeout","checkFullSelection","getSelection","ex","setSelection","position","doc","getActiveElement","createTextRange","range","move","select","console","warn","activeElement","shadowRoot","isAndroid","navigator","userAgent","isAndroidBackspaceKeydown","lastInputValue","currentInputValue","DefaultProperties_1","assign","target","opts","creditCard","creditCardStrictMode","creditCardType","onCreditCardTypeChanged","phone","phoneRegionCode","phoneFormatter","timeFormatter","dateFormatter","numeral","swapHiddenInput","numericOnly","uppercase","lowercase","rawValueTrimPrefix","copyDelimiter","initValue","delimiterLength","root","_typeof","maxLength","backspace","onValueChanged","Cleave","hasMultipleElements","Error","properties","DefaultProperties","init","pps","Util","isBackward","onChangeListener","onChange","bind","onKeyDownListener","onKeyDown","onFocusListener","onFocus","onCutListener","onCut","onCopyListener","onCopy","initSwapHiddenInput","addEventListener","initPhoneFormatter","initDateFormatter","initTimeFormatter","initNumeralFormatter","onInput","inputFormatter","cloneNode","parentNode","insertBefore","elementSwapHidden","id","numeralFormatter","AsYouTypeFormatter","charCode","which","keyCode","inputType","postDelimiter","postDelimiterBackspace","copyClipboardData","textToCopy","inputValue","clipboardData","setData","preventDefault","postDelimiterAfter","updateValueState","toUpperCase","updateCreditCardPropsByValue","creditCardInfo","endPos","selectionEnd","callOnValueChanged","rawValue","setPhoneRegionCode","setRawValue","destroy","removeEventListener","Cleave_1","exportName","VENDOR_PREFIXES","TEST_ELEMENT","createElement","TYPE_FUNCTION","round","now","Date","setTimeoutContext","fn","timeout","bindFn","invokeArrayArg","arg","obj","hasOwnProperty","deprecate","message","deprecationMessage","stack","log","apply","output","source","nextKey","extend","dest","src","merge","keys","inherit","child","base","childP","baseP","create","_super","boolOrFn","args","ifUndefined","val1","val2","addEventListeners","types","handler","splitStr","removeEventListeners","hasParent","node","inStr","trim","inArray","findByKey","toArray","uniqueArray","sort","results","values","b","prefixed","property","prop","camelProp","_uniqueId","getWindowForElement","ownerDocument","defaultView","parentWindow","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","INPUT_TYPE_TOUCH","INPUT_TYPE_MOUSE","COMPUTE_INTERVAL","INPUT_START","INPUT_END","INPUT_CANCEL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","PROPS_XY","PROPS_CLIENT_XY","Input","manager","callback","options","inputTarget","domHandler","ev","enable","inputHandler","eventType","input","pointersLen","pointers","changedPointersLen","changedPointers","isFirst","isFinal","session","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","center","getCenter","timeStamp","deltaTime","angle","getAngle","distance","getDistance","offset","offsetDelta","prevDelta","prevInput","deltaX","y","deltaY","computeDeltaXY","offsetDirection","getDirection","start","end","overallVelocity","getVelocity","overallVelocityX","overallVelocityY","scale","rotation","getRotation","maxPointers","velocity","velocityX","velocityY","direction","last","lastInterval","v","computeIntervalInputData","srcEvent","computeInputData","emit","recognize","clientX","clientY","p1","p2","props","sqrt","atan2","PI","evEl","evTarget","evWin","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MOUSE_ELEMENT_EVENTS","MOUSE_WINDOW_EVENTS","MouseInput","pressed","button","pointerType","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","PointerEventInput","store","pointerEvents","MSPointerEvent","PointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","splice","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","SingleTouchInput","started","normalizeSingleTouches","all","touches","changed","changedTouches","TOUCH_INPUT_MAP","TOUCH_TARGET_EVENTS","TouchInput","targetIds","getTouches","allTouches","identifier","targetTouches","changedTargetTouches","filter","touch","DEDUP_TIMEOUT","TouchMouseInput","mouse","primaryTouch","lastTouches","recordTouches","eventData","setLastTouch","lastTouch","lts","isSyntheticEvent","dx","dy","inputEvent","inputData","isMouse","sourceCapabilities","firesTouchEvents","PREFIXED_TOUCH_ACTION","style","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MAP","touchMap","cssSupports","CSS","supports","getTouchActionProps","TouchAction","set","compute","actions","update","touchAction","recognizers","recognizer","getTouchAction","hasPanX","hasPanY","cleanTouchActions","join","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","STATE_POSSIBLE","STATE_FAILED","Recognizer","defaults","state","simultaneous","requireFail","stateStr","directionStr","getRecognizerByNameIfManager","otherRecognizer","get","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","count","Hammer","preset","Manager","handlers","oldCssProps","inputClass","toggleCssProps","item","add","recognizeWith","requireFailure","cssProps","dropRecognizeWith","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","reset","process","attrTest","optionPointers","isRecognized","isValid","threshold","directionTest","hasMoved","inOut","validPointers","validMovement","validTime","clearTimeout","taps","interval","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","VERSION","domEvents","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","stop","force","stopped","curRecognizer","existing","remove","on","events","off","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","triggerDomEvent","INPUT_MOVE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","Tap","Pan","Swipe","Pinch","Rotate","Press","define","_require","require","addClass","isInViewport","removeClass","scrollTo","errorTextTemplate","checkoutContainerEl","checkoutContainer","showClass","scrollToError","formEl","headerEl","headerHeight","offsetHeight","invalidEl","top","validateForm","valid","checkValidity","stopPropagation","stopImmediatePropagation","validity","clearForm","form","enableOrDisableButton","disabled","getValidationMessage","validationMessage","$this","patternMismatchValue","rangeErrorValue","missingErrorValue","badInputErrorValue","stepMismatchErrorValue","_this$validity","patternMismatch","rangeOverflow","rangeUnderflow","tooLong","tooShort","valueMissing","badInput","stepMismatch","onFormInvalidHandler","setCustomValidity","parents","text","onFormSubmit","validateInputs","getAddressValidationHandler","addressLengthLimit","addressForm","timeoutID","formHelpers","addressEl","loadFormErrors","toPrimitive","_toPrimitive","_toPropertyKey","defineProperty","enumerable","configurable","writable","invalid","ajaxFormInvalid","formElSelector","submit","ajaxFormSubmit","validateAddressForm","address1","address2","addressLimit","addressValidationHandler","validateCheckoutForm","guestCustomerForm","registeredCustomerForm","shippingForm","billingForm","submitShippingBtn","billingAddress","reauthForm","submitReauthBtn","spinner","submitCustomerBtn","submitCustomerLoginBtn","shippingAddress1","shippingAddress2","shippingAddressLimit","shippingAddressValidationHandler","billingAddress1","billingAddress2","billingAddressLimit","billingAddressValidationHandler","click","errorElement","shippingError","addressMode","customerType","innerHTML","giftMessageEl","submitPaymentBtn","isPaymentDisabled","isCreditTabActive","isNewPayment","isRequired","savedPaymentCvv","required","checkoutStage","link","enableFormSubmitButton","textContent","$form","isFieldsMatched","newFieldValue","confirmFieldValue","matchId","confirmEl","isFieldMatched","mismatchError","selectorContainer","notMatchedClass","matchedClass","thisValue","regexPattern","regexpattern","buttonClick","functions","debounce","SCROLLABLE_CONTENT_SELECTOR","initSpecificCarousel","scrollableContainerEl","parentEl","parentElement","leftArrowEl","left","max","scrollLeft","offsetWidth","behavior","rightArrowEl","scrollWidth","initCarousel","hasEtmc","_etmc","trackCart","trackPageView","trackWishlist","setUserInfo","startCoord","isTouchingCarousel","$window","$document","$body","activeClass","initScrollSlider","carousels","array","carousel","indicators","matchMedia","matches","slideItem","slideIndicatorPosition","offsetTop","relatedTarget","handleDesktopCarousel","initOnce","currentScrollPos","scrollY","pageYOffset","ticking","carouselIndicatorScroll","sliderContainer","sliderContainerOffsetTop","offsetParent","getOffsetTop","sliderContainerOffsetEnd","scrollDistance","getBoundingClientRect","activeIndex","some","scroll","requestAnimationFrame","handleCarouselOnScroll","ready","response","carouselIndicatorsElement","resize","throttle","pdpCarouselEl","minHeight","getNestedValue","currentCoord","coordsAreNumbers","cancelable","passive","SHIPPING_PREFERENCES_CONTAINER_SELECTOR","STORE_DETAIL_CONTAINER_SELECTOR","ISPU_PREFERENCE_CONTAINER_SELECTOR","ISPU_PREFERENCE_CONTENT_SELECTOR","ISPU_RADIO_SELECTOR","SHIP_TO_ADDRESS_RADIO_SELECTOR","STORE_DETAIL_SELECTOR","STORE_SERVICE_INFO_MESSAGE_SELECTOR","STORE_AVAILABILITY_MESSAGE_SELECTOR","ISPU_INFO_MESSAGE_SELECTOR","SHIP_TO_INFO_MESSAGE_SELECTOR","ISPU_SELECT_STYLE_MESSAGE_SELECTOR","DISABLED_CLASS","NOT_AVAILABLE_CLASS","ISPU_STORE_NAME_CLASS","PRE_ORDER_CLASS","SHIP_TO_LOW_INVENTORY_CLASS","ISPU_SERVICE_ERROR_ATTR_NAME","ISPU_SERVICE_BLOCKED","CHECKOUT_HIDDEN_CLASS","PDP_SET_PAGE","PRODUCT_DETAIL_CONTAINER_SELECTOR","PDP_CONTAINER_SELECTOR","PREFERENCE_SELECTOR","SHIP_TO_ADDRESS_CONTENT_SELECTOR","SHIPPING_PREFERENCE_RADIO_BUTTON_SELECTOR","RADIO_BUTTON_LABEL_SELECTOR","SHIPPING_PREFERENCE_KEY","ISPU_RADIO_VALUE","SHIP_TO_RADIO_VALUE","BOLT_PAY","CHANGE_STORE_LINK_SELECTOR","AVAILABILITY_MSG_SELECTOR","INVENTORY_MSG_SELECTOR","LOW_STOCK_ISPU_SELECTOR","WISHLIST_NAME_REGEX","TRACKER_FUNCTIONAL_COOKIE","LOYALTY_POSTAL_CODE_REGEX","MY_ACCOUNT","ORDER_CONFIRMATION","_require3","HIDDEN_CLASS","handleNotifyMe","getISPUradioButtonEl","productContainerEl","getShipToAddressContentEl","getShipToAddressradioButtonEl","getISPUPreferenceContentEl","addStoreNameClass","storeNameEl","removeStoreNameClass","getSelectedSizeEl","getChangeStoreLinkEl","getSelectedPreferenceEl","getShippingPreferencesContainerEl","selectISPURadioButton","ispuRadioButtonEl","enableISPUSection","checked","ispuContentEl","disableISPURadioButton","disableISPUSection","selectShipToRadioButton","shipToRadioButtonEl","enableShipToContent","shipToContentEl","disableShipToRadioButton","disableShipToContent","getPreferedShippingPreference","activeStoreFilter","updateVisibilityOfLowInventoryMsg","ispuLowStockEl","availabilityElement","ispuLowInventory","ispuLowInventoryMsg","notifyMeButton","notifyMeDesc","addToCartSection","selectedSizeElement","ispuProductInventory","masterId","isSetPage","selectedSizeValue","selectedColorId","variantGroupData","productInfo","variants","images","formattedPrice","selectedSizeData","isNotifyMeEnabled","ID","forceOutOfStock","productInventory","availabilityStatus","productData","available","imageData","ispu","getAvailableForInStorePickup","availableForInStorePickup","breakpoints","xs","sm","md","lg","xl","PREFERRED_STORE_ID","EMPTY_STRING","INVALID_CLASS","INVISIBLE_CLASS","NO_SCROLL_CLASS","IS_STICKY_CLASS","SELECTED_CLASS","PREORDER_STATUS","IN_STOCK_STATUS","NOT_AVAILABLE_STATUS","KEYCODE_TAB","KEYCODE_ESCAPE","KEYCODE_UP","KEYCODE_DOWN","loadScript","isAsync","Promise","resolve","script","async","onload","body","append","loadInput","referrerID","formElement","appendChild","getStyles","styles","getComputedStyle","_len","rules","_key","rule","NodeList","removeChild","removeAttribute","_len2","_key2","_el$classList","_node$classList","_len3","_key3","_el$classList2","_node$classList2","toggleClass","_len4","_key4","_el$classList3","_node$classList3","toggle","_len5","classes","_key5","every","className","limit","waitCallback","isThrottling","_len6","_key6","returnValue","_this","timer","minimumDelay","condition","unrestrictedCallback","_len7","_key7","_len8","_key8","newTarget","makeArray","outerHeight","marginTop","marginBottom","isInViewportCheck","boundsTop","numberOfViewportToCheck","nextViewportLazyLoad","viewport","innerHeight","bounds","clientHeight","rect","bottom","right","innerWidth","documentElement","clientWidth","emptyCart","cartElement","duration","getLastElementInRow","nextElementSibling","sibling","scrollHeight","previousElementSibling","updateUrlQueryParam","fragment","queryParamsElement","permaLink","history","pushState","path","newUrl","location","href","getCharacterCount","waitForElement","scope","reject","elements","observer","MutationObserver","mutations","disconnect","observe","childList","subtree","eventTypes","eventCondition","_options$bindEngine","bindEngine","_options$once","once","useJQuery","_options$targetSelect","targetSelectors","extraData","Element","jQuery","Event","targetElement","_targetElement","$element","getProductData","variationGroupId","originalPrice","productPrice","isPreorder","containerData","monetatePid","isQuickview","_window","wishlistId","productName","productSize","swatchName","colorCode","colorEl","swatchButton","attrDisplayvalue","tileEl","standardPrice","groupId","productNameEl","productSizeEl","valueId","originalPriceEl","pop","productPriceEl","productColorEl","productColor","matchesBreakpoint","breakpoint","getCSRFToken","token","renderFragment","html","template","content","getCookieMap","cookie","keyValue","_keyValue$trim$split2","decodeURIComponent","validateDate","monthSelector","dateSelector","validateDateOption","m","d","mlength","labelOption","Option","option","selected","_require$productDetai","selectStyleMessageTmpl","ispuSelectStyleMessageTmpl","isShippingPreferencesViewEnabled","toggleSelectSizeInfo","selectedSizeEl","availabilityMessageEl","selectStylesMessage","ispuAvailabilityMessageEl","isEarlyAccessElement","earlyAccess","isEarlyAccessItem","earlyAccessDate","earlyAccessUntilDate","getTime","notifyContainer","isPDPPage","mainImageEle","hiddenClass","notifyImageElement","alt","url","srcset","imageHasLoaded","notifySize","notifySizeSeperator","notifySelectedSize","custEmail","updatePLPTileHeight","cards","carouselImageHeight","maxHeight","height","quickView","quickViewModal","addToWishlist","addToWishlistModal","cart","errorMessage","cartAvailabilityMessageOOS","promo","shippingMethod","checkoutNormalShipping","checkoutDiscountShipping","checkout","discountPrice","swatchNameTemplate","swatchNameHtml","emptySwatchTemplate","addressSuggestions","suggestionTextTemplate","suggestionsTemplate","approachingDiscounts","discountContainerTemplate","singleDiscountTemplate","multipleDiscountsTemplate","nonCouponBasedAdjustmentTemplate","videoTemplate","_options$loop","loop","_options$videoUrl","videoUrl","_options$imgUrl","imgUrl","_options$classNames","classNames","_options$autoplay","autoplay","_options$muted","muted","_options$controls","controls","_options$icontitle","icontitle","_options$icondesc","icondesc","imageTemplate","altText","videoThumbnailTemplate","carouselId","imgs","videoThumbnailImage","sizeOptionTemplate","sizeButtonTemplate","variantData","ariaLabel","ariaDescribedby","selectedText","oosMessage","inStock","sizeSwatchNotAvailable","guestEmptyWishlistTemplate","emptyWishlistMessage","emptyWishlistContentAssetBody","emptySFL","emptySFLMessage","continueShopURL","continueShopMsg","signInMsg","signInSFLURL","gwpSizeTemplate","singleSize","multiSize","multiDefaultSizeOption","multiSizeOption","autoComplete","suggestionLink","suggestion","addressLine","secondaryEntryAddressLine","street_line","secondary","city","zipcode","suggestionContainer","containerClass","contactUsTemplate","signupMessage","status","msg","browserWarningTemplate","shippingPreferenceTemplates","shippingPreferences","ispuRadioLabel","ispuRadioValue","shipToRadioLabel","shipToRadioValue","changeStoreLabel","preferISPU","storeDetail","storeId","stateCode","postalCode","productDetail","availabilityMessageTmpl","restrictedMessageTmpl","availabilityMessageOOS","availabilityMessagePreorder","ispuAvailabilityMessageTmpl","ispuLowStockMessageTmpl","dialogTemplate","_options$buttons","buttons","primary","_options$className","_options$modalContent","modalContentHeading","_options$modalContent2","modalContentBody","_options$id","_options$slideOut","slideOut","buttonSpace","floor","oneTrust","privacyDialogCookieBanner","loyalty","carouselBadge","tokenize","string","leftToken","rightToken","operators","_","code","toKebabCase","roundPrice","gePrice","roundingRanges","rg","From","To","intPart","RangeBehavior","RoundingExceptions","LowerTarget","UpperTarget","Threshold","ExceptionValue","TargetBehaviorHelperValue","convertRangeToAbsolute","absoluteRounding","hashValue","JSON","stringify","startsWith","endsWith","substr","digit","charCodeAt","toDatasetKey","formatMessage","tokens","keyString","replaceValues","flag","appendToUrl","params","encodeURIComponent","getJSON","onSuccess","onError","ajax","dataType","success","error","geolocate","successCallback","mixin","errorCallback","geolocation","getCurrentPosition","coords","latitude","longitude","setItemInLocalStorage","localStorage","setItem","getItemFromLocalStorage","getItem","parse","removeItemFromLocalStorage","removeItem","formatPhoneNumber","cleave","isMobile","mobileAgentHash","idx","stickyScrollPosition","items","isTopOnly","topOffset","detailStickyScroll","itemHeight","windowHeight","newTop","setProperty","handleStickyPositionOnScroll","isUnsupportedBrowser","unsupportedBrowserTypes","sitePrefs","uaFragment","getTimeRemaining","endtime","seconds","minutes","hours","days","globaleCalculation","salesPrice","countryCurrency","currencySymbol","innerText","geSalesPrice","countryCoefficientIncludeVAT","countryVATRate","merchantTaxRate","currenyRate","coefficientRate","useCountryVAT","globaleRoundingRanges","scrollAnimate","parentSelector","fieldErrors","siblings","clearPreviousErrors","hide","setTabNextFocus","focusParams","firstFocusableEl","containerSelector","firstElementSelector","lastFocusableEl","lastElementSelector","is","nextToLastElementSelector","linkElements","shiftKey","focus","payload","fields","feedbackElement","children","prepend","animate","scrollTop","include","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","g","globalThis","Function","toStringTag","focusHelper","_require2","$gwpDialog","readyClass","selectedProductClass","notAvailable","_require4","loyaltyProfile","isLoyaltyProgramMember","isLoyaltyAuthenticated","isLoyaltyEnabled","isMcEnable","selectedSizeCTA","getPidValue","$el","getQuantitySelector","getQuantitySelected","updateAttrs","attrs","$productContainer","msgs","product","attrsWithSwatches","fitSizes","filteredValues","fitSizeLi","counter","elFitSizeContainer","fitSize","isDirectlyPurchasable","displayName","displayValue","selectable","show","isChoiceOfBonusProducts","$attrValue","$swatchButton","assistiveSelectedText","empty","bonusVariationUrl","removeAttr","processSwatchValues","$bonusProductItem","sizeContainer","loopStatus","resetUrl","selectLabel","selectId","sizeOptions","outOfStockMsg","outOfStock","productContainerEle","isPDPSetPage","css","li","selectedSize","variantID","manufacturerSKU","ssSize","insertAdjacentHTML","selectedSizeEle","processNonSwatchValues","updateOptions","$optionEl","handleEarlyAccessCta","isEarlyAccessProduct","earlyAccessLockIcon","earlyAccessWishlistIcon","earlyAccessCta","addToCartCta","earlyAccessPdpEl","earlyAccessGuest","earlyAccessRegistered","createCarousel","isEarlyAccess","displayCounter","pdpPageCarousels","pId","EGCPage","pdpCarouselClass","counterHtml","dataSrc","imageZoomUrl","imagePresetUrl","enableCache","includes","title","appendTo","addToWishlistIconPdp","loyaltyEarlyAccessEl","addToCartButtonPdp","loyaltyEarlyAccessLockContainer","firstImageElement","templateVideoElement","eachElement","load","detach","MagicZoom","handleVariantResponse","triggerColorAction","_response$product","variationAttributes","productType","readyToOrder","bonusVariationAtrributes","isFinalSale","videoFile","saleMessageEl","resources","sizeElements","primaryImageUrls","large","productImageElement","setModalImages","swatchNameElement","selectedSwatch","selectedSwatchName","swatchHtml","selectedSwatchElement","manufacturerID","$priceSelector","replaceWith","promotionElement","promotionsHtml","variantGroupId","swatchParam","queryParams","UpdatedParams","promotionsPopover","popover","placement","one","clickEvent","clicked","availabilityValue","availabilityMessages","availability","messages","availabilityMsgEl","notPurchasable","updateAvailability","attributes","attributeGroup","label","getAttributesHtml","_response$queryString","_variationAttributes$","fitSizeEle","requestedFitSize","queryString","param","fitSizeIncluded","attributeId","search","eachParam","replaceState","updateQuantities","quantities","optionsHtml","attributeSelect","selectedValueUrl","$choiceOfBonusProductEl","updatedimageSlideArrowPDP","carouselArrows","updateProductPrice","priceTemplate","priceSection","priceContainer","strikeThroughContainer","salesContainer","fixedPrice","fixedStandardPrice","toFixed","updateSizeElements","variantsList","quickviewProductInfo","_sizeContainer$datase","describedby","sizeButtonHtml","eachVariant","eachSize","sizeId","inventoryData","sizeswatchnotavailable","updateImageDetails","imageObj","srcsetPresets","srcsetString","imageScene7","parseHtml","$html","parseHTML","selectedProducts","footer","getOptions","$elOption","urlValue","selectedValueId","optionId","setControlsEnabled","control","methods","editBonusProducts","bonusUrl","bonusChoiceRuleBased","showProductsUrlRuleBased","showProductsUrlListBased","maxBonusItems","addToCartUrl","uuid","pliUUID","pageSize","bonusDiscountLineItems","parsedHtml","renderedTemplate","enterDialogMessage","insertAfter","selectedBonusProducts","modalDialog","selectedProductsCount","eachProductList","bonusAccordionContainer","maxCount","maxItems","productListLength","eachProduct","selectedProduct","selectBonusCheckbox","selectedIndex","productDialog","accordionContainer","bonusAccordionElements","addToCart","sizeEl","isSizeSelected","isSelectedSizeUnavailable","firstOption","isEnabled","validProducts","modal","chooseBonusProducts","updateProductDetails","currentElement","elementData","swatchContainer","assistiveElements","assistiveTextElement","monogramBtn","_productInfo$variants","shopThePrint","mgFlag","mgLocs","hasWaysToWear","colorElements","customPageTitle","pageTitle","includeLillyColor","lillyColorName","customPageDescription","pageDescription","titleElement","descriptionElement","waysToWearEl","variationGridUrl","colorlabel","colorLabel","longDescriptionElement","description","longDescription","lillyColor","productFinalSaleMessage","productFreeReturnsMessage","variationUrl","variationGroup","updateContentModules","shopThePrintElement","outerHTML","updateShopThePrint","ssColor","ssSizeElement","carouselContainerEl","carouselContainerHeight","wishlistButton","assistiveText","focusChooseBonusProductModal","onClosingChooseBonusProductModal","trapChooseBonusProductModalFocus","colorAttribute","productDetailContainer","selectedSizeBtn","notifyMeCTA","addToCartCTA","_productInfo$variants2","pdpBreadCrumbs","monetateData","updateQuickViewDetails","_data$product","selectColorAttribute","renderSizeElements","swatchEl","_productInfo$variants3","selectAttribute","currentTarget","pidsObj","setPids","setMasterPid","storeLocatoreContainer","ispuAddToCart","ispuModalContainer","isSet","triggerSSAddToCart","setModal","setProducts","qty","childProducts","displayModal","addToCartWarningDialog","isOnCartPage","pathname","redirectLink","messageHeading","messageBodyOnCart","messageBodyOffCart","messageType","handlePostCartAdd","productContainerPrice","selectBonusProduct","$choiceOfBonusProduct","maxPids","totalQty","choiceOfBonusProduct","selectedProductElement","bonusCountElement","selectedCount","enableAddTocart","optionID","selectedBonusProductHtml","removeBonusProduct","$selected","enableBonusProductSelection","bonusProductDialog","showMoreBonusProducts","addBonusProductsToCart","$readyToOrderBonusProducts","pidsObject","bonusProducts","qtyOption","reload","revealRecommendations","eachRecommendation","titleEl","productEl","scrollableContent","display","handleEarlyAccessPLPLockIcon","earlyAccessPLPContainer","earlyAccessPlpIcon","lockIconContainer","earlyAccessPLPBadge","sizeChartClasses","ACTIVE_CLASS","IN_STOCK","NOT_AVAILABLE","PREORDER","handleProductImageZoom","imageObserver","mutationList","_step","_iterator","_n","F","s","_createForOfIteratorHelper","mutation","addedNodes","zoomAlt","err","pdpImages","pdpIndicators","img","imageEl","zoomed","mobileZoomed","touchZoom","elm","thisHammer","transform","xPos","yPos","ceil","createTouchZoom","createHoverZoom","not","hiresUrl","zoom","magnify","onSizeChangeHandler","sizeDetailsContainer","selectedSizeErrMsg","assistiveElementOfSelected","_assistiveElementOfSe","updateQuickViewProductInfo","currentSizeElement","quickViewInfo","vgProductDetailsUrl","addToCartButton","productDetailsUrl","fullPDPLink","variantProductDetailsUrl","isLowInventory","selectedColorName","updateScarcityMessage","fitSizeScarcityLabel","ctaScarcityLabel","oosMsg","updateProductInfo","formattedStandardPrice","totalPrice","monogramProductPrice","ispuButton","restrictedMsg","restrictedItem","isGlobaleSession","scarcityMessage","ispuInventoryData","ispuMessage","ispuLowStockMessage","ispuAvailabilityStatus","isISPULowInventory","shippingPreferencesEnabled","ispuAvailabilityValue","ispuLowStockValue","lowStockAvailabilityMessage","breadcrumbItems","categoryUrl","lastElementChild","shipToAddressAvailabilityStatus","inStorePickUpAvailabilityStatus","isStorePickUpLowInventory","inStorePickUpAvailabilityMessage","inStorePickUpLowStockMessage","pickupImageElement","_ispu$","pickupSalesPrice","pickupStandardPrice","pickupSize","sizeSelected","ispuCheckBoxChecked","monogramImages","monogram","updatedImageData","updateFitSizeTab","fitSizeSelectableCount","fitSizeSelectableConatiner","sizeAccordionEle","fitSizeText","sizeText","fitSizeCount","selectableCount","firstAvailableFit","handleLastLinkTab","sizeChartCatBtn","_carouselInnerItem$ge","clickedContainerEle","carouselIndicatorsActivedImages","carouselIndicatorsActivedPips","carouselIndicatorsToBeActivedImages","carouselIndicatorsToBeActivedPips","carouselMzThumbSelected","carouselInnerItem","carouselItemImage","carouselMzZoomWindow","newImgSrc","newImgAlt","triggerHandler","imgEle","mzZoomImg","setDynamicHeight","scrollFitRatingToReviews","bvReviews","updateAttribute","_response$data$produc","gtmData","gtmGA4Data","eq","$addToCart","colorVariationObject","selectedSwatchObject","eachValue","$swatchSection","updateSelectedSwatchProductName","selectSizeAttribute","buttonElement","productTileItem","selectedColor","plpItemImage","notifyImageElementMarkup","sizeLabel","notifyForm","notifyConfirm","selectedColorElement","selectedColorIdValue","selectedSizeEleValue","attrUrl","availabilityEle","quickViewCarouselEl","afterAttributeSelect","wishListID","responseContainer","sizeCard","sizeSeparator","_assistiveElementOfSe2","quickviewContainer","sales","formatted","updateCartButton","giftWrapAvailableFlag","giftWrapAvailable","_ispu$2","ssColorElement","pricesObject","list","ssSalesPrice","ssPrice","productSetModal","addAllToToteButton","selectPdpSizeAttribute","allSelectableSwatches","updateAttributesAndDetails","attributesHtml","shortDescription","showSpinner","allAvailable","allReady","info_selectforstock","sizeChart","$prodSizeChart","$lpSlideout","activeCategoryVal","defaultText","setStickyNav","complete","$activeCategoryEl","$lpSizechartTitle","tab","lastLinkEl","handleEarlyAccessLockIcon","productContainerEarlyAccessIcon","earlyAccessItem","handleOflineProduct","offlineContainerEl","imgContainer","carouselIndicators","mainImageHeight","resizeTimeout","formValidation","giftCardContainerSelector","selectedClass","updateHiddenAmountField","giftCardContainer","amountHiddenInput","clearAmountErrorMessage","amountSelectionHandler","customAmountInput","inputOverlay","wishlistProductCard","addToToteButton","amountInputEnableHandler","amountInputHandler","disabledClass","pGiftCardContainer","selectedColorAttributeEl","attributesEl","invalidSwatchError","displaySwatchErrorMessage","actionUrl","wishlistCardItem","serialize","removedWishListItem","wishListCountMessage","updatedWishListCount","itemsMsg","shopNewAsset","selectedListDiv","detailsTabItemCount","listItemCount","emptyWishlistMarkup","wishlistCardItems","postAddToCart","setPid","_event","giftCardProductIdInputs","giftCardProductIdInput","pGiftCardForm","initializeEvents","processInclude","detail","giftCardDetail"],"sourceRoot":""}