PageSourceSearch

https://werkzeugstore24.de/bundles/molliepayments/mollie-payments.js?1787132581

js werkzeugstore24.de collected 2026-09-26 10:36:00 UTC 33,704 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e={744(e){var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function r(e,t){try{return t in e}catch(e){return!1}}function a(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=o;var c=Array.isArray(n);return c===Array.isArray(e)?c?l.arrayMerge(e,n,l):function(e,t,n){var i={};return n.isMergeableObject(e)&&s(e).forEach(function(t){i[t]=o(e[t],n)}),s(t).forEach(function(s){(function(e,t){return r(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(r(e,s)&&n.isMergeableObject(t[s])?i[s]=function(e,t){if(!t.customMerge)return a;var n=t.customMerge(e);return"function"==typeof n?n:a}(s,n)(e[s],t[s],n):i[s]=o(t[s],n))}),i}(e,n,l):o(n,l)}a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return a(e,n,t)},{})};var l=a;e.exports=l},988(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._el=e,e.$emitter=this,this._listeners=[]}return e.prototype.publish=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n=!1);var o=new CustomEvent(e,{detail:t,cancelable:n});return this.el.dispatchEvent(o),o},e.prototype.subscribe=function(e,t,n){void 0===n&&(n={});var o=this,i=e.split("."),s=n.scope?t.bind(n.scope):t;if(n.once&&!0===n.once){var r=s;s=function(t){o.unsubscribe(e),r(t)}}return this.el.addEventListener(i[0],s),this.listeners.push({splitEventName:i,opts:n,cb:s}),!0},e.prototype.unsubscribe=function(e){var t=this,n=e.split(".");return this.listeners=this.listeners.reduce(function(e,o){return o.splitEventName.sort().toString()===n.sort().toString()?(t.el.removeEventListener(o.splitEventName[0],o.cb),e):(e.push(o),e)},[]),!0},e.prototype.reset=function(){var e=this;return this.listeners.forEach(function(t){e.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0},Object.defineProperty(e.prototype,"el",{get:function(){return this._el},set:function(e){this._el=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"listeners",{get:function(){return this._listeners},set:function(e){this._listeners=e},enumerable:!1,configurable:!0}),e}();t.default=n},512(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(988)),s=o(n(744)),r=function(){function e(e,t,n){void 0===t&&(t={}),void 0===n&&(n=!1),this.el=e,this.$emitter=new i.default(this.el),this._pluginName=this._getPluginName(n),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}return e.prototype._init=function(){this._initialized||(this.init(),this._initialized=!0)},e.prototype._update=function(){this._initialized&&this.update()},e.prototype.update=function(){},e.prototype._registerInstance=function(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)},e.prototype._getPluginName=function(e){return!1===e?this.constructor.name:e},e.prototype._mergeOptions=function(e){var t=this._pluginName.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase(),n=this.parseJsonOrFail(t);let o="";"function"==typeof this.el.getAttribute&&(o=this.el.getAttribute("data-".concat(t,"-options"))||"");var i=[this.constructor.options,this.options,e];n&&i.push(window.PluginConfigManager.get(this._pluginName,n));try{o&&i.push(JSON.parse(o))}catch(e){throw new Error("The data attribute 'data-".concat(t,"-options' could not be parsed to json: ").concat(e.message||""))}return s.default.all(i.filter(function(e){return e instanceof Object&&!(e instanceof Array)}).map(function(e){return e||{}}))},e.prototype.parseJsonOrFail=function(e){if("function"!=typeof this.el.getAttribute)return"";const t=this.el.getAttribute("data-".concat(e,"-config"))||"";try{return JSON.parse(t)}catch(e){return t}},e}();t.default=r}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o].call(s.exports,s,s.exports,n),s.exports}n.n=e=>
1{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o=n(744),i=n.n(o);const s="application/json";class r{get(e,t=null,n=null,o=s){this.send("GET",e,null,t,n,o)}post(e,t=null,n=null,o=null,i=s){this.send("POST",e,t,n,o,i)}send(e,t,n=null,o=null,i=null,r=s){const a=new XMLHttpRequest;a.open(e,t),a.setRequestHeader("Content-Type",r),a.onload=function(){if(!o||"function"!=typeof o)return;const e=a.getResponseHeader("content-type"),t="response"in a?a.response:a.responseText;e.indexOf("application/json")>-1?o(JSON.parse(t)):o(t)},a.onerror=function(){i&&"function"==typeof o&&i()},a.send(n)}}var a=n(512),l=n.n(a);class c extends(l()){}const d="d-none";class u extends c{static options={newCardMandateOption:null,mollieCreditCardFormClass:".mollie-components-credit-card",mollieCreditCardMandateInput:'input[name="mollieCreditCardMandate"]',mollieShouldSaveCardDetailInput:'input[name="mollieShouldSaveCardDetail"]'};init(){this.client=new r,this._fixShopUrl()}registerMandateEvents(){const{newCardMandateOption:e}=this.options;e&&(this.mollieCreditCarfFormEl=document.querySelector(this.options.mollieCreditCardFormClass),this.mollieCreditCardMandateEls=document.querySelectorAll(this.options.mollieCreditCardMandateInput),this.mollieCreditCarfFormEl&&this.mollieCreditCardMandateEls&&this._registerRadioButtonsEvent())}_fixShopUrl(){null!=this.options.shopUrl&&"/"===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(e=>{e.addEventListener("change",()=>{this.onMandateInputChange(this.getMandateCheckedValue())})})}getMandateCheckedValue(){const e=document.querySelector(`${this.options.mollieCreditCardMandateInput}:checked`);return e&&e.value?e.value:null}isValidSelectedMandate(e){return e&&e!==this.options.newCardMandateOption}shouldSaveCardDetail(){const e=document.querySelector(this.options.mollieShouldSaveCardDetailInput);return!!e&&e.checked}onMandateInputChange(e){e!==this.options.newCardMandateOption?null!==e&&this.mollieCreditCarfFormEl.classList.add(d):this.mollieCreditCarfFormEl.classList.remove(d)}}const p="error";class h extends u{static options=i()(u.options,{customerId:null,locale:null,profileId:null,shopUrl:null,testMode:!0});init(){super.init();const e=this;let t=null;const n=document.querySelector("div.mollie-components-controller");n&&n.remove(),this.getElements(),this._componentsContainer&&this._cardHolder&&(t=Mollie(this.options.profileId,{locale:this.options.locale,testmode:this.options.testMode})),this.createComponentsInputs(t,[this.getInputFields().cardHolder,this.getInputFields().cardNumber,this.getInputFields().expiryDate,this.getInputFields().verificationCode]),this._paymentForm.addEventListener("submit",n=>{e.submitForm(n,t,this._paymentForm)}),this.registerMandateEvents()}getElements(){this._cardHolder=document.querySelector("#cardHolder"),this._componentsContainer=document.querySelector("div.mollie-components-credit-card"),this._paymentForm=document.querySelector("#confirmPaymentForm"),this._radioInputs=document.querySelectorAll('#confirmPaymentForm input[type="radio"]'),this._submitButton=document.querySelector('#confirmPaymentForm button[type="submit"]'),this._creditCardRadioInput=document.querySelector('#confirmPaymentForm input[type="radio"].creditcard')}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(e,t){const n=this;t.forEach((t,o,i)=>{const s=e.createComponent(t.name,n.getDefaultProperties());s.mount(t.id),i[o][t.name]=s,s.addEventListener("change",e=>{const n=document.getElementById(`${t.name}`),o=document.getElementById(`${t.errors}`);e.error&&e.touched?(n.classList.add(p),o.textContent=e.error):(n.classList.remove(p),o.textContent="")}),s.addEventListener("focus",()=>{n.setFocus(`${t.id}`,!0)}),s.addEventListener("blur",()=>{n.setFocus(`${t.id}`,!1)})})}setFocus(e,t){document.querySelector(e).classList.toggle("is-focused",t)}disableForm(){this._submitButton&&(this._submitButton.disabled=!0)}enableForm(){this._submitButton&&(this._submitButton.disabled=!1)}async submitForm(e,t,n){if(e.defaultPrevented)return;const o=this;if((void 0!==this._creditCardRadioInput&&null!==this._creditCardRadioInput&&!1!==this._creditCardRadioInput.checked||!n)&&this._creditCardRadioInput&&!0===this._creditCardRadioInput.checked){e.preventDefault(),this.disableForm();const i=this.getMandateCheckedValue();if(this.isValidSelectedMandate(i))return void this.client.post(o.options.shopUrl+"/mollie/components/store-mandate-id/"+o.options.customerId+"/"+i,null,()=>{n.submit()},()=>{n.submit()},"application/json; charset=utf-8");const s=document.getElementById(`${this.getInputFields().verificationCode.errors}`);s.textContent="";const{token:r,error:a}=await t.createToken();if(a)return this.enableForm(),void(s.textContent=a.message);a||this.client.post(o.options.shopUrl+"/mollie/components/store-card-token/"+o.options.customerId+"/"+r,JSON.stringify({shouldSaveCardDetail:this.shouldSaveCardDetail()}),()=>{document.getElementById("cardToken").setAttribute("value",r),n.submit()},()=>{n.submit()},"application/json; charset=utf-8")}}}class m{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return m.isIPhoneDevice()||m.isIPadDevice()}static isNativeWindowsBrowser(){return m.isIEBrowser()||m.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return-1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":m.isTouchDevice(),"is-ios":m.isIOSDevice(),"is-native-windows":m.isNativeWindowsBrowser(),"is-iphone":m.isIPhoneDevice(),"is-ipad":m.isIPadDevice(),"is-ie"
1:m.isIEBrowser(),"is-edge":m.isEdgeBrowser()}}}class y{constructor(e){this.csrf=e}isActive(){return void 0!==this.csrf&&!1!==this.csrf.enabled&&"ajax"===this.csrf.mode}}class f{constructor(e){this._document=e}getPaymentForm(){return this._document.querySelector("#changePaymentForm")}getConfirmForm(){return this._document.querySelector("#confirmOrderForm")}getSubmitButton(){let e=this._document.querySelector("#confirmFormSubmit");return null===e&&(e=this._document.querySelector('#confirmOrderForm button[type="submit"]')),e}}const g="error";class v extends u{static options=i()(u.options,{paymentId:null,customerId:null,locale:null,profileId:null,shopUrl:null,testMode:!0});init(){super.init();try{const e=new f(document);this._paymentForm=e.getPaymentForm(),this._confirmForm=e.getConfirmForm(),this._confirmFormButton=e.getSubmitButton()}catch(e){return void console.error("Mollie Credit Card components: Required HTML elements not found on this page!")}this._initializeComponentInstance(),this._registerEvents(),this.registerMandateEvents()}_initializeComponentInstance(){const e=document.querySelector("#cardHolder");document.querySelector("div.mollie-components-credit-card")&&e&&!window.mollieComponentsObject&&(window.mollieComponentsObject=Mollie(this.options.profileId,{locale:this.options.locale,testmode:this.options.testMode}),window.mollieComponents={}),this.createComponentsInputs()}_registerEvents(){null!==this._confirmForm&&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(){const e=this,t=[this.getInputFields().cardHolder,this.getInputFields().cardNumber,this.getInputFields().expiryDate,this.getInputFields().verificationCode];window.mollieComponentsObject&&t.forEach((t,n,o)=>{const i=this._mountMollieComponent(t.id,t.name);o[n][t.name]=i,i.addEventListener("change",e=>{const n=document.getElementById(`${t.name}`),o=document.getElementById(`${t.errors}`);e.error&&e.touched?(n.classList.add(g),o.textContent=e.error):(n.classList.remove(g),o.textContent="")}),i.addEventListener("focus",()=>{e.setFocus(`${t.id}`,!0)}),i.addEventListener("blur",()=>{e.setFocus(`${t.id}`,!1)})})}_mountMollieComponent(e,t){return window.mollieComponents[t]?window.mollieComponents[t].unmount():window.mollieComponents[t]=window.mollieComponentsObject.createComponent(t,this.getDefaultProperties()),window.mollieComponents[t].mount(e),window.mollieComponents[t]}setFocus(e,t){document.querySelector(e).classList.toggle("is-focused",t)}async submitForm(e){if(e.defaultPrevented)return;const t=this,n=this._confirmForm,o=document.querySelector(`#changePaymentForm input[type="radio"][value="${this.options.paymentId}"]`);if((null==o||!1===o.checked)&&this._confirmForm)return;if(o&&!1===o.checked)return;e.preventDefault();const i=this.getMandateCheckedValue();if(this.isValidSelectedMandate(i))return void this.client.post(t.options.shopUrl+"/mollie/components/store-mandate-id/"+t.options.customerId+"/"+i,null,()=>{t.continueShopwareCheckout(n)},()=>{t.continueShopwareCheckout(n)},"application/json; charset=utf-8");const s=document.getElementById(`${this.getInputFields().verificationCode.errors}`);s.textContent="";const{token:r,error:a}=await window.mollieComponentsObject.createToken();if(a)return s.textContent=a.message,this._reactivateFormSubmit(),void s.scrollIntoView();this.client.post(t.options.shopUrl+"/mollie/components/store-card-token/"+t.options.customerId+"/"+r,JSON.stringify({shouldSaveCardDetail:this.shouldSaveCardDetail()}),function(){t.continueShopwareCheckout(n)},function(){t.continueShopwareCheckout(n)},"application/json; charset=utf-8")}continueShopwareCheckout(e){if(m.isIEBrowser()){const t=function(e,t){const n=document.createElement("input");return n.type="checkbox",n.name=e,n.checked=t,n.style.display="none",n},n=document.getElementById("tos");null!=n&&e.insertAdjacentElement("beforeend",t("tos",n.checked))}new y(window.csrf).isActive()||e.submit()}}class C{constructor(e){this._document=e}findClosestShopwareBuyButton(e){const t=this.findClosestBuyBox(e);return null===t?null:t.querySelector(".btn-buy")}findClosestApplePayContainer(e){return e.closest(".mollie-apple-pay-direct")}findClosestBuyBox(e){let t=e.closest(".product-action");return null===t&&(t=e.closest(".product-detail-form-container")),null===t&&(t=e.closest(".offcanvas-cart-actions")),null===t&&(t=e.closest(".checkout-aside-container")),null===t&&(t=e.closest(".checkout-main")),t}findAllExpressButtons(e,t=null){let n=".mollie-express-button";return null!==t&&(n+=t),e.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(".mollie-paypal-button")}findClosestPrivacyBox(e){const t=this.findClosestBuyBox(e);return null===t?null:t.querySelector(".mollie-privacy-note")}getPrivacyBoxCheckbox(e){return e.querySelector('input[name="acceptedDataProtection"]')}}const _="d-none",b="is-invalid";class S{constructor(e){this._repoBuyBox=new C,this._document=e}initCheckbox(){const e=this._document.querySelectorAll(".mollie-privacy-note:not(.observed)");for(let t=0;t<e.length;t++){const n=e[t];n.classList.remove(_),n.classList.add("observed");const o=this._repoBuyBox.findClosestBuyBox(n),i=this._repoBuyBox.findAllExpressButtons(o,null);if(0!==i.length)for(let e=0;e<i.length;e++){const t=i[e];new MutationObserver(e=>{let t=i.length;
1n.classList.remove(_),e.forEach(e=>{e.target.classList.contains(_)&&t--}),t<=0&&n.classList.add(_)}).observe(t,{attributes:!0,attributeFilter:["class"]})}else n.classList.add(_)}}validateForExpressButton(e){const t=this._repoBuyBox.findClosestPrivacyBox(e);if(!(t instanceof HTMLDivElement))return!0;const n=this._repoBuyBox.getPrivacyBoxCheckbox(t),o=n.checked?1:0;return n.classList.remove(b),0!==o||(n.classList.add(b),!1)}}class E{addEventListenerOnce(e,t,n="click"){const o="__handler_"+n;e[o]||(e.addEventListener(n,t),e[o]=!0)}}class w{register(e,t){const n=window.PluginManager.getPluginList().OffCanvasCart.get("instances");if(n)for(let o=0;o<n.length;o++){const i=n[o];i["_"+t+"_subscribed"]||(i.$emitter.subscribe("registerEvents",e),i["_"+t+"_subscribed"]=!0)}}}const P="loading";class B{constructor(){this._repoBuyBox=new C}addItemToCart(e){const t=this._repoBuyBox.findClosestShopwareBuyButton(e);if(!(t instanceof HTMLButtonElement))return;const n=t.closest("form");if(!(n instanceof HTMLFormElement))return;if(e.classList.contains(P))return;const o=n.elements,i=[];e.classList.add(P);for(let e=0;e<o.length;e++){const t=o[e];("radio"!==t.type||t.checked)&&t.name&&"redirectTo"!==t.name&&i.push(encodeURIComponent(t.name)+"="+encodeURIComponent(t.value))}i.push("isExpressCheckout=1");const 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&&(e.classList.remove(P),a.status>=400))throw new Error(`Request failed with status ${a.status}`)},a.send(i.join("&"))}}class M{APPLE_PAY_VERSION=3;constructor(){this.client=new r}create(e,t,n,o,i,s,r){const a=this;var l=["name","email","postalAddress"];1===o&&l.push("phone");let c=!1;null!==s&&(c=s.value);var d={countryCode:t,currencyCode:n,requiredShippingContactFields:l,supportedNetworks:["amex","maestro","masterCard","visa","vPay"],merchantCapabilities:["supports3DS"],total:{label:"",amount:0}};const u=new ApplePaySession(this.APPLE_PAY_VERSION,d);return u.onvalidatemerchant=function(e){a.client.post(i+"/mollie/apple-pay/validate",JSON.stringify({validationUrl:e.validationURL}),t=>{if(!1===t.success)throw new Error("Validation failed for URL: "+e.validationURL);const n=JSON.parse(t.session);u.completeMerchantValidation(n)},()=>{u.abort()})},u.onshippingcontactselected=function(e){var t="";void 0!==e.shippingContact.countryCode&&(t=e.shippingContact.countryCode),a.client.post(i+"/mollie/apple-pay/shipping-methods",JSON.stringify({countryCode:t}),e=>{e.success?u.completeShippingContactSelection(ApplePaySession.STATUS_SUCCESS,e.shippingmethods,e.cart.total,e.cart.items):u.completeShippingContactSelection(ApplePaySession.STATUS_FAILURE,[],{label:"",amount:0,pending:!0},[])},()=>{u.abort()})},u.onshippingmethodselected=function(e){a.client.post(i+"/mollie/apple-pay/set-shipping",JSON.stringify({identifier:e.shippingMethod.identifier}),e=>{e.success?u.completeShippingMethodSelection(ApplePaySession.STATUS_SUCCESS,e.cart.total,e.cart.items):u.completeShippingMethodSelection(ApplePaySession.STATUS_FAILURE,{label:"",amount:0,pending:!0},[])},()=>{u.abort()})},u.onpaymentauthorized=function(e){var t=e.payment.token;t=JSON.stringify(t),u.completePayment(ApplePaySession.STATUS_SUCCESS),a.finishPayment(i+"/mollie/apple-pay/start-payment",t,e.payment,c),r.classList.remove("processed")},u.oncancel=function(){e&&a.client.post(i+"/mollie/apple-pay/restore-cart"),r.classList.remove("processed")},u}finishPayment(e,t,n,o){const i=function(e,t){const n=document.createElement("input");return n.type="hidden",n.name=e,n.value=t,n},s=document.createElement("form");s.action=e,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)),void 0!==n.shippingContact.phoneNumber&&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",t)),document.body.insertAdjacentElement("beforeend",s),s.submit()}}class A{constructor(){this._repoBuyBox=new C}isCheckoutPossible(e){const t=this._repoBuyBox.findClosestShopwareBuyButton(e);return!(t instanceof HTMLButtonElement&&t.hasAttribute("disabled"))}}class I{constructor(e,t){this._countryCode=e.querySelector('input[name="countryCode"]').value,this._currency=e.querySelector('input[name="currency"]').value,this._mode=e.querySelector('input[name="mode"]').value,this._withPhone=parseInt(e.querySelector('input[name="withPhone"]').value),this._dataProtection=e.querySelector('input[name="acceptedDataProtection"]'),this._isProductMode="productMode"===this._mode;let n=t.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}}const x="d-none";
1class L extends c{init(){this._privacySection=new S(document),this._eventUtils=new E,this._cartService=new B,this._productBoxValidator=new A,this._repoBuyBox=new C(document),(new w).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();else if(this._privacySection.initCheckbox(),this.showApplePayFeature(),this._applePayButtons)for(let e=0;e<this._applePayButtons.length;e++){const t=this._applePayButtons[e];this._eventUtils.addEventListenerOnce(t,this.onApplePayButtonClicked.bind(this),"click"),this.updateButtonVisibility(t),this._repoBuyBox.findClosestBuyBox(t).addEventListener("change",()=>{this.updateButtonVisibility(t)})}}updateButtonVisibility(e){this._productBoxValidator.isCheckoutPossible(e)?(e.hidden=!1,e.classList.remove(x)):(e.hidden=!0,e.classList.add(x))}showApplePayFeature(){if(this._applePayContainers)for(let e=0;e<this._applePayContainers.length;e++)this._applePayContainers[e].classList.remove(x);if(this._applePayButtons)for(let e=0;e<this._applePayButtons.length;e++)this._applePayButtons[e].classList.remove(x)}hideApplePayFeature(){if(this._applePayContainers)for(let e=0;e<this._applePayContainers.length;e++)this._applePayContainers[e].classList.add(x);if(this._applePayButtons)for(let e=0;e<this._applePayButtons.length;e++)this._applePayButtons[e].classList.add(x)}onApplePayButtonClicked(e){const t=e.currentTarget;if(!this._productBoxValidator.isCheckoutPossible(t))return;if(!this._privacySection.validateForExpressButton(t))return;const n=this._repoBuyBox.findClosestApplePayContainer(t),o=new I(n,t);o.isProductMode()&&this._cartService.addItemToCart(t),(new M).create(o.isProductMode(),o.getCountryCode(),o.getCurrency(),o.getWithPhone(),o.getShopSlug(),o.getDataProtection(),t).begin()}}class F extends c{static options={shopUrl:null,hideAlways:!1,applePayId:null,hideApplePayOption:!1};init(){!this.options.hideAlways&&window.ApplePaySession&&window.ApplePaySession.canMakePayments()||(this.hideApplePay(".payment-method-input.applepay"),this.hideApplePay("#paymentMethod"+this.options.applePayId),this.options.hideApplePayOption&&this.hideApplePaySelect(this.options.applePayId))}hideApplePay(e){const t=document.querySelector(e),n=this.getClosest(t,".payment-method");n&&n.classList&&n.remove()}hideApplePaySelect(e){const t=document.querySelector('option[value="'+e+'"]');null!==t&&t.remove()}getShopUrl(){let e=this.options.shopUrl;if(void 0===e)return"";for(;"/"===e.substr(-1);)e=e.substr(0,e.length-1);return e}getClosest(e,t){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){const t=(this.document||this.ownerDocument).querySelectorAll(e);let n=t.length;for(;--n>=0&&t.item(n)!==this;);return n>-1});e&&e!==document;e=e.parentNode)if(e.matches(t))return e;return null}}const O="d-none";class k extends c{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 r,this.registerEvents()))}registerEvents(){const e=document.querySelectorAll(this.options.mollieMandateRemoveButtonClass);if(!e||0===e.length)return;const t=document.querySelectorAll(this.options.mollieMandateRemoveModalButtonClass);
1t&&0!==t.length&&(e.forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),this.onRemoveButtonClick(e)})}),t.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.onConfirmRemoveButtonClick()})}))}onRemoveButtonClick(e){this.currentContainerEl=e.closest(this.options.mollieMandateContainerClass),this.currentContainerEl&&(this.currentMandateId=this.currentContainerEl.getAttribute(this.options.mollieMandateDataId))}onConfirmRemoveButtonClick(){const{currentContainerEl:e,currentMandateId:t}=this;e&&t&&this.deleteMandate(t).then(({success:t})=>{t?(this.mollieMandateDeleteAlertErrorEl.classList.add(O),this.mollieMandateDeleteAlertEl.classList.remove(O),e.remove()):(this.mollieMandateDeleteAlertEl.classList.add(O),this.mollieMandateDeleteAlertErrorEl.classList.remove(O))})}deleteMandate(e){return new Promise(t=>{this.client.post(this.options.shopUrl+"/mollie/components/revoke-mandate/"+this.options.customerId+"/"+e,"",e=>{t({success:e&&e.success})},()=>{t({success:!1})},"application/json; charset=utf-8")})}}const D="d-none";class q extends c{_shopUrl="";_customerId="";_dropdownTerminals=null;_container=null;_paymentForm=null;_radioInputs=null;_posRadioInput=null;init(){this._container=document.querySelector("div.mollie-pos-terminals"),void 0!==this._container&&null!==this._container&&(this.initControls(),null!==this._paymentForm&&null!==this._dropdownTerminals&&(this.registerEvents(),this.updateDropdownVisibility(this._posRadioInput,this._container,this._dropdownTerminals),this.updateTerminal(this._shopUrl,this._customerId,this._posRadioInput,this._dropdownTerminals,function(){})))}initControls(){this._shopUrl=this._container.getAttribute("data-shop-url"),"/"===this._shopUrl.substr(-1)&&(this._shopUrl=this._shopUrl.substr(0,this._shopUrl.length-1)),this._customerId=this._container.getAttribute("data-customer-id"),this._dropdownTerminals=document.querySelector("#posTerminals"),this._paymentForm=document.querySelector("#changePaymentForm"),void 0!==this._paymentForm&&null!==this._paymentForm&&(this._radioInputs=this._paymentForm.querySelectorAll('input[type="radio"]'),this._posRadioInput=this._paymentForm.querySelector('input[type="radio"].pointofsale'))}registerEvents(){if(null===this._paymentForm)return;const e=this._shopUrl,t=this._customerId,n=this._container,o=this._radioInputs,i=this._posRadioInput,s=this._dropdownTerminals;o.forEach(e=>{e.addEventListener("change",()=>{this.updateDropdownVisibility(i,n,s)})}),s.addEventListener("change",async()=>{this.updateTerminal(e,t,i,s,function(){})})}updateDropdownVisibility(e,t,n){let o=!1;void 0===e||!1===e.checked?t.classList.add(D):(t.classList.remove(D),o=!0),void 0!==n&&(n.required=o)}updateTerminal(e,t,n,o,i){void 0!==n?null!==n?!1!==n.checked?void 0!==o?null!==o?""!==o.value?(new r).post(e+"/mollie/pos/store-terminal/"+t+"/"+o.value,"",function(){i("terminal updated successfully")},function(){i("error when updating terminal")},"application/json; charset=utf-8"):i("no POS terminal selected"):i("POS terminals not found"):i("POS terminals not defined"):i("POS payment not active"):i("POS Radio Input not found"):i("POS Radio Input not defined")}}const j="d-none";class T extends c{init(){this._privacySection=new S(document),this._eventUtils=new E,this._cartService=new B,this._productBoxValidator=new A,this._repoBuyBox=new C(document),(new w).register(this.bindEvents.bind(this),"mollie-paypal-express"),this.bindEvents()}bindEvents(){const e=this._repoBuyBox.findPayPalExpressButtons();if(0!==e.length){this._privacySection.initCheckbox();for(let t=0;t<e.length;t++){const n=e[t];this._eventUtils.addEventListenerOnce(n,this.onExpressCheckout.bind(this),"click"),this.updateButtonVisibility(n),this._repoBuyBox.findClosestBuyBox(n).addEventListener("change",()=>{this.updateButtonVisibility(n)})}}}updateButtonVisibility(e){this._productBoxValidator.isCheckoutPossible(e)?(e.hidden=!1,e.classList.remove(j)):(e.hidden=!0,e.classList.add(j))}onExpressCheckout(e){const t=e.currentTarget;if(!this._productBoxValidator.isCheckoutPossible(t))return;if(!this._privacySection.validateForExpressButton(t))return;this._cartService.addItemToCart(t);const n=t.getAttribute("data-form-action"),o=document.createElement("form");o.setAttribute("action",n),o.setAttribute("method","POST"),document.body.insertAdjacentElement("beforeend",o),o.submit()}}const U="d-none",N="invalid";
1class R extends c{init(){const e=document.getElementById("molliePayPhone");if(null===e)return;const t=document.querySelector(".mollie-phone-field"),n=document.querySelector('.mollie-phone-field [data-form-validation-invalid-phone="true"]');e.addEventListener("focus",e=>{t.classList.add("was-validated"),e.target.removeAttribute(N),n.classList.add(U)}),e.addEventListener("blur",e=>{const t=e.target.form;return!1===t.reportValidity()&&(e.target.setAttribute(N,!0),n.classList.remove(U)),t.reportValidity()})}}class V{register(){const e=window.PluginManager;e.register("MollieApplePayDirect",L),e.register("PayPalExpressPlugin",T),e.register("MollieApplePayPaymentMethod",F,"[data-mollie-template-applepay-account]"),e.register("MollieApplePayPaymentMethod",F,"[data-mollie-template-applepay-checkout]"),e.register("MollieCreditCardComponents",h,"[data-mollie-template-creditcard-components]"),e.register("MollieCreditCardComponentsSw64",v,"[data-mollie-template-creditcard-components-sw64]"),e.register("MollieCreditCardMandateManage",k,"[data-mollie-credit-card-mandate-manage]"),e.register("MolliePosTerminal",q,"[data-mollie-template-pos-terminal]"),e.register("MolliePhonePlugin",R,"[data-mollie-phone-validation]")}}window.addEventListener("pageshow",function(e){e.persisted&&window.location.reload()}),window.addEventListener("load",function(){void 0!==window.mollie_javascript_use_shopware&&"1"!==window.mollie_javascript_use_shopware&&((new V).register(),window.dispatchEvent(new Event("mollieLoaded")),window.PluginManager.initializePlugins())})})();

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.