{"version":3,"sources":["webpack:///./src/client/default/js/components/shippingOptionsComponent.js","webpack:///./src/client/default/js/base/baseComponent.js","webpack:///./src/client/default/js/libs/Axios.js"],"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","return","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","catch","delegateYield","_callSuper","_getPrototypeOf","_possibleConstructorReturn","Boolean","valueOf","Reflect","construct","_isNativeReflectConstruct","apply","ShippingOptionsComponent","_BaseComponent","element","_this","_classCallCheck","initOnChange","onClickSave","onClickEdit","_inherits","_createClass","key","get","SELECTED","SHIPPING_SELECTED","SHIPPING_EDITING","HAS_SERVICES","SHOW_SERVICES","shippingOptionWrapper","shippingOptionInput","shippingMethodOption","checkedShippingMethod","checkedShippingService","checkedShippingOption","minicartShippingOption","quantityInput","saveButton","editButton","this","_$checkedShippingMethod","document","querySelector","concat","SELECTORS","_shippingOption","_shippingOptionRaee","_this2","$shippingOptionWrappers","_toConsumableArray","$el","querySelectorAll","$shippingOptions","hasChecked","index","checked","firstShipping","firstWrapper","closest","classList","add","CLASSES","el","allShippingMethodOptions","addEventListener","currentInput","currentTarget","wrapper","opt","remove","optWrapper","contains","toggle","shippingMethodOptions","op","_this3","$on","_ref","_asyncToGenerator","_callee","_document$querySelect","_this3$$checkedShippi3","pid","selectedValueIdRaee","optionIdRaee","selectedValueIdInstall","optionIdInstall","_this3$$shippingOptio","_this3$$shippingOptio2","_this3$$checkedShippi","_this3$$shippingOptio3","_this3$$shippingOptio4","_this3$$checkedShippi2","productOptions","_yield$post","data","_context","$options","$checkedShippingOption","dataset","optionId","$shippingOption","optionDefaultValue","$checkedShippingOptionRaee","$shippingOptionRaee","productId","selectedValueId","post","endpoint","quantity","options","JSON","stringify","shippingMethodId","$checkedShippingMethod","error","desc","t0","console","log","_x","arguments","_this4","BaseComponent","_BaseGiaComponent","_componentElement","setAttribute","_checkMessages","compOptions","_objectSpread","filter","entry","includes","optionValue","cleanEntry","cleanOptionKey","parse","replace","convertType","deepFreeze","getAttribute","events","cb","undefined","elements","Bean","on","stopPropagation","one","off","fire","container","message","_loading","EMIT","CUSTOM_MESSAGES","LOADER_EVENTS","show","body","icon","setTimeout","hide","option","optionReturn","str","toLocaleLowerCase","BaseGiaComponent","axios","Axios","transformRequest","headers","skiptransform","entries","formData","FormData","_i","_Object$entries","_Object$entries$_i","_slicedToArray","append","recaptchaToken","_ref2","googleRecaptchaAction","googleRecaptchaClientSide","reject","window","grecaptcha","ready","execute","action","token","defaults","common","interceptors","request","use","_ref3","_callee2","config","_context2","googleRecaptchaToken","_x2","response","commonInterface","CommonInterface","pushState","replaceState","history","redirectUrl","location","href","hrefUrl","paybackParam","isPaybackPopupActive","indexOf","trialParam","subscriptionTrialModalNotEligibleAfterLogin","fromEntries","res","notificationPush","showNotification","pushPromoPre","orderedPush","sort","promoA","promoB","rank","notifications","pushPromoPost","_error$response","_error$response2","_error$response2$data","CancelToken","all","spread"],"mappings":";kTACAA,EAAA,kBAAAC,GAAA,IAAAC,EAAAD,EAAA,GAAAE,EAAAC,OAAAC,UAAAC,EAAAH,EAAAI,eAAAC,EAAAJ,OAAAK,gBAAA,SAAAP,EAAAD,EAAAE,GAAAD,EAAAD,GAAAE,EAAAO,OAAAC,EAAA,mBAAAC,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AI,KAE1EvB,EAAgBjD,KAAK,kCAAmC,CAAEyE,cAAeL,IAU3E,OAPIpB,EAAS3G,MAAQ2G,EAAS3G,KAAKqI,eACjCzB,EAAgBjD,KAAK,uBAAwBgD,EAAS3G,KAAKqI,eAMtD1B,KACN,SAAUvF,GAAO,IAAAkH,EAAAC,EAAAC,EAOlB,OANkB,QAAdF,EAAAlH,EAAMuF,gBAAQ,IAAA2B,GAAdA,EAAgBtI,MAAsB,QAAlBuI,EAAInH,EAAMuF,gBAAQ,IAAA4B,GAAM,QAANC,EAAdD,EAAgBvI,YAAI,IAAAwI,GAApBA,EAAsBvB,cAChDC,SAASC,KAAO/F,EAAMuF,SAAS3G,KAAKiH,aAK/B3N,QAAQmM,OAAOrE,MAGOqD,IAAhBgE,YAAR,IAGLjN,EACEgJ,EADFhJ,IAAKoF,EACH4D,EADG5D,KAAmBuF,GACtB3B,EADSkE,IACTlE,EADcmE,OACdnE,EADsB2B","file":"js/component-shippingOptionsComponent-js.chunks.js","sourcesContent":["import BaseComponent from '../base/baseComponent';\nimport { post } from '../libs/Axios';\nexport default class ShippingOptionsComponent extends BaseComponent {\n get CLASSES() {\n return {\n SELECTED: 'selected',\n SHIPPING_SELECTED: 'options-selected',\n SHIPPING_EDITING: 'options-editing',\n HAS_SERVICES: 'has-services',\n SHOW_SERVICES: 'show-services'\n };\n }\n\n get SELECTORS() {\n return {\n shippingOptionWrapper: '.product-shipping-option',\n shippingOptionInput: '[name=\"shippingOptionsForm\"]',\n shippingMethodOption: '[name=\"shippingServicesForm\"]',\n checkedShippingMethod: '.product-shipping-option.js-shipping-method-option.selected',\n checkedShippingService: '.shipping-service-item:checked',\n checkedShippingOption: '.shipping-option-item:checked',\n minicartShippingOption: '.minicart-shipping-option',\n quantityInput: 'input[name=\"itemquantity\"]',\n saveButton: '.save-shipping-button',\n editButton: '.edit-shipping-button'\n };\n }\n constructor(element) {\n super(element);\n this.initOnChange();\n this.onClickSave();\n this.onClickEdit();\n }\n /**\n * @returns {HTMLInputElement}\n */\n get $checkedShippingMethod() {\n if (!this._$checkedShippingMethod)\n this._$checkedShippingMethod =\n document.querySelector(`${this.SELECTORS.checkedShippingMethod}:not(${this.SELECTORS.minicartShippingOption}) ${this.SELECTORS.checkedShippingService}`) ||\n document.querySelector(`${this.SELECTORS.checkedShippingMethod}:not(${this.SELECTORS.minicartShippingOption}) .shipping-method-item`);\n // @ts-ignore\n return this._$checkedShippingMethod;\n }\n\n /**\n * @returns {HTMLInputElement}\n */\n get $checkedShippingOption() {\n return document.querySelector(`${this.SELECTORS.checkedShippingMethod}:not(${this.SELECTORS.minicartShippingOption}) ${this.SELECTORS.shippingMethodOption}.selected`);\n }\n\n /**\n * @returns {HTMLInputElement}\n */\n get $shippingOption() {\n this._shippingOption = document.querySelector(`.product-shipping-option.js-shipping-method-option:not(${this.SELECTORS.minicartShippingOption}) [data-option-default-value]`);\n // @ts-ignore\n return this._shippingOption;\n }\n\n /**\n * @returns {HTMLInputElement}\n */\n get $checkedShippingOptionRaee() {\n return document.querySelector(`.js-options-raee ${this.SELECTORS.checkedShippingOption}`);\n }\n\n /**\n * @returns {HTMLInputElement}\n */\n get $shippingOptionRaee() {\n this._shippingOptionRaee = document.querySelector(`.js-options-raee .shipping-option-item`);\n // @ts-ignore\n return this._shippingOptionRaee;\n }\n\n // eslint-disable-next-line sonarjs/cognitive-complexity\n initOnChange() {\n this.$shippingOptionWrappers = /** @type {HTMLElement[]} */ ([...this.$el.querySelectorAll(this.SELECTORS.shippingOptionWrapper)]);\n this.$shippingOptions = /** @type {HTMLInputElement[]} */ ([...this.$el.querySelectorAll(this.SELECTORS.shippingOptionInput)]);\n //check if there is already a selected input, otherwise check the first one\n let hasChecked = false;\n for (let index = 0; index < this.$shippingOptions.length; index++) {\n if (this.$shippingOptions[index].checked) {\n hasChecked = true;\n break;\n }\n }\n if (!hasChecked) {\n const firstShipping = this.$shippingOptions[0];\n firstShipping.checked = true;\n const firstWrapper = firstShipping.closest(this.SELECTORS.shippingOptionWrapper);\n if (firstWrapper) {\n firstWrapper.classList.add(this.CLASSES.SELECTED);\n }\n }\n this.$shippingOptions.forEach((el) => {\n const allShippingMethodOptions = /** @type {HTMLInputElement[]} */ ([...this.$el.querySelectorAll(this.SELECTORS.shippingMethodOption)]);\n el.addEventListener('change', (e) => {\n const currentInput = /** @type {HTMLInputElement} */ (e.currentTarget);\n // reset all checked shipping methods\n this.$shippingOptionWrappers.forEach((wrapper) => {\n // reset all checked options\n allShippingMethodOptions.forEach((opt) => {\n opt.checked = false;\n opt.classList.remove(this.CLASSES.SELECTED);\n });\n wrapper.classList.remove(this.CLASSES.SELECTED);\n });\n const optWrapper = currentInput.closest(this.SELECTORS.shippingOptionWrapper);\n if (optWrapper) {\n optWrapper.classList.add(this.CLASSES.SELECTED);\n }\n });\n el.addEventListener('click', (e) => {\n const currentInput = /** @type {HTMLInputElement} */ (e.currentTarget);\n const optWrapper = currentInput.closest(this.SELECTORS.shippingOptionWrapper);\n if (optWrapper && optWrapper.classList.contains(this.CLASSES.HAS_SERVICES)) {\n optWrapper.classList.toggle(this.CLASSES.SHOW_SERVICES);\n }\n });\n //handle uncheck on click for input radio\n const shippingOptionWrapper = el.closest(this.SELECTORS.shippingOptionWrapper);\n const shippingMethodOptions = /** @type {HTMLInputElement[]} */ ([...shippingOptionWrapper.querySelectorAll(this.SELECTORS.shippingMethodOption)]);\n shippingMethodOptions.forEach((opt) => {\n opt.addEventListener('change', (e) => {\n const currentInput = /** @type {HTMLInputElement} */ (e.currentTarget);\n shippingMethodOptions.forEach((op) => {\n op.classList.remove(this.CLASSES.SELECTED);\n });\n currentInput.classList.add(this.CLASSES.SELECTED);\n });\n\n opt.addEventListener('click', (e) => {\n const currentInput = /** @type {HTMLInputElement} */ (e.currentTarget);\n if (currentInput.classList.contains(this.CLASSES.SELECTED) && currentInput.checked) {\n currentInput.checked = false;\n currentInput.classList.remove(this.CLASSES.SELECTED);\n }\n });\n\n // if (opt.checked) {\n // const optWrapper = opt.closest(this.SELECTORS.shippingOptionWrapper);\n // if (optWrapper && optWrapper.classList.contains(this.CLASSES.HAS_SERVICES) && !optWrapper.classList.contains(this.CLASSES.SHOW_SERVICES)) {\n // optWrapper.classList.toggle(this.CLASSES.SHOW_SERVICES);\n // }\n // }\n });\n });\n const otherOptions = /** @type {HTMLInputElement[]} */ ([...this.$el.querySelectorAll('[name=\"optionsForm\"]')]);\n otherOptions.forEach((opt) => {\n opt.addEventListener('click', (e) => {\n const currentInput = /** @type {HTMLInputElement} */ (e.currentTarget);\n if (!currentInput.classList.contains(this.CLASSES.SELECTED) && currentInput.checked) {\n currentInput.classList.add(this.CLASSES.SELECTED);\n opt.closest(this.SELECTORS.shippingOptionWrapper).classList.add(this.CLASSES.SELECTED);\n } else {\n currentInput.checked = false;\n currentInput.classList.remove(this.CLASSES.SELECTED);\n opt.closest(this.SELECTORS.shippingOptionWrapper).classList.remove(this.CLASSES.SELECTED);\n }\n });\n });\n }\n\n onClickSave() {\n this.$on(\n 'click.saveShipping',\n async (e) => {\n try {\n const pid = this.$options.pid;\n\n let selectedValueIdRaee;\n let optionIdRaee;\n let selectedValueIdInstall;\n let optionIdInstall;\n\n if (!this.$checkedShippingOption) {\n selectedValueIdInstall = this.$shippingOption?.dataset.optionDefaultValue;\n optionIdInstall = this.$shippingOption?.dataset.optionId;\n } else {\n selectedValueIdInstall = this.$checkedShippingOption.value;\n optionIdInstall = this.$checkedShippingOption?.dataset.optionId;\n }\n\n if (!this.$checkedShippingOptionRaee) {\n selectedValueIdRaee = this.$shippingOptionRaee?.dataset.optionDefaultValue;\n optionIdRaee = this.$shippingOptionRaee?.dataset.optionId;\n } else {\n selectedValueIdRaee = this.$checkedShippingOptionRaee.value;\n optionIdRaee = this.$checkedShippingOptionRaee?.dataset.optionId;\n }\n\n let productOptions = [];\n\n if (this.$checkedShippingOption) {\n productOptions.push({\n productId: this.$options.pid,\n optionId: optionIdInstall,\n selectedValueId: selectedValueIdInstall\n });\n }\n\n if (this.$checkedShippingOptionRaee) {\n productOptions.push({\n productId: this.$options.pid,\n optionId: optionIdRaee,\n selectedValueId: selectedValueIdRaee\n });\n }\n\n const { data } = await post(this.$options.endpoint, {\n pid,\n quantity: document.querySelector(this.SELECTORS.quantityInput)?.value,\n options: JSON.stringify(productOptions),\n shippingMethodId: this.$checkedShippingMethod?.value\n });\n if (!data.error) {\n this.$el.classList.remove(this.CLASSES.SHIPPING_EDITING);\n this.$el.classList.add(this.CLASSES.SHIPPING_SELECTED);\n this.$el.querySelectorAll('.option-description').forEach(function(desc) {\n desc.classList.add('d-none');\n });\n }\n return data;\n } catch (error) {\n console.log(error);\n }\n },\n this.$el.querySelector(this.SELECTORS.saveButton)\n );\n }\n\n onClickEdit() {\n this.$on(\n 'click.editShipping',\n (e) => {\n this.$el.classList.remove(this.CLASSES.SHIPPING_SELECTED);\n this.$el.classList.add(this.CLASSES.SHIPPING_EDITING);\n this.$el.querySelectorAll('.option-description').forEach(function(desc) {\n desc.classList.remove('d-none');\n });\n },\n this.$el.querySelector(this.SELECTORS.editButton)\n );\n }\n}\n","/* eslint-disable new-cap */\n/* eslint-disable valid-jsdoc */\n/* eslint-disable no-underscore-dangle */\n\nimport Bean from 'bean';\nimport deepFreeze from '../utilities/freeze';\nimport BaseGiaComponent from './baseGiaComponent';\n\nexport default class BaseComponent extends BaseGiaComponent {\n /**\n * @returns {HTMLElement}\n */\n get $el() {\n return /** @type {HTMLElement} */ (this._componentElement);\n }\n\n get $options() {\n const compOptions = {};\n const options = { ...this.$el.dataset };\n const optionsEntires = Object.keys(options).filter((entry) => entry.includes('option'));\n optionsEntires.forEach((entry) => {\n const cleanEntry = BaseComponent.cleanOptionKey(entry);\n let optionValue;\n if (options[entry].includes('{') && options[entry].includes('}')) {\n optionValue = JSON.parse(options[entry].replace(/'/g, '\"'));\n } else {\n optionValue = BaseComponent.convertType(options[entry]);\n }\n compOptions[cleanEntry] = optionValue;\n });\n return deepFreeze(compOptions);\n }\n\n get COMPONENT_NAME() {\n return this.$el.getAttribute('data-component');\n }\n\n /**\n *\n * constructor\n *\n * @param {Element} element\n */\n constructor(element) {\n super(element);\n this._componentElement = element;\n this._componentElement.setAttribute('data-component-init', 'true');\n this._checkMessages();\n }\n\n static convertType(option) {\n let optionReturn;\n switch (option) {\n case 'false':\n optionReturn = false;\n break;\n case 'true':\n optionReturn = true;\n break;\n case 'null':\n optionReturn = null;\n break;\n default:\n optionReturn = option;\n break;\n }\n\n return optionReturn;\n }\n\n static cleanOptionKey(key) {\n const str = key.replace('option', '');\n return `${str.charAt(0).toLocaleLowerCase()}${str.slice(1)}`;\n }\n\n /**\n *\n * $on\n *\n * @param {String} events\n * @param {Function} cb\n * @param {Element} [element = this.$el]\n * @param {Array|String|Element} [elements = null]\n */\n $on(events, cb, element = this.$el, elements = null) {\n if (!element || !events || !cb) return;\n if (!elements) {\n Bean.on(element, events, (e) => {\n if (e) e.stopPropagation();\n cb(e);\n });\n } else {\n Bean.on(element, events, elements, (e) => {\n if (e) e.stopPropagation();\n cb(e);\n });\n }\n }\n\n /**\n *\n * $one\n *\n * @param {String} events\n * @param {Function} cb\n * @param {Element} [element = this.$el]\n */\n $one(events, cb, element = this.$el) {\n Bean.one(element, events, cb);\n }\n\n /**\n *\n * $off\n *\n * @param {String} events\n * @param {Element} [element = this.$el]\n */\n $off(events, element = this.$el) {\n Bean.off(element, events);\n }\n\n /**\n *\n * $fire\n *\n * @param {String} events\n * @param {Element} [element = this.$el]\n */\n $fire(events, element = this.$el) {\n Bean.fire(element, events);\n }\n\n /**\n *\n * Activate loader\n *\n * @param {HTMLElement} [container]\n * @param {String} [message]\n */\n loading(container, message) {\n this._loading = true;\n this.EMIT(this.CUSTOM_MESSAGES.LOADER_EVENTS.show, {\n container: container || document.body,\n message: message ?? null\n });\n }\n\n /**\n *\n * Deactivate loader\n *\n * @param {HTMLElement} [container]\n * @param {String} [message]\n * @param {Boolean} [error=false]\n * @param {String} [icon]\n */\n endLoading(container, message, error = false, icon) {\n this._loading = false;\n setTimeout(() => {\n if (!this._loading) {\n this.EMIT(this.CUSTOM_MESSAGES.LOADER_EVENTS.hide, {\n container: container || document.body,\n message,\n error,\n icon\n });\n }\n }, 400);\n }\n}\n","import Axios from 'axios';\nimport CommonInterface from '../base/commonInterface';\nimport CustomMessages from '../constants/customMessages';\n\n\nconst axios = Axios.create({\n transformRequest: [function (data, headers) {\n if (headers && headers.skiptransform) {\n delete headers.skiptransform;\n return data;\n }\n if (data && Object.entries(data)) {\n const formData = new FormData();\n for (const [key, value] of Object.entries(data)) {\n formData.append(key, value);\n }\n return formData;\n }\n }],\n});\n\nconst recaptchaToken = async ({ googleRecaptchaAction, googleRecaptchaClientSide }) => new Promise((resolve, reject) => {\n window.grecaptcha.ready(() => {\n window.grecaptcha.execute(googleRecaptchaClientSide, { action: googleRecaptchaAction }).then((token) => {\n resolve(token);\n });\n });\n});\n\naxios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\n\n// Add a request interceptor\naxios.interceptors.request.use(async (config) => {\n // Do something before request is sent\n if (config.data && config.data.googleRecaptchaAction && config.data.googleRecaptchaClientSide && window.grecaptcha) {\n const token = await recaptchaToken(config.data);\n config.data.googleRecaptchaToken = token;\n return config;\n }\n return config;\n}, function (error) {\n // Do something with request error\n return Promise.reject(error);\n});\n\n// Add a response interceptor\naxios.interceptors.response.use(function (response) {\n let commonInterface = new CommonInterface();\n if (response.data && response.data.pushState || response.data.replaceState) {\n response.data.pushState && history.pushState({}, '', response.data.pushState);\n response.data.replaceState && history.replaceState({}, '', response.data.replaceState);\n if (response.data.redirectUrl) {\n setTimeout(() => {\n location.href = response.data.redirectUrl;\n }, 500);\n }\n }\n else if (response.data && response.data.redirectUrl) {\n let hrefUrl=response.data.redirectUrl;\n let paybackParam = '';\n if (response.data.isPaybackPopupActive) {\n paybackParam = hrefUrl.indexOf('?') > -1 ? '&isPaybackPopupActive=true' : '?isPaybackPopupActive=true';\n }\n hrefUrl =hrefUrl+paybackParam;\n let trialParam = '';\n if (response.data.subscriptionTrialModalNotEligibleAfterLogin) {\n trialParam = hrefUrl.indexOf('?') > -1 ? '&subscriptionTrialModalNotEligibleAfterLogin=true' : '?subscriptionTrialModalNotEligibleAfterLogin=true';\n } \n location.href = hrefUrl+trialParam;\n }\n if (response.data && response.data.error) {\n if(response.config.data instanceof FormData) {\n response.config.data = Object.fromEntries(response.config.data);\n response.config.headers['Content-Type'] = \"application/json\"\n }\n commonInterface.EMIT(`error.${response.data.error}`, {res: response});\n }\n\n if (response.data && response.data.notificationPush && response.data.notificationPush.showNotification) {\n commonInterface.EMIT(`notification:push`, response.data.notificationPush);\n }\n\n if (response.data && response.data.pushPromoPre && response.data.pushPromoPre.length > 0) {\n const orderedPush = response.data.pushPromoPre.sort(function(promoA, promoB) {\n return promoA.rank > promoB.rank ? -1 : promoB.rank > promoA.rank ? 1 : 0;\n });\n commonInterface.EMIT(`notification:pushFirstAvailable`, { notifications: orderedPush });\n }\n \n if (response.data && response.data.pushPromoPost) {\n commonInterface.EMIT(`notification:pushall`, response.data.pushPromoPost);\n }\n\n\n // Any status code that lie within the range of 2xx cause this function to trigger\n // Do something with response data\n return response;\n}, function (error) {\n if (error.response?.data && error.response?.data?.redirectUrl) {\n location.href = error.response.data.redirectUrl;\n }\n\n // Any status codes that falls outside the range of 2xx cause this function to trigger\n // Do something with response error\n return Promise.reject(error);\n});\n\nexport const { CancelToken } = Axios;\n\nexport const {\n get, post, all, spread, request\n} = axios;\n"],"sourceRoot":""}