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,QAAU,SAAUgsC,GACA,mBAAZA,EACPA,IAC0B,iBAAZA,GACdxrB,OAAOC,KAAKurB,GAASnnC,SAAQ,SAAU4c,GACP,mBAAjBuqB,EAAQvqB,IACfuqB,EAAQvqB,IAEhB,GAER,C,GCXIwqB,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB54B,IAAjB64B,EACH,OAAOA,EAAapsC,QAGrB,IAAID,EAASksC,EAAyBE,GAAY,CAGjDnsC,QAAS,CAAC,GAOX,OAHAqsC,EAAoBF,GAAU7nC,KAAKvE,EAAOC,QAASD,EAAQA,EAAOC,QAASksC,GAGpEnsC,EAAOC,OACf,E,wBCpBA,IAAIssC,EAAiBttC,EAAQ,MAE7BK,EAAEsB,UAAU4rC,OAAM,WACdD,EAAettC,EAAQ,OACvBstC,EAAettC,EAAQ,MAC3B,G","sources":["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/shippingPreference/constants.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/loyalty/loyaltyQuiz.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/../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/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/./cartridges/app_custom_lilly_pulitzer/cartridge/client/default/js/login.js"],"sourcesContent":["// 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","'use strict';\nconst { queryFirst, addClass, queryAll, isInViewport, removeClass, hasClass, scrollTo } = require('./domUtil');\nconst { INVALID_CLASS, HIDDEN_CLASS } = require('./constants');\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).find('.is-invalid').first();\n const $modalBodyEl = invalidEl.closest('.modal-body, .sheet-body-content');\n\n if (invalidEl[0]) {\n if ($modalBodyEl.hasClass('sheet-body-content')) {\n invalidEl[0].scrollIntoView({ behavior: 'smooth' });\n } else if (!isInViewport(invalidEl[0])) {\n const scrollOffset = invalidEl.offset().top - headerHeight;\n const newCCSection = invalidEl.closest('.credit-card-selection-new');\n const nearestElm = $modalBodyEl.length ? $modalBodyEl : newCCSection;\n if (nearestElm.length) {\n nearestElm.scrollTo(scrollOffset);\n } else {\n scrollTo(scrollOffset);\n }\n }\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).find('.form-control.is-invalid').removeClass(INVALID_CLASS);\n $(form).parents('.sheet-page').removeClass(INVALID_CLASS);\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, INVALID_CLASS);\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).parents('.form-group, .input-group').find('.invalid-feedback').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 sheetFormSubmit: () => {\n $('.sheet-page button[type=\"submit\"].enable-button-onvalidate, .sheet-page .enable-form-validate input[type=\"submit\"]').on('click', e => {\n const { target } = e;\n const sheetContainer = target?.closest('.sheet-page');\n const sheetForm = queryFirst('form', sheetContainer);\n if (sheetForm) {\n $(sheetForm)\n .find('input, textarea, select')\n .one('invalid', () => {\n addClass(sheetContainer, INVALID_CLASS);\n });\n }\n });\n },\n\n validateCheckoutForm: function () {\n // LP custom changes start\n if (checkoutContainer) {\n const guestCustomerForm = queryFirst('.guest-form', checkoutContainer);\n const registeredCustomerForm = queryFirst('.registered-form', checkoutContainer);\n const shippingForm = queryFirst('.shipping-form', checkoutContainer);\n const billingForm = queryFirst('.billing-address-form', checkoutContainer);\n const submitShippingBtn = queryFirst('.submit-shipping', checkoutContainer);\n const billingAddress = queryFirst('.billing-address', billingForm);\n const reauthForm = queryFirst('.reauth-payment-form', checkoutContainer);\n\n if (submitShippingBtn !== null) {\n submitShippingBtn.disabled = false;\n }\n // LP custom changes end\n\n $('.guest-form, .registered-form, .shipping-form, .billing-address-form')\n .find('input, textarea')\n .on('blur', function () {\n if (this.validity.valid) {\n removeClass(this, INVALID_CLASS);\n } else {\n $(this).parents('.form-group, .input-group').find('.invalid-feedback').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, INVALID_CLASS);\n } else {\n $(this).parents('.form-group').find('.invalid-feedback').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, INVALID_CLASS);\n event.stopPropagation();\n } else {\n removeClass(giftMessageEl, INVALID_CLASS);\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, HIDDEN_CLASS);\n event.stopPropagation();\n }\n });\n\n const submitPaymentBtn = queryFirst('.submit-payment', checkoutContainer);\n\n submitPaymentBtn.addEventListener('click', function (event) {\n event.preventDefault();\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, HIDDEN_CLASS)) {\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 const isPromoCodeField = this.id === 'couponCode';\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 (isPromoCodeField) {\n const isCurrentlyInvalid = hasClass(this, 'is-invalid');\n const hasExistingError = queryFirst('.coupon-error-message', this.closest('.form-group'))?.textContent !== '';\n const fieldHasValue = this.value !== '';\n isValidForm = fieldHasValue || !(isCurrentlyInvalid && hasExistingError);\n }\n\n if (this.validity.valid && isValidForm) {\n removeClass(this, INVALID_CLASS);\n if (isNewPassword || isRegistrationPassword) {\n selectorContainer.removeClass(notMatchedClass);\n selectorContainer.addClass(matchedClass);\n }\n // No invalid fields left. Remove the error messaging from the sheet button\n const sheetPage = this.closest('.sheet-page');\n if (sheetPage && !queryFirst(`.${INVALID_CLASS}`, form)) {\n removeClass(sheetPage, INVALID_CLASS);\n }\n } else {\n const $this = $(this);\n const thisValue = $this.val() || '';\n if ($form.hasClass('change-password-form') && (isNewPassword || isRegistrationPassword)) {\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 if (thisValue) {\n removeClass(this, 'is-invalid');\n $this.parents('.form-group').find('.invalid-feedback').text('');\n } else {\n $this.parents('.form-group').find('.invalid-feedback').text(getValidationMessage.apply(this));\n }\n } else if (!isPasswordMatched) {\n $this.parents('.form-group').find('.invalid-feedback').text(this.dataset.mismatchError);\n addClass(this, INVALID_CLASS);\n } else if (isPromoCodeField) {\n // do nothing -- error state is handled in cart.js\n } else {\n $this.parents('.form-group').find('.invalid-feedback').text(getValidationMessage.apply(this));\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 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.closest('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 // Show/hide arrows\n if (scrollableContainerEl.scrollWidth <= scrollableContainerEl.offsetWidth) {\n addClass([leftArrowEl, rightArrowEl], 'hide');\n } else {\n removeClass([leftArrowEl, rightArrowEl], 'hide');\n }\n}\n\nmodule.exports = {\n initCarousel: function() {\n SCROLLABLE_CONTENT_SELECTOR.forEach(scrollableContainerEl => {\n initSpecificCarousel(scrollableContainerEl);\n });\n },\n initSpecificCarousel: initSpecificCarousel\n};\n","// Classnames\nconst DISABLED_CLASS = 'disabled-section';\nconst SPU_HIDDEN_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 SET_CONTAINER_SELECTOR = '.product-set-item';\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';\nconst AVAILABILITY_CHANGE_STORE_LINK_SELECTOR = '.availability-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 = '.pickup-in-store-content .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 SPU_HIDDEN_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 SET_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 AVAILABILITY_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","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 ONE_SIZE_ID: window?.lillyUtils?.constants?.ONE_SIZE || '1 SZ',\n ONE_SIZE_LABEL: window?.lillyUtils?.resources?.ONE_SIZE || 'One size',\n\n // Forms\n CHANGED_CLASS: 'm-changed',\n FILLED_CLASS: 'm-filled',\n\n // DOM Class\n ACTIVE_CLASS: 'active',\n HIDDEN_CLASS: 'd-none',\n INVALID_CLASS: 'is-invalid',\n INVISIBLE_CLASS: 'invisible',\n NO_SCROLL_CLASS: 'no-scroll',\n SELECTED_CLASS: 'selected',\n SHOW_CLASS: 'show',\n SHOW_ALL_CLASS: 'show-all',\n NOT_AVAILABLE_CLASS: 'not-available',\n D_FLEX: 'd-flex',\n DISPLAY_CLASS: 'd-block',\n INACTIVE_CLASS: 'inactive',\n MENU_OPENED: 'm-menu-opened',\n LOADED_CLASS: 'loaded',\n SCROLLED_CLASS: 'scrolled',\n\n // Product status\n PREORDER_STATUS: 'PREORDER',\n BACKORDER_STATUS: 'BACKORDER',\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 EVENT_KEY_TAB: 'Tab',\n\n // Video constants\n PLAYED_CLASS: 'played',\n MUTED_CLASS: 'muted',\n UNMUTED_CLASS: 'unmuted',\n WAS_PLAYING_CLASS: 'resize-paused',\n TIMEOUT_100: 100,\n\n // Search types\n SEARCH_TYPE: 'searchType',\n SEARCH_SUBMIT: 'search submit',\n SEARCH_SUGGESTIONS: 'search suggestions',\n POPULAR_SEARCHES: 'popular searches',\n SEARCH_HISTORY: 'SEARCH_HISTORY',\n\n // Refinement Types\n REFINEMENT_TYPE_CATEGORY: 'category',\n // Animation constants\n ANIM_TIME_INSTANT: 0,\n ANIM_TIME_QUICK_1: 150,\n ANIM_TIME_QUICK_2: 300,\n ANIM_TIME_STANDARD_1: 600,\n ANIM_TIME_STANDARD_2: 1200,\n ANIM_TIME_STANDARD_3: 2000,\n ANIM_TIME_STANDARD_4: 3000,\n TIMEOUT_1000: 1000,\n ANIM_EASE_LINEAR: 'cubic-bezier(0, 0, 1, 1)',\n ANIM_EASE_IN: 'cubic-bezier(0.9, 0, 0.7, 1)',\n ANIM_EASE_OUT: 'cubic-bezier(0.3, 0, 0.1, 1)',\n ANIM_EASE_IN_OUT: 'cubic-bezier(0.3, 0, 0.7, 1)',\n EMAIL_REGEX: /^(?=^.{6,80}$)(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]*[a-zA-Z0-9]+\\.)+[a-zA-Z]{2,}))$/,\n PHONE_NUMBER_REGEX: /^\\+?1?\\s*\\(?([2-9][0-8][0-9])\\)?[\\-\\. ]?([2-9][0-9]{2})[\\-\\. ]?([0-9]{4})(\\s*x[0-9]+)?$/,\n\n IS_SAFARI: /^((?!chrome|android).)*safari/i.test(navigator.userAgent)\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, ANIM_TIME_STANDARD_1, ANIM_EASE_IN_OUT } = 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 * Looks for availability of any one of multiple 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.hasAnyClass = (el, ...classes) => {\n if (!el) return false;\n\n const { classList } = el;\n\n return !!classList && classes.some(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 {number} height of element\n */\nexports.outerHeight = el => {\n if (!el) return -1;\n const styles = getStyles(el);\n\n return el.offsetHeight + parseInt(styles.marginTop, 10) + parseInt(styles.marginBottom, 10);\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 && rect.right > 0 && rect.left < (window.innerWidth || document.documentElement.clientWidth) && rect.top < (window.innerHeight || document.documentElement.clientHeight);\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} jquery object\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 const url = new URL(window.location.href);\n const hash = url.hash; // Save the current hash\n\n let newUrl;\n\n if (permaLink) {\n newUrl = permaLink.value;\n } else if (queryParamsElement) {\n const baseUrl = window.location.href.split('?')[0];\n newUrl = baseUrl + '?' + queryParamsElement.value;\n }\n\n // Append the hash if it exists\n if (hash) {\n newUrl += hash;\n }\n\n // Update the history state if newUrl is calculated\n if (newUrl) {\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 { eventCondition, bindEngine = 'native', once = false } = 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 * get parsed productInfo object from data attribute\n * @param {HTMLElement} container - current product-tile element\n * @return {Object|boolean} parsed object\n */\nexports.getProductInfoFromDataAttr = function (container) {\n const productInfo = container?.dataset?.productInfo;\n if (!productInfo) return false;\n\n let parsedProductInfo;\n try {\n parsedProductInfo = JSON.parse(productInfo);\n } catch {\n return false;\n }\n\n return parsedProductInfo;\n};\n\n/**\n * get adjusted final sale price\n * @param {HTMLElement} container - container that has price\n * @returns {string} - string value price\n */\nexports.getSalesPrice = container => {\n if (!container) return '';\n\n const priceEl = queryFirst('.price-section .sales .ssSalesPrice', container);\n return priceEl && ((priceEl && priceEl.value) || '').split('$').pop();\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, viewType } = 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 || 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 =\n [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 && viewType !== 'product-tile') {\n isPreorder = getNestedValue(productInventory?.[masterId], '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 // get sales price\n if (!productPrice) productPrice = this.getSalesPrice(container) || '';\n\n // get last adjusted price (after all promotions) from data-product-info\n if (!productPrice) {\n const productInfoData = this.getProductInfoFromDataAttr(queryFirst('.js-product-tile', container));\n const variants = productInfoData && getNestedValue(productInfoData, '{0}.variants', masterId);\n if (variants) {\n const colorCode = Object.keys(variants).find(variant => variants[variant].groupId === pid);\n const formattedPrice = colorCode && variants[colorCode]?.formattedPrice;\n if (formattedPrice) productPrice = formattedPrice.split('$').pop();\n }\n }\n\n if (productPrice && !~productPrice.indexOf('.')) {\n productPrice += '.00';\n }\n\n if (!swatchName) {\n swatchName = dataset.swatchName || '';\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 = () =>\n 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 let isSelectModified = true;\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) {\n option.selected = true;\n isSelectModified = false;\n }\n dateSelector.add(option);\n }\n if (isSelectModified) {\n const changeEvent = new Event('change');\n dateSelector.dispatchEvent(changeEvent);\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) =>\n 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\n/**\n * Slides an element up to hide it\n * @param {HTMLElement} elem - the element to animate\n * @param {number} duration - the duration of the animation in milliseconds\n * @param {string} easing - the easing function to use for the animation\n * @returns {Promise} - a promise which will resolve when the animation duration has elapsed\n */\nexports.slideUp = (elem, duration = ANIM_TIME_STANDARD_1, easing = ANIM_EASE_IN_OUT) => {\n if (elem) {\n const { addClass } = this;\n const staticHeight = getComputedStyle(elem).getPropertyValue('height');\n elem.style.setProperty('--anim-static-height', staticHeight);\n elem.style.setProperty('--slide-up-duration', `${duration}ms`);\n elem.style.setProperty('--slide-up-ease', easing);\n addClass(elem, 'animate');\n\n // small delay is needed to process the new height added by the animate class before animating\n setTimeout(() => {\n addClass(elem, 'animate-slide-up');\n }, 10);\n }\n\n return new Promise(resolve => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n};\n\n/**\n * determines if it is recommendation ptoduct from Interaction Studio in mini-cart\n * @param {HTMLElement} srcElement - 'add to cart' button element\n * @returns {HTMLElement|undefined} - IS product container\n */\nexports.getISProductContainer = srcElement => {\n const ISProductContainer = srcElement && srcElement.closest('.mini-cart-container #evg-minicart-recs');\n return ISProductContainer && ISProductContainer.contains(srcElement) && ISProductContainer;\n};\n\n/**\n * get product data from Interaction Studio container\n * @param {HTMLElement} container - IS product container\n * @returns {Object} - IS product data\n */\nexports.getISProductData = container => {\n const { dataset } = queryFirst('.tile-img-link', container);\n const { evgItemId, productName, productSize, masterid } = dataset;\n\n return {\n productName: productName,\n productId: evgItemId,\n productSize,\n masterId: masterid,\n productColor: queryFirst('.evg-product-color', container)?.getElementsByTagName('div')[1]?.textContent,\n productPrice: this.getSalesPrice(container)\n };\n};\n\n/**\n * set adjusted sale price to tealiumPrices array\n * @param {Object} vgIDs - variation groups IDs array\n * @param {Object} tealiumPrices - tealium prices array\n * @returns {Object|boolean} - array with adjusted prices\n */\nexports.setAdjustedSalesPrice = (vgIDs, tealiumPrices) => {\n if (!vgIDs || !tealiumPrices || vgIDs.length !== tealiumPrices.length) return false;\n\n const searchResultsContainer = queryFirst('.search-results.container');\n if (!searchResultsContainer) return false;\n\n for (let i = 0, len = vgIDs.length; i < len; i++) {\n const container = searchResultsContainer.querySelector('.js-product-tile-container:has([data-product-id=\"' + vgIDs[i] + '\"])');\n const adjustedPrice = container && this.getSalesPrice(container);\n if (adjustedPrice && adjustedPrice !== tealiumPrices[i]) tealiumPrices[i] = adjustedPrice;\n }\n\n return tealiumPrices;\n};\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, queryAll, validateDate, hasClass } = require('../domUtil');\nconst { formatPhoneNumber, getItemFromLocalStorage } = require('../util');\nconst { clearForm } = require('../clientSideValidation').functions;\nconst registrationFormPhone = queryFirst('.registration-form-phone');\nconst loyaltyGuestReferralModal = queryFirst('#loyalty-referral');\nconst $body = $('body');\nconst fullLoginPage = queryFirst('.login-page-container');\nconst loginPageNav = queryFirst('.login-nav-container');\nconst accountSheet = queryFirst('#account-sheet');\nconst loginHeaderLink = queryFirst('.login-item.dropdown-item');\nconst orderStatusHeaderLink = queryFirst('.order-status-item.dropdown-item');\nconst checkoutContainer = queryFirst('#checkout-main');\nconst pdpContainer = queryFirst('.pdp.container');\nconst mobileHeaderCloseBtn = queryFirst('.navbar > .close-menu > .close-button');\nconst { HIDDEN_CLASS, ACTIVE_CLASS } = require('../constants');\nconst LOGIN_PAGE = 'login';\nconst REGISTER_PAGE = 'register';\nconst RESET_PASSWORD_PAGE = 'password-reset';\nconst RESET_PASSWORD_CONFIRM_PAGE = 'password-reset-confirm';\nconst TRACK_ORDER_PAGE = 'track-order';\nconst EXISTING_CUSTOMER_PAGE = 'existing-customer';\nlet PREVIOUS_PAGE = LOGIN_PAGE;\n\nwindow.addEventListener('load', () => {\n validateDate();\n const formElement = queryFirst('.change-password-form');\n const referrerID = getItemFromLocalStorage('REFERRED_ID');\n\n if (fullLoginPage) {\n if (queryFirst('#login-form.active', fullLoginPage)) {\n addClass(loginHeaderLink, HIDDEN_CLASS);\n } else if (queryFirst('#order-form.active', fullLoginPage)) {\n addClass(orderStatusHeaderLink, HIDDEN_CLASS);\n }\n }\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});\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 loginBtns = queryAll('.account-login-btn');\n if (loginBtns.length) {\n loginBtns.forEach(btn => (btn.disabled = false));\n }\n}\n\n/**\n * Switches the active page contained within the Login Sheet to the specified page\n * @param {string} page - Name of sheet page to switch to\n */\nfunction setActivePage(page) {\n const activePage = queryFirst('.sheet-page.active', accountSheet);\n const activeForm = queryFirst('form', activePage);\n removeClass(activePage, ACTIVE_CLASS);\n activeForm?.reset();\n clearForm(activeForm);\n addClass(queryFirst(`.sheet-page.${page}-sheet`, accountSheet), ACTIVE_CLASS);\n}\n\n/**\n * Opens the Login Sheet to the specified page\n * @param {string} page - Name of page that should be visible when the sheet opens\n */\nfunction openSheet(page) {\n mobileHeaderCloseBtn?.click(); // Close Mobile Menu\n $('.modal.show:not(#account-sheet)').modal('hide');\n setActivePage(page);\n $(accountSheet).modal('show');\n}\n\nmodule.exports = {\n ...baseLogin,\n\n login: function () {\n $('form.login').submit(function (e) {\n const $sheet = $('.sheet.show .sheet-dialog');\n var form = $(this);\n e.preventDefault();\n var url = form.attr('action');\n $sheet.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 if (!data.success) {\n formValidation(form, data);\n $sheet.spinner().stop();\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 $sheet.spinner().stop();\n }\n }\n });\n return false;\n });\n },\n\n register: function () {\n $('form.registration').submit(function (e) {\n const $sheet = $('.sheet.show .sheet-dialog');\n var form = $(this);\n e.preventDefault();\n var url = form.attr('action');\n $sheet.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 if (data.success) {\n form.trigger('register:success');\n if (checkoutContainer || pdpContainer) {\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 anywhere else\n location.href = data.redirectUrl;\n }\n } else {\n formValidation(form, data);\n $sheet.spinner().stop();\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 $sheet.spinner().stop();\n }\n });\n return false;\n });\n },\n\n resetPassword: function () {\n const $resetPasswordForm = $('.reset-password-form');\n const $sheet = $('.sheet.show .sheet-dialog');\n $resetPasswordForm.on('submit', function (e) {\n const form = $(this);\n e.preventDefault();\n const url = form.attr('action');\n $sheet.spinner().start();\n $resetPasswordForm.trigger('login:register', e);\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n $sheet.spinner().stop();\n if (!data.success) {\n formValidation(form, data);\n } else {\n setActivePage(RESET_PASSWORD_CONFIRM_PAGE);\n }\n },\n error: function () {\n $sheet.spinner().stop();\n accountSheet.modal('hide').one('hidden.bs.modal', () => {\n $body.trigger('csrf:error');\n });\n }\n });\n\n return false;\n });\n },\n handleLogin: () => {\n const loginBtnEl = queryFirst('.account-login-btn');\n const $loginFormEl = $('form.login');\n $loginFormEl.on('login:submit', () => {\n loginBtnEl.disabled = true;\n });\n\n $loginFormEl.on('login:error', () => {\n loginBtnEl.disabled = false;\n });\n },\n loginNavEvents: () => {\n loginPageNav?.addEventListener('click', e => {\n const { target } = e;\n if (hasClass(target, 'js-login-select')) {\n addClass(loginHeaderLink, HIDDEN_CLASS);\n removeClass(orderStatusHeaderLink, HIDDEN_CLASS);\n } else if (hasClass(target, 'js-order-select')) {\n removeClass(loginHeaderLink, HIDDEN_CLASS);\n addClass(orderStatusHeaderLink, HIDDEN_CLASS);\n } else {\n removeClass(loginHeaderLink, HIDDEN_CLASS);\n removeClass(orderStatusHeaderLink, HIDDEN_CLASS);\n }\n\n if (target instanceof HTMLAnchorElement && !hasClass(target, ACTIVE_CLASS)) {\n const activePage = queryFirst(`.${ACTIVE_CLASS}`, fullLoginPage);\n const activeForm = queryFirst('form', activePage);\n activeForm?.reset();\n clearForm(activeForm);\n addClass(queryFirst('.custom-error-alert', activeForm), HIDDEN_CLASS);\n }\n });\n },\n sheetEvents: () => {\n // Login click event\n $body.on('click', '.js-login-link', e => {\n e.preventDefault();\n if (!fullLoginPage) {\n openSheet(LOGIN_PAGE);\n } else {\n const loginNavTab = queryFirst('.js-login-select', loginPageNav);\n loginNavTab?.click();\n }\n });\n\n $body.on('click', '#myaccount', e => {\n e.preventDefault();\n });\n\n // Register click event\n $body.on('click', '.js-register-link', e => {\n e.preventDefault();\n if (!fullLoginPage) {\n openSheet(REGISTER_PAGE);\n } else {\n const registerNavTab = queryFirst('.js-register-select', loginPageNav);\n registerNavTab?.click();\n }\n if (queryFirst('.add-to-loyalty-program-checkbox')) {\n $('form.registration').trigger('register:optin_load');\n }\n });\n $body.on('click', '.js-password-reset-link', e => {\n e.preventDefault();\n const { target } = e;\n PREVIOUS_PAGE = target.closest('.existing-customer-sheet') ? EXISTING_CUSTOMER_PAGE : LOGIN_PAGE;\n openSheet(RESET_PASSWORD_PAGE);\n });\n $(accountSheet).on('click', '.modal-back', () => {\n setActivePage(PREVIOUS_PAGE);\n });\n $body.on('click', '.js-order-status-link', e => {\n e.preventDefault();\n if (!fullLoginPage) {\n openSheet(TRACK_ORDER_PAGE);\n } else {\n const registerNavTab = queryFirst('.js-order-select', loginPageNav);\n registerNavTab?.click();\n }\n });\n }\n};\n\nformatPhoneNumber(registrationFormPhone);\nenableLoginButton();\n","'use strict';\nconst { queryFirst, addClass, removeClass, throttle, hasClass, hasAnyClass, setAttribute, queryAll, loadInput, validateDate } = require('../domUtil');\nconst formValidation = require('base/components/formValidation');\nconst { getTimeRemaining, getItemFromLocalStorage, formatPhoneNumber, getJSON, getNestedValue } = require('../util');\nconst { resetPassword } = require('../login/login');\nconst { MY_ACCOUNT } = require('../components/shippingPreference/constants');\nconst loyaltyProfile = getNestedValue(window, 'lillyUtils.profile') || {};\nconst { isLoyaltyProgramMember, accountLoyaltyTabLink } = loyaltyProfile;\nconst $body = $('body');\nconst hiddenClass = 'd-none';\nconst loyaltyWelcomeDialog = queryFirst('#loyalty-welcome-popup');\nconst loyaltyEnrollNowDialog = queryFirst('#loyalty-enrollnow-modal');\nconst invalidClass = 'is-invalid';\nlet mobileImg, desktopImg;\nconst root = document.documentElement;\nconst { initSpecificCarousel } = require('../components/carousel');\nconst loyaltyEarlyAccessRegisterForm = queryFirst('#loyalty-early-access-register');\nconst { ajaxFormInvalid, ajaxFormSubmit, enableFormSubmitButton, invalid } = require('../clientSideValidation');\nconst swatchImageDownload = '.swatch-image-download';\nconst swatchImageDownloaded = '.swatch-image-downloaded';\nconst downloadCtaDesktop = '.download-cta.desktop-show';\nconst downloadCtaMobile = '.download-cta.mobile-show';\nconst loyaltyQuiz = require('./loyaltyQuiz');\n\n$body.on('hidden.bs.modal', function () {\n if (!queryFirst('.modal.show')) {\n $body.removeClass('referral-modal');\n }\n});\n\nfunction welcomeDialogEarlyAccessContent() {\n const welcomeDialogRegularFlowElms = queryAll('.js-loyalty-welcome-msg');\n const welcomeDialogEarlyAccessFlowElms = queryAll('.js-loyalty-welcome-early-access');\n\n addClass(welcomeDialogRegularFlowElms, hiddenClass);\n removeClass(welcomeDialogEarlyAccessFlowElms, hiddenClass);\n}\n\n/**\n * Handle the enroll now popup view\n */\nfunction handleEarlyAccessEnrollModal() {\n $(loyaltyEnrollNowDialog)\n .modal('show')\n .off('hidden.bs.modal')\n .on('hidden.bs.modal', function () {\n if (!hasClass(loyaltyWelcomeDialog, 'show')) {\n location.reload();\n } else {\n welcomeDialogEarlyAccessContent();\n removeWelcomeModalShowSession();\n }\n });\n $(loyaltyWelcomeDialog)\n .off('hidden.bs.modal')\n .on('hidden.bs.modal', function (e) {\n location.reload();\n });\n}\n\nfunction enrollDialogLoggedInUsersContent(postalCode, isLogedIn) {\n // Hide guest elements and show form elements\n const loyaltyGuestEnrollEls = queryFirst('.js-guest-enrollment');\n const loyaltyEnrollForm = queryAll('.js-enrollment-form');\n if (isLogedIn) {\n removeClass(loyaltyEnrollForm, hiddenClass);\n addClass(loyaltyGuestEnrollEls, hiddenClass);\n } else {\n addClass(loyaltyEnrollForm, hiddenClass);\n removeClass(loyaltyGuestEnrollEls, hiddenClass);\n }\n\n // if do not get postal code from profile or template show ZIP input for user\n const loyaltyPostalCodeEls = queryAll('.js-loyalty-access-postal-code');\n const postalCodeInput = queryFirst('#loyalty-access-form-postalcode');\n if (!postalCode && postalCodeInput) {\n removeClass(loyaltyPostalCodeEls, hiddenClass);\n }\n if (postalCode) {\n postalCodeInput.value = postalCode;\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 welcomeDialogEarlyAccessContent();\n $(loyaltyWelcomeDialog)\n .modal('show')\n .off('hidden.bs.modal')\n .on('hidden.bs.modal', function (e) {\n location.reload();\n });\n removeWelcomeModalShowSession();\n } else if (isLoyaltyMember) {\n location.reload();\n } else {\n enrollDialogLoggedInUsersContent(postalCode, true);\n handleEarlyAccessEnrollModal();\n }\n}\n/**\n * Remove show modal session attribute on close of welcome modal\n */\nfunction removeWelcomeModalShowSession() {\n const closeButton = queryFirst('#loyalty-welcome-popup .js-club-lilly-welcome-session-url');\n getJSON(closeButton.dataset.welcomeSessionUrl, 'get');\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 * 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 * 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, queryFirst(swatchImageDownload));\n const swatchImageDownloadCtaMobile = queryFirst(downloadCtaMobile, queryFirst(swatchImageDownload));\n const swatchImageDownloadedCtaDesktop = queryFirst(downloadCtaDesktop, queryFirst(swatchImageDownloaded));\n const swatchImageDownloadedCtaMobile = queryFirst(downloadCtaMobile, queryFirst(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(queryFirst(swatchImageDownloaded), hiddenClass);\n removeClass(queryFirst(swatchImageDownload), hiddenClass);\n });\n\n $body.on('click', '.download-cta.desktop-show, .download-cta.mobile-show', function () {\n addClass(queryFirst(swatchImageDownload), hiddenClass);\n removeClass(queryFirst(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 * @param {string} countDataMsgNoDays - timmer string\n * @param {string} countDownMsgOneDay - timmer string\n */\nfunction updateClock(countDataMsg, countDownTime, countDownEle, timeinterval, countDataMsgNoDays, countDownMsgOneDay) {\n const { tokenize } = require('../util');\n const timer = getTimeRemaining(countDownTime);\n const newCountDataMsgDays = timer.days === 1 ? countDownMsgOneDay : countDataMsg;\n const newCountDataMsg = timer.days === 0 ? countDataMsgNoDays : newCountDataMsgDays;\n countDownEle.innerHTML = tokenize(newCountDataMsg, timer, '[', ']');\n if (timer.total <= 0) {\n clearInterval(timeinterval);\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('.js-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 { countDownTimer: countDownTime } = exclusiveModule.dataset; // Destructuring countDownTime\n const countDownEle = queryFirst('.count-down-timer', exclusiveModule);\n const countDownEleNoDays = queryFirst('.count-down-timer-nodays', exclusiveModule);\n const countDownEleOneDay = queryFirst('.count-down-timer-one-day', exclusiveModule);\n // Destructure counterMsg from the dataset of each element\n const { counterMsg: countDataMsg } = countDownEle.dataset;\n const { counterMsg: countDataMsgNoDays } = countDownEleNoDays.dataset;\n const { counterMsg: countDownMsgOneDay } = countDownEleOneDay.dataset;\n if (countDownTime) {\n // update the counter\n const timeinterval = setInterval(() => {\n updateClock(countDataMsg, countDownTime, countDownEle, timeinterval, countDataMsgNoDays, countDownMsgOneDay);\n }, 1000);\n } else {\n addClass(countDownEle, hiddenClass);\n }\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 loyaltySwatchImgDownload();\n});\n/**\n * Function to initialize events\n */\nfunction init() {\n exclusiveExperiencesCountDown();\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 isMobileSession = queryFirst('.mobile-session');\n\n if (isMobileSession) {\n return true;\n }\n\n const url = this.dataset.href;\n const isLoyaltyProgramDrawerClick = $(this).hasClass('loyalty-program-drawer-link');\n const hasJoinCta = hasAnyClass(this, 'loyalty-program-overview-from-header', 'loyalty-program-drawer-has-cta');\n const $loyaltyContainer = $('.loyalty-enrollnow-dialog');\n\n $loyaltyContainer.spinner().start();\n\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 (hasJoinCta) {\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 $loyaltyContainer.spinner().stop();\n }\n },\n error: function (err) {\n $loyaltyContainer.spinner().stop();\n }\n });\n });\n },\n loyaltyEnrollNowDialog: function () {\n $body.on('click', '.loyalty-enrollnow-cta', function (e) {\n e.preventDefault();\n $(loyaltyEnrollNowDialog).modal('show');\n const loyaltyEnrollPostalCodeContainer = queryAll('.js-loyalty-access-postal-code');\n const loyaltyEnrollPostalEl = queryFirst('#loyalty-access-form-postalcode', loyaltyEnrollNowDialog);\n const loyaltyEnrollCheckboxEl = queryFirst('#optin-to-loyalty-program', loyaltyEnrollNowDialog);\n const loyaltyEnrollForm = queryFirst('form', loyaltyEnrollNowDialog);\n loyaltyEnrollForm.dataset.enrollNowSource = MY_ACCOUNT;\n const formElements = [];\n if (!hasClass(loyaltyEnrollPostalCodeContainer, hiddenClass)) {\n formElements.push(loyaltyEnrollPostalEl);\n loyaltyEnrollPostalEl.value = '';\n }\n if (loyaltyEnrollCheckboxEl) {\n formElements.push(loyaltyEnrollCheckboxEl);\n loyaltyEnrollCheckboxEl.checked = false;\n }\n removeClass(formElements, invalidClass);\n });\n $body.on('click', '.js-loyalty-early-access-welcome-cta', function (e) {\n location.reload();\n });\n },\n loyaltyEnrollNowSubmit: function () {\n $body.on('click', 'form .js-loyalty-enroll-cta', function () {\n const form = this.closest('form');\n const checkbox = queryFirst('.optin-to-loyalty-program', form);\n const errorMsgText = checkbox?.dataset.missingError;\n const errorMsg = queryFirst('.loyalty-terms-error', form);\n\n // Check if the checkbox is checked\n if (!checkbox?.checked) {\n addClass(checkbox, invalidClass);\n errorMsg.textContent = errorMsgText;\n removeClass(errorMsg, hiddenClass);\n return false;\n } else {\n removeClass(checkbox, invalidClass);\n errorMsg.textContent = '';\n addClass(errorMsg, hiddenClass);\n }\n });\n $body.on('submit', 'form.loyalty-get-access', function (e) {\n e.preventDefault();\n const $sheet = $('.loyalty-enrollnow-dialog');\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 source = this.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 removeClass(queryAll('.js-loyalty-access-postal-code'), hiddenClass);\n addClass(postalCodeEl, invalidClass);\n invalidFeedback.textContent = postalCodeEl.dataset.patternMismatch;\n }\n } else {\n $sheet.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 removeClass(queryFirst('#loyalty-page'), 'loaded');\n $(loyaltyEnrollNowDialog).modal('hide');\n $(loyaltyWelcomeDialog).modal('show');\n }\n $sheet.spinner().stop();\n },\n error: function (err) {\n $sheet.spinner().stop();\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 accountLoyaltyPage = queryFirst('.js-loyalty-select.active');\n if (accountLoyaltyPage && accountLoyaltyPage.dataset.showWelcomePopup === 'true') {\n $('#loyalty-welcome-popup').modal('show');\n removeWelcomeModalShowSession();\n }\n },\n loyaltyDashboardShow: function () {\n $body.on('click', '.loyalty-dashboard-link', function (e) {\n e.preventDefault();\n const url = this.dataset.checkLoyaltyAccess;\n if (isLoyaltyProgramMember) {\n return (window.location.href = accountLoyaltyTabLink);\n }\n\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n if (!data) {\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 $(loyaltyEnrollNowDialog).modal('show');\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 }\n } else {\n window.location.href = data.redirectUrl;\n }\n },\n error: function () {}\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', '.flip-card-back', 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, rewardDesc } = e.target.dataset;\n const offerDiscountDialog = queryFirst(target);\n const offerDiscountModalData = queryFirst('.offer-code-modal-content', offerDiscountDialog);\n const offerDiscountTileData = queryFirst('.offer-tile-content', offerDiscountDialog);\n const offerCodeEl = queryFirst('.js-offers-discount-modal .js-code-section', offerDiscountDialog);\n const offerCodeExpiresEl = queryFirst('.js-offers-discount-modal .expiry-date', offerDiscountDialog);\n const offerDescriptionHeader = queryFirst('.js-offers-discount-modal .code-desc', offerDiscountDialog);\n addClass(offerDiscountTileData, hiddenClass);\n removeClass(offerDiscountModalData, hiddenClass);\n offerCodeEl.value = couponCode;\n offerCodeExpiresEl.textContent = getFormatDateString(expiryDate, formatString) + '.';\n offerDescriptionHeader.textContent = rewardDesc;\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 loyaltyCopyCode: function () {\n $body.on('click', function (e) {\n const copyButton = e.target.closest('.js-copy-code-cta');\n if (!copyButton) return;\n\n e.preventDefault();\n\n const codeField = copyButton.closest('.loyalty-copy');\n const codeSection = codeField.querySelector('.js-code-section');\n const copyCta = copyButton;\n const copiedCodeCta = codeField.querySelector('.js-code-copied');\n\n if (!codeSection || !copyCta || !copiedCodeCta) {\n console.error('Copy code elements not found');\n return;\n }\n\n const textToCopy = codeSection.value;\n\n navigator.clipboard\n .writeText(textToCopy)\n .then(() => {\n copyCta.classList.add(hiddenClass);\n copiedCodeCta.classList.remove(hiddenClass);\n\n setTimeout(() => {\n copyCta.classList.remove(hiddenClass);\n copiedCodeCta.classList.add(hiddenClass);\n }, 3000);\n })\n .catch(err => {\n console.error('Failed to copy text: ', err);\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 handlePdpEarlyAccessLoginRegistration();\n });\n\n $body.on('click', '.early-access-register-form-cancel', function (e) {\n e.preventDefault();\n $(loyaltyEarlyAccessRegisterForm).modal('hide');\n });\n },\n\n loyaltyQuizDrawer: function () {\n $body.on('click', '.js-loyalty-quiz-drawer-link', async e => {\n e.preventDefault();\n const $modalSpinner = $('#loyalty-quiz .sheet-dialog').spinner();\n\n $modalSpinner.start();\n\n const { target } = e;\n const { actionUrl } = target.dataset;\n\n const currentModal = $(e.target).closest('.lp-slideout-modal, .sheet');\n\n if (currentModal.length) {\n currentModal.modal('hide');\n }\n\n const quizModalElement = queryFirst('#loyalty-quiz');\n const modalContentBody = queryFirst('.js-loyalty-quiz-content-body', quizModalElement);\n const modalContentFooter = queryFirst('.js-loyalty-quiz-content-footer', quizModalElement);\n\n modalContentBody.innerHTML = '';\n modalContentFooter.innerHTML = '';\n\n const response = await fetch(actionUrl);\n const content = await response.text();\n\n const parser = new DOMParser();\n const doc = parser.parseFromString(content, 'text/html');\n\n const ctasContainers = queryAll('.js-style-quiz-buttons, .js-quiz-ctas-container, .js-thankyou-btn-container-ctas', doc);\n\n ctasContainers.forEach(ctasContainer => {\n if (ctasContainer) {\n modalContentFooter.appendChild(ctasContainer);\n }\n });\n\n modalContentBody.innerHTML = doc.body.innerHTML;\n\n loyaltyQuiz.init();\n $modalSpinner.stop();\n });\n },\n\n init\n};\n\nwindow.addEventListener(\n 'resize',\n throttle(() => {\n if (mobileImg || desktopImg) {\n hideShowDrawerImage(mobileImg, desktopImg);\n }\n updateReferralBg();\n })\n);\n","'use strict';\n\nconst { queryFirst, queryAll, addClass, removeClass, scrollTo, hasClass } = require('../domUtil');\nconst { HIDDEN_CLASS } = require('../constants');\nconst swatchSelected = 'swatch-item-selected';\nconst swatchTextSelected = 'swatch-text-selected';\nconst swatchImgTitle = '.swatch-img-title';\nconst previouslySelectedRes = {};\nlet urlWithHash = new URL(window.location.href);\nlet bodyEventsInitialized = false;\n\n/**\n * Show the latest selected answers for a quarion and add the selected classes to it\n * @param {Array} answerSelectedArr selected answers array\n */\nfunction showSelectedAnswers(answerSelectedArr) {\n answerSelectedArr.forEach(item => {\n const selectedSwatchEl = queryFirst(`[data-option-title=\"${item}\"]`);\n if (selectedSwatchEl) {\n const selectedSwatchContainer = selectedSwatchEl.closest('.js-swatch-selection-wrapper');\n const swatchTitleSelected = queryFirst(swatchImgTitle, selectedSwatchContainer);\n const { quizSelectionType } = selectedSwatchContainer.dataset;\n if (quizSelectionType === 'circle') {\n const selectedCircularSwatch = queryFirst('.swatch-img', selectedSwatchContainer);\n const selectedSwatchTextEl = queryFirst(swatchImgTitle, selectedSwatchContainer);\n addClass(selectedCircularSwatch, swatchSelected);\n addClass(selectedSwatchTextEl, swatchTextSelected);\n } else {\n addClass(selectedSwatchEl, swatchSelected);\n addClass(swatchTitleSelected, swatchTextSelected);\n }\n }\n });\n}\n\n/**\n * Reset state\n */\nfunction resetState() {\n addClass(queryAll('.quiz-question-wrapper'), HIDDEN_CLASS);\n addClass(queryAll('.js-quiz-ctas-container'), HIDDEN_CLASS);\n addClass(queryAll('.js-validation-select-more'), HIDDEN_CLASS);\n}\n\n/**\n * Remove all the selected answers of the current questions\n * @param {number} questionCount Current Question number\n */\nfunction removeAllSelectedAnswers(questionCount) {\n const currentQuestionEl = queryFirst(`.question-wrapper-${questionCount}`);\n const allSelectedResp = queryAll('.swatch-item-selected', currentQuestionEl);\n allSelectedResp.forEach(el => {\n if (hasClass(el, 'square-container')) {\n const swatchTitleSelected = queryFirst(swatchImgTitle, el);\n const categoryChecked = queryFirst('.select-swatch-checked', el);\n removeClass(el, swatchSelected);\n removeClass(swatchTitleSelected, swatchTextSelected);\n } else {\n const swatchCheckedEl = el.closest('.circular-container');\n const selectedSwatch = queryFirst('.select-swatch-checked', swatchCheckedEl);\n const selectedSwatchText = queryFirst(swatchImgTitle, swatchCheckedEl);\n if (hasClass(el, swatchSelected)) {\n removeClass(el, swatchSelected);\n }\n removeClass(selectedSwatchText, swatchTextSelected);\n }\n });\n}\n\n/**\n * Get Validation Message Element\n * @param {number} questionNumber Current Question Number\n * @returns {HTMLElement} result\n */\nfunction getValidationMessageEl(questionNumber) {\n const questionWrapperEl = queryFirst(`.question-wrapper-${questionNumber}`);\n return queryFirst('.js-validation-select-more', questionWrapperEl);\n}\n\n/**\n * Refresh Validation Message\n * @param {number} questionNumber Current Question Number\n */\nfunction refreshValidationMessage(questionNumber) {\n const validationSelectMoreMsgEl = getValidationMessageEl(questionNumber);\n const quizModalElement = queryFirst('#loyalty-quiz');\n const modalContentBody = queryFirst('.js-loyalty-quiz-content-body', quizModalElement);\n\n const { quizValidationPleaseSelectMsg } = modalContentBody.dataset;\n validationSelectMoreMsgEl.innerHTML = quizValidationPleaseSelectMsg;\n\n addClass(validationSelectMoreMsgEl, HIDDEN_CLASS);\n}\n\n/**\n * Tohggle Validation Message\n * @param {number} questionNumber Current Question Number\n * @param {boolean} show show validation message\n */\nfunction toggleValidationMessage(questionNumber, show) {\n const validationSelectMoreMsgEl = getValidationMessageEl(questionNumber);\n\n if (show) {\n removeClass(validationSelectMoreMsgEl, HIDDEN_CLASS);\n } else {\n addClass(validationSelectMoreMsgEl, HIDDEN_CLASS);\n }\n}\n\n/**\n * Show the next question to be displayed\n * @param {number} questionNumber Current Question Number\n */\nfunction showNextQuestion(questionNumber) {\n const nextQuestionNumber = questionNumber + 1;\n const nextQuestionEl = queryFirst(`.question-wrapper-${nextQuestionNumber}`);\n const nextCtasContainerEl = queryFirst(`.js-quiz-ctas-container-${nextQuestionNumber}`);\n const { questionStep } = queryFirst('.question-steps', nextQuestionEl).dataset;\n const quizModalElement = queryFirst('#loyalty-quiz');\n const sheetContentBody = queryFirst('.sheet-body-content', quizModalElement);\n refreshValidationMessage(nextQuestionNumber);\n urlWithHash.hash = questionStep;\n window.history.replaceState({}, '', urlWithHash.href);\n removeClass(nextQuestionEl, HIDDEN_CLASS);\n removeClass(nextCtasContainerEl, HIDDEN_CLASS);\n\n const nextQuestion = Object.keys(previouslySelectedRes)[questionNumber];\n const nextAnswer = previouslySelectedRes[nextQuestion];\n if (nextAnswer) {\n const categoryArray = nextAnswer.split(',');\n showSelectedAnswers(categoryArray);\n }\n\n sheetContentBody.scrollTo(sheetContentBody.offsetTop, 0);\n}\n\n/**\n * Show the previous question to be displayed\n * @param {number} questionNumber Current Question Number\n */\nfunction showPreviousQuestion(questionNumber) {\n const prevQuestionNumber = questionNumber - 1;\n const previousQuestionEl = queryFirst(`.question-wrapper-${prevQuestionNumber}`);\n const prevCtasContainerEl = queryFirst(`.js-quiz-ctas-container-${prevQuestionNumber}`);\n const { questionStep } = queryFirst('.question-steps', previousQuestionEl).dataset;\n const quizModalElement = queryFirst('#loyalty-quiz');\n const sheetContentBody = queryFirst('.sheet-body-content', quizModalElement);\n refreshValidationMessage(prevQuestionNumber);\n urlWithHash.hash = questionStep;\n window.history.replaceState({}, '', urlWithHash.href);\n removeClass(previousQuestionEl, HIDDEN_CLASS);\n removeClass(prevCtasContainerEl, HIDDEN_CLASS);\n\n const previousQuestion = Object.keys(previouslySelectedRes)[questionNumber - 2];\n\n const previousAnswer = previouslySelectedRes[previousQuestion];\n if (previousAnswer) {\n const categoryArray = previousAnswer.split(',');\n showSelectedAnswers(categoryArray);\n }\n\n sheetContentBody.scrollTo(sheetContentBody.offsetTop, 0);\n}\n\n/**\n * Update the responses to the question if any changes are made\n * @param {string} questionNumber current question number\n * @returns {boolean} at least one selected\n */\nfunction updateResponseSelected(questionNumber) {\n const questionNumberIntValue = parseInt(questionNumber, 10);\n const swatchContainerEl = queryFirst('.quiz-swatch-' + questionNumber);\n const userSelection = queryAll('.js-swatch-selection-wrapper .swatch-item-selected', swatchContainerEl);\n const selections = Array.from(userSelection);\n const answerArr = selections.map(element => element.dataset.optionTitle);\n if (questionNumberIntValue) {\n const previousAnswer = Object.keys(previouslySelectedRes)[questionNumberIntValue - 1];\n previouslySelectedRes[previousAnswer] = answerArr.join(',');\n }\n return !!answerArr.length;\n}\n/**\n * Initialize vody events, executed just onve\n */\nfunction initBodyEvents() {\n if (bodyEventsInitialized) {\n return;\n }\n bodyEventsInitialized = true;\n\n const $body = $('body');\n $body.on('click', '.loyalty-next-question-cta', function (e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n\n const { target } = e;\n const { stepCount } = target.dataset;\n const countValue = parseInt(stepCount, 10);\n const $modalSpinner = $('#loyalty-quiz .sheet-dialog').spinner();\n const questionResponses = queryFirst('.js-question-responses');\n questionResponses.dataset.stepCount = countValue + 1;\n const isValid = updateResponseSelected(stepCount);\n\n toggleValidationMessage(countValue, !isValid);\n if (!isValid) {\n return;\n }\n\n const form = {\n isSubmitted: 'false'\n };\n Object.assign(form, previouslySelectedRes);\n $modalSpinner.start();\n $.ajax({\n url: target.dataset.action,\n type: 'post',\n data: form,\n dataType: 'json',\n success: function (data) {\n if (data.success) {\n resetState();\n showNextQuestion(countValue);\n }\n $modalSpinner.stop();\n },\n error: () => {\n $modalSpinner.stop();\n }\n });\n });\n\n $body.on('click', '.loyalty-previous-question-cta, .loyalty-previous-question-top', function (e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n const { target } = e;\n const { stepCount } = target.dataset;\n const countValue = parseInt(stepCount, 10);\n\n if (countValue > 1) {\n const questionResponses = queryFirst('.js-question-responses');\n questionResponses.dataset.stepCount = countValue - 1;\n removeAllSelectedAnswers(countValue);\n resetState();\n showPreviousQuestion(countValue);\n }\n });\n\n $body.on('click', '.loyalty-skip-question-cta', function (e) {\n e.preventDefault();\n const { target } = e;\n const { stepCount } = target.dataset;\n const countValue = parseInt(stepCount, 10);\n resetState();\n removeAllSelectedAnswers(countValue);\n showNextQuestion(countValue);\n });\n\n $body.on('click', '.loyalty-finish-later-cta', function (e) {\n e.preventDefault();\n const { href, questionNumber, action } = e.target.dataset;\n const quizModalElement = queryFirst('#loyalty-quiz');\n const sheetContentBody = queryFirst('.sheet-body-content', quizModalElement);\n const $modalSpinner = $('#loyalty-quiz .sheet-dialog').spinner();\n $modalSpinner.start();\n // Saving the answer on click of finish later CTA\n updateResponseSelected(questionNumber);\n const form = {\n isSubmitted: 'false'\n };\n Object.assign(form, previouslySelectedRes);\n\n $.ajax({\n url: action,\n type: 'post',\n data: form,\n dataType: 'json',\n success: function () {\n $modalSpinner.stop();\n urlWithHash.hash = href;\n sheetContentBody.scrollTo(sheetContentBody.offsetTop, 0);\n window.history.replaceState({}, '', urlWithHash.href);\n resetState();\n\n const quizThankYouPage = queryFirst('.loyalty-thankyou-page');\n const completeQuizEl = queryFirst('.complete-quiz-thankyou', quizThankYouPage);\n const completeQuizImg = queryFirst('.thankyou-img', quizThankYouPage);\n const thankyouCTAs = queryFirst('.js-thankyou-btn-container-ctas');\n\n removeClass([quizThankYouPage, completeQuizEl, completeQuizImg, thankyouCTAs], HIDDEN_CLASS);\n },\n error: function () {\n $modalSpinner.stop();\n }\n });\n });\n\n $body.on('click', '.swatch-circle-options, .swatch-square-options', function (e) {\n e.preventDefault();\n const { currentTarget } = e;\n const squareContainerEl = queryFirst('.square-container', currentTarget);\n const circularContainerEl = queryFirst('.circular-container', currentTarget);\n const circularContainerImg = queryFirst('.circular-container .swatch-img', currentTarget);\n const swatchTitleSelected = queryFirst(swatchImgTitle, currentTarget);\n const categoryChecked = queryFirst('.select-swatch-checked', currentTarget);\n if ((squareContainerEl && hasClass(squareContainerEl, swatchSelected)) || (circularContainerImg && hasClass(circularContainerImg, swatchSelected))) {\n removeClass(squareContainerEl, swatchSelected);\n removeClass(circularContainerImg, swatchSelected);\n removeClass(swatchTitleSelected, swatchTextSelected);\n if (squareContainerEl) {\n squareContainerEl.setAttribute('aria-selected', false);\n }\n if (circularContainerEl) {\n circularContainerEl.setAttribute('aria-selected', false);\n }\n } else {\n addClass(squareContainerEl, swatchSelected);\n addClass(circularContainerImg, swatchSelected);\n addClass(swatchTitleSelected, swatchTextSelected);\n removeClass(categoryChecked, HIDDEN_CLASS);\n if (squareContainerEl) {\n squareContainerEl.setAttribute('aria-selected', true);\n }\n if (circularContainerEl) {\n circularContainerEl.setAttribute('aria-selected', true);\n }\n }\n });\n}\n\nmodule.exports = {\n init: function () {\n const questionsCnt = 3;\n const quizLandingPage = queryFirst('.loyalty-style-landing');\n const quizLandingCtas = queryFirst('.js-style-quiz-buttons');\n\n urlWithHash = new URL(window.location.href);\n\n for (let i = 1, len = questionsCnt; i <= len; i++) {\n previouslySelectedRes[`question${i}Response`] = queryFirst(`.question${i}-response-data`).value || '';\n }\n\n const quizStartButton = queryFirst('.style-quiz-start-cta');\n const quizSubmitBtn = queryFirst('.loyalty-submit-quiz-cta');\n const quizThankYouPage = queryFirst('.loyalty-thankyou-page');\n const completeQuizEl = queryFirst('.complete-quiz-thankyou', quizThankYouPage);\n const thankyouCTAs = queryFirst('.js-thankyou-btn-container-ctas');\n const completeQuizImg = queryFirst('.thankyou-img', quizThankYouPage);\n const quizQuestionPage = queryFirst('.style-quiz-questions-container');\n const question1El = queryFirst('.question-wrapper-1');\n const ctasContainerEl1 = queryFirst('.js-quiz-ctas-container-1');\n const { questionStep } = queryFirst('.question-steps', question1El).dataset;\n\n refreshValidationMessage(1);\n\n urlWithHash.hash = questionStep;\n\n if (queryFirst('.style-quiz-questions-container.pending-or-completed')) {\n removeClass(quizQuestionPage, HIDDEN_CLASS);\n resetState();\n removeClass(question1El, HIDDEN_CLASS);\n removeClass(ctasContainerEl1, HIDDEN_CLASS);\n window.history.replaceState({}, '', urlWithHash.href);\n if (previouslySelectedRes.question1Response) {\n const colorArray = previouslySelectedRes.question1Response.split(',');\n showSelectedAnswers(colorArray);\n }\n } else {\n quizStartButton.addEventListener('click', e => {\n e.preventDefault();\n addClass(quizLandingPage, HIDDEN_CLASS);\n addClass(quizLandingCtas, HIDDEN_CLASS);\n removeClass(quizQuestionPage, HIDDEN_CLASS);\n resetState();\n removeClass(question1El, HIDDEN_CLASS);\n removeClass(ctasContainerEl1, HIDDEN_CLASS);\n window.history.replaceState({}, '', urlWithHash.href);\n });\n }\n\n quizSubmitBtn.addEventListener('click', e => {\n e.preventDefault();\n const { target } = e;\n const { stepCount, action, href } = target.dataset;\n const countValue = parseInt(stepCount, 10);\n const questionResponses = queryFirst('.js-question-responses');\n questionResponses.dataset.stepCount = countValue + 1;\n const swatchContainerEl = queryFirst('.quiz-swatch-' + stepCount);\n const userSelection = queryAll('.js-swatch-selection-wrapper .swatch-item-selected', swatchContainerEl);\n const selections = Array.from(userSelection);\n const answerArr = selections.map(element => element.dataset.optionTitle);\n const quizModalElement = queryFirst('#loyalty-quiz');\n const sheetContentBody = queryFirst('.sheet-body-content', quizModalElement);\n const $modalSpinner = $('#loyalty-quiz .sheet-dialog').spinner();\n if (countValue) {\n const previousAnswer = Object.keys(previouslySelectedRes)[countValue - 1];\n previouslySelectedRes[previousAnswer] = answerArr.join(',');\n }\n const form = {\n isSubmitted: 'true'\n };\n Object.assign(form, previouslySelectedRes);\n $modalSpinner.start();\n $.ajax({\n url: action,\n type: 'post',\n data: form,\n dataType: 'json',\n success: function (data) {\n if (data.success) {\n urlWithHash.hash = href;\n window.history.replaceState({}, '', urlWithHash.href);\n resetState();\n removeClass([quizThankYouPage, completeQuizEl, completeQuizImg, thankyouCTAs], HIDDEN_CLASS);\n }\n $modalSpinner.stop();\n sheetContentBody.scrollTo(sheetContentBody.offsetTop, 0);\n },\n error: function () {\n $modalSpinner.stop();\n }\n });\n });\n initBodyEvents();\n }\n};\n","/**\n * HTML Templates for use in client-side rendering.\n *\n * @module dom.templates\n * @version 1.0.0\n */\n\n'use strict';\n\n/**\n * QuickView Templates\n */\nexports.quickView = {\n container: '<div class=\"quickview-container col-12 hidden-md-down\"></div>',\n quickViewModal: `\n <div class=\"modal fade\" id=\"quickViewModal\" role=\"dialog\" tabindex=\"-1\">\n <span class=\"enter-message sr-only\"></span>\n <div class=\"modal-dialog modal-dialog-centered quick-view-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-body\"></div>\n </div>\n </div>\n </div>\n `\n};\n\n/**\n * Get All Wishlist Collection Templates\n */\nexports.addToWishlist = {\n container: '<div class=\"addToWishlist-container col-12 hidden-md-down\"></div>',\n addToWishlistModal: `\n <div class=\"modal fade add-product-to-wishlist-dialog\" id=\"addToWishlistModal\" tabindex=\"-1\" role=\"dialog\">\n <span class=\"enter-message sr-only\"></span>\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"generic-confirmation-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <svg role=\"img\" aria-describedby=\"add-to-wishlist-cross-title add-to-wishlist-cross-desc\" class=\"icon svg-icon svg-logo-dims\" width=\"16.0\" height=\"16.0\">\n <title id=\"add-to-wishlist-cross-title\">Close dialog</title>\n <desc id=\"add-to-wishlist-cross-desc\">Cross mark icon to close this dialog</desc>\n <use xlink:href=\"#cross\" role=\"img\"></use>\n </svg>\n </button>\n </div>\n <div class=\"modal-body\"></div>\n </div>\n </div>\n </div>\n <isinclude template=\"wishlist/components/createWishlist\" />\n\n `\n};\n\n/**\n * Cart error message template\n */\nexports.cart = {\n errorMessage: '<div class=\"cart-error-message\">{0}</div>',\n cartAvailabilityMessageOOS: (message, url) => `\n <li><p class=\"availability-message-text\" role=\"alert\">${message}\n <a href=\"${url}\" class=\"similar-styles-category-link icon-link\">Browse Similar Styles</a></p>\n </li>\n `\n};\n\n/**\n * Cart & Checkout promo template\n */\nexports.promo = {\n shippingMethod: `\n <div class=\"cart-totals-line shipping-item\">\n <div class=\"shipping-item-name\">\n {0}:\n <span class=\"shipping-method-name\">{1}</span>\n </div>\n <div class=\"shipping-total-cost\">{2}</div>\n <div class=\"shipping-arrival\">\n <span class=\"shipping-arrival-time\">{3}</span>\n </div>\n </div>`,\n checkoutNormalShipping: '<span class=\"text-right pricing shipping-method-price\">{0}</span>',\n checkoutDiscountShipping: `\n <del class=\"text-right pricing shipping-method-price\">{0}</del>\n <span>{1}</span>\n `\n};\n\n/**\n * Checkout template\n */\nexports.checkout = {\n discountPrice: '<del class=\"shipping-cost\">{0}</del><span>{1}</span>'\n};\n\n/**\n * Selected swatch name template\n */\nexports.swatchNameTemplate = {\n swatchNameHtml: '<p class=\"selected-swatch-name\">Color: {0}</p>'\n};\n\nexports.emptySwatchTemplate = '<span class=\"swatches-empty\">{0}</span>';\n\n/*\n * Address Suggestions template\n */\nexports.addressSuggestions = {\n suggestionTextTemplate: '<p class=\"address-suggestion-text\"></p>',\n suggestionsTemplate: `\n <div id=\"address-suggestions-template\">\n <div class=\"form-check custom-radio\">\n <input type=\"radio\" class=\"form-check-input\" id=\"addressSuggestion\" name=\"addressSuggestion\">\n <label class=\"form-check-label shipping-address-option\" for=\"addressSuggestion\">\n <span class=\"address-suggestion\"></span>\n </label>\n </div>\n </div>`\n};\n\n/*\n * Approaching Discounts template\n */\nexports.approachingDiscounts = {\n nonCouponBasedAdjustmentTemplate: `<div class=\"cart-totals-line price-container promo-container\">\n <div class=\"price-text\">{0}</div>\n <div class=\"price-value\">{1}</div>\n <div class=\"promo-description\">{2}</div>\n </div>`\n};\n\n/**\n * Video Template\n * @param {Object} options video setting values\n * @return {html} video html template\n */\nexports.videoTemplate = (options = {}) => {\n // Note: I don't believe this template is used anywhere anymore\n const { loop = '', videoUrl = '', imgUrl = '', classNames = '', autoplay = false, muted = true, controls = false, icontitle = '', icondesc = '' } = options;\n\n return `\n <div class=\"video-component ${classNames}\">\n <video class=\"video\" playsinline ${autoplay ? 'autoplay' : ''} ${loop ? 'loop' : ''} ${muted ? 'muted' : ''} poster=\"${imgUrl} ${controls ? 'controls' : ''}>\n <source src=\"${videoUrl}\" type=\"video/mp4\" />\n </video>\n <button class=\"play-video\">\n <svg role=\"img\" class=\"icon svg-icon svg-video-play\" width=\"16\" height=\"16\" aria-labelledby=\"title\" aria-describedby=\"desc\">\n <title>${icontitle}</title>\n <desc>${icondesc}</desc>\n <use xlink:href=\"#play\" role=\"img\"></use>\n </svg>\n </button>\n </div>\n `;\n};\n\n/**\n * Image Template\n * @param {string} imgUrl value\n * @param {string} altText value\n * @param {string} classNames value\n * @return {html} video html template\n */\nexports.imageTemplate = (imgUrl, altText, classNames) => {\n return `\n <div class=\"image-component ${classNames}\">\n <img class=\"w-100\" src=\"${imgUrl}\" alt=\"${altText}\"/>\n </div>\n `;\n};\n\n/**\n * Size option template\n * @param {string} url - Size variant url\n * @param {string} value - Size value\n * @return {html} size option html template\n */\nexports.sizeOptionTemplate = (url, value) => {\n return `<option value=\"${url}\" data-attr-value=\"${value}\">${value}</option>`;\n};\n\n/**\n * Function to rerender size button element\n * @param {Object} variantData - variant details\n * @param {string} ariaLabel - aria label\n * @param {string} ariaDescribedby - aria described by\n * @param {string} selectedText - selected text\n * @param {string} oosMessage - out of the stock text\n * @param {number} length - length of sizes\n * @return {html} size button html template\n */\nexports.sizeButtonTemplate = (variantData, ariaLabel, ariaDescribedby, selectedText, oosMessage, length) => {\n const { selected, forceOutOfStock, inStock, value, url, sizeId } = variantData;\n return `<li class=\"size-list js-size-list ${length === 1 ? 'd-none' : ''}\">\n <button class=\"btn size-btn ${selected ? 'selected' : ''} ${!inStock || forceOutOfStock ? 'not-available' : ''}\" title=\"${ariaLabel}\" data-attr-url=\"${url || ''}\"\n data-attr-value=\"${value}\" data-value-id=\"${value}\" aria-label=\"${ariaLabel}\" aria-describedby=\"${ariaDescribedby}\" data-variation-id=\"${sizeId}\"><span>${value}</span></button>\n <span id=\"${ariaDescribedby}\" class=\"sr-only selected-assistive-text\" data-selected-text=\"${selectedText}\" data-out-of-stock=\"${oosMessage}\">${selected ? selectedText : ''} ${!inStock || forceOutOfStock ? oosMessage : ''}</span>\n </li>`;\n};\n\n/**\n * Function to render empty wishlist markup for guest user\n * @param {string} emptyWishlistMessage - empty wishlist message\n * @return {html} wishlist html template\n */\nexports.guestEmptyWishlistTemplate = (emptyWishlistMessage, emptyWishlistContentAssetBody) => {\n return `<div class=\"col-12 col-md-6 empty-wishlist\">\n <div class=\"empty-list-user-section\">\n <p class=\"non-logged-user-message\">${emptyWishlistMessage}</p>\n ${emptyWishlistContentAssetBody}\n </div>\n </div>`;\n};\n\n/**\n * Function to render empty wishlist markup for guest user\n * @param {string} emptySFLMessage - empty SFL message\n * @param {string} continueShopURL - continue shopping URL\n * @param {string} continueShopMsg - continue shopping message\n * @param {string} signInMsg - sign In message\n * @param {string} signInSFLURL - sign in URL\n * @return {html} SFL html template\n */\nexports.emptySFL = (emptySFLMessage, continueShopURL, continueShopMsg, signInMsg, signInSFLURL) => {\n return `<div class=\"sfl-cart-products\">\n <div class=\"container cart-empty sfl-empty\">\n <div class=\"row\">\n <div class=\"col-12 text-center\">\n <p class=\"sfl-empty-msg empty-message\">${emptySFLMessage}</p>\n <a href=\"${signInSFLURL}\"\n class=\"btn btn-block button-secondary account-login-btn enable-button-onvalidate sfl-login-btn col-md-6\">${signInMsg}\n </a>\n <a href=\"${continueShopURL}\" class=\"d-inline-block tertiary-link continue-shop-link\" role=\"link\">${continueShopMsg}</a></div>\n </div>\n </div>\n </div>\n </div>`;\n};\n\n/**\n * GWP Site Templates\n */\nexports.gwpSizeTemplate = {\n singleSize: '<span class=\"selected-size\">{0}</span>',\n multiSize: `\n <ul class=\"size-list\">\n <span class=\"sr-only selected-assistive-text\"></span>\n {1}\n </ul>\n `,\n multiDefaultSizeOption: '',\n multiSizeOption: '<li class=\"size-option\"><button title=\"Select Size: {1}\" class=\"btn size-btn {4} {2}\" data-attr-url=\"{0}\" data-attr-value=\"{1}\" data-value-id=\"{1}\" {5}><span>{3}</span></button></li>'\n};\n\n/**\n * Address autocomplete templates\n */\nexports.autoComplete = {\n suggestionLink: (suggestion, addressLine, secondaryEntryAddressLine) => `\n <a href=\"javascript:void(0);\"\n class=\"autocomplete-suggestion list-group-item\"\n data-address-one=\"${suggestion.street_line}\"\n data-address-two=\"${suggestion.secondary || ''}\"\n data-state=\"${suggestion.state}\"\n data-city=\"${suggestion.city}\"\n data-zipcode=\"${suggestion.zipcode}\"\n data-has-secondary-entries=\"${suggestion.entries > 1}\"\n data-secondary-entry-search-value=\"${secondaryEntryAddressLine}\"\n >${addressLine}</a>\n `,\n suggestionContainer: containerClass => `<div class=\"autocomplete-suggestions list-group ${containerClass || ''}\"></div>`\n};\n\nexports.contactUsTemplate = {\n signupError: msg => `<div class=\"custom-error-alert\" role=\"alert\">${msg}</div>`,\n defaultSignupError: `<div class=\"custom-error-alert\" role=\"alert\">We're sorry, an unexpected error occurred. Please try again.</div>` // eslint-disable-line quotes\n};\n\nexports.browserWarningTemplate = `\n We're sorry, this browser is no longer supported.<br/>\n Please update your browser for a smoother, more secure shopping experience. We recommend downloading the latest version of\n <a href=\"https://www.google.com/chrome/browser/desktop/index.html\" target=\"_blank\" rel=\"nofollow\">Google Chrome</a>,\n <a href=\"https://www.microsoft.com/en-us/edge\" target=\"_blank\" rel=\"nofollow\">Microsoft Edge</a> or\n <a href=\"https://www.mozilla.org/en-US/firefox/desktop/\" target=\"_blank\" rel=\"nofollow\">Mozilla Firefox</a>.\n`;\n\n/*\n * Shipping preference radio buttons\n */\nexports.shippingPreferenceTemplates = {\n shippingPreferences: (ispuRadioLabel, ispuRadioValue, shipToRadioLabel, shipToRadioValue, changeStoreLabel, preferISPU = false) => `\n <div class=\"form-check custom-radio preference-container ispu-preference-container\">\n <input id=\"preference-ispu\" name=\"shipping-preference\" type=\"radio\" class=\"form-check-input shipping-preference preference-ispu\" ${preferISPU ? 'checked' : ''} value=\"${ispuRadioValue}\">\n <label class=\"form-check-label\" for=\"preference-ispu\">\n <svg role=\"img\" aria-describedby=\"store-title store-desc\" class=\"icon svg-icon\" width=\"21.0\" height=\"16.0\">\n <title id=\"store-title\">Pick Up in Store</title>\n <desc id=\"store-desc\">Pick Up in Store icon</desc>\n <use xlink:href=\"#store\" role=\"img\"></use>\n </svg>\n ${ispuRadioLabel}\n </label>\n <button class=\"btn-link tertiary-link change-store-link\">${changeStoreLabel}</button>\n <div class=\"content\">\n <div class=\"select-size-info-msg\"></div>\n <div class=\"ispu-info-message\"></div>\n <div class=\"message-wrapper\">\n <div class=\"inventory-message\"></div>\n <div class=\"ispu-delivery-estimation-message\"></div>\n </div>\n <div class=\"service-info-message\"></div>\n <div class=\"store-detail-container\"></div>\n </div>\n </div>\n <div class=\"form-check custom-radio preference-container ship-to-address-preference-container\">\n <input id=\"preference-ship-to-address\" name=\"shipping-preference\" type=\"radio\" class=\"form-check-input shipping-preference preference-ship-to-address\" value=\"${shipToRadioValue}\" ${!preferISPU ? 'checked' : ''}>\n <label class=\"form-check-label\" for=\"preference-ship-to-address\">\n <svg role=\"img\" aria-describedby=\"shipping-title shipping-desc\" class=\"icon svg-icon\" width=\"21.0\" height=\"16.0\">\n <title id=\"shipping-title\">Ship to an Address</title>\n <desc id=\"shipping-desc\">Ship to an Address icon</desc>\n <use xlink:href=\"#shipping\" role=\"img\"></use>\n </svg>\n ${shipToRadioLabel}\n </label>\n <div class=\"content\">\n <div class=\"narvar-edd-info\"></div>\n <div class=\"ship-to-info-message\"></div>\n </div>\n </div>\n `,\n storeDetail: (storeId, name, address1, city, stateCode, postalCode) => `\n <div class=\"store-detail\">\n <div class=\"name\" data-store-id=\"${storeId}\">${name}</div>\n <div class=\"address\">\n <div class=\"address-line-1\">${address1}<span class=\"comma-separate\">,</span>\n <span class=\"city-state-postalcode\"> ${city}<span class=\"city-comma-separate\">,</span> ${stateCode} ${postalCode}</span>\n </div>\n </div>\n </div>\n `\n};\n\n/*\n * Product detail page - messaging templates\n */\nexports.productDetail = {\n selectStyleMessageTmpl: message => `<li><p class=\"availability-message-text select-size-info\" role=\"alert\">${message}</p></li>`,\n availabilityMessageTmpl: message => `<li><p class=\"availability-message-text\" role=\"alert\">${message}</p></li>`,\n availabilityMessageOOS: (message, flexibleMessageLink = '') => `\n <li><p class=\"availability-message-text\" role=\"alert\">${message}\n ${flexibleMessageLink}</p>\n </li>\n `,\n availabilityMessagePreorder: message => `\n <div class=\"availability-message-text-preorder\" role=\"alert\">\n <p class=\"message\">${message}</p>\n </div>\n\n `,\n ispuSelectStyleMessageTmpl: message => `<p class=\"availability-message-text\" role=\"alert\">${message}</p>`,\n ispuAvailabilityMessageTmpl: message => `<p class=\"availability-message-text\" role=\"alert\">${message}</p>`,\n ispuLowStockMessageTmpl: message => `<li><p class=\"ispu-availability-message-text\" role=\"alert\">${message}</p></li>`,\n promotionMessageTmpl: (calloutMsg, details) =>\n `\n <div class=\"js-promo-details-link promo-block-link\">\n <div class=\"promotion promo-block-item\">\n <span class=\"promotion-header promo-block-generic\">\n ${calloutMsg}\n </span>\n ` +\n (details\n ? `\n <svg class=\"promo-block-chevron-right\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <use xlink:href=\"#chevron-right-small\"></use>\n </svg>\n <div class=\"js-promo-details d-none\">${details}</div>`\n : '') +\n `</div>\n </div>`\n};\n\nexports.dialogTemplate = options => {\n const { buttons = [{ text: 'OK', primary: true, link: '' }], className = '', modalContentHeading = '', modalContentBody = '', id = 'dialog-' + Date.now(), slideOut = false } = options;\n\n const buttonSpace = Math.floor(12 / buttons.length);\n\n return `\n <div class=\"modal fade ${slideOut ? 'lp-slideout-modal' : 'generic-modal-dialog'} ${className}\" id=\"${id}\" tabindex=\"-1\" role=\"dialog\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content${slideOut ? ' lp-scrollbar' : ''}\">\n <div class=\"${slideOut ? 'modal-header' : 'generic-confirmation-header'}\">\n ${slideOut && modalContentHeading ? `<h4>${modalContentHeading}</h4>` : ''}\n <button type=\"button\" class=\"close close-current-modal\" data-dismiss=\"modal\" aria-label=\"Close\">\n <svg role=\"img\" aria-describedby=\"${id}-cross-title ${id}-cross-desc\" class=\"icon svg-icon svg-logo-dims\" width=\"16.0\" height=\"16.0\">\n <title id=\"${id}-cross-title\">Close dialog</title>\n <desc id=\"${id}-cross-desc\">Cross mark icon to close this dialog</desc>\n <use xlink:href=\"#cross\" role=\"img\"></use>\n </svg>\n </button>\n </div>\n ${!slideOut && modalContentHeading ? `<p class=\"modal-body generic-confirmation-body-heading\">${modalContentHeading}</p>` : ''}\n <div class=\"modal-body generic-confirmation-body-body${slideOut ? ' veiled' : ''}\">${modalContentBody}</div>\n <div class=\"row\">\n ${buttons\n .map(\n button => `\n <div class=\"col-${buttonSpace}\">\n ${\n button.link\n ? `<a href=\"${button.link}\" class=\"btn btn-block button-${button.primary ? 'primary' : 'secondary'}\">${button.text}</a>`\n : `<button type=\"button\" class=\"btn btn-block button-${button.primary ? 'primary' : 'secondary'}\" data-dismiss=\"modal\">${button.text}</button>`\n }\n </div>`\n )\n .join('')}\n </div>\n </div>\n </div>\n </div>\n `;\n};\n\nexports.errorTextTemplate = errorMessage => `<div class=\"container\"><p class=\"error-message-text\">${errorMessage}</p></div>`;\n\nexports.oneTrust = {\n privacyDialogCookieBanner: `\n <div class=\"onetrust-dialog-cookie-banner\">\n <div class=\"onetrust-dialog-cookie-banner-text\">\n You can opt out of 3rd party cookies by clicking <button class=\"cookie-preferences\">Cookie Preferences</button>.\n </div>\n </div>\n `\n};\nexports.loyalty = {\n carouselBadge: '<div class=\"js-loyalty-badge pdp-loyalty-badge product-tile-badge hide\"><span class=\"js-loyalty-badge-text product-tile-badge-text\">{0}</span></div>'\n};\n\nexports.styliticsTemplates = {\n shopTheModelBadge: '<p class=\"stylitics-badge-text\">As seen above</p>'\n};\n\nexports.returnsPageTemplates = {\n defaultError: 'We're sorry, an unexpected error occurred. Please try again.',\n errorMessage: message => `<div class=\"custom-error-alert\" role=\"alert\">${message}</div>`\n};\n\nexports.cyberSource = {\n secureAcceptanceTag: paymentType => `<span>Secure Acceptance ${paymentType}</span>`,\n boltPayPaymentTag: (paymentType, paymentLastFour, expMonth, expYear) => `\n <div class=\"credit-card-type\"><span>${paymentType}\n </span></div><div class=\"credit-card-number\"><span>${paymentLastFour}</span></div>\n <div class=\"credit-card-expiration-date\"><span>${expMonth}/${expYear}</span></div>`,\n paypalPaymentTag: (paypalMethod, paypalAmount) => `<span>${paypalMethod}</span><div><span>${paypalAmount}</span></div>`,\n creditCardPaymentTag: (cardType, creditCardType, maskedCardNumber, cardEndIn, cardExpMonth, cardExpYear) => `<div class=\"credit-card-type\"><span>${cardType} ${creditCardType}</span></div><div class=\"credit-card-number\">\n ${maskedCardNumber}</div><div class=\"credit-card-expiration-date\"><span>${cardEndIn} ${cardExpMonth}/${cardExpYear}</span></div>`\n};\n\nexports.checkoutErrorTemplate = {\n checkoutErrorMsg: errorMsg => `<div class=\"alert alert-danger alert-dismissible valid-cart-error fade show\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>${errorMsg}\n </div>`\n};\n\nexports.minitoteError = message => `<p class=\"cart-error-message\">${message}</p>`;\n\nexports.addToCartAlert = (messageType, message) => `<div class=\"alert ${messageType} add-to-basket-alert text-center\" role=\"alert\">${message}</div>`;\n\nexports.productTileSlide = (el, index) => `<div class=\"swiper-slide js-swiper-slide\" role=\"option\">\n <img src=\"${el.url}\" srcset=\"${el.srcset}\" class=\"tile-image\" alt='${el.alt} ${index > 0 ? ` image${index}` : ''}' itemprop=\"image\" />\n</div>`;\n\nexports.noImageIcon = `<svg role=\"img\" aria-label=\"Image not available\" class=\"icon svg-icon icon\" width=\"63\" height=\"86\">\n <use xlink:href=\"#no-image\"></use>\n</svg>`;\n\nexports.productTileSlidePicture = (el, index, imageType) => {\n const breakpoints = {\n sm: '(max-width: 767px)',\n md: '(max-width: 1024px)',\n lg: '(min-width: 1025px)'\n };\n const sourceTags = Object.entries(el.sources)\n .map(([key, srcset]) => {\n return `<source srcset=\"${srcset}\" media=\"${breakpoints[key]}\">`;\n })\n .join('');\n return `<div class=\"swiper-slide js-swiper-slide\" role=\"option\">\n <picture\n class=\"d-block img-fluid w-100\">\n ${sourceTags}\n <img\n loading=\"lazy\"\n src=\"${el.url}\"\n alt=\"${el.alt} image number ${index + 1}\"\n title=\"${el.title}\"\n data-image=\"${imageType}\"\n itemprop=\"image\"/>\n </picture>\n </div>`;\n};\n\nexports.sliderPaginationTemplate = (currentClass, totalClass) => `<span class=\"${currentClass}\"></span> of <span class=\"${totalClass}\"></span>`;\n\n/**\n * get recent search history list\n * @param {Object} searchHistoryStorage - search history array\n * @param {string} baseUrl - base Search-Show url\n * @param {string} clearButtonText - clear all button text\n * @return {string} SFL html template\n */\nexports.searchHistoryTemplate = (searchHistoryStorage, baseUrl, clearButtonText) => {\n let list = '';\n for (let i = 0, len = searchHistoryStorage.length; i < len; i++) {\n const searchTerm = searchHistoryStorage[i];\n const url = baseUrl + '?q=' + searchTerm;\n list += `<div class=\"suggestions-section-items js-recent-search-item\">\n <div class=\"item term\">\n <svg role=\"img\" class=\"icon svg-icon svg-logo-dims\" width=\"12\" height=\"12\">\n <use xlink:href=\"#search\"></use>\n </svg>\n <a class=\"link js-recent-link\" href=\"${url}\">${searchTerm}</a>\n </div>\n <button type=\"button\" class=\"remove-recent-search js-remove-recent-search\">\n <svg width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.0001 13.8097L18.4697 20.2794L19.5304 19.2188L13.0607 12.7491L19.5304 6.27941L18.4697 5.21875L12.0001 11.6884L5.53039 5.21875L4.46973 6.27941L10.9394 12.7491L4.46973 19.2188L5.53039 20.2794L12.0001 13.8097Z\" fill=\"black\"/>\n </svg>\n </button>\n </div>`;\n }\n\n if (clearButtonText) list += `<button type=\"button\" class=\"remove-all-recent js-remove-all-recent\">${clearButtonText}</button>`;\n\n return list;\n};\n\nexports.productTilePriceContent = (priceMainHtml, priceVariationHtml) => {\n return `<div class=\"price-variation\">${priceVariationHtml}</div><div class=\"price-main\">${priceMainHtml}</div>`;\n};\n\nexports.videoInnerContent = (poster, videoUrl) => {\n return `<div class=\"video-component video-PDP\">\n <video class=\"video lazy-video video-component-main\"\n poster=\"${poster}\"\n playsinline\n controlslist=\"nodownload\"\n >\n <source data-src=\"${videoUrl}\"\n type=\"video/mp4\"\n >\n </video>\n <div class=\"video-controls\">\n <button class=\"mute-video unmuted\">\n <svg role=\"img\" aria-label=\"mute\" class=\"icon svg-icon svg-video-mute\" width=\"16.0\" height=\"16.0\">\n <use xlink:href=\"#mute\"></use>\n </svg>\n <svg role=\"img\" aria-label=\"unmute\" class=\"icon svg-icon svg-video-unmute\" width=\"16.0\" height=\"16.0\">\n <use xlink:href=\"#unmute\"></use>\n </svg>\n </button>\n <button type=\"button\" class=\"play-video\">\n <svg role=\"img\" aria-label=\"Play\" class=\"icon svg-icon svg-video-play\" width=\"16.0\" height=\"16.0\">\n <use xlink:href=\"#play\"></use>\n </svg>\n <svg role=\"img\" aria-label=\"Pause\" class=\"icon svg-icon svg-video-pause\" width=\"16.0\" height=\"16.0\">\n <use xlink:href=\"#pause\"></use>\n </svg>\n </button>\n </div>\n </div>\n `;\n};\n","const { removeClass, queryFirst, addClass, hasClass } = 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) =>\n values\n .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 })\n .join('-')\n .replace(/-+/g, '-')\n .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(\n Object.keys(input)\n .sort()\n .reduce((result, key) => {\n result[key] = input[key];\n return result;\n }, {})\n );\n }\n\n if (value.startsWith('\"') && value.endsWith('\"')) {\n value = value.substr(1, value.length - 2);\n }\n\n return value\n .split('')\n .map(digit => digit.charCodeAt(0).toString(16))\n .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) =>\n toKebabCase(...values)\n .split('-')\n .map((text, index) => (index === 0 ? text : text.charAt(0).toUpperCase() + text.substr(1)))\n .join('');\n\n/**\n * Format dynamic resource messages.\n *\n * @param {string | Object} string Resource message that need to be tokenized\n * @param {string | Object} tokens Tokens that need to be replaced.\n * @return {string} Updated string.\n */\nexports.formatMessage = (string, ...tokens) => {\n return this.tokenize(\n string,\n tokens.reduce((result, item, index) => {\n result[index] = item;\n return result;\n }, {}),\n '{',\n '}'\n );\n};\n\n/**\n * Safely gets nested object properties. Returns the value if found, undefined if not found.\n * @param {*} obj The parent object in which the property exists\n * @param {*} keyString String denoting where in the parent object your target property should exist\n * @param {...any} replaceValues Values in the keyString to replace -- reference in the keyString with a number encapsulated in {} (e.g. {0}, {1}, etc)\n * @return {Object} returns nested object properties\n */\nexports.getNestedValue = function (obj, keyString, ...replaceValues) {\n const keys = keyString.split(/\\[|\\]|\\./).filter(el => el !== '');\n\n return keys.reduce((o, i) => (o || {})[/\\{\\d+\\}/.test(i) ? replaceValues[i.split(/\\{|\\}/)[1]] : i], obj);\n};\n\n/**\n * Ensures an event handler is only bound to an element once\n * @param {HTMLElement} element The element to bind the event to\n * @param {string} eventType The type of event\n * @param {function} handler The handler to execute when the event occurs, or the immediate callback if not defined\n * @param {string} initFlag The name of the flag to use for init\n */\nexports.initOnce = (element, eventType = '', handler, initFlag = '') => {\n const flag = 'init' + initFlag + eventType.toLowerCase();\n\n if (!element || element.dataset[flag]) return;\n\n element.dataset[flag] = true;\n if (eventType) {\n element.addEventListener(eventType, handler);\n } else {\n handler();\n }\n};\n\n/**\n * appends params to a url\n * @param {string} url - Original url\n * @param {Object} params - Parameters to append\n * @returns {string} result url with appended parameters\n */\nexports.appendToUrl = (url, params) => {\n let newUrl = url;\n newUrl +=\n (newUrl.indexOf('?') !== -1 ? '&' : '?') +\n Object.keys(params)\n .map(key => key + '=' + encodeURIComponent(params[key]))\n .join('&');\n\n return newUrl;\n};\n\n/**\n * This method performs an ajax call\n * @param {string} url endpoint url\n * @param {string} type ajax method type\n * @param {Object} data data for an ajax call\n * @param {function} onSuccess success call back function\n * @param {function} onError error call back function\n * @return {function} returns ajax function\n */\nexports.getJSON = (url, type, data = {}, onSuccess = function () {}, onError = function () {}) => {\n return $.ajax({\n url,\n type,\n dataType: 'json',\n data,\n success: onSuccess,\n error: onError\n });\n};\n\n/**\n * This method renders geo location\n * @param {function} successCallback Success callback function\n * @param {Object} mixin additional parameters\n * @param {function} errorCallback Error callback function\n */\nexports.geolocate = (successCallback, mixin = {}, errorCallback) => {\n if (!navigator.geolocation) return;\n const data = Object.assign({}, mixin);\n const successHandler = response => {\n const { coords } = response;\n if (coords) {\n const { latitude, longitude } = coords;\n data.latitude = latitude;\n data.longitude = longitude;\n }\n\n if (successCallback) {\n successCallback(data);\n }\n };\n const errorHandler = error => {\n if (errorCallback) {\n errorCallback(data);\n }\n };\n navigator.geolocation.getCurrentPosition(successHandler, errorHandler, {\n maximumAge: 0\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, hyphen = true) {\n function formatValue(numbers) {\n const char = { 0: '(', 3: ') ', 6: hyphen ? '-' : ' ' };\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, hyphen);\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, hyphen);\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\n/**\n * set/change parameter value in the url\n * @param {string} url - Original url\n * @param {string} paramToChange - changed parameter\n * @param {string} newValue - new value\n * @param {boolean} isPartOfParamName - determine if paramToChange is a part of parameter name\n * @returns {string} result url with changed parameter value OR original url\n */\nexports.setUrlParamValue = (url, paramToChange, newValue, isPartOfParamName) => {\n if (!url || !paramToChange || !newValue) return url;\n\n const urlObj = new URL(url, location.origin);\n const urlParams = new URLSearchParams(urlObj.search);\n\n if (isPartOfParamName) {\n const foundParam = urlParams.keys().find(key => key.indexOf(paramToChange) !== -1);\n if (foundParam) paramToChange = foundParam;\n }\n\n urlParams.set(paramToChange, newValue);\n return `${urlObj.origin}${urlObj.pathname}?${urlParams}`;\n};\n\n/**\n * remove parameter from url\n * @param {string} paramName parameter name\n * @return {undefined} undefined, if there is no param\n */\nexports.removeParamFromUrl = function (paramName) {\n const params = new URLSearchParams(window.location.search);\n if (!params.has(paramName)) return;\n\n params.delete(paramName);\n const newUrl = params.toString() ? `?${params.toString()}` : window.location.pathname;\n window.history.replaceState({}, '', newUrl);\n};\n\n/**\n * reload a page, if it is 'webview' template in the mobile app (webview/webviewtemplate.isml)\n * @param {string} querySelector element selector\n * @param {HTMLElement} viewAll View All button element\n * @param {boolean|number} stepCondition - Condition to determine if sheet should be rendered\n * @return {boolean} returns false if it is not mobile session\n */\nexports.reloadPageForMobile = function (querySelector, viewAll, stepCondition) {\n if (!queryFirst('.mobile-session')) return false;\n\n const className = 'viewallbtnclass';\n const params = new URLSearchParams(window.location.search);\n if (viewAll && stepCondition) {\n params.set(className, querySelector);\n window.location.href = window.location.pathname + '?' + params.toString();\n } else {\n this.removeParamFromUrl(className);\n window.location.reload();\n }\n\n return true;\n};\n\n/**\n * Handles rendering of a sheet based on specific conditions and selector\n * @param {string} querySelector - CSS selector to find the view all element\n * @param {boolean|number} stepCondition - Condition to determine if sheet should be rendered\n * @return {undefined} undefined, if it is mobile session\n */\nexports.handleSheetRendering = (querySelector, stepCondition) => {\n removeClass(queryFirst('#profile-page'), 'loaded');\n const viewAll = queryFirst(querySelector);\n const $body = $('body');\n\n if (this.reloadPageForMobile(querySelector, viewAll, stepCondition)) return;\n\n if (viewAll && stepCondition) {\n const { href, type } = viewAll.dataset;\n $('#profile-page').one('sectionLoaded', () => {\n $body.trigger('sheet:rerender', {\n url: href,\n ...(type ? { type } : {}) // Optional type spread\n });\n });\n } else {\n $('#js-fl-pd-sheet').modal('hide');\n }\n};\n","'use strict';\n\nvar scrollAnimate = require('../components/scrollAnimate');\n\n/**\n * Display error messages and highlight form fields with errors.\n * @param {string} parentSelector - the form which contains the fields\n * @param {Object} fieldErrors - the fields with errors\n */\nfunction loadFormErrors(parentSelector, fieldErrors) { // eslint-disable-line\n // Display error messages and highlight form fields with errors.\n $.each(fieldErrors, function (attr) {\n $('*[name=' + attr + ']', parentSelector)\n .addClass('is-invalid')\n .siblings('.invalid-feedback')\n .html(fieldErrors[attr]);\n });\n // Animate to top of form that has errors\n scrollAnimate($(parentSelector));\n}\n\n/**\n * Clear the form errors.\n * @param {string} parentSelector - the parent form selector.\n */\nfunction clearPreviousErrors(parentSelector) {\n $(parentSelector).find('.form-control.is-invalid').removeClass('is-invalid');\n $('.error-message').hide();\n}\n\nmodule.exports = {\n loadFormErrors: loadFormErrors,\n clearPreviousErrors: clearPreviousErrors\n};\n","'use strict';\n\nmodule.exports = function (element, message) {\n var errorHtml = '<div class=\"alert alert-danger alert-dismissible ' +\n 'fade show\" role=\"alert\">' +\n '<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">' +\n '<span aria-hidden=\"true\">×</span>' +\n '</button>' + message + '</div>';\n\n $(element).append(errorHtml);\n};\n","'use strict';\n\n/**\n * Remove all validation. Should be called every time before revalidating form\n * @param {element} form - Form to be cleared\n * @returns {void}\n */\nfunction clearFormErrors(form) {\n $(form).find('.form-control.is-invalid').removeClass('is-invalid');\n}\n\nmodule.exports = function (formElement, payload) {\n // clear form validation first\n clearFormErrors(formElement);\n $('.alert', formElement).remove();\n\n if (typeof payload === 'object' && payload.fields) {\n Object.keys(payload.fields).forEach(function (key) {\n if (payload.fields[key]) {\n var feedbackElement = $(formElement).find('[name=\"' + key + '\"]')\n .parent()\n .children('.invalid-feedback');\n\n if (feedbackElement.length > 0) {\n if (Array.isArray(payload[key])) {\n feedbackElement.html(payload.fields[key].join('<br/>'));\n } else {\n feedbackElement.html(payload.fields[key]);\n }\n feedbackElement.siblings('.form-control').addClass('is-invalid');\n }\n }\n });\n }\n if (payload && payload.error) {\n var form = $(formElement).prop('tagName') === 'FORM'\n ? $(formElement)\n : $(formElement).parents('form');\n\n form.prepend('<div class=\"alert alert-danger\" role=\"alert\">'\n + payload.error.join('<br/>') + '</div>');\n }\n};\n","'use strict';\n\nmodule.exports = function (element) {\n var position = element && element.length ? element.offset().top : 0;\n $('html, body').animate({\n scrollTop: position\n }, 500);\n if (!element) {\n $('.logo-home').focus();\n }\n};\n","'use strict';\n\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('<p>' + data.receivedMsgBody + '</p>');\n if (!data.mobile) {\n $('#submitEmailButton').text(data.buttonText)\n .attr('data-dismiss', 'modal');\n } else {\n $('.send-email-btn').empty()\n .html('<a href=\"'\n + data.returnUrl\n + '\" class=\"btn btn-primary btn-block\">'\n + data.buttonText + '</a>'\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","'use strict';\n\nvar processInclude = require('base/util');\n\n$(document).ready(function () {\n processInclude(require('./login/login'));\n processInclude(require('./loyalty/loyaltyDrawer'));\n});\n"],"names":["scrollAnimate","require","baseFormErrors","loadFormErrors","parentSelector","fieldErrors","$","each","attr","addClass","siblings","html","find","clearPreviousErrors","removeClass","hide","module","exports","queryFirst","queryAll","isInViewport","hasClass","scrollTo","INVALID_CLASS","HIDDEN_CLASS","errorTextTemplate","formHelpers","checkoutContainerEl","document","getElementById","checkoutContainer","showClass","scrollToError","formEl","headerEl","headerHeight","offsetHeight","invalidEl","first","$modalBodyEl","closest","scrollIntoView","behavior","scrollOffset","offset","top","newCCSection","nearestElm","length","validateForm","event","valid","this","checkValidity","preventDefault","stopPropagation","stopImmediatePropagation","validity","trigger","clearForm","form","parents","getValidationMessage","validationMessage","$this","patternMismatchValue","data","rangeErrorValue","missingErrorValue","badInputErrorValue","stepMismatchErrorValue","typeMismatchErrorValue","patternMismatch","rangeOverflow","rangeUnderflow","tooLong","tooShort","valueMissing","badInput","stepMismatch","typeMismatch","onFormInvalidHandler","e","setCustomValidity","text","apply","onFormSubmit","call","updatePaymentValidation","isRequired","required","validateInputs","container","querySelectorAll","forEach","element","invalid","on","ajaxFormInvalid","formElSelector","submit","ajaxFormSubmit","sheetFormSubmit","target","sheetContainer","sheetForm","one","validateCheckoutForm","guestCustomerForm","registeredCustomerForm","shippingForm","billingForm","submitShippingBtn","billingAddress","reauthForm","disabled","submitReauthBtn","addEventListener","spinner","start","stop","submitCustomerBtn","submitCustomerLoginBtn","setTimeout","click","errorElement","shippingError","dataset","addressMode","customerType","giftCheckbox","giftMessageContainer","giftMessageEl","innerHTML","checked","submitPaymentBtn","isPaymentDisabled","isCreditTabActive","isBoltTabActive","isNewPayment","checkIsBoltEnabledEl","isBoltEnabled","value","savedPaymentCvv","isCardExpired","creditCardExpirationMonthEl","creditCardExpirationYearEl","cardExpiredError","boltCardExpireMonth","boltCardExpireYear","today","Date","expDate","setFullYear","boltExpiredCardError","dwfrm_billing_creditCardFields_expirationMonth","dwfrm_billing_creditCardFields_expirationYear","checkoutStage","link","enableFormSubmitButton","formElements","selectorContainer","notMatchedClass","matchedClass","button","$form","callback","isConfirmPassword","id","isNewPassword","isConfirmRegistrationPassword","isRegistrationPassword","isPromoCodeField","isPasswordMatched","isValidForm","confirmPasswordMatches","passwordFieldId","newPasswordValue","confirmPasswordValue","isPasswordMatches","isValidForms","checkPasswordMatch","isCurrentlyInvalid","hasExistingError","textContent","sheetPage","thisValue","val","i","item","regexPattern","regexpattern","RegExp","test","mismatchError","buttonClick","functions","enableOrDisableButton","formElement","debounce","SCROLLABLE_CONTENT_SELECTOR","initSpecificCarousel","scrollableContainerEl","parentEl","parentElement","leftArrowEl","left","Math","max","scrollLeft","offsetWidth","rightArrowEl","min","scrollWidth","initCarousel","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","SPU_HIDDEN_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","SET_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_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","breakpoints","xs","sm","md","lg","xl","PREFERRED_STORE_ID","EMPTY_STRING","ONE_SIZE_ID","window","lillyUtils","constants","ONE_SIZE","ONE_SIZE_LABEL","resources","CHANGED_CLASS","FILLED_CLASS","ACTIVE_CLASS","INVISIBLE_CLASS","NO_SCROLL_CLASS","SELECTED_CLASS","SHOW_CLASS","SHOW_ALL_CLASS","D_FLEX","DISPLAY_CLASS","INACTIVE_CLASS","MENU_OPENED","LOADED_CLASS","SCROLLED_CLASS","PREORDER_STATUS","BACKORDER_STATUS","IN_STOCK_STATUS","NOT_AVAILABLE_STATUS","KEYCODE_TAB","KEYCODE_ESCAPE","KEYCODE_UP","KEYCODE_DOWN","KEYCODE_ENTER","EVENT_KEY_ENTER","EVENT_KEY_TAB","PLAYED_CLASS","MUTED_CLASS","UNMUTED_CLASS","WAS_PLAYING_CLASS","TIMEOUT_100","SEARCH_TYPE","SEARCH_SUBMIT","SEARCH_SUGGESTIONS","POPULAR_SEARCHES","SEARCH_HISTORY","REFINEMENT_TYPE_CATEGORY","ANIM_TIME_INSTANT","ANIM_TIME_QUICK_1","ANIM_TIME_QUICK_2","ANIM_TIME_STANDARD_1","ANIM_TIME_STANDARD_2","ANIM_TIME_STANDARD_3","ANIM_TIME_STANDARD_4","TIMEOUT_1000","ANIM_EASE_LINEAR","ANIM_EASE_IN","ANIM_EASE_OUT","ANIM_EASE_IN_OUT","EMAIL_REGEX","PHONE_NUMBER_REGEX","IS_SAFARI","navigator","userAgent","selector","parent","arguments","undefined","querySelector","loadScript","source","isAsync","Promise","resolve","script","createElement","src","async","onload","body","append","loadInput","referrerID","input","setAttribute","appendChild","slice","getStyles","styles","getComputedStyle","_len","rules","Array","_key","map","rule","remove","el","isArray","NodeList","n","node","removeChild","removeAttribute","_len2","_key2","classList","add","_len3","_key3","toggleClass","_len4","_key4","toggle","_len5","classes","_key5","every","className","contains","hasAnyClass","_len6","_key6","some","throttle","limit","waitCallback","isThrottling","_len7","args","_key7","returnValue","_this","minimumDelay","options","condition","unrestrictedCallback","timer","_len8","_key8","clearTimeout","toArray","_len9","_key9","reduce","results","arg","concat","newTarget","array","makeArray","outerHeight","parseInt","marginTop","marginBottom","isInViewportCheck","scroll","scrollY","pageYOffset","boundsTop","getBoundingClientRect","numberOfViewportToCheck","nextViewportLazyLoad","viewport","innerHeight","bounds","clientHeight","rect","bottom","right","innerWidth","documentElement","clientWidth","y","duration","getLastElementInRow","nextElementSibling","offsetTop","scrollHeight","sibling","previousElementSibling","updateUrlQueryParam","fragment","queryParamsElement","permaLink","hash","URL","location","href","newUrl","split","history","pushState","path","getCharacterCount","waitForElement","scope","timeout","reject","elements","observer","MutationObserver","mutations","self","disconnect","observe","childList","subtree","bind","eventTypes","eventCondition","bindEngine","once","type","trim","useJQuery","String","toLowerCase","targetSelectors","handler","extraData","Element","jQuery","Event","targetElement","result","$element","eventType","off","removeEventListener","getProductInfoFromDataAttr","productInfo","parsedProductInfo","JSON","parse","getSalesPrice","priceEl","pop","getProductData","getNestedValue","containerData","monetatePid","viewType","isQuickview","productInventory","pid","wishlistId","masterId","masterid","productName","productSize","swatchName","attrValue","colorCode","productSet","productBadge","variationGroupId","originalPrice","productPrice","isPreorder","productId","indexOf","colorEl","swatchButton","attrDisplayvalue","tileEl","productData","standardPrice","price","groupId","productNameEl","productSizeEl","valueId","originalPriceEl","productInfoData","variants","Object","keys","variant","formattedPrice","productColor","matchesBreakpoint","breakpoint","matchMedia","matches","getCSRFToken","token","renderFragment","template","content","getCookieMap","cookie","keyValue","key","decodeURIComponent","setCookie","minutes","date","setTime","getTime","toGMTString","validateDate","monthSelector","dateSelector","message","m","d","mlength","isSelectModified","labelOption","Option","option","toString","selected","changeEvent","dispatchEvent","isVisible","HTMLElement","offsetParent","style","display","visibility","overflowY","height","maxHeight","toFormData","obj","includeUndefined","formData","FormData","slideUp","elem","easing","staticHeight","getPropertyValue","setProperty","getISProductContainer","srcElement","ISProductContainer","getISProductData","evgItemId","getElementsByTagName","setAdjustedSalesPrice","vgIDs","tealiumPrices","searchResultsContainer","len","adjustedPrice","ownKeys","r","t","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","_objectSpread","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","Symbol","toPrimitive","TypeError","_toPrimitive","_toPropertyKey","configurable","writable","formValidation","baseLogin","formatPhoneNumber","getItemFromLocalStorage","registrationFormPhone","loyaltyGuestReferralModal","$body","fullLoginPage","loginPageNav","accountSheet","loginHeaderLink","orderStatusHeaderLink","pdpContainer","mobileHeaderCloseBtn","LOGIN_PAGE","PREVIOUS_PAGE","setActivePage","page","activePage","activeForm","reset","openSheet","modal","guestCheckoutSignInModal","cancelBtnRegistrationModal","registerLeft","registerRight","login","$sheet","url","ajax","dataType","serialize","success","redirectUrl","error","responseJSON","register","reload","err","createErrorNotification","errorMessage","resetPassword","$resetPasswordForm","handleLogin","loginBtnEl","$loginFormEl","loginNavEvents","HTMLAnchorElement","sheetEvents","loginNavTab","registerNavTab","enableLoginButton","loginBtns","btn","getTimeRemaining","getJSON","loyaltyProfile","isLoyaltyProgramMember","accountLoyaltyTabLink","hiddenClass","loyaltyWelcomeDialog","loyaltyEnrollNowDialog","invalidClass","mobileImg","desktopImg","root","loyaltyEarlyAccessRegisterForm","swatchImageDownload","swatchImageDownloaded","downloadCtaDesktop","downloadCtaMobile","loyaltyQuiz","welcomeDialogEarlyAccessContent","welcomeDialogRegularFlowElms","welcomeDialogEarlyAccessFlowElms","removeWelcomeModalShowSession","closeButton","welcomeSessionUrl","hideShowDrawerImage","drawerMobileImg","drawerDesktopImg","desktopImageWrapper","mobileImageWrapper","drawerMobileImgEl","drawerDesktopImgEl","loyaltyDrawerImageView","updateReferralBg","loyaltyReferralBg","bgColor","bgImageDesktop","bgImageMobile","drawerImage","loyaltyModalEl","withImageEl","withoutImageEl","loyaltyDrawerBackground","updateImgURLOnDownloadCta","selectedWallpaperId","selectTab","imageElement","swatchImageDownloadCtaDesktop","swatchImageDownloadCtaMobile","swatchImageDownloadedCtaDesktop","swatchImageDownloadedCtaMobile","desktopDownloadedImage","mobileDownloadedImage","updateClock","countDataMsg","countDownTime","countDownEle","timeinterval","countDataMsgNoDays","countDownMsgOneDay","tokenize","newCountDataMsgDays","days","newCountDataMsg","total","clearInterval","init","exclusiveExperiencesTile","exclusiveModule","countDownTimer","countDownEleNoDays","countDownEleOneDay","counterMsg","setInterval","exclusiveExperiencesCountDown","loyaltyDrawer","loyaltyAppImage","loyaltyDrawerContent","isAppDrawer","drawerAppImgEl","appImageWrapper","appMobileImgEl","isLoyaltyProgramDrawerClick","hasJoinCta","$loyaltyContainer","loyaltyContainer","guestEnrollment","memberSignInEnrollment","loyaltyIsImage","title","closeButtonLabel","drawerTitle","drawerCloseButtonLabel","drawerTitleE1","drawerCloseButtonE1","ariaLabel","showHowToEarnDrawerImage","loyaltyEnrollPostalCodeContainer","loyaltyEnrollPostalEl","loyaltyEnrollCheckboxEl","enrollNowSource","loyaltyEnrollNowSubmit","checkbox","errorMsgText","missingError","errorMsg","postalCodeEl","referrerIDEl","postalCodeRegex","regexp","postalCode","invalidFeedback","requestData","lillyLoyaltyProgram","loyaltyUnenrollDashboard","accountLoyaltyPage","showWelcomePopup","loyaltyDashboardShow","checkLoyaltyAccess","showEnrollmentModel","imageUrls","modelImages","enrollmentModel","welcomeModel","loyaltyaccesspopupmobile","LoyaltyguestenrollmentnonloyaltyD2x","loyaltywelcomepopupmobile","LoyaltywelcomeloyaltyD2x","loyaltyDashboardOffersTile","expirationDateTime","cardFlippedEl","cardFront","pointerEvents","expiryDate","couponCode","formatString","rewardDesc","offerDiscountDialog","offerDiscountModalData","offerDiscountTileData","offerCodeEl","offerCodeExpiresEl","offerDescriptionHeader","getFormatDateString","loyaltyReferralDrawer","referralUrlElement","referralUrl","replace","loyaltyCopyReferralUrl","copyReferralUrl","copyCta","copiedLinkCta","select","setSelectionRange","clipboard","writeText","then","loyaltyCopyCode","copyButton","codeField","codeSection","copiedCodeCta","console","textToCopy","catch","loyaltyOopsRefreshSection","successServiceResData","tooltipModule","tooltipInnerData","serviceResHTMLData","updatedToolTip","popContent","tooltipIcon","popover","placement","clickEvent","clicked","scrollableContent","referralModuleBg","referralSection","loyaltyEarlyAccessSignUp","isLoyaltyMember","showWelcomeModal","loyaltyGuestEnrollEls","loyaltyEnrollForm","loyaltyPostalCodeEls","postalCodeInput","enrollDialogLoggedInUsersContent","loyaltyQuizDrawer","$modalSpinner","actionUrl","currentModal","quizModalElement","modalContentBody","modalContentFooter","response","fetch","doc","DOMParser","parseFromString","ctasContainer","swatchSelected","swatchTextSelected","swatchImgTitle","previouslySelectedRes","urlWithHash","bodyEventsInitialized","showSelectedAnswers","answerSelectedArr","selectedSwatchEl","selectedSwatchContainer","swatchTitleSelected","quizSelectionType","selectedCircularSwatch","selectedSwatchTextEl","resetState","removeAllSelectedAnswers","questionCount","currentQuestionEl","swatchCheckedEl","selectedSwatchText","getValidationMessageEl","questionNumber","questionWrapperEl","refreshValidationMessage","validationSelectMoreMsgEl","quizValidationPleaseSelectMsg","showNextQuestion","nextQuestionNumber","nextQuestionEl","nextCtasContainerEl","questionStep","sheetContentBody","replaceState","nextQuestion","nextAnswer","updateResponseSelected","questionNumberIntValue","swatchContainerEl","userSelection","answerArr","from","optionTitle","previousAnswer","join","quizLandingPage","quizLandingCtas","quizStartButton","quizSubmitBtn","quizThankYouPage","completeQuizEl","thankyouCTAs","completeQuizImg","quizQuestionPage","question1El","ctasContainerEl1","question1Response","stepCount","action","countValue","isSubmitted","assign","isValid","show","toggleValidationMessage","prevQuestionNumber","previousQuestionEl","prevCtasContainerEl","previousQuestion","showPreviousQuestion","currentTarget","squareContainerEl","circularContainerEl","circularContainerImg","categoryChecked","initBodyEvents","quickView","quickViewModal","addToWishlist","addToWishlistModal","cart","cartAvailabilityMessageOOS","promo","shippingMethod","checkoutNormalShipping","checkoutDiscountShipping","checkout","discountPrice","swatchNameTemplate","swatchNameHtml","emptySwatchTemplate","addressSuggestions","suggestionTextTemplate","suggestionsTemplate","approachingDiscounts","nonCouponBasedAdjustmentTemplate","videoTemplate","loop","videoUrl","imgUrl","classNames","autoplay","muted","controls","icontitle","icondesc","imageTemplate","altText","sizeOptionTemplate","sizeButtonTemplate","variantData","ariaDescribedby","selectedText","oosMessage","forceOutOfStock","inStock","sizeId","guestEmptyWishlistTemplate","emptyWishlistMessage","emptyWishlistContentAssetBody","emptySFL","emptySFLMessage","continueShopURL","continueShopMsg","signInMsg","signInSFLURL","gwpSizeTemplate","singleSize","multiSize","multiDefaultSizeOption","multiSizeOption","autoComplete","suggestionLink","suggestion","addressLine","secondaryEntryAddressLine","street_line","secondary","state","city","zipcode","entries","suggestionContainer","containerClass","contactUsTemplate","signupError","msg","defaultSignupError","browserWarningTemplate","shippingPreferenceTemplates","shippingPreferences","ispuRadioLabel","ispuRadioValue","shipToRadioLabel","shipToRadioValue","changeStoreLabel","preferISPU","storeDetail","storeId","name","address1","stateCode","productDetail","selectStyleMessageTmpl","availabilityMessageTmpl","availabilityMessageOOS","availabilityMessagePreorder","ispuSelectStyleMessageTmpl","ispuAvailabilityMessageTmpl","ispuLowStockMessageTmpl","promotionMessageTmpl","calloutMsg","details","dialogTemplate","buttons","primary","modalContentHeading","now","slideOut","buttonSpace","floor","oneTrust","privacyDialogCookieBanner","loyalty","carouselBadge","styliticsTemplates","shopTheModelBadge","returnsPageTemplates","defaultError","cyberSource","secureAcceptanceTag","paymentType","boltPayPaymentTag","paymentLastFour","expMonth","expYear","paypalPaymentTag","paypalMethod","paypalAmount","creditCardPaymentTag","cardType","creditCardType","maskedCardNumber","cardEndIn","cardExpMonth","cardExpYear","checkoutErrorTemplate","checkoutErrorMsg","minitoteError","addToCartAlert","messageType","productTileSlide","index","srcset","alt","noImageIcon","productTileSlidePicture","imageType","sources","_ref","sliderPaginationTemplate","currentClass","totalClass","searchHistoryTemplate","searchHistoryStorage","baseUrl","clearButtonText","list","searchTerm","productTilePriceContent","priceMainHtml","priceVariationHtml","videoInnerContent","poster","string","values","leftToken","rightToken","operators","_","code","toKebabCase","hashValue","stringify","sort","startsWith","endsWith","substr","digit","charCodeAt","toDatasetKey","charAt","toUpperCase","formatMessage","tokens","keyString","replaceValues","initOnce","flag","appendToUrl","params","encodeURIComponent","onSuccess","onError","geolocate","successCallback","mixin","errorCallback","geolocation","getCurrentPosition","coords","latitude","longitude","maximumAge","setItemInLocalStorage","localStorage","setItem","getItem","removeItemFromLocalStorage","removeItem","hyphen","formatValue","numbers","char","l","errorMessageElmParent","parentNode","isMobile","mobileAgentHash","idx","stickyScrollPosition","items","$window","ticking","detailStickyScroll","itemHeight","windowHeight","newTop","onScroll","requestAnimationFrame","handleStickyPositionOnScroll","isUnsupportedBrowser","sitePrefs","unsupportedBrowserTypes","getAttribute","uaFragment","endtime","seconds","hours","validateEmailBolt","email","setUrlParamValue","paramToChange","newValue","isPartOfParamName","urlObj","origin","urlParams","URLSearchParams","search","foundParam","set","pathname","removeParamFromUrl","paramName","has","delete","reloadPageForMobile","viewAll","stepCondition","handleSheetRendering","errorHtml","payload","fields","feedbackElement","children","prop","prepend","position","animate","scrollTop","focus","receivedMsgHeading","empty","receivedMsgBody","mobile","returnUrl","buttonText","clearResetForm","include","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","processInclude","ready"],"sourceRoot":""}