1import{d}from"./utils.min.CXzR3bd8.js";const r=window.en;class f{constructor(e){this.notificationMessage=e.querySelector(".notification-container")}setValidateError(e,t){const i=r?"There is an error. Please correct the following fields: ":"Es liegt ein Fehler vor. Bitte korrigiere folgende Felder: "+g(e);this.setAriaMessage(i,e,t)}setAriaMessage(e,t,i,s=!1){var n;this.notificationMessage&&(this.notificationMessage.textContent=e,i&&(i.disabled=!0,i.setAttribute("aria-label",(n=this.notificationMessage)==null?void 0:n.textContent)),setTimeout(()=>{this.notificationMessage.setAttribute("aria-hidden","true")},300),s||this.addClearErrorMessageEventListeners(t,i))}addClearErrorMessageEventListeners(e,t){this.clearErrorMessageCallback=()=>this.clearErrorMessage(e,t),e.forEach(i=>{c.forEach(s=>{this.clearErrorMessageCallback&&i.addEventListener(s,this.clearErrorMessageCallback)})})}clearErrorMessage(e,t){this.notificationMessage&&(this.notificationMessage.textContent="",t&&(t.disabled=!1,t.removeAttribute("aria-label")),this.notificationMessage.removeAttribute("aria-hidden"),e.forEach(i=>{c.forEach(s=>{this.clearErrorMessageCallback&&i.addEventListener(s,this.clearErrorMessageCallback)})}))}}class b{constructor(e,t,...i){this.container=e,this.onSlideChange=t,this.notificationHandler=new f(e),this.slides=Array.from(this.container.querySelectorAll(".form-slide")),this.currentSlide=this.slides.find(s=>s.classList.contains("slide-active")),this.currentSlide.tabIndex=0,this.updateContainerHeight(this.currentSlide),this.slideChangeArgs=i,this.slides.forEach((s,n)=>{var o;if(n!==0){const h=this.slides[n-1];(o=s.querySelector("button.btn-prev"))==null||o.addEventListener("click",()=>{this.switchSlide(h)})}}),window.addEventListener("resize",d(()=>this.updateContainerHeight(),300))}switchSlide(e,t=!0){let i=!0;t&&this.onSlideChange&&typeof this.onSlideChange=="function"&&(i=this.onSlideChange(this.currentSlide,e,...this.slideChangeArgs)!==!1),i&&(this.currentSlide.classList.remove("slide-active"),this.currentSlide.removeAttribute("tabindex"),e.addEventListener("transitionend",s=>l(s,e)),e.classList.add("slide-active"),e.tabIndex=0,this.currentSlide=e,this.updateContainerHeight(e))}updateContainerHeight(e){this.container.style.height=(e||this.currentSlide).offsetHeight+"px"}getNotificationHandler(){return this.notificationHandler}}function l(a,e){a.propertyName==="opacity"&&a.target&&a.target.classList.contains("slide-active")&&(e.focus({preventScroll:!0}),a.target.removeEventListener("transitionend",()=>l(a,e)))}const c=["change","input"];function g(a){const e=[];for(const t of a)if(t.tagName==="INPUT")switch(t.name){case"first_name":e.push(r?"First Name":"Vorname");break;case"last_name":e.push(r?"Last Name":"Nachname");break;case"date_of_birth":e.push(r?"Date of birth":"Geburtsdatum");break;case"phone_number":case"phone":e.push(r?"Phone number":"Telefonnummer");break;case"email":e.push(r?"Email address":"E-Mail-Adresse");break;case"iban":e.push("IBAN");break}else t.tagName==="SELECT"&&(t.classList.contains("dateSelect")?e.push(r?"Date":"Datum"):t.classList.contains("timeSelect")&&e.push(r?"Time":"Uhrzeit"));return e.join(", ")}export{b as F,f as N}; 2//# sourceMappingURL=form-library.min.DEu9S7ap.js.map
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.