1import{s as M,b as r,a3 as Ue,aE as ae,U as q,aB as Ee,aD as Ce,aC as fe,w as he,o as E,i as I,f as C,Q as O,g as pe,q as G,W as L,aA as me,k as B,bt as be,a0 as Re,a as Q,bp as ne,p as le,b_ as Xe,B as J,ah as xe,K as z,V as P,b$ as Ye,bu as Qe,ai as Je,a7 as Ze,c0 as qe,am as et,c1 as tt,a1 as Te,c as Fe,F as Oe,r as st,L as Le,a4 as ot,c2 as nt,H as De,a5 as lt,bq as it,bB as at,b5 as ie,aL as rt,b4 as ut,e as Pe,t as dt,b6 as _e,b7 as ct,at as Ke}from"./Wb91U3dY.js";import{P as ft,c as ht,d as pt,e as mt,u as vt,F as gt,b as bt,a as yt}from"./DWbQ2rpz.js";import{u as re}from"./BdyL01m5.js";import{f as ye}from"./CjEk7D_a.js";import{u as _t,g as Ct}from"./BqZcP81Y.js";import{g as xt,M as St}from"./CssEkixt.js";import{u as Ne}from"./DrqDAL7u.js";import{u as Et}from"./Dop-DfbR.js";import{V as wt}from"./BatJnHR9.js";function We(i){const a=M(()=>r(i)),e=M(()=>new Intl.Collator("en",{usage:"search",...a.value}));return{startsWith:(l,n)=>n.length===0?!0:(l=l.normalize("NFC"),n=n.normalize("NFC"),e.value.compare(l.slice(0,n.length),n)===0),endsWith:(l,n)=>n.length===0?!0:(l=l.normalize("NFC"),n=n.normalize("NFC"),e.value.compare(l.slice(-n.length),n)===0),contains:(l,n)=>{if(n.length===0)return!0;l=l.normalize("NFC"),n=n.normalize("NFC");let u=0;const g=n.length;for(;u+g<=l.length;u++){const c=l.slice(u,u+g);if(e.value.compare(n,c)===0)return!0}return!1}}}function It(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}function ke(i){return i?.querySelector("[data-state=checked]")}function qt(i,a,e){return i===void 0?!1:Array.isArray(i)?i.some(t=>U(t,a,e)):U(i,a,e)}function U(i,a,e){return i===void 0||a===void 0?!1:typeof i=="string"?i===a:typeof e=="function"?e(i,a):typeof e=="string"?i?.[e]===a?.[e]:Ue(i,a)}const[ve,Ft]=ae("ListboxRoot");var Ot=q({__name:"ListboxRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"vertical"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:"toggle"},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(i,{expose:a,emit:e}){const t=i,s=e,{multiple:o,highlightOnHover:l,orientation:n,disabled:u,selectionBehavior:g,dir:c}=Ee(t),{getItems:m}=Ce({isProvider:!0}),{handleTypeaheadSearch:h}=_t(),{primitiveElement:d,currentElement:f}=me(),p=It(),b=Ne(c),x=Et(f),w=B(),V=B(!1),T=B(!0),S=fe(t,"modelValue",s,{defaultValue:t.defaultValue??(o.value?[]:void 0),passive:t.modelValue===void 0,deep:!0});function D(v){if(V.value=!0,t.multiple){const y=Array.isArray(S.value)?[...S.value]:[],_=y.findIndex(A=>U(A,v,t.by));t.selectionBehavior==="toggle"?(_===-1?y.push(v):y.splice(_,1),S.value=y):(S.value=[v],w.value=v)}else t.selectionBehavior==="toggle"&&U(S.value,v,t.by)?S.value=void 0:S.value=v;setTimeout(()=>{V.value=!1},1)}const F=B(null),Z=B(null),N=B(!1),X=B(!1),ee=be(),ue=be(),Y=be();function te(){return m().map(v=>v.ref).filter(v=>v.dataset.disabled!=="")}function R(v,y=!0,_){if(!v)return;F.value=v,(_??T.value)&&F.value.focus(),y&&F.value.scrollIntoView({block:"nearest"});const A=m().find($=>$.ref===v);s("highlight",A)}function k(v){if(N.value)Y.trigger(v);else{const y=m().find(_=>U(_.value,v,t.by));y&&(F.value=y.ref,R(y.ref))}}function W(v){F.value&&F.value.isConnected&&(v.preventDefault(),v.stopPropagation(),X.value||F.value.click())}function H(v){if(T.value){if(V.value=!0,N.value)ue.trigger(v);else{const y=v.altKey||v.ctrlKey||v.metaKey;if(y&&v.key==="a"&&o.value){const _=m(),A=_.map(Se=>Se.value);S.value=[...A],v.preventDefault();const $=_.at(-1);$&&R($.ref)}else if(!y){const _=h(v.key,m());_&&R(_)}}setTimeout(()=>{V.value=!1},1)}}function ge(){X.value=!0}function de(){G(()=>{X.value=!1})}function se(){G(()=>{const v=new KeyboardEvent("keydown",{key:"PageUp"});we(v)})}function j(v){const y=F.value;y?.isConnected&&(Z.value=y),F.value=null,s("leave",v)}function je(v){const y=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if(v.currentTarget?.dispatchEvent(y),s("entryFocus",y),!y.defaultPrevented)if(Z.value)R(Z.value);else{const _=te()?.[0];R(_)}}
1function we(v){const y=xt(v,n.value,b.value);if(!y)return;let _=te();if(F.value){if(y==="last")_.reverse();else if(y==="prev"||y==="next"){y==="prev"&&_.reverse();const A=_.indexOf(F.value);_=_.slice(A+1)}Ge(v,_[0])}if(_.length){const A=!F.value&&y==="prev"?_.length-1:0;R(_[A])}if(N.value)return ue.trigger(v)}function Ge(v,y){if(!(N.value||t.selectionBehavior!=="replace"||!o.value||!Array.isArray(S.value)||(v.altKey||v.ctrlKey||v.metaKey)&&!v.shiftKey)&&v.shiftKey){const A=m().filter(ce=>ce.ref.dataset.disabled!=="");let $=A.find(ce=>ce.ref===y)?.value;if(v.key===p.END?$=A.at(-1)?.value:v.key===p.HOME&&($=A[0]?.value),!$||!w.value)return;const Se=ye(A.map(ce=>ce.value),w.value,$);S.value=Se}}async function Ie(v){if(await G(),N.value)ee.trigger(v);else{const y=te(),_=y.find(A=>A.dataset.state==="checked");_?R(_):y.length&&R(y[0])}}return he(S,()=>{V.value||G(()=>{Ie()})},{immediate:!0,deep:!0}),a({highlightedElement:F,highlightItem:k,highlightFirstItem:se,highlightSelected:Ie,getItems:m}),Ft({modelValue:S,onValueChange:D,multiple:o,orientation:n,dir:b,disabled:u,highlightOnHover:l,highlightedElement:F,isVirtual:N,virtualFocusHook:ee,virtualKeydownHook:ue,virtualHighlightHook:Y,by:t.by,firstValue:w,selectionBehavior:g,focusable:T,onLeave:j,onEnter:je,changeHighlight:R,onKeydownEnter:W,onKeydownNavigation:we,onKeydownTypeAhead:H,onCompositionStart:ge,onCompositionEnd:de,highlightFirstItem:se}),(v,y)=>(E(),I(r(L),{ref_key:"primitiveElement",ref:d,as:v.as,"as-child":v.asChild,dir:r(b),"data-disabled":r(u)?"":void 0,onPointerleave:j,onFocusout:y[0]||(y[0]=async _=>{const A=_.relatedTarget||_.target;await G(),F.value&&r(f)&&!r(f).contains(A)&&j(_)})},{default:C(()=>[O(v.$slots,"default",{modelValue:r(S)}),r(x)&&v.name?(E(),I(r(wt),{key:0,name:v.name,value:r(S),disabled:r(u),required:v.required},null,8,["name","value","disabled","required"])):pe("v-if",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}}),kt=Ot,At=q({__name:"ListboxContent",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const{CollectionSlot:a}=Ce(),e=ve(),t=Re(!1,10);return(s,o)=>(E(),I(r(a),null,{default:C(()=>[Q(r(L),{role:"listbox",as:s.as,"as-child":s.asChild,tabindex:r(e).focusable.value?r(e).highlightedElement.value?"-1":"0":"-1","aria-orientation":r(e).orientation.value,"aria-multiselectable":!!r(e).multiple.value,"data-orientation":r(e).orientation.value,onMousedown:o[0]||(o[0]=le(l=>t.value=!0,["left"])),onFocus:o[1]||(o[1]=l=>{r(t)||r(e).onEnter(l)}),onKeydown:[o[2]||(o[2]=ne(l=>{r(e).orientation.value==="vertical"&&(l.key==="ArrowLeft"||l.key==="ArrowRight")||r(e).orientation.value==="horizontal"&&(l.key==="ArrowUp"||l.key==="ArrowDown")||(l.preventDefault(),r(e).focusable.value&&r(e).onKeydownNavigation(l))},["down","up","left","right","home","end"])),ne(r(e).onKeydownEnter,["enter"]),r(e).onKeydownTypeAhead]},{default:C(()=>[O(s.$slots,"default")]),_:3},8,["as","as-child","tabindex","aria-orientation","aria-multiselectable","data-orientation","onKeydown"])]),_:3}))}}),Mt=At,Bt=q({__name:"ListboxFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(i,{emit:a}){const e=i,s=fe(e,"modelValue",a,{defaultValue:"",passive:e.modelValue===void 0}),o=ve(),{primitiveElement:l,currentElement:n}=me(),u=M(()=>e.disabled||o.disabled.value||!1),g=B();return Xe(()=>g.value=o.highlightedElement.value?.id),J(()=>{o.focusable.value=!1,setTimeout(()=>{e.autoFocus&&n.value?.focus()},1)}),xe(()=>{o.focusable.value=!0}),(c,m)=>(E(),I(r(L),{ref_key:"primitiveElement",ref:l,as:c.as,"as-child":c.asChild,value:r(s),disabled:u.value?"":void 0,"data-disabled":u.value?"":void 0,"aria-disabled":u.value??void 0,"aria-activedescendant":g.value,type:"text",onKeydown:[ne(le(r(o).onKeydownNavigation,["prevent"]),["down","up","home","end"]),ne(r(o).onKeydownEnter,["enter"])],onInput:m[0]||(m[0]=h=>{s.value=h.target.value,r(o).highlightFirstItem()}),onCompositionstart:r(o).onCompositionStart,onCompositionend:r(o).onCompositionEnd},{default:C(()=>[O(c.$slots,"default",{modelValue:r(s)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onKeydown","onCompositionstart","onCompositionend"]))}}),zt=Bt;const[Rs,Vt]=ae("ListboxGroup");var Rt=q({__name:"ListboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const a=i,e=re(void 0,"reka-listbox-group");return Vt({id:e}),(t,s)=>(E(),I(r(L),z({role:"group"},a,{"aria-labelledby":r(e)}),{default:C(()=>[O(t.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),Tt=Rt;const Lt="listbox.select",[Dt,Pt]=ae("ListboxItem");var Kt=q({__name:"ListboxItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["select"],setup(i,{emit:a}){const e=i,t=a,s=re(void 0,"reka-listbox-item"),{CollectionItem:o}=Ce(),{forwardRef:l,currentElement:n}=P(),u=ve(),g=M(()=>n.value===u.highlightedElement.value),c=M(()=>qt(u.modelValue.value,e.value,u.by)),m=M(()=>u.disabled.value||e.disabled);async function h(f){t("select",f),!f?.defaultPrevented&&!m.value&&f&&(u.onValueChange(e.value),u.changeHighlight(n.value))}function d(f){const p={originalEvent:f,value:e.value};Qe(Lt,h,p)}return Pt({isSelected:c}),(f,p)=>(E(),I(r(o),{value:f.value},{default:C(()=>[Ye([g.value,c.value],()=>Q(r(L),z({id:r(s)},f.$attrs,{ref:r(l),role:"option",tabindex:r(u).focusable.value?g.value?"0":"-1":-1,"aria-selected":c.value,as:f.as,"as-child":f.asChild,disabled:m.value?"":void 0,"data-disabled":m.value?"":void 0,"data-highlighted":g.value?"":void 0,"data-state":c.value?"checked":"unchecked",onClick:d,onKeydown:ne(le(d,["prevent"]),["space"]),onPointermove:p[0]||(p[0]=()=>{r(u).highlightedElement.value!==r(n)&&r(u).highlightOnHover.value&&r(u).changeHighlight(r(n),!1,!1)})}),{default:C(()=>[O(f.$slots,"default")]),_:3},16,["id","tabindex","aria-selected","as","as-child","disabled","data-disabled","data-highlighted","data-state","onKeydown"]),p,1)]),_:3},8,["value"]))}}),Nt=Kt,Wt=q({__name:"ListboxItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const a=i;P();const e=Dt();return(t,s)=>r(e).isSelected.value?(E(),I(r(L),z({key:0,"aria-hidden":"true"},a),{default:C(()=>[O(t.$slots,"default")]),_:3},16)):pe("v-if",!0)}}),Ht=Wt;function oe(i,a,e){let t=e.initialDeps??[],s,o=!0;function l(){var n,u,g;let c;e.key&&((n=e.debug)!=null&&n.call(e))&&(c=Date.now());const m=i();if(!(m.length!==t.length||m.some((f,p)=>t[p]!==f)))return s;t=m;let d;if(e.key&&((u=e.debug)!=null&&u.call(e))&&(d=Date.now()),s=a(...m),e.key&&((g=e.debug)!=null&&g.call(e))){const f=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-d)*100)/100,b=p/16,x=(w,V)=>{for(w=String(w);w.length<V;)w=" "+w;return w};console.info(`%câ± ${x(p,5)} /${x(f,5)} ms`,` 2 font-size: .6rem; 3 font-weight: bold; 4 color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,e?.key)}return e?.onChange&&!(o&&e.skipInitialOnChange)&&e.onChange(s),o=!1,s}return l.updateDeps=n=>{t=n},l}function Ae(i,a){if(i===void 0)throw new Error("Unexpected undefined");return i}const $t=(i,a)=>Math.abs(i-a)<1.01,jt=(i,a,e)=>{let t;return function(...s){i.clearTimeout(t),t=i.setTimeout(()=>a.apply(this,s),e)}},Me=i=>{const{offsetWidth:a,offsetHeight:e}=i;return{width:a,height:e}},Gt=i=>i,Ut=i=>{const a=Math.max(i.startIndex-i.overscan,0),e=Math.min(i.endIndex+i.overscan,i.count-1),t=[];for(let s=a;s<=e;s++)t.push(s);return t},Xt=(i,a)=>{const e=i.scrollElement;if(!e)return;const t=i.targetWindow;if(!t)return;const s=l=>{const{width:n,height:u}=l;a({width:Math.round(n),height:Math.round(u)})};
4if(s(Me(e)),!t.ResizeObserver)return()=>{};const o=new t.ResizeObserver(l=>{const n=()=>{const u=l[0];if(u?.borderBoxSize){const g=u.borderBoxSize[0];if(g){s({width:g.inlineSize,height:g.blockSize});return}}s(Me(e))};i.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return o.observe(e,{box:"border-box"}),()=>{o.unobserve(e)}},Be={passive:!0},ze=typeof window>"u"?!0:"onscrollend"in window,Yt=(i,a)=>{const e=i.scrollElement;if(!e)return;const t=i.targetWindow;if(!t)return;let s=0;const o=i.options.useScrollendEvent&&ze?()=>{}:jt(t,()=>{a(s,!1)},i.options.isScrollingResetDelay),l=c=>()=>{const{horizontal:m,isRtl:h}=i.options;s=m?e.scrollLeft*(h&&-1||1):e.scrollTop,o(),a(s,c)},n=l(!0),u=l(!1);e.addEventListener("scroll",n,Be);const g=i.options.useScrollendEvent&&ze;return g&&e.addEventListener("scrollend",u,Be),()=>{e.removeEventListener("scroll",n),g&&e.removeEventListener("scrollend",u)}},Qt=(i,a,e)=>{if(a?.borderBoxSize){const t=a.borderBoxSize[0];if(t)return Math.round(t[e.options.horizontal?"inlineSize":"blockSize"])}return i[e.options.horizontal?"offsetWidth":"offsetHeight"]},Jt=(i,{adjustments:a=0,behavior:e},t)=>{var s,o;const l=i+a;(o=(s=t.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[t.options.horizontal?"left":"top"]:l,behavior:e})};class Zt{constructor(a){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,s;return((s=(t=(e=this.targetWindow)==null?void 0:e.performance)==null?void 0:t.now)==null?void 0:s.call(t))??Date.now()},this.observer=(()=>{let e=null;const t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const l=()=>{const n=o.target,u=this.indexFromElement(n);if(!n.isConnected){this.observer.unobserve(n);return}this.shouldMeasureDuringScroll(u)&&this.resizeItem(u,this.options.measureElement(n,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=t())==null||s.disconnect(),e=null},observe:s=>{var o;return(o=t())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=t())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,s])=>{typeof s>"u"&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Gt,rangeExtractor:Ut,onChange:()=>{},measureElement:Qt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...e}},this.notify=e=>{var t,s;(s=(t=this.options).onChange)==null||s.call(t,this,e)},this.maybeNotify=oe(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>
4{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const s=new Map,o=new Map;for(let l=t-1;l>=0;l--){const n=e[l];if(s.has(n.lane))continue;const u=o.get(n.lane);if(u==null||n.end>u.end?o.set(n.lane,n):n.end<u.end&&s.set(n.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((l,n)=>l.end===n.end?l.index-n.index:l.end-n.end)[0]:void 0},this.getMeasurementOptions=oe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,s,o,l,n,u)=>(this.prevLanes!==void 0&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:o,enabled:l,lanes:n,laneAssignmentMode:u}),{key:!1}),this.getMeasurements=oe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:s,getItemKey:o,enabled:l,lanes:n,laneAssignmentMode:u},g)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const d of this.laneAssignments.keys())d>=e&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);const m=this.measurementsCache.slice(0,c),h=new Array(n).fill(void 0);for(let d=0;d<c;d++){const f=m[d];f&&(h[f.lane]=d)}for(let d=c;d<e;d++){const f=o(d),p=this.laneAssignments.get(d);let b,x;const w=u==="estimate"||g.has(f);if(p!==void 0&&this.options.lanes>1){b=p;const D=h[b],F=D!==void 0?m[D]:void 0;x=F?F.end+this.options.gap:t+s}else{const D=this.options.lanes===1?m[d-1]:this.getFurthestMeasurement(m,d);x=D?D.end+this.options.gap:t+s,b=D?D.lane:d%this.options.lanes,this.options.lanes>1&&w&&this.laneAssignments.set(d,b)}const V=g.get(f),T=typeof V=="number"?V:this.options.estimateSize(d),S=x+T;m[d]={index:d,start:x,size:T,end:S,key:f,lane:b},h[b]=d}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=oe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,o)=>this.range=e.length>0&&t>0?es({measurements:e,outerSize:t,scrollOffset:s,lanes:o}):null,{key:!1,debug:()=>this.options.debug}
4),this.getVirtualIndexes=oe(()=>{let e=null,t=null;const s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,o,l)=>o===null||l===null?[]:e({startIndex:o,endIndex:l,overscan:t,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:t.index);if(s!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,s-o),n=Math.min(this.options.count-1,s+o);return e>=l&&e<=n}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((l,n)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(n))});return}const t=this.indexFromElement(e),s=this.options.getItemKey(t),o=this.elementsCache.get(s);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(s,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var s;const o=this.measurementsCache[e];if(!o)return;const l=this.itemSizeCache.get(o.key)??o.size,n=t-l;n!==0&&(((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,n,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,t)),this.notify(!1))},this.getVirtualItems=oe(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const s=[];for(let o=0,l=e.length;o<l;o++){const n=e[o],u=t[n];s.push(u)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(t.length!==0)return Ae(t[He(0,t.length-1,s=>Ae(t[s]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),l=this.getScrollOffset();t==="auto"&&(t=e>=l+o?"end":"start"),t==="center"?e+=(s-o)/2:t==="end"&&(e-=o);const n=this.getMaxScrollOffset();return Math.max(Math.min(n,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const s=this.getSize(),o=this.getScrollOffset(),l=this.measurementsCache[e];if(!l)return;if(t==="auto")if(l.end>=o+s-this.options.scrollPaddingEnd)t="end";else if(l.start<=o+this.options.scrollPaddingStart)t="start";else return[o,t];if(t==="end"&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const n=t==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(n,t,l.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{const o=this.getOffsetForAlignment(e,t),l=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:s="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));const o=this.getOffsetForIndex(e,t);if(!o)return;const[l,n]=o,u=this.now();this.scrollState={index:e,align:n,behavior:s,startedAt:u,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{const s=this.getScrollOffset()+e,o=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:o,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let s;if(t.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((e=t[t.length-1])==null?void 0:e.end)??0;else{const o=Array(this.options.lanes).fill(null);let l=t.length-1;for(;l>=0&&o.some(n=>n===null);){const n=t[l];o[n.lane]===null&&(o[n.lane]=n.end),l--}s=Math.max(...o.filter(n=>n!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(a)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const t=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=t?t[0]:this.scrollState.lastTargetOffset,o=1,l=s!==this.scrollState.lastTargetOffset;if(!l&&$t(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,l&&(this.scrollState.lastTargetOffset=s,this.scrollState.behavior="auto",this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const He=(i,a,e,t)=>{for(;i<=a;){const s=(i+a)/2|0,o=e(s);if(o<t)i=s+1;else if(o>t)a=s-1;else return s}return i>0?i-1:0};function es({measurements:i,outerSize:a,scrollOffset:e,lanes:t}){const s=i.length-1,o=u=>i[u].start;if(i.length<=t)return{startIndex:0,endIndex:s};let l=He(0,s,o,e),n=l;if(t===1)for(;n<s&&i[n].end<e+a;)n++;else if(t>1){const u=Array(t).fill(0);for(;n<s&&u.some(c=>
4c<e+a);){const c=i[n];u[c.lane]=c.end,n++}const g=Array(t).fill(e+a);for(;l>=0&&g.some(c=>c>=e);){const c=i[l];g[c.lane]=c.start,l--}l=Math.max(0,l-l%t),n=Math.min(s,n+(t-1-n%t))}return{startIndex:l,endIndex:n}}function ts(i){const a=new Zt(r(i)),e=Ze(a),t=a._didMount();return he(()=>r(i).getScrollElement(),s=>{s&&a._willUpdate()},{immediate:!0}),he(()=>r(i),s=>{a.setOptions({...s,onChange:(o,l)=>{var n;qe(e),(n=s.onChange)==null||n.call(s,o,l)}}),a._willUpdate(),qe(e)},{immediate:!0}),Je(t),e}function ss(i){return ts(M(()=>({observeElementRect:Xt,observeElementOffset:Yt,scrollToFn:Jt,...r(i)})))}var os=q({__name:"ListboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(i){const a=i,e=et(),t=ve(),s=tt(),{getItems:o}=Ce();t.isVirtual.value=!0;const l=M(()=>{const h=s.value;if(h){const d=window.getComputedStyle(h);return{start:Number.parseFloat(d.paddingBlockStart||d.paddingTop),end:Number.parseFloat(d.paddingBlockEnd||d.paddingBottom)}}else return{start:0,end:0}}),n=ss({get scrollPaddingStart(){return l.value.start},get scrollPaddingEnd(){return l.value.end},get count(){return a.options.length},get horizontal(){return t.orientation.value==="horizontal"},estimateSize(h){return typeof a.estimateSize=="function"?a.estimateSize(h):a.estimateSize??28},getScrollElement(){return s.value},overscan:a.overscan??12}),u=M(()=>n.value.getVirtualItems().map(h=>{const d=e.default({option:a.options[h.index],virtualizer:n.value,virtualItem:h})[0],f=d.type===Oe&&Array.isArray(d.children)?d.children[0]:d;return{item:h,is:nt(f,{key:`${h.key}`,"data-index":h.index,"aria-setsize":a.options.length,"aria-posinset":h.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${h.start}px)`,overflowAnchor:"none"}})}}));t.virtualFocusHook.on(h=>{const d=a.options.findIndex(f=>Array.isArray(t.modelValue.value)?U(f,t.modelValue.value[0],t.by):U(f,t.modelValue.value,t.by));d!==-1?(h?.preventDefault(),n.value.scrollToIndex(d,{align:"start"}),requestAnimationFrame(()=>{const f=ke(s.value);f&&(t.changeHighlight(f),h&&f?.focus())})):t.highlightFirstItem()}),t.virtualHighlightHook.on(h=>{const d=a.options.findIndex(f=>U(f,h,t.by));n.value.scrollToIndex(d,{align:"start"}),requestAnimationFrame(()=>{const f=ke(s.value);f&&t.changeHighlight(f)})});const g=Re("",1e3),c=M(()=>{const h=d=>a.textContent?a.textContent(d):d?.toString().toLowerCase();return a.options.map((d,f)=>({index:f,textContent:h(d)}))});function m(h,d){if(!t.firstValue?.value||!t.multiple.value||!Array.isArray(t.modelValue.value))return;const p=o().filter(x=>x.ref.dataset.disabled!=="").find(x=>x.ref===t.highlightedElement.value)?.value;if(!p)return;let b=null;switch(d){case"prev":case"next":{b=ye(a.options,t.firstValue.value,p);break}case"first":{b=ye(a.options,t.firstValue.value,a.options?.[0]);break}case"last":{b=ye(a.options,t.firstValue.value,a.options?.[a.options.length-1]);break}}t.modelValue.value=b}return t.virtualKeydownHook.on(h=>{const d=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!d)return;let p=St[h.key];if(d&&h.key==="a"&&t.multiple.value?(h.preventDefault(),t.modelValue.value=[...a.options],p="last"):h.shiftKey&&p&&m(h,p),["first","last"].includes(p)){h.preventDefault();const b=p==="first"?0:a.options.length-1;n.value.scrollToIndex(b),requestAnimationFrame(()=>{const x=o(),w=p==="first"?x[0]:x[x.length-1];w&&t.changeHighlight(w.ref)})}else if(!p&&!d){g.value+=h.key;const b=Number(Te()?.getAttribute("data-index")),x=c.value[b].textContent,w=c.value.map(S=>S.textContent??""),V=Ct(w,g.value,x),T=c.value.find(S=>S.textContent===V);T&&(n.value.scrollToIndex(T.index,{align:"start"}),requestAnimationFrame(()=>{const S=s.value.querySelector(`[data-index="${T.index}"]`);S instanceof HTMLElement&&t.changeHighlight(S)}))}}),(h,d)=>(E(),Fe("div",{"data-reka-virtualizer":"",style:ot({position:"relative",width:"100%",height:`${r(n).getTotalSize()}px`})},[(E(!0),Fe(Oe,null,st(u.value,({is:f,item:p})=>(E(),I(Le(f),{key:p.index}))),128))],4))}}),ns=os;const[K,ls]=ae("ComboboxRoot");var is=q({__name:"ComboboxRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","update:open"],setup(i,{expose:a,emit:e}){const t=i,s=e,{primitiveElement:o,currentElement:l}=me(),{multiple:n,disabled:u,ignoreFilter:g,resetSearchTermOnSelect:c,openOnFocus:m,openOnClick:h,dir:d,resetModelValueOnClear:f,highlightOnHover:p}=Ee(t),b=Ne(d),x=fe(t,"modelValue",s,{defaultValue:t.defaultValue??(n.value?[]:void 0),passive:t.modelValue===void 0,deep:!0}),w=fe(t,"open",s,{defaultValue:t.defaultOpen,passive:t.open===void 0});async function V(k){w.value=k,Y.value="",k?(await G(),o.value?.highlightSelected(),S.value=!0,F.value?.focus()):(S.value=!1,setTimeout(()=>{!k&&t.resetSearchTermOnBlur&&T.trigger()},1))}const T=be(),S=B(!1),D=B(!1),F=B(),Z=B(),N=M(()=>o.value?.highlightedElement??void 0),X=B(new Map),ee=B(new Map),{contains:ue}=We({sensitivity:"base"}),Y=B(""),te=M(k=>{if(!Y.value||t.ignoreFilter||D.value)return{count:X.value.size,items:k?.items??new Map,groups:k?.groups??new Set(ee.value.keys())};let W=0;const H=new Map,ge=new Set;
4for(const[de,se]of X.value){const j=ue(se,Y.value);H.set(de,j?1:0),j&&W++}for(const[de,se]of ee.value)for(const j of se)if(H.get(j)>0){ge.add(de);break}return{count:W,items:H,groups:ge}}),R=lt();return J(()=>{R?.exposed&&(R.exposed.highlightItem=o.value?.highlightItem,R.exposed.highlightFirstItem=o.value?.highlightFirstItem,R.exposed.highlightSelected=o.value?.highlightSelected)}),a({filtered:te,highlightedElement:N,highlightItem:o.value?.highlightItem,highlightFirstItem:o.value?.highlightFirstItem,highlightSelected:o.value?.highlightSelected}),ls({modelValue:x,multiple:n,disabled:u,open:w,onOpenChange:V,contentId:"",isUserInputted:S,isVirtual:D,inputElement:F,highlightedElement:N,onInputElementChange:k=>F.value=k,triggerElement:Z,onTriggerElementChange:k=>Z.value=k,parentElement:l,resetSearchTermOnSelect:c,onResetSearchTerm:T.on,allItems:X,allGroups:ee,filterSearch:Y,filterState:te,ignoreFilter:g,openOnFocus:m,openOnClick:h,resetModelValueOnClear:f}),(k,W)=>(E(),I(r(ft),null,{default:C(()=>[Q(r(kt),z({ref_key:"primitiveElement",ref:o},k.$attrs,{modelValue:r(x),"onUpdate:modelValue":W[0]||(W[0]=H=>De(x)?x.value=H:null),style:{pointerEvents:r(w)?"auto":void 0},as:k.as,"as-child":k.asChild,dir:r(b),multiple:r(n),name:k.name,required:k.required,disabled:r(u),"highlight-on-hover":r(p),by:t.by,onHighlight:W[1]||(W[1]=H=>s("highlight",H))}),{default:C(()=>[O(k.$slots,"default",{open:r(w),modelValue:r(x)})]),_:3},16,["modelValue","style","as","as-child","dir","multiple","name","required","disabled","highlight-on-hover","by"])]),_:3}))}}),Ts=is,as=q({__name:"ComboboxAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const{forwardRef:a}=P();return(e,t)=>(E(),I(r(ht),{"as-child":"",reference:e.reference},{default:C(()=>[Q(r(L),z({ref:r(a),"as-child":e.asChild,as:e.as},e.$attrs),{default:C(()=>[O(e.$slots,"default")]),_:3},16,["as-child","as"])]),_:3},8,["reference"]))}}),Ls=as;const[rs,us]=ae("ComboboxContent");var ds=q({__name:"ComboboxContentImpl",props:{position:{type:String,required:!1,default:"inline"},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(i,{emit:a}){const e=i,t=a,{position:s}=Ee(e),o=K(),l=M(()=>o.ignoreFilter.value?o.allItems.value.size===0:o.filterState.value.count===0),{forwardRef:n,currentElement:u}=P();pt(e.bodyLock),mt(),vt(o.parentElement);const g=M(()=>e.position==="popper"?e:{}),c=it(g.value),m={boxSizing:"border-box","--reka-combobox-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-combobox-content-available-width":"var(--reka-popper-available-width)","--reka-combobox-content-available-height":"var(--reka-popper-available-height)","--reka-combobox-trigger-width":"var(--reka-popper-anchor-width)","--reka-combobox-trigger-height":"var(--reka-popper-anchor-height)"};us({position:s});const h=B(!1);return J(()=>{o.inputElement.value&&(h.value=u.value.contains(o.inputElement.value),h.value&&o.inputElement.value.focus())}),xe(()=>{const d=Te();h.value&&(!d||d===document.body)&&o.triggerElement.value?.focus()}),(d,f)=>(E(),I(r(Mt),{"as-child":""},{default:C(()=>[Q(r(gt),{"as-child":"",onMountAutoFocus:f[5]||(f[5]=le(()=>{},["prevent"])),onUnmountAutoFocus:f[6]||(f[6]=le(()=>{},["prevent"]))},{default:C(()=>[Q(r(at),{"as-child":"","disable-outside-pointer-events":d.disableOutsidePointerEvents,onDismiss:f[0]||(f[0]=p=>r(o).onOpenChange(!1)),onFocusOutside:f[1]||(f[1]=p=>{r(o).parentElement.value?.contains(p.target)&&p.preventDefault(),t("focusOutside",p)}),onInteractOutside:f[2]||(f[2]=p=>t("interactOutside",p)),onEscapeKeyDown:f[3]||(f[3]=p=>t("escapeKeyDown",p)),onPointerDownOutside:f[4]||(f[4]=p=>{r(o).parentElement.value?.contains(p.target)&&p.preventDefault(),t("pointerDownOutside",p)})},{default:C(()=>[(E(),I(Le(r(s)==="popper"?r(bt):r(L)),z({...d.$attrs,...r(c)},{id:r(o).contentId,ref:r(n),"data-state":r(o).open.value?"open":"closed","data-empty":l.value?"":void 0,style:{display:e.hideWhenEmpty&&l.value?"none":"flex",flexDirection:"column",outline:"none",...r(s)==="popper"?m:{}}}),{default:C(()=>[O(d.$slots,"default")]),_:3},16,["id","data-state","data-empty","style"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),cs=ds,fs=q({__name:"ComboboxArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const a=i,e=K(),t=rs();return P(),(s,o)=>r(e).open.value&&r(t).position.value==="popper"?(E(),I(r(yt),ie(z({key:0},a)),{default:C(()=>[O(s.$slots,"default")]),_:3},16)):pe("v-if",!0)}}),Ds=fs,hs=q({__name:"ComboboxCancel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const a=i;P();const e=K();function t(){e.filterSearch.value="",e.inputElement.value&&(e.inputElement.value.value="",e.inputElement.value.focus()),e.resetModelValueOnClear?.value&&(e.modelValue.value=e.multiple.value?[]:null)}return(s,o)=>(E(),I(r(L),z({type:s.as==="button"?"button":void 0},a,{tabindex:"-1",onClick:t}),{default:C(()=>[O(s.$slots,"default")]),_:3},16,["type"]))}}),Ps=hs,ps=q({__name:"ComboboxContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(i,{emit:a}){const s=rt(i,a),{forwardRef:o}=P(),l=K();return l.contentId||=re(void 0,"reka-combobox-content"),(n,u)=>(E(),I(r(ut),{present:n.forceMount||r(l).open.value},{default:C(()=>[Q(cs,z({...r(s),...n.$attrs},{ref:r(o)}),{default:C(()=>[O(n.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),Ks=ps,ms=q({__name:"ComboboxEmpty",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const a=i,e=K(),t=M(()=>e.ignoreFilter.value?e.allItems.value.size===0:e.filterState.value.count===0);return(s,o)=>t.value?(E(),I(r(L),ie(z({key:0},a)),{default:C(()=>[O(s.$slots,"default",{},()=>[o[0]||(o[0]=Pe("No options"))])]),_:3},16)):pe("v-if",!0)}}),Ns=ms;const[$e,vs]=ae("ComboboxGroup");var gs=q({__name:"ComboboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const a=i,e=re(void 0,"reka-combobox-group"),t=K(),s=M(()=>t.ignoreFilter.value?!0:t.filterSearch.value?t.filterState.value.groups.has(e):!0),o=vs({id:e,labelId:""});return J(()=>{t.allGroups.value.has(e)||t.allGroups.value.set(e,new Set)}),xe(()=>{t.allGroups.value.delete(e)}),(l,n)=>(E(),I(r(Tt),z({id:r(e),"aria-labelledby":r(o).labelId},a,{hidden:s.value?void 0:!0}),{default:C(()=>[O(l.$slots,"default")]),_:3},16,["id","aria-labelledby","hidden"]))}}),Ws=gs,bs=q({__name:"ComboboxInput",props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(i,{emit:a}){const e=i,t=a,s=K(),o=ve(),{primitiveElement:l,currentElement:n}=me(),u=fe(e,"modelValue",t,{passive:e.modelValue===void 0});
4J(()=>{n.value&&s.onInputElementChange(n.value)});function g(p){s.open.value||s.onOpenChange(!0)}function c(p){const b=p.target;s.open.value?s.filterSearch.value=b.value:(s.onOpenChange(!0),G(()=>{b.value&&(s.filterSearch.value=b.value,o.highlightFirstItem())}))}function m(){s.openOnFocus.value&&!s.open.value&&s.onOpenChange(!0)}function h(p){if(!s.open.value)return;const b=p.relatedTarget;if(!b)return;const x=s.parentElement.value?.contains(b),w=document.getElementById(s.contentId)?.contains(b);!x&&!w&&s.onOpenChange(!1)}function d(){s.openOnClick.value&&!s.open.value&&s.onOpenChange(!0)}function f(){const p=s.modelValue.value;e.displayValue?u.value=e.displayValue(p):!s.multiple.value&&p&&!Array.isArray(p)&&typeof p!="object"?u.value=p.toString():u.value="",G(()=>{u.value=u.value})}return s.onResetSearchTerm(()=>{f()}),he(s.modelValue,async()=>{!s.isUserInputted.value&&s.resetSearchTermOnSelect.value&&f()},{immediate:!0,deep:!0}),he(s.filterState,(p,b)=>{!s.isVirtual.value&&b.count===0&&o.highlightFirstItem()}),(p,b)=>(E(),I(r(zt),{ref_key:"primitiveElement",ref:l,modelValue:r(u),"onUpdate:modelValue":b[0]||(b[0]=x=>De(u)?u.value=x:null),as:p.as,"as-child":p.asChild,"auto-focus":p.autoFocus,disabled:p.disabled,"aria-expanded":r(s).open.value,"aria-controls":r(s).contentId,"aria-autocomplete":"list",role:"combobox",autocomplete:"off",onClick:d,onInput:c,onKeydown:ne(le(g,["prevent"]),["down","up"]),onFocus:m,onBlur:h},{default:C(()=>[O(p.$slots,"default")]),_:3},8,["modelValue","as","as-child","auto-focus","disabled","aria-expanded","aria-controls","onKeydown"]))}}),Hs=bs,ys=q({__name:"ComboboxItem",props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(i,{emit:a}){const e=i,t=a,s=re(void 0,"reka-combobox-item"),o=K(),l=$e(null),{primitiveElement:n,currentElement:u}=me();if(e.value==="")throw new Error("A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.");const g=M(()=>{if(o.isVirtual.value||o.ignoreFilter.value||!o.filterSearch.value)return!0;{const c=o.filterState.value.items.get(s);return c===void 0?!0:c>0}});return J(()=>{o.allItems.value.set(s,e.textValue||u.value.textContent||u.value.innerText);const c=l?.id;c&&(o.allGroups.value.has(c)?o.allGroups.value.get(c)?.add(s):o.allGroups.value.set(c,new Set([s])))}),xe(()=>{o.allItems.value.delete(s)}),(c,m)=>g.value?(E(),I(r(Nt),z({key:0},e,{id:r(s),ref_key:"primitiveElement",ref:n,disabled:r(o).disabled.value||c.disabled,onSelect:m[0]||(m[0]=h=>{t("select",h),!h.defaultPrevented&&(!r(o).multiple.value&&!c.disabled&&!r(o).disabled.value?(h.preventDefault(),r(o).onOpenChange(!1),r(o).modelValue.value=e.value):r(o).multiple.value&&r(o).inputElement.value?.focus())})}),{default:C(()=>[O(c.$slots,"default",{},()=>[Pe(dt(c.value),1)])]),_:3},16,["id","disabled"])):pe("v-if",!0)}}),$s=ys,_s=q({__name:"ComboboxItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const a=i;return(e,t)=>(E(),I(r(Ht),ie(_e(a)),{default:C(()=>[O(e.$slots,"default")]),_:3},16))}}),js=_s,Cs=q({__name:"ComboboxLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(i){const a=i;P();const e=$e({id:"",labelId:""});return e.labelId||=re(void 0,"reka-combobox-group-label"),(t,s)=>(E(),I(r(L),z(a,{id:r(e).labelId}),{default:C(()=>[O(t.$slots,"default")]),_:3},16,["id"]))}}),Gs=Cs,xs=q({__name:"ComboboxPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const a=i;return(e,t)=>(E(),I(r(ct),ie(_e(a)),{default:C(()=>[O(e.$slots,"default")]),_:3},16))}}),Us=xs,Ss=q({__name:"ComboboxSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const a=i;return P(),(e,t)=>(E(),I(r(L),z(a,{"aria-hidden":"true"}),{default:C(()=>[O(e.$slots,"default")]),_:3},16))}}),Xs=Ss,Es=q({__name:"ComboboxTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const a=i,{forwardRef:e,currentElement:t}=P(),s=K(),o=M(()=>a.disabled||s.disabled.value||!1);return J(()=>{t.value&&s.onTriggerElementChange(t.value)}),(l,n)=>(E(),I(r(L),z(a,{ref:r(e),type:l.as==="button"?"button":void 0,tabindex:"-1","aria-label":"Show popup","aria-haspopup":"listbox","aria-expanded":r(s).open.value,"aria-controls":r(s).contentId,"data-state":r(s).open.value?"open":"closed",disabled:o.value,"data-disabled":o.value?"":void 0,"aria-disabled":o.value??void 0,onClick:n[0]||(n[0]=u=>r(s).onOpenChange(!r(s).open.value))}),{default:C(()=>[O(l.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","disabled","data-disabled","aria-disabled"]))}}),Ys=Es,ws=q({__name:"ComboboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(i){const a=i,e=K();return e.isVirtual.value=!0,(t,s)=>(E(),I(ns,ie(_e(a)),{default:C(o=>[O(t.$slots,"default",ie(_e(o)))]),_:3},16))}}),Qs=ws;function Js(){const{contains:i,startsWith:a}=We({sensitivity:"base"});
4function e(l,n){return i(l,n)?i(n,l)?0:a(l,n)?1:2:null}function t(l,n,u){if(typeof l!="object"||l===null)return e(String(l),n);let g=null;for(const c of u){const m=Ke(l,c);if(m==null)continue;const h=Array.isArray(m)?m.map(String):[String(m)];for(const d of h){const f=e(d,n);if(f!==null&&(g===null||f<g)&&(g=f),g===0)return 0}}return g}function s(l,n,u){if(!n)return l;const g=[];for(const c of l){const m=t(c,n,u);m!==null&&g.push({item:c,score:m})}return g.sort((c,m)=>c.score-m.score),g.map(({item:c})=>c)}function o(l,n,u){return n?l.map(g=>{const c=[];for(const m of g){if(m==null)continue;if(u.isStructural?.(m)){c.push({item:m,score:-1});continue}const h=t(m,n,u.fields);h!==null&&c.push({item:m,score:h})}return c.sort((m,h)=>m.score-h.score),c.map(({item:m})=>m)}).filter(g=>g.some(c=>!u.isStructural?.(c))):l}return{score:e,scoreItem:t,filter:s,filterGroups:o}}function Is(i,a){if(typeof i!="object"||i===null)return!1;const e=Ke(i,a);return e!=null&&e!==""}function Ve(i,a){return a?{xs:44,sm:48,md:52,lg:56,xl:60}[i]:{xs:24,sm:28,md:32,lg:36,xl:40}[i]}function Zs(i,a,e,t){const s=Ve(a,!0),o=Ve(a,!1);return t?()=>s:e?l=>Is(i[l],e)?s:o:()=>o}export{$s as C,kt as L,Gs as a,Xs as b,js as c,Ls as d,Ys as e,Ps as f,Us as g,Ks as h,Hs as i,Ns as j,Qs as k,Ws as l,Ds as m,Ts as n,Zs as o,ls as p,We as q,K as r,ve as s,zt as t,Js as u};
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.