diff --git a/composer.json b/composer.json index 6ba3d352..5f484c23 100644 --- a/composer.json +++ b/composer.json @@ -23,9 +23,9 @@ "ext-curl": "*", "ext-json": "*", "sinergi/browser-detector": "^6.1", - "shopware/core": "^6.5.0", - "shopware/administration": "^6.5.0", - "shopware/storefront": "^6.5.0" + "shopware/core": "~6.5.0", + "shopware/administration": "~6.5.0", + "shopware/storefront": "~6.5.0" }, "require-dev": { "dms/phpunit-arraysubset-asserts": "^0.3.0", diff --git a/src/Resources/app/storefront/dist/storefront/js/payone-payment.js b/src/Resources/app/storefront/dist/storefront/js/payone-payment.js new file mode 100644 index 00000000..748c1289 --- /dev/null +++ b/src/Resources/app/storefront/dist/storefront/js/payone-payment.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["payone-payment"],{4126:(e,t,n)=>{var r,a,i,o=n(6285),s=n(1110);class l extends o.Z{init(){this.iframe=null,this.iframeFieldCheckerStarted=!1,this.orderFormDisabled=!0;const e=document.getElementById("payone-request"),t=e.getAttribute("data-payone-language"),n=JSON.parse(e.innerHTML);this._createScript((()=>{const e=this.getClientConfig(t);this.iframe=new window.Payone.ClientApi.HostedIFrames(e,n);const r=document.getElementById("savedpseudocardpan"),a=document.getElementById("confirmOrderForm");r&&r.addEventListener("change",this._handleChangeSavedCard.bind(this)),a&&a.addEventListener("submit",this._handleOrderSubmit.bind(this))}))}getSelectStyle(){return["width: 100%","padding: .5625rem","color: #8798a9","vertical-align: middle","line-height: 1.5","font-weight: 500","background-color: #fff","border: none","border-radius: 3px"]}getFieldStyle(){return["width: 100%","height: 100%","padding: .5625rem","color: #8798a9","vertical-align: middle","line-height: 1.5","font-weight: 500","background-color: #fff","border: none","border-radius: .1875rem"]}getClientConfig(e){return{fields:{cardpan:{selector:"cardpan",type:"text",style:this.getFieldStyle().join("; ")},cardcvc2:{selector:"cardcvc2",type:"password",size:"4",maxlength:"4",length:{V:3,M:3,A:4,D:3,J:0,O:3,P:3,U:3},style:this.getFieldStyle().join("; ")},cardexpiremonth:{selector:"cardexpiremonth",type:"select",size:"2",maxlength:"2",style:this.getSelectStyle().join("; ")},cardexpireyear:{selector:"cardexpireyear",type:"select",style:this.getSelectStyle().join("; ")}},language:window.Payone.ClientApi.Language[e],defaultStyle:{iframe:{height:"100%",width:"100%"}},autoCardtypeDetection:{supportedCardtypes:l.options.supportedCardtypes,callback:this._cardDetectionCallback}}}_cardDetectionCallback(e){if("-"===e||"?"===e)return;const t="https://cdn.pay1.de/cc/"+e.toLowerCase()+"/xl/default.png",n=document.getElementById("errorOutput"),r=document.getElementById("card-logo");r.setAttribute("src",t),n.style.display="none",r.style.display="block"}_createScript(e){const t=document.createElement("script");t.type="text/javascript",t.src="https://secure.pay1.de/client-api/js/v1/payone_hosted.js",t.addEventListener("load",e.bind(this),!1),document.head.appendChild(t)}_handleOrderSubmit(e){document.getElementById("errorOutput").style.display="none";const t=document.getElementById("savedpseudocardpan");if(t&&t.value.length>0)return!0;if(!this.iframe.isComplete()){const t=document.getElementById("iframeErrorOutput");return this.iframeFieldCheckerStarted||setInterval((()=>{this.iframe.isComplete()?t.style.display="none":t.style.display="block"}),250),this.iframeFieldCheckerStarted=!0,this._handleOrderFormError(e),!1}return this.orderFormDisabled?(window.payoneCreditCardCheckCallback=this._payoneCheckCallback.bind(this),this.iframe.creditCardCheck("payoneCreditCardCheckCallback"),this._handleOrderFormError(e),!1):void 0}_handleOrderFormError(e){const t=document.getElementById("confirmFormSubmit");if(e.preventDefault(),t){const e=new s.Z(t);t.disabled=!1,e.remove()}}_handleChangeSavedCard(){const e=document.getElementById("savedpseudocardpan");e.options[e.selectedIndex].value?[...document.getElementsByClassName("credit-card-input")].forEach((function(e){e.classList.add("hide")})):[...document.getElementsByClassName("credit-card-input")].forEach((function(e){e.classList.remove("hide")}))}_payoneCheckCallback(e){if("VALID"===e.status)document.getElementById("pseudocardpan").value=e.pseudocardpan,document.getElementById("truncatedcardpan").value=e.truncatedcardpan,document.getElementById("cardexpiredate").value=e.cardexpiredate,document.getElementById("cardtype").value=e.cardtype,this.orderFormDisabled=!1,document.getElementById("confirmOrderForm").submit();else{const t=document.getElementById("confirmFormSubmit"),n=document.getElementById("errorOutput");t.removeAttribute("disabled"),n.innerHTML=e.errormessage,n.style.display="block"}}}r=l,i={supportedCardtypes:["#","V","A","M","D","J","O","U","P"]},(a=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(a="options"))in r?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i;var d=n(378),c=n(5659),u=n(8254);class m extends o.Z{init(){this.orderFormDisabled=!0,this._client=new u.Z,document.getElementById("confirmOrderForm").addEventListener("submit",this._handleOrderSubmit.bind(this))}_handleOrderSubmit(e){document.getElementById("errorOutput").style.display="none",this.orderFormDisabled&&(this._handleOrderFormError(e),this._getModal(e))}_handleOrderFormError(e){const t=document.getElementById("confirmFormSubmit");if(e.preventDefault(),t){const e=new s.Z(t);t.disabled=!1,e.remove()}}_getModal(e){e.preventDefault(),c.Z.create();const t=this._getRequestData();this._client.abort(),this._client.post(this._getManageMandateUrl(),JSON.stringify(t),(e=>this._openModal(e)))}_submitForm(){this.orderFormDisabled=!1,document.getElementById("confirmOrderForm").submit()}_openModal(e){if((e=JSON.parse(e)).error){const t=document.getElementById("errorOutput");return t.innerHTML=e.error,t.style.display="block",void c.Z.remove()}if("active"===e.mandate.Status)return void this._submitForm();const t=new d.Z(e.modal_content);t.open(this._onOpen.bind(this,t))}_onOpen(e){e.getModal().classList.add("payone-debit-mandate-modal"),window.PluginManager.initializePlugins(),this._registerEvents(),c.Z.remove()}_getRequestData(){return{iban:document.getElementById("iban").value}}_getManageMandateUrl(){return document.getElementById("payone-configuration").getAttribute("data-manage-mandate-url")}_registerEvents(){document.getElementById("mandateSubmit").addEventListener("click",this._onMandateSubmit.bind(this))}_onMandateSubmit(){document.getElementById("accept-mandate").checked&&this._submitForm()}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(m,"options",{editorModalClass:"payone-debit-modal"});class h extends o.Z{init(){this.orderFormDisabled=!0,this._client=new u.Z,this._registerEventListeners()}_registerEventListeners(){const e=document.getElementById("confirmOrderForm");e&&e.addEventListener("submit",this._handleOrderSubmit.bind(this))}_handleOrderSubmit(e){this._hideErrorBox(),this.orderFormDisabled&&(this._validateField(e,"payolutionConsent"),this._validateInput(e,"payoneBirthday"),e.defaultPrevented||(this._validatePaymentAcceptance(),e.preventDefault()))}_validateField(e,t){const n=document.getElementById(t);n.checked?n.classList.remove("is-invalid"):(n.scrollIntoView({block:"start",behavior:"smooth"}),n.classList.add("is-invalid"),e.preventDefault())}_validateInput(e,t){const n=document.getElementById(t);n.value?n.classList.remove("is-invalid"):(n.scrollIntoView({block:"start",behavior:"smooth"}),n.classList.add("is-invalid"),e.preventDefault())}_validatePaymentAcceptance(){const e=JSON.stringify(this._getRequestData());c.Z.create(),this._client.abort(),this._client.post(this._getValidateUrl(),e,(e=>this._handleValidateResponse(e)))}_handleValidateResponse(e){if(e=JSON.parse(e),c.Z.remove(),"OK"!==e.status)this._showErrorBox();else{const t=document.getElementById("payoneWorkOrder");t&&(t.value=e.workorderid),this._submitForm()}}_getValidateUrl(){return document.getElementById("payone-configuration").getAttribute("data-validate-url")}_showErrorBox(){const e=document.getElementById("payolutionErrorContainer");e&&(e.hidden=!1)}_hideErrorBox(){const e=document.getElementById("payolutionErrorContainer");e&&(e.hidden=!0)}_submitForm(){this.orderFormDisabled=!1,document.getElementById("confirmOrderForm").submit()}_getRequestData(){return{payoneBirthday:document.getElementById("payoneBirthday").value}}}class p extends o.Z{init(){this.orderFormDisabled=!0,this._client=new u.Z,this._disableSubmitButton(),this._registerEventListeners()}_registerEventListeners(){const e=document.getElementById("confirmOrderForm"),t=document.getElementById("checkInstallmentButton");e&&e.addEventListener("submit",this._handleOrderSubmit.bind(this)),t&&t.addEventListener("click",this._handleCalculationButtonClick.bind(this))}_handleCalculationButtonClick(e){if(this._hideErrorBox(),this._validateField(e,"payolutionConsent"),this._validateInput(e,"payoneBirthday"),e.defaultPrevented)return;c.Z.create();const t=JSON.stringify(this._getRequestData());this._client.abort(),this._client.post(this._getCalculationUrl(),t,(e=>this._handleCalculationCallback(e)))}_handleCalculationCallback(e){if(e=JSON.parse(e),c.Z.remove(),"OK"!==e.status)return void this._showErrorBox();const t=document.getElementById("payoneWorkOrder"),n=document.getElementById("payoneCartHash");t.value=e.workorderid,n.value=e.carthash,this._displayInstallmentSelection(e),this._displayCalculationOverview(e),this._registerSelectionEventListeners(),this._enableSecondStep(),this._activateSubmitButton(),this._hideCheckInstallmentButton()}_hideCheckInstallmentButton(){const e=document.getElementById("checkInstallmentButton");e&&e.classList.add("hidden")}_registerSelectionEventListeners(){document.getElementById("payolutionInstallmentDuration").addEventListener("change",(function(e){const t=e.target.value;document.querySelectorAll(".installmentDetail").forEach((function(e){e.dataset.duration===t?e.hidden=!1:e.hidden="hidden"}))}))}_showErrorBox(){const e=document.getElementById("payolutionErrorContainer");e&&(e.hidden=!1)}_hideErrorBox(){const e=document.getElementById("payolutionErrorContainer");e&&(e.hidden=!0)}_enableSecondStep(){document.querySelectorAll(".payolution-installment .hidden").forEach((function(e){e.classList.remove("hidden")}))}_displayInstallmentSelection(e){const t=document.getElementById("installmentSelection");t&&(t.innerHTML=e.installmentSelection)}_displayCalculationOverview(e){const t=document.getElementById("calculationOverview");t&&(t.innerHTML=e.calculationOverview)}_handleOrderSubmit(e){this._validateField(e,"payolutionConsent"),this._validateInput(e,"payoneBirthday"),this._validateInput(e,"payolutionAccountOwner"),this._validateInput(e,"payolutionIban"),this._validateInput(e,"payolutionBic"),this._validateInput(e,"payolutionInstallmentDuration")}_disableSubmitButton(){this.orderFormDisabled=!0;const e=document.getElementById("confirmFormSubmit");e&&e.setAttribute("disabled","disabled")}_activateSubmitButton(){this.orderFormDisabled=!1;const e=document.getElementById("confirmFormSubmit");e&&e.removeAttribute("disabled")}_getCalculationUrl(){return document.getElementById("payone-configuration").getAttribute("data-calculation-url")}_validateField(e,t){const n=document.getElementById(t);n.checked?n.classList.remove("is-invalid"):(n.scrollIntoView({block:"start",behavior:"smooth"}),n.classList.add("is-invalid"),this._handleOrderFormError(e))}_validateInput(e,t){const n=document.getElementById(t);n.value?n.classList.remove("is-invalid"):(n.scrollIntoView({block:"start",behavior:"smooth"}),n.classList.add("is-invalid"),this._handleOrderFormError(e))}_handleOrderFormError(e){const t=document.getElementById("confirmFormSubmit");if(e.preventDefault(),t){const e=new s.Z(t);t.disabled=!1,e.remove()}}_getRequestData(){const e=document.getElementById("payoneBirthday"),t=document.getElementById("payoneWorkOrder"),n=document.getElementById("payoneCartHash");return{payoneBirthday:e.value,workorder:t.value,carthash:n.value}}}var y=n(3206);function v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class b extends o.Z{init(){null===this.options.supportedNetworks&&(this.options.supportedNetworks=[]),this._httpClient=new u.Z,this.validateMerchantUrl=this.el.dataset.validateMerchantUrl,this.processPaymentUrl=this.el.dataset.processPaymentUrl,this.orderForm=y.Z.querySelector(document,"#confirmOrderForm"),this._registerEventHandler()}createSession(){try{this.session=new ApplePaySession(3,this.options)}catch(e){return void this.handleErrorOnPayment()}this.session.addEventListener("validatemerchant",this.validateMerchant.bind(this)),this.session.addEventListener("paymentauthorized",this.authorizePayment.bind(this))}performPayment(){this.session.begin()}validateMerchant(e){const t=e.validationURL;this._httpClient.abort(),this._httpClient.post(this.validateMerchantUrl,JSON.stringify({validationUrl:t}),(e=>{let t=null;try{t=JSON.parse(e)}catch(e){return void this.handleErrorOnPayment()}t&&t.merchantSessionIdentifier&&t.signature?this.session.completeMerchantValidation(t):this.handleErrorOnPayment()}))}handleErrorOnPayment(){const e=y.Z.querySelector(document,"#payone-apple-pay-error");e.style.display="block",e.scrollIntoView({block:"start"})}authorizePayment(e){let t=y.Z.querySelector(this.orderForm,"input[name='orderId']").value;this._httpClient.abort(),this._httpClient.post(this.processPaymentUrl,JSON.stringify({token:e.payment.token,orderId:t}),(e=>{this.completePayment(e),this.orderForm.submit()}))}completePayment(e){let t="",n="",r="";try{let a=JSON.parse(e);n=a.status,t=a.txid,r=a.userid}catch(e){this.orderForm.submit()}this.updateFormData(n,t,r,e),"APPROVED"!==n&&"PENDING"!==n||this.session.completePayment({status:ApplePaySession.STATUS_SUCCESS,errors:[]}),this.orderForm.submit()}updateFormData(e,t,n,r){y.Z.querySelector(this.orderForm,"input[name='status']").value=e,y.Z.querySelector(this.orderForm,"input[name='txid']").value=t,y.Z.querySelector(this.orderForm,"input[name='userid']").value=n,y.Z.querySelector(this.orderForm,"input[name='response']").value=r}_handleApplePayButtonClick(){this.orderForm.reportValidity()&&(this.createSession(),this.performPayment())}_registerEventHandler(){this.el.addEventListener("click",this._handleApplePayButtonClick.bind(this))}}v(b,"options",{countryCode:"",currencyCode:"",supportedNetworks:[],merchantCapabilities:["supports3DS","supportsDebit","supportsCredit"],total:{label:"",type:"final",amount:"0.01"}}),v(b,"session",void 0),v(b,"client",void 0),v(b,"validateMerchantUrl",void 0),v(b,"processPaymentUrl",void 0),v(b,"orderForm",void 0);class g extends o.Z{init(){this._client=new u.Z,this.ratepayRateInput=y.Z.querySelector(document,this.options.ratepayRateInputSelector),this.calculateInstallmentBtn=y.Z.querySelector(document,this.options.calculateInstallmentBtnSelector),this.ratepayRuntimeInput=y.Z.querySelector(document,this.options.ratepayRuntimeInputSelector),this.ratepayIbanContainer=y.Z.querySelector(document,this.options.ratepayIbanContainerSelector),this.ratepayIbanInput=y.Z.querySelector(document,this.options.ratepayIbanInputSelector),this._registerEventListeners(),this._handleInstallmentRuntimeChange()}_registerEventListeners(){this.calculateInstallmentBtn&&this.calculateInstallmentBtn.addEventListener("click",this._handleCalculateInstallmentButtonClick.bind(this)),this.ratepayRuntimeInput&&this.ratepayRuntimeInput.addEventListener("change",this._handleInstallmentRuntimeChange.bind(this)),document.querySelector(this.options.ratepayIbanContainerSelector).addEventListener("shown.bs.collapse",(()=>this.ratepayIbanInput.required=!0)),document.querySelector(this.options.ratepayIbanContainerSelector).addEventListener("hidden.bs.collapse",(()=>this.ratepayIbanInput.required=!1))}_handleCalculateInstallmentButtonClick(){const e=this.ratepayRateInput.value;this._sendRequest("rate",e)}_handleInstallmentRuntimeChange(){const e=y.Z.querySelector(document,this.options.ratepayRuntimeInputSelector).value;this._sendRequest("time",e)}_sendRequest(e,t){let n={ratepayInstallmentType:e,ratepayInstallmentValue:t};const r=JSON.stringify(n);this._client.abort(),this._client.post("/payone/ratepay/installment/calculation",r,(e=>this._handleCalculationCallback(e)))}_handleCalculationCallback(e){this._replaceCalculationContent(e)}_replaceCalculationContent(e){y.Z.querySelector(document,this.options.ratepayInstallmentPlanContainerSelector).innerHTML=e,this.ratepayInstallmentTable=y.Z.querySelector(document,this.options.ratepayInstallmentTableSelector),this.ratepayRuntimeInput.value=this.ratepayInstallmentTable.dataset.ratepayNumberOfRates,this.ratepayRateInput.value=this.ratepayInstallmentTable.dataset.ratepayRate}}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(g,"options",{ratepayRateInputSelector:"#ratepayRate",ratepayRuntimeInputSelector:"#ratepayRuntime",calculateInstallmentBtnSelector:"#payone-ratepay-calculate-installment-btn",ratepayInstallmentPlanContainerSelector:"#payone-ratepay-installment-plan",ratepayIbanContainerSelector:"#ratepayIbanContainer",ratepayIbanInputSelector:"#ratepayIban",ratepayInstallmentTableSelector:"#ratepayInstallmentTable"});class _ extends o.Z{init(){window.klarnaAsyncCallback=this._initKlarnaWidget.bind(this);const e=document.createElement("script");e.src="https://x.klarnacdn.net/kp/lib/v1/api.js",document.body.appendChild(e),this.orderForm=document.getElementById(this.options.selectorFormId),this.confirmFormSubmit=this.orderForm.querySelector("button[type=submit]"),this._registerEventListeners()}_initKlarnaWidget(){Klarna.Payments.init({client_token:this.options.clientToken}),Klarna.Payments.load({container:this.options.selectorContainer,payment_method_category:this.options.paymentMethodIdentifier},(e=>{new s.Z(this.confirmFormSubmit).remove()}))}_registerEventListeners(){this.orderForm&&this.orderForm.addEventListener("submit",this._handleOrderSubmit.bind(this))}_handleOrderSubmit(e){e.preventDefault(),Klarna.Payments.authorize({payment_method_category:this.options.paymentMethodIdentifier},{},(e=>{e.approved&&e.authorization_token?(document.querySelector(this.options.selectorTokenInput).value=e.authorization_token,this.orderForm.submit()):e.show_form?new s.Z(this.confirmFormSubmit).remove():e.show_form||(window.location.href=window.location.href)}))}}f(_,"options",{clientToken:null,paymentMethodIdentifier:null,selectorContainer:null,selectorTokenInput:'input[name="payoneKlarnaAuthorizationToken"]',selectorFormId:"confirmOrderForm"}),f(_,"orderForm",null),f(_,"confirmFormSubmit",null);class I extends o.Z{init(){if("amazon"in window)this.onLoad();else{var e=document.createElement("script");e.type="text/javascript",e.src="https://static-eu.payments-amazon.com/checkout.js",e.onload=this.onLoad.bind(this),document.head.appendChild(e)}}onLoad(){}}class S extends I{onLoad(){window.amazon.Pay.renderButton("#"+this.el.id,this.options)}}var E=n(4690);PluginManager.register("PayonePaymentAmazonPayExpressButton",S,"[data-payone-payment-amazon-pay-express-button]"),PluginManager.register("PayonePaymentAmazonPayRedirect",class extends S{init(){E.Z.create(document.querySelector(".content-main")),super.init()}onLoad(){super.onLoad(),document.querySelector("#"+this.el.id).dispatchEvent(new CustomEvent("click"))}},"[data-payone-payment-amazon-pay-redirect]");const C=window.PluginManager;C.register("PayonePaymentCreditCard",l,"[data-is-payone-credit-card]"),C.register("PayonePaymentDebitCard",m,"[data-is-payone-debit-card]"),C.register("PayonePaymentPayolutionInvoicing",h,"[data-is-payone-payolution-invoicing]"),C.register("PayonePaymentPayolutionInstallment",p,"[data-is-payone-payolution-installment]"),C.register("PayonePaymentApplePay",b,"[data-payone-payment-apple-pay-options]"),C.register("PayonePaymentRatepayInstallment",g,"[data-is-payone-ratepay-installment]"),C.register("PayonePaymentKlarna",_,"[data-payone-payment-klarna]")}},e=>{e.O(0,["vendor-node","vendor-shared"],(()=>{return t=4126,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/src/Resources/app/storefront/dist/storefront/js/payone-payment/payone-payment.js b/src/Resources/app/storefront/dist/storefront/js/payone-payment/payone-payment.js deleted file mode 100644 index 9151d023..00000000 --- a/src/Resources/app/storefront/dist/storefront/js/payone-payment/payone-payment.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==n},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s(Array.isArray(e)?[]:{},e,t):e}function a(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function i(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function s(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||a,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=r;var d,c,u=Array.isArray(n);return u!==Array.isArray(e)?r(n,l):u?l.arrayMerge(e,n,l):(c={},(d=l).isMergeableObject(e)&&i(e).forEach(function(t){c[t]=r(e[t],d)}),i(n).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&d.isMergeableObject(n[t])?c[t]=(function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s})(t,d)(e[t],n[t],d):c[t]=r(n[t],d))}),c)}s.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},e.exports=s}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e=n(857),t=n.n(e);class r{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let n=r.toUpperCamelCase(e,t);return r.lcFirst(n)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>r.ucFirst(e.toLowerCase())).join(""):r.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class a{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!a.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!1===a.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(n)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=t.replace(/^data(|-)/,""),o=r.toLowerCamelCase(i,"-");if(!a.isNode(e)){if(n)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(n)throw Error("This node doesn't support the dataset attribute!");return}let s=e.dataset[o];if(void 0===s){if(n)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return s}return r.parsePrimitive(s)}static querySelector(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!a.isNode(e))throw Error("The parent node is not a valid HTML Node!");let r=e.querySelector(t)||!1;if(n&&!1===r)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return r}static querySelectorAll(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!a.isNode(e))throw Error("The parent node is not a valid HTML Node!");let r=e.querySelectorAll(t);if(0===r.length&&(r=!1),n&&!1===r)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return r}}class i{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new CustomEvent(e,{detail:t,cancelable:n});return this.el.dispatchEvent(r),r}subscribe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,a=e.split("."),i=n.scope?t.bind(n.scope):t;if(n.once&&!0===n.once){let t=i;i=function(n){r.unsubscribe(e),t(n)}}return this.el.addEventListener(a[0],i),this.listeners.push({splitEventName:a,opts:n,cb:i}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,n)=>([...n.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(n.splitEventName[0],n.cb):e.push(n),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}class o{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let n=r.toDashCase(this._pluginName),i=a.getDataAttribute(this.el,"data-".concat(n,"-config"),!1),o=a.getAttribute(this.el,"data-".concat(n,"-options"),!1),s=[this.constructor.options,this.options,e];i&&s.push(window.PluginConfigManager.get(this._pluginName,i));try{o&&s.push(JSON.parse(o))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(n,'-options" could not be parsed to json: ').concat(e.message))}return t().all(s.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}constructor(e,t={},n=!1){if(!a.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new i(this.el),this._pluginName=this._getPluginName(n),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}class s{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var n of e.entries())t(n[1],n[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(n=>{t(e[n],n)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}let l="loader",d={BEFORE:"before",INNER:"inner"};class c{create(){if(!this.exists()){if(this.position===d.INNER){this.parent.innerHTML=c.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),c.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(l));s.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(l)).length>0}_getPosition(){return this.position===d.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'