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AAGpT,mBAAO,CAAC,yHAAW,CAAC;AAEzCV,CAAC,CAACoN,QAAQ,CAAC,CAAC2G,KAAK,CAAC,YAAY;EAC1BD,cAAc,CAACpT,mBAAO,CAAC,mHAAiB,CAAC,CAAC;EAC1CoT,cAAc,CAACpT,mBAAO,CAAC,2HAAqB,CAAC,CAAC;AAClD,CAAC,CAAC,C","sources":["webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/components/modal.js","webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/product/base.js","webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/product/quickView.js","webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/search/search.js","webpack://roche-sfra/./storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/focus.js","webpack://roche-sfra/./storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack://roche-sfra/webpack/bootstrap","webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/search.js"],"sourcesContent":["/* eslint-disable prettier/prettier */\r\n\r\n'use strict';\r\n\r\n/**\r\n * Creates and shows a generic modal according to the passed parameters\r\n * @param {string} title - Modal title\r\n * @param {string} msg - Modal main text\r\n * @param {string} btnText - CTA button text\r\n * @param {string} btnAction - CTA button url. If not set, the button will act as a close button\r\n * @param {string} btnType - Class to give custom styles to the button\r\n * @param {boolean} openInNewTab - Open in a new tab if true\r\n * @param {string} secondaryBtnText - (Only if you need 2 buttons) CTA secondary button text (positioned to the right)\r\n * @param {string} secondaryBtnAction - (Only if you need 2 buttons) CTA secondary button url. If not set, the button\r\n * will act as a close button\r\n * @param {string} secondaryBtnType - (Only if you need 2 buttons) Class to give custom styles to the secondary button\r\n * @param {boolean} secondaryBtnOpenInNewTab - (Only if you need 2 buttons) Open the secondary button link in a new tab\r\n */\r\nfunction renderGenericCtaModal(\r\n title,\r\n msg,\r\n btnText,\r\n btnAction,\r\n btnType,\r\n openInNewTab,\r\n secondaryBtnText,\r\n secondaryBtnAction,\r\n secondaryBtnType,\r\n secondaryBtnOpenInNewTab\r\n) {\r\n // Remove previous modal if exists\r\n $('#ctaModal').remove();\r\n var modalHtml =\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n `

${title || ''}

` +\r\n '
' +\r\n `
${msg || ''}
` +\r\n '
';\r\n $('body').append(modalHtml);\r\n // Initialize the modal\r\n $('body > .modal-backdrop').remove();\r\n $('body').removeClass('modal-open');\r\n $('#ctaModal').modal('show');\r\n}\r\n\r\nmodule.exports = {\r\n renderGenericCtaModal\r\n};\r\n","'use strict';\r\n\r\nvar focusHelper = require('base/components/focus');\r\nvar modalHelper = require('../components/modal');\r\n\r\n/**\r\n * Retrieves the relevant pid value\r\n * @param {jquery} $el - DOM container for a given add to cart button\r\n * @return {string} - value to be used when adding product to cart\r\n */\r\nfunction getPidValue($el) {\r\n var pid;\r\n\r\n if ($('#quickViewModal').hasClass('show') && !$('.product-set').length) {\r\n pid = $($el).closest('.modal-content').find('.product-quickview').data('pid');\r\n } else if ($('.product-set-detail').length || $('.product-set').length) {\r\n pid = $($el).closest('.product-detail').find('.product-id').text();\r\n } else {\r\n pid = $('.product-detail:not(\".bundle-item\")').data('pid');\r\n }\r\n\r\n return pid;\r\n}\r\n\r\n/**\r\n * Check the selected purchase option\r\n * @return {boolean} - True if subscription is selected\r\n */\r\nfunction isSubscriptionSelected() {\r\n return (\r\n $(\"input[name='purchaseType']:checked\").val() === 'subscription' ||\r\n $('.subscription-oop-option-only').length > 0\r\n );\r\n}\r\n\r\n/**\r\n * Get the right OTP/Subscription quantity selector\r\n * @return {string} - The quantity selector\r\n */\r\nfunction getCustomQuantitySelector() {\r\n return isSubscriptionSelected()\r\n ? '.quantity-select.subscription-quantity-selector'\r\n : '.quantity-select:not(.subscription-quantity-selector)';\r\n}\r\n\r\n/**\r\n * Retrieve contextual quantity selector\r\n * @param {jquery} $el - DOM container for the relevant quantity\r\n * @return {jquery} - quantity selector DOM container\r\n */\r\nfunction getQuantitySelector($el) {\r\n var quantitySelected;\r\n var quantitySelector = getCustomQuantitySelector();\r\n if ($el && $('.set-items').length) {\r\n quantitySelected = $($el).closest('.product-detail').find(quantitySelector);\r\n } else if ($el && $('.product-bundle').length) {\r\n var quantitySelectedModal = $($el).closest('.modal-footer').find('.quantity-select');\r\n var quantitySelectedPDP = $($el).closest('.bundle-footer').find('.quantity-select');\r\n if (quantitySelectedModal.val() === undefined) {\r\n quantitySelected = quantitySelectedPDP;\r\n } else {\r\n quantitySelected = quantitySelectedModal;\r\n }\r\n } else {\r\n quantitySelected = $(quantitySelector);\r\n }\r\n return quantitySelected;\r\n}\r\n\r\n/**\r\n * Retrieves the value associated with the Quantity pull-down menu\r\n * @param {jquery} $el - DOM container for the relevant quantity\r\n * @return {string} - value found in the quantity input\r\n */\r\nfunction getQuantitySelected($el) {\r\n return getQuantitySelector($el).val();\r\n}\r\n\r\n/**\r\n * Process the attribute values for an attribute that has image swatches\r\n *\r\n * @param {Object} attr - Attribute\r\n * @param {string} attr.id - Attribute ID\r\n * @param {Object[]} attr.values - Array of attribute value objects\r\n * @param {string} attr.values.value - Attribute coded value\r\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\r\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\r\n * selected. If there is no variant that corresponds to a specific combination of attribute\r\n * values, an attribute may be disabled in the Product Detail Page\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n * @param {Object} msgs - object containing resource messages\r\n */\r\nfunction processSwatchValues(attr, $productContainer, msgs) {\r\n attr.values.forEach(function (attrValue) {\r\n var $attrValue = $productContainer.find(`[data-attr=\"${attr.id}\"] [data-attr-value=\"${attrValue.value}\"]`);\r\n var $swatchButton = $attrValue.parent();\r\n\r\n if (attrValue.selected) {\r\n $attrValue.addClass('selected');\r\n $attrValue.siblings('.selected-assistive-text').text(msgs.assistiveSelectedText);\r\n } else {\r\n $attrValue.removeClass('selected');\r\n $attrValue.siblings('.selected-assistive-text').empty();\r\n }\r\n\r\n if (attrValue.url) {\r\n $swatchButton.attr('data-url', attrValue.url);\r\n } else {\r\n $swatchButton.removeAttr('data-url');\r\n }\r\n\r\n // Disable if not selectable\r\n $attrValue.removeClass('selectable unselectable');\r\n\r\n $attrValue.addClass(attrValue.selectable ? 'selectable' : 'unselectable');\r\n });\r\n}\r\n\r\n/**\r\n * Process attribute values associated with an attribute that does not have image swatches\r\n *\r\n * @param {Object} attr - Attribute\r\n * @param {string} attr.id - Attribute ID\r\n * @param {Object[]} attr.values - Array of attribute value objects\r\n * @param {string} attr.values.value - Attribute coded value\r\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\r\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\r\n * selected. If there is no variant that corresponds to a specific combination of attribute\r\n * values, an attribute may be disabled in the Product Detail Page\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n */\r\nfunction processNonSwatchValues(attr, $productContainer) {\r\n var $attr = `[data-attr=\"${attr.id}\"]`;\r\n var $defaultOption = $productContainer.find(`${$attr} .select-${attr.id} option:first`);\r\n $defaultOption.attr('value', attr.resetUrl);\r\n\r\n attr.values.forEach(function (attrValue) {\r\n var $attrValue = $productContainer.find(`${$attr} [data-attr-value=\"${attrValue.value}\"]`);\r\n $attrValue.attr('value', attrValue.url).removeAttr('disabled');\r\n\r\n if (!attrValue.selectable) {\r\n $attrValue.attr('disabled', true);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Routes the handling of attribute processing depending on whether the attribute has image\r\n * swatches or not\r\n *\r\n * @param {Object} attrs - Attribute\r\n * @param {string} attr.id - Attribute ID\r\n * @param {jQuery} $productContainer - DOM element for a given product\r\n * @param {Object} msgs - object containing resource messages\r\n */\r\nfunction updateAttrs(attrs, $productContainer, msgs) {\r\n // Currently, the only attribute type that has image swatches is Color.\r\n var attrsWithSwatches = ['color'];\r\n\r\n attrs.forEach(function (attr) {\r\n if (attrsWithSwatches.indexOf(attr.id) > -1) {\r\n processSwatchValues(attr, $productContainer, msgs);\r\n } else {\r\n processNonSwatchValues(attr, $productContainer);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Updates the availability status in the Product Detail Page\r\n *\r\n * @param {Object} response - Ajax response object after an\r\n * attribute value has been [de]selected\r\n * @param {jQuery} $productContainer - DOM element for a given product\r\n */\r\nfunction updateAvailability(response, $productContainer) {\r\n var availabilityValue = '';\r\n var availabilityMessages = response.product.availability.messages;\r\n if (!response.product.readyToOrder) {\r\n availabilityValue = `
  • ${response.resources.info_selectforstock}
  • `;\r\n } else {\r\n availabilityMessages.forEach(function (message) {\r\n availabilityValue += `
  • ${message}
  • `;\r\n });\r\n }\r\n\r\n $($productContainer).trigger('product:updateAvailability', {\r\n product: response.product,\r\n $productContainer,\r\n message: availabilityValue,\r\n resources: response.resources\r\n });\r\n}\r\n\r\n/**\r\n * Generates html for product attributes section\r\n *\r\n * @param {array} attributes - list of attributes\r\n * @return {string} - Compiled HTML\r\n */\r\nfunction getAttributesHtml(attributes) {\r\n if (!attributes) {\r\n return '';\r\n }\r\n\r\n var html = '';\r\n\r\n attributes.forEach(function (attributeGroup) {\r\n if (attributeGroup.ID === 'mainAttributes') {\r\n attributeGroup.attributes.forEach(function (attribute) {\r\n html += `
    ${attribute.label}: ${attribute.value}
    `;\r\n });\r\n }\r\n });\r\n\r\n return html;\r\n}\r\n\r\n/**\r\n * @typedef UpdatedOptionValue\r\n * @type Object\r\n * @property {string} id - Option value ID for look up\r\n * @property {string} url - Updated option value selection URL\r\n */\r\n\r\n/**\r\n * @typedef OptionSelectionResponse\r\n * @type Object\r\n * @property {string} priceHtml - Updated price HTML code\r\n * @property {Object} options - Updated Options\r\n * @property {string} options.id - Option ID\r\n * @property {UpdatedOptionValue[]} options.values - Option values\r\n */\r\n\r\n/**\r\n * Updates DOM using post-option selection Ajax response\r\n *\r\n * @param {OptionSelectionResponse} optionsHtml - Ajax response optionsHtml from selecting a product option\r\n * @param {jQuery} $productContainer - DOM element for current product\r\n */\r\nfunction updateOptions(optionsHtml, $productContainer) {\r\n // Update options\r\n $productContainer.find('.product-options').empty().html(optionsHtml);\r\n}\r\n\r\n/**\r\n * Dynamically creates Bootstrap carousel from response containing images\r\n * @param {Object[]} imgs - Array of large product images,along with related information\r\n * @param {jQuery} $productContainer - DOM element for a given product\r\n */\r\nfunction createCarousel(imgs, $productContainer) {\r\n var carousel = $productContainer.find('.carousel');\r\n $(carousel).carousel('dispose');\r\n var carouselId = $(carousel).attr('id');\r\n $(carousel)\r\n .empty()\r\n .append(\r\n '
      ${carousel.data('prev')}` +\r\n `` +\r\n `${carousel}`\r\n );\r\n for (var i = 0; i < imgs.length; i++) {\r\n $(\r\n `
      \"${\r\n
      `\r\n ).appendTo($(carousel).find('.carousel-inner'));\r\n $(`
    1. `).appendTo(\r\n $(carousel).find('.carousel-indicators')\r\n );\r\n }\r\n $($(carousel).find('.carousel-item')).first().addClass('active');\r\n $($(carousel).find('.carousel-indicators > li')).first().addClass('active');\r\n if (imgs.length === 1) {\r\n $($(carousel).find('.carousel-indicators, a[class^=\"carousel-control-\"]')).detach();\r\n }\r\n $(carousel).carousel();\r\n $($(carousel).find('.carousel-indicators')).attr('aria-hidden', true);\r\n}\r\n\r\n/**\r\n * Get current quantity already added to the cart for the current product and current purchase type\r\n * @param {number} qtyAlreadyInCart - Already added to the cart amount\r\n * @param {boolean} isProductInBasketSubscription - True if the product is added to the cart as a subscription\r\n * @param {boolean} isSubscription - True if the selected purchase type is subscription\r\n * @return {number} The quantity already added to the cart for the current purchase type and product\r\n */\r\nfunction getQtyInCartForPurchaseType(qtyAlreadyInCart, isProductInBasketSubscription, isSubscription) {\r\n var qtyInCart = 0;\r\n if (\r\n qtyAlreadyInCart &&\r\n ((isProductInBasketSubscription && isSubscription) || (!isProductInBasketSubscription && !isSubscription))\r\n ) {\r\n qtyInCart = qtyAlreadyInCart;\r\n }\r\n return qtyInCart;\r\n}\r\n\r\n/**\r\n * Parses JSON from Ajax call made whenever an attribute value is [de]selected\r\n * @param {Object} response - response from Ajax call\r\n * @param {Object} response.product - Product object\r\n * @param {string} response.product.id - Product ID\r\n * @param {Object[]} response.product.variationAttributes - Product attributes\r\n * @param {Object[]} response.product.images - Product images\r\n * @param {boolean} response.product.hasRequiredAttrsSelected - Flag as to whether all required\r\n * attributes have been selected. Used partially to\r\n * determine whether the Add to Cart button can be enabled\r\n * @param {jQuery} $productContainer - DOM element for a given product.\r\n * @param {boolean} updateImages - if true, the product images should be recreated\r\n */\r\nfunction handleVariantResponse(response, $productContainer, updateImages) {\r\n var isChoiceOfBonusProducts = $productContainer.parents('.choose-bonus-product-dialog').length > 0;\r\n var isVaraint;\r\n if (response.product.variationAttributes) {\r\n updateAttrs(response.product.variationAttributes, $productContainer, response.resources);\r\n isVaraint = response.product.productType === 'variant';\r\n if (isChoiceOfBonusProducts && isVaraint) {\r\n $productContainer.parent('.bonus-product-item').data('pid', response.product.id);\r\n\r\n $productContainer.parent('.bonus-product-item').data('ready-to-order', response.product.readyToOrder);\r\n }\r\n }\r\n\r\n if (updateImages) {\r\n // Update primary images\r\n var primaryImageUrls = response.product.images.large;\r\n createCarousel(primaryImageUrls, $productContainer);\r\n }\r\n\r\n // Update pricing\r\n if (!isChoiceOfBonusProducts) {\r\n var $totalPriceSelector = $('.product-total-price .price', $productContainer).length\r\n ? $('.product-total-price .price', $productContainer)\r\n : $('.product-total-price .price');\r\n $totalPriceSelector.replaceWith(response.totalPriceHtml);\r\n }\r\n\r\n // Update promotions\r\n $productContainer.find('.promotions').empty().html(response.product.promotionsHtml);\r\n\r\n updateAvailability(response, $productContainer);\r\n\r\n // Update attributes\r\n $productContainer.find('.main-attributes').empty().html(getAttributesHtml(response.product.attributes));\r\n}\r\n\r\n/**\r\n * Get all product quatities\r\n * @param {Object} product - The current product\r\n * @param {boolean} isSubscription - True if the selected purchase option is subscription\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n * @return {Object[]} The array of quantities to apply\r\n */\r\nfunction getAllQuantities(product, isSubscription, $productContainer) {\r\n if (isSubscription) {\r\n var selectedFrequency = $productContainer?.find('.product-schedule-select')?.val();\r\n if (selectedFrequency) {\r\n var possibleQuantities = product.subscriptionQuantities?.reduce((acc, val) => {\r\n if (acc.length === 0 && val.frequency === selectedFrequency) {\r\n return val.quantities;\r\n }\r\n return acc;\r\n }, []);\r\n return possibleQuantities?.length ? possibleQuantities : [];\r\n }\r\n }\r\n return product.quantities?.length ? product.quantities : [];\r\n}\r\n\r\n/**\r\n * Get all possible quantity options\r\n * @param {Object} product - The current product\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n * @param {boolean} isSubscription - True if subscription is the selected purchase type\r\n * @param {number} qtyInCart - The quantity already added to the cart for the current purchase type and product\r\n * @return {Object[]} The array of possible quantities to apply\r\n */\r\nfunction getQuantityOptions(product, $productContainer, isSubscription, qtyInCart) {\r\n var possibleQuantities = getAllQuantities(product, isSubscription, $productContainer);\r\n return possibleQuantities.reduce(function (acc, quantity, index) {\r\n // A quantity is only valid if, when whe suppress the quantity already in the cart, it still has a possitive\r\n // value. The last element will be always valid to ensure that we have at least 1 option in our select.\r\n if (parseInt(quantity.value, 10) - qtyInCart > 0 || index === possibleQuantities.length - 1) {\r\n acc.push(quantity);\r\n }\r\n return acc;\r\n }, []);\r\n}\r\n\r\n/**\r\n * Updates the quantity DOM elements post Ajax call\r\n * @param {Object} product - The current product\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n * @param {number} qtyAlreadyInCart - Already added to the cart amount\r\n * @param {boolean} isProductInBasketSubscription - True if the product is added to the cart as a subscription\r\n * @param {boolean} resetQuantity - If true, the product quantity selector is reset to the lowest quantity available\r\n * @param {boolean} disableCartForActiveSubs - True if the customer is already an active subscriber\r\n */\r\nfunction updateQuantities(\r\n product,\r\n $productContainer,\r\n qtyAlreadyInCart,\r\n isProductInBasketSubscription,\r\n disableCartForActiveSubs,\r\n resetQuantity\r\n) {\r\n if ($productContainer.parent('.bonus-product-item').length <= 0) {\r\n var isSubscription = isSubscriptionSelected();\r\n var qtyInCart = getQtyInCartForPurchaseType(qtyAlreadyInCart, isProductInBasketSubscription, isSubscription);\r\n var quantityOptions = getQuantityOptions(product, $productContainer, isSubscription, qtyInCart);\r\n var optionsHtml = quantityOptions\r\n .reduce(function (acc, quantity) {\r\n // The value we will use is the current option value's minus our quantity in the cart\r\n var currentValue =\r\n parseInt(quantity.value, 10) - qtyInCart > 0\r\n ? parseInt(quantity.value, 10) - qtyInCart\r\n : qtyInCart || 1;\r\n var selected =\r\n (resetQuantity && acc.length === 0) || (!resetQuantity && product.selectedQuantity) === currentValue\r\n ? ' selected '\r\n : '';\r\n // Adapt our url according to our final option value\r\n var currentUrl =\r\n qtyInCart > 0\r\n ? quantity.url.replace(/quantity=\\d+/g, `quantity=${currentValue.toString()}`)\r\n : quantity.url;\r\n acc.push(``);\r\n return acc;\r\n }, [])\r\n .join('');\r\n var quantitySelector = getQuantitySelector($productContainer);\r\n var previousValue = quantitySelector.val();\r\n quantitySelector.empty().html(optionsHtml);\r\n\r\n // Moved from handleVariantResponse, to take into account the quantity limitations when enabling/disabling\r\n // the add to cart button\r\n var isChoiceOfBonusProducts = $productContainer.parents('.choose-bonus-product-dialog').length > 0;\r\n if (isChoiceOfBonusProducts) {\r\n var $selectButton = $productContainer.find('.select-bonus-product');\r\n $selectButton.trigger('bonusproduct:updateSelectButton', { product, $productContainer });\r\n } else {\r\n var invalidQuantity = false;\r\n if (product && $productContainer) {\r\n // If the quantity added to the cart already equals the maximum amount, disable the add to cart button\r\n if (\r\n !quantityOptions?.length ||\r\n parseInt(quantityOptions[quantityOptions.length - 1].value, 10) <= qtyInCart\r\n ) {\r\n invalidQuantity = true;\r\n quantitySelector.trigger('product:showMaxError', qtyInCart);\r\n }\r\n var disableCartForSubs = disableCartForActiveSubs && isSubscription;\r\n // Enable \"Add to Cart\" button if all required attributes have been selected\r\n $('button.add-to-cart, button.add-to-cart-global, button.update-cart-product-global')\r\n .trigger('product:updateAddToCart', {\r\n product,\r\n $productContainer,\r\n invalidQuantity,\r\n disableCartForSubs\r\n })\r\n .trigger('product:statusUpdate', product);\r\n }\r\n }\r\n // End of code taken from handleVariantResponse function\r\n\r\n // If the new selected quantity is different, call Product-Variation again to update the total price\r\n if (previousValue !== quantitySelector.val()) {\r\n quantitySelector.trigger('change');\r\n } else {\r\n quantitySelector.trigger('product:updateQuantitySelectors');\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * updates the product view when a product attribute is selected or deselected or when\r\n * changing quantity\r\n * @param {string} selectedValueUrl - the Url for the selected variation value\r\n * @param {jQuery} $productContainer - DOM element for current product\r\n * @param {boolean} updateImages - if true, the product images should be recreated\r\n * @param {boolean} resetQuantity - if true, the product quantity selector is reset to the lowest quantity available\r\n */\r\nfunction attributeSelect(selectedValueUrl, $productContainer, updateImages = true, resetQuantity) {\r\n if (selectedValueUrl) {\r\n $('body').trigger('product:beforeAttributeSelect', { url: selectedValueUrl, container: $productContainer });\r\n var params = {\r\n issubscription:\r\n $(\"input[name='purchaseType']:checked\").val() === 'subscription' ||\r\n $('.subscription-oop-option-only').length > 0\r\n };\r\n $.ajax({\r\n url: selectedValueUrl,\r\n method: 'GET',\r\n data: params,\r\n success(data) {\r\n handleVariantResponse(data, $productContainer, updateImages);\r\n updateOptions(data.product.optionsHtml, $productContainer);\r\n updateQuantities(\r\n data.product,\r\n $productContainer,\r\n data.qtyAlreadyInCart,\r\n data.isProductInBasketSubscription,\r\n data.disableCartForActiveSubs,\r\n resetQuantity\r\n );\r\n $('body').trigger('product:afterAttributeSelect', { data, container: $productContainer });\r\n $.spinner().stop();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Retrieves url to use when adding a product to the cart\r\n *\r\n * @return {string} - The provided URL to use when adding a product to the cart\r\n */\r\nfunction getAddToCartUrl() {\r\n return $('.add-to-cart-url').val();\r\n}\r\n\r\n/**\r\n * Parses the html for a modal window\r\n * @param {string} html - representing the body and footer of the modal window\r\n *\r\n * @return {Object} - Object with properties body and footer.\r\n */\r\nfunction parseHtml(html) {\r\n var $html = $('
      ').append($.parseHTML(html));\r\n\r\n var body = $html.find('.choice-of-bonus-product');\r\n var footer = $html.find('.modal-footer').children();\r\n\r\n return { body, footer };\r\n}\r\n\r\n/**\r\n * Retrieves url to use when adding a product to the cart\r\n *\r\n * @param {Object} data - data object used to fill in dynamic portions of the html\r\n */\r\nfunction chooseBonusProducts(data) {\r\n $('.modal-body').spinner().start();\r\n\r\n if ($('#chooseBonusProductModal').length !== 0) {\r\n $('#chooseBonusProductModal').remove();\r\n }\r\n var bonusUrl;\r\n if (data.bonusChoiceRuleBased) {\r\n bonusUrl = data.showProductsUrlRuleBased;\r\n } else {\r\n bonusUrl = data.showProductsUrlListBased;\r\n }\r\n\r\n var htmlString =\r\n '' +\r\n '
      ' +\r\n '' +\r\n '
      ` +\r\n '' +\r\n '
      ' +\r\n '
      ' +\r\n ` ${data.labels.selectprods}` +\r\n ' ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ';\r\n $('body').append(htmlString);\r\n $('.modal-body').spinner().start();\r\n\r\n $.ajax({\r\n url: bonusUrl,\r\n method: 'GET',\r\n dataType: 'json',\r\n success(response) {\r\n var parsedHtml = parseHtml(response.renderedTemplate);\r\n $('#chooseBonusProductModal .modal-body').empty();\r\n $('#chooseBonusProductModal .enter-message').text(response.enterDialogMessage);\r\n $('#chooseBonusProductModal .modal-header .close .sr-only').text(response.closeButtonText);\r\n $('#chooseBonusProductModal .modal-body').html(parsedHtml.body);\r\n $('#chooseBonusProductModal .modal-footer').html(parsedHtml.footer);\r\n $('#chooseBonusProductModal').modal('show');\r\n $.spinner().stop();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Updates the Mini-Cart quantity value after the customer has pressed the \"Add to Cart\" button\r\n * @param {string} response - ajax response from clicking the add to cart button\r\n */\r\nfunction handlePostCartAdd(response) {\r\n $('.minicart').trigger('count:update', response);\r\n var messageType = response.error ? 'alert-danger' : 'alert-success';\r\n // show add to cart toast\r\n if (response.newBonusDiscountLineItem && Object.keys(response.newBonusDiscountLineItem).length !== 0) {\r\n chooseBonusProducts(response.newBonusDiscountLineItem);\r\n } else if (response.modalData && Object.keys(response.modalData).length > 0) {\r\n modalHelper.renderGenericCtaModal(\r\n response.modalData.title,\r\n response.modalData.msg,\r\n // First button controls\r\n response.modalData.btnText,\r\n response.modalData.btnAction,\r\n response.modalData.btnType,\r\n response.modalData.openInNewTab,\r\n // Secondary button controls\r\n response.modalData.secondaryBtnText,\r\n response.modalData.secondaryBtnAction,\r\n response.modalData.secondaryBtnType,\r\n response.modalData.secondaryBtnOpenInNewTab\r\n );\r\n } else {\r\n if ($('.add-to-cart-messages').length === 0) {\r\n $('body').append('
      ');\r\n }\r\n\r\n $('.add-to-cart-messages').append(\r\n `
      ${response.message}
      `\r\n );\r\n if (messageType === 'alert-danger') {\r\n setTimeout(function () {\r\n $('.add-to-basket-alert').remove();\r\n }, 8000);\r\n } else {\r\n setTimeout(function () {\r\n $('.add-to-basket-alert').remove();\r\n }, 5000);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Retrieves the bundle product item ID's for the Controller to replace bundle master product\r\n * items with their selected variants\r\n *\r\n * @return {string[]} - List of selected bundle product item ID's\r\n */\r\nfunction getChildProducts() {\r\n var childProducts = [];\r\n $('.bundle-item').each(function () {\r\n childProducts.push({\r\n pid: $(this).find('.product-id').text(),\r\n quantity: parseInt($(this).find('label.quantity').data('quantity'), 10)\r\n });\r\n });\r\n\r\n return childProducts.length ? JSON.stringify(childProducts) : [];\r\n}\r\n\r\n/**\r\n * Retrieve product options\r\n *\r\n * @param {jQuery} $productContainer - DOM element for current product\r\n * @return {string} - Product options and their selected values\r\n */\r\nfunction getOptions($productContainer) {\r\n var options = $productContainer\r\n .find('.product-option')\r\n .map(function () {\r\n var $elOption = $(this).find('.options-select');\r\n var urlValue = $elOption.val();\r\n var selectedValueId = $elOption.find(`option[value=\"${urlValue}\"]`).data('value-id');\r\n return { optionId: $(this).data('option-id'), selectedValueId };\r\n })\r\n .toArray();\r\n\r\n return JSON.stringify(options);\r\n}\r\n\r\n/**\r\n * Makes a call to the server to report the event of adding an item to the cart\r\n *\r\n * @param {string | boolean} url - a string representing the end point to hit so that the event can be recorded or false\r\n */\r\nfunction miniCartReportingUrl(url) {\r\n if (url) {\r\n $.ajax({\r\n url,\r\n method: 'GET',\r\n success() {\r\n // reporting urls hit on the server\r\n },\r\n error() {\r\n // no reporting urls hit on the server\r\n }\r\n });\r\n }\r\n}\r\n\r\nmodule.exports = {\r\n attributeSelect,\r\n methods: {\r\n editBonusProducts(data) {\r\n chooseBonusProducts(data);\r\n }\r\n },\r\n\r\n focusChooseBonusProductModal() {\r\n $('body').on('shown.bs.modal', '#chooseBonusProductModal', function () {\r\n $('#chooseBonusProductModal').siblings().attr('aria-hidden', 'true');\r\n $('#chooseBonusProductModal .close').focus();\r\n });\r\n },\r\n\r\n onClosingChooseBonusProductModal() {\r\n $('body').on('hidden.bs.modal', '#chooseBonusProductModal', function () {\r\n $('#chooseBonusProductModal').siblings().attr('aria-hidden', 'false');\r\n });\r\n },\r\n\r\n trapChooseBonusProductModalFocus() {\r\n $('body').on('keydown', '#chooseBonusProductModal', function (e) {\r\n var focusParams = {\r\n event: e,\r\n containerSelector: '#chooseBonusProductModal',\r\n firstElementSelector: '.close',\r\n lastElementSelector: '.add-bonus-products'\r\n };\r\n focusHelper.setTabNextFocus(focusParams);\r\n });\r\n },\r\n\r\n colorAttribute() {\r\n $(document).on('click', '[data-attr=\"color\"] button', function (e) {\r\n e.preventDefault();\r\n\r\n if ($(this).attr('disabled')) {\r\n return;\r\n }\r\n var $productContainer = $(this).closest('.set-item');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.product-detail');\r\n }\r\n\r\n attributeSelect($(this).attr('data-url'), $productContainer);\r\n });\r\n },\r\n\r\n selectAttribute() {\r\n $(document).on('change', 'select[class*=\"select-\"], .options-select', function (e) {\r\n e.preventDefault();\r\n\r\n var $productContainer = $(this).closest('.set-item');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.product-detail');\r\n }\r\n attributeSelect(e.currentTarget.value, $productContainer);\r\n });\r\n },\r\n\r\n availability() {\r\n $(document).on('change', '.quantity-select', function (e) {\r\n e.preventDefault();\r\n\r\n var $productContainer = $(this).closest('.product-detail');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.modal-content').find('.product-quickview');\r\n }\r\n\r\n if ($('.bundle-items', $productContainer).length === 0) {\r\n // Avoid recreating the image carousel by passing false as the 'updateImages' param value,\r\n // as changing the product quantity doen't affect them\r\n attributeSelect($(e.currentTarget).find('option:selected').data('url'), $productContainer, false);\r\n }\r\n });\r\n // Ensure our quantity selector's status is the right one after adding a product to the cart,\r\n // removing one, updating the quantity...\r\n $('body').on('cart:update product:afterAddToCart', function (e) {\r\n var $productContainer = $(this).find('.product-detail');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.modal-content').find('.product-quickview');\r\n }\r\n\r\n if ($('.bundle-items', $productContainer).length === 0) {\r\n var selectedQuantityUrl;\r\n if (\r\n $(\"input[name='purchaseType']:checked\").val() === 'subscription' ||\r\n $('.subscription-oop-option-only').length > 0\r\n ) {\r\n selectedQuantityUrl = $(e.currentTarget)\r\n .find('.custom-quantity-selector__select.subscription-quantity-selector option:selected')\r\n .data('url');\r\n } else {\r\n selectedQuantityUrl = $(e.currentTarget)\r\n .find('.custom-quantity-selector__select:not(.subscription-quantity-selector) option:selected')\r\n .data('url');\r\n }\r\n // Avoid recreating the image carousel by passing false as the 'updateImages' param value,\r\n // as changing the product quantity doen't affect them\r\n attributeSelect(selectedQuantityUrl, $productContainer, false, true);\r\n }\r\n });\r\n },\r\n\r\n addToCart() {\r\n $(document).on('click', 'button.add-to-cart, button.add-to-cart-global', function () {\r\n var addToCartUrl;\r\n var pid;\r\n var pidsObj;\r\n var setPids;\r\n\r\n $('body').trigger('product:beforeAddToCart', this);\r\n\r\n if ($('.set-items').length && $(this).hasClass('add-to-cart-global')) {\r\n setPids = [];\r\n\r\n $('.product-detail').each(function () {\r\n if (!$(this).hasClass('product-set-detail')) {\r\n var quantitySelector = getCustomQuantitySelector();\r\n setPids.push({\r\n pid: $(this).find('.product-id').text(),\r\n qty: $(this).find(quantitySelector).val(),\r\n options: getOptions($(this))\r\n });\r\n }\r\n });\r\n pidsObj = JSON.stringify(setPids);\r\n }\r\n\r\n pid = getPidValue($(this));\r\n\r\n var $productContainer = $(this).closest('.product-detail');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.quick-view-dialog').find('.product-detail');\r\n }\r\n\r\n addToCartUrl = getAddToCartUrl();\r\n\r\n var form = {\r\n pid,\r\n pidsObj,\r\n childProducts: getChildProducts(),\r\n quantity: getQuantitySelected($(this)),\r\n trainingDone: $('.product-detail').attr('training-done'),\r\n // Check if we have the banner for completing a prescription order (valid prescription)\r\n prescriptionValid: !!$('.prescription-complete').length, // TODO: pick this INFO from API response\r\n // True if the clicked button is the one from the pop up that confirms the add to cart\r\n confirmAddToCart: $(this).hasClass('cta-modal-action')\r\n };\r\n\r\n if (!$('.bundle-item').length) {\r\n form.options = getOptions($productContainer);\r\n }\r\n\r\n $(this).trigger('updateAddToCartFormData', form);\r\n if (addToCartUrl) {\r\n $.ajax({\r\n url: addToCartUrl,\r\n method: 'POST',\r\n data: form,\r\n success(data) {\r\n handlePostCartAdd(data);\r\n $('body').trigger('product:afterAddToCart', data);\r\n $.spinner().stop();\r\n miniCartReportingUrl(data.reportingURL);\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n }\r\n });\r\n },\r\n selectBonusProduct() {\r\n $(document).on('click', '.select-bonus-product', function () {\r\n var $choiceOfBonusProduct = $(this).parents('.choice-of-bonus-product');\r\n var pid = $(this).data('pid');\r\n var maxPids = $('.choose-bonus-product-dialog').data('total-qty');\r\n var submittedQty = parseInt($choiceOfBonusProduct.find('.bonus-quantity-select').val(), 10);\r\n var totalQty = 0;\r\n $.each($('#chooseBonusProductModal .selected-bonus-products .selected-pid'), function () {\r\n totalQty += $(this).data('qty');\r\n });\r\n totalQty += submittedQty;\r\n var optionID = $choiceOfBonusProduct.find('.product-option').data('option-id');\r\n var valueId = $choiceOfBonusProduct.find('.options-select option:selected').data('valueId');\r\n if (totalQty <= maxPids) {\r\n var selectedBonusProductHtml =\r\n '' +\r\n '
      ' +\r\n `
      ${$choiceOfBonusProduct\r\n .find('.product-name')\r\n .html()}
      ` +\r\n '
      ' +\r\n '
      ';\r\n $('#chooseBonusProductModal .selected-bonus-products').append(selectedBonusProductHtml);\r\n $('.pre-cart-products').html(totalQty);\r\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\r\n } else {\r\n $('.selected-bonus-products .bonus-summary').addClass('alert-danger');\r\n }\r\n });\r\n },\r\n removeBonusProduct() {\r\n $(document).on('click', '.selected-pid', function () {\r\n $(this).remove();\r\n var $selected = $('#chooseBonusProductModal .selected-bonus-products .selected-pid');\r\n var count = 0;\r\n if ($selected.length) {\r\n $selected.each(function () {\r\n count += parseInt($(this).data('qty'), 10);\r\n });\r\n }\r\n\r\n $('.pre-cart-products').html(count);\r\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\r\n });\r\n },\r\n enableBonusProductSelection() {\r\n $('body').on('bonusproduct:updateSelectButton', function (e, response) {\r\n $('button.select-bonus-product', response.$productContainer).attr(\r\n 'disabled',\r\n !response.product.readyToOrder || !response.product.available\r\n );\r\n var pid = response.product.id;\r\n $('button.select-bonus-product', response.$productContainer).data('pid', pid);\r\n });\r\n },\r\n showMoreBonusProducts() {\r\n $(document).on('click', '.show-more-bonus-products', function () {\r\n var url = $(this).data('url');\r\n $('.modal-content').spinner().start();\r\n $.ajax({\r\n url,\r\n method: 'GET',\r\n success(html) {\r\n var parsedHtml = parseHtml(html);\r\n $('.modal-body').append(parsedHtml.body);\r\n $('.show-more-bonus-products:first').remove();\r\n $('.modal-content').spinner().stop();\r\n },\r\n error() {\r\n $('.modal-content').spinner().stop();\r\n }\r\n });\r\n });\r\n },\r\n addBonusProductsToCart() {\r\n $(document).on('click', '.add-bonus-products', function () {\r\n var $readyToOrderBonusProducts = $('.choose-bonus-product-dialog .selected-pid');\r\n var queryString = '?pids=';\r\n var url = $('.choose-bonus-product-dialog').data('addtocarturl');\r\n var pidsObject = { bonusProducts: [] };\r\n\r\n $.each($readyToOrderBonusProducts, function () {\r\n var qtyOption = parseInt($(this).data('qty'), 10);\r\n\r\n var option = null;\r\n if (qtyOption > 0) {\r\n if ($(this).data('optionid') && $(this).data('option-selected-value')) {\r\n option = {};\r\n option.optionId = $(this).data('optionid');\r\n option.productId = $(this).data('pid');\r\n option.selectedValueId = $(this).data('option-selected-value');\r\n }\r\n pidsObject.bonusProducts.push({ pid: $(this).data('pid'), qty: qtyOption, options: [option] });\r\n pidsObject.totalQty = parseInt($('.pre-cart-products').html(), 10);\r\n }\r\n });\r\n queryString += JSON.stringify(pidsObject);\r\n queryString = `${queryString}&uuid=${$('.choose-bonus-product-dialog').data('uuid')}`;\r\n queryString = `${queryString}&pliuuid=${$('.choose-bonus-product-dialog').data('pliuuid')}`;\r\n $.spinner().start();\r\n $.ajax({\r\n url: url + queryString,\r\n method: 'POST',\r\n success(data) {\r\n $.spinner().stop();\r\n if (data.error) {\r\n $('#chooseBonusProductModal').modal('hide');\r\n if ($('.add-to-cart-messages').length === 0) {\r\n $('body').append('
      ');\r\n }\r\n $('.add-to-cart-messages').append(\r\n '
      ${data.errorMessage}
      `\r\n );\r\n setTimeout(function () {\r\n $('.add-to-basket-alert').remove();\r\n }, 3000);\r\n } else {\r\n $('.configure-bonus-product-attributes').html(data);\r\n $('.bonus-products-step2').removeClass('hidden-xl-down');\r\n $('#chooseBonusProductModal').modal('hide');\r\n\r\n if ($('.add-to-cart-messages').length === 0) {\r\n $('body').append('
      ');\r\n }\r\n $('.minicart-quantity').html(data.totalQty);\r\n $('.add-to-cart-messages').append(\r\n '
      ${data.msgSuccess}
      `\r\n );\r\n setTimeout(function () {\r\n $('.add-to-basket-alert').remove();\r\n if ($('.cart-page').length) {\r\n location.reload();\r\n }\r\n }, 1500);\r\n }\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n });\r\n },\r\n getPidValue,\r\n getQuantitySelected,\r\n miniCartReportingUrl,\r\n getQuantitySelector\r\n};\r\n","'use strict';\r\n\r\nvar focusHelper = require('base/components/focus');\r\nvar base = require('./base');\r\n\r\n/**\r\n * Generates the modal window on the first call.\r\n *\r\n */\r\nfunction getModalHtmlElement() {\r\n if ($('#quickViewModal').length !== 0) {\r\n $('#quickViewModal').remove();\r\n }\r\n var htmlString =\r\n '' +\r\n '
      ' +\r\n '' +\r\n '
      ' +\r\n '' +\r\n '
      ' +\r\n '
      ' +\r\n ' ' +\r\n ' ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ';\r\n $('body').append(htmlString);\r\n}\r\n\r\n/**\r\n * @typedef {Object} QuickViewHtml\r\n * @property {string} body - Main Quick View body\r\n * @property {string} footer - Quick View footer content\r\n */\r\n\r\n/**\r\n * Parse HTML code in Ajax response\r\n *\r\n * @param {string} html - Rendered HTML from quickview template\r\n * @return {QuickViewHtml} - QuickView content components\r\n */\r\nfunction parseHtml(html) {\r\n var $html = $('
      ').append($.parseHTML(html));\r\n\r\n var body = $html.find('.product-quickview');\r\n var footer = $html.find('.modal-footer').children();\r\n\r\n return { body, footer };\r\n}\r\n\r\n/**\r\n * replaces the content in the modal window on for the selected product variation.\r\n * @param {string} selectedValueUrl - url to be used to retrieve a new product model\r\n */\r\nfunction fillModalElement(selectedValueUrl) {\r\n $('.modal-body').spinner().start();\r\n $.ajax({\r\n url: selectedValueUrl,\r\n method: 'GET',\r\n dataType: 'json',\r\n success(data) {\r\n var parsedHtml = parseHtml(data.renderedTemplate);\r\n\r\n $('.modal-body').empty();\r\n $('.modal-body').html(parsedHtml.body);\r\n $('.modal-footer').html(parsedHtml.footer);\r\n $('.full-pdp-link').text(data.quickViewFullDetailMsg);\r\n $('#quickViewModal .full-pdp-link').attr('href', data.productUrl);\r\n $('#quickViewModal .size-chart').attr('href', data.productUrl);\r\n $('#quickViewModal .modal-header .close .sr-only').text(data.closeButtonText);\r\n $('#quickViewModal .enter-message').text(data.enterDialogMessage);\r\n $('#quickViewModal').modal('show');\r\n $('body').trigger('quickview:ready');\r\n\r\n $.spinner().stop();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n}\r\n\r\nmodule.exports = {\r\n showQuickview() {\r\n $('body').on('click', '.quickview', function (e) {\r\n e.preventDefault();\r\n var selectedValueUrl = $(this).closest('a.quickview').attr('href');\r\n $(e.target).trigger('quickview:show');\r\n getModalHtmlElement();\r\n fillModalElement(selectedValueUrl);\r\n });\r\n },\r\n focusQuickview() {\r\n $('body').on('shown.bs.modal', '#quickViewModal', function () {\r\n $('#quickViewModal .close').focus();\r\n });\r\n },\r\n trapQuickviewFocus() {\r\n $('body').on('keydown', '#quickViewModal', function (e) {\r\n var focusParams = {\r\n event: e,\r\n containerSelector: '#quickViewModal',\r\n firstElementSelector: '.full-pdp-link',\r\n lastElementSelector: '.add-to-cart-global',\r\n nextToLastElementSelector: '.modal-footer .quantity-select'\r\n };\r\n focusHelper.setTabNextFocus(focusParams);\r\n });\r\n },\r\n availability: base.availability,\r\n addToCart: base.addToCart,\r\n showSpinner() {\r\n $('body').on('product:beforeAddToCart', function (e, data) {\r\n $(data).closest('.modal-content').spinner().start();\r\n });\r\n },\r\n hideDialog() {\r\n $('body').on('product:afterAddToCart', function () {\r\n $('#quickViewModal').modal('hide');\r\n });\r\n },\r\n beforeUpdateAttribute() {\r\n $('body').on('product:beforeAttributeSelect', function () {\r\n $('.modal.show .modal-content').spinner().start();\r\n });\r\n },\r\n updateAttribute() {\r\n $('body').on('product:afterAttributeSelect', function (e, response) {\r\n if ($('.modal.show .product-quickview>.bundle-items').length) {\r\n $('.modal.show').find(response.container).data('pid', response.data.product.id);\r\n $('.modal.show').find(response.container).find('.product-id').text(response.data.product.id);\r\n } else if ($('.set-items').length) {\r\n response.container.find('.product-id').text(response.data.product.id);\r\n } else {\r\n $('.modal.show .product-quickview').data('pid', response.data.product.id);\r\n $('.modal.show .full-pdp-link').attr('href', response.data.product.selectedProductUrl);\r\n }\r\n });\r\n },\r\n updateAddToCart() {\r\n $('body').on('product:updateAddToCart', function (e, response) {\r\n // update local add to cart (for sets)\r\n $('button.add-to-cart', response.$productContainer).attr(\r\n 'disabled',\r\n !response.product.readyToOrder || !response.product.available || response.invalidQuantity\r\n );\r\n\r\n // update global add to cart (single products, bundles)\r\n var dialog = $(response.$productContainer).closest('.quick-view-dialog');\r\n\r\n $('.add-to-cart-global', dialog).attr(\r\n 'disabled',\r\n !$('.global-availability', dialog).data('ready-to-order') ||\r\n !$('.global-availability', dialog).data('available')\r\n );\r\n });\r\n },\r\n updateAvailability() {\r\n $('body').on('product:updateAvailability', function (e, response) {\r\n // bundle individual products\r\n $('.product-availability', response.$productContainer)\r\n .data('ready-to-order', response.product.readyToOrder)\r\n .data('available', response.product.available)\r\n .find('.availability-msg')\r\n .empty()\r\n .html(response.message);\r\n\r\n var dialog = $(response.$productContainer).closest('.quick-view-dialog');\r\n\r\n if ($('.product-availability', dialog).length) {\r\n // bundle all products\r\n var allAvailable = $('.product-availability', dialog)\r\n .toArray()\r\n .every(function (item) {\r\n return $(item).data('available');\r\n });\r\n\r\n var allReady = $('.product-availability', dialog)\r\n .toArray()\r\n .every(function (item) {\r\n return $(item).data('ready-to-order');\r\n });\r\n\r\n $('.global-availability', dialog).data('ready-to-order', allReady).data('available', allAvailable);\r\n\r\n $('.global-availability .availability-msg', dialog)\r\n .empty()\r\n .html(allReady ? response.message : response.resources.info_selectforstock);\r\n } else {\r\n // single product\r\n $('.global-availability', dialog)\r\n .data('ready-to-order', response.product.readyToOrder)\r\n .data('available', response.product.available)\r\n .find('.availability-msg')\r\n .empty()\r\n .html(response.message);\r\n }\r\n });\r\n }\r\n};\r\n","'use strict';\r\n\r\n/**\r\n * Update DOM elements with Ajax results\r\n *\r\n * @param {Object} $results - jQuery DOM element\r\n * @param {string} selector - DOM element to look up in the $results\r\n * @return {undefined}\r\n */\r\nfunction updateDom($results, selector) {\r\n var $updates = $results.find(selector);\r\n $(selector).empty().html($updates.html());\r\n}\r\n\r\n/**\r\n * Keep refinement panes expanded/collapsed after Ajax refresh\r\n *\r\n * @param {Object} $results - jQuery DOM element\r\n * @return {undefined}\r\n */\r\nfunction handleRefinements($results) {\r\n $('.refinement.active').each(function () {\r\n $(this).removeClass('active');\r\n var activeDiv = $results.find(`.${$(this)[0].className.replace(/ /g, '.')}`);\r\n activeDiv.addClass('active');\r\n activeDiv.find('button.title').attr('aria-expanded', 'true');\r\n });\r\n\r\n updateDom($results, '.refinements');\r\n}\r\n\r\n/**\r\n * Parse Ajax results and updated select DOM elements\r\n *\r\n * @param {string} response - Ajax response HTML code\r\n * @return {undefined}\r\n */\r\nfunction parseResults(response) {\r\n var $results = $(response);\r\n var specialHandlers = {\r\n '.refinements': handleRefinements\r\n };\r\n\r\n // Update DOM elements that do not require special handling\r\n ['.grid-header', '.header-bar', '.header.page-title', '.product-grid', '.show-more', '.filter-bar'].forEach(\r\n function (selector) {\r\n updateDom($results, selector);\r\n }\r\n );\r\n\r\n Object.keys(specialHandlers).forEach(function (selector) {\r\n specialHandlers[selector]($results);\r\n });\r\n}\r\n\r\n/**\r\n * This function retrieves another page of content to display in the content search grid\r\n * @param {JQuery} $element - the jquery element that has the click event attached\r\n * @param {JQuery} $target - the jquery element that will receive the response\r\n * @return {undefined}\r\n */\r\nfunction getContent($element, $target) {\r\n var showMoreUrl = $element.data('url');\r\n $.spinner().start();\r\n $.ajax({\r\n url: showMoreUrl,\r\n method: 'GET',\r\n success(response) {\r\n $target.append(response);\r\n $.spinner().stop();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Update sort option URLs from Ajax response\r\n *\r\n * @param {string} response - Ajax response HTML code\r\n * @return {undefined}\r\n */\r\nfunction updateSortOptions(response) {\r\n var $tempDom = $('
      ').append($(response));\r\n var sortOptions = $tempDom.find('.grid-footer').data('sort-options').options;\r\n sortOptions.forEach(function (option) {\r\n $(`option.${option.id}`).val(option.url);\r\n });\r\n}\r\n\r\nmodule.exports = {\r\n filter() {\r\n // Display refinements bar when Menu icon clicked\r\n $('.container').on('click', 'button.filter-results', function () {\r\n $('.refinement-bar, .modal-background').show();\r\n $('.refinement-bar').siblings().attr('aria-hidden', true);\r\n $('.refinement-bar').closest('.row').siblings().attr('aria-hidden', true);\r\n $('.refinement-bar').closest('.tab-pane.active').siblings().attr('aria-hidden', true);\r\n $('.refinement-bar').closest('.container.search-results').siblings().attr('aria-hidden', true);\r\n $('.refinement-bar .close').focus();\r\n });\r\n },\r\n\r\n closeRefinements() {\r\n // Refinements close button\r\n $('body').on('click', '.refinement-bar button.close-filter, .modal-background', function () {\r\n $('.refinement-bar, .modal-background').hide();\r\n $('.refinement-bar').siblings().attr('aria-hidden', false);\r\n $('.refinement-bar').closest('.row').siblings().attr('aria-hidden', false);\r\n $('.refinement-bar').closest('.tab-pane.active').siblings().attr('aria-hidden', false);\r\n $('.refinement-bar').closest('.container.search-results').siblings().attr('aria-hidden', false);\r\n $('.btn.filter-results').focus();\r\n });\r\n },\r\n\r\n sort() {\r\n // Handle sort order menu selection\r\n $('.container').on('change', '[name=sort-order]', function (e) {\r\n e.preventDefault();\r\n\r\n $.spinner().start();\r\n $(this).trigger('search:sort', this.value);\r\n $.ajax({\r\n url: this.value,\r\n data: { selectedUrl: this.value },\r\n method: 'GET',\r\n success(response) {\r\n $('.product-grid').empty().html(response);\r\n $.spinner().stop();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n });\r\n },\r\n\r\n showMore() {\r\n // Show more products\r\n $('.container').on('click', '.show-more button', function (e) {\r\n e.stopPropagation();\r\n var showMoreUrl = $(this).data('url');\r\n e.preventDefault();\r\n\r\n $.spinner().start();\r\n $(this).trigger('search:showMore', e);\r\n $.ajax({\r\n url: showMoreUrl,\r\n data: { selectedUrl: showMoreUrl },\r\n method: 'GET',\r\n success(response) {\r\n $('.grid-footer').replaceWith(response);\r\n updateSortOptions(response);\r\n $.spinner().stop();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n });\r\n },\r\n\r\n applyFilter() {\r\n // Handle refinement value selection and reset click\r\n $('.container').on(\r\n 'click',\r\n '.refinements li button, .refinement-bar button.reset, .filter-value button, .swatch-filter button',\r\n function (e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n if ($(this).data('href')) {\r\n $.spinner().start();\r\n $(this).trigger('search:filter', e);\r\n var attributeId = `#${$(this).find('span').last().attr('id')}`;\r\n $.ajax({\r\n url: $(this).data('href'),\r\n data: {\r\n page: $('.grid-footer').data('page-number'),\r\n selectedUrl: $(this).data('href')\r\n },\r\n method: 'GET',\r\n success(response) {\r\n parseResults(response);\r\n $.spinner().stop();\r\n $(attributeId).parent('button').focus();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n $(attributeId).parent('button').focus();\r\n }\r\n });\r\n }\r\n }\r\n );\r\n },\r\n\r\n showContentTab() {\r\n // Display content results from the search\r\n $('.container').on('click', '.content-search', function () {\r\n if ($('#content-search-results').html() === '') {\r\n getContent($(this), $('#content-search-results'));\r\n }\r\n });\r\n\r\n // Display the next page of content results from the search\r\n $('.container').on('click', '.show-more-content button', function () {\r\n getContent($(this), $('#content-search-results'));\r\n $('.show-more-content').remove();\r\n });\r\n }\r\n};\r\n","'use strict';\r\n\r\nmodule.exports = {\r\n setTabNextFocus: function (focusParams) {\r\n var KEYCODE_TAB = 9;\r\n var isTabPressed = (focusParams.event.key === 'Tab' || focusParams.event.keyCode === KEYCODE_TAB);\r\n\r\n if (!isTabPressed) {\r\n return;\r\n }\r\n\r\n var firstFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.firstElementSelector);\r\n var lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.lastElementSelector);\r\n\r\n if ($(focusParams.containerSelector + ' ' + focusParams.lastElementSelector).is(':disabled')) {\r\n lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.nextToLastElementSelector);\r\n if ($('.product-quickview.product-set').length > 0) {\r\n var linkElements = $(focusParams.containerSelector + ' a#fa-link.share-icons');\r\n lastFocusableEl = linkElements[linkElements.length - 1];\r\n }\r\n }\r\n\r\n if (focusParams.event.shiftKey) /* shift + tab */ {\r\n if ($(':focus').is(firstFocusableEl)) {\r\n lastFocusableEl.focus();\r\n focusParams.event.preventDefault();\r\n }\r\n } else /* tab */ {\r\n if ($(':focus').is(lastFocusableEl)) { // eslint-disable-line\r\n firstFocusableEl.focus();\r\n focusParams.event.preventDefault();\r\n }\r\n }\r\n }\r\n};\r\n","'use strict';\r\n\r\nmodule.exports = function (include) {\r\n if (typeof include === 'function') {\r\n include();\r\n } else if (typeof include === 'object') {\r\n Object.keys(include).forEach(function (key) {\r\n if (typeof include[key] === 'function') {\r\n include[key]();\r\n }\r\n });\r\n }\r\n};\r\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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","'use strict';\r\n\r\nvar processInclude = require('base/util');\r\n\r\n$(document).ready(function () {\r\n processInclude(require('./search/search'));\r\n processInclude(require('./product/quickView'));\r\n});\r\n"],"names":["renderGenericCtaModal","title","msg","btnText","btnAction","btnType","openInNewTab","secondaryBtnText","secondaryBtnAction","secondaryBtnType","secondaryBtnOpenInNewTab","$","remove","modalHtml","concat","append","removeClass","modal","module","exports","focusHelper","require","modalHelper","getPidValue","$el","pid","hasClass","length","closest","find","data","text","isSubscriptionSelected","val","getCustomQuantitySelector","getQuantitySelector","quantitySelected","quantitySelector","quantitySelectedModal","quantitySelectedPDP","undefined","getQuantitySelected","processSwatchValues","attr","$productContainer","msgs","values","forEach","attrValue","$attrValue","id","value","$swatchButton","parent","selected","addClass","siblings","assistiveSelectedText","empty","url","removeAttr","selectable","processNonSwatchValues","$attr","$defaultOption","resetUrl","updateAttrs","attrs","attrsWithSwatches","indexOf","updateAvailability","response","availabilityValue","availabilityMessages","product","availability","messages","readyToOrder","resources","info_selectforstock","message","trigger","getAttributesHtml","attributes","html","attributeGroup","ID","attribute","label","updateOptions","optionsHtml","createCarousel","imgs","carousel","carouselId","i","alt","parseInt","index","appendTo","first","detach","getQtyInCartForPurchaseType","qtyAlreadyInCart","isProductInBasketSubscription","isSubscription","qtyInCart","handleVariantResponse","updateImages","isChoiceOfBonusProducts","parents","isVaraint","variationAttributes","productType","primaryImageUrls","images","large","$totalPriceSelector","replaceWith","totalPriceHtml","promotionsHtml","getAllQuantities","_product$quantities","_$productContainer$fi","selectedFrequency","_product$subscription","possibleQuantities","subscriptionQuantities","reduce","acc","frequency","quantities","getQuantityOptions","quantity","push","updateQuantities","disableCartForActiveSubs","resetQuantity","quantityOptions","currentValue","selectedQuantity","currentUrl","replace","toString","join","previousValue","$selectButton","invalidQuantity","disableCartForSubs","attributeSelect","selectedValueUrl","arguments","container","params","issubscription","ajax","method","success","spinner","stop","error","getAddToCartUrl","parseHtml","$html","parseHTML","body","footer","children","chooseBonusProducts","start","bonusUrl","bonusChoiceRuleBased","showProductsUrlRuleBased","showProductsUrlListBased","htmlString","maxBonusItems","uuid","pliUUID","addToCartUrl","pageSize","labels","selectprods","dataType","parsedHtml","renderedTemplate","enterDialogMessage","closeButtonText","handlePostCartAdd","messageType","newBonusDiscountLineItem","Object","keys","modalData","setTimeout","getChildProducts","childProducts","each","JSON","stringify","getOptions","options","map","$elOption","urlValue","selectedValueId","optionId","toArray","miniCartReportingUrl","methods","editBonusProducts","focusChooseBonusProductModal","on","focus","onClosingChooseBonusProductModal","trapChooseBonusProductModalFocus","e","focusParams","event","containerSelector","firstElementSelector","lastElementSelector","setTabNextFocus","colorAttribute","document","preventDefault","selectAttribute","currentTarget","selectedQuantityUrl","addToCart","pidsObj","setPids","qty","form","trainingDone","prescriptionValid","confirmAddToCart","reportingURL","selectBonusProduct","$choiceOfBonusProduct","maxPids","submittedQty","totalQty","optionID","valueId","selectedBonusProductHtml","removeBonusProduct","$selected","count","enableBonusProductSelection","available","showMoreBonusProducts","addBonusProductsToCart","$readyToOrderBonusProducts","queryString","pidsObject","bonusProducts","qtyOption","option","productId","errorMessage","msgSuccess","location","reload","base","getModalHtmlElement","fillModalElement","quickViewFullDetailMsg","productUrl","showQuickview","target","focusQuickview","trapQuickviewFocus","nextToLastElementSelector","showSpinner","hideDialog","beforeUpdateAttribute","updateAttribute","selectedProductUrl","updateAddToCart","dialog","allAvailable","every","item","allReady","updateDom","$results","selector","$updates","handleRefinements","activeDiv","className","parseResults","specialHandlers","getContent","$element","$target","showMoreUrl","updateSortOptions","$tempDom","sortOptions","filter","show","closeRefinements","hide","sort","selectedUrl","showMore","stopPropagation","applyFilter","attributeId","last","page","showContentTab","KEYCODE_TAB","isTabPressed","key","keyCode","firstFocusableEl","lastFocusableEl","is","linkElements","shiftKey","_typeof","obj","Symbol","iterator","constructor","prototype","include","processInclude","ready"],"sourceRoot":""}