1import{_ as ne}from"./BdTnvmJw.js";import{a5 as ae,a6 as oe,l as U,a7 as le,X as H,a8 as z,J as G,U as K,d as q,o as f,f as y,F as S,e as h,a3 as O,t as E,y as V,c as I,a as D,x as A,v as F,a9 as $,h as de,aa as ue,W as ce,ab as he,G as Q,ac as Y,ad as Z,ae as fe,p as me,af as ge,ag as ee,ah as j,r as J,D as _e,ai as pe,z as ye,m as be,aj as xe}from"./BE-vRCB0.js";import{F as M}from"./fL80RoFj.js";import{a as ve,T as k,S as T,u as Ce}from"./CdFqSkse.js";import{U as te}from"./Bwg4xLWz.js";import{_ as Se}from"./BnXgsL6d.js";import{w as we}from"./-_gES4nC.js";function Le(e={}){const r=[];let t=-1;const s=(n=!1)=>({get(i,l,o){if(!n){const a=Reflect.get(i,l,o);if(typeof a<"u")return a;t++,r[t]=[]}return r[t].push({type:"get",key:l}),new Proxy(()=>{},s(!0))},apply(i,l,o){r[t].push({type:"apply",key:"",args:o})}});return{proxy:new Proxy(e||{},s()),stack:r}}function Ee(e){const r={get(t,s,n){const i=Reflect.get(t,s,n);return typeof i=="object"?new Proxy(i,r):i},apply(t,s,n){Reflect.apply(t,s,n)}};return new Proxy(e,r)}function ke(e,r){r.forEach(t=>{let s=e,n=e;t.forEach(({type:i,key:l,args:o})=>{i==="get"?(n=s,s=s[l]):i==="apply"&&(s=s.call(n,...o))})})}function Ae(e){return e.key||e.src||(typeof e.innerHTML=="string"?e.innerHTML:"")}const Te=["preconnect","dns-prefetch"];function Ie(e,r,t){var C,w,L;const s=typeof r=="string"?{src:r}:r,n=t||{},i=Ae(s),l=(C=e._scripts)==null?void 0:C[i];if(l)return l.setupTriggerHandler(n.trigger),l;(w=n.beforeInit)==null||w.call(n);const o=d=>{u.status=d,e.hooks.callHook("script:updated",v)};ae.forEach(d=>{const m=d,_=typeof s[m]=="function"?s[m].bind(n.eventContext):null;s[m]=p=>{o(d==="onload"?"loaded":d==="onerror"?"error":"loading"),_==null||_(p)}});const a={loaded:[],error:[]},c=new Set,g=(d,m,_)=>{if(!e.ssr){if(_!=null&&_.key){const p=`${_==null?void 0:_.key}:${_.key}`;if(c.has(p))return;c.add(p)}if(a[d]){const p=a[d].push(m);return()=>{var x;return(x=a[d])==null?void 0:x.splice(p-1,1)}}return m(u.instance),()=>{}}},b=new Promise(d=>{if(e.ssr)return;const m=p=>requestAnimationFrame(()=>d(p)),_=e.hooks.hook("script:updated",({script:p})=>{const x=p.status;if(p.id===i&&(x==="loaded"||x==="error")){if(x==="loaded")if(typeof n.use=="function"){const R=n.use();R&&m(R)}else m({});else x==="error"&&d(!1);_()}})}),u={_loadPromise:b,instance:!e.ssr&&((L=n==null?void 0:n.use)==null?void 0:L.call(n))||null,proxy:null,id:i,status:"awaitingLoad",remove(){var d,m,_,p;return(d=u._triggerAbortControllers)==null||d.forEach(x=>x.abort()),(m=u._triggerAbortControllers)==null||m.clear(),u._triggerPromises=[],(_=u._warmupEl)==null||_.dispose(),u.entry?(u.entry.dispose(),u.entry=void 0,o("removed"),(p=e._scripts)==null||delete p[i],!0):!1},warmup(d){const{src:m}=s,_=!m.startsWith("/")||m.startsWith("//"),p=d&&Te.includes(d);let x=m;if(!d||p&&!_)return;if(p){const X=new URL(m);x=`${X.protocol}//${X.host}`}const R={href:x,rel:d,crossorigin:typeof s.crossorigin<"u"?s.crossorigin:_?"anonymous":void 0,referrerpolicy:typeof s.referrerpolicy<"u"?s.referrerpolicy:_?"no-referrer":void 0,fetchpriority:typeof s.fetchpriority<"u"?s.fetchpriority:"low",integrity:s.integrity,as:d==="preload"?"script":void 0};return u._warmupEl=e.push({link:[R]},{head:e,tagPriority:"high"}),u._warmupEl},load(d){var m,_;if((m=u._triggerAbortControllers)==null||m.forEach(p=>p.abort()),(_=u._triggerAbortControllers)==null||_.clear(),u._triggerPromises=[],!u.entry){o("loading");const p={defer:!0,fetchpriority:"low"};s.src&&(s.src.startsWith("http")||s.src.startsWith("//"))&&(p.crossorigin="anonymous",p.referrerpolicy="no-referrer"),u.entry=e.push({script:[{...p,...s}]},n)}return d&&g("loaded",d),b},onLoaded(d,m){return g("loaded",d,m)},onError(d,m){return g("error",d,m)},setupTriggerHandler(d){if(u.status==="awaitingLoad")if((typeof d>"u"||d==="client")&&!e.ssr||d==="server")u.load();else if(d instanceof Promise){if(e.ssr)return;const m=new AbortController;u._triggerAbortControllers=u._triggerAbortControllers||new Set,u._triggerAbortControllers.add(m);const _=new Promise(x=>{m.signal.addEventListener("abort",()=>{var R;(R=u._triggerAbortControllers)==null||R.delete(m),x()})});u._triggerAbortController=m,u._triggerPromises=u._triggerPromises||[];
1const p=u._triggerPromises.push(Promise.race([d.then(x=>typeof x>"u"||x?u.load:void 0),_]).catch(()=>{}).then(x=>{x==null||x()}).finally(()=>{var x;(x=u._triggerPromises)==null||x.splice(p,1)}))}else typeof d=="function"&&d(u.load)},_cbs:a};b.then(d=>{var m,_;d!==!1?(u.instance=d,(m=a.loaded)==null||m.forEach(p=>p(d)),a.loaded=null):((_=a.error)==null||_.forEach(p=>p()),a.error=null)});const v={script:u};if(u.setupTriggerHandler(n.trigger),n.use){const{proxy:d,stack:m}=Le(e.ssr?{}:n.use()||{});u.proxy=d,u.onLoaded(_=>{ke(_,m),u.proxy=Ee(_)})}return!n.warmupStrategy&&(typeof n.trigger>"u"||n.trigger==="client")&&(n.warmupStrategy="preload"),n.warmupStrategy&&u.warmup(n.warmupStrategy),e._scripts=Object.assign(e._scripts||{},{[i]:u}),u}function Fe(e,r){if(!r)return;const t=(n,i)=>{if(!e._cbs[n])return i(e.instance),()=>{};let l=e._cbs[n].push(i);const o=()=>{var a;l&&((a=e._cbs[n])==null||a.splice(l-1,1),l=null)};return z(o),o};e.onLoaded=n=>t("loaded",n),e.onError=n=>t("error",n);const s=e._triggerAbortController;z(()=>{s==null||s.abort()})}function qe(e,r){const t=typeof e=="string"?{src:e}:e,s=r||{},n=(s==null?void 0:s.head)||oe();s.head=n;const i=K();if(s.eventContext=i,i&&typeof s.trigger>"u")s.trigger=U;else if(le(s.trigger)||typeof s.trigger=="function"&&s.trigger.length===0){const o=s.trigger;let a;s.trigger=new Promise(c=>{a=H(o,g=>{g&&c(!0)},{immediate:!0}),z(()=>c(!1),!0)}).then(c=>(a==null||a(),c))}n._scriptStatusWatcher=n._scriptStatusWatcher||n.hooks.hook("script:updated",({script:o})=>{o._statusRef&&(o._statusRef.value=o.status)});const l=Ie(n,t,s);return l._statusRef=l._statusRef||G(l.status),Fe(l,i),new Proxy(l,{get(o,a,c){return Reflect.get(o,a==="status"?"_statusRef":a,c)}})}const Re={tagName:"form-checkbox",computed:{otherId(){return`${this.idValue}_checkbox`},otherName(){return`${this.nameValue}_checkbox`},required(){var e;return(e=this.checkbox)!=null&&e.required?"required":null},idValue(){return this.id?this.id:this.checkbox.id},nameValue(){return this.name?this.name:this.checkbox.id}},methods:{handleChange(e){const t=e.currentTarget.value;this.$emit(O.FORM_FIELD_UPDATED,{value:t,id:this.idValue})}},props:{checkbox:Object,group:String,id:String,name:String}},Me={class:"form__checkbox-control custom-control custom-checkbox mb-1 vue-component"},Ve=["data-form-group","required","name","id"],Oe=["for"],De=["name","id","placeholder","data-form-group"],je=["name","id","data-form-group","required"],Ne=["for","innerHTML"];function Pe(e,r,t,s,n,i){var l,o,a;return f(),y("div",Me,[(l=t.checkbox)!=null&&l.placeholder?(f(),y(S,{key:0},[h("input",{class:"form__checkbox form-check-input custom-control-input",type:"checkbox","data-form-group":t.group,required:i.required,name:i.otherName,id:i.otherId,onChange:r[0]||(r[0]=(...c)=>i.handleChange&&i.handleChange(...c))},null,40,Ve),h("label",{class:"form__checkbox-label custom-control-label",for:i.otherId},null,8,Oe),h("input",{class:"form__input form-control form-control-sm",type:"text",name:i.nameValue,id:i.idValue,placeholder:(o=t.checkbox)==null?void 0:o.placeholder,"data-form-group":t.group},null,8,De)],64)):(f(),y(S,{key:1},[h("input",{class:"form__checkbox form-check-input custom-control-input",type:"checkbox",name:i.nameValue,id:i.idValue,"data-form-group":t.group,required:i.required,onChange:r[1]||(r[1]=(...c)=>i.handleChange&&i.handleChange(...c))},null,40,je),h("label",{class:"form__checkbox-label custom-control-label",for:i.idValue,innerHTML:(a=t.checkbox)==null?void 0:a.label},null,8,Ne)],64))])}const re=Object.assign(q(Re,[["render",Pe]]),{__name:"FormCheckbox"}),ze={tagName:"form-checkboxes",methods:{getCheckboxId(e){return M.getScopedId(this.formId,this.getCheckboxName(e))},getCheckboxName(e){return this.field.id+e.id}},computed:{required(){var e;return(e=this.checkbox)!=null&&e.required?"required":null},message(){return this.field.required?this.field.requiredMsg:null},groupId(){return this.field.id}},props:{field:Object,id:{default:null},formId:{default:null}}},Ue=["data-msg"];function He(e,r,t,s,n,i){var o,a;const l=re;return f(),y(S,null,[h("label",{class:"form__label input-label","data-msg":i.message},E((o=t.field)==null?void 0:o.label),9,Ue),(f(!0),y(S,null,V((a=t.field)==null?void 0:a.checkboxes,c=>(f(),I(l,{checkbox:c,group:i.groupId,id:i.getCheckboxId(c),name:i.getCheckboxName(c)},null,8,["checkbox","group","id","name"]))),256))],64)}const Be=Object.assign(q(ze,[["render",He]]),{__name:"FormCheckboxes"}),We={tagName:"form-radio",computed:{otherId(){return`${this.idValue}_radio`},otherName(){return`${this.radio.id}_radio`},required(){var e;return(e=this.radio)!=null&&e.required?"required":null},idValue(){return this.id?this.id:this.radio.id}},props:{radio:Object,group:String,id:String,name:String},methods:{changed(e){this.$emit("action-changed",e.changeAction||null)}}},Ge={class:"form__radio-control mb-1 vue-component"},Ke=["data-form-group","required","name","id"],Qe=["for"],Je=["name","id","placeholder","data-form-group"],Xe=["name","id","data-form-group","required"],Ye=["for","innerHTML"];function Ze(e,r,t,s,n,i){var l,o,a;return f(),y("div",Ge,[(l=t.radio)!=null&&l.placeholder?(f(),y(S,{key:0},[h("input",{class:"form__radio",type:"radio","data-form-group":t.group,required:i.required,name:i.otherName,id:i.otherId},null,8,Ke),h("label",{class:"form__radio-label",for:i.otherId},null,8,Qe),h("input",{class:"form__input form-control form-control-sm",type:"text",name:t.name,id:i.idValue,placeholder:(o=t.radio)==null?void 0:o.placeholder,"data-form-group":t.group},null,8,Je)],64)):(f(),y(S,{key:1},[h("input",{class:"form__radio",type:"radio",name:t.name,id:i.idValue,"data-form-group":t.group,required:i.required,onChange:r[0]||(r[0]=c=>i.changed(t.radio))},null,40,Xe),h("label",{class:"form__radio-label",for:i.idValue,innerHTML:(a=t.radio)==null?void 0:a.label},null,8,Ye)],64))])}const ie=Object.assign(q(We,[["render",Ze]]),{__name:"FormRadio"}
1),$e={tagName:"form-radios",methods:{getRadioId(e){return M.getScopedId(this.formId,this.field.id+e.id)}},computed:{otherId(){return`${this.radio.id}_radio`},required(){var e;return(e=this.radio)!=null&&e.required?"required":null},message(){return this.field.required?this.field.requiredMsg:null}},props:{field:Object,id:{default:null},name:{default:null},formId:{default:null}}},et=["data-msg"],tt={class:"d-flex flex-wrap"};function rt(e,r,t,s,n,i){var o,a;const l=ie;return f(),y(S,null,[h("label",{class:"form__label input-label","data-msg":i.message},E((o=t.field)==null?void 0:o.label),9,et),h("div",tt,[(f(!0),y(S,null,V((a=t.field)==null?void 0:a.radios,c=>(f(),I(l,{class:"pr-10",radio:c,group:t.id,name:t.name,id:i.getRadioId(c),onActionChanged:r[0]||(r[0]=g=>e.$emit("action-changed",g))},null,8,["radio","group","name","id"]))),256))])],64)}const it=Object.assign(q($e,[["render",rt]]),{__name:"FormRadios"}),st={tagName:"form-attachments",data(){return{isDragging:!1,hasError:!1,filesLength:0,files:null}},computed:{filesList(){var r;if(!((r=this.files)!=null&&r.files))return null;const e=Array.from(this.files.files);return this.filesLength>this.maxFilesValue?e.slice(0,this.maxFilesValue):e},classList(){return["form-attachments",this.hasError===!0?"has-error":"",this.isDragging?T.DRAGGING:"","vue-component"]},interactableClassList(){return["form-attachments__interactable",this.hasErrors?T.HAS_ERROR:""]},requiredValue(){return this.required?"required":null},maxSizeMb(){return this.maxSize/1e6},maxFilesValue(){return this.maxFiles?this.maxFiles:5},extensionList(){const e=this.extensions.map(r=>k.capitalize(r));return e==null?void 0:e.join(", ")},extensionListText(){return`${this.extensionList} max. ${this.maxSizeMb} MB`},acceptList(){return this.extensions.map(e=>`.${e}`).join(",")}},props:{hasError:{default:null},maxSize:Number,description:String,text:String,requiredMsg:{default:null},required:{default:null},extensions:Array,id:String,name:String,maxFiles:Number},mounted(){var e,r;this.files=new DataTransfer,this.root=this.$refs.root,this.interactable=this.$refs.interactable,this.button=this.$refs.button,this.textElement=this.$refs.text,this.file=this.$refs.file,this.error=this.$refs.error,this.base64=this.$refs.base64,this.bindEvents(),(r=(e=window.i18n)==null?void 0:e.loader)==null||r.then(()=>{var t,s,n;this.wrongTypeText=(t=window.i18n)==null?void 0:t.translate("formAttachmentsWrongType"),this.maxFilesText=(s=window.i18n)==null?void 0:s.translate("formAttachmentsMaxFiles",this.maxFilesValue),this.maxSizeText=(n=window.i18n)==null?void 0:n.translate("formAttachmentsMaxSize")})},methods:{bindEvents(){this.interactable.addEventListener("drag",this.handleDragStart.bind(this)),this.interactable.addEventListener("dragstart",this.handleDragStart.bind(this)),this.interactable.addEventListener("dragover",this.handleDragOver.bind(this)),this.interactable.addEventListener("dragenter",this.handleDragOver.bind(this)),this.interactable.addEventListener("drop",this.handleDrop.bind(this)),this.interactable.addEventListener("dragleave",this.handleDrop.bind(this)),this.interactable.addEventListener("dragend",this.handleDrop.bind(this)),this.interactable.addEventListener("click",this.handleAddAttachment.bind(this)),document.addEventListener(O.FORM_ATTACHMENT_ERROR,this.handleFormAttachmentError.bind(this));const e=k.getParent(this.root,"form");e&&e.addEventListener("reset",this.reset.bind(this))},handleFormAttachmentError(e){this.showError(this.maxSizeText)},handleDragStart(e){e.preventDefault(),e.stopPropagation()},handleDragOver(e){e.preventDefault(),e.stopPropagation(),window.clearTimeout(this.dropTimeout),this.isDragging=!0},handleDrop(e){var t;e.preventDefault(),e.stopPropagation();const r=(t=e==null?void 0:e.dataTransfer)==null?void 0:t.files;this.dropTimeout=window.setTimeout(()=>{this.isDragging=!1,e.type==="drop"&&this.handleDroppedFiles(r)},50)},isAllowedFileExtension(e){var n;if(!e)return;const r=(n=this.file.getAttribute("accept"))==null?void 0:n.toLowerCase(),t=(r==null?void 0:r.split(","))||[],s=k.getExtension(e.name);return t.includes(`.${s}`)},isUnderMaxSize(e){if(!(!e||!e.size))return e.size<=this.maxSize},handleDroppedFiles(e){const r=this.getErrors(e);if(r)return this.showError(r);this.appendDroppedFiles(e)},handleAddAttachment(){this.file.click()},restoreDataTransfer(){this.file.files=this.files.files},showError(e){this.restoreDataTransfer(),this.setErrorText(e),this.hasError=!0},setErrorText(e){this.error&&(this.error.innerText=e)},reset(){this.file.files=null,this.files=new DataTransfer,this.resetError()},resetError(){this.setErrorText(this.requiredMsg),this.hasError=!1},appendDroppedFiles(e){this.base64&&(this.isRequired&&(this.file.required=!1),this.appendFiles(e))},areFilesAllowed(e){return Array.from(e).every(r=>this.isAllowedFileExtension(r))},getErrors(e){if(!this.areFilesAllowed(e))return this.wrongTypeText;if(this.files.files.length+e.length>this.maxFilesValue)return this.maxFilesText;if(!Array.from(e).every(r=>this.isUnderMaxSize(r)))return this.maxSizeText},appendFiles(e){if(this.files.files.length>=this.maxFilesValue)return this.showError(this.maxFilesText);Array.from(e).forEach(r=>{this.files.items.add(r)}),this.syncFiles()},syncFiles(){this.filesLength=this.files.items.length,this.file.files=this.files.files,this.resetError()},handleChange(e){var s;const r=(s=e==null?void 0:e.target)==null?void 0:s.files,t=this.getErrors(r);if(t)return this.showError(t);this.appendFiles(r)},handleClick(e){this.files.files[e]&&(this.files.items.remove(e),this.syncFiles())},toSize(e){return k.toSize(e)}}},nt=["data-max-size","data-max-files"],at={class:"form-attachments__button",ref:"button"},ot={class:"form-attachments__content"},lt={class:"form-attachments__description"},dt={class:"form-attachments__extensions"},ut={class:"form-attachments__files"},ct=["required","id","name","accept"],ht={type:"hidden",class:"form-attachments__base64",ref:"base64"},ft={class:"form-attachments__files-list"},mt={class:"form-attachments__files-list-item"},gt={class:"form-attachments__file-details"},_t={class:"form-attachments__file-size"};function pt(e,r,t,s,n,i){const l=ve;return f(),y("div",{class:A(i.classList),"data-max-size":t.maxSize,"data-max-files":i.maxFilesValue,ref:"root"},[h("div",{class:A(i.interactableClassList),ref:"interactable"},[h("div",at,[D(l,{icon:"close",circle:"true",hover:"true",padding:10})],512),h("div",ot,[h("div",lt,E(t.description),1),h("div",{class:"form-attachments__text",ref:"text"},E(t.text),513),h("div",{class:"form-attachments__error is-error",ref:"error"},E(t.requiredMsg),513),h("div",dt,E(i.extensionListText),1)])],2),h("div",ut,[h("input",{type:"file",class:"form-attachments__file",ref:"file",multiple:"",required:i.requiredValue,id:t.id,name:t.name,accept:i.acceptList,onChange:r[0]||(r[0]=(...o)=>i.handleChange&&i.handleChange(...o))},null,40,ct),h("input",ht,null,512),h("div",ft,[(f(!0),y(S,null,V(i.filesList,(o,a)=>(f(),y("div",mt,[h("span",gt,E(o.name),1),h("span",_t,"("+E(i.toSize(o.size))+")",1),D(l,{class:"form-attachments__delete",size:"small",icon:"bin",onClick:c=>i.handleClick(a)},null,8,["onClick"])]))),256))])])],10,nt)}const yt=Object.assign(q(st,[["render",pt]]),{__name:"FormAttachments"}),bt={tagName:"form-select",computed:{required(){var e;return(e=this.field)!=null&&e.required?"required":null}},props:{options:Array,field:Object,id:String,name:String}},xt=["for"],vt=["id","name","required"],Ct={value:""},St=["value"];function wt(e,r,t,s,n,i){return f(),y(S,null,[h("label",{class:"input-label",for:t.id},E(t.field.label),9,xt),h("select",{class:"form-control custom-select text-muted",id:t.id,name:t.name,required:i.required},[h("option",Ct,E(t.field.placeholder),1),(f(!0),y(S,null,V(t.options,l=>(f(),y("option",{value:l.value},E(l.text),9,St))),256))],8,vt)],64)}const Lt=Object.assign(q(bt,[["render",wt]]),{__name:"FormSelect"}),Et={tagName:"form-fields",data(){return{edited:!1,userValue:null}},computed:{classList(){return["form-field js-form-message form-group",`${this.field.type==="hidden"?"d-none":""}`,this.groupClass,this.hasAnimation?"utility-animation utility-animation--small-offset fade-in-bottom":"",`${this.field.showIn?"d-none form-field--show-in "+this.showInClasses:""}`,"vue-component"]},showInClasses(){var e,r;return(r=(e=this.field)==null?void 0:e.showIn)==null?void 0:r.map(t=>"show-in-"+t).join(" ")},groupClass(){return this.field.type==="checkbox"?"mb-3":this.field.type==="file"?"mb-8":""},errorId(){return`${this.id}-error`},readonly(){return this.field.readonly?"readonly":null},required(){return this.field.required?"required":null},placeholder(){return this.field.placeholder?this.field.placeholder:null},value(){return this.edited?this.userValue:this.replaceValue&&this.field.value==="#form-field-replace-value#"?this.replaceValue:this.field.value?this.field.value:null}},mounted(){this.$refs.root&&te.init([this.$refs.root]);const e=this.$parent;if(!e)return;const r=e.$el;r&&r.addEventListener("reset",this.handleReset)},methods:{getRequiredMsg(e){return e.requiredMsg?e.requiredMsg:""},handleChange(e){const t=e.currentTarget.value;this.edited=!0,this.userValue=t,this.$emit(O.FORM_FIELD_UPDATED,{value:t,id:this.id})},handleChangeTextarea(e){const t=e.currentTarget.value;this.$emit(O.FORM_FIELD_UPDATED,{value:t,id:this.id})},handleReset(){this.edited=!1,this.userValue=null},handleFormFieldUpdate(e){this.$emit(O.FORM_FIELD_UPDATED,e)}},props:{options:Array,field:Object,id:{default:null},name:{default:null},formId:{default:null},replaceValue:{default:null},hasAnimation:{default:null},hasError:Boolean}},kt=["for"],At=["id","name","placeholder","required","readonly","data-msg"],Tt=["name","value"],It=["for"],Ft=["type","id","name","data-msg","value","placeholder","required","readonly"],qt=["id"];function Rt(e,r,t,s,n,i){var u,v,C,w,L;
1const l=re,o=Be,a=ie,c=it,g=yt,b=Lt;return t.field.id!=="_gotcha"?(f(),y("div",{key:0,class:A(i.classList),"data-utility-animation-step":"1",ref:"root"},[t.field.type==="textarea"?(f(),y(S,{key:0},[h("label",{class:"input-label",for:t.id},E(t.field.label),9,kt),h("textarea",{class:"form-control form-textarea",onChange:r[0]||(r[0]=(...d)=>i.handleChangeTextarea&&i.handleChangeTextarea(...d)),onKeyup:r[1]||(r[1]=(...d)=>i.handleChangeTextarea&&i.handleChangeTextarea(...d)),id:t.id,name:t.name,rows:"4",placeholder:i.placeholder,required:i.required,readonly:i.readonly,"data-msg":i.getRequiredMsg(t.field)},null,40,At)],64)):t.field.type==="checkbox"?(f(),I(l,{key:1,checkbox:t.field,id:t.id,name:t.name,onFormFieldUpdated:r[2]||(r[2]=d=>i.handleFormFieldUpdate(d))},null,8,["checkbox","id","name"])):t.field.type==="hidden"?(f(),y("input",{key:2,type:"hidden",name:t.name,value:i.value},null,8,Tt)):t.field.checkboxes?(f(),I(o,{key:3,field:t.field,id:t.id,"form-id":t.formId},null,8,["field","id","form-id"])):t.field.type==="radio"?(f(),I(a,{key:4,radio:t.field,id:t.id,name:t.name},null,8,["radio","id","name"])):t.field.radios?(f(),I(c,{key:5,field:t.field,id:t.id,name:t.name,"form-id":t.formId,onActionChanged:r[3]||(r[3]=d=>e.$emit("action-changed",d))},null,8,["field","id","name","form-id"])):t.field.type==="file"?(f(),I(g,{key:6,description:(u=t.field.formAttachments)==null?void 0:u.description,text:(v=t.field.formAttachments)==null?void 0:v.text,extensions:(C=t.field.formAttachments)==null?void 0:C.extensions,maxSize:(w=t.field.formAttachments)==null?void 0:w.maxSize,id:t.id,name:t.name,required:(L=t.field.formAttachments)==null?void 0:L.required,"required-msg":i.getRequiredMsg(t.field.formAttachments)},null,8,["description","text","extensions","maxSize","id","name","required","required-msg"])):t.field.type==="select"?(f(),I(b,{key:7,field:t.field,options:t.options,id:t.id,name:t.name}
1,null,8,["field","options","id","name"])):t.field.type?(f(),y(S,{key:8},[h("label",{class:"input-label",for:t.id},E(t.field.label),9,It),h("input",{ref:"input",onChange:r[4]||(r[4]=(...d)=>i.handleChange&&i.handleChange(...d)),onKeyup:r[5]||(r[5]=(...d)=>i.handleChange&&i.handleChange(...d)),type:t.field.type,id:t.id,name:t.name,class:"form-control","data-msg":i.getRequiredMsg(t.field),value:i.value,placeholder:i.placeholder,required:i.required,readonly:i.readonly},null,40,Ft)],64)):F("",!0),t.hasError?(f(),y("div",{key:9,id:i.errorId,class:"invalid-feedback"},E(i.getRequiredMsg(t.field)),9,qt)):F("",!0)],2)):F("",!0)}const Mt=Object.assign(q(Et,[["render",Rt]]),{__name:"FormFields"});function Vt(){return Q().public["nuxt-scripts"]}function Ot(e){return e.key||e.src||(typeof e.innerHTML=="string"?e.innerHTML:"")}function Dt(e,r){var a,c,g;e=typeof e=="string"?{src:e}:e,r=$(r,(a=Vt())==null?void 0:a.defaultScriptOptions);const t=String(Ot(e)),s=de();if(r.head=r.head||ue(),!r.head)throw new Error("useScript() has been called without Nuxt context.");s.$scripts=s.$scripts||ce({}),(c=s.$scripts)!=null&&c[t];const n=(g=r._validate)==null?void 0:g.call(r);(r.trigger==="onNuxtReady"||r.trigger==="client")&&(r.warmupStrategy||(r.warmupStrategy="preload"),r.trigger==="onNuxtReady"&&(r.trigger=he));const i=qe(e,r),l=i.remove;i.remove=()=>(s.$scripts[t]=void 0,l());const o=i.load;return i.load=async()=>n?Promise.reject(n):o(),s.$scripts[t]=i,i}Object.freeze(Object.assign(()=>{},{__mock__:!0}));function jt(e){return(Q().public.scripts||{})[e]}function Nt(e,r,t){var u,v,C;const s=jt(e),n=Object.assign(t||{},typeof s=="object"?s:{}),i=r(n,{scriptInput:n.scriptInput});let l=i.scriptInput;const o=(u=n.scriptInput)==null?void 0:u.src,a=(v=i.scriptInput)==null?void 0:v.src;if(o&&a&&typeof a=="string"&&typeof o=="string"){const w=Y(a),L=Y(o),d=Z(w.search||""),m=Z(L.search||""),_={...d,...m},p=((C=L.href)==null?void 0:C.split("?")[0])||o;l={...i.scriptInput||{},src:fe(p,_)}}const c=$(l,n.scriptInput,{key:e}),g=Object.assign((n==null?void 0:n.scriptOptions)||{},i.scriptOptions||{}),b=g.beforeInit;return g.beforeInit=()=>{var w;b==null||b(),(w=i.clientInit)==null||w.call(i)},Dt(c,g)}function Pt(e){return Nt("cloudflareTurnstile",()=>({scriptInput:{src:"https://challenges.cloudflare.com/turnstile/v0/api.js"},scriptOptions:{use:()=>window.turnstile}}),e)}function B(e){return ge()?(z(e),!0):!1}const zt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ut=e=>e!=null,Ht=Object.prototype.toString,Bt=e=>Ht.call(e)==="[object Object]",W=()=>{};function N(e){return Array.isArray(e)?e:[e]}function Wt(e){return K()}function Gt(e,r=!0,t){Wt()?U(e,t):r?e():me(e)}function Kt(e,r,t){return H(e,r,{...t,immediate:!0})}const se=zt?window:void 0;function P(e){var r;const t=j(e);return(r=t==null?void 0:t.$el)!=null?r:t}function Qt(...e){const r=[],t=()=>{r.forEach(o=>o()),r.length=0},s=(o,a,c,g)=>(o.addEventListener(a,c,g),()=>o.removeEventListener(a,c,g)),n=J(()=>{const o=N(j(e[0])).filter(a=>a!=null);return o.every(a=>typeof a!="string")?o:void 0}),i=Kt(()=>{var o,a;return[(a=(o=n.value)==null?void 0:o.map(c=>P(c)))!=null?a:[se].filter(c=>c!=null),N(j(n.value?e[1]:e[0])),N(_e(n.value?e[2]:e[1])),j(n.value?e[3]:e[2])]},([o,a,c,g])=>{if(t(),!(o!=null&&o.length)||!(a!=null&&a.length)||!(c!=null&&c.length))return;const b=Bt(g)?{...g}:g;r.push(...o.flatMap(u=>a.flatMap(v=>c.map(C=>s(u,v,C,b)))))},{flush:"post"}),l=()=>{i(),t()};return B(t),l}function Jt(){const e=ee(!1),r=K();return r&&U(()=>{e.value=!0},r),e}function Xt(e){const r=Jt();return J(()=>(r.value,!!e()))}function Yt(e,r,t={}){const{root:s,rootMargin:n="0px",threshold:i=0,window:l=se,immediate:o=!0}=t,a=Xt(()=>l&&"IntersectionObserver"in l),c=J(()=>{const C=j(e);return N(C).map(P).filter(Ut)});let g=W;const b=ee(o),u=a.value?H(()=>[c.value,P(s),b.value],([C,w])=>{if(g(),!b.value||!C.length)return;const L=new IntersectionObserver(r,{root:P(w),rootMargin:n,threshold:i});
1C.forEach(d=>d&&L.observe(d)),g=()=>{L.disconnect(),g=W}},{immediate:o,flush:"post"}):W,v=()=>{g(),u(),b.value=!1};return B(v),{isSupported:a,isActive:b,pause(){g(),b.value=!1},resume(){b.value=!0},stop:v}}function Zt(e){let r;return new Promise(t=>{r=Yt(e,s=>{for(const n of s)n.isIntersecting&&t(!0)},{rootMargin:"30px 0px 0px 0px",threshold:0}),B(()=>t(!1))}).finally(()=>{r.stop()})}function $t(e){const{el:r,trigger:t}=e,s=(Array.isArray(e.trigger)?e.trigger:[e.trigger]).filter(Boolean);if(!t||s.includes("immediate")||s.includes("onNuxtReady"))return"onNuxtReady";if(s.some(l=>["visibility","visible"].includes(l)))return r?Zt(r):new Promise(()=>{});const n={},i=new Promise(l=>{const o=typeof r<"u"?r:document.body,a=Qt(o,s,()=>{a(),l(!0)},{once:!0,passive:!0});Gt(()=>{H(o,c=>{c&&s.forEach(g=>{c.dataset[`script_${g}`]&&(a(),l(!0))})},{immediate:!0})}),B(()=>l(!1))});return Object.assign(i,{ssrAttrs:n})}const er={__name:"NuxtTurnstile",props:{modelValue:{type:String,required:!1},trigger:{type:[String,Array,Boolean],required:!1},element:{type:String,required:!1,default:"div"},siteKey:{type:String,required:!1},options:{type:Object,required:!1,default:()=>({})},resetInterval:{type:Number,required:!1,default:1e3*250}},emits:["update:modelValue"],setup(e,{expose:r,emit:t}){const s=e,n=t,i=Q().public.turnstile,l=G(),o=G(!1);let a,c;const{onLoaded:g}=Pt({scriptOptions:{trigger:$t({trigger:s.trigger,el:l})}});let b,u;const v=()=>{a&&b(a)},C=()=>{o.value=!0,clearInterval(c),a&&u(a)};return U(()=>{g(async({render:w,reset:L,remove:d})=>{b=L,u=d,a=await w(l.value,{sitekey:s.siteKey||i.siteKey,callback:m=>n("update:modelValue",m),...s.options}),c=setInterval(v,s.resetInterval),o.value&&C()})}),pe(C),r({reset:v}),(w,L)=>(f(),I(ye(e.element),{ref_key:"el",ref:l},null,512))}};class tr{constructor(r,t){this.root=r,this.maxShapes=3,this.loadingClass="loading",this.shapeClass="loading__shape",this.bounceClasses={up:"loading--bounce-up",down:"loading--bounce-down"},this.types=["circle","square","triangle","triangle-2","rectangle"],this.colors=["--color-loading--1","--color-loading--2","--color-loading--3","--color-loading--4"],this.currentColors={},this.maxRuns=20,this.scaleMin=4,this.scaleMax=5,this.rotationMin=90,this.rotationMax=270,this.animationInterval=800,this.intervals=[],this.hasShapes=!1,this.init(t)}getRandomColor(r){let t=this.colors[Math.floor(Math.random()*this.colors.length)];return r<this.maxRuns&&this.currentColors[t]&&(r++,t=this.getRandomColor(r)),t}getRandomType(){return this.types[Math.floor(Math.random()*this.types.length)]}getRandomTypeClass(){return`loading__shape--${this.getRandomType()}`}getRandomScale(){return Math.floor(Math.random()*(this.scaleMax-this.scaleMin+1))+this.scaleMin}getRandomRotation(){return Math.floor(Math.random()*(this.rotationMin-this.rotationMax+1))+this.rotationMin}getRandomOffset(){let r=Math.random()*6-2;return`${r>=0?"+ ":"- "}${r}`}getRandomStyle(){const r=this.getRandomColor();return{style:` 2 left: calc(50% ${this.getRandomOffset()}vw); 3 --color-loading: var(${r}); 4 --loading-scale: ${this.getRandomScale()}vh; 5 --loading-rotation: ${this.getRandomRotation()}deg 6 `,color:r}}createShapes(){for(var r=0;r<this.maxShapes;r++){const t=document.createElement("shape"),s=k.append(this.root,t);this.startAnimation(s)}}startAnimation(r){this.intervals.push(setInterval(()=>{const t=this.getRandomStyle();this.currentColors[t.color]=!0,r.className="",r.classList.add(this.getRandomTypeClass()),r.classList.add(this.shapeClass),r.setAttribute("style",t.style),r.classList.contains(this.bounceClasses.up)?r.classList.replace(this.bounceClasses.down,this.bounceClasses.up):r.classList.add(this.bounceClasses.up),setTimeout(()=>{r.classList.replace(this.bounceClasses.up,this.bounceClasses.down),this.currentColors[t.color]=!1},this.animationInterval/2)},this.animationInterval))}init(r){if(r&&typeof r=="function")return r();this.root.classList.add(this.loadingClass)}on(r){this.hasShapes||(this.hasShapes=!0,this.createShapes()),r!==!0&&this.root.classList.add(T.LOADING)}
6clear(){this.intervals.forEach(r=>{clearInterval(r)})}off(r,t){r?this.clear():setTimeout(()=>{this.clear(),t!==!0&&this.root.classList.remove(T.LOADING)},100)}}const rr={emits:["submit","error"],tagName:"formular",data(){return{originalAction:"",formAction:"",formInstance:null,novalidateValue:null,errors:[],siteKey:null,loadingDelay:300,sleepDelay:1300,loading:{},hasLoading:!1,hasLoader:!0,turnstileReady:!1}},setup(){const e=Ce(),r=xe();return{config:e,formId:r}},computed:{loaderClasses(){return[`${this.hasLoading?T.LOADING:""}`,`${this.hasLoader?"loading":""}`,"vue-component"]},classList(){var e;return["form",`${k.isTrue(this.light)===!0?"is-light":""}`,`${k.isTrue(this.ajax)===!0?"form--ajax":""}`,`${k.isTrue(this.odoo)===!0?"form--odoo":""}`,`${k.isTrue(this.container)===!0?"container":""}`,`${k.isTrue(this.customValidation)===!0?"form--custom-validation":""}`,((e=this.form)==null?void 0:e.noCustomSubmit)===!0?M.noCustomSubmitClass:"","vue-component"]},reCaptchaField(){var e;return(e=this.formInstance)==null?void 0:e.reCaptchaField},novalidate(){return this.novalidateValue},hasAnimationValue(){return k.isTrue(this.hasAnimation)},rowClassList(){return["form__row",`${this.container?"row":""}`]},wrapperClassList(){return[`${this.container?"col-md-11 col-lg-10":""}`]},headlineClassList(){return["container headline-row",`${this.space?this.space:"space-top-2"}`,this.hasAnimationValue?"utility-animation fade-in-bottom":""]},sublineClassList(){return["text-center",`${this.form.sublineClasses?this.form.sublineClasses:""}`]},formClassList(){return["form__submit mt-5",`${this.positionValue}`]},positionValue(){return this.form.ctaPosition?this.form.ctaPosition:k.isTrue(this.uncentered)?"":"justify-content-end"},method(){return this.form.method?this.form.method:"post"},preparedBlocks(){var s,n;const e=[];let r=0,t=[];return(n=(s=this.form)==null?void 0:s.fields)==null||n.forEach(i=>{const l=this.useTranslation?{...i,...i.label&&{label:this.$t(i.label)},...i.requiredMsg&&{requiredMsg:this.$t(i.requiredMsg)}}:i;if(l.rowStart||l.rowEnd)l.rowStart?(e[r]=t,t.push(l),l.rowEnd&&(t=[],r++)):l.rowEnd&&(t.push(l),t=[],r++);else{if(t.push(l),e[r])return;e[r]=t,t=[],r++}}),e}},mounted(){var e;this.originalAction=this.formAction=(e=this.form)==null?void 0:e.action,this.formInstance=new M(this.$refs.root,null,this.validate.bind(this),this.hasRecaptcha,this.siteKey),M.expose(this.formInstance),this.novalidateValue="novalidate",this.hasRecaptcha&&(this.turnstileObserver=we(this.$refs.root,()=>{this.turnstileReady=!0},"200% 0px")),this.$refs.headline&&te.init([this.$refs.headline])},beforeUnmount(){var e;(e=this.turnstileObserver)==null||e.disconnect()},methods:{startLoading(){var e;(e=this.loading)!=null&&e.root||(this.loading=new tr(this.$refs.loader,()=>{this.hasLoader=!0})),this.hasLoading=!0,this.loading.on(!0)},stopLoading(){this.hasLoading=!1,this.loading.on(!1)},getTranslatedText(e){return this.useTranslation?this.$t(e):e},hasError(e){return this.errors[this.getId(e)]},getOptions(e){return!e.options||typeof e.options=="string"?null:typeof e.options=="object"&&e.options.list?e.options.list:e.options},getBlockClassList(e){return["row mx-n3",`${e!=null&&e.rowClass?e.rowClass:""}`]},getFieldClassList(e){return["px-3",`${e.col?"col-md-"+e.col:"col-md-12"}`]},getFieldId(e){var t;const r=(e==null?void 0:e.radios)||(e==null?void 0:e.checkboxes);return r?r[0].id:((t=e==null?void 0:e.formAttachments)==null?void 0:t.id)||(e==null?void 0:e.id)},getId(e){return M.getScopedId(this.formId,this.getFieldId(e))},getName(e){return this.getFieldId(e)},updateAction(e){e?this.formAction=e:this.formAction=this.originalAction},handleSubmit(e){if(this.startLoading(),!this.validate())this.stopLoading(),e.preventDefault();else{if(this.formInstance.hasSubmitHandling)return;e.preventDefault(),this.formInstance.handleRecaptcha().then(()=>{const r=this.$refs.form;r&&r.submit()})}},handleFormFieldUpdate(e){if(!e.id)return;const r=document.getElementById(e.id);r&&this.validateField(r)},validateField(e){const r=e.value,t=e.getAttribute("type"),s=e.hasAttribute("required");if(this.removeFieldError(e),t==="checkbox"){const n=e.checked;if(s&&!n)return this.addFieldError(e),!1}else{if(s&&!r)return this.addFieldError(e),!1;if(t==="email"&&!(i=>/\S+@\S+\.\S+/.test(i))(r))return this.addFieldError(e),!1}return this.addFieldValid(e),!0},addFieldValid(e){e.classList.add(T.VALID)},removeFieldError(e){delete this.errors[e.id],e.classList.remove(T.ERROR)},addFieldError(e){this.errors[e.id]=!0,e.classList.remove(T.VALID),e.classList.add(T.ERROR)},validate(){const e=this.$refs.root.querySelectorAll(`.form-field:not(.${T.HIDDEN}) .form-control[required], 7 .form-field:not(.${T.HIDDEN}) .form__checkbox[required]`);let r=!0;for(const t of e)this.validateField(t)||(r=!1);return r}},props:{form:Object,light:{default:null},analytics:{default:null},space:String,container:{default:null},ajax:{default:null},uncentered:{default:null},replaceValue:{default:null},customValidation:{default:null},options:Object,hasUuid:{default:null},hasAnimation:{default:null},useTranslation:{type:Boolean,default:!1},hasRecaptcha:{type:Boolean,default:!0}
7,odoo:{type:Boolean,default:!1},showLoader:{type:Boolean,default:!1}}},ir={class:"form__loader position-absolute mr-5 mr-lg-10 h-50",ref:"loader"},sr={class:"row"},nr={class:"col-sm-12"},ar=["innerHTML"],or=["method","action","novalidate"],lr={key:0,class:"form__recaptcha-infos"};function dr(e,r,t,s,n,i){var g,b;const l=ne,o=Mt,a=er,c=Se;return f(),y("div",{class:A([[i.classList,n.hasLoading?i.loaderClasses:""],"d-flex align-items-center justify-content-center"]),ref:"root"},[h("div",ir,null,512),h("div",{class:A(i.rowClassList)},[t.form?(f(),y("div",{key:0,class:A(["form__wrapper",i.wrapperClassList,n.hasLoading?"loading":""])},[t.form.headline?(f(),y("div",{key:0,class:A(i.headlineClassList),"data-utility-animation-step":"1",ref:"headline"},[h("div",sr,[h("div",nr,[D(l,{text:t.form.headline,level:t.form.level,id:t.form.id,classes:"text-center"},null,8,["text","level","id"]),h("p",{class:A(i.sublineClassList),innerHTML:t.form.subline},null,10,ar)])])],2)):F("",!0),h("form",{class:"form__form mt-6",method:i.method,action:n.formAction,novalidate:i.novalidate,onSubmit:r[1]||(r[1]=(...u)=>i.handleSubmit&&i.handleSubmit(...u)),ref:"form"},[(f(!0),y(S,null,V(i.preparedBlocks,u=>(f(),y(S,null,[u.length>0?(f(),y("div",{key:0,class:A(i.getBlockClassList(u[0]))},[(f(!0),y(S,null,V(u,v=>(f(),y("div",{class:A(i.getFieldClassList(v))},[D(o,{field:v,options:i.getOptions(v),"replace-value":t.replaceValue,id:i.getId(v),name:i.getName(v),"form-id":s.formId,"has-animation":i.hasAnimationValue,onActionChanged:i.updateAction,"has-error":i.hasError(v),onFormFieldUpdated:r[0]||(r[0]=C=>i.handleFormFieldUpdate(C))},null,8,["field","options","replace-value","id","name","form-id","has-animation","onActionChanged","has-error"])],2))),256))],2)):F("",!0)],64))),256)),t.hasRecaptcha?(f(),y("div",lr,[n.turnstileReady?(f(),I(a,{key:0,ref:"turnstile"},null,512)):F("",!0)])):F("",!0),h("div",{class:A(i.formClassList)},[D(c,{text:i.getTranslatedText(t.form.ctaText),type:"submit",button:!0,skin:(g=t.form.cta)==null?void 0:g.skin,width:(b=t.form.cta)==null?void 0:b.width,analytics:t.analytics,onClick:i.handleSubmit},null,8,["text","skin","width","analytics","onClick"])],2),r[2]||(r[2]=h("input",{type:"text",class:"form__super-field",name:"_gotcha"},null,-1)),i.reCaptchaField?(f(),y("input",be({key:1,name:"g-recaptcha-response",type:"hidden"},i.reCaptchaField),null,16)):F("",!0)],40,or)],2)):F("",!0)],2)],2)}const pr=Object.assign(q(rr,[["render",dr]]),{__name:"Formular"});export{pr as _};
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.