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_afterpay_ext/cartridge/client/default/js/afterpay.js","webpack://app_custom_lilly_pulitzer/../link_googleanalytics/cartridges/link_googleanalytics/cartridge/client/default/js/util/analytics-util.js","webpack://app_custom_lilly_pulitzer/../link_googleanalytics/cartridges/link_googleanalytics/cartridge/client/default/js/util/constants.js","webpack://app_custom_lilly_pulitzer/../link_secretsauce/cartridges/link_secretsauce/cartridge/client/default/js/product/secretsauce.js","webpack://app_custom_lilly_pulitzer/../node_modules/.pnpm/hammerjs@2.0.8/node_modules/hammerjs/hammer.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/breakpoints.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/category/shopByPrint.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/category/shopByStyle.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/checkout/formErrors.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/clientSideValidation.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/components/carousel.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/components/etmc.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/components/shippingPreference/constants.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/components/shippingPreference/shippingPreferenceHelper.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/constants.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/domUtil.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/login/login.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/loyalty/loyaltyDrawer.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/popover.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/product/base.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/product/detail.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/product/helper.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/product/quickView.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/components/notifyMe.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/productTile.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/quickView/quickViewHelpers.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/templates.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/util.js","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/wishlist/helper.js","webpack://app_custom_lilly_pulitzer/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/checkout/formErrors.js","webpack://app_custom_lilly_pulitzer/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/errorNotification.js","webpack://app_custom_lilly_pulitzer/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/focus.js","webpack://app_custom_lilly_pulitzer/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/formValidation.js","webpack://app_custom_lilly_pulitzer/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/scrollAnimate.js","webpack://app_custom_lilly_pulitzer/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/login/login.js","webpack://app_custom_lilly_pulitzer/../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack://app_custom_lilly_pulitzer/webpack/bootstrap","webpack://app_custom_lilly_pulitzer/webpack/runtime/compat get default export","webpack://app_custom_lilly_pulitzer/webpack/runtime/define property getters","webpack://app_custom_lilly_pulitzer/webpack/runtime/hasOwnProperty shorthand","webpack://app_custom_lilly_pulitzer/webpack/runtime/make namespace object","webpack://app_custom_lilly_pulitzer/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/categoryLandingPage.js"],"sourcesContent":["'use strict';\n\nconst { getProductData, queryFirst, queryAll } = require('lilly/domUtil');\nconst { formatMessage } = require('lilly/util');\nconst afterpayTimeout = Date.now() + 5000;\n\n/**\n * Converts an array of selectors/elements to an array of elements (Uses queryAll to query selector strings)\n * @param {string|element|array} items A selector, element, or array of selectors/elements\n * @param {element|array} [scope] The scope(s) in which to search for elements\n * @returns {array} An array of elements\n */\nconst elementArray = (items, scope) => {\n if (!Array.isArray(items)) items = [items];\n if (!Array.isArray(scope)) scope = [scope || document];\n\n return items.reduce((results, item) => {\n if (typeof item === 'string') {\n scope.forEach(parent => {\n if (!!parent.matches && parent.matches(item)) {\n results.push(parent);\n } else {\n results = results.concat(queryAll(item, parent));\n }\n });\n } else {\n results.push(item);\n }\n\n return results;\n }, []);\n};\n\n/**\n * Initializes Afterpay messaging\n * @param {object} options Afterpay configuration options\n * @param {boolean} [options.alwaysShow] Whether the Afterpay messaging should always show, even when outside the threshold range (Default: true)\n * @param {string|element|array|NodeList} options.anchors The anchor element(s) referenced when rendering Afterpay messaging\n * @param {number} [options.price] The static price of the product in any format (if possible, use a priceTarget instead)\n * @param {string|element|array} options.observerTargets A selector, element or array of selectors/elements to observe for price changes and trigger Afterpay messaging updates (if a selector is passed, it will be queried relative to the anchor)\n * @param {string|element|array} options.priceTargets A selector, element or array of selectors/elements to use for price values. The \"value\" will be used if possible, or the innerText as a fallback\n * @param {string} [options.renderMode] The mode to use when rendering Afterpay messaging (E.g. adjacent, append, before, replace [Default: append])\n * @param {string|element} [options.renderTarget] The selector or element to use in conjunction with the renderMode (Defaults to the anchor)\n * @param {boolean} [options.showExcluded] Whether to show Afterpay messaging when a product is excluded\n * @param {object} [options.thresholds] The min/max thresholds to determine when Afterpay messaging shows (E.g. { min: 100, max: 1000 })\n * @param {string} [options.logoPosition] How to position the logo in Afterpay messaging (E.g. before, after [Default: after])\n */\nmodule.exports = function afterpay(options = {}) {\n let { alwaysShow = true, anchors, observerTargets, price, priceTargets, renderMode, renderTarget, showExcluded = true, thresholds = {}, logoPosition = 'after' } = options;\n\n // No anchors OR no observerTargets OR (no price AND no price targets)\n if (!anchors || !anchors.length || !observerTargets || !observerTargets.length || (!price && (!priceTargets || !priceTargets.length))) return false;\n\n // Waiting for Afterpay API\n if (!window.presentAfterpay) return (Date.now() >= afterpayTimeout) ? false : setTimeout(function (args) { afterpay.apply(this, args); }.bind(this, arguments), 250);\n\n // Anchors to array\n anchors = elementArray(anchors);\n\n // Missing anchor(s)\n if (!anchors.length) return false;\n\n // Afterpay preferences element\n const afterpayPrefsEl = document.getElementById('afterpayEnabled');\n\n // Afterpay is disabled\n if (!afterpayPrefsEl || afterpayPrefsEl.value !== 'true') return false;\n\n // Afterpay preferences data\n const afterpayPrefs = afterpayPrefsEl.dataset;\n\n // Base config\n const apConfig = {\n afterpayLogoColor: 'black',\n currency: 'USD',\n locale: 'en_US'\n };\n\n // Get product exclusions\n const exclusions = JSON.parse(afterpayPrefs.exclusions || '[]');\n\n // Threshold mixin\n if (thresholds) {\n const apThresholds = apConfig.minMaxThreshold = {};\n let { min, max } = thresholds;\n\n // Threshold fallbacks\n if (!min) min = afterpayPrefs.min;\n if (!max) max = afterpayPrefs.max;\n\n // Afterpay wants cents\n if (min) apThresholds.min = min * 100;\n if (max) apThresholds.max = max * 100;\n }\n\n /**\n * Updates the product price in an Afterpay config object\n * @param {object} config Afterpay config object\n * @param {*} price Price in any format\n */\n const updateAmount = (config, price) => {\n const stringValue = String(price);\n const isDecimalValue = ~stringValue.indexOf('.');\n const intValue = parseInt(stringValue.replace(/[^0-9]/g, '').trim(), 10);\n const amount = config.amount = intValue * (isDecimalValue ? 1 : 100);\n\n return amount;\n };\n\n /**\n * Gets the price target value for the given observer target\n * @param {element} observerTarget The observer target to search within\n * @returns {*} Returns the price, the price target's text content, or an empty string\n */\n const getPrice = observerTarget => {\n return (priceTargets ? elementArray(priceTargets, observerTarget) : [observerTarget]).reduce((value, element) => {\n if (value) return value;\n return element.value || element.innerText || '';\n }, '');\n };\n\n /**\n * Renders Afterpay messaging\n * @param {object} instance Afterpay instance\n * @param {element} anchor Anchor element\n * @param {string} [mode] Render mode (E.g. adjacent, append, before, replace [Default: append]) \n */\n const renderAfterpay = (instance, anchor, mode) => {\n const { config } = instance;\n const { amount, minMaxThreshold = {} } = config;\n const { min, max } = minMaxThreshold;\n const { utag_data: uData } = window;\n const notWithinThreshold = (min && min > amount) || (max && max < amount);\n const excluded = [];\n const hidden = 'hide';\n\n let excludedMessageKey = 'defaultExcludedMessage';\n let productElements = [anchor];\n\n // If this is the cart, we're displaying with the context of all products\n if (uData?.action?.split('-').shift().toLowerCase() === 'cart') {\n excludedMessageKey = 'excludedMessage';\n productElements = queryAll('#myTote .cart-product-line-item');\n }\n\n // Look for any exclusions\n productElements.forEach(element => {\n const { masterId, productName } = getProductData(element);\n\n if (~exclusions.indexOf(masterId) && !~excluded.indexOf(productName)) {\n excluded.push(productName);\n }\n });\n\n let renderMode = (!alwaysShow && notWithinThreshold) ? hidden : mode.toLowerCase();\n\n if (excluded.length && !showExcluded) {\n renderMode = hidden;\n }\n\n const afterpayNode = renderMode === hidden ? document.createElement('p') : instance.renderAfterpay();\n const afterpayMessage = queryFirst('span[class^=\"afterpay-text\"]', afterpayNode);\n\n if (afterpayMessage) {\n if (logoPosition === 'after') {\n const { parentElement } = afterpayMessage;\n\n parentElement.insertBefore(afterpayMessage, parentElement.firstChild);\n }\n\n if (excluded.length) {\n if (showExcluded) {\n const lastToken = excluded.pop();\n const tokenText = excluded.length ? `${excluded.join(', ')}${afterpayPrefs.excludedMultiSuffix} ${lastToken}` : lastToken;\n\n afterpayMessage.textContent = formatMessage(afterpayPrefs[excludedMessageKey], `${tokenText} `);\n }\n } else if (notWithinThreshold) {\n afterpayMessage.textContent = `${afterpayPrefs.notWithinThresholdMessage} `;\n }\n }\n\n const instanceNode = instance.afterpayNode;\n const target = (typeof renderTarget === 'string' ? queryFirst(renderTarget, anchor) : renderTarget) || anchor;\n\n instance.afterpayNode = afterpayNode;\n\n switch (renderMode) {\n case 'adjacent':\n return target.insertAdjacentElement('afterend', afterpayNode);\n\n case 'before':\n return target.parentElement.insertBefore(afterpayNode, target);\n\n case hidden:\n case 'replace':\n return instanceNode && instanceNode.parentElement && instanceNode.parentElement.replaceChild(afterpayNode, instanceNode);\n\n default:\n return target.appendChild(afterpayNode);\n }\n };\n\n [].slice.call(anchors, 0).forEach(anchor => {\n const instanceConfig = Object.assign({}, apConfig);\n const anchorObserverTargets = elementArray(observerTargets, anchor);\n\n if (price) {\n updateAmount(instanceConfig, price);\n } else {\n const priceValue = anchorObserverTargets.reduce((result, target) => {\n if (result) return result;\n return getPrice(target);\n }, 0);\n\n updateAmount(instanceConfig, priceValue);\n }\n\n if (isNaN(instanceConfig.amount)) return;\n\n const apInstance = new presentAfterpay(instanceConfig);\n const observer = new MutationObserver(mutations => {\n const { afterpayNode } = apInstance;\n\n if (!afterpayNode) return;\n\n updateAmount(apInstance.config, getPrice(mutations[0].target));\n renderAfterpay(apInstance, afterpayNode, 'replace');\n });\n\n anchorObserverTargets.forEach(target => {\n observer.observe(target, { childList: true, subtree: true });\n });\n\n renderAfterpay(apInstance, anchor, renderMode);\n });\n};\n","'use strict';\n\nconst { bind, queryAll, queryFirst, hasClass } = require('lilly/domUtil');\nconst { toDatasetKey, hashValue } = require('lilly/util');\nconst { VIEW_PROMO, SELECT_PROMO, SELECT_ITEM, VIEW_ITEM_LIST, ADD_TO_CART, P_PRODUCT_LIST_KEY, P_PROMO_NAME_KEY, P_PROMO_CREATIVE_NAME } = require('./constants');\n\n// Persisted Data Constants\nconst PERSISTED_DATA_NAME = 'utag_persisted';\nconst STORAGE_EXP_TIME = 30 * 60 * 1000; // 30 minutes\n\nconst gaInitKeyPrefix = 'ga-init';\nconst gaRetriggerFlag = 'gaRetrigger';\nconst gaFieldPipe = '|';\nconst customEventPattern = /\\W/;\n\n// Bindings registry\nif (!window.gaBindings) window.gaBindings = {};\nconst { gaBindings } = window;\n\n// A list of properties that, when set by the user, should be updated in the UDO.\n// More easily put, anything that you want an up-to-date value for, which would be\n// sent with ANY event type, should be in this list.\nconst UDOProperties = [\n 'logged_in_status',\n 'page_type',\n 'page_category',\n 'page_subcategory',\n 'product_id',\n 'product_name',\n 'product_color',\n 'product_category',\n 'product_variant',\n 'product_quantity',\n 'product_price',\n 'product_size',\n 'product_sku',\n 'product_original_price',\n 'variant_group',\n 'product_is_preorder',\n 'affiliation',\n 'product_badge'\n];\n\n// A list of properties that should be preserved as arrays, not converted to piped strings.\nconst UDOArrays = [\n 'product_id',\n 'product_name',\n 'product_color',\n 'product_category',\n 'product_variant',\n 'product_quantity',\n 'product_price',\n 'product_size',\n 'product_sku',\n 'product_original_price',\n 'promo_id',\n 'promo_name',\n 'promo_creative',\n 'promo_position',\n 'product_is_preorder',\n 'affiliation',\n 'product_list_id',\n 'product_list_name',\n 'product_list_price',\n 'product_list_position',\n 'product_list_original_price',\n 'product_badge',\n 'product_list_category',\n 'product_list_sku'\n];\n\n// A list of GA4 events (event_name) which should include promotional information if available.\n// begin_checkout and purchase also need this information, but are handled in the events themselves\nconst promoSensitiveEvents = [VIEW_PROMO, SELECT_PROMO, ADD_TO_CART];\n// a list of GA4 events (event_name) which should include product_list information if available\n// begin_checkout and purchase also need this information, but are handled in the events themselves\nconst productListSensitiveEvents = [VIEW_ITEM_LIST, SELECT_ITEM, ADD_TO_CART];\n\n/**\n * Normalizes analytics data to ensure consistency.\n * @param {*} fields - Analytics data\n * @returns {string} - Normalized analytics value\n * @example normalize(['a','b','c'], 1,2,3, 'x','y','z') // a|b|c|1|2|3|x|y|z\n */\nconst normalize = (...fields) =>\n fields\n .map(field => {\n if (!Array.isArray(field)) field = [field];\n\n return field\n .reduce((result, item) => {\n if (String(item) === '[object Object]') {\n result = result.concat(Object.values(item));\n } else if (Array.isArray(item)) {\n result = result.concat(normalize(item));\n } else {\n result.push(item);\n }\n\n return result;\n }, [])\n .map(text => (typeof text === 'undefined' ? '' : String(text).toLowerCase().trim()))\n .join(gaFieldPipe);\n })\n .join(gaFieldPipe);\n\n/**\n * Normalizes analytics data to ensure consistency.\n * @param {*} field - Analytics data\n * @returns {Array} - Normalized analytics array of values\n * @example normalizeArray(['A','b','C', true, false, ['X', 'Y', 3], 0]) // [\"a\", \"b\", \"c\", \"true\", \"false\", \"x|y|3\", \"0\"]\n */\nconst normalizeArray = field => {\n if (!Array.isArray(field)) field = [field];\n\n return field.map(value => normalize(value));\n};\n\n/**\n * Normalizes a value to a string or an array based on UDOArrays\n * @param {string} key The key whose value is being normalized\n * @param {*} value The value to be normalized\n * @returns {string|Array} Normalized array or string value\n */\nconst smartNormalize = (key, value) => (UDOArrays.includes(key) ? normalizeArray(value) : normalize(value));\n\n/**\n * Normalizes an analytics payload to ensure consistency, preserving UDO properties as arrays.\n * @param {Object} payload - Analytics data object\n * @returns {Object} - Normalized analytics object\n * @example normalizePayload({ event_category: \"SOME CATEGORY\", event_action: \"SOME ACTION\", event_label: undefined }) // { event_category: \"some category\", event_action: \"some action\", event_label: \"\" }\n */\nconst normalizePayload = payload =>\n Object.entries(payload).reduce((result, [key, value]) => {\n result[key] = smartNormalize(key, value);\n\n return result;\n }, {});\n\n/**\n * Retrieves contextual data about the page.\n * @param {element} srcElement - The element that triggered the event\n * @param {Object} [options={}] - options object from bindGA\n * @returns {Object} - Plain object keyed with custom dimensions\n */\nconst getPageContext = (srcElement, options = {}) => {\n const { utag_data: uData = {} } = window;\n let sectionSrcElement = srcElement;\n const dialog = srcElement.closest && srcElement.closest('.modal');\n\n // Dialogs should provide context into what triggered them\n if (dialog) {\n sectionSrcElement = $(dialog).data('srcElement') || srcElement;\n\n if (sectionSrcElement instanceof jQuery) {\n sectionSrcElement = sectionSrcElement[0] || srcElement;\n }\n }\n\n // Try to determine the page section & subsection\n let pageSection = 'content';\n let pageSubsection = '';\n\n if (sectionSrcElement && srcElement) {\n if (sectionSrcElement.closest) {\n // Section\n if (sectionSrcElement.closest('#minicart')) {\n pageSection = 'mini tote drawer';\n } else if (sectionSrcElement.closest('.recently-viewed')) {\n pageSection = 'recently viewed';\n } else if (sectionSrcElement.closest('.style-component-container')) {\n pageSection = 'pdp style component';\n } else if (sectionSrcElement.closest('.product-recommendations.ways-to-wear')) {\n pageSection = 'ways to wear';\n } else if (sectionSrcElement.closest('.recommendations.related-products')) {\n pageSection = 'related products';\n } else if (sectionSrcElement.closest('.shop-the-print')) {\n pageSection = 'shop the print';\n } else if (sectionSrcElement.closest('.full-suggestions')) {\n pageSection = 'search recommendations';\n } else if (sectionSrcElement.closest('.shop-the-print-tiles')) {\n pageSection = 'shop the print';\n } else if (sectionSrcElement.closest('.product-recommendations')) {\n pageSection = 'product recommendations';\n } else if (sectionSrcElement.closest('.shop-by-style')) {\n pageSection = 'clp filter product carousel';\n } else if (sectionSrcElement.closest('.category-landing-page .product-recommendations')) {\n pageSection = 'clp top product carousel';\n } else if (sectionSrcElement.closest('.refinement-bar')) {\n pageSection = 'filters';\n } else if (sectionSrcElement.closest('.main-nav')) {\n pageSection = 'main navigation';\n } else if (sectionSrcElement.closest('.product-grid-container')) {\n pageSection = 'product grid';\n } else if (sectionSrcElement.closest('.product-detail')) {\n pageSection = 'product details';\n } else if (sectionSrcElement.closest('.main-header')) {\n pageSection = 'header';\n } else if (sectionSrcElement.closest('footer')) {\n pageSection = 'footer';\n }\n }\n\n if (srcElement.closest) {\n // Subsection\n if (srcElement.closest('.quick-view-dialog')) {\n pageSubsection = 'quickview dialog';\n } else if (srcElement.closest('.quickview-container')) {\n pageSubsection = 'quickview inline';\n } else if (srcElement.closest('.wishlist-details-tab')) {\n pageSubsection = 'wishlist';\n }\n\n // page_subsection for cart nav/SFL\n const isCartPage = queryFirst('.cart-page');\n const cartNav = srcElement.closest('.cart-nav');\n const removeDialog = srcElement.closest('.remove-product-dialog'); // remove dialog is not within cart-nav\n if (isCartPage) {\n if (cartNav || removeDialog) {\n const selectedTab = queryFirst('.sfl-tabs-selected');\n pageSubsection = hasClass(selectedTab, 'save-for-later-tab') ? 'saved for later' : 'my tote';\n } else {\n // sfl disabled\n pageSubsection = 'my tote';\n }\n }\n }\n }\n\n let uaAttributes = {\n // Defaults only - these should be set at the bind level or in data attributes\n event_label: '',\n event_category: '',\n event_action: ''\n };\n\n // Remove UA defaults if the omitUADefaults option is true\n if (options.omitUADefaults) {\n uaAttributes = {};\n }\n\n return {\n page_section: pageSection,\n page_subsection: pageSubsection,\n\n // Set in Tealium TagHelper\n caching_enabled: uData.caching_enabled,\n logged_in_status: uData.user_loggedin_status,\n affiliation: uData.affiliation,\n loyalty_status: uData.loyalty_status,\n loyalty_program_member: uData.loyalty_program_member,\n page_name: document.title,\n page_type: uData.page_type,\n page_category: uData.page_category,\n page_subcategory: uData.page_subcategory,\n\n product_category: uData.product_category,\n product_color: uData.product_color,\n product_id: uData.product_id,\n product_original_price: uData.product_original_price,\n product_name: uData.product_name,\n product_price: uData.product_price,\n product_quantity: uData.product_quantity && uData.product_quantity.length ? uData.product_quantity : [1],\n product_size: uData.product_size,\n product_variant: uData.product_variant,\n product_badge: uData.product_badge,\n\n ...uaAttributes\n };\n};\n\n/**\n * Retrieves the requested data from the persisted data in Local Storage\n * @param {string|undefined} key - the key to pull -- otherwise the entire object will be returned.\n * @returns {string|Object|undefined} the value corresponding to the supplied key (if available), the entire object (if no key was given) or undefined (if no suitable value was found)\n */\nfunction getStoredDataLayerInfo(key) {\n const { localStorage } = window;\n const dataStr = localStorage.getItem(PERSISTED_DATA_NAME);\n if (!dataStr) return undefined;\n\n let data;\n try {\n data = JSON.parse(dataStr);\n } catch (e) {\n console.error(e);\n localStorage.removeItem(PERSISTED_DATA_NAME);\n return undefined;\n }\n\n // if there is no key, return the full data object.\n if (typeof key === 'undefined') return data;\n\n // if the key does not exist in the data, return undefined\n if (!(key in data)) return undefined;\n\n // check if the data is still valid\n const { value, timestamp } = data[key];\n const validUntil = timestamp + STORAGE_EXP_TIME;\n\n // if the data has expired, delete it, save back to local storage, and return undefined.\n if (validUntil < Date.now()) {\n delete data[key];\n localStorage.setItem(PERSISTED_DATA_NAME, JSON.stringify(data));\n return undefined;\n }\n\n return value;\n}\n\n/**\n * Persists the given data to Local Storage\n * @param {string} key - the key for this item\n * @param {string} value - the value for this item\n */\nfunction setStoredDataLayerInfo(key, value) {\n const { localStorage } = window;\n const data = getStoredDataLayerInfo() || {};\n data[key] = {\n value,\n timestamp: Date.now()\n };\n\n localStorage.setItem(PERSISTED_DATA_NAME, JSON.stringify(data));\n}\n\n/**\n * Stores any data that should be persisted from the payload in Local Storage\n * @param {Object} payload - The payload sent to Tealium\n */\nfunction storePersistentData(payload) {\n const { event_name: eventName, category_id: productList, promo_name: promoName, promo_creative: promoCreative } = payload;\n\n if (promoName && !Array.isArray(promoName)) {\n console.warn(`promo_name for event ${eventName} is not an array!`);\n }\n\n if (eventName === VIEW_ITEM_LIST && productList) setStoredDataLayerInfo(P_PRODUCT_LIST_KEY, productList);\n if (eventName === SELECT_PROMO && promoName) setStoredDataLayerInfo(P_PROMO_NAME_KEY, promoName);\n if (eventName === SELECT_PROMO && promoCreative) setStoredDataLayerInfo(P_PROMO_CREATIVE_NAME, promoCreative);\n}\n\n/**\n * Sends an event to GA\n * @param {Object} data - The data to send (usually contains an event_category, event_action, and event_label)\n * @param {string} eventType - The type of event to send (e.g. link, view, etc)\n * @returns {Promise} a Promise\n */\nfunction sendEventGA(data, eventType = 'link') {\n return new Promise((resolve, reject) => {\n const { utag } = window;\n\n if (utag && typeof utag[eventType] === 'function') {\n utag[eventType](data, () => {\n resolve();\n });\n } else {\n reject(new Error(`utag is missing or utag.${eventType} does not exist`));\n }\n });\n}\n\n/**\n * Sends a GA event with context and normalized payload options\n * @param {Object} data - the baseline payload to send\n * @param {HTMLElement} [contextElem] - The element to reference for context (typically the element with which the user interacted). Default: first container in main-content.\n * @param {string} [eventType='link'] - The type of event to send (e.g. link, view, etc)\n * @param {boolean} [normalizeData=true] - whether to run the payload through the normalization function\n * @returns {Promise} a promise\n */\nfunction sendEventGAWithContext(data, contextElem = queryFirst('#main-content > .container'), eventType = 'link', normalizeData = true) {\n // omit UA defaults by default -- we shouldn't be using any UA properties anymore\n const pageContext = getPageContext(contextElem, { omitUADefaults: true });\n\n // merge context and data, data gets precedence\n let payload = Object.assign({}, pageContext, data);\n\n if (normalizeData) {\n payload = normalizePayload(payload);\n }\n\n return sendEventGA(payload, eventType);\n}\n\n/**\n * Sets up a middleware GA handler for an element\n * @param {Element} elements - The element to bind to\n * @param {Object|function} data - The data to send to GA or a callback that returns the data to send\n * @param {Object} [options={}] - Additional options to configure the event binding\n * @param {Object} [options.bindOptions={}] - Options passed to the bind method as its options parameter\n * @param {function} [options.callback] - Callback to run after the event is triggered and data is sent to GA\n * @param {string} [options.eventType='click'] - The type of event to listen for (E.g. click, change, etc)\n * @param {function} [options.eventCondition] - A function that runs when the event is triggered, but before the data is sent to GA. Returning false will abort sending data to GA.\n * @param {boolean} [options.isCustomEvent=false] - Whether the event is custom. Event types containing non-word characters are flagged custom. Custom events are bound using jQuery.\n * @param {boolean} [options.normalize=true] - Whether the data payload should be normalized.\n * @param {boolean} [options.retriggerEvent=true] - Whether to retrigger the original event, after sending data to GA. Usually you don't want to retrigger custom events.\n * @param {boolean} [options.usesContext=true] - Whether to mix page context in with the data payload.\n * @param {boolean} [options.usesDataset=true] - Whether to pull event category, action and label from from the element's dataset.\n * @param {boolean} [options.updatesUDO=true] - Whether the Universal Data Object should be updated with any applicable values from the data payload after it is sent to GA.\n * @param {boolean} [options.omitUADefaults=false] - Whether UA/360 attributes should be omitted when adding default values to this event. If false, event label, action, and category will be added.\n */\nfunction bindGA(elements, data, options = {}) {\n const {\n bindOptions = {},\n callback,\n eventType = 'click',\n eventCondition,\n isCustomEvent = false,\n normalize: usesNormalize = true,\n retriggerEvent = true,\n usesContext = true,\n usesDataset = true,\n updatesUDO = true,\n gaEventType = 'link',\n omitUADefaults = false\n } = options;\n\n const { utag_data: uData } = window;\n\n let nodeList = elements;\n\n // Convert NodeList to array\n if (elements instanceof NodeList) {\n nodeList = [].slice.call(elements, 0);\n } else if (!Array.isArray(elements)) {\n nodeList = [elements];\n }\n\n // Default once to false (GA will filter duplicates per Shelly)\n if (typeof bindOptions.once !== 'boolean') {\n bindOptions.once = false;\n }\n\n if (typeof bindOptions.eventCondition !== 'function') {\n bindOptions.eventCondition = eventCondition;\n }\n\n // Custom events are bound with jQuery\n if (isCustomEvent || customEventPattern.test(eventType)) {\n bindOptions.bindEngine = 'jQuery';\n }\n\n const initFlag = [gaInitKeyPrefix, eventType, toDatasetKey(bindOptions.targetSelectors || 'root'), hashValue(data)].join('-');\n\n nodeList.forEach(element => {\n const binding = gaBindings[initFlag];\n const isRebind = binding && binding.includes(element);\n\n if (element && !isRebind) {\n // Register this binding to the element\n if (!binding) gaBindings[initFlag] = [];\n\n gaBindings[initFlag].push(element);\n\n bind(\n element,\n eventType,\n (e, target) => {\n // Don't retrigger if we're holding down a modifier key, since we cannot retrigger using modifiers without user interaction\n const willRetrigger = retriggerEvent && !e.ctrlKey && !e.shiftKey;\n\n // Ignore clicks triggered by bindGA\n if (e.gaRetriggered || (target.dataset && target.dataset[gaRetriggerFlag] === initFlag)) {\n e.gaRetriggered = true;\n\n if (target.dataset) {\n delete target.dataset[gaRetriggerFlag];\n }\n\n return;\n }\n\n const tagPayload = {};\n\n // Pull the payload from the target element dataset\n if (usesDataset && target.dataset) {\n const { eventCategory, eventAction, eventLabel } = target.dataset;\n\n tagPayload.event_category = eventCategory;\n tagPayload.event_action = eventAction;\n tagPayload.event_label = eventLabel;\n }\n\n // Get the bindGA payload\n const bindPayload = typeof data === 'function' ? data(element, target, e, tagPayload) : data;\n\n // Trigger was aborted by callback\n if (bindPayload === false) {\n return;\n }\n\n // if event is promo or product list sensitive, add that data to tagPayload\n const { event_name: eventName } = bindPayload;\n if (eventName) {\n if (promoSensitiveEvents.includes(eventName)) {\n const promoName = getStoredDataLayerInfo(P_PROMO_NAME_KEY);\n if (promoName) Object.assign(tagPayload, { promo_name: promoName });\n }\n\n if (productListSensitiveEvents.includes(eventName)) {\n const productListName = getStoredDataLayerInfo(P_PRODUCT_LIST_KEY);\n if (productListName) Object.assign(tagPayload, { product_list: productListName, product_list_category: [productListName] });\n }\n if (promoSensitiveEvents.includes(eventName)) {\n const promoCreativeName = getStoredDataLayerInfo(P_PROMO_CREATIVE_NAME);\n if (promoCreativeName) Object.assign(tagPayload, { promo_creative: promoCreativeName });\n }\n }\n\n // Merge payloads (bindGA data takes priority)\n let payload = Object.assign({}, tagPayload, bindPayload);\n\n // Stop everything until we re-trigger\n if (willRetrigger) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n // Common page context\n const pageContext = getPageContext(target, options);\n\n if (usesContext) {\n payload = Object.assign({}, pageContext, payload);\n }\n\n // Remove product data from promo events - PT-11362\n if ([VIEW_PROMO, SELECT_PROMO].includes(eventName)) {\n payload = Object.fromEntries(Object.entries(payload).filter(([key]) => !/^product_/.test(key)));\n }\n\n // Preserved UDO Properties\n // Any properties beginning with double underscore (__) will be sent with the payload,\n // but will be reverted in the UDO after sending\n const preservedUDOProperties = Object.keys(payload).reduce((result, key) => {\n if (key.substring(0, 2) !== '__') return result;\n\n const property = key.slice(2);\n payload[property] = payload[key];\n delete payload[key];\n result[property] = uData[property];\n return result;\n }, {});\n\n // Do we have any lazy UDO updates?\n const lazyUDOProperties = Object.keys(payload).reduce((result, key) => {\n if (key.charAt(0) !== '_') return result;\n\n const property = key.slice(1);\n payload[property] = payload[key];\n result.push(property);\n delete payload[key];\n\n return result;\n }, []);\n\n // Normalize all values\n if (usesNormalize) {\n payload = normalizePayload(payload);\n }\n\n // If this updates the UDO, store the updates.\n // The UDO will be updated after the payload is sent.\n const UDOUpdates = updatesUDO\n ? Object.keys(payload).reduce((result, key) => {\n // UDO properties only\n if (!UDOProperties.includes(key)) return result;\n\n // Store the updated value\n result[key] = payload[key];\n\n // For lazy properties, send the old UDO value in the payload. We'll update after.\n if (lazyUDOProperties.includes(key)) {\n payload[key] = usesNormalize ? smartNormalize(key, uData[key]) : uData[key];\n }\n\n return result;\n }, {})\n : {};\n\n storePersistentData(payload);\n\n sendEventGA(payload, gaEventType).finally(() => {\n if (typeof callback === 'function') callback(element, target, e);\n\n if (willRetrigger) {\n target.dataset[gaRetriggerFlag] = initFlag;\n\n // Without a teeny tiny timeout our click gets trapped\n setTimeout(() => {\n try {\n target[eventType]();\n } catch (e) {\n $(target).trigger(eventType);\n }\n }, 0);\n }\n\n // Update Tealium UDO\n // This can only happen if we're updating the MAIN product,\n // not another product on the same page (E.g. quickview, recommendations, etc)\n if (updatesUDO && pageContext.page_section === 'product details') {\n // Product sets need to be updated based on index\n if (pageContext.page_type === 'product set') {\n const productSetItem = target.closest('.product-set-item');\n const productSetItems = queryAll('.product-set-item', target.closest('.product-set-detail'));\n const productSetIndex = productSetItems.indexOf(productSetItem);\n\n if (productSetIndex !== -1) {\n Object.keys(UDOUpdates).forEach(key => {\n const value = UDOUpdates[key];\n\n if (UDOArrays.includes(key)) {\n if (!uData[key]) uData[key] = new Array(productSetItems.length).fill('');\n if (!Array.isArray(uData[key])) uData[key] = String(uData[key]).split(gaFieldPipe);\n\n if (~String(value).indexOf(gaFieldPipe)) {\n uData[key][productSetIndex] = String(value).split(gaFieldPipe)[productSetIndex] || '';\n } else {\n uData[key][productSetIndex] = normalize(value);\n }\n } else {\n uData[key] = value;\n }\n });\n }\n } else {\n Object.keys(UDOUpdates).forEach(key => {\n const value = UDOUpdates[key];\n\n uData[key] = Array.isArray(value) ? value : [value];\n });\n }\n }\n\n // Restore preserved UDO property values\n if (Object.keys(preservedUDOProperties).length) {\n Object.assign(uData, preservedUDOProperties);\n }\n });\n },\n bindOptions\n );\n } else if (isRebind) {\n console.warn('WARNING: Attempted duplicate', eventType, 'binding on', element);\n }\n });\n}\n\n/**\n * Gets the text node content of an element\n * @param {HTMLElement} elem - The element whose text node content will be returned\n * @returns {String} The content of the text node or empty string if no text node is found\n */\nfunction getText(elem) {\n const textNode = [...elem.childNodes].find(child => child.nodeType === Node.TEXT_NODE);\n return (textNode && textNode.textContent.trim().replace(/\\s+/g, ' ')) || '';\n}\n\nmodule.exports = {\n bindGA,\n sendEventGA,\n sendEventGAWithContext,\n getPageContext,\n normalize,\n normalizePayload,\n delimiter: gaFieldPipe,\n getText,\n storePersistentData,\n getStoredDataLayerInfo\n};\n","module.exports = {\n // Asset Ids\n EXCLUSIVE_EXPERIENCES_TOOLTIP_CID: 'loyalty-dashboard-exclusive-experiences-tool-tip',\n REWARDS_TOOLTIP_CID: 'loyalty-dashboard-rewards-tool-tip',\n OFFERS_TOOLTIP_CID: 'loyalty-dashboard-offers-tool-tip',\n BENEFITS_TOOLTIP_CID: 'loyalty-dashboard-benefits-tool-tip',\n TELL_A_FRIEND_TOOLTIP_CID: 'loyalty-dashboard-tell-a-friend-tool-tip',\n STYLE_QUIZ_TOOLTIP_CID: 'loyalty-dashboard-style-quiz-tool-tip',\n MEMBERSHIP_FAQ_TOOLTIP_CID: 'loyalty-dashboard-faq-tool-tip',\n\n // Selectors\n TOOL_TIP_CONTENT: '.tool-tip-content',\n LOYALTY_TOOLTIP_ICON: '.loyalty-tooltip-icon',\n ANALYTIC_EVENT_CLASS: '.analytic-event-class',\n BENEFIT_MODAL_CLOSE_ICON: '.benefit-detail-modal .close',\n BENEFIT_DETAIL_MODAL: '.benefit-detail-dialog',\n BENEFIT_SWATCH_THUMBNAIL_MODAL: '.img-wallpaper',\n BENEFIT_SWATCH_TITLE: '.title-text',\n DOWNLOAD_SWATCH_CTA: '.download-cta',\n GO_TO_ACCOUNT_CTA: '.go-to-my-account-btn',\n BENEFIT_SWATCH_TAB: '.tab-pane.active',\n REFER_FRIEND_CTA: '.loyalty-referral-drawer-link',\n REFER_FRIEND_CTA_LINK: '.referral-cta-link',\n REFER_FRIEND_TEXT_FIELD: '.referral-link',\n STYLE_QUIZ_PENDING_QUIZ: '.finished-quiz',\n MEMBERSHIP_LOYALTY_EXPAND_COLLAPSE_CTA: '.membership-loyalty-expand-collapse',\n MEMBERSHIP_LOYALTY_EXPAND_COLLAPSE_ALL_CTA: '.membership-loyalty-expand-all',\n MEMBERSHIP_FAQ_TERMS_AND_CONDITION_LINK: '.loyalty-terms-and-conditions .faq-link',\n EXCLUSIVE_ARROW_RIGHT: '.exclusive-carousel .chevron-right',\n EXCLUSIVE_ARROW_LEFT: '.exclusive-carousel .chevron-left',\n EXCLUSIVE_PIP: '.exclusive-carousel .pip-content',\n ARROW_CLICKS: 'arrow clicks',\n EXCLUSIVE_PIP_ACTION: 'pip',\n MODULE_CHANGE: 'module change',\n ARROW_NEXT: 'next',\n ARROW_PREVIOUS: 'previous',\n EXCLUSIVE_VIEWALL: '.exclusive-dashboard-section .view-all-label',\n EXCLUSIVE_EXPERIENCE_CTA: '.cta-styling',\n EXCLUSIVE_RIGHT_SECTION: '.exclusive-right-section',\n EXCLUSIVE_CONTENT_SLOTS_CLICK: 'content slots click',\n EXCLUSIVE_SELECT_CONTENT: 'select_content',\n EXCLUSIVE_EXPERIENCE_NAME: 'exclusive experience name',\n EXCLUSIVE_CLICK_TO_VIEWALL: 'click to view all',\n EXCLUSIVE_VIEWALL_EXCLUSIVE_EXPERIENCES: 'view all exclusive experiences',\n EXCLUSIVE_TOOLTIP: '.exclusive-dashboard-section .custom-info-icon',\n REFER_FRIEND_TOOLTIP: '.refer-dashboard-section .custom-info-icon',\n EXCLUSIVE_OPEN_TOOLTIP: 'open tooltip',\n HOW_TO_EARN_LINK: '.loyalty-how-to-earn-drawer-link',\n VIEW_POINT_ACTIVITY_CTA: '.view-point-activity-cta',\n REWARD_START_SHOPPING: '.reward-start-shopping',\n REWARD_VIEW_CODE_CTA: '.view-code-cta',\n VOUCHER_MODAL_CLOSE_CTA: '.loyalty-reward-in-store-dialog .close',\n OFFER_FLIP_CARD_CTA: '.flip-card-front',\n VIEW_COPY_CODE_CTA: '.view-copy-code-cta',\n OFFER_DETAIL_CLOSE: '.offer-detail-modal .close',\n BONUS_POINTS_DAY: 'Bonus points day',\n EARLY_ACCESS: 'Early Access: New Fall Arrivals',\n LOYALTY_PROGRAM_MODAL: '#loyalty-program-modal .close',\n LOYALTY_ACCOUNT_CARD: '.loyalty-card-dropdown-cta',\n VIEW_LOYALTY_DASHBOARD: '.view-dashboard',\n LOYALTY_DRAWER_LINK: '.loyalty-program-drawer-link',\n LOYALTY_OPT_IN_CHECKBOX: '.add-to-loyalty-program-checkbox',\n ORDER_CONFIRM_REGISTER_MODAL: '.loyalty-order-confirmation-container.show',\n ORDER_CONFIRM_GUEST_ELEMENT: '.order-confirm-loyalty-guest-content',\n CREATE_ACCOUNT_ORDER_CONFIRM: '.create-loyalty-account-btn',\n LOYALTY_NEXT_BUTTON: '.loyalty-welcome-cta',\n CLOSE_WELCOME_MODAL: '.loyalty-welcome-dialog .close-enrollnow-model',\n CLOSE_ENROLL_NOW_MODAL: '.loyalty-enrollnow-dialog .close-enrollnow-model',\n ENROLL_LOYALTY_CTA: '.loyalty-enroll-cta',\n GUEST_LOYALTY_ENROLL: '.guest-create-and-enroll',\n STYLE_QUIZ_START_CTA: '.style-quiz-start-cta',\n STYLE_QUIZ_GO_TO_DASHBOARD: '.style-quiz-go-to-dashboard',\n SWATCH_SELECTION_WRAPPER: '.js-swatch-selection-wrapper .swatch-container',\n NEXT_QUESTION_CTA: '.loyalty-next-question-cta',\n PREVIOUS_QUESTION_CTA: '.loyalty-previous-question-cta',\n SUBMIT_QUIZ_CTA: '.loyalty-submit-quiz-cta',\n SKIP_THIS_QUESTION_CTA: '.loyalty-skip-question-cta',\n FINISH_LATER_CTA: '.loyalty-finish-later-cta',\n START_SHOPPING_CTA: '.style-quiz-start-shopping-cta',\n CONTENT_SLOT_SELECTORS: [\n '.content-module',\n '.promo-asset',\n '.promo-default',\n '.product-recommendations.ways-to-wear',\n '.curalate-content',\n '.product-detail .shop-the-print',\n '.style-component-container',\n '.sfl-empty',\n '.homepage .recommendations .product-listing',\n '.is-recommendation-carousel',\n '.blog-posts-item'\n ],\n\n // GA Event category, label, action, page name strings\n LOYALTY_BENEFIT_LABEL: 'loyalty benefits',\n LOYALTY_ANNUAL_GIFT_ID: 'annual-member-gift',\n ANNUAL_GIFT_LABEL: 'Annual Member',\n LOYALTY_BIRTHDAY_TREAT_LABEL: 'birthday treat',\n LOYALTY_DIGITAL_WALLPAPER_LABEL: 'digital wallpaper',\n MODAL_CLOSE_LABEL: 'close',\n MODAL_VOUCHER_CLOSE_LABEL: 'close modal',\n MODAL_SELECTED_LABEL: 'select',\n MODAL_DOWNLOAD_LABEL: 'download',\n CLICK_EVENT_ACTION: 'click',\n SHARE_EVENT_ACTION: 'share link',\n LOYALTY_DASHBOARD_LABEL: 'loyalty dashboard',\n LOYALTY_BENEFIT_TOOLTIP_LABEL: 'benefits tooltip',\n BENEFIT_LABEL: 'benefits',\n LOYALTY_EXCLUSIVE_EXPERIENCE_TOOLTIP_LABEL: 'exclusive experiences tooltip',\n LOYALTY_EXCLUSIVE_EXPERIENCE_LABEL: 'exclusive experiences',\n LOYALTY_MEMBERSHIP_FAQ_TOOLTIP_LABEL: 'membership faq tooltip',\n TOOLTIP_LABEL: 'tooltip',\n OPEN_TOOLTIP_LABEL: 'open tooltip',\n CLOSE_TOOLTIP_LABEL: 'close tooltip',\n STYLE_QUIZ_TOOLTIP_LABEL: 'style quiz tooltip',\n STYLE_QUIZ_PAGE_SECTION: 'style quiz',\n LOYALTY_REFER_A_FRIEND_SECTION: 'content or footer',\n LOYALTY_MEMBERSHIP_FAQ_SECTION: 'membership faq',\n LOYALTY_MODAL_PAGE_SUBSECTION: 'web pop up',\n LOYALTY_REFER_A_FRIEND_LABEL_SECTION: 'refer a friend',\n LOYALTY_REFER_A_FRIEND_TOOLTIP: 'refer a friend tooltip',\n LOYALTY_EVENT_LABEL: 'finish your quiz',\n MEMBERSHIP_FAQ_EXPAND_COLLAPSE_ACTION: 'expand question or collapse question',\n MEMBERSHIP_FAQ_EXPAND_COLLAPSE_ALL_ACTION: 'expand all',\n MEMBERSHIP_FAQ_TERMS_AND_CONDITION_LABEL: 'loyalty t&c link',\n REWARDS_TOOLTIP_LABEL: 'rewards tooltip',\n REWARDS_PAGE_SECTION_LABEL: 'rewards',\n EVENT_CLICK_LINK_ACTION: 'click link',\n REWARDS_HOW_TO_EARN_EVENT_LABEL: 'how to earn',\n REWARDS_VIEW_POINT_ACTIVITY_LABEL: 'view points activity',\n REWARDS_START_SHOPPING_LABEL: 'start shopping',\n REWARDS_VIEW_CODE_ACTION: 'click to view',\n REWARDS_VIEW_CODE_LABEL: 'reward vouchers code',\n REWARDS_VOUCHER_MODAL: 'voucher modal',\n REWARDS_VOUCHER_LABEL: 'voucher',\n REWARDS_VOUCHER_PAGE_SECTION: 'modal',\n OFFER_TOOLTIP_LABEL: 'offers tooltip',\n OFFER_PAGE_SECTION: 'offers',\n TAP_TO_REVEAL_ACTION: 'tap to reveal',\n VIEW_AND_OFFER_CODE_CTA: 'view and copy offer code',\n OFFER_CLOSE_EVENT_LABEL: 'offer modal',\n LOYALTY_PROGRAM_LABEL: 'loyalty',\n LOYALTY_PROGRAM_ACTION: 'initiate enrollment',\n LOYALTY_PROGRAM_SUCCESS_ENROLL: 'successful enrollment',\n ENROLL_LOYALTY: 'start enroll',\n LOYALTY_DASHBOARD_ACTION: 'dashboard',\n OPEN_LABEL: 'open',\n MY_ACCOUNT_NAME: 'my account',\n ACCOUNT_PAGE_TYPE: 'account',\n MY_ACCOUNT_TAB: 'account tab',\n LOYALTY_PROGRAM_DETAILS: 'program details',\n LOYALTY_OPT_IN_ACTION: 'opt-in',\n LOYALTY_OPT_IN_CHECKBOX_SELECT_ACTION: 'select',\n LOYALTY_OPT_IN_CHECKBOX_DESELECT_ACTION: 'deselect',\n ACCOUNT_SIGN_IN_CATEGORY: 'account sign in',\n CREATE_AN_ACCOUNT_ACTION: 'create an account',\n SUBMIT_LOYALTY_OPT_IN: 'submit|opt-in loyalty:true',\n SUBMIT_LOYALTY_NOT_OPT_IN: 'submit|opt-in loyalty:false',\n LOYALTY_PROGRAM_WELCOME: 'welcome',\n LOYALTY_PROGRAM_ENROLLMENT: 'enrollment',\n LOYALTY_PROGRAM_ENROLL_SUCCESS: 'enroll:success',\n LOYALTY_STYLE_QUIZ_LABEL: 'loyalty style quiz',\n LOYALTY_STYLE_QUIZ_GET_STARTED_ACTION: 'get started',\n LOYALTY_STYLE_QUIZ_GO_TO_DASHBOARD: 'go to dashboard',\n LOYALTY_STYLE_QUIZ_PAGE_NAME: 'style quiz|cover',\n LOYALTY_STYLE_QUIZ_QUESTION: 'style quiz|q',\n OPTION_SELECTED: 'select',\n OPTION_DESELECTED: 'deselect',\n STYLE_QUIZ_NEXT_CTA: 'next',\n STYLE_QUIZ_PREVIOUS_CTA: 'previous',\n STYLE_QUIZ_SUBMIT_CTA: 'submit',\n STYLE_QUIZ_SKIP_THIS_QUESTION_CTA: 'skip',\n STYLE_QUIZ_FINISH_LATER: 'finish later',\n START_SHOPPING: 'start shopping',\n STYLE_QUIZ_THANK_YOU_PAGE: 'style quiz|thank you',\n PDP_SELECTIONS: 'pdp selections',\n PDP_INTERACTION: 'pdp_interaction',\n CHANGE_STORE: 'change store',\n VIEW_PROMO: 'view_promotion',\n SELECT_PROMO: 'select_promotion',\n VIEW_ITEM_LIST: 'view_item_list',\n VIEW_ITEM: 'view_item',\n SELECT_ITEM: 'select_item',\n SIGN_IN_OR_CREATE_ACCOUNT_ACTION: 'sign in or create account',\n START_LABEL: 'start',\n PDP_PAGE_NAME: 'pdp',\n PRODUCT_PAGE_TYPE: 'product',\n CREATE_ACCOUNT_ACTION: 'create account',\n SUBMIT_EVENT_LABEL: 'submit or success or failure',\n JOIN_CLUB_LILLY_EVENT: 'join club lilly',\n INITIATE_ACTION: 'initiate',\n LOYALTY_ENROLLMENT_CATEGORY: 'loyalty enrollment',\n ACCOUNT_DASHBOARD_PAGE: 'account dashboard',\n GET_DIRECTIONS: 'get directions',\n STORE_INTERACTION: 'store_interaction',\n ADD_TO_CART: 'add_to_cart',\n\n LOYALTY_VIEW_VOUCHER_CODE_LABEL: 'view voucher code',\n REWARDS_POINT_ACTIVITY_LABEL: 'points activity',\n REWARDS_SHOP_TAB_LABEL: 'shop tab',\n\n SHARED_WISHLIST_CREATE_ACCOUNT_CATEGORY: 'account sign in',\n SHARED_WISHLIST_CREATE_ACCOUNT_ACTION: 'sign in or create account',\n SHARED_WISHLIST_CREATE_ACCOUNT_LABEL: 'start',\n SHARED_WISHLIST_PAGE_SUBSECTION: 'wishlist',\n SHARED_WISHLIST_NON_LOYALTY_CATEGORY: 'loyalty enrollment',\n SHARED_WISHLIST_NON_LOYALTY_ACTION: 'initiate',\n SHARED_WISHLIST_NON_LOYALTY_LABEL: 'join club lilly',\n LOYALTY_ENROLL_MODAL_INTERACTION_TYPE: 'loyalty enroll modal',\n SIGN_IN_OR_SIGN_UP_ENROLL_MODAL: 'sign in/up to enroll modal',\n LOYALTY_ENROLLMENT_EVENT_NAME: 'loyalty_enrollment',\n LOYALTY_VOUCHERS_EVENT_NAME: 'loyalty_dashboard_vouchers',\n BOLT_INTERACTION: 'bolt_interaction',\n LOYALTY_DASHBOARD_REWARDS_EVENT_NAME: 'loyalty_dashboard_rewards',\n BOLT_MODAL_PROCEED: 'otp:proceed',\n BOLT_MODAL_CLOSE: 'otp:close',\n LOYALTY_REWARDS_EVENT_NAME: 'loyalty_rewards',\n BOLT_SIGN_OUT: 'otp:sign out',\n NEWSLETTER_SIGNUP_COMPLETE: 'newsletter_signup_complete',\n NEWSLETTER_SIGNUP_FAILURE: 'newsletter_signup_failure',\n P_PRODUCT_LIST_KEY: 'product_list',\n P_PROMO_NAME_KEY: 'promo_name',\n P_PROMO_CREATIVE_NAME: 'promo_creative'\n};\n","'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(bc, pt) {\n ssp('set', 'page', {\n breadcrumb: bc, // 'Home > Sweaters > SSP Sweater'\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 : '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';\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 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 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 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 return sizeArray;\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('.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 ssp('set', 'product', {\n productId,\n sizeType: 'regular',\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 * 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\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: 'regular',\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: 'regular',\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: 'regular',\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: 'regular',\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 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 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 const crumbs = getCrumbs();\n pageContext(crumbs, 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","/*! 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.\\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","'use strict';\n\n/**\n * @desc Util for Media breakpoints used in JS\n */\nconst breakpoints = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 1024,\n xl: 1362\n};\n\nmodule.exports = breakpoints;\n","'use strict';\n\nconst { queryFirst, queryAll, addClass, hasClass, removeClass } = require('../domUtil');\n\nconst breakpoints = require('../breakpoints');\nlet windowWidth = window.innerWidth;\n\nconst shopByPrintEl = queryFirst('.shop-by-print');\nconst shopByPrintDrawerEl = queryFirst('.shop-by-print-drawer');\nconst toggleDrawerBtn = queryFirst('.toggle-drawer-btn');\nconst viewAllBtn = queryFirst('.view-all-btn');\nconst toggleDrawerEl = queryFirst('.shop-by-print-drawer-content');\nconst allOpenClass = 'open-all';\nconst videoComponentEl = queryFirst('.video-component');\nconst showClass = 'show';\nconst headerEl = queryFirst('.shop-by-print-header');\nlet clickedModalBtn = '';\nconst KEYCODE_TAB = 9;\nconst TabKey = 'Tab';\n\nconst togglePrintDrawer = () => {\n if (!hasClass(shopByPrintDrawerEl, allOpenClass)) {\n // open drawer\n addClass(shopByPrintDrawerEl, allOpenClass);\n toggleDrawerBtn.setAttribute('aria-expanded', true);\n\n const yOffset = windowWidth < breakpoints.md ? -48 : -150;\n const y = shopByPrintDrawerEl.getBoundingClientRect().top + window.pageYOffset + yOffset;\n window.scrollTo({ top: y, behavior: 'smooth' });\n } else {\n // close drawer\n removeClass(shopByPrintDrawerEl, allOpenClass);\n toggleDrawerBtn.setAttribute('aria-expanded', false);\n }\n};\n\nconst handlePrintBtnClick = e => {\n const { target } = e;\n if (!target.matches('.shop-by-print-drawer-tile')) {\n return;\n }\n\n const { href } = e.target.dataset;\n clickedModalBtn = e.target;\n\n const quickviewEl = queryFirst('.shop-by-print-quickview');\n\n $.getJSON(href, function (data) {\n quickviewEl.innerHTML = data.renderedTemplate;\n if (!hasClass(shopByPrintEl, showClass)) {\n addClass(shopByPrintEl, showClass);\n }\n }).done(function () {\n setTimeout(() => {\n const quickviewClose = queryFirst('.print-quickview-close');\n if (windowWidth < breakpoints.md) {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n return;\n }\n quickviewEl.scrollIntoView({ block: 'center', inline: 'center', behavior: 'smooth' });\n quickviewClose.focus({\n preventScroll: true\n });\n\n // ADA: contain tabs within modal when active\n const handleQuickviewModalTab = e => {\n const isTabPressed = e.key === TabKey || e.keyCode === KEYCODE_TAB;\n if (!isTabPressed) {\n return;\n }\n const focusable = queryAll('button:not(.d-md-none), [href]:not(.d-md-none), [tabindex]:not([tabindex=\"-1\"])', quickviewEl);\n const lastFocusable = focusable[focusable.length - 1];\n\n if (e.target === lastFocusable) {\n setTimeout(() => {\n quickviewClose.focus();\n }, 300);\n }\n };\n\n if (quickviewEl) {\n quickviewEl.addEventListener('keydown', handleQuickviewModalTab);\n }\n }, 500);\n });\n};\n\nconst closeQuickview = () => {\n window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });\n removeClass(shopByPrintEl, showClass);\n if (clickedModalBtn) {\n clickedModalBtn.focus({\n preventScroll: true\n });\n }\n};\n\nconst handleHeaderClickToClose = e => {\n const { target } = e;\n const isQuickviewEl = hasClass(target, 'print-quickview') || (target.closest('.print-quickview') && !target.matches('.print-quickview-close'));\n\n if ((!target.closest('.shop-by-print-header') && !hasClass(shopByPrintEl, showClass)) || isQuickviewEl) {\n return;\n }\n closeQuickview();\n};\n\nmodule.exports = () => {\n if (videoComponentEl) {\n videoComponentEl.style.opacity = 1;\n }\n\n // handle collapse of print drawer\n if (viewAllBtn) {\n viewAllBtn.addEventListener('click', togglePrintDrawer);\n }\n\n if (toggleDrawerBtn) {\n toggleDrawerBtn.addEventListener('click', togglePrintDrawer);\n }\n\n // close quickview if clicked outside of quickview el\n if (headerEl) {\n headerEl.addEventListener('click', handleHeaderClickToClose);\n }\n\n // handle print tile click\n if (toggleDrawerEl) {\n toggleDrawerEl.addEventListener('click', handlePrintBtnClick);\n }\n};\n","'use strict';\n\nconst { queryFirst, addClass, removeClass, queryAll } = require('../domUtil');\n\nmodule.exports = () => {\n const categoryContent = queryAll('.sbs-wrapper');\n const hiddenClass = 'd-none';\n const option1 = queryFirst('.option-1');\n const selector = queryFirst('.category-select');\n\n addClass(categoryContent, hiddenClass);\n removeClass(option1, hiddenClass);\n\n if (selector) {\n selector.addEventListener('change', function () {\n addClass(categoryContent, hiddenClass);\n let currOption = this.options[this.selectedIndex].value;\n removeClass(queryFirst('.' + currOption), hiddenClass);\n });\n\n window.onload = function () {\n selector.options[\"1\"].selected = true;\n };\n }\n};","// OOTB Code\n'use strict';\n\nconst scrollAnimate = require('base/components/scrollAnimate');\nconst baseFormErrors = require('base/checkout/formErrors');\n\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 */\nbaseFormErrors.loadFormErrors = function(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).find('.is-invalid:first'));\n};\n\n/**\n * Clear the form errors.\n * @param {string} parentSelector - the parent form selector.\n */\nbaseFormErrors.clearPreviousErrors = function(parentSelector) {\n $(parentSelector).find('.form-control.is-invalid').removeClass('is-invalid');\n $('.error-message').hide();\n};\n\nmodule.exports = baseFormErrors;\n","// OOTB Code\n'use strict';\nconst { queryFirst, addClass, queryAll, isInViewport, removeClass, hasClass, scrollTo } = require('./domUtil');\nconst { errorTextTemplate } = require('./templates');\nconst formHelpers = require('./checkout/formErrors');\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} button - button to be enabled or disabled\n * @param {Object} formElement - form to be validated\n */\nfunction enableOrDisableButton(button, formElement) {\n button.disabled = formElement.checkValidity && !formElement.checkValidity();\n clearForm(formElement);\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 typeMismatchErrorValue = $this.data('type-mismatch-error');\n const { patternMismatch, rangeOverflow, rangeUnderflow, tooLong, tooShort, valueMissing, badInput, stepMismatch, typeMismatch } = this.validity;\n\n addClass(this, 'is-invalid');\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 } else if (typeMismatch && typeMismatchErrorValue) {\n validationMessage = typeMismatchErrorValue;\n }\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 * Function to update payment fields validation\n * @param {boolean} isRequired - describs payment fields required or not\n */\nfunction updatePaymentValidation(isRequired) {\n queryFirst('input[name=\"dwfrm_billing_creditCardFields_cardNumber\"]', checkoutContainerEl).required = isRequired;\n queryFirst('input[name=\"dwfrm_billing_creditCardFields_cardType\"]', checkoutContainerEl).required = isRequired;\n queryFirst('input[name=\"dwfrm_billing_creditCardFields_securityCode\"]', checkoutContainerEl).required = isRequired;\n document.getElementById('expirationMonth').required = isRequired;\n document.getElementById('expirationYear').required = isRequired;\n}\n\n/**\n * Function to check if the password and confirm password matches in form\n * @param {string} passwordFieldId - ID of the password form field\n * @param {boolean} isPasswordMatched - describes if password matched\n * @param {boolean} isValidForm - describes if the form is valid\n * @return {Object} - updated form validity and password match\n */\nfunction checkPasswordMatch(passwordFieldId, isPasswordMatched, isValidForm, $this) {\n const newPasswordValue = queryFirst(passwordFieldId).value;\n const confirmPasswordValue = $this.value;\n let isPasswordMatches = isPasswordMatched;\n let isValidForms = isValidForm;\n if (confirmPasswordValue && newPasswordValue && confirmPasswordValue !== newPasswordValue) {\n isPasswordMatches = false;\n isValidForms = false;\n }\n return { isPasswordMatches, isValidForms };\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\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 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')\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 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 const giftCheckbox = queryFirst('.custom-control-input.gift');\n const giftMessageContainer = queryFirst('.gift-message', shippingForm);\n const giftMessageEl = document.getElementById('giftMessage');\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 if (giftMessageEl && !giftMessageEl.validity.valid) {\n addClass(giftMessageEl, 'is-invalid');\n event.stopPropagation();\n } else {\n removeClass(giftMessageEl, 'is-invalid');\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 if (giftCheckbox.checked && !giftMessageEl.required) {\n giftMessageEl.required = true;\n giftMessageEl.checkValidity();\n removeClass(giftMessageContainer, 'd-none');\n event.stopPropagation();\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 isBoltTabActive = hasClass(queryFirst('.bolt-tab', checkoutContainer), 'active');\n const isNewPayment = $('.payment-information').data('is-new-payment');\n const isRequired = !isPaymentDisabled && (isCreditTabActive || isBoltTabActive);\n const checkIsBoltEnabledEl = queryFirst('.check-is-bolt-enabled');\n const isBoltEnabled = (checkIsBoltEnabledEl && checkIsBoltEnabledEl.value === 'true') || false;\n const savedPaymentCvv = queryFirst('.saved-payment-security-code');\n\n updatePaymentValidation(isRequired);\n let isCardExpired = false;\n if (isBoltEnabled && isBoltTabActive) {\n updatePaymentValidation(isRequired && isNewPayment);\n if (!isPaymentDisabled && isNewPayment) {\n const creditCardExpirationMonthEl = queryFirst('#expirationMonth');\n const creditCardExpirationYearEl = queryFirst('#expirationYear');\n const { cardExpiredError } = creditCardExpirationMonthEl.dataset;\n const boltCardExpireMonth = creditCardExpirationMonthEl.value;\n const boltCardExpireYear = creditCardExpirationYearEl.value;\n const today = new Date();\n const expDate = new Date();\n expDate.setFullYear(boltCardExpireYear, boltCardExpireMonth, 0);\n if (boltCardExpireYear && boltCardExpireMonth && expDate < today) {\n const boltExpiredCardError = { dwfrm_billing_creditCardFields_expirationMonth: cardExpiredError, dwfrm_billing_creditCardFields_expirationYear: cardExpiredError };\n formHelpers.loadFormErrors('.payment-form', boltExpiredCardError);\n isCardExpired = true;\n }\n }\n\n // In case of LP reg user having saved cards and payment method is Bolt Pay\n // then CVV should not be a required field for LP saved cards\n if (savedPaymentCvv) {\n savedPaymentCvv.required = false;\n }\n } else if (customerType === 'registered') {\n if (savedPaymentCvv) {\n savedPaymentCvv.required = isRequired && !isNewPayment;\n }\n updatePaymentValidation(isRequired && isNewPayment);\n }\n if ((billingForm.checkValidity && !billingForm.checkValidity()) || isCardExpired) {\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 updatePaymentValidation(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 const selectorContainer = $('.valid-password-info li');\n const notMatchedClass = 'pwd-criteria-not-matched';\n const matchedClass = 'pwd-criteria-matched';\n formElements.forEach(form => {\n const button = queryFirst('.enable-button-onvalidate', form);\n if (form && button) {\n const $form = $(form);\n const callback = function () {\n const isConfirmPassword = this.id === 'newPasswordConfirm';\n const isNewPassword = this.id === 'newPassword';\n const isConfirmRegistrationPassword = this.id === 'registration-form-password-confirm';\n const isRegistrationPassword = this.id === 'registration-form-password';\n let isPasswordMatched = true;\n let isValidForm = true;\n\n if (isConfirmPassword || isConfirmRegistrationPassword) {\n const passwordFieldId = isConfirmPassword ? '#newPassword' : '#registration-form-password';\n const confirmPasswordMatches = checkPasswordMatch(passwordFieldId, isPasswordMatched, isValidForm, this);\n isPasswordMatched = confirmPasswordMatches.isPasswordMatches;\n isValidForm = confirmPasswordMatches.isValidForms;\n }\n\n if (this.validity.valid && isValidForm) {\n removeClass(this, 'is-invalid');\n if (isNewPassword || isRegistrationPassword) {\n selectorContainer.removeClass(notMatchedClass);\n selectorContainer.addClass(matchedClass);\n }\n } else {\n const $this = $(this);\n const thisValue = $this.val();\n if ($form.hasClass('change-password-form') && (isNewPassword || isRegistrationPassword) && 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 selectorContainer.closest('ul').addClass('padding-none');\n $this.parents('.form-group').find('.invalid-feedback').text('');\n } else {\n if (!isPasswordMatched) {\n $this.parents('.form-group').find('.invalid-feedback').text(this.dataset.mismatchError);\n addClass(this, 'is-invalid');\n } else {\n $this.parents('.form-group').find('.invalid-feedback').text(getValidationMessage.apply(this));\n }\n }\n }\n };\n $form.find('input, textarea').on('blur', callback);\n $form.find('#newPassword, #registration-form-password').on('keyup', callback);\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 }\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\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 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","// 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';\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\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 { getItemFromLocalStorage, 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 SHIPPING_PREFERENCE_KEY, 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')\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);\n const availabilityElement = queryFirst(AVAILABILITY_MSG_SELECTOR);\n const ispuLowInventory = queryFirst(STORE_AVAILABILITY_MESSAGE_SELECTOR);\n const ispuLowInventoryMsg = queryFirst(INVENTORY_MSG_SELECTOR);\n const ispuRadioButtonEl = getISPUradioButtonEl(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 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 {\n addClass([ispuLowInventory, ispuLowStockEl], HIDDEN_CLASS);\n removeClass(availabilityElement, HIDDEN_CLASS);\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 let shippingPreferenceValue = getItemFromLocalStorage(SHIPPING_PREFERENCE_KEY);\n if (!shippingPreferenceValue) {\n const shippingPreferencesConfig = getNestedValue(window, 'lillyUtils.shippingPreferencesConfig') || {};\n const { activeStoreFilter } = shippingPreferencesConfig;\n shippingPreferenceValue = activeStoreFilter ? ISPU_RADIO_VALUE : SHIP_TO_RADIO_VALUE;\n }\n return shippingPreferenceValue;\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};\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 KEYCODE_ENTER: 13,\n EVENT_KEY_ENTER: 'Enter',\n\n // Search types\n SEARCH_TYPE: 'searchType',\n SEARCH_SUBMIT: 'search submit',\n SEARCH_SUGGESTIONS: 'search suggestions',\n POPULAR_SEARCHES: 'popular searches'\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 * @property {string} productBadge - The product is of Early Access or not (E.g. Early Access)\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 = `

${message}

Continue Shopping
`;\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, .add-to-cart, .account-login-btn, .create-account-btn') || 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 { attrValue: colorCode, productSet } = dataset;\n const { productBadge } = dataset;\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 if (productSet === 'null') productSet = ''; // not all PLP tiles have data-product-set\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 productBadge,\n productSet\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 * Sets a cookie\n * @param {string} key - the name of the cookie\n * @param {string} value - the value of the cookie\n * @param {number} [minutes] - how long until the cookie expires in minutes\n */\nexports.setCookie = (key, value, minutes) => {\n let date;\n if (minutes) {\n date = new Date();\n date.setTime(date.getTime() + (minutes * 60 * 1000));\n }\n\n document.cookie = `${key}=${value}${date ? `; expires=${date.toGMTString()}` : ''}; path=/`;\n};\n\n/**\n * Validating the date as per month\n */\nexports.validateDate = () => {\n const monthSelector = document.getElementById('birthdaymonth');\n const dateSelector = document.getElementById('birthdaydate');\n\n if (monthSelector && dateSelector) {\n const { message } = dateSelector.dataset;\n /**\n * Validating date\n */\n function validateDateOption() {\n const m = monthSelector.value;\n const 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 const 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 }\n};\n\n/**\n * Returns whether an element's content is visible to the user\n * Note that this differs from existing implementations like JQuery :visible -- this will return false\n * for elements which are visibility: hidden or which are overflow hidden with 0 height.\n * @param {HTMLElement} element - The element whose visibility to check\n * @returns {boolean} true if the element is visible, false otherwise.\n */\nexports.isVisible = function(element) {\n if (!element instanceof HTMLElement) return false;\n\n // Check if the element is hidden using more performant methods first\n // We can't check for d-none here because we use conventions like \"d-none d-md-block\" on the site.\n if (exports.hasClass(element, 'invisible') || element.offsetParent === null) return false;\n\n const style = window.getComputedStyle(element);\n return !(style.display === 'none' || style.visibility === 'hidden' || (style.overflowY === 'hidden' && (style.height === '0px' || style.maxHeight === '0px')));\n};\n\n/**\n * Converts a basic object to FormData\n * @param {Object} obj - the object to convert to FormData\n * @param {boolean} [includeUndefined=false] - include undefined values in the result\n * @returns {FormData} FormData representation of the object\n */\nexports.toFormData = (obj, includeUndefined = false) => Object.keys(obj).reduce((formData, key) => {\n const value = obj[key];\n if (typeof value !== 'undefined' || includeUndefined) formData.append(key, value);\n return formData;\n}, new FormData());\n\nexports.getStyles = getStyles;\nexports.queryAll = queryAll;\n","'use strict';\n\nvar formValidation = require('base/components/formValidation');\nconst baseLogin = require('base/login/login');\n\nconst { queryFirst, addClass, removeClass, loadInput } = require('../domUtil');\nconst { formatPhoneNumber, getItemFromLocalStorage } = require('../util');\nconst registrationFormPhone = queryFirst('.registration-form-phone');\nconst loyaltyGuestReferralModal = queryFirst('#guest-friend-referral-popup');\nconst $body = $('body');\nconst checkoutContainer = queryFirst('#checkout-main');\nconst { HIDDEN_CLASS } = require('../constants');\n\nwindow.addEventListener('load', (event) => {\n const formElement = queryFirst('.change-password-form');\n const referrerID = getItemFromLocalStorage('REFERRED_ID');\n if (referrerID && formElement) {\n loadInput(referrerID, formElement);\n }\n if (loyaltyGuestReferralModal) {\n $(loyaltyGuestReferralModal).modal('show');\n }\n if (checkoutContainer) {\n const guestCheckoutSignInModal = queryFirst('#guest-checkout-login');\n const cancelBtnRegistrationModal = queryFirst('.registration-right .cancel a', guestCheckoutSignInModal);\n if (cancelBtnRegistrationModal) {\n cancelBtnRegistrationModal.addEventListener('click', e => {\n e.preventDefault();\n $(guestCheckoutSignInModal).modal('hide');\n });\n }\n if (guestCheckoutSignInModal) {\n addClass(queryFirst('.account-need-help'), HIDDEN_CLASS);\n const registerLeft = queryFirst('.registration-left');\n const registerRight = queryFirst('.registration-right');\n removeClass(registerLeft, 'offset-md-2');\n addClass([registerLeft, registerRight], 'col-md-6');\n }\n }\n if (queryFirst('.add-to-loyalty-program-checkbox')) {\n $('form.registration').trigger('register:optin_load');\n }\n});\n\n/**\n * Enables the login button - to be called after this script loads to prevent early login button clicks.\n */\nfunction enableLoginButton() {\n $body.off('login:dialogLoaded').on('login:dialogLoaded', () => {\n enableLoginButton();\n });\n\n const btn = queryFirst('.account-login-btn');\n if (btn) {\n btn.disabled = false;\n }\n}\n\nmodule.exports = {\n ...baseLogin,\n\n register: function () {\n $('form.registration').submit(function (e) {\n var form = $(this);\n e.preventDefault();\n var url = form.attr('action');\n $body.spinner().start();\n form.trigger('login:register', e);\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n $body.spinner().stop();\n if (data.success) {\n form.trigger('register:success');\n if (checkoutContainer) {\n //reloading the page when account is created from checkout page\n location.reload();\n } else {\n //redirecting to my account when account is created from Login Page\n location.href = data.redirectUrl;\n }\n } else {\n formValidation(form, data);\n form.trigger('register:error');\n }\n },\n error: function (err) {\n if (err.responseJSON.redirectUrl) {\n window.location.href = err.responseJSON.redirectUrl;\n } else {\n createErrorNotification($('.error-messaging'), err.responseJSON.errorMessage);\n }\n\n $body.spinner().stop();\n }\n });\n return false;\n });\n },\n\n resetPassword: function () {\n const resetPasswordDialog = $('#requestPasswordResetModal');\n\n resetPasswordDialog.on('hidden.bs.modal', function () {\n removeClass(queryFirst('.password-reset-section', this), 'request-success');\n const emailEl = document.getElementById('reset-password-email');\n emailEl.value = '';\n removeClass(emailEl, 'is-invalid');\n });\n\n $('.reset-password-form').on('submit', function (e) {\n var form = $(this);\n e.preventDefault();\n var url = form.attr('action');\n form.spinner().start();\n $('.reset-password-form').trigger('login:register', e);\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n form.spinner().stop();\n if (!data.success) {\n formValidation(form, data);\n } else {\n // LP Customization start\n addClass(queryFirst('.reset-password-request-modal .password-reset-section'), 'request-success');\n // LP Customization end\n }\n },\n error: function () {\n form.spinner().stop();\n resetPasswordDialog.modal('hide').one('hidden.bs.modal', () => {\n $body.trigger('csrf:error');\n });\n }\n });\n\n return false;\n });\n },\n handleLogin: function () {\n const loginBtnEl = queryFirst('.account-login-btn');\n const $loginFormEl = $('form.login');\n $loginFormEl.on('login:submit', function () {\n loginBtnEl.disabled = true;\n });\n\n $loginFormEl.on('login:error', function () {\n loginBtnEl.disabled = false;\n });\n }\n};\n\nformatPhoneNumber(registrationFormPhone);\nenableLoginButton();\n","'use strict';\nconst { queryFirst, addClass, removeClass, throttle, hasClass, setAttribute, queryAll, loadInput, validateDate } = require('../domUtil');\nconst formValidation = require('base/components/formValidation');\nconst { getTimeRemaining, getItemFromLocalStorage, formatPhoneNumber, getJSON } = require('../util');\nconst { resetPassword } = require('../login/login');\nconst { MY_ACCOUNT } = require('../components/shippingPreference/constants');\nconst $body = $('body');\nconst hiddenClass = 'd-none';\nconst loyaltyWelcomeDialog = queryFirst('.loyalty-welcome-popup');\nconst loyaltyEnrollNowDialog = queryFirst('#loyalty-enrollnow-modal');\nconst invalidClass = 'is-invalid';\nconst desktopShowClass = 'desktop-show';\nconst activeClass = 'active';\nconst exclusiveCarouselIdSelector = '#exclusive-experience-carousel';\nlet mobileImg, desktopImg;\nconst root = document.documentElement;\nconst { initSpecificCarousel } = require('../components/carousel');\nconst loyaltyEarlyAccessRegisterForm = queryFirst('#loyalty-early-access-register');\nconst earlyAccessPdpSignInRegistration = queryAll('.js-early-access-sign-in-cta');\nconst { ajaxFormInvalid, ajaxFormSubmit, enableFormSubmitButton, invalid } = require('../clientSideValidation');\nconst swatchImageDownload = queryFirst('.swatch-image-download');\nconst swatchImageDownloaded = queryFirst('.swatch-image-downloaded');\nconst downloadCtaDesktop = '.download-cta.desktop-show';\nconst downloadCtaMobile = '.download-cta.mobile-show';\nconst welcomeDialogEarlyAccessMsgEl = queryFirst('.js-loyalty-welcome-early-access-msg');\nconst welcomeDialogMsgEl = queryFirst('.js-loyalty-welcome-msg');\n$body.on('hidden.bs.modal', function () {\n if (!queryFirst('.modal.show')) {\n $body.removeClass('referral-modal');\n }\n});\n\n/**\n * Handle the enroll now popup view\n */\nfunction handleEarlyAccessEnrollModal() {\n $(loyaltyEnrollNowDialog).modal('show').off('hidden.bs.modal').on('hidden.bs.modal', function () {\n if (!hasClass(loyaltyWelcomeDialog, 'show')) {\n location.reload();\n } else {\n addClass(welcomeDialogMsgEl, hiddenClass);\n removeClass(welcomeDialogEarlyAccessMsgEl, hiddenClass);\n removeWelcomeModalShowSession();\n }\n });\n $(loyaltyWelcomeDialog).off('hidden.bs.modal').on('hidden.bs.modal', function (e) {\n location.reload();\n });\n}\n\n/**\n * Login form on PDP Early Access\n * @param {boolean} isLoyaltyMember - if the user is enrolled to loyalty or not\n * @param {string} postalCode - ZIP Code\n * @param {string} showWelcomeModal - When the enrollment is complete and the welcome modal needs to be displayed, it will be true\n */\nfunction handlePdpEarlyAccessLoginRegistration(isLoyaltyMember, postalCode, showWelcomeModal) {\n if (showWelcomeModal) {\n addClass(welcomeDialogMsgEl, hiddenClass);\n removeClass(welcomeDialogEarlyAccessMsgEl, hiddenClass);\n $(loyaltyWelcomeDialog).modal('show').off('hidden.bs.modal').on('hidden.bs.modal', function (e) {\n location.reload();\n });\n removeWelcomeModalShowSession();\n } else if (isLoyaltyMember) {\n location.reload();\n } else {\n const loyaltyEnrollModalForm = queryFirst('.loyalty-get-access');\n const loyaltyEnrollPostalCodeEl = queryFirst('.js-loyalty-access-postal-code', loyaltyEnrollModalForm);\n const loyaltyGuestEnrollment = queryFirst('.loyalty-getaccess-section .guest-enrollment');\n addClass(loyaltyGuestEnrollment, hiddenClass);\n removeClass(loyaltyEnrollModalForm, hiddenClass);\n if (!postalCode) {\n removeClass(loyaltyEnrollPostalCodeEl, hiddenClass);\n } else {\n queryFirst('.loyalty-access-form-postalcode', loyaltyEnrollPostalCodeEl).value = postalCode;\n }\n handleEarlyAccessEnrollModal();\n }\n}\n/**\n * Login form on PDP Early Access\n * @param {Object} form - form element\n */\nfunction earlyAccessSignIn(form) {\n const url = form.attr('action');\n $.spinner().start();\n $.ajax({\n url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n $.spinner().stop();\n if (!data.success) {\n formValidation(form, data);\n form.trigger('login:error', data);\n } else {\n const { loyaltyProgramMemberId, postalCode } = data;\n $(loyaltyEarlyAccessRegisterForm).modal('hide');\n handlePdpEarlyAccessLoginRegistration(!!loyaltyProgramMemberId, postalCode);\n }\n },\n error: function () {\n $.spinner().stop();\n $(loyaltyEarlyAccessRegisterForm).modal('hide');\n }\n });\n}\n/**\n * Remove show modal session attribute on close of welcome modal\n */\nfunction removeWelcomeModalShowSession() {\n const closeButton = queryFirst('.loyalty-welcome-popup .close-welcome-modal');\n getJSON(closeButton.dataset.welcomeSessionUrl, 'get');\n}\n/**\n * Registration form on PDP Early Access\n * @param {Object} form - form element\n */\nfunction earlyAccessRegistration(form) {\n const url = form.attr('action');\n $.spinner().start();\n $.ajax({\n url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n $.spinner().stop();\n if (data.success) {\n const { optedInToLoyalty, postalCode } = data;\n const showWelcomeModal = optedInToLoyalty;\n $(loyaltyEarlyAccessRegisterForm).modal('hide');\n handlePdpEarlyAccessLoginRegistration(optedInToLoyalty, postalCode, showWelcomeModal);\n } else {\n formValidation(form, data);\n form.trigger('register:error');\n }\n },\n error: function () {\n $.spinner().stop();\n $(loyaltyEarlyAccessRegisterForm).modal('hide');\n }\n });\n}\n/**\n * Function to attach form validation events\n * @param {Object} form - form element\n */\nfunction attachLoginRegistrationFormEvents(form) {\n ajaxFormInvalid(form);\n ajaxFormSubmit(form);\n enableFormSubmitButton();\n}\n\n/**\n * Function to handle early access sign in or registration on PLP and PDP page\n * @param {Object} earlyAccessCta - element\n */\nfunction handleEarlyAccessLogin(earlyAccessCta) {\n const { initPopover, initPopoverClose, POPOVER_CLICK_BOTTOM } = require('../popover');\n\n if (earlyAccessCta) {\n const { actionUrl } = earlyAccessCta.dataset;\n $.spinner().start();\n $.ajax({\n url: actionUrl,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n if (data.success) {\n $(loyaltyEarlyAccessRegisterForm).modal('show');\n const { accountRegistrationForm, loginForm, keepUserLoggedIn, isPersistentLoginEnabled } = data;\n const signInForm = queryFirst('.early-access-login-form');\n const registerForm = queryFirst('.early-access-register-form');\n signInForm.innerHTML = loginForm;\n\n registerForm.innerHTML = accountRegistrationForm;\n const accountHelpEl = queryFirst('.account-need-help');\n const earlyAccessRegisterLeft = queryFirst('.registration-left');\n const earlyAccessRegisterRight = queryFirst('.registration-right');\n addClass(accountHelpEl, hiddenClass);\n addClass([earlyAccessRegisterLeft, earlyAccessRegisterRight], 'col-md-6');\n const loyaltyRegistrationForm = '.early-access-register-form form.registration';\n const loyaltyLoginForm = '.early-access-login-form form.login';\n resetPassword();\n invalid();\n attachLoginRegistrationFormEvents(loyaltyLoginForm);\n attachLoginRegistrationFormEvents(loyaltyRegistrationForm);\n const registrationFormPhone = queryFirst('.registration-form-phone', earlyAccessRegisterLeft);\n const addToLoyaltyProgram = queryFirst('#add-to-loyalty-program', earlyAccessRegisterRight);\n if (addToLoyaltyProgram) {\n addToLoyaltyProgram.addEventListener('change', e => {\n const createAcctBtn = queryFirst('.create-account-btn');\n const earlyAccessMsg = queryFirst('input[name=\"earlyAccessMessage\"]');\n const earlyAccessProduct = earlyAccessMsg && earlyAccessMsg.value;\n if (e.currentTarget.checked) {\n createAcctBtn.setAttribute('data-product-badge', earlyAccessProduct);\n } else {\n createAcctBtn.setAttribute('data-product-badge', '');\n }\n });\n }\n formatPhoneNumber(registrationFormPhone);\n validateDate();\n if (isPersistentLoginEnabled) {\n const signInContainer = queryFirst('.logged-in-user-notifications');\n signInContainer.innerHTML = keepUserLoggedIn;\n const keepUserSignedInPopover = queryFirst('.keep-user-signed-in', signInForm);\n const keepUserSignedContainer = queryFirst('.logged-in-user-notification', signInContainer);\n initPopover(keepUserSignedInPopover, POPOVER_CLICK_BOTTOM, {\n content: keepUserSignedContainer\n });\n\n initPopoverClose();\n }\n\n\n $(loyaltyLoginForm).off('submit').on('submit', function (e) {\n const form = $(this);\n e.preventDefault();\n earlyAccessSignIn(form);\n });\n $(loyaltyRegistrationForm).off('submit').on('submit', function (e) {\n const form = $(this);\n e.preventDefault();\n earlyAccessRegistration(form);\n });\n $body.trigger('login:dialogLoaded');\n }\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n}\n\n/**\n * hide or show drawer image in mobile and desktop view\n * @param {string} drawerMobileImg - image for mobile view\n * @param {string} drawerDesktopImg - image for desktop view\n */\nfunction hideShowDrawerImage(drawerMobileImg, drawerDesktopImg) {\n const desktopImageWrapper = queryFirst('.drawer-img-wrap-desktop');\n const mobileImageWrapper = queryFirst('.drawer-img-wrap-mobile');\n const drawerMobileImgEl = queryFirst('.drawer-image-mobile');\n const drawerDesktopImgEl = queryFirst('.drawer-image-desktop');\n\n // check if scene7 link is present for mobile or desktop or both\n if (drawerMobileImg !== 'null' && drawerMobileImgEl) {\n drawerMobileImgEl.src = drawerMobileImg;\n }\n\n loyaltyDrawerImageView(drawerMobileImg, mobileImageWrapper);\n\n if (drawerDesktopImg !== 'null' && drawerDesktopImgEl) {\n drawerDesktopImgEl.src = drawerDesktopImg;\n }\n\n loyaltyDrawerImageView(drawerDesktopImg, desktopImageWrapper);\n}\n\n/**\n * update the backgroud of referral section bassed on the configuration in content asset\n */\nfunction updateReferralBg() {\n const loyaltyReferralBg = queryFirst('.referral-section-bg-color');\n if (!loyaltyReferralBg) {\n return;\n }\n const { bgColor, bgImageDesktop, bgImageMobile } = loyaltyReferralBg.dataset;\n if (bgImageDesktop) {\n root.style.setProperty('--referral-bg-img-desktop', `url(${bgImageDesktop})`);\n }\n if (bgImageMobile) {\n root.style.setProperty('--referral-bg-img-mobile', `url(${bgImageMobile})`);\n }\n if (bgColor) {\n root.style.setProperty('--referral-bg-color', bgColor);\n }\n}\n\n\n/**\n * handling hide or show of drawer image and background color in mobile and desktop view\n * @param {string} image - image of mobile/desktop view\n * @param {string} el - wrapper element of desktop/mobile\n */\nfunction loyaltyDrawerImageView(drawerImage, el) {\n const loyaltyModalEl = queryFirst('#loyalty-program-modal .modal-content');\n const withImageEl = queryFirst('.drawer-with-img', el);\n const withoutImageEl = queryFirst('.drawer-without-img', el);\n const loyaltyDrawerBackground = 'loyalty-background';\n\n if (drawerImage && drawerImage !== 'null') {\n addClass(withoutImageEl, hiddenClass);\n removeClass(withImageEl, hiddenClass);\n addClass(loyaltyModalEl, loyaltyDrawerBackground);\n } else {\n removeClass(withoutImageEl, hiddenClass);\n addClass(withImageEl, hiddenClass);\n addClass(loyaltyModalEl, loyaltyDrawerBackground);\n }\n\n}\n\n/**\n * show how to earn drawer image in mobile and desktop view\n * @param {string} drawerMobileImg - image for mobile view\n * @param {string} drawerDesktopImg - image for desktop view\n * @param {string} drawerTitle - title for the drawer\n * @param {string} drawerCloseButtonLabel - close button label\n */\nfunction showHowToEarnDrawerImage(drawerMobileImg, drawerDesktopImg, drawerTitle, drawerCloseButtonLabel) {\n const drawerMobileImgEl = queryFirst('.drawer-image-mobile');\n const drawerDesktopImgEl = queryFirst('.drawer-image-desktop');\n const drawerTitleE1 = queryFirst('#loyalty-how-to-earn-modal-label');\n const drawerCloseButtonE1 = queryFirst('#loyalty-how-to-earn-modal .close-current-modal');\n\n if (drawerTitle && drawerTitleE1) {\n drawerTitleE1.innerHTML = drawerTitle;\n }\n if (drawerCloseButtonLabel && drawerCloseButtonE1) {\n drawerCloseButtonE1.ariaLabel = drawerCloseButtonLabel;\n }\n if (drawerMobileImg !== 'null' && drawerMobileImgEl) {\n drawerMobileImgEl.src = drawerMobileImg;\n }\n if (drawerDesktopImg !== 'null' && drawerDesktopImgEl) {\n drawerDesktopImgEl.src = drawerDesktopImg;\n }\n}\n/**\n * Add the image URL in download CTA on select of wallpaper swatch\n * @param {HTMLElement} selectedWallpaperId - selected swatch element Id\n */\nfunction updateImgURLOnDownloadCta(selectedWallpaperId) {\n const selectTab = selectedWallpaperId ? queryFirst(selectedWallpaperId) : queryFirst('.main-swatch-section .tab-pane.active');\n const imageElement = queryFirst('.wallpaper-main-image', selectTab);\n const swatchImageDownloadCtaDesktop = queryFirst(downloadCtaDesktop, swatchImageDownload);\n const swatchImageDownloadCtaMobile = queryFirst(downloadCtaMobile, swatchImageDownload);\n const swatchImageDownloadedCtaDesktop = queryFirst(downloadCtaDesktop, swatchImageDownloaded);\n const swatchImageDownloadedCtaMobile = queryFirst(downloadCtaMobile, swatchImageDownloaded);\n if (imageElement) {\n const { desktopDownloadedImage, mobileDownloadedImage } = imageElement.dataset;\n setAttribute(swatchImageDownloadCtaDesktop, 'href', desktopDownloadedImage);\n setAttribute(swatchImageDownloadCtaMobile, 'href', mobileDownloadedImage);\n setAttribute(swatchImageDownloadedCtaDesktop, 'href', desktopDownloadedImage);\n setAttribute(swatchImageDownloadedCtaMobile, 'href', mobileDownloadedImage);\n }\n}\n\n/**\n * Add click event listener on download cta to call the update image URL function\n */\nfunction loyaltySwatchImgDownload() {\n updateImgURLOnDownloadCta();\n $body.on('click', '.img-wallpaper', function (e) {\n const selectedWallpaperId = this.closest('a').hash;\n updateImgURLOnDownloadCta(selectedWallpaperId);\n addClass(swatchImageDownloaded, hiddenClass);\n removeClass(swatchImageDownload, hiddenClass);\n });\n\n $body.on('click', '.download-cta.desktop-show, .download-cta.mobile-show', function () {\n addClass(swatchImageDownload, hiddenClass);\n removeClass(swatchImageDownloaded, hiddenClass);\n });\n}\n\n/**\n * Updated the counter timmer in every second\n * @param {string} countDataMsg - timmer string\n * @param {string} countDownTime - countDownTimmer\n * @param {HTMLElement} countDownEle - Html element where the timer needs to updated\n * @param {Object} timeinterval - OOS javascript function updated on every second\n */\nfunction updateClock(countDataMsg, countDownTime, countDownEle, timeinterval, countDataMsgNoDays) {\n const { tokenize } = require('../util');\n const timer = getTimeRemaining(countDownTime);\n const newCountDataMsg = (timer.days === 0) ? countDataMsgNoDays : countDataMsg;\n countDownEle.innerHTML = tokenize(newCountDataMsg, timer, '[', ']');\n if (timer.total <= 0) {\n clearInterval(timeinterval);\n }\n}\n\n\n/**\n * Updated voucher Expiry date to formatted string\n * @param {string} expiryDate - API response expiry date string\n * @param {string} formatString - format string of resource message\n * @return {string} formattedString - formatted expiry date string\n */\nfunction getFormatDateString(expiryDate, formatString) {\n if (!expiryDate) {\n return expiryDate;\n }\n const expiryDateStringArray = expiryDate.split(' ');\n const formattedString = expiryDateStringArray[0] + ' ' + formatString;\n return formattedString;\n}\n/**\n * Add click event listener on download cta to call the update image URL function\n */\nfunction exclusiveExperiencesCountDown() {\n const exclusiveExperiencesTile = queryAll('.exclusive-tile');\n if (exclusiveExperiencesTile.length > 0) {\n for (let i = 0, n = exclusiveExperiencesTile.length; i < n; i++) {\n const exclusiveModule = exclusiveExperiencesTile[i];\n const countDownTime = exclusiveModule.dataset.countDownTimer;\n const countDownEle = queryFirst('.count-down-timer', exclusiveModule);\n const countDownEleNoDays = queryFirst('.count-down-timer-nodays', exclusiveModule);\n const countDataMsg = countDownEle.dataset.counterMsg;\n const countDataMsgNoDays = countDownEleNoDays.dataset.counterMsg;\n if (countDownTime) {\n // update the counter\n const timeinterval = setInterval(function () { updateClock(countDataMsg, countDownTime, countDownEle, timeinterval, countDataMsgNoDays) }, 1000);\n } else {\n addClass(countDownEle, hiddenClass);\n }\n }\n }\n}\n\n/**\n * Hide show the right and left icon if carousel reaches to last or first position\n */\n$(exclusiveCarouselIdSelector).carousel({\n wrap: false\n});\n\nconst carouselControlsToggle = function () {\n const exclusiveCarousel = queryFirst(exclusiveCarouselIdSelector);\n\n if (exclusiveCarousel) {\n const parentElement = queryFirst('.image-slide-indicators', exclusiveCarousel);\n const carouselControl = queryFirst('.lp-icon-chevron', exclusiveCarousel);\n const { lastElementChild, firstElementChild } = parentElement;\n const previousControl = queryFirst('.carousel-control-prev', exclusiveCarousel);\n const nextControl = queryFirst('.carousel-control-next', exclusiveCarousel);\n if (hasClass(lastElementChild, activeClass)) {\n addClass(nextControl, hiddenClass);\n removeClass(previousControl, hiddenClass);\n } else if (hasClass(firstElementChild, activeClass)) {\n removeClass(nextControl, hiddenClass);\n addClass(previousControl, hiddenClass);\n } else {\n removeClass(carouselControl, hiddenClass);\n }\n }\n};\n\nwindow.addEventListener('load', (event) => {\n const formElement = queryFirst('.loyalty-get-access');\n const referrerID = getItemFromLocalStorage('REFERRED_ID');\n if (referrerID && formElement) {\n loadInput(referrerID, formElement);\n }\n});\n\nif (earlyAccessPdpSignInRegistration.length) {\n earlyAccessPdpSignInRegistration.forEach((earlyAccessBtn) => {\n earlyAccessBtn.addEventListener('click', e => {\n e.preventDefault();\n handleEarlyAccessLogin(earlyAccessBtn);\n });\n });\n}\n\n/**\n * Function to initialize events\n */\nfunction init() {\n loyaltySwatchImgDownload();\n exclusiveExperiencesCountDown();\n carouselControlsToggle();\n $(exclusiveCarouselIdSelector).on('slid.bs.carousel', '', carouselControlsToggle);\n}\n\nmodule.exports = {\n loyaltyDrawer: function () {\n const loyaltyAppImage = queryFirst('.is-drawer-img');\n if (loyaltyAppImage) {\n const loyaltyDrawerContent = queryFirst('.loyalty-drawer-content');\n const { isAppDrawer } = loyaltyAppImage.dataset;\n const drawerAppImgEl = queryFirst('.drawer-image-mobile');\n if (isAppDrawer === \"true\") {\n mobileImg = loyaltyAppImage.dataset.mobileImg;\n const appImageWrapper = queryFirst('.drawer-img-wrap-mobile');\n if (mobileImg && mobileImg !== 'null') {\n drawerAppImgEl.src = mobileImg;\n }\n const appMobileImgEl = queryFirst('body');\n addClass(appMobileImgEl, 'loyalty-background-ios');\n loyaltyDrawerImageView(mobileImg, appImageWrapper);\n }\n removeClass(loyaltyDrawerContent, hiddenClass);\n }\n\n $body.on('click', '.loyalty-program-drawer-link, .loyalty-program-terms-condition, .loyalty-how-to-earn-drawer-link', function (e) {\n e.preventDefault();\n const url = this.dataset.href;\n const isLoyaltyProgramDrawerClick = $(this).hasClass('loyalty-program-drawer-link');\n const isLoyaltyProgramOverviewFromHeader = $(this).hasClass('loyalty-program-overview-from-header');\n const isMobileSession = queryFirst('.mobile-session');\n if (isMobileSession) {\n return true;\n }\n $.spinner().start();\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'html',\n success: function (data) {\n if (data) {\n if (isLoyaltyProgramDrawerClick) {\n const loyaltyContainer = queryFirst('.loyalty-drawer-body');\n loyaltyContainer.innerHTML = data;\n const loyaltyDrawerContent = queryFirst('.loyalty-drawer-content');\n removeClass(loyaltyDrawerContent, hiddenClass);\n const guestEnrollment = queryFirst('.lilly-loyalty-container .guest-enrollment');\n const memberSignInEnrollment = queryFirst('.lilly-loyalty-container .already-registered-log-in');\n if (guestEnrollment && memberSignInEnrollment) {\n if (isLoyaltyProgramOverviewFromHeader) {\n removeClass([guestEnrollment, memberSignInEnrollment], hiddenClass);\n } else {\n addClass([guestEnrollment, memberSignInEnrollment], hiddenClass);\n }\n }\n const loyaltyIsImage = queryFirst('.is-drawer-img', loyaltyContainer);\n desktopImg = loyaltyIsImage.dataset.desktopImg;\n mobileImg = loyaltyIsImage.dataset.mobileImg;\n hideShowDrawerImage(mobileImg, desktopImg);\n } else {\n const loyaltyContainer = queryFirst('.loyalty-how-to-earn-drawer-body');\n loyaltyContainer.innerHTML = data;\n const loyaltyIsImage = queryFirst('.is-how-to-earn-drawer-img', loyaltyContainer);\n desktopImg = loyaltyIsImage.dataset.desktopImg;\n mobileImg = loyaltyIsImage.dataset.mobileImg;\n const title = loyaltyIsImage.dataset.title;\n const closeButtonLabel = loyaltyIsImage.dataset.closeButton;\n showHowToEarnDrawerImage(mobileImg, desktopImg, title, closeButtonLabel);\n }\n $.spinner().stop();\n }\n },\n error: function (err) {\n $.spinner().stop();\n }\n });\n })\n },\n loyaltyEnrollNowDialog: function () {\n $body.on('click', '.loyalty-enrollnow-cta', function (e) {\n e.preventDefault();\n $('#loyalty-enrollnow-modal').modal('show');\n const loyaltyEnrollPostalCodeContainer = queryFirst('.js-loyalty-access-postal-code');\n const loyaltyEnrollPostalEl = queryFirst('.loyalty-access-form-postalcode', loyaltyEnrollPostalCodeContainer);\n const loyaltyEnrollCheckboxEl = queryFirst('.optin-to-loyalty-program');\n const loyaltyEnrollNowEl = queryFirst('.loyalty-get-access');\n loyaltyEnrollNowEl.dataset.enrollNowSource = MY_ACCOUNT;\n const loyaltyRemoveClass = [];\n if (!hasClass(loyaltyEnrollPostalCodeContainer, hiddenClass)) {\n loyaltyRemoveClass.push(loyaltyEnrollPostalEl);\n loyaltyEnrollPostalEl.value = '';\n }\n if (loyaltyEnrollCheckboxEl) {\n loyaltyRemoveClass.push(loyaltyEnrollCheckboxEl);\n loyaltyEnrollCheckboxEl.checked = false;\n }\n removeClass(loyaltyRemoveClass, invalidClass);\n });\n $body.on('click', '.loyalty-early-access-welcome-cta', function (e) {\n location.reload();\n });\n },\n loyaltyEnrollNowSubmit: function () {\n $('form.loyalty-get-access').off('submit').on('submit', function (e) {\n e.preventDefault();\n const postalCodeEl = queryFirst('.loyalty-access-form-postalcode');\n const referrerIDEl = queryFirst('.referrerID');\n const postalCodeRegex = postalCodeEl ? new RegExp(postalCodeEl.dataset.regexp) : '';\n const postalCode = postalCodeEl ? postalCodeEl.value : '';\n const loyaltyEnrollNowEl = queryFirst('.loyalty-get-access');\n const source = loyaltyEnrollNowEl.dataset.enrollNowSource;\n const referrerID = referrerIDEl ? referrerIDEl.value : '';\n const invalidFeedback = queryFirst('#form-postalcode-error.invalid-feedback');\n if (postalCode && !postalCodeRegex.test(postalCode)) {\n if (invalidFeedback) {\n addClass(postalCodeEl, invalidClass);\n invalidFeedback.textContent = postalCodeEl.dataset.patternMismatch;\n }\n }\n else {\n $.spinner().start();\n let requestData = {\n postalCode,\n lillyLoyaltyProgram: true,\n source\n };\n if (referrerIDEl) {\n requestData = {\n postalCode,\n lillyLoyaltyProgram: true,\n referrerID\n };\n }\n const url = this.dataset.href;\n $.ajax({\n url: url,\n type: 'POST',\n data: requestData,\n dataType: 'html',\n success: function (data) {\n const responseData = JSON.parse(data);\n if (responseData.success) {\n $('#loyalty-enrollnow-modal').modal('hide');\n $('#loyalty-welcome-popup').modal('show');\n }\n $.spinner().stop();\n },\n error: function (err) {\n $.spinner().stop();\n }\n });\n }\n\n });\n const loyaltyUnenrollDashboard = queryFirst('.loyalty-dashboard-unenroll');\n $(loyaltyWelcomeDialog).on('hidden.bs.modal', function () {\n if (loyaltyUnenrollDashboard) {\n location.reload();\n }\n });\n const accountLoyaltyDashboard = queryFirst('.account-lilly-loyalty');\n if (accountLoyaltyDashboard && accountLoyaltyDashboard.dataset.showWelcomePopup === 'true') {\n $('#loyalty-welcome-popup').modal('show');\n removeWelcomeModalShowSession();\n }\n },\n loyaltyDashboardShow: function () {\n $('.loyalty-dashboard-link').off('click').on('click', function (e) {\n e.preventDefault();\n const url = this.dataset.checkLoyaltyAccess;\n $.spinner().start();\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n if (!data) {\n $.spinner().stop();\n return false;\n }\n if (data.showEnrollmentModel) {\n $body.trigger('clubLilly:EnrollModal');\n if (data.imageUrls) {\n const modelImages = data.imageUrls;\n const enrollmentModel = $('.loyalty-enroll-now-container');\n const welcomeModel = $('.loyalty-welcome-popup');\n enrollmentModel.find('.drawer-image-source').attr('srcset', modelImages.loyaltyaccesspopupmobile);\n enrollmentModel.find('.drawer-image').attr('src', modelImages.LoyaltyguestenrollmentnonloyaltyD2x);\n welcomeModel.find('.drawer-image-source').attr('srcset', modelImages.loyaltywelcomepopupmobile);\n welcomeModel.find('.drawer-image').attr('src', modelImages.LoyaltywelcomeloyaltyD2x);\n $('#loyalty-enrollnow-modal').modal('show');\n }\n } else {\n window.location.href = data.redirectUrl;\n }\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n loyaltyDashboardOffersTile: function () {\n const offerExpirationDateEl = queryAll('.offer-expiration-date');\n offerExpirationDateEl.forEach(el => {\n const expirationDateTime = el.textContent;\n el.textContent = expirationDateTime.split(' ')[0];\n });\n $body.on('click', '.flip-card-front', function (e) {\n e.preventDefault();\n const cardFlippedEl = this.closest('.offer-flip-card');\n const cardFront = queryFirst('.flip-card-front', cardFlippedEl);\n addClass(cardFlippedEl, 'offer-card-flipped');\n cardFront.style.pointerEvents = 'none';\n });\n $body.on('click', '.reveal-state-done', function (e) {\n e.preventDefault();\n const cardFlippedEl = this.closest('.offer-flip-card');\n const cardFront = queryFirst('.flip-card-front', cardFlippedEl);\n removeClass(cardFlippedEl, 'offer-card-flipped');\n cardFront.style.pointerEvents = 'unset';\n });\n $body.on('click', '.view-copy-code-cta', function (e) {\n e.preventDefault();\n const { target, expiryDate, couponCode, formatString } = e.target.dataset;\n const offerDiscountDialog = queryFirst(target);\n const offerDiscountTileData = queryFirst('.offer-tile-content', offerDiscountDialog);\n const offerDiscountModalData = queryFirst('.offer-code-modal-content', offerDiscountDialog);\n const copyCodeText = queryFirst('.copy-code-section .code-section', offerDiscountDialog);\n queryFirst('.coupon-expiry .expiry-date', offerDiscountDialog).textContent = getFormatDateString(expiryDate, formatString);\n copyCodeText.textContent = couponCode;\n addClass(offerDiscountTileData, hiddenClass);\n removeClass(offerDiscountModalData, hiddenClass);\n $(offerDiscountDialog).modal('show');\n copyCodeText.select();\n copyCodeText.setSelectionRange(0, 99999); /* For mobile devices */\n /* Copy the text */\n navigator.clipboard.writeText(copyCodeText.value);\n });\n },\n loyaltyReferralDrawer: function () {\n $body.on('click', '.loyalty-referral-drawer-link', function (e) {\n const referralUrlElement = queryFirst('.referral-drawer-link');\n $('.referral-link').val((referralUrlElement.dataset.referralUrl).replace('https://', ''));\n $body.addClass('referral-modal');\n });\n },\n loyaltyCopyReferralUrl: function () {\n $body.on('click', '.referral-cta-link', function (e) {\n const copyReferralUrl = queryFirst('.referral-link');\n const copyCta = queryFirst('.referral-cta-link');\n const copiedLinkCta = queryFirst('.copied-link');\n const referralUrlElement = queryFirst('.referral-drawer-link');\n copyReferralUrl.select();\n copyReferralUrl.setSelectionRange(0, 99999); /* For mobile devices */\n\n /* Copy the text */\n navigator.clipboard.writeText(referralUrlElement.dataset.referralUrl).then(function () {\n /* clipboard successfully set */\n addClass(copyCta, hiddenClass);\n removeClass(copiedLinkCta, hiddenClass);\n setTimeout(function () {\n removeClass(copyCta, hiddenClass);\n addClass(copiedLinkCta, hiddenClass);\n }, 3000);\n });\n });\n },\n loyaltyOopsRefreshSection: function (e) {\n $body.on('click', '.error-refresh-link', function (e) {\n e.preventDefault();\n const url = this.dataset.referralUrl;\n const successServiceResData = this.closest('.service-response-section');\n if (!successServiceResData) {\n location.reload();\n }\n const tooltipModule = queryFirst('.tool-tip-content', successServiceResData);\n const tooltipInnerData = queryFirst('.' + tooltipModule.id);\n $.spinner().start();\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n if (!data.error) {\n if (successServiceResData) {\n successServiceResData.innerHTML = data.serviceResHTMLData;\n const updatedToolTip = queryFirst('.tool-tip-content', successServiceResData);\n if (updatedToolTip && tooltipInnerData) {\n updatedToolTip.innerHTML = tooltipInnerData.innerHTML;\n const popContent = queryFirst('.loyalty-tooltip-popover', updatedToolTip);\n const tooltipIcon = queryFirst('.loyalty-tooltip-icon', updatedToolTip);\n $(tooltipIcon).popover({\n trigger: 'click',\n placement: 'auto',\n html: true,\n content: popContent\n });\n $('[data-toggle=\"popover\"]').on('shown.bs.popover', function (e) {\n const { target } = e;\n $body.one('click', function (clickEvent) {\n const clicked = clickEvent.target;\n if (clicked !== target && clicked.parentElement !== target && $('.popover.show').length) {\n $(target).trigger('click');\n }\n });\n });\n const scrollableContent = queryFirst('.scrollable-content', successServiceResData);\n if (scrollableContent) initSpecificCarousel(scrollableContent);\n }\n updateReferralBg();\n init();\n }\n }\n $.spinner().stop();\n },\n error: function (err) {\n $.spinner().stop();\n }\n });\n });\n },\n referralModuleBg: function (e) {\n updateReferralBg();\n const referralSection = queryFirst('.referral-section-bg-color');\n removeClass(referralSection, hiddenClass);\n },\n loyaltyEarlyAccessSignUp: function () {\n $body.on('click', '.early-access-registered .early-access-sign-up', function (e) {\n e.preventDefault();\n handleEarlyAccessEnrollModal();\n });\n\n $body.on('click', '.early-access-register-form-cancel', function (e) {\n e.preventDefault();\n $(loyaltyEarlyAccessRegisterForm).modal('hide');\n });\n },\n\n init: init,\n handleEarlyAccessLogin: handleEarlyAccessLogin\n};\n\nwindow.addEventListener('resize', throttle(() => {\n if (mobileImg || desktopImg) {\n hideShowDrawerImage(mobileImg, desktopImg);\n }\n updateReferralBg();\n}));\n","'use strict';\n\n/**\n * Helper module for initialization popover elements\n *\n * @module popover\n */\n\nconst { queryFirst, queryAll, hasClass } = require('./domUtil');\n\nconst phInfoPopover = queryFirst('.ph-number-info-popover .content-asset');\nconst fpoInfoPopover = queryFirst('.fpo-info-popover .content-asset');\nconst checkoutBenefitsInfoPopover = queryFirst('.checkout-benefits-info .checkout-benefits-info-content');\nconst cvvInfoPopover = queryFirst('.cvv-info-popover .cvv-info-popover-content');\nconst giftCardInfoPopover = queryFirst('.gift-card-number-info-popover .content-asset');\nconst birthdayInfoPopover = queryFirst('.birthday-info-popover .content-asset');\nconst deliveryFeeInfoPopover = queryFirst('.delivery-fee-info-popover .content-asset');\nconst boltSignoutMessage = queryFirst('.bolt-logout-button .bolt-sign-out');\nconst earlyAccessMessage = queryFirst('.loyalty-early-access-lock-container .early-access-container-tooltip');\nconst giftReturnNumberInfoPopover = queryFirst('.gift-return-order-no-popover .content-asset');\nconst keepUserSignedInPopover = queryFirst('.remember-me .keep-user-signed-in');\nconst keepUserSignedInContainer = queryFirst('.remember-me .logged-in-user-notification');\nconst earlyAccessLockedSelector = '.loyalty-early-access-locked';\nconst pdpChatWrapper = queryFirst('.pdp-chat');\nconst pdpChatPopover = queryFirst('.pdp-chat-label');\nconst pdpChatContainer = queryFirst('.pdp-chat-container');\n\nconst initPopover = (selector, ...options) => $(selector).popover(Object.assign({}, ...options));\n\n// default popover options\nconst POPOVER_CLICK_BOTTOM = {\n trigger: 'click',\n placement: 'bottom',\n html: true\n};\n/*\n * Handle clicks outside of popover in order to close it\n */\nconst initPopoverClose = () => {\n // since it can be called dynamically, first we get rid of old events\n $('[data-toggle=\"popover\"]')\n .off('shown.bs.popover')\n .on('shown.bs.popover', function (e) {\n const { target } = e;\n $(document).one('click', function (clickEvent) {\n const clicked = clickEvent.target;\n if (clicked !== target && clicked.parentElement !== target && $('.popover.show').length) {\n $(target).trigger('click');\n }\n });\n });\n};\n/*\n * Assign custom close event on custom selector\n */\nconst initPopoverCloseSelector = () => {\n $('[data-close-popover-selector]').on('click', function () {\n const tooltipSelector = $(this).data('close-popover-selector');\n $(tooltipSelector).popover('hide');\n });\n};\n\n/**\n * Initializing popover for promotions on a page\n */\nconst initPopoverPromotions = () => {\n queryAll('.promotions-info').forEach((button) => {\n const popoverContent = queryFirst('.promotions-info-popover .promotions-info-popover-content', button.parentElement);\n\n $(button).popover({\n trigger: 'click',\n placement: 'bottom',\n html: true,\n content: popoverContent\n });\n });\n};\n/**\n * Initializing popover for strike hearts on a page\n */\nconst initPopoverWishList = () => {\n queryAll('.strike-wish-list').forEach((button) => {\n const popoverContent = button.dataset.content;\n $(button).popover({\n trigger: 'click',\n placement: 'bottom',\n html: true,\n content: popoverContent\n });\n });\n};\n\n/**\n * Early access locked message popover\n */\nconst initPopoverEarlyAccessLocked = () => {\n const earlyAccessMessage = queryFirst('.loyalty-early-access-lock-container .early-access-container-tooltip');\n\n if (hasClass(queryFirst(earlyAccessLockedSelector), 'has-early-access-container')) {\n initPopover(earlyAccessLockedSelector, POPOVER_CLICK_BOTTOM, {\n content: earlyAccessMessage\n });\n }\n};\n\n/**\n * All of usual popover elements on site\n * TODO: Ideally refactor to something dynamical, when it appear in DOM - initialize it\n */\nconst initPopoverAll = () => {\n initPopover('.ph-number-info', POPOVER_CLICK_BOTTOM, {\n content: phInfoPopover\n });\n\n const popoverIcons = queryAll('.loyalty-tooltip-icon');\n popoverIcons.forEach((tooltipIcon) => {\n const popContent = queryFirst('.loyalty-tooltip-popover', tooltipIcon.parentElement);\n\n initPopover(tooltipIcon, POPOVER_CLICK_BOTTOM, {\n content: popContent,\n placement: 'auto'\n });\n });\n\n initPopover('.birthday-info', POPOVER_CLICK_BOTTOM, {\n content: birthdayInfoPopover\n });\n\n initPopover('.fpo-info', POPOVER_CLICK_BOTTOM, {\n content: fpoInfoPopover\n });\n\n initPopover('.checkout-benefits-info', POPOVER_CLICK_BOTTOM, {\n container: '.new-customers',\n offset: '160 0',\n content: checkoutBenefitsInfoPopover\n });\n\n initPopover('.cvv-info', POPOVER_CLICK_BOTTOM, {\n content: cvvInfoPopover\n });\n\n initPopover('.gift-return-order-no', POPOVER_CLICK_BOTTOM, {\n content: giftReturnNumberInfoPopover\n });\n\n initPopover('.gift-card-number-info', POPOVER_CLICK_BOTTOM, {\n content: giftCardInfoPopover\n });\n\n initPopover('.delivery-fee-info', POPOVER_CLICK_BOTTOM, {\n content: deliveryFeeInfoPopover\n });\n\n initPopover('.bolt-logout-button-container', POPOVER_CLICK_BOTTOM, {\n content: boltSignoutMessage\n });\n\n initPopoverPromotions();\n initPopoverWishList();\n\n if (hasClass(queryFirst(earlyAccessLockedSelector), 'has-early-access-container')) {\n initPopover(earlyAccessLockedSelector, POPOVER_CLICK_BOTTOM, {\n content: earlyAccessMessage\n });\n }\n\n initPopover(keepUserSignedInPopover, POPOVER_CLICK_BOTTOM, {\n content: keepUserSignedInContainer\n });\n\n initPopover(pdpChatPopover, {\n html: true,\n container: pdpChatWrapper,\n placement: 'bottom',\n content: pdpChatContainer\n });\n\n initPopoverClose();\n initPopoverCloseSelector();\n};\n\nmodule.exports.POPOVER_CLICK_BOTTOM = POPOVER_CLICK_BOTTOM;\n// export the initialization function for places where popover may be initialized dynamically\nmodule.exports.initPopoverClose = initPopoverClose;\nmodule.exports.initPopoverCloseSelector = initPopoverCloseSelector;\n// export function for single initialization of popover\nmodule.exports.initPopover = initPopover;\nmodule.exports.initPopoverPromotions = initPopoverPromotions;\nmodule.exports.initPopoverEarlyAccessLocked = initPopoverEarlyAccessLocked;\nmodule.exports.initPopoverAll = initPopoverAll;\nmodule.exports.initPopoverWishList = initPopoverWishList;\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';\nconst focusHelper = require('base/components/focus');\nimport { queryFirst, queryAll, addClass, removeClass, hasClass, remove, renderFragment, toFormData } from '../domUtil';\nimport { formatMessage, getJSON, getNestedValue, tokenize } from '../util';\nimport { updateProductData, handleColor } from 'fitpredictor/product/secretsauce';\nimport { getStoredDataLayerInfo } from 'analytics/util/analytics-util';\nimport { P_PRODUCT_LIST_KEY, P_PROMO_NAME_KEY, P_PROMO_CREATIVE_NAME } from 'analytics/util/constants';\nimport { setWishlistProductId, showStrikeHearts } from '../wishlist/helper';\n\nconst { trackPageView } = require('../components/etmc');\nconst { toggleSelectSizeInfo, isEarlyAccessElement } = require('./helper');\nconst { swatchNameTemplate, sizeOptionTemplate, sizeButtonTemplate, gwpSizeTemplate, dialogTemplate, loyalty: loyaltyTemplates } = 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 } = 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, 'lillyUtils.profile') || {};\nconst { isLoyaltyProgramMember, isLoyaltyAuthenticated, isLoyaltyEnabled } = loyaltyProfile;\nlet observer;\nlet isContentModulesFetched = false;\n\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).closest('.modal-content').find('.product-quickview').attr('data-pid');\n } else if ($('.quickview-container').length && !$('.product-set').length) {\n pid = $($el).closest('.quickview-container').find('.product-quickview').attr('data-pid');\n } else if ($('.product-set-detail').length || $('.product-set').length) {\n pid = $($el).closest('.product-detail').find('.product-id').first().text();\n } else {\n pid = $($el).closest('.product-detail').find('.product-id').first().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) {\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}\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) {\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 var $attr = '[data-attr=\"' + attr.id + '\"]';\n const selectSizeEl = $productContainer.find('.select-size')[0];\n let selectedValue = '';\n if (selectSizeEl) {\n $(selectSizeEl).find('option').not(':first').remove();\n $(selectSizeEl).find('option:first').attr('value', attr.resetUrl);\n }\n attr.values.forEach(function (attrValue) {\n if (selectSizeEl) {\n const assistiveElement = queryFirst('.selected-assistive-text', selectSizeEl.closest('.size-list'));\n assistiveElement.textContent = selectSizeEl.selectedOptions[0].dataset.attrValue;\n if (!attrValue.isOffline) {\n selectSizeEl.innerHTML += sizeOptionTemplate(attrValue.url, attrValue.value);\n }\n if (attrValue.selected) {\n selectedValue = attrValue.value;\n }\n } else {\n var $attrValue = $productContainer.find($attr + ' [data-attr-value=\"' + attrValue.value + '\"]');\n const sizeListItemEl = $attrValue.closest('.size-list');\n if (!attrValue.isOffline) {\n sizeListItemEl.removeClass(hiddenClass);\n } else {\n sizeListItemEl.addClass(hiddenClass);\n }\n if ($attrValue.length > 0) {\n $attrValue.val(attrValue.url).attr('data-attr-url', attrValue.url).removeClass(notAvailable);\n const assistiveElement = queryFirst('.selected-assistive-text', $attrValue[0].closest('.size-list'));\n assistiveElement.textContent = '';\n const { selectedText, outOfStock } = assistiveElement.dataset;\n if (hasClass($attrValue[0], 'selected')) {\n assistiveElement.textContent += selectedText;\n }\n if (!attrValue.inStock || attrValue.forceOutOfStock) {\n $attrValue.addClass(notAvailable);\n assistiveElement.textContent += outOfStock;\n }\n }\n }\n });\n if (selectSizeEl && selectedValue) {\n const optionEl = queryFirst('[data-attr-value=\"' + selectedValue + '\"]', selectSizeEl);\n if (optionEl) {\n optionEl.selected = true;\n } else {\n selectSizeEl.selectedIndex = 0;\n }\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) {\n // Currently, the only attribute type that has image swatches is Color.\n var attrsWithSwatches = ['color'];\n\n attrs.forEach(function (attr) {\n if (attrsWithSwatches.indexOf(attr.id) > -1) {\n processSwatchValues(attr, $productContainer, msgs);\n } else {\n processNonSwatchValues(attr, $productContainer);\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 = `
  • ${availabilityMsgEl.dataset.notPurchasable}

  • `;\n } else if (response.product.readyToOrder) {\n availabilityMessages.forEach(function (message) {\n availabilityValue += `
  • \n ${message}\n

  • `;\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 += '
    ' + attribute.label + ': ' + attribute.value + '
    ';\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 {boolean} earlyAccessText - Early Access badge text\n * @param {string} videoUrl - Selected variant group video url\n */\nfunction createCarousel(imgs, $productContainer, isEarlyAccess, earlyAccessText, videoUrl) {\n var carousel = $productContainer.find('.carousel:not(.tile-carousel)');\n $(carousel).carousel('dispose');\n var carouselId = $(carousel).attr('id');\n\n const displayCounter = $productContainer.hasClass('product-quickview');\n\n $(carousel)\n .empty()\n .append(\n '
      ' +\n $(carousel).data('prev') +\n '' +\n $(carousel).data('next') +\n ''\n );\n let i;\n for (i = 0; i < imgs.length; i++) {\n let counterHtml = '';\n if (displayCounter && imgs.length > 1) {\n counterHtml = `${i + 1} ${'/'} ${imgs.length}`;\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 '
      ' +\n (i === 0 && earlyAccessText ? formatMessage(loyaltyTemplates.carouselBadge, earlyAccessText) : '') +\n '\"' ' +\n counterHtml +\n '
      '\n ).appendTo($(carousel).find('.carousel-inner'));\n $(\n '
    1. '\n ).appendTo($(carousel).find('.carousel-indicators'));\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 const pdpNonEarlyAccessLoginEl = queryFirst('.pdp-sign-in-create-account-section', productContainer);\n\n if (pdpNonEarlyAccessLoginEl) {\n const { isLoyaltyEnabled } = pdpNonEarlyAccessLoginEl.dataset;\n if (isLoyaltyEnabled === 'true' && !isEarlyAccess) {\n removeClass(pdpNonEarlyAccessLoginEl, hiddenClass);\n } else {\n addClass(pdpNonEarlyAccessLoginEl, hiddenClass);\n }\n }\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', imgs[0].url);\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 $('
    2. ').appendTo(\n $(carousel).find('.carousel-indicators')\n );\n }\n $($(carousel).find('.carousel-item')).first().addClass('active');\n $($(carousel).find('.carousel-indicators > li')).first().addClass('active');\n if (imgs.length === 1) {\n $($(carousel).find('.carousel-indicators, a[class^=\"carousel-control-\"]')).detach();\n }\n $(carousel).carousel();\n $($(carousel).find('.carousel-indicators')).attr('aria-hidden', true);\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) {\n var isChoiceOfBonusProducts = $productContainer.parents('.choose-bonus-product-dialog').length > 0;\n const { variationAttributes, productType, readyToOrder, bonusVariationAtrributes, isFinalSale, isDirectlyPurchasable, earlyAccess } = 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);\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);\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);\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 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').find('.promotions-info').popover({\n trigger: 'click',\n placement: 'bottom',\n html: true,\n content: promotionsPopover\n });\n $('[data-toggle=\"popover\"]').off('shown.bs.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.find('.main-attributes').empty().html(getAttributesHtml(response.product.attributes));\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 '';\n })\n .join('');\n getQuantitySelector($productContainer).empty().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 },\n error: function () {\n $.spinner().stop();\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 {string} selectedValueUrl - the Url for the selected variation value\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction selectColorAttribute(selectedValueUrl, $productContainer) {\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);\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 assistiveElements.forEach(eachElement => {\n eachElement.textContent = '';\n });\n assistiveTextElement.textContent = assistiveTextElement.dataset.selectedText;\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 = '
      ';\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 };\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 to update Ways to wear content based on the response\n * @param {string} groupId - selected variation group id\n * @param {string} variationUrl - url to fetch the content\n * @param {HTMLElement} waysToWearContainer - container with recommendations\n */\nfunction updateContentModules(groupId, variationUrl, waysToWearContainer, entry) {\n if (isContentModulesFetched || !entry.isIntersecting) { return; }\n\n $(waysToWearContainer).spinner().start();\n $.ajax({\n url: variationUrl,\n method: 'post',\n data: {\n variationGroup: groupId\n }\n }).done(function (response) {\n if (response) {\n waysToWearContainer.innerHTML = response;\n } else {\n waysToWearContainer.innerHTML = '';\n }\n $body.trigger('search:updateProducts');\n }).always(function () {\n $(waysToWearContainer).spinner().stop();\n isContentModulesFetched = true;\n });\n\n destroyContentModulesIntersectionObserver(waysToWearContainer);\n}\n\n/**\n * Fetch Ways to Wear components only when user scroll near their position\n * @param {string} groupId - selected variation group id\n * @param {string} variationUrl - url to fetch the content\n */\nfunction dynamicallyFetchContentModules(groupId, variationUrl) {\n const waysToWearContainer = queryFirst('.ways-to-wear');\n if (!waysToWearContainer) { return; }\n\n observer = new IntersectionObserver(\n ([entry]) => updateContentModules(groupId, variationUrl, waysToWearContainer, entry),\n { rootMargin: '500px', threshold: 0 }\n );\n observer.observe(waysToWearContainer);\n}\n\n/**\n * Destroy Intersection Observer of Ways to Wear components since it needed only once\n * @param {HTMLElement} waysToWearContainer - container with recommendations\n */\nfunction destroyContentModulesIntersectionObserver(waysToWearContainer) {\n if (observer instanceof IntersectionObserver) {\n observer.unobserve(waysToWearContainer);\n observer = null;\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 { promotionMessageTmpl } = require('../templates').productDetail;\n const { initPopoverPromotions, initPopoverClose } = require('../popover');\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, variantsList, mgFlag, mgLocs, hasWaysToWear, isFinalSale, isDirectlyPurchasable, earlyAccess, promotions } = productInfo.variants[variantGroupId];\n productContainer.dataset.wishlistId = groupId;\n setWishlistProductId(groupId, productContainer);\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 const earlyAccessBadgeTextEl = queryFirst('.loyalty-product-pdp-badge .product-tile-badge-text', productContainer);\n const earlyAccessText = earlyAccessBadgeTextEl.textContent;\n // update Marketing Analytics trackWishlist event\n let marketingCloudPageAnalytics = [{ item: groupId }];\n trackPageView(marketingCloudPageAnalytics);\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: '' }, '
    3. {{', '}}
    4. ');\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 isContentModulesFetched = false;\n dynamicallyFetchContentModules(groupId, variationGridUrl);\n } else {\n waysToWearEl.innerHTML = '';\n }\n updateSizeElements(sizes, productContainer, variantsList);\n\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 // update promotion messages display for selected color (size not selected yet here)\n queryFirst('.promotions').innerHTML = promotions ? promotions.filter((promotion) => promotion.calloutMsg).map((promotion, promotionIdx) => {\n return promotionMessageTmpl(promotion.calloutMsg, promotion.details, promotionIdx);\n }).join('') : '';\n // pick new promotion popover elements\n initPopoverPromotions();\n initPopoverClose();\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, earlyAccessText, videoUrl);\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 setWishlistProductId(groupId, productContainer);\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 = $('
      ').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').spinner().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.find('.modal-footer, .selected-products-container').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('
      ');\n }\n\n $('.add-to-cart-messages').append('
      ' + response.message + '
      ');\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).find('.product-id').text(),\n quantity: parseInt($(this).find('label.quantity').data('quantity'), 10)\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:not(.select-add):not(.select-remove), select', container);\n const blocker = queryAll('.bonus-product-blocker', container);\n const blockerActiveClass = 'active';\n\n controls.forEach(control => {\n control.disabled = !enable;\n });\n\n if (enable) {\n blocker.forEach(blockElement => {\n const sizeElement = queryFirst('select', blockElement.closest('.product-detail'));\n\n if (sizeElement) {\n $(sizeElement).trigger('change');\n }\n });\n\n removeClass(blocker, blockerActiveClass);\n } else {\n addClass(blocker, blockerActiveClass);\n }\n}\n\n/**\n * Get analytics data to be associated with a product line item when adding to cart\n * @returns {Object} analytics data\n */\nfunction getAddToCartAnalyticsData() {\n const promoName = getStoredDataLayerInfo(P_PROMO_NAME_KEY);\n const promoCreativeName = getStoredDataLayerInfo(P_PROMO_CREATIVE_NAME);\n const listName = getStoredDataLayerInfo(P_PRODUCT_LIST_KEY);\n const data = {};\n\n if (promoName && Array.isArray(promoName)) data.utagPromoName = promoName[0]; // promo_name should always be an array, but we don't want to store it that way on the BE\n if (promoCreativeName && Array.isArray(promoCreativeName)) data.utagPromoCreativeName = promoCreativeName[0];\n if (listName) data.utagListName = listName;\n\n return data;\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', function (e) {\n e.preventDefault();\n const productDetailContainer = queryFirst(PRODUCT_DETAIL_CONTAINER_SELECTOR);\n\n if ($(this).attr('disabled') || hasClass(queryFirst('.swatch-circle', this), 'selected')) {\n return;\n }\n var $productContainer = $(this).closest('.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 $productContainer = $(this).closest('.product-detail');\n updateProductDetails(this, $productContainer);\n } else {\n selectColorAttribute($(this).attr('data-url'), $productContainer);\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, wishlistDisabled, isFinalSale } = productInfo.variants[variantGroupId];\n\n updateSizeElements(sizes, productContainer, variantsList);\n if (!isDirectlyPurchasable) {\n const sizeElements = queryAll('.size-btn', productContainer);\n addClass(sizeElements, notAvailable);\n }\n if (wishlistDisabled || !isDirectlyPurchasable || isFinalSale) {\n showStrikeHearts(productContainer);\n }\n }\n\n $body.trigger('product:updateStoreInventory', {\n productContainer: productContainer\n });\n }\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).closest('.modal-content').find('.product-quickview');\n }\n\n if ($('.bundle-items', $productContainer).length === 0) {\n attributeSelect($(e.currentTarget).find('option:selected').data('url'), $productContainer);\n }\n });\n },\n\n addToCart: () => {\n $(document).on('click', 'button.add-to-cart, button.add-to-cart-global', async e => {\n // Elements\n const { target } = e;\n const $target = $(target);\n const productContainer = target.closest('.product-detail');\n const $productContainer = $(productContainer);\n const storeLocatorContainer = queryFirst('.store-locator-container');\n const ispuAddToCart = queryFirst('.add-to-cart', storeLocatorContainer);\n\n if (ispuAddToCart) {\n ispuAddToCart.disabled = true;\n }\n\n const pdpSetData = {};\n let isPDPSet = false;\n\n // PDP Set - add all to cart button\n if (hasClass(target, 'add-to-cart-global')) {\n isPDPSet = true;\n const setPids = [];\n\n const setModal = target.closest('.custom-set-detail-modal');\n // all visible set products -- \"removed\" set products are not included (removed set products do not have the custom-set-product class)\n const modalProducts = queryAll('.custom-set-items.set-items .custom-set-product', setModal);\n\n // set products which have a selected size\n const sizeSelectedProducts = modalProducts.filter(modalProduct => {\n toggleSelectSizeInfo(modalProduct);\n const sizeSelected = queryFirst('.size-btn.selected', modalProduct);\n\n if (sizeSelected) {\n // collect some data for the ATC call while we're looping anyway\n setPids.push({\n pid: queryFirst('.product-id', modalProduct)?.textContent,\n options: getOptions($(modalProduct))\n });\n }\n\n return !!sizeSelected;\n });\n\n // exit if not all sizes are selected\n if (sizeSelectedProducts.length !== modalProducts.length) {\n return;\n }\n\n Object.assign(pdpSetData, {\n pidsObj: JSON.stringify(setPids)\n });\n } else {\n // Not PDP Set -- Check if size is selected on single product PDP\n toggleSelectSizeInfo(productContainer);\n if (!queryFirst('.size-btn.selected', productContainer)) {\n return;\n }\n }\n\n $body.trigger('product:beforeAddToCart', target);\n\n const analyticsData = getAddToCartAnalyticsData();\n\n const form = {\n pid: getPidValue($target),\n childProducts: getChildProducts(),\n ...pdpSetData,\n ...analyticsData\n };\n\n if (!$('.bundle-item').length) {\n form.options = getOptions($productContainer);\n }\n\n $target.trigger('updateAddToCartFormData', form);\n\n let addToCartUrl = getAddToCartUrl();\n\n // it needs for cases when mincart has a recommendation block with empty value in the '.add-to-cart-url'\n if (!addToCartUrl && hasClass(productContainer, 'is-stylitics-gallery')) {\n let closestUrl = queryFirst('.add-to-cart-url', productContainer);\n if (closestUrl && closestUrl.value) addToCartUrl = closestUrl.value;\n }\n\n if (addToCartUrl) {\n try {\n const res = await fetch(addToCartUrl, {\n method: 'POST',\n body: toFormData(form)\n });\n\n if (!res.ok) throw new Error('Add to cart response was not OK');\n\n const resData = await res.json();\n\n if (isPDPSet) {\n $('#productSetModal').modal('hide');\n }\n\n if (ispuAddToCart) {\n ispuAddToCart.disabled = false;\n $productContainer.find('.lp-slideout-modal[id*=\"pick-up-in-store\"]').modal('hide');\n }\n\n handlePostCartAdd(resData);\n\n $.spinner().stop();\n $body.trigger('product:afterAddToCart', resData);\n\n // send analytics data (trackAddItemToCart) if it is Stylitics Gallery QuickView on PLP\n // and Stylitics Gallery Widget exists\n if (hasClass(productContainer, 'is-stylitics-gallery')) {\n $body.trigger('stylitics:gallery:addItem', {\n pid: form.pid,\n price: queryFirst('.price-section .sales .ssSalesPrice', productContainer)?.value\n });\n }\n } catch (err) {\n $.spinner().stop();\n if (ispuAddToCart) {\n ispuAddToCart.disabled = false;\n }\n console.error('addToCart error:', err.message);\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).find('.choice-of-bonus-product').find('.select-bonus-product, .color-attribute, select').removeAttr('tabindex');\n } else {\n $(accordionContainer).find('.choice-of-bonus-product:not(.selected-product)').find('.select-bonus-product, .color-attribute, select').attr('tabindex', -1);\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 '
      ' +\n '
      ' +\n $choiceOfBonusProduct.find('.product-name').html() +\n '
      ' +\n '
      ' +\n '
      ';\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 const bonusDrawer = document.getElementById('chooseBonusProductModal');\n\n if (bonusDrawer) {\n bonusDrawer.addEventListener('click', e => {\n const { target } = e;\n if (hasClass(target, 'bonus-product-blocker') || hasClass(target, 'select-add') || hasClass(target, 'select-remove')) {\n e.preventDefault();\n const bonusTile = target.closest('.choice-of-bonus-product-tile');\n if (bonusTile) {\n const targetCheckbox = queryFirst('.select-bonus-product', bonusTile);\n\n if (!targetCheckbox.checked) {\n // unselect the checked checkbox as long as the user didn't click the already-checked option\n const accordion = bonusTile.closest('.bonus-acordion-container');\n const checkedBox = queryFirst('input:checked', accordion);\n if (checkedBox) {\n checkedBox.click();\n }\n }\n\n // toggle the checkbox for the clicked tile\n targetCheckbox.click();\n }\n }\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').spinner().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').spinner().stop();\n },\n error: function () {\n $('.modal-content').spinner().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('
      ');\n }\n $('.add-to-cart-messages').append('
      ' + data.errorMessage + '
      ');\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};\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';\n\nconst { isShippingPreferencesViewEnabled, isEarlyAccessElement } = require('./helper');\nconst { availabilityMessageTmpl, availabilityMessageOOS, availabilityMessagePreorder, ispuAvailabilityMessageTmpl, ispuLowStockMessageTmpl, promotionMessageTmpl } = 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 { 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');\nconst { handleEarlyAccessLogin } = require('../loyalty/loyaltyDrawer');\nconst { initPopoverPromotions, initPopoverClose, initPopoverCloseSelector, initPopoverWishList } = require('../popover');\nimport { getNestedValue } from '../util';\nimport { hideStrikeHearts, setWishlistProductId, showStrikeHearts } from '../wishlist/helper';\n\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) {\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\n $productContainer.find('.selected-swatch-name').text(selectedSwatchObject ? selectedSwatchObject.displayValue : '');\n }\n }\n}\n\n/**\n * This method manages Notify me dialog content.\n *\n * !! For inline NotifyMe box please see handleNotifyMeBlock method\n *\n * @param {Object} productData - Product data\n * @param {Object} productContainer - Product Container DOM element\n */\nfunction handleNotifyMe(productData, productContainer) {\n const addToCartSection = queryFirst('.prices-add-to-cart-actions', productContainer);\n const notifyContainer = queryFirst('.js-notify-me-container', productContainer);\n const notifyMeButton = queryFirst('.notify-me-btn', productContainer);\n const notifyMeDesc = queryFirst('.js-notify-me-desc', productContainer);\n const availabilityMessageEl = queryFirst('.product-availability', productContainer);\n const hiddenClass = 'd-none';\n const { available, isNotifyMeEnabled, id, formattedPrice, 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('.js-notify-img img', notifyContainer);\n if (imageData && notifyImageElement) {\n const { alt, url, srcset } = imageData[0];\n const imageHasLoaded = hasClass(notifyImageElement, 'lz-loaded');\n\n notifyImageElement.setAttribute(imageHasLoaded ? 'src' : 'data-src', url);\n notifyImageElement.setAttribute(imageHasLoaded ? 'srcset' : 'data-srcset', srcset);\n notifyImageElement.setAttribute('alt', alt);\n }\n // Insert price\n queryFirst('.js-notify-price', notifyContainer).textContent = formattedPrice;\n // Insert color value\n const notifyColor = queryFirst('.js-notify-color', notifyContainer);\n queryFirst('.js-notify-color-label', notifyColor).textContent = queryFirst('.selected-swatch', productContainer).dataset.colorLabel;\n queryFirst('.js-notify-color-value', notifyColor).textContent = queryFirst('.ssColor', productContainer).value;\n // Insert size value\n const notifySize = queryFirst('.js-notify-size', notifyContainer);\n queryFirst('.js-notify-size-label', notifySize).textContent = queryFirst('.size-display-name', productContainer).value + ':';\n queryFirst('.js-notify-size-value', notifySize).textContent = queryFirst('.size-btn.selected', productContainer).dataset.attrValue;\n if (id) {\n document.getElementById('notifySku').value = id;\n }\n const customerEmail = (document.getElementById('notifyEmail') || {}).value;\n if (customerEmail) {\n queryFirst('.notify-email').value = customerEmail;\n }\n removeClass(queryFirst('.js-notify-me-desc'), hiddenClass);\n removeClass(queryFirst('.js-notify-form'), hiddenClass);\n addClass(queryFirst('.js-notify-confirm-block'), 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 * handles size change\n * @param {Object} productContainer - product container html element\n * @param {string} selectedSizeValue - Selected size value\n */\nfunction onSizeChangeHandler(productContainer, selectedSizeValue) {\n removeClass(queryAll('.size-btn', productContainer), 'selected');\n addClass(this, 'selected');\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', productContainer), 'd-none');\n const selectedSize = queryFirst('.selected-size', productContainer);\n if (selectedSize) {\n selectedSize.textContent = selectedSizeValue;\n removeClass(selectedSize, 'd-none');\n }\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, wishlistDisabled, isFinalSale } = 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 hideStrikeHearts(productContainer);\n if (wishlistDisabled || !isDirectlyPurchasable || isFinalSale) {\n showStrikeHearts(productContainer);\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, isFinalSale: isFinalSaleVariant, isDirectlyPurchasable: isDirectlyPurchasableVariant, wishlistDisabled: wishlistDisabledVariant } = 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 hideStrikeHearts(productContainer);\n } else {\n addClass(currentSizeElement, 'not-available');\n addToCartButton.disabled = true;\n showStrikeHearts(productContainer);\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 setWishlistProductId(ID, productContainer);\n const productData = {\n available: !hasClass(currentSizeElement, 'not-available'),\n isNotifyMeEnabled,\n id: ID,\n formattedPrice,\n forceOutOfStock,\n imageData: ispu\n };\n if (wishlistDisabledVariant || !isDirectlyPurchasableVariant || isFinalSaleVariant) {\n showStrikeHearts(productContainer);\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\n $('body').trigger('product:afterQuickViewSizeChange', {\n ID,\n productContainer,\n monetateData: {\n pdpBreadCrumbs: variantGroupData.pdpBreadCrumbs\n }\n });\n}\n\n/**\n * This method manages Notify me block on PDP\n * @param {Object} productData - Product data\n * @param {Object} productContainer - Product Container DOM element\n */\nfunction handleNotifyMeBlock(productData, productContainer) {\n const addToCartSection = queryFirst('.prices-add-to-cart-actions', productContainer);\n const notifyBlock = queryFirst('.js-notify-me-container', productContainer);\n const availabilityMessageEl = queryFirst('.product-availability', productContainer);\n const { available, isNotifyMeEnabled, id, forceOutOfStock } = productData;\n if (!available && isNotifyMeEnabled && !forceOutOfStock) {\n addClass([addToCartSection, availabilityMessageEl], HIDDEN_CLASS);\n removeClass(notifyBlock, HIDDEN_CLASS);\n\n if (id) queryFirst('#notifySku', notifyBlock).value = id;\n const custEmail = (queryFirst('#notifyEmail') || {}).value;\n if (custEmail) queryFirst('.notify-email').value = custEmail;\n } else {\n removeClass([addToCartSection, availabilityMessageEl], HIDDEN_CLASS);\n addClass(notifyBlock, HIDDEN_CLASS);\n }\n}\n\n/**\n *\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 updateProductInfo(selectedSizeValue, selectedColorId, productContainer, currentSizeElement) {\n const masterId = productContainer.dataset.masterid;\n const productInfo = window.productInfo[masterId];\n const variantGroupData = productInfo.variants[selectedColorId];\n const { sizes, images, formattedPrice, totalPrice, monogramProductPrice, standardPrice, price, mgFlag, mgLocs, isDirectlyPurchasable, wishlistDisabled, isFinalSale } = variantGroupData;\n const ispu = base.updateImageDetails(images.ispu);\n const selectedSizeData = sizes[selectedSizeValue];\n const addToCartButton = queryFirst('.add-to-cart', productContainer);\n const monogramBtn = queryFirst('.monogram-btn', productContainer);\n const ispuButton = queryFirst('.btn-in-store-pickup');\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 let availabilityValue = '';\n\n hideStrikeHearts(productContainer);\n if (wishlistDisabled || !isDirectlyPurchasable || isFinalSale) {\n showStrikeHearts(productContainer);\n }\n\n if (!selectedSizeData || !currentSizeElement) {\n if (ispuButton) {\n ispuButton.disabled = true;\n }\n if (monogramBtn) {\n monogramBtn.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, promotions, isFinalSale: isFinalSaleVariant, isDirectlyPurchasable: isDirectlyPurchasableVariant, wishlistDisabled: wishlistDisabledVariant } = selectedSizeData;\n const { variants } = window.productInventory;\n const inventoryData = variants[ID];\n const { message, availabilityStatus, isLowInventory } = inventoryData;\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 if (shippingPreferencesEnabled && window.ispuProductInventory) {\n ispuVariants = window.ispuProductInventory.variants;\n ispuInventoryData = ispuVariants[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').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.pop().lastElementChild.href : null;\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) {\n addToCartButton.disabled = false;\n removeClass(currentSizeElement, 'not-available');\n hideStrikeHearts(productContainer);\n } else {\n addClass(currentSizeElement, 'not-available');\n addToCartButton.disabled = true;\n showStrikeHearts(productContainer);\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 if (availabilityStatus === PREORDER) {\n addClass(currentSizeElement, 'pre-order');\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 productContainer\n });\n }\n availabilityMsgEl.innerHTML = availabilityValue;\n productContainer.dataset.pid = ID;\n queryFirst('.product-id', productContainer).textContent = ID;\n setWishlistProductId(ID, productContainer);\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 if (wishlistDisabledVariant || !isDirectlyPurchasableVariant || isFinalSaleVariant) {\n showStrikeHearts(productContainer);\n }\n handleNotifyMeBlock(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 queryFirst('.pickup-price').textContent = formattedPrice;\n queryFirst('.pickup-color .selected-color').textContent = selectedColorName;\n const pickupSize = queryFirst('.pickup-size');\n queryFirst('.size-label', pickupSize).textContent = queryFirst('.size-display-name').value;\n const sizeSelected = queryFirst('.size-card .size-btn.selected');\n if (sizeSelected) {\n queryFirst('.selected-size', pickupSize).textContent = sizeSelected.dataset.attrValue;\n }\n }\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 $('body').trigger('product:afterSizeChange', {\n data: {\n product\n },\n ID,\n productContainer\n });\n if (availabilityStatus !== NOT_AVAILABLE && !forceOutOfStock && !hasClass(monogramBtn, hiddenClass) && isDirectlyPurchasable) {\n monogramBtn.disabled = false;\n } else {\n monogramBtn.disabled = true;\n }\n\n // update promotion messages display for selected variation\n queryFirst('.promotions').innerHTML = promotions ? promotions.filter((promotion) => promotion.calloutMsg).map((promotion, promotionIdx) => {\n return promotionMessageTmpl(promotion.calloutMsg, promotion.details, promotionIdx);\n }).join('') : '';\n\n if (wishlistDisabled) {\n showStrikeHearts(productContainer);\n }\n\n // pick new promotion popover elements\n initPopoverPromotions();\n initPopoverCloseSelector();\n initPopoverWishList();\n initPopoverClose();\n}\n\nconst init = () => {\n $('body').on('product:handleImageZoom', handleProductImageZoom);\n $('.carousel.image-slider').carousel();\n};\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\n/**\n * Toogle Size chart and select needed category\n * @param {Object} $this - Size chart link JQUERY element\n * @param {Object} $prodSizeChart) - Size chart window element\n */\nfunction toogleActiveSizeChartTab($this, $prodSizeChart) {\n const $lpSlideout = $('.lp-sizechart');\n const { sizefamily: activeCategoryVal, defaulttext: defaultText } = $this.data();\n const $activeCategoryEl = $prodSizeChart.find(`a[href=\"#${activeCategoryVal}-size\"]`);\n const $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\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 { id, variationAttributes } = 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 updateSelectedSwatchProductName(variationAttributes, container);\n $('body').trigger('product:handleImageZoom');\n });\n },\n\n selectSizeAttribute: function () {\n $(document).on('click', '.set-items .size-btn, .product-quickview .size-btn', function (e) {\n e.preventDefault();\n const buttonElement = e.target;\n if (!hasClass(buttonElement, 'selected')) {\n const $productContainer = $(this).closest('.product-detail');\n const url = buttonElement.dataset.attrUrl;\n if ($productContainer.hasClass('cached-quick-view')) {\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 {\n base.attributeSelect(url, $productContainer, buttonElement);\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, forceOutOfStock, price, wishListID, images, isDirectlyPurchasable, wishlistDisabled } = 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 setWishlistProductId(wishListID, responseContainer);\n\n let ssSize = 'unkown';\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 const restrictedFromOrder = !readyToOrder || !available || forceOutOfStock;\n addToCartButton.disabled = restrictedFromOrder;\n if (restrictedFromOrder) {\n showStrikeHearts(responseContainer);\n } else {\n hideStrikeHearts(responseContainer);\n }\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 queryFirst('.pickup-price').textContent = product.price.sales.formatted;\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.toString()) || 'unknown';\n const ssPrice = (list && list.value.toString()) || 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\n if (wishlistDisabled) {\n showStrikeHearts(responseContainer);\n }\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 updateProductInfo(selectedSizeValue, selectedColorId, productContainer, this);\n $body.trigger('product:pdpSizeSelected', {\n selectedColorElement,\n selectedSizeElement: this,\n productContainer\n });\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 // In case if all product sizes sold out and Notify me box not showed\n // we hide this variation from swatches and select first color variation that have\n // available sizes\n if (allSizesSoldOut) {\n removeClass(swatchEl, 'selectable');\n\n const allSelectableSwatches = queryAll('.pdp-container button.color-attribute .swatch-circle.selectable');\n const notifyMeBoxHidden = queryFirst('.notify-me-box.d-none'); // PDP case\n const notifyMeHidden = queryFirst('.notify-me-desc.d-none'); // Quick view case\n\n if (allSelectableSwatches.length && (notifyMeBoxHidden !== null || notifyMeHidden !== null)) {\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 const element = $(this);\n const url = element.data('href');\n const $lpSlideout = $('.lp-sizechart');\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 toogleActiveSizeChartTab(element, $prodSizeChart);\n\n const lastLinkEl = queryFirst('.return-policy-link');\n if (lastLinkEl) {\n lastLinkEl.addEventListener('keydown', handleLastLinkTab);\n }\n }\n });\n } else {\n toogleActiveSizeChartTab(element, $prodSizeChart);\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 queryFirst('.size-chart .size-chart-link').focus(); // set focus back to trigger element\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 handleOfflineProduct: function () {\n const offlineContainerEl = queryFirst('.offline-product-detail');\n if (offlineContainerEl) {\n const pid = offlineContainerEl.dataset.pid;\n const availabilityStatus = getNestedValue(window, `productInventory.variants[${pid}].availabilityStatus`);\n if (availabilityStatus === IN_STOCK) {\n const { search: currentSearch } = window.location;\n const TS_PARAM = 'timestamp=';\n if (!currentSearch.includes(TS_PARAM)) {\n window.location.search = (currentSearch ? currentSearch + '&' : '') + TS_PARAM + new Date().getTime();\n }\n }\n }\n },\n handlePdpNonEarlyAccessLoyalty: function () {\n // Sign in/Create account modal for non-early access product\n\n const signInCreateAccountModal = queryFirst('#loyalty-early-access-register');\n const loyaltyEnrollNowModal = queryFirst('#loyalty-enrollnow-modal');\n const pdpSignInCreateAccountButton = queryAll('.pdp-non-early-access-login');\n const earlyAccessSignInInfo = queryAll('.early-access-sign-info');\n const pdpSignInInfo = queryFirst('.pdp-sign-in-info');\n const earlyAccessSignInText = queryFirst('.early-access-sign-in-text');\n const welcomeDialogEarlyAccessMsgEl = queryFirst('.js-loyalty-welcome-early-access-msg');\n const welcomeDialogMsgEl = queryFirst('.js-loyalty-welcome-msg');\n const joinButton = queryFirst('.join-now-button');\n const earlyAccessWelcomeCta = queryFirst('.loyalty-early-access-welcome-cta');\n const loyaltyWelcomeDialog = queryFirst('#loyalty-welcome-popup');\n const $nonEarlyAccessLogin = $('.pdp-non-early-access-login');\n\n $nonEarlyAccessLogin.on('click', function () {\n const button = this;\n handleEarlyAccessLogin(button);\n const { pdpSignInTab } = button.dataset;\n $(signInCreateAccountModal).modal('show');\n $(`.nav-tabs a[href=\"#${pdpSignInTab}\"]`).tab('show');\n if (pdpSignInCreateAccountButton.length) {\n addClass(earlyAccessSignInInfo, HIDDEN_CLASS);\n addClass(earlyAccessSignInText, HIDDEN_CLASS);\n removeClass(pdpSignInInfo, HIDDEN_CLASS);\n }\n\n // return focus to trigger after modal is closed\n $(signInCreateAccountModal).one('hidden.bs.modal', () => button.focus());\n });\n\n if (joinButton) {\n joinButton.addEventListener('click', e => {\n e.preventDefault();\n $(loyaltyEnrollNowModal).modal('show');\n addClass(welcomeDialogMsgEl, HIDDEN_CLASS);\n removeClass(welcomeDialogEarlyAccessMsgEl, HIDDEN_CLASS);\n });\n }\n if (earlyAccessWelcomeCta) {\n earlyAccessWelcomeCta.addEventListener('click', function () {\n location.reload();\n });\n }\n $(loyaltyWelcomeDialog).off('hidden.bs.modal').on('hidden.bs.modal', function () {\n location.reload();\n });\n }\n};\n","'use strict';\n\nconst { queryFirst } = 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, 'lillyUtils.shippingPreferencesConfig.isEnabled') || false;\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('.product-availability .availability-msg', productContainer);\n if (availabilityMessageEl) {\n if (!selectedSizeEl) {\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, 'lillyUtils.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\nmodule.exports = {\n toggleSelectSizeInfo: toggleSelectSizeInfo,\n isEarlyAccessElement: isEarlyAccessElement,\n isShippingPreferencesViewEnabled: isShippingPreferencesViewEnabled\n};\n\n","'use strict';\n\nconst base = require('./base').default;\nconst detail = require('./detail').default;\nconst { updateSelectedSwatchProductName, injectAfterpay, injectFitPredictor, injectLongDescription, updateFullProductLink } = require('../quickView/quickViewHelpers').default;\nconst focusHelper = require('base/components/focus');\nconst { getJSON } = require('../util');\nconst { getLastElementInRow, getStyles, hasClass, queryFirst, remove, scrollTo } = require('../domUtil');\nconst { quickView: quickViewTemplates } = require('../templates');\nconst $window = $(window);\nconst $body = $('body');\nconst { ajaxFormInvalid, ajaxFormSubmit } = require('../clientSideValidation');\nconst header = queryFirst('.main-header');\nconst { handleEarlyAccessLogin } = require('../loyalty/loyaltyDrawer');\n\n/**\n * OOTB function\n * Generates the modal window on the first call.\n * @param {HTMLElement} srcElement - quick view initiator element\n */\nfunction getModalHtmlElement(srcElement) {\n const quickViewModalEl = document.getElementById('quickViewModal');\n remove(quickViewModalEl);\n const quickview = $(quickViewTemplates.quickViewModal);\n quickview.data('srcElement', srcElement);\n $('body').append(quickview);\n}\n\n/**\n * OOTB function\n * Parse HTML code in Ajax response\n *\n * @param {string} html - Rendered HTML from quickview template\n * @return {QuickViewHtml} - QuickView content components\n */\nfunction parseHtml(html) {\n const $html = $('
      ').append($.parseHTML(html));\n const body = $html.find('.product-quickview');\n return { body };\n}\n\n/**\n * Modifies a quickview template to include elements specific to this implementation\n * @param {string} template - The rendered template\n * @returns {string} Modified template\n */\nfunction modifyTemplate(template) {\n const openTagIndex = template.indexOf('>') + 1;\n\n return template.substr(0, openTagIndex) + template.substr(openTagIndex);\n}\n\n/**\n * Returns the additional offset that should be scrolled depending on whether the navigation menu is sticky\n * @returns {number} Main navigation offset\n */\nfunction getNavOffset() {\n return hasClass(header, 'sticky') ? header.offsetHeight : 0;\n}\n\n/**\n * Function to attach form validation events\n */\nfunction attachFormEvents() {\n const quickViewFormSelector = '.product-quickview form';\n ajaxFormInvalid(quickViewFormSelector);\n ajaxFormSubmit(quickViewFormSelector);\n}\n\n/**\n * OOTB function with changes\n * replaces the content in the modal window on for the selected product variation.\n * @param {string} selectedValueUrl - url to be used to retrieve a new product model\n * @param {jQuery.event} event - Event object which trigger the action\n */\nfunction fillModalElement(selectedValueUrl, event) {\n const quickViewModal = $('#quickViewModal');\n const { initPopoverClose, initPopoverWishList } = require('../popover');\n\n $.spinner().start();\n\n getJSON(\n selectedValueUrl,\n 'GET',\n null,\n data => {\n const { quickviewProductInfo, earlyAccessDate } = data;\n var parsedHtml = parseHtml(data.renderedTemplate);\n\n if (quickViewModal) {\n quickViewModal.find('.modal-body').html(parsedHtml.body);\n quickViewModal.find('.size-chart').attr('href', data.productUrl);\n quickViewModal.find('.enter-message').text(data.enterDialogMessage);\n\n updateFullProductLink(data.quickViewFullDetailMsg, data.productUrl, quickViewModal);\n injectAfterpay(quickViewModal);\n injectFitPredictor(quickViewModal);\n initPopoverWishList();\n initPopoverClose();\n\n if (quickviewProductInfo) {\n window.quickviewProductInfo = quickviewProductInfo;\n const swatchEl = quickViewModal.find('.color-attribute .swatch-value');\n const selectedSwatchEl = quickViewModal.find('.color-attribute .swatch-value.selected');\n const sizeElements = quickViewModal.find('.size-btn');\n if (quickviewProductInfo && swatchEl.length && !selectedSwatchEl) {\n quickViewModal.find('.color-attribute').eq(0).click();\n }\n if (selectedSwatchEl && sizeElements.length === 1 && !sizeElements.hasClass('selected')) {\n sizeElements.click();\n }\n }\n\n quickViewModal.modal('show');\n if (earlyAccessDate) {\n const { isEarlyAccessElement } = require('./helper');\n const isEarlyAccessItem = isEarlyAccessElement(earlyAccessDate);\n const quickViewContainer = queryFirst('.product-quickview');\n base.handleEarlyAccessCta(quickViewContainer, isEarlyAccessItem);\n const earlyAccessGuestSignIn = queryFirst('.js-early-access-sign-in-cta', quickViewContainer);\n earlyAccessGuestSignIn.addEventListener('click', e => {\n e.preventDefault();\n handleEarlyAccessLogin(earlyAccessGuestSignIn);\n quickViewModal.modal('hide');\n });\n }\n requestAnimationFrame(() => {\n $body.trigger('quickview:visible');\n });\n\n // Only for Gift card quickview attach form events\n if (data.gcType) {\n attachFormEvents();\n\n if (data.gcType === 'pgc' && queryFirst('.cart-page')) {\n const productLineItemEl = event.target.closest('.product-info-p-giftcard');\n // Return if the line item is not pgiftcard\n if (!productLineItemEl) {\n return;\n }\n\n const lineItemAmountEl = queryFirst('.gift-card-amount', productLineItemEl);\n if (lineItemAmountEl) {\n quickViewModal\n .find('.gift-card-custom-input-group .form-control')\n .val(lineItemAmountEl.value)\n .trigger('keyup');\n quickViewModal\n .find('.gift-card-amount')\n .val(lineItemAmountEl.value);\n }\n }\n }\n }\n\n $.spinner().stop();\n },\n () => $.spinner().stop()\n );\n}\n\n/**\n * Replaces the content in a quickview container with the template returned by the specified endpoint\n * @param {JQuery} container - jQuery element to inject HTML into\n * @param {string} url - URL of the endpoint that will return a rendered template\n * @param {JQuery} selectedProductDescriptionElement - jQuery element of selected product SEO long description\n */\nfunction injectQuickView(container, url, selectedProductDescriptionElement) {\n const spinner = $.spinner();\n const stopSpinner = () => { spinner.stop(); };\n\n const { initPopoverEarlyAccessLocked, initPopoverClose, initPopoverWishList } = require('../popover');\n spinner.start();\n\n getJSON(\n url,\n 'GET',\n null,\n data => {\n const { quickviewProductInfo, earlyAccessDate } = data;\n const parent = container.parent();\n const scrollHeight = parent.prop('scrollHeight');\n const scrollY = $window.scrollTop();\n const filledContainers = $('.quickview-container').not(container);\n let containerTop = container.offset().top;\n const isNewContainerBelow = !!filledContainers.length && !!filledContainers.filter((i, openContainer) => $(openContainer).offset().top < containerTop).length;\n\n filledContainers.remove();\n\n if (quickviewProductInfo) {\n window.quickviewProductInfo = quickviewProductInfo;\n }\n\n requestAnimationFrame(() => {\n containerTop = container.offset().top - getNavOffset();\n\n // If the target container is below an a container that's already injected,\n // the emptying of the existing container will cause the content to jump.\n // To offset this, we can scroll up by the difference in scrollHeight.\n if (isNewContainerBelow) {\n scrollTo(scrollY - (scrollHeight - parent.prop('scrollHeight')), 0);\n }\n\n // Modify the template returned by the endpoint so we can keep the OOTB code and\n // so that the OOTB template can be used in other implementation types (e.g. dialogs)\n container.html(modifyTemplate(data.renderedTemplate));\n const sizeElements = container.find('.size-btn');\n const swatchEl = container.find('.color-attribute .swatch-value');\n const selectedSwatchEl = container.find('.color-attribute .swatch-value.selected');\n if (quickviewProductInfo && swatchEl.length && !selectedSwatchEl) {\n container.find('.color-attribute').eq(0).click();\n }\n\n if (selectedSwatchEl && sizeElements.length === 1 && !sizeElements.hasClass('selected')) {\n sizeElements.click();\n }\n\n // Only for Gift card quickview attach form events\n if (data.gcType) {\n attachFormEvents();\n }\n\n updateFullProductLink(data.quickViewFullDetailMsg, data.productUrl, container);\n injectAfterpay(container);\n injectFitPredictor(container);\n injectLongDescription(selectedProductDescriptionElement, container);\n initPopoverWishList();\n initPopoverClose();\n\n stopSpinner();\n scrollTo(containerTop);\n\n requestAnimationFrame(() => {\n $body.trigger('quickview:visible');\n });\n\n const wishlistButton = queryFirst('.add-to-wish-list', container[0]);\n\n if (wishlistButton) {\n setTimeout(() => {\n wishlistButton.focus();\n }, 0);\n }\n if (earlyAccessDate) {\n const { isEarlyAccessElement } = require('./helper');\n const isEarlyAccessItem = isEarlyAccessElement(earlyAccessDate);\n const quickViewContainer = queryFirst('.quickview-container');\n\n // attaching popover event to tooltip for AJAX call\n initPopoverEarlyAccessLocked();\n initPopoverClose();\n\n base.handleEarlyAccessCta(quickViewContainer, isEarlyAccessItem);\n const earlyAccessGuestSignIn = queryFirst('.js-early-access-sign-in-cta', quickViewContainer);\n earlyAccessGuestSignIn.addEventListener('click', e => {\n e.preventDefault();\n handleEarlyAccessLogin(earlyAccessGuestSignIn);\n });\n }\n });\n },\n stopSpinner\n );\n}\n\nlet $quickViewTriggerElement = null;\n\nfunction backFocusToTrigger() {\n if ($quickViewTriggerElement) {\n $quickViewTriggerElement.focus();\n $quickViewTriggerElement = null;\n }\n}\n\nmodule.exports = {\n showQuickview: () => {\n $body.on('click', '.product-grid .quickview', e => {\n e.preventDefault();\n\n const { target } = e;\n const $target = $(target);\n const container = $target.closest('.product-tile-container');\n const quickviewURL = $target.closest('.quickview').attr('data-href');\n const lastElementInRow = getLastElementInRow(container[0]);\n const quickviewContainer = $(quickViewTemplates.container).insertAfter(lastElementInRow);\n const seoLongDescriptionElement = $target.parents('.product-tile-container').find('.seo-long-description');\n\n injectQuickView(quickviewContainer, quickviewURL, seoLongDescriptionElement);\n\n $target.trigger('quickview:show');\n $quickViewTriggerElement = $target;\n });\n $body.on('click', `\n .recommendations-products .quickview,\n .product-listing .quickview,\n .shop-by-style .quickview,\n .style-component .quickview,\n .shop-the-print-tiles .quickview,\n .cart-page .product-edit .edit,\n .cart-page .bundle-edit .edit`, e => {\n e.preventDefault();\n const $target = $(e.target);\n getModalHtmlElement($target);\n const selectedValueUrl = $target.data('href');\n fillModalElement(selectedValueUrl, e);\n $target.trigger('quickview:show');\n $quickViewTriggerElement = $target;\n });\n\n $body.on('click', '.quickview-container .close-quickview', e => {\n const container = e.target.closest('.quickview-container');\n if (container) {\n const target = $(container).prev();\n const padding = parseInt(getStyles(container, 'padding-top'), 10);\n\n remove(container);\n $body.trigger('quickview:close');\n\n // Scroll back to the target row so the user doesn't lose their position\n scrollTo(target.offset().top - padding - getNavOffset(), 250);\n backFocusToTrigger(); // since it is not BP Modal we need to handle it separately\n } else {\n $('#quickViewModal').modal('hide');\n }\n });\n\n $body.on('click', '.product-quickview .notify-me-btn', function (e) {\n e.preventDefault();\n $(this).closest('.product-quickview').find('#notifyMe').modal('show');\n });\n },\n focusQuickview: function () {\n $body.on('shown.bs.modal', '#quickViewModal', function () {\n $('#quickViewModal .close-quickview').focus();\n });\n $body.on('hidden.bs.modal', '#quickViewModal', backFocusToTrigger);\n },\n trapQuickviewFocus: function () {\n $body.on('keydown', '.product-quickview', function (e) {\n var focusParams = {\n event: e,\n containerSelector: '.product-quickview',\n firstElementSelector: '.close-quickview',\n lastElementSelector: '.full-pdp-link',\n nextToLastElementSelector: '.add-to-cart'\n };\n focusHelper.setTabNextFocus(focusParams);\n });\n },\n availability: base.availability,\n addToCart: base.addToCart,\n showSpinner: function () {\n $body.on('product:beforeAddToCart', function (e, data) {\n $(data).closest('.product-quickview').spinner().start();\n });\n },\n sizeChart: detail.sizeChart,\n hideDialog: function () {\n $body.on('product:afterAddToCart', function () {\n $('#quickViewModal').modal('hide');\n\n const isCartPage = queryFirst('.cart-container');\n const addToCartWarningDialog = queryFirst('#add-to-cart-warning-dialog') || false;\n if (isCartPage && !addToCartWarningDialog) {\n location.reload();\n }\n });\n },\n beforeUpdateAttribute: function () {\n $body.on('product:beforeAttributeSelect', function () {\n $('.product-quickview').spinner().start();\n });\n },\n updateAttribute: function () {\n $body.on('product:afterAttributeSelect', function (e, response) {\n const quickView = response.container[0];\n\n if (hasClass(quickView, 'product-quickview')) {\n const { productDetailsUrl } = response.data.product;\n const fullPDPLink = queryFirst('.full-pdp-link', quickView);\n fullPDPLink.setAttribute('href', productDetailsUrl);\n\n updateSelectedSwatchProductName(response.data.product.variationAttributes, $(quickView));\n }\n });\n },\n updateAddToCart: function () {\n $body.on('product:updateAddToCart', function (e, response) {\n const quickView = queryFirst('.product-quickview');\n\n if (quickView) {\n const disabled = !response.product.readyToOrder || !response.product.available;\n\n let buttonToUpdate;\n const addToCartButton = queryFirst('button.add-to-cart', quickView);\n if (addToCartButton) {\n buttonToUpdate = addToCartButton;\n } else {\n const updateCartButton = queryFirst('.update-cart-product-global', quickView);\n if (updateCartButton) {\n buttonToUpdate = updateCartButton;\n }\n }\n\n if (buttonToUpdate) {\n if (disabled) {\n buttonToUpdate.setAttribute('disabled', disabled);\n } else {\n buttonToUpdate.removeAttribute('disabled');\n }\n }\n }\n });\n },\n updateAvailability: function () {\n $body.on('product:updateAvailability', function (e, response) {\n const quickView = queryFirst('.product-quickview');\n\n if (quickView) {\n $('.product-availability', response.$productContainer)\n .data('ready-to-order', response.product.readyToOrder)\n .data('available', response.product.available)\n .find('.availability-msg')\n .empty()\n .html(response.message);\n }\n });\n }\n};\n","'use strict';\n\nimport { queryFirst, addClass, removeClass } from '../domUtil';\nimport { getJSON } from '../util';\n\nconst $body = $('body');\nconst hiddenClass = 'd-none';\n\nexport default {\n validateEmail: function () {\n $body.on('blur', '.notify-email', e => {\n const { target } = e;\n const { value } = target;\n const emailFormGroup = target.closest('.form-group');\n const emailError = queryFirst('.email-error', emailFormGroup);\n const { missingError, patternMismatch } = target.dataset;\n const invalidClass = 'is-invalid';\n if (!value) {\n addClass(target, invalidClass);\n emailError.textContent = missingError;\n } else if (target.checkValidity && !target.checkValidity()) {\n addClass(target, invalidClass);\n emailError.textContent = patternMismatch;\n } else {\n removeClass(target, invalidClass);\n }\n });\n },\n notifyMeSubmit: function () {\n $body.on('submit', '.js-notify-form', e => {\n e.preventDefault();\n const { target } = e;\n const actionUrl = target.getAttribute('action');\n const data = {\n productID: queryFirst('#notifySku').value,\n email: queryFirst('.notify-email').value,\n subscribe: document.getElementById('notify-checkbox').checked\n };\n const $notifyMe = $('#notifyMe');\n $notifyMe.spinner().start();\n getJSON(actionUrl, 'POST', data, (data) => {\n const confirmMessage = data.message;\n addClass(queryFirst('.notify-me-container .js-notify-me-desc'), hiddenClass);\n addClass(queryFirst('.js-notify-form'), hiddenClass);\n const successMessage = queryFirst('.js-notify-confirm-msg');\n successMessage.innerHTML = confirmMessage;\n removeClass(queryFirst('.js-notify-confirm-block'), hiddenClass);\n removeClass(queryFirst('.footer-close-link'), hiddenClass);\n $notifyMe.spinner().stop();\n }, () => {\n $notifyMe.spinner().stop();\n });\n });\n },\n notifyMeContainerSubmit: function () {\n $body.on('submit', '.js-notify-form-inline', e => {\n e.preventDefault();\n const { target } = e;\n const actionUrl = target.getAttribute('action');\n const data = {\n productID: queryFirst('#notifySku', target).value,\n email: queryFirst('#emailInput', target).value,\n subscribe: queryFirst('#notify-checkbox', target).checked\n };\n const $container = $('.js-notify-me-container');\n $container.spinner().start();\n getJSON(actionUrl, 'POST', data, (data) => {\n $container.spinner().stop();\n const notifyMeContainer = queryFirst('.js-notify-me-container');\n const notifyConfirm = queryFirst('.js-notify-confirm-msg', notifyMeContainer);\n if (data.message && notifyConfirm) notifyConfirm.innerHTML = data.message;\n\n if (data.sucess !== 'error') {\n const productName = notifyMeContainer.getAttribute('data-nm-p-name');\n const productColor = queryFirst('.selected-swatch-name').textContent;\n const productSize = queryFirst('.size-accordion .details-text').textContent;\n\n const pNameEl = queryFirst('.js-notifyme-name', notifyMeContainer);\n pNameEl.textContent = productName;\n\n if (productColor) {\n const pColorEl = queryFirst('.js-notifyme-color', notifyMeContainer);\n pColorEl.textContent = productColor;\n }\n if (productSize) {\n const pSizeEl = queryFirst('.js-notifyme-size', notifyMeContainer);\n pSizeEl.textContent = productSize;\n }\n }\n\n addClass(queryFirst('.js-notify-form-inline', notifyMeContainer), hiddenClass);\n removeClass(queryFirst('.js-confirmed-block', notifyMeContainer), hiddenClass);\n queryFirst('.js-close-notifyme').focus();\n }, () => {\n $container.spinner().stop();\n });\n });\n },\n closeNotifyMeForm: function () {\n $body.on('click', '.js-close-notifyme', e => {\n e.preventDefault();\n addClass(queryFirst('.js-confirmed-block'), hiddenClass);\n removeClass(queryFirst('.js-notify-form-inline'), hiddenClass);\n });\n },\n preSelectNotifyCheckbox: function () {\n $body.on('shown.bs.modal', '#notifyMe', function (e) {\n // pre-select notifyMe checkbox after modal is opened\n const notifyMeId = queryFirst('#notify-checkbox', e.currentTarget);\n if (notifyMeId && !notifyMeId.checked) notifyMeId.checked = true;\n });\n }\n};\n","'use strict';\n\nvar processInclude = require('base/util');\nimport detail from './product/detail';\nimport notifyMe from './components/notifyMe';\n\ndocument.addEventListener('DOMContentLoaded', () => {\n processInclude(detail.selectSizeAttribute);\n processInclude(detail.afterAttributeSelect);\n processInclude(require('./product/quickView'));\n processInclude(notifyMe);\n});\n","'use strict';\n\nconst { queryFirst } = require('../domUtil');\nconst { sauce } = require('fitpredictor/product/secretsauce');\n\n/**\n * Updates the product view when a product attribute is selected or deselected or when changing quantity\n * @param {Array} variationAttributes - Array of product variation attributes\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 $productContainer.find('.selected-swatch-name').text(selectedSwatchObject ? selectedSwatchObject.displayValue : '');\n }\n }\n}\n\n/**\n * Function to initialize Fit predictor on quick view\n * @param {jQuery} containerEl - Quickview container element\n */\nfunction injectFitPredictor(containerEl) {\n if (!!document.getElementById('fitPredictorEnabled')) {\n sauce($('.product-detail.product-quickview', containerEl));\n }\n}\n\n/**\n * Initialize Afterpay in QuickViews\n */\nfunction injectAfterpay() {\n require('afterpay/afterpay')({\n anchors: '.product-quickview-detail',\n observerTargets: '.prices',\n priceTargets: ['.sales .price-value', '.list .price-value', '.sales .value'],\n renderMode: 'adjacent',\n renderTarget: '.prices',\n showExcluded: false\n });\n}\n\n/**\n * Function to sets href for full pdp link\n * @param {string} label - Label to set\n * @param {string} link - href value\n * @param {jQuery} containerEl - Parent DOM element\n */\nfunction updateFullProductLink(label, link, containerEl) {\n containerEl.find('.full-pdp-link').text(label).attr('href', link);\n}\n\n/**\n * Function to add long Description on quick view\n * @param {jQuery} description - Product Description getting DOM element\n * @param {jQuery} containerEl - Parent DOM element\n */\nfunction injectLongDescription(description, containerEl) {\n containerEl.find('.long-description').html(description.html());\n}\n\nexport default {\n updateSelectedSwatchProductName,\n injectAfterpay,\n injectFitPredictor,\n updateFullProductLink,\n injectLongDescription\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: '
      ',\n quickViewModal: `\n
      \n \n
      \n
      \n
      \n
      \n
      \n
      \n `\n};\n\n/**\n * Get All Wishlist Collection Templates\n */\nexports.addToWishlist = {\n container: '
      ',\n addToWishlistModal: `\n
      \n \n
      \n
      \n
      \n \n
      \n
      \n
      \n
      \n
      \n \n\n `\n};\n\n/**\n * Cart error message template\n */\nexports.cart = {\n errorMessage: '

      {0}

      ',\n cartAvailabilityMessageOOS: (message, url) => (`\n
    5. ${message}\n Browse Similar Styles

      \n
    6. \n `),\n};\n\n/**\n * Cart & Checkout promo template\n */\nexports.promo = {\n shippingMethod: `\n
      \n
      \n

      \n {0}:{1}\n

      \n

      \n {3}\n

      \n
      \n
      \n

      \n {2}\n

      \n
      \n
      `,\n checkoutNormalShipping: '{0}',\n checkoutDiscountShipping: `\n {0}\n {1}\n `\n};\n\n/**\n * Checkout template\n */\nexports.checkout = {\n discountPrice: '{0}{1}'\n};\n\n/**\n * Selected swatch name template\n */\nexports.swatchNameTemplate = {\n swatchNameHtml: '

      Color: {0}

      '\n};\n\nexports.emptySwatchTemplate = '{0}';\n\n/*\n * Address Suggestions template\n */\nexports.addressSuggestions = {\n suggestionTextTemplate: '

      ',\n suggestionsTemplate: `\n
      \n
      \n \n \n
      \n
      `\n};\n\n/*\n * Approaching Discounts template\n */\nexports.approachingDiscounts = {\n discountContainerTemplate: '
        ',\n singleDiscountTemplate: '
      • {0}
      • ',\n multipleDiscountsTemplate: `\n
      • \n
        \n
        \n
          {0}
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
      • `,\n nonCouponBasedAdjustmentTemplate: `
        \n
        \n

        {0}

        \n

        \n {1}\n

        \n
        \n

        {2}

        \n
        `\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
        \n \n \n
        \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
        \n \"${altText}\"/\n
        \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 ``;\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 } = variantData;\n return `
      • \n \n ${selected ? selectedText : ''} ${!inStock || forceOutOfStock ? oosMessage : ''}\n
      • `;\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 `
        \n
        \n

        ${emptyWishlistMessage}

        \n ${emptyWishlistContentAssetBody}\n
        \n
        `;\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 `
        \n
        \n
        \n
        \n

        ${emptySFLMessage}

        \n ${signInMsg}\n \n ${continueShopMsg}
        \n
        \n
        \n
        \n
        `;\n};\n\n/**\n * GWP Site Templates\n */\nexports.gwpSizeTemplate = {\n singleSize: '{0}',\n multiSize: `\n
        \n \n \n
        \n `,\n multiDefaultSizeOption: '',\n multiSizeOption: ''\n};\n\n/**\n * Address autocomplete templates\n */\nexports.autoComplete = {\n suggestionLink: (suggestion, addressLine, secondaryEntryAddressLine) => (`\n 1}\"\n data-secondary-entry-search-value=\"${secondaryEntryAddressLine}\"\n >${addressLine}\n `),\n suggestionContainer: containerClass => (`
        `)\n};\n\nexports.contactUsTemplate = {\n signupError: (msg) => (`
        ${msg}
        `),\n defaultSignupError: `
        We're sorry, an unexpected error occurred. Please try again.
        `// eslint-disable-line quotes\n};\n\nexports.browserWarningTemplate = `\n We're sorry, this browser is no longer supported.
        \n Please update your browser for a smoother, more secure shopping experience. We recommend downloading the latest version of\n Google Chrome,\n Microsoft Edge or\n Mozilla Firefox.\n`;\n\n/*\n * Shipping preference radio buttons\n */\nexports.shippingPreferenceTemplates = {\n shippingPreferences: (ispuRadioLabel, ispuRadioValue, shipToRadioLabel, shipToRadioValue, changeStoreLabel, preferISPU = false) => (`\n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n `),\n storeDetail: (storeId, name, address1, city, stateCode, postalCode) => (`\n
        \n
        ${name}
        \n
        \n
        ${address1},\n ${city}, ${stateCode} ${postalCode}\n
        \n
        \n
        \n `)\n};\n\n/*\n * Product detail page - messaging templates\n */\nexports.productDetail = {\n selectStyleMessageTmpl: message => `
      • ${message}

      • `,\n availabilityMessageTmpl: message => `
      • ${message}

      • `,\n availabilityMessageOOS: (message, url) => (`\n
      • ${message}\n Browse Similar Styles

        \n
      • \n `),\n availabilityMessagePreorder: (message, url) => (`\n
      • \n

        ${message}

        \n Shop for Similar Styles
        \n
      • \n `),\n ispuSelectStyleMessageTmpl: message => `

        ${message}

        `,\n ispuAvailabilityMessageTmpl: message => `

        ${message}

        `,\n ispuLowStockMessageTmpl: message => `
      • ${message}

      • `,\n promotionMessageTmpl: (calloutMsg, details, index) => `
        \n
        \n
        \n ${calloutMsg}\n
        \n ` + ((details) ? `\n
        \n \n
        \n
        ${details}
        \n
        \n
        \n ` : '')\n + `
        \n
        `\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
        \n
        \n
        \n
        \n ${slideOut && modalContentHeading ? `

        ${modalContentHeading}

        ` : ''}\n \n
        \n ${!slideOut && modalContentHeading ? `

        ${modalContentHeading}

        ` : ''}\n
        ${modalContentBody}
        \n
        \n ${buttons.map(button => `\n
        \n ${button.link ?\n `${button.text}` :\n ``\n }\n
        `).join('')\n }\n
        \n
        \n
        \n
        \n `;\n};\n\nexports.errorTextTemplate = errorMessage => `

        ${errorMessage}

        `;\n\nexports.oneTrust = {\n privacyDialogCookieBanner: `\n \n `\n};\nexports.loyalty = {\n carouselBadge: '
        {0}
        '\n};\n\nexports.styliticsTemplates = {\n shopTheModelBadge: '

        As seen above

        '\n};\n\nexports.returnsPageTemplates = {\n defaultError: 'We're sorry, an unexpected error occurred. Please try again.',\n errorMessage: (message) => (`
        ${message}
        `)\n};\n\nexports.cyberSource = {\n secureAcceptanceTag: paymentType => `Secure Acceptance ${paymentType}`,\n boltPayPaymentTag: (paymentType, paymentLastFour, expMonth, expYear) => `\n
        ${paymentType}\n
        ${paymentLastFour}
        \n
        ${expMonth}/${expYear}
        `,\n paypalPaymentTag: (paypalMethod, paypalAmount) => `${paypalMethod}
        ${paypalAmount}
        `,\n creditCardPaymentTag: (cardType, creditCardType, maskedCardNumber, cardEndIn, cardExpMonth, cardExpYear) => `
        ${cardType} ${creditCardType}
        \n ${maskedCardNumber}
        ${cardEndIn} ${cardExpMonth}/${cardExpYear}
        `\n};\n\nexports.checkoutErrorTemplate = {\n checkoutErrorMsg: errorMsg => `
        \n ${errorMsg}\n
        `\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(\n successHandler,\n errorHandler,\n {\n maximumAge: 0\n }\n );\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 function formatValue(numbers) {\n const char = { 0: '(', 3: ') ', 6: '-' };\n element.value = '';\n for (let i = 0, l = numbers.length; i < l; i++) {\n element.value += (char[i] || '') + numbers[i];\n }\n }\n if (!element) {\n return;\n }\n element.addEventListener('keypress', function () {\n const numbers = element.value.replace(/\\D/g, '');\n formatValue(numbers);\n });\n element.addEventListener('paste', function (event) {\n event.preventDefault();\n addClass(this, 'is-invalid');\n if (hasClass(event.target, 'is-invalid')) {\n const errorMessageElmParent = event.target.parentNode;\n const errorMessageElm = queryFirst('.invalid-feedback', errorMessageElmParent);\n errorMessageElm.textContent = event.target.dataset.patternMismatch;\n }\n });\n element.addEventListener('input', function () {\n const numbers = element.value.replace(/\\D/g, '');\n formatValue(numbers);\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 */\nexports.stickyScrollPosition = items => {\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 newTop = itemHeight - windowHeight + 95;\n\n if (itemHeight > windowHeight - 95) {\n item.style.top = `${-newTop}px`;\n } else {\n item.style.top = '100px';\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 * Checks if an email value is in the correct format for Bolt.\n * Note that this does not meet LP's standards for email validation\n * @param {string} email - email string to check if valid\n * @returns {boolean} Whether email is valid\n */\nexports.validateEmailBolt = email => /^[\\w.%+-]+@[\\w.-]+\\.[\\w]{2,6}$/.test(email);\n","'use strict';\nconst { HIDDEN_CLASS } = require('../constants');\nconst { removeClass, queryFirst, addClass } = require('../domUtil');\n\n/**\n * Show strike heart\n * @param {Element} productContainer product container with hearts\n */\nfunction showStrikeHearts(productContainer) {\n removeClass(queryFirst('.wishlist-strike', productContainer), HIDDEN_CLASS);\n addClass(queryFirst('.wishlist-add-update', productContainer), HIDDEN_CLASS);\n}\n\n/**\n * Hide strike heart\n * @param {Element} productContainer product container with hearts\n */\nfunction hideStrikeHearts(productContainer) {\n addClass(queryFirst('.wishlist-strike', productContainer), HIDDEN_CLASS);\n removeClass(queryFirst('.wishlist-add-update', productContainer), HIDDEN_CLASS);\n}\n\n/**\n * Update wishlists data attribute to theirs product ID\n * @param {string} id product ID string\n * @param {string | Object} container Parent element, if it not provided\n */\nfunction setWishlistProductId(id, container = document.body) {\n if (id) {\n const wishlistBtn = queryFirst('.wishlist-add-update button', container);\n const wishlistStrikeBtn = queryFirst('.wishlist-strike button', container);\n\n if (wishlistBtn) wishlistBtn.dataset.productId = id;\n if (wishlistStrikeBtn) wishlistStrikeBtn.dataset.productId = id;\n }\n}\nmodule.exports = {\n hideStrikeHearts: hideStrikeHearts,\n showStrikeHearts: showStrikeHearts,\n setWishlistProductId: setWishlistProductId\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 = function (element, message) {\n var errorHtml = '
        ' +\n '' + message + '
        ';\n\n $(element).append(errorHtml);\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('
        '));\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('
        '\n + payload.error.join('
        ') + '
        ');\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\nvar formValidation = require('../components/formValidation');\nvar createErrorNotification = require('../components/errorNotification');\n\nmodule.exports = {\n login: function () {\n $('form.login').submit(function (e) {\n var form = $(this);\n e.preventDefault();\n var url = form.attr('action');\n form.spinner().start();\n $('form.login').trigger('login:submit', e);\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n form.spinner().stop();\n if (!data.success) {\n formValidation(form, data);\n $('form.login').trigger('login:error', data);\n } else {\n $('form.login').trigger('login:success', data);\n location.href = data.redirectUrl;\n }\n },\n error: function (data) {\n if (data.responseJSON.redirectUrl) {\n window.location.href = data.responseJSON.redirectUrl;\n } else {\n $('form.login').trigger('login:error', data);\n form.spinner().stop();\n }\n }\n });\n return false;\n });\n },\n\n register: function () {\n $('form.registration').submit(function (e) {\n var form = $(this);\n e.preventDefault();\n var url = form.attr('action');\n form.spinner().start();\n $('form.registration').trigger('login:register', e);\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n form.spinner().stop();\n if (!data.success) {\n $('form.registration').trigger('login:register:error', data);\n formValidation(form, data);\n } else {\n $('form.registration').trigger('login:register:success', data);\n location.href = data.redirectUrl;\n }\n },\n error: function (err) {\n if (err.responseJSON.redirectUrl) {\n window.location.href = err.responseJSON.redirectUrl;\n } else {\n createErrorNotification($('.error-messaging'), err.responseJSON.errorMessage);\n }\n\n form.spinner().stop();\n }\n });\n return false;\n });\n },\n\n resetPassword: function () {\n $('.reset-password-form').submit(function (e) {\n var form = $(this);\n e.preventDefault();\n var url = form.attr('action');\n form.spinner().start();\n $('.reset-password-form').trigger('login:register', e);\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n form.spinner().stop();\n if (!data.success) {\n formValidation(form, data);\n } else {\n $('.request-password-title').text(data.receivedMsgHeading);\n $('.request-password-body').empty()\n .append('

        ' + data.receivedMsgBody + '

        ');\n if (!data.mobile) {\n $('#submitEmailButton').text(data.buttonText)\n .attr('data-dismiss', 'modal');\n } else {\n $('.send-email-btn').empty()\n .html(''\n + data.buttonText + ''\n );\n }\n }\n },\n error: function () {\n form.spinner().stop();\n }\n });\n return false;\n });\n },\n\n clearResetForm: function () {\n $('#login .modal').on('hidden.bs.modal', function () {\n $('#reset-password-email').val('');\n $('.modal-dialog .form-control.is-invalid').removeClass('is-invalid');\n });\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__.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};","'use strict';\n\nvar processInclude = require('base/util');\nconst { queryFirst, removeClass } = require('./domUtil');\nconst { INVISIBLE_CLASS } = require('./constants');\n\ndocument.addEventListener('DOMContentLoaded', () => {\n processInclude(require('./category/shopByStyle'));\n processInclude(require('./category/shopByPrint'));\n updateContentElements();\n});\n\n/**\n * This method updates the page H1 tag and banner header & text of the email capture asset for the seasonal pages.\n */\nfunction updateContentElements() {\n const contentElement = queryFirst('.seasonal-landing-page');\n const headerElement = queryFirst('.dynamic-email-capture-title .plp-title');\n const bannerHeaderElement = queryFirst('.seasonal-banner-header', contentElement);\n const bannerTextElement = queryFirst('.seasonal-banner-title', contentElement);\n const categoryNameElement = queryFirst('.category-display-name');\n if (headerElement && bannerHeaderElement && bannerTextElement && categoryNameElement) {\n headerElement.innerHTML = categoryNameElement.value;\n bannerHeaderElement.innerHTML = categoryNameElement.value;\n bannerTextElement.innerHTML = categoryNameElement.value;\n removeClass(headerElement, INVISIBLE_CLASS);\n removeClass(bannerHeaderElement, INVISIBLE_CLASS);\n removeClass(bannerTextElement, INVISIBLE_CLASS);\n }\n}\nprocessInclude(require('./productTile'));\n"],"names":["_require","require","getProductData","queryFirst","queryAll","formatMessage","afterpayTimeout","Date","now","elementArray","items","scope","Array","isArray","document","reduce","results","item","forEach","parent","matches","push","concat","module","exports","afterpay","options","arguments","length","undefined","_options$alwaysShow","alwaysShow","anchors","observerTargets","price","priceTargets","renderMode","renderTarget","_options$showExcluded","showExcluded","_options$thresholds","thresholds","_options$logoPosition","logoPosition","window","presentAfterpay","setTimeout","args","apply","this","bind","afterpayPrefsEl","getElementById","value","afterpayPrefs","dataset","apConfig","afterpayLogoColor","currency","locale","exclusions","JSON","parse","apThresholds","minMaxThreshold","min","max","updateAmount","config","stringValue","String","isDecimalValue","indexOf","intValue","parseInt","replace","trim","amount","getPrice","observerTarget","element","innerText","renderAfterpay","instance","anchor","mode","_uData$action","_config$minMaxThresho","uData","utag_data","notWithinThreshold","excluded","hidden","excludedMessageKey","productElements","action","split","shift","toLowerCase","_getProductData","masterId","productName","afterpayNode","createElement","afterpayMessage","parentElement","insertBefore","firstChild","lastToken","pop","tokenText","join","excludedMultiSuffix","textContent","notWithinThresholdMessage","instanceNode","target","insertAdjacentElement","replaceChild","appendChild","slice","call","instanceConfig","Object","assign","anchorObserverTargets","priceValue","result","isNaN","apInstance","observer","MutationObserver","mutations","observe","childList","subtree","_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","e","r","t","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","_defineProperty","i","toPrimitive","TypeError","_toPrimitive","_toPropertyKey","defineProperty","configurable","writable","_slicedToArray","_arrayWithHoles","l","n","u","a","f","next","done","return","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arrayLikeToArray","toString","name","from","test","hasClass","_require2","toDatasetKey","hashValue","_require3","VIEW_PROMO","SELECT_PROMO","SELECT_ITEM","VIEW_ITEM_LIST","ADD_TO_CART","P_PRODUCT_LIST_KEY","P_PROMO_NAME_KEY","P_PROMO_CREATIVE_NAME","PERSISTED_DATA_NAME","STORAGE_EXP_TIME","gaInitKeyPrefix","gaRetriggerFlag","gaFieldPipe","customEventPattern","gaBindings","UDOProperties","UDOArrays","promoSensitiveEvents","productListSensitiveEvents","normalize","_len","fields","_key","map","field","values","text","smartNormalize","key","includes","normalizePayload","payload","entries","_ref","_ref2","getPageContext","srcElement","_window2$utag_data","sectionSrcElement","dialog","closest","$","data","jQuery","pageSection","pageSubsection","isCartPage","cartNav","removeDialog","selectedTab","uaAttributes","event_label","event_category","event_action","omitUADefaults","getOwnPropertyDescriptors","defineProperties","_objectSpread","page_section","page_subsection","caching_enabled","logged_in_status","user_loggedin_status","affiliation","loyalty_status","loyalty_program_member","page_name","title","page_type","page_category","page_subcategory","product_category","product_color","product_id","product_original_price","product_name","product_price","product_quantity","product_size","product_variant","product_badge","getStoredDataLayerInfo","localStorage","dataStr","getItem","console","error","removeItem","_data$key","timestamp","setItem","stringify","setStoredDataLayerInfo","storePersistentData","eventName","event_name","productList","category_id","promoName","promo_name","promoCreative","promo_creative","warn","sendEventGA","eventType","Promise","resolve","reject","utag","Error","bindGA","elements","_options$bindOptions","bindOptions","callback","_options$eventType","eventCondition","_options$isCustomEven","isCustomEvent","_options$normalize","usesNormalize","_options$retriggerEve","retriggerEvent","_options$usesContext","usesContext","_options$usesDataset","usesDataset","_options$updatesUDO","updatesUDO","_options$gaEventType","gaEventType","nodeList","NodeList","once","bindEngine","initFlag","targetSelectors","binding","isRebind","willRetrigger","ctrlKey","shiftKey","gaRetriggered","tagPayload","_target$dataset","eventCategory","eventAction","eventLabel","bindPayload","productListName","product_list","product_list_category","promoCreativeName","preventDefault","stopPropagation","pageContext","fromEntries","_ref3","preservedUDOProperties","substring","property","lazyUDOProperties","charAt","UDOUpdates","finally","trigger","productSetItem","productSetItems","productSetIndex","fill","sendEventGAWithContext","contextElem","normalizeData","delimiter","getText","elem","textNode","childNodes","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","find","child","nodeType","Node","TEXT_NODE","EXCLUSIVE_EXPERIENCES_TOOLTIP_CID","REWARDS_TOOLTIP_CID","OFFERS_TOOLTIP_CID","BENEFITS_TOOLTIP_CID","TELL_A_FRIEND_TOOLTIP_CID","STYLE_QUIZ_TOOLTIP_CID","MEMBERSHIP_FAQ_TOOLTIP_CID","TOOL_TIP_CONTENT","LOYALTY_TOOLTIP_ICON","ANALYTIC_EVENT_CLASS","BENEFIT_MODAL_CLOSE_ICON","BENEFIT_DETAIL_MODAL","BENEFIT_SWATCH_THUMBNAIL_MODAL","BENEFIT_SWATCH_TITLE","DOWNLOAD_SWATCH_CTA","GO_TO_ACCOUNT_CTA","BENEFIT_SWATCH_TAB","REFER_FRIEND_CTA","REFER_FRIEND_CTA_LINK","REFER_FRIEND_TEXT_FIELD","STYLE_QUIZ_PENDING_QUIZ","MEMBERSHIP_LOYALTY_EXPAND_COLLAPSE_CTA","MEMBERSHIP_LOYALTY_EXPAND_COLLAPSE_ALL_CTA","MEMBERSHIP_FAQ_TERMS_AND_CONDITION_LINK","EXCLUSIVE_ARROW_RIGHT","EXCLUSIVE_ARROW_LEFT","EXCLUSIVE_PIP","ARROW_CLICKS","EXCLUSIVE_PIP_ACTION","MODULE_CHANGE","ARROW_NEXT","ARROW_PREVIOUS","EXCLUSIVE_VIEWALL","EXCLUSIVE_EXPERIENCE_CTA","EXCLUSIVE_RIGHT_SECTION","EXCLUSIVE_CONTENT_SLOTS_CLICK","EXCLUSIVE_SELECT_CONTENT","EXCLUSIVE_EXPERIENCE_NAME","EXCLUSIVE_CLICK_TO_VIEWALL","EXCLUSIVE_VIEWALL_EXCLUSIVE_EXPERIENCES","EXCLUSIVE_TOOLTIP","REFER_FRIEND_TOOLTIP","EXCLUSIVE_OPEN_TOOLTIP","HOW_TO_EARN_LINK","VIEW_POINT_ACTIVITY_CTA","REWARD_START_SHOPPING","REWARD_VIEW_CODE_CTA","VOUCHER_MODAL_CLOSE_CTA","OFFER_FLIP_CARD_CTA","VIEW_COPY_CODE_CTA","OFFER_DETAIL_CLOSE","BONUS_POINTS_DAY","EARLY_ACCESS","LOYALTY_PROGRAM_MODAL","LOYALTY_ACCOUNT_CARD","VIEW_LOYALTY_DASHBOARD","LOYALTY_DRAWER_LINK","LOYALTY_OPT_IN_CHECKBOX","ORDER_CONFIRM_REGISTER_MODAL","ORDER_CONFIRM_GUEST_ELEMENT","CREATE_ACCOUNT_ORDER_CONFIRM","LOYALTY_NEXT_BUTTON","CLOSE_WELCOME_MODAL","CLOSE_ENROLL_NOW_MODAL","ENROLL_LOYALTY_CTA","GUEST_LOYALTY_ENROLL","STYLE_QUIZ_START_CTA","STYLE_QUIZ_GO_TO_DASHBOARD","SWATCH_SELECTION_WRAPPER","NEXT_QUESTION_CTA","PREVIOUS_QUESTION_CTA","SUBMIT_QUIZ_CTA","SKIP_THIS_QUESTION_CTA","FINISH_LATER_CTA","START_SHOPPING_CTA","CONTENT_SLOT_SELECTORS","LOYALTY_BENEFIT_LABEL","LOYALTY_ANNUAL_GIFT_ID","ANNUAL_GIFT_LABEL","LOYALTY_BIRTHDAY_TREAT_LABEL","LOYALTY_DIGITAL_WALLPAPER_LABEL","MODAL_CLOSE_LABEL","MODAL_VOUCHER_CLOSE_LABEL","MODAL_SELECTED_LABEL","MODAL_DOWNLOAD_LABEL","CLICK_EVENT_ACTION","SHARE_EVENT_ACTION","LOYALTY_DASHBOARD_LABEL","LOYALTY_BENEFIT_TOOLTIP_LABEL","BENEFIT_LABEL","LOYALTY_EXCLUSIVE_EXPERIENCE_TOOLTIP_LABEL","LOYALTY_EXCLUSIVE_EXPERIENCE_LABEL","LOYALTY_MEMBERSHIP_FAQ_TOOLTIP_LABEL","TOOLTIP_LABEL","OPEN_TOOLTIP_LABEL","CLOSE_TOOLTIP_LABEL","STYLE_QUIZ_TOOLTIP_LABEL","STYLE_QUIZ_PAGE_SECTION","LOYALTY_REFER_A_FRIEND_SECTION","LOYALTY_MEMBERSHIP_FAQ_SECTION","LOYALTY_MODAL_PAGE_SUBSECTION","LOYALTY_REFER_A_FRIEND_LABEL_SECTION","LOYALTY_REFER_A_FRIEND_TOOLTIP","LOYALTY_EVENT_LABEL","MEMBERSHIP_FAQ_EXPAND_COLLAPSE_ACTION","MEMBERSHIP_FAQ_EXPAND_COLLAPSE_ALL_ACTION","MEMBERSHIP_FAQ_TERMS_AND_CONDITION_LABEL","REWARDS_TOOLTIP_LABEL","REWARDS_PAGE_SECTION_LABEL","EVENT_CLICK_LINK_ACTION","REWARDS_HOW_TO_EARN_EVENT_LABEL","REWARDS_VIEW_POINT_ACTIVITY_LABEL","REWARDS_START_SHOPPING_LABEL","REWARDS_VIEW_CODE_ACTION","REWARDS_VIEW_CODE_LABEL","REWARDS_VOUCHER_MODAL","REWARDS_VOUCHER_LABEL","REWARDS_VOUCHER_PAGE_SECTION","OFFER_TOOLTIP_LABEL","OFFER_PAGE_SECTION","TAP_TO_REVEAL_ACTION","VIEW_AND_OFFER_CODE_CTA","OFFER_CLOSE_EVENT_LABEL","LOYALTY_PROGRAM_LABEL","LOYALTY_PROGRAM_ACTION","LOYALTY_PROGRAM_SUCCESS_ENROLL","ENROLL_LOYALTY","LOYALTY_DASHBOARD_ACTION","OPEN_LABEL","MY_ACCOUNT_NAME","ACCOUNT_PAGE_TYPE","MY_ACCOUNT_TAB","LOYALTY_PROGRAM_DETAILS","LOYALTY_OPT_IN_ACTION","LOYALTY_OPT_IN_CHECKBOX_SELECT_ACTION","LOYALTY_OPT_IN_CHECKBOX_DESELECT_ACTION","ACCOUNT_SIGN_IN_CATEGORY","CREATE_AN_ACCOUNT_ACTION","SUBMIT_LOYALTY_OPT_IN","SUBMIT_LOYALTY_NOT_OPT_IN","LOYALTY_PROGRAM_WELCOME","LOYALTY_PROGRAM_ENROLLMENT","LOYALTY_PROGRAM_ENROLL_SUCCESS","LOYALTY_STYLE_QUIZ_LABEL","LOYALTY_STYLE_QUIZ_GET_STARTED_ACTION","LOYALTY_STYLE_QUIZ_GO_TO_DASHBOARD","LOYALTY_STYLE_QUIZ_PAGE_NAME","LOYALTY_STYLE_QUIZ_QUESTION","OPTION_SELECTED","OPTION_DESELECTED","STYLE_QUIZ_NEXT_CTA","STYLE_QUIZ_PREVIOUS_CTA","STYLE_QUIZ_SUBMIT_CTA","STYLE_QUIZ_SKIP_THIS_QUESTION_CTA","STYLE_QUIZ_FINISH_LATER","START_SHOPPING","STYLE_QUIZ_THANK_YOU_PAGE","PDP_SELECTIONS","PDP_INTERACTION","CHANGE_STORE","VIEW_ITEM","SIGN_IN_OR_CREATE_ACCOUNT_ACTION","START_LABEL","PDP_PAGE_NAME","PRODUCT_PAGE_TYPE","CREATE_ACCOUNT_ACTION","SUBMIT_EVENT_LABEL","JOIN_CLUB_LILLY_EVENT","INITIATE_ACTION","LOYALTY_ENROLLMENT_CATEGORY","ACCOUNT_DASHBOARD_PAGE","GET_DIRECTIONS","STORE_INTERACTION","LOYALTY_VIEW_VOUCHER_CODE_LABEL","REWARDS_POINT_ACTIVITY_LABEL","REWARDS_SHOP_TAB_LABEL","SHARED_WISHLIST_CREATE_ACCOUNT_CATEGORY","SHARED_WISHLIST_CREATE_ACCOUNT_ACTION","SHARED_WISHLIST_CREATE_ACCOUNT_LABEL","SHARED_WISHLIST_PAGE_SUBSECTION","SHARED_WISHLIST_NON_LOYALTY_CATEGORY","SHARED_WISHLIST_NON_LOYALTY_ACTION","SHARED_WISHLIST_NON_LOYALTY_LABEL","LOYALTY_ENROLL_MODAL_INTERACTION_TYPE","SIGN_IN_OR_SIGN_UP_ENROLL_MODAL","LOYALTY_ENROLLMENT_EVENT_NAME","LOYALTY_VOUCHERS_EVENT_NAME","BOLT_INTERACTION","LOYALTY_DASHBOARD_REWARDS_EVENT_NAME","BOLT_MODAL_PROCEED","BOLT_MODAL_CLOSE","LOYALTY_REWARDS_EVENT_NAME","BOLT_SIGN_OUT","NEWSLETTER_SIGNUP_COMPLETE","NEWSLETTER_SIGNUP_FAILURE","isFitPredictorEnabled","noop","selector","querySelector","querySelectorAll","el","classList","c","contains","getPriceFromContainer","priceContainerId","container","parseFloat","getSalePrice","getSelectedColor","colorElement","getSelectedSize","sizeElement","getSizes","sizeArray","size","attrValue","startFP","ssp","getAvailableSizes","updateProductSetData","$container","context","sizes","availableSizes","each","attr","productId","first","val","salePrice","color","sizeType","productContext","$giftCardAmount","pid","masterid","useSale","prediction","event","productContainer","getAttribute","service","sizeOption","setAttribute","handleColor","attribute","handleSize","sauce","deviceWidth","channelValue","custID","email","screen","width","layout","language","market","shippingCountry","userId","emailHash","crumb","pt","bc","breadcrumb","type","html","setupTrigger","initializeDom","ssAddToCart","_container$dataset","variantId","quantity","startOM","startSF","updateProductData","newColor","setSelectedColor","newSize","setSelectedSize","newPrice","priceElement","setPrice","newSalePrice","salesPriceElement","setSalePrice","exported","alias","method","featureSwitch","exportName","VENDOR_PREFIXES","TEST_ELEMENT","TYPE_FUNCTION","round","Math","abs","setTimeoutContext","fn","timeout","bindFn","invokeArrayArg","arg","obj","hasOwnProperty","deprecate","message","deprecationMessage","stack","log","output","index","source","nextKey","extend","dest","src","merge","inherit","base","properties","childP","baseP","create","_super","boolOrFn","ifUndefined","val1","val2","addEventListeners","types","handler","splitStr","addEventListener","removeEventListeners","removeEventListener","hasParent","node","parentNode","inStr","str","inArray","findByKey","toArray","uniqueArray","sort","b","prefixed","prefix","prop","camelProp","toUpperCase","_uniqueId","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","navigator","userAgent","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","self","inputTarget","domHandler","ev","enable","init","inputHandler","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","x","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","destroy","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MOUSE_ELEMENT_EVENTS","MOUSE_WINDOW_EVENTS","MouseInput","pressed","button","which","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","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","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","STATE_POSSIBLE","STATE_FAILED","Recognizer","defaults","id","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","add","recognizeWith","requireFailure","cssProps","dropRecognizeWith","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","reset","process","attrTest","optionPointers","isRecognized","isValid","threshold","directionTest","hasMoved","inOut","time","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","xs","sm","md","lg","xl","addClass","removeClass","breakpoints","windowWidth","innerWidth","shopByPrintEl","shopByPrintDrawerEl","toggleDrawerBtn","viewAllBtn","toggleDrawerEl","allOpenClass","videoComponentEl","showClass","headerEl","clickedModalBtn","togglePrintDrawer","yOffset","getBoundingClientRect","top","pageYOffset","scrollTo","behavior","handlePrintBtnClick","href","quickviewEl","getJSON","innerHTML","renderedTemplate","quickviewClose","scrollIntoView","block","inline","focus","preventScroll","keyCode","focusable","lastFocusable","handleHeaderClickToClose","isQuickviewEl","left","opacity","categoryContent","hiddenClass","option1","currOption","selectedIndex","onload","selected","scrollAnimate","baseFormErrors","loadFormErrors","parentSelector","fieldErrors","siblings","clearPreviousErrors","hide","isInViewport","errorTextTemplate","formHelpers","checkoutContainerEl","checkoutContainer","scrollToError","formEl","headerHeight","offsetHeight","invalidEl","validateForm","valid","checkValidity","stopImmediatePropagation","validity","clearForm","form","getValidationMessage","validationMessage","$this","patternMismatchValue","rangeErrorValue","missingErrorValue","badInputErrorValue","stepMismatchErrorValue","typeMismatchErrorValue","_this$validity","patternMismatch","rangeOverflow","rangeUnderflow","tooLong","tooShort","valueMissing","badInput","stepMismatch","typeMismatch","onFormInvalidHandler","setCustomValidity","parents","onFormSubmit","updatePaymentValidation","isRequired","required","validateInputs","invalid","ajaxFormInvalid","formElSelector","submit","ajaxFormSubmit","validateCheckoutForm","guestCustomerForm","registeredCustomerForm","shippingForm","billingForm","submitShippingBtn","billingAddress","reauthForm","disabled","submitReauthBtn","spinner","submitCustomerBtn","submitCustomerLoginBtn","click","errorElement","shippingError","addressMode","customerType","giftCheckbox","giftMessageContainer","giftMessageEl","checked","submitPaymentBtn","isPaymentDisabled","isCreditTabActive","isBoltTabActive","isNewPayment","checkIsBoltEnabledEl","isBoltEnabled","savedPaymentCvv","isCardExpired","creditCardExpirationMonthEl","creditCardExpirationYearEl","cardExpiredError","boltCardExpireMonth","boltCardExpireYear","today","expDate","setFullYear","boltExpiredCardError","dwfrm_billing_creditCardFields_expirationMonth","dwfrm_billing_creditCardFields_expirationYear","checkoutStage","link","enableFormSubmitButton","formElements","selectorContainer","notMatchedClass","matchedClass","$form","isConfirmPassword","isNewPassword","isConfirmRegistrationPassword","isRegistrationPassword","isPasswordMatched","isValidForm","confirmPasswordMatches","passwordFieldId","newPasswordValue","confirmPasswordValue","isPasswordMatches","isValidForms","checkPasswordMatch","thisValue","regexPattern","regexpattern","RegExp","mismatchError","buttonClick","functions","enableOrDisableButton","formElement","debounce","SCROLLABLE_CONTENT_SELECTOR","initSpecificCarousel","scrollableContainerEl","parentEl","leftArrowEl","scrollLeft","offsetWidth","rightArrowEl","scrollWidth","initCarousel","hasEtmc","_etmc","trackCart","trackPageView","trackWishlist","setUserInfo","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","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","getItemFromLocalStorage","getNestedValue","HIDDEN_CLASS","getISPUradioButtonEl","productContainerEl","getShipToAddressContentEl","getShipToAddressradioButtonEl","getISPUPreferenceContentEl","addStoreNameClass","storeNameEl","removeStoreNameClass","getChangeStoreLinkEl","getSelectedPreferenceEl","getShippingPreferencesContainerEl","getSelectedSizeEl","selectISPURadioButton","ispuRadioButtonEl","enableISPUSection","ispuContentEl","disableISPURadioButton","disableISPUSection","selectShipToRadioButton","shipToRadioButtonEl","enableShipToContent","shipToContentEl","disableShipToRadioButton","disableShipToContent","getPreferedShippingPreference","shippingPreferenceValue","activeStoreFilter","updateVisibilityOfLowInventoryMsg","ispuLowStockEl","availabilityElement","ispuLowInventory","ispuLowInventoryMsg","ispuProductInventory","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","KEYCODE_ENTER","EVENT_KEY_ENTER","SEARCH_TYPE","SEARCH_SUBMIT","SEARCH_SUGGESTIONS","POPULAR_SEARCHES","loadScript","isAsync","script","async","body","append","loadInput","referrerID","getStyles","styles","getComputedStyle","rules","rule","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","throttle","limit","waitCallback","isThrottling","_len6","_key6","returnValue","_this","timer","minimumDelay","condition","unrestrictedCallback","_len7","_key7","_len8","_key8","newTarget","array","makeArray","outerHeight","marginTop","marginBottom","isInViewportCheck","scroll","scrollY","boundsTop","numberOfViewportToCheck","nextViewportLazyLoad","viewport","innerHeight","bounds","clientHeight","rect","bottom","right","documentElement","clientWidth","emptyCart","cartElement","duration","getLastElementInRow","nextElementSibling","sibling","offsetTop","scrollHeight","previousElementSibling","updateUrlQueryParam","fragment","queryParamsElement","permaLink","history","pushState","path","newUrl","location","getCharacterCount","waitForElement","disconnect","eventTypes","_options$bindEngine","_options$once","useJQuery","_options$targetSelect","extraData","Element","Event","targetElement","_targetElement","$element","variationGroupId","originalPrice","productPrice","isPreorder","productData","containerData","monetatePid","isQuickview","_window","productInfo","productInventory","wishlistId","productSize","swatchName","colorCode","productSet","productBadge","colorEl","swatchButton","attrDisplayvalue","tileEl","standardPrice","groupId","productNameEl","productSizeEl","valueId","originalPriceEl","productPriceEl","productColorEl","productColor","matchesBreakpoint","breakpoint","matchMedia","getCSRFToken","token","renderFragment","template","content","getCookieMap","cookie","keyValue","_keyValue$trim$split2","decodeURIComponent","setCookie","minutes","date","setTime","getTime","toGMTString","validateDate","monthSelector","dateSelector","m","d","mlength","labelOption","Option","option","isVisible","HTMLElement","offsetParent","display","visibility","overflowY","height","maxHeight","toFormData","includeUndefined","formData","FormData","formValidation","baseLogin","formatPhoneNumber","registrationFormPhone","loyaltyGuestReferralModal","$body","modal","guestCheckoutSignInModal","cancelBtnRegistrationModal","registerLeft","registerRight","register","url","ajax","dataType","serialize","success","reload","redirectUrl","err","responseJSON","createErrorNotification","errorMessage","resetPassword","resetPasswordDialog","emailEl","one","handleLogin","loginBtnEl","$loginFormEl","enableLoginButton","btn","mobileImg","desktopImg","getTimeRemaining","loyaltyWelcomeDialog","loyaltyEnrollNowDialog","invalidClass","activeClass","exclusiveCarouselIdSelector","root","loyaltyEarlyAccessRegisterForm","earlyAccessPdpSignInRegistration","_require6","swatchImageDownload","swatchImageDownloaded","downloadCtaDesktop","downloadCtaMobile","welcomeDialogEarlyAccessMsgEl","welcomeDialogMsgEl","handleEarlyAccessEnrollModal","removeWelcomeModalShowSession","handlePdpEarlyAccessLoginRegistration","isLoyaltyMember","postalCode","showWelcomeModal","loyaltyEnrollModalForm","loyaltyEnrollPostalCodeEl","loyaltyGuestEnrollment","closeButton","welcomeSessionUrl","attachLoginRegistrationFormEvents","handleEarlyAccessLogin","earlyAccessCta","_require7","initPopover","initPopoverClose","POPOVER_CLICK_BOTTOM","actionUrl","accountRegistrationForm","loginForm","keepUserLoggedIn","isPersistentLoginEnabled","signInForm","registerForm","accountHelpEl","earlyAccessRegisterLeft","earlyAccessRegisterRight","loyaltyRegistrationForm","loyaltyLoginForm","addToLoyaltyProgram","createAcctBtn","earlyAccessMsg","earlyAccessProduct","currentTarget","signInContainer","keepUserSignedInPopover","keepUserSignedContainer","loyaltyProgramMemberId","earlyAccessSignIn","optedInToLoyalty","earlyAccessRegistration","hideShowDrawerImage","drawerMobileImg","drawerDesktopImg","desktopImageWrapper","mobileImageWrapper","drawerMobileImgEl","drawerDesktopImgEl","loyaltyDrawerImageView","updateReferralBg","loyaltyReferralBg","_loyaltyReferralBg$da","bgColor","bgImageDesktop","bgImageMobile","setProperty","drawerImage","loyaltyModalEl","withImageEl","withoutImageEl","loyaltyDrawerBackground","updateImgURLOnDownloadCta","selectedWallpaperId","selectTab","imageElement","swatchImageDownloadCtaDesktop","swatchImageDownloadCtaMobile","swatchImageDownloadedCtaDesktop","swatchImageDownloadedCtaMobile","_imageElement$dataset","desktopDownloadedImage","mobileDownloadedImage","carousel","wrap","carouselControlsToggle","exclusiveCarousel","carouselControl","lastElementChild","firstElementChild","previousControl","nextControl","hash","exclusiveExperiencesTile","_loop","exclusiveModule","countDownTime","countDownTimer","countDownEle","countDownEleNoDays","countDataMsg","counterMsg","countDataMsgNoDays","timeinterval","setInterval","tokenize","newCountDataMsg","days","total","clearInterval","updateClock","exclusiveExperiencesCountDown","earlyAccessBtn","loyaltyDrawer","loyaltyAppImage","loyaltyDrawerContent","isAppDrawer","drawerAppImgEl","appImageWrapper","appMobileImgEl","isLoyaltyProgramDrawerClick","isLoyaltyProgramOverviewFromHeader","loyaltyContainer","guestEnrollment","memberSignInEnrollment","loyaltyIsImage","closeButtonLabel","drawerTitle","drawerCloseButtonLabel","drawerTitleE1","drawerCloseButtonE1","ariaLabel","loyaltyEnrollPostalCodeContainer","loyaltyEnrollPostalEl","loyaltyEnrollCheckboxEl","enrollNowSource","loyaltyRemoveClass","loyaltyEnrollNowSubmit","postalCodeEl","referrerIDEl","postalCodeRegex","regexp","invalidFeedback","requestData","lillyLoyaltyProgram","loyaltyUnenrollDashboard","accountLoyaltyDashboard","showWelcomePopup","loyaltyDashboardShow","checkLoyaltyAccess","showEnrollmentModel","imageUrls","modelImages","enrollmentModel","welcomeModel","loyaltyaccesspopupmobile","LoyaltyguestenrollmentnonloyaltyD2x","loyaltywelcomepopupmobile","LoyaltywelcomeloyaltyD2x","loyaltyDashboardOffersTile","expirationDateTime","cardFlippedEl","cardFront","_e$target$dataset","expiryDate","couponCode","formatString","offerDiscountDialog","offerDiscountTileData","offerDiscountModalData","copyCodeText","getFormatDateString","select","setSelectionRange","clipboard","writeText","loyaltyReferralDrawer","referralUrlElement","referralUrl","loyaltyCopyReferralUrl","copyReferralUrl","copyCta","copiedLinkCta","then","loyaltyOopsRefreshSection","successServiceResData","tooltipModule","tooltipInnerData","serviceResHTMLData","updatedToolTip","popContent","tooltipIcon","popover","placement","clickEvent","clicked","scrollableContent","referralModuleBg","referralSection","loyaltyEarlyAccessSignUp","phInfoPopover","fpoInfoPopover","checkoutBenefitsInfoPopover","cvvInfoPopover","giftCardInfoPopover","birthdayInfoPopover","deliveryFeeInfoPopover","boltSignoutMessage","earlyAccessMessage","giftReturnNumberInfoPopover","keepUserSignedInContainer","earlyAccessLockedSelector","pdpChatWrapper","pdpChatPopover","pdpChatContainer","initPopoverCloseSelector","tooltipSelector","initPopoverPromotions","popoverContent","initPopoverWishList","initPopoverEarlyAccessLocked","initPopoverAll","_regeneratorRuntime","asyncIterator","toStringTag","Generator","Context","makeInvokeMethod","tryCatch","h","s","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","displayName","isGeneratorFunction","mark","setPrototypeOf","__proto__","awrap","reverse","prev","rval","handle","complete","finish","catch","delegateYield","asyncGeneratorStep","focusHelper","toggleSelectSizeInfo","isEarlyAccessElement","swatchNameTemplate","sizeOptionTemplate","sizeButtonTemplate","gwpSizeTemplate","dialogTemplate","loyaltyTemplates","loyalty","$gwpDialog","readyClass","selectedProductClass","notAvailable","loyaltyProfile","isLoyaltyProgramMember","isLoyaltyAuthenticated","isLoyaltyEnabled","isContentModulesFetched","getPidValue","$el","getQuantitySelector","updateAttrs","attrs","$productContainer","msgs","attrsWithSwatches","isChoiceOfBonusProducts","$attrValue","$swatchButton","assistiveSelectedText","empty","bonusVariationUrl","removeAttr","selectable","processSwatchValues","$bonusProductItem","sizeContainer","singleSize","displayValue","loopStatus","resetUrl","selectLabel","selectId","sizeOptions","multiDefaultSizeOption","inStock","forceOutOfStock","outOfStockMsg","outOfStock","multiSizeOption","multiSize","$attr","selectSizeEl","selectedValue","not","selectedOptions","isOffline","sizeListItemEl","assistiveElement","_assistiveElement$dat","selectedText","optionEl","processNonSwatchValues","updateOptions","$optionEl","handleEarlyAccessCta","isEarlyAccessProduct","earlyAccessLockIcon","earlyAccessWishlistIcon","addToCartCta","earlyAccessPdpEl","earlyAccessGuest","earlyAccessRegistered","createCarousel","imgs","isEarlyAccess","earlyAccessText","videoUrl","carouselId","displayCounter","counterHtml","dataSrc","imageZoomUrl","imagePresetUrl","enableCache","carouselBadge","srcset","alt","appendTo","addToWishlistIconPdp","loyaltyEarlyAccessEl","addToCartButtonPdp","pdpNonEarlyAccessLoginEl","loyaltyEarlyAccessLockContainer","firstImageElement","videoTemplate","cloneNode","templateVideoElement","eachElement","load","detach","handleVariantResponse","response","_response$product","product","variationAttributes","productType","readyToOrder","bonusVariationAtrributes","isFinalSale","isDirectlyPurchasable","earlyAccess","saleMessageEl","resources","sizeElements","primaryImageUrls","images","checkout","large","productImageElement","setModalImages","ispu","swatchNameElement","selectedSwatch","selectedSwatchName","swatchHtml","swatchNameHtml","selectedSwatchElement","$priceSelector","replaceWith","promotionElement","promotionsHtml","promotionsPopover","availabilityValue","availabilityMessages","availability","messages","availabilityMsgEl","notPurchasable","updateAvailability","attributes","attributeGroup","ID","label","getAttributesHtml","updateQuantities","quantities","optionsHtml","attributeSelect","selectedValueUrl","selectedSizeElement","$choiceOfBonusProductEl","updateProductPrice","priceTemplate","priceSection","priceContainer","strikeThroughContainer","salesContainer","fixedPrice","fixedStandardPrice","toFixed","updateSizeElements","variantsList","variants","quickviewProductInfo","_sizeContainer$datase","describedby","sizeButtonHtml","eachVariant","eachSize","sizeId","inventoryData","variantData","availabilityStatus","updateImageDetails","imageObj","srcsetPresets","srcsetString","imageScene7","updateProductDetails","currentElement","promotionMessageTmpl","elementData","variantGroupId","swatchContainer","assistiveElements","assistiveTextElement","monogramBtn","_productInfo$variants","shopThePrint","mgFlag","mgLocs","hasWaysToWear","promotions","setWishlistProductId","colorElements","customPageTitle","pageTitle","includeLillyColor","lillyColorName","customPageDescription","pageDescription","titleElement","descriptionElement","waysToWearEl","variationGridUrl","colorlabel","colorLabel","longDescriptionElement","description","longDescription","lillyColor","productFinalSaleMessage","productFreeReturnsMessage","variationUrl","waysToWearContainer","IntersectionObserver","_ref4","entry","isIntersecting","variationGroup","always","unobserve","destroyContentModulesIntersectionObserver","updateContentModules","rootMargin","dynamicallyFetchContentModules","shopThePrintElement","outerHTML","updateShopThePrint","ssColor","ssSizeElement","ssSize","promotion","calloutMsg","promotionIdx","details","carouselContainerEl","carouselContainerHeight","minHeight","wishlistButton","assistiveText","swatchParam","queryParams","search","UpdatedParams","eachParam","replaceState","parseHtml","$html","parseHTML","selectedProducts","footer","handlePostCartAdd","displayModal","addToCartWarningDialog","isOnCartPage","pathname","buttons","primary","redirectLink","modalContentHeading","messageHeading","modalContentBody","messageBodyOnCart","messageBodyOffCart","messageType","getChildProducts","childProducts","getOptions","$elOption","urlValue","selectedValueId","optionId","setControlsEnabled","controls","blocker","blockerActiveClass","control","blockElement","methods","editBonusProducts","bonusUrl","bonusChoiceRuleBased","showProductsUrlRuleBased","showProductsUrlListBased","maxBonusItems","addToCartUrl","uuid","pliUUID","pageSize","bonusDiscountLineItems","parsedHtml","enterDialogMessage","insertAfter","selectedBonusProducts","modalDialog","selectedProductsCount","eachProductList","bonusAccordionContainer","maxCount","maxItems","productListLength","eachProduct","selectedProduct","selectBonusCheckbox","productDialog","accordionContainer","bonusAccordionElements","addToCart","sizeEl","isSizeSelected","isSelectedSizeUnavailable","children","firstOption","isEnabled","validProducts","chooseBonusProducts","focusChooseBonusProductModal","onClosingChooseBonusProductModal","trapChooseBonusProductModalFocus","focusParams","containerSelector","firstElementSelector","lastElementSelector","setTabNextFocus","colorAttribute","productDetailContainer","_productInfo$variants2","pdpBreadCrumbs","monetateData","updateQuickViewDetails","_data$product","selectColorAttribute","renderSizeElements","swatchEl","_productInfo$variants3","wishlistDisabled","showStrikeHearts","selectAttribute","_ref6","_callee","$target","storeLocatorContainer","ispuAddToCart","pdpSetData","isPDPSet","setPids","setModal","modalProducts","analyticsData","closestUrl","res","resData","_queryFirst2","_context","modalProduct","_queryFirst","sizeSelected","pidsObj","listName","utagPromoName","utagPromoCreativeName","utagListName","fetch","ok","json","t0","_next","_throw","_x","selectBonusProduct","$choiceOfBonusProduct","maxPids","totalQty","choiceOfBonusProduct","selectedProductElement","bonusCountElement","selectedCount","enableAddTocart","optionID","selectedBonusProductHtml","bonusDrawer","bonusTile","targetCheckbox","accordion","checkedBox","removeBonusProduct","$selected","enableBonusProductSelection","available","bonusProductDialog","showMoreBonusProducts","addBonusProductsToCart","$readyToOrderBonusProducts","queryString","pidsObject","bonusProducts","qtyOption","qty","revealRecommendations","eachRecommendation","titleEl","productEl","handleEarlyAccessPLPLockIcon","earlyAccessPLPContainer","earlyAccessPlpIcon","lockIconContainer","earlyAccessPLPBadge","earlyAccessDate","isEarlyAccessItem","getQuantitySelected","isShippingPreferencesViewEnabled","_require$productDetai","availabilityMessageTmpl","availabilityMessageOOS","availabilityMessagePreorder","ispuAvailabilityMessageTmpl","ispuLowStockMessageTmpl","sizeChartClasses","IN_STOCK","NOT_AVAILABLE","PREORDER","_require5","handleProductImageZoom","pdpPageCarousels","imageObserver","mutationList","_step","_iterator","_n","F","_createForOfIteratorHelper","mutation","addedNodes","zoomAlt","pdpImages","pdpIndicators","img","imageEl","zoomed","mobileZoomed","touchZoom","elm","thisHammer","transform","xPos","current","yPos","ceil","createTouchZoom","createHoverZoom","hiresUrl","zoom","magnify","handleNotifyMe","addToCartSection","notifyContainer","notifyMeButton","notifyMeDesc","availabilityMessageEl","isNotifyMeEnabled","formattedPrice","imageData","notifyImageElement","_imageData$","imageHasLoaded","notifyColor","notifySize","customerEmail","onSizeChangeHandler","selectedSizeValue","assistiveElementOfSelected","_assistiveElementOfSe","selectedSize","updateQuickViewProductInfo","selectedColorId","currentSizeElement","quickViewInfo","variantGroupData","vgProductDetailsUrl","selectedSizeData","addToCartButton","productDetailsUrl","fullPDPLink","hideStrikeHearts","variantProductDetailsUrl","isFinalSaleVariant","isDirectlyPurchasableVariant","wishlistDisabledVariant","isLowInventory","selectedColorName","updateProductInfo","totalPrice","monogramProductPrice","ispuButton","ispuInventoryData","ispuMessage","ispuLowStockMessage","ispuAvailabilityStatus","isISPULowInventory","shippingPreferencesEnabled","ispuAvailabilityValue","ispuLowStockValue","lowStockAvailabilityMessage","breadcrumbItems","categoryUrl","shipToAddressAvailabilityStatus","inStorePickUpAvailabilityStatus","isStorePickUpLowInventory","inStorePickUpAvailabilityMessage","inStorePickUpLowStockMessage","notifyBlock","custEmail","handleNotifyMeBlock","pickupImageElement","_ispu$","pickupSize","monogramImages","monogram","updatedImageData","monogramObject","monogramProductID","monogramImageURL","monogramImageSrcSetURL","monogramLocations","monogramSelectedColor","monogramSelectedSize","handleLastLinkTab","sizeChartCatBtn","toogleActiveSizeChartTab","$prodSizeChart","$lpSlideout","_$this$data","activeCategoryVal","sizefamily","defaultText","defaulttext","$activeCategoryEl","$lpSizechartTitle","tab","animate","scrollFitRatingToReviews","bvReviews","updateAttribute","_response$data$produc","eq","colorVariationObject","attributeId","selectedSwatchObject","eachValue","updateSelectedSwatchProductName","selectSizeAttribute","buttonElement","attrUrl","quickViewCarouselEl","afterAttributeSelect","wishListID","responseContainer","sizeCard","sizeSeparator","_assistiveElementOfSe2","restrictedFromOrder","quickviewContainer","sales","formatted","updateCartButton","giftWrapAvailableFlag","giftWrapAvailable","_ispu$2","ssColorElement","pricesObject","list","ssSalesPrice","ssPrice","productSetModal","addAllToToteButton","selectPdpSizeAttribute","selectedColorElement","selectedSizeEl","allSelectableSwatches","notifyMeBoxHidden","notifyMeHidden","updateAttributesAndDetails","attributesHtml","shortDescription","showSpinner","quickViewModal","allAvailable","allReady","info_selectforstock","sizeChart","setStickyNav","is","lastLinkEl","handleEarlyAccessLockIcon","productContainerEarlyAccessIcon","earlyAccessItem","handleOfflineProduct","offlineContainerEl","currentSearch","TS_PARAM","handlePdpNonEarlyAccessLoyalty","signInCreateAccountModal","loyaltyEnrollNowModal","pdpSignInCreateAccountButton","earlyAccessSignInInfo","pdpSignInInfo","earlyAccessSignInText","joinButton","earlyAccessWelcomeCta","pdpSignInTab","selectStyleMessageTmpl","ispuSelectStyleMessageTmpl","selectStylesMessage","ispuAvailabilityMessageEl","earlyAccessUntilDate","detail","_require$default","injectAfterpay","injectFitPredictor","injectLongDescription","updateFullProductLink","quickViewTemplates","quickView","$window","_require4","header","getNavOffset","attachFormEvents","quickViewFormSelector","$quickViewTriggerElement","backFocusToTrigger","showQuickview","quickviewURL","lastElementInRow","selectedProductDescriptionElement","stopSpinner","_require8","scrollTop","filledContainers","containerTop","isNewContainerBelow","openContainer","requestAnimationFrame","openTagIndex","substr","selectedSwatchEl","gcType","quickViewFullDetailMsg","productUrl","quickViewContainer","earlyAccessGuestSignIn","injectQuickView","quickViewModalEl","quickview","getModalHtmlElement","productLineItemEl","lineItemAmountEl","padding","focusQuickview","trapQuickviewFocus","nextToLastElementSelector","hideDialog","beforeUpdateAttribute","updateAddToCart","buttonToUpdate","validateEmail","emailFormGroup","emailError","missingError","notifyMeSubmit","productID","subscribe","$notifyMe","confirmMessage","notifyMeContainerSubmit","notifyMeContainer","notifyConfirm","sucess","closeNotifyMeForm","preSelectNotifyCheckbox","notifyMeId","processInclude","notifyMe","containerEl","addToWishlist","addToWishlistModal","cart","cartAvailabilityMessageOOS","promo","shippingMethod","checkoutNormalShipping","checkoutDiscountShipping","discountPrice","emptySwatchTemplate","addressSuggestions","suggestionTextTemplate","suggestionsTemplate","approachingDiscounts","discountContainerTemplate","singleDiscountTemplate","multipleDiscountsTemplate","nonCouponBasedAdjustmentTemplate","_options$loop","loop","_options$videoUrl","_options$imgUrl","imgUrl","_options$classNames","classNames","_options$autoplay","autoplay","_options$muted","muted","_options$controls","_options$icontitle","icontitle","_options$icondesc","icondesc","imageTemplate","altText","ariaDescribedby","oosMessage","guestEmptyWishlistTemplate","emptyWishlistMessage","emptyWishlistContentAssetBody","emptySFL","emptySFLMessage","continueShopURL","continueShopMsg","signInMsg","signInSFLURL","autoComplete","suggestionLink","suggestion","addressLine","secondaryEntryAddressLine","street_line","secondary","city","zipcode","suggestionContainer","containerClass","contactUsTemplate","signupError","msg","defaultSignupError","browserWarningTemplate","shippingPreferenceTemplates","shippingPreferences","ispuRadioLabel","ispuRadioValue","shipToRadioLabel","shipToRadioValue","changeStoreLabel","preferISPU","storeDetail","storeId","address1","stateCode","productDetail","_options$buttons","_options$className","_options$modalContent","_options$modalContent2","_options$id","_options$slideOut","slideOut","buttonSpace","floor","oneTrust","privacyDialogCookieBanner","styliticsTemplates","shopTheModelBadge","returnsPageTemplates","defaultError","cyberSource","secureAcceptanceTag","paymentType","boltPayPaymentTag","paymentLastFour","expMonth","expYear","paypalPaymentTag","paypalMethod","paypalAmount","creditCardPaymentTag","cardType","creditCardType","maskedCardNumber","cardEndIn","cardExpMonth","cardExpYear","checkoutErrorTemplate","checkoutErrorMsg","errorMsg","string","leftToken","rightToken","operators","_","code","toKebabCase","startsWith","endsWith","digit","charCodeAt","tokens","keyString","replaceValues","initOnce","flag","appendToUrl","params","encodeURIComponent","onSuccess","onError","geolocate","successCallback","mixin","errorCallback","geolocation","getCurrentPosition","coords","latitude","longitude","maximumAge","setItemInLocalStorage","removeItemFromLocalStorage","formatValue","numbers","char","errorMessageElmParent","isMobile","mobileAgentHash","idx","stickyScrollPosition","ticking","detailStickyScroll","itemHeight","windowHeight","newTop","handleStickyPositionOnScroll","isUnsupportedBrowser","unsupportedBrowserTypes","sitePrefs","some","uaFragment","endtime","seconds","hours","validateEmailBolt","wishlistBtn","wishlistStrikeBtn","errorHtml","firstFocusableEl","lastFocusableEl","linkElements","feedbackElement","prepend","position","login","receivedMsgHeading","receivedMsgBody","mobile","returnUrl","buttonText","clearResetForm","include","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","contentElement","headerElement","bannerHeaderElement","bannerTextElement","categoryNameElement"],"sourceRoot":""}