import{L as Me,j as Ze}from"./checkTypingFunction-087f80ba.js";import{l as et,n as Ae,o as Oe,p as Ee,k as be,b as Be,a as Ve,i as Ke,t as ge,q as tt,r as lt}from"./VTextField-b712f4db.js";import{a5 as ne,as as Pe,a6 as fe,b4 as Ne,Y,a9 as ve,a as f,F as Z,N as Q,u as nt,an as H,ae as Ce,r as U,G as M,bi as He,aq as xe,bj as at,a2 as Fe,bk as Ie,aP as ut,b7 as ot,aW as it,am as rt,bl as st,av as ye,X as ct,a_ as dt,aB as Ue,bm as ze,b2 as $e,a8 as we,m as ke,bn as je,bo as qe,j as We,bp as Le,b9 as pe,e as de,bb as ft,au as vt,bq as mt,br as ht}from"./index-207e8178.js";import{g as gt,b as yt,f as Te,V as Ye}from"./VMenu-a5999549.js";import{V as Ge}from"./VChip-0d63d8ef.js";const bt=ne({renderless:Boolean,...Pe()},"VVirtualScrollItem"),Vt=fe()({name:"VVirtualScrollItem",inheritAttrs:!1,props:bt(),emits:{"update:height":e=>!0},setup(e,i){let{attrs:t,emit:n,slots:c}=i;const{resizeRef:v,contentRect:b}=Ne(void 0,"border");Y(()=>{var r;return(r=b.value)==null?void 0:r.height},r=>{r!=null&&n("update:height",r)}),ve(()=>{var r,a;return e.renderless?f(Z,null,[(r=c.default)==null?void 0:r.call(c,{itemRef:v})]):f("div",Q({ref:v,class:["v-virtual-scroll__item",e.class],style:e.style},t),[(a=c.default)==null?void 0:a.call(c)])})}}),wt=-1,kt=1,Se=100,pt=ne({itemHeight:{type:[Number,String],default:null},height:[Number,String]},"virtual");function xt(e,i){const t=nt(),n=H(0);Ce(()=>{n.value=parseFloat(e.itemHeight||0)});const c=H(0),v=H(Math.ceil((parseInt(e.height)||t.height.value)/(n.value||16))||1),b=H(0),r=H(0),a=U(),m=U();let x=0;const{resizeRef:I,contentRect:o}=Ne();Ce(()=>{I.value=a.value});const s=M(()=>{var u;return a.value===document.documentElement?t.height.value:((u=o.value)==null?void 0:u.height)||parseInt(e.height)||0}),S=M(()=>!!(a.value&&m.value&&s.value&&n.value));let D=Array.from({length:i.value.length}),w=Array.from({length:i.value.length});const C=H(0);let _=-1;function G(u){return D[u]||n.value}const j=at(()=>{const u=performance.now();w[0]=0;const g=i.value.length;for(let L=1;L<=g-1;L++)w[L]=(w[L-1]||0)+G(L-1);C.value=Math.max(C.value,performance.now()-u)},C),re=Y(S,u=>{u&&(re(),x=m.value.offsetTop,j.immediate(),z(),~_&&Fe(()=>{Ie&&window.requestAnimationFrame(()=>{te(_),_=-1})}))});Y(s,(u,g)=>{g&&z()}),He(()=>{j.clear()});function V(u,g){const L=D[u],A=n.value;n.value=A?Math.min(n.value,g):g,(L!==g||A!==n.value)&&(D[u]=g,j())}function T(u){return u=xe(u,0,i.value.length-1),w[u]||0}function q(u){return St(w,u)}let F=0,ee=0,W=0;function ce(){if(!a.value||!m.value)return;const u=a.value.scrollTop,g=performance.now();g-W>500?(ee=Math.sign(u-F),x=m.value.offsetTop):ee=u-F,F=u,W=g,z()}function E(){!a.value||!m.value||(ee=0,W=0,z())}let se=-1;function z(){cancelAnimationFrame(se),se=requestAnimationFrame(ae)}function ae(){if(!a.value||!s.value)return;const u=F-x,g=Math.sign(ee),L=Math.max(0,u-Se),A=xe(q(L),0,i.value.length),k=u+s.value+Se,R=xe(q(k)+1,A+1,i.value.length);if((g!==wt||A<c.value)&&(g!==kt||R>v.value)){const p=T(c.value)-T(A),N=T(R)-T(v.value);Math.max(p,N)>Se?(c.value=A,v.value=R):(A<=0&&(c.value=A),R>=i.value.length&&(v.value=R))}b.value=T(c.value),r.value=T(i.value.length)-T(v.value)}function te(u){const g=T(u);!a.value||u&&!g?_=u:a.value.scrollTop=g}const d=M(()=>i.value.slice(c.value,v.value).map((u,g)=>({raw:u,index:g+c.value})));return Y(i,()=>{D=Array.from({length:i.value.length}),w=Array.from({length:i.value.length}),j.immediate(),z()},{deep:!0}),{containerRef:a,markerRef:m,computedItems:d,paddingTop:b,paddingBottom:r,scrollToIndex:te,handleScroll:ce,handleScrollend:E,handleItemResize:V}}function St(e,i){let t=e.length-1,n=0,c=0,v=null,b=-1;if(e[t]<i)return t;for(;n<=t;)if(c=n+t>>1,v=e[c],v>i)t=c-1;else if(v<i)b=c,n=c+1;else return v===i?c:n;return b}const Ct=ne({items:{type:Array,default:()=>[]},renderless:Boolean,...pt(),...Pe(),...ut()},"VVirtualScroll"),Xe=fe()({name:"VVirtualScroll",props:Ct(),setup(e,i){let{slots:t}=i;const n=ot("VVirtualScroll"),{dimensionStyles:c}=it(e),{containerRef:v,markerRef:b,handleScroll:r,handleScrollend:a,handleItemResize:m,scrollToIndex:x,paddingTop:I,paddingBottom:o,computedItems:s}=xt(e,rt(e,"items"));return st(()=>e.renderless,()=>{function S(){var C,_;const w=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";v.value===document.documentElement?(document[w]("scroll",r,{passive:!0}),document[w]("scrollend",a)):((C=v.value)==null||C[w]("scroll",r,{passive:!0}),(_=v.value)==null||_[w]("scrollend",a))}ct(()=>{v.value=gt(n.vnode.el,!0),S(!0)}),He(S)}),ve(()=>{const S=s.value.map(D=>f(Vt,{key:D.index,renderless:e.renderless,"onUpdate:height":w=>m(D.index,w)},{default:w=>{var C;return(C=t.default)==null?void 0:C.call(t,{item:D.raw,index:D.index,...w})}}));return e.renderless?f(Z,null,[f("div",{ref:b,class:"v-virtual-scroll__spacer",style:{paddingTop:ye(I.value)}},null),S,f("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:ye(o.value)}},null)]):f("div",{ref:v,class:["v-virtual-scroll",e.class],onScrollPassive:r,onScrollend:a,style:[c.value,e.style]},[f("div",{ref:b,class:"v-virtual-scroll__container",style:{paddingTop:ye(I.value),paddingBottom:ye(o.value)}},[S])])}),{scrollToIndex:x}}});function Qe(e,i){const t=H(!1);let n;function c(r){cancelAnimationFrame(n),t.value=!0,n=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{t.value=!1})})}async function v(){await new Promise(r=>requestAnimationFrame(r)),await new Promise(r=>requestAnimationFrame(r)),await new Promise(r=>requestAnimationFrame(r)),await new Promise(r=>{if(t.value){const a=Y(t,()=>{a(),r()})}else r()})}async function b(r){var x,I;if(r.key==="Tab"&&((x=i.value)==null||x.focus()),!["PageDown","PageUp","Home","End"].includes(r.key))return;const a=(I=e.value)==null?void 0:I.$el;if(!a)return;(r.key==="Home"||r.key==="End")&&a.scrollTo({top:r.key==="Home"?0:a.scrollHeight,behavior:"smooth"}),await v();const m=a.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(r.key==="PageDown"||r.key==="Home"){const o=a.getBoundingClientRect().top;for(const s of m)if(s.getBoundingClientRect().top>=o){s.focus();break}}else{const o=a.getBoundingClientRect().bottom;for(const s of[...m].reverse())if(s.getBoundingClientRect().bottom<=o){s.focus();break}}}return{onListScroll:c,onListKeydown:b}}const Je=ne({chips:Boolean,closableChips:Boolean,closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"},eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,menu:Boolean,menuIcon:{type:dt,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,...et({itemChildren:!1})},"Select"),Ft=ne({...Je(),...Ue(Ae({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...ze({transition:{component:yt}})},"VSelect"),zt=fe()({name:"VSelect",props:Ft(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,i){let{slots:t}=i;const{t:n}=$e(),c=U(),v=U(),b=U(),r=we(e,"menu"),a=M({get:()=>r.value,set:d=>{var u;r.value&&!d&&((u=v.value)!=null&&u.ΨopenChildren)||(r.value=d)}}),{items:m,transformIn:x,transformOut:I}=Oe(e),o=we(e,"modelValue",[],d=>x(d===null?[null]:pe(d)),d=>{const u=I(d);return e.multiple?u:u[0]??null}),s=M(()=>typeof e.counterValue=="function"?e.counterValue(o.value):typeof e.counterValue=="number"?e.counterValue:o.value.length),S=Ee(),D=M(()=>o.value.map(d=>d.value)),w=H(!1),C=M(()=>a.value?e.closeText:e.openText);let _="",G;const j=M(()=>e.hideSelected?m.value.filter(d=>!o.value.some(u=>u===d)):m.value),re=M(()=>e.hideNoData&&!m.value.length||e.readonly||(S==null?void 0:S.isReadonly.value)),V=M(()=>{var d;return{...e.menuProps,activatorProps:{...((d=e.menuProps)==null?void 0:d.activatorProps)||{},"aria-haspopup":"listbox"}}}),T=U(),{onListScroll:q,onListKeydown:F}=Qe(T,c);function ee(d){e.openOnClear&&(a.value=!0)}function W(){re.value||(a.value=!a.value)}function ce(d){var k,R;if(!d.key||e.readonly||S!=null&&S.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(d.key)&&d.preventDefault(),["Enter","ArrowDown"," "].includes(d.key)&&(a.value=!0),["Escape","Tab"].includes(d.key)&&(a.value=!1),d.key==="Home"?(k=T.value)==null||k.focus("first"):d.key==="End"&&((R=T.value)==null||R.focus("last"));const u=1e3;function g(p){const N=p.key.length===1,K=!p.ctrlKey&&!p.metaKey&&!p.altKey;return N&&K}if(e.multiple||!g(d))return;const L=performance.now();L-G>u&&(_=""),_+=d.key.toLowerCase(),G=L;const A=m.value.find(p=>p.title.toLowerCase().startsWith(_));A!==void 0&&(o.value=[A])}function E(d){if(e.multiple){const u=o.value.findIndex(g=>e.valueComparator(g.value,d.value));if(u===-1)o.value=[...o.value,d];else{const g=[...o.value];g.splice(u,1),o.value=g}}else o.value=[d],a.value=!1}function se(d){var u;(u=T.value)!=null&&u.$el.contains(d.relatedTarget)||(a.value=!1)}function z(){var d;w.value&&((d=c.value)==null||d.focus())}function ae(d){w.value=!0}function te(d){if(d==null)o.value=[];else if(Le(c.value,":autofill")||Le(c.value,":-webkit-autofill")){const u=m.value.find(g=>g.title===d);u&&E(u)}else c.value&&(c.value.value="")}return Y(a,()=>{if(!e.hideSelected&&a.value&&o.value.length){const d=j.value.findIndex(u=>o.value.some(g=>e.valueComparator(g.value,u.value)));Ie&&window.requestAnimationFrame(()=>{var u;d>=0&&((u=b.value)==null||u.scrollToIndex(d))})}}),ve(()=>{const d=!!(e.chips||t.chip),u=!!(!e.hideNoData||j.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),g=o.value.length>0,L=be.filterProps(e),A=g||!w.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return f(be,Q({ref:c},L,{modelValue:o.value.map(k=>k.props.value).join(", "),"onUpdate:modelValue":te,focused:w.value,"onUpdate:focused":k=>w.value=k,validationValue:o.externalValue,counterValue:s.value,dirty:g,class:["v-select",{"v-select--active-menu":a.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":o.value.length,"v-select--selection-slot":!!t.selection},e.class],style:e.style,inputmode:"none",placeholder:A,"onClick:clear":ee,"onMousedown:control":W,onBlur:se,onKeydown:ce,"aria-label":n(C.value),title:n(C.value)}),{...t,default:()=>f(Z,null,[f(Ye,Q({ref:v,modelValue:a.value,"onUpdate:modelValue":k=>a.value=k,activator:"parent",contentClass:"v-select__content",disabled:re.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterLeave:z},V.value),{default:()=>[u&&f(Be,{ref:T,selected:D.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:k=>k.preventDefault(),onKeydown:F,onFocusin:ae,onScrollPassive:q,tabindex:"-1",color:e.itemColor??e.color},{default:()=>{var k,R,p;return[(k=t["prepend-item"])==null?void 0:k.call(t),!j.value.length&&!e.hideNoData&&(((R=t["no-data"])==null?void 0:R.call(t))??f(Ve,{title:n(e.noDataText)},null)),f(Xe,{ref:b,renderless:!0,items:j.value},{default:N=>{var y;let{item:K,index:le,itemRef:X}=N;const l=Q(K.props,{ref:X,key:le,onClick:()=>E(K)});return((y=t.item)==null?void 0:y.call(t,{item:K,index:le,props:l}))??f(Ve,Q(l,{role:"option"}),{prepend:P=>{let{isSelected:O}=P;return f(Z,null,[e.multiple&&!e.hideSelected?f(Ke,{key:K.value,modelValue:O,ripple:!1,tabindex:"-1"},null):void 0,K.props.prependIcon&&f(ke,{icon:K.props.prependIcon},null)])}})}}),(p=t["append-item"])==null?void 0:p.call(t)]}})]}),o.value.map((k,R)=>{function p(X){X.stopPropagation(),X.preventDefault(),E(k)}const N={"onClick:close":p,onMousedown(X){X.preventDefault(),X.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},K=d?!!t.chip:!!t.selection,le=K?je(d?t.chip({item:k,index:R,props:N}):t.selection({item:k,index:R})):void 0;if(!(K&&!le))return f("div",{key:k.value,class:"v-select__selection"},[d?t.chip?f(qe,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:k.title}}},{default:()=>[le]}):f(Ge,Q({key:"chip",closable:e.closableChips,size:"small",text:k.title,disabled:k.props.disabled},N),null):le??f("span",{class:"v-select__selection-text"},[k.title,e.multiple&&R<o.value.length-1&&f("span",{class:"v-select__selection-comma"},[We(",")])])])})]),"append-inner":function(){var N;for(var k=arguments.length,R=new Array(k),p=0;p<k;p++)R[p]=arguments[p];return f(Z,null,[(N=t["append-inner"])==null?void 0:N.call(t,...R),e.menuIcon?f(ke,{class:"v-select__menu-icon",icon:e.menuIcon},null):void 0])}})}),Te({isFocused:w,menu:a,select:E},c)}}),Pt=e=>{if(/^\d{4} ?([a-z]{2})?$/i.test(e))return Me.POSTCODE;if(/^[12\D]*$/.test(e))return Me.CITY},_e="Tik een geldige postcode of plaatsnaam in.",It={postcode:"Deze postcode kennen we niet. Tik een geldige postcode in.",city:"Deze plaatsnaam kennen we niet. Tik een geldige plaatsnaam in."},Tt=e=>!!e||"Dit veld is verplicht",Dt=async e=>{const i=Pt(e);if(!i||i===void 0)return Promise.resolve(_e);const t=It[i]??_e;return await Ze.getLocation(e,i).then(()=>!0).catch(()=>t)},$t=[Tt,Dt],jt=(e,i)=>{const t=e.toLowerCase(),n=i.toLowerCase();return t.startsWith(n)};const Rt=(e,i,t)=>e==null||i==null?-1:e.toString().toLocaleLowerCase().indexOf(i.toString().toLocaleLowerCase()),Mt=ne({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function Lt(e,i,t){var r;const n=[],c=(t==null?void 0:t.default)??Rt,v=t!=null&&t.filterKeys?pe(t.filterKeys):!1,b=Object.keys((t==null?void 0:t.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return n;e:for(let a=0;a<e.length;a++){const[m,x=m]=pe(e[a]),I={},o={};let s=-1;if(i&&!(t!=null&&t.noFilter)){if(typeof m=="object"){const w=v||Object.keys(x);for(const C of w){const _=ft(x,C,x),G=(r=t==null?void 0:t.customKeyFilter)==null?void 0:r[C];if(s=G?G(_,i,m):c(_,i,m),s!==-1&&s!==!1)G?I[C]=s:o[C]=s;else if((t==null?void 0:t.filterMode)==="every")continue e}}else s=c(m,i,m),s!==-1&&s!==!1&&(o.title=s);const S=Object.keys(o).length,D=Object.keys(I).length;if(!S&&!D||(t==null?void 0:t.filterMode)==="union"&&D!==b&&!S||(t==null?void 0:t.filterMode)==="intersection"&&(D!==b||!S))continue}n.push({index:a,matches:{...o,...I}})}return n}function _t(e,i,t,n){const c=U([]),v=U(new Map),b=M(()=>n!=null&&n.transform?de(i).map(a=>[a,n.transform(a)]):de(i));Ce(()=>{const a=typeof t=="function"?t():de(t),m=typeof a!="string"&&typeof a!="number"?"":String(a),x=Lt(b.value,m,{customKeyFilter:{...e.customKeyFilter,...de(n==null?void 0:n.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),I=de(i),o=[],s=new Map;x.forEach(S=>{let{index:D,matches:w}=S;const C=I[D];o.push(C),s.set(C.value,w)}),c.value=o,v.value=s});function r(a){return v.value.get(a.value)}return{filteredItems:c,filteredMatches:v,getMatches:r}}function At(e,i,t){if(i==null)return e;if(Array.isArray(i))throw new Error("Multiple matches is not implemented");return typeof i=="number"&&~i?f(Z,null,[f("span",{class:"v-combobox__unmask"},[e.substr(0,i)]),f("span",{class:"v-combobox__mask"},[e.substr(i,t)]),f("span",{class:"v-combobox__unmask"},[e.substr(i+t)])]):e}const Ot=ne({autoSelectFirst:{type:[Boolean,String]},delimiters:Array,...Mt({filterKeys:["title"]}),...Je({hideNoData:!0,returnObject:!0}),...Ue(Ae({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...ze({transition:!1})},"VCombobox"),qt=fe()({name:"VCombobox",props:Ot(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:search":e=>!0,"update:menu":e=>!0},setup(e,i){var X;let{emit:t,slots:n}=i;const{t:c}=$e(),v=U(),b=H(!1),r=H(!0),a=H(!1),m=U(),x=U(),I=we(e,"menu"),o=M({get:()=>I.value,set:l=>{var y;I.value&&!l&&((y=m.value)!=null&&y.ΨopenChildren)||(I.value=l)}}),s=H(-1);let S=!1;const D=M(()=>{var l;return(l=v.value)==null?void 0:l.color}),w=M(()=>o.value?e.closeText:e.openText),{items:C,transformIn:_,transformOut:G}=Oe(e),{textColorClasses:j,textColorStyles:re}=vt(D),V=we(e,"modelValue",[],l=>_(pe(l)),l=>{const y=G(l);return e.multiple?y:y[0]??null}),T=Ee(),q=H(e.multiple?"":((X=V.value[0])==null?void 0:X.title)??""),F=M({get:()=>q.value,set:l=>{var y;if(q.value=l??"",e.multiple||(V.value=[ge(e,l)]),l&&e.multiple&&((y=e.delimiters)!=null&&y.length)){const P=l.split(new RegExp(`(?:${e.delimiters.join("|")})+`));P.length>1&&(P.forEach(O=>{O=O.trim(),O&&p(ge(e,O))}),q.value="")}l||(s.value=-1),r.value=!l}}),ee=M(()=>typeof e.counterValue=="function"?e.counterValue(V.value):typeof e.counterValue=="number"?e.counterValue:e.multiple?V.value.length:F.value.length);Y(q,l=>{S?Fe(()=>S=!1):b.value&&!o.value&&(o.value=!0),t("update:search",l)}),Y(V,l=>{var y;e.multiple||(q.value=((y=l[0])==null?void 0:y.title)??"")});const{filteredItems:W,getMatches:ce}=_t(e,C,()=>r.value?"":F.value),E=M(()=>e.hideSelected?W.value.filter(l=>!V.value.some(y=>y.value===l.value)):W.value),se=M(()=>V.value.map(l=>l.value)),z=M(()=>{var y;return(e.autoSelectFirst===!0||e.autoSelectFirst==="exact"&&F.value===((y=E.value[0])==null?void 0:y.title))&&E.value.length>0&&!r.value&&!a.value}),ae=M(()=>e.hideNoData&&!C.value.length||e.readonly||(T==null?void 0:T.isReadonly.value)),te=U(),{onListScroll:d,onListKeydown:u}=Qe(te,v);function g(l){S=!0,e.openOnClear&&(o.value=!0)}function L(){ae.value||(o.value=!0)}function A(l){ae.value||(b.value&&(l.preventDefault(),l.stopPropagation()),o.value=!o.value)}function k(l){var O;if(ht(l)||e.readonly||T!=null&&T.isReadonly.value)return;const y=v.value.selectionStart,P=V.value.length;if((s.value>-1||["Enter","ArrowDown","ArrowUp"].includes(l.key))&&l.preventDefault(),["Enter","ArrowDown"].includes(l.key)&&(o.value=!0),["Escape"].includes(l.key)&&(o.value=!1),["Enter","Escape","Tab"].includes(l.key)&&(z.value&&["Enter","Tab"].includes(l.key)&&p(W.value[0]),r.value=!0),l.key==="ArrowDown"&&z.value&&((O=te.value)==null||O.focus("next")),!!e.multiple){if(["Backspace","Delete"].includes(l.key)){if(s.value<0){l.key==="Backspace"&&!F.value&&(s.value=P-1);return}const h=s.value,B=V.value[s.value];B&&!B.props.disabled&&p(B,!1),s.value=h>=P-1?P-2:h}if(l.key==="ArrowLeft"){if(s.value<0&&y>0)return;const h=s.value>-1?s.value-1:P-1;V.value[h]?s.value=h:(s.value=-1,v.value.setSelectionRange(F.value.length,F.value.length))}if(l.key==="ArrowRight"){if(s.value<0)return;const h=s.value+1;V.value[h]?s.value=h:(s.value=-1,v.value.setSelectionRange(0,0))}l.key==="Enter"&&F.value&&(p(ge(e,F.value)),F.value="")}}function R(){var l;b.value&&(r.value=!0,(l=v.value)==null||l.focus())}function p(l){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.multiple){const P=V.value.findIndex(h=>e.valueComparator(h.value,l.value)),O=y??!~P;if(~P){const h=O?[...V.value,l]:[...V.value];h.splice(P,1),V.value=h}else O&&(V.value=[...V.value,l]);F.value=""}else{const P=y!==!1;V.value=P?[l]:[],q.value=P?l.title:"",Fe(()=>{o.value=!1,r.value=!0})}}function N(l){b.value=!0,setTimeout(()=>{a.value=!0})}function K(l){a.value=!1}function le(l){(l==null||l===""&&!e.multiple)&&(V.value=[])}return Y(W,l=>{!l.length&&e.hideNoData&&(o.value=!1)}),Y(b,(l,y)=>{l||l===y||(s.value=-1,o.value=!1,z.value&&!a.value&&!V.value.some(P=>{let{value:O}=P;return O===E.value[0].value})?p(E.value[0]):e.multiple&&F.value&&p(ge(e,F.value)))}),Y(o,()=>{if(!e.hideSelected&&o.value&&V.value.length){const l=E.value.findIndex(y=>V.value.some(P=>e.valueComparator(P.value,y.value)));Ie&&window.requestAnimationFrame(()=>{var y;l>=0&&((y=x.value)==null||y.scrollToIndex(l))})}}),ve(()=>{const l=!!(e.chips||n.chip),y=!!(!e.hideNoData||E.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),P=V.value.length>0,O=be.filterProps(e);return f(be,Q({ref:v},O,{modelValue:F.value,"onUpdate:modelValue":[h=>F.value=h,le],focused:b.value,"onUpdate:focused":h=>b.value=h,validationValue:V.externalValue,counterValue:ee.value,dirty:P,class:["v-combobox",{"v-combobox--active-menu":o.value,"v-combobox--chips":!!e.chips,"v-combobox--selection-slot":!!n.selection,"v-combobox--selecting-index":s.value>-1,[`v-combobox--${e.multiple?"multiple":"single"}`]:!0},e.class],style:e.style,readonly:e.readonly,placeholder:P?void 0:e.placeholder,"onClick:clear":g,"onMousedown:control":L,onKeydown:k}),{...n,default:()=>f(Z,null,[f(Ye,Q({ref:m,modelValue:o.value,"onUpdate:modelValue":h=>o.value=h,activator:"parent",contentClass:"v-combobox__content",disabled:ae.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterLeave:R},e.menuProps),{default:()=>[y&&f(Be,{ref:te,selected:se.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:h=>h.preventDefault(),onKeydown:u,onFocusin:N,onFocusout:K,onScrollPassive:d,tabindex:"-1",color:e.itemColor??e.color},{default:()=>{var h,B,J;return[(h=n["prepend-item"])==null?void 0:h.call(n),!E.value.length&&!e.hideNoData&&(((B=n["no-data"])==null?void 0:B.call(n))??f(Ve,{title:c(e.noDataText)},null)),f(Xe,{ref:x,renderless:!0,items:E.value},{default:ue=>{var Re;let{item:$,index:oe,itemRef:ie}=ue;const De=Q($.props,{ref:ie,key:oe,active:z.value&&oe===0?!0:void 0,onClick:()=>p($,null)});return((Re=n.item)==null?void 0:Re.call(n,{item:$,index:oe,props:De}))??f(Ve,De,{prepend:me=>{let{isSelected:he}=me;return f(Z,null,[e.multiple&&!e.hideSelected?f(Ke,{key:$.value,modelValue:he,ripple:!1,tabindex:"-1"},null):void 0,$.props.prependIcon&&f(ke,{icon:$.props.prependIcon},null)])},title:()=>{var me,he;return r.value?$.title:At($.title,(me=ce($))==null?void 0:me.title,((he=F.value)==null?void 0:he.length)??0)}})}}),(J=n["append-item"])==null?void 0:J.call(n)]}})]}),V.value.map((h,B)=>{function J(ie){ie.stopPropagation(),ie.preventDefault(),p(h,!1)}const ue={"onClick:close":J,onMousedown(ie){ie.preventDefault(),ie.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},$=l?!!n.chip:!!n.selection,oe=$?je(l?n.chip({item:h,index:B,props:ue}):n.selection({item:h,index:B})):void 0;if(!($&&!oe))return f("div",{key:h.value,class:["v-combobox__selection",B===s.value&&["v-combobox__selection--selected",j.value]],style:B===s.value?re.value:{}},[l?n.chip?f(qe,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:h.title}}},{default:()=>[oe]}):f(Ge,Q({key:"chip",closable:e.closableChips,size:"small",text:h.title,disabled:h.props.disabled},ue),null):oe??f("span",{class:"v-combobox__selection-text"},[h.title,e.multiple&&B<V.value.length-1&&f("span",{class:"v-combobox__selection-comma"},[We(",")])])])})]),"append-inner":function(){var ue;for(var h=arguments.length,B=new Array(h),J=0;J<h;J++)B[J]=arguments[J];return f(Z,null,[(ue=n["append-inner"])==null?void 0:ue.call(n,...B),(!e.hideNoData||e.items.length)&&e.menuIcon?f(ke,{class:"v-combobox__menu-icon",icon:e.menuIcon,onMousedown:A,onClick:mt,"aria-label":c(w.value),title:c(w.value)},null):void 0])}})}),Te({isFocused:b,isPristine:r,menu:o,search:F,selectionIndex:s,filteredItems:W,select:p},v)}}),Et=ne({...Pe(),...tt()},"VForm"),Wt=fe()({name:"VForm",props:Et(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,i){let{slots:t,emit:n}=i;const c=lt(e),v=U();function b(a){a.preventDefault(),c.reset()}function r(a){const m=a,x=c.validate();m.then=x.then.bind(x),m.catch=x.catch.bind(x),m.finally=x.finally.bind(x),n("submit",m),m.defaultPrevented||x.then(I=>{var s;let{valid:o}=I;o&&((s=v.value)==null||s.submit())}),m.preventDefault()}return ve(()=>{var a;return f("form",{ref:v,class:["v-form",e.class],style:e.style,novalidate:!0,onReset:b,onSubmit:r},[(a=t.default)==null?void 0:a.call(t,c)])}),Te(c,v)}});export{Wt as V,qt as a,zt as b,Pt as g,jt as i,$t as l,Mt as m,_t as u};