PageSourceSearch

https://www.hepco-becker.de/theme/e2c74d825a6d2d529bd4f45ca4f4554c…/mollie-payments.js?1790933548

js hepco-becker.de collected 2026-10-04 05:33:24 UTC 25,410 bytes, 1 lines download raw bytes

1(()=>{var q="application/json",f=class{get(t,e=null,n=null,o=q){this.send("GET",t,null,e,n,o)}post(t,e=null,n=null,o=null,i=q){this.send("POST",t,e,n,o,i)}send(t,e,n=null,o=null,i=null,s=q){let r=new XMLHttpRequest;r.open(t,e),r.setRequestHeader("Content-Type",s),r.onload=function(){let a=r.getResponseHeader("content-type"),u="response"in r?r.response:r.responseText,c=u;if(a&&a.indexOf("application/json")>-1)try{c=JSON.parse(u)}catch(w){typeof i=="function"&&i(w);return}typeof o=="function"&&o(c)},r.onerror=function(){!i||typeof i!="function"||i()},r.send(n)}};var d=class{static options={};constructor(t,e={},n="Plugin"){this.el=t,this._pluginName=n,this._listeners=[],this.options=this._mergeOptions(e),this.init()}_addListener(t,e,n,o=!1){!t||typeof t.addEventListener!="function"||(t.addEventListener(e,n,o),this._listeners.push({target:t,type:e,handler:n,options:o}))}destroy(){this._listeners.forEach(function(t){t.target.removeEventListener(t.type,t.handler,t.options)}),this._listeners=[]}_mergeOptions(t){let e=this._pluginName.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase(),n={};if(this.el&&typeof this.el.getAttribute=="function"){let o=this.el.getAttribute(`data-${e}-options`);if(o)try{n=JSON.parse(o)}catch(i){console.error(`[MolliePlugin] Could not parse data-${e}-options`,i)}}return Object.assign({},this.constructor.options,t,n)}init(){}};var j="d-none",v=class extends d{static options={newCardMandateOption:null,mollieCreditCardFormClass:".mollie-components-credit-card",mollieCreditCardMandateInput:'input[name="mandateId"]',mollieShouldSaveCardDetailInput:'input[name="mollieShouldSaveCardDetail"]'};init(){this.client=new f,this._fixShopUrl()}registerMandateEvents(){let{newCardMandateOption:t}=this.options;t&&(this.mollieCreditCarfFormEl=document.querySelector(this.options.mollieCreditCardFormClass),this.mollieCreditCardMandateEls=document.querySelectorAll(this.options.mollieCreditCardMandateInput),!(!this.mollieCreditCarfFormEl||!this.mollieCreditCardMandateEls)&&this._registerRadioButtonsEvent())}_fixShopUrl(){this.options.shopUrl!=null&&this.options.shopUrl.substr(-1)==="/"&&(this.options.shopUrl=this.options.shopUrl.substr(0,this.options.shopUrl.length-1))}_registerRadioButtonsEvent(){this.onMandateInputChange(this.getMandateCheckedValue()),this.mollieCreditCardMandateEls.forEach(t=>{t.addEventListener("change",()=>{this.onMandateInputChange(this.getMandateCheckedValue())})})}getMandateCheckedValue(){let t=document.querySelector(`${this.options.mollieCreditCardMandateInput}:checked`);return!t||!t.value?null:t.value}isValidSelectedMandate(t){return t&&t!==this.options.newCardMandateOption}shouldSaveCardDetail(){let t=document.querySelector(this.options.mollieShouldSaveCardDetailInput);return t?t.checked:!1}onMandateInputChange(t){if(t===this.options.newCardMandateOption){this.mollieCreditCarfFormEl.classList.remove(j);return}t!==null&&this.mollieCreditCarfFormEl.classList.add(j)}};var M=class{constructor(t){this._document=t}getPaymentForm(){return this._document.querySelector("#changePaymentForm")}getConfirmForm(){return this._document.querySelector("#confirmOrderForm")}getSubmitButton(){let t=this._document.querySelector("#confirmFormSubmit");return t===null&&(t=this._document.querySelector('#confirmOrderForm button[type="submit"]')),t}};var X="#cardHolder",K="div.mollie-components-credit-card",Z='#changePaymentForm input[type="radio"]',H="error",Q="is-focused",I=class extends v{static options={...v.options,paymentId:null,customerId:null,locale:null,profileId:null,shopUrl:null,testMode:!0};init(){super.init();try{let t=new M(document);this._paymentForm=t.getPaymentForm(),this._confirmForm=t.getConfirmForm(),this._confirmFormButton=t.getSubmitButton()}catch{console.error("Mollie Credit Card components: Required HTML elements not found on this page!");return}this._initializeComponentInstance(),this._registerEvents(),this.registerMandateEvents()}_initializeComponentInstance(){let t=document.querySelector(X);document.querySelector(K)&&t&&!window.mollieComponentsObject&&(window.mollieComponentsObject=Mollie(this.options.profileId,{locale:this.options.locale,testmode:this.options.testMode}),window.mollieComponents={}),this.createComponentsInputs()}_registerEvents(){this._confirmForm!==null&&this._confirmForm.addEventListener("submit",this.submitForm.bind(this))}_reactivateFormSubmit(){this._confirmForm.dispatchEvent(new CustomEvent("removeLoader"))}getDefaultProperties(){return{styles:{base:{backgroundColor:"#fff",fontSize:"14px",padding:"10px 10px","::placeholder":{color:"rgba(68, 68, 68, 0.2)"}},valid:{color:"#090"},invalid:{backgroundColor:"#fff1f3"}}}}getInputFields(){return{cardHolder:{name:"cardHolder",id:"#cardHolder",errors:"cardHolderError"},cardNumber:{name:"cardNumber",id:"#cardNumber",errors:"cardNumberError"},expiryDate:{name:"expiryDate",id:"#expiryDate",errors:"expiryDateError"},verificationCode:{name:"verificationCode",id:"#verificationCode",errors:"verificationCodeError"}}}createComponentsInputs(){let t=this,e=[this.getInputFields().cardHolder,this.getInputFields().cardNumber,this.getInputFields().expiryDate,this.getInputFields().verificationCode];window.mollieComponentsObject&&e.forEach((n,o,i)=>{let s=this._mountMollieComponent(n.id,n.name);i[o][n.name]=s,s.addEventListener("change",r=>{let a=document.getElementById(`${n.name}`),u=document.getElementById(`${n.errors}`);r.error&&r.touched?(a.classList.add(H),u.textContent=r.error):(a.classList.remove(H),u.textContent="")}),s.addEventListener("focus",()=>{t.setFocus(`${n.id}`,!0)}),s.addEventListener("blur",()=>{t.setFocus(`${n.id}`,!1)})})}_mountMollieComponent(t,e){return window.mollieComponents[e]?window.mollieComponents[e].unmount():window.mollieComponents[e]=window.mollieComponentsObject.createComponent(e,this.getDefaultProperties()),window.mollieComponents[e].mount(t),window.mollieComponents[e]}setFocus(t,e){document.querySelector(t).classList.toggle(Q,e)}async submitForm(t){if(t.defaultPrevented)return;let e=this,n=this._confirmForm,o=document.querySelector(`${Z}[value="${this.options.paymentId}"]`);if((o==null||o.checked===!1)&&this._confirmForm||o&&o.checked===!1)return;t.preventDefault();let i=this.getMandateCheckedValue();if(this.isValidSelectedMandate(i)){this.client.post(e.options.shopUrl+"/mollie/components/store-mandate-id/"+e.options.customerId+"/"+i,null,()=>{e.continueShopwareCheckout(n)},()=>{e.continueShopwareCheckout(n)},"application/json; charset=utf-8");return}let s=document.getElementById(`${this.getInputFields().verificationCode.errors}`);s.textContent="";let{token:r,error:a}=await window.mollieComponentsObject.createToken();if(a){s.textContent=a.message,this._reactivateFormSubmit(),s.scrollIntoView();return}document.getElementById("cardToken").setAttribute("value",r),e.continueShopwareCheckout(n)}continueShopwareCheckout(t){t.submit()}};var h=class{constructor(t){this._document=t}findClosestShopwareBuyButton(t){let e=this.findClosestBuyBox(t);return e===null?null:e.querySelector(".btn-buy")}findClosestApplePayContainer(t){return t.closest(".mollie-apple-pay-direct")}findClosestBuyBox(t){let e=t.closest(".product-action");return e===null&&(e=t.closest(".product-detail-form-container")),e===null&&(e=t.closest(".offcanvas-cart-actions")),e===null&&(e=t.closest(".checkout-aside-container")),e===null&&(e=t.closest(".checkout-main")),e}findAllExpressButtons(t,e=null){let n=".mollie-express-button";return e!==null&&(n+=e),t.querySelectorAll(n)}findApplePayButtons(){return this._document.querySelectorAll(".mollie-express-button.js-apple-pay")}findApplePayContainers(){return this._document.querySelectorAll(".js-apple-pay-container")}findPayPalExpressButtons(){return this._document.querySelectorAll(".js-mollie-paypal-button")}findClosestPrivacyBox(t){let e=this.findClosestBuyBox(t);return e===null?null:e.querySelector(".mollie-privacy-note")}getPrivacyBoxCheckbox(t){return t.querySelector('input[name="acceptedDataProtection"]')}};var A="d-none",$="is-invalid",Y="js-mollie-observed",_=class{constructor(t){this._repoBuyBox=new h,this._document=t}initCheckbox(){let t=this._document.querySelectorAll(`.mollie-privacy-note:not(.${Y})`);for(let e=0;e<t.length;e++){let n=t[e];n.classList.remove(A),n.classList.add(Y);let o=this._repoBuyBox.findClosestBuyBox(n);if(o===null){n.classList.add(A);continue}let i=this._repoBuyBox.findAllExpressButtons(o,null);if(i.length===0){n.classList.add(A);continue}for(let s=0;s<i.length;s++){let r=i[s];new MutationObserver(u=>{let c=i.length;n.classList.remove(A),u.forEach(w=>{w.target.classList.contains(A)&&c--}),c<=0&&n.classList.add(A)}).observe(r,{attributes:!0,attributeFilter:["class"]})}}}validateForExpressButton(t){let e=this._repoBuyBox.findClosestPrivacyBox(t);if(!(e instanceof HTMLDivElement))return!0;let n=this._repoBuyBox.getPrivacyBoxCheckbox(e),o=n.checked?1:0;return n.classList.remove($),o===0?(n.classList.add($),!1):!0}};
1var C=class{addEventListenerOnce(t,e,n="click"){let o="__handler_"+n;t[o]||(t.addEventListener(n,e),t[o]=!0)}};var E=class{register(t,e){let n=window.PluginManager.getPluginList().OffCanvasCart;if(!n)return;let o=n.get("instances");if(o)for(let i=0;i<o.length;i++){let s=o[i];s["_"+e+"_subscribed"]||(s.$emitter.subscribe("registerEvents",t),s["_"+e+"_subscribed"]=!0)}}};var V="loading",S=class{constructor(){this._repoBuyBox=new h}addItemToCart(t){let e=this._repoBuyBox.findClosestShopwareBuyButton(t);if(!(e instanceof HTMLButtonElement))return;let n=e.closest("form");if(!(n instanceof HTMLFormElement)||t.classList.contains(V))return;let o=n.elements,i=[];t.classList.add(V);for(let u=0;u<o.length;u++){let c=o[u];c.type==="radio"&&!c.checked||c.name&&c.name!=="redirectTo"&&i.push(encodeURIComponent(c.name)+"="+encodeURIComponent(c.value))}i.push("isExpressCheckout=1");let s=n.action,r=n.method,a=new XMLHttpRequest;a.open(r,s,!1),a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onreadystatechange=()=>{if(a.readyState!==XMLHttpRequest.DONE)return;if(t.classList.remove(V),a.status>=400)throw new Error(`Request failed with status ${a.status}`)},a.send(i.join("&"))}};var x=class{APPLE_PAY_VERSION=3;constructor(){this.client=new f}create(t,e,n,o,i,s,r){let a=this;var u=["name","email","postalAddress"];o===1&&u.push("phone");let c=!1;s!==null&&(c=s.value);var w={countryCode:e,currencyCode:n,requiredShippingContactFields:u,supportedNetworks:["amex","maestro","masterCard","visa","vPay"],merchantCapabilities:["supports3DS"],total:{label:"",amount:0}};let p=new ApplePaySession(this.APPLE_PAY_VERSION,w);return p.onvalidatemerchant=function(y){a.client.post(i+"/mollie/apple-pay/validate",JSON.stringify({validationUrl:y.validationURL}),m=>{if(m.success===!1)throw new Error("Validation failed for URL: "+y.validationURL);let P=JSON.parse(m.session);p.completeMerchantValidation(P)},()=>{p.abort()})},p.onshippingcontactselected=function(y){var m="";y.shippingContact.countryCode!==void 0&&(m=y.shippingContact.countryCode),a.client.post(i+"/mollie/apple-pay/shipping-methods",JSON.stringify({countryCode:m}),P=>{P.success?p.completeShippingContactSelection(ApplePaySession.STATUS_SUCCESS,P.shippingmethods,P.cart.total,P.cart.items):p.completeShippingContactSelection(ApplePaySession.STATUS_FAILURE,[],{label:"",amount:0,pending:!0},[])},()=>{p.abort()})},p.onshippingmethodselected=function(y){a.client.post(i+"/mollie/apple-pay/set-shipping",JSON.stringify({identifier:y.shippingMethod.identifier}),m=>{m.success?p.completeShippingMethodSelection(ApplePaySession.STATUS_SUCCESS,m.cart.total,m.cart.items):p.completeShippingMethodSelection(ApplePaySession.STATUS_FAILURE,{label:"",amount:0,pending:!0},[])},()=>{p.abort()})},p.onpaymentauthorized=function(y){var m=y.payment.token;m=JSON.stringify(m),p.completePayment(ApplePaySession.STATUS_SUCCESS),a.finishPayment(i+"/mollie/apple-pay/start-payment",m,y.payment,c),r.classList.remove("processed")},p.oncancel=function(){t&&a.client.post(i+"/mollie/apple-pay/restore-cart"),r.classList.remove("processed")},p}finishPayment(t,e,n,o){let i=function(a,u){let c=document.createElement("input");return c.type="hidden",c.name=a,c.value=u,c},s=document.createElement("form");s.action=t,s.method="POST";let r=n.shippingContact.addressLines[0];n.shippingContact.addressLines.length>1&&(r+=" "+n.shippingContact.addressLines[1]),s.insertAdjacentElement("beforeend",i("email",n.shippingContact.emailAddress)),s.insertAdjacentElement("beforeend",i("lastname",n.shippingContact.familyName)),s.insertAdjacentElement("beforeend",i("firstname",n.shippingContact.givenName)),s.insertAdjacentElement("beforeend",i("street",r)),s.insertAdjacentElement("beforeend",i("postalCode",n.shippingContact.postalCode)),s.insertAdjacentElement("beforeend",i("city",n.shippingContact.locality)),s.insertAdjacentElement("beforeend",i("acceptedDataProtection",o)),n.shippingContact.phoneNumber!==void 0&&n.shippingContact.phoneNumber.length>0&&s.insertAdjacentElement("beforeend",i("phone",n.shippingContact.phoneNumber)),s.insertAdjacentElement("beforeend",i("countryCode",n.shippingContact.countryCode)),s.insertAdjacentElement("beforeend",i("paymentToken",e)),document.body.insertAdjacentElement("beforeend",s),s.submit()}};var tt="disabled",g=class{constructor(){this._repoBuyBox=new h}isCheckoutPossible(t){let e=this._repoBuyBox.findClosestShopwareBuyButton(t);return e instanceof HTMLButtonElement?!e.hasAttribute(tt):!0}};var O=class{constructor(t,e){this._countryCode=t.querySelector('input[name="countryCode"]').value,this._currency=t.querySelector('input[name="currency"]').value,this._mode=t.querySelector('input[name="mode"]').value,this._withPhone=parseInt(t.querySelector('input[name="withPhone"]').value),this._dataProtection=t.querySelector('input[name="acceptedDataProtection"]'),this._isProductMode=this._mode==="productMode";let n=e.getAttribute("data-shop-url");n.slice(-1)==="/"&&(n=n.slice(0,-1)),this._shopSlug=n}isProductMode(){return this._isProductMode}getCountryCode(){return this._countryCode}getCurrency(){return this._currency}getMode(){return this._mode}getWithPhone(){return this._withPhone}getDataProtection(){return this._dataProtection}getShopSlug(){return this._shopSlug}};var b="d-none",T=class extends d{init(){this._privacySection=new _(document),this._eventUtils=new C,this._cartService=new S,this._productBoxValidator=new g,this._repoBuyBox=new h(document),new E().register(this.initCurrentPage.bind(this),"mollie-apple-pay-direct"),this.initCurrentPage()}initCurrentPage(){if(this._applePayButtons=this._repoBuyBox.findApplePayButtons(),this._applePayContainers=this._repoBuyBox.findApplePayContainers(),!window.ApplePaySession||!window.ApplePaySession.canMakePayments()||this._applePayButtons.length<=0){this.hideApplePayFeature();return}if(this._privacySection.initCheckbox(),this.showApplePayFeature(),this._applePayButtons)for(let t=0;t<this._applePayButtons.length;t++){let e=this._applePayButtons[t];this._eventUtils.addEventListenerOnce(e,this.onApplePayButtonClicked.bind(this),"click"),this.updateButtonVisibility(e);let n=this._repoBuyBox.findClosestBuyBox(e);n!==null&&n.addEventListener("change",()=>{this.updateButtonVisibility(e)})}}updateButtonVisibility(t){this._productBoxValidator.isCheckoutPossible(t)?(t.hidden=!1,t.classList.remove(b)):(t.hidden=!0,t.classList.add(b))}
1showApplePayFeature(){if(this._applePayContainers)for(let t=0;t<this._applePayContainers.length;t++)this._applePayContainers[t].classList.remove(b);if(this._applePayButtons)for(let t=0;t<this._applePayButtons.length;t++)this._applePayButtons[t].classList.remove(b)}hideApplePayFeature(){if(this._applePayContainers)for(let t=0;t<this._applePayContainers.length;t++)this._applePayContainers[t].classList.add(b);if(this._applePayButtons)for(let t=0;t<this._applePayButtons.length;t++)this._applePayButtons[t].classList.add(b)}onApplePayButtonClicked(t){let e=t.currentTarget;if(!this._productBoxValidator.isCheckoutPossible(e)||!this._privacySection.validateForExpressButton(e))return;let n=this._repoBuyBox.findClosestApplePayContainer(e),o=new O(n,e);o.isProductMode()&&this._cartService.addItemToCart(e),new x().create(o.isProductMode(),o.getCountryCode(),o.getCurrency(),o.getWithPhone(),o.getShopSlug(),o.getDataProtection(),e).begin()}};var et="#paymentMethod",nt=".payment-method",L=class extends d{static options={shopUrl:null,hideAlways:!1,applePayId:null,hideApplePayOption:!1};init(){!this.options.hideAlways&&window.ApplePaySession&&window.ApplePaySession.canMakePayments()||(this.hideApplePay(et+this.options.applePayId),this.options.hideApplePayOption&&this.hideApplePaySelect(this.options.applePayId))}hideApplePay(t){let e=document.querySelector(t),n=this.getClosest(e,nt);n&&n.classList&&n.remove()}hideApplePaySelect(t){let e=document.querySelector('option[value="'+t+'"]');e!==null&&e.remove()}getShopUrl(){let t=this.options.shopUrl;if(t===void 0)return"";for(;t.substr(-1)==="/";)t=t.substr(0,t.length-1);return t}getClosest(t,e){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(n){let o=(this.document||this.ownerDocument).querySelectorAll(n),i=o.length;for(;--i>=0&&o.item(i)!==this;);return i>-1});t&&t!==document;t=t.parentNode)if(t.matches(e))return t;return null}};var k="d-none",R=class extends d{static options={shopUrl:null,customerId:null,mollieMandateContainerClass:".mollie-credit-card-mandate",mollieMandateDataId:"data-mollie-credit-card-mandate-id",mollieMandateRemoveButtonClass:".mollie-credit-card-mandate-remove",mollieMandateRemoveModalButtonClass:".mollie-credit-card-mandate-remove-modal-button",mollieMandateDeleteAlertSuccessId:"#mollieCreditCardMandateDeleteSuccess",mollieMandateDeleteAlertErrorId:"#mollieCreditCardMandateDeleteError"};init(){if(!this.options.shopUrl)throw new Error(`The "shopUrl" option for the plugin "${this._pluginName}" is not defined.`);if(!this.options.customerId)throw new Error(`The "customerId" option for the plugin "${this._pluginName}" is not defined.`);this.mollieMandateDeleteAlertEl=document.querySelector(this.options.mollieMandateDeleteAlertSuccessId),this.mollieMandateDeleteAlertEl&&(this.mollieMandateDeleteAlertErrorEl=document.querySelector(this.options.mollieMandateDeleteAlertErrorId),this.mollieMandateDeleteAlertErrorEl&&(this.client=new f,this.registerEvents()))}registerEvents(){let t=document.querySelectorAll(this.options.mollieMandateRemoveButtonClass);if(!t||t.length===0)return;let e=document.querySelectorAll(this.options.mollieMandateRemoveModalButtonClass);!e||e.length===0||(t.forEach(n=>{n._mollieManageInit||(n._mollieManageInit=!0,n.addEventListener("click",o=>{o.preventDefault(),this.onRemoveButtonClick(n)}))}),e.forEach(n=>{n._mollieManageInit||(n._mollieManageInit=!0,n.addEventListener("click",o=>{o.preventDefault(),this.onConfirmRemoveButtonClick()}))}))}onRemoveButtonClick(t){this.currentContainerEl=t.closest(this.options.mollieMandateContainerClass),this.currentContainerEl&&(this.currentMandateId=this.currentContainerEl.getAttribute(this.options.mollieMandateDataId))}onConfirmRemoveButtonClick(){let t=this.currentContainerEl,e=this.currentMandateId;!t||!e||(this.currentMandateId=null,this.currentContainerEl=null,this.deleteMandate(e).then(({success:n})=>{n?(this.mollieMandateDeleteAlertErrorEl.classList.add(k),this.mollieMandateDeleteAlertEl.classList.remove(k),t.remove()):(this.mollieMandateDeleteAlertEl.classList.add(k),this.mollieMandateDeleteAlertErrorEl.classList.remove(k))}))}deleteMandate(t){return new Promise(e=>{this.client.post(this.options.shopUrl+"/mollie/components/revoke-mandate/"+this.options.customerId+"/"+t,"",n=>{e({success:n&&n.success})},()=>{e({success:!1})},"application/json; charset=utf-8")})}};var ot="div.mollie-pos-terminals",it="#posTerminals",st="#changePaymentForm",rt='input[type="radio"]',lt="data-shop-url",at="data-customer-id",ct="data-pos-payment-id",J="d-none",D=class extends d{_shopUrl="";_customerId="";_dropdownTerminals=null;_container=null;_paymentForm=null;_radioInputs=null;_posRadioInput=null;init(){this._container=document.querySelector(ot),!(this._container===void 0||this._container===null)&&(this.initControls(),this._paymentForm!==null&&this._dropdownTerminals!==null&&(this.registerEvents(),this.updateDropdownVisibility(this._posRadioInput,this._container,this._dropdownTerminals),this.updateTerminal(this._shopUrl,this._customerId,this._posRadioInput,this._dropdownTerminals,function(){})))}
1initControls(){if(this._shopUrl=this._container.getAttribute(lt),this._shopUrl.substr(-1)==="/"&&(this._shopUrl=this._shopUrl.substr(0,this._shopUrl.length-1)),this._customerId=this._container.getAttribute(at),this._dropdownTerminals=document.querySelector(it),this._paymentForm=document.querySelector(st),this._paymentForm===void 0||this._paymentForm===null)return;this._radioInputs=this._paymentForm.querySelectorAll(rt);let t=this._container.getAttribute(ct);this._posRadioInput=t?this._paymentForm.querySelector("#paymentMethod"+t):null}registerEvents(){if(this._paymentForm===null)return;let t=this._shopUrl,e=this._customerId,n=this._container,o=this._radioInputs,i=this._posRadioInput,s=this._dropdownTerminals;o.forEach(r=>{r.addEventListener("change",()=>{this.updateDropdownVisibility(i,n,s)})}),s.addEventListener("change",async()=>{this.updateTerminal(t,e,i,s,function(){})})}updateDropdownVisibility(t,e,n){let o=!1;t===void 0||t.checked===!1?e.classList.add(J):(e.classList.remove(J),o=!0),n!==void 0&&(n.required=o)}updateTerminal(t,e,n,o,i){if(n===void 0){i("POS Radio Input not defined");return}if(n===null){i("POS Radio Input not found");return}if(n.checked===!1){i("POS payment not active");return}if(o===void 0){i("POS terminals not defined");return}if(o===null){i("POS terminals not found");return}if(o.value===""){i("no POS terminal selected");return}new f().post(t+"/mollie/pos/store-terminal/"+e+"/"+o.value,"",function(){i("terminal updated successfully")},function(){i("error when updating terminal")},"application/json; charset=utf-8")}};var z="d-none",F=class extends d{init(){this._privacySection=new _(document),this._eventUtils=new C,this._cartService=new S,this._productBoxValidator=new g,this._repoBuyBox=new h(document),new E().register(this.bindEvents.bind(this),"mollie-paypal-express"),this.bindEvents()}bindEvents(){let t=this._repoBuyBox.findPayPalExpressButtons();if(t.length!==0){this._privacySection.initCheckbox();for(let e=0;e<t.length;e++){let n=t[e];this._eventUtils.addEventListenerOnce(n,this.onExpressCheckout.bind(this),"click"),this.updateButtonVisibility(n);let o=this._repoBuyBox.findClosestBuyBox(n);o!==null&&o.addEventListener("change",()=>{this.updateButtonVisibility(n)})}}}updateButtonVisibility(t){this._productBoxValidator.isCheckoutPossible(t)?(t.hidden=!1,t.classList.remove(z)):(t.hidden=!0,t.classList.add(z))}onExpressCheckout(t){let e=t.currentTarget;if(!this._productBoxValidator.isCheckoutPossible(e)||!this._privacySection.validateForExpressButton(e))return;this._cartService.addItemToCart(e);let n=e.getAttribute("data-form-action"),o=document.createElement("form");o.setAttribute("action",n),o.setAttribute("method","POST"),document.body.insertAdjacentElement("beforeend",o),o.submit()}};var dt="molliePayPhone",ut=".mollie-phone-field",pt='.mollie-phone-field [data-form-validation-invalid-phone="true"]',W="d-none",mt="was-validated",G="aria-invalid",N=class extends d{init(){let t=document.getElementById(dt);if(t===null)return;let e=document.querySelector(ut),n=document.querySelector(pt);this._addListener(t,"focus",o=>{e.classList.add(mt),o.target.removeAttribute(G),n.classList.add(W)}),this._addListener(t,"blur",o=>{let i=o.target.form;return i.reportValidity()===!1&&(o.target.setAttribute(G,"true"),n.classList.remove(W)),i.reportValidity()})}};var B=class l extends d{static options={productId:""};init(){this._form=this.el.closest("form"),this._form!==null&&(this._onSubmit=this._onSubmit.bind(this),this._addListener(this._form,"submit",this._onSubmit,!0))}_onSubmit(t){let e=this._form.querySelector(`input[name="${l.FIELD_NAME}"]`);if(t.submitter!==this.el){e!==null&&e.remove();return}e===null&&(e=document.createElement("input"),e.type="hidden",e.name=l.FIELD_NAME,this._form.appendChild(e)),e.value=this.options.productId}};B.FIELD_NAME="mollieSubscribe";var U=class{register(){let t=window.PluginManager,e=[["MollieApplePayDirect",T,"body"],["PayPalExpressPlugin",F,"body"],["MollieApplePayPaymentMethod",L,"[data-mollie-template-applepay-account]"],["MollieApplePayPaymentMethod",L,"[data-mollie-template-applepay-checkout]"],["MollieCredit
1CardComponents",I,"[data-mollie-template-creditcard-components]"],["MollieCreditCardMandateManage",R,"[data-mollie-credit-card-mandate-manage]"],["MolliePosTerminal",D,"[data-mollie-template-pos-terminal]"],["MolliePhonePlugin",N,"[data-mollie-phone-validation]"],["MollieSubscribeButton",B,"[data-mollie-subscribe-button]"]];e.forEach(function(n){t.register(n[0],n[1],n[2])}),e.forEach(function(n){t.initializePlugin(n[0],n[2])})}};window.addEventListener("pageshow",function(l){l.persisted&&window.location.pathname.includes("/account/order/edit/")&&window.location.reload()});window.__mollieStorefrontRegistered||(window.__mollieStorefrontRegistered=!0,new U().register());})();

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.