1require.config({"config": { 2 "jsbuild":{"Magento_Ui/js/modal/modal-component.min.js":"define(['Magento_Ui/js/lib/view/utils/async','uiCollection','uiRegistry','underscore','./modal'],function($,Collection,registry,_){'use strict';return Collection.extend({defaults:{template:'ui/modal/modal-component',title:'',subTitle:'',options:{modalClass:'',title:'',subTitle:'',buttons:[],keyEventHandlers:{}},valid:true,links:{title:'options.title',subTitle:'options.subTitle'},listens:{state:'onState',title:'setTitle','options.subTitle':'setSubTitle'},modalClass:'modal-component',onCancel:'closeModal'},initialize:function(){this._super();_.bindAll(this,'initModal','openModal','closeModal','toggleModal','setPrevValues','validate');this.initializeContent();return this;},initConfig:function(){return this._super().initSelector().initModalEvents();},initSelector:function(){var modalClass=this.name.replace(/\\./g,'_');this.contentSelector='.'+this.modalClass;this.options.modalClass=this.options.modalClass+' '+modalClass;this.rootSelector='.'+modalClass;return this;},initModalEvents:function(){this.options.keyEventHandlers.escapeKey=this.options.outerClickHandler=this[this.onCancel].bind(this);return this;},initializeContent:function(){$.async({component:this.name},this.initModal);},initToolbarSection:function(){this.set('toolbarSection',this.modal.data('mage-modal').modal.find('header').get(0));},initObservable:function(){this._super();this.observe(['state','focused']);return this;},initModal:function(element){if(!this.modal){this.overrideModalButtonCallback();this.options.modalCloseBtnHandler=this[this.onCancel].bind(this);this.modal=$(element).modal(this.options);this.initToolbarSection();if(this.waitCbk){this.waitCbk();this.waitCbk=null;}}\nreturn this;},openModal:function(){if(this.modal){this.state(true);}else{this.waitCbk=this.openModal;}},closeModal:function(){if(this.modal){this.state(false);}else{this.waitCbk=this.closeModal;}},toggleModal:function(){if(this.modal){this.state(!this.state());}else{this.waitCbk=this.toggleModal;}},setTitle:function(title){if(this.title!==title){this.title=title;}\nif(this.modal){this.modal.modal('setTitle',title);}},setSubTitle:function(subTitle){if(this.subTitle!==subTitle){this.subTitle=subTitle;}\nif(this.modal){this.modal.modal('setSubTitle',subTitle);}},onState:function(state){if(state){this.modal.modal('openModal');this.applyData();}else{this.modal.modal('closeModal');}},validate:function(elem){if(typeof elem==='undefined'){return;}\nif(typeof elem.validate==='function'){this.valid&=elem.validate().valid;}
2else if(elem.elems){elem.elems().forEach(this.validate,this);}},resetData:function(){this.elems().forEach(this.resetValue,this);},applyData:function(){var applied={};this.elems().forEach(this.gatherValues.bind(this,applied),this);this.applied=applied;},gatherValues:function(applied,elem){if(typeof elem.value==='function'){applied[elem.name]=elem.value();}else if(elem.elems){elem.elems().forEach(this.gatherValues.bind(this,applied),this);}},setPrevValues:function(elem){if(typeof elem.value==='function'){this.modal.focus();elem.value(this.applied[elem.name]);}else if(elem.elems){elem.elems().forEach(this.setPrevValues,this);}},triggerAction:function(action){var targetName=action.targetName,params=action.params||[],actionName=action.actionName,target;target=registry.async(targetName);if(target&&typeof target==='function'&&actionName){params.unshift(actionName);target.apply(target,params);}},overrideModalButtonCallback:function(){var buttons=this.options.buttons;if(buttons&&buttons.length){buttons.forEach(function(button){button.click=this.getButtonClickHandler(button.actions);},this);}},getButtonClickHandler:function(actionsConfig){var actions=actionsConfig.map(function(actionConfig){if(_.isObject(actionConfig)){return this.triggerAction.bind(this,actionConfig);}\nreturn this[actionConfig]?this[actionConfig].bind(this):function(){};},this);return function(){actions.forEach(function(action){action();});};}
2,actionCancel:function(){this.elems().forEach(this.setPrevValues,this);this.closeModal();},actionDone:function(){this.valid=true;this.elems().forEach(this.validate,this);if(this.valid){this.closeModal();}}});});","Magento_Ui/js/modal/modal.min.js":"define(['jquery','underscore','mage/template','text!ui/template/modal/modal-popup.html','Magento_Ui/js/lib/key-codes','jquery-ui-modules/widget','jquery-ui-modules/core','mage/translate','jquery/z-index'],function($,_,template,popupTpl,keyCodes){'use strict';var transitionEvent=(function(){var transition,elementStyle=document.createElement('div').style,transitions={'transition':'transitionend','OTransition':'oTransitionEnd','MozTransition':'transitionend','WebkitTransition':'webkitTransitionEnd'};for(transition in transitions){if(elementStyle[transition]!==undefined&&transitions.hasOwnProperty(transition)){return transitions[transition];}}})();$.widget('mage.modal',{options:{type:'popup',title:'',subTitle:'',modalClass:'',focus:'[data-role=\"closeBtn\"]',autoOpen:false,clickableOverlay:true,popupTpl:popupTpl,modalVisibleClass:'_show',parentModalClass:'_has-modal',innerScrollClass:'_inner-scroll',responsive:false,innerScroll:false,blockScroll:true,modalTitle:'[data-role=\"title\"]',modalSubTitle:'[data-role=\"subTitle\"]',modalBlock:'[data-role=\"modal\"]',modalCloseBtn:'[data-role=\"closeBtn\"]',modalContent:'[data-role=\"content\"]',modalAction:'[data-role=\"action\"]',focusableScope:'[data-role=\"focusable-scope\"]',focusableStart:'[data-role=\"focusable-start\"]',focusableEnd:'[data-role=\"focusable-end\"]',appendTo:'body',wrapperClass:'modals-wrapper',overlayClass:'modals-overlay',responsiveClass:'modal-slide',trigger:'',isFocusForced:true,hidePage:true,modalLeftMargin:45,killClose:false,closeText:$.mage.__('Close'),buttons:[{text:$.mage.__('Ok'),class:'',attr:{},click:function(event){this.closeModal(event);}}],keyEventHandlers:{tabKey:function(){if(document.activeElement===this.modal[0]&&this.options.isFocusForced){this._setFocus('start');}},escapeKey:function(){if(this.options.isOpen&&this.modal.find(document.activeElement).length||this.options.isOpen&&this.modal[0]===document.activeElement){this.closeModal();}}},inertReset:[],},_create:function(){_.bindAll(this,'keyEventSwitcher','_tabSwitcher','closeModal');if(this.options.modalClass.indexOf('modal-right')!==-1&&this.options.clickableOverlay){this.options.modalClass+=' overlay-modal overlay-close-modal';}\nthis.options.transitionEvent=transitionEvent;this._createWrapper();this._renderModal();this._createButtons();$(this.options.trigger).on('click',_.bind(this.toggleModal,this));this._on(this.modal.find(this.options.modalCloseBtn),{'click':this.options.modalCloseBtnHandler?this.options.modalCloseBtnHandler:this.closeModal});this._on(this.element,{'openModal':this.openModal,'closeModal':this.closeModal});this.options.autoOpen?this.openModal():false;},_getElem:function(elem){return this.modal.find(elem);},_getVisibleCount:function(){var modals=$(this.options.modalBlock);return modals.filter('.'+this.options.modalVisibleClass).length;},_getScrollBlockedVisibleCount:function(){var modals=$(this.options.modalBlock+'[data-scroll-blocked=\"true\"]');return modals.filter('.'+this.options.modalVisibleClass).length;},_getVisibleSlideCount:function(){var elems=this.modalWrapper.find('[data-type=\"slide\"]');return elems.filter('.'+this.options.modalVisibleClass).length;},keyEventSwitcher:function(event){var key=keyCodes[event.keyCode];if(this.options.keyEventHandlers.hasOwnProperty(key)){this.options.keyEventHandlers[key].apply(this,arguments);}},setTitle:function(title){var $title=$(this.options.modalTitle),$subTitle=this.modal.find(this.options.modalSubTitle);$title.text(title);$title.append($subTitle);},setSubTitle:function(subTitle){this.options.subTitle=subTitle;this.modal.find(this.options.modalSubTitle).html(subTitle);},toggleModal:function(){if(this.options.isOpen===true){this.closeModal();}else{this.openModal();}},openModal:function(){this.options.isOpen=true;this.focusedElement=document.activeElement;this.killClose=true;this.modal.removeAttr('aria-hidden');this._createOverlay();this._blockScroll();this._setActive();this._setKeyListener();this.modal.one(this.options.transitionEvent,_.bind(this._setFocus,this,'end','opened'));this.modal.one(this.options.transitionEvent,_.bind(this._trigger,this,'opened'));this.modal.addClass(this.options.modalVisibleClass);this.modal.attr(\"data-scroll-blocked\",this.options.blockScroll);if(!this.options.transitionEvent){this._trigger('opened');}\nif(this.options.hidePage){this.options.inertReset=[];
2Array.from(document.body.children).forEach((elem)=>{if(!elem.contains(this.element[0])&&!elem.hasAttribute('inert')&&elem.getAttribute('data-modals-inert')!=='0'){this.options.inertReset.push(elem);elem.setAttribute('inert','');}});}\nreturn this.element;},_setFocus:function(position,type){let focusableElements,infelicity;if(type==='opened'){if(this.options.isFocusForced){if(this.options.focus){const elt=this.modal.find($(this.options.focus)).eq(0);if(elt.length){elt.attr('tabindex','0');elt[0].focus({preventScroll:true});}}else{this.modal.find(this.options.focusableScope)?.[0].focus({preventScroll:true});}}}else if(position==='end'){const elt=this.modal.find(this.options.modalCloseBtn);elt?.[0].focus({preventScroll:true});}else if(position==='start'&&!this.modal.hasClass('popup-message-modal')){infelicity=2;focusableElements=this.modal.find(':focusable');focusableElements.eq(focusableElements.length-infelicity)?.[0].focus({preventScroll:true});}},_setKeyListener:function(){const $focusStartEnd=this.modal.find(this.options.focusableStart+','+this.options.focusableEnd);if(this.options.hidePage){$focusStartEnd.show().bind('focusin',this._tabSwitcher);}else{$focusStartEnd.hide();}\nthis.modal.bind('keydown',this.keyEventSwitcher);},_removeKeyListener:function(){this.modal.find(this.options.focusableStart).unbind('focusin',this._tabSwitcher);this.modal.find(this.options.focusableEnd).unbind('focusin',this._tabSwitcher);this.modal.unbind('keydown',this.keyEventSwitcher);},_tabSwitcher:function(e){var target=$(e.target);if(target.is(this.options.focusableStart)){this._setFocus('start');}else if(target.is(this.options.focusableEnd)){this._setFocus('end');}},closeModal:function(){var that=this;this.killClose=false;this.element.trigger('close_modal');this._removeKeyListener();this.options.isOpen=false;this.options.inertReset.forEach((elem)=>{elem.removeAttribute('inert','');});this.modal.one(this.options.transitionEvent,function(){that._close();});this.modal.removeClass(this.options.modalVisibleClass);this.modal[0].removeAttribute(\"data-scroll-blocked\");if(!this.options.transitionEvent){that._close();}\nreturn this.element;},_close:function(){if(this.killClose){this.killClose=false;return;}\nvar trigger=_.bind(this._trigger,this,'closed',this.modal);if(this.focusedElement&&typeof this.focusedElement.focus==='function'){this.focusedElement.focus({preventScroll:true});}\nthis._destroyOverlay();this._unblockScroll();this._unsetActive();this.modal.attr('aria-hidden','true');_.defer(trigger,this);},_setActive:function(){var zIndex=this.modal.zIndex();this.prevOverlayIndex=this.overlay.zIndex();this.prevOverlayModal=this.overlay.prev();this.overlay.insertAfter(this.modal);this.modal.zIndex(zIndex+this._getVisibleCount());this.overlay.zIndex(zIndex+(this._getVisibleCount()-1));if(this._getVisibleSlideCount()){this.modal.css('marginLeft',this.options.modalLeftMargin*this._getVisibleSlideCount());}},_unsetActive:function(){this.modal.removeAttr('style');if(this.overlay){this.overlay.zIndex(this.prevOverlayIndex);this.overlay.insertAfter(this.prevOverlayModal);}},_createWrapper:function(){this.modalWrapper=$(this.options.appendTo).find('.'+this.options.wrapperClass);if(!this.modalWrapper.length){this.modalWrapper=$('<div></div>').addClass(this.options.wrapperClass).appendTo(this.options.appendTo);}},_renderModal:function(){$(template(this.options[this.options.type+'Tpl'],{data:this.options})).appendTo(this.modalWrapper);this.modal=this.modalWrapper.find(this.options.modalBlock).last(
2);this.element.appendTo(this._getElem(this.options.modalContent));if(this.element.is(':hidden')){this.element.show();}},_createButtons:function(){this.buttons=this._getElem(this.options.modalAction);_.each(this.options.buttons,function(btn,key){var button=this.buttons[key];if(btn.attr){$(button).attr(btn.attr);}\nif(btn.class){$(button).addClass(btn.class);}\nif(!btn.click){btn.click=this.closeModal;}\n$(button).on('click',_.bind(btn.click,this));},this);},_blockScroll:function(){if(this.options.blockScroll){document.dispatchEvent(new CustomEvent('disable_scroll'));}},_unblockScroll:function(){if(this.options.blockScroll){document.dispatchEvent(new CustomEvent('enable_scroll'));}},_createOverlay:function(){var events,outerClickHandler=this.options.outerClickHandler||this.closeModal;this.overlay=$('.'+this.options.overlayClass);if(!this.overlay.length){this.overlay=$('<div></div>').addClass(this.options.overlayClass).appendTo(this.modalWrapper).css({opacity:0});this.overlay.animate({opacity:1},400);}\nevents=$._data(this.overlay.get(0),'events');events?this.prevOverlayHandler=events.click[0].handler:false;this.options.clickableOverlay?this.overlay.unbind().on('click',outerClickHandler):false;},_destroyOverlay:function(){const modals=$(this.options.modalBlock+':not(.popup-message-modal-newsletter)');const vModals=modals.filter('.'+this.options.modalVisibleClass);if(vModals.length>0){this.overlay.unbind().on('click',this.prevOverlayHandler);}else if(this.overlay){this.overlay.remove();this.overlay=null;}}});return $.mage.modal;});","Magento_Ui/js/modal/modalToggle.min.js":"define(['jquery','Magento_Ui/js/modal/modal'],function($){'use strict';return function(config,el){var widget,content;if(config.contentSelector){content=$(config.contentSelector);}else if(config.content){content=$('<div></div>').html(config.content);}else{content=$('<div></div>');}\nwidget=content.modal(config);$(el).on(config.toggleEvent,function(){var state=widget.data('mage-modal').options.isOpen;if(state){widget.modal('closeModal');}else{widget.modal('openModal');}\nreturn false;});return widget;};});","Magento_Ui/js/modal/prompt.min.js":"define(['jquery','underscore','mage/template','text!ui/template/modal/modal-prompt-content.html','jquery-ui-modules/widget','Magento_Ui/js/modal/modal','mage/translate'],function($,_,template,promptContentTmpl){'use strict';$.widget('mage.prompt',$.mage.modal,{options:{modalClass:'prompt',promptContentTmpl:promptContentTmpl,promptField:'[data-role=\"promptField\"]',attributesForm:{},attributesField:{},value:'',validation:false,validationRules:[],keyEventHandlers:{enterKey:function(event){if(this.options.isOpen&&this.modal.find(document.activeElement).length||this.options.isOpen&&this.modal[0]===document.activeElement){this.closeModal(true);event.preventDefault();}},tabKey:function(){if(document.activeElement===this.modal[0]){this._setFocus('start');}},escapeKey:function(event){if(this.options.isOpen&&this.modal.find(document.activeElement).length||this.options.isOpen&&this.modal[0]===document.activeElement){this.closeModal();event.preventDefault();}}},actions:{always:function(){},confirm:function(){},cancel:function(){}},buttons:[{text:$.mage.__('Cancel'),class:'action-secondary action-dismiss',click:function(){this.closeModal();}},{text:$.mage.__('OK'),class:'action-primary action-accept',click:function(){this.closeModal(true);}}]},_create:function(){this.options.focus=this.options.promptField;this.options.validation=this.options.validation&&this.options.validationRules.length;this.options.outerClickHandler=this.options.outerClickHandler||_.bind(this.closeModal,this,false);this._super();this.modal.find(this.options.modalContent).append(this.getFormTemplate());this.modal.find(this.options.modalCloseBtn).off().on('click',_.bind(this.closeModal,this,false));if(this.options.validation){this.setValidationClasses();}\nthis.openModal();},getFormTemplate:function(){var formTemplate,formAttr='',inputAttr='',attributeName;for(attributeName in this.options.attributesForm){if(this.options.attributesForm.hasOwnProperty(attributeName)){formAttr=formAttr+' '+attributeName+'=\"'+\nthis.options.attributesForm[attributeName]+'\"';}}\nfor(attributeName in this.options.attributesField){if(this.options.attributesField.hasOwnProperty(attributeName)){inputAttr=inputAttr+' '+attributeName+'=\"'+\nthis.options.attributesField[attributeName]+'\"';}}\nformTemplate=$(template(this.options.promptContentTmpl,{data:this.options,formAttr:formAttr,inputAttr:inputAttr}));return formTemplate;},_remove:function(){this.modal.remove();},validate:function(){return $.validator.validateSingleElement(this.options.promptField);},setValidationClasses:function(){this.modal.find(this.options.promptField).attr('class',$.proxy(function(i,val){return val+' '+this.options.validationRules.join(' ');},this));},openModal:function(){this._super();this.modal.find(this.options.promptField).val(this.options.value);},closeModal:function(result){var value;if(result){if(this.options.validation&&!this.validate()){return false;}\nvalue=this.modal.find(this.options.promptField).val();this.options.actions.confirm.call(this,value);}else{this.options.actions.cancel.call(this,result);}\nthis.options.actions.always();this.element.on('promptclosed',_.bind(this._remove,this));return this._super();}});return function(config){return $('<div class=\"prompt-message\"></div>').html(config.content).prompt(config);};});","Magento_Tax/js/price/adjustment.min.js":"define(['Magento_Ui/js/grid/columns/column','mage/translate'],function(Element,$t){'use strict';return Element.extend({defaults:{bodyTmpl:'Magento_Tax/price/adjustment',taxPriceType:'final_price',taxPriceCssClass:'price-including-tax',bothPrices:3,inclTax:2,exclTax:1,modules:{price:'${ $.parentName }'},listens:{price:'initializePriceAttributes'}},initialize:function(){this._super().initializePriceAttributes();return this;},initializePriceAttributes:function(){if(this.displayBothPrices&&this.price()
2){this.price().priceWrapperCssClasses=this.taxPriceCssClass;this.price().priceWrapperAttr={'data-label':$t('Incl. Tax')};}\nreturn this;},getTax:function(row){return row['price_info']['extension_attributes']['tax_adjustments']['formatted_prices'][this.taxPriceType];},getTaxUnsanitizedHtml:function(row){return this.getTax(row);},setPriceType:function(priceType){this.taxPriceType=priceType;return this;},displayBothPrices:function(){return+this.source.data.displayTaxes===this.bothPrices;},displayPriceIncludeTax:function(){return+this.source.data.displayTaxes===this.inclTax;},displayPriceExclTax:function(){return+this.source.data.displayTaxes===this.exclTax;}});});","Magento_PaymentServicesPaypal/js/lib/payment-sdk-loader.min.js":"define(['Magento_PaymentServicesPaypal/js/lib/script-loader'],function(scriptLoader){'use strict';class PaymentSdkLoader{constructor(){this._preferredUrl=null;this._fallbackUrl=null;this._gqlEndpoint=null;this._customerToken=null;this._storeViewCode=null;this._paymentLocation=null;this._shouldInitVault=false;}\nwithPreferredUrl(preferredUrl){this._preferredUrl=preferredUrl;return this;}\nwithFallbackUrl(fallbackUrl){this._fallbackUrl=fallbackUrl;return this;}\nwithGraphqlEndpoint(graphqlEndpoint){this._gqlEndpoint=graphqlEndpoint;return this;}\nwithGraphqlCustomerToken(graphqlCustomerToken){this._customerToken=graphqlCustomerToken;return this;}\nforStoreView(storeViewCode){this._storeViewCode=storeViewCode;return this;}\nwithPaymentNamespace(location){this._paymentLocation=location;return this;}\nwithVaultNamespace(){this._shouldInitVault=true;return this;}\nload(){const pullScriptParams=this._constructPullScriptParams();const initializeSdkParams=this._constructInitializeSdkParams();return load(pullScriptParams,initializeSdkParams);}\n_constructPullScriptParams(){if(!this._preferredUrl){throw new Error(\"Missing required argument: 'preferredUrl'.\");}\nreturn{preferredUrl:this._preferredUrl,fallbackUrl:this._fallbackUrl||null,};}\n_constructInitializeSdkParams(){return{gqlEndpoint:this._gqlEndpoint||null,customerToken:this._customerToken||null,storeViewCode:this._storeViewCode||null,paymentLocation:this._paymentLocation||null,shouldInitVault:!!this._shouldInitVault,};}}\nfunction load(pullScriptParams,initializeSdkParams){const memoKey=createLoadMemoKey(pullScriptParams,initializeSdkParams);if(!(memoKey in loadMemo)){loadMemo[memoKey]=doLoad(pullScriptParams,initializeSdkParams);}\nreturn loadMemo[memoKey];}\nconst loadMemo={};function createLoadMemoKey(pullScriptParams,initializeSdkParams){const pullScriptParamsJson=objToSortedJsonString(pullScriptParams);const initSdkParamsJson=objToSortedJsonString(initializeSdkParams);return`{pullScriptParams:${pullScriptParamsJson},initializeSdkParams:${initSdkParamsJson}}`;}\nasync function doLoad(pullScriptParams,initializeSdkParams){const PaymentServicesSDK=await pullScript(pullScriptParams);return await initializeSdk(PaymentServicesSDK,initializeSdkParams);}\nlet cachedPullScriptResult=null;function pullScript(pullScriptParams){if(!cachedPullScriptResult){cachedPullScriptResult=doPullScript(pullScriptParams);}\nif(pullScriptParams.preferredUrl!==cachedPullScriptResult.preferredUrl||pullScriptParams.fallbackUrl!==cachedPullScriptResult.fallbackUrl){const urls=(data)=>`urls(preferred = ${data.preferredUrl}, fallback = ${data.fallbackUrl})`;console.warn(`Ignoring request to pull Payment Services SDK script from ${urls(pullScriptParams)}, as `+`loading multiple versions of the Payment Services SDK script on the same page is not supported, `+`and the Payment Services SDK script was already loaded from ${urls(cachedPullScriptResult)}.`);}\nreturn cachedPullScriptResult.promise;}\nfunction doPullScript({preferredUrl,fallbackUrl}){const promise=scriptLoader.loadCustom({url:preferredUrl}).catch((error)=>{if(fallbackUrl){console.warn(`Failed to load Payment Services SDK script from preferred URL ${preferredUrl}. Retrying with fallback URL ${fallbackUrl}.`,error,);}else{console.warn(`Failed to load Payment Services SDK script from preferred URL ${preferredUrl}. Retrying with same URL as no fallback URL was provided.`,error,);}\nreturn scriptLoader.loadCustom({url:fallbackUrl||preferredUrl});}).then(()=>
2{if(\"PaymentServicesSDK\"in window){return{PaymentServicesSDK:window.PaymentServicesSDK};}else{throw new Error(\"Script loaded, but Payment Services SDK not found.\");}});return{preferredUrl,fallbackUrl,promise};}\nfunction initializeSdk(paymentServicesScript,initializeSdkParams){const memoKey=createInitializeSdkMemoKey(initializeSdkParams);if(!(memoKey in initializeSdkMemo)){initializeSdkMemo[memoKey]=doInitializeSdk(paymentServicesScript,initializeSdkParams);}\nreturn initializeSdkMemo[memoKey];}\nconst initializeSdkMemo={};const createInitializeSdkMemoKey=objToSortedJsonString;function doInitializeSdk({PaymentServicesSDK},initializeSdkParams){const sdkConfig=constructSdkConfig(initializeSdkParams);const sdk=new PaymentServicesSDK(sdkConfig);const namespaceInitFutures=[];if(initializeSdkParams.paymentLocation){namespaceInitFutures.push(sdk.Payment.init({location:initializeSdkParams.paymentLocation,}));}\nif(initializeSdkParams.shouldInitVault){namespaceInitFutures.push(sdk.Vault.init());}\nreturn Promise.all(namespaceInitFutures).then(()=>sdk);}\nfunction constructSdkConfig(initializeSdkParams){const sdkConfig={};if(initializeSdkParams.gqlEndpoint){sdkConfig[\"apiUrl\"]=initializeSdkParams.gqlEndpoint;}\nif(initializeSdkParams.customerToken){sdkConfig[\"getCustomerToken\"]=()=>initializeSdkParams.customerToken;}\nif(initializeSdkParams.storeViewCode){sdkConfig[\"storeViewCode\"]=initializeSdkParams.storeViewCode;}\nreturn sdkConfig;}\nfunction objToSortedJsonString(obj){return JSON.stringify(obj,Object.keys(obj).sort());}\nreturn()=>new PaymentSdkLoader();});","Magento_PaymentServicesPaypal/js/lib/script-loader-wrapper.min.js":"define(['underscore','Magento_PaymentServicesPaypal/js/lib/script-loader'],function(_,scriptLoader){'use strict';var promises={},defaultNamespace='paypal';function processParamsSrc(params){var processedParams=_.clone(params),url=new URL(params.src),queryString=url.search.substring(1),urlParams=JSON.parse('{\"'+\ndecodeURI(queryString).replace(/\"/g,'\\\\\"').replace(/&/g,'\",\"').replace(/=/g,'\":\"')+'\"}');_.extend(processedParams,urlParams);delete processedParams.src;return processedParams;}\nfunction convertToParamsObject(params){var processedParams={};_.each(params,function(param){processedParams[param.name]=param.value;});return processedParams;}\nreturn function(params,sdkNamespace){var src;if(!params||!params.length){return Promise.reject();}\nparams=convertToParamsObject(params);params['data-namespace']=sdkNamespace||defaultNamespace;if(!params||!params.src){return Promise.reject();}\nsrc=params.src;if(!promises[src]){params=processParamsSrc(params);promises[src]=scriptLoader.load(params);}\nreturn promises[src];};});","Magento_PaymentServicesPaypal/js/lib/script-loader.min.js":"/*!\n * paypal-js v3.1.1 (2021-03-14T21:08:07.006Z)\n * Copyright 2020-present, PayPal, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar paypalLoadScript=function(t){\"use strict\";function e(t,e){var r=document.querySelector('script[src=\"'.concat(t,'\"]'));if(null===r)return null;var n=a(t,e);if(Object.keys(r.dataset).length!==Object.keys(n.dataset).length)return null;var o=!0;return Object.keys(r.dataset).forEach((function(t){r.dataset[t]!==n.dataset[t]&&(o=!1)})),o?r:null}function r(t){var e=t.url,r=t.attributes,n=t.onSuccess,o=t.onError,i=a(e,r);i.onerror=o,i.onload=n,document.head.insertBefore(i,document.head.firstElementChild)}function n(t){var e=\"https://www.paypal.com/sdk/js\";t.sdkBaseURL&&(e=t.sdkBaseURL,delete t.sdkBaseURL);var r=function(t,e){var r=\"\",n=\"\";Array.isArray(t)?t.length>
21?(r=\"*\",n=t.toString()):r=t.toString():\"string\"==typeof t&&t.length>0?r=t:\"string\"==typeof e&&e.length>0&&(r=\"*\",n=e);return{\"merchant-id\":r,\"data-merchant-id\":n}}(t[\"merchant-id\"],t[\"data-merchant-id\"]),n=Object.assign(t,r),a=Object.keys(n).filter((function(t){return void 0!==n[t]&&null!==n[t]&&\"\"!==n[t]})).reduce((function(t,e){var r=n[e].toString();return\"data-\"===e.substring(0,5)?t.dataAttributes[e]=r:t.queryParams[e]=r,t}),{queryParams:{},dataAttributes:{}}),i=a.queryParams,u=a.dataAttributes;return{url:\"\".concat(e,\"?\").concat(o(i)),dataAttributes:u}}function o(t){var e=\"\";return Object.keys(t).forEach((function(r){0!==e.length&&(e+=\"&\"),e+=r+\"=\"+t[r]})),e}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.createElement(\"script\");return r.src=t,Object.keys(e).forEach((function(t){r.setAttribute(t,e[t]),\"data-csp-nonce\"===t&&r.setAttribute(\"nonce\",e[\"data-csp-nonce\"])})),r}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u();s(t,e);var n=t.url,o=t.attributes;if(\"string\"!=typeof n||0===n.length)throw new Error(\"Invalid url.\");if(void 0!==o&&\"object\"!=typeof o)throw new Error(\"Expected attributes to be an object.\");return new e((function(t,e){if(\"undefined\"==typeof window)return t();r({url:n,attributes:o,onSuccess:function(){return t()},onError:function(){return e(new Error('The script \"'.concat(n,'\" failed to load.')))}})}))}function u(){if(\"undefined\"==typeof Promise)throw new Error(\"Promise is undefined. To resolve the issue, use a Promise polyfill.\");return Promise}function c(t){return window[t]}function s(t,e){if(\"object\"!=typeof t||null===t)throw new Error(\"Expected an options object.\");if(void 0!==e&&\"function\"!=typeof e)throw new Error(\"Expected PromisePonyfill to be a function.\")}return t.loadCustomScript=i,t.loadScript=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u();if(s(t,r),\"undefined\"==typeof window)return r.resolve(null);var o=n(t),a=o.url,d=o.dataAttributes,l=d[\"data-namespace\"]||\"paypal\",f=c(l);return e(a,d)&&f?r.resolve(f):i({url:a,attributes:d},r).then((function(){var t=c(l);if(t)return t;throw new Error(\"The window.\".concat(l,\" global variable is not available.\"))}))},t.version=\"3.1.1\",Object.defineProperty(t,\"__esModule\",{value:!0}),t}({});window.paypalLoadCustomScript=paypalLoadScript.loadCustomScript,window.paypalLoadScript=paypalLoadScript.loadScript;\n","Magento_PaymentServicesPaypal/js/view/errors/response-error.min.js":"define([],function(){'use strict';function ResponseError(message){this.name='ResponseError';this.message=message;this.stack=new Error().stack;}\nResponseError.prototype=new Error;ResponseError.prototype.toString=function(){return this.message;};return ResponseError;});","Magento_PaymentServicesPaypal/js/view/payment/methods/hosted-fields.min.js":"define(['underscore','uiComponent','mage/translate','Magento_PaymentServicesPaypal/js/view/errors/response-error','scriptLoader'],function(_,Class,$t,ResponseError,loadSdkScript){'use strict';return Class.extend({defaults:{sdkNamespace:'paypal',paypal:null,formId:'hosted-fields-form',instance:undefined,createOrderUrl:null,orderCreateErrorMessage:{default:$t('Failed to place order. Try again or refresh the page if that does not resolve the issue.'),'POSTAL_CODE_REQUIRED':$t('Postal code is required.'),'CITY_REQUIRED':$t('City is required.')},styles:{input:{color:'#ccc','font-family':'\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif','font-size':'16px','font-weight':'400'},':focus':{color:'#333'},'.valid':{color:'#333'}},fields:{number:{class:'number',selector:'#${ $.formId } .${ $.fields.number.class }',placeholder:''},expirationDate:{class:'expiration-date',selector:'#${ $.formId } .${ $.fields.expirationDate.class }',placeholder:'MM/YY'},cvv:{class:'cvv',selector:'#${ $.formId } .${ $.fields.cvv.class }',placeholder:''}},scriptParams:[],sdkLoaded:null,shouldCardBeVaulted:false},initialize:function(config){_.bindAll(this,'createOrder');if(config.fields){this.constructor.defaults.fields=config.fields;}\nthis._super();
2this.sdkLoaded=loadSdkScript(this.scriptParams,this.sdkNamespace).then(function(sdkScript){this.paypal=sdkScript;}.bind(this));return this;},initObservable:function(){this._super().observe('shouldCardBeVaulted');return this;},isEligible:function(){return typeof this.paypal!=='undefined'&&this.paypal.HostedFields&&this.paypal.HostedFields.isEligible();},render:function(){return this.paypal.HostedFields.render({createOrder:this.createOrder,styles:this.styles,fields:this.fields}).then(function(instance){this.instance=instance;return instance;}.bind(this));},beforeCreateOrder:function(){return Promise.resolve();},createOrder:function(){return this.beforeCreateOrder().then(function(){const shouldCardBeVaulted=this.shouldCardBeVaulted(),orderData=new FormData();orderData.append('payment_source',this.paymentSource);return fetch(`${this.createOrderUrl}?vault=${shouldCardBeVaulted}`,{method:'POST',headers:{},body:orderData});}.bind(this)).then(function(res){return res.json();}).then(function(data){if(data.response['is_successful']){this.onOrderSuccess(data.response['paypal-order']);}else{throw new ResponseError(this.orderCreateErrorMessage[data.response.message]||this.orderCreateErrorMessage.default);}\nreturn data.response['paypal-order'].id;}.bind(this)).catch(function(error){if(error instanceof ResponseError){throw error;}\nthrow new ResponseError(this.orderCreateErrorMessage.default);}.bind(this));},onOrderSuccess:function(){}});});","Magento_Security/js/escaper.min.js":"define([],function(){'use strict';return{neverAllowedElements:['script','img','embed','iframe','video','source','object','audio'],generallyAllowedAttributes:['id','class','href','title','style'],forbiddenAttributesByElement:{a:['style']},escapeHtml:function(data,allowedTags){var domParser=new DOMParser(),fragment=domParser.parseFromString('<div></div>','text/html');fragment=fragment.body.childNodes[0];allowedTags=typeof allowedTags==='object'&&allowedTags.length?allowedTags:null;if(allowedTags){fragment.innerHTML=data||'';allowedTags=this._filterProhibitedTags(allowedTags);this._removeComments(fragment);this._removeNotAllowedElements(fragment,allowedTags);this._removeNotAllowedAttributes(fragment);return fragment.innerHTML;}\nfragment.textContent=data||'';return fragment.innerHTML;},_filterProhibitedTags:function(tags){return tags.filter(function(n){return this.neverAllowedElements.indexOf(n)===-1;}.bind(this));},_removeComments:function(node){var treeWalker=node.ownerDocument.createTreeWalker(node,NodeFilter.SHOW_COMMENT,function(){return NodeFilter.FILTER_ACCEPT;},false),nodesToRemove=[];while(treeWalker.nextNode()){nodesToRemove.push(treeWalker.currentNode);}\nnodesToRemove.forEach(function(nodeToRemove){nodeToRemove.parentNode.removeChild(nodeToRemove);});},_removeNotAllowedElements:function(node,allowedTags){var treeWalker=node.ownerDocument.createTreeWalker(node,NodeFilter.SHOW_ELEMENT,function(currentNode){return allowedTags.indexOf(currentNode.nodeName.toLowerCase())===-1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP;},false),nodesToRemove=[];while(treeWalker.nextNode()){if(allowedTags.indexOf(treeWalker.currentNode.nodeName.toLowerCase())===-1){nodesToRemove.push(treeWalker.currentNode);}}\nnodesToRemove.forEach(function(nodeToRemove){nodeToRemove.parentNode.replaceChild(node.ownerDocument.createTextNode(nodeToRemove.textContent),nodeToRemove);});},_removeNotAllowedAttributes:function(node){var treeWalker=node.ownerDocument.createTreeWalker(node,NodeFilter.SHOW_ELEMENT,function(){return NodeFilter.FILTER_ACCEPT;},false),i,attribute,nodeName,attributesToRemove=[];while(treeWalker.nextNode()){for(i=0;i<treeWalker.currentNode.attributes.length;i++){attribute=treeWalker.currentNode.attributes[i];nodeName=treeWalker.currentNode.nodeName.toLowerCase();if(this.generallyAllowedAttributes.indexOf(attribute.name)===-1||this._checkHrefValue(attribute)||this.forbiddenAttributesByElement[nodeName]&&this.forbiddenAttributesByElement[nodeName].indexOf(attribute.name)!==-1){attributesToRemove.push(attribute);}}}\nattributesToRemove.forEach(function(attributeToRemove){attributeToRemove.ownerElement.removeAttribute(attributeToRemove.name);});}
2,_checkHrefValue:function(attribute){return attribute.nodeName.toLowerCase()==='href'&&attribute.nodeValue.toLowerCase().replace(/\\s/g,'').startsWith('javascript');}};});","Magento_PageBuilder/js/resource/slick/slick.min.js":"/*\n _ _ _ _\n ___| (_) ___| | __ (_)___\n/ __| | |/ __| |/ / | / __|\n\\__ \\ | | (__| < _ | \\__ \\\n|___/_|_|\\___|_|\\_(_)/ |___/\n |__/\n\n Version: 1.7.1\n Author: Ken Wheeler\n Website: http://kenwheeler.github.io\n Docs: http://kenwheeler.github.io/slick\n Repo: http://github.com/kenwheeler/slick\n Issues: http://github.com/kenwheeler/slick/issues\n\n */\n/* global window, document, define, jQuery, setInterval, clearInterval */\n;(function(factory) {\n 'use strict';\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (typeof exports !== 'undefined') {\n module.exports = factory(require('jquery'));\n } else {\n factory(jQuery);\n }\n\n}(function($) {\n 'use strict';\n var Slick = window.Slick || {};\n\n Slick = (function() {\n var instanceUid = 0;\n\n function Slick(element, settings) {\n var _ = this, dataSettings;\n\n _.defaults = {\n accessibility: true,\n adaptiveHeight: false,\n appendArrows: $(element),\n appendDots: $(element),\n arrows: true,\n asNavFor: null,\n prevArrow: '<button class=\"slick-prev\" aria-label=\"Previous\" type=\"button\">Previous</button>',\n nextArrow: '<button class=\"slick-next\" aria-label=\"Next\" type=\"button\">Next</button>',\n autoplay: false,\n autoplaySpeed: 3000,\n centerMode: false,\n centerPadding: '50px',\n cssEase: 'ease',\n customPaging: function(slider, i) {\n return $('<button type=\"button\" />').text(i + 1);\n },\n dots: false,\n dotsClass: 'slick-dots',\n draggable: true,\n easing: 'linear',\n edgeFriction: 0.35,\n fade: false,\n focusOnSelect: false,\n focusOnChange: false,\n infinite: true,\n initialSlide: 0,\n lazyLoad: 'ondemand',\n mobileFirst: false,\n pauseOnHover: true,\n pauseOnFocus: true,\n pauseOnDotsHover: false,\n respondTo: 'window',\n responsive: null,\n rows: 1,\n rtl: false,\n slide: '',\n slidesPerRow: 1,\n slidesToShow: 1,\n slidesToScroll: 1,\n speed: 500,\n swipe: true,\n swipeToSlide: false,\n touchMove: true,\n touchThreshold: 5,\n useCSS: true,\n useTransform: true,\n variableWidth: false,\n vertical: false,\n verticalSwiping: false,\n waitForAnimate: true,\n zIndex: 1000\n };\n\n _.initials = {\n animating: false,\n dragging: false,\n autoPlayTimer: null,\n currentDirection: 0,\n currentLeft: null,\n currentSlide: 0,\n direction: 1,\n $dots: null,\n listWidth: null,\n listHeight: null,\n loadIndex: 0,\n $nextArrow: null,\n $prevArrow: null,\n scrolling: false,\n slideCount: null,\n slideWidth: null,\n $slideTrack: null,\n $slides: null,\n sliding: false,\n slideOffset: 0,\n swipeLeft: null,\n swiping: false,\n $list: null,\n touchObject: {},\n transformsEnabled: false,\n unslicked: fal
2se\n };\n\n $.extend(_, _.initials);\n\n _.activeBreakpoint = null;\n _.animType = null;\n _.animProp = null;\n _.breakpoints = [];\n _.breakpointSettings = [];\n _.cssTransitions = false;\n _.focussed = false;\n _.interrupted = false;\n _.hidden = 'hidden';\n _.paused = true;\n _.positionProp = null;\n _.respondTo = null;\n _.rowCount = 1;\n _.shouldClick = true;\n _.$slider = $(element);\n _.$slidesCache = null;\n _.transformType = null;\n _.transitionType = null;\n _.visibilityChange = 'visibilitychange';\n _.windowWidth = 0;\n _.windowTimer = null;\n\n dataSettings = $(element).data('slick') || {};\n\n _.options = $.extend({}, _.defaults, settings, dataSettings);\n\n _.currentSlide = _.options.initialSlide;\n\n _.originalSettings = _.options;\n\n if (typeof document.mozHidden !== 'undefined') {\n _.hidden = 'mozHidden';\n _.visibilityChange = 'mozvisibilitychange';\n } else if (typeof document.webkitHidden !== 'undefined') {\n _.hidden = 'webkitHidden';\n _.visibilityChange = 'webkitvisibilitychange';\n }\n\n _.autoPlay = $.proxy(_.autoPlay, _);\n _.autoPlayClear = $.proxy(_.autoPlayClear, _);\n _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);\n _.changeSlide = $.proxy(_.changeSlide, _);\n _.clickHandler = $.proxy(_.clickHandler, _);\n _.selectHandler = $.proxy(_.selectHandler, _);\n _.setPosition = $.proxy(_.setPosition, _);\n _.swipeHandler = $.proxy(_.swipeHandler, _);\n _.dragHandler = $.proxy(_.dragHandler, _);\n _.keyHandler = $.proxy(_.keyHandler, _);\n\n _.instanceUid = instanceUid++;\n\n // A simple way to check for HTML strings\n // Strict HTML recognition (must start with <)\n // Extracted from jQuery v1.11 source\n _.htmlExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*)$/;\n\n\n _.registerBreakpoints();\n _.init(true);\n\n }\n\n return Slick;\n\n }());\n\n Slick.prototype.activateADA = function() {\n var _ = this;\n\n _.$slideTrack.find('.slick-active').attr({\n 'aria-hidden': 'false'\n }).find('a, input, button, select').attr({\n 'tabindex': '0'\n });\n\n };\n\n Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {\n\n var _ = this;\n\n if (typeof(index) === 'boolean') {\n addBefore = index;\n index = null;\n } else if (index < 0 || (index >= _.slideCount)) {\n return false;\n }\n\n _.unload();\n\n if (typeof(index) === 'number') {\n if (index === 0 && _.$slides.length === 0) {\n $(markup).appendTo(_.$slideTrack);\n } else if (addBefore) {\n $(markup).insertBefore(_.$slides.eq(index));\n } else {\n $(markup).insertAfter(_.$slides.eq(index));\n }\n } else {\n if (addBefore === true) {\n $(markup).prependTo(_.$slideTrack);\n } else {\n $(markup).appendTo(_.$slideTrack);\n }\n }\n\n _.$slides = _.$slideTrack.children(this.options.slide);\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slideTrack.append(_.$slides);\n\n _.$slides.each(function(index, element) {\n $(element).attr('data-slick-index', index);\n });\n\n _.$slidesCache = _.$slides;\n\n _.reinit();\n\n };\n\n Slick.prototype.animateHeight = function() {\n var _ = this;\n if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {\n var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);\n _.$list.animate({\n height: targetHeight\n }, _.options.speed);\n }\n };\n\n Slick.prototype.animateSlide = function(targetLeft, callback) {\n\n var animProps = {},\n _ = this;\n\n _.animateHeight();\n\n if (_.options.rtl === true && _.options.vertical === false) {\n targetLeft = -targetLeft;\n }\n if (_.transformsEnabled === false) {\n if (_.options.vertical === false) {\n _.$slideTrack.animate({\n left: targetLeft\n }, _.options.speed, _.options.easing, callback);\n } else {\n _.$slideTrack.animate({\n top: targetLeft\n }, _.options.speed, _.options.easing, callback);\n }\n\n } else {\n\n if (_.cssTransitions === false) {\n if (_.options.rtl === true) {\n _.currentLeft = -(_.currentLeft);\n }\n $({\n animStart: _.currentLeft\n }).animate({\n animStart: targetLeft\n }, {\n duration: _.options.speed,\n easing: _.options.easing,\n step: function(now) {\n now = Math.ceil(now);\n if (_.options.vertical === false) {\n animProps[_.animType] = 'translate(' +\n now + 'px, 0px)';\n _.$slideTrack.css(animProps);\n } else {\n animProps[_.animType] = 'translate(0px,' +\n now + 'px)';\n _.$slideTrack.css(animProps);\n }\n }
2,\n complete: function() {\n if (callback) {\n callback.call();\n }\n }\n });\n\n } else {\n\n _.applyTransition();\n targetLeft = Math.ceil(targetLeft);\n\n if (_.options.vertical === false) {\n animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';\n } else {\n animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';\n }\n _.$slideTrack.css(animProps);\n\n if (callback) {\n setTimeout(function() {\n\n _.disableTransition();\n\n callback.call();\n }, _.options.speed);\n }\n\n }\n\n }\n\n };\n\n Slick.prototype.getNavTarget = function() {\n\n var _ = this,\n asNavFor = _.options.asNavFor;\n\n if ( asNavFor && asNavFor !== null ) {\n asNavFor = $(asNavFor).not(_.$slider);\n }\n\n return asNavFor;\n\n };\n\n Slick.prototype.asNavFor = function(index) {\n\n var _ = this,\n asNavFor = _.getNavTarget();\n\n if ( asNavFor !== null && typeof asNavFor === 'object' ) {\n asNavFor.each(function() {\n var target = $(this).slick('getSlick');\n if(!target.unslicked) {\n target.slideHandler(index, true);\n }\n });\n }\n\n };\n\n Slick.prototype.applyTransition = function(slide) {\n\n var _ = this,\n transition = {};\n\n if (_.options.fade === false) {\n transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;\n } else {\n transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;\n }\n\n if (_.options.fade === false) {\n _.$slideTrack.css(transition);\n } else {\n _.$slides.eq(slide).css(transition);\n }\n\n };\n\n Slick.prototype.autoPlay = function() {\n\n var _ = this;\n\n _.autoPlayClear();\n\n if ( _.slideCount > _.options.slidesToShow ) {\n _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );\n }\n\n };\n\n Slick.prototype.autoPlayClear = function() {\n\n var _ = this;\n\n if (_.autoPlayTimer) {\n clearInterval(_.autoPlayTimer);\n }\n\n };\n\n Slick.prototype.autoPlayIterator = function() {\n\n var _ = this,\n slideTo = _.currentSlide + _.options.slidesToScroll;\n\n if ( !_.paused && !_.interrupted && !_.focussed ) {\n\n if ( _.options.infinite === false ) {\n\n if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {\n _.direction = 0;\n }\n\n else if ( _.direction === 0 ) {\n\n slideTo = _.currentSlide - _.options.slidesToScroll;\n\n if ( _.currentSlide - 1 === 0 ) {\n _.direction = 1;\n }\n\n }\n\n }\n\n _.slideHandler( slideTo );\n\n }\n\n };\n\n Slick.prototype.buildArrows = function() {\n\n var _ = this;\n\n if (_.options.arrows === true ) {\n\n _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');\n _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');\n\n if( _.slideCount > _.options.slidesToShow ) {\n\n _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');\n _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');\n\n if (_.htmlExpr.test(_.options.prevArrow)) {\n _.$prevArrow.prependTo(_.options.appendArrows);\n }\n\n if (_.htmlExpr.test(_.options.nextArrow)) {\n _.$nextArrow.appendTo(_.options.appendArrows);\n }\n\n if (_.options.infinite !== true) {\n _.$prevArrow\n .addClass('slick-disabled')\n .attr('aria-disabled', 'true');\n }\n\n } else {\n\n _.$prevArrow.add( _.$nextArrow )\n\n .addClass('slick-hidden')\n .attr({\n 'aria-disabled': 'true',\n 'tabindex': '-1'\n });\n\n }\n\n }\n\n };
2\n\n Slick.prototype.buildDots = function() {\n\n var _ = this,\n i, dot;\n\n if (_.options.dots === true) {\n\n _.$slider.addClass('slick-dotted');\n\n dot = $('<ul />').addClass(_.options.dotsClass);\n\n for (i = 0; i <= _.getDotCount(); i += 1) {\n dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));\n }\n\n _.$dots = dot.appendTo(_.options.appendDots);\n\n _.$dots.find('li').first().addClass('slick-active');\n\n }\n\n };\n\n Slick.prototype.buildOut = function() {\n\n var _ = this;\n\n _.$slides =\n _.$slider\n .children( _.options.slide + ':not(.slick-cloned)')\n .addClass('slick-slide');\n\n _.slideCount = _.$slides.length;\n\n _.$slides.each(function(index, element) {\n $(element)\n .attr('data-slick-index', index)\n .data('originalStyling', $(element).attr('style') || '');\n });\n\n _.$slider.addClass('slick-slider');\n\n _.$slideTrack = (_.slideCount === 0) ?\n $('<div class=\"slick-track\"/>').appendTo(_.$slider) :\n _.$slides.wrapAll('<div class=\"slick-track\"/>').parent();\n\n _.$list = _.$slideTrack.wrap(\n '<div class=\"slick-list\"/>').parent();\n _.$slideTrack.css('opacity', 0);\n\n if (_.options.centerMode === true || _.options.swipeToSlide === true) {\n _.options.slidesToScroll = 1;\n }\n\n $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');\n\n _.setupInfinite();\n\n _.buildArrows();\n\n _.buildDots();\n\n _.updateDots();\n\n\n _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);\n\n if (_.options.draggable === true) {\n _.$list.addClass('draggable');\n }\n\n };\n\n Slick.prototype.buildRows = function() {\n\n var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;\n\n newSlides = document.createDocumentFragment();\n originalSlides = _.$slider.children();\n\n if(_.options.rows > 1) {\n\n slidesPerSection = _.options.slidesPerRow * _.options.rows;\n numOfSlides = Math.ceil(\n originalSlides.length / slidesPerSection\n );\n\n for(a = 0; a < numOfSlides; a++){\n var slide = document.createElement('div');\n for(b = 0; b < _.options.rows; b++) {\n var row = document.createElement('div');\n for(c = 0; c < _.options.slidesPerRow; c++) {\n var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));\n if (originalSlides.get(target)) {\n row.appendChild(originalSlides.get(target));\n }\n }\n slide.appendChild(row);\n }\n newSlides.appendChild(slide);\n }\n\n _.$slider.empty().append(newSlides);\n _.$slider.children().children().children()\n .css({\n 'width':(100 / _.options.slidesPerRow) + '%',\n 'display': 'inline-block'\n });\n\n }\n\n };\n\n Slick.prototype.checkResponsive = function(initial, forceUpdate) {\n\n var _ = this,\n breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;\n var sliderWidth = _.$slider.width();\n var windowWidth = window.innerWidth || $(window).width();\n\n if (_.respondTo === 'window') {\n respondToWidth = windowWidth;\n } else if (_.respondTo === 'slider') {\n respondToWidth = sliderWidth;\n } else if (_.respondTo === 'min') {\n respondToWidth = Math.min(windowWidth, sliderWidth);\n }\n\n if ( _.options.responsive &&\n _.options.responsive.length &&\n _.o
2ptions.responsive !== null) {\n\n targetBreakpoint = null;\n\n for (breakpoint in _.breakpoints) {\n if (_.breakpoints.hasOwnProperty(breakpoint)) {\n if (_.originalSettings.mobileFirst === false) {\n if (respondToWidth < _.breakpoints[breakpoint]) {\n targetBreakpoint = _.breakpoints[breakpoint];\n }\n } else {\n if (respondToWidth > _.breakpoints[breakpoint]) {\n targetBreakpoint = _.breakpoints[breakpoint];\n }\n }\n }\n }\n\n if (targetBreakpoint !== null) {\n if (_.activeBreakpoint !== null) {\n if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {\n _.activeBreakpoint =\n targetBreakpoint;\n if (_.breakpointSettings[targetBreakpoint] === 'unslick') {\n _.unslick(targetBreakpoint);\n } else {\n _.options = $.extend({}, _.originalSettings,\n _.breakpointSettings[\n targetBreakpoint]);\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n }\n triggerBreakpoint = targetBreakpoint;\n }\n } else {\n _.activeBreakpoint = targetBreakpoint;\n if (_.breakpointSettings[targetBreakpoint] === 'unslick') {\n _.unslick(targetBreakpoint);\n } else {\n _.options = $.extend({}, _.originalSettings,\n _.breakpointSettings[\n targetBreakpoint]);\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n }\n triggerBreakpoint = targetBreakpoint;\n }\n } else {\n if (_.activeBreakpoint !== null) {\n _.activeBreakpoint = null;\n _.options = _.originalSettings;\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n triggerBreakpoint = targetBreakpoint;\n }\n }\n\n // only trigger breakpoints during an actual break. not on initialize.\n if( !initial && triggerBreakpoint !== false ) {\n _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);\n }\n }\n\n };\n\n Slick.prototype.changeSlide = function(event, dontAnimate) {\n\n var _ = this,\n $target = $(event.currentTarget),\n indexOffset, slideOffset, unevenOffset;\n\n // If target is a link, prevent default action.\n if($target.is('a')) {\n event.preventDefault();\n }\n\n // If target is not the <li> element (ie: a child), find the <li>.\n if(!$target.is('li')) {\n $target = $target.closest('li');\n }\n\n unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);\n indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;\n\n switch (event.data.message) {\n\n case 'previous':\n slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;\n if (_.slideCount > _.options.slidesToShow) {\n _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);\n }\n break;\n\n case 'next':\n slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;\n if (_.slideCount > _.options.slidesToShow) {\n _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);\n }\n break;\n\n case 'index':\n var index = event.data.index === 0 ? 0 :\n event.data.index || $target.index() * _.options.slidesToScroll;\n\n _.slideHandler(_.checkNavigable(index), false, dontAnimate);\n $target.children().trigger('focus');\n break;\n\n default:\n return;\n }\n\n };\n\n Slick.prototype.checkNavigable = function(index) {\n\n var _ = this,\n navigables, prevNavigable;\n\n navigables = _.getNavigableIndexes();\n prevNavigable = 0;\n if (index > navigables[navigables.length - 1]) {\n index = navigables[navigables.length - 1];\n } else {\n for (var n in navigables) {\n if (index < navigables[n]) {\n index = prevNavigable;\n break;\n }\n prevNavigable = navigables[n];\n }\n }\n\n return index;\n };
2\n\n Slick.prototype.cleanUpEvents = function() {\n\n var _ = this;\n\n if (_.options.dots && _.$dots !== null) {\n\n $('li', _.$dots)\n .off('click.slick', _.changeSlide)\n .off('mouseenter.slick', $.proxy(_.interrupt, _, true))\n .off('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n if (_.options.accessibility === true) {\n _.$dots.off('keydown.slick', _.keyHandler);\n }\n }\n\n _.$slider.off('focus.slick blur.slick');\n\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);\n _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);\n\n if (_.options.accessibility === true) {\n _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);\n _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);\n }\n }\n\n _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);\n _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);\n _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
2\n _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);\n\n _.$list.off('click.slick', _.clickHandler);\n\n $(document).off(_.visibilityChange, _.visibility);\n\n _.cleanUpSlideEvents();\n\n if (_.options.accessibility === true) {\n _.$list.off('keydown.slick', _.keyHandler);\n }\n\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().off('click.slick', _.selectHandler);\n }\n\n $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);\n\n $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);\n\n $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);\n\n $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);\n\n };\n\n Slick.prototype.cleanUpSlideEvents = function() {\n\n var _ = this;\n\n _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));\n _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n };\n\n Slick.prototype.cleanUpRows = function() {\n\n var _ = this, originalSlides;\n\n if(_.options.rows > 1) {\n originalSlides = _.$slides.children().children();\n originalSlides.removeAttr('style');\n _.$slider.empty().append(originalSlides);\n }\n\n };\n\n Slick.prototype.clickHandler = function(event) {\n\n var _ = this;\n\n if (_.shouldClick === false) {\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n }\n\n };\n\n Slick.prototype.destroy = function(refresh) {\n\n var _ = this;\n\n _.autoPlayClear();\n\n _.touchObject = {};\n\n _.cleanUpEvents();\n\n $('.slick-cloned', _.$slider).detach();\n\n if (_.$dots) {\n _.$dots.remove();\n }\n\n if ( _.$prevArrow && _.$prevArrow.length ) {\n\n _.$prevArrow\n .removeClass('slick-disabled slick-arrow slick-hidden')\n .removeAttr('aria-hidden aria-disabled tabindex')\n .css('display','');\n\n if ( _.htmlExpr.test( _.options.prevArrow )) {\n _.$prevArrow.remove();\n }\n }\n\n if ( _.$nextArrow && _.$nextArrow.length ) {\n\n _.$nextArrow\n .removeClass('slick-disabled slick-arrow slick-hidden')\n .removeAttr('aria-hidden aria-disabled tabindex')\n .css('display','');\n\n if ( _.htmlExpr.test( _.options.nextArrow )) {\n _.$nextArrow.remove();\n }\n }\n\n\n if (_.$slides) {\n\n _.$slides\n .removeClass('slick-slide slick-active slick-center slick-visible slick-current')\n .removeAttr('aria-hidden')\n .removeAttr('data-slick-index')\n .each(function(){\n $(this).attr('style', $(this).data('originalStyling'));\n });\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slideTrack.detach();\n\n _.$list.detach();\n\n _.$slider.append(_.$slides);\n }\n\n _.cleanUpRows();\n\n _.$slider.removeClass('slick-slider');\n _.$slider.removeClass('slick-initialized');\n _.$slider.removeClass('slick-dotted');\n\n _.unslicked = true;\n\n if(!refresh) {\n _.$slider.trigger('destroy', [_]);\n }\n\n };\n\n Slick.prototype.disableTransition = function(slide) {\n\n var _ = this,\n transition = {};\n\n transition[_.transitionType] = '';\n\n if (_.options.fade === false) {\n _.$slideTrack.css(transition);\n } else {\n _.$slides.eq(slide).css(transition);\n }\n\n };\n\n Slick.prototype.fadeSlide = function(slideIndex, callback) {\n\n var _ = this;\n\n if (_.cssTransitions === false) {\n\n _.$slides.eq(slideIndex).css({\n zIndex: _.options.zIndex\n });\n\n _.$slides.eq(slideIndex).animate({\n opacity: 1\n }, _.options.speed, _.options.easing, callback);\n\n } else {\n\n _.applyTransition(slideIndex);\n\n _.$slides.eq(slideIndex).css({\n opacity: 1,\n zIndex: _.options.zIndex\n });\n\n if (callback) {\n setTimeout(function() {\
2n\n _.disableTransition(slideIndex);\n\n callback.call();\n }, _.options.speed);\n }\n\n }\n\n };\n\n Slick.prototype.fadeSlideOut = function(slideIndex) {\n\n var _ = this;\n\n if (_.cssTransitions === false) {\n\n _.$slides.eq(slideIndex).animate({\n opacity: 0,\n zIndex: _.options.zIndex - 2\n }, _.options.speed, _.options.easing);\n\n } else {\n\n _.applyTransition(slideIndex);\n\n _.$slides.eq(slideIndex).css({\n opacity: 0,\n zIndex: _.options.zIndex - 2\n });\n\n }\n\n };\n\n Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {\n\n var _ = this;\n\n if (filter !== null) {\n\n _.$slidesCache = _.$slides;\n\n _.unload();\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slidesCache.filter(filter).appendTo(_.$slideTrack);\n\n _.reinit();\n\n }\n\n };\n\n Slick.prototype.focusHandler = function() {\n\n var _ = this;\n\n _.$slider\n .off('focus.slick blur.slick')\n .on('focus.slick blur.slick', '*', function(event) {\n\n //event.stopImmediatePropagation();\n var $sf = $(this);\n\n setTimeout(function() {\n\n if( _.options.pauseOnFocus ) {\n _.focussed = $sf.is(':focus');\n _.autoPlay();\n }\n\n }, 0);\n\n });\n };\n\n Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {\n\n var _ = this;\n return _.currentSlide;\n\n };\n\n Slick.prototype.getDotCount = function() {\n\n var _ = this;\n\n var breakPoint = 0;\n var counter = 0;\n var pagerQty = 0;\n\n if (_.options.infinite === true) {\n if (_.slideCount <= _.options.slidesToShow) {\n ++pagerQty;\n } else {\n while (breakPoint < _.slideCount) {\n ++pagerQty;\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n }\n } else if (_.options.centerMode === true) {\n pagerQty = _.slideCount;\n } else if(!_.options.asNavFor) {\n pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);\n }else {\n while (breakPoint < _.slideCount) {\n ++pagerQty;\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n }\n\n return pagerQty - 1;\n\n };\n\n Slick.prototype.getLeft = function(slideIndex) {\n\n var _ = this,\n targetLeft,\n verticalHeight,\n verticalOffset = 0,\n targetSlide,\n coef;\n\n _.slideOffset = 0;\n verticalHeight = _.$slides.first().outerHeight(true);\n\n if (_.options.infinite === true) {\n if (_.slideCount > _.options.slidesToShow) {\n _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;\n coef = -1\n\n if (_.options.vertical === true && _.options.centerMode === true) {\n if (_.options.slidesToShow === 2) {\n coef = -1.5;\n } else if (_.options.slidesToShow === 1) {\n coef = -2\n }\n }\n verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;\n }\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {\n if (slideIndex > _.slideCount) {\n _.slideOffset = ((_.options.slidesToShow - (sl
2ideIndex - _.slideCount)) * _.slideWidth) * -1;\n verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;\n } else {\n _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;\n verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;\n }\n }\n }\n } else {\n if (slideIndex + _.options.slidesToShow > _.slideCount) {\n _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;\n verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;\n }\n }\n\n if (_.slideCount <= _.options.slidesToShow) {\n _.slideOffset = 0;\n verticalOffset = 0;\n }\n\n if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {\n _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);\n } else if (_.options.centerMode === true && _.options.infinite === true) {\n _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;\n } else if (_.options.centerMode === true) {\n _.slideOffset = 0;\n _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);\n }\n\n if (_.options.vertical === false) {\n targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;\n } else {\n targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;\n }\n\n if (_.options.variableWidth === true) {\n\n if (_.slideCount <= _.options.slidesToShow || _.o
2ptions.infinite === false) {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);\n } else {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);\n }\n\n if (_.options.rtl === true) {\n if (targetSlide[0]) {\n targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;\n } else {\n targetLeft = 0;\n }\n } else {\n targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;\n }\n\n if (_.options.centerMode === true) {\n if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);\n } else {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);\n }\n\n if (_.options.rtl === true) {\n if (targetSlide[0]) {\n targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;\n } else {\n targetLeft = 0;\n }\n } else {\n targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;\n }\n\n targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;\n }\n }\n\n return targetLeft;\n\n };\n\n Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {\n\n var _ = this;\n\n return _.options[option];\n\n };\n\n Slick.prototype.getNavigableIndexes = function() {\n\n var _ = this,\n breakPoint = 0,\n counter = 0,\n indexes = [],\n max;\n\n if (_.options.infinite === false) {\n max = _.slideCount;\n } else {\n breakPoint = _.options.slidesToScroll * -1;\n counter = _.options.slidesToScroll * -1;\n max = _.slideCount * 2;\n }\n\n while (breakPoint < max) {\n indexes.push(breakPoint);\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n\n return indexes;\n\n };\n\n Slick.prototype.getSlick = function() {\n\n return this;\n\n };\n\n Slick.prototype.getSlideCount = function() {\n\n var _ = this,\n slidesTraversed, swipedSlide, centerOffset;\n\n centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;\n\n if (_.options.swipeToSlide === true) {\n _.$slideTrack.find('.slick-slide').each(function(index, slide) {\n if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {\n swipedSlide = slide;\n return false;\n }\n });\n\n slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;\n\n return slidesTraversed;\n\n } else {\n return _.options.slidesToScroll;\n }\n\n };\n\n Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {\n\n var _ = this;\n\n _.changeSlide({\n data: {\n message: 'index',\n index: parseInt(slide)\n }\n }, dontAnimate);\n\n };\n\n Slick.prototype.init = function(creation) {\n\n var _ = this;\n\n if (!$(_.$slider).hasClass('slick-initialized')) {\n\n $(_.$slider).addClass('slick-initialized');\n\n _.buildRows();\n _.buildOut();\n _.setProps();\n _.startLoad();\n _.loadSlider();\n _.initializeEvents();\n _.updateArrows();\n _.updateDots();\n _.checkResponsive(true);\n _.focusHandler();\n\n }\n\n if (creation) {\n _.$slider.trigger('init', [_]);\n }\n\n if (_.options.accessibility === true) {\n _.initADA();\n }\n\n if ( _.options.autoplay ) {\n\n _.paused = false;\n _.autoPlay();\n\n }\n\n };
2\n\n Slick.prototype.initADA = function() {\n var _ = this,\n numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),\n tabControlIndexes = _.getNavigableIndexes().filter(function(val) {\n return (val >= 0) && (val < _.slideCount);\n });\n\n _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({\n 'aria-hidden': 'true',\n 'tabindex': '-1'\n }).find('a, input, button, select').attr({\n 'tabindex': '-1'\n });\n\n if (_.$dots !== null) {\n _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {\n var slideControlIndex = tabControlIndexes.indexOf(i);\n\n $(this).attr({\n 'role': 'tabpanel',\n 'id': 'slick-slide' + _.instanceUid + i,\n 'tabindex': -1\n });\n\n if (slideControlIndex !== -1) {\n $(this).attr({\n 'aria-describedby': 'slick-slide-control' + _.instanceUid + slideControlIndex\n });\n }\n });\n\n _.$dots.attr('role', 'tablist').find('li').each(function(i) {\n var mappedSlideIndex = tabControlIndexes[i];\n\n $(this).attr({\n 'role': 'presentation'\n });\n\n var btn = $(this).find('button').first(),\n label = (btn[0].hasAttribute('aria-label')) ? btn.attr('aria-label') : 'Carousel control ' + (i + 1) + ' of ' + numDotGroups;\n\n btn.attr({\n 'role': 'tab',\n 'id': 'slick-slide-control' + _.instanceUid + i,\n 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,\n 'aria-label':label,\n 'aria-selected': 'false',\n 'tab-index': '-1'\n });\n\n }).eq(_.currentSlide).find('button').attr({\n 'aria-selected': 'true',\n 'tabindex': '0'\n }).end();\n }\n\n /*for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {\n _.$slides.eq(i).attr('tabindex', 0);\n }*/\n\n /// >>\n for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {\n _.$slides.eq(i).attr('tabindex', 0);\n }\n /// <<\n\n _.activateADA();\n\n };\n\n Slick.prototype.initArrowEvents = function() {\n\n var _ = this;\n\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n _.$prevArrow\n .off('click.slick')\n .on('click.slick', {\n message: 'previous'\n }, _.changeSlide);\n _.$nextArrow\n .off('click.slick')\n .on('click.slick', {\n message: 'next'\n }, _.changeSlide);\n\n if (_.options.accessibility === true) {\n _.$prevArrow.on('keydown.slick', _.keyHandler);\n _.$nextArrow.on('keydown.slick', _.keyHandler);\n }\n }\n\n };\n\n Slick.prototype.initDotEvents = function() {\n\n var _ = this;\n\n if (_.options.dots === true) {\n $('li', _.$dots).on('click.slick', {\n message: 'index'\n }, _.changeSlide);\n\n if (_.options.accessibility === true) {\n _.$dots.on('keydown.slick', _.keyHandler);\n }\n }\n\n if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) {\n\n $('li', _.$dots)\n .on('mouseenter.slick', $.proxy(_.interrupt, _, true))\n .on('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n }\n\n };\n\n Slick.prototype.initSlideEvents = function() {\n\n var _ = this;\n\n if ( _.options.pauseOnHover ) {\n\n _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
2\n _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));\n\n }\n\n };\n\n Slick.prototype.initializeEvents = function() {\n\n var _ = this;\n\n _.initArrowEvents();\n\n _.initDotEvents();\n _.initSlideEvents();\n\n _.$list.on('touchstart.slick mousedown.slick', {\n action: 'start'\n }, _.swipeHandler);\n _.$list.on('touchmove.slick mousemove.slick', {\n action: 'move'\n }, _.swipeHandler);\n _.$list.on('touchend.slick mouseup.slick', {\n action: 'end'\n }, _.swipeHandler);\n _.$list.on('touchcancel.slick mouseleave.slick', {\n action: 'end'\n }, _.swipeHandler);\n\n _.$list.on('click.slick', _.clickHandler);\n\n $(document).on(_.visibilityChange, $.proxy(_.visibility, _));\n\n if (_.options.accessibility === true) {\n _.$list.on('keydown.slick', _.keyHandler);\n }\n\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().on('click.slick', _.selectHandler);\n }\n\n $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));\n\n $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));\n\n $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);\n\n $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);\n $(_.setPosition);\n\n };\n\n Slick.prototype.initUI = function() {\n\n var _ = this;\n\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n\n _.$prevArrow.show();\n _.$nextArrow.show();\n\n }\n\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n\n _.$dots.show();\n\n }\n\n };\n\n Slick.prototype.keyHandler = function(event) {\n\n var _ = this;\n //Dont slide if the cursor is inside the form fields and arrow keys are pressed\n if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {\n if (event.keyCode === 37 && _.options.accessibility === true) {\n _.changeSlide({\n data: {\n message: _.options.rtl === true ? 'next' : 'previous'\n }\n });\n } else if (event.keyCode === 39 && _.options.accessibility === true) {\n _.changeSlide({\n data: {\n message: _.options.rtl === true ? 'previous' : 'next'\n }\n });\n }\n }\n\n };\n\n Slick.prototype.lazyLoad = function() {\n\n var _ = this,\n loadRange, cloneRange, rangeStart, rangeEnd;\n\n function loadImages(imagesScope) {\n\n $('img[data-lazy]', imagesScope).each(function() {\n\n var image = $(this),\n imageSource = $(this).attr('data-lazy'),\n imageSrcSet = $(this).attr('data-srcset'),\n imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),\n imageToLoad = document.createElement('img');\n\n imageToLoad.onload = function() {\n\n image\n .animate({ opacity: 0 }, 100, function() {\n\n if (imageSrcSet) {\n image\n .attr('srcset', imageSrcSet );\n\n if (imageSizes) {\n image\n .attr('sizes', imageSizes );\n }\n }\n\n image\n .attr('src', imageSource)\n .animate({ opacity: 1 }, 200, function() {\n image\n .removeAttr('data-lazy data-srcset data-sizes')\n .removeClass('slick-loading');\n });\n _.$slider.trigger('lazyLoaded', [_, image, imageSource]);\n });\n\n };
2\n\n imageToLoad.onerror = function() {\n\n image\n .removeAttr( 'data-lazy' )\n .removeClass( 'slick-loading' )\n .addClass( 'slick-lazyload-error' );\n\n _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);\n\n };\n\n imageToLoad.src = imageSource;\n\n });\n\n }\n\n if (_.options.centerMode === true) {\n if (_.options.infinite === true) {\n rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);\n rangeEnd = rangeStart + _.options.slidesToShow + 2;\n } else {\n rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));\n rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;\n }\n } else {\n rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;\n rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);\n if (_.options.fade === true) {\n if (rangeStart > 0) rangeStart--;\n if (rangeEnd <= _.slideCount) rangeEnd++;\n }\n }\n\n loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);\n\n if (_.options.lazyLoad === 'anticipated') {\n var prevSlide = rangeStart - 1,\n nextSlide = rangeEnd,\n $slides = _.$slider.find('.slick-slide');\n\n for (var i = 0; i < _.options.slidesToScroll; i++) {\n if (prevSlide < 0) prevSlide = _.slideCount - 1;\n loadRange = loadRange.add($slides.eq(prevSlide));\n loadRange = loadRange.add($slides.eq(nextSlide));\n prevSlide--;\n nextSlide++;\n }\n }\n\n loadImages(loadRange);\n\n if (_.slideCount <= _.options.slidesToShow) {\n cloneRange = _.$slider.find('.slick-slide');\n loadImages(cloneRange);\n } else\n if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {\n cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);\n loadImages(cloneRange);\n } else if (_.currentSlide === 0) {\n cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);\n loadImages(cloneRange);\n }\n\n };\n\n Slick.prototype.loadSlider = function() {\n\n var _ = this;\n\n _.setPosition();\n\n _.$slideTrack.css({\n opacity: 1\n });\n\n _.$slider.removeClass('slick-loading');\n\n _.initUI();\n\n if (_.options.lazyLoad === 'progressive') {\n _.progressiveLazyLoad();\n }\n\n };\n\n Slick.prototype.next = Slick.prototype.slickNext = function() {\n\n var _ = this;\n\n _.changeSlide({\n data: {\n message: 'next'\n }\n });\n\n };\n\n Slick.prototype.orientationChange = function() {\n\n var _ = this;\n\n _.checkResponsive();\n _.setPosition();\n\n };\n\n Slick.prototype.pause = Slick.prototype.slickPause = function() {\n\n var _ = this;\n\n _.autoPlayClear();\n _.paused = true;\n\n };\n\n Slick.prototype.play = Slick.prototype.slickPlay = function() {\n\n var _ = this;\n\n _.autoPlay();\n _.options.autoplay = true;\n _.paused = false;\n _.focussed = false;\n _.interrupted = false;\n\n };\n\n Slick.prototype.postSlide = function(index) {\n\n var _ = this;\n\n if( !_.unslicked ) {\n\n _.$slider.trigger('afterChange', [_, index]);\n\n _.animating = false;\n\n if (_.slideCount > _.options.slidesToShow) {\n _.setPosition();\n }\n\n _.swipeLeft = null;\n\n if ( _.options.autoplay ) {\n _.autoPlay();\n }\n\n if (_.options.accessibility === true) {\n _.initADA();\n\n if (_.options.focusOnChange) {\n var $currentSlide = $(_.$slides.get(_.currentSlide));\n $currentSlide.attr('tabindex', 0).focus();\n }\n }\n\n }\n\n };\n\n Slick.prototype.prev = Slick.prototype.slickPrev = function() {\
2n\n var _ = this;\n\n _.changeSlide({\n data: {\n message: 'previous'\n }\n });\n\n };\n\n Slick.prototype.preventDefault = function(event) {\n\n event.preventDefault();\n\n };\n\n Slick.prototype.progressiveLazyLoad = function( tryCount ) {\n\n tryCount = tryCount || 1;\n\n var _ = this,\n $imgsToLoad = $( 'img[data-lazy]', _.$slider ),\n image,\n imageSource,\n imageSrcSet,\n imageSizes,\n imageToLoad;\n\n if ( $imgsToLoad.length ) {\n\n image = $imgsToLoad.first();\n imageSource = image.attr('data-lazy');\n imageSrcSet = image.attr('data-srcset');\n imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');\n imageToLoad = document.createElement('img');\n\n imageToLoad.onload = function() {\n\n if (imageSrcSet) {\n image\n .attr('srcset', imageSrcSet );\n\n if (imageSizes) {\n image\n .attr('sizes', imageSizes );\n }\n }\n\n image\n .attr( 'src', imageSource )\n .removeAttr('data-lazy data-srcset data-sizes')\n .removeClass('slick-loading');\n\n if ( _.options.adaptiveHeight === true ) {\n _.setPosition();\n }\n\n _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);\n _.progressiveLazyLoad();\n\n };\n\n imageToLoad.onerror = function() {\n\n if ( tryCount < 3 ) {\n\n /**\n * try to load the image 3 times,\n * leave a slight delay so we don't get\n * servers blocking the request.\n */\n setTimeout( function() {\n _.progressiveLazyLoad( tryCount + 1 );\n }, 500 );\n\n } else {\n\n image\n .removeAttr( 'data-lazy' )\n .removeClass( 'slick-loading' )\n .addClass( 'slick-lazyload-error' );\n\n _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);\n\n _.progressiveLazyLoad();\n\n }\n\n };\n\n imageToLoad.src = imageSource;\n\n } else {\n\n _.$slider.trigger('allImagesLoaded', [ _ ]);\n\n }\n\n };\n\n Slick.prototype.refresh = function( initializing ) {\n\n var _ = this, currentSlide, lastVisibleIndex;\n\n lastVisibleIndex = _.slideCount - _.options.slidesToShow;\n\n // in non-infinite sliders, we don't want to go past the\n // last visible index.\n if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {\n _.currentSlide = lastVisibleIndex;\n }\n\n // if less slides than to show, go to start.\n if ( _.slideCount <= _.options.slidesToShow ) {\n _.currentSlide = 0;\n\n }\n\n currentSlide = _.currentSlide;\n\n _.destroy(true);\n\n $.extend(_, _.initials, { currentSlide: currentSlide });\n\n _.init();\n\n if( !initializing ) {\n\n _.changeSlide({\n data: {\n message: 'index',\n index: currentSlide\n }\n }, false);\n\n }\n\n };\n\n Slick.prototype.registerBreakpoints = function() {\n\n var _ = this, breakpoint, currentBreakpoint, l,\n responsiveSettings = _.options.responsive || null;\n\n if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {\n\n _.respondTo = _.options.respondTo || 'window';\n\n for ( breakpoint in responsiveSettings ) {\n\n l = _.breakpoints.length-1;\n\n if (responsiveSettings.hasOwnProperty(breakpoint)) {\n currentBreakpoint = responsiveSettings[breakpoint].breakpoint;\n\n // loop through the breakpoints and cut out any existing\n // ones with the same breakpoint number, we don't want dupes.\n while( l >= 0 ) {\n if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {\n _.breakpoints.splice(l,1);\n }\n l--;\n }\n\n _.breakpoints.push(currentBreakpoint);\n _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;\n\n }\n\n }\n\n _.breakpoints.sort(function(a, b) {\n return ( _.options.mobileFirst ) ? a-b : b-a;\n });\n\n }\n\n };
2\n\n Slick.prototype.reinit = function() {\n\n var _ = this;\n\n _.$slides =\n _.$slideTrack\n .children(_.options.slide)\n .addClass('slick-slide');\n\n _.slideCount = _.$slides.length;\n\n if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {\n _.currentSlide = _.currentSlide - _.options.slidesToScroll;\n }\n\n if (_.slideCount <= _.options.slidesToShow) {\n _.currentSlide = 0;\n }\n\n _.registerBreakpoints();\n\n _.setProps();\n _.setupInfinite();\n _.buildArrows();\n _.updateArrows();\n _.initArrowEvents();\n _.buildDots();\n _.updateDots();\n _.initDotEvents();\n _.cleanUpSlideEvents();\n _.initSlideEvents();\n\n _.checkResponsive(false, true);\n\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().on('click.slick', _.selectHandler);\n }\n\n _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);\n\n _.setPosition();\n _.focusHandler();\n\n _.paused = !_.options.autoplay;\n _.autoPlay();\n\n _.$slider.trigger('reInit', [_]);\n\n };\n\n Slick.prototype.resize = function() {\n\n var _ = this;\n\n if ($(window).width() !== _.windowWidth) {\n clearTimeout(_.windowDelay);\n _.windowDelay = window.setTimeout(function() {\n _.windowWidth = $(window).width();\n _.checkResponsive();\n if( !_.unslicked ) { _.setPosition(); }\n }, 50);\n }\n };\n\n Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {\n\n var _ = this;\n\n if (typeof(index) === 'boolean') {\n removeBefore = index;\n index = removeBefore === true ? 0 : _.slideCount - 1;\n } else {\n index = removeBefore === true ? --index : index;\n }\n\n if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {\n return false;\n }\n\n _.unload();\n\n if (removeAll === true) {\n _.$slideTrack.children().remove();\n } else {\n _.$slideTrack.children(this.options.slide).eq(index).remove();\n }\n\n _.$slides = _.$slideTrack.children(this.options.slide);\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slideTrack.append(_.$slides);\n\n _.$slidesCache = _.$slides;\n\n _.reinit();\n\n };\n\n Slick.prototype.setCSS = function(position) {\n\n var _ = this,\n positionProps = {},\n x, y;\n\n if (_.options.rtl === true) {\n position = -position;\n }\n x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';\n y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';\n\n positionProps[_.positionProp] = position;\n\n if (_.transformsEnabled === false) {\n _.$slideTrack.css(positionProps);\n } else {\n positionProps = {};\n if (_.cssTransitions === false) {\n positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';\n _.$slideTrack.css(positionProps);\n } else {\n positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';\n _.$slideTrack.css(positionProps);\n }\n }\n\n };\n\n Slick.prototype.setDimensions = function() {\n\n var _ = this;\n\n if (_.options.vertical === false) {\n if (_.options.centerMode === true) {\n _.$list.css({\n padding: ('0px ' + _.options.centerPadding)\n });\n }\n } else {\n _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);\n if (_.options.centerMode === true) {\n _.$list.css({\n padding: (_.options.centerPadding + ' 0px')\n });\n }\n }\n\n _.listWidth = _.$list.width();\n _.listHeight = _.$list.height();\n\n\n if (_.options.vertical === false && _.options.variableWidth === false) {\n _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);\n _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));\n\n } else if (_.options.variableWidth === true) {\n _.$slideTrack.width(5000 * _.slideCount);\n } else {\n _.slideWidth = Math.ceil(_.listWidth);\n _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));\n }\n\n var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();\n if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);\n\n };
2\n\n Slick.prototype.setFade = function() {\n\n var _ = this,\n targetLeft;\n\n _.$slides.each(function(index, element) {\n targetLeft = (_.slideWidth * index) * -1;\n if (_.options.rtl === true) {\n $(element).css({\n position: 'relative',\n right: targetLeft,\n top: 0,\n zIndex: _.options.zIndex - 2,\n opacity: 0\n });\n } else {\n $(element).css({\n position: 'relative',\n left: targetLeft,\n top: 0,\n zIndex: _.options.zIndex - 2,\n opacity: 0\n });\n }\n });\n\n _.$slides.eq(_.currentSlide).css({\n zIndex: _.options.zIndex - 1,\n opacity: 1\n });\n\n };\n\n Slick.prototype.setHeight = function() {\n\n var _ = this;\n\n if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {\n var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);\n _.$list.css('height', targetHeight);\n }\n\n };\n\n Slick.prototype.setOption =\n Slick.prototype.slickSetOption = function() {\n\n /**\n * accepts arguments in format of:\n *\n * - for changing a single option's value:\n * .slick(\"setOption\", option, value, refresh )\n *\n * - for changing a set of responsive options:\n * .slick(\"setOption\", 'responsive', [{}, ...], refresh )\n *\n * - for updating multiple values at once (not responsive)\n * .slick(\"setOption\", { 'option': value, ... }, refresh )\n */\n\n var _ = this, l, item, option, value, refresh = false, type;\n\n if( $.type( arguments[0] ) === 'object' ) {\n\n option = arguments[0];\n refresh = arguments[1];\n type = 'multiple';\n\n } else if ( $.type( arguments[0] ) === 'string' ) {\n\n option = arguments[0];\n value = arguments[1];\n refresh = arguments[2];\n\n if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {\n\n type = 'responsive';\n\n } else if ( typeof arguments[1] !== 'undefined' ) {\n\n type = 'single';\n\n }\n\n }\n\n if ( type === 'single' ) {\n\n _.options[option] = value;\n\n\n } else if ( type === 'multiple' ) {\n\n $.each( option , function( opt, val ) {\n\n _.options[opt] = val;\n\n });\n\n\n } else if ( type === 'responsive' ) {\n\n for ( item in value ) {\n\n if( $.type( _.options.responsive ) !== 'array' ) {\n\n _.options.responsive = [ value[item] ];\n\n } else {\n\n l = _.options.responsive.length-1;\n\n // loop through the responsive object and splice out duplicates.\n while( l >= 0 ) {\n\n if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {\n\n _.options.responsive.splice(l,1);\n\n }\n\n l--;\n\n }\n\n _.options.responsive.push( value[item] );\n\n }\n\n }\n\n }\n\n if ( refresh ) {\n\n _.unload();\n _.reinit();\n\n }\n\n };\n\n Slick.prototype.setPosition = function() {\n\n var _ = this;\n\n _.setDimensions();\n\n _.setHeight();\n\n if (_.options.fade === false) {\n _.setCSS(_.getLeft(_.currentSlide));\n } else {\n _.setFade();\n }\n\n _.$slider.trigger('setPosition', [_]);\n\n };\n\n Slick.prototype.setProps = function() {\n\n var _ = this,\n bodyStyle = document.body.style;\n\n _.positionProp = _.options.vertical === true ? 'top' : 'left';\n\n if (_.positionProp === 'top') {\n _.$slider.addClass('slick-vertical');\n } else {\n _.$slider.removeClass('slick-vertical');\n }\n\n if (bodyStyle.WebkitTransition !== undefined ||\n bodyStyle.MozTransition !== undefined ||\n bodyStyle.msTransition !== undefined) {\n if (_.options.useCSS === true) {\n _.cssTransitions = true;\n }\n }\n\n if ( _.options.fade ) {\n if ( typeof _.options.zIndex === 'number' ) {\n if( _.options.zIndex < 3 ) {\n _.o
2ptions.zIndex = 3;\n }\n } else {\n _.options.zIndex = _.defaults.zIndex;\n }\n }\n\n if (bodyStyle.OTransform !== undefined) {\n _.animType = 'OTransform';\n _.transformType = '-o-transform';\n _.transitionType = 'OTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.MozTransform !== undefined) {\n _.animType = 'MozTransform';\n _.transformType = '-moz-transform';\n _.transitionType = 'MozTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.webkitTransform !== undefined) {\n _.animType = 'webkitTransform';\n _.transformType = '-webkit-transform';\n _.transitionType = 'webkitTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.msTransform !== undefined) {\n _.animType = 'msTransform';\n _.transformType = '-ms-transform';\n _.transitionType = 'msTransition';\n if (bodyStyle.msTransform === undefined) _.animType = false;\n }\n if (bodyStyle.transform !== undefined && _.animType !== false) {\n _.animType = 'transform';\n _.transformType = 'transform';\n _.transitionType = 'transition';\n }\n _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);\n };\n\n\n Slick.prototype.setSlideClasses = function(index) {\n\n var _ = this,\n centerOffset, allSlides, indexOffset, remainder;\n\n allSlides = _.$slider\n .find('.slick-slide')\n .removeClass('slick-active slick-center slick-current')\n .attr('aria-hidden', 'true');\n\n _.$slides\n .eq(index)\n .addClass('slick-current');\n\n if (_.options.centerMode === true) {\n\n var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;\n\n centerOffset = Math.floor(_.options.slidesToShow / 2);\n\n if (_.options.infinite === true) {\n\n if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {\n _.$slides\n .slice(index - centerOffset + evenCoef, index + centerOffset + 1)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n } else {\n\n indexOffset = _.options.slidesToShow + index;\n allSlides\n .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n }\n\n if (index === 0) {\n\n allSlides\n .eq(allSlides.length - _.slideCount)\n .addClass('slick-center');\n\n } else if (index === _.slideCount - 1) {\n\n allSlides\n .eq(_.options.slidesToShow)\n .addClass('slick-center');\n }\n }\n\n _.$slides\n .eq(index)\n .addClass('slick-center');\n\n } else {\n\n if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {\n\n _.$slides\n .slice(index, index + _.options.slidesToShow)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n } else if (allSlides.length <= _.options.slidesToShow) {\n\n allSlides\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n } else {\n\n remainder = _.slideCount % _.options.slidesToShow;\n indexOffset = _.options.infinite === true ? _.o
2ptions.slidesToShow + index : index;\n\n if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {\n\n allSlides\n .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n } else {\n\n allSlides\n .slice(indexOffset, indexOffset + _.options.slidesToShow)\n .addClass('slick-active')\n .attr('aria-hidden', 'false');\n\n }\n\n }\n\n }\n\n if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {\n _.lazyLoad();\n }\n };\n\n Slick.prototype.setupInfinite = function() {\n\n var _ = this,\n i, slideIndex, infiniteCount;\n\n if (_.options.fade === true) {\n _.options.centerMode = false;\n }\n\n if (_.options.infinite === true && _.options.fade === false) {\n\n slideIndex = null;\n\n if (_.slideCount > _.options.slidesToShow) {\n\n if (_.options.centerMode === true) {\n infiniteCount = _.options.slidesToShow + 1;\n } else {\n infiniteCount = _.options.slidesToShow;\n }\n\n for (i = _.slideCount; i > (_.slideCount -\n infiniteCount); i -= 1) {\n slideIndex = i - 1;\n $(_.$slides[slideIndex]).clone(true).attr('id', '')\n .attr('data-slick-index', slideIndex - _.slideCount)\n .prependTo(_.$slideTrack).addClass('slick-cloned');\n }\n for (i = 0; i < infiniteCount + _.slideCount; i += 1) {\n slideIndex = i;\n $(_.$slides[slideIndex]).clone(true).attr('id', '')\n .attr('data-slick-index', slideIndex + _.slideCount)\n .appendTo(_.$slideTrack).addClass('slick-cloned');\n }\n _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {\n $(this).attr('id', '');\n });\n\n }\n\n }\n\n };\n\n Slick.prototype.interrupt = function( toggle ) {\n\n var _ = this;\n\n if( !toggle ) {\n _.autoPlay();\n }\n _.interrupted = toggle;\n\n };\n\n Slick.prototype.selectHandler = function(event) {\n\n var _ = this;\n\n var targetElement =\n $(event.target).is('.slick-slide') ?\n $(event.target) :\n $(event.target).parents('.slick-slide');\n\n var index = parseInt(targetElement.attr('data-slick-index'));\n\n if (!index) index = 0;\n\n if (_.slideCount <= _.options.slidesToShow) {\n\n _.slideHandler(index, false, true);\n return;\n\n }\n\n _.slideHandler(index);\n\n };\n\n Slick.prototype.slideHandler = function(index, sync, dontAnimate) {\n\n var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,\n _ = this, navTarget;\n\n sync = sync || false;\n\n if (_.animating === true && _.options.waitForAnimate === true) {\n return;\n }\n\n if (_.options.fade === true && _.currentSlide === index) {\n return;\n }\n\n if (sync === false) {\n _.asNavFor(index);\n }\n\n targetSlide = index;\n targetLeft = _.getLeft(targetSlide);\n slideLeft = _.getLeft(_.currentSlide);\n\n _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;\n\n if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {\n if (_.options.fade === false) {\n targetSlide = _.currentSlide;\n if (dontAnimate !== true) {\n _.animateSlide(slideLeft, function() {\
2n _.postSlide(targetSlide);\n });\n } else {\n _.postSlide(targetSlide);\n }\n }\n return;\n } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {\n if (_.options.fade === false) {\n targetSlide = _.currentSlide;\n if (dontAnimate !== true) {\n _.animateSlide(slideLeft, function() {\n _.postSlide(targetSlide);\n });\n } else {\n _.postSlide(targetSlide);\n }\n }\n return;\n }\n\n if ( _.options.autoplay ) {\n clearInterval(_.autoPlayTimer);\n }\n\n if (targetSlide < 0) {\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);\n } else {\n animSlide = _.slideCount + targetSlide;\n }\n } else if (targetSlide >= _.slideCount) {\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n animSlide = 0;\n } else {\n animSlide = targetSlide - _.slideCount;\n }\n } else {\n animSlide = targetSlide;\n }\n\n _.animating = true;\n\n _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);\n\n oldSlide = _.currentSlide;\n _.currentSlide = animSlide;\n\n _.setSlideClasses(_.currentSlide);\n\n if ( _.options.asNavFor ) {\n\n navTarget = _.getNavTarget();\n navTarget = navTarget.slick('getSlick');\n\n if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {\n navTarget.setSlideClasses(_.currentSlide);\n }\n\n }\n\n _.updateDots();\n _.updateArrows();\n\n if (_.options.fade === true) {\n if (dontAnimate !== true) {\n\n _.fadeSlideOut(oldSlide);\n\n _.fadeSlide(animSlide, function() {\n _.postSlide(animSlide);\n });\n\n } else {\n _.postSlide(animSlide);\n }\n _.animateHeight();\n return;\n }\n\n if (dontAnimate !== true) {\n _.animateSlide(targetLeft, function() {\n _.postSlide(animSlide);\n });\n } else {\n _.postSlide(animSlide);\n }\n\n };\n\n Slick.prototype.startLoad = function() {\n\n var _ = this;\n\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n\n _.$prevArrow.hide();\n _.$nextArrow.hide();\n\n }\n\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n\n _.$dots.hide();\n\n }\n\n _.$slider.addClass('slick-loading');\n\n };\n\n Slick.prototype.swipeDirection = function() {\n\n var xDist, yDist, r, swipeAngle, _ = this;\n\n xDist = _.touchObject.startX - _.touchObject.curX;\n yDist = _.touchObject.startY - _.touchObject.curY;\n r = Math.atan2(yDist, xDist);\n\n swipeAngle = Math.round(r * 180 / Math.PI);\n if (swipeAngle < 0) {\n swipeAngle = 360 - Math.abs(swipeAngle);\n }\n\n if ((swipeAngle <= 45) && (swipeAngle >= 0)) {\n return (_.options.rtl === false ? 'left' : 'right');\n }\n if ((swipeAngle <= 360) && (swipeAngle >= 315)) {\n return (_.options.rtl === false ? 'left' : 'right');\n }\n if ((swipeAngle >= 135) && (swipeAngle <= 225)) {\n return (_.options.rtl === false ? 'right' : 'left');\n }\n if (_.options.verticalSwiping === true) {\n if ((swipeAngle >= 35) && (swipeAngle <= 135)) {\n return 'down';\n } else {\n return 'up';\n }\n }\n\n return 'vertical';\n\n };\n\n Slick.prototype.swipeEnd = function(event) {\n\n var _ = this,\n slideCount,\n direction;\n\n _.dragging = false;\n _.swiping = false;\n\n if (_.scrolling) {\n _.scrolling = false;\n return false;\n }\n\n _.interrupted = false;\n _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;\n\n if ( _.touchObject.curX === undefined ) {\n return false;\n }\n\n if ( _.touchObject.edgeHit === true ) {\n _.$slider.trigger('edge', [_, _.swipeDirection() ]);\n }\n\n if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {\n\n direction = _.swipeDirection();\n\n switch ( direction ) {\n\n case 'left':\n case 'down':\n\n slideCount =\n _.o
2ptions.swipeToSlide ?\n _.checkNavigable( _.currentSlide + _.getSlideCount() ) :\n _.currentSlide + _.getSlideCount();\n\n _.currentDirection = 0;\n\n break;\n\n case 'right':\n case 'up':\n\n slideCount =\n _.options.swipeToSlide ?\n _.checkNavigable( _.currentSlide - _.getSlideCount() ) :\n _.currentSlide - _.getSlideCount();\n\n _.currentDirection = 1;\n\n break;\n\n default:\n\n\n }\n\n if( direction != 'vertical' ) {\n\n _.slideHandler( slideCount );\n _.touchObject = {};\n _.$slider.trigger('swipe', [_, direction ]);\n\n }\n\n } else {\n\n if ( _.touchObject.startX !== _.touchObject.curX ) {\n\n _.slideHandler( _.currentSlide );\n _.touchObject = {};\n\n }\n\n }\n\n };\n\n Slick.prototype.swipeHandler = function(event) {\n\n var _ = this;\n\n if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {\n return;\n } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {\n return;\n }\n\n _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?\n event.originalEvent.touches.length : 1;\n\n _.touchObject.minSwipe = _.listWidth / _.options\n .touchThreshold;\n\n if (_.options.verticalSwiping === true) {\n _.touchObject.minSwipe = _.listHeight / _.options\n .touchThreshold;\n }\n\n switch (event.data.action) {\n\n case 'start':\n _.swipeStart(event);\n break;\n\n case 'move':\n _.swipeMove(event);\n break;\n\n case 'end':\n _.swipeEnd(event);\n break;\n\n }\n\n };\n\n Slick.prototype.swipeMove = function(event) {\n\n var _ = this,\n edgeWasHit = false,\n curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;\n\n touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;\n\n if (!_.dragging || _.scrolling || touches && touches.length !== 1) {\n return false;\n }\n\n curLeft = _.getLeft(_.currentSlide);\n\n _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;\n _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;\n\n _.touchObject.swipeLength = Math.round(Math.sqrt(\n Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));\n\n verticalSwipeLength = Math.round(Math.sqrt(\n Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));\n\n if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {\n _.scrolling = true;\n return false;\n }\n\n if (_.options.verticalSwiping === true) {\n _.touchObject.swipeLength = verticalSwipeLength;\n }\n\n swipeDirection = _.swipeDirection();\n\n if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {\n _.swiping = true;\n event.preventDefault();\n }\n\n positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);\n if (_.options.verticalSwiping === true) {\n positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;\n }\n\n\n swipeLength = _.touchObject.swipeLength;\n\n _.touchObject.edgeHit = false;\n\n if (_.options.infinite === false) {\n if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {\n swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;\n _.touchObject.edgeHit = true;\n }\n }\n\n if (_.options.vertical === false) {\n _.swipeLeft = curLeft + swipeLength * positionOffset;\n } else {\n _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;\n }\n if (_.options.verticalSwiping === true) {\n _.swipeLeft = curLeft + swipeLength * positionOffset;\n }\n\n if (_.options.fade === true || _.options.touchMove === false) {\n return false;\n }\n\n if (_.animating === true) {\n _.swipeLeft = null;\n return false;\n }\n\n _.setCSS(_.swipeLeft);\n\n };\n\n Slick.prototype.swipeStart = function(event) {\n\n var _ = this,\n touches;\n\n _.interrupted = true;\n\n if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {\n _.touchObject = {};\n return false;\n }\n\n if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {\n touches = event.originalEvent.touches[0];\n }\n\n _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;\n _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;\n\n _.dragging = true;\n\n };\n\n Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {\
2n\n var _ = this;\n\n if (_.$slidesCache !== null) {\n\n _.unload();\n\n _.$slideTrack.children(this.options.slide).detach();\n\n _.$slidesCache.appendTo(_.$slideTrack);\n\n _.reinit();\n\n }\n\n };\n\n Slick.prototype.unload = function() {\n\n var _ = this;\n\n $('.slick-cloned', _.$slider).remove();\n\n if (_.$dots) {\n _.$dots.remove();\n }\n\n if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {\n _.$prevArrow.remove();\n }\n\n if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {\n _.$nextArrow.remove();\n }\n\n _.$slides\n .removeClass('slick-slide slick-active slick-visible slick-current')\n .attr('aria-hidden', 'true')\n .css('width', '');\n\n };\n\n Slick.prototype.unslick = function(fromBreakpoint) {\n\n var _ = this;\n _.$slider.trigger('unslick', [_, fromBreakpoint]);\n _.destroy();\n\n };\n\n Slick.prototype.updateArrows = function() {\n\n var _ = this,\n centerOffset;\n\n centerOffset = Math.floor(_.options.slidesToShow / 2);\n\n if ( _.options.arrows === true &&\n _.slideCount > _.options.slidesToShow &&\n !_.options.infinite ) {\n\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n\n if (_.currentSlide === 0) {\n\n _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n\n } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {\n\n _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n\n } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {\n\n _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n\n }\n\n }\n\n };\n\n Slick.prototype.updateDots = function() {\n\n var _ = this;\n\n if (_.$dots !== null) {\n\n _.$dots\n .find('li')\n .removeClass('slick-active')\n .end();\n\n _.$dots\n .find('li')\n .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))\n .addClass('slick-active');\n\n }\n\n };\n\n Slick.prototype.visibility = function() {\n\n var _ = this;\n\n if ( _.options.autoplay ) {\n\n if ( document[_.hidden] ) {\n\n _.interrupted = true;\n\n } else {\n\n _.interrupted = false;\n\n }\n\n }\n\n };\n\n $.fn.slick = function() {\n var _ = this,\n opt = arguments[0],\n args = Array.prototype.slice.call(arguments, 1),\n l = _.length,\n i,\n ret;\n for (i = 0; i < l; i++) {\n if (typeof opt == 'object' || typeof opt == 'undefined')\n _[i].slick = new Slick(_[i], opt);\n else\n ret = _[i].slick[opt].apply(_[i].slick, args);\n if (typeof ret != 'undefined') return ret;\n }\n return _;\n };\n\n}));\n","Magento_Translation/js/i18n-config.min.js":"(function(){'use strict';require.config({config:{'Magento_Ui/js/lib/knockout/bindings/i18n':{inlineTranslation:true}}});})();","Magento_Translation/js/mage-translation-dictionary.min.js":"define(['text!js-translation.json'],function(dict){'use strict';return JSON.parse(dict);});","Reflet_Catalog/js/price-utils-mixin.min.js":"define(['jquery','underscore'],function($,_){'use strict';
2return function(target){target.formatPriceLocale=target.formatPrice;return target;};});","Magento_Catalog/js/storage-manager.min.js":"define(['underscore','uiElement','mageUtils','Magento_Catalog/js/product/storage/storage-service','Magento_Customer/js/section-config','jquery'],function(_,Element,utils,storage,sectionConfig,$){'use strict';$(document).on('submit',function(event){var sections;if(event.target.hasAttribute('method')&&event.target.getAttribute('method').match(/post|put|delete/i)){sections=sectionConfig.getAffectedSections(event.target.action);if(sections&&window.localStorage){_.each(sections,function(section){window.localStorage.removeItem(section);});}}});return Element.extend({defaults:{defaultNamespace:{lifetime:1000},storagesConfiguration:{'recently_viewed_product':{namespace:'recently_viewed_product',className:'IdsStorage',lifetime:'${ $.defaultNamespace.lifetime }',requestConfig:{typeId:'${ $.storagesConfiguration.recently_viewed_product.namespace }'},savePrevious:{namespace:'${ $.storagesConfiguration.recently_viewed_product.namespace }'+'_previous',className:'${ $.storagesConfiguration.recently_viewed_product.className }'},allowToSendRequest:0},'recently_compared_product':{namespace:'recently_compared_product',className:'IdsStorageCompare',provider:'compare-products',lifetime:'${ $.defaultNamespace.lifetime }',requestConfig:{typeId:'${ $.storagesConfiguration.recently_compared_product.namespace }'},savePrevious:{namespace:'${ $.storagesConfiguration.recently_compared_product.namespace }'+'_previous',className:'${ $.storagesConfiguration.recently_compared_product.className }'},allowToSendRequest:0},'product_data_storage':{namespace:'product_data_storage',className:'DataStorage',allowToSendRequest:0,updateRequestConfig:{url:'',method:'GET',dataType:'json'}}},requestConfig:{method:'POST',dataType:'json',ajaxSaveType:'default',ignoreProcessEvents:true},requestSent:0},initialize:function(){this._super().prepareStoragesConfig().initStorages().initStartData().initUpdateStorageDataListener();return this;},initStorages:function(){_.each(this.storagesNamespace,function(name){this[name]=storage.createStorage(this.storagesConfiguration[name]);if(this.storagesConfiguration[name].savePrevious){this[name].previous=storage.createStorage(this.storagesConfiguration[name].savePrevious);}}.bind(this));return this;},initStartData:function(){_.each(this.storagesNamespace,function(name){this.updateDataHandler(name,this[name].get());}.bind(this));return this;},prepareStoragesConfig:function(){this.storagesNamespace=_.keys(this.storagesConfiguration);_.each(this.storagesNamespace,function(name){this.storagesConfiguration[name].requestConfig=_.extend(utils.copy(this.requestConfig),this.storagesConfiguration[name].requestConfig);}.bind(this));return this;},getUtcTime:function(){return new Date().getTime()/ 1000;},initUpdateStorageDataListener:function(){_.each(this.storagesNamespace,function(name){if(this[name].data){this[name].data.subscribe(this.updateDataHandler.bind(this,name));}}.bind(this));},updateDataHandler:function(name,data){var previousData=this[name].previous?this[name].previous.get():false;if(!_.isEmpty(previousData)&&!_.isEmpty(data)&&!utils.compare(data,previousData).equal){this[name].set(data);this[name].previous.set(data);this.sendRequest(name,data);}else if(_.isEmpty(previousData)&&!_.isEmpty(data)){this[name].set(data);this.sendRequest(name,data);}},getLastUpdate:function(name){return window.localStorage.getItem(this[name].namespace+'_last_update');},setLastUpdate:function(name){window.localStorage.setItem(this[name].namespace+'_last_update',this.getUtcTime());},requestHandler:function(name){this.setLastUpdate(name);this.requestSent=1;},sendRequest:function(name,data){var params=utils.copy(this.storagesConfiguration[name].requestConfig),url=params.syncUrl,typeId=params.typeId;if(this.requestSent||!~~this.storagesConfiguration[name].allowToSendRequest){return;}\ndelete params.typeId;delete params.url;this.requestSent=1;return utils.ajaxSubmit({url:url,data:{ids:data,'type_id':typeId}},params).done(this.requestHandler.bind(this,name));}});});","Magento_Catalog/js/product/query-builder.min.js":"define(['underscore'],function(_){'use strict';return{buildQuery:function(data){var filters=[];
2_.each(data,function(value,key){filters.push({field:key,value:value,'condition_type':'in'});});return{searchCriteria:{filterGroups:[{filters:filters}]}};}};});","Magento_Catalog/js/product/storage/data-storage.min.js":"define(['jquery','underscore','ko','mageUtils','Magento_Catalog/js/product/query-builder','Magento_Customer/js/customer-data','jquery/jquery-storageapi'],function($,_,ko,utils,queryBuilder,customerData){'use strict';function getParsedDataFromServer(data){var result={};_.each(data.items,function(item){if(item.id){result[item.id]=item;}});return{items:result};}\nfunction setLocalStorageItem(namespace,data){try{window.localStorage.setItem(namespace,JSON.stringify(data));}catch(e){console.warn('localStorage is unavailable - skipping local caching of product data');console.error(e);}}\nreturn{name:'DataStorage',request:{},customerDataProvider:'product_data_storage',initialize:function(){if(!this.data){this.data=ko.observable({});}\nthis.initLocalStorage().initCustomerDataReloadListener().cachesDataFromLocalStorage().initDataListener().initProvideStorage().initProviderListener();return this;},initCustomerDataReloadListener:function(){$(document).on('customer-data-invalidate',this._flushProductStorage.bind(this));return this;},_flushProductStorage:function(event,sections){if(_.isEmpty(sections)||_.contains(sections,'product_data_storage')){this.localStorage.removeAll();}},initDataListener:function(){this.data.subscribe(this.dataHandler.bind(this));return this;},initProvideStorage:function(){this.providerHandler(customerData.get(this.customerDataProvider)());return this;},dataHandler:function(data){if(_.isEmpty(data)){this.localStorage.removeAll();}else{setLocalStorageItem(this.namespace,data);}},providerHandler:function(data){var currentData=utils.copy(this.data()),ids=_.keys(data.items);if(data.items&&ids.length){data=data.items;this.data(_.extend(currentData,data));}},setIds:function(currency,store,ids){if(!this.hasInCache(currency,store,ids)){this.loadDataFromServer(currency,store,ids);}else{this.data.valueHasMutated();}},getDataByIdentifiers:function(currency,store,productIdentifiers){var data={},dataCollection=this.data(),id;for(id in productIdentifiers){if(productIdentifiers.hasOwnProperty(id)){data[id]=dataCollection[id];}}\nreturn data;},hasInCache:function(currency,store,ids){var data=this.data(),id;for(id in ids){if(!data.hasOwnProperty(id)||data[id]['currency_code']!==currency||~~data[id]['store_id']!==~~store){return false;}}\nreturn true;},loadDataFromServer:function(currency,store,ids){var idsArray=_.keys(ids),prepareAjaxParams={'entity_id':idsArray.join(',')};if(this.request.sent&&this.hasIdsInSentRequest(ids)){return;}\nthis.request={sent:true,data:ids};this.updateRequestConfig.data=queryBuilder.buildQuery(prepareAjaxParams);this.updateRequestConfig.data['store_id']=store;this.updateRequestConfig.data['currency_code']=currency;$.ajax(this.updateRequestConfig).done(function(data){this.request={};this.providerHandler(getParsedDataFromServer(data));}.bind(this));},addDataFromPageCache:function(data){this.providerHandler(getParsedDataFromServer(data));},hasIdsInSentRequest:function(ids){var sentDataIds,currentDataIds;if(this.request.data){sentDataIds=_.keys(this.request.data);currentDataIds=_.keys(ids);return _.every(currentDataIds,function(id){return _.lastIndexOf(sentDataIds,id)!==-1;});}\nreturn false;},initProviderListener:function(){customerData.get(this.customerDataProvider).subscribe(this.providerHandler.bind(this));return this;},cachesDataFromLocalStorage:function(){this.data(this.getDataFromLocalStorage());return this;},getDataFromLocalStorage:function(){return this.localStorage.get();},initLocalStorage:function(){this.localStorage=$.initNamespaceStorage(this.namespace).localStorage;return this;}};});","Magento_Catalog/js/product/storage/ids-storage-compare.min.js":"define(['underscore','ko','mageUtils','Magento_Customer/js/customer-data','Magento_Catalog/js/product/storage/ids-storage'],function(_,ko,utils,customerData,idsStorage){'use strict';return _.extend(utils.copy(idsStorage),{name:'IdsStorageCompare',initialize:function(){if(!this.data){this.data=ko.observable({});}\nif(this.provider&&window.checkout&&window.checkout.baseUrl){this.providerDataHandler(customerData.get(this.provider)());this.initProviderListener();}\nthis.initLocalStorage().cachesDataFromLocalStorage().initDataListener();return this;},initProviderListener:function(){customerData.get(this.provider).subscribe(this.providerDataHandler.bind(this));},providerDataHandler:function(data){data=data.items||data;data=this.prepareData(data);this.add(data);},prepareData:function(data){var result={},scopeId;_.each(data,function(item){if(typeof item.productScope!=='undefined'){scopeId=item.productScope==='store'?window.checkout.storeId:item.productScope==='group'?window.checkout.storeGroupId:window.checkout.websiteId;result[item.productScope+'-'+scopeId+'-'+item.id]={'added_at':new Date().getTime()/ 1000,'product_id':item.id,'scope_id':scopeId};}else{result[item.id]={'added_at':new Date().getTime()/ 1000,'product_id':item.id};}});return result;}});});","Magento_Catalog/js/product/storage/ids-storage.min.js":"define(['jquery','underscore','ko','mageUtils','jquery/jquery-storageapi'],function($,_,ko,utils){'use strict';function setLocalStorageItem(namespace,data){try{window.localStorage.setItem(namespace,JSON.stringify(data));}catch(e){console.warn('localStorage is unavailable - skipping local caching of product data');console.error(e);}}\nreturn{name:'IdsStorage',initialize:function(){if(!this.data){this.data=ko.observable({});}\nthis.initCustomerDataReloadListener().initLocalStorage().cachesDataFromLocalStorage().initDataListener();return this;},getDataFromLocalStorage:function(){return this.localStorage.get();},cachesDataFromLocalStorage:function(){this.data(this.getDataFromLocalStorage());return this;},initLocalStorage:function(){this.localStorage=$.initNamespaceStorage(this.namespace).localStorage;return this;},initDataListener:function(){this.data.subscribe(this.internalDataHandler.bind(this));},initCustomerDataReloadListener:function(){$(document).on('customer-data-reload',function(event,sections){if((_.isEmpty(sections)||_.contains(sections,this.namespace))&&~~this.allowToSendRequest){this.localStorage.removeAll();this.data();}}.bind(this));return this;},internalDataHandler:function(data){setLocalStorageItem(this.namespace,data);},externalDataHandler:function(data){data=data.items?data.items:data;this.set(_.extend(utils.copy(this.data()),data));}};});","Magento_Catalog/js/product/storage/storage-service.min.js":"define(['jquery','underscore','mageUtils','mage/translate','Magento_Catalog/js/product/storage/ids-storage','Magento_Catalog/js/product/storage/data-storage','Magento_Catalog/js/product/storage/ids-storage-compare'],function($,_,utils,$t,IdsStorage,DataStore,IdsStorageCompare){'use strict';return(function(){var\nstorages={},classes={},prototype={set:function(data){if(!utils.compare(data,this.data()).equal){this.data(data);}},add:function(data){if(!_.isEmpty(data)){this.data(_.extend(utils.copy(this.data()),data));}},get:function(){return this.data();}},storagesInterface={data:'function',initialize:'function',namespace:'string'},_private={overrideClassMethods:function(extensionMethods,originInstance){var methodsName=_.keys(extensionMethods),i=0,length=methodsName.length;for(i;i<length;i++){if(_.isFunction(originInstance[methodsName[i]])){originInstance[methodsName[i]]=extensionMethods[methodsName[i]];}}\nreturn originInstance;},isImplementInterface:function(classInstance){_.each(storagesInterface,function(key,value){if(typeof classInstance[key]!==value){return false;}});return true;}},subscribers={};(function(){classes[IdsStorage.name]=function(config){_.extend(this,IdsStorage,config);};classes[IdsStorageCompare.name]=function(config){_.extend(this,IdsStorageCompare,config);};classes[DataStore.name]=function(config){_.extend(this,DataStore,config);};_.each(classes,function(classItem){classItem.prototype=prototype;});})();return{createStorage:function(config){var instance,initialized;if(storages[config.namespace]){return storages[config.namespace];}\ninstance=new classes[config.className](config);if(_private.isImplementInterface(instance)){initialized=storages[config.namespace]=instance.initialize();this.processSubscribers(initialized,config);return initialized;}\nthrow new Error('Class '+config.className+$t('does not implement Storage Interface'));},processSubscribers:function(initialized,config){if(subscribers[config.namespace]){_.each(subscribers[config.namespace],function(callback){callback(initialized);});delete subscribers[config.namespace];}},onStorageInit:function(namespace,callback){if(storages[namespace]){callback(storages[namespace]);}else{subscribers[namespace]?subscribers[namespace].push(callback):subscribers[namespace]=[callback];}},getStorage:function(namespace){return storages[namespace];}};})();});","Magento_Catalog/js/product/view/product-ids-resolver.min.js":"define(['underscore','Magento_Catalog/js/product/view/product-ids'],function(_,productIds){'use strict';return function($form){var idSet=productIds(),product=_.findWhere($form.serializeArray(),{name:'product'});if(!_.isUndefined(product)){idSet.push(product.value);}\nreturn _.uniq(idSet);};});","Magento_Catalog/js/product/view/product-ids.min.js":"define(['ko'],function(ko){'use strict';return ko.observableArray([]);});","Magento_Catalog/js/product/view/product-info-resolver.min.js":"define(['underscore','Magento_Catalog/js/product/view/product-info'],function(_,productInfo){'use strict';return function($form){var product=_.findWhere($form.serializeArray(),{name:'product'});if(!_.isUndefined(product)){productInfo().push({'id':product.value});}\nreturn _.uniq(productInfo(),function(item){return item.id;});};});","Magento_Catalog/js/product/view/product-info.min.js":"define(['ko'],function(ko){'use strict';return ko.observableArray([]);});
2","Magento_Catalog/js/product/view/provider.min.js":"define(['underscore','uiElement','Magento_Catalog/js/product/storage/storage-service'],function(_,Element,storage){'use strict';return Element.extend({defaults:{identifiersConfig:{namespace:'recently_viewed_product'},productStorageConfig:{namespace:'product_data_storage',updateRequestConfig:{method:'GET',dataType:'json'},className:'DataStorage'}},initialize:function(){this._super();if(window.checkout&&window.checkout.baseUrl){this.initIdsStorage();}\nthis.initDataStorage();return this;},initIdsStorage:function(){storage.onStorageInit(this.identifiersConfig.namespace,this.idsStorageHandler.bind(this));return this;},initDataStorage:function(){storage.onStorageInit(this.productStorageConfig.namespace,this.dataStorageHandler.bind(this));return this;},dataStorageHandler:function(dataStorage){this.productStorage=dataStorage;this.productStorage.add(this.data.items);},idsStorageHandler:function(idsStorage){this.idsStorage=idsStorage;this.idsStorage.add(this.getIdentifiers());},getIdentifiers:function(){var result={},productCurrentScope=this.data.productCurrentScope,scopeId=productCurrentScope==='store'?window.checkout.storeId:productCurrentScope==='group'?window.checkout.storeGroupId:window.checkout.websiteId;_.each(this.data.items,function(item,key){result[productCurrentScope+'-'+scopeId+'-'+key]={'added_at':new Date().getTime()/ 1000,'product_id':key,'scope_id':scopeId};},this);return result;}});});","Magento_Catalog/js/view/compare-products.min.js":"define(['Magento_Catalog/js/view/sidebar-products','Magento_Customer/js/customer-data','underscore',],function(Sidebar,customerData,_){'use strict';let compareProductsReloaded=false;return Sidebar.extend({initialize:function(){this._super();this.compareProducts=customerData.get('compare-products');let reloadNeeded=false;if(!compareProductsReloaded&&!_.isEmpty(this.compareProducts())){if(_.indexOf(customerData.getExpiredSectionNames(),'compare-products')===-1&&window.checkout&&window.checkout.websiteId&&window.checkout.websiteId!==this.compareProducts().websiteId){reloadNeeded=true;}else if(this._testMissingData()){reloadNeeded=true;}}\nif(reloadNeeded){this.compareProducts().items=[];customerData.reload(['compare-products'],false);compareProductsReloaded=true;}},_testMissingData:function(){const itemTestedParams=['post_data_params'];const item=this.compareProducts().items?.[0]??null;if(item&&this._testMissingParam(item,itemTestedParams)){return true;}\nreturn false;},getCount:function(){return this.compareProducts()?.items?.length??0;},});});","Magento_Catalog/js/view/image.min.js":"define(['uiComponent'],function(Component){'use strict';return Component.extend({initialize:function(){this._super();this.template=window.checkout.imageTemplate||this.template;}});});","Magento_Captcha/js/captcha.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.captcha',{options:{refreshClass:'refreshing',reloadSelector:'.captcha-reload',imageSelector:'.captcha-img',imageLoader:''},_create:function(){this.element.on('click',this.options.reloadSelector,$.proxy(this.refresh,this));},refresh:function(){var imageLoader=this.options.imageLoader;if(imageLoader){this.element.find(this.options.imageSelector).attr('src',imageLoader);}\nthis.element.addClass(this.options.refreshClass);$.ajax({url:this.options.url,type:'post',dataType:'json',context:this,data:{'formId':this.options.type},success:function(response){if(response.imgSrc){this.element.find(this.options.imageSelector).attr('src',response.imgSrc);}},complete:function(){this.element.removeClass(this.options.refreshClass);}});}});return $.mage.captcha;});","Magento_Captcha/js/action/refresh.min.js":"define(['jquery','mage/url'],function($,urlBuilder){'use strict';return function(refreshUrl,formId,imageSource){return $.ajax({url:urlBuilder.build(refreshUrl),type:'POST',data:JSON.stringify({'formId':formId}),global:false,contentType:'application/json'}).done(function(response){if(response.imgSrc){imageSource(response.imgSrc);}});};});","Magento_Captcha/js/model/captcha.min.js":"define(['jquery','ko','Magento_Captcha/js/action/refresh'],function($,ko,refreshAction){'use strict';return function(captchaData){return{formId:captchaData.formId,imageSource:ko.observable(captchaData.imageSrc),visibility:ko.observable(false),captchaValue:ko.observable(null),isRequired:ko.observable(captchaData.isRequired),isCaseSensitive:captchaData.isCaseSensitive,imageHeight:captchaData.imageHeight,refreshUrl:captchaData.refreshUrl,isLoading:ko.observable(false),timestamp:null,getFormId:function(){return this.formId;},setFormId:function(formId){this.formId=formId;},getIsVisible:function(){return this.visibility();},setIsVisible:function(flag){this.visibility(flag);},getIsRequired:function(){return this.isRequired();},setIsRequired:function(flag){this.isRequired(flag);},getIsCaseSensitive:function(){return this.isCaseSensitive;},setIsCaseSensitive:function(flag){this.isCaseSensitive=flag;},getImageHeight:function(){return this.imageHeight;},setImageHeight:function(height){this.imageHeight=height;},getImageSource:function(){return this.imageSource;},setImageSource:function(imageSource){this.imageSource(imageSource);},getRefreshUrl:function(){return this.refreshUrl;},setRefreshUrl:function(url){this.refreshUrl=url;},getCaptchaValue:function(){return this.captchaValue;},setCaptchaValue:function(value){this.captchaValue(value);},refresh:function(){var refresh,self=this;this.isLoading(true);refresh=refreshAction(this.getRefreshUrl(),this.getFormId(),this.getImageSource());$.when(refresh).done(function(){self.isLoading(false);});}};};});","Magento_Captcha/js/model/captchaList.min.js":"define(['jquery'],function($){'use strict';var captchaList=[];return{add:function(captcha){captchaList.push(captcha);},getCaptchaByFormId:function(formId){var captcha=null;$.each(captchaList,function(key,item){if(formId===item.formId){captcha=item;return false;}});return captcha;},getCaptchaList:function(){return captchaList;}};});","Magento_Captcha/js/view/checkout/defaultCaptcha.min.js":"define(['jquery','uiComponent','Magento_Captcha/js/model/captcha','Magento_Captcha/js/model/captchaList','Magento_Customer/js/customer-data','underscore'],function($,Component,Captcha,captchaList,customerData,_){'use strict';var captchaConfig;return Component.extend({defaults:{template:'Magento_Captcha/checkout/captcha'}
2,dataScope:'global',currentCaptcha:null,subscribedFormIds:[],captchaValue:function(){return this.currentCaptcha.getCaptchaValue();},initialize:function(){this._super();if(window[this.configSource]&&window[this.configSource].captcha){captchaConfig=window[this.configSource].captcha;$.each(captchaConfig,function(formId,captchaData){var captcha;captchaData.formId=formId;captcha=Captcha(captchaData);this.checkCustomerData(formId,customerData.get('captcha')(),captcha);this.subscribeCustomerData(formId,captcha);captchaList.add(captcha);}.bind(this));}},checkCustomerData:function(formId,captchaData,captcha){if(!_.isEmpty(captchaData)&&!_.isEmpty(captchaData[formId])&&captchaData[formId].timestamp>captcha.timestamp){if(!captcha.isRequired()&&captchaData[formId].isRequired){captcha.refresh();}\ncaptcha.isRequired(captchaData[formId].isRequired);captcha.timestamp=captchaData[formId].timestamp;}},subscribeCustomerData:function(formId,captcha){if(this.subscribedFormIds.includes(formId)===false){this.subscribedFormIds.push(formId);customerData.get('captcha').subscribe(function(captchaData){this.checkCustomerData(formId,captchaData,captcha);}.bind(this));}},getIsLoading:function(){return this.currentCaptcha!==null?this.currentCaptcha.isLoading:false;},getCurrentCaptcha:function(){return this.currentCaptcha;},setCurrentCaptcha:function(captcha){this.currentCaptcha=captcha;},getFormId:function(){return this.currentCaptcha!==null?this.currentCaptcha.getFormId():null;},getIsVisible:function(){return this.currentCaptcha!==null?this.currentCaptcha.getIsVisible():false;},setIsVisible:function(flag){this.currentCaptcha.setIsVisible(flag);},isRequired:function(){return this.currentCaptcha!==null?this.currentCaptcha.getIsRequired():false;},setIsRequired:function(flag){this.currentCaptcha.setIsRequired(flag);},isCaseSensitive:function(){return this.currentCaptcha!==null?this.currentCaptcha.getIsCaseSensitive():false;},imageHeight:function(){return this.currentCaptcha!==null?this.currentCaptcha.getImageHeight():null;},getImageSource:function(){return this.currentCaptcha!==null?this.currentCaptcha.getImageSource():null;},refresh:function(){this.currentCaptcha.refresh();}});});","Magento_Captcha/js/view/checkout/loginCaptcha.min.js":"define(['Magento_Captcha/js/view/checkout/defaultCaptcha','Magento_Captcha/js/model/captchaList','Magento_Customer/js/action/login','underscore'],function(defaultCaptcha,captchaList,loginAction,_){'use strict';return defaultCaptcha.extend({initialize:function(){var self=this,currentCaptcha;this._super();currentCaptcha=captchaList.getCaptchaByFormId(this.formId);if(currentCaptcha!=null){currentCaptcha.setIsVisible(true);this.setCurrentCaptcha(currentCaptcha);loginAction.registerLoginCallback(function(loginData){if(loginData['captcha_form_id']&&loginData['captcha_form_id']===self.formId&&self.isRequired()){_.defer(self.refresh.bind(self));}});}}});});","Magento_Customer/js/block-submit-on-send.min.js":"define(['jquery','mage/mage'],function($){'use strict';return function(config){var dataForm=$('#'+config.formId);dataForm.on('submit',function(){$('#'+this.id+' div.mage-error').remove();$(this).find(':submit').attr('disabled','disabled');if(this.isValid===false){$(this).find(':submit').prop('disabled',false);}\nthis.isValid=true;});dataForm.on('invalid-form.validate',function(){$(this).find(':submit').prop('disabled',false);this.isValid=false;});};});","Magento_Customer/js/customer-data.min.js":"define(['jquery','underscore','ko','Magento_Customer/js/section-config','mage/url','mage/storage','jquery/jquery-storageapi'],function($,_,ko,sectionConfig,url){'use strict';var options={},storage,storageInvalidation,invalidateCacheBySessionTimeOut,invalidateCacheByCloseCookieSession,dataProvider,buffer,customerData,deferred=$.Deferred();url.setBaseUrl(window.BASE_URL);options.sectionLoadUrl=url.build('customer/section/load');$.cookieStorage.setConf({path:'/',expires:1});storage=$.initNamespaceStorage('mage-cache-storage').localStorage;storageInvalidation=$.initNamespaceStorage('mage-cache-storage-section-invalidation').localStorage;invalidateCacheBySessionTimeOut=function(invalidateOptions){var date;if(new Date($.localStorage.get('mage-cache-timeout'))<new Date()){storage.removeAll();date=new Date(Date.now()+parseInt(invalidateOptions.cookieLifeTime,10)*1000);$.localStorage.set('mage-cache-timeout',date);}};
2invalidateCacheByCloseCookieSession=function(){if(!$.cookieStorage.isSet('mage-cache-sessid')){$.cookieStorage.set('mage-cache-sessid',true);storage.removeAll();}};dataProvider={getFromStorage:function(sectionNames){var result={};_.each(sectionNames,function(sectionName){result[sectionName]=storage.get(sectionName);});return result;},getFromServer:function(sectionNames,forceNewSectionTimestamp){var parameters;sectionNames=sectionConfig.filterClientSideSections(sectionNames);parameters=_.isArray(sectionNames)?{sections:sectionNames.join(',')}:[];parameters['force_new_section_timestamp']=forceNewSectionTimestamp;return $.getJSON(options.sectionLoadUrl,parameters).fail(function(jqXHR){console.log('Failed load section');console.log(jqXHR);throw new Error(jqXHR);});}};ko.extenders.disposableCustomerData=function(target,sectionName){var sectionDataIds,newSectionDataIds={};target.subscribe(function(){setTimeout(function(){storage.remove(sectionName);sectionDataIds=$.cookieStorage.get('section_data_ids')||{};_.each(sectionDataIds,function(data,name){if(name!=sectionName){newSectionDataIds[name]=data;}});$.cookieStorage.set('section_data_ids',newSectionDataIds);},3000);});return target;};buffer={data:{},bind:function(sectionName){this.data[sectionName]=ko.observable({});},get:function(sectionName){if(!this.data[sectionName]){this.bind(sectionName);}\nreturn this.data[sectionName];},keys:function(){return _.keys(this.data);},notify:function(sectionName,sectionData){if(!this.data[sectionName]){this.bind(sectionName);}\nthis.data[sectionName](sectionData);},update:function(sections){var sectionId=0,sectionDataIds=$.cookieStorage.get('section_data_ids')||{};_.each(sections,function(sectionData,sectionName){sectionId=sectionData['data_id'];sectionDataIds[sectionName]=sectionId;storage.set(sectionName,sectionData);storageInvalidation.remove(sectionName);buffer.notify(sectionName,sectionData);});$.cookieStorage.set('section_data_ids',sectionDataIds);},remove:function(sections){_.each(sections,function(sectionName){storage.remove(sectionName);if(!sectionConfig.isClientSideSection(sectionName)){storageInvalidation.set(sectionName,true);}});}};customerData={init:function(){var expiredSectionNames=this.getExpiredSectionNames();if(expiredSectionNames.length>0){_.each(dataProvider.getFromStorage(storage.keys()),function(sectionData,sectionName){buffer.notify(sectionName,sectionData);});this.reload(expiredSectionNames,false);}else{_.each(dataProvider.getFromStorage(storage.keys()),function(sectionData,sectionName){buffer.notify(sectionName,sectionData);});if(!_.isEmpty(storageInvalidation.keys())){this.reload(storageInvalidation.keys(),false);}}},getExpiredSectionNames:function(){var expiredSectionNames=[],cookieSectionTimestamps=$.cookieStorage.get('section_data_ids')||{},sectionLifetime=options.expirableSectionLifetime*60,currentTimestamp=Math.floor(Date.now()/ 1000),sectionData;_.each(options.expirableSectionNames,function(sectionName){sectionData=storage.get(sectionName);if(typeof sectionData==='object'&§ionData['data_id']+sectionLifetime<=currentTimestamp){expiredSectionNames.push(sectionName);}});_.each(cookieSectionTimestamps,function(cookieSectionTimestamp,sectionName){sectionData=storage.get(sectionName);if(typeof sectionData==='undefined'||typeof sectionData==='object'&&cookieSectionTimestamp!=sectionData['data_id']){expiredSectionNames.push(sectionName);}});return _.uniq(expiredSectionNames);},needReload:function(){var expiredSectionNames=this.getExpiredSectionNames();return expiredSectionNames.length>0;},getExpiredKeys:function(){return this.getExpiredSectionNames();},get:function(sectionName){return buffer.get(sectionName);},set:function(sectionName,sectionData){var data={};data[sectionName]=sectionData;buffer.update(data);},reload:function(sectionNames,forceNewSectionTimestamp){return dataProvider.getFromServer(sectionNames,forceNewSectionTimestamp).done(function(sections){$(document).trigger('customer-data-reload',[sectionNames]);buffer.update(sections);});},invalidate:function(sectionNames){var sectionDataIds,sectionsNamesForInvalidation;sectionsNamesForInvalidation=_.contains(sectionNames,'*')?sectionConfig.getSectionNames():sectionNames;$(document).trigger('customer-data-invalidate',[sectionsNamesForInvalidation]);buffer.remove(sectionsNamesForInvalidation);sectionDataIds=$.cookieStorage.get('section_data_ids')||{};_.each(sectionsNamesForInvalidation,function(sectionName){if(!sectionConfig.isClientSideSection(sectionName)){sectionDataIds[sectionName]+=1000;}});$.cookieStorage.set('section_data_ids',sectionDataIds);},getInitCustomerData:function(){return deferred.promise();},onAjaxComplete:function(jsonResponse,settings){var sections,redirects;if(settings.type.match(/post|put|delete/i)&&!settings.url.match(/fbe\\/Pixel\\/ProductInfoForAddToCart|catalog\\/ajax\\/
2price/i)){sections=sectionConfig.getAffectedSections(settings.url);if(sections&§ions.length){this.invalidate(sections);redirects=['redirect','backUrl'];if(_.isObject(jsonResponse)&&!_.isEmpty(_.pick(jsonResponse,redirects))){return;}\nthis.reload(sections,true);}}},checkBaseUrl:function(){if(typeof currentMagentoBaseUrl!==typeof undefined){var storedBaseUrl=localStorage.getItem('mage-base-url');var currentBaseUrl=currentMagentoBaseUrl;if(storedBaseUrl!==currentBaseUrl){storage.removeAll();}\nlocalStorage.setItem('mage-base-url',currentBaseUrl);}},'Magento_Customer/js/customer-data':function(settings){options=settings;invalidateCacheBySessionTimeOut(settings);invalidateCacheByCloseCookieSession();customerData.checkBaseUrl();customerData.init();deferred.resolve();}};$(document).on('ajaxComplete',function(event,xhr,settings){customerData.onAjaxComplete(xhr.responseJSON,settings);});$(document).on('submit',function(event){var sections;if(event.target.method.match(/post|put|delete/i)){sections=sectionConfig.getAffectedSections(event.target.action);if(sections){customerData.invalidate(sections);}}});return customerData;});","Magento_Customer/js/customer-global-session-loader.min.js":"define(['jquery','Magento_Customer/js/customer-data'],function($,customerData){'use strict';return function(){var customer;if($('.customer-menu').length>0){customer=customerData.get('customer');customerData.getInitCustomerData().done(function(){if(!customer().firstname){customerData.reload([],false);}});}};});","Magento_Customer/js/invalidation-processor.min.js":"define(['underscore','uiElement','Magento_Customer/js/customer-data'],function(_,Element,customerData){'use strict';return Element.extend({initialize:function(){this._super();this.process(customerData);},process:function(customerDataObject){_.each(this.invalidationRules,function(rule,ruleName){_.each(rule,function(ruleArgs,rulePath){require([rulePath],function(Rule){var currentRule=new Rule(ruleArgs);if(!_.isFunction(currentRule.process)){throw new Error('Rule '+ruleName+' should implement invalidationProcessor interface');}\ncurrentRule.process(customerDataObject);});});});}});});","Magento_Customer/js/section-config.min.js":"define(['underscore'],function(_){'use strict';var baseUrls=[],sections=[],clientSideSections=[],sectionNames=[],canonize;canonize=function(url){var route=url;_.some(baseUrls,function(baseUrl){route=url.replace(baseUrl,'');return route!==url;});return route.replace(/^\\/?index.php\\/?/,'').toLowerCase();};return{getAffectedSections:function(url){var route=canonize(url),actions=_.find(sections,function(val,section){var matched;
2if(section.indexOf('*')>=0){section=section.replace(/\\*/g,'[^/]+')+'$';matched=route.match(section);return matched&&matched[0]===route;}\nreturn route.indexOf(section)===0;});return _.union(_.toArray(actions),sections['*']);},filterClientSideSections:function(allSections){return _.difference(allSections,clientSideSections);},isClientSideSection:function(sectionName){return _.contains(clientSideSections,sectionName);},getSectionNames:function(){return sectionNames;},'Magento_Customer/js/section-config':function(options){baseUrls=options.baseUrls;sections=options.sections;clientSideSections=options.clientSideSections;sectionNames=options.sectionNames;}};});","Magento_Customer/js/show-password.min.js":"define(['jquery','uiComponent'],function($,Component){'use strict';return Component.extend({passwordSelector:'',passwordInputType:'password',textInputType:'text',defaults:{template:'Magento_Customer/show-password',isPasswordVisible:false},initObservable:function(){this._super().observe(['isPasswordVisible']);this.isPasswordVisible.subscribe(function(isChecked){this._showPassword(isChecked);}.bind(this));return this;},_showPassword:function(isChecked){$(this.passwordSelector).attr('type',isChecked?this.textInputType:this.passwordInputType);}});});","Magento_Customer/js/validation.min.js":"define(['jquery','moment','mageUtils','jquery/validate','validation','mage/translate'],function($,moment,utils){'use strict';$.validator.addMethod('validate-date',function(value,element,params){var dateFormat=utils.normalizeDate(params.dateFormat);if(value===''){return true;}\nreturn moment(value,dateFormat,true).isValid();},$.mage.__('Invalid date'));$.validator.addMethod('validate-dob',function(value,element,params){var dateFormat=utils.convertToMomentFormat(params.dateFormat);if(value===''){return true;}\nreturn moment(value,dateFormat).isBefore(moment());},$.mage.__('The Date of Birth should not be greater than today.'));});","Magento_Customer/js/action/login.min.js":"define(['jquery','mage/storage','Magento_Ui/js/model/messageList','Magento_Customer/js/customer-data','mage/translate'],function($,storage,globalMessageList,customerData,$t){'use strict';var callbacks=[],action=function(loginData,redirectUrl,isGlobal,messageContainer){messageContainer=messageContainer||globalMessageList;let customerLoginUrl='customer/ajax/login';if(loginData.customerLoginUrl){customerLoginUrl=loginData.customerLoginUrl;delete loginData.customerLoginUrl;}\nreturn storage.post(customerLoginUrl,JSON.stringify(loginData),isGlobal).done(function(response){if(response.errors){messageContainer.addErrorMessage(response);callbacks.forEach(function(callback){callback(loginData);});}else{callbacks.forEach(function(callback){callback(loginData);});customerData.invalidate(['customer']);if(response.redirectUrl){window.location.href=response.redirectUrl;}else if(redirectUrl){window.location.href=redirectUrl;}else{location.reload();}}}).fail(function(){messageContainer.addErrorMessage({'message':$t('Could not authenticate. Please try again later')});callbacks.forEach(function(callback){callback(loginData);});});};action.registerLoginCallback=function(callback){callbacks.push(callback);};return action;});","Magento_Customer/js/invalidation-rules/website-rule.min.js":"define(['uiClass'],function(Element){'use strict';return Element.extend({defaults:{scopeConfig:{}},process:function(customerData){var customer=customerData.get('customer');if(this.scopeConfig&&customer()&&~~customer().websiteId!==~~this.scopeConfig.websiteId&&~~customer().websiteId!==0){customerData.reload(['customer']);}}});});","Magento_Customer/js/model/authentication-popup.min.js":"define(['jquery','Magento_Ui/js/modal/modal'],function($,modal){'use strict';return{modalWindow:null,createPopUp:function(element){var options={'type':'popup','modalClass':'popup-authentication','focus':'[name=username]','responsive':true,'innerScroll':true,'trigger':'.proceed-to-checkout','buttons':[]};this.modalWindow=element;modal(options,$(this.modalWindow));},showModal:function(){$(this.modalWindow).modal('openModal').trigger('contentUpdated');}};});","Magento_Customer/js/model/customer.min.js":"define(['jquery','ko','underscore','./address-list'],function($,ko,_,addressList){'use strict';var isLoggedIn=ko.observable(window.isCustomerLoggedIn),customerData={};if(isLoggedIn()){customerData=window.customerData;}else{customerData={};}\nreturn{customerData:customerData,customerDetails:{},isLoggedIn:isLoggedIn,setIsLoggedIn:function(flag){isLoggedIn(flag);},getBillingAddressList:function(){return addressList();}
2,getShippingAddressList:function(){return addressList();},setDetails:function(fieldName,value){if(fieldName){this.customerDetails[fieldName]=value;}},getDetails:function(fieldName){if(fieldName){if(this.customerDetails.hasOwnProperty(fieldName)){return this.customerDetails[fieldName];}\nreturn undefined;}\nreturn this.customerDetails;},addCustomerAddress:function(address){var fields=['customer_id','country_id','street','company','telephone','fax','postcode','city','firstname','lastname','middlename','prefix','suffix','vat_id','default_billing','default_shipping'],customerAddress={},hasAddress=0,existingAddress;if(!this.customerData.addresses){this.customerData.addresses=[];}\ncustomerAddress=_.pick(address,fields);if(address.hasOwnProperty('region_id')){customerAddress.region={'region_id':address['region_id'],region:address.region};}\nfor(existingAddress in this.customerData.addresses){if(this.customerData.addresses.hasOwnProperty(existingAddress)){if(_.isEqual(this.customerData.addresses[existingAddress],customerAddress)){hasAddress=existingAddress;break;}}}\nif(hasAddress===0){return this.customerData.addresses.push(customerAddress)-1;}\nreturn hasAddress;},setAddressAsDefaultBilling:function(addressId){if(this.customerData.addresses[addressId]){this.customerData.addresses[addressId]['default_billing']=1;return true;}\nreturn false;},setAddressAsDefaultShipping:function(addressId){if(this.customerData.addresses[addressId]){this.customerData.addresses[addressId]['default_shipping']=1;return true;}\nreturn false;}};});","Magento_Customer/js/view/authentication-popup.min.js":"define(['jquery','ko','Magento_Ui/js/form/form','Magento_Ui/js/model/messageList','Magento_Customer/js/action/login','Magento_Customer/js/customer-data','Magento_Customer/js/model/authentication-popup','mage/translate','mage/url','Magento_Ui/js/modal/alert','mage/validation'],function($,ko,Component,globalMessageList,loginAction,customerData,authenticationPopup,$t,url,alert){'use strict';var autocomplete=\"off\",autoCloseTimer=0;if(window.hasOwnProperty('checkout')){if(window.checkout.hasOwnProperty('autocomplete')){autocomplete=window.checkout.autocomplete;}}\nreturn Component.extend({baseUrl:window.authenticationPopup.baseUrl,registerUrl:window.authenticationPopup.customerRegisterUrl,forgotPasswordUrl:window.authenticationPopup.customerForgotPasswordUrl,redirectUrl:window.authenticationPopup.redirectUrl,autocomplete:autocomplete,modalWindow:null,isLoading:ko.observable(true),placeholderLogin:$t('Email')+' *',placeholderPassword:$t('Password')+' *',messagesSelector:'[data-role=checkout-messages]',defaults:{template:'Magento_Customer/authentication-popup'},initialize:function(){var self=this;this._super();this.isLoading(false);url.setBaseUrl(window.authenticationPopup.baseUrl);loginAction.registerLoginCallback(function(loginData,response){clearTimeout(autoCloseTimer);autoCloseTimer=setTimeout(function(){$(document).trigger(\"login_complete\");},3000);self.isLoading(false);});$(document).trigger(\"reload_header_account\");},setModalElement:function(element){if(authenticationPopup.modalWindow==null){authenticationPopup.createPopUp(element);}},isActive:function(){var customer=customerData.get('customer');return customer()==false;},showModal:function(){if(this.modalWindow){$(this.modalWindow).modal('openModal');}else{alert({content:$t('Guest checkout is disabled.')});}},login:function(loginForm){var self=this,loginData={},formDataArray=$(loginForm).serializeArray(),$loginForm=$(loginForm);formDataArray.forEach(function(entry){loginData[entry.name]=entry.value;});if($loginForm.validation()&&$loginForm.validation('isValid')){globalMessageList.clear();this.isLoading(true);clearTimeout(autoCloseTimer);$(document).trigger(\"login_start\");loginAction(loginData,window.authenticationPopup.redirectUrl,false);}}});});","Magento_Customer/js/view/customer.min.js":"define(['jquery','uiComponent','Magento_Customer/js/customer-data','mage/mage'],function($,Component,customerData){'use strict';return Component.extend({initialize:function(){this._super();this.customer=customerData.get('customer');},getWelcomeMsg:function(){const name=this.customer()?.firstname??'';if(name!==''){return $.mage.__('Welcome %1').replace('%1',name);}\nreturn $.mage.__('Welcome');}});});","Magento_Directory/js/region-updater.min.js":"define(['jquery','mage/template','underscore','jquery-ui-modules/widget','mage/validation'],function($,mageTemplate,_){'use strict';$.widget('mage.directoryRegionUpdater',{options:{regionTemplate:'<option value=\"<%- data.value %>\" <% if (data.isSelected) { %>selected=\"selected\"<% } %>>'+'<%- data.title %>'+'</option>',isRegionRequired:true,isZipRequired:true,isCountryRequired:true,currentRegion:null,isMultipleCountriesAllowed:true},_create:function(){this._initCountryElement();this.currentRegionOption=this.options.currentRegion;this.regionTmpl=mageTemplate(this.options.regionTemplate);this._updateRegion(this.element.find('option:selected').val());$(this.options.regionListId).on('change',$.proxy(function(e){this.setOption=false;this.currentRegionOption=$(e.target).val();if(!this.currentRegionOption){$(this.options.regionListId).add(this.options.regionInputId).val('');}},this));$(this.options.regionInputId).on('focusout',$.proxy(function(){this.setOption=true;},this));},_initCountryElement:function(){if(this.options.isMultipleCountriesAllowed){this.element.parents('div.field').show();this.element.on('change',$.proxy(function(e){$(this.options.regionListId).val('');$(this.options.regionInputId).val('');this._updateRegion($(e.target).val());},this));if(this.options.isCountryRequired){this.element.addClass('required-entry');this.element.parents('div.field').addClass('required');}}else{this.element.parents('div.field').hide();}},_removeSelectOptions:function(selectElement){selectElement.find('option').each(function(index){
2if(index){$(this).remove();}});},_renderSelectOption:function(selectElement,key,value){selectElement.append($.proxy(function(){var name=value.name.replace(/[!\"#$%&'()*+,.\\/:;<=>?@[\\\\\\]^`{|}~]/g,'\\\\$&'),tmplData,tmpl;if(value.code&&$(name).is('span')){key=value.code;value.name=$(name).text();}\ntmplData={value:key,title:value.name,isSelected:false};if(this.options.defaultRegion===key){tmplData.isSelected=true;}\ntmpl=this.regionTmpl({data:tmplData});return $(tmpl);},this));},_clearError:function(){var args=['clearError',this.options.regionListId,this.options.regionInputId,this.options.postcodeId];if(this.options.clearError&&typeof this.options.clearError==='function'){this.options.clearError.call(this);}else{if(!this.options.form){this.options.form=this.element.closest('form').length?$(this.element.closest('form')[0]):null;}\nthis.options.form=$(this.options.form);this.options.form&&this.options.form.data('validator')&&this.options.form.validation.apply(this.options.form,_.compact(args));$(this.options.regionInputId).removeClass('mage-error').parent().find('[generated]').remove();$(this.options.regionListId).removeClass('mage-error').parent().find('[generated]').remove();$(this.options.postcodeId).removeClass('mage-error').parent().find('[generated]').remove();}},_updateRegion:function(country){var regionList=$(this.options.regionListId),regionInput=$(this.options.regionInputId),postcode=$(this.options.postcodeId),label=regionList.parent().siblings('label'),container=regionList.parents('div.field'),regionsEntries,regionId,regionData;this._clearError();this._checkRegionRequired(country);if(this.options.regionJson[country]){this._removeSelectOptions(regionList);regionsEntries=_.pairs(this.options.regionJson[country]);$.each(regionsEntries,$.proxy(function(key,value){regionData=value[1];regionId=regionData.id;this._renderSelectOption(regionList,regionId.toString(),regionData);},this));if(this.currentRegionOption){regionList.val(this.currentRegionOption);}\nif(this.setOption){regionList.find('option').filter(function(){return this.text===regionInput.val();}).attr('selected',true);}\nif(this.options.isRegionRequired){regionList.addClass('required-entry').removeAttr('disabled');container.addClass('required').show();}else{regionList.removeClass('required-entry validate-select').removeAttr('data-validate');container.removeClass('required');if(!this.options.optionalRegionAllowed){regionList.hide();container.hide();}else{regionList.removeAttr('disabled').show();}}\nregionList.show();regionInput.hide();label.attr('for',regionList.attr('id'));}else{this._removeSelectOptions(regionList);if(this.options.isRegionRequired){regionInput.addClass('required-entry').removeAttr('disabled');container.addClass('required').show();}else{if(!this.options.optionalRegionAllowed){regionInput.attr('disabled','disabled');container.hide();}\ncontainer.removeClass('required');regionInput.removeClass('required-entry');}\nregionList.removeClass('required-entry').prop('disabled','disabled').hide();regionInput.show();label.attr('for',regionInput.attr('id'));}\nif(this.options.isZipRequired){$.inArray(country,this.options.countriesWithOptionalZip)>=0?postcode.removeClass('required-entry').closest('.field').removeClass('required'):postcode.addClass('required-entry').closest('.field').addClass('required');}\nregionList.attr('defaultvalue',this.options.defaultRegion);this.options.form.find('[type=\"submit\"]').removeAttr('disabled').show();},_checkRegionRequired:function(country){var self=this;this.options.isRegionRequired=false;$.each(this.options.regionJson.config['regions_required'],function(index,elem){if(elem===country){self.options.isRegionRequired=true;}});}});return $.mage.directoryRegionUpdater;});","Magento_Ui/js/model/messageList.min.js":"define(['./messages'],function(Messages){'use strict';return new Messages();});","Magento_Ui/js/model/messages.min.js":"define(['ko','uiClass'],function(ko,Class){'use strict';return Class.extend({initialize:function(){this._super().initObservable();return this;},initObservable:function(){this.errorMessages=ko.observableArray([]);this.successMessages=ko.observableArray([]);return this;},add:function(messageObj,type){var expr=/([%])\\w+/g,message;if(!messageObj.hasOwnProperty('parameters')){this.clear();type.push(messageObj.message);return true;}\nmessage=messageObj.message.replace(expr,function(varName){varName=varName.substr(1);if(!isNaN(varName)){varName--;}\nif(messageObj.parameters.hasOwnProperty(varName)){return messageObj.parameters[varName];}\nreturn messageObj.parameters.shift();});this.clear();type.push(message);return true;},addSuccessMessage:function(message){return this.add(message,this.successMessages);},addErrorMessage:function(message){return this.add(message,this.errorMessages);},getErrorMessages:function(){return this.errorMessages;},getSuccessMessages:function(){return this.successMessages;},hasMessages:function(){return this.errorMessages().length>0||this.successMessages().length>0;},clear:function(){this.errorMessages.removeAll();this.successMessages.removeAll();}});});","Magento_Ui/js/view/messages.min.js":"define(['ko','jquery','uiComponent','../model/messageList'],function(ko,$,Component,globalMessages){'use strict';return Component.extend({defaults:{template:'Magento_Ui/messages',selector:'[data-role=checkout-messages]',isHidden:false,listens:{isHidden:'onHiddenChange'}},initialize:function(config,messageContainer){this._super().initOb
2servable();this.messageContainer=messageContainer||config.messageContainer||globalMessages;return this;},initObservable:function(){this._super().observe('isHidden');return this;},isVisible:function(){return this.isHidden(this.messageContainer.hasMessages());},removeAll:function(){this.messageContainer.clear();},onHiddenChange:function(isHidden){}});});","Magento_Theme/js/cookie-status.min.js":"define(['jquery','Magento_Ui/js/modal/modal','mage/translate'],function($,modal){'use strict';$.widget('mage.cookieStatus',{options:{type:'popup',modalClass:'confirm popup-with-overlay',responsiveClass:'',responsive:true,innerScroll:false,autoOpen:true,buttons:[{text:$.mage.__('Close'),class:'action primary cookie-status',click:function(){this.closeModal();}}]},_init:function(){if(!navigator.cookieEnabled){modal(this.options,$('#cookie-status'));}}});return $.mage.cookieStatus;});","Magento_Theme/js/row-builder.min.js":"define(['jquery','mage/template','jquery-ui-modules/widget'],function($,mageTemplate){'use strict';$.widget('mage.rowBuilder',{options:{rowTemplate:'#template-registrant',rowContainer:'#registrant-container',rowIndex:0,rowCount:0,rowParentElem:'<li></li>',rowContainerClass:'fields',addRowBtn:'#add-registrant-button',btnRemoveIdPrefix:'btn-remove',btnRemoveSelector:'.btn-remove',rowIdPrefix:'row',additionalRowClass:'add-row',formDataPost:null,addEventSelector:'button',remEventSelector:'a',hideFirstRowAddSeparator:true,maxRows:1000,maxRowsMsg:'#max-registrant-message'},_create:function(){this.rowTemplate=mageTemplate(this.options.rowTemplate);this.options.rowCount=this.options.rowIndex=0;$($.proxy(this.ready,this));this.element.on('click',this.options.addEventSelector+this.options.addRowBtn,$.proxy(this.handleAdd,this));this.element.on('click',this.options.remEventSelector+this.options.btnRemoveSelector,$.proxy(this.handleRemove,this));},ready:function(){if(this.options.formDataPost&&this.options.formDataPost.formData&&this.options.formDataPost.formData.length){this.processFormDataArr(this.options.formDataPost);}else if(this.options.rowIndex===0&&this.options.maxRows!==0){this.addRow(0);}},processFormDataArr:function(formDataArr){var formData=formDataArr.formData,templateFields=formDataArr.templateFields,formRow,i,j;for(i=this.options.rowIndex=0;i<formData.length;this.options.rowIndex=i++){this.addRow(i);formRow=formData[i];for(j=0;j<formRow.length;j++){this.setFieldById(templateFields[j]+i,formRow[j]);}}},addRow:function(index){var row=$(this.options.rowParentElem),tmpl;row.addClass(this.options.rowContainerClass).attr('id',this.options.rowIdPrefix+index);tmpl=this.rowTemplate({data:{_index_:index}});$(tmpl).appendTo(row);$(this.options.rowContainer).append(row).trigger('contentUpdated');row.addClass(this.options.additionalRowClass);if(this.options.rowIndex===0&&this.options.hideFirstRowAddSeparator){$('#'+this._esc(this.options.btnRemoveIdPrefix)+'0').remove();$('#'+this._esc(this.options.rowIdPrefix)+'0').removeClass(this.options.additionalRowClass);}\nthis.maxRowCheck(++this.options.rowCount);return row;},removeRow:function(rowIndex){$('#'+this._esc(this.options.rowIdPrefix)+rowIndex).remove();this.maxRowCheck(--this.options.rowCount);return false;},maxRowCheck:function(rowIndex){var addRowBtn=$(this.options.addRowBtn),maxRowMsg=$(this.options.maxRowsMsg);if(rowIndex>=this.options.maxRows){addRowBtn.hide();maxRowMsg.show();}else if(addRowBtn.is(':hidden')){addRowBtn.show();maxRowMsg.hide();}},setFieldById:function(domId,value){var x=$('#'+this._esc(domId));if(x.length){if(x.is(':checkbox')){x.attr('checked',true);}else if(x.is('option')){x.attr('selected','selected');}else{x.val(value);}}},handleAdd:function(){this.addRow(++this.options.rowIndex);return false;},handleRemove:function(e){this.removeRow($(e.currentTarget).closest('[id^=\"'+this.options.btnRemoveIdPrefix+'\"]').attr('id').replace(this.options.btnRemoveIdPrefix,''));return false;},_esc:function(str){return str?str.replace(/([ ;&,.+*~\\':\"!\\^$\\[\\]()=>|\\/@])/g,'\\\\$1'):str;}});return $.mage.rowBuilder;});","Magento_Theme/js/view/add-home-breadcrumb.min.js":"define(['jquery','Magento_Theme/js/model/breadcrumb-list','mage/translate'],function($,breadcrumbList){'use strict';var homeCrumb=function(){return{name:'home',label:$.mage.__('Home'),title:$.mage.__('Go to Home Page'),link:BASE_URL||''};};return function(breadcrumb){breadcrumbList.unshift(homeCrumb());return breadcrumb;};});","Magento_Theme/js/view/messages.min.js":"define(['jquery','uiComponent','underscore','Magento_Customer/js/customer-data','jquery/jquery-storageapi'],function($,Component,_,customerData){'use strict';return Component.extend({defaults:{cookieMessages:[],messages:[]},initialize:function(){this._super();this.cookieMessages=_.unique($.cookieStorage.get('mage-messages'),'text');this.messages=customerData.get('messages').extend({disposableCustomerData:'messages'});this.messages.subscribe(function(){this.updated();},this);if(!_.isEmpty(this.messages().messages)){customerData.set('messages',{});}\n$.mage.cookies.set('mage-messages','',{samesite:'strict',domain:'',secure:true});setTimeout(function(){$.mage.cookies.set('mage-messages','',{samesite:'strict',domain:'',secure:true});},3000);this.updated();},updated:function(){document.dispatchEvent(new CustomEvent('messages_updated'));}});});","Magento_Newsletter/js/newsletter-sign-up.min.js":"define(['jquery','uiElement','mage/url','subscriptionStatusResolver','mage/validation'],function($,Component,urlBuilder,subscriptionStatusResolver){'use strict';return Component.extend({defaults:{signUpElement:'',submitButton:'',element:null},initialize:function(config,element){this._super();this.element=element;$(element).on('change',$.proxy(this.updateSignUpStatus,this));this.updateSignUpStatus();},updateSignUpStatus:function(){var element=$(this.element),email=element.val(),self=this,newsletterSubscription;if($(self.signUpElement).is(':checked')){return;}\nif(!email||!$.validator.methods['validate-email'].call(this,email,element)){return;}\nnewsletterSubscription=$.Deferred();$(self.submitButton).prop('disabled',true);subscriptionStatusResolver(email,newsletterSubscription);$.when(newsletterSubscription).done(function(isSubscribed){if(isSubscribed){$(self.signUpElement).prop('checked',true);}}).always(function(){$(self.submitButton).prop('disabled',false);});}});});","Magento_Newsletter/js/subscription-status-resolver.min.js":"define(['jquery','mage/url'],function($,urlBuilder){'use strict';return function(email,deferred){return $.getJSON(urlBuilder.build('newsletter/ajax/status'),{email:email}).done(function(response){if(response.errors){deferred.reject();}else{deferred.resolve(response.subscribed);}}).fail(function(){deferred.reject();});};});
2","Magento_Wishlist/js/add-to-wishlist.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.addToWishlist',{options:{bundleInfo:'div.control [name^=bundle_option]',configurableInfo:'.super-attribute-select',groupedInfo:'#super-product-table input',downloadableInfo:'#downloadable-links-list input',customOptionsInfo:'.product-custom-option',qtyInfo:'#qty',actionElement:'[data-action=\"add-to-wishlist\"]',productListWrapper:'.product-item-info',productPageWrapper:'.product-info-main'},_create:function(){this._bind();this._triggerWishlistFormUpdate();},_bind:function(){var options=this.options,dataUpdateFunc='_updateWishlistData',validateProductQty='_validateWishlistQty',changeCustomOption='change '+options.customOptionsInfo,changeQty='change '+options.qtyInfo,updateWishlist='click '+options.actionElement,events={},key;if('productType'in options){if(typeof options.productType==='string'){options.productType=[options.productType];}}else{options.productType=[];}\nevents[changeCustomOption]=dataUpdateFunc;events[changeQty]=dataUpdateFunc;events[updateWishlist]=validateProductQty;for(key in options.productType){if(options.productType.hasOwnProperty(key)&&options.productType[key]+'Info'in options){events['change '+options[options.productType[key]+'Info']]=dataUpdateFunc;}}\nthis._on(events);},_triggerWishlistFormUpdate:function(){var key;$(this.options.qtyInfo).trigger('change');for(key in this.options.productType){if(this.options.productType.hasOwnProperty(key)&&this.options.productType[key]+'Info'in this.options){$(this.options[this.options.productType[key]+'Info']).trigger('change');}}},_updateWishlistData:function(event){var dataToAdd={},isFileUploaded=false,handleObjSelector=null,self=this;if(event.handleObj.selector==this.options.qtyInfo){this._updateAddToWishlistButton({},event);event.stopPropagation();return;}\nhandleObjSelector=$(event.currentTarget).closest('form').find(event.handleObj.selector);handleObjSelector.each(function(index,element){if($(element).is('input[type=text]')||$(element).is('input[type=email]')||$(element).is('input[type=number]')||$(element).is('input[type=hidden]')||$(element).is('input[type=checkbox]:checked')||$(element).is('input[type=radio]:checked')||$(element).is('textarea')||$('#'+element.id+' option:selected').length){if($(element).data('selector')||$(element).attr('name')){dataToAdd=$.extend({},dataToAdd,self._getElementData(element));}\nreturn;}\nif($(element).is('input[type=file]')&&$(element).val()){isFileUploaded=true;}});if(isFileUploaded){this.bindFormSubmit();}\nthis._updateAddToWishlistButton(dataToAdd,event);event.stopPropagation();},_updateAddToWishlistButton:function(dataToAdd,event){var self=this,buttons=this._getAddToWishlistButton(event);buttons.each(function(index,element){var params=$(element).data('post'),currentTarget=event.currentTarget,targetElement,targetValue;if(!params){params={'data':{}};}else if($(currentTarget).data('selector')||$(currentTarget).attr('name')){targetElement=self._getElementData(currentTarget);targetValue=Object.keys(targetElement)[0];if(params.data.hasOwnProperty(targetValue)&&!dataToAdd.hasOwnProperty(targetValue)){delete params.data[targetValue];}}\nparams.data=$.extend({},params.data,dataToAdd,{'qty':$(self.options.qtyInfo).val()});$(element).data('post',params);});},_getAddToWishlistButton:function(event){var productListWrapper=$(event.currentTarget).closest(this.options.productListWrapper);if(productListWrapper.length){return productListWrapper.find(this.options.actionElement);}\nreturn $(this.options.actionElement);},_arrayDiffByKeys:function(array1,array2){var result={};$.each(array1,function(key,value){if(key.indexOf('option')===-1){return;}\nif(!array2[key]){result[key]=value;}});return result;},_getElementData:function(element){var data,elementName,elementValue;element=$(element);data={};elementName=element.data('selector')?element.data('selector'):element.attr('name');elementValue=element.val();if(element.is('select[multiple]')&&elementValue!==null){if(elementName.substr(elementName.length-2)=='[]'){elementName=elementName.substring(0,elementName.length-2);}\n$.each(elementValue,function(key,option){data[elementName+'['+option+']']=option;});}else if(elementName.substr(elementName.length-2)=='[]'){elementName=elementName.substring(0,elementName.length-2);data[elementName+'['+elementValue+']']=elementValue;}else{data[elementName]=elementValue;}\nreturn data;},_removeExcessiveData:function(params,dataToAdd){var dataToRemove=this._arrayDiffByKeys(params.data,dataToAdd);$.each(dataToRemove,function(key){delete params.data[key];});}
2,unbindFormSubmit:function(){$('[data-action=\"add-to-wishlist\"]').off('click');},bindFormSubmit:function(){var self=this;this.unbindFormSubmit();$('[data-action=\"add-to-wishlist\"]').on('click',function(event){var element,params,form,action;event.stopPropagation();event.preventDefault();element=$('input[type=file]'+self.options.customOptionsInfo);params=$(event.currentTarget).data('post');form=$(element).closest('form');action=params.action;if(params.data.id){$('<input>',{type:'hidden',name:'id',value:params.data.id}).appendTo(form);}\nif(params.data.uenc){action+='uenc/'+params.data.uenc;}\n$(form).attr('action',action).trigger('submit');});},_validateWishlistQty:function(event){var element=$(this.options.qtyInfo);if(!(element.validation()&&element.validation('isValid'))){event.preventDefault();event.stopPropagation();return;}\nthis._triggerWishlistFormUpdate();}});return $.mage.addToWishlist;});","Magento_Wishlist/js/view/wishlist.min.js":"define(['uiComponent','Magento_Customer/js/customer-data','underscore'],function(Component,customerData,_){'use strict';var wishlistReloaded=false;return Component.extend({initialize:function(){this._super();this.wishlist=customerData.get('wishlist');this.company=customerData.get('company');if(!wishlistReloaded&&!_.isEmpty(this.wishlist())&&_.indexOf(customerData.getExpiredSectionNames(),'wishlist')===-1&&window.checkout&&window.checkout.storeId&&(window.checkout.storeId!==this.wishlist().storeId||this.company().is_enabled)){this.wishlist().counter=0;customerData.invalidate(['wishlist']);customerData.reload(['wishlist'],false);wishlistReloaded=true;}}});});","Magento_PageCache/js/form-key-provider.min.js":"define(function(){'use strict';return function(settings){var formKey,inputElements,inputSelector='input[name=\"form_key\"]';function setFormKeyCookie(value){var expires,secure,date=new Date(),cookiesConfig=window.cookiesConfig||{},isSecure=!!cookiesConfig.secure,samesite=cookiesConfig.samesite||'lax';date.setTime(date.getTime()+86400000);expires='; expires='+date.toUTCString();secure=isSecure?'; secure':'';samesite='; samesite='+samesite;document.cookie='form_key='+(value||'')+expires+secure+'; path=/'+samesite;}\nfunction getFormKeyCookie(){var cookie,i,nameEQ='form_key=',cookieArr=document.cookie.split(';');for(i=0;i<cookieArr.length;i++){cookie=cookieArr[i];while(cookie.charAt(0)===' '){cookie=cookie.substring(1,cookie.length);}\nif(cookie.indexOf(nameEQ)===0){return cookie.substring(nameEQ.length,cookie.length);}}\nreturn null;}\nfunction getFormKeyFromUI(){return document.querySelector(inputSelector).value;}\nfunction generateFormKeyString(){var result='',length=16,chars='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';while(length--){result+=chars[Math.round(Math.random()*(chars.length-1))];}\nreturn result;}\nfunction initFormKey(){formKey=getFormKeyCookie();if(settings&&settings.isPaginationCacheEnabled&&!formKey){formKey=getFormKeyFromUI();setFormKeyCookie(formKey);}\nif(!formKey){formKey=generateFormKeyString();setFormKeyCookie(formKey);}\ninputElements=document.querySelectorAll(inputSelector);if(inputElements.length){Array.prototype.forEach.call(inputElements,function(element){element.setAttribute('value',formKey);});}}\ninitFormKey();};});","Magento_PageCache/js/page-cache.min.js":"define(['jquery','domReady','consoleLogger','Magento_PageCache/js/form-key-provider','jquery-ui-modules/widget','mage/cookies'],function($,domReady,consoleLogger,formKeyInit){'use strict';function generateRandomString(chars,length){var result='';length=length>0?length:1;while(length--){result+=chars[Math.round(Math.random()*(chars.length-1))];}\nreturn result;}\n$.fn.comments=function(){var elements=[],contents,elementContents;(function lookup(element){var iframeHostName;if($(element).prop('tagName')==='IFRAME'){iframeHostName=$('<a>').prop('href',$(element).prop('src')).prop('hostname');if(window.location.hostname!==iframeHostName){return[];}}\ncontents=function(elem){return $.map(elem,function(el){try{return $.nodeName(el,'iframe')?el.contentDocument||(el.contentWindow?el.contentWindow.document:[]):$.merge([],el.childNodes);}catch(e){consoleLogger.error(e);return[];}});};elementContents=contents($(element));$.each(elementContents,function(index,el){switch(el.nodeType){case 1:lookup(el);break;case 8:elements.push(el);break;case 9:lookup($(el).find('body'));break;}});})(this);return elements;};$.widget('mage.formKey',{options:{inputSelector:'input[name=\"form_key\"]',allowedCharacters:'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',length:16},_create:function(){var formKey=$.mage.cookies.get('form_key'),options={path:'/',secure:window.cookiesConfig?window.cookiesConfig.secure:false};if(!formKey){formKey=generateRandomString(this.options.allowedCharacters,this.options.length);$.mage.cookies.set('form_key',formKey,options);}\n$(this.options.inputSelector).val(formKey);$(document).on('listingUpdated',$.proxy(function(){$(this.options.inputSelector).val(formKey);},this));}});$.widget('mage.pageCache',{options:{url:'/',patternPlaceholderOpen:/^ BLOCK (.+) $/,patternPlaceholderClose:/^ \\/BLOCK (.+) $/,versionCookieName:'private_content_version',handles:[]},_create:function(){var placeholders,version=$.mage.cookies.get(this.options.versionCookieName);if(!version){return;}\nplaceholders=this._searchPlaceholders(this.element.comments());if(placeholders&&placeholders.length){this._ajax(placeholders,version);}},_searchPlaceholders:function(elements){var placeholders=[],tmp={},ii,len,el,matches,name;if(!(elements&&elements.length)){return placeholders;}\nfor(ii=0,len=elements.length;ii<len;ii++){el=elements[ii];matches=this.options.patternPlaceholderOpen.exec(el.nodeValue);name=null;if(matches){name=matches[1];tmp[name]={name:name,openElement:el};}else{matches=this.options.patternPlaceholderClose.exec(el.nodeValue);if(matches){name=matches[1];if(tmp[name]){tmp[name].closeElement=el;placeholders.push(tmp[name]);delete tmp[name];}}}}\nreturn placeholders;},_replacePlaceholder:function(placeholder,html){var startReplacing=false,prevSibling=null,parent,contents,yy,len,element;
2if(!placeholder||!html){return;}\nparent=$(placeholder.openElement).parent();contents=parent.contents();for(yy=0,len=contents.length;yy<len;yy++){element=contents[yy];if(element==placeholder.openElement){startReplacing=true;}\nif(startReplacing){$(element).remove();}else if(element.nodeType!=8){prevSibling=element;}\nif(element==placeholder.closeElement){break;}}\nif(prevSibling){$(prevSibling).after(html);}else{$(parent).prepend(html);}\n$(parent).trigger('contentUpdated');},_ajax:function(placeholders,version){var ii,data={blocks:[],handles:this.options.handles,originalRequest:this.options.originalRequest,version:version};for(ii=0;ii<placeholders.length;ii++){data.blocks.push(placeholders[ii].name);}\ndata.blocks=JSON.stringify(data.blocks.sort());data.handles=JSON.stringify(data.handles);data.originalRequest=JSON.stringify(data.originalRequest);$.ajax({url:this.options.url,data:data,type:'GET',cache:true,dataType:'json',context:this,success:function(response){var placeholder,i;for(i=0;i<placeholders.length;i++){placeholder=placeholders[i];if(response.hasOwnProperty(placeholder.name)){this._replacePlaceholder(placeholder,response[placeholder.name]);}}}});}});domReady(function(){formKeyInit();});return{'pageCache':$.mage.pageCache,'formKey':$.mage.formKey};});","Magento_Tax/js/view/checkout/cart/totals/grand-total.min.js":"define(['Magento_Tax/js/view/checkout/summary/grand-total'],function(Component){'use strict';return Component.extend({isDisplayed:function(){return true;}});});","Magento_Tax/js/view/checkout/cart/totals/shipping.min.js":"define(['Magento_Tax/js/view/checkout/summary/shipping','Magento_Checkout/js/model/quote'],function(Component,quote){'use strict';return Component.extend({isCalculated:function(){return!!quote.shippingMethod();},getShippingMethodTitle:function(){return'('+this._super()+')';}});});","Magento_Tax/js/view/checkout/cart/totals/tax.min.js":"define(['Magento_Tax/js/view/checkout/summary/tax','Magento_Checkout/js/model/totals'],function(Component,totals){'use strict';var isFullTaxSummaryDisplayed=window.checkoutConfig.isFullTaxSummaryDisplayed,isZeroTaxDisplayed=window.checkoutConfig.isZeroTaxDisplayed;return Component.extend({ifShowValue:function(){if(this.isFullMode()&&this.getPureValue()==0){return isZeroTaxDisplayed;}\nreturn true;},ifShowDetails:function(){return this.getPureValue()>0&&isFullTaxSummaryDisplayed;},isCalculated:function(){return this.totals()&&totals.getSegment('tax')!==null;}});});","Magento_Tax/js/view/checkout/minicart/subtotal/totals.min.js":"define(['ko','uiComponent','Magento_Customer/js/customer-data'],function(ko,Component,customerData){'use strict';return Component.extend({displaySubtotal:ko.observable(true),initialize:function(){this._super();this.cart=customerData.get('cart');}});});","Magento_Tax/js/view/checkout/shipping_method/price.min.js":"define(['uiComponent','Magento_Checkout/js/model/quote','Magento_Catalog/js/price-utils'],function(Component,quote,priceUtils){'use strict';return Component.extend({defaults:{template:'Magento_Tax/checkout/shipping_method/price'},isDisplayShippingPriceExclTax:window.checkoutConfig.isDisplayShippingPriceExclTax,isDisplayShippingBothPrices:window.checkoutConfig.isDisplayShippingBothPrices,isPriceEqual:function(item){return item['price_excl_tax']!=item['price_incl_tax'];},getFormattedPrice:function(price){return priceUtils.formatPriceLocale(price,quote.getPriceFormat());}});});","Magento_Tax/js/view/checkout/summary/grand-total.min.js":"define(['Magento_Checkout/js/view/summary/abstract-total','Magento_Checkout/js/model/quote','Magento_Catalog/js/price-utils','Magento_Checkout/js/model/totals'],function(Component,quote,priceUtils,totals){'use strict';return Component.extend({defaults:{isFullTaxSummaryDisplayed:window.checkoutConfig.isFullTaxSummaryDisplayed||false,template:'Magento_Tax/checkout/summary/grand-total'},totals:quote.getTotals(),isTaxDisplayedInGrandTotal:window.checkoutConfig.includeTaxInGrandTotal||false,isDisplayed:function(){return this.isFullMode();},getValue:function(){var price=0;if(this.totals()){price=totals.getSegment('grand_total').value;}\nreturn this.getFormattedPrice(price);},getBaseValue:function(){var price=0;if(this.totals()){price=this.totals()['base_grand_total'];}
2\nreturn priceUtils.formatPriceLocale(price,quote.getBasePriceFormat());},getGrandTotalExclTax:function(){var total=this.totals(),amount;if(!total){return 0;}\namount=total['grand_total']-total['tax_amount'];if(amount<0){amount=0;}\nreturn this.getFormattedPrice(amount);},isBaseGrandTotalDisplayNeeded:function(){var total=this.totals();if(!total){return false;}\nreturn total['base_currency_code']!=total['quote_currency_code'];}});});","Magento_Tax/js/view/checkout/summary/shipping.min.js":"define(['jquery','Magento_Checkout/js/view/summary/shipping','Magento_Checkout/js/model/quote'],function($,Component,quote){'use strict';var displayMode=window.checkoutConfig.reviewShippingDisplayMode;return Component.extend({defaults:{displayMode:displayMode,template:'Magento_Tax/checkout/summary/shipping'},isBothPricesDisplayed:function(){return this.displayMode=='both';},isIncludingDisplayed:function(){return this.displayMode=='including';},isExcludingDisplayed:function(){return this.displayMode=='excluding';},isCalculated:function(){return this.totals()&&this.isFullMode()&"e.shippingMethod()!=null;},getIncludingValue:function(){var price;if(!this.isCalculated()){return this.notCalculatedMessage;}\nprice=this.totals()['shipping_incl_tax'];return this.getFormattedPrice(price);},getExcludingValue:function(){var price;if(!this.isCalculated()){return this.notCalculatedMessage;}\nprice=this.totals()['shipping_amount'];return this.getFormattedPrice(price);}});});","Magento_Tax/js/view/checkout/summary/subtotal.min.js":"define(['Magento_Checkout/js/view/summary/abstract-total','Magento_Checkout/js/model/quote'],function(Component,quote){var displaySubtotalMode=window.checkoutConfig.reviewTotalsDisplayMode;return Component.extend({defaults:{displaySubtotalMode:displaySubtotalMode,template:'Magento_Tax/checkout/summary/subtotal'},totals:quote.getTotals(),items:quote.getItems(),getValue:function(){var price=0;if(this.totals()){price=this.totals().subtotal;}\nreturn this.getFormattedPrice(price);},isBothPricesDisplayed:function(){return'both'==this.displaySubtotalMode;},isIncludingTaxDisplayed:function(){return'including'==this.displaySubtotalMode;},getValueInclTax:function(){var price=0;if(this.totals()){price=this.totals().subtotal_incl_tax;}\nreturn this.getFormattedPrice(price);},getItemCount:function(){if(this.items.length>0){var qty=0;for(var i=0;i<this.items.length;i++){var item=this.items[i];qty+=item.qty;}\nreturn qty;}else{return 0;}}});});","Magento_Tax/js/view/checkout/summary/tax.min.js":"define(['ko','Magento_Checkout/js/view/summary/abstract-total','Magento_Checkout/js/model/quote','Magento_Checkout/js/model/totals','mage/translate','underscore'],function(ko,Component,quote,totals,$t,_){'use strict';var isTaxDisplayedInGrandTotal=window.checkoutConfig.includeTaxInGrandTotal,isFullTaxSummaryDisplayed=window.checkoutConfig.isFullTaxSummaryDisplayed,isZeroTaxDisplayed=window.checkoutConfig.isZeroTaxDisplayed,taxAmount=0,rates=0;return Component.extend({defaults:{isTaxDisplayedInGrandTotal:isTaxDisplayedInGrandTotal,notCalculatedMessage:$t('Not yet calculated'),template:'Magento_Tax/checkout/summary/tax'},totals:quote.getTotals(),isFullTaxSummaryDisplayed:isFullTaxSummaryDisplayed,ifShowValue:function(){if(this.isFullMode()&&this.getPureValue()==0){return isZeroTaxDisplayed;}\nreturn true;},ifShowDetails:function(){if(!this.isFullMode()){return false;}\nreturn this.getPureValue()>0&&isFullTaxSummaryDisplayed;},getPureValue:function(){var amount=0,taxTotal;if(this.totals()){taxTotal=totals.getSegment('tax');if(taxTotal){amount=taxTotal.value;}}\nreturn amount;},isCalculated:function(){return this.totals()&&this.isFullMode()&&totals.getSegment('tax')!=null;},getValue:function(){var amount;if(!this.isCalculated()){return this.notCalculatedMessage;}\namount=totals.getSegment('tax').value;return this.getFormattedPrice(amount);},formatPrice:function(amount){return this.getFormattedPrice(amount);},getTaxAmount:function(parent,percentage){var totalPercentage=0;taxAmount=parent.amount;rates=parent.rates;_.each(rates,function(rate){totalPercentage+=parseFloat(rate.percent);});return this.getFormattedPrice(this.getPercentAmount(taxAmount,totalPercentage,percentage));},getPercentAmount:function(amount,totalPercentage,percentage){return parseFloat(amount*percentage / totalPercentage);},getDetails:function(){var taxSegment=totals.getSegment('tax');if(taxSegment&&taxSegment['extension_attributes']){return taxSegment['extension_attributes']['tax_grandtotal_details'];}\nreturn[];}});});","Magento_Tax/js/view/checkout/summary/item/details/subtotal.min.js":"define(['Magento_Checkout/js/view/summary/item/details/subtotal'],function(subtotal){'use strict';var displayPriceMode=window.checkoutConfig.reviewItemPriceDisplayMode||'including';
2return subtotal.extend({defaults:{displayPriceMode:displayPriceMode,template:'Magento_Tax/checkout/summary/item/details/subtotal'},isPriceInclTaxDisplayed:function(){return displayPriceMode=='both'||displayPriceMode=='including';},isPriceExclTaxDisplayed:function(){return displayPriceMode=='both'||displayPriceMode=='excluding';},getValueInclTax:function(quoteItem){return this.getFormattedPrice(quoteItem['row_total_incl_tax']);},getValueExclTax:function(quoteItem){return this.getFormattedPrice(quoteItem['row_total']);}});});","Magento_ConfigurableProduct/js/catalog-add-to-cart-mixin.min.js":"define(['underscore','jquery','Magento_ConfigurableProduct/js/product/view/product-info-resolver'],function(_,$,productInfoResolver){'use strict';return function(widget){$.widget('mage.catalogAddToCart',widget,{ajaxSubmit:function(form){var isConfigurable=!!_.find(form.serializeArray(),function(item){return item.name.indexOf('super_attribute')!==-1;});if(isConfigurable){this.options.productInfoResolver=productInfoResolver;}\nreturn this._super(form);}});return $.mage.catalogAddToCart;};});","Magento_ConfigurableProduct/js/catalog-add-to-cart.min.js":"require(['jquery'],function($){'use strict';$('body').on('catalogCategoryAddToCartRedirect',function(event,data){$(data.form).find('select[name*=\"super\"]').each(function(index,item){data.redirectParameters.push(item.config.id+'='+$(item).val());});});});","Magento_ConfigurableProduct/js/configurable-customer-data.min.js":"require(['jquery','Magento_ConfigurableProduct/js/options-updater'],function($,Updater){'use strict';var selectors={formSelector:'#product_addtocart_form'},configurableWidgetName='mageConfigurable',widgetInitEvent='configurable.initialized',updateConfigurableOptions=function(){var configurableWidget=$(selectors.formSelector).data(configurableWidgetName);if(!configurableWidget){return;}\nconfigurableWidget.options.values=this.productOptions||{};configurableWidget._configureForValues();},updater=new Updater(widgetInitEvent,updateConfigurableOptions);updater.listen();});","Magento_ConfigurableProduct/js/configurable.min.js":"define(['jquery','underscore','mage/template','priceUtils','priceBox','jquery-ui-modules/widget','jquery/jquery.parsequery'],function($,_,mageTemplate){'use strict';$.widget('mage.configurable',{options:{superSelector:'.super-attribute-select',selectSimpleProduct:'[name=\"selected_configurable_option\"]',priceHolderSelector:'.price-box',spConfig:{},state:{},priceFormat:{},optionTemplate:'<%- data.label %>'+\"<% if (typeof data.finalPrice.value !== 'undefined') { %>\"+' <%- data.finalPrice.formatted %>'+'<% } %>',mediaGallerySelector:'[data-gallery-role=gallery-placeholder]',mediaGalleryInitial:null,slyOldPriceSelector:'.sly-old-price',normalPriceLabelSelector:'.normal-price .price-label',gallerySwitchStrategy:'replace'},defaultText:'',_create:function(){this.select=$(this.options.superSelector).first();if(this.select.length>0){this.optionId=this.select.data('id');this.dropdown=$('.product-option-list[data-select=\"'+this.optionId+'\"]');this.fBar=$('#fixed-top');if(this.fBar.length>0){this.fOptions=this.fBar.find('#fixed-top-options');if(this.fOptions.length>0){this.fixedList=this.fOptions.find('#fixed-top-options-list');}}}\nthis._initializeOptions();this._overrideDefaults();this._setupChangeEvents();this._fillState();this._setChildSettings();this._configureForValues();this._initDropdownEvents();this._initSelectEvents();this.select.trigger(\"change\");$(this.element).trigger('configurable.initialized');},_initializeOptions:function(){var options=this.options,gallery=$(options.mediaGallerySelector),priceBoxOptions=$(this.options.priceHolderSelector).priceBox('option').priceConfig||null;if(priceBoxOptions&&priceBoxOptions.optionTemplate){options.optionTemplate=priceBoxOptions.optionTemplate;}\nif(priceBoxOptions&&priceBoxOptions.priceFormat){options.priceFormat=priceBoxOptions.priceFormat;}\noptions.optionTemplate=mageTemplate(options.optionTemplate);options.settings=options.spConfig.containerId?$(options.spConfig.containerId).find(options.superSelector):$(options.superSelector);options.values=options.spConfig.defaultValues||{};options.parentImage=$('[data-role=base-image-container] img').attr('src');this.inputSimpleProduct=this.element.find(options.selectSimpleProduct);gallery.data('gallery')?this._onGalleryLoaded(gallery):gallery.on('gallery:loaded',this._onGalleryLoaded.bind(this,gallery));},_overrideDefaults:function(){var hashIndex=window.location.href.indexOf('#');if(hashIndex!==-1){this._parseQueryParams(window.location.href.substr(hashIndex+1));}\nif(this.options.spConfig.inputsInitialized){this._setValuesByAttribute();}},_parseQueryParams:function(queryString){var queryParams=$.parseQuery({query:queryString});$.each(queryParams,$.proxy(function(key,value){this.options.values[key]=value;},this));},_setValuesByAttribute:function(){this.options.values={};$.each(this.options.settings,$.proxy(function(index,element){var attributeId;
2if(element.value){attributeId=element.id.replace(/[a-z]*/,'');this.options.values[attributeId]=element.value;}},this));},_setupChangeEvents:function(){$.each(this.options.settings,$.proxy(function(index,element){$(element).on('change',this,this._configure);},this));},_fillState:function(){$.each(this.options.settings,$.proxy(function(index,element){var attributeId=element.id.replace(/[a-z]*/,'');if(attributeId&&this.options.spConfig.attributes[attributeId]){element.config=this.options.spConfig.attributes[attributeId];element.attributeId=attributeId;this.options.state[attributeId]=false;}},this));},_setChildSettings:function(){var childSettings=[],settings=this.options.settings,index=settings.length,option;while(index--){option=settings[index];if(index){option.disabled=true;}else{this._fillSelect(option);}\n_.extend(option,{childSettings:childSettings.slice(),prevSetting:settings[index-1],nextSetting:settings[index+1]});childSettings.push(option);}},_configureForValues:function(){if(this.options.values){this.options.settings.each($.proxy(function(index,element){var attributeId=element.attributeId;element.value=this.options.values[attributeId]||'';this._configureElement(element);},this));}},_configure:function(event){event.data._configureElement(this);},_configureElement:function(element){this.simpleProduct=this._getSimpleProductId(element);if(element.value){this.options.state[element.config.id]=element.value;if(element.nextSetting){element.nextSetting.disabled=false;this._fillSelect(element.nextSetting);this._resetChildren(element.nextSetting);}else{if(!!document.documentMode){this.inputSimpleProduct.val(element.options[element.selectedIndex].config.allowedProducts[0]);}else{this.inputSimpleProduct.val(element.selectedOptions[0].config.allowedProducts[0]);}}}else{this._resetChildren(element);}\nthis._reloadPrice();this._displayRegularPriceBlock(this.simpleProduct);this._displayNormalPriceLabel();this._changeProductImage();if(this.dropdown&&parseInt(element.getAttribute('data-id'))===parseInt(this.optionId)){var _li=this.dropdown.find(\"ul li\");var _sel=_li.filter('[data-value=\"'+this.value+'\"]');var _label=this.dropdown.find(\"span.label\");_li.removeClass('selected');if(_sel.length>0){_sel.addClass('selected');_label.html(_sel.find('span').html()+' '+this.options.optionUnit);}else{_label.html(this.defaultText);}}},_changeProductImage:function(){var images,initialImages=this.options.mediaGalleryInitial,galleryObject=$(this.options.mediaGallerySelector).data('gallery');if(!galleryObject){return;}\nimages=this.options.spConfig.images[this.simpleProduct];if(images){if(this.options.gallerySwitchStrategy==='prepend'){images=images.concat(initialImages);}\nimages=$.extend(true,[],images);images.forEach(function(img){img.type='image';});galleryObject.updateData(images);}else{galleryObject.updateData(initialImages);}\ngalleryObject.first();},_resetChildren:function(element){if(element.childSettings){_.each(element.childSettings,function(set){set.selectedIndex=0;set.disabled=true;});if(element.config){this.options.state[element.config.id]=false;}}}
2,_fillSelect:function(element){var attributeId=element.id.replace(/[a-z]*/,''),options=this._getAttributeOptions(attributeId),prevConfig,index=1,allowedProducts,i,j,dropList,fixedList;this._clearSelect(element);element.options[0]=new Option('','');element.options[0].innerHTML=this.options.spConfig.chooseText;prevConfig=false;if(parseInt(element.getAttribute('data-id'))===parseInt(this.optionId)){if(this.dropdown.length>0){dropList=this.dropdown.find('ul');if(this.defaultText===''){this.defaultText=this.dropdown.find(\"span.label\").html();}}\nif(this.fixedList.length>0){fixedList=this.fixedList.find('ul');}}\nif(element.prevSetting){prevConfig=element.prevSetting.options[element.prevSetting.selectedIndex];}\nif(options){for(i=0;i<options.length;i++){allowedProducts=[];if(prevConfig){for(j=0;j<options[i].products.length;j++){if(prevConfig.config&&prevConfig.config.allowedProducts&&prevConfig.config.allowedProducts.indexOf(options[i].products[j])>-1){allowedProducts.push(options[i].products[j]);}}}else{allowedProducts=options[i].products.slice(0);}\nif(allowedProducts.length>0){options[i].allowedProducts=allowedProducts;element.options[index]=new Option(this._getOptionLabel(options[i]),options[i].id);if(typeof options[i].price!=='undefined'){element.options[index].setAttribute('price',options[i].prices);}\nelement.options[index].config=options[i];if(dropList){dropList.append($('<li data-value=\"'+options[i].id+'\" data-id=\"'+this.optionId+'\"><button type=\"button\"><span>'+options[i].label+'</span></button></li>'));}\nif(fixedList){fixedList.append('<li><div class=\"item\" data-value=\"'+options[i].id+'\" data-id=\"'+this.optionId+'\"><span class=\"label\">'+options[i].label+'</span><span class=\"omega-bg-loader\"></span></div></li>');}\nindex++;}}}\nif(fixedList){var w=(index-1)*66;fixedList.css({'width':w+'px'});}},_getOptionLabel:function(option){return option.label;},_clearSelect:function(element){var i;for(i=element.options.length-1;i>=0;i--){element.remove(i);}\nif(parseInt(element.getAttribute('data-id'))===parseInt(this.optionId)){if(this.dropdown.length>0){this.dropdown.find('ul').html('');}\nif(this.fixedList.length>0){this.fixedList.find('ul').html('');}}},_getAttributeOptions:function(attributeId){if(this.options.spConfig.attributes[attributeId]){return this.options.spConfig.attributes[attributeId].options;}},_reloadPrice:function(){$(this.options.priceHolderSelector).trigger('updatePrice',this._getPrices());},_getPrices:function(){var prices={},elements=_.toArray(this.options.settings),hasProductPrice=false;_.each(elements,function(element){var selected=element.options[element.selectedIndex],config=selected&&selected.config,priceValue={};if(config&&config.allowedProducts.length===1&&!hasProductPrice){priceValue=this._calculatePrice(config);hasProductPrice=true;}\nprices[element.attributeId]=priceValue;},this);return prices;},_calculatePrice:function(config){var displayPrices=$(this.options.priceHolderSelector).priceBox('option').prices,newPrices=this.options.spConfig.optionPrices[_.first(config.allowedProducts)];_.each(displayPrices,function(price,code){if(newPrices[code]){displayPrices[code].amount=newPrices[code].amount-displayPrices[code].amount;}});return displayPrices;},_getSimpleProductId:function(element){var allOptions=element.config.options,value=element.value,config;config=_.filter(allOptions,function(option){return option.id===value;});config=_.first(config);return _.isEmpty(config)?undefined:_.first(config.allowedProducts);},_displayRegularPriceBlock:function(optionId){var shouldBeShown=true;_.each(this.options.settings,function(element){if(element.value===''){shouldBeShown=false;}});if(shouldBeShown&&this.options.spConfig.optionPrices[optionId].oldPrice.amount!==this.options.spConfig.optionPrices[optionId].finalPrice.amount){$(this.options.slyOldPriceSelector).show();}else{$(this.options.slyOldPriceSelector).hide();}\n$(document).trigger('updateMsrpPriceBlock',[optionId,this.options.spConfig.optionPrices]);},_displayNormalPriceLabel:function(){var shouldBeShown=false;_.each(this.options.settings,function(element){if(element.value===''){shouldBeShown=true;}});if(shouldBeShown){$(this.options.normalPriceLabelSelector).show();}else{$(this.options.normalPriceLabelSelector).hide();}},_onGalleryLoaded:function(element){var galleryObject=element.data('gallery');this.options.mediaGalleryInitial=galleryObject.returnCurrentImages();},_initDropdownEvents:function(){this.dropdown.on(\"click\",\"li\",$.proxy(function(e){e.preventDefault();e.stopPropagation();var el=$(e.currentTarget);if(!el.hasClass('disabled')){this.select.val(el.data('value')).trigger('change');el.closest('.product-option-list').children('button').trigger('click');}},this));},_initSelectEvents:function(){this.select.on('change',$.proxy(function(e){var el=$(e.currentTarget);var _li=this.dropdown.find(\"ul li\");var _sel=_li.filter('[data-value=\"'+el.val()+'\"]');var _label=this.dropdown.find(\"span.label\");_li.removeClass('selected');if(_sel.length>0){_sel.addClass('selected');_label.html(_sel.find('span').html());}else{_label.html(this.defaultText);}},this));}});return $.mage.configurable;});","Magento_ConfigurableProduct/js/options-updater.min.js":"define(['jquery','underscore','Magento_Customer/js/customer-data','domReady!'],function($,_,customerData){'use strict';var selectors={formSelector:'#product_addtocart_form',productIdSelector:'#product_addtocart_form [name=\"product\"]',itemIdSelector:'#product_addtocart_form [name=\"item\"]'},cartData=customerData.get('cart'),productId=$(selectors.productIdSelector).val(),itemId=$(selectors.itemIdSelector).val(),setProductOptions=function(data){var changedProductOptions;if(!(data&&data.items&&data.items.length&&productId)){return false;}\nchangedProductOptions=_.find(data.items,function(item){if(item['item_id']===itemId){return item['product_id']===productId;}});changedProductOptions=changedProductOptions&&changedProductOptions.options&&changedProductOptions.options.reduce(function(obj,val){obj[val['option_id']]=val['option_value'];return obj;},{});
2if(JSON.stringify(this.productOptions||{})===JSON.stringify(changedProductOptions||{})){return false;}\nthis.productOptions=changedProductOptions;return true;},listen=function(){cartData.subscribe(function(updateCartData){if(this.setProductOptions(updateCartData)){this.updateOptions();}}.bind(this));$(selectors.formSelector).on(this.eventName,function(){this.setProductOptions(cartData());this.updateOptions();}.bind(this));},Updater=function(eventName,updateOptionsCallback){if(this instanceof Updater){this.eventName=eventName;this.updateOptions=updateOptionsCallback;this.productOptions={};}};Updater.prototype.setProductOptions=setProductOptions;Updater.prototype.listen=listen;return Updater;});","Magento_ConfigurableProduct/js/product/view/product-info-resolver.min.js":"define(['underscore','Magento_Catalog/js/product/view/product-info'],function(_,productInfo){'use strict';return function($form){var optionValues=[],product=_.findWhere($form.serializeArray(),{name:'product'}),productId;if(!_.isUndefined(product)){productId=product.value;_.each($form.serializeArray(),function(item){if(item.name.indexOf('super_attribute')!==-1){optionValues.push(item.value);}});optionValues.sort();productInfo().push({'id':productId,'optionValues':optionValues});}\nreturn _.uniq(productInfo(),function(item){var optionValuesStr=item.optionValues?item.optionValues.join():'';return item.id+optionValuesStr;});};});","Magento_Msrp/js/view/checkout/minicart/subtotal/totals.min.js":"define(['Magento_Tax/js/view/checkout/minicart/subtotal/totals','underscore'],function(Component,_){'use strict';return Component.extend({initialize:function(){this._super();this.displaySubtotal(this.isMsrpApplied(this.cart().items));this.cart.subscribe(function(updatedCart){this.displaySubtotal(this.isMsrpApplied(updatedCart.items));},this);},isMsrpApplied:function(cartItems){return!_.find(cartItems,function(item){if(_.has(item,'canApplyMsrp')){return item.canApplyMsrp;}\nreturn false;});}});});","Magento_PaymentServicesPaypal/js/order-review.min.js":"define(['jquery','uiComponent','Magento_Customer/js/customer-data'],function($,Component,customerData){'use strict';return Component.extend({defaults:{element:null,placeOrderButtonSelector:'#review-button',shippingMethodFormSelector:'#shipping-method-form',shippingMethodInputSelector:'#shipping-method',updateContainerSelector:'#details-reload',waitLoadingContainer:'#review-please-wait',orderFormSelector:'#order-review-form',editShoppingCartSelector:'.magento-payments-review-items .edit',updateShippingMethodUrl:null,placeOrderUrl:null,canEditShippingMethod:false,isVirtual:false},initialize:function(config,element){this._super();this.element=element;$(this.placeOrderButtonSelector).on('click',this.submitOrder.bind(this));$(this.editShoppingCartSelector).on('click',this.invalidateCustomerData.bind(this));if(!this.isVirtual&&this.canEditShippingMethod){$(this.shippingMethodInputSelector).on('change',this.selectShippingMethod.bind(this));this.setPlaceOrderButtonActive(!!$(this.shippingMethodInputSelector).val());}},invalidateCustomerData:function(){customerData.invalidate(['cart']);},beforeRequestStart:function(){$(this.waitLoadingContainer).show();},onRequestComplete:function(){$(this.waitLoadingContainer).hide();},submitOrder:function(){if(this.validateForm()){this.beforeRequestStart();$(this.orderFormSelector).trigger('submit');this.setPlaceOrderButtonActive(false);}},validateForm:function(){return $(this.element).validation().valid();},setPlaceOrderButtonActive:function(isActive){$(this.placeOrderButtonSelector).prop('disabled',!isActive).toggleClass('no-checkout',!isActive);},selectShippingMethod:function(){var shippingMethod,formData,responseCallback;if($(this.waitLoadingContainer).is(':visible')){return false;}\nshippingMethod=$(this.shippingMethodInputSelector).val();shippingMethod=shippingMethod.trim();this.setPlaceOrderButtonActive(false);if(shippingMethod){formData=$(this.shippingMethodFormSelector).serialize()+'&isAjax=true';responseCallback=function(response){if(typeof response.redirectUrl=='undefined'){$(this.updateContainerSelector).html(response.html);}else{window.location=response.redirectUrl;}\nthis.setPlaceOrderButtonActive(true);this.onRequestComplete();};$.ajax({url:this.updateShippingMethodUrl,type:'post',context:this,beforeSend:this.beforeRequestStart,data:formData,success:responseCallback});}}});});","Magento_PaymentServicesPaypal/js/helpers/get-allowed-locations.min.js":"define(['uiRegistry'],function(uiRegistry){'use strict';return function(){const countries=uiRegistry.get('checkoutProvider').get('dictionaries.country_id'),allowedLocations=countries.map(({value})=>value).filter((value)=>value&&value!=='delimiter');return allowedLocations;};});","Magento_PaymentServicesPaypal/js/helpers/get-region-id.min.js":"define(['Magento_Customer/js/customer-data'],function(customerData){'use strict';return function(countryCode,administrativeArea){const countryData=customerData.get('directory-data')(),country=countryData[countryCode];if(country?.regions){const regionIds=Object.keys(country.regions);return regionIds.find((regionId)=>{return country.regions[regionId].code===administrativeArea;})||0;}\nreturn 0;};});","Magento_PaymentServicesPaypal/js/helpers/get-street-line-count.min.js":"define(['uiRegistry'],function(uiRegistry){'use strict';return function(){const shippingAddress=uiRegistry.get('checkout.steps.shipping-step.shippingAddress');return Object.values(shippingAddress.source.shippingAddress.street).length;};});","Magento_PaymentServicesPaypal/js/helpers/is-fastlane-available.min.js":"define(['Magento_Customer/js/model/customer'],function(customer){'use strict';return function(){return window.checkoutConfig.payment.payment_services_paypal_fastlane?.isVisible&&!customer.isLoggedIn();};});","Magento_PaymentServicesPaypal/js/helpers/map-address-to-fastlane.min.js":"define(function(){'use strict';return function(address){const formattedAddress={firstName:address.firstname,lastName:address.lastname,company:address.company,locality:address.city,region:address.regionCode,postalCode:address.postcode,countryCodeAlpha2:address.countryId,phoneNumber:address.telep
2hone};formattedAddress.streetAddress=address.street?.[0];if(address.street?.[1]){formattedAddress.extendedAddress=address.street.slice(1).join(', ');}\nreturn formattedAddress;};});","Magento_PaymentServicesPaypal/js/helpers/map-address-to-magento.min.js":"define(['Magento_Checkout/js/model/new-customer-address','Magento_PaymentServicesPaypal/js/helpers/get-allowed-locations','Magento_PaymentServicesPaypal/js/helpers/get-street-line-count','Magento_PaymentServicesPaypal/js/helpers/get-region-id'],function(Address,getAllowedLocations,getStreetLineCount,getRegionId){'use strict';const createEmptyStreetArray=()=>{const streetLines=getStreetLineCount();return Array.apply(null,Array(streetLines)).reduce((prev,curr,index)=>{prev[index]='';return prev;},{});};return function(address){const street=createEmptyStreetArray();street[0]=address.address.addressLine1||address.address.streetAddress;if(address.address.addressLine2||address.address.extendedAddress){street[1]=address.address.addressLine2||address.address.extendedAddress;}\nconst mappedAddress=Address({region:{region_id:getRegionId(address.address.countryCode||address.address.countryCodeAlpha2,address.address.adminArea1||address.address.region),region_code:address.address.adminArea1||address.address.region,region:address.address.adminArea1||address.address.region},company:address.address.company||'',country_id:address.address.countryCode||address.address.countryCodeAlpha2,street,firstname:address.name?.firstName||'',lastname:address.name?.lastName||'',city:address.address.adminArea2||address.address.locality,telephone:address.phoneNumber?.nationalNumber||'00000000000',postcode:address.address.postalCode}),allowedLocations=getAllowedLocations();mappedAddress.country_id=mappedAddress.countryId;mappedAddress.region_code=mappedAddress.regionCode;mappedAddress.region_id=mappedAddress.regionId;mappedAddress.street=street;if(!allowedLocations.includes(mappedAddress.countryId)){const error=new Error();error.name='paypal_fastlane:address_unavailable';throw error;}\nreturn mappedAddress;};});","Magento_PaymentServicesPaypal/js/helpers/remove-paypal-url-token.min.js":"define(function(){'use strict';return function(){const params=new URLSearchParams(window.location.search);params.delete('token');window.history.replaceState('',document.title,window.location.pathname+'?'+params.toString());};});","Magento_PaymentServicesPaypal/js/model/app-switch-data.min.js":"define(function(){'use strict';const appSwitchKey='paypal-app-switch';return{clearData:()=>{window.localStorage.removeItem(appSwitchKey);},getData:(key)=>{return JSON.parse(window.localStorage.getItem(appSwitchKey)||'{}')[key];},setData:(key,value)=>{const data=JSON.parse(window.localStorage.getItem(appSwitchKey)||'{}');data[key]=value;window.localStorage.setItem(appSwitchKey,JSON.stringify(data));}};});","Magento_PaymentServicesPaypal/js/model/payment-service-mixin.min.js":"define(['underscore','mage/utils/wrapper'],function(_,wrapper){'use strict';var paymentServicesMethods=['payment_services_paypal_smart_buttons','payment_services_paypal_apple_pay','payment_services_paypal_google_pay','payment_services_paypal_hosted_fields','payment_services_paypal_fastlane'],isPaymentServicesButtonsPaymentMethod=function(needleName,paymentMethod){return paymentMethod.method===needleName;},checkApplePayAvailability=function(){window.checkoutConfig.payment['payment_services_paypal_apple_pay'].isVisible=!!(window.checkoutConfig.payment['payment_services_paypal_apple_pay'].isVisible&&window.ApplePaySession);!window.ApplePaySession&&console.log('Apple Pay is not supported or not available');},extender={setPaymentMethods:function(originFn,methods){var paymentServicesButtonMethodIndex;checkApplePayAvailability();_.each(paymentServicesMethods,function(paymentMethod){if(!window.checkoutConfig.payment[paymentMethod].isVisible){paymentServicesButtonMethodIndex=_.findIndex(methods,isPaymentServicesButtonsPaymentMethod.bind(null,paymentMethod));paymentServicesButtonMethodIndex>=0&&methods.splice(paymentServicesButtonMethodIndex,1);}});return originFn(methods);}};return function(target){return wrapper.extend(target,extender);};});","Magento_PaymentServicesPaypal/js/model/step-navigator-mixin.min.js":"define(['mage/utils/wrapper','Magento_Checkout/js/model/quote','Magento_PaymentServicesPaypal/js/model/app-switch-data'],function(wrapper,quote,appSwitchDataModel){'use strict';let mixin={handleHash:function(originalFn){var hashString=window.location.hash.replace('#','');if(hashString.includes('onApprove')||hashString.includes('onCancel')||hashString.includes('token')){if(quote.isVirtual()){const paymentStep=this.steps().find(({code})=>code==='payment');paymentStep.isVisible(true);return;}\nif(appSwitchDataModel.getData('paymentsOrderId')){const paymentStep=this.steps().find(({code})=>code==='payment');paymentStep.navigate(paymentStep);return;}\nconst firstStep=this.steps().sort(this.sortItems)?.[0];if(firstStep){firstStep.navigate(firstStep);return;}}\nreturn originalFn();}};return function(target){return wrapper.extend(target,mixin);};});","Magento_PaymentServicesPaypal/js/view/shipping-information-mixin.min.js":"define(['Magento_PaymentServicesPaypal/js/helpers/is-fastlane-available','Magento_PaymentServicesPaypal/js/view/payment/fastlane'],function(isFastlaneAvailable,fastlaneModel){'use strict';var mixin={initialize:function(){this._super();if(!isFastlaneAvailable()){return;}\nfastlaneModel.setup();return this;},back:function(){if(fastlaneModel.profileData()){fastlaneModel.displayChangeShipping();}else{this._super();}}};return function(shippingInformation){return shippingInformation.extend(mixin);};});","Magento_PaymentServicesPaypal/js/view/shipping-mixin.min.js":"define(function(){'use strict';var mixin={selectShippingMethod:function(shippingMethod){this._super(shippingMethod);window.checkoutConfig.selectedShippingMethod=shippingMethod;return true;},};return function(shipping){return shipping.extend(mixin);};});","Magento_PaymentServicesPaypal/js/view/customer_account/vault/add-card-button.min.js":"define(['jquery','jquery-ui-modules/widget','mage/translate'],function($){'use strict';$.widget('mage.cards',{_create:function(){let options=this.options;let addCard=options.addCard;if(addCard){$(document).on('click',addCard,this._addCard.bind(this));}},_addCard:function(){window.location=this.options.addCardLocation;}});return $.mage.cards;});","Magento_PaymentServicesPaypal/js/view/customer_account/vault/add-card-form.min.js":"define([\"jquery\",\"underscore\",\"uiComponent\",\"paymentSdkLoader\",'mage/translate','Magento_Customer/js/customer-data',],function($,_,Component,paymentSdkLoader,$t,customerData){\"use strict\";const cardFormSubmitButton=document.getElementById(\"paymentservices-add-card-button\");const paymentServicesAddVaultCardContainer=document.getElementById(\"paymentservices_add_vault_card\");const cardFormAddress=$(\".form-address-edit\")\nreturn Component.extend({defaults:{template:\"Magento_PaymentServicesPaypal/customer_account/vault/add-card-form\",componentParams:null,paymentSdkReady:null,invali
2dFields:[],emptyErrorMessage:$t('This is a required field.'),fields:{number:{errorMessage:$t('Please enter a valid credit card number.'),},expirationDate:{errorMessage:$t('Incorrect credit card expiration date.'),},cvv:{errorMessage:$t('Please enter a valid credit card security code.'),}}},initialize:function(){this._super().observe('invalidFields');this.initPaymentsSDK(this.componentParams);return this;},initPaymentsSDK:function({paymentsSDKUrl,paymentsSDKFallbackUrl,storeViewCode,oauthToken,graphQLEndpointUrl}){this.showLoader(true);const loader=paymentSdkLoader().withPreferredUrl(paymentsSDKUrl).withFallbackUrl(paymentsSDKFallbackUrl).withGraphqlEndpoint(graphQLEndpointUrl).withGraphqlCustomerToken(oauthToken).forStoreView(storeViewCode).withVaultNamespace();this.paymentSdkReady=loader.load();},afterRender:function(){this.paymentSdkReady.then(async(sdk)=>{this.showLoader(false);if(!sdk.Vault.CreditCard.isAvailable()){paymentServicesAddVaultCardContainer.innerHTML=this.displayMessage($t(\"CreditCard Vault is not available.\"),'error');return;}\nawait sdk.Vault.CreditCard.render({styles:{input:{'font-family':'\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif','font-size':'14px','font-weight':'400','border':'1px solid #c2c2c2','border-radius':'1px','padding':'0 9px','height':'32px','width':'100%','box-sizing':'border-box',},':focus':{color:'#333'},'.valid':{color:'#333'},'.invalid':{'color':'#ed8380','box-shadow':'none'},body:{'margin':'0','padding':'0',},\"input.card-field-number.display-icon + .card-icon\":{display:\"none !important\",height:\"0\",},\"input.card-field-number.display-icon\":{padding:\"0 9px !important\",},},fields:{description:{selector:\"#card-vault-container #vault-card-description\"},number:{selector:\"#card-vault-container #vault-card-number\"},expirationDate:{selector:\"#card-vault-container #vault-expiration-date\"},cvv:{selector:\"#card-vault-container #vault-cvv\"},},onError:(error)=>{this.addMessage($t(\"Error while vaulting the card, please try again.\"),\"error\");console.error(error.message)\nthis.showLoader(false);},onCancel:()=>{console.debug(\"user cancelled the card vaulting process\");this.showLoader(false);},getBillingAddress:this.getBillingAddress.bind(this),onSuccess:()=>{this.showLoader(false);paymentServicesAddVaultCardContainer.innerHTML=this.displayMessage($t('Card vaulted successfully. Please wait to be redirected to the Stored Payment Methods page.'),'success');setTimeout(()=>{window.location.replace(this.componentParams.savedCardListUrl);},3000);},onValidityChange:this.onValidityChange.bind(this),}).then((creditCardVault)=>{cardFormSubmitButton.addEventListener(\"click\",()=>{if(!creditCardVault.isFormValid()){var fields=creditCardVault.getFormState();Object.keys(fields).forEach((field)=>{this.onValidityChange(fields,field);})\ncreditCardVault.submit();}\nif(!cardFormAddress.validation()||!cardFormAddress.validation('isValid')){this.showLoader(false);return;}\nif(creditCardVault.isFormValid()){this.showLoader(true);creditCardVault.submit();}});}).catch((e)=>{this.showLoader(false);this.addMessage($t(\"Error rendering Payment SDK, please reload the page and try again.\"),\"error\");console.error('Error rendering Payments SDK',e);});}).catch((error)=>{this.showLoader(false);paymentServicesAddVaultCardContainer.innerHTML=this.displayMessage($t(\"Error initializing Payment SDK, please reload the page and try again.\"),'error');console.error(\"Error initializing Payment SDK:\",error);});},getBillingAddress:function(){const regionInput=cardFormAddress.find(\"[name='region']\").val();const regionIdDropdown=cardFormAddress.find(\"[name='region_id']\");const regionIdValue=regionIdDropdown.val();const regionIdLabel=regionIdDropdown.val()?regionIdDropdown.find(`option[value='${regionIdValue}']`).text():\"\";return{firstName:cardFormAddress.find(\"[name='firstname']\").val(),lastName:cardFormAddress.find(\"[name='lastname']\").val(),streetAddress:cardFormAddress.find(\"[name='street[0]']\").val(),extendedAddress:cardFormAddress.find(\"[name='street[1]']\").val(),region:regionIdDropdown.prop('disabled')?regi
2onInput:regionIdLabel,locality:cardFormAddress.find(\"[name='city']\").val(),postalCode:cardFormAddress.find(\"[name='postcode']\").val(),countryCodeAlpha2:cardFormAddress.find(\"[name='country_id']\").val(),};},showLoader:function(show){var event=show?'processStart':'processStop';$('body').trigger(event);},addMessage:function(message,type){type=type||'error';customerData.set('messages',{messages:[{type:type,text:message}],'data_id':Math.floor(Date.now()/ 1000)});},onValidityChange:function(fields,emittedBy){var valid=_.every(fields,function(field){return field.isValid});var invalidFields=this.invalidFields().filter(field=>field.name!==emittedBy);if(!valid){if(fields[emittedBy]&&!fields[emittedBy].isValid){invalidFields.push({name:emittedBy,message:fields[emittedBy].isEmpty?this.emptyErrorMessage:this.fields[emittedBy].errorMessage});}\nthis.invalidFields(invalidFields)}else{this.invalidFields([]);}},isFieldValid:function(fieldName){return!this.invalidFields.findWhere({name:fieldName});},getFieldErrorMessage:function(fieldName){return!this.isFieldValid(fieldName)?this.invalidFields.findWhere({name:fieldName}).message:'';},displayMessage:function(text,type){return`<div class=\"${type} message\"><div>${$t(text)}</div></div>`;},});});","Magento_PaymentServicesPaypal/js/view/form/element/change-address.min.js":"define(['uiComponent','Magento_PaymentServicesPaypal/js/helpers/is-fastlane-available','Magento_PaymentServicesPaypal/js/view/payment/fastlane'],function(Component,isFastlaneAvailable,fastlaneModel){'use strict';return Component.extend({profileData:null,defaults:{template:'Magento_PaymentServicesPaypal/form/element/change-address'},initialize:function(){this._super();if(!isFastlaneAvailable()){return this;}\nthis.profileData=fastlaneModel.profileData;return this;},displayChangeShipping:async function(){fastlaneModel.displayChangeShipping();}});});","Magento_PaymentServicesPaypal/js/view/form/element/email-mixin.min.js":"define(['Magento_Checkout/js/model/quote','Magento_Checkout/js/model/step-navigator','Magento_PaymentServicesPaypal/js/helpers/is-fastlane-available','Magento_PaymentServicesPaypal/js/view/payment/fastlane'],function(quote,stepsNavigator,isFastlaneAvailable,fastlaneModel){'use strict';var mixin={shippingServiceSubscription:null,checkEmailAvailability:async function(){this._super();if((!quote.isVirtual()&&this.name!=='checkout.steps.shipping-step.shippingAddress.customer-email')||(quote.isVirtual()&&this.name!=='checkout.steps.billing-step.payment.customer-email')){return;}\nif(!isFastlaneAvailable()){return;}\nif(stepsNavigator.getActiveItemIndex()!==0){return;}\nawait fastlaneModel.setup();fastlaneModel.lookupCustomerByEmail(this.email());}};return function(target){return target.extend(mixin);};});","Magento_PaymentServicesPaypal/js/view/form/element/powered-by.min.js":"define(['knockout','uiComponent','Magento_PaymentServicesPaypal/js/helpers/is-fastlane-available','Magento_PaymentServicesPaypal/js/view/payment/fastlane'],function(ko,Component,isFastlaneAvailable,fastlaneModel){'use strict';return Component.extend({profileData:null,defaults:{template:'Magento_PaymentServicesPaypal/form/element/powered-by'},initialize:function(config){this._super(config);this.id=config.id;this.profileData=fastlaneModel.profileData;this.isVisible=ko.observable(false);this.profileData.subscribe(this.renderWatermark.bind(this));return this;},isEmailWatermarkEnabled:function(){return this.id==='paypal-fastlane-email-watermark'&&window.checkoutConfig.payment.payment_services_paypal_fastlane.messaging;},isShippingWatermarkEnabled:function(){return this.id!=='paypal-fastlane-email-watermark'&&!!this.profileData();},shouldRenderWatermark:async function(){if(!isFastlaneAvailable()){return false;}\nawait fastlaneModel.setup();const shouldRender=this.isEmailWatermarkEnabled()||this.isShippingWatermarkEnabled();this.isVisible(shouldRender);},renderWatermark:async function(){await this.shouldRenderWatermark();if(this.isVisible()){fastlaneModel.renderFastlaneWatermarkComponent(`#${this.id}`);}}});});","Magento_PaymentServicesPaypal/js/view/payment/apple-pay-cart.min.js":"define(['knockout','underscore','jquery','mageUtils','Magento_PaymentServicesPaypal/js/view/payment/paypal-abstract','mage/translate','Magento_Customer/js/customer-data','Magento_PaymentServicesPaypal/js/view/payment/methods/apple-pay','Magento_Checkout/js/model/quote','Magento_Customer/js/model/customer'],function(ko,_,$,utils,Component,$t,customerData,ApplePayButton,quote,customer){'use strict';return Component.extend({defaults:{sdkNamespace:'paypalApplePay',sdkParamsKey:'applepay',buttonContainerId:'apple-pay-${ $.uid }',paymentActionError:$t('Something went wrong with your request. Please try again later.'),isErrorDisplayed:false,isVisible:ko.observable(false)},initialize:function(config,element){_.bindAll(this,'initApplePayButton','onClick','afterOnAuthorize','afterCreateOrder','showPopup','cancelApplePay');config.uid=utils.uniqueid();this._super();this.element=element;
2if(this.element){this.element.id=this.buttonContainerId;this.getSdkParams().then(this.initApplePayButton).catch(console.log);}\nreturn this;},initApplePayButton:function(){this.applePayButton=new ApplePayButton({scriptParams:this.sdkParams,createOrderUrl:this.createOrderUrl,estimateShippingMethodsWhenLoggedInUrl:this.estimateShippingMethodsWhenLoggedInUrl,estimateShippingMethodsWhenGuestUrl:this.estimateShippingMethodsWhenGuestUrl,shippingInformationWhenLoggedInUrl:this.shippingInformationWhenLoggedInUrl,shippingInformationWhenGuestUrl:this.shippingInformationWhenGuestUrl,updatePaypalOrderUrl:this.updatePaypalOrderUrl,countriesUrl:this.countriesUrl,placeOrderUrl:this.placeOrderUrl,showPopup:this.showPopup,updateQuoteUrl:this.authorizeOrderUrl,onClick:this.onClick,afterCreateOrder:this.afterCreateOrder,catchCreateOrder:this.catchError,onError:this.catchError,buttonContainerId:this.buttonContainerId,afterOnAuthorize:this.afterOnAuthorize,shippingAddressRequired:!this.isVirtual,styles:this.styles,location:this.pageType,...(this.addMessage&&{addMessage:this.addMessage})});$('#'+this.buttonContainerId).on('click',this.onClick);this.applePayButton.sdkLoaded.then(this.applePayButton.initAppleSDK).then(()=>{this.isVisible(!!this.applePayButton.applePayInstance);});},afterOnAuthorize:function(){this.applePayButton.showLoaderAsync(true).then(()=>{fetch(this.placeOrderUrl,{method:'POST'}).then(response=>{if(response.redirected&&response.url.includes('review')){throw new Error();}\nreturn response.text();}).then(result=>{if(result){customerData.invalidate(['cart']);document.open();document.write(result);document.close();}}).catch(error=>{this.applePayButton.showLoader(false);this.applePayButton.catchError(error);});}).catch(error=>{this.catchError(error);});},onClick:function(){if(this.location==='minicart'){this.fixCustomerData();}\nthis.applePayButton.showLoaderAsync(true).then(()=>{const data={response:{'paypal-order':{currency_code:window.checkoutConfig.quoteData.base_currency_code,amount:window.checkoutConfig.quoteData.grand_total.toString()}}};this.applePayButton.showPopup(data);});this.isErrorDisplayed=false;},afterCreateOrder:function(data){if(data.response['paypal-order']&&data.response['paypal-order']['mp_order_id']){this.paymentsOrderId=data.response['paypal-order']['mp_order_id'];this.paypalOrderId=data.response['paypal-order'].id;return this.paypalOrderId;}\nthrow new Error();},cancelApplePay:function(){customerData.invalidate(['cart']);window.location.reload();},showPopup:function(paymentData){const paymentRequest={countryCode:this.applePayButton.applePayConfig.countryCode,merchantCapabilities:this.applePayButton.applePayConfig.merchantCapabilities,supportedNetworks:this.applePayButton.applePayConfig.supportedNetworks,currencyCode:paymentData.response['paypal-order']['currency_code'],requiredShippingContactFields:['name','phone','email','postalAddress'],requiredBillingContactFields:['postalAddress'],total:{label:$t('Summary'),type:'final',amount:Number(paymentData.response['paypal-order']['amount']).toString()}};this.applePaySession=new ApplePaySession(this.applePayButton.applePayVersionNumber,paymentRequest);this.applePayButton.onApplePayValidateMerchant(this.applePaySession);this.applePayButton.onApplePayCancel(this.applePaySession,this.cancelApplePay);this.applePayButton.onApplePayShippingContactSelected(this.applePaySession,quote.getQuoteId(),paymentRequest.total,quote.isVirtual());this.applePayButton.onApplePayShippingMethodSelectedInCartPage(this.applePaySession,quote.getQuoteId());this.applePayButton.onApplePayPaymentAuthorized(this.applePaySession);this.applePaySession.begin();},fixCustomerData:function(){if(customer.isLoggedIn()===undefined&&window.isCustomerLoggedIn!==undefined){customer.setIsLoggedIn(window.isCustomerLoggedIn);}\nif(customer.isLoggedIn()&&_.isEmpty(customer.customerData)){customer.customerData=window.customerData;}}});});","Magento_PaymentServicesPaypal/js/view/payment/apple-pay-express-checkout.min.js":"define(['underscore','mage/translate','Magento_PaymentServicesPaypal/js/view/payment/apple-pay-cart','Magento_Ui/js/model/messageList'],function(_,$t,Component,globalMessageList){'use strict';const config=_.get(window.checkoutConfig.payment.payment_services_paypal_apple_pay,'express',{});return Component.extend({defaults:{sdkNamespace:'paypalApplePay',sdkParamsKey:'applepay',buttonContainerId:'applepay-button-container',paymentActionError:$t('Something went wrong with your request. Please try again later.'),isErrorDisplayed:false,template:'Magento_PaymentServicesPaypal/payment/apple-pay-express-checkout',authorizeOrderUrl:config.authorizeOrderUrl,placeOrderUrl:config.placeOrderUrl,isVirtual:!!window.checkoutConfig.quoteData.is_virtual,styles:window.checkoutConfig.payment.payment_services_paypal_apple_pay.buttonStyles,sort:config.sort,pageType:config.location,createOrderUrl:config.createOrderUrl,estimateShippingMethodsWhenLoggedInUrl:config.estimateShippingMethodsWhenLoggedInUrl,estimateShippingMethodsWhenGuestUrl:config.estimateShippingMethodsWhenGuestUrl,shippingInformationWhenLoggedInUrl:config.shippingInformationWhenLoggedInUrl,
2shippingInformationWhenGuestUrl:config.shippingInformationWhenGuestUrl,updatePayPalOrderUrl:config.updatePayPalOrderUrl,countriesUrl:config.countriesUrl,showPopup:config.showPopup},initialize:function(){_.bindAll(this,'initApplePayButton','cancelApplePay');this._super();return this;},isMethodActive:function(){return config.isVisible;},renderAfter:function(){this.getSdkParams().then(this.initApplePayButton).catch(console.log);},initApplePayButton:function(){if(document.getElementById(this.buttonContainerId)){this._super();}},cancelApplePay:function(){this.applePayButton.showLoaderAsync(false);},catchError:function(error){var message=error instanceof ResponseError?error.message:this.requestProcessingError;this.showLoader(false);if(this.isErrorDisplayed){return;}\nif(error.hidden===undefined||!error.hidden){this.addMessage(message,'error');}\nthis.isErrorDisplayed=true;},addMessage:function(message,type){type=type||'error';const messageFunction=type==='error'?'addErrorMessage':'addSuccessMessage';globalMessageList[messageFunction]({message});}});});","Magento_PaymentServicesPaypal/js/view/payment/apple-pay-product.min.js":"define(['jquery','underscore','mageUtils','Magento_PaymentServicesPaypal/js/view/payment/paypal-abstract','mage/translate','Magento_Customer/js/customer-data','Magento_PaymentServicesPaypal/js/view/errors/response-error','Magento_PaymentServicesPaypal/js/view/payment/methods/apple-pay',],function($,_,utils,Component,$t,customerData,ResponseError,ApplePayButton){'use strict';const HTTP_STATUS_OK=200;var refreshCustomerData=function(url){customerData.onAjaxComplete({},{type:'POST',url:url,});}\nreturn Component.extend({defaults:{sdkNamespace:'paypalApplePay',scriptParams:{},buttonContainerId:'apple-pay-${ $.uid }',template:'Magento_PaymentServicesPaypal/payment/apple-pay',paymentsOrderId:null,paypalOrderId:null,sdkLoaded:null,quoteIdForRest:null,quoteId:null,sdkParamsKey:'applepay',paymentTypeIconTitle:$t('Pay with Apple Pay'),notEligibleErrorMessage:$t('This payment option is currently unavailable.'),productFormSelector:'#product_addtocart_form'},initialize:function(config,element){_.bindAll(this,'initApplePayButton','onClick','afterUpdateQuote','beforeCreateOrder','afterCreateOrder','afterOnAuthorize','onCancel');config.uid=utils.uniqueid();this._super();this.element=element;this.element.id=this.buttonContainerId;this.getSdkParams().then(this.initApplePayButton).catch(console.log);return this;},initApplePayButton:function(){this.applePayButton=new ApplePayButton({scriptParams:this.sdkParams,createOrderUrl:this.createOrderUrl,updateQuoteUrl:this.authorizeOrderUrl,shippingInformationWhenGuestUrl:this.shippingInformationWhenGuestUrl,shippingInformationWhenLoggedInUrl:this.shippingInformationWhenLoggedInUrl,estimateShippingMethodsWhenGuestUrl:this.estimateShippingMethodsWhenGuestUrl,estimateShippingMethodsWhenLoggedInUrl:this.estimateShippingMethodsWhenLoggedInUrl,updatePayPalOrderUrl:this.updatePayPalOrderUrl,setQuoteAsInactiveUrl:this.setQuoteAsInactiveUrl,countriesUrl:this.countriesUrl,placeOrderUrl:this.placeOrderUrl,onClick:this.onClick,beforeCreateOrder:this.beforeCreateOrder,afterCreateOrder:this.afterCreateOrder,catchCreateOrder:this.catchError,onError:this.catchError,buttonContainerId:this.buttonContainerId,afterUpdateQuote:this.afterUpdateQuote,shippingAddressRequired:!this.isVirtual,styles:this.styles,afterOnAuthorize:this.afterOnAuthorize,onCancel:this.onCancel,location:this.pageType,});$('#'+this.buttonContainerId).on('click',this.onClick);this.applePayButton.sdkLoaded.then(this.applePayButton.initAppleSDK);},afterUpdateQuote:function(data){window.location=data.redirectUrl;this.applePayButton.showLoader(false);},onClick:function(){var $form=$(this.productFormSelector);if($form.data('mageValidation')){this.formValid=$form.validation('isValid');}\nif(this.formValid){this.applePayButton.showLoaderAsync(true).then(()=>{return this.applePayButton.createOrder();}).then(()=>{refreshCustomerData(this.createOrderUrl);}).catch(error=>{this.applePayButton.catchError(error);});}},setQuoteInactive:function(){$.ajax({type:'POST',url:this.setQuoteAsInactiveUrl,});},showPopup:function(paymentData){const paymentRequest={countryCode:this.applePayButton.applePayConfig.countryCode,merchantCapabilities:this.applePayButton.applePayConfig.merchantCapabilities,supportedNetworks:this.applePayButton.applePayConfig.supp
2ortedNetworks,currencyCode:String(paymentData['currencyCode']),requiredShippingContactFields:[\"name\",\"phone\",\"email\",\"postalAddress\"],requiredBillingContactFields:[\"postalAddress\"],total:{label:$t(\"Summary\"),type:\"final\",amount:Number(paymentData['totalPrice']).toString(),}};this.applePaySession=new ApplePaySession(this.applePayButton.applePayVersionNumber,paymentRequest);this.applePayButton.onApplePayValidateMerchant(this.applePaySession);this.applePayButton.onApplePayCancel(this.applePaySession,this.setQuoteInactive.bind(this));this.applePayButton.onApplePayShippingContactSelected(this.applePaySession,this.quoteIdForRest,paymentRequest.total,null);this.applePayButton.onApplePayShippingMethodSelected(this.applePaySession,this.quoteId,this.quoteIdForRest,this.paypalOrderId);this.applePayButton.onApplePayPaymentAuthorized(this.applePaySession);this.applePaySession.begin();},beforeCreateOrder:function(){if(this.formInvalid){throw new Error('Form is Invalid');}\nlet xhr=new XMLHttpRequest();xhr.open('POST',this.addToCartUrl,false);xhr.send(new FormData($(this.productFormSelector)[0]));if(xhr.status!==HTTP_STATUS_OK){throw new Error('Request failed');}else{try{let result=JSON.parse(xhr.responseText);if(typeof result.success!=='undefined'){refreshCustomerData(this.addToCartUrl);this.quoteIdForRest=result.success.quoteIdMask;this.quoteId=result.success.quoteId;return result.success;}}catch(parseError){throw new Error('Failed to parse response JSON: '+parseError.message);}}},afterCreateOrder:function(data){if(data.response['paypal-order']&&data.response['paypal-order']['mp_order_id']){this.paymentsOrderId=data.response['paypal-order']['mp_order_id'];this.paypalOrderId=data.response['paypal-order'].id;this.showPopup({displayItems:[],currencyCode:data.response['paypal-order']['currency_code'],totalPriceStatus:'FINAL',totalPrice:Number(data.response['paypal-order']['amount']).toString(),totalPriceLabel:$t('Total')});return this.paypalOrderId;}\nthrow new Error();},afterOnAuthorize:function(data){this.applePayButton.showLoaderAsync(true).then(()=>{fetch(this.placeOrderUrl,{method:'POST'}).then(response=>{if(response.redirected&&response.url.includes(\"review\")){throw new Error();}\nreturn response.text();}).then(result=>{if(result){customerData.invalidate(['cart']);document.open();document.write(result);document.close();}}).catch(error=>{this.applePayButton.showLoader(false);this.applePayButton.catchError(error);});}).catch(error=>{this.catchError(error);});},onCancel:function(){customerData.invalidate(['cart']);window.location=this.cancelUrl;}});});","Magento_PaymentServicesPaypal/js/view/payment/fastlane.min.js":"define(['jquery','knockout','uiRegistry','mage/translate','Magento_Checkout/js/model/quote','Magento_Checkout/js/action/select-payment-method','Magento_Checkout/js/action/set-shipping-information','Magento_Checkout/js/checkout-data','Magento_Checkout/js/model/shipping-service','Magento_Checkout/js/model/step-navigator','Magento_Customer/js/model/address-list','Magento_Ui/js/model/messageList','Magento_PaymentServicesPaypal/js/helpers/get-allowed-locations','Magento_PaymentServicesPaypal/js/helpers/map-address-to-fastlane','Magento_PaymentServicesPaypal/js/helpers/map-address-to-magento','scriptLoader'],function($,ko,uiRegistry,$t,quote,selectPaymentMethodAction,setShippingInformationAction,checkoutData,shippingService,stepNavigator,addressList,messageList,getAllowedLocations,mapAddressToFastlane,mapAddressToMagento,loadSdkScript){'use strict';return{code:'payment_services_paypal_fastlane',clientInstance:null,fastlaneInstance:null,fastlanePaymentComponent:null,fastlaneWatermarkComponent:null,deviceData:null,runningSetup:null,customerContextId:null,profileData:ko.observable(null),email:null,sdkNamespace:'paypalFastlane',liabilityShift:ko.observable(null),authenticationState:ko.observable(null),createFastlaneInstance:function(){return new Promise((resolve)=>{const braintreeVersion='3.116.2';const fastlaneRequire=require.config({context:'fastlane',paths:{braintree:`https://js.braintreegateway.com/web/${braintreeVersion}/js`,fastlane:'https://www.paypalobjects.com/connect-boba',},shim:{'fastlane/axo':{deps:['braintree/client','braintree/hosted-fields'],},'fastlane/axo.min':{deps:['braintree/client.min','braintree/hosted-fields.min'],},},});fastlaneRequire(['fastlane/axo.min'],()=>{(async()=>{window.braintree=window.braintree||{};window.braintree.client=await new Promise(resolve=>fastlaneRequire(['braintree/client.min'],resolve));window.braintree.hostedFields=await new Promise(resolve=>fastlaneRequire(['braintree/hosted-fields.min'],resolve));window.braintree.version=braintreeVersion;await loadSdkScript(window.checkoutConfig.payment[this.getCode()].sdkParams,this.sdkNamespace)\nconst fastlaneInstance=await window[this.sdkNamespace].Connect({shippingAddressOptions:{allowedLocations:getAllowedLocations(),},styles:this.getStyles()});resolve(fastlaneInstance);})();});});}
2,getCode:function(){return this.code;},getStyles:function(){return{theme:window.checkoutConfig.payment[this.getCode()].styling.theme,root:{backgroundColor:window.checkoutConfig.payment[this.getCode()].styling.rootBackgroundColor,errorColor:window.checkoutConfig.payment[this.getCode()].styling.rootErrorColor,fontFamily:window.checkoutConfig.payment[this.getCode()].styling.rootFontFamily,fontSizeBase:window.checkoutConfig.payment[this.getCode()].styling.rootFontSize,padding:window.checkoutConfig.payment[this.getCode()].styling.rootPadding,primaryColor:window.checkoutConfig.payment[this.getCode()].styling.rootPrimaryColor,textColorBase:window.checkoutConfig.payment[this.getCode()].styling.rootTextColor,},input:{backgroundColor:window.checkoutConfig.payment[this.getCode()].styling.inputBackgroundColor,borderColor:window.checkoutConfig.payment[this.getCode()].styling.inputBorderColor,borderRadius:window.checkoutConfig.payment[this.getCode()].styling.inputBorderRadius,borderWidth:window.checkoutConfig.payment[this.getCode()].styling.inputBorderWidth,focusBorderColor:window.checkoutConfig.payment[this.getCode()].styling.inputFocusBorderColor,textColorBase:window.checkoutConfig.payment[this.getCode()].styling.inputTextColor,}};},setup:async function(){if(this.fastlaneInstance!==null){return Promise.resolve();}\nif(this.runningSetup){return this.runningSetup;}\nthis.runningSetup=new Promise(async(resolve)=>{this.attachStepsListener();if(this.fastlaneInstance===null){this.fastlaneInstance=await this.createFastlaneInstance();}\nresolve();});return this.runningSetup;},attachStepsListener:function(){stepNavigator.steps.subscribe((steps)=>{const payment=steps.find(({code})=>code==='payment');if(payment.isVisible()&&this.profileData()&&!quote.paymentMethod()){checkoutData.setSelectedPaymentMethod(this.code);selectPaymentMethodAction({method:this.code});}});},lookupCustomerByEmail:async function(email){if(!this.fastlaneInstance){return;}\ntry{this.showLoader(true);this.profileData(null);this.customerContextId=null;const{customerContextId}=await this.fastlaneInstance?.identity?.lookupCustomerByEmail(email)||{};this.showLoader(false);this.customerContextId=customerContextId;if(this.customerContextId){return this.triggerAuthenticationFlow();}}catch(error){console.warn(error);this.showLoader(false);}},quoteHasAddressSaved:function(profileData){return!this.email&&profileData?.shippingAddress?.address?.addressLine1&&!quote.shippingAddress().postcode;},userHasChangedEmailAddress:function(){return this.email&&this.email!==quote.guestEmail;},triggerAuthenticationFlow:async function(){if(!this.fastlaneInstance){return;}\nthis.showLoader(true);const{profileData}=await this.fastlaneInstance.identity.triggerAuthenticationFlow(this.customerContextId);this.showLoader(false);if(profileData){if(this.quoteHasAddressSaved(profileData)||this.userHasChangedEmailAddress()){this.processUserData(profileData);}\nthis.email=quote.guestEmail;this.profileData(profileData);}},renderFastlanePaymentComponent:async function(selector){if(!this.fastlaneInstance){return;}\nif(this.customerContextId===null){await this.lookupCustomerByEmail(quote.guestEmail);}\nconst shippingAddress=mapAddressToFastlane(quote.shippingAddress()),fields={phoneNumber:{prefill:this.profileData()?.shippingAddress?.phoneNumber||quote.shippingAddress().telephone||''},cardholderName:{prefill:shippingAddress.firstName&&shippingAddress.lastName?`${shippingAddress.firstName} ${shippingAddress.lastName}`:''}},styles=this.getStyles();this.fastlanePaymentComponent=await this.fastlaneInstance.FastlanePaymentComponent({fields,shippingAddress,styles});this.fastlanePaymentComponent.render(selector);},displayChangeShipping:async function(){if(!this.fastlaneInstance?.profile){return;}\nthis.showLoader(true);const{selectionChanged,selectedAddress}=await this.fastlaneInstance.profile.showShippingAddressSelector();if(selectionChanged){this.processUserData({shippingAddress:selectedAddress});}\nthis.showLoader(false);},renderFastlaneWatermarkComponent:async function(selector){if(!this.fastlaneInstance){return;}\nif(!document.querySelector(selector)){return;}\nthis.fastlaneWatermarkComponent=await this.fastlaneInstance.FastlaneWatermarkComponent({includeAdditionalInfo:true});this.fastlaneWatermarkComponent.render(selector);},processUserData:async function(profileData){if(this.shippingServiceSubscription){this.shippingServiceSubscription.dispose();}\ntry{if(quote.isVirtual()){selectPaymentMethodAction({method:this.code});return;}\nconst shippingAddress=uiRegistry.get('checkout.steps.shipping-step.shippingAddress'),mappedAddress=ma
2pAddressToMagento(profileData.shippingAddress);this.shippingServiceSubscription=shippingService.getShippingRates().subscribe(function(rates){this.shippingServiceSubscription.dispose();rates=rates.filter(function(rate){return rate.carrier_code!=='instore';});if(!rates||!rates.length){this.redirectToShipping();return;}\nif(!shippingAddress.source.get('params.invalid')&&rates&&rates[0]){shippingAddress.selectShippingMethod(rates[0]);setShippingInformationAction().done(function(){if(stepNavigator.getActiveItemIndex()===0){stepNavigator.next();}});}}.bind(this));addressList.push(mappedAddress);this.addAddressToCheckoutProvider(mappedAddress);shippingAddress.source.set('params.invalid',false);shippingAddress.triggerShippingDataValidateEvent();if(shippingAddress.source.get('params.invalid')){this.redirectToShipping();}}catch{messageList.addErrorMessage({message:$t('The selected shipping address is not available to be used. Please enter a new one.')});this.showLoader(false);}},redirectToShipping:function(){stepNavigator.setHash('shipping');this.showLoader(false);},addAddressToCheckoutProvider:function(address){const checkoutProvider=uiRegistry.get('checkoutProvider');const billingAddress=uiRegistry.get('checkout.steps.billing-step.payment.payments-list.paypal_billing_agreement-form');checkoutProvider.set('shippingAddress',address);if(billingAddress&&billingAddress.isAddressSameAsShipping()){quote.shippingAddress({...address,street:Object.values(address.street)});quote.billingAddress({...address,street:Object.values(address.street)});}},getPaymentToken:function(){if(!this.fastlanePaymentComponent){const error=new Error();error.name='paypal_paypal:undefined_component';throw error;}\nreturn this.fastlanePaymentComponent.getPaymentToken();},validate3DS:async function(nonce){const totals=quote.totals();const payload={amount:totals['base_grand_total'].toFixed(2),currency:window.checkoutConfig.quoteData.base_currency_code,nonce,threeDSRequested:true,transactionContext:{experience_context:{brand_name:\"\",locale:window.LOCALE}}}\nconst isThreeDomainSecureEligible=await window[this.sdkNamespace].ThreeDomainSecureClient.isEligible(payload);if(isThreeDomainSecureEligible){const{liabilityShift,authenticationState,nonce}=await window[this.sdkNamespace].ThreeDomainSecureClient.show();this.liabilityShift(liabilityShift);this.authenticationState(authenticationState);if(authenticationState===\"succeeded\"){return nonce;}else{throw new Error('Authentication has been failed or cancelled');}}\nreturn nonce;},showLoader:function(show){var event=show?'processStart':'processStop';$('body').trigger(event);},};});","Magento_PaymentServicesPaypal/js/view/payment/google-pay-cart.min.js":"define(['underscore','jquery','mageUtils','Magento_PaymentServicesPaypal/js/view/payment/paypal-abstract','mage/translate','Magento_Customer/js/customer-data','Magento_PaymentServicesPaypal/js/view/errors/response-error','Magento_PaymentServicesPaypal/js/view/payment/methods/google-pay'],function(_,$,utils,Component,$t,customerData,ResponseError,GooglePayButton){'use strict';return Component.extend({defaults:{sdkNamespace:'paypalGooglePay',sdkParamsKey:'googlepay',buttonContainerId:'google-pay-${ $.uid }',paymentActionError:$t('Something went wrong with your request. Please try again later.'),isErrorDisplayed:false},initialize:function(config,element){_.bindAll(this,'initGooglePayButton','onClick','afterOnAuthorize','catchError','onCancel');config.uid=utils.uniqueid();this._super();this.element=element;if(this.element){this.element.id=this.buttonContainerId;this.getSdkParams().then(this.initGooglePayButton).catch(console.log);}\nreturn this;},initGooglePayButton:function(){this.googlePayButton=new GooglePayButton({scriptParams:this.sdkParams,createOrderUrl:this.createOrderUrl,updateQuoteUrl:this.authorizeOrderUrl,onClick:this.onClick,catchCreateOrder:this.catchError,onError:this.catchError,buttonContainerId:this.buttonContainerId,afterOnAuthorize:this.afterOnAuthorize,shippingAddressRequired:!this.isVirtual,styles:this.styles,onCancel:this.onCancel,mode:this.googlePayMode,getOrderDetailsUrl:this.getOrderDetailsUrl,threeDSMode:this.threeDSMode,location:this.pageType});this.googlePayButton.sdkLoaded.then(this.googlePayButton.initGoogleSDK).catch(function(error){console.log('Google Pay SDK not available:',error?.message||error);});},afterOnAuthorize:function(data){window.location=data.redirectUrl;this.googlePayButton.showLoader(false);},onClick:function(){this.isErrorDisplayed=false;this.googlePayButton.showLoaderAsync(true).then(()=>{return this.googlePayButton.createOrder();}).then(()=>{this.refreshCustomerData(this.createOrderUrl);}).catch(error=>{this.catchError(error);});},catchError:function(error){var message=error instanceof ResponseError?error.message:this.paymentActionError;console.log(error);this.googlePayButton.showLoader(false);
2if(this.isErrorDisplayed){return;}\nif(error.hidden===undefined||!error.hidden){this.addMessage(message);}\nthis.isErrorDisplayed=true;},addMessage:function(message,type){type=type||'error';customerData.set('messages',{messages:[{type:type,text:message}],'data_id':Math.floor(Date.now()/ 1000)});},onCancel:function(){customerData.invalidate(['cart']);window.location=this.cancelUrl;},refreshCustomerData:function(url){customerData.onAjaxComplete({},{type:'POST',url:url});}});});","Magento_PaymentServicesPaypal/js/view/payment/google-pay-express-checkout.min.js":"define(['underscore','mage/translate','Magento_PaymentServicesPaypal/js/view/errors/response-error','Magento_PaymentServicesPaypal/js/view/payment/google-pay-cart','Magento_PaymentServicesPaypal/js/view/payment/methods/google-pay','Magento_Ui/js/model/messageList'],function(_,$t,ResponseError,Component,GooglePayButton,globalMessageList){'use strict';const config=_.get(window.checkoutConfig.payment.payment_services_paypal_google_pay,'express',{});return Component.extend({defaults:{sdkNamespace:'paypalGooglePay',sdkParamsKey:'googlepay',buttonContainerId:'paypal-express-container-google-pay',isErrorDisplayed:false,template:'Magento_PaymentServicesPaypal/payment/google-pay-express-checkout',styles:window.checkoutConfig.payment.payment_services_paypal_google_pay.styles,createOrderUrl:config.createOrderUrl,authorizeOrderUrl:config.authorizeOrderUrl,getOrderDetailsUrl:config.getOrderDetailsUrl,isVirtual:!!window.checkoutConfig.quoteData.is_virtual,sort:config.sort,pageType:config.location},initialize:function(){_.bindAll(this,'initGooglePayButton','onClick','afterOnAuthorize','onCancel');this._super();return this;},isMethodActive:function(){return config.isVisible;},renderAfter:function(){this.getSdkParams().then(this.initGooglePayButton).catch(console.log);},addMessage:function(message,type){type=type||'error';const messageFunction=type==='error'?'addErrorMessage':'addSuccessMessage';globalMessageList[messageFunction]({message});},onCancel:function(){this.googlePayButton.showLoader(false);}});});","Magento_PaymentServicesPaypal/js/view/payment/google-pay-product.min.js":"define(['underscore','jquery','mageUtils','Magento_PaymentServicesPaypal/js/view/payment/paypal-abstract','mage/translate','Magento_Customer/js/customer-data','Magento_PaymentServicesPaypal/js/view/errors/response-error','Magento_PaymentServicesPaypal/js/view/payment/methods/google-pay'],function(_,$,utils,Component,$t,customerData,ResponseError,GooglePayButton){'use strict';const HTTP_STATUS_OK=200;var refreshCustomerData=function(url){customerData.onAjaxComplete({},{type:'POST',url:url,});}\nreturn Component.extend({defaults:{sdkNamespace:'paypalGooglePay',scriptParams:{},buttonContainerId:'google-pay-${ $.uid }',template:'Magento_PaymentServicesPaypal/payment/google-pay',paymentsOrderId:null,paypalOrderId:null,sdkLoaded:null,sdkParamsKey:'googlepay',paymentTypeIconTitle:$t('Pay with Google Pay'),requestProcessingError:$t('Something went wrong with your request. Please try again later.'),notEligibleErrorMessage:$t('This payment option is currently unavailable.'),productFormSelector:'#product_addtocart_form'},initialize:function(config,element){_.bindAll(this,'initGooglePayButton','onClick','afterUpdateQuote','catchError','beforeCreateOrder','afterOnAuthorize','onCancel');config.uid=utils.uniqueid();this._super();this.element=element;this.element.id=this.buttonContainerId;this.getSdkParams().then(this.initGooglePayButton).catch(console.log);return this;},initGooglePayButton:function(){this.googlePayButton=new GooglePayButton({scriptParams:this.sdkParams,createOrderUrl:this.createOrderUrl,updateQuoteUrl:this.authorizeOrderUrl,onClick:this.onClick,setQuoteAsInactiveUrl:this.setQuoteAsInactiveUrl,beforeCreateOrder:this.beforeCreateOrder,catchCreateOrder:this.catchError,onError:this.catchError,buttonContainerId:this.buttonContainerId,afterUpdateQuote:this.afterUpdateQuote,shippingAddressRequired:!this.isVirtual,styles:this.styles,afterOnAuthorize:this.afterOnAuthorize,onCancel:this.onCancel,mode:this.googlePayMode,getOrderDetailsUrl:this.getOrderDetailsUrl,threeDSMode:this.threeDSMode,location:this.pageType,});this.googlePayButton.sdkLoaded.then(this.googlePayButton.initGoogleSDK).catch(function(error){console.log('Google Pay SDK not available:',error?.message||error);});},afterUpdateQuote:function(data){window.location=data.redirectUrl;this.googlePayButton.showLoader(false);},onClick:function(){var $form=$(this.productFormSelector);if($form.data('mageValidation')){this.formValid=$form.validation('isValid');}\nif(this.formValid){this.isErrorDisplayed=false;this.googlePayButton.showLoaderAsync(true).then(()=>{return this.googlePayButton.createOrder();}).then(()=>{refreshCustomerData(this.createOrderUrl);}).catch(error=>{this.catchError(error);});}},setQuoteInactive:function(){return $.ajax({type:'POST',url:this.setQuoteAsInactiveUrl});},catchError:function(error){console.log(error);this.googlePayButton.showLoader(false);
2if(error.name!==\"PayPalGooglePayError\"){try{this.setQuoteInactive()}catch(e){console.warn('Failed to set quote inactive:',e);}}\nif(this.isErrorDisplayed){return;}\nif(error.hidden===undefined||!error.hidden){this.addMessage(this.requestProcessingError);}\nthis.isErrorDisplayed=true;},addMessage:function(message,type){type=type||'error';customerData.set('messages',{messages:[{type:type,text:message}],'data_id':Math.floor(Date.now()/ 1000)});},beforeCreateOrder:function(){this.isErrorDisplayed=false;if(this.formInvalid){throw new Error('Form is Invalid');}\nlet xhr=new XMLHttpRequest();xhr.open('POST',this.addToCartUrl,false);xhr.send(new FormData($(this.productFormSelector)[0]));if(xhr.status!==HTTP_STATUS_OK){throw new Error('Request failed');}else{try{let result=JSON.parse(xhr.responseText);if(typeof result.success!=='undefined'){refreshCustomerData(this.addToCartUrl);return result.success;}}catch(parseError){throw new Error('Failed to parse response JSON: '+parseError.message);}}},afterOnAuthorize:function(data){window.location=data.redirectUrl;this.googlePayButton.showLoader(false);},onCancel:function(){this.setQuoteInactive().always(()=>{this.googlePayButton.showLoader(false);});}});});","Magento_PaymentServicesPaypal/js/view/payment/group.min.js":"define(['underscore','uiComponent','Magento_Customer/js/customer-data'],function(_,Component,customerData){'use strict';return Component.extend({defaults:{template:'Magento_PaymentServicesPaypal/payment/group'},getShowExpress:function(){const cart=customerData.get('cart')(),subtotal=parseFloat(cart.subtotalAmount);return subtotal&&this.expressMethodEnabled();},expressMethodEnabled:function(){const methods=['payment_services_paypal_smart_buttons','payment_services_paypal_google_pay','payment_services_paypal_apple_pay'];return methods.some((method)=>{return!!_.get(window.checkoutConfig.payment[method],'express',false);});},sortMethods:function(a,b){return parseInt(a.sort,10)-parseInt(b.sort,10);}});});","Magento_PaymentServicesPaypal/js/view/payment/message-cart.min.js":"define(['Magento_PaymentServicesPaypal/js/view/payment/paypal-abstract','Magento_PaymentServicesPaypal/js/view/payment/message','Magento_Customer/js/customer-data'],function(Component,Message,customerData){'use strict';return Component.extend({defaults:{sdkNamespace:'paypalCart',element:null,message:null},initialize:function(config,element){var cartData=customerData.get('cart');this.element=element;this._super();this.getSdkParams().then(this.initMessage.bind(this)).then(function(){cartData.subscribe(function(updatedCart){this.message.updateAmount(updatedCart.subtotalAmount);},this);}.bind(this)).then(this.render.bind(this));},initMessage:function(){var cartData=customerData.get('cart');this.message=new Message({sdkNamespace:this.sdkNamespace,scriptParams:this.sdkParams,element:this.element,renderContainer:this.renderContainer,styles:this.styles,placement:this.placement,amount:cartData().subtotalAmount});},render:function(){this.message.render();}});});","Magento_PaymentServicesPaypal/js/view/payment/message-product.min.js":"define(['Magento_PaymentServicesPaypal/js/view/payment/paypal-abstract','Magento_PaymentServicesPaypal/js/view/payment/message','Magento_PaymentServicesPaypal/js/view/product/product-data-provider','Magento_PaymentServicesPaypal/js/view/product/grouped-product-data-provider','Magento_PaymentServicesPaypal/js/view/product/bundle-product-data-provider','Magento_PaymentServicesPaypal/js/view/product/gift-card-product-data-provider'],function(Component,Message,ProductDataProvider,GroupedProductDataProvider,BundledProductDataProvider,GiftCardProductDataProvider){'use strict';return Component.extend({defaults:{sdkNamespace:'paypalProduct',element:null,message:null},initialize:function(config,element){var providerOptions={updateAmount:this.updateAmount.bind(this)};this.element=element;this._super();if(GroupedProductDataProvider.prototype.isProductGrouped()){this.provider=new GroupedProductDataProvider(providerOptions);}else if(BundledProductDataProvider.prototype.isBundleProduct()){this.provider=new BundledProductDataProvider(providerOptions);}else if(GiftCardProductDataProvider.prototype.isProductGiftCard()){this.provider=new GiftCardProductDataProvider(providerOptions);}else{this.provider=new ProductDataProvider(providerOptions);}\nthis.getSdkParams().then(this.initMessage.bind(this)).then(this.render.bind(this));},initMessage:function(){this.message=new Message({sdkNamespace:this.sdkNamespace,scriptParam
2s:this.sdkParams,element:this.element,renderContainer:this.renderContainer,styles:this.styles,placement:this.placement,amount:this.provider.getAmount()});},updateAmount:function(){this.message&&this.message.updateAmount(this.provider.getAmount());},render:function(){this.message.render();this.provider.updatePrice();}});});","Magento_PaymentServicesPaypal/js/view/payment/message.min.js":"define(['uiComponent','scriptLoader'],function(Component,loadSdkScript){'use strict';return Component.extend({defaults:{sdkNamespace:'paypal',renderContainer:null,amount:null,message:null},initialize:function(){this._super();this.sdkLoaded=loadSdkScript(this.scriptParams,this.sdkNamespace);return this;},updateAmount:function(amount){this.amount=amount;if(this.message){this.message.dataset.ppAmount=this.amount;}},render:function(){return this.sdkLoaded.then(function(){const styles=this.getStyles();if(!styles){return;}\nthis.message=document.createElement('div');this.message.dataset.ppMessage=true;this.message.dataset.ppStyleLayout=styles.layout||'';this.message.dataset.ppStyleLogoPosition=styles.logo?.position||'';this.message.dataset.ppStyleLogoType=styles.logo?.type||'';this.message.dataset.ppStyleTextAlign=styles.text?.align||'';this.message.dataset.ppStyleTextColor=styles.text?.color||'';this.message.dataset.ppStyleTextSize=styles.text?.size||'';this.message.dataset.ppAmount=this.amount;this.message.dataset.ppPlacement=this.placement;const container=document.querySelector(this.renderContainer);if(container){container.append(this.message);}}.bind(this)).catch(function(exception){console.log('Error: Failed to load PayPal SDK script!');console.log(exception.message);});},getStyles:function(){if(!this.styles){return{};}\nlet parsedStyles=JSON.parse(this.styles),placement=this.placement==='payment'?'checkout':this.placement,styles=parsedStyles[placement];if(!styles){return false;}\nreturn styles;}});});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer.min.js":"define(['uiComponent','Magento_Checkout/js/model/payment/renderer-list','Magento_PaymentServicesPaypal/js/helpers/is-fastlane-available'],function(Component,rendererList,isFastlaneAvailable){'use strict';const cardField=isFastlaneAvailable()?{type:'payment_services_paypal_fastlane',component:'Magento_PaymentServicesPaypal/js/view/payment/method-renderer/fastlane'}:{type:'payment_services_paypal_hosted_fields',component:'Magento_PaymentServicesPaypal/js/view/payment/method-renderer/hosted-fields'};rendererList.push({type:'payment_services_paypal_smart_buttons',component:'Magento_PaymentServicesPaypal/js/view/payment/method-renderer/smart-buttons'},{type:'payment_services_paypal_apple_pay',component:'Magento_PaymentServicesPaypal/js/view/payment/method-renderer/apple-pay'},{type:'payment_services_paypal_google_pay',component:'Magento_PaymentServicesPaypal/js/view/payment/method-renderer/google-pay'},{type:'payment_services_paypal_apm',component:'Magento_PaymentServicesPaypal/js/view/payment/method-renderer/apm'},cardField);return Component.extend({});});","Magento_PaymentServicesPaypal/js/view/payment/paypal-abstract.min.js":"define(['uiComponent','Magento_PaymentServicesPaypal/js/view/payment/actions/get-sdk-params'],function(Component,getSdkParams){'use strict';return Component.extend({defaults:{sdkParamsKey:'paypal',sdkParams:[],cacheTtl:30000},getSdkParams:function(){return getSdkParams(this.cacheTtl).then(function(sdkParams){this.sdkParams=sdkParams[this.sdkParamsKey];}.bind(this));}});});","Magento_PaymentServicesPaypal/js/view/payment/smart-buttons-cart.min.js":"define(['underscore','jquery','mageUtils','scriptLoader','Magento_PaymentServicesPaypal/js/helpers/remove-paypal-url-token','Magento_PaymentServicesPaypal/js/view/payment/methods/smart-buttons','mage/translate','Magento_Customer/js/customer-data','Magento_PaymentServicesPaypal/js/view/errors/response-error'],function(_,$,utils,loadSdkScript,removePayPalUrlToken,Component,$t,customerData,ResponseError){'use strict';return Component.extend({defaults:{sdkNamespace:'paypalCart',buttonsContainerId:'smart-buttons-${ $.uid }',element:null,paymentActionError:$t('Something went wrong with your request. Please try again later.'),isErrorDisplayed:false},initialize:function(config,element){_.bindAll(this,'renderButtons','onError','beforeCreateOrder','afterCreateOrder','beforeOnAuthorize','onCancel');config.uid=utils.uniqueid();this._super();this.element=element;
2if(this.element){this.element.id=this.buttonsContainerId;this.sdkLoaded=this.getSdkParams().then(()=>{return loadSdkScript(this.sdkParams,this.sdkNamespace).then((sdkScript)=>{this.paypal=sdkScript;});});this.renderButtons();}\nreturn this;},renderButtons:function(){if(!this.sdkLoaded){return;}\nthis.sdkLoaded.then(function(){let containerSelector='#'+this.buttonsContainerId;if($(containerSelector).length>0){this.setup(containerSelector);this.render();}else{console.warn('PayPal button container not found:',containerSelector);}}.bind(this)).catch(function(){console.log('Error: Failed to load PayPal SDK script!');});},showLoader:function(show){let event=show?'processStart':'processStop';$('body').trigger(event);},catchOnAuthorize:function(error){this.onError(error);},catchCreateOrder:function(error){this.onError(error);},onError:function(error){let message=error instanceof ResponseError?error.message:this.paymentActionError;this.showLoader(false);if(this.isErrorDisplayed){return;}\nthis.addMessage(message);this.isErrorDisplayed=true;},addMessage:function(message,type){type=type||'error';customerData.set('messages',{messages:[{type:type,text:message}],'data_id':Math.floor(Date.now()/ 1000)});},beforeCreateOrder:function(){this.isErrorDisplayed=false;this.showLoader(true);return Promise.resolve();},afterCreateOrder:function(res){if(res.response['is_successful']){this.refreshCustomerData(this.createOrderUrl);return res.response['paypal-order'].id;}\nthrow new ResponseError(res.response.error);},beforeOnAuthorize:function(data){return Promise.resolve(data);},onCancel:function(){removePayPalUrlToken();customerData.invalidate(['cart']);window.location.replace(this.cancelUrl);},refreshCustomerData:function(url){customerData.onAjaxComplete({},{type:'POST',url:url});}});});","Magento_PaymentServicesPaypal/js/view/payment/smart-buttons-express-checkout.min.js":"define(['underscore','jquery','scriptLoader','Magento_PaymentServicesPaypal/js/helpers/remove-paypal-url-token','Magento_PaymentServicesPaypal/js/view/payment/smart-buttons-cart','Magento_PaymentServicesPaypal/js/view/payment/message','mage/translate','Magento_Customer/js/customer-data','Magento_Ui/js/model/messageList'],function(_,$,loadSdkScript,removePayPalUrlToken,Component,Message,$t,customerData,globalMessageList){'use strict';const config=_.get(window.checkoutConfig.payment.payment_services_paypal_smart_buttons,'express',{});return Component.extend({defaults:{sdkNamespace:'paypalCart',buttonsContainerId:'paypal-express-container-paypal',element:null,paymentActionError:$t('Something went wrong with your request. Please try again later.'),isErrorDisplayed:false,template:'Magento_PaymentServicesPaypal/payment/smart-buttons-express-checkout',createOrderUrl:config.createOrderUrl,authorizeOrderUrl:config.authorizeOrderUrl,getOrderDetailsUrl:config.getOrderDetailsUrl,completeOrderUrl:config.completeOrderUrl,isVirtual:!!window.checkoutConfig.quoteData.is_virtual,sort:config.sort,styles:window.checkoutConfig.payment.payment_services_paypal_smart_buttons.buttonStyles||{},appSwitchWhenAvailable:window.checkoutConfig.payment.payment_services_paypal_smart_buttons.appSwitchWhenAvailable,pageType:config.location,sdkParams:config.sdkParams||{}},initialize:function(){_.bindAll(this,'renderButtons','onError','beforeCreateOrder','afterCreateOrder','beforeOnAuthorize','onCancel');this._super();return this;},isMethodActive:function(){return config.isVisible;},renderAfter:function(){this.sdkLoaded=loadSdkScript(this.sdkParams,this.sdkNamespace).then((sdkScript)=>{this.paypal=sdkScript;this.renderButtons();this.initMessage();});},initMessage:function(){if(!this.sdkLoaded){return;}\nthis.sdkLoaded.then(function(){var cartData=customerData.get('cart');this.message=new Message({scriptParams:this.sdkParams,element:this.element,renderContainer:'#paypal-express-paypal-message',styles:window.checkoutConfig.payment.payment_services_paypal_smart_buttons.messageStyles,placement:'payment',amount:cartData().subtotalAmount});this.message.render();cartData.subscribe(function(updatedCart){this.message.updateAmount(updatedCart.subtotalAmount);},this);}.bind(this)).catch(function(){console.log('Error: Failed to load PayPal SDK script!');});},catchOnAuthorize:function(error){this.onError(error);},addMessage:function(message,type){type=type||'error';const messageFunction=type==='error'?'addErrorMessage':'addSuccessMessage';globalMessageList[messageFunction]({message});},onCancel:function(){removePayPalUrlToken();this.showLoader(false);}});});","Magento_PaymentServicesPaypal/js/view/payment/smart-buttons-product.min.js":"define(['underscore','jquery','mageUtils','scriptLoader','Magento_PaymentServicesPaypal/js/view/payment/methods/smart-buttons','mage/translate','Magento_Customer/js/customer-data','Magento_PaymentServicesPaypal/js/helpers/remove-paypal-url-token','Magento_PaymentServicesPaypal/js/model/app-switch-data','Magento_PaymentServicesPaypal/js/view/errors/response-error','jquery/jquery-storageapi'],function(_,$,utils,loadSdkScript,Component,$t,customerData,removePayPalUrlToken,appSwitchDataModel,ResponseError){'use strict';var refreshCustomerData=function(url){customerData.onAjaxComplete({},{type:'POST',url:url});};return Component.extend({defaults:{sdkNamespace:'paypalProduct',buttonsContainerId:'smart-buttons-${ $.uid }',element:null,productFormSelector:'#product_addtocart_form',formInvalid:false,paymentActionError:$t('Something went wrong with your request. Please try again later.'),addToCartUrl:null,isErrorDisplayed:false},initialize:function(config,element){_.bindAll(this,'renderButtons','onClick','onError','beforeCreateOrder','afterCreateOrder','beforeOnAuthorize','onCancel');config.uid=utils.uniqueid();this._super();this.element=element;
2this.element.id=this.buttonsContainerId;this.sdkLoaded=this.getSdkParams().then(()=>{return loadSdkScript(this.sdkParams,this.sdkNamespace).then((sdkScript)=>{this.paypal=sdkScript;});});this.renderButtons();return this;},renderButtons:function(){if(!this.sdkLoaded){return;}\nthis.sdkLoaded.then(function(){let containerSelector='#'+this.buttonsContainerId;if($(containerSelector).length>0){this.setup(containerSelector);this.render();}else{console.warn('PayPal button container not found:',containerSelector);}}.bind(this)).catch(function(){console.log('Error: Failed to load PayPal SDK script!');});},showLoader:function(show){let event=show?'processStart':'processStop';$('body').trigger(event);},catchOnAuthorize:function(error){this.onError(error);},catchCreateOrder:function(error){this.onError(error);},onError:function(error){removePayPalUrlToken();this.render(this.element);let message=error instanceof ResponseError?error.message:this.paymentActionError;this.showLoader(false);if(this.isErrorDisplayed){return;}\nthis.addMessage(message);this.isErrorDisplayed=true;},addMessage:function(message,type){type=type||'error';customerData.set('messages',{messages:[{type:type,text:message}],'data_id':Math.floor(Date.now()/ 1000)});},onClick:function(data,actions){let productForm=$(this.productFormSelector);if(productForm.data('mageValidation')){this.formInvalid=!productForm.validation('isValid');}\nif(this.formInvalid){return actions.reject();}\nappSwitchDataModel.setData('pageType',this.pageType);return actions.resolve();},setQuoteInactive:function(){return $.ajax({type:'POST',url:this.setQuoteAsInactiveUrl});},beforeCreateOrder:function(){this.isErrorDisplayed=false;this.showLoader(true);return new Promise(function(resolve,reject){if(this.formInvalid){return reject();}\nfetch(this.addToCartUrl,{method:'POST',headers:{},body:new FormData($(this.productFormSelector)[0]),credentials:'same-origin'}).then(function(response){return response.json();}).then(function(data){if(typeof data.success!=='undefined'){refreshCustomerData(this.addToCartUrl);return resolve();}\nreturn reject(new ResponseError(data.error));}.bind(this)).catch(function(){return reject();});}.bind(this));},afterCreateOrder:function(res){if(res.response['is_successful']){refreshCustomerData(this.createOrderUrl);return res.response['paypal-order'].id;}\nthrow new ResponseError(res.response.error);},beforeOnAuthorize:function(data){return Promise.resolve(data);},onCancel:function(){removePayPalUrlToken();this.render(this.element);this.setQuoteInactive().always(()=>{this.showLoader(false);});}});});","Magento_PaymentServicesPaypal/js/view/payment/vault.min.js":"define(['underscore','uiComponent','mage/translate','Magento_Checkout/js/model/payment/renderer-list','uiLayout','uiRegistry'],function(_,Component,$t,rendererList,layout,registry){'use strict';var vaultGroupName='vaultGroup';layout([{name:vaultGroupName,component:'Magento_Checkout/js/model/payment/method-group',alias:'vault',sortOrder:10,title:$t('Stored Cards')}]);registry.get(vaultGroupName,function(vaultGroup){_.each(window.checkoutConfig.payment.vault,function(config,index){rendererList.push({type:index,config:config.config,component:config.component,group:vaultGroup,typeComparatorCallback:function(typeA,typeB){return typeA.substring(0,typeA.lastIndexOf('_'))===typeB;}});});});return Component.extend({});});","Magento_PaymentServicesPaypal/js/view/payment/actions/get-sdk-params.min.js":"define(['jquery','underscore','Magento_Customer/js/customer-data','jquery/jquery-storageapi'],function($,_,customerData){'use strict';var promise=null,timeoutKey='payments-sdk-params-timeout',paymentsKey='payments',sdkParamsKey='sdkParams';return function(cacheTtl){if(!promise){promise=new Promise(function(resolve,reject){var dateNow=Date.now(),dateTo=dateNow+cacheTtl,timeout=$.localStorage.get(timeoutKey);if(timeout<dateNow||!timeout){return customerData.reload([paymentsKey]).done(function(){$.localStorage.set(timeoutKey,dateTo);resolve(customerData.get(paymentsKey)()[sdkParamsKey]);}).fail(reject.bind(this,[]));}\nif(!_.isEmpty(customerData.get(paymentsKey)())){return resolve(customerData.get(paymentsKey)()[sdkParamsKey]);}\ncustomerData.get(paymentsKey).subscribe(function(payments){resolve(payments[sdkParamsKey]);});});}\nreturn promise;};});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer/apm-method.min.js":"define(['jquery','knockout','matchMedia','uiLayout','uiRegistry','mage/translate','Magento_Checkout/js/view/payment/default','Magento_Checkout/js/action/select-payment-method','Magento_Checkout/js/action/set-billing-address','Magento_Checkout/js/checkout-data','Magento_Checkout/js/model/full-screen-loader','Magento_Checkout/js/model/payment/additional-validators','Magento_Checkout/js/model/quote','Magento_Ui/js/model/messageList'],function($,ko,mediaCheck,layout,registry,$t,Component,selectPaymentMethodAction,setBillingAddressAction,checkoutData,loader,additionalValidators,quote,globalMessageList){'use strict';const HTTP_STATUS_CREATED=201;var performCreateOrder=function(url,payPalOrderData,orderData){orderData=orderData||new FormData();orderData.append('form_key',$.mage.cookies.get('form_key'));orderData.append('payment_source',payPalOrderData['paymentSource']);let xhr=new XMLHttpRequest();xhr.open('POST',url,false);xhr.send(orderData);if(xhr.status!==HTTP_STATUS_CREATED){throw new Error('Request failed');}else{return JSON.parse(xhr.responseText);}};return Component.extend({defaults:{active:ko.observable(false),code:'payment_services_paypal_apm',method:null,orderId:null,paymentsSdk:null,paymentSource:'apm',requestProcessingError:$t('Error happened when processing the request. Please try again later.'),template:'Magento_PaymentServicesPaypal/payment/apm-method',createOrderUrl:window.checkoutConfig.payment.payment_services_paypal_apm.createOrderUrl,location:window.checkoutConfig.payment.payment_services_paypal_apm.location},initialize:function(config){this._super(config);const parentApm=registry.get(config.parentName),parentBilling=registry.get(parentApm.parentName);this.parentApm=parentApm;this.parentBilling=parentBilling;this.isEligible=ko.observable(false);this.selectedApmCode=ko.computed(function(){return quote.paymentMethod()?`${quote.paymentMethod().method}_${parentApm?.selectedApm()}`:null;});additionalValidators.registerValidator({validate:()=>{return true;}}
2);this.renderApm();},getCode:function(){return this.code;},renderApm:function(){this.createElements();this.checkEligibility();},createElements:function(){this.mark=window[this.parentApm.sdkNamespace].Marks({fundingSource:window[this.parentApm.sdkNamespace].FUNDING[this.method.toUpperCase()]});this.paymentFields=window[this.parentApm.sdkNamespace].PaymentFields({fundingSource:window[this.parentApm.sdkNamespace].FUNDING[this.method.toUpperCase()]});this.paymentButtons=window[this.parentApm.sdkNamespace].Buttons({fundingSource:window[this.parentApm.sdkNamespace].FUNDING[this.method.toUpperCase()],createOrder:this.createOrder.bind(this),onApprove:()=>{this.placeOrder();},onClick:this.onClick.bind(this),onError:this.catchError.bind(this),onCancel:this.onCancel.bind(this)});},renderPaymentMark:function(element){if(this.mark){const id=`paypal_${this.method}_mark`;$(element).attr('id',id);this.mark.render(`#${id}`);}},checkEligibility:function(){if(!this.paymentButtons||!this.paymentButtons.isEligible()){return;}\nconst grandTotal=quote.totals()['base_grand_total'];quote.totals.subscribe((totalsUpdate)=>{this.isEligible(this.isGrandTotalWithinThreshold(totalsUpdate.base_grand_total));});this.isEligible(this.isGrandTotalWithinThreshold(grandTotal));},isGrandTotalWithinThreshold:function(grandTotal){const thresholds=window.checkoutConfig.payment.payment_services_paypal_apm.thresholds[this.method];if(Object.hasOwn(thresholds,'min')&&grandTotal<thresholds.min){return false;}\nif(Object.hasOwn(thresholds,'max')&&grandTotal>thresholds.max){return false;}\nreturn true;},onClick:function(){return additionalValidators.validate();},createOrder:async function(){let data={'paymentSource':this.method};try{let formData=new FormData();formData.append('location',this.location);await this.beforeCreateOrder();let orderData=performCreateOrder(this.createOrderUrl,data,formData);this.paypalOrderId=this.afterCreateOrder(orderData);return this.paypalOrderId;}catch(error){return this.catchCreateOrder(error);}},beforeCreateOrder:function(){return setBillingAddressAction(globalMessageList).fail(function(){throw{message:$t('Failed to set billing address')};});},afterCreateOrder:function(data){if(data.response['paypal-order']&&data.response['paypal-order']['mp_order_id']){this.paymentsOrderId=data.response['paypal-order']['mp_order_id'];this.paypalOrderId=data.response['paypal-order'].id;return this.paypalOrderId;}\nthrow new Error();},catchCreateOrder:function(error){this.catchError(error);},getTitle:function(){if(window.checkoutConfig?.payment?.[this.getCode()]?.titles?.[this.method]){return window.checkoutConfig?.payment?.[this.getCode()]?.titles?.[this.method];}\nreturn this.method;},getApmCode:function(){return`${this.item.method}_${this.method}`;},isActive:function(){let active=this.getApmCode()===this.selectedApmCode();this.active(active);return active;},selectPaymentMethod:function(){selectPaymentMethodAction(this.getData());checkoutData.setSelectedPaymentMethod(this.item.method);this.parentApm.selectedApm(this.method);this.renderPaymentFields();this.renderPaymentButton();if(quote.isVirtual()&"e.billingAddress()){setBillingAddressAction(globalMessageList);}\nreturn true;},renderPaymentFields:function(){if(this.paymentFields&&$(`#paypal_${this.method}_fields`).is(':empty')){this.paymentFields.render(`#paypal_${this.method}_fields`);}},renderPaymentButton:function(){if(this.paymentButtons&&$(`#paypal_${this.method}_button`).is(':empty')){this.paymentButtons.render(`#paypal_${this.method}_button`);}},getData:function(){return{'method':this.getCode(),'additional_data':{'payments_order_id':this.paymentsOrderId,'paypal_order_id':this.paypalOrderId,'payment_source':this.method}};},hideIdeal:function(){if(this.method==='ideal'){mediaCheck({media:'(min-width: 768px)',entry:function(){$('.payment-method-payment_services_paypal_apm_ideal').show();},exit:function(){$('.payment-method-payment_services_paypal_apm_ideal').hide();}});}},showLoader:function(show){var event=show?'processStart':'processStop';$('body').trigger(event);},onCancel:function(error){this.catchError(error);},catchError:function(error){if(error.hidden===undefined||!error.hidden){this.messageContainer.addErrorMessage({message:this.requestProcessingError});}\nthis.showLoader(false);console.log('Error: ',error);},createMessagesComponent:function(){return this._super();},getPlaceOrderDeferredObject:function(){return this._super().always(()=>this.showLoader(false));}});});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer/apm.min.js":"define(['knockout','mageUtils','uiLayout','Magento_Checkout/js/view/payment/default','Magento_Checkout/js/model/quote','scriptLoader'],function(ko,utils,layout,Component,quote,loadSdkScript){'use strict';return Component.extend({defaults:{template:'Magento_PaymentServicesPaypal/payment/apm',code:'payment_services_paypal_apm',orderId:null,isEligible:ko.observable(false),allowedMethods:ko.observableArray([]),paymentsSdkInitPromise:null,selectedApm:ko.observable(null),sdkNamespace:'paypalApm'},initialize:function(){this._super();const allowedMethods=this.getAllowedMethods();this.allowedMethods(allowedMethods);if(allowedMethods.length){this.loadPayPalSDK().then(()=>
2{this.allowedMethods().forEach((method)=>{layout([this.createComponent(method)]);});});}},loadPayPalSDK:function(){return loadSdkScript(window.checkoutConfig.payment[this.getCode()].sdkParams,this.sdkNamespace).catch(function(e){this.onError(e);});},getAllowedMethods:function(){return window.checkoutConfig?.payment?.[this.code]?.allowedMethods?.split(',')||[];},createComponent:function(method){const templateData={parentName:this.name,name:method},rendererTemplate={parent:'${ $.$data.parentName }',name:'${ $.$data.name }',displayArea:'payment_services_paypal_apm_methods',component:'Magento_PaymentServicesPaypal/js/view/payment/method-renderer/apm-method'},rendererComponent=utils.template(rendererTemplate,templateData);utils.extend(rendererComponent,{config:{item:this.item,method}});return rendererComponent;}});});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer/apple-pay.min.js":"define(['Magento_Checkout/js/view/payment/default','jquery','underscore','mageUtils','Magento_Checkout/js/model/quote','Magento_Checkout/js/model/full-screen-loader','mage/translate','Magento_PaymentServicesPaypal/js/view/payment/methods/apple-pay','Magento_Checkout/js/model/payment/additional-validators','Magento_Checkout/js/action/set-billing-address','Magento_Ui/js/model/messageList','Magento_Customer/js/customer-data'],function(Component,$,_,utils,quote,fullScreenLoader,$t,ApplePayButton,additionalValidators,setBillingAddressAction,globalMessageList,customerData){'use strict';var refreshCustomerData=function(url){customerData.onAjaxComplete({},{type:'POST',url:url,});}\nreturn Component.extend({defaults:{sdkNamespace:'paypalApplePay',fundingSource:'applepay',buttonContainerId:'apple-pay-${ $.uid }',template:'Magento_PaymentServicesPaypal/payment/apple-pay',isAvailable:false,isButtonRendered:false,grandTotalAmount:null,paymentsOrderId:null,paypalOrderId:null,paymentTypeIconTitle:$t('Pay with Apple Pay'),requestProcessingError:$t('Error happened when processing the request. Please try again later.'),notEligibleErrorMessage:$t('This payment option is currently unavailable.'),paymentTypeIconUrl:window.checkoutConfig.payment['payment_services_paypal_apple_pay'].paymentTypeIconUrl},initialize:function(config){_.bindAll(this,'catchError','beforeCreateOrder','afterCreateOrder','placeOrder','onClick');config.uid=utils.uniqueid();this._super();this.initApplePayButton();return this;},initObservable:function(){this._super().observe('grandTotalAmount isAvailable isButtonRendered');this.grandTotalAmount(quote.totals()['base_grand_total']);return this;},initApplePayButton:function(){this.applePayButton=new ApplePayButton({scriptParams:window.checkoutConfig.payment[this.getCode()].sdkParams,createOrderUrl:window.checkoutConfig.payment[this.getCode()].createOrderUrl,estimateShippingMethodsWhenLoggedInUrl:window.checkoutConfig.payment[this.getCode()].estimateShippingMethodsWhenLoggedInUrl,estimateShippingMethodsWhenGuestUrl:window.checkoutConfig.payment[this.getCode()].estimateShippingMethodsWhenGuestUrl,shippingInformationWhenLoggedInUrl:window.checkoutConfig.payment[this.getCode()].shippingInformationWhenLoggedInUrl,shippingInformationWhenGuestUrl:window.checkoutConfig.payment[this.getCode()].shippingInformationWhenGuestUrl,updatePayPalOrderUrl:window.checkoutConfig.payment[this.getCode()].updatePayPalOrderUrl,countriesUrl:window.checkoutConfig.payment[this.getCode()].countriesUrl,onClick:this.onClick,beforeCreateOrder:this.beforeCreateOrder,afterCreateOrder:this.afterCreateOrder,catchCreateOrder:this.catchError,onError:this.catchError,buttonContainerId:this.buttonContainerId,onApprove:this.placeOrder,styles:window.checkoutConfig.payment[this.getCode()].buttonStyles,location:window.checkoutConfig.payment[this.getCode()].location,});},getCode:function(){return'payment_services_paypal_apple_pay';},getData:function(){return{'method':this.item.method,'additional_data':{'payments_order_id':this.paymentsOrderId,'paypal_order_id':this.paypalOrderId,'payment_source':this.fundingSource}};},afterRender:function(){this.applePayButton.sdkLoaded.then(this.applePayButton.initAppleSDK).then(function(){this.isAvailable(true);this.isButtonRendered(true);}.bind(this)).catch(function(){this.isAvailable(false);}.bind(this)).finally(function(){this.isButtonRendered(true);}.bind(this));},onInit:function(data,actions){if(!this.isPlaceOrderActionAllowed()){actions.disable();}
2\nthis.isPlaceOrderActionAllowed.subscribe(function(isAllowed){if(isAllowed){actions.enable();}else{actions.disable();}});},onClick:function(data,actions){this.applePayButton.showLoaderAsync(true).then(()=>{this.applePayButton.createOrder();}).then(()=>{refreshCustomerData(window.checkoutConfig.payment[this.getCode()].createOrderUrl);}).catch(error=>{this.catchError(error);});},beforeCreateOrder:function(){if(this.validate()&&this.isPlaceOrderActionAllowed()&&additionalValidators.validate()){return new Promise(function(resolve,reject){setBillingAddressAction(globalMessageList).done(resolve.bind(null,null)).fail(reject);});}else{throw{message:'before create order validation failed',hidden:true};}},afterCreateOrder:function(data){if(data.response['paypal-order']&&data.response['paypal-order']['mp_order_id']){this.paymentsOrderId=data.response['paypal-order']['mp_order_id'];this.paypalOrderId=data.response['paypal-order'].id;this.applePayButton.showPopup(data,quote);return this.paypalOrderId;}\nthrow new Error();},catchError:function(error){this.messageContainer.addErrorMessage({message:this.requestProcessingError});console.log('Error: ',error.message);}});});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer/fastlane.min.js":"define(['jquery','mage/translate','uiRegistry','Magento_Checkout/js/action/set-billing-address','Magento_Checkout/js/model/full-screen-loader','Magento_Checkout/js/model/payment/additional-validators','Magento_Checkout/js/model/quote','Magento_Checkout/js/view/payment/default','Magento_PaymentServicesPaypal/js/helpers/map-address-to-magento','Magento_PaymentServicesPaypal/js/view/payment/fastlane','Magento_Ui/js/model/messageList',],function($,$t,uiRegistry,setBillingAddressAction,loader,additionalValidators,quote,Component,mapAddressToMagento,fastlaneModel,messageList){'use strict';return Component.extend({defaults:{code:'payment_services_paypal_fastlane',template:'Magento_PaymentServicesPaypal/payment/fastlane',createOrderUrl:window.checkoutConfig.payment['payment_services_paypal_fastlane'].createOrderUrl,paymentTypeIconUrl:window.checkoutConfig.payment['payment_services_paypal_fastlane'].paymentTypeIconUrl,paymentTypeIconTitle:$t('Pay with credit card'),location:window.checkoutConfig.payment['payment_services_paypal_fastlane'].location,paymentSource:window.checkoutConfig.payment['payment_services_paypal_fastlane'].paymentSource,requiresCardDetails:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].requiresCardDetails,threeDSMode:window.checkoutConfig.payment['payment_services_paypal_fastlane'].threeDS,getOrderDetailsUrl:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].getOrderDetailsUrl,paymentsOrderId:null,paypalOrderId:null,fastlaneToken:null,},initialize:async function(config){this._super(config);return this;},afterRender:async function(){await fastlaneModel.setup();fastlaneModel.renderFastlanePaymentComponent('#payment-services-paypal-fastlane');},onClick:async function(){if(!additionalValidators.validate()){return;}\ntry{loader.startLoader();let{id,paymentSource:{card:{billingAddress,name}}}=await fastlaneModel.getPaymentToken(),[firstname,...lastname]=name.split(' '),mappedAddress=mapAddressToMagento({address:billingAddress}),shippingAddress=quote.shippingAddress();
2if(shippingAddress.telephone){mappedAddress.telephone=shippingAddress.telephone;}\nmappedAddress.firstname=firstname;mappedAddress.lastname=lastname.join(' ');quote.billingAddress({...mappedAddress,street:Object.values(mappedAddress.street)});if(this.isBillingAddressValid()){if(this.threeDSMode){id=await fastlaneModel.validate3DS(id);}\nthis.fastlaneToken=id;this.placeOrder();}else{this.isProcessing=false;messageList.addErrorMessage({message:$t('Your billing address is not valid.')});}}catch(error){loader.stopLoader();messageList.addErrorMessage({message:$t('Cannot validate payment.')});}finally{loader.stopLoader();}},isBillingAddressValid(){const billingAddress=uiRegistry.get('checkoutProvider');billingAddress.set('params.invalid',false);billingAddress.trigger(billingAddress.dataScopePrefix+'.data.validate');if(billingAddress.get(billingAddress.dataScopePrefix+'.custom_attributes')){billingAddress.trigger(billingAddress.dataScopePrefix+'.custom_attributes.data.validate');}\nreturn!billingAddress.get('params.invalid');},getOrderPaymentDetails:function(data){if(!this.requiresCardDetails){return Promise.resolve(data);}\nreturn fetch(`${this.getOrderDetailsUrl}`,{method:'GET'}).then((res)=>{return res.json();}).catch(function(err){console.log('Could not get order details. Proceeding with order placement without card details.',err);return data;});},getData:function(){var data=this._super();data['additional_data']={paypal_fastlane_profile:fastlaneModel.profileData()?'Yes':'No',payment_source:this.paymentSource,paypal_fastlane_token:this.fastlaneToken,liability_shift:fastlaneModel.liabilityShift()??'false',authentication_state:fastlaneModel.authenticationState()??'Cancelled',};return data;}});});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer/google-pay.min.js":"define(['Magento_Checkout/js/view/payment/default','jquery','underscore','mageUtils','Magento_Checkout/js/model/quote','mage/translate','Magento_PaymentServicesPaypal/js/view/payment/methods/google-pay','Magento_Checkout/js/model/payment/additional-validators','Magento_Checkout/js/action/set-billing-address','Magento_Ui/js/model/messageList','uiRegistry','Magento_Customer/js/customer-data'],function(Component,$,_,utils,quote,$t,GooglePayButton,additionalValidators,setBillingAddressAction,globalMessageList,registry,customerData){'use strict';var refreshCustomerData=function(url){customerData.onAjaxComplete({},{type:'POST',url:url,});}\nreturn Component.extend({defaults:{buttonContainerId:'google-pay-${ $.uid }',template:'Magento_PaymentServicesPaypal/payment/google-pay',isAvailable:false,isButtonRendered:false,paymentsOrderId:null,paypalOrderId:null,paymentTypeIconTitle:$t('Pay with Google Pay'),requestProcessingError:$t('Error happened when processing the request. Please try again later.'),notEligibleErrorMessage:$t('This payment option is currently unavailable.'),paymentTypeIconUrl:window.checkoutConfig.payment['payment_services_paypal_google_pay'].paymentTypeIconUrl,fundingSource:window.checkoutConfig.payment['payment_services_paypal_google_pay'].paymentSource},initialize:function(config){_.bindAll(this,'catchError','beforeCreateOrder','afterCreateOrder','placeOrder','onClick');config.uid=utils.uniqueid();this._super();this.initGooglePayButton();return this;},initObservable:function(){this._super().observe('isAvailable isButtonRendered');return this;},initGooglePayButton:function(){this.googlePayButton=new GooglePayButton({scriptParams:window.checkoutConfig.payment[this.getCode()].sdkParams,createOrderUrl:window.checkoutConfig.payment[this.getCode()].createOrderUrl,onClick:this.onClick,beforeCreateOrder:this.beforeCreateOrder,afterCreateOrder:this.afterCreateOrder,catchCreateOrder:this.catchError,onError:this.catchError,buttonContainerId:this.buttonContainerId,onApprove:this.placeOrder,styles:window.checkoutConfig.payment[this.getCode()].styles,mode:window.checkoutConfig.payment[this.getCode()].mode,shippingAddressRequired:false,getOrderDetailsUrl:window.checkoutConfig.payment[this.getCode()].getOrderDetailsUrl,threeDSMode:window.checkoutConfig.payment[this.getCode()].threeDSMode,location:window.checkoutConfig.payment[this.getCode()].location,});if(!this.isPlaceOrderActionAllowed()){this.googlePayButton.disableButton();}
2\nthis.isPlaceOrderActionAllowed.subscribe(function(isAllowed){if(isAllowed){this.googlePayButton.enableButton();}else{this.googlePayButton.disableButton();}}.bind(this));},getCode:function(){return'payment_services_paypal_google_pay';},getData:function(){return{'method':this.item.method,'additional_data':{'payments_order_id':this.paymentsOrderId,'paypal_order_id':this.paypalOrderId,'payment_source':this.fundingSource}};},onClick:function(){this.googlePayButton.showLoaderAsync(true).then(()=>{return this.googlePayButton.createOrder();}).then(()=>{refreshCustomerData(window.checkoutConfig.payment[this.getCode()].createOrderUrl);}).catch(error=>{this.catchError(error);});},afterRender:function(){this.googlePayButton.sdkLoaded.then(function(){this.googlePayButton.initGoogleSDK().then(function(){this.isAvailable(this.googlePayButton.isEligible());}.bind(this)).catch(function(){this.isAvailable(false);}.bind(this)).finally(function(){this.isButtonRendered(true);}.bind(this));}.bind(this)).catch(function(){this.isAvailable(false);this.isButtonRendered(true);}.bind(this));},beforeCreateOrder:function(){if(this.validate()&&this.isPlaceOrderActionAllowed()&&additionalValidators.validate()){setBillingAddressAction(globalMessageList).fail(function(){throw{message:'Failed to set billing address'};});}else{throw{message:'before create order validation failed',hidden:true};}},validate:function(){var isShippingValid=true,source,shippingAddress;if(!this._super()){return false;}\nsource=registry.get('checkoutProvider');shippingAddress=registry.get('index = shippingAddress');if(source&&shippingAddress){source.set('params.invalid',false);if(quote.billingAddress()===null){this.triggerBillingValidation(source);}\nif(!quote.isVirtual()&&!quote.shippingMethod()['method_code']==='pickup'){isShippingValid=shippingAddress.validateShippingInformation();}\nreturn isShippingValid&&!source.get('params.invalid');}\nreturn true;},triggerBillingValidation:function(source){var dataScope=`billingAddress${ window.checkoutConfig.displayBillingOnPaymentMethod ?\n this.getCode() : 'shared'}`;source.trigger(`${ dataScope }.data.validate`);if(source.get(`${dataScope}.custom_attributes`)){source.trigger(`${dataScope}.custom_attributes.data.validate`);}},afterCreateOrder:function(data){if(data.response['paypal-order']&&data.response['paypal-order']['mp_order_id']){this.paymentsOrderId=data.response['paypal-order']['mp_order_id'];this.paypalOrderId=data.response['paypal-order'].id;let displayItems=[],subTotal=this.getTotalsSegment('subtotal'),shippingTotal=this.getTotalsSegment('shipping'),taxTotal=this.getTotalsSegment('tax'),discountTotal=this.getTotalsSegment('discount');if(subTotal!=null){displayItems.push({label:$t('Subtotal'),type:'SUBTOTAL',price:subTotal.value.toString()});}\nif(taxTotal!=null){displayItems.push({label:$t('Tax'),type:'TAX',price:taxTotal.value.toString()});}\nif(shippingTotal!=null){displayItems.push({label:$t('Shipping'),type:'LINE_ITEM',price:shippingTotal.value.toString()});}\nif(discountTotal!=null){displayItems.push({label:$t('Discount'),type:'LINE_ITEM',price:discountTotal.value.toString()});}\nthis.googlePayButton.showPopup({displayItems:displayItems,currencyCode:quote.totals()['base_currency_code'].toString(),totalPriceStatus:'FINAL',totalPrice:quote.totals()['base_grand_total'].toString(),totalPriceLabel:$t('Total')});return this.paypalOrderId;}\nthrow new Error();},catchError:function(error){if(!error||error.hidden===undefined||!error.hidden){const errorMessage=error?.message||this.requestProcessingError;this.messageContainer.addErrorMessage({message:errorMessage});}\nif(this.googlePayButton){this.googlePayButton.showLoader(false);}\nconsole.log('Error: ',error);},getTotalsSegment:function(code){var segment=null;if(!('total_segments'in quote.totals())){return null;}\nquote.totals()['total_segments'].forEach(function(s){if(s.code===code){segment=s;}});return segment;}});});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer/hosted-fields.min.js":"define(['jquery','underscore','mage/translate','Magento_Checkout/js/view/payment/default','Magento_Checkout/js/model/quote','Magento_Checkout/js/model/full-screen-loader','Magento_PaymentServicesPaypal/js/view/errors/response-error','Magento_Checkout/js/action/set-billing-address','Magento_Ui/js/model/messageList','Magento_Vault/js/view/payment/vault-enabler','Magento_Checkout/js/model/payment/additional-validators','paymentSdkLoader','ko'],function($,_,$t,Component,quote,loader,ResponseError,setBillingAddressAction,globalMessageList,VaultEnabler,additionalValidators,paymentSdkLoader,ko){'use strict';return Component.extend({defaults:{isFormValid:false,invalidFields:[],isAvailable:false,isFormRendered:false,fields:{number:{class:'card-number-field',label:$t('Credit Card Number'),errorMessage:$t('Please enter a valid credit card number.'),selector:'#${ $.formId } .${ $.fields.number.class }',placeholder:'',showLockIcon:true},expirationDate:{class:'expiration-date-field',selector:'#${ $.formId } .expiration-date-field',label:$t('Expiration Date'),errorMessage:$t('Incorrect credit card expiration date.'),placeholder:'MM/YY'},cvv:{class:'cvv-field',selector:'#${ $.formId } .cvv-field',label:$t('Card Security Code'),errorMessage:$t('Please enter a valid credit card security code.'),tooltip:{title:$t('What is this?'),src:$.cvvImgUrl,contentUnsanitizedHtml:'<img src=\"${ $.cvvImgUrl }\" '+'alt=\"${ $.cvvTitle }\" title=\"${ $.cvvTitle }\" />'},placeholder:''}},cardsByCode:{\"amex\":\"AE\",\"discover\":\"DI\",\"elo\":\"ELO\",\"hiper\":\"HC\",\"jcb\":\"JCB\",\"mastercard\":\"MC\",\"visa\":\"VI\",},cards:{AE:{eligibilityCode:'amex',typeCode:'american-express'},DI:{eligibilityCode:'discover',typeCode:'discover'},ELO:{eligibilityCode:'elo',typeCode:'elo'}
2,HC:{eligibilityCode:'hiper',typeCode:'hiper'},JCB:{eligibilityCode:'jcb',typeCode:'jcb'},MC:{eligibilityCode:'mastercard',typeCode:'master-card'},VI:{eligibilityCode:'visa',typeCode:'visa'}},orderCreateErrorMessage:{default:$t('Failed to place order. Try again or refresh the page if that does not resolve the issue.'),'POSTAL_CODE_REQUIRED':$t('Postal code is required.'),'CITY_REQUIRED':$t('City is required.')},availableCards:[],getOrderDetailsUrl:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].getOrderDetailsUrl,requiresCardDetails:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].requiresCardDetails,ccIcons:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].ccIcons,paymentSource:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].paymentSource,cvvImgUrl:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].cvvImageUrl,isCommerceVaultEnabled:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].isCommerceVaultEnabled,emptyErrorMessage:$t('This is a required field.'),paymentTypeIconUrl:window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].paymentTypeIconUrl,paymentTypeIconTitle:$t('Pay with credit card'),lockTitle:$t('Secure transaction'),cvvTitle:$t('The card security code is a three or four digit number printed on a credit card. Visa, Mastercard, and Discover cards have a three digit code on the card back. American Express cards have a four digit code on the card front.'),paymentMethodValidationError:$t('Your payment was not successful. Ensure you have entered your details correctly and try again, or try a different payment method. If you have continued problems, contact the issuing bank for your payment method.'),notEligibleErrorMessage:$t('This payment option is currently unavailable.'),generalErrorMessage:'${ $.paymentMethodValidationError }',placeOrderTitle:$t('Place Order'),formId:'hosted-fields-form',template:'Magento_PaymentServicesPaypal/payment/credit-card',ccType:'',billingAddress:quote.billingAddress,paymentsOrderId:null,paypalOrderId:null,cardBin:null,holderName:null,cardLast4:null,cardExpiryMonth:null,cardExpiryYear:null,hostedFields:null,shouldCardBeVaulted:false,paymentSdkReady:null,isInProgress:ko.observable(false),},initialize:function(){_.bindAll(this,'onError','getOrderCardDetails');this._super();this.initPaymentsSDK();this.initVaulting();return this;},initPaymentsSDK:function(){const loader=paymentSdkLoader().withPreferredUrl(this.getPaymentsSDKUrl()).withFallbackUrl(this.getPaymentsSDKFallbackUrl()).withGraphqlEndpoint(this.getGraphQLUrl()).withGraphqlCustomerToken(this.getGraphQLToken()).forStoreView(this.getGraphQLStoreCode()).withPaymentNamespace(\"CHECKOUT\")\nthis.paymentSdkReady=loader.load()},initVaulting:function(){this.vaultEnabler=new VaultEnabler();this.vaultEnabler.isActivePaymentTokenEnabler(false);this.vaultEnabler.setPaymentCode(window.checkoutConfig.payment[this.getCode()].ccVaultCode);},initObservable:function(){this._super().observe('billingAddress paymentsOrderId paypalOrderId cardBin '+'holderName cardLast4 cardExpiryMonth cardExpiryYear '+'ccType isFormValid invalidFields availableCards isAvailable isFormRendered shouldCardBeVaulted');return this;},getCode:function(){return'payment_services_paypal_hosted_fields';},getData:function(){var data=this._super();data['additional_data']={payments_order_id:this.paymentsOrderId(),paypal_order_id:this.paypalOrderId(),payment_source:this.paymentSource};if(this.cardBin()){data['additional_data']['cardBin']=this.cardBin();}\nif(this.holderName()){data['additional_data']['holderName']=this.holderName();}\nif(this.cardLast4()){data['additional_data']['cardLast4']=this.cardLast4();}\nif(this.cardExpiryMonth()){data['additional_data']['cardExpiryMonth']=this.cardExpiryMonth();}\nif(this.cardExpiryYear()){data['additional_data']['cardExpiryYear']=this.cardExpiryYear();}\nthis.vaultEnabler.visitAdditionalData(data);return data;},afterRender:function(){this.$form=$('#'+this.formId);this.paymentSdkReady.then(function(sdk){this.isAvailable(sdk.Payment.CreditCard.isAvailable())\nif(!this.isAvailable()){this.isFormRendered(true);return;}\nsdk.Payment.CreditCard.render({fields:{number:{selector:this.fields.number.selector,label:this.fields.number.label,class:this.fields.number.class,},expirationDate:{selector:this.fields.expirationDate.selector,label:this.fields.expirationDate.label,class:this.fields.expirationDate.class,},cvv:{selector:this.fields.cvv.selector,label:this.fields.cvv.label,class:this.fields.cvv.class,},},styles:{input:{color:'#ccc','font-family':'\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif','font-size':'16px','font-weight':'400'},':focus':{color:'#333'},'.valid':{color:'#333'}}
2,onRender:this.onRender.bind(this),getCartId:this.getMaskedCardId,onStart:this.onStart.bind(this),onSuccess:this.onSuccess.bind(this),getBillingAddress:this.getBillingAddress.bind(this),getShouldVaultCard:()=>this.isCommerceVaultEnabled&&this.checkShouldCardBeVaulted(),onValidityChange:this.onValidityChange.bind(this),onCardTypeChange:this.onCardTypeChange.bind(this),onError:this.onError.bind(this),});}.bind(this)).catch((e)=>{console.log('Error initializing Payments SDK',e);this.isFormRendered(true);this.isAvailable(false);});},getMaskedCardId:function(){return window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].quoteMaskedId;},getPaymentsSDKUrl:function(){return window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].paymentsSDKUrl;},getPaymentsSDKFallbackUrl:function(){return window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].paymentsSDKFallbackUrl;},getGraphQLStoreCode:function(){return window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].storeViewCode;},getGraphQLUrl:function(){return window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].graphQLEndpointUrl;},getGraphQLToken:function(){return window.checkoutConfig.payment['payment_services_paypal_hosted_fields'].oauthToken;},getBillingAddress:function(){return{firstName:this.billingAddress().firstname,lastName:this.billingAddress().lastname,streetAddress:this.billingAddress().street[0],extendedAddress:this.billingAddress().street[1],region:this.billingAddress().region,locality:this.billingAddress().city,postalCode:this.billingAddress().postcode,countryCodeAlpha2:this.billingAddress().countryId,};},onStart:async function(preventCheckout){if(!this.canProceedWithOrder()){preventCheckout(\"invalid form\");}\nloader.startLoader();await setBillingAddressAction(globalMessageList);},onSuccess:function(data){this.paymentsOrderId(data.mpOrderId);this.paypalOrderId(data.payPalOrderId);this.getOrderCardDetails().then(this.placeOrder.bind(this)).catch(this.onError.bind(this));},onRender:function(hostedFields){this.isFormValid(false);this.ccType('');this.invalidFields([]);var cards=hostedFields.getEligibleCards().filter(card=>this.cardsByCode[card.code]!==undefined).map(card=>this.cardsByCode[card.code]);this.availableCards(cards);this.$form.off('submit');this.$form.on('submit',function(e){e.preventDefault();this.isInProgress(true);hostedFields.submit().catch(this.onError.bind(this)).finally(function(){loader.stopLoader();this.isInProgress(false);}.bind(this));}.bind(this));this.isFormRendered(true);},onValidityChange:function(fields,emittedBy){var valid=_.every(fields,function(field){return field.isValid});var invalidFields=this.invalidFields().filter(field=>field.name!==emittedBy);if(!valid){if(fields[emittedBy]&&!fields[emittedBy].isValid){invalidFields.push({name:emittedBy,message:fields[emittedBy].isEmpty?this.emptyErrorMessage:this.fields[emittedBy].errorMessage});}\nthis.invalidFields(invalidFields)}\nthis.isFormValid(valid);this.isFormValid()&&this.invalidFields([]);},isFieldValid:function(fieldName){return!this.invalidFields.findWhere({name:fieldName});},getFieldErrorMessage:function(fieldName){return!this.isFieldValid(fieldName)?this.invalidFields.findWhere({name:fieldName}).message:'';},onCardTypeChange:function(cards){var code='';if(cards.length===1&&this.cardsByCode[cards[0].code]){code=this.cardsByCode[cards[0].code]}\nthis.ccType(code);},getOrderCardDetails:function(response){if(!this.requiresCardDetails){return Promise.resolve(response);}\nreturn fetch(`${this.getOrderDetailsUrl}`,{method:'GET'}).then(function(res){return res.json();}).then(function(data){if(data.response['is_successful']&&data.response['paypal-order']){const order=data.response['paypal-order'];this.cardBin(order?.payment_source_details?.card?.bin_details?.bin);this.holderName(order?.payment_source_details?.card?.name);this.cardLast4(order?.payment_source_details?.card?.last_digits);this.cardExpiryMonth(order?.payment_source_details?.card?.card_expiry_month);this.cardExpiryYear(order?.payment_source_details?.card?.card_expiry_year);}\nreturn response;}.bind(this)).catch(function(err){console.log('Could not get order details. Proceeding with order placement without card details',err);return response;});},onError:function(error){loader.stopLoader();var message=this.generalErrorMessage;if(error instanceof ResponseError){message=error.message;}else if(error['debug_id']){message=this.paymentMethodValidationError;}\nif(this.isOrderCreateError(error)){message=this.parseOrderCreateError(error);}\nthis.messageContainer.addErrorMessage({message:message});if(error instanceof Error){console.log(error.toString());}else{console.log('Error'+JSON.stringify(error));}},placeOrderClick:function(){if(this.isPlaceOrderActionAllowed()===true){$('#'+this.formId).trigger('submit');}},checkShouldCardBeVaulted:function(){const checked=this.vaultEnabler.isActivePaymentTokenEnabler();this.shouldCardBeVaulted(checked);return checked;},canProceedWithOrder:function(){return this.validate()&&additionalValidators.validate()&&this.isFormValid()&&this.isPlaceOrderActionAllowed();},isOrderCreateError:function(error){return error?.cause?.graphQLErrors?.find(e=>e?.path?.join(\"\").indexOf(\"createPaymentOrder\")>-1)!==undefined;},parseOrderCreateError:function(error){if(this.isErrorCode(error,'POSTAL_CODE_REQUIRED')){return this.orderCreateErrorMessage.POSTAL_CODE_REQUIRED;}\nif(this.isErrorCode(error,'CITY_REQUIRED')){return this.orderCreateErrorMessage.CITY_REQUIRED;}\nreturn this.orderCreateErrorMessage.default;},isErrorCode:function(error,code){return error?.cause?.graphQLErrors?.find(e=>e?.path?.join(\"\").indexOf(\"createPaymentOrder\")>-1)?.extensions?.debugMessage?.indexOf(code)>-1;}});});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer/smart-buttons.min.js":"define(['Magento_Checkout/js/view/payment/default','jquery','underscore','mageUtils','Magento_Checkout/js/model/quote','Magento_Checkout/js/model/full-screen-loader','mage/translate','Magento_PaymentServicesPaypal/js/helpers/remove-paypal-url-token','Magento_PaymentServicesPaypal/js/model/app-switch-data','Magento_PaymentServicesPaypal/js/view/payment/methods/smart-buttons','Magento_PaymentServicesPaypal/js/view/payment/message','Magento_Checkout/js/model/payment/additional-validators','Magento_Checkout/js/action/set-billing-address','Magento_Ui/js/model/messageList','uiRegistry','Magento_Customer/js/customer-data'],function(Component,$,_,utils,quote,fullScreenLoader,$t,removePayPalUrlToken,appSwitchDataModel,SmartButtons,Message,additionalValidators,setBillingAddressAction,globalMessageList,registry,customerData){'use strict';var refreshCustomerData=function(url){customerData.onAjaxComplete({},{type:'POST',url:url});};return Component.extend({defaults:{sdkNamespace:'paypalCheckoutButtons',buttonsContainerId:'smart-buttons-${ $.uid }',payLaterMessageContainerId:'pay-later-message-${ $.uid }',template:'Magento_PaymentServicesPaypal/payment/smart-buttons',isAvailable:false,isButtonsRendered:false,grandTotalAmount:null,paymentsOrderId:null,paypalOrderId:null,requestProcessingError:$t('Error happened when processing the request. Please try again later.'),notEligibleErrorMessage:$t('This payment option is currently unavailable.'),paymentTypeIconUrl:window.checkoutConfig.payment['payment_services_paypal_smart_buttons'].paymentTypeIconUrl,paymentTypeIconTitle:$t('Pay with PayPal')},initialize:function(config){_.bindAll(this,'onClick','onInit','catchError','beforeCreateOrder','afterCreateOrder');config.uid=utils.uniqueid();this._super();this.initSmartButtons();this.initMessage();quote.totals.subscribe(function(totals){this.grandTotalAmount(totals['base_grand_total']);this.message.updateAmount(totals['base_grand_total']);}.bind(this));return this;},initObservable:function(){this._super().observe('grandTotalAmount isAvailable isButtonsRendered');this.grandTotalAmount(quote.totals()['base_grand_total']);return this;},initSmartButtons:function(){this.buttons=new SmartButtons({sdkNamespace:this.sdkNamespace,scriptParam
2s:window.checkoutConfig.payment[this.getCode()].sdkParams,createOrderUrl:window.checkoutConfig.payment[this.getCode()].createOrderUrl,styles:window.checkoutConfig.payment[this.getCode()].buttonStyles,notEligibleErrorMessage:$t('Payment method is not eligible'),onInit:this.onInit,onClick:this.onClick,beforeCreateOrder:this.beforeCreateOrder,afterCreateOrder:this.afterCreateOrder,catchCreateOrder:this.catchError,onApprove:function(){if(this.hasReturned){this.setAppSwitchResumeData();}\nthis.placeOrder();}.bind(this),onError:this.catchError,location:window.checkoutConfig.payment[this.getCode()].location,appSwitchWhenAvailable:window.checkoutConfig.payment[this.getCode()].appSwitchWhenAvailable});},initMessage:function(){this.message=new Message({scriptParams:window.checkoutConfig.payment[this.getCode()].sdkParams,element:this.element,renderContainer:'#'+this.payLaterMessageContainerId,styles:window.checkoutConfig.payment[this.getCode()].messageStyles,placement:'payment',amount:this.grandTotalAmount()});},getCode:function(){return'payment_services_paypal_smart_buttons';},getData:function(){return{'method':this.item.method,'additional_data':{'payments_order_id':this.paymentsOrderId,'paypal_order_id':this.paypalOrderId,'payment_source':this.buttons.paymentSource}};},afterRender:function(){this.buttons.sdkLoaded.then(function(){this.buttons.setup('#'+this.buttonsContainerId);if(this.buttons.instance.hasReturned()){this.hasReturned=true;this.buttons.instance.resume();}else{this.buttons.render();}\nthis.renderMessage();this.isAvailable(!!this.buttons.instance&&this.buttons.instance.isEligible());}.bind(this)).catch(function(){this.isAvailable(false);return this.buttons;}.bind(this)).finally(function(){this.isButtonsRendered(true);}.bind(this));},renderMessage:function(){if(window.checkoutConfig.payment[this.getCode()].canDisplayMessage){this.message.render();}},onInit:function(data,actions){if(!this.isPlaceOrderActionAllowed()){actions.disable();}\nthis.isPlaceOrderActionAllowed.subscribe(function(isAllowed){if(isAllowed){actions.enable();}else{actions.disable();}});},validate:function(){var isShippingValid=true,source,shippingAddress;if(!this._super()){return false;}\nsource=registry.get('checkoutProvider');shippingAddress=registry.get('index = shippingAddress');if(source&&shippingAddress){source.set('params.invalid',false);if(quote.billingAddress()===null){this.triggerBillingValidation(source);}\nif(!quote.isVirtual()&&!quote.shippingMethod()['method_code']==='pickup'){isShippingValid=shippingAddress.validateShippingInformation();}\nreturn isShippingValid&&!source.get('params.invalid');}\nreturn true;},triggerBillingValidation:function(source){var dataScope=`billingAddress${ window.checkoutConfig.displayBillingOnPaymentMethod ?\n this.getCode() : 'shared'}`;source.trigger(`${ dataScope }.data.validate`);if(source.get(`${dataScope}.custom_attributes`)){source.trigger(`${dataScope}.custom_attributes.data.validate`);}},onClick:function(data,actions){if(this.validate()&&additionalValidators.validate()){if(window.checkoutConfig?.checkoutAgreements?.isEnabled){const agreementsInputPath='.payment-method._active div.checkout-agreements input';$(agreementsInputPath).each(function(index,element){const termsData=appSwitchDataModel.getData('terms')||{};termsData[element.id]=element.value;appSwitchDataModel.setData('terms',termsData);});}\nconst reCaptcha=$('.g-recaptcha:visible');const reCaptchaId=reCaptcha&&reCaptcha.last().attr('id');if(reCaptchaId){const reCaptchaToken=$(`#${reCaptchaId} [name=\"g-recaptcha-response\"]`).val();appSwitchDataModel.setData('recaptcha',reCaptchaToken);}\nreturn actions.resolve();}\nappSwitchDataModel.setData('pageType',this.pageType);return actions.reject();},beforeCreateOrder:function(){return new Promise(function(resolve,reject){setBillingAddressAction(globalMessageList).done(resolve.bind(null,null)).fail(reject);});},afterCreateOrder:function(data){if(data.response['paypal-order']&&data.response['paypal-order']['mp_order_id']){refreshCustomerData(window.checkoutConfig.payment[this.getCode()].createOrderUrl);this.paymentsOrderId=data.response['paypal-order']['mp_order_id'];this.paypalOrderId=data.response['paypal-order'].id;appSwitchDataModel.setData('paymentsOrderId',this.paymentsOrderId);appSwitchDataModel.setData('paypalOrderId',this.paypalOrderId);appSwitchDataModel.setData('paymentSource',this.buttons.paymentSource);return this.paypalOrderId;}\nthrow new Error();},catchError:function(error){removePayPalUrlToken();this.messageContainer.addErrorMessage({message:error?.message||this.requestProcessingError});console.log('Error: ',error?.message||this.requestProcessingError);this.afterRender();},setAppSwitchResumeData:function(){this.paymentsOrderId=appSwitchDataModel.getData('paymentsOrderId');this.paypalOrderId=appSwitchDataModel.getData('paypalOrderId');this.buttons.paymentSource=appSwitchDataModel.getData('paymentSource');if(window.checkoutConfig?.checkoutAgreements?.isEnabled){const terms=appSwitchDataModel.getData('terms');
2if(terms){Object.keys(terms).forEach((term)=>{$(`#${term}`).prop('checked',terms[term]==='1');});}}\nconst reCaptcha=$('.g-recaptcha:visible'),reCaptchaId=reCaptcha&&reCaptcha.last().attr('id');if(reCaptchaId){const reCaptchaToken=appSwitchDataModel.getData('recaptcha');$(`#${reCaptchaId} [name=\"g-recaptcha-response\"]`).val(reCaptchaToken);}\nappSwitchDataModel.clearData();}});});","Magento_PaymentServicesPaypal/js/view/payment/method-renderer/vault.min.js":"define(['mage/translate','Magento_Vault/js/view/payment/method-renderer/vault','Magento_Checkout/js/model/full-screen-loader','Magento_PaymentServicesPaypal/js/view/errors/response-error','escaper'],function($t,VaultComponent,loader,ResponseError,escaper){'use strict';return VaultComponent.extend({defaults:{template:'Magento_PaymentServicesPaypal/payment/vault',paymentSource:'vault',paypalOrderId:null,paymentsOrderId:null,generalErrorMessage:$t('An error occurred. Refresh the page and try again.'),paymentMethodValidationError:$t('Your payment was not successful. Try again.'),allowedTags:['br'],},getCardBrand:function(){return this.mapCardBrand(this.details.brand);},mapCardBrand:function(payPalCardBrand){const cardBrandMapping={AMEX:'AE',DISCOVER:'DI',DINERS:'DN',ELO:'ELO',HIPER:'HC',JCB:'JCB',MAESTRO:'MI',MASTER_CARD:'MC',MASTERCARD:'MC',VISA:'VI'};return cardBrandMapping[payPalCardBrand];},getMaskedCard:function(){return this.details.maskedCC;},getCardDescription:function(){return this.details.description;},getFormattedCardBillingAddress:function(){let billingAddress=this.details.billingAddress;if(!billingAddress){return'';}\nlet street1=billingAddress.address_line_1||'';let street2=billingAddress.address_line_2||'';let region=billingAddress.region||'';let city=billingAddress.city||'';let postalCode=billingAddress.postal_code||'';let countryCode=billingAddress.country_code||'';let formattedAddress=street1+'<br/>';if(street2!==''){formattedAddress+=street2+'<br/>';}\nformattedAddress+=region+' '+city+' '+postalCode+'<br/>'+\ncountryCode;return this.getSafeHtml(formattedAddress);},getCardHolderName:function(){return this.details.cardholderName;},getSafeHtml:function(html){return escaper.escapeHtml(html,this.allowedTags);},getData:function(){let data=this._super();data['additional_data']['paypal_order_id']=this.paypalOrderId;data['additional_data']['payments_order_id']=this.paymentsOrderId;data['additional_data']['public_hash']=this.publicHash;data['additional_data']['payment_source']=this.paymentSource;return data;},onPlaceOrder:function(){loader.startLoader();this.createOrder().then(function(order){this.onOrderSuccess(order);}.bind(this)).then(function(){this.placeOrder();}.bind(this)).catch(this.onError.bind(this)).finally(loader.stopLoader);},createOrder:function(){var orderData=new FormData();orderData.append('payment_source',this.paymentSource);orderData.append('location',this.location);return fetch(this.createOrderUrl,{method:'POST',headers:{},body:orderData,credentials:'same-origin'}).then(function(res){return res.json();}).then(function(data){if(data.response['is_successful']){return data.response['paypal-order'];}});},onOrderSuccess:function(order){this.paypalOrderId=order['id'];this.paymentsOrderId=order['mp_order_id'];},onError:function(error){var message=this.generalErrorMessage;if(error instanceof ResponseError){message=error.message;}else if(error['debug_id']){message=this.paymentMethodValidationError;}\nthis.messageContainer.addErrorMessage({message:message});console.log(error['debug_id']?'Error'+JSON.stringify(error):error.toString());},});});","Magento_PaymentServicesPaypal/js/view/payment/methods/apple-pay.min.js":"define(['jquery','underscore','uiComponent','scriptLoader','Magento_PaymentServicesPaypal/js/lib/script-loader','Magento_Customer/js/customer-data','Magento_Customer/js/model/customer','mage/translate',],function($,_,Component,loadSdkScript,scriptLoader,customerData,customer,$t){'use strict';const HTTP_STATUS_CREATED=201;const APPLE_PAY_VERSION_NUMBER=4;const appleSDKSrc='https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js';var performCreateOrder=function(url,payPalOrderData,orderData){orderData=orderData||new FormData();orderData.append('form_key',$.mage.cookies.get('form_key'));orderData.append('payment_source',payPalOrderData['paymentSource']);let xhr=new XMLHttpRequest();xhr.open('POST',url,false);xhr.send(orderData);if(xhr.status!==HTTP_STATUS_CREATED){throw new Error('Request failed');}else{return JSON.parse(xhr.responseText);}},performOnAuthorize=function(url,data){var orderData=new FormData();orderData.append('form_key',$.mage.cookies.get('form_key'));orderData.append('paypal_order_id',data.orderID);return fetch(url,{method:'POST',headers:{},body:orderData,credentials:'same-origin'}).then(function(response){return response.json();});};return Component.extend({defaults:{sdkNamespace:'paypal',paypal:null,paymentSource:'applepay',createOrderUrl:'',placeOrderUrl:'',updateQuoteUrl:'',estimateShippingMethodsWhenLoggedInUrl:'',estimateShippingMethodsWhenGuestUrl:'',shippingInformationWhenLoggedInUrl:'',shippingInformationWhenGuestUrl:'',updatePaypalOrderUrl:'',setQuoteAsInactiveUrl:'',countriesUrl:'',instance:null,scriptParam
2s:{},allowedPaymentMethods:null,merchantInfo:null,buttonContainerId:null,paypalOrderId:null,eligible:false,applePayInstance:null,applePayConfig:null,appleSession:null,applePayVersionNumber:APPLE_PAY_VERSION_NUMBER,countryCode:null,regionCode:null,regionId:null,postalCode:null,requestProcessingError:$t('Something went wrong with your request. Please try again later.'),},initialize:function(){_.bindAll(this,'createOrder','onApprove','onError','initAppleSDK','performAuthorization','onClick','beforeOnAuthorize','afterOnAuthorize','onCancel');this._super();this.sdkLoaded=Promise.all([this.loadPayPalSDK(),this.loadAppleSDK()]);return this;},loadPayPalSDK:function(){return loadSdkScript(this.scriptParams,this.sdkNamespace).then(function(sdkScript){this.paypal=sdkScript;}.bind(this)).catch(function(e){this.onError(e);});},loadAppleSDK:function(){return scriptLoader.loadCustom({url:appleSDKSrc}).catch(function(e){this.onError(e);});},isCustomerLoggedIn:function(){return customer.isLoggedIn();},initAppleSDK:function(){if(!window.ApplePaySession){console.warn('This device does not support Apple Pay');return;}\nif(!ApplePaySession.canMakePayments()){console.warn('This device is not capable of making Apple Pay payments');}\nthis.applePayInstance=this.paypal.Applepay();return this.applePayInstance.config().then(applePayConfig=>{this.applePayConfig=applePayConfig;this.renderApplePayButton();}).catch(applepayConfigError=>{console.error('Error while fetching Apple Pay configuration.');});},onApplePayValidateMerchant:function(applePaySession){applePaySession.onvalidatemerchant=(event)=>{this.applePayInstance.validateMerchant({validationUrl:event.validationURL,}).then((payload)=>{applePaySession.completeMerchantValidation(payload.merchantSession);}).catch((error)=>{applePaySession.abort();this.isErrorDisplayed=false;this.catchError(error)});};},onApplePayPaymentAuthorized:function(applePaySession,paypalOrderId=null){applePaySession.onpaymentauthorized=async(event)=>{try{let shippingContact=event.payment.shippingContact;if(shippingContact&&shippingContact.phoneNumber){shippingContact={...shippingContact,phoneNumber:shippingContact.phoneNumber.replace(/\\D/g,'')};}\nawait this.applePayInstance.confirmOrder({orderId:paypalOrderId!==null?paypalOrderId:this.paypalOrderId,token:event.payment.token,billingContact:event.payment.billingContact,shippingContact:shippingContact});applePaySession.completePayment({status:window.ApplePaySession.STATUS_SUCCESS,});await this.onApprove();}catch(error){applePaySession.completePayment({status:window.ApplePaySession.STATUS_FAILURE,});this.isErrorDisplayed=false;this.catchError(error)}};},onApplePayShippingContactSelected:function(applePaySession,quoteId,total,isVirtual){applePaySession.onshippingcontactselected=(event)=>{const shippingMethods=[];let estimateShippingMethodURL=(this.isCustomerLoggedIn())?this.estimateShippingMethodsWhenLoggedInUrl:this.estimateShippingMethodsWhenGuestUrl.replace(':cartId',quoteId);if(this.location==='product'){estimateShippingMethodURL=this.estimateShippingMethodsWhenGuestUrl.replace(':cartId',quoteId);}\nthis.countryCode=event.shippingContact.countryCode;this.regionCode=event.shippingContact.administrativeArea;this.postalCode=event.shippingContact.postalCode;this.getRegionIdByCode(this.regionCode,this.countryCode).then((regionId)=>{this.regionId=regionId;}).catch((error)=>{console.log(error);this.regionId=null;});$.ajax({type:'POST',url:estimateShippingMethodURL,headers:{'Content-Type':'application/json',},data:JSON.stringify({address:{country_id:event.shippingContact.countryCode,postcode:event.shippingContact.postalCode,city:event.shippingContact.locality}})}).then(estimateShippingMethods=>{estimateShippingMethods.forEach(method=>{shippingMethods.push({label:method.method_title,detail:method.carrier_title,amount:method.amount.toString(),identifier:method.carrier_code+'_'+method.method_code,});});applePaySession.completeShippingContactSelection({newShippingMethods:shippingMethods,newTotal:total,})},error=>{this.isErrorDisplayed=false;applePaySession.abort();this.catchError(error);});if(isVirtual){this.createOrder();}}},onApplePayShippingMethodSelectedInCartPage:function(applePaySession,quoteId){this.onApplePayShippingMethodSelected(applePaySession,quoteId,null,null);},onApplePayShippingMethodSelected:function(applePaySession,quoteId,quoteMaskedId,paypalOrderId){applePaySession.onshippingmethodselected=(event)=>
2{let shippingInformationURL=(this.isCustomerLoggedIn())?this.shippingInformationWhenLoggedInUrl:this.shippingInformationWhenGuestUrl.replace(':quoteId',quoteId);if(this.location==='product'){shippingInformationURL=this.shippingInformationWhenGuestUrl.replace(':quoteId',quoteMaskedId);}\n$.ajax({type:'POST',url:shippingInformationURL,headers:{'Content-Type':'application/json',},data:JSON.stringify({addressInformation:{shipping_address:{\"country_id\":this.countryCode,\"region_id\":this.regionId,\"postcode\":this.postalCode},shipping_method_code:event.shippingMethod.identifier.split('_')[1],shipping_carrier_code:event.shippingMethod.identifier.split('_')[0],extension_attributes:{}}})}).then(result=>{let items=[];result['totals']['items'].forEach(item=>{items.push({label:item.name+' ( x '+item.qty+' )',type:\"final\",amount:item.row_total});});items.push({label:\"Shipping\",type:\"final\",amount:result['totals']['shipping_amount'],});if(result['totals']['tax_amount']!==0){items.push({label:\"Tax\",type:\"final\",amount:result['totals']['tax_amount'],});}\napplePaySession.completeShippingMethodSelection({newLineItems:items,newTotal:{label:\"Summary\",type:\"final\",amount:result['totals']['grand_total'],},});if(this.location==='product'){this.updatePaypalOrder();}else{this.createOrder();}}).catch(error=>{applePaySession.abort();this.isErrorDisplayed=false;this.catchError(error);});};},updatePaypalOrder:function(){$.ajax({type:'POST',url:this.updatePayPalOrderUrl,}).catch(error=>{this.catchError(error);});},onApplePayCancel:function(applePaySession,callback){applePaySession.oncancel=()=>{if(typeof callback==='function'){callback();}\nthis.showLoader(false);}},getApplePaymentRequestLineItems:function(quote){let items=[];
2quote.getItems().forEach(item=>{items.push({label:item.name+' ( x '+item.qty+' )',type:\"final\",amount:item.price*item.qty,});});items.push({label:$t(\"Shipping\"),type:\"final\",amount:quote.getTotals()()['shipping_amount'],});if(quote.getTotals()['tax_amount']!==0){items.push({label:$t(\"Tax\"),type:\"final\",amount:quote.getTotals()()['tax_amount'],});}\nreturn items;},showPopup:function(paymentData,quote){const paymentRequest={countryCode:this.applePayConfig.countryCode,merchantCapabilities:this.applePayConfig.merchantCapabilities,supportedNetworks:this.applePayConfig.supportedNetworks,currencyCode:paymentData.response['paypal-order']['currency_code'],lineItems:this.getApplePaymentRequestLineItems(quote),requiredBillingContactFields:[\"postalAddress\"],shippingContact:{countryCode:quote.shippingAddress().countryId,postalCode:quote.shippingAddress().postcode,locality:quote.shippingAddress().city,administrativeArea:quote.shippingAddress().regionCode,familyName:quote.shippingAddress().lastname,givenName:quote.shippingAddress().firstname,addressLines:quote.shippingAddress().street,},total:{label:$t(\"Summary\"),type:\"final\",amount:Number(paymentData.response['paypal-order']['amount']).toString(),}};this.applePaySession=new ApplePaySession(APPLE_PAY_VERSION_NUMBER,paymentRequest);this.onApplePayValidateMerchant(this.applePaySession);this.onApplePayPaymentAuthorized(this.applePaySession,paymentData.response['paypal-order']['id']);this.onApplePayCancel(this.applePaySession);this.applePaySession.begin();},onCancel:function(){window.location=data.redirectUrl;this.showLoader(false);},renderApplePayButton:function(){if(this.applePayConfig.isEligible){const buttonStyle=this.mapButtonStyle();const buttonType=this.mapButtonType();const height=this.styles.height>0?this.styles.height+\"px\":\"40px\";const btnId=this.generateUniqueElementId();document.getElementById(this.buttonContainerId).innerHTML=`\n <apple-pay-button\n id=\"${btnId}\"\n buttonstyle=\"${buttonStyle}\"\n type=\"${buttonType}\"\n locale=\"${window.LOCALE}\"\n style=\" --apple-pay-button-width: 100%; --apple-pay-button-height: ${height}\"\n >`;document.getElementById(btnId).addEventListener(\"click\",this.onClick);}},generateUniqueElementId:function(){return`btn-appl-${Date.now()}-${Math.floor(Math.random() * 1000)}`;},mapButtonStyle:function(){return this.styles.color==='white'?'white':'black';},mapButtonType:function(){switch(this.styles.label){case'paypal':case'installment':return'plain';case'checkout':return'check-out';case'buynow':return'buy';default:return'pay';}},enableButton:function(){$('#'+this.buttonContainerId).find('button').prop('disabled',false);},disableButton:function(){$('#'+this.buttonContainerId).find('button').prop('disabled',true);},performAuthorization:function(paymentData){},onClick:function(){},beforeCreateOrder:function(){},createOrder:function(){let data={'paymentSource':this.paymentSource};let createOrderData=new FormData();createOrderData.append('location',this.location);try{this.beforeCreateOrder();let orderData=performCreateOrder(this.createOrderUrl,data,createOrderData);this.paypalOrderId=this.afterCreateOrder(orderData);return this.paypalOrderId;}catch(error){this.isErrorDisplayed=false;this.catchError(error);return Promise.reject(error);}},afterCreateOrder:function(data){},catchCreateOrder:function(){},onApprove:function(){const data={orderID:this.paypalOrderId};return this.beforeOnAuthorize().then(performOnAuthorize.bind(this,this.updateQuoteUrl,data)).then(this.afterOnAuthorize).catch(this.onError);},beforeOnAuthorize:function(){return Promise.resolve();},afterOnAuthorize:function(){return Promise.resolve();},onError:function(error){console.log('Error: ',error.message);},isEligible:function(){return this.eligible;},showLoaderAsync:function(show){return new Promise(function(resolve,reject){var event=show?'processStart':'processStop';$('body').trigger(event);setTimeout(()=>{resolve();},50);});},showLoader:function(show){var event=show?'processStart':'processStop';$('body').trigger(event);},getRegionIdByCode:function(regionCode,countryCode){return new Promise(function(resolve,reject){$.ajax({url:this.countriesUrl.replace(':countryCode',countryCode),method:'GET',success:function(response){if(response.available_regions&&response.available_regions.length){var matchedRegion=response.available_regions.find(function(region){return region.code===regionCode;});if(matchedRegion){resolve(matchedRegion.id);}else{reject('Region not found');}}else{reject('No regions available for country: '+countryCode);}}
2,error:function(){reject('Error fetching regions for country: '+countryCode);}});}.bind(this));},catchError:function(error){this.showLoader(false);if(this.isErrorDisplayed){return;}\nif(error.hidden===undefined||!error.hidden){this.addMessage(this.requestProcessingError);}\nthis.isErrorDisplayed=true;},addMessage:function(message,type){type=type||'error';setTimeout(function(){customerData.set('messages',{messages:[{text:message,type:type}]});},1000);},});});","Magento_PaymentServicesPaypal/js/view/payment/methods/google-pay.min.js":"define(['jquery','underscore','uiComponent','scriptLoader','Magento_PaymentServicesPaypal/js/lib/script-loader','mage/translate','mage/cookies'],function($,_,Component,loadSdkScript,scriptLoader,$t){'use strict';const HTTP_STATUS_CREATED=201;const googleSDKSrc='https://pay.google.com/gp/p/js/pay.js',baseRequest={apiVersion:2,apiVersionMinor:0,callbackIntents:['PAYMENT_AUTHORIZATION'],emailRequired:true,shippingAddressParameters:{phoneNumberRequired:true}};var performCreateOrder=function(url,payPalOrderData,orderData,threeDSMode){orderData=orderData||new FormData();orderData.append('form_key',$.mage.cookies.get('form_key'));orderData.append('payment_source',payPalOrderData['paymentSource']);if(threeDSMode){orderData.append('three_ds_mode',threeDSMode);}\nlet xhr=new XMLHttpRequest();xhr.open('POST',url,false);xhr.send(orderData);if(xhr.status!==HTTP_STATUS_CREATED){throw new Error('Request failed');}else{return JSON.parse(xhr.responseText);}},performOnAuthorize=function(url,data){var orderData=new FormData();orderData.append('form_key',$.mage.cookies.get('form_key'));orderData.append('paypal_order_id',data.orderID);return fetch(url,{method:'POST',headers:{},body:orderData,credentials:'same-origin'}).then(function(response){return response.json();});};return Component.extend({defaults:{sdkNamespace:'paypal',paypal:null,paymentSource:'googlepay',createOrderUrl:'',updateQuoteUrl:'',setQuoteAsInactiveUrl:'',instance:null,scriptParams:{},allowedPaymentMethods:null,merchantInfo:null,buttonContainerId:null,paypalOrderId:null,eligible:false,mode:'TEST',shippingAddressRequired:true,getOrderDetailsUrl:'',threeDSMode:'',notEligibleErrorMessage:$t('This payment option is currently unavailable.'),},initialize:function(){_.bindAll(this,'createOrder','onApprove','onError','initGoogleSDK','performAuthorization','onClick','beforeOnAuthorize','afterOnAuthorize','onCancel');this._super();this.sdkLoaded=Promise.all([this.loadPayPalSDK(),this.loadGoogleSDK()]);return this;},loadPayPalSDK:function(){if(!this.scriptParams||Object.keys(this.scriptParams).length===0){return Promise.reject(new Error(this.notEligibleErrorMessage));}\nreturn loadSdkScript(this.scriptParams,this.sdkNamespace).then(function(sdkScript){this.paypal=sdkScript;}.bind(this)).catch(function(e){this.onError(e);});},loadGoogleSDK:function(){return scriptLoader.loadCustom({url:googleSDKSrc}).catch(function(e){this.onError(e);});},initGoogleSDK:function(){return this.getGooglePayConfig().then(config=>this.getGooglePaymentsClient().isReadyToPay(this.getGoogleIsReadyToPayRequest(config.allowedPaymentMethods)).then(function(response){if(response.result){this.renderGooglePayButton();}}.bind(this))).catch(function(e){this.onError({hidden:true,error:e});}.bind(this));},getGooglePaymentsClient:function(){if(this.instance===null){this.instance=new google.payments.api.PaymentsClient({environment:this.mode,paymentDataCallbacks:{onPaymentAuthorized:this.performAuthorization}});}\nreturn this.instance;},showPopup:function(paymentData){this.getGooglePaymentDataRequest(paymentData).then((data)=>{this.getGooglePaymentsClient().loadPaymentData(data).catch(this.onCancel);}).catch((error)=>this.onError(error));},onCancel:function(){this.showLoader(false);},getGooglePaymentDataRequest:async function(transactionInfo){const paymentDataRequest=Object.assign({},baseRequest),{allowedPaymentMethods,merchantInfo}=await this.getGooglePayConfig();paymentDataRequest.allowedPaymentMethods=allowedPaymentMethods;paymentDataRequest.transactionInfo=transactionInfo;paymentDataRequest.merchantInfo=merchantInfo;paymentDataRequest.shippingAddressRequired=this.shippingAddressRequired;return paymentDataRequest;},getGooglePayConfig:async function(){if(this.allowedPaymentMethods===null||this.merchantInfo===null){const googlePayConfig=await this.paypal.Googlepay().config();this.allowedPaymentMethods=googlePayConfig.allowedPaymentMethods;this.merchantInfo=googlePayConfig.merchantInfo;}\nreturn{allowedPaymentMethods:this.allowedPaymentMethods,merchantInfo:this.merchantInfo};},getGoogleIsReadyToPayRequest:function(allowedPaymentMethods){return Object.assign({},baseRequest,{allowedPaymentMethods:allowedPaymentMethods});},renderGooglePayButton:function(){const buttonContainer=$('#'+this.buttonContainerId);let buttonProps={onClick:this.onClick,buttonColor:this.styles.button_color,buttonType:this.styles.button_type};buttonProps.buttonSizeMode='fill';if(this.styles.button_custom_height){buttonContainer.height(this.styles.button_custom_height);}\nbuttonContainer.append(this.getGooglePaymentsClient().createButton(buttonProps));this.eligible=true;},enableButton:function(){$('#'+this.buttonContainerId).find('button').prop('disabled',false);},disableButton:function(){$('#'+this.buttonContainerId).find('button').prop('disabled',true);},performAuthorization:function(paymentData){return new Promise(function(resolve){this.processPayment(paymentData).then(resolve).cat
2ch(function(){this.onError(new Error('couldn\\'t process payment'));resolve({transactionState:'ERROR'});}.bind(this));}.bind(this));},processPayment:async function(paymentData){try{const{status}=await this.paypal.Googlepay().confirmOrder({orderId:this.paypalOrderId,paymentMethodData:paymentData.paymentMethodData,shippingAddress:paymentData.shippingAddress,email:paymentData.email});if(status==='APPROVED'){this.onApprove(paymentData);return{transactionState:'SUCCESS'};}\nif(status==='PAYER_ACTION_REQUIRED'){this.paypal.Googlepay().initiatePayerAction({orderId:this.paypalOrderId}).then(async()=>{return fetch(`${this.getOrderDetailsUrl}`,{method:'GET'}).then((res)=>{return res.json();}).then((data)=>{if(data.response['is_successful']&&data.response['paypal-order']){const order=data.response['paypal-order'];let authenticationResult=order.payment_source_details.card.authentication_result;if(authenticationResult&&(authenticationResult.liability_shift==='POSSIBLE'||authenticationResult.liability_shift===\"YES\"||authenticationResult.liability_shift===undefined)){this.onApprove(paymentData);}else{this.onError(new Error('couldn\\'t approve order using 3DS'));}}}).catch((error)=>{console.log(\"ERROR: \",error)\nthis.onError(new Error('couldn\\'t approve order using 3DS'));})}).catch((error)=>{console.log(\"ERROR: \",error)\nthis.onError(new Error('couldn\\'t approve order using 3DS'));});return{transactionState:'SUCCESS'};}\nthis.onError(new Error('couldn\\'t process payment'));return{transactionState:'ERROR'};}catch(err){this.onError(err);return{transactionState:'ERROR',error:{message:err.message}};}},onClick:function(){},beforeCreateOrder:function(){},createOrder:function(){let data={'paymentSource':this.paymentSource};try{this.beforeCreateOrder();let formData=new FormData();formData.append('location',this.location);let orderData=performCreateOrder(this.createOrderUrl,data,formData,this.threeDSMode);this.paypalOrderId=this.afterCreateOrder(orderData);return this.paypalOrderId;}catch(error){return this.catchCreateOrder(error);}},afterCreateOrder:function(data){if(data.response['paypal-order']&&data.response['paypal-order']['mp_order_id']){this.paymentsOrderId=data.response['paypal-order']['mp_order_id'];this.paypalOrderId=data.response['paypal-order'].id;this.showPopup({displayItems:[],currencyCode:data.response['paypal-order']['currency_code'],totalPriceStatus:'FINAL',totalPrice:Number(data.response['paypal-order']['amount']).toString(),totalPriceLabel:$t('Total')});return this.paypalOrderId;}\nthrow new Error();},catchCreateOrder:function(){},onApprove:function(){const data={orderID:this.paypalOrderId};return this.beforeOnAuthorize().then(performOnAuthorize.bind(this,this.updateQuoteUrl,data)).then(this.afterOnAuthorize).catch(this.onError);},beforeOnAuthorize:function(){return Promise.resolve();},afterOnAuthorize:function(){return Promise.resolve();},onError:function(error){console.log('Error: ',error?.message||error);},isEligible:function(){return this.eligible;},showLoaderAsync:function(show){return new Promise(function(resolve,reject){var event=show?'processStart':'processStop';$('body').trigger(event);setTimeout(()=>{resolve();},10);});},showLoader:function(show){var event=show?'processStart':'processStop';$('body').trigger(event);},});});","Magento_PaymentServicesPaypal/js/view/payment/methods/smart-buttons.min.js":"define(['jquery','underscore','uiComponent','mage/translate','scriptLoader','Magento_Customer/js/customer-data','Magento_PaymentServicesPaypal/js/helpers/remove-paypal-url-token','Magento_PaymentServicesPaypal/js/model/app-switch-data','Magento_PaymentServicesPaypal/js/view/payment/actions/get-sdk-params'],function($,_,Component,$t,loadSdkScript,customerData,removePayPalUrlToken,appSwitchDataModel,getSdkParams){'use strict';const performCreateOrder=function(url,payPalOrderData,orderData){orderData=orderData||new FormData();orderData.append('form_key',$.mage.cookies.get('form_key'));orderData.append('payment_source',payPalOrderData['paymentSource']);return fetch(url,{method:'POST',headers:{},body:orderData||new FormData(),credentials:'same-origin'}).then(function(response){return response.json();});},performAuthorization=function(url,data){return fetch(url,{method:'POST',headers:{'X-Requested-With':'XMLHttpRequest','Content-Type':'application/json'},body:JSON.stringify({orderId:data.orderID})}).then((response)=>{if(!response.ok){throw new Error($t('We\u2019re unable to take that order right now.'));}\nreturn response.json();}).then((response)=>{const parsed=JSON.parse(response);if(!parsed.success){throw new Error($t('We\u2019re unable to take that order right now.'));}\ncustomerData.invalidate(['cart']);window.location.replace(parsed.redirectUrl);});};return Component.extend({defaults:{sdkParamsKey:'paypal',sdkParams:[],cacheTtl:30000,sdkNamespace:'paypal',paypal:null,paymentSource:'',creatOrderUrl:'',placeOrderUrl:'',authorizeOrderUrl:'',setQuoteAsInactiveUrl:'',completeOrderUrl:'',style:{},paymentRequest:{applepay:{requiredShippingContactFields:[]}},element:null,instance:null,hasReturned:false},initialize:function(){_.bindAll(this,'createOrder','onApprove','onError','onCancel','onClick');this._super();
2if(this.scriptParams?.length){this.sdkLoaded=loadSdkScript(this.scriptParams,this.sdkNamespace).then(function(sdkScript){this.paypal=sdkScript;}.bind(this));}else{const error=new Error(this.notEligibleErrorMessage);console.log('Smart Buttons SDK not available:',error.message);this.sdkLoaded=Promise.reject(error);this.sdkLoaded.catch(()=>{});}\nreturn this;},getSdkParams:function(){return getSdkParams(this.cacheTtl).then(function(sdkParams){this.sdkParams=sdkParams[this.sdkParamsKey];}.bind(this));},mapButtonColorForApplePay:function(buttonStyles){let buttonColor=buttonStyles.color;if(buttonColor==='black'||buttonColor==='white'){return buttonStyles;}\nreturn{...buttonStyles,color:'black'};},setup:function(element){let buttonsConfig;if(typeof this.paypal==='undefined'||!this.paypal.Buttons){return null;}\nif(element){this.element=element;}\nbuttonsConfig={appSwitchWhenAvailable:this.appSwitchWhenAvailable,element:this.element,paymentRequest:this.paymentRequest,style:this.styles,onClick:this.onClick,createOrder:this.createOrder,onApprove:this.onApprove,onError:this.onError,onCancel:this.onCancel,onInit:this.onInit};if(this.onShippingChange){buttonsConfig.onShippingChange=this.onShippingChange.bind(this);}\nif(this.fundingSource){buttonsConfig.fundingSource=this.fundingSource;if(this.fundingSource==='applepay'){buttonsConfig.style=this.mapButtonColorForApplePay(this.styles);}}\nthis.instance=this.paypal.Buttons(buttonsConfig);},render:function(){if(this.instance.isEligible()){if(this.instance.hasReturned()&&appSwitchDataModel.getData('pageType')===this.pageType){this.hasReturned=true;this.instance.resume();}else{$(this.element).html('');this.setup(this.element);}\nthis.instance.render(this.element);}\nreturn this.instance;},onInit:function(){},onClick:function(){appSwitchDataModel.setData('pageType',this.pageType);},beforeCreateOrder:function(){return Promise.resolve();},createOrder:function(data){this.paymentSource=data['paymentSource'];let orderData=new FormData();orderData.append('location',this.location||this.pageType);return this.beforeCreateOrder().then(performCreateOrder.bind(this,this.createOrderUrl,data,orderData)).then(function(orderData){return this.afterCreateOrder(orderData);}.bind(this)).catch(function(error){return this.catchCreateOrder(error);}.bind(this)).finally(function(error){return this.finallyCreateOrder(error);}.bind(this));},afterCreateOrder:function(data){return data.orderId;},catchCreateOrder:function(){},finallyCreateOrder:function(){},beforeOnAuthorize:function(data,actions){return Promise.resolve(data);},onApprove:function(data,actions){return this.beforeOnAuthorize(data,actions).then(performAuthorization.bind(this,this.completeOrderUrl)).catch(function(error){return this.catchOnAuthorize(error);}.bind(this)).finally(function(error){return this.finallyOnAuthorize(error);}.bind(this));},catchOnAuthorize:function(){},finallyOnAuthorize:function(){},onShippingChange:undefined,handleError:function(){removePayPalUrlToken();this.render(this.element);},onError:function(error){console.log('Error: ',error?.message||this.paymentActionError);this.handleError();},onCancel:function(error){this.onError(error);}});});","Magento_PaymentServicesPaypal/js/view/product/bundle-product-data-provider.min.js":"define(['jquery','underscore','Magento_PaymentServicesPaypal/js/view/product/product-data-provider'],function($,_,Component){'use strict';return Component.extend({defaults:{priceBoxContextSelector:'#bundleSummary',slideSelector:'#bundle-slide'},initialize:function(){this._super();$(this.slideSelector).on('click',function(){setTimeout(function(){this.updateAmount(this.getAmount());}.bind(this),300);}.bind(this));this.updateAmount(this.getAmount());return this;},isBundleProduct:function(){return!!$(this.constructor.defaults.priceBoxContextSelector).length;}});});","Magento_PaymentServicesPaypal/js/view/product/gift-card-product-data-provider.min.js":"define(['jquery','underscore','Magento_PaymentServicesPaypal/js/view/product/product-data-provider'],function($,_,Component){'use strict';return Component.extend({defaults:{priceBoxContextSelector:'.giftcard-amount',priceBoxSelector:'#giftcard-amount, #giftcard-amount-input'},initialize:function(){this._super();this.price=$(this.priceBoxSelector,this.priceBoxContextSelector).val();return this;},priceSubscribe:function(){$(this.priceBoxSelector,this.priceBoxContextSelector).on('change',function(event){this.price=event.target.value;this.updateAmount(this.getAmount());}.bind(this));},isProductGiftCard:function(){return!!$(this.constructor.defaults.priceBoxContextSelector).length;}});});","Magento_PaymentServicesPaypal/js/view/product/grouped-product-data-provider.min.js":"define(['jquery','underscore','uiClass'],function($,_,Component){'use strict';return Component.extend({defaults:{tableWrapperSelector:'.table-wrapper.grouped',qtyFieldSelector:'.input-text.qty',priceBoxSelector:'[data-role=\"priceBox\"]',priceInfo:{}},initialize:function(){this._super();$('tbody tr',this.tableWrapperSelector).each(function(index,element){var priceBox=$(this.priceBoxSelector,element),qtyElement=$(this.qtyFieldSelector,element),productId=priceBox.data('productId'),priceElement=$('#product-price-'+productId);this.priceInfo[productId]={qty:this.getQuantity(qtyElement),price:priceElement.data('priceAmount')};}.bind(this));
2this.quantitySubscribe();return this;},quantitySubscribe:function(){$(this.qtyFieldSelector).on('change',function(event){var qtyElement=$(event.target),parent=qtyElement.parents('tr'),priceBox=$(this.priceBoxSelector,parent),productId=priceBox.data('productId');if(this.priceInfo[productId]){this.priceInfo[productId].qty=this.getQuantity(qtyElement);}\nthis.updateAmount(this.getAmount());}.bind(this));},getAmount:function(){var amount=0;_.each(this.priceInfo,function(info){amount+=info.price*info.qty;});return amount;},getQuantity:function(element){var qty=parseFloat(element.val());return!isNaN(qty)&&qty?qty:0;},isProductGrouped:function(){return!!$(this.constructor.defaults.tableWrapperSelector).length;},priceSubscribe:function(){},updatePrice:function(){}});});","Magento_PaymentServicesPaypal/js/view/product/product-data-provider.min.js":"define(['jquery','uiClass','priceBox'],function($,Component){'use strict';return Component.extend({defaults:{qtyFieldSelector:'#qty',priceBoxSelector:'.price-box',priceBoxContextSelector:'.product-info-main',finalPriceSelector:'[data-price-type=\"finalPrice\"]',price:0,qty:0},initialize:function(){this._super();this.price=$(this.finalPriceSelector,this.priceBoxContextSelector).attr('data-price-amount');this.qty=$(this.qtyFieldSelector).val();this.quantitySubscribe();this.priceSubscribe();return this;},quantitySubscribe:function(){$(this.qtyFieldSelector).on('change',function(){this.qty=$(this.qtyFieldSelector).val();this.updateAmount(this.getAmount());}.bind(this));},priceSubscribe:function(){$(this.priceBoxSelector,this.priceBoxContextSelector).on('updatePrice',function(event){var prices=$(event.target).data('magePriceBox').cache.displayPrices;this.price=prices.finalPrice.amount;this.updateAmount(this.getAmount());}.bind(this));},updatePrice:function(){$(this.priceBoxSelector).trigger('updatePrice');},getAmount:function(){return this.qty*this.price;}});});","Magento_ReCaptchaFrontendUi/js/nonInlineReCaptchaRenderer.min.js":"define(['jquery','jquery/z-index'],function($){'use strict';var reCaptchaEntities=[],initialized=false,rendererRecaptchaId='recaptcha-invisible',rendererReCaptcha=null;return{add:function(reCaptchaEntity,parameters){if(!initialized){this.init();grecaptcha.render(rendererRecaptchaId,parameters);setInterval(this.resolveVisibility,100);initialized=true;}\nreCaptchaEntities.push(reCaptchaEntity);},resolveVisibility:function(){reCaptchaEntities.some(function(entity){return entity.is(':visible')&&(entity.closest('[data-role=\\'modal\\']').length===0||entity.zIndex()>900);})?rendererReCaptcha.show():rendererReCaptcha.hide();},init:function(){rendererReCaptcha=$('<div/>',{'id':rendererRecaptchaId});rendererReCaptcha.hide();$('body').append(rendererReCaptcha);}};});","Magento_ReCaptchaFrontendUi/js/reCaptcha.min.js":"define(['uiComponent','jquery','ko','underscore','Magento_ReCaptchaFrontendUi/js/registry','Magento_ReCaptchaFrontendUi/js/reCaptchaScriptLoader','Magento_ReCaptchaFrontendUi/js/nonInlineReCaptchaRenderer'],function(Component,$,ko,_,registry,reCaptchaLoader,nonInlineReCaptchaRenderer){'use strict';return Component.extend({defaults:{template:'Magento_ReCaptchaFrontendUi/reCaptcha',reCaptchaId:'recaptcha'},initialize:function(){this._super();this._loadApi();},_loadApi:function(){if(this._isApiRegistered!==undefined){if(this._isApiRegistered===true){$(window).trigger('recaptchaapiready');}\nreturn;}\nthis._isApiRegistered=false;window.globalOnRecaptchaOnLoadCallback=function(){this._isApiRegistered=true;$(window).trigger('recaptchaapiready');}.bind(this);reCaptchaLoader.addReCaptchaScriptTag();},getIsInvisibleRecaptcha:function(){if(this.settings===void 0){return false;}\nreturn this.settings.invisible;},reCaptchaCallback:function(token){var submitButton;if(this.getIsInvisibleRecaptcha()){this.tokenField.value=token;submitButton=this.$parentForm.find('button:not([type]), [type=submit]');if(submitButton.length){submitButton.attr('disabled',false);}\nthis.$parentForm.submit();}},initCaptcha:function(){var $parentForm,$wrapper,$reCaptcha,widgetId,parameters;if(this.captchaInitialized||this.settings===void 0){return;}\nthis.captchaInitialized=true;$wrapper=$('#'+this.getReCaptchaId()+'-wrapper');$reCaptcha=$wrapper.find('.g-recaptcha');$reCaptcha.attr('id',this.getReCaptchaId());$parentForm=$wrapper.parents('form');if(this.settings===undefined){return;}\nparameters=_.extend({'callback':function(token){this.reCaptchaCallback(token);this.validateReCaptcha(true);}.bind(this),'expired-callback':function(){this.validateReCaptcha(false);}.bind(this)},this.settings.rendering);if(parameters.size==='invisible'&¶meters.badge!=='inline'){nonInlineReCaptchaRenderer.add($reCaptcha,parameters);}\nwidgetId=grecaptcha.render(this.getReCaptchaId(),parameters);this.initParentForm($parentForm,widgetId);registry.ids.push(this.getReCaptchaId());registry.captchaList.push(widgetId);registry.tokenFields.push(this.tokenField);},initParentForm:function(parentForm,widgetId){var listeners;
2if(this.getIsInvisibleRecaptcha()&&parentForm.length>0){parentForm.submit(function(event){var submitButton;if(!this.tokenField.value){submitButton=this.$parentForm.find('button:not([type]), [type=submit]');if(submitButton.length){submitButton.attr('disabled',true);}\ngrecaptcha.execute(widgetId);event.preventDefault(event);event.stopImmediatePropagation();}}.bind(this));listeners=$._data(parentForm[0],'events').submit;listeners.unshift(listeners.pop());this.tokenField=$('<input type=\"text\" name=\"token\" style=\"display: none\" />')[0];this.$parentForm=parentForm;parentForm.append(this.tokenField);}else{this.tokenField=null;}\nlet submitButton=parentForm.find('button:not([type]), [type=submit]');if(submitButton.length){submitButton.prop('disabled',false);}},validateReCaptcha:function(state){if(!this.getIsInvisibleRecaptcha()){return $(document).find('input[type=checkbox].required-captcha').prop('checked',state);}},renderReCaptcha:function(){if(window.grecaptcha&&window.grecaptcha.render){this.initCaptcha();}else{$(window).on('recaptchaapiready',function(){this.initCaptcha();}.bind(this));}},getReCaptchaId:function(){return this.reCaptchaId;}});});","Magento_ReCaptchaFrontendUi/js/reCaptchaScriptLoader.min.js":"define([],function(){'use strict';var scriptTagAdded=false;return{addReCaptchaScriptTag:function(){var element,scriptTag;if(!scriptTagAdded){element=document.createElement('script');scriptTag=document.getElementsByTagName('script')[0];element.async=true;element.src='https://www.google.com/recaptcha/api.js'+'?onload=globalOnRecaptchaOnLoadCallback&render=explicit';scriptTag.parentNode.insertBefore(element,scriptTag);scriptTagAdded=true;}}};});","Magento_ReCaptchaFrontendUi/js/registry.min.js":"define(['ko'],function(ko){'use strict';return{ids:ko.observableArray([]),captchaList:ko.observableArray([]),tokenFields:ko.observableArray([])};});","Magento_ReCaptchaFrontendUi/js/ui-messages-mixin.min.js":"define(['Magento_ReCaptchaFrontendUi/js/registry'],function(registry){'use strict';return function(originalComponent){return originalComponent.extend({initialize:function(){this._super();this.messageContainer.errorMessages.subscribe(function(){var\ni,captchaList=registry.captchaList(),tokenFieldsList=registry.tokenFields();for(i=0;i<captchaList.length;i++){grecaptcha.reset(captchaList[i]);if(tokenFieldsList[i]){tokenFieldsList[i].value='';}}},null,'arrayChange');return this;}});};});","Magento_ProductAlert/js/form-submitter.min.js":"define(['jquery'],function($){'use strict';return function(data,element){$(element).trigger('submit');};});","Magento_GiftCard/product-mixin.min.js":"define(['jquery'],function($){'use strict';return function(Component){return Component.extend({defaults:{productGiftAmountSelector:'#giftcard-amount',productGiftAmountInput:'#giftcard-amount-input'},initialize:function(){this._super();$(this.productGiftAmountSelector).on('change',this._onGiftPriceChange.bind(this));$(this.productGiftAmountInput).on('change',this._onGiftPriceChange.bind(this));},_onGiftPriceChange:function(event){this.price=$(event.target).val();this._updateAmount();}});};});","Magento_Cookie/js/notices.min.js":"","Magento_Cookie/js/require-cookie.min.js":"define(['jquery','Magento_Ui/js/modal/alert','jquery-ui-modules/widget','mage/mage','mage/translate'],function($,alert){'use strict';$.widget('mage.requireCookie',{options:{event:'click',noCookieUrl:'enable-cookies',triggers:['.action.login','.action.submit'],isRedirectCmsPage:true},_create:function(){this._bind();},_bind:function(){var events={};$.each(this.options.triggers,function(index,value){events['click '+value]='_checkCookie';});this._on(events);},_checkCookie:function(event){if(navigator.cookieEnabled){return;}\nevent.preventDefault();if(this.options.isRedirectCmsPage){window.location=this.options.noCookieUrl;}else{alert({content:$.mage.__('Cookies are disabled in your browser.')});}}});return $.mage.requireCookie;});","Magento_ReCaptchaWebapiUi/js/jquery-mixin.min.js":"define(['mage/utils/wrapper'],function(wrapper){'use strict';return function(jQuery){jQuery.ajax=wrapper.wrapSuper(jQuery.ajax,function(){var settings,payload;if(arguments.length!==0){settings=arguments.length===1?arguments[0]:arguments[1];}\nif(settings&&settings.hasOwnProperty('data')){try{payload=JSON.parse(settings.data);}catch(e){}}\nif(payload&&payload.hasOwnProperty('xReCaptchaValue')){if(!settings.hasOwnProperty('headers')){settings.headers={};}\nsettings.headers['X-ReCaptcha']=payload.xReCaptchaValue;delete payload['xReCaptchaValue'];settings.data=JSON.stringify(payload);}\nreturn this._super.apply(this,arguments);});return jQuery;};});","Magento_ReCaptchaWebapiUi/js/webapiReCaptcha.min.js":"define(['Magento_ReCaptchaFrontendUi/js/reCaptcha','Magento_ReCaptchaWebapiUi/js/webapiReCaptchaRegistry'],function(Component,registry){'use strict';return Component.extend({defaults:{autoTrigger:false},reCaptchaCallback:function(token){registry.tokens[this.getReCaptchaId()]=token;if(typeof registry._listeners[this.getReCaptchaId()]!=='undefined'){registry._listeners[this.getReCaptchaId()](token);}},initParentForm:function(parentForm,widgetId){var self=this,trigger;trigger=function(){self.reCaptchaCallback(grecaptcha.getResponse(widgetId));};registry._isInvisibleType[this.getReCaptchaId()]=false;
2if(this.getIsInvisibleRecaptcha()){trigger=function(){grecaptcha.execute(widgetId);};registry._isInvisibleType[this.getReCaptchaId()]=true;}\nif(this.autoTrigger){trigger();registry.triggers[this.getReCaptchaId()]=new Function();}else{registry.triggers[this.getReCaptchaId()]=trigger;}\nthis.tokenField=null;}});});","Magento_ReCaptchaWebapiUi/js/webapiReCaptchaRegistry.min.js":"define([],function(){'use strict';return{tokens:{},triggers:{},_listeners:{},_isInvisibleType:{},addListener:function(id,func){if(this.tokens.hasOwnProperty(id)){func(this.tokens[id]);}else{this._listeners[id]=func;}},removeListener:function(id){this._listeners[id]=undefined;}};});","Magento_GoogleAnalytics/js/google-analytics.min.js":"define(['jquery','mage/cookies'],function($){'use strict';return function(config){var allowServices=false,allowedCookies,allowedWebsites;if(config.isCookieRestrictionModeEnabled){allowedCookies=$.mage.cookies.get(config.cookieName);if(allowedCookies!==null){allowedWebsites=JSON.parse(allowedCookies);if(allowedWebsites[config.currentWebsite]===1){allowServices=true;}}else{allowServices=true;}}else{allowServices=true;}\nif(allowServices){(function(i,s,o,g,r,a,m){i.GoogleAnalyticsObject=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create',config.pageTrackingData.accountId,'auto');if(config.pageTrackingData.isAnonymizedIpActive){ga('set','anonymizeIp',true);}\nga('send','pageview'+config.pageTrackingData.optPageUrl);if(config.ordersTrackingData){ga('require','ec','ec.js');ga('set','currencyCode',config.ordersTrackingData.currency);if(config.ordersTrackingData.products){$.each(config.ordersTrackingData.products,function(index,value){ga('ec:addProduct',value);});}\nif(config.ordersTrackingData.orders){$.each(config.ordersTrackingData.orders,function(index,value){ga('ec:setAction','purchase',value);});}\nga('send','pageview');}}}});","Magento_ReCaptchaCheckout/js/reCaptchaCheckout.min.js":"define(['Magento_ReCaptchaWebapiUi/js/webapiReCaptcha','jquery'],function(Component,$){'use strict';var reCaptchaIds=new WeakMap(),uuid=0;return Component.extend({defaults:{template:'Magento_ReCaptchaCheckout/reCaptcha',skipPayments:[]},renderReCaptchaFor:function(method){var reCaptcha;if(this.isCheckoutReCaptchaRequiredFor(method)){reCaptcha=$.extend(true,{},this,{reCaptchaId:this.getReCaptchaIdFor(method)});reCaptcha.renderReCaptcha();}},getReCaptchaIdFor:function(method){if(!reCaptchaIds.has(method)){reCaptchaIds.set(method,this.getReCaptchaId()+'-'+uuid++);}\nreturn reCaptchaIds.get(method);},isCheckoutReCaptchaRequiredFor:function(method){return!this.skipPayments||!this.skipPayments.hasOwnProperty(method.getCode());},initCaptcha:function(){var $wrapper,$recaptchaResponseInput;this._super();$wrapper=$('#'+this.getReCaptchaId()+'-wrapper');$recaptchaResponseInput=$wrapper.find('[name=g-recaptcha-response]');if($recaptchaResponseInput.length){$recaptchaResponseInput.prop('disabled',true);}}});});","Magento_ReCaptchaCheckout/js/webapiReCaptchaRegistry-mixin.min.js":"define([],function(){'use strict';return function(originalFunction){originalFunction.addListener=function(id,func){this._listeners[id]=func;};return originalFunction;};});","Magento_ReCaptchaCheckout/js/model/place-order-mixin.min.js":"define(['jquery','mage/utils/wrapper','Magento_ReCaptchaWebapiUi/js/webapiReCaptchaRegistry'],function($,wrapper,recaptchaRegistry){'use strict';return function(placeOrder){return wrapper.wrap(placeOrder,function(originalAction,serviceUrl,payload,messageContainer){var recaptchaDeferred,reCaptchaId,$activeReCaptcha;$activeReCaptcha=$('.recaptcha-checkout-place-order:visible .g-recaptcha');if($activeReCaptcha.length>0){reCaptchaId=$activeReCaptcha.last().attr('id');}\nif(reCaptchaId!==undefined&&recaptchaRegistry.triggers.hasOwnProperty(reCaptchaId)){recaptchaDeferred=$.Deferred();recaptchaRegistry.addListener(reCaptchaId,function(token){payload.xReCaptchaValue=token;originalAction(serviceUrl,payload,messageContainer).done(function(){recaptchaDeferred.resolve.apply(recaptchaDeferred,arguments);}).fail(function(){recaptchaDeferred.reject.apply(recaptchaDeferred,arguments);});});recaptchaRegistry.triggers[reCaptchaId]();if(!recaptchaRegistry._isInvisibleType.hasOwnProperty(reCaptchaId)||recaptchaRegistry._isInvisibleType[reCaptchaId]===false){recaptchaRegistry.removeListener(reCaptchaId);}\nreturn recaptchaDeferred;}\nreturn originalAction(serviceUrl,payload,messageContainer);});};});","Magento_Swatches/js/catalog-add-to-cart.min.js":"require(['jquery'],function($){'use strict';$('body').on('catalogCategoryAddToCartRedirect',function(event,data){$(data.form).find('[name*=\"super\"]').each(function(index,item){var $item=$(item),attr;if($item.attr('data-attr-name')){attr=$item.attr('data-attr-name');}else{attr=$item.parent().attr('attribute-code');}\ndata.redirectParameters.push(attr+'='+$item.val());});});});","Magento_Swatches/js/configurable-customer-data.min.js":"require(['jquery','Magento_ConfigurableProduct/js/options-updater'],function($,Updater){'use strict';var selectors={formSelector:'#product_addtocart_form',swatchSelector:'.swatch-opt'},swatchWidgetName='mage-SwatchRenderer',widgetInitEvent='swatch.initialized',updateSwatchOptions=function(){var swatchWidget=$(selectors.swatchSelector).data(swatchWidgetName);if(!swatchWidget||!swatchWidget._EmulateSelectedByAttributeId){return;}\nswatchWidget._EmulateSelectedByAttributeId(this.productOptions);}
2,updater=new Updater(widgetInitEvent,updateSwatchOptions);updater.listen();});","Magento_Persistent/js/remember-me-config.min.js":"define(['ko','uiComponent'],function(ko,Component){'use strict';return Component.extend({dataScope:'global',config:{},initialize:function(){this._super();window.rememberMeConfig=this.config;}});});","Magento_Persistent/js/view/customer-data-mixin.min.js":"define(['jquery','mage/utils/wrapper'],function($,wrapper){'use strict';var mixin={getExpiredSectionNames:function(originFn){var expiredSections=originFn(),storage=$.initNamespaceStorage('mage-cache-storage').localStorage,currentTimestamp=Math.floor(Date.now()/ 1000),persistentIndex=expiredSections.indexOf('persistent'),persistentLifeTime=0,sectionData;if(window.persistent!==undefined&&window.persistent.expirationLifetime!==undefined){persistentLifeTime=window.persistent.expirationLifetime;}\nif(persistentIndex!==-1){sectionData=storage.get('persistent');if(typeof sectionData==='object'&§ionData['data_id']+persistentLifeTime>=currentTimestamp){expiredSections.splice(persistentIndex,1);}}\nreturn expiredSections;},'Magento_Customer/js/customer-data':function(originFn){let mageCacheTimeout=new Date($.localStorage.get('mage-cache-timeout')),mageCacheSessId=$.cookieStorage.isSet('mage-cache-sessid');originFn();if(window.persistent!==undefined&&(mageCacheTimeout<new Date()||!mageCacheSessId)){this.reload(['persistent','cart'],true);}}};return function(target){return wrapper.extend(target,mixin);};});","Magento_Persistent/js/view/remember-me-default.min.js":"define(['ko','uiComponent','Magento_Customer/js/customer-data'],function(ko,Component,customerData){'use strict';return Component.extend({defaults:{template:'Magento_Persistent/remember-me'},dataScope:'global',isRememberMeCheckboxVisible:ko.observable(false),isRememberMeCheckboxChecked:ko.observable(false),initialize:function(){this._super();this.showElement();},showElement:function(){let cart=customerData.get('cart'),persistenceConfig=window.rememberMeConfig.persistenceConfig;if(cart().isGuestCheckoutAllowed!==false){persistenceConfig.isRememberMeCheckboxVisible=false;}else{cart.subscribe(function(cartData){if(cartData.isGuestCheckoutAllowed!==false){persistenceConfig.isRememberMeCheckboxVisible=false;}},this);}\nthis.isRememberMeCheckboxChecked=ko.observable(persistenceConfig.isRememberMeCheckboxChecked);this.isRememberMeCheckboxVisible=ko.observable(persistenceConfig.isRememberMeCheckboxVisible);}});});","Magento_AdminUiSdkCustomFees/js/view/summary/custom-fees.min.js":"define(['Magento_Checkout/js/view/summary/abstract-total','Magento_Checkout/js/model/quote'],function(Component,quote){'use strict';return Component.extend({defaults:{template:'Magento_AdminUiSdkCustomFees/checkout/cart/totals/custom-fees'},getCustomFees:function(){let customFees=[]\nconst self=this\nquote.totals._latestValue.total_segments.forEach(function(fee){if(fee.code.startsWith('adminuisdk_')){const feeComponent={getTitle:function(){return fee.title},getAmount:function(){return self.getFormattedPrice(fee.value)}};customFees.push(feeComponent);}})\nreturn customFees}})})","Magento_InventoryConfigurableProductFrontendUi/js/configurable-variation-qty.min.js":"define(['jquery','underscore','mage/url'],function($,_,urlBuilder){'use strict';return function(productSku,salesChannel,salesChannelCode){var selectorInfoStockSkuQty='.availability.only',selectorInfoStockSkuQtyValue='.availability.only > strong',productQtyInfoBlock=$(selectorInfoStockSkuQty),productQtyInfo=$(selectorInfoStockSkuQtyValue);if(!_.isUndefined(productSku)&&productSku!==null){$.ajax({url:urlBuilder.build('inventory_catalog/product/getQty/'),dataType:'json',data:{'sku':productSku,'channel':salesChannel,'salesChannelCode':salesChannelCode}}).done(function(response){if(response.qty!==null&&response.qty>0){productQtyInfo.text(response.qty);productQtyInfoBlock.show();}else{productQtyInfoBlock.hide();}}).fail(function(){productQtyInfoBlock.hide();});}else{productQtyInfoBlock.hide();}};});","Magento_InventoryConfigurableProductFrontendUi/js/configurable.min.js":"define(['jquery','configurableVariationQty','jquery-ui-modules/widget'],function($,configurableVariationQty){'use strict';return function(configurable){$.widget('mage.configurable',configurable,{_configureElement:function(element){var salesChannel=this.options.spConfig.channel,salesChannelCode=this.options.spConfig.salesChannelCode,productVariationsSku=this.options.spConfig.sku;this._super(element);configurableVariationQty(productVariationsSku[this.simpleProduct],salesChannel,salesChannelCode);}});return $.mage.configurable;};});","Magento_InventorySwatchesFrontendUi/js/swatch-renderer.min.js":"define(['jquery','configurableVariationQty','jquery-ui-modules/widget'],function($,configurableVariationQty){'use strict';return function(SwatchRenderer){$.widget('mage.SwatchRenderer',SwatchRenderer,{_O
2nClick:function($this,widget,e){var salesChannel=this.options.jsonConfig.channel,salesChannelCode=this.options.jsonConfig.salesChannelCode,productVariationsSku=this.options.jsonConfig.sku;this._super($this,widget,e);}});return $.mage.SwatchRenderer;};});","Magento_ReCaptchaStorePickup/js/reCaptchaStorePickup.min.js":"define(['Magento_ReCaptchaFrontendUi/js/reCaptcha'],function(reCaptcha){'use strict';return reCaptcha.extend({renderReCaptcha:function(){this.captchaInitialized=false;this._super();}});});","Magento_Translation/js/add-class.min.js":"define(['jquery'],function($){'use strict';return function(config,element){$(element).addClass(config.class);};});","Klarna_Interoperability/js/storage.min.js":"define(['mage/storage'],function(storage){'use strict';return{save:async function(interoperabilityToken){var params={'interoperability_token':interoperabilityToken};storage.post(BASE_URL+'interoperability/klarna/save',JSON.stringify(params),false,'application/json').done(function(){});}};});","Klarna_Kec/js/mini-cart-kec-button.min.js":"define(['uiComponent','ko','jquery','mage/url','Magento_Customer/js/customer-data'],function(Component,ko,$,urlBuilder,customerData){'use strict';return Component.extend({defaults:{template:'Klarna_Kec/mini-cart-button'},wrapper:ko.observable(''),kecConfiguration:ko.observable(false),initialize:async function(){try{this._super();var self=this,cartItems=0,cartDataItems=customerData.get('cart')()?.items;if(cartDataItems&&cartDataItems.length>0){await self.fetchAndAssembleButton();}\ncustomerData.get('cart').subscribe(async function(cart){if(cart?.items){cartItems=cart.items.length;if(cartItems>0){await self.fetchAndAssembleButton();}\nif(cartItems===0){self.clearKecConfigurationAndWrapper();}}});}catch(error){self.clearKecConfigurationAndWrapper();}},fetchAndAssembleButton:async function(){if(this.kecConfiguration()){return;}\ntry{await this.fetchButtonConfigurations();if(this.kecConfiguration()){window.checkoutConfig=window.checkoutConfig||{};window.checkoutConfig.quoteData=window.checkoutConfig.quoteData||{};this.assembleKecWrapper();}}catch(error){this.clearKecConfigurationAndWrapper();}},clearKecConfigurationAndWrapper:function(){this.kecConfiguration(false);this.wrapper('');},fetchButtonConfigurations:async function(){let params=new URLSearchParams({use_existing_quote:1});return $.ajax({url:urlBuilder.build(`kec/klarna/getKecConfig?${params.toString()}`),type:'get',dataType:'json',cache:false,headers:{'X-Requested-With':'XMLHttpRequest'},success:(result)=>result,error:()=>false}).done((result)=>{if(result&&result?.isShowable){this.kecConfiguration(result);}});},assembleKecWrapper:function(){let wrapper=document.createElement('div'),kecContainer=document.createElement('div'),scriptElement=document.createElement('script');wrapper.classList.add('primary');kecContainer.id='kec-mini-cart-button-wrapper';kecContainer.style='width: 100%;';wrapper.appendChild(kecContainer);scriptElement.type='text/javascript';scriptElement.setAttribute('async','');if(this.kecConfiguration()['isPspMerchant']){scriptElement.type='module';scriptElement.textContent=`\nconst { KlarnaSDK } = await import('https://js.klarna.com/web-sdk/v2/klarna.mjs');\n\nconst klarnaMiniCart = await KlarnaSDK({ \n clientId: '${this.kecConfiguration()['clientId']}',\n locale: '${this.kecConfiguration()['locale']}',\n products: [\"PAYMENT\"],\n});\nwindow.KlarnaV2MiniCart= klarnaMiniCart;\n\nrequire(['KlarnaKecOneStepInit'], function (kecOneStepInitializer) {\nvar initInstance = new kecOneStepInitializer();\n\n initInstance.setInitiationMode('DEVICE_BEST');\n initInstance.setIntents([\"PAY\"]);\n initInstance.setKecButtonId('kec-mini-cart-button');\n initInstance.setKecContainerId('kec-mini-cart-button-wrapper');\n initInstance.setUseExistingQuoteFlag('1');\n initInstance.setTheme('${this.kecConfiguration()['theme']}');\n initInstance.setShape('${this.kecConfiguration()['shape']}');\n initInstance.setLocale('${this.kecConfiguration()['locale']}');\n initInstance.setWindowObjectName('KlarnaV2MiniCart');\n\n initInstance.initializePaymentInstance();\n });\n`;}else{scriptElement.textContent=`\n window.klarnaAsyncCallback = function () {\n window.Klarna.Payments.Buttons.init({\n client_id: '${this.kecConfiguration()['clientId']}',\n }).load(\n {\n container: '#${kecContainer.id}',\n theme: '${this.kecConfiguration()['theme']}',\n shape: '${this.kecConfiguration()['shape']}',\n locale: '${this.kecConfiguration()['locale']}',\n on_click: (authorize) => {\n require(['jquery', 'mage/url'], function ($, urlBuilder) {\n var form = new FormData();\n form.set('additional_input', JSON.stringify({\n use_existing_quote: 1,\n auth_callback_token: '${this.kecConfiguration()['authCallbackToken']}',\n })\n );\n $.ajax({\n url: urlBuilder.build(\"checkout/klarna/getPayLoad\"),\n data: form,\n type: 'post',\n dataType: 'json',\n cache: false,\n contentType: false,\n processData: false,\n success: function (result) {\n authorize(\n {\n collect_shipping_address: true,\n auto_finalize: false\n },\n result,\n (klarnaResult) => {\n require(['Klarna_Kec/js/action/workflow'], function (kec_workflow) {\n kec_workflow(klarnaResult, form);\n });\n });\n }\n });\n });\n }\n }\n )\n }();`;}\nwrapper.appendChild(scriptElement);this.wrapper(wrapper.outerHTML);}});});","Klarna_Kec/js/action/workflow.min.js":"define(['mage/storage','Magento_Customer/js/customer-data','jquery','mage/url','mage/translate'],function(storage,customerData,$,urlBuilder,$t){'use strict';return function execute(klarnaResult,parameter){if(!klarnaResult.approved){return;}\n$('body').trigger('processStart');if(klarnaResult.approved){customerData.invalidate(['checkout-data']);parameter.set('client_token',klarnaResult.client_token);parameter.set('session_id',klarnaResult.session_id);parameter.set('addresses',JSON.stringify({'shipping_address':klarnaResult.collected_shipping_address}));$.ajax({url:urlBuilder.build('kec/klarna/updateQuoteAddress'),data:parameter,type:'post',dataType:'json',cache:false,contentType:false,processData:false,success:function(data){$('body').trigger('processStop');if(data.status!==200){customerData.set('messages',{messages:[{type:'error',text:$t('Error when updating the address of the customer.')}]});}else{customerData.reload(['cart'],true);customerData.reload(['checkout-data'],true);storage=JSON.parse(localStorage.getItem('mage-cache-storage'));if(!storage.hasOwnProperty('checkout-data')){storage['checkout-data']={};}\nstorage['checkout-data'].selectedPaymentMethod=data.method;localStorage.setItem('mage-cache-storage',JSON.stringify(storage));window.location.href=data.url;}}});}};});","Klarna_Kec/js/action/one_step/events.min.js":"define(['mage/storage','mage/url','Magento_Checkout/js/model/quote','uiComponent','jquery','Magento_Customer/js/customer-data'],function(storage,urlBuilder,magentoQuote,Component,$,customerData){'use strict';return Component.extend({paymentInstance:null,register:function(klarnaPaymentInstance){this.paymentInstance=klarnaPaymentInstance;this.paymentInstance.on('shippingaddresschange',async(paymentRequest,shippingAddress)=>{var formData=new FormData(),updateShippingAddressResponse=null;formData.set('shipping_address',shippingAddress);updateShippingAddressResponse=await $.ajax({url:urlBuilder.build('kec/klarna_onestep/updateshippingaddress'),data:formData,t
2ype:'post',dataType:'json',cache:false,success:function(response){return response;}});return{amount:updateShippingAddressResponse.amount,lineItems:updateShippingAddressResponse.lineItems,selectedShippingOptionReference:updateShippingAddressResponse.selectedShippingOptionReference,shippingOptions:updateShippingAddressResponse.shippingOptions};});this.paymentInstance.on('shippingoptionselect',async(paymentRequest,shippingOption)=>{const formData=new FormData();formData.set('shipping_option_reference',shippingOption?.shippingOptionReference);const updateSelectedShippingOptionResponse=await $.ajax({url:urlBuilder.build('kec/klarna_onestep/updateselectedshippingoption'),data:formData,type:'post',dataType:'json',cache:false,contentType:false,processData:false,success:function(response){return response;}});return{amount:updateSelectedShippingOptionResponse.amount,lineItems:updateSelectedShippingOptionResponse.lineItems};});this.paymentInstance.on('complete',async(paymentRequest)=>{const intervalId=setInterval(()=>{$.ajax({url:urlBuilder.build('kec/klarna_onestep/checkorderstatus'),type:'post',dataType:'json',cache:false,contentType:false,processData:false,success:function(response){if(response['status']!==200){return;}\nconst clearData={'selectedShippingAddress':null,'shippingAddressFromData':null,'newCustomerShippingAddress':null,'selectedShippingRate':null,'selectedPaymentMethod':null,'selectedBillingAddress':null,'billingAddressFromData':null,'newCustomerBillingAddress':null},sections=['cart'];customerData.set('checkout-data',clearData);customerData.invalidate(sections);customerData.reload(sections,true);window.location.href=urlBuilder.build('checkout/onepage/success');}});},2500);setTimeout(()=>{clearInterval(intervalId);},10000);});this.paymentInstance.on('abort',async(paymentRequest)=>{if(paymentRequest?.state==='SUBMITTED'){this.paymentInstance.cancel(paymentRequest?.paymentRequestId);}});this.paymentInstance.on('error',async(error,paymentRequest)=>{this.paymentInstance.cancel(paymentRequest?.paymentRequestId);});}});});","Klarna_Kec/js/action/one_step/initialization.min.js":"define(['mage/storage','mage/url','Magento_Checkout/js/model/quote','jquery','uiComponent','KlarnaKecOneStepEvents'],function(storage,urlBuilder,magentoQuote,$,Component,KlarnaKecOneStepEvents){'use strict';return Component.extend({klarnaPayment:null,windowObjectName:null,initiationMode:null,intents:null,kecButtonId:null,kecContainerId:null,useExistingQuoteFlag:null,theme:null,shape:null,locale:null,setWindowObjectName:function(name){this.windowObjectName=name;},setInitiationMode:function(mode){this.initiationMode=mode;},setIntents:function(intentsArray){this.intents=intentsArray;},setKecButtonId:function(buttonId){this.kecButtonId=buttonId;},setKecContainerId:function(containerId){this.kecContainerId=containerId;},setUseExistingQuoteFlag:function(flag){this.useExistingQuoteFlag=flag;},setTheme:function(themeName){this.theme=themeName;},setShape:function(shapeName){this.shape=shapeName;},setLocale:function(localeName){this.locale=localeName;},getKlarnaPaymentInstance:function(){return this.klarnaPayment;},initializePaymentInstance:function(){const tenSeconds=10000,intervalFrequency=100,interval=setInterval(()=>{if(window[this.windowObjectName]?.Payment){this.klarnaPayment=window[this.windowObjectName].Payment;clearInterval(interval);this.mountKlarnaPaymentButton();}},intervalFrequency);setTimeout(()=>{clearInterval(interval);},tenSeconds);},mountKlarnaPaymentButton:async function(){var instance=null;this.klarnaPayment.button({theme:this.theme,shape:this.shape,locale:this.locale,intents:this.intents,initiationMode:this.initiationMode,id:this.kecButtonId,initiate:async()=>{const res=await $.ajax({url:urlBuilder.build('kec/klarna_onestep/createPaymentRequest'),data:this.getFormDataForPaymentRequest(),type:'post',dataType:'json',cache:false,contentType:false,processData:false,success:function(response){return response;}});return{paymentRequestId:res?.paymentRequestId};}}).mount('#'+this.kecContainerId);$('#'+this.kecContainerId).contents().unwrap();instance=new KlarnaKecOneStepEvents();instance.register(this.klarnaPayment);},getFormDataForPaymentRequest:function(){var idContent=null,elements=null,form=null;const additional_input={'use_existing_quote':this.useExistingQuoteFlag};
2if(this.useExistingQuoteFlag==='0'){idContent=$('#product_addtocart_form');elements=idContent[0];form=new FormData(elements);form.set('additional_input',JSON.stringify(additional_input));}else{if(!magentoQuote.isVirtual()){if(magentoQuote.shippingMethod()!==null){additional_input['shipping_method']=magentoQuote.shippingMethod()?.method_code;additional_input['shipping_carrier_code']=magentoQuote.shippingMethod()?.carrier_code;}\nadditional_input['country_id']=magentoQuote.shippingAddress()?.countryId;}\nform=new FormData();form.set('additional_input',JSON.stringify(additional_input));}\nreturn form;}});});","Klarna_Onsitemessaging/js/cart-update.min.js":"define(['jquery','Magento_Checkout/js/model/totals'],function($,totalsService){'use strict';totalsService.totals.subscribe(function(){if(document.querySelector('#klarna-osm-placement-cart')){var grandTotal=totalsService.getSegment('grand_total').value,price=Math.round(grandTotal*100);$('[data-key^=\"credit-promotion-\"]').each(function(){this.dataset.purchaseAmount=price;});}});});","Klarna_Onsitemessaging/js/pricebox-widget-mixin.min.js":"define(['jquery'],function($){'use strict';var priceBoxWidget={updatePrice:function(newPrices){var ret=this._super(newPrices);if(document.querySelector('#klarna-osm-placement-product')){var price=Math.round(this.cache.displayPrices.finalPrice.amount*100);$('[data-key^=\"credit-promotion-\"]').each(function(){this.dataset.purchaseAmount=price;});}\nreturn ret;}};return function(targetWidget){$.widget('mage.priceBox',targetWidget,priceBoxWidget);return $.mage.priceBox;};});","Magento_GoogleTagManager/js/google-analytics-universal-cart.min.js":"define(['jquery','Magento_Customer/js/customer-data','underscore'],function($,customerData,_){'use strict';function getCookie(name){var cookie=' '+document.cookie,search=' '+name+'=',setStr=null,offset=0,end=0;if(cookie.length>0){offset=cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=cookie.indexOf(';',offset);if(end==-1){end=cookie.length;}\nsetStr=decodeURI(cookie.substring(offset,end));}}\nreturn setStr;}\nfunction delCookie(name){var date=new Date(0);document.cookie=name+'='+'; path=/; expires='+date.toUTCString();}\nfunction GoogleAnalyticsUniversalCart(config){this.dlCurrencyCode=config.dlCurrencyCode;this.dataLayer=config.dataLayer;this.cookieAddToCart=config.cookieAddToCart;this.advancedAddToCart=config.advancedAddToCart;this.cookieRemoveFromCart=config.cookieRemoveFromCart;this.productQtys=[];this.origProducts={};this.productWithChanges=[];this.addedProducts=[];this.removedProducts=[];this.googleAnalyticsUniversalData={};}\nGoogleAnalyticsUniversalCart.prototype={listenMinicartReload:function(){var context=this;if(!_.isUndefined(window.Minicart)&&typeof Minicart.prototype.initAfterEvents){Minicart.prototype.initAfterEvents['GoogleAnalyticsUniversalCart:subscribeProductsUpdateInCart']=function(){context.subscribeProductsUpdateInCart();context.parseAddToCartCookies();context.parseAddToCartAdvanced();context.parseRemoveFromCartCookies();};Minicart.prototype.removeItemAfterEvents['GoogleAnalyticsUniversalCart:subscribeProductsRemoveFromCart']=function(){context.parseRemoveFromCartCookies();};}},subscribeProductsUpdateInCart:function(){var context=this;$(document).on('mousedown','[data-cart-item-update]',function(){context.collectCustomerProducts();}).on('mousedown','.update-cart-item',function(){context.collectCustomerProducts();}).on('mousedown','[data-multiship-item-update]',function(){context.collectOriginalProducts();context.collectMultiCartQtys();}).on('mousedown','[data-multiship-item-remove]',function(){context.collectOriginalProducts();context.collectMultiCartQtys();context.updateMulticartCartObserver();}).on('mousedown','[data-cart-empty]',function(){context.emptyCartObserver();}).on('ajax:updateCartItemQty',function(){context.updateCartObserver();}).on('ajax:updateMulticartItemQty',function(){context.updateMulticartCartObserver();});},emptyCartObserver:function(){var product,i;this.collectOriginalProducts();for(i in this.origProducts){if(i!='length'&&this.origProducts.hasOwnProperty(i)){product=$.extend({},this.origProducts[i]);this.removedProducts.push(product);}}\nthis.cartItemRemoved();},updateMulticartCartObserver:function(){this.collectMultiProductsWithChanges();this.collectProductsForMessages();this.cartItemAdded();this.cartItemRemoved();},updateCartObserver:function(){this.collectProductsWithChanges();this.collectProductsForMessages();this.cartItemAdded();this.cartItemRemoved();},collectMultiProductsWithChanges:function(){var groupedProducts={},cartProduct,i=0,j,product;this.productWithChanges=[];for(i;i<this.productQtys.length;i++){cartProduct=this.productQtys[i];if(_.isUndefined(groupedProducts[cartProduct.id])){groupedProducts[cartProduct.id]=Number(cartProduct.qty).toPrecision(4)*1;}else{groupedProducts[cartProduct.id]+=Number(cartProduct.qty).toPrecision(4)*1;}}\nfor(j in groupedProducts){if(groupedProducts.hasOwnProperty(j)){if(!_.isUndefined(this.origProducts[j])&&groupedProducts[j]!=this.origProducts[j].qty){product=$.extend({},this.origProducts[j]);product.qty=Number(groupedProducts[j]).toPrecision(4)*1;this.productWithChanges.push(product);}}}},collectProductsWithChanges:function(){var i=0,cartProduct,product;this.productWithChanges=[];for(i;i<this.productQtys.length;i++){cartProduct=this.productQtys[i];if(!_.isUndefined(this.origProducts[cartProduct.id])&&cartProduct.qty!=this.origProducts[cartProduct.id].qty){product=$.extend({},this.origProducts[cartProduct.id]);if(parseInt(cartProduct.qty,10)>0){product.qty=Number(cartProduct.qty).toPrecision(4)*1;this.productWithChanges.push(product);}}}},collectCustomerProducts:function(){this.collectOriginalProducts();this.collectCartQtys();this.collectMiniCartQtys();},collectOriginalProducts:function(){var products={},items=customerData.get('cart')().items;
2if(!_.isUndefined(items)){items.forEach(function(item){products[item['product_sku']]={'id':item['product_sku'],'name':item['product_name'],'price':Number(item['product_price_value']).toPrecision(4)*1,'qty':Number(item.qty).toPrecision(4)*1};});}\nthis.googleAnalyticsUniversalData.shoppingCartContent=products;this.origProducts=this.googleAnalyticsUniversalData.shoppingCartContent;},collectMultiCartQtys:function(){var productQtys=[];$('[data-multiship-item-id]').each(function(index,elem){productQtys.push({'id':$(elem).data('multiship-item-id'),'qty':$(elem).val()});});this.productQtys=productQtys;},collectCartQtys:function(){var productQtys=[];$('[data-cart-item-id]').each(function(index,elem){productQtys.push({'id':$(elem).data('cart-item-id'),'qty':$(elem).val()});});this.productQtys=productQtys;},collectMiniCartQtys:function(){var productQtys=[];$('input[data-cart-item-id]').each(function(index,elem){productQtys.push({'id':$(elem).data('cart-item-id'),'qty':$(elem).val()});});this.productQtys=productQtys;},collectProductsForMessages:function(){var i=0,product;this.addedProducts=[];this.removedProducts=[];for(i;i<this.productWithChanges.length;i++){product=this.productWithChanges[i];if(!_.isUndefined(this.origProducts[product.id])){if(product.qty>this.origProducts[product.id].qty){product.qty=Math.abs(product.qty-this.origProducts[product.id].qty);product.qty=Number(product.qty).toPrecision(4)*1;this.addedProducts.push(product);}else if(product.qty<this.origProducts[product.id].qty){product.qty=Math.abs(this.origProducts[product.id].qty-product.qty);product.qty=Number(product.qty).toPrecision(4)*1;this.removedProducts.push(product);}}}},formatProductsArray:function(productsIn){var productsOut=[],itemId,i;for(i in productsIn){if(i!='length'&&productsIn.hasOwnProperty(i)){if(!_.isUndefined(productsIn[i].sku)){itemId=productsIn[i].sku;}else{itemId=productsIn[i].id;}\nproductsOut.push({'id':itemId,'name':productsIn[i].name,'price':Number(productsIn[i].price).toPrecision(4)*1,'quantity':Number(productsIn[i].qty).toPrecision(4)*1});}}\nreturn productsOut;},cartItemAdded:function(){if(!this.addedProducts.length){return;}\nthis.dataLayer.push({'event':'addToCart','ecommerce':{'currencyCode':this.dlCurrencyCode,'add':{'products':this.formatProductsArray(this.addedProducts)}}});this.addedProducts=[];},cartItemRemoved:function(){if(!this.removedProducts.length){return;}\nthis.dataLayer.push({'event':'removeFromCart','ecommerce':{'currencyCode':this.dlCurrencyCode,'remove':{'products':this.formatProductsArray(this.removedProducts)}}});this.removedProducts=[];},parseAddToCartCookies:function(){var addProductsList;if(getCookie(this.cookieAddToCart)){this.addedProducts=[];addProductsList=decodeURIComponent(getCookie(this.cookieAddToCart));this.addedProducts=JSON.parse(addProductsList);delCookie(this.cookieAddToCart);this.cartItemAdded();}},parseRemoveFromCartCookies:function(){var removeProductsList;if(getCookie(this.cookieRemoveFromCart)){this.removedProducts=[];removeProductsList=decodeURIComponent(getCookie(this.cookieRemoveFromCart));this.removedProducts=JSON.parse(removeProductsList);delCookie(this.cookieRemoveFromCart);this.cartItemRemoved();}},parseAddToCartAdvanced:function(){var addedProductList=[];if(getCookie(this.advancedAddToCart)){$.ajax({url:'/gtm/index/get',type:'POST',data:JSON.stringify({'add_to_cart_advanced':true}),global:false,async:false,contentType:'application/json'}).done(function(response){addedProductList=JSON.parse(decodeURIComponent(response));});this.addedProducts=addedProductList;delCookie(this.advancedAddToCart);this.cartItemAdded();}}};return GoogleAnalyticsUniversalCart;});","Magento_GoogleTagManager/js/google-analytics-universal.min.js":"define(['jquery','underscore','jquery/jquery.cookie'],function($,_){'use strict';const DL_CART_COOKIE_NAME='dl_cart_sources';const DL_CART_COOKIE_LIFETIME=10;function GoogleAnalyticsUniversal(config){this.blockNames=config.blockNames;this.dlCurrencyCode=config.dlCurrencyCode;this.dataLayer=config.dataLayer;this.staticImpressions=config.staticImpressions;this.staticPromotions=config.staticPromotions;this.updatedImpressions=config.updatedImpressions;this.updatedPromotions=config.updatedPromotions;}\nGoogleAnalyticsUniversal.prototype={activeOnCategory:function(id,name,category,list,position){this.dataLayer.push({'event':'productClick','ecommerce':{'click':{'actionField':{'list':list},'products':[{'id':id,'name':name,'category':category,'list':list,'position':position}]}}});},activeOnProducts:function(id,name,list,position){this.dataLayer.push({'event':'productClick','ecommerce':{'click':{'actionField':{'list':list},'products':[{'id':id,'name':name,'list':list,'position':position}]}}});},saveDataLayerSource:function(sku,source){let sources={};const cookieData=$.cookie(DL_CART_COOKIE_NAME);
2if(cookieData){try{sources=JSON.parse(cookieData);}catch(e){console.error(`Failed to parse ${DL_CART_COOKIE_NAME} cookie:`,e);}}\nsources[sku]=source;try{const newCookieData=JSON.stringify(sources);$.cookie(DL_CART_COOKIE_NAME,newCookieData,{expires:DL_CART_COOKIE_LIFETIME,path:'/'});}catch(e){console.error(`Failed to save ${DL_CART_COOKIE_NAME} cookie:`,e);}},addToCart:function(sku,name,price,quantity,collection,type='',subcollection='',currencyCode=''){if(typeof sku===typeof undefined){return;}\nvar currency=this.dlCurrencyCode;if(typeof currencyCode!==typeof undefined&¤cyCode!==''){currency=currencyCode;}\nlet source=window.dataLayerItemSource??'';this.saveDataLayerSource(sku,source);this.dataLayer.push({event:'add_to_cart',ecommerce:{currency:currency,items:[{item_id:sku,price:price,item_name:name,quantity:quantity,item_category:type,item_category2:collection,item_category3:subcollection,item_list_name:source}]}});window.dataLayerItemSource='';},removeFromCart:function(sku,name,price,quantity,collection,type='',subcollection='',){if(typeof sku===typeof undefined){return;}\nthis.dataLayer.push({event:'remove_from_cart',ecommerce:{currency:this.dlCurrencyCode,items:[{item_id:sku,price:price,item_name:name,quantity:quantity,item_category:type,item_category2:collection,item_category3:subcollection}]}});},clickBanner:function(id,name,creative,position){this.dataLayer.push({'event':'promotionClick','ecommerce':{'promoClick':{'promotions':[{'id':id,'name':name,'creative':creative,'position':position}]}}});},bindImpressionClick:function(id,type,name,category,list,position,blockType,listPosition){var productLink=[],eventBlock;switch(blockType){case'catalog.product.related':eventBlock='.products-related .products';break;case'product.info.upsell':eventBlock='.products-upsell .products';break;case'catalog.product.crosssell':case'checkout.cart.crosssell':eventBlock='.products-crosssell .products';break;case'category.products.list':case'search_result_list':eventBlock='.products .products';break;}\nproductLink=$(eventBlock+' .item:nth('+listPosition+') a');if(type==='configurable'||type==='bundle'||type==='grouped'){productLink=$(eventBlock+' .item:nth('+listPosition+') .tocart',eventBlock+' .item:nth('+listPosition+') a');}\nproductLink.each(function(index,element){$(element).on('click',function(){this.activeOnProducts(id,name,list,position);}.bind(this));}.bind(this));},updateImpressions:function(){var pageImpressions=this.mergeImpressions(),dlImpressions={'event':'productImpression','ecommerce':{'impressions':[]}},i=0,impressionCounter=0,impression,blockName;for(blockName in pageImpressions){if(blockName==='length'||!pageImpressions.hasOwnProperty(blockName)){continue;}\nfor(i;i<pageImpressions[blockName].length;i++){impression=pageImpressions[blockName][i];dlImpressions.ecommerce.impressions.push({'id':impression.id,'name':impression.name,'category':impression.category,'list':impression.list,'position':impression.position});impressionCounter++;this.bindImpressionClick(impression.id,impression.type,impression.name,impression.category,impression.list,impression.position,blockName,impression.listPosition);}}\nif(impressionCounter>0){this.dataLayer.push(dlImpressions);}},mergeImpressions:function(){var pageImpressions=[];this.blockNames.forEach(function(blockName){if(blockName in this.updatedImpressions){pageImpressions[blockName]=this.updatedImpressions[blockName];}else if(blockName in this.staticImpressions){pageImpressions[blockName]=this.staticImpressions[blockName];}},this);return pageImpressions;},updatePromotions:function(){var dlPromotions={'event':'promotionView','ecommerce':{'promoView':{'promotions':[]}}},pagePromotions=[],promotionCounter=0,bannerIds=[],i=0,promotion,self=this;if(this.updatedPromotions.length){pagePromotions=this.updatedPromotions;}\nif(!pagePromotions.length&&this.staticPromotions.length){pagePromotions=this.staticPromotions;}\nif($('[data-banner-id]').length){_.each($('[data-banner-id]'),function(banner){var $banner=$(banner),ids=($banner.data('ids')+'').split(',');bannerIds=$.merge(bannerIds,ids);});}\nbannerIds=$.uniqueSort(bannerIds);for(i;i<pagePromotions.length;i++){promotion=pagePromotions[i];if($.inArray(promotion.id,bannerIds)==-1||promotion.activated=='0'){continue;}\ndlPromotions.ecommerce.promoView.promotions.push({'id':promotion.id,'name':promotion.name,'creative':promotion.creative,'position':promotion.position});promotionCounter++;}\nif(promotionCounter>0){this.dataLayer.push(dlPromotions);}\n$('[data-banner-id]').on('click','[data-banner-id]',function(){var bannerId=$(this).attr('data-banner-id'),promotions=_.filter(pagePromotions,function(item){return item.id===bannerId;});_.each(promotions,function(promotionItem){self.clickBanner(promotionItem.id,promotionItem.name,promotionItem.creative,promotionItem.position);});});}};return GoogleAnalyticsUniversal;});","Magento_GoogleTagManager/js/google-tag-manager-cart.min.js":"define(['jquery','Magento_Customer/js/customer-data','Magento_GoogleTagManager/js/google-analytics-universal','Magento_GoogleTagManager/js/google-analytics-universal-cart','underscore','jquery-ui-modules/widget','prototype'],function($,customerData,GoogleAnalyticsUniversal,GoogleAnalyticsUniversalCart,_){'use strict';$.widget('mage.gtmCart',{options:{dlCurrencyCode:window.dlCurrencyCode||'',dataLayer:window.dataLayer||[],staticImpressions:window.staticImpressions||[],staticPromotions:window.staticPromotions||[],updatedImpressions:window.updatedImpressions||[],updatedPromotions:window.updatedPromotions||[],cookieAddToCart:'',advancedAddToCart:'',cookieRemoveFromCart:window.cookieRemoveFromCart||'',temporaryEventStorage:[],blockNames:[],events:{AJAX_ADD_TO_CART:'ajax:addToCart',AJAX_ADD_TO_CART_DIRECT:'ajax:addToCartDirect',AJAX_REMOVE_FROM_CART:'ajax:removeFromCart',AJAX_REMOVE_FROM_CART_DIRECT:'ajax:removeFromCartDirect',AJAX_ADD_TO_CART_CORPO:'ajax:addToCartCorpo',AJAX_REVEAL_THE_PRICE_CORPO:'ajax:revealThePriceCorpo'},actions:{}},_create:function(){this.googleAnalyticsUniversalCart=new GoogleAnalyticsUniversalCart({dlCurrencyCode:this.options.dlCurrencyCode,dataLayer:this.options.dataLayer,cookieAddToCart:this.options.cookieAddToCart,advancedAddToCart:this.options.advancedAddToCart,cookieRemoveFromCart:this.options.cookieRemoveFromCart});this.googleAnalyticsUniversal=new GoogleAnalyticsUniversal({blockNames:this.options.blockNames,dlCurrencyCode:this.options.dlCurrencyCode,dataLayer:this.options.dataLayer,staticImpressions:this.options.staticImpressions,staticPromotions:this.options.staticPromotions,updatedImpressions:this.options.updatedImpressions,updatedPromotions:this.options.updatedPromotions});this.cartItemsCache=[];this._initActions();this._setListeners();this._setCartDataListener();this.googleAnalyticsUniversal.updatePromotions();this.googleAnalyticsUniversal.updateImpressions();this.googleAnalyticsUniversalCart.parseAddToCartAdvanced();this.googleAnalyticsUniversalCart.subscribeProductsUpdateInCart();this.options.dataLayer.push({'ecommerce':{'impressions':0,'promoView':0}});},_initActions:function(){var events=this.options.events;this.options.actions[events.AJAX_ADD_TO_CART]=function(product){if(!product.hasOwnProperty('seo')){return;}\nthis.googleAnalyticsUniversal.addToCart(product['seo']['item_id'],product['seo']['item_name'].unescapeHTML(),product['seo']['product_price_value'],product.qty,product['seo']['item_category2'],product['seo']['item_category'],product['seo']['item_category3']);}.bind(this);this.options.actions[events.AJAX_REMOVE_FROM_CART]=function(product){if(!product.hasOwnProperty('seo')){return;}\nthis.googleAnalyticsUniversal.removeFromCart(product['seo']['item_id'],product['seo']['item_name'].unescapeHTML(),product['seo']['product_price_value'],1,product['seo']['item_category2'],product['seo']['item_category'],product['seo']['item_category3']);}.bind(this);},getProductBySku:function(productSku,productId){var searchCriteriaSku=function(item){let cartItemSku=item['product_sku'].replaceAll('.','');let searchCartItemSku=productSku.replaceAll('.','');return $.trim(cartItemSku)===$.trim(searchCartItemSku)||cartItemSku.includes(searchCartItemSku+'|');},searchCriteriaProductId=function(item){return $.trim(item['product_id'])===$.trim(productId);},productFromCache=_.find(this.cartItemsCache,searchCriteriaSku),productFromCart=_.find(customerData.get('cart')().items,searchCriteriaSku);if(!productFromCache&&!productFromCart){productFromCache=_.find(this.cartItemsCache,searchCriteriaProductId);productFromCart=_.find(customerData.get('cart')().items,searchCriteriaProductId);if(!productFromCache&&!productFromCart){return _.extend({},productFromCart,{qty:1});}}\nif(productFromCache&&productFromCart){return _.extend({},productFromCache,{qty:productFromCart.qty-productFromCache.qty});}\nreturn productFromCache||productFromCart;},_removeDirect:function(type,productSkus){this.options.actions[this.options.events.AJAX_REMOVE_FROM_CART](this.getProductBySku(Array.isArray(productSkus)?productSkus[0]:productSkus));},_addCorpo:function(e,data){this.googleAnalyticsUniversal.addToCart(data.id,data.name,data.price,data.quantity,data.collection,'','',data.currency);this.options.dataLayer.push({'delivery_country_selected_corpo_ecom':data.country});},_revealThePriceCorpo:function(e,data){this.options.dataLayer.push({'event':'revealThePrice','currencyCode':data.currency,'products':[{'id':data.id,'name':data.name,'price':data.price,'collection':data.collection}],});},_setToTemporaryEventStorage:function(type,productSkus,productId){this.options.temporaryEventStorage.push({type:type,productSkus:productSkus,productId:productId});},_setCartDataListener:function(){customerData.get('cart').subscribe(function(data){if(this.options.temporaryEventStorage.length){this._executeEvents();}\nthis.cartItemsCache=data.items.slice();}.bind(this));},_executeEvents:function(){var product;this.options.temporaryEventStorage.forEach(function(item,index){item.productSkus.forEac
2h(function(productSku){product=this.getProductBySku(productSku,item.productId);if(parseInt(product.qty,10)>=0){if(item.type!=this.options.events.AJAX_ADD_TO_CART||!_.isUndefined(product['product_sku'])){this.options.actions[item.type](product);}}\nthis.options.temporaryEventStorage.splice(index,1);}.bind(this));}.bind(this));},_setListeners:function(){var handlerWrapper=function(callback,type,event,eventData){callback.call(this,type,eventData.productSkus,eventData.productId);},opt=this.options;$(document).on(opt.events.AJAX_ADD_TO_CART,handlerWrapper.bind(this,this._setToTemporaryEventStorage,opt.events.AJAX_ADD_TO_CART)).on(opt.events.AJAX_REMOVE_FROM_CART,handlerWrapper.bind(this,this._setToTemporaryEventStorage,opt.events.AJAX_REMOVE_FROM_CART)).on(opt.events.AJAX_REMOVE_FROM_CART_DIRECT,handlerWrapper.bind(this,this._removeDirect,opt.events.AJAX_REMOVE_FROM_CART)).on(opt.events.AJAX_ADD_TO_CART_CORPO,this._addCorpo.bind(this)).on(opt.events.AJAX_REVEAL_THE_PRICE_CORPO,this._revealThePriceCorpo.bind(this));}});return $.mage.gtmCart;});","Magento_GoogleTagManager/js/google-tag-manager.min.js":"define(['jquery','mage/cookies','jquery/jquery.cookie'],function($){'use strict';const DL_CART_COOKIE_NAME='dl_cart_sources';function getItemSourcesFromCookie(){const cookieData=$.cookie(DL_CART_COOKIE_NAME);if(cookieData){try{return JSON.parse(cookieData);}catch(e){console.error(`Failed to parse ${DL_CART_COOKIE_NAME} cookie:`,e);}}\nreturn{};}\nreturn function(config){let f,j,dl;let gtmAccountIds=config.gtmAccountId.split(',');gtmAccountIds.forEach(function(gtmAccountId){(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});f=d.getElementsByTagName(s)[0];j=d.createElement(s);dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=config.gtmScriptUrl+'?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer',gtmAccountId);});window.dlCurrencyCode=config.storeCurrencyCode;if(config.ordersData.length>0){const itemSources=getItemSourcesFromCookie();$.each(config.ordersData,function(index,orderData){if(orderData.ecommerce&&orderData.ecommerce.items){Object.entries(orderData.ecommerce.items).forEach(([index,item])=>{item.item_list_name=(item.item_id&&itemSources[item.item_id])?itemSources[item.item_id]:'';});}\ndataLayer.push(orderData);if(orderData.event==='purchase'){$.cookie(DL_CART_COOKIE_NAME,null,{expires:-1,path:'/'});}});}\nif(config.newsletterData){dataLayer.push(config.newsletterData);}\n$(document).trigger('ga:inited');document.dispatchEvent(new Event('ga:inited'));}});","Magento_GoogleTagManager/js/actions/checkout.min.js":"define(['jquery','Magento_Checkout/js/view/payment','Magento_Checkout/js/model/quote','Magento_GoogleTagManager/js/google-tag-manager',],function($,payment,quote,gtm){'use strict';function notify(cart,stepIndex,stepDescription,stepMethod){var i=0,product,dlUpdate={'event':'checkout','ecommerce':{'currencyCode':window.dlCurrencyCode,'checkout':{'actionField':{'index':stepIndex,'step':stepDescription,},'products':[],},},};if(typeof stepMethod!=='undefined'){dlUpdate.ecommerce.checkout.actionField.method=stepMethod;}\ndlUpdate.ecommerce.checkout.products=getCartItems(cart);pushDataLayer(dlUpdate);}\nfunction notifyPaymentValidation(cart){var i=0,product,dlUpdate={'currencyCode':window.dlCurrencyCode,'purchase':{'actionField':{'revenue':quote.totals().subtotal,'tax':quote.totals().tax_amount,'shipping':quote.totals().shipping_amount,'method':quote.paymentMethod().method,},'products':[],},};dlUpdate.event='Payment Method Validation';dlUpdate.purchase.products=getCartItems(cart);console.log('__NOTIFIC');pushDataLayer(dlUpdate);}\nfunction getCartItems(cart){var i=0,products=[];for(i;i<cart.length;i++){products.push({'id':cart[i].id,'name':cart[i].name,'price':cart[i].price,'quantity':cart[i].qty,'category':cart[i].category,});}\nreturn products;}\nfunction pushDataLayer(dlUpdate){if(typeof window.dataLayer!=typeof undefined){window.dataLayer.push(dlUpdate);window.dataLayer.push({'ecommerce':{'checkout':0,},});}}\nreturn function(cart){var isClicked=false;var events={shipping:{desctiption:'shipping',index:'1',},payment:{desctiption:'payment',index:'2',},},subscription=payment.prototype.isVisible.subscribe(function(value){if(value){window.dataLayer?notify(cart,events.payment.index,events.payment.desctiption):$(document).on('ga:inited',notify.bind(this,cart,events.payment.index,events.payment.desctiption));subscription.dispose();}});var checkPlaceOrderButtonLoaded=setInterval(function(){var selector=$('button.checkout');if(selector.length>1){clearInterval(checkPlaceOrderButtonLoaded);let $checkout=$('#checkout');let cgvIsChecked;function clonePlaceOrderBtn(thisObj){let placeOrderBtn=thisObj.find('button.checkout');let placeOrderBtnTitle=placeOrderBtn.attr('title');let placeOrderBtnInnerHtml=placeOrderBtn.html();let actionsToolbar=thisObj.find('.actions-toolbar');placeOrderBtn.attr({'tabindex':'-1','aria-hidden':'true'});
2$('<div class=\"primary\"><button class=\"action primary checkout-gtm\" type=\"button\" title=\"'+placeOrderBtnTitle+'\">'+placeOrderBtnInnerHtml+'</button></div>').appendTo(actionsToolbar);}\nfunction updateGtmPlaceOrderBtn(checkoutWrapperElem){let $activeActionsToolbar=$('.payment-method._active',checkoutWrapperElem).find('.actions-toolbar');let $activePlaceOrderBtn=$('button[type=\"submit\"].checkout',$activeActionsToolbar);let $gtmPlaceOrderBtn=$('.payment-method._active',checkoutWrapperElem).find('button.checkout-gtm');$gtmPlaceOrderBtn.attr('class','').attr('class',$activePlaceOrderBtn.attr('class')).removeClass('checkout').addClass('checkout-gtm');}\nfunction getActivePaymentMethod(checkoutWrapperElem){let $activePaymentMethod=$('.opc-payment-radio._active',checkoutWrapperElem);let activePaymentMethodLabel=$activePaymentMethod.find('.opc-payment-radio-name .ow-font-bold').text();let $$activePaymentMethodBtn=$activePaymentMethod.find('button');$$activePaymentMethodBtn.on('click',function(){updateGtmPlaceOrderBtn($checkout);getActivePaymentMethod($checkout);});}\n$('.payment-method').each(function(){let $this=$(this);clonePlaceOrderBtn($this);});$('button.checkout-gtm').on('click',function(){cgvIsChecked=$('.payment-method._active').find('input[name*=\"agreement\"]').prop('checked');if(cgvIsChecked===false){$('button.checkout','.payment-method._active').click();}else{isClicked=true;window.dataLayer?notifyPaymentValidation(cart.cart):$(document).on('ga:inited',notifyPaymentValidation.bind(this,cart.cart));setTimeout(function(){$('button.checkout','.payment-method._active').click();},2000);}});updateGtmPlaceOrderBtn($checkout);getActivePaymentMethod($checkout);$checkout.on('change',function(){updateGtmPlaceOrderBtn($checkout);getActivePaymentMethod($checkout);});}},1000);quote.paymentMethod.subscribe(function(method){if(typeof method==='object'&&method.hasOwnProperty('method')){window.dataLayer?notify(cart.cart,'2','payment',method.method):$(document).on('ga:inited',notify.bind(this,cart.cart,'2','payment',method.method));}},null,'change');window.dataLayer?notify(cart.cart,events.shipping.index,events.shipping.desctiption):$(document).on('ga:inited',notify.bind(this,cart.cart,events.shipping.index,events.shipping.desctiption));};});","Magento_GoogleTagManager/js/actions/multicheckout.min.js":"define(['jquery','Magento_GoogleTagManager/js/google-tag-manager'],function($){'use strict';function notify(cart,stepIndex,stepDescription){var i=0,product,dlUpdate={event:'checkout',ecommerce:{'currencyCode':window.dlCurrencyCode,'checkout':{'actionField':{'step':stepIndex,'description':stepDescription},products:[]}}};for(i;i<cart.length;i++){product=cart[i];dlUpdate.ecommerce.checkout.products.push({id:product.id,name:product.name,price:Number(product.price).toPrecision(4)*1,quantity:Number(product.qty).toPrecision(4)*1});}\nwindow.dataLayer.push(dlUpdate);window.dataLayer.push({ecommerce:{checkout:0}});}\nreturn function(data){var events={login:{desctiption:'login',index:'1'},addresses:{desctiption:'addresses',index:'2'},multishipping:{desctiption:'multishipping',index:'3'},multibilling:{desctiption:'multibilling',index:'4'},multireview:{desctiption:'multireview',index:'5'}};window.dataLayer?notify(data.cart,events[data.step].index,events[data.step].desctiption):$(document).on('ga:inited',notify.bind(this,data.cart,events[data.step].index,events[data.step].desctiption));};});","Magento_GoogleTagManager/js/actions/product-detail.min.js":"define(['jquery','Magento_GoogleTagManager/js/google-tag-manager'],function($){'use strict';function notify(data){window.dataLayer.push({'event':'productDetail','ecommerce':{'detail':{'products':[data]},'impressions':[]}});}\nreturn function(productData){window.dataLayer?notify(productData):$(document).on('ga:inited',notify.bind(this,productData));};});","Vertex_Validator/js/vat-id-billing-validation-mixin.min.js":"define(['jquery','uiRegistry','Magento_Checkout/js/checkout-data'],function($,registry,checkoutData){'use strict';return function(Component){return Component.extend({validationConfig:window.checkoutConfig.vertexAddressValidationConfig,addressValidator:null,initialize:function(){const self=this;this._super();registry.get('checkout.steps.billing-step.payment.payments-list'+'.before-place-order.billingAdditional'+'.address-validation-message.validator',function(vali
2dator){this.addressValidator=validator;}.bind(this));this.isAddressDetailsVisible.subscribe(function(isVisible){self.addressDetailsVisibilityChanged(isVisible);});return this;},updateAddress:function(){this.registerAddressInvalidationTrigger();const billingData=checkoutData.getBillingAddressFromData();var isValidatorActive=window.checkoutConfig.vertexValidatorConfig.isValidatorActive;if(isValidatorActive&&this.isAddressFormVisible()==true&&billingData.vatId!==\"\"){var base_url=window.location.origin;$.ajax({url:base_url+'/validator/validate/index',data:{vatId:billingData.vat_id,countryId:billingData.country_id,type:'billing'},type:'POST',datatype:'json',success:function(response){if(response.message!=undefined&&response.message!=\"\"){alert(response.message);}}});}\nif(!this.validationConfig.isAddressValidationEnabled||this.addressValidator.isAddressValid||billingData===null||this.selectedAddress()&&!this.isAddressFormVisible()||this.validationConfig.countryValidation.indexOf(billingData.country_id)===-1){return this._super();}\nthis.addressValidator.addressValidation().done(function(){if(!this.validationConfig.showValidationSuccessMessage){return this.updateAddress();}}.bind(this));},registerAddressInvalidationTrigger:function(){let that=this;$('fieldset').find('[data-form=\"billing-new-address\"]').one('keyup change paste','input[name^=\"street\"]'+', input[name=\"postcode\"]'+', input[name=\"city\"]'+', input[name=\"country_id\"]'+', select[name=\"region_id\"]',function(){that.addressValidator.isAddressValid=false;});},addressDetailsVisibilityChanged:function(isVisible){let message=this.addressValidator.message;if(isVisible&&message.hasMessage()&&message.message.type===1){message.clear();}}});};});","Vertex_Validator/js/vat-id-shipping-validation-mixin.min.js":"define(['jquery','uiRegistry','Magento_Checkout/js/model/quote'],function($,registry,quote){'use strict';return function(Component){return Component.extend({validationConfig:window.checkoutConfig.vertexAddressValidationConfig,shippingData:null,addressValidator:null,validateShippingInformation:function(){const superResult=this._super();var isValidatorActive=window.checkoutConfig.vertexValidatorConfig.isValidatorActive;if(isValidatorActive&"e.shippingAddress().vatId!=\"\"&"e.shippingAddress().customerAddressId==undefined){var base_url=window.location.origin;$.ajax({url:base_url+'/validator/validate/index',data:{vatId:quote.shippingAddress().vatId,countryId:quote.shippingAddress().countryId,type:'shipping'},type:'POST',datatype:'json',success:function(response){if(response.message!=undefined&&response.message!=\"\"){alert(response.message);}}});}\nreturn superResult;}});};});","Vertex_Validator/js/view/validation-message.min.js":"define(['ko','uiComponent','Vertex_AddressValidation/js/model/address-difference-template-renderer','Vertex_AddressValidation/js/validation-messages','jquery'],function(ko,Component,DifferenceRenderer,validationMessages,$){'use strict';return Component.extend({defaults:{template:'Vertex_Validator/validation-message',cleanseAddressTemplate:'Vertex_AddressValidation/template/validation-result.html',showSuccessMessage:false,message:{},address:null,hasMessage:false,tracks:{showSuccessMessage:true,message:true}},templateRenderer:null,initialize:function(){this._super();this.templateRenderer=new DifferenceRenderer(this.cleanseAddressTemplate);return this;},initObservable:function(){this.address=ko.observable();this.hasMessage=ko.pureComputed(function(){return this._objectHasEntries(this.message);}.bind(this));this.renderedTemplate=ko.pureComputed(function(){const templateVariables={message:{text:this.message.text,differences:this.message.differences},address:this.address()};$('html, body').animate({scrollTop:$(\".vertex-message\").offset().top},1000);for(let index=0,length=this.message.differences.length;index<length;++index){if(this.message.differences[index].type==='street'){templateVariables.warning=validationMessages.streetAddressUpdateWarning;break;}}\nreturn this.templateRenderer.render(templateVariables);}.bind(this));return this._super();},setSuccessMessage:function(text,differences){alert('text');this.setMessage(0,'message success',text,differences||[]);},setWarningMessage:function(text,differences,address){this.address(address||{});this.setMessage(1,'message warning',text,differences||[]);},setMessage:function(type,cssClass,text,differences){this.message={type:type,text:text,class:cssClass||'',differences:differences||[]};},hasMessage:function(){return ko.computed(function(){return this._objectHasEntries(this.message);}.bind(this));},clear:function(){this.message={};},_objectHasEntries:function(object){if(typeof Object.entries!=='undefined'){return Object.entries(object).length!==0;}\nfor(let key in object){if(object.hasOwnProperty(key)){return true;}}}});});","Amasty_InvisibleCaptcha/js/view/am-recaptcha-abstract.min.js":"define(['uiComponent','jquery','ko','underscore','mageUtils','Amasty_InvisibleCaptcha/js/model/am-recaptcha','Amasty_InvisibleCaptcha/js/action/am-recaptcha-loader','mage/loader','domReady!'],function(Component,$,ko,_,utils,amReCaptchaModel,amReCaptchaLoader){'use strict';return Component.extend({defaults:{formsToProtect:'',showLoaderOnCaptchaLoading:false,reCaptchaId:'am-recaptcha-place-order'},loadApi:function(){if(!amReCaptchaModel.isScriptLoaded){window[amReCaptchaModel.onLoadCallback]=function(){$(window).trigger('amcaptchaReady');};amReCaptchaLoader.addReCaptchaScript();}},appendCaptcha:function(){if(!amReCaptchaModel.isCaptchaAppended&&amReCaptchaModel.getRecaptchaConfig().isInvisible){this.add();window.grecaptcha.render(this.reCaptchaId,this.getParameters());amReCaptchaModel.isCaptchaAppended=true;}},add:function(){var rendererReCaptcha=$('<div>',{'id':this.reCaptchaId,'class':this.reCaptchaId});$('body').append(rendererReCaptcha);},setIsCaptchaValidationPassed:function(flag){amReCaptchaModel.isValidationPassed(flag);amReCaptchaModel.isValidationPassed.valueHasMutated();},resetCaptcha:function(){_.each(amReCaptchaModel.tokenFields,function(tokenBlock){window.grecaptcha.reset(tokenBlock.data('id'));});this.setIsCaptchaValidationPassed(false);}});});","Amasty_InvisibleCaptcha/js/view/am-recaptcha.min.js":"define(['jquery','ko','underscore','mageUtils','Amasty_InvisibleCaptcha/js/view/am-recaptcha-abstract','Amasty_InvisibleCaptcha/js/model/am-recaptcha','mage/loader','domReady!'],function($,ko,_,utils,Component,amReCaptchaModel){'use strict';return Component.extend({defaults:{formsToProtect:'',captchaElementClass:'am-recaptcha-block'},initObservable:function(){this._super();this.formsToProtect=$(amReCaptchaModel.getFormsList());this.renderCaptcha();return this;},renderCaptcha:function(){$(window).on('amcaptchaReady',this.initFormHandler.bind(this));_.debounce(function(){this._addListeners();this.formsToProtect.on('submit',function(event){const form=$(event.currentTarget);window.dispatchEvent(new CustomEvent('am-recaptcha-submit-event',{detail:{form:form}}));if(amReCaptchaModel.isScriptLoaded&&!!event.target.dataset?.amCaptchaObserved){form.off('submit:beforeSubmit');return;}\nevent.preventDefault();event.stopImmediatePropagation();form.trigger('submit:beforeSubmit');});this._eventOrderChange();this._enableSubmitButtons();}.bind(this),200)();},_enableSubmitButtons:function(forms){if(typeof forms==='undefined'){forms=this.formsToProtect;}\nforms.find('[am-captcha-protect=true]').removeAttr('disabled');},_addListeners:function(){this.formsToProtect.on('submit:beforeSubmit',function(event){this.cachedForm=$(event.target);event.target.dataset.amCaptchaObserved=1;if(amReCaptchaModel.isScriptLoaded){$(window).trigger('amcaptchaReady');return;}\nthis.loadApi();}.bind(this));},_eventOrderChange:function(){_.each(this.formsToProtect,function(form){var $form=$(form);$form.data('recaptchaFormId',utils.uniqueid());if(+amReCaptchaModel.invisibleCaptchaCustomForm){this._swapSubmit($form);}}.bind(this));},_swapSubmit:function(form){var $form=$(form),listeners;listeners=$._data($form[0],'events').submit;if(listeners){listeners.unshift(listeners.pop());}}
2,getParameters:function(form){var $form=$(form);return _.extend(amReCaptchaModel.getRecaptchaConfig(),{'callback':function(){if(this.showLoaderOnCaptchaLoading){$('body').trigger('processStop');}\nif($form.valid()){$form.submit();}}.bind(this),'expired-callback':this.resetCaptcha});},initFormHandler:function(){var self=this;amReCaptchaModel.isScriptLoaded=true;this.appendCaptcha();_.each(self.formsToProtect,function(form){if(self.cachedForm&&self.cachedForm[0]===form){var $form=$(form),widgetId=self._initCaptchaOnForm(form);$form.on('ajaxFormLoaded',function(){self._formButtonClickEvent(form,widgetId);});$(document).on('am_form:ajax_complete',function(event,form){self.renderCaptchaOnForm($(form));});}});},renderCaptchaOnForm:function($form,$captchaElement=null){var $formCaptchaElement=$form.find('.'+this.captchaElementClass);if($formCaptchaElement.length){$formCaptchaElement.remove();}\nif(!$captchaElement){$captchaElement=this.getCaptchaElement();}\n$form.append($captchaElement);var widgetId=window.grecaptcha.render($captchaElement[0],this.getParameters($form[0]));$captchaElement.data('id',widgetId);this._formButtonClickEvent($form[0],widgetId);this._enableSubmitButtons($form);return widgetId;},getCaptchaElement:function(){return $('<div class=\"'+this.captchaElementClass+'\"></div>');},_initCaptchaOnForm:function(form){var $form=$(form),widgetId,$button=$form.find(\"[type='submit']\"),$captchaElement=this.getCaptchaElement();widgetId=this.renderCaptchaOnForm($form,$captchaElement);this._submitCachedForm($form,$button);amReCaptchaModel.tokenFields.push($captchaElement);return widgetId;},_submitCachedForm:function($form,$button){if($button.length&&this.cachedForm&&this.cachedForm.data('recaptchaFormId')===$form.data('recaptchaFormId')){if(this.showLoaderOnCaptchaLoading){$('body').trigger('processStart');}\n$button.trigger('click');this.cachedForm=null;}},_formButtonClickEvent:function(form,widgetId){var $form=$(form),$button=$form.find(\"[type='submit']\"),buttonClickListeners=null,buttonListeners={};if($button.length){buttonListeners=$._data($button[0],'events');}\nif(_.has(buttonListeners,'click')){buttonClickListeners=_.clone(buttonListeners.click);}\n$button.off('click').on('click',function(e){e.preventDefault();if($form.valid()){$button.prop('disabled',true);window.grecaptcha.reset(widgetId);if(amReCaptchaModel.getRecaptchaConfig().isInvisible){window.grecaptcha.execute(widgetId);}}\nif(buttonClickListeners){$button.off('click');$.each(buttonClickListeners,function(index,event){$button.bind(event.type,event.handler);});buttonClickListeners=null;}});this._enableSubmitButtons($form);}});});","Amasty_InvisibleCaptcha/js/view/am-recaptcha-payment.min.js":"define(['jquery','underscore','mageUtils','Amasty_InvisibleCaptcha/js/view/am-recaptcha-abstract','Amasty_InvisibleCaptcha/js/model/am-recaptcha','Amasty_InvisibleCaptcha/js/action/am-recaptcha-validate','Magento_Ui/js/model/messageList',\"mage/translate\"],function($,_,utils,Component,amReCaptchaModel,recaptchaValidate,messageList){'use strict';return Component.extend({defaults:{template:'Amasty_InvisibleCaptcha/payment-recaptcha-container',isEnabledOnPayments:amReCaptchaModel.isEnabledOnPayments},renderReCaptcha:function(element){if(window.grecaptcha&&window.grecaptcha.render){this.appendCaptcha();this.initCaptcha(element);}else{$(window).on('amcaptchaReady',function(){this.appendCaptcha();this.initCaptcha(element);}.bind(this));this.loadApi();}},getPaymentName:function(element){var $element=$(element),paymentMethodField=$element.closest('.payment-method').find('.payment-method-title > input[type=\"radio\"]');return paymentMethodField.length?paymentMethodField.val():'';},initCaptcha:function(element){var $element=$(element),widgetId,listeners,id=utils.uniqueid(),$button=$element.closest('.payment-method-content').find('button[type=\"submit\"]'),messagesContainer=$element.closest('.am-recaptcha-container').find('.messages-container'),paymentName=this.getPaymentName(element),$recaptchaBlock=$('<div>',{'id':recaptchaValidate.options.reCaptchaSelector})\n$(messagesContainer).attr('id','message-'+id);$element.attr('id',id);
2if(!$button.length){$button=$('<button type=\"button\" class=\"hidden\" data-payment-name=\"'+paymentName+'\"></button>');$button.insertAfter($element);}\n$button.before($recaptchaBlock);widgetId=window.grecaptcha.render($recaptchaBlock[0],this.getParameters($element,$button));$recaptchaBlock.append($('<div class=\"recaptcha-error-message\">').html(recaptchaValidate.getErrorMessage()).hide());$button.click(function(event,data){if(this.needResetCaptcha(data)){this.resetCaptcha();$element.val('');}\nif(!$element.val()){event.preventDefault(event);event.stopImmediatePropagation();if(amReCaptchaModel.getRecaptchaConfig().isInvisible){$(event.currentTarget).prop('disabled',true);window.grecaptcha.execute(widgetId);}else{recaptchaValidate.showErrorMessage(true);}}else{this.setIsCaptchaValidationPassed(true);}}.bind(this));listeners=$._data($button[0],'events').click;listeners.unshift(listeners.pop());amReCaptchaModel.tokenFields.push($element);},needResetCaptcha:function(data){return data?.disableCaptchaReset!==true&&amReCaptchaModel.getRecaptchaConfig().isInvisible&&amReCaptchaModel.getRecaptchaConfig().recaptchaVersion===3;},getParameters:function(tokenField,element){return _.extend(amReCaptchaModel.getRecaptchaConfig(),{'callback':function(token){recaptchaValidate.validateCaptcha(tokenField,token).done(function(response){var $element=$(element),isPlaceOrder=$element.prop('disabled');$element.prop('disabled',false);if(_.has(response,'error')&&response.error){this.resetCaptcha();this.setIsCaptchaValidationPassed(false);this.handleTokenError($(tokenField).attr('id'),response.message);messageList.addErrorMessage({message:response.message});}else{this.setIsCaptchaValidationPassed(true);recaptchaValidate.showErrorMessage(false);$(tokenField).val(token);if(!$(element).hasClass('hidden')&&isPlaceOrder){$element.trigger('click',[{disableCaptchaReset:true}]);}}}.bind(this));}.bind(this),'expired-callback':this.resetCaptcha});},handleTokenError:function(tokenFieldId,message){var container=$('#message-'+tokenFieldId),messageBlock=container.find('.message');messageBlock.html(message);container.show(0).delay(5000).hide('fast',function(){messageBlock.html('');});}});});","Amasty_InvisibleCaptcha/js/view/paypal/in-context/checkout-express-mixin.min.js":"define(['jquery','underscore','Amasty_InvisibleCaptcha/js/model/am-recaptcha','Magento_Checkout/js/model/payment/additional-validators'],function($,_,amReCaptchaModel,additionalValidators){'use strict';var mixin={defaults:{reCaptchaButton:false},isCaptchaValid:false,initListeners:function(context){this._super(context);if(amReCaptchaModel.isEnabledOnPayments){$.async('button[data-payment-name=\"'+this.index+'\"]',function(element){this.reCaptchaButton=$(element);this.validate();}.bind(this));amReCaptchaModel.isValidationPassed.subscribe(function(data){this.isCaptchaValid=data;}.bind(this));}\nreturn this;},validate:function(actions){this.actions=actions||this.actions;if(this.actions){if(amReCaptchaModel.isEnabledOnPayments&&!this.isCaptchaValid){this.actions.disable();}else{additionalValidators.validate(true)?this.actions.enable():this.actions.disable();}}},onClick:function(){var savedCallback=this._super;if(!this.isCaptchaValid&&amReCaptchaModel.isEnabledOnPayments){var subscribe=amReCaptchaModel.isValidationPassed.subscribe(function(data){if(this.actions){if(data){this.actions.enable();savedCallback.apply(this);}else{this.actions.disable();}}\nsubscribe.dispose();}.bind(this));this.validateCaptcha();}else{savedCallback.apply(this);}},validateCaptcha:function(){if(this.reCaptchaButton.length){this.reCaptchaButton.trigger('click');}}};return function(ExpressCheckout){return ExpressCheckout.extend(mixin);};});","Amasty_InvisibleCaptcha/js/model/am-recaptcha.min.js":"define(['ko','underscore'],function(ko,_){'use strict';return{onLoadCallback:'amInvisibleCaptchaOnloadCallback',isEnabledOnPayments:false,isScriptLoaded:false,tokenFields:[],url:'https://www.google.com/recaptcha/api.js',isCaptchaAppended:false,checkoutRecaptchaValidateUrl:null,invisibleCaptchaCustomForm:false,isValidationPassed:ko.observable(false),recaptchaConfig:{lang:'hl=en',size:'invisible'},formToProtect:'',reCaptchaErrorMessage:'Prove you are not a robot',recaptchaVersion:null,isInvisible:null,setConfig:function(config){if(_.has(config,'recaptchaConfig')){this.setRecaptchaConfig(config.recaptchaConfig);}\nif(_.has(config,'formsToProtect')){this.setFormsList(config.formsToProtect);}\nthis.checkoutRecaptchaValidateUrl=config.checkoutRecaptchaValidateUrl;this.invisibleCaptchaCustomForm=config.invisibleCaptchaCustomForm;this.isEnabledOnPayments=!!config.isEnabledOnPayments;
2this.reCaptchaErrorMessage=config.reCaptchaErrorMessage;this.recaptchaVersion=config.recaptchaVersion;},setRecaptchaConfig:function(config){_.extend(this.recaptchaConfig,config);},getRecaptchaConfig:function(){return this.recaptchaConfig;},setFormsList:function(formsList){this.formToProtect=formsList;},getFormsList:function(){return this.formToProtect;}};});","Amasty_InvisibleCaptcha/js/action/am-recaptcha-validate.min.js":"define(['jquery','underscore','Amasty_InvisibleCaptcha/js/model/am-recaptcha',],function($,_,amReCaptchaModel){'use strict';return{options:{reCaptchaSelector:'am-recaptcha-block',reCaptchaErrorSelector:'recaptcha-error',reCaptchaErrorMessageSelector:'.recaptcha-error-message'},validateCaptcha:function(tokenField,token){this.showErrorMessage(false);return $.ajax({url:amReCaptchaModel.checkoutRecaptchaValidateUrl,data:{'g-recaptcha-response':token},type:'POST'});},showErrorMessage:function(show){var amReCaptchaBlock=$('.payment-method._active').find('#'+this.options.reCaptchaSelector);if(show){amReCaptchaBlock.addClass(this.options.reCaptchaErrorSelector);if(!amReCaptchaBlock.find(this.options.reCaptchaErrorMessageSelector).length>0){amReCaptchaBlock.append($('<div class=\"recaptcha-error-message\">').html(this.getErrorMessage()));}\namReCaptchaBlock.find(this.options.reCaptchaErrorMessageSelector).show();}else{amReCaptchaBlock.removeClass(this.options.reCaptchaErrorSelector);amReCaptchaBlock.find(this.options.reCaptchaErrorMessageSelector).hide();}},getErrorMessage:function(){return amReCaptchaModel.reCaptchaErrorMessage;}};});","Amasty_InvisibleCaptcha/js/action/am-recaptcha-configure.min.js":"define(['Amasty_InvisibleCaptcha/js/model/am-recaptcha'],function(amReCaptchaModel){'use strict';return function(config){amReCaptchaModel.setConfig(config);}});","Amasty_InvisibleCaptcha/js/action/am-recaptcha-loader.min.js":"define(['Amasty_InvisibleCaptcha/js/model/am-recaptcha'],function(amReCaptchaModel){'use strict';return{addReCaptchaScript:function(){var element,scriptTag;if(amReCaptchaModel.isScriptLoaded){return;}\nscriptTag=document.getElementsByTagName('body')[0];element=document.createElement('script');element.async=true;element.src=this.getUrl();scriptTag.append(element);amReCaptchaModel.isScriptLoaded=true;},getUrl:function(){return amReCaptchaModel.url+'?onload='+amReCaptchaModel.onLoadCallback\n+'&render=explicit'+this.getLang();},getLang:function(){return amReCaptchaModel.recaptchaConfig.lang?'&'+amReCaptchaModel.recaptchaConfig.lang:'';}};});","Pitbulk_SAML2/js/acs.min.js":"define(['jquery','Magento_Ui/js/model/messageList','Magento_Customer/js/customer-data','Magento_Customer/js/section-config','mage/mage'],function($,globalMessageList,customerData,sectionConfig){'use strict';return function(config,messageContainer){messageContainer=messageContainer||globalMessageList;$('body').trigger('processStart');customerData.reload(sectionConfig.getSectionNames?sectionConfig.getSectionNames():'customer').done(function(){if(config.errorMsg){messageContainer.addErrorMessage({message:config.errorMsg});}\n$($.mage.redirect(config.redirectUrl,'assign',5000));});};});","Pitbulk_SAML2/js/login_post.min.js":"define(['jquery','Magento_Customer/js/customer-data','Magento_Customer/js/section-config'],function($,customerData,sectionConfig){'use strict';return function(config){var sections;sections=sectionConfig.getAffectedSections(\"sso/saml2/login\");if(sections){customerData.invalidate(sections);}\n$('#saml_login_post').submit();};});","Pitbulk_SAML2/js/login_redirect.min.js":"define(['jquery','Magento_Customer/js/customer-data','Magento_Customer/js/section-config'],function($,customerData,sectionConfig){'use strict';return function(config){var sections;sections=sectionConfig.getAffectedSections(\"sso/saml2/login\");if(sections){customerData.invalidate(sections);}\nwindow.location.href=config.redirectUrl;};});","Pitbulk_SAML2/js/acs_whishlist_post.min.js":"define(['jquery',],function($){'use strict';return function(config){$('#saml_acs_whitelist_post').submit();};});","Pitbulk_SAML2/js/view/checkout/samlLoginLink.min.js":"define(['Magento_Ui/js/modal/modal','uiComponent','jquery','mage/url'],function(modal,Component,$,urlBuilder){'use strict';return Component.extend({defaults:{template:'Pitbulk_SAML2/checkout/samllogin',samlLoginURL:''},initialize:function(){this._super();if(window.checkout!==undefined){this.samlLoginURL=window.checkout.baseUrl+'sso/saml2/login';}else{this.samlLoginURL=urlBuilder.build('sso/saml2/login');}},isActive:function(){if(window.checkout!==undefined){return window.checkout.saml.enabled;}\nreturn false;},getSamlTextLink:function(){if(window.checkout!==undefined){return window.checkout.saml.linktext;}\nreturn\"\";},isForceSamlActive:function(){if(window.checkout!==undefined){return window.checkout.saml.enabled&&window.checkout.saml.forced;}\nreturn false;},disableLoginForm:function(){if(document.querySelector(\"form#login-form\")){document.querySelector(\"form#login-form\").style.display=\"none\";}\nif(document.querySelector(\"div.block-new-customer\")){document.querySelector(\"div.block-new-customer\").style.display=\"none\";}\nif(document.querySelector(\"div.block-authentication\")){document.querySelector(\"div.block-authentication\").style.border=\"0px\";}\nif(document.querySelector(\"div.block-customer-login\")){document.querySelector(\"div.block-customer-login\").dataset.label=\"\";document.querySelector(\"div.block-customer-login\").style.border=\"0px\";if(document.querySelector(\"div.block-customer-login\").querySelector(\"div.block-title\")){document.querySelector(\"div.block-customer-login\").querySelector(\"div.block-title\").style.textAlign=\"center\";}}}});});","Reflet_SearchEngineExt/js/ajax-filter.min.js":"define(['jquery','underscore','jquery-ui-modules/widget','productListCatalogAjaxFilter',],function($,_){$.widget('mage.productSearchCatalogAjaxFilter',$.mage.productListCatalogAjaxFilter,{_create:function(){this.body=$('body');this.toolbar=$('#product-list-top');this.listing=$('#product-list-cont');const searchParams=new URLSearchParams(window.location.search);if(!searchParams.has('n')){searchParams.set('n','products');history.replaceState(null,'',`${window.location.pathname}?${searchParams.toString()}`);}\nlet params=searchParams.toString();let url=window.location.origin+window.location.pathname;this.location.saved.url=url;this.location.current.url=url;this.location.saved.params=params;this.location.current.params=params;let currentUrl=window.location.href;this.savedUrls.push(currentUrl);if(typeof history.replaceState==='function'){history.replaceState({url:currentUrl},document.title,currentUrl);}\nthis._bindEvents();},_getRemovedParams:function(removedParams){return removedParams.concat(['ajax','l','s']);}
2,_orderClick:function(e){if(this._isClick(e)){e.preventDefault();let elt=$(e.currentTarget),orderCode=elt.data('order-code'),orderValue=elt.data('order-value'),values={},removed=[];if(orderValue===undefined||$.trim(orderValue.toString())===''){removed.push(orderCode);}else{values[orderCode]=orderValue;}\nif(elt[0].hasAttribute('data-dir-code')){if(elt[0].hasAttribute('data-dir-value')){values[elt.data('dir-code')]=elt.data('dir-value');}else{removed.push(elt.data('dir-code'));}}\nlet url=this._getFilterUrl((elt.attr('aria-checked')!=='true'),values,removed);this._ajaxSubmit(url,'#product-list-top','#sorter-btn',true,false,elt);$(document).trigger('updateFilters',{type:'sort',elt:e.currentTarget});}},_getAjaxUrl:function(url){let params=new URL(url).searchParams;params.delete('n');params.delete('search');let ajaxUrl=new URL(this.options.ajaxUrl);params.forEach((value,key)=>{ajaxUrl.searchParams.set(key,value)});return ajaxUrl.href;},_isAjaxSuccess:function(){return true;},_getAjaxData:function(){return{ajax:1};},_trackLinkClick:function(e,code,val){}});return $.mage.productSearchCatalogAjaxFilter;});","Reflet_SearchEngineExt/js/search-page.min.js":"require(['jquery','infiniteAjaxScroll'],function($){\"use strict\";let ias=null;const resEl=document.getElementById('search-results');const searchValue=resEl?.getAttribute('data-request')??'';const searchType=resEl?.getAttribute('data-type')??'';function initSearch(){let headerInput=document.getElementById('search');let input=document.getElementById('search-input');let reset=document.getElementById('search-reset');if(headerInput){headerInput.value=searchValue;}\nif(input&&reset){reset.addEventListener('click',(e)=>{e.preventDefault();input.value='';input.focus();});}}\nfunction initPagination(){$(document).on('listingPagerReset',function(){resetIAS();});initIAS();}\nfunction resetIAS(){if(ias){try{ias.destroy();ias=null;}catch(e){console.error(\"Error destroying IAS instance:\",e);}\ninitIAS();}}\nfunction initIAS(){ias=$.ias({container:'[data-ias=\"list\"]',initialize:false,item:'[data-ias=\"item\"]',pagination:'[data-ias=\"pagination\"]',next:'[data-ias=\"next-page\"]'});ias.load=function(url,callback,delay){let self=this,$itemContainer,items=[],timeStart=+new Date(),timeDiff;delay=delay||this.defaultDelay;let loadEvent={url:url,ajaxOptions:{dataType:'json'}};self.fire('load',[loadEvent]);function xhrDoneCallback(data){let itemsHtml='';let fireEvent=true;let currentPage=data?.page_info?.current_page??-1;if(currentPage!==-1&&self.loadedPages.indexOf(currentPage)===-1){fireEvent=true;self.loadedPages.push(currentPage);itemsHtml=data?.html?.products_list??'';if(data?.html?.datalayer){$('#product-list').append(data.html.datalayer);$('#product-list').trigger('contentUpdated');}}else{console.error(\"IAS data error\",data);}\n$itemContainer=$(this.itemsContainerSelector,itemsHtml).eq(0);if($itemContainer){$itemContainer.find(this.itemSelector).each(function(){items.push(this);});}\nif(fireEvent){self.fire('loaded',[data,items]);if(callback){timeDiff=+new Date()-timeStart;if(timeDiff<delay){setTimeout(function(){callback.call(self,data,items);},delay-timeDiff);}else{callback.call(self,data,items);}}}}\nthis.jsXhr=$.ajax(loadEvent.url,loadEvent.ajaxOptions).done($.proxy(xhrDoneCallback,self));return this.jsXhr;};ias.getNextUrl=function(data){let container=data?.html?.products_list??this.$container;return $(this.nextSelector,container).last().attr('data-href');};ias.on('rendered',()=>{highlightSearchTerms();updateUrl();if(searchType==='products'){$(document).trigger(\"listingUpdated\");$(document).trigger(\"localizeElements\");}});ias.spinnerExtension({src:'',html:'<div class=\"omega-bg-loader\"></div>'});ias.initialize();}\nfunction announceSearchResults(){const announceEl=document.getElementById('search-results-announce');const message=announceEl?.getAttribute('data-announce')?.trim();if(!announceEl||!message){return;}\nsetTimeout(()=>{announceEl.textContent=message;},300);}\nfunction updateUrl(){let items=document.querySelectorAll('[data-ias=item]');if(items?.length){const url=new URL(window.location);url.searchParams.set(\"l\",`${items.length}`);window.history.replaceState({},\"\",url);}}\nfunction highlightSearchTerms(){const elements=document.querySelectorAll('[data-search=\"highlighted\"]');
2if(elements.length&&searchValue.trim()!==''){const escapedSearch=searchValue.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,'\\\\$&');const regex=new RegExp(`(${escapedSearch})`,'gi');elements.forEach((element)=>{highlightTextNodes(element,regex);element.removeAttribute('data-search');});}}\nfunction highlightTextNodes(node,regex){if(node.nodeType===Node.TEXT_NODE){const text=node.textContent;if(regex.test(text)){const fragment=document.createDocumentFragment();let lastIndex=0;regex.lastIndex=0;let match;while((match=regex.exec(text))!==null){if(match.index>lastIndex){fragment.appendChild(document.createTextNode(text.slice(lastIndex,match.index)));}\nconst mark=document.createElement('mark');mark.textContent=match[0];mark.classList.add('ow-search-engine__mark');fragment.appendChild(mark);lastIndex=regex.lastIndex;}\nif(lastIndex<text.length){fragment.appendChild(document.createTextNode(text.slice(lastIndex)));}\nnode.parentNode.replaceChild(fragment,node);}}else if(node.nodeType===Node.ELEMENT_NODE&&node.tagName!=='MARK'){Array.from(node.childNodes).forEach(child=>highlightTextNodes(child,regex));}}\ninitPagination();initSearch();highlightSearchTerms();announceSearchResults();});","Reflet_UserManual/js/user-manual-pdf.min.js":"define([\"jquery\",\"underscore\",\"mage/template\",\"mage/translate\",\"jquery-ui-modules/widget\",\"Magento_Ui/js/modal/modal\",],function($,_,mageTemplate,$t,modal){\"use strict\";$.widget('reflet.userManualPdf',{options:{isHub:false,ajaxUrl:'',currentSku:'',globalJson:{}},manualsData:{},searchValue:'',_create:function(){this.userManualLink=$('[data-role=\"user-manual-pdf\"]',this.element);this.extendedLink=$('[data-role=\"extended-pdf\"]',this.element);this.basicFunctionLink=$('[data-role=\"basic-functions-pdf\"]',this.element);this.userManualModal=$('[data-role=\"user-manual-modal\"]');this.userManualModalTemplate=mageTemplate('#user-manual-modal-template');this.refInput=$('[data-role=form-input]',this.element);this.refErrorMessage=$('[data-role=\"ref-error-message\"]',this.element);this.userManualModal.modal({autoOpen:false,type:'popup',responsive:true,innerScroll:true,modalClass:'user-manual-modal modal-right mobile-fullscreen fade-modal overlay-modal',buttons:[],});$('[data-role=\"modal-list-trigger\"]',this.element).on('click',this._openSingleUserManualModal.bind(this));if(this.options.isHub&&this._getUrlParam('operating_instructions')==='1'){this._openGlobalUserManualModal();}\nif(this.options.isHub){this._initHub();}else{this._initPDP();}\nthis._initTracking();},_initPDP:function(){this._callAjax(this.options.ajaxUrl,this._pdpAjaxCallback.bind(this));},_initHub:function(){this._initInfoModal('#user-manual-scan-modal','[data-role=\"modal-scan-trigger\"]','user-manual-help-modal user-manual-help-modal--scan');this._initInfoModal('#user-manual-search-modal','[data-role=\"modal-search-trigger\"]','user-manual-help-modal user-manual-help-modal--search');this._initRefInput();$('#user-manual-ref-search-button',this.element).on('click',this._onSearchSubmit.bind(this));$('[data-role=\"global-instructions\"]',this.element).on('click',this._openGlobalUserManualModal.bind(this));},_pdpAjaxCallback:function(){const nbManuals=Object.keys(this.manualsData).length;if(nbManuals>0){this.userManualLink.show();}\nif(this.extendedLink.length&&this.extendedManualData){this.extendedLink.show();this.extendedLink.children('a').attr(\"href\",`${this.extendedManualData}`);}\nif(this.basicFunctionLink.length&&this.basicFunctionsManualData){this.basicFunctionLink.show();this.basicFunctionLink.children('a').attr(\"href\",`${this.basicFunctionsManualData}`);}}
2,_hubWatchRefDisplay:function(){this.skuSearchForm=$('[data-role=\"sku-search-form\"]');this.skuSearchBtn=$('[data-role=\"sku-search-btn\"]');this.explainingText=$('[data-role=\"explaining-text\"]');this.skuSearchBlock=$('[data-role=\"sku-search-block\"]');const nbManuals=Object.keys(this.manualsData).length;if(this.referenceData.length&&nbManuals>0){$('[data-role=\"product-sku\"]').html(this.referenceData);this.explainingText.hide();this.skuSearchForm.hide();this.skuSearchBtn.show();this.skuSearchBlock.addClass('_result');}\n$('[data-role=\"new-search-btn\"]').on('click',function(){$('[data-role=\"ref-error-message\"]').empty();this.refInput.val(null);this.explainingText.show();this.skuSearchForm.show();this.skuSearchBtn.hide();this.skuSearchBlock.removeClass('_result');}.bind(this));},_callAjax:function(url,callback){this.manualsData=[];$.ajax({url:url,type:'GET',dataType:'json',cache:true,success:function(res){this._updateData(res);if(callback&&typeof callback==='function'){callback();}}.bind(this),error:function(res){this._updateData(res.responseJSON);if(callback&&typeof callback==='function'){callback();}}.bind(this),});},_updateData(data){let success=false;if(data.hasOwnProperty('manuals')){success=true;this.manualsData=data.manuals;}\nif(data.hasOwnProperty('extented_manual')){success=true;this.extendedManualData=data.extented_manual;}\nif(data.hasOwnProperty('basic_functions_manual')){success=true;this.basicFunctionsManualData=data.basic_functions_manual;}\nif(data.hasOwnProperty('message')){this.errorMessage=data.message;this.refErrorMessage.html($t(this.errorMessage));}\nif(data.hasOwnProperty('reference')){this.referenceData=data.reference;}\nif(success){document.dispatchEvent(new CustomEvent('userManualDataSuccess',{detail:data}));}},_onSearchSubmit:function(e){e.preventDefault();const productReference=this.refInput.val().trim();$('[data-role=\"ref-error-message\"]').empty();if(productReference===''){this.refErrorMessage.html($t('Please enter your reference number'));$('[data-role=\"alert\"]').removeClass('show-error');return;}\nconst refUrl=this.options.ajaxUrl.replace('%1',productReference);
2this._callAjax(refUrl,this._hubWatchRefDisplay.bind(this));},_openGlobalUserManualModal:function(){const data=Object.values(this.options.globalJson.globalManualConfiguration).reduce((tab,val)=>{if(val.filename!=null&&val.filename!==''){tab.push({language_code:val.code,title:val.hub_title,language_label:val.label,url:val.filename});}\nreturn tab;},[]);this._openUserManualModal(data);},_openSingleUserManualModal:function(){this._openUserManualModal(this.manualsData);},_openUserManualModal:function(manuals){if(!manuals||!Object.keys(manuals).length){console.error(\"No user manuals\");return;}\nconst content=this.userManualModalTemplate({data:{manuals:manuals}});this.userManualModal.html(content);this._initSuggestedLanguage();this.userManualModal.closest('.modal-inner-content')[0].scrollTop=0;this.userManualModal.modal('openModal');},_initSuggestedLanguage:function(){let currentLang=navigator.language.replace(/\\-[A-Z]{2}/gm,'').replace('-','_');if(currentLang==='zh'){currentLang='zh_Hans';}\nlet currentElm=$(`.user-manual__pdf[data-lang=\"${currentLang}\"]`);if(!currentElm.length){currentElm=$(`.user-manual__pdf[data-lang=\"en\"]`);}\nif(currentElm.length){$('[data-role=\"manual-language-label\"]').text($('.language-label',currentElm).text());$('[data-role=\"manual-title\"]').text($('.title',currentElm).text());const btn=$('[data-role=\"manual-file\"]');const currBtn=$('.user-manual__btn',currentElm);btn.attr('href',currBtn.attr('href'));btn.attr('data-um-tracking-lang',currBtn.attr('data-um-tracking-lang'));}},_initInfoModal:function(id,trigger,modalClass){const infoModal=$(id);if(!infoModal.length){return;}\ninfoModal.modal({autoOpen:false,type:'popup',responsive:true,innerScroll:true,modalClass:`${modalClass} mobile-fullscreen fade-modal overlay-modal`,});
2$(trigger).on('click',function(){infoModal.modal('openModal');});},_initRefInput:function(){this.refInput.on('input',function(){$('[data-role=\"ref-error-message\"]').empty();let inputValue=$(this).val();let validValue=$(this).val().replace(/[^0-9.]/g,'');$(this).val(validValue);$('[data-role=\"alert\"]').toggleClass('show-error',inputValue!==validValue);});},_getUrlParam:function(name){let params=new URLSearchParams(window.location.search);return params.get(name);},_initTracking:function(){document.addEventListener('click',(e)=>{const link=e?.target?.closest('[data-um-tracking]')??null;if(link){this._onTrack(link);}});},_onTrack:function(link){const type=link.getAttribute('data-um-tracking');let gtmName=type;let gtmData=null;if(type==='user_manual_download'){if(this.options.currentSku===''){gtmName='operating_instructions_download';}\nlet lang=link.getAttribute('data-um-tracking-lang');let isSuggested=link.getAttribute('data-um-tracking-suggested')==='1';gtmData={item_id:this.options.currentSku,language:lang.toUpperCase(),isSuggested:isSuggested,}}else if(type==='find_your_user_manual'){let action=link.getAttribute('data-um-tracking-action');if(action==='reference_search'){let input=document.getElementById('reference-search');this.searchValue=input?input.value:'';}\nthis.options.currentSku=(action==='my_user_manual')?this.searchValue:'';gtmData={search_reference:(action==='reference_search')?this.searchValue:'',action:action,}}\nthis._trackGTM(gtmName,gtmData);},_trackGTM:function(name,data){if(data&&typeof window.dataLayer!==typeof undefined){window.dataLayer.push({event:name,...data});}}});return $.reflet.userManualPdf;});","Reflet_UserRecommendation/js/pdp-init.min.js":"define(['jquery','Reflet_UserRecommendation/js/utils/storage','jquery-ui-modules/widget',],function($,urStorage){\"use strict\";$.widget('reflet.userRecommendationPdpInit',{options:{collectEnabled:false,maxViewed:20,sku:'',productType:'',productData:{}},_create:function(){const sku=this.options.sku;const productType=this.options.productType;const productData=this.options.productData;if(!this.options.collectEnabled){urStorage.clearSectionData('productView');return;}\nif(!sku||this.options.maxViewed<=0){return;}\nthis._addItem(sku,productType,productData);document.addEventListener(\"visibilitychange\",()=>{if(!document.hidden){this._addItem(sku,productType,productData,false);}});},_addItem:function(sku,productType,productData,increment=true){const now=Math.floor(Date.now()/ 1000);const items=urStorage.getSectionData('productView',[]);const existing=items.find(item=>item.sku===sku);if(existing){existing.last_seen=now;existing.type=productType;existing.data=productData;existing.count+=(increment?1:0);}else{items.push({sku,last_seen:now,count:1,type:productType,data:productData});}\nitems.sort((a,b)=>b.last_seen-a.last_seen);urStorage.setSectionData('productView',items.slice(0,this.options.maxViewed));}});return $.reflet.userRecommendationPdpInit;});","Reflet_UserRecommendation/js/pdp-variations.min.js":"define(['jquery','underscore','Magento_Customer/js/customer-data','Reflet_UserRecommendation/js/utils/storage','Reflet_UserRecommendation/js/product-card-renderer','jquery-ui-modules/widget',],function($,_,customerData,urStorage,cardRenderer){\"use strict\";$.widget('reflet.userRecommendationPdpVariations',{options:{url:'',sourceLimit:3,minProducts:2,currentSku:'',storeCode:'',observerMargin:'200px',requestTimeout:15000,card:{listName:'dynamic_variations_pdp',},},_create:function(){if(!this.options.url||this.options.sourceLimit<1){return;}\nthis._observe();},_observe:function(){if(!('IntersectionObserver'in window)){this._load();return;}\nconst observer=new IntersectionObserver((entries)=>{if(entries.some(entry=>entry.isIntersecting)){observer.disconnect();this._load();}},{rootMargin:this.options.observerMargin});observer.observe(this.element[0]);},_load:function(){const sources=this._getTopSources();if(sources.length<this.options.sourceLimit){return;}\nconst hash=btoa(JSON.stringify({store:this.options.storeCode,sources:sources.slice().sort(),}));const cached=urStorage.getSectionData('pdpVariations',null);if(hash===urStorage.getSectionData('pdpVariationsHash','')&&this._isRenderable(cached)){this._render(cached);return;}\nthis._fetch(sources,hash);},_isRenderable:function(response){if(!response){return false;}\nif(!response.success){return true;}\nreturn Array.isArray(response.data)&&response.data.every(item=>item&&item.cta&&item.tracking);},_normalizeSku:function(sku){return String(sku).replace(/\\./g,'');},_getTopSources:function(){const scores={};
2urStorage.getSectionData('productView',[]).forEach((item)=>{if(!item.sku||(item.data&&item.data.is_watch===false)){return;}\nscores[this._normalizeSku(item.sku)]={sku:item.sku,score:item.count||0,lastSeen:item.last_seen||0,};});const cart=customerData.get('cart')();((cart&&cart.items)||[]).forEach((item)=>{if(!item.product_sku){return;}\nconst key=this._normalizeSku(item.product_sku);const entry=scores[key]||{sku:key,score:0,lastSeen:0};entry.score+=parseFloat(item.qty)||0;scores[key]=entry;});return Object.values(scores).sort((a,b)=>(b.score-a.score)||(b.lastSeen-a.lastSeen)).slice(0,this.options.sourceLimit).map(entry=>entry.sku);},_fetch:function(sources,hash){const controller=new AbortController();const timeoutId=setTimeout(()=>controller.abort(),this.options.requestTimeout);fetch(this.options.url,{method:'POST',headers:{'Content-Type':'application/json','X-Requested-With':'XMLHttpRequest'},body:JSON.stringify({sources:sources,current_sku:this.options.currentSku}),signal:controller.signal}).then((response)=>{clearTimeout(timeoutId);return response.json();}).then((response)=>{urStorage.setSectionData('pdpVariationsHash',hash);urStorage.setSectionData('pdpVariations',response);this._render(response);}).catch(()=>clearTimeout(timeoutId));},_render:function(response){if(!response||!response.success||!Array.isArray(response.data)){return;}\nconst currentSku=this._normalizeSku(this.options.currentSku);const items=response.data.filter(item=>item&&item.sku&&item.url&&this._normalizeSku(item.sku)!==currentSku);if(items.length<this.options.minProducts){return;}\nconst $list=this.element.find('.ow-product-list');if(!$list.length){return;}\n$list.html(items.map(item=>cardRenderer.renderSlide(item,this.options.card)).join(''));$list.trigger('contentUpdated');this._syncSlider();this._initTracking();},_syncSlider:function(){const slider=this.element.data('mageOwMod13');if(!slider||!slider.sliderInit){return;}\nslider.$items=this.element.find('.ow-slider__item');slider.$items.find('.ow-prod__desc-top').matchHeight({property:'min-height'});slider.$items.on('swatch.initialized',_.debounce(()=>$.fn.matchHeight._update(),50));slider.mainProductIndex=-1;slider.currentItemIndex=0;slider.savedSlideSnapIndex=0;if(slider.swiper){if(slider.swiperInit){slider.swiper.update();slider.swiper.slideTo(0,0);}else{slider.swiper.params.initialSlide=0;}}\n$.fn.matchHeight._update();},_initTracking:function(){const _self=this;const dlItems=[];let website=null,currency=null;this.element.find('.ow-product-list .ow-prod').each(function(){const productDl=$(this).find('.tracking-data').first().data('product-dl');const item=productDl?.ecommerce?.items?.[0];if(!item){return;}\ndlItems.push(item);website=website||productDl.ecommerce.website;currency=currency||productDl.ecommerce.currency;$(this).find('a').on('click',()=>_self._push(productDl));});if(!dlItems.length){return;}\nconst viewDl={event:'view_item_list',ecommerce:{website:website,items:dlItems}};if(currency){viewDl.ecommerce.currency=currency;}\nthis._push(viewDl);},_push:function(data){if(window.dataLayer){window.dataLayer.push(data);}}});return $.reflet.userRecommendationPdpVariations;});","Reflet_UserRecommendation/js/product-card-renderer.min.js":"define([],function(){\"use strict\";const ENTITIES={'&':'&','<':'<','>':'>','\"':'"',\"'\":'''};const DEFAULTS={listName:'',productClasses:'ow-prod--m-v ow-prod--t-v ow-prod--l-v ow-prod--l-v--small ow-prod--watch',greyBg:true,imageSizes:'(max-width: 1024px) 210px, (max-width: 1299px) 420px, 460px',imageWidths:[210,420,460],lazyLoad:true,};const escapeHtml=value=>String(value??'').replace(/[&<>\"']/g,char=>ENTITIES[char]);const toText=html=>{const doc=new DOMParser().parseFromString(String(html??''),'text/html');return(doc.body.textContent||'').replace(/\\s+/g,' ').trim();};const rawSku=sku=>String(sku??'').replace(/\\./g,'');const renderTags=(tags,hiddenText)=>{if(!Array.isArray(tags)||!tags.length){return'';}\nreturn`<div class=\"ow-prod__tags\">${tags.join('')}<span class=\"hidden\"> - ${escapeHtml(hiddenText)}</span></div>`;};const renderImage=(item,alt,options)=>{const url=escapeHtml(item.image_url);const srcset=options.imageWidths.map(width=>`${url}?w=${width} ${width}w`).join(', ');const pattern=options.imageWidths.map(width=>`%img?w=${width} ${width}w`).join(', ');return`<div class=\"ow-el__picture ow-prod__picture\"><span>`+`<img alt=\"${escapeHtml(alt)}\" sizes=\"${escapeHtml(options.imageSizes)}\"`+` data-img=\"${url}\" data-srcset-pattern=\"${escapeHtml(pattern)}\" srcset=\"${srcset}\"`+` src=\"${url}?w=${options.imageWidths[0]}\"${options.lazyLoad ? ' loading=\"lazy\"' : ''} />`+`</span></div>`;};const renderPrice=price=>{if(!price){return'';}\nreturn`<p class=\"price-box price-final_price\">`+`<span class=\"price-container price-final_price tax weee\">`+`<span class=\"price-wrapper\"><span class=\"price\">${escapeHtml(price)}</span></span>`+`</span></p>`;};const renderActions=(item,sku,hiddenText)=>{const cta=item.cta||{};const label=cta.label||'';const mobileLabel=cta.label_mobile||label;const buttonId=`ow-button-ur-${sku}`;const status=label.trim().toLowerCase().replace(/\\s+/g,'-');return`<div class=\"ow-prod__actions\">`+`<a class=\"ow-link-underline\" href=\"${escapeHtml(item.url)}\"`+` aria-labelledby=\"product-label-${buttonId}\" data-id=\"${buttonId}\" data-testing=\"ow-button-${sku}\">`+(cta.is_shop?'<span class=\"ico ico-shop\" aria-hidden=\"true\"></span>':'')\n+`<span data-testing=\"ow-button-${sku}-label\" data-testing-status=\"${escapeHtml(status)}\" class=\"label ow-font-bold ow-font-13\">`+`<span class=\"hidden-tablet\" data-role=\"desktop-label\">${escapeHtml(label)}</span>`+`<span class=\"hidden-large-desktop\" data-role=\"mobile-label\">${escapeHtml(mobileLabel)}</span>`+`</span>`+`<span id=\"product-label-${buttonId}\" class=\"hidden\">`+`<span data-role=\"desktop-label\">${escapeHtml(label)}</span> - ${escapeHtml(hiddenText)}</span>`+`</a></div>`;};const buildDataLayer=(item,listName)=>{const tracking=item.tracking;if(!tracking||!tracking.item){return null;}\nconst layer={event:'select_item',ecommerce:{website:tracking.website,items:[Object.assign({},tracking.item,{item_list_name:listName,quantity:1})],},};if(tracking.currency){layer.ecommerce.currency=tracking.currency;}\nreturn layer;};const renderTracking=(item,sku,fullName,options)=>{const layer=buildDataLayer(item,options.listName);return`<span class=\"tracking-data\" data-sku=\"${escapeHtml(item.sku)}\" data-real-sku=\"${sku}\"`+` data-name=\"${escapeHtml(fullName)}\"`+(layer?` data-product-dl=\"${escapeHtml(JSON.stringify(layer))}\"`:'')\n+` aria-hidden=\"true\" style=\"display: none\"></span>`;};return{render:function(item,options={}){const settings=Object.assign({},DEFAULTS,options);const sku=rawSku(item.sku);const fullName=[toText(item.collection),toText(item.name)].filter(
2Boolean).join(' ');const hiddenText=`${fullName} - ${sku}`;const prodClass=`${settings.productClasses}${settings.greyBg ? ' grey_bg' : ''}`;const tagsHtml=renderTags(item.tags,hiddenText);return`<div class=\"ow-prod ${escapeHtml(prodClass)}\" data-prod-id=\"listing-${sku}\">`+`<div class=\"ow-prod__cont followlink\">`+(settings.greyBg?tagsHtml:'')\n+`<div class=\"ow-prod__img\">`+`<a class=\"ow-prod__img-wrapper\" href=\"${escapeHtml(item.url)}\">${renderImage(item, hiddenText, settings)}</a>`+`</div>`+`<div class=\"ow-prod__desc\"><div class=\"ow-prod__desc-link followlink\">`+(settings.greyBg?'':tagsHtml)\n+`<div class=\"ow-prod__desc-top\">`+(item.collection?`<p class=\"collection ow-font-bold ow-font-upper\">${item.collection}</p>`:'')\n+(item.name?`<p class=\"name\">${item.name}</p>`:'')\n+`</div>`+renderPrice(item.price)\n+renderActions(item,sku,hiddenText)\n+`</div></div>`+`</div>`+renderTracking(item,sku,fullName,settings)\n+`</div>`;},renderSlide:function(item,options={}){return`<li class=\"ow-slider__item swiper-slide\" data-product-sku=\"${rawSku(item.sku)}\">`+this.render(item,options)\n+`</li>`;},rawSku:rawSku,};});","Reflet_UserRecommendation/js/product-list.min.js":"define(['jquery','Reflet_UserRecommendation/js/utils/storage','jquery-ui-modules/widget','mage/mage','owMod13','owModUtils',],function($,urStorage){\"use strict\";$.widget('reflet.userRecommendationProductList',{options:{enabled:0,minProducts:2,url:'',},_create:function(){if(!this.options.enabled){this._clearDom();return;}\nconst items=urStorage.getSectionData('productView',[]);if(items.length<this.options.minProducts){this._clearDom();return;}\nurStorage.fetchWithCache(this.options.url,'productViewCache',(response,fromCache)=>{if(response.success){if(fromCache){this.element.html(response.html);}else{this._fillHtml(response.data);}\nthis._initSlider();}else{this._clearDom();}},()=>this._clearDom());},_clearDom:function(){let tab=this.element.closest('[data-content-type=\"tab-item\"]');if(tab.length){let tabId=tab.attr('id');let tabLink=$(`a[href=\"#${tabId}\"]`);if(tabLink.length){tabLink.parent().remove();}\ntab.remove();}else{let mod=this.element.closest('[data-content-type=\"module_13\"]');if(mod.length){mod.remove();}else{this.element.remove();}}},_fillHtml:function(data){if(!data||!data.length||data.length<this.options.minProducts){this._clearDom();return;}\nlet html='';data.forEach(item=>{html+=`<li class=\"ow-slider__item swiper-slide\">${item.html}</li>`;});this.element.html(html);const cachedResponse=urStorage.getSectionData('productViewCache',null);if(cachedResponse&&cachedResponse.success){cachedResponse.html=html;urStorage.setSectionData('productViewCache',cachedResponse);}},_initSlider:function(){let mod13=this.element.closest('[data-content-type=\"module_13\"]');if(mod13){mod13.mage('owMod13',{flag:false,gridMode:false,mainProductSku:'',});mod13.initProductsTracking({selector:'.ow-prod__link-over, .ow-prod .action',productParentSelector:'.ow-prod'});}\nthis.element.addClass('_loaded');let _self=this;this.element.find('.ow-prod').each(function(){const productData=$(this).find('.tracking-data').data('product-dl');if(productData){$(this).find('a').on('click',function(e){_self._track(productData);});}});},_track:function(productData){if(window.dataLayer){window.dataLayer.push(productData);}}});return $.reflet.userRecommendationProductList;});","Reflet_UserRecommendation/js/utils/storage.min.js":"define(['jquery','underscore','jquery/jquery-storageapi',],function($,_){'use strict';const namespace='mage-customer-recommendation';const sections=['productView','productViewHash','productViewCache','pdpVariations','pdpVariationsHash'];const dynamicSections=new Set();let storage=null;function getStorage(){if(storage===null){storage=$.initNamespaceStorage(namespace).localStorage;}\nreturn storage;}\nfunction registerSection(section){if(!sections.includes(section)&&!dynamicSections.has(section)){dynamicSections.add(section);}}\nfunction isSectionAllowed(section){return sections.includes(section)||dynamicSections.has(section);}\nfunction getSectionData(section,defaultValue={}){if(!isSectionAllowed(section)){return defaultValue;}\ntry{const data=getStorage().get(section);return data??defaultValue;}catch(e){console.error(e);}\nreturn defaultValue;}\nfunction setSectionData(section,newData){if(!isSectionAllowed(section)){return;}\ntry{getStorage().set(section,newData);}catch(e){console.error(e);}}\nfunction clearSectionData(section){if(!isSectionAllowed(section)){return;}\ntry{getStorage().remove(section);}catch(e){console.error(e);}}\nfunction fetchWithCache(url,cacheKey,successCallback,errorCallback,cacheTTL=0){const rawItems=getSectionData('productView',[]);const items=rawItems.map(({data,...rest})=>rest);const hash=btoa(JSON.stringify({items,url}));const hashKey=cacheKey+'Hash';
2const ttlKey=cacheKey+'TTL';registerSection(cacheKey);registerSection(hashKey);if(cacheTTL>0){registerSection(ttlKey);}\nconst savedHash=getSectionData(hashKey,'');const cache=getSectionData(cacheKey,null);if(hash===savedHash&&cache){if(cacheTTL>0){const storedTs=getSectionData(ttlKey,0);if(storedTs&&Date.now()-storedTs<cacheTTL){successCallback(cache,true);return;}}else{successCallback(cache,true);return;}}\nconst controller=new AbortController();const timeoutId=setTimeout(()=>controller.abort(),15000);fetch(url,{method:'POST',headers:{'Content-Type':'application/json','X-Requested-With':'XMLHttpRequest'},body:JSON.stringify(items),signal:controller.signal}).then(response=>{clearTimeout(timeoutId);return response.json();}).then((response)=>{setSectionData(hashKey,hash);setSectionData(cacheKey,response);if(cacheTTL>0){setSectionData(ttlKey,Date.now());}\nsuccessCallback(response,false);}).catch((error)=>{clearTimeout(timeoutId);if(errorCallback){errorCallback(error);}});}\nreturn{namespace:namespace,getSectionData:getSectionData,setSectionData:setSectionData,clearSectionData:clearSectionData,fetchWithCache:fetchWithCache,};});","Reflet_VideoAppointment/js/ajax-add-to-video-appointment.min.js":"define(['jquery','underscore',\"mage/translate\",'Magento_Customer/js/customer-data','Magento_Ui/js/modal/modal','jquery-ui-modules/widget'],function($,_,$t,customerData,modal){'use strict';$.widget('reflet.ajaxAddToVideoAppointment',{options:{type:'appointment-products',selector:'[data-action=\"add-to-video-appointment\"]'},wait:false,_create:function(){if($(this.element).data('video-appointment-init')){return;}\n$(this.element).data('video-appointment-init',1);this._createModal();this.productsData=customerData.get(this.options.type);if(typeof this.productsData().items==='undefined'){customerData.reload([this.options.type],false);this.productsData=customerData.get(this.options.type);}\nthis.productsData.subscribe(this._updateButtons.bind(this));$(document).on(\"listingUpdated\",this._reloadButtons.bind(this));this._updateButtons(this.productsData());$('body').on('click',this.options.selector,this._handleClick.bind(this));},_createModal:function(){let modalContent='<div class=\"ow-va-modal\">'\n+'<p class=\"ow-va-modal__title ow-font-upper ow-font-red\" role=\"heading\" aria-level=\"2\" data-role=\"title\"></p>'\n+'<p class=\"ow-va-modal__text\"></p>'\n+'<a href=\"#\" class=\"ow-va-modal__link action red\"><span></span></a>'\n+'</div>';$('body').append('<div id=\"video-appointment-modal\" style=\"display:none;\">'+modalContent+'</div>');},_handleClick:function(e){e.preventDefault();e.stopPropagation();if(this.wait){return;}\nlet btn=$(e.currentTarget),dataPost=btn.data('post'),params=dataPost?dataPost.data:{},action=dataPost?dataPost.action:'';this._beforeSend(btn);params.form_key=window.cookieStorage.getItem('form_key');$.ajax({url:action,data:params,type:'post',dataType:'json',success:this._handleResponse.bind(this),error:this._handleResponse.bind(this)});},_beforeSend:function(btn){let active=btn.hasClass('_active');btn.attr('disabled','disabled');switch(btn.data('type')){case'listing':$('.label',btn).html(active?$t(\"Removing...\"):$t('Adding...'));break;case'product':$('.label',btn).html(active?$t(\"Redirecting...\"):$t('Adding...'));break;case'appointment-list':btn.closest('.ow-va-make__prod').addClass('_removing');break;}},_handleResponse:function(res){if(!res||!res.hasOwnProperty('success')){console.log('Error',res);return;}\nif(res.hasOwnProperty('shouldRedirect')&&res.shouldRedirect){window.location=res.redirectUrl;return;}\nif(res.hasOwnProperty('showMessage')&&res.showMessage){this._showMessage(res);}\nif(!res.success){this._reloadButtons();}},_reloadButtons:function(){this._updateButtons(this.productsData());},_updateButtons:function(data){if(!_.isArray(data.items)){return;}\nlet self=this;$(this.options.selector).each(function(){let btn=$(this),id=parseInt(btn.data('id'));self._updateButton(btn,data.items.indexOf(id)!==-1);});},_updateButton:function(btn,active){btn.removeAttr('disabled').toggleClass('_active',active);switch(btn.data('type')){case'listing':$('.label',btn).html(btn.data(active?'added-label':'label'));$('.label-hover',btn).html(btn.data(active?'added-label-hover':'label'));btn[0].setAttribute('aria-checked',active?'true':'false');break;case'product':$('.label',btn).html(btn.data('label'));btn[0].setAttribute('aria-checked',active?'true':'false');break;case'appointment-list':if(active){btn.closest('.ow-va-make__prod').removeClass('_removing');}\nbreak;}},_showMessage:function(res){let $modal=$(\"#video-appointment-modal\");$('.ow-va-modal__title',$modal).html(res.title);$('.ow-va-modal__text',$modal).html(res.message);$('.ow-va-modal__link span',$modal).html(res.buttonLabel);$('.ow-va-modal__link',$modal)[0].setAttribute('href',res.redirectUrl);modal({type:'popup',autoOpen:true,responsive:true,modalClass:'appointment-modal confirm-modal fade-modal overlay-modal',buttons:[]},$modal);}});return $.reflet.ajaxAddToVideoAppointment;});","Reflet_VideoAppointment/js/appointment-global-session-loader.min.js":"define(['Magento_Customer/js/customer-data'],function(customerData){'use strict';return function(){let appointmentProducts=customerData.get('appointment-products');customerData.getInitCustomerData().done(function(){if(!appointmentProducts().listUrl){customerData.reload(['appointment-products'],false);}});};});","Reflet_VideoAppointment/js/product-list.min.js":"define(['jquery','swiper','matchMedia','jquery-ui-modules/widget',],function($){'use strict';$.widget('videoAppointment.productList',{swiper:null,displayedItems:0,_create:function(){this.frame=$('.ow-va-products__list',this.element);this.slidee=$('.ow-va-products__items',this.frame);this.items=$('.ow-va-products__item',this.items);this._initEvents();},_initEvents:function(){let _self=this;mediaCheck({media:'(max-width: 639px)',entry:function(){_self.dis
2playedItems=1;_self._updateSlider();}});mediaCheck({media:'(min-width: 640px) and (max-width: 959px)',entry:function(){_self.displayedItems=2;_self._updateSlider();}});mediaCheck({media:'(min-width: 960px)',entry:function(){_self.displayedItems=3;_self._updateSlider();}});},_updateSlider:function(){let d=this.displayedItems,nbSlides=0,isInit=this.swiper!==null;this.items.each(function(){let $item=$(this),hiddenT=$item.hasClass('hidden-tablet'),hiddenM=hiddenT||$item.hasClass('hidden-mobile'),isSlide=d>2||(d===2&&!hiddenT)||!hiddenM;if(isSlide){nbSlides++;}\n$item.toggleClass('_slide',isSlide);$item.toggleClass('swiper-slide',isSlide);$item.toggleClass('swiper-slide--auto',isSlide);});if(isInit){this.swiper.update();}else if(nbSlides>d){this._initSlider();}},_initSlider:function(){this.swiper=new Swiper(this.frame[0],{slidesPerView:1,slidesPerGroup:1,spaceBetween:0,centeredSlides:1,centeredSlidesBounds:1,centerInsufficientSlides:1,breakpoints:{640:{slidesPerView:2,slidesPerGroup:2,},960:{slidesPerView:3,slidesPerGroup:3,}},pagination:{el:$('#appointment-products-pager')[0],type:'bullets'},});}});return $.videoAppointment.productList;});","Reflet_VideoAppointment/js/time-slot.min.js":"define(['jquery','underscore','vanillaCalendar','jquery-ui-modules/widget',],function($,_){'use strict';$.widget('videoAppointment.timeSlot',{options:{lang:'en',date:'',ajaxUrl:'',calendarData:''},minDate:null,maxDate:null,calendar:null,calendarData:{},enabledDays:[],loadedMonths:[],_create:function(){this.minDate=new Date();this.maxDate=new Date();this.maxDate.setMonth(this.maxDate.getMonth()+3);this.inputLanguage=document.getElementById('app_language');this.inputDate=document.getElementById('app_date');this.inputTime=document.getElementById('app_time_start');this.submit=document.getElementById('timeslot-submit');this.$slots=$('#time-slots',this.element);this.$slotsList=$('#time-slots-list',this.element);this.$slotsEmpty=$('#time-slots-empty',this.element);this._initEvents();this._initCalendar();this._updateCalendarData(this.options.calendarData);this.element.removeClass('_loading');},_initEvents:function(){this.element.on('click','[data-action=choose-time-slot]',this._handleClickTime.bind(this));this.$slotsList.on('change',this._handleChangeTime.bind(this));$(this.inputLanguage).on('change',this._handleChangeLang.bind(this));},_resetCalendarData:function(newDate){this.calendarData={};this.loadedMonths=[];this.enabledDays=[];this.calendar.settings.range.enabled=this.enabledDays;this.calendar.settings.selected.dates=[newDate];this.calendar.update();},_updateCalendarData:function(data){_.extend(this.calendarData,data);this.loadedMonths.push(this._getMonthDate(this.calendar.selectedYear,this.calendar.selectedMonth+1));this.loadedMonths=_.uniq(this.loadedMonths);for(const date of Object.keys(data)){let dateStr=this._getHyphenDate(date);if(new Date(dateStr)<=this.maxDate){this.enabledDays.push(dateStr);}}\nthis.calendar.settings.range.enabled=this.enabledDays;this.calendar.update();},_initCalendar:function(){let _self=this,todayStr=this._dateToISOString(this.minDate),endStr=this._dateToISOString(this.maxDate),currentDate=this.options.date??todayStr,selectedYear=parseInt(currentDate.substring(0,4)),selectedMonth=parseInt(currentDate.substring(5,7))-1;this.calendar=new VanillaCalendar('#time-slot-calendar',{date:{min:todayStr,max:endStr,},settings:{lang:this.options.lang,visibility:{daysOutside:false,disabled:true,},range:{disableAllDays:true,enabled:[]},selected:{dates:[currentDate],year:selectedYear,month:selectedMonth},},actions:{clickDay(e){let btn=e.target.hasAttribute('data-calendar-day')?$(e.target):$(e.target).closest('[data-calendar-day]');if(!btn.hasClass('vanilla-calendar-day__btn_selected')){_self._handleChangeDate(btn.data('calendar-day'));}},clickArrow(e,year,month){_self._handleChangeMonth(_self._getMonthDate(year,month+1));},}});this.calendar.init();},_handleChangeLang:function(){let monthDate=this._getMonthDate(this.calendar.selectedYear,this.calendar.selectedMonth+1),newDate=this._getHyphenDate(monthDate);if(this.calendar.selectedDates.length){let currentDate=this.calendar.selectedDates[0];if(new Date(currentDate).getMonth()===this.calendar.selectedMonth){newDate=currentDate;}}else if(new Date(newDate)<this.minDate){newDate=this._dateToISOString(this.minDate);}\nthis.inputDate.value=newDate;this.inputTime.value='';this.submit.disabled=true;this.$slotsList.html('');this._resetCalendarData(newDate);this._getTimeSlots(monthDate,true);},_handleChangeDate:function(newDate){this.inputDate.value=newDate;this.inputTime.value='';this.submit.disabled=true;this._updateTimeSlots(newDate);},_handleChangeMonth:function(monthDate){if(this.loadedMonths.indexOf(monthDate)===-1){this._getTimeSlots(monthDate,fal
2se);}},_handleChangeTime:function(){this._changeTime(this.$slotsList.find('button[aria-checked=true]'));},_handleClickTime:function(e){this._changeTime($(e.currentTarget));},_changeTime:function(slot){if(slot.length){this.inputTime.value=slot.attr('data-value');this.submit.disabled=false;}else{this.inputTime.value='';this.submit.disabled=true;}},_getTimeSlots:function(monthDate,updateTimeSlots){this.element.addClass('_loading');let params={form_key:window.cookieStorage.getItem('form_key'),date:monthDate,language:this.inputLanguage.value};$.ajax({url:this.options.ajaxUrl,data:params,type:'post',dataType:'json',success:function(res){this._getTimeSlotsSuccess(res,updateTimeSlots);}.bind(this),error:this._getTimeSlotsError.bind(this)});},_getTimeSlotsSuccess:function(res,update){let slots=res.hasOwnProperty('timeSlots')?res.timeSlots:[];this.element.removeClass('_loading');this._updateCalendarData(slots);if(update){this._updateTimeSlots(this.inputDate.value);}},_getTimeSlotsError:function(res){console.log(\"_getTimeSlotsError\");console.log(res);this.element.removeClass('_loading');},_updateTimeSlots:function(date){date=date.replaceAll('-','');let slots=this.calendarData.hasOwnProperty(date)?this.calendarData[date]:[],hasSlots=Array.isArray(slots)&&slots.length,focus=hasSlots?this.$slotsList:this.$slotsEmpty;this.$slots.toggleClass('_empty',!hasSlots);this.$slotsList.html('');if(hasSlots){slots.forEach(this._appendButton.bind(this));}\nif(this.$slotsList.data().hasOwnProperty('mageWcagRadioGroup')){this.$slotsList.wcagRadioGroup('updateRadios');}\nthis._focusElt(focus);},_appendButton:function(slot){this.$slotsList.append('<button type=\"button\" type=\"button\"'+' role=\"radio\" aria-checked=\"false\"'+' aria-label=\"'+slot['label']+'\" data-action=\"choose-time-slot\"'+' data-value=\"'+slot['value']+'\">'+slot['label']+'</button>');},_getMonthDate:function(year,month){return`${year}${String(month).padStart(2, '0')}01`;},_getHyphenDate:function(date){return`${date.substring(0,4)}-${date.substring(4,6)}-${date.substring(6,8)}`;},_dateToISOString:function(date){return date.toISOString().split('T')[0];},_focusElt:function(elt){elt.focus();},});return $.videoAppointment.timeSlot;});","Reflet_VideoAppointment/js/view/appointment-products.min.js":"define(['uiComponent','Magento_Customer/js/customer-data',],function(Component,customerData){'use strict';return Component.extend({initialize:function(){this._super();this.appointmentProducts=customerData.get('appointment-products');}});});","Reflet_VipProduct/js/pp-contact-vip-custom-watch-form.min.js":"define([\"jquery\",\"jquery-ui-modules/widget\"],function($){\"use strict\";$.widget('reflet.ppContactVipCustomWatchForm',{telField:\"#vip-cw-phone-input\",_create:function(){$('body').on(\"change\",'[name=\"contacted_by_phone\"]',$.proxy(function(e){if(e.target.id==='contacted_by_phone_yes'){this._showPhone();}else{this._hidePhone();}},this));},_showPhone:function(){const $telField=$(this.telField);$telField.show();const $telFieldInput=$telField.find(\"input\");$telFieldInput.removeAttr(\"disabled\");$telFieldInput.addClass(\"required\");},_hidePhone:function(){const $telField=$(this.telField);$telField.hide();const $telFieldInput=$telField.find(\"input\");$telFieldInput.attr(\"disabled\",\"disabled\");$telFieldInput.removeClass(\"required\");}});return $.reflet.ppContactVipCustomWatchForm;});","Reflet_VipProduct/js/pp-contact-vip-custom-watch.min.js":"define(['jquery','jquery-ui-modules/widget','Magento_Ui/js/modal/modal','mage/validation',],function($){'use strict';$.widget('reflet.ppContactVipCustomWatchModal',{modal:null,modalBtn:null,modalOptions:{},formContact:null,preventSubmit:true,_create:function(){this.storeForm=$('.ow-contact-vip-custom-watch__form');this.formContact=$('.contactVipCustomWatch-form');this.modal=$('.ow-contact-vip-custom-watch__modal');this.modalOptions={'autoOpen':false,'responsive':true,'innerScroll':false,'clickableOverlay':true,'buttons':[],'modalClass':'modal-right modal-contact-boutique','ariaHidden':false,'opened':this._modalOpened.bind(this),'closed':this._modalClosed.bind(this),};this.modal.modal(this.modalOptions);this._initEvents();},_initEvents:function(){let self=this;this.formContact.on('submit',$.proxy(this.submitForm,this));$('body').on('click','[data-role=\"toggle-modal-contact-vip-custom-watch\"]',function(){self.modal.modal(self.modalOptions).modal('openM
2odal');});},_modalOpened:function(){this.toggleForm('show');},_modalClosed:function(e){e.preventDefault();this.toggleForm('hide');this.toggleConfirmation('hide');},submitForm:function(e){let self=this;if(this.preventSubmit){e.preventDefault();if(this.formContact.validation('isValid')){this.preventSubmit=false;$('.contactVipCustomWatch-form input[name=\"product\"]').val($('body').attr('product-id'));let formData=this.formContact.serialize(),url=this.formContact.data('post-url');this.formContact.find('button[type=\"submit\"]').addClass('disabled').attr('disabled','disabled');$.ajax({type:'POST',url:url,data:formData?formData:null,}).done(function(response){if(response.success){self.toggleForm('hide');self.preventSubmit=true;self.formContact.find('button[type=\"submit\"]').removeClass('disabled').removeAttr('disabled');$('.ow-contact-vip-custom-watch__confirmed').show();if(response.newsletter_subscribe!==null&&response.newsletter_subscribe_message!==null){$('#vip-custom-watch-newsletter-message').html(response.newsletter_subscribe_message).show();}else{$('#vip-custom-watch-newsletter-message').html('').hide();}}else{$('.ow-contact-vip-custom-watch__form').html('<p>'+response.message+'</p>');}});}}},toggleForm:function(state){if(state==='show'){this.storeForm.show();}else{this.storeForm.hide();}},toggleConfirmation:function(state){if(state==='show'){$('.ow-contact-vip-custom-watch__confirmed').show();}else{$('.ow-contact-vip-custom-watch__confirmed').hide();}},});return $.reflet.ppContactVipCustomWatchModal;});","Reflet_Contact/js/contact-us-live-chat.min.js":"define(['jquery','mage/translate','cookie-reader','jquery-ui-modules/widget'],function($,$t,cookieReader){'use strict';$.widget('mage.contactUsLiveChat',{insideStatus:'waiting',cookiesAccepted:false,_create:function(){this.button=this.element[0].querySelector('[data-role=\"livechat-btn\"]');this.banner=this.element[0].querySelector('[data-role=\"livechat-banner\"]');this.bannerButton=this.element[0].querySelector('[data-role=\"cookie-action\"]');this._initCookies();this._initEvents();},_initEvents:function(){$(document).on(\"cookieUpdated\",this._onCookieUpdated.bind(this));document.addEventListener('cookie-updated',this._onCookieUpdated.bind(this));this.button.addEventListener('click',this._onClick.bind(this));},_initCookies:function(){this.cookiesAccepted=!!cookieReader(\"cookie_functional\");this._toggleCookieWarning(!this.cookiesAccepted);if(this.cookiesAccepted&&this.insideStatus==='waiting'){this.insideStatus='loading';this._initInside();setTimeout(()=>{if(this.insideStatus==='loading'){this._toggleInside(false);}},10000);}},_onCookieUpdated:function(){this.cookiesAccepted=!!cookieReader(\"cookie_functional\");this._toggleCookieWarning(!this.cookiesAccepted);if(this.cookiesAccepted&&this.insideStatus==='waiting'){window.location.reload();}},_initInside:function(){window._inside=window._inside||[];window._inside.push({\"action\":\"bind\",\"name\":\"chatavailable\",\"callback\":this._insideCallback.bind(this),});},_insideCallback:function(available){console.log('chatavailable',available);this.insideStatus=available?'available':'unavailable';this._toggleInside(available);},_onClick:function(){if(typeof insideFrontInterface!=='undefined'){insideFrontInterface.openChatPane(true);}else{console.error('insideFrontInterface is not defined');}},_toggleInside:function(available){let label=available?$t('Chat with us'):$t('No client advisor available');this.button.disabled=!available;this.button.innerHTML=`<span>${label}</span>`;},_toggleCookieWarning:function(show){if(show){this.banner.style.removeProperty('display');this.button.style.display='none';}else{this.button.style.removeProperty('display');this.banner.style.display='none';}\nthis.bannerButton.style.pointerEvents=show?'auto':'none';},});return $.mage.contactUsLiveChat;});","Reflet_ContactReservationRussia/js/russia-reservation-price.min.js":"define(['jquery',],function($,modal){\"use strict\";$.widget('reflet.russiaReservationPrice',{options:{urlGetPrice:\"\",productId:\"\",},isCalled:false,productPriceContainerId:'product-russia-price-',priceRevealWrapper:'.product-price-reveal-wrapper',priceInfoContainer:'.product-info-price',_create:function(){var _self=this,$priceContainer=$('#'+_self.productPriceContainerId+_self.options.productId);if(_self.isCalled||!_self.options.productId||!$priceContainer){return;}\n$.ajax({url:_self.options.urlGetPrice,async:false,type:'POST',data:'product_ids='+_self.options.productId,success:function(result){if(result.error){return}\nconst priceConfig=result['product-'+_self.options.productId];if(priceConfig.price>0){$priceContainer.html(priceConfig.priceFormated);}\nconst $priceInfoContainer=$(_self.priceInfoContainer);if($priceInfoContainer){$priceInfoContainer.removeClass('no-border')}\nconst $revealContainer=$(_self.priceRevealWrapper);if($revealContainer){$revealContainer.remove();}}});_self.isCalled=true;},});return $.mage.russiaReservationPrice;});","Reflet_Customer/js/change-address.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('reflet.changeAddress',{options:{addressContainerSelector:'[data-container=add-address-form]',changeAddressSelector:'[data-container=add-address]'},_create:function(){this.element.on('change',$.proxy(this._checkChoice,this));this._checkChoice();},_checkChoice:function(){if(this.element.is(':checked')){this._showAddress();}else{this._hideAddress();}},_showAddress:function(){$(this.options.addressContainerSelector).show();},_hideAddress:function(){$(this.options.addressContainerSelector).hide();}});return $.reflet.changeAddress;});","Reflet_Customer/js/refresh-customer.min.js":"define(['Magento_Customer/js/customer-data',],function(customerData){customerData.reload(['customer'],true);});","Reflet_Customer/js/require-field.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('reflet.requireField',{options:{fieldSelector:'#newsletter_language'},_create:function(){this._addRequired();},_addRequired:function(){let field=this.element.find(this.options.fieldSelector);if(field.length){field.addClass('required-entry');let id=field.attr(\"id\");if(id.length){this.element.find(\"[id=\"+id+\"]\").attr(\"aria-required\",true);this.element.find(\"[for=\"+id+\"]\").text(this.element.find(\"[for=\"+id+\"]\").text().trim()+\" *\");}}}});return $.reflet.requireField;});","Reflet_Customer/js/validation-mixin.min.js":"define(['jquery','jquery/validate','mage/translate','mage/mage'],function($){'use strict';
2return function(){$.validator.addMethod('validate-serial-number',function(value){return!(value.length>50)},$.mage.__(\"Maximum length of this field must be equal or less than %1 symbols.\").replace('%1',50));$.validator.addMethod('validate-watch-reference-number',function(value){if($.mage.isEmpty(value)){return true;}\nreturn/^[a-zA-Z\\d. -]{1,20}$/.test(value);},$.mage.__('Wrong Format for Reference (ie: 145.0022, CK 14.393, BA 145.006 - 66, 3590.50.00, 422.10.44.51.06.001, 2153046510300).'));$.validator.addMethod('validate-watch-serial-number',function(value){if($.mage.isEmpty(value)){return true;}\nreturn/^[a-zA-Z\\d.-]{1,10}$/.test(value);},$.mage.__('Wrong Format (ie: 85746955, 85.568.708, A000042, AB84632).'));}});","Reflet_Customer/js/validator-mixin.min.js":"define(['jquery','Magento_Checkout/js/model/postcode-validator'],function($,postcodeValidator){'use strict';var message=$.mage.__(\"Provided Zip/Postal Code is invalid. Example: %1.\");return function(validator){validator.addRule('validate-postcode-pattern',function(value){var countryId=window.checkoutConfig.defaultCountryId;var patterns=window.checkoutConfig.postCodes[countryId];function processList(data){var examples='';var i=0;$.each(data,function(index,value){var length=Object.keys(data).length;if(i===(length-1)){examples+=value.example;}else{examples+=value.example+'; ';}\ni++;});return examples;}\nif(countryId==='KR'&&patterns.hasOwnProperty('pattern_1')){delete patterns.pattern_1;}\nmessage=$.mage.__(\"Provided Zip/Postal Code is invalid. Example: %1.\").replace(\"%1\",processList(patterns));return $.mage.isEmptyNoTrim(value)||postcodeValidator.validate(value,countryId);},function(){return message;});return validator;}});","Reflet_GiftAutoProduct/js/model/gift-option.min.js":"define(['uiElement','underscore','Magento_Checkout/js/model/cart/cache',],function(uiElement,_){'use strict';var provider=uiElement();return function(optionSelected){return{optionSelected:optionSelected,itemId:'giftAutoProduct',initObservable:function(node,key){if(node&&!this.observables.hasOwnProperty(node)){this.observables[node]=[];}\nif(key&&this.observables[node].indexOf(key)===-1){this.observables[node].push(key);provider.observe(this.getUniqueKey(node,key));}},getUniqueKey:function(node,key){return node+'-'+key;},getSubmitParams:function(remove=false){return{gift_auto_product:remove?null:this.optionSelected,};},selectOption(selected){this.optionSelected=selected;},};};});","Reflet_GiftAutoProduct/js/view/cart/option.min.js":"define(['jquery','ko','underscore','mage/translate','uiComponent','Reflet_GiftAutoProduct/js/model/gift-option','Magento_GiftMessage/js/model/gift-options',],function($,ko,_,$t,Component,LunarOption,giftOptions,){'use strict';const CONFIG=window.giftOptionsConfig?.giftAutoProduct??{};const LEVEL='orderLevel';return Component.extend({defaults:{optionLabel:'',applyOptionLabel:'',optionImage:{mobileUrl:null,desktopUrl:null,url:null,alt:'',},},optionSelected:ko.observable(CONFIG?.optionSelected??false),model:{},_modal:null,initialize(){this._super();this.model=new LunarOption(this.optionSelected());giftOptions.options.subscribe(function(changes){_.each(changes,(change)=>{if(change.status==='added'){this._extendGiftMessageModel();this._applyOption();}});},this,'arrayChange');this._extendGiftMessageModel();this._applyOption();this._createPreviewModal();return this;},_createPreviewModal(){const $modal=$(`\n <div class='gift-product-preview'>\n <img alt='${this.optionImage.alt}' src='${this.optionImage.mobileUrl}' class='gift-product-preview-img _mobile' />\n <img alt='${this.optionImage.alt}' src='${this.optionImage.desktopUrl}' class='gift-product-preview-img _desktop' />\n </div>`,);$modal.modal({autoOpen:false,innerScroll:true,responsive:true,clickableOverlay:true,modalClass:'gift-product-preview overlay-modal','buttons':[],'closed':function(){$('body').removeClass('_has-modal');},});this._modal=$modal;},isActive(){return true;},_selectOption(){const selected=!this.optionSelected();this.model.selectOption(selected);this.optionSelected(selected);this.getGiftMessage().saveOptions();},_extendGiftMessageModel(){const giftMessage=giftOptions.getOptionByItemId(LEVEL);
2if(giftMessage){giftMessage.additionalOptions.push(this.model);}},_applyOption(){const option=CONFIG?.optionSelected??false;if(option!==true){return;}\nthis.optionSelected(option);const messageModel=giftOptions.getOptionByItemId(LEVEL);if(messageModel){messageModel.getObservable('additionalOptionsApplied')(true);}},getGiftMessage(){return this.containers[0];},showPreview(){this._modal.modal('openModal');$('body').addClass('_has-modal');},});});","Reflet_GiftAutoProduct/js/view/checkout/cart/totals/gift-product.min.js":"define(['Magento_Checkout/js/view/summary/abstract-total','Magento_Checkout/js/model/quote','Magento_Catalog/js/price-utils','Magento_Checkout/js/model/totals','mage/translate',],function(Component,quote,priceUtils,totals,$t){'use strict';return Component.extend({defaults:{template:'Reflet_GiftAutoProduct/checkout/cart/totals/gift-product',segmentKey:'gift_product',},totals:quote.getTotals(),isDisplayed:function(){return!!totals.getSegment(this.segmentKey);},getPureValue:function(){let price=0;if(this.totals()&&totals.getSegment(this.segmentKey)){price=totals.getSegment(this.segmentKey).value;}\nreturn price;},getValue:function(){return this.getFormattedPrice(this.getPureValue());},getLabel:function(){return totals.getSegment(this.segmentKey).title;},});},);","Reflet_GiftMessage/js/view/checkout/cart/totals/gift-message.min.js":"define(['Magento_Checkout/js/view/summary/abstract-total','Magento_GiftMessage/js/model/gift-message','mage/translate',],function(Component,GiftMessage,$t){'use strict';return Component.extend({model:{},level:'orderLevel',defaults:{template:'Reflet_GiftMessage/checkout/cart/totals/gift-message',title:$t('Gift message'),},initialize:function(){this._super();this.model=new GiftMessage(this.level);},getValue:function(){return this.getFormattedPrice(0);},isDisplayed:function(){return this.model.getObservable('alreadyAdded')();},});},);","Reflet_InformationMessage/js/popup-message.min.js":"define(['jquery','Magento_Customer/js/customer-data','mage/translate','Magento_Ui/js/modal/modal','mage/cookies','jquery/jquery-storageapi',],function($,customerData){'use strict';var retry;let urlParams=new URLSearchParams(window.location.search),utmNewsletter=urlParams.has('utm_source')&&urlParams.has('utm_medium')&&urlParams.get('utm_source')==='email'&&urlParams.get('utm_medium')==='newsletter';if(utmNewsletter){localStorage.setItem('visitedFromNewsletter',true);}\nlet visitedFromNewsletter=localStorage.getItem('visitedFromNewsletter');function isNewsletterHiddenPage(){var hasToHide=false,$body=$(\"body\"),newsletterHiddenPage=[\"checkout-cart-index\",\"checkout-index-index\",\"cms-no-route\",\"customer-account-create\",\"customer-account-login\",\"customer-account-edit\",\"myomega-contactus-index\",\"contactstore-contact-form\",\"omega_storelocator-contact-form\",\"omega_storelocator-index-index\",\"hide-newsletter-popin\",\"contactus-index-index\"];if($('[data-module-id=\"MOON_WATCH_PP\"]').length){return true;}\nnewsletterHiddenPage.forEach(function(className){hasToHide=$body.hasClass(className)||hasToHide;});return hasToHide||visitedFromNewsletter;}\nfunction isNewsletterClosePage(){var hasToClose=false,$body=$(\"body\"),newsletterClosePage=[\"newsletter-index-index\",\"newsletter-subscriber-validate\"];newsletterClosePage.forEach(function(className){hasToClose=$body.hasClass(className)||hasToClose;});return hasToClose;}\nfunction _loadPopupMessage(config){if(config.template===\"newsletter\"&&isNewsletterHiddenPage()){return;}\nvar savedCookie=$.cookieStorage.get('popup_message');if(savedCookie&&typeof savedCookie!=='undefined'){var savedData=savedCookie,now=Date.now();if(savedData.hasOwnProperty('locale')&&savedData.locale===config.locale){if(savedData.hasOwnProperty('time')&&(now-parseInt(savedData.time)<3600000)){if(savedData.hasOwnProperty('closed')&&savedData.closed===\"false\"){displayPopin(config,savedData);}\nreturn;}}}\n$.ajax({type:\"GET\",url:config.url,data:'',cache:true,contentType:\"application/json; charset=utf-8\",dataType:\"json\",success:function(data){data.locale=config.locale;data.time=Date.now();data.closed=\"false\";if(config.template===\"newsletter\"){data.seen=\"false\";}\nif(savedData&&savedData.hasOwnProperty('closed')&&savedData.closed===\"true\"&&savedData.hasOwnProperty(\"message\")&&savedData.message===data.message){data.closed=\"true\";}\n$.cookieStorage.set('popup_message',JSON.stringify(data));if(data.closed===\"false\"){displayPopin(config,data);}},error:function(){if(!retry){retry=true;_loadPopupMessage(config);}}});}\nfunction displayPopin(config,data){let customer=customerData.get('customer');if(config.template===\"newsletter\"){if(!isNewsletterHiddenPage()){if((customer().fullname===undefined||!customer().is_subscribed)&&!isNewsletterClosePage()){newsletterScrolling(config,data);}else{data.time=Date.now();data.closed=\"true\";$.cookieStorage.set('popup_message',JSON.stringify(data));}}}else{_showPopupMessage(config,data,config.delay);}}\nfunction newsletterScrolling(config,data){let body=$(\"body\");if(body.hasClass('_cookie-modal')){setTimeout(function(){newsletterScrolling(config,data);},2000);return;}\nconst specificStores=['us_en','gb_en','ca_en','ch_en','de','de_de','at_de','ch_de','fr','fr_fr','ca_fr','ch_fr','it','it_it','ch_it','es','es_es','nl','pt'];if(!specificStores.includes(config.locale)){let canScroll=body.height()-600>$(window).height();let stopScroll=false;if(canScroll){$(window).on(\"scroll\",function(){let scrollTop=$(this).scrollTop();let divTop=$('#popup-message').offset().top;if(!stopScroll&&scrollTop>=divTop){_showPopupMessage(config,data,config.delay);stopScroll=true;}});}else{_confDelayPopupMessage(config,data);}}else{_confDelayPopupMessage(config,data);}}\nfunction _confDelayPopupMessage(config,data){if(config.delay){_showPopupMessage(config,data,config.delay);}else{_showPopupMessage(config,data,0);}}\nfunction _showPopupMessage(config,data,delay){if(data&&typeof data!=='undefined'&&data.message.length>0){var modalClass='popup-message-modal',hidePage=true;switch(config.template){case'template_2':modalClass+=' popup-message-modal-2';hidePage=false;break;case'template_3':modalClass+=' popup-message-modal-3 overlay-modal';hidePage=window.matchMedia(\"(max-width: 959px)\").matches;break;case'newsletter':modalClass+=' popup-message-modal-3 popup-message-modal-newsletter overlay-modal';hidePage=window.matchMedia(\"(max-width: 959px)\").matches;break;default:modalClass+=' popup-message-modal-1 overlay-modal';break;}\nvar modalOptions={type:'popup',responsive:true,hidePage:hidePage,blockScroll:false,parentModalClass:(config.template===\"template_2\")?'':'_has-modal',buttons:[],modalClass:modalClass,closed:function(){data.time=Date.now();data.closed=\"true\";$.cookieStorage.set('popup_message',JSON.stringify(data));}};var popupdiv=$('<div />').appendTo('body').attr('style','display:none');popupdiv.attr('id','popup_message');popupdiv.attr('class','popup-message-modal-content');popupdiv.html(data.message);popupdiv.find('.pm-modal-icon').attr('aria-hidden');popupdiv.attr('tabindex','-1');modalOptions.focus=\".information-popup-content\";setTimeout(function(){if(config.template==='newsletter'&&$(\".overlay-modal._show\").length||data.seen===\"true\"||data.closed===\"true\"){return;}\npopupdiv.modal(modalOptions);
2popupdiv.trigger('openModal');popupdiv.on('modalopened',function(){data.seen=\"true\";$.cookieStorage.set('popup_message',JSON.stringify(data));});var popupBtn=popupdiv.find('.action');if(popupBtn.length>0){popupBtn.on(\"click keydown\",function(e){if(e.type==='click'||e.keyCode===13){popupdiv.trigger('closeModal');}});}},parseInt(delay*1000));}}\nreturn function(config,element){_loadPopupMessage(config);}});","Reflet_Legals/js/legals-popup.min.js":"define(['jquery','mage/url','mage/translate'],function($,$url,$t){$.widget('mage.legalsTermsPopup',{options:{termsToAccept:[],ajaxUrl:\"\",popupAjaxUrl:\"\",checkOnlyLoggedCustomers:true,ignoredRoutes:[],acceptedTimeout:60,declinedTimeout:3600},_create:function(){let self=this,$body=$('body');if(this._canShowPopin()){this._getUnacceptedLegals();}else{this.element.remove();}\n$body.on('click','[data-action=\"decline-legals\"]',function(e){e.preventDefault();e.stopPropagation();self.element.hide();self._createCookie('decline-legals','1',self.options.declinedTimeout);self._eraseCookie('accept-legals');});$body.on('click','[data-action=\"accept-legals\"]',function(e){e.preventDefault();e.stopPropagation();self._eraseCookie('decline-legals');self._createCookie('accept-legals','1',self.options.acceptedTimeout);$.ajax({url:self.options.ajaxUrl,data:'terms='+self.options.termsToAccept,type:'post',dataType:'json',cache:false,}).done(function(response){if(response.success){self.element.remove();}}).fail(function(error){console.log(JSON.stringify(error));});});},_createCookie:function(name,value,timeoutInMinutes){if(timeoutInMinutes>0||timeoutInMinutes===-1){let date=new Date();date.setTime(date.getTime()+(timeoutInMinutes*60*1000));let expires=\"; expires=\"+date.toGMTString();document.cookie=name+\"=\"+value+expires+\"; path=/\";}},_readCookie:function(name){let nameEQ=name+\"=\";let ca=document.cookie.split(';');for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)===' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)===0)return c.substring(nameEQ.length,c.length);}\nreturn null;},_eraseCookie:function(name){this._createCookie(name,\"\",-1);},_canShowPopin:function(){let customer=null;let cacheStorage=JSON.parse(localStorage.getItem('mage-cache-storage'));if(cacheStorage&&cacheStorage.hasOwnProperty('customer')){customer=cacheStorage['customer'];}\nif(this.options.checkOnlyLoggedCustomers&&customer&&!customer.hasOwnProperty('fullname')){this._eraseCookie('decline-legals');this._eraseCookie('accept-legals');return false;}\nif(this._readCookie('decline-legals')==='1'||this._readCookie('accept-legals')==='1'){return false;}\nlet currentUrl=window.location.href;for(const slug of this.options.ignoredRoutes){if(currentUrl.match('/'+slug+'/')){return false;}}\nreturn true;},_getUnacceptedLegals:function(){let self=this;$.ajax({url:self.options.popupAjaxUrl,type:'post',contentType:\"application/json\",headers:{Store:self.options.storeCode},cache:false,}).done(function(response){if(response.termsJson&&response.success){self._createLegalTerms(JSON.parse(response.termsJson));}else{self._eraseCookie('decline-legals');self._createCookie('accept-legals','1',self.options.acceptedTimeout);}}).fail(function(error){self.element.remove();console.log(JSON.stringify(error));});},_createLegalTerms:function(legals){if(!$(\".ow-legals__text_content\").length){console.log('.ow-cookie__text_content does not exists');return;}\nif(legals.length>0){let content=$('.ow-legals__text_content'),termsToSend='';content.empty();legals.forEach(function(legal,i,terms){let a=$('<a></a>').append($t(legal.title))\na.attr(\"href\",$url.build(legal.identifier));content.append(a);(i===terms.length-1)?content.append(' '):content.append(', ');termsToSend+=legal.identifier;termsToSend+=((i===terms.length-1)?\" \":\", \");});this.options.termsToAccept=termsToSend;this.element.show();}else{this.element.remove();}}});return $.mage.legalsTermsPopup;});","Reflet_Localization/js/localization.min.js":"(function($){'use strict';$.fn.initLocalization=function(params){var options=$.extend({urlNoRoute:\"\",urlUserHeader:\"\",attributeName:\"\",itemTypeAttributeName:\"\",counterTypeAttributeName:\"\",counterTextAttributeName:\"\",counterAttributeName:\"\",counterNullableAttributeName:\"\"},params);return this.each(function(){var userCountryHeader=null,body=$('body');if(isRestricted()){process(true);}else{triggerEvent();}\n$(document).on('localizeElements',function(){if(isRestricted()){process(false);}});function triggerEvent(){body.addClass(\"localized\");$(document).trigger('localized');}\nfunction isRestricted(){return $('['+options.attributeName+']').length>0;}\nfunction getURLQueryParams(){var match,pl=/\\+/g,search=/([^&=]+)=?([^&]*)/g,decode=function(s){return decodeURIComponent(s.replace(pl,\" \"));}
2,query=window.location.search.substring(1),urlParams={};while(match=search.exec(query)){urlParams[decode(match[1])]=decode(match[2]);}\nreturn urlParams;}\nfunction getUserLocation(event){var params=getURLQueryParams(),cookieEnabled=navigator.cookieEnabled;if(cookieEnabled&¶ms.hasOwnProperty('fmc')){localStorage.setItem(\"mage-ak-country\",String(params['fmc']+\"|\"+Date.now()));}\nvar storage=cookieEnabled&&localStorage.getItem(\"mage-ak-country\");if(storage){var time=Date.now(),data=storage.split(\"|\");if(time-data[1]>3600000){localStorage.removeItem(\"mage-ak-country\");}else{userCountryHeader=data[0];}}\nif(userCountryHeader){process(event);}else{$.ajax({url:options.urlUserHeader,async:true,success:function(result){if(result.length===2){userCountryHeader=result;localStorage.setItem(\"mage-ak-country\",String(result+\"|\"+Date.now()));}else{userCountryHeader=\"-\";}\nprocess(event);},error:function(){userCountryHeader=\"-\";process(event);}});}}\nfunction process(event){if(!userCountryHeader){getUserLocation(triggerEvent);}else{if(body.attr(options.attributeName)){var refusedCountriesBody=body.attr(options.attributeName).split(',');if(userCountryHeader===\"-\"||refusedCountriesBody.indexOf(userCountryHeader)!==-1){window.location.href=options.urlNoRoute;}}\n$('['+options.attributeName+']').each(function(index,elt){processElement($(elt));});reorderListItems();if(event){triggerEvent();}else{$(document).trigger('reLocalized');}}}\nfunction processElement($elt){var refusedCountriesElem=$elt.attr(options.attributeName).split(',');if(!userCountryHeader||refusedCountriesElem.indexOf(userCountryHeader)>=0){var eltType=$elt.attr(options.itemTypeAttributeName);if(typeof eltType!==typeof undefined&&eltType!==false){var globalCounter=$('['+options.counterTypeAttributeName+'=\"all\"]');var globalDecrement=0;$('['+options.counterTypeAttributeName+'=\"'+eltType+'\"]').each(function(index,elt){var counter=$(elt),counterVal=counter.attr(options.counterAttributeName),counterTxt=counter.attr(options.counterTextAttributeName);if(typeof counterVal!==typeof undefined&&counterVal!==false&&typeof counterTxt!==typeof undefined&&counterTxt!==false){counterVal=Math.max(0,(counterVal-1));counter.html(counterTxt.replace('%1',counterVal.toString()));counter.attr(options.counterAttributeName,counterVal);if(counterVal===0&&counter.attr(options.counterNullableAttributeName)==='false'){counter.parent().remove();}\nglobalDecrement++;}});if(globalDecrement>0&&globalCounter.length>0){var globalCounterVal=globalCounter.attr(options.counterAttributeName),globalCounterTxt=globalCounter.attr(options.counterTextAttributeName),globalCounterNull=globalCounter.attr(options.counterNullableAttributeName);if(typeof globalCounterVal!==typeof undefined&&globalCounterVal!==false&&typeof globalCounterTxt!==typeof undefined&&globalCounterTxt!==false){globalCounterVal=Math.max(0,(globalCounterVal-globalDecrement));globalCounter.html(globalCounterTxt.replace('%1',globalCounterVal.toString()));globalCounter.attr(options.counterAttributeName,globalCounterVal);if(globalCounterVal===0&&globalCounterNull===\"false\"){globalCounter.parent().remove();var noResults=$('.omega-mainsearch-items:eq(0)');if(noResults.length>0){var noResultsTxt=noResults.attr('data-no-result-text');if(typeof noResultsTxt!==typeof undefined&&noResultsTxt!==false){noResults.removeClass('items').removeClass('scroll').addClass('no-items').html('<span>'+noResults.attr('data-no-result-text')+'</span>');}}}}}}\n$elt.remove();}}\nfunction reorderListItems(){let listPages=$(\"#product-list .product-items\");let itemSel='li';if(!listPages.length){return;}\nfor(let i=0;i<(listPages.length-1);i++){let list=$(listPages[i]);let items=list.children(itemSel);if(items.length>0){let missing=getMissingProducts(items.length);if(missing>0){$(listPages[i+1]).children(itemSel).slice(0,missing).appendTo(list);}}}}\nfunction getMissingProducts(nb){let missing=0;while(!(nb%2===0&&nb%3===0&&nb%4===0)){nb++;missing++;}\nreturn missing;}});};})(jQuery);","Reflet_Newsletter/js/action/login.min.js":"define(['jquery','mage/storage','Magento_Ui/js/model/messageList','Magento_Customer/js/customer-data','mage/translate'],function($,storage,globalMessageList,customerData,$t){'use strict';var callbacks=[],action=function(loginData,redirectUrl,isGlobal,messageContainer,loginSilently){messageContainer=message
2Container||globalMessageList;let customerLoginUrl='nl-ajax-login';if(loginData.customerLoginUrl){customerLoginUrl=loginData.customerLoginUrl;delete loginData.customerLoginUrl;}\nreturn storage.post(customerLoginUrl,JSON.stringify(loginData),isGlobal).done(function(response){callbacks.forEach(function(callback){callback(loginData);});if(response.errors){messageContainer.addErrorMessage(response);}else{customerData.invalidate(['customer']);if(response.redirectUrl){window.location.href=response.redirectUrl;}else if(redirectUrl){window.location.href=redirectUrl;}else{if(loginSilently){customerData.reload(['customer'],true);$(document).trigger('ajax:silentLoginSuccessfull');}else{location.reload();}}}}).fail(function(){messageContainer.addErrorMessage({'message':$t('Could not authenticate. Please try again later')});callbacks.forEach(function(callback){callback(loginData);});});};action.registerLoginCallback=function(callback){callbacks.push(callback);};return action;});","Reflet_Newsletter/js/view/form/element/email.min.js":"define(['jquery','uiComponent','ko','Magento_Customer/js/model/customer','Magento_Customer/js/action/check-email-availability','Reflet_Newsletter/js/action/login','Magento_Checkout/js/model/quote','Magento_Checkout/js/checkout-data','Magento_Checkout/js/model/full-screen-loader','mage/url','mage/validation'],function($,Component,ko,customer,checkEmailAvailability,loginAction,quote,checkoutData,fullScreenLoader,urlBuilder){'use strict';var validatedEmail;if(window.newsletter.email&&window.newsletter.email.length){checkoutData.setInputFieldEmailValue(window.newsletter.email);checkoutData.setValidatedEmailValue(window.newsletter.email);}\nvalidatedEmail=checkoutData.getValidatedEmailValue();if(validatedEmail&&!customer.isLoggedIn()){quote.guestEmail=validatedEmail;}\nreturn Component.extend({defaults:{template:'Magento_CustomerCustomAttributes/form/element/email',email:checkoutData.getInputFieldEmailValue(),emailFocused:false,isLoading:false,isPasswordVisible:false,listens:{email:'emailHasChanged',emailFocused:'val
2idateEmail'},ignoreTmpls:{email:true}},checkDelay:2000,checkRequest:null,isEmailCheckComplete:null,isCustomerLoggedIn:customer.isLoggedIn,forgotPasswordUrl:window.checkoutConfig.forgotPasswordUrl,emailCheckTimeout:0,initConfig:function(){this._super();var self=this;var verifyEmail=setInterval(function(){clearInterval(verifyEmail);if(self.email()){self.checkEmailAvailability();window.newsletter=[];if(self.email().trim().length){self.showEmailConfirm();}else{self.hideEmailConfirm();}}},500);this.isPasswordVisible=this.resolveInitialPasswordVisibility();if(this.isPasswordVisible){this.lockForm();}\nreturn this;},initObservable:function(){this._super().observe(['email','emailFocused','isLoading','isPasswordVisible']);return this;},emailHasChanged:function(){var self=this;clearTimeout(this.emailCheckTimeout);if(self.validateEmail()){quote.guestEmail=self.email();checkoutData.setValidatedEmailValue(self.email());}\nif(self.email().trim().length){self.showEmailConfirm();}else{self.hideEmailConfirm();}\nthis.emailCheckTimeout=setTimeout(function(){if(self.validateEmail()){self.checkEmailAvailability();}else{self.isPasswordVisible(false);self.unlockForm();}},self.checkDelay);checkoutData.setInputFieldEmailValue(self.email());},lockForm:function(){$(\".form-create-account .control, .form-create-account .control-label\").each(function(i,e){$(e).addClass('_disabled');});$(\".form-create-account button, .form-create-account select, .form-create-account input\").not(':disabled').each(function(i,e){$(e).prop('disabled',true).attr('data-disabled','1');});},unlockForm:function(){$(\".form-create-account .control, .form-create-account .control-label\").each(function(i,e){$(e).removeClass('_disabled');});$(\".form-create-account button, .form-create-account select, .form-create-account input\").filter('[data-disabled=\"1\"]').each(function(i,e){$(e).prop('disabled',false).removeAttr('data-disabled');});},showEmailConfirm:function(){$(\".form-create-account .field.email-confirmation\").fadeIn();},hideEmailConfirm:function(){$(\".form-create-account .field.email-confirmation\").fadeOut();},checkEmailAvailability:function(){this.validateRequest();this.isEmailCheckComplete=$.Deferred();this.isLoading(true);this.checkRequest=checkEmailAvailability(this.isEmailCheckComplete,this.email());$.when(this.isEmailCheckComplete).done(function(){this.isPasswordVisible(false);checkoutData.setCheckedEmailValue('');this.unlockForm();}.bind(this)).fail(function(){this.isPasswordVisible(true);checkoutData.setCheckedEmailValue(this.email());this.lockForm();}.bind(this)).always(function(){this.isLoading(false);}.bind(this));},validateRequest:function(){if(this.checkRequest!=null&&$.inArray(this.checkRequest.readyState,[1,2,3])){this.checkRequest.abort();this.checkRequest=null;}},validateEmail:function(focused){var loginFormSelector='form[data-role=email-with-possible-login]',usernameSelector=loginFormSelector+' input[name=username]',loginForm=$(loginFormSelector),validator,valid;loginForm.validation();if(focused===false&&!!this.email()){valid=!!$(usernameSelector).valid();if(valid){$(usernameSelector).removeAttr('aria-invalid aria-describedby');}\nreturn valid;}\nif(loginForm.is(':visible')){validator=loginForm.validate();return validator.check(usernameSelector);}\nreturn true;},login:function(loginForm){var loginData={},formDataArray=$(loginForm).serializeArray();formDataArray.forEach(function(entry){loginData[entry.name]=entry.value;});if(this.isPasswordVisible()&&$(loginForm).validation()&&$(loginForm).validation('isValid')){fullScreenLoader.startLoader();loginAction(loginData,urlBuilder.build('customer/account/edit#to-newsletter-subscription')).always(function(){fullScreenLoader.stopLoader();});}},resolveInitialPasswordVisibility:function(){if(checkoutData.getInputFieldEmailValue()!==''&&checkoutData.getCheckedEmailValue()!==''){return true;}\nif(checkoutData.getInputFieldEmailValue()!==''){return checkoutData.getInputFieldEmailValue()===checkoutData.getCheckedEmailValue();}\nreturn false;}});});","Reflet_PriceRates/js/customerServicePricerates.min.js":"define(['jquery'],function($){'use strict';$.widget('customerServicePricerates.localize',{options:{priceProducts:{},ajaxUrl:''},items:null,_create:function(){this.items=$('.localized-price');let ids=[];if(this.items.length>0){this.items.each($.proxy(function(i,elt){var id=$(elt).data(\"price\");if(id&&id!==''){if(this.options.priceProducts[id]!==undefined){ids.push(this.options.priceProducts[id]);$(elt).data(\"price-id\",this.options.priceProducts[id]);}}},this));}\nids=[...new Set(ids)];if(ids.length>0){const self=this;fetch(this.options.ajaxUrl,{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded','X-Requested-With':'XMLHttpRequest'},body:'product_ids='+ids.join(',')}).then(response=>response.json()).then(data=>{if(data&&data!==\"\"&&!data.error){self._updatePrices(data);}});}},_updatePrices:function(data){this.items.each($.proxy(function(i,elt){var id=$(elt).data(\"price-id\");if(id&&id!==''){if(data['product-'+id]!==undefined){$(elt).html(data['product-'+id]['priceFormated']);}}},this));}});return $.customerServicePricerates.localize;});"} 3}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.