PageSourceSearch

https://justnails-shop.de/theme/c91431acdc3d921c2f09e846dc1e2728/j…s-tax.acris-tax-validation.plugin.d6e5ea.js

js justnails-shop.de collected 2026-10-02 17:54:27 UTC 50,802 bytes, 16 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[10299],{156:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(t,e){return!1!==e.clone&&e.isMergeableObject(t)?r(Array.isArray(t)?[]:{},t,e):t}function n(t,e,i){return t.concat(e).map(function(t){return s(t,i)})}function a(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function r(t,i,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=s;var d,h,p=Array.isArray(i);return p!==Array.isArray(t)?s(i,l):p?l.arrayMerge(t,i,l):(h={},(d=l).isMergeableObject(t)&&a(t).forEach(function(e){h[e]=s(t[e],d)}),a(i).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&d.isMergeableObject(i[e])?h[e]=(function(t,e){if(!e.customMerge)return r;var i=e.customMerge(t);return"function"==typeof i?i:r})(e,d)(t[e],i[e],d):h[e]=s(i[e],d))}),h)}r.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return r(t,i,e)},{})},t.exports=r},299:(t,e,i)=>{i.r(e),i.d(e,{default:()=>g});var s=i(737),n=i(795),a=i(68);let o="loader",r={BEFORE:"before",INNER:"inner"};class l{constructor(t,e=r.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}create(){if(!this.exists()){if(this.position===r.INNER){this.parent.innerHTML=l.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),l.getTemplate())}}remove(){this.parent.querySelectorAll(`.${o}`).forEach(t=>t.remove())}exists(){return this.parent.querySelectorAll(`.${o}`).length>0}_getPosition(){return this.position===r.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${o}" role="status">
2                    <span class="visually-hidden">Loading...</span>
3                </div>`}static SELECTOR_CLASS(){return o}}let d="element-loader-backdrop";class h extends l{static create(t){t.classList.add("has-element-loader"),h.exists(t)||(h.appendLoader(t),setTimeout(()=>{let e=t.querySelector(`.${d}`);e&&e.classList.add("element-loader-backdrop-open")},1))}static remove(t){t.classList.remove("has-element-loader");let e=t.querySelector(`.${d}`);e&&e.remove()}static exists(t){return t.querySelectorAll(`.${d}`).length>0}static getTemplate(){return`
4        <div class="${d}">
5            <div class="loader" role="status">
6                <span class="visually-hidden">Loading...</span>
7            </div>
8        </div>
9        `}static appendLoader(t){t.insertAdjacentHTML("beforeend",h.getTemplate())}}class p{static #t=this._selectors=["#","."];static getSelectorName(t){return p._selectors.includes(t.at(0))?t.slice(1):t}constructor(t){this.el=t}getDataAttribute(t,e){return n.A.getDataAttribute(t,e,!1)??null}querySelector(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=this.#e(t,e);return i?this.el.querySelector(i):null}#e(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""===e)return t;let i=e,s=t;return p._selectors.includes(t.at(0))&&(s=t.slice(1),i=p._selectors.includes(e.at(0))?t[0]+e.slice(1):t[0]+e),i+s}}class c{constructor(t,e=""){this.options={vatIdFieldSelector:"#addressVatId",vatInfoWrapperSelector:".acris-vat-info-wrapper",vatInfoTextSelector:".acris-vat-info-text",vatInfoExampleSelector:".acris-vat-info-example"},this._domHelper=new p(t),this.options.vatExamplePrefix=e,this.init()}init(){this._initVars(),this._registerEvents()}_initVars(){this.el=this._domHelper.querySelector(this.options.vatIdFieldSelector),this.el&&(this.formGroup=this.el.closest(".form-group"),this._appendVatInfoWrapper())}_appendVatInfoWrapper(){if(null==this.formGroup)throw Error("Form group not found, cannot append vat info wrapper");let t=document.createElement("div");t.classList.add(p.getSelectorName(this.options.vatInfoWrapperSelector));let e=document.createElement("span");e.classList.add(p.getSelectorName(this.options.vatInfoTextSelector));let i=document.createElement("span");i.classList.add(p.getSelectorName(this.options.vatInfoExampleSelector)),t.appendChild(e),t.appendChild(i),this.formGroup.appendChild(t)}_registerEvents(){this.el?.addEventListener("change-country",this._onChange.bind(this))}_onChange(t){let{vatInfoText:e,vatExample:i}=t.detail;
9this._updateVatInformation(e,i)}_updateVatInformation(t,e){this._toggleVatInformation(t,e);let i=this.formGroup.querySelector(this.options.vatInfoTextSelector);null!=i&&(i.innerText=t??"");let s=this.formGroup.querySelector(this.options.vatInfoExampleSelector);null!=s&&(s.innerText=e?this.options.vatExamplePrefix+e:"")}_toggleVatInformation(t,e){let i=this.formGroup.querySelector(this.options.vatInfoWrapperSelector);return null!=i&&((null==t||0===t.length)&&(null==e||0===e.length)?(i.classList.add("d-none"),!1):(i.classList.remove("d-none"),!0))}}class u{constructor(t,e){this.el=t,this.options={...e,prefix:e.prefix||"",vatExamplePrefix:e.vatExamplePrefix||"",countryFieldSelector:"#AddressCountry"},this.init()}init(){this._domHelper=new p(this.el),this.vatIdField=new c(this.el,this.options.vatExamplePrefix),this._initVars(),this._registerEvents(),this._dispatchEvents()}_initVars(){this.countryField=this._domHelper.querySelector(this.options.countryFieldSelector,this.options.prefix)}_registerEvents(){this.countryField?.addEventListener("change",this._onChangeCountry.bind(this))}_dispatchEvents(){if(!this.countryField)return;let{selectedOption:t,vatInfoText:e,vatExample:i}=this._getCountryDetails(this.countryField);this._dispatchCountryEvent(t,e,i)}_onChangeCountry(t){let{selectedOption:e,vatInfoText:i,vatExample:s}=this._getCountryDetails(t.target);this._dispatchCountryEvent(e,i,s)}_getCountryDetails(t){if(null==t)return;let e=t.selectedOptions[0]??null;if(null==e)return;let i=this._domHelper.getDataAttribute(e,"data-vat-info-text"),s=this._domHelper.getDataAttribute(e,"data-vat-example");return{selectedOption:e,vatInfoText:i,vatExample:s}}_dispatchCountryEvent(t,e,i){this.vatIdField.el?.dispatchEvent(new CustomEvent("change-country",{bubbles:!0,detail:{selectedOption:t,vatInfoText:e,vatExample:i}}))}}class g extends s.A{static #t=this.options={billingAddressId:"vatIds",shippingAddressId:"addressVatId",vatIdValidationMessageOriginal:"Entered VAT Reg.No. is invalid",billingCountryId:"billingAddressAddressCountry",shippingCountryId:"shippingAddressAddressCountry",elementIndicatorSelector:"#acris-tax-element-indicator",invalidFeedbackSelector:".invalid-feedback",vatIdValidationMessageSelector:"#acris-tax-vat-id-validation-message",vatIdValidationMessageEmptyCountrySelector:"#acris-tax-vat-id-validation-message-empty-country",vatIdValidationMessageEmptyCountryShippingSelector:"#acris-tax-vat-id-validation-message-empty-country-shipping",vatIdValidationMessageFormatSelector:"#acris-tax-vat-id-validation-message-format",vatIdValidationMessageVatIdValidationSelector:"#acris-tax-vat-id-validation-message-vat-id-validation",vatIdsSelector:"#vatIds",billingAddressPrefix:"billing-",shippingAddressPrefix:"shipping-",successMessageSelector:"#acris-tax-alert-success",errorMessageSelector:"#acris-tax-alert-danger",companyBillingSelector:"#billingAddresscompany",streetBillingSelector:"#billingAddress-AddressStreet",zipcodeBillingSelector:"#billingAddressAddressZipcode",cityBillingSelector:"#billingAddressAddressCity",countryBillingSelector:"#billingAddressAddressCountry",elementIndicatorShippingSelector:"#acris-tax-element-indicator-shipping",invalidFeedbackShippingSelector:".invalid-feedback",vatIdValidationMessageShippingSelector:"#acris-tax-vat-id-validation-message-shipping",vatIdValidationMessageFormatShippingSelector:"#acris-tax-vat-id-validation-message-format-shipping",vatIdValidationMessageVatIdValidationShippingSelector:"#acris-tax-vat-id-validation-message-vat-id-validation-shipping",vatIdsS
9hippingSelector:"#addressVatId",successMessageShippingSelector:"#acris-tax-alert-success-shipping",errorMessageShippingSelector:"#acris-tax-alert-danger-shipping",companyShippingSelector:"#shippingAddresscompany",streetShippingSelector:"#shippingAddress-AddressStreet",zipcodeShippingSelector:"#shippingAddressAddressZipcode",cityShippingSelector:"#shippingAddressAddressCity",countryShippingSelector:"#shippingAddressAddressCountry",companyAddressSelector:"#address-company",streetAddressSelector:"#address-AddressStreet",zipcodeAddressSelector:"#addressAddressZipcode",cityAddressSelector:"#addressAddressCity",companyModalAddressSelector:"address-company",streetModalAddressSelector:"address-AddressStreet",zipcodeModalAddressSelector:"addressAddressZipcode",cityModalAddressSelector:"addressAddressCity",countryAddressSelector:"#addressAddressCountry",modalAddressIdTag:"#",countryModalAddressSelector:"addressAddressCountry",personalCompanySelector:"#-company",assignCategory:!1,defaultCountriesEU:[],countryVatIdPatterns:[],countryIdsWithPattern:[],checkCountriesVatIdPattern:[],checkCountriesFormatPattern:[],checkCountryIsoCodes:[],countryIdsIsoCodes:[],validateFormat:"",validateApiService:"",enabledApiServiceOptions:["enableForAllEuCountriesVatId","enableForAllEuCountriesVatIdCompany","enableForAllEuCountriesVatIdAddress","enableForAllEuCountriesVatIdCompanyAddress"],registerEntry:"register",addressPageEntry:"address-page",modalAddressPageEntry:"modal-address-page",personalDataEntry:"personal-data",ukPattern:"(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})",entry:"",typePrefix:"",countryId:"",countryCheckFormat:!1,vatExamplePrefix:"",prefix:""};init(){this.el&&(this._initVars(),this._registerEvents(),this.acrisTaxService=new u(this.el,this.options))}_initVars(){this._client=new a.A(window.accessKey,window.contextToken),this.validationInProcess=!1,this.options.entry===this.options.registerEntry?(this.vatIds=n.A.querySelector(this.el,this.options.vatIdsSelector,!1),this.companyBilling=n.A.querySelector(this.el,this.options.companyBillingSelector,!1),this.streetBilling=n.A.querySelector(this.el,this.options.streetBillingSelector,!1),this.zipcodeBilling=n.A.querySelector(this.el,this.options.zipcodeBillingSelector,!1),this.cityBilling=n.A.querySelector(this.el,this.options.cityBillingSelector,!1),this.countryBilling=n.A.querySelector(this.el,this.options.countryBillingSelector,!1),this.successMessage=n.A.querySelector(this.el,this.options.successMessageSelector,!1)||null,this.errorMessage=n.A.querySelector(this.el,this.options.errorMessageSelector,!1)||null,this.vatIdValidationMessage=n.A.querySelector(this.el,this.options.vatIdValidationMessageSelector,!1),this.vatIdValidationMessageEmptyCountry=n.A.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountrySelector,!1),this.vatIdValidationMessageFormat=n.A.querySelector(this.el,this.options.vatIdValidationMessageFormatSelector,!1)||null,this.vatIdValidationMessageVatIdValidation=n.A.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationSelector,!1),this.invalidFeedback=n.A.querySelector(this.el,this.options.invalidFeedbackSelector,!1),this.elementIndicator=n.A.querySelector(this.el,this.options.elementIndicatorSelector,!1),this.vatIdsShipping=n.A.querySelector(this.el,this.options.vatIdsShippingSelector,!1),this.companyShipping=n.A.querySelector(this.el,this.options.companyShippingSelector,!1),this.streetShipping=n.A.querySelector(this.el,this.options.streetShippingSelector,!1),this.zipcodeShipping=n.A.querySelector(this.el,this.options.zipcodeShippingSelector,!1),this.cityShipping=n.A.querySelector(this.el,this.options.cityShippingSelector,!1),this.countryShipping=n.A.querySelector(this.el,this.options.countryShippingSelector,!1),this.successMessageShipping=n.A.querySelector(this.el,this.options.successMessageShippingSelector,!1),this.errorMessageShipping=n.A.querySelector(this.el,this.options.errorMessageShippingSelector,!1),this.vatIdValidationMessageShipping=n.A.querySelector(this.el,this.options.vatIdValidationMessageShippingSelector,!1),this.vatIdValidationMessageFormatShipping=n.A.querySelector(this.el,this.options.vatIdValidationMessageFormatShippingSelector,!1),this.vatIdValidationMessageEmptyCountryShipping=n.A.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountryShippingSelector,!1),this.vatIdValidationMessageVatIdValidationShipping=n.A.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationShippingSelector,!1),this.invalidFeedbackShipping=n.A.querySelector(this.el,this.options.invalidFeedbackShippingSelector,!1),this.elementIndicatorShipping=n.A.querySelector(this.el,this.options.elementIndicatorShippingSelector,!1)):this.options.entry===this.options.addressPageEntry||this.options.entry===this.options.modalAddressPageEntry?(this.vatIds=n.A.querySelector(this.el,this.options.vatIdsShippingSelector,!1),this.companyBilling=this.options.entry===this.options.addressPageEntry?n.A.querySelector(this.el,this.options.companyAddressSelector,!1):n.A.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.companyModalAddressSelector,!1),this.streetBilling=this.options.entry===this.options.addressPageEntry?n.A.querySelector(this.el,this.options.streetAddressSelector,!1):n.A.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.streetModalAddressSelector,!1),this.options.entry!==this.options.modalAddressPageEntry||this.streetBilling||(this.streetBilling=n.A.querySelector(this.el,this.options.streetAddressSelector,!1)),this.zipcodeBilling=this.options.entry===this.options.addressPageEntry?n.A.querySelector(this.el,this.options.zipcodeAddressSelector,!1):n.A.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.zipcodeModalAddressSelector,!1),this.cityBilling=this.options.entry===this.options.addressPageEntry?n.A.querySelector(this.el,this.options.cityAddressSelector,!1):n.A.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.cityModalAddressSelector,!1),this.countryBilling=this.options.entry===this.options.addressPageEntry?n.A.querySelector(this.el,this.options.countryAddressSelector,!1):n.A.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.countryModalAddressSelector,!1),this.successMessage=n.A.querySelector(this.el,this.options.successMessageShippingSelector,!1)||null,this.errorMessage=n.A.querySelector(this.el,this.options.errorMessageShippingSelector,!1)||null,this.vatIdValidationMessage=n.A.querySelector(this.el,this.options.vatIdValidationMessageShippingSelector,!1),this.vatIdValidationMessageFormat=n.A.querySelector(this.el,this.options.vatIdValidationMessageFormatShippingSelector,!1)||null,this.vatIdValidationMessageEmptyCountry=n.A.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountryShippingSelector,!1),this.vatIdValidationMessageVatIdValidation=n.A.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationShippingSelector,!1),this.invalidFeedback=n.A.querySelector(this.el,this.options.invalidFeedbackShippingSelector,!1),this.elementIndicator=n.A.querySelector(this.el,this.options.elementIndicatorShippingSelector,!1),this.vatIds||(this.vatIds=n.A.querySelector(this.el,this.options.vatIdsSelector,!1),this.successMessage=n.A.querySelector(this.el,this.options.successMessageSelector,!1)||null,this.errorMessage=n.A.querySelector(this.el,this.options.errorMessageSelector,!1)||null,this.vatIdValidationMessage=n.A.querySelector(this.el,this.options.vatIdValidationMessageSelector,!1),this.vatIdValidationMessageEmptyCountry=n.A.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountrySelector,!1),this.vatIdValidationMessageFormat=n.A.querySelector(this.el,this.options.vatIdValidationMessageFormatSelector,!1)||null,this.vatIdValidationMessageVatIdValidation=n.A.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationSelector,!1),this.invalidFeedback=n.A.querySelector(this.el,this.options.invalidFeedbackSelector,!1),this.elementIndicator=n.A.querySelector(this.el,this.options.elementIndicatorSelector,!1))):this.options.entry===this.options.personalDataEntry&&(this.vatIds=n.A.querySelector(this.el,this.options.vatIdsSelector,!1),this.companyBilling=n.A.querySelector(this.el,this.options.personalCompanySelector,!1),this.successMessage=n.A.querySelector(this.el,this.options.successMessageSelector,!1)||null,this.errorMessage=n.A.querySelector(this.el,this.options.errorMessageSelector,!1)||null,this.vatIdValidationMessage=n.A.querySelector(this.el,this.options.vatIdValidationMessageSelector,!1),this.vatIdValidationMessageEmptyCountry=n.A.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountrySelector,!1),this.vatIdValidationMessageFormat=n.A.querySelector(this.el,this.options.vatIdValidationMessageFormatSelector,!1)||null,this.vatIdValidationMessageVatIdValidation=n.A.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationSelector,!1),this.invalidFeedback=n.A.querySelector(this.el,this.options.invalidFeedbackSelector,!1),this.elementIndicator=n.A.querySelector(this.el,this.options.elementIndicatorSelector,!1))}_registerEvents(){this.options.entry===this.options.registerEntry?(this.vatIds&&(this.vatIds.addEventListener("input",this._onChange.bind(this)),this.vatIds.addEventListener("click",this._onChange.bind(this))),this.countryBilling&&this.countryBilling.addEventListener("change",this._onCountryChange.bind(this)),this.vatIdsShipping&&(this.vatIdsShipping.addEventListener("input",this._onChange.bind(this)),this.vatIdsShipping.addEventListener("click",this._onChange.bind(this))),this.countryShipping&&this.countryShipping.addEventListener("change",this._onCountryChangeShipping.bind(this))):this.options.entry===this.options.addressPageEntry||this.options.entry===this.options.modalAddressPageEntry?(this.vatIds&&(this.vatIds.addEventListener("input",this._onChange.bind(this)),this.vatIds.addEventListener("click",this._onChange.bind(this))),this.countryBilling&&this.countryBilling.addEventListener("change",this._onCountryChange.bind(this))):this.options.entry===this.options.personalDataEntry&&this.vatIds&&(this.vatIds.addEventListener("input",this._onChange.bind(this)),this.vatIds.addEventListener("click",this._onChange.bind(this)))}_onChange(t){if(!0!==this.validationInProcess)switch(this.options.entry){case this.options.registerEntry:t.target.id===this.options.billingAddressId?this._checkVatIdFormatAndValidate(t):t.target.id===this.options.shippingAddressId&&this._checkVatIdFormatAndValidateShipping(t);break;case this.options.addressPageEntry:case this.options.modalAddressPageEntry:this._checkVatIdFormatAndValidate(t);break;case this.options.personalDataEntry:this._checkVatIdFormatAndValidatePersonalData(t)}}_checkVatIdFormatAndValidate(t){this._removeValidMark(),this._onCheckAllFields(t.target),t.target.value=t.target.value.replace(/ /g,""),t.target.innerHTML=t.target.innerHTML.replace(/ /g,"");let e=t.target.value,i=this._checkVatIdFormat(e),s=e.substring(0,2),n=this.options.checkCountryIsoCodes[s],a=this.countryBilling&&this.countryBilling.value?this.countryBilling.value:"";if(!i){if("enableForAllEuCountries"===this.options.validateFormat||s&&"standard"===this.options.validateFormat&&n){if("enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(s,a))return;if(this.countryBilling&&e&&""!==e&&e.length>1&&(!this.countryBilling.value||""===this.countryBilling.value)){this._setEmptyCountryClass();return}this._displayFormatStatus(!1),this._setEmptyCountryClass(!1)}return}let o=this.options.countryIdsWithPattern[i],r=this.options.checkCountriesVatIdPattern[o];if(this.countryBilling&&o&&this.options.assignCategory&&(!this.countryBilling.value||""===this.countryBilling.value)){let t=this._getFallbackCountry(o,this.countryBilling);t&&(this.countryBilling.value=t,this.countryBilling.focus())}if(("enableForAllEuCountries"===this.options.validateFormat||s&&"standard"===this.options.validateFormat&&n)&&("enableForAllEuCountries"!==this.options.validateFormat||!this._skipValidation(s))){if(this.countryBilling&&this.countryBilling.value&&this.countryBilling.value!==o){this._displayFormatStatus(!1),this._setEmptyCountryClass(!1);return}this._displayFormatStatus(!0)}!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==r)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(s)||(this._createLoadingIndicator(this.elementIndicator),this._removeValidMark(),this.validationInProcess=!0,this._val
9idateVatIdApiService(e,o))}_checkVatIdFormatAndValidateShipping(t){this._removeValidMarkShipping(),this._onCheckAllFieldsShipping(t.target),t.target.value=t.target.value.replace(/ /g,""),t.target.innerHTML=t.target.innerHTML.replace(/ /g,"");let e=t.target.value,i=this._checkVatIdFormat(e),s=e.substring(0,2),n=this.options.checkCountryIsoCodes[s],a=this.countryShipping&&this.countryShipping.value?this.countryShipping.value:"";if(!i){if("enableForAllEuCountries"===this.options.validateFormat||s&&"standard"===this.options.validateFormat&&n){if("enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(s,a))return;if(this.countryShipping&&e&&""!==e&&e.length>1&&(!this.countryShipping.value||""===this.countryShipping.value)){this._setEmptyCountryClassShipping();return}this._displayFormatStatusShipping(!1),this._setEmptyCountryClassShipping(!1)}return}let o=this.options.countryIdsWithPattern[i],r=this.options.checkCountriesVatIdPattern[o];if(this.countryShipping&&o&&(!this.countryShipping.value||""===this.countryShipping.value)){let t=this._getFallbackCountry(o,this.countryShipping);t&&(this.countryShipping.value=t)}if(("enableForAllEuCountries"===this.options.validateFormat||s&&"standard"===this.options.validateFormat&&n)&&("enableForAllEuCountries"!==this.options.validateFormat||!this._skipValidation(s))){if(this.countryShipping.value&&this.countryShipping.value!==o){this._displayFormatStatusShipping(!1),this._setEmptyCountryClassShipping(!1);return}this._displayFormatStatusShipping(!0)}!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==r)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(s)||(this._createLoadingIndicator(this.elementIndicatorShipping),this._removeValidMarkShipping(),this.validationInProcess=!0,this._validateVatIdApiServiceShipping(e,o))}_checkVatIdFormatAndValidatePersonalData(t){this._removeValidMark(),this._onCheckAllFieldsPersonalData(t.target),t.target.value=t.target.value.replace(/ /g,""),t.target.innerHTML=t.target.innerHTML.replace(/ /g,"");let e=t.target.value,i=this._checkVatIdFormat(e),s=e.substring(0,2),n=this.options.countryId?this.options.countryId:"";if(!i){if("enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(s,n))return;("enableForAllEuCountries"===this.options.validateFormat||"standard"===this.options.validateFormat&&!0===this.options.countryCheckFormat)&&this._displayFormatStatus(!1);return}let a=this.options.countryIdsWithPattern[i],o=this.options.checkCountriesVatIdPattern[a];if(("enableForAllEuCountries"===this.options.validateFormat||"standard"===this.options.validateFormat&&this.options.countryCheckFormat)&&("enableForAllEuCountries"!==this.options.validateFormat||!this._skipValidation(s))){if(this.options.countryId&&this.options.countryId!==a){this._displayFormatStatus(!1);return}this._displayFormatStatus(!0)}!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==o)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(s)||(this._createLoadingIndicator(this.elementIndicator),this._removeValidMark(),this.validationInProcess=!0,this._validateVatIdApiServicePersonalData(e,a))}_onCountryChange(t){(t.target.id===this.options.billingCountryId||t.target.id===this.options.countryModalAddressSelector||t.target.id===this.options.billingAddressPrefix+this.options.countryModalAddressSelector||t.target.id===this.options.shippingAddressPrefix+this.options.countryModalAddressSelector)&&this._validateCountry(t),t.target.id===this.options.shippingCountryId&&this._validateCountryShipping(t)}_onCountryChangeShipping(t){t.target.id===this.options.shippingCountryId&&this._validateCountryShipping(t)}_validateCountry(t){if(!this.vatIds||!this.vatIds.value)return;this.vatIds.value=this.vatIds.value.replace(/ /g,""),this.vatIds.innerHTML=this.vatIds.innerHTML.replace(/ /g,"");let e=this.vatIds.value.substring(0,2),i=this.options.countryIdsIsoCodes[e],s=this._checkVatIdFormat(this.vatIds.value);if(!s)return;s&&!i&&(i=this.options.countryIdsWithPattern[s]);let n=t.target.value?t.target.value:"",a=this.options.checkCountryIsoCodes[e];if("enableForAllEuCountries"===this.options.validateFormat||e&&"standard"===this.options.validateFormat&&a){if(this._removeValidMark(),"enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(e,n))return;if(!i||t.target.value&&t.target.value!==i||!s){this._displayFormatStatus(!1);return}this._displayFormatStatus(!0)}let o=this.options.checkCountriesVatIdPattern[i];!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==o)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(e,n)||(this._createLoadingIndicator(this.elementIndicator),this._removeValidMark(),this._val
9idateVatIdApiService(this.vatIds.value,i))}_validateCountryShipping(t){if(!this.vatIdsShipping||!this.vatIdsShipping.value)return;this.vatIdsShipping.value=this.vatIdsShipping.value.replace(/ /g,""),this.vatIdsShipping.innerHTML=this.vatIdsShipping.innerHTML.replace(/ /g,"");let e=this.vatIdsShipping.value.substring(0,2),i=this.options.countryIdsIsoCodes[e],s=this.options.checkCountryIsoCodes[e],n=this._checkVatIdFormat(this.vatIdsShipping.value);if(!n)return;n&&!i&&(i=this.options.countryIdsWithPattern[n]);let a=t.target.value?t.target.value:"";if("enableForAllEuCountries"===this.options.validateFormat||e&&"standard"===this.options.validateFormat&&s){if(this._removeValidMarkShipping(),"enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(e,a))return;if(!i||t.target.value&&t.target.value!==i||!n){this._displayFormatStatusShipping(!1);return}this._displayFormatStatusShipping(!0)}let o=this.options.checkCountriesVatIdPattern[i];!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==o)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(e,a)||(this._createLoadingIndicator(this.elementIndicatorShipping),this._removeValidMarkShipping(),this._validateVatIdApiServiceShipping(this.vatIdsShipping.value,i))}_displayFormatStatus(t){if(this.vatIds.value){if(!0===t){this.successMessage&&this.successMessage.classList.remove("d-none"),this.errorMessage&&this.errorMessage.classList.add("d-none");return}this.successMessage&&this.successMessage.classList.add("d-none"),this.errorMessage&&this.errorMessage.classList.remove("d-none"),this.vatIdValidationMessage&&this.vatIdValidationMessage.classList.remove("d-none")}}_displayFormatStatusShipping(t){if(this.vatIdsShipping.value){if(!0===t){this.successMessageShipping.classList.contains("d-none")&&this.successMessageShipping.classList.remove("d-none"),this.errorMessageShipping.classList.contains("d-none")||this.errorMessageShipping.classList.add("d-none");return}this.successMessageShipping.classList.contains("d-none")||this.successMessageShipping.classList.add("d-none"),this.errorMessageShipping.classList.contains("d-none")&&this.errorMessageShipping.classList.remove("d-none"),this.vatIdValidationMessageShipping.classList.contains("d-none")&&this.vatIdValidationMessageShipping.classList.remove("d-none")}}_displayVatIdValidationStatus(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.vatIds.value){if(!0===t){this.successMessage&&this.successMessage.classList.remove("d-none");return}this.errorMessage&&this.errorMessage.classList.remove("d-none"),this.vatIdValidationMessage&&(this.vatIdValidationMessage.classList.remove("d-none"),e&&"api_not_reachable"in e&&!0===e.api_not_reachable&&e.message&&(this.vatIdValidationMessage.innerText=e.message)),this.vatIdValidationMessageFormat&&this.vatIdValidationMessageFormat.classList.add("d-none"),this.vatIdValidationMessageVatIdValidation&&(this.vatIdValidationMessageVatIdValidation.classList.remove("d-none"),e&&"api_not_reachable"in e&&!0===e.api_not_reachable&&e.message&&(this.vatIdValidationMessageVatIdValidation.innerText=e.message))}}_displayVatIdValidationStatusShipping(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.vatIdsShipping.value){if(!0===t){this.successMessageShipping&&this.successMessageShipping.classList.remove("d-none");return}this.errorMessageShipping&&this.errorMessageShipping.classList.remove("d-none"),this.vatIdValidationMessageShipping&&this.vatIdValidationMessageShipping.classList.remove("d-none"),this.vatIdValidationMessageFormatShipping&&this.vatIdValidationMessageFormatShipping.classList.add("d-none"),this.vatIdValidationMessageVatIdValidationShipping&&this.vatIdValidationMessageVatIdValidationShipping.classList.remove("d-none")}}_removeValidMark(){this.successMessage&&this.successMessage.classList.add("d-none"),this.errorMessage&&this.errorMessage.classList.add("d-none"),this.invalidFeedback&&this.invalidFeedback.classList.add("d-none"),this.vatIdValidationMessage&&(this.vatIdValidationMessage.classList.add("d-none"),this.vatIdValidationMessage.innerText=this.options.vatIdValidationMessageOriginal),this.vatIdValidationMessageFormat&&this.vatIdValidationMessageFormat.classList.remove("d-none"),this.vatIdValidationMessageVatIdValidation&&(this.vatIdValidationMessageVatIdValidation.classList.add("d-none"),this.vatIdValidationMessageVatIdValidation.innerText=this.options.vatIdValidationMessageOriginal),this.vatIds&&this.vatIds.classList.remove("is-invalid"),this._setEmptyCountryClass(!1)}_removeValidMarkShipping(){this.successMessageShipping&&this.successMessageShipping.classList.add("d-none"),this.errorMessageShipping&&this.errorMessageShipping.classList.add("d-none"),this.invalidFeedbackShipping&&this.invalidFeedbackShipping.classList.add("d-none"),this.vatIdValidationMessageShipping&&this.vatIdValidationMessageShipping.classList.add("d-none"),this.vatIdValidationMessageFormatShipping&&this.vatIdValidationMessageFormatShipping.classList.remove("d-none"),this.vatIdValidationMessageVatIdValidationShipping&&this.vatIdValidationMessageVatIdValidationShipping.classList.add("d-none"),this.vatIdsShipping&&this.vatIdsShipping.classList.remove("is-invalid"),this._setEmptyCountryClassShipping(!1)}_validateVatIdApiService(t,e){this._client.post(this.options.postUrl,JSON.stringify({vatId:t}),t=>this._afterVatIdValidation(t,e))}_validateVatIdApiServiceShipping(t,e){this._client.post(this.options.postUrl,JSON.stringify({vatId:t}),t=>this._afterVatIdValidationShipping(t,e))}_validateVatIdApiServicePersonalData(t,e){this._client.post(this.options.postUrl,JSON.stringify({vatId:t}),t=>this._afterVatIdValidationPersonalData(t,e))}_afterVatIdValidation(t,e){this._removeLoadingIndicator(this.elementIndicator),this.validationInProcess=!1;try{t=JSON.parse(t)}catch(t){return}this.countryBilling&&this.countryBilling.value&&""!==this.countryBilling.value||!t.success?this._displayVatIdValidationStatus(t.success,t):this._setEmptyCountryClass(),!0===t.success&&this._autocomplete(t,e)}_afterVatIdValidationShipping(t,e){this._removeLoadingIndicator(this.elementIndicatorShipping),this.validationInProcess=!1;try{t=JSON.parse(t)}catch(t){return}this.countryShipping.value&&""!==this.countryShipping.value||!t.success?this._displayVatIdValidationStatusShipping(t.success,t):this._setEmptyCountryClassShipping(),!0===t.success&&this._autocompleteShipping(t,e)}_afterVatIdValidationPersonalData(t,e){this._removeLoadingIndicator(this.elementIndicator),this.validationInProcess=!1;try{t=JSON.parse(t)}catch(t){return}this._displayVatIdValidationStatus(t.success,t),!0===t.success&&this._autocompletePersonalData(t,e)}_autocomplete(t,e){if(!!t.companyExists&&!!t.addressExists){var i,s,n=t.company;if(n){(i=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),i.setAttribute("class","autocomplete-items"),this.companyBilling.parentNode.appendChild(i),s=null,this.companyBilling.value!==n&&((s=document.createElement("DIV")).innerHTML="<strong>"+t.company.substr(0,n.length)+"</strong>",s.innerHTML+=t.company.substr(n.length),s.innerHTML+="<input type='hidden' value='"+t.company+"'>",i.appendChild(s));var a,o,r=t.street;if(r){(a=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),a.setAttribute("class","autocomplete-items"),this.streetBilling.parentNode.appendChild(a),o=null,this.streetBilling.value!==r&&((o=document.createElement("DIV")).innerHTML="<strong>"+t.street.substr(0,r.length)+"</strong>",o.innerHTML+=t.street.substr(r.length),o.innerHTML+="<input type='hidden' value='"+t.street+"'>",a.appendChild(o));var l,d,h=t.zipcode;if(h){(l=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),l.setAttribute("class","autocomplete-items"),this.zipcodeBilling.parentNode.appendChild(l),d=null,this.zipcodeBilling.value!==h&&((d=document.createElement("DIV")).innerHTML="<strong>"+t.zipcode.substr(0,h.length)+"</strong>",d.innerHTML+=t.zipcode.substr(h.length),d.innerHTML+="<input type='hidden' value='"+t.zipcode+"'>",l.appendChild(d));var p,c,u=t.city;if(u){(p=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),p.setAttribute("class","autocomplete-items"),this.cityBilling.parentNode.appendChild(p),c=null,this.cityBilling.value!==u&&((c=document.createElement("DIV")).innerHTML="<strong>"+t.city.substr(0,u.length)+"</strong>",c.innerHTML+=t.city.substr(u.length),c.innerHTML+="<input type='hidden' value='"+t.city+"'>",p.appendChild(c));var g,v,y=t.country;
9y&&((g=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),g.setAttribute("class","autocomplete-items"),this.countryBilling.parentNode.appendChild(g),v=null,this.countryBilling.value!==e&&((v=document.createElement("DIV")).innerHTML="<strong>"+t.country.substr(0,y.length)+"</strong>",v.innerHTML+=t.country.substr(y.length),v.innerHTML+="<input type='hidden' value='"+t.country+"'>",g.appendChild(v)),s&&s.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),o&&o.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),d&&d.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),c&&c.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),v&&v.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),this.responseBilling=t,document.addEventListener("click",this._onCheckAllFields.bind(this)))}}}}}}_autocompleteShipping(t,e){if(!!t.companyExists&&!!t.addressExists){var i,s,n=t.company;if(n){(i=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),i.setAttribute("class","autocomplete-items"),this.companyShipping.parentNode.appendChild(i),s=null,this.companyShipping.value!==n&&((s=document.createElement("DIV")).innerHTML="<strong>"+t.company.substr(0,n.length)+"</strong>",s.innerHTML+=t.company.substr(n.length),s.innerHTML+="<input type='hidden' value='"+t.company+"'>",i.appendChild(s));var a,o,r=t.street;if(r){(a=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),a.setAttribute("class","autocomplete-items"),this.streetShipping.parentNode.appendChild(a),o=null,this.streetShipping.value!==r&&((o=document.createElement("DIV")).innerHTML="<strong>"+t.street.substr(0,r.length)+"</strong>",o.innerHTML+=t.street.substr(r.length),o.innerHTML+="<input type='hidden' value='"+t.street+"'>",a.appendChild(o));var l,d,h=t.zipcode;if(h){(l=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),l.setAttribute("class","autocomplete-items"),this.zipcodeShipping.parentNode.appendChild(l),d=null,this.zipcodeShipping.value!==h&&((d=document.createElement("DIV")).innerHTML="<strong>"+t.zipcode.substr(0,h.length)+"</strong>",d.innerHTML+=t.zipcode.substr(h.length),d.innerHTML+="<input type='hidden' value='"+t.zipcode+"'>",l.appendChild(d));var p,c,u=t.city;if(u){(p=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),p.setAttribute("class","autocomplete-items"),this.cityShipping.parentNode.appendChild(p),c=null,this.cityShipping.value!==u&&((c=document.createElement("DIV")).innerHTML="<strong>"+t.city.substr(0,u.length)+"</strong>",c.innerHTML+=t.city.substr(u.length),c.innerHTML+="<input type='hidden' value='"+t.city+"'>",p.appendChild(c));var g,v,y=t.country;y&&((g=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),g.setAttribute("class","autocomplete-items"),this.countryShipping.parentNode.appendChild(g),v=null,this.countryShipping.value!==e&&((v=document.createElement("DIV")).innerHTML="<strong>"+t.country.substr(0,y.length)+"</strong>",v.innerHTML+=t.country.substr(y.length),v.innerHTML+="<input type='hidden' value='"+t.country+"'>",g.appendChild(v)),s&&s.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),o&&o.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),d&&d.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),c&&c.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),v&&v.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),this.responseShipping=t,document.addEventListener("click",this._onCheckAllFieldsShipping.bind(this)))}}}}}}_autocompletePersonalData(t,e){if(t.companyExists&&t.addressExists){var i,s,n=t.company;n&&((i=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),i.setAttribute("class","autocomplete-items"),this.companyBilling.parentNode.appendChild(i),s=null,this.companyBilling.value!==n&&((s=document.createElement("DIV")).innerHTML="<strong>"+t.company.substr(0,n.length)+"</strong>",s.innerHTML+=t.company.substr(n.length),s.innerHTML+="<input type='hidden' value='"+t.company+"'>",i.appendChild(s)),s&&s.addEventListener("click",this._onAssignValuesPersonalData.bind(this,e,s)),this.responsePersonal=t,document.addEventListener("click",this._onCheckAllFieldsPersonalData.bind(this)))}}_onAssignValues(t,e,i,s,n,a,o){e&&(this.companyBilling.value=e.getElementsByTagName("input")[0].value,this.companyBilling.focus()),i&&(this.streetBilling.value=i.getElementsByTagName("input")[0].value,this.streetBilling.focus()),s&&(this.zipcodeBilling.value=s.getElementsByTagName("input")[0].value,this.zipcodeBilling.focus()),n&&(this.cityBilling.value=n.getElementsByTagName("input")[0].value,this.cityBilling.focus()),a&&(this.countryBilling.value=t,this.countryBilling.focus())}_onAssignValuesShipping(t,e,i,s,n,a,o){e&&(this.companyShipping.value=e.getElementsByTagName("input")[0].value,this.companyShipping.focus()),i&&(this.streetShipping.value=i.getElementsByTagName("input")[0].value,this.streetShipping.focus()),s&&(this.zipcodeShipping.value=s.getElementsByTagName("input")[0].value,this.zipcodeShipping.focus()),n&&(this.cityShipping.value=n.getElementsByTagName("input")[0].value,this.cityShipping.focus()),a&&(this.countryShipping.value=t,this.countryShipping.focus())}
9_onAssignValuesPersonalData(t,e,i){e&&(this.companyBilling.value=e.getElementsByTagName("input")[0].value,this.companyBilling.focus())}_onCheckAllFields(t){this._closeAllLists(this.companyBilling,t.target),this._closeAllLists(this.streetBilling,t.target),this._closeAllLists(this.zipcodeBilling,t.target),this._closeAllLists(this.cityBilling,t.target),this._closeAllLists(this.countryBilling,t.target),this.responseBilling&&(this.countryBilling.value&&""!==this.countryBilling.value?(this._displayVatIdValidationStatus(this.responseBilling.success,this.responseBilling),this._setEmptyCountryClass(!1)):this._setEmptyCountryClass(),this.countryBilling||this._setEmptyCountryClass(!1),this.responseBilling=null)}_onCheckAllFieldsShipping(t){this._closeAllLists(this.companyShipping,t.target),this._closeAllLists(this.streetShipping,t.target),this._closeAllLists(this.zipcodeShipping,t.target),this._closeAllLists(this.cityShipping,t.target),this._closeAllLists(this.countryShipping,t.target),this.responseShipping&&(this.countryShipping.value&&""!==this.countryShipping.value?(this._displayVatIdValidationStatusShipping(this.responseShipping.success,this.responseShipping),this._setEmptyCountryClassShipping(!1)):this._setEmptyCountryClassShipping(),this.countryShipping||this._setEmptyCountryClassShipping(!1),this.responseShipping=null)}_onCheckAllFieldsPersonalData(t){this._closeAllLists(this.companyBilling,t.target),this.responsePersonal&&(this._displayVatIdValidationStatus(this.responsePersonal.success,this.responsePersonal),this.responsePersonal=null)}_closeAllLists(t,e){for(var i=document.getElementsByClassName("autocomplete-items"),s=0;s<i.length;s++)e!=i[s]&&e!=t&&i[s].parentNode.removeChild(i[s])}_checkVatIdFormat(t){var e=t.substring(0,2);if(!this.options.countryVatIdPatterns||0===this.options.countryVatIdPatterns.length)return;var i=RegExp(this.options.ukPattern,"g"),s=t.match(i);if(s&&s[0]===t)return null;let n=null;return this.options.countryVatIdPatterns.forEach((i,s)=>{if(i.indexOf(e)>-1){var a=RegExp(i,"g"),o=t.match(a);o&&o[0]===t&&(n=i)}}),n}_skipValidation(t,e){let i=!1;for(let t in this.options.countryIdsWithPattern)this.options.countryIdsWithPattern[t]===e&&(i=!0);return!this.options.defaultCountriesEU.includes(t)&&(!e||""===e||!i)}_createLoadingIndicator(t){t&&(t.classList.remove("d-none"),h.create(t))}_removeLoadingIndicator(t){t&&(h.remove(t),t.classList.add("d-none"))}_setEmptyCountryClass(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(t){this.vatIdValidationMessageEmptyCountry&&this.vatIdValidationMessageEmptyCountry.classList.remove("d-none");return}this.vatIdValidationMessageEmptyCountry&&this.vatIdValidationMessageEmptyCountry?.classList.add("d-none")}_setEmptyCountryClassShipping(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];t?this.vatIdValidationMessageEmptyCountryShipping.classList.contains("d-none")&&this.vatIdValidationMessageEmptyCountryShipping.classList.remove("d-none"):this.vatIdValidationMessageEmptyCountryShipping.classList.contains("d-none")||this.vatIdValidationMessageEmptyCountryShipping.classList.add("d-none")}_getFallbackCountry(t,e){for(var i=0;i<e.length;i++)if(e[i]&&e[i].value&&e[i].value===t)return t;return null}}},795:(t,e,i)=>{i.d(e,{A:()=>n});var s=i(707);class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===n.hasAttribute(t,e))throw Error(`The required property "${e}" does not exist!`);if("function"!=typeof t.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=e.replace(/^data(|-)/,""),o=s.A.toLowerCamelCase(a,"-");if(!n.isNode(t)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let r=t.dataset[o];if(void 0===r){if(i)throw Error(`The required data attribute "${e}" does not exist on ${t}!`);return r}return s.A.parsePrimitive(r)}static querySelector(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let s=t.querySelector(e)||!1;if(i&&!1===s)throw Error(`The required element "${e}" does not exist in parent node!`);return s}static querySelectorAll(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let s=t.querySelectorAll(e);if(0===s.length&&(s=!1),i&&!1===s)throw Error(`At least one item of "${e}" must exist in parent node!`);return s}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=`
10            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
11            select:not([tabindex^="-"]):not([disabled]),
12            textarea:not([tabindex^="-"]):not([disabled]),
13            button:not([tabindex^="-"]):not([disabled]),
14            a[href]:not([tabindex^="-"]):not([disabled]),
15            [tabindex]:not([tabindex^="-"]):not([disabled])
16        `;return t.querySelectorAll(e)}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},707:(t,e,i)=>{i.d(e,{A:()=>s});class s{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let i=s.toUpperCamelCase(t,e);return s.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>s.ucFirst(t.toLowerCase())).join(""):s.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},737:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(156),n=i.n(s),a=i(707);class o{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,n=t.split("."),a=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=a;a=function(i){s.unsubscribe(t),e(i)}}return this.el.addEventListener(n[0],a),this.listeners.push({splitEventName:n,opts:i,cb:a}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}class r{constructor(t,e={},i=!1){if(!(t instanceof Node))throw Error("There is no valid element given.");this.el=t,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){throw Error(`The "init" method for the plugin "${this._pluginName}" is not defined.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),n().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=a.A.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=a.A.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-options`);if(i)try{return JSON.parse(i)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}}},68:(t,e,i)=>{i.d(e,{A:()=>s});class s{constructor(){this._request=null,this._errorHandlingInternal=!1}get(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",t,i);return this._sendRequest(s,null,e)}post(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("POST",t,s);return this._sendRequest(n,e,i)}delete(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("DELETE",t,s);return this._sendRequest(n,e,i)}patch(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("PATCH",t,s);return this._sendRequest(n,e,i)}
16abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(t){this._errorHandlingInternal=t}_registerOnLoaded(t,e){e&&(!0===this._errorHandlingInternal?(t.addEventListener("load",()=>{e(t.responseText,t)}),t.addEventListener("abort",()=>{console.warn(`the request to ${t.responseURL} was aborted`)}),t.addEventListener("error",()=>{console.warn(`the request to ${t.responseURL} failed with status ${t.status}`)}),t.addEventListener("timeout",()=>{console.warn(`the request to ${t.responseURL} timed out`)})):t.addEventListener("loadend",()=>{e(t.responseText,t)}))}_sendRequest(t,e,i){return this._registerOnLoaded(t,i),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,i){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}}}}]);

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.