import{p as He,ag as ze,k as ht,a6 as oe,aO as Mt,w as Y,E as el,o as Be,q as O,j as tl,au as Ge,aZ as gt,ac as ll,ax as nl,a as $e,u as ol,s as ul,b as il,aj as Tt,e as al,f as rl,g as sl,h as cl,i as dl,a_ as fl,a$ as St,b0 as vl,af as ml,b1 as hl,m as gl,n as A,x as Sl,T as bl,t as x,v as yl,aV as wl,b2 as xl,aq as zt,b3 as Cl,y as ae,b4 as Ht,b5 as et,b6 as Bt,b7 as Ft,aD as Vl,ao as pl,aE as kl,U as Re,b8 as ql,aN as Al,b9 as El,aA as Ml,aC as Tl,aB as zl,ae as Hl,ba as Bl,bb as Me,bc as Fl,bd as Il,be as bt,bf as Ol,ah as Ve,aP as Ll,aa as _l,az as Rl,bg as Pl}from"./index-BMUcF_AE.js";import{a as Dl,b as Wl,Q as $l}from"./QItem-49cALKGJ.js";import{c as Kl,n as yt}from"./format-4vRgyZVr.js";const jl={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},Nl={...jl,contextMenu:Boolean};function Ql({showing:e,avoidEmit:l,configureAnchorEl:o}){const{props:u,proxy:v,emit:i}=He(),m=O(null);let h=null;function g(a){return m.value===null?!1:a===void 0||a.touches===void 0||a.touches.length<=1}const b={};o===void 0&&(Object.assign(b,{hide(a){v.hide(a)},toggle(a){v.toggle(a),a.qAnchorHandled=!0},toggleKey(a){Mt(a,13)===!0&&b.toggle(a)},contextClick(a){v.hide(a),ze(a),oe(()=>{v.show(a),a.qAnchorHandled=!0})},prevent:ze,mobileTouch(a){if(b.mobileCleanup(a),g(a)!==!0)return;v.hide(a),m.value.classList.add("non-selectable");const S=a.target;ht(b,"anchor",[[S,"touchmove","mobileCleanup","passive"],[S,"touchend","mobileCleanup","passive"],[S,"touchcancel","mobileCleanup","passive"],[m.value,"contextmenu","prevent","notPassive"]]),h=setTimeout(()=>{h=null,v.show(a),a.qAnchorHandled=!0},300)},mobileCleanup(a){m.value.classList.remove("non-selectable"),h!==null&&(clearTimeout(h),h=null),e.value===!0&&a!==void 0&&Kl()}}),o=function(a=u.contextMenu){if(u.noParentEvent===!0||m.value===null)return;let S;a===!0?v.$q.platform.is.mobile===!0?S=[[m.value,"touchstart","mobileTouch","passive"]]:S=[[m.value,"mousedown","hide","passive"],[m.value,"contextmenu","contextClick","notPassive"]]:S=[[m.value,"click","toggle","passive"],[m.value,"keyup","toggleKey","passive"]],ht(b,"anchor",S)});function s(){tl(b,"anchor")}function w(a){for(m.value=a;m.value.classList.contains("q-anchor--skip");)m.value=m.value.parentNode;o()}function C(){if(u.target===!1||u.target===""||v.$el.parentNode===null)m.value=null;else if(u.target===!0)w(v.$el.parentNode);else{let a=u.target;if(typeof u.target=="string")try{a=document.querySelector(u.target)}catch{a=void 0}a!=null?(m.value=a.$el||a,o()):(m.value=null,console.error(`Anchor: target "${u.target}" not found`))}}return Y(()=>u.contextMenu,a=>{m.value!==null&&(s(),o(a))}),Y(()=>u.target,()=>{m.value!==null&&s(),C()}),Y(()=>u.noParentEvent,a=>{m.value!==null&&(a===!0?s():o())}),el(()=>{C(),l!==!0&&u.modelValue===!0&&m.value===null&&i("update:modelValue",!1)}),Be(()=>{h!==null&&clearTimeout(h),s()}),{anchorEl:m,canShow:g,anchorEvents:b}}function Ul(e,l){const o=O(null);let u;function v(h,g){const b=`${g!==void 0?"add":"remove"}EventListener`,s=g!==void 0?g:u;h!==window&&h[b]("scroll",s,Ge.passive),window[b]("scroll",s,Ge.passive),u=g}function i(){o.value!==null&&(v(o.value),o.value=null)}const m=Y(()=>e.noParentEvent,()=>{o.value!==null&&(i(),l())});return Be(m),{localScrollTarget:o,unconfigureScrollTarget:i,changeScrollEvent:v}}const{notPassiveCapture:Pe}=Ge,he=[];function De(e){const l=e.target;if(l===void 0||l.nodeType===8||l.classList.contains("no-pointer-events")===!0)return;let o=gt.length-1;for(;o>=0;){const u=gt[o].$;if(u.type.name==="QTooltip"){o--;continue}if(u.type.name!=="QDialog")break;if(u.props.seamless!==!0)return;o--}for(let u=he.length-1;u>=0;u--){const v=he[u];if((v.anchorEl.value===null||v.anchorEl.value.contains(l)===!1)&&(l===document.body||v.innerRef.value!==null&&v.innerRef.value.contains(l)===!1))e.qClickOutside=!0,v.onClickOutside(e);else return}}function Xl(e){he.push(e),he.length===1&&(document.addEventListener("mousedown",De,Pe),document.addEventListener("touchstart",De,Pe))}function wt(e){const l=he.findIndex(o=>o===e);l!==-1&&(he.splice(l,1),he.length===0&&(document.removeEventListener("mousedown",De,Pe),document.removeEventListener("touchstart",De,Pe)))}let xt,Ct;function Vt(e){const l=e.split(" ");return l.length!==2?!1:["top","center","bottom"].includes(l[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(l[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function Yl(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const Je={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{Je[`${e}#ltr`]=e,Je[`${e}#rtl`]=e});function pt(e,l){const o=e.split(" ");return{vertical:o[0],horizontal:Je[`${o[1]}#${l===!0?"rtl":"ltr"}`]}}function Zl(e,l){let{top:o,left:u,right:v,bottom:i,width:m,height:h}=e.getBoundingClientRect();return l!==void 0&&(o-=l[1],u-=l[0],i+=l[1],v+=l[0],m+=l[0],h+=l[1]),{top:o,bottom:i,height:h,left:u,right:v,width:m,middle:u+(v-u)/2,center:o+(i-o)/2}}function Gl(e,l,o){let{top:u,left:v}=e.getBoundingClientRect();return u+=l.top,v+=l.left,o!==void 0&&(u+=o[1],v+=o[0]),{top:u,bottom:u+1,height:1,left:v,right:v+1,width:1,middle:v,center:u}}function Jl(e,l){return{top:0,center:l/2,bottom:l,left:0,middle:e/2,right:e}}function kt(e,l,o,u){return{top:e[o.vertical]-l[u.vertical],left:e[o.horizontal]-l[u.horizontal]}}function It(e,l=0){if(e.targetEl===null||e.anchorEl===null||l>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{It(e,l+1)},10);return}const{targetEl:o,offset:u,anchorEl:v,anchorOrigin:i,selfOrigin:m,absoluteOffset:h,fit:g,cover:b,maxHeight:s,maxWidth:w}=e;if(ll.is.ios===!0&&window.visualViewport!==void 0){const B=document.body.style,{offsetLeft:R,offsetTop:W}=window.visualViewport;R!==xt&&(B.setProperty("--q-pe-left",R+"px"),xt=R),W!==Ct&&(B.setProperty("--q-pe-top",W+"px"),Ct=W)}const{scrollLeft:C,scrollTop:a}=o,S=h===void 0?Zl(v,b===!0?[0,0]:u):Gl(v,h,u);Object.assign(o.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:w,maxHeight:s,visibility:"visible"});const{offsetWidth:P,offsetHeight:y}=o,{elWidth:D,elHeight:U}=g===!0||b===!0?{elWidth:Math.max(S.width,P),elHeight:b===!0?Math.max(S.height,y):y}:{elWidth:P,elHeight:y};let M={maxWidth:w,maxHeight:s};(g===!0||b===!0)&&(M.minWidth=S.width+"px",b===!0&&(M.minHeight=S.height+"px")),Object.assign(o.style,M);const E=Jl(D,U);let F=kt(S,E,i,m);if(h===void 0||u===void 0)Xe(F,S,E,i,m);else{const{top:B,left:R}=F;Xe(F,S,E,i,m);let W=!1;if(F.top!==B){W=!0;const N=2*u[1];S.center=S.top-=N,S.bottom-=N+2}if(F.left!==R){W=!0;const N=2*u[0];S.middle=S.left-=N,S.right-=N+2}W===!0&&(F=kt(S,E,i,m),Xe(F,S,E,i,m))}M={top:F.top+"px",left:F.left+"px"},F.maxHeight!==void 0&&(M.maxHeight=F.maxHeight+"px",S.height>F.maxHeight&&(M.minHeight=M.maxHeight)),F.maxWidth!==void 0&&(M.maxWidth=F.maxWidth+"px",S.width>F.maxWidth&&(M.minWidth=M.maxWidth)),Object.assign(o.style,M),o.scrollTop!==a&&(o.scrollTop=a),o.scrollLeft!==C&&(o.scrollLeft=C)}function Xe(e,l,o,u,v){const i=o.bottom,m=o.right,h=nl(),g=window.innerHeight-h,b=document.body.clientWidth;if(e.top<0||e.top+i>g)if(v.vertical==="center")e.top=l[u.vertical]>g/2?Math.max(0,g-i):0,e.maxHeight=Math.min(i,g);else if(l[u.vertical]>g/2){const s=Math.min(g,u.vertical==="center"?l.center:u.vertical===v.vertical?l.bottom:l.top);e.maxHeight=Math.min(i,s),e.top=Math.max(0,s-i)}else e.top=Math.max(0,u.vertical==="center"?l.center:u.vertical===v.vertical?l.top:l.bottom),e.maxHeight=Math.min(i,g-e.top);if(e.left<0||e.left+m>b)if(e.maxWidth=Math.min(m,b),v.horizontal==="middle")e.left=l[u.horizontal]>b/2?Math.max(0,b-m):0;else if(l[u.horizontal]>b/2){const s=Math.min(b,u.horizontal==="middle"?l.middle:u.horizontal===v.horizontal?l.right:l.left);e.maxWidth=Math.min(m,s),e.left=Math.max(0,s-e.maxWidth)}else e.left=Math.max(0,u.horizontal==="middle"?l.middle:u.horizontal===v.horizontal?l.left:l.right),e.maxWidth=Math.min(m,b-e.left)}const en=$e({name:"QMenu",inheritAttrs:!1,props:{...Nl,...al,...Tt,...il,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noEscDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:Vt},self:{type:String,validator:Vt},offset:{type:Array,validator:Yl},scrollTarget:ul,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...ol,"click","escapeKey"],setup(e,{slots:l,emit:o,attrs:u}){let v=null,i,m,h;const g=He(),{proxy:b}=g,{$q:s}=b,w=O(null),C=O(!1),a=x(()=>e.persistent!==!0&&e.noRouteDismiss!==!0),S=zt(e,s),{registerTick:P,removeTick:y}=rl(),{registerTimeout:D}=sl(),{transitionProps:U,transitionStyle:M}=yl(e),{localScrollTarget:E,changeScrollEvent:F,unconfigureScrollTarget:B}=Ul(e,p),{anchorEl:R,canShow:W}=Ql({showing:C}),{hide:N}=cl({showing:C,canShow:W,handleShow:ce,handleHide:n,hideOnRouteChange:a,processOnMount:!0}),{showPortal:G,hidePortal:re,renderPortal:j}=dl(g,w,L,"menu"),le={anchorEl:R,innerRef:w,onClickOutside(r){if(e.persistent!==!0&&C.value===!0)return N(r),(r.type==="touchstart"||r.target.classList.contains("q-dialog__backdrop"))&&ae(r),!0}},se=x(()=>pt(e.anchor||(e.cover===!0?"center middle":"bottom start"),s.lang.rtl)),ue=x(()=>e.cover===!0?se.value:pt(e.self||"top start",s.lang.rtl)),X=x(()=>(e.square===!0?" q-menu--square":"")+(S.value===!0?" q-menu--dark q-dark":"")),ke=x(()=>e.autoClose===!0?{onClick:T}:{}),ie=x(()=>C.value===!0&&e.persistent!==!0);Y(ie,r=>{r===!0?(fl(q),Xl(le)):(St(q),wt(le))});function J(){wl(()=>{let r=w.value;r&&r.contains(document.activeElement)!==!0&&(r=r.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||r.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||r.querySelector("[autofocus], [data-autofocus]")||r,r.focus({preventScroll:!0}))})}function ce(r){if(v=e.noRefocus===!1?document.activeElement:null,vl(I),G(),p(),i=void 0,r!==void 0&&(e.touchPosition||e.contextMenu)){const $=ml(r);if($.left!==void 0){const{top:ee,left:ge}=R.value.getBoundingClientRect();i={left:$.left-ge,top:$.top-ee}}}m===void 0&&(m=Y(()=>s.screen.width+"|"+s.screen.height+"|"+e.self+"|"+e.anchor+"|"+s.lang.rtl,V)),e.noFocus!==!0&&document.activeElement.blur(),P(()=>{V(),e.noFocus!==!0&&J()}),D(()=>{s.platform.is.ios===!0&&(h=e.autoClose,w.value.click()),V(),G(!0),o("show",r)},e.transitionDuration)}function n(r){y(),re(),c(!0),v!==null&&(r===void 0||r.qClickOutside!==!0)&&(((r?.type.indexOf("key")===0?v.closest('[tabindex]:not([tabindex^="-"])'):void 0)||v).focus(),v=null),D(()=>{re(!0),o("hide",r)},e.transitionDuration)}function c(r){i=void 0,m!==void 0&&(m(),m=void 0),(r===!0||C.value===!0)&&(hl(I),B(),wt(le),St(q)),r!==!0&&(v=null)}function p(){(R.value!==null||e.scrollTarget!==void 0)&&(E.value=gl(R.value,e.scrollTarget),F(E.value,V))}function T(r){h!==!0?(xl(b,r),o("click",r)):h=!1}function I(r){ie.value===!0&&e.noFocus!==!0&&Cl(w.value,r.target)!==!0&&J()}function q(r){e.noEscDismiss!==!0&&(o("escapeKey"),N(r))}function V(){It({targetEl:w.value,offset:e.offset,anchorEl:R.value,anchorOrigin:se.value,selfOrigin:ue.value,absoluteOffset:i,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function L(){return A(bl,U.value,()=>C.value===!0?A("div",{role:"menu",...u,ref:w,tabindex:-1,class:["q-menu q-position-engine scroll"+X.value,u.class],style:[u.style,M.value],...ke.value},Sl(l.default)):null)}return Be(c),Object.assign(b,{focus:J,updatePosition:V}),j}}),tn=$e({name:"QField",inheritAttrs:!1,props:{...et,tag:{type:String,default:"label"}},emits:Ht,setup(){return Bt(Ft({tagProp:!0}))}}),ln={xs:8,sm:10,md:14,lg:20,xl:24},nn=$e({name:"QChip",props:{...Tt,...Vl,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:["update:modelValue","update:selected","remove","click"],setup(e,{slots:l,emit:o}){const{proxy:{$q:u}}=He(),v=zt(e,u),i=kl(e,ln),m=x(()=>e.selected===!0||e.icon!==void 0),h=x(()=>e.selected===!0?e.iconSelected||u.iconSet.chip.selected:e.icon),g=x(()=>e.iconRemove||u.iconSet.chip.remove),b=x(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),s=x(()=>{const y=e.outline===!0&&e.color||e.textColor;return"q-chip row inline no-wrap items-center"+(e.outline===!1&&e.color!==void 0?` bg-${e.color}`:"")+(y?` text-${y} q-chip--colored`:"")+(e.disable===!0?" disabled":"")+(e.dense===!0?" q-chip--dense":"")+(e.outline===!0?" q-chip--outline":"")+(e.selected===!0?" q-chip--selected":"")+(b.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(v.value===!0?" q-chip--dark q-dark":"")}),w=x(()=>{const y=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},D={...y,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||u.lang.label.remove};return{chip:y,remove:D}});function C(y){y.keyCode===13&&a(y)}function a(y){e.disable||(o("update:selected",!e.selected),o("click",y))}function S(y){(y.keyCode===void 0||y.keyCode===13)&&(ae(y),e.disable===!1&&(o("update:modelValue",!1),o("remove")))}function P(){const y=[];b.value===!0&&y.push(A("div",{class:"q-focus-helper"})),m.value===!0&&y.push(A(Re,{class:"q-chip__icon q-chip__icon--left",name:h.value}));const D=e.label!==void 0?[A("div",{class:"ellipsis"},[e.label])]:void 0;return y.push(A("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},ql(l.default,D))),e.iconRight&&y.push(A(Re,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&y.push(A(Re,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:g.value,...w.value.remove,onClick:S,onKeyup:S})),y}return()=>{if(e.modelValue===!1)return;const y={class:s.value,style:i.value};return b.value===!0&&Object.assign(y,w.value.chip,{onClick:a,onKeyup:C}),pl("div",y,P(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[Al,e.ripple]])}}});let We=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const l=document.createElement("div");Object.assign(l.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(l),e.scrollLeft=-1e3,We=e.scrollLeft>=0,e.remove()}const Z=1e3,on=["start","center","end","start-force","center-force","end-force"],Ot=Array.prototype.filter,un=window.getComputedStyle(document.body).overflowAnchor===void 0?Hl:function(e,l){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;const o=e.children||[];Ot.call(o,v=>v.dataset&&v.dataset.qVsAnchor!==void 0).forEach(v=>{delete v.dataset.qVsAnchor});const u=o[l];u?.dataset&&(u.dataset.qVsAnchor="")}))};function pe(e,l){return e+l}function Ye(e,l,o,u,v,i,m,h){const g=e===window?document.scrollingElement||document.documentElement:e,b=v===!0?"offsetWidth":"offsetHeight",s={scrollStart:0,scrollViewSize:-m-h,scrollMaxSize:0,offsetStart:-m,offsetEnd:-h};if(v===!0?(e===window?(s.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,s.scrollViewSize+=document.documentElement.clientWidth):(s.scrollStart=g.scrollLeft,s.scrollViewSize+=g.clientWidth),s.scrollMaxSize=g.scrollWidth,i===!0&&(s.scrollStart=(We===!0?s.scrollMaxSize-s.scrollViewSize:0)-s.scrollStart)):(e===window?(s.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,s.scrollViewSize+=document.documentElement.clientHeight):(s.scrollStart=g.scrollTop,s.scrollViewSize+=g.clientHeight),s.scrollMaxSize=g.scrollHeight),o!==null)for(let w=o.previousElementSibling;w!==null;w=w.previousElementSibling)w.classList.contains("q-virtual-scroll--skip")===!1&&(s.offsetStart+=w[b]);if(u!==null)for(let w=u.nextElementSibling;w!==null;w=w.nextElementSibling)w.classList.contains("q-virtual-scroll--skip")===!1&&(s.offsetEnd+=w[b]);if(l!==e){const w=g.getBoundingClientRect(),C=l.getBoundingClientRect();v===!0?(s.offsetStart+=C.left-w.left,s.offsetEnd-=C.width):(s.offsetStart+=C.top-w.top,s.offsetEnd-=C.height),e!==window&&(s.offsetStart+=s.scrollStart),s.offsetEnd+=s.scrollMaxSize-s.offsetStart}return s}function qt(e,l,o,u){l==="end"&&(l=(e===window?document.body:e)[o===!0?"scrollWidth":"scrollHeight"]),e===window?o===!0?(u===!0&&(l=(We===!0?document.body.scrollWidth-document.documentElement.clientWidth:0)-l),window.scrollTo(l,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,l):o===!0?(u===!0&&(l=(We===!0?e.scrollWidth-e.offsetWidth:0)-l),e.scrollLeft=l):e.scrollTop=l}function Te(e,l,o,u){if(o>=u)return 0;const v=l.length,i=Math.floor(o/Z),m=Math.floor((u-1)/Z)+1;let h=e.slice(i,m).reduce(pe,0);return o%Z!==0&&(h-=l.slice(i*Z,o).reduce(pe,0)),u%Z!==0&&u!==v&&(h-=l.slice(u,m*Z).reduce(pe,0)),h}const Lt={virtualScrollSliceSize:{type:[Number,String],default:10},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]},vn=Object.keys(Lt),At={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...Lt};function an({virtualScrollLength:e,getVirtualScrollTarget:l,getVirtualScrollEl:o,virtualScrollItemSizeComputed:u}){const v=He(),{props:i,emit:m,proxy:h}=v,{$q:g}=h;let b,s,w,C=[],a;const S=O(0),P=O(0),y=O({}),D=O(null),U=O(null),M=O(null),E=O({from:0,to:0}),F=x(()=>i.tableColspan!==void 0?i.tableColspan:100);u===void 0&&(u=x(()=>i.virtualScrollItemSize));const B=x(()=>u.value+";"+i.virtualScrollHorizontal),R=x(()=>B.value+";"+i.virtualScrollSliceRatioBefore+";"+i.virtualScrollSliceRatioAfter);Y(R,()=>{X()}),Y(B,W);function W(){ue(s,!0)}function N(n){ue(n===void 0?s:n)}function G(n,c){const p=l();if(p==null||p.nodeType===8)return;const T=Ye(p,o(),D.value,U.value,i.virtualScrollHorizontal,g.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd);w!==T.scrollViewSize&&X(T.scrollViewSize),j(p,T,Math.min(e.value-1,Math.max(0,parseInt(n,10)||0)),0,on.indexOf(c)!==-1?c:s!==-1&&n>s?"end":"start")}function re(){const n=l();if(n==null||n.nodeType===8)return;const c=Ye(n,o(),D.value,U.value,i.virtualScrollHorizontal,g.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd),p=e.value-1,T=c.scrollMaxSize-c.offsetStart-c.offsetEnd-P.value;if(b===c.scrollStart)return;if(c.scrollMaxSize<=0){j(n,c,0,0);return}w!==c.scrollViewSize&&X(c.scrollViewSize),le(E.value.from);const I=Math.floor(c.scrollMaxSize-Math.max(c.scrollViewSize,c.offsetEnd)-Math.min(a[p],c.scrollViewSize/2));if(I>0&&Math.ceil(c.scrollStart)>=I){j(n,c,p,c.scrollMaxSize-c.offsetEnd-C.reduce(pe,0));return}let q=0,V=c.scrollStart-c.offsetStart,L=V;if(V<=T&&V+c.scrollViewSize>=S.value)V-=S.value,q=E.value.from,L=V;else for(let r=0;V>=C[r]&&q
0&&q
-c.scrollViewSize?(q++,L=V):L=a[q]+V;j(n,c,q,L)}function j(n,c,p,T,I){const q=typeof I=="string"&&I.indexOf("-force")!==-1,V=q===!0?I.replace("-force",""):I,L=V!==void 0?V:"start";let r=Math.max(0,p-y.value[L]),$=r+y.value.total;$>e.value&&($=e.value,r=Math.max(0,$-y.value.total)),b=c.scrollStart;const ee=r!==E.value.from||$!==E.value.to;if(ee===!1&&V===void 0){ie(p);return}const{activeElement:ge}=document,ne=M.value;ee===!0&&ne!==null&&ne!==ge&&ne.contains(ge)===!0&&(ne.addEventListener("focusout",se),setTimeout(()=>{ne?.removeEventListener("focusout",se)})),un(ne,p-r);const Fe=V!==void 0?a.slice(r,p).reduce(pe,0):0;if(ee===!0){const de=$>=E.value.from&&r<=E.value.to?E.value.to:$;E.value={from:r,to:de},S.value=Te(C,a,0,r),P.value=Te(C,a,$,e.value),requestAnimationFrame(()=>{E.value.to!==$&&b===c.scrollStart&&(E.value={from:E.value.from,to:$},P.value=Te(C,a,$,e.value))})}requestAnimationFrame(()=>{if(b!==c.scrollStart)return;ee===!0&&le(r);const de=a.slice(r,p).reduce(pe,0),fe=de+c.offsetStart+S.value,Ie=fe+a[p];let qe=fe+T;if(V!==void 0){const Ke=de-Fe,Ae=c.scrollStart+Ke;qe=q!==!0&&Ae{X()});let ce=!1;return Tl(()=>{ce=!0}),zl(()=>{if(ce!==!0)return;const n=l();b!==void 0&&n!==void 0&&n!==null&&n.nodeType!==8?qt(n,b,i.virtualScrollHorizontal,g.lang.rtl):G(s)}),Be(()=>{J.cancel()}),Object.assign(h,{scrollTo:G,reset:W,refresh:N}),{virtualScrollSliceRange:E,virtualScrollSliceSizeComputed:y,setVirtualScrollSize:X,onVirtualScrollEvt:J,localResetVirtualScroll:ue,padVirtualScroll:ke,scrollTo:G,reset:W,refresh:N}}const Et=e=>["add","add-unique","toggle"].includes(e),rn=".*+?^${}()|[]\\",sn=Object.keys(et);function Ze(e,l){if(typeof e=="function")return e;const o=e!==void 0?e:l;return u=>u!==null&&typeof u=="object"&&o in u?u[o]:u}const mn=$e({name:"QSelect",inheritAttrs:!1,props:{...At,...Bl,...et,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],popupNoRouteDismiss:Boolean,useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:Et},mapOptions:Boolean,emitValue:Boolean,disableTabSelection:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:{},transitionHide:{},transitionDuration:{},behavior:{type:String,validator:e=>["default","menu","dialog"].includes(e),default:"default"},virtualScrollItemSize:At.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...Ht,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:l,emit:o}){const{proxy:u}=He(),{$q:v}=u,i=O(!1),m=O(!1),h=O(-1),g=O(""),b=O(!1),s=O(!1);let w=null,C=null,a,S,P,y=null,D,U,M,E;const F=O(null),B=O(null),R=O(null),W=O(null),N=O(null),G=Ol(e),re=Pl(ct),j=x(()=>Array.isArray(e.options)?e.options.length:0),le=x(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:se,virtualScrollSliceSizeComputed:ue,localResetVirtualScroll:X,padVirtualScroll:ke,onVirtualScrollEvt:ie,scrollTo:J,setVirtualScrollSize:ce}=an({virtualScrollLength:j,getVirtualScrollTarget:Dt,getVirtualScrollEl:rt,virtualScrollItemSizeComputed:le}),n=Ft(),c=x(()=>{const t=e.mapOptions===!0&&e.multiple!==!0,d=e.modelValue!==void 0&&(e.modelValue!==null||t===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const f=e.mapOptions===!0&&a!==void 0?a:[],k=d.map(H=>Pt(H,f));return e.modelValue===null&&t===!0?k.filter(H=>H!==null):k}return d}),p=x(()=>{const t={};return sn.forEach(d=>{const f=e[d];f!==void 0&&(t[d]=f)}),t}),T=x(()=>e.optionsDark===null?n.isDark.value:e.optionsDark),I=x(()=>bt(c.value)),q=x(()=>{let t="q-field__input q-placeholder col";return e.hideSelected===!0||c.value.length===0?[t,e.inputClass]:(t+=" q-field__input--padding",e.inputClass===void 0?t:[t,e.inputClass])}),V=x(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),L=x(()=>j.value===0),r=x(()=>c.value.map(t=>Q.value(t)).join(", ")),$=x(()=>e.displayValue!==void 0?e.displayValue:r.value),ee=x(()=>e.optionsHtml===!0?()=>!0:t=>t?.html===!0),ge=x(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||c.value.some(ee.value))),ne=x(()=>n.focused.value===!0?e.tabindex:-1),Fe=x(()=>{const t={tabindex:e.tabindex,role:"combobox","aria-label":e.label,"aria-readonly":e.readonly===!0?"true":"false","aria-autocomplete":e.useInput===!0?"list":"none","aria-expanded":i.value===!0?"true":"false","aria-controls":`${n.targetUid.value}_lb`};return h.value>=0&&(t["aria-activedescendant"]=`${n.targetUid.value}_${h.value}`),t}),de=x(()=>({id:`${n.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),fe=x(()=>c.value.map((t,d)=>({index:d,opt:t,html:ee.value(t),selected:!0,removeAtIndex:Rt,toggleOption:ve,tabindex:ne.value}))),Ie=x(()=>{if(j.value===0)return[];const{from:t,to:d}=se.value;return e.options.slice(t,d).map((f,k)=>{const H=Se.value(f)===!0,z=Ne(f)===!0,K=t+k,_={clickable:!0,active:z,activeClass:Ae.value,manualFocus:!0,focused:!1,disable:H,tabindex:-1,dense:e.optionsDense,dark:T.value,role:"option","aria-selected":z===!0?"true":"false",id:`${n.targetUid.value}_${K}`,onClick:()=>{ve(f)}};return H!==!0&&(h.value===K&&(_.focused=!0),v.platform.is.desktop===!0&&(_.onMousemove=()=>{i.value===!0&&be(K)})),{index:K,opt:f,html:ee.value(f),label:Q.value(f),selected:_.active,focused:_.focused,toggleOption:ve,setOptionIndex:be,itemProps:_}})}),qe=x(()=>e.dropdownIcon!==void 0?e.dropdownIcon:v.iconSet.arrow.dropdown),Ke=x(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),Ae=x(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),te=x(()=>Ze(e.optionValue,"value")),Q=x(()=>Ze(e.optionLabel,"label")),Se=x(()=>Ze(e.optionDisable,"disable")),Oe=x(()=>c.value.map(te.value)),_t=x(()=>{const t={onInput:ct,onChange:re,onKeydown:at,onKeyup:ut,onKeypress:it,onFocus:nt,onClick(d){S===!0&&Ve(d)}};return t.onCompositionstart=t.onCompositionupdate=t.onCompositionend=re,t});Y(c,t=>{a=t,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&n.innerLoading.value!==!0&&(m.value!==!0&&i.value!==!0||I.value!==!0)&&(P!==!0&&Ce(),(m.value===!0||i.value===!0)&&ye(""))},{immediate:!0}),Y(()=>e.fillInput,Ce),Y(i,Qe),Y(j,Jt);function tt(t){return e.emitValue===!0?te.value(t):t}function je(t){if(t!==-1&&t