PageSourceSearch

https://beventi.co/_nuxt/BJWLe9I9.js

js beventi.co collected 2026-09-25 03:53:32 UTC 31,845 bytes, 4 lines download raw bytes

1import{q as x,u as J,aM as ge,T as j,aY as xe,bo as ne,bp as ee,g as de,at as q,b0 as Z,bh as Oe,b1 as y,f as te,e as A,b2 as H,bd as Y,bc as $,ba as W,a4 as B,bq as oe,b5 as Q,b3 as Se,b4 as G,br as le,av as X,aQ as ce,bs as ye,b6 as Re,b9 as Ie,bt as we,bu as Ce,bv as Ee,F as Me,bw as _,ax as Te,aP as ve,aO as ze,bb as Fe}from"./bogGBgDk.js";import{d as Ae,e as Pe}from"./DvkjTXMr.js";import{s as $e}from"./CeyXvx0B.js";import{c as F,u as De,f as ie}from"./uPjYsGO0.js";import{i as Ve}from"./BGGoiHJ5.js";function N(n,d,l){let o=l.initialDeps??[],e;function a(){var i,t,h,c;let s;l.key&&((i=l.debug)!=null&&i.call(l))&&(s=Date.now());const p=n();if(!(p.length!==o.length||p.some((R,z)=>o[z]!==R)))return e;o=p;let M;if(l.key&&((t=l.debug)!=null&&t.call(l))&&(M=Date.now()),e=d(...p),l.key&&((h=l.debug)!=null&&h.call(l))){const R=Math.round((Date.now()-s)*100)/100,z=Math.round((Date.now()-M)*100)/100,V=z/16,P=(m,I)=>{for(m=String(m);m.length<I;)m=" "+m;return m};console.info(`%c⏱ ${P(z,5)} /${P(R,5)} ms`,`
2            font-size: .6rem;
3            font-weight: bold;
4            color: hsl(${Math.max(0,Math.min(120-120*V,120))}deg 100% 31%);`,l?.key)}return(c=l?.onChange)==null||c.call(l,e),e}return a.updateDeps=i=>{o=i},a}function ae(n,d){if(n===void 0)throw new Error("Unexpected undefined");return n}const ke=(n,d)=>Math.abs(n-d)<1.01,_e=(n,d,l)=>{let o;return function(...e){n.clearTimeout(o),o=n.setTimeout(()=>d.apply(this,e),l)}},se=n=>{const{offsetWidth:d,offsetHeight:l}=n;return{width:d,height:l}},Be=n=>n,je=n=>{const d=Math.max(n.startIndex-n.overscan,0),l=Math.min(n.endIndex+n.overscan,n.count-1),o=[];for(let e=d;e<=l;e++)o.push(e);return o},Le=(n,d)=>{const l=n.scrollElement;if(!l)return;const o=n.targetWindow;if(!o)return;const e=i=>{const{width:t,height:h}=i;d({width:Math.round(t),height:Math.round(h)})};if(e(se(l)),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(i=>{const t=()=>{const h=i[0];if(h?.borderBoxSize){const c=h.borderBoxSize[0];if(c){e({width:c.inlineSize,height:c.blockSize});return}}e(se(l))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()});return a.observe(l,{box:"border-box"}),()=>{a.unobserve(l)}},re={passive:!0},ue=typeof window>"u"?!0:"onscrollend"in window,Ne=(n,d)=>{const l=n.scrollElement;if(!l)return;const o=n.targetWindow;if(!o)return;let e=0;const a=n.options.useScrollendEvent&&ue?()=>{}:_e(o,()=>{d(e,!1)},n.options.isScrollingResetDelay),i=s=>()=>{const{horizontal:p,isRtl:O}=n.options;e=p?l.scrollLeft*(O&&-1||1):l.scrollTop,a(),d(e,s)},t=i(!0),h=i(!1);h(),l.addEventListener("scroll",t,re);const c=n.options.useScrollendEvent&&ue;return c&&l.addEventListener("scrollend",h,re),()=>{l.removeEventListener("scroll",t),c&&l.removeEventListener("scrollend",h)}},We=(n,d,l)=>{if(d?.borderBoxSize){const o=d.borderBoxSize[0];if(o)return Math.round(o[l.options.horizontal?"inlineSize":"blockSize"])}return n[l.options.horizontal?"offsetWidth":"offsetHeight"]},qe=(n,{adjustments:d=0,behavior:l},o)=>{var e,a;const i=n+d;(a=(e=o.scrollElement)==null?void 0:e.scrollTo)==null||a.call(e,{[o.options.horizontal?"left":"top"]:i,behavior:l})};class Ke{constructor(d){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let l=null;const o=()=>l||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:l=new this.targetWindow.ResizeObserver(e=>{e.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var e;(e=o())==null||e.disconnect(),l=null},observe:e=>{var a;return(a=o())==null?void 0:a.observe(e,{box:"border-box"})},unobserve:e=>{var a;return(a=o())==null?void 0:a.unobserve(e)}}})(),this.range=null,this.setOptions=l=>{Object.entries(l).forEach(([o,e])=>{typeof e>"u"&&delete l[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Be,rangeExtractor:je,onChange:()=>{},measureElement:We,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,...l}},this.notify=l=>{var o,e;(e=(o=this.options).onChange)==null||e.call(o,this,l)},this.maybeNotify=N(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),l=>{this.notify(l)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>
4{this.unsubs.filter(Boolean).forEach(l=>l()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var l;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((l=this.scrollElement)==null?void 0:l.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=a,this.maybeNotify()}))}},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=(l,o)=>{const e=new Map,a=new Map;for(let i=o-1;i>=0;i--){const t=l[i];if(e.has(t.lane))continue;const h=a.get(t.lane);if(h==null||t.end>h.end?a.set(t.lane,t):t.end<h.end&&e.set(t.lane,!0),e.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,t)=>i.end===t.end?i.index-t.index:i.end-t.end)[0]:void 0},this.getMeasurementOptions=N(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(l,o,e,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:l,paddingStart:o,scrollMargin:e,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=N(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:l,paddingStart:o,scrollMargin:e,getItemKey:a,enabled:i},t)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(s=>{this.itemSizeCache.set(s.key,s.size)}));const h=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,h);for(let s=h;s<l;s++){const p=a(s),O=this.options.lanes===1?c[s-1]:this.getFurthestMeasurement(c,s),M=O?O.end+this.options.gap:o+e,R=t.get(p),z=typeof R=="number"?R:this.options.estimateSize(s),V=M+z,P=O?O.lane:s%this.options.lanes;c[s]={index:s,start:M,size:z,end:V,key:p,lane:P}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=N(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(l,o,e,a)=>this.range=l.length>0&&o>0?Ue({measurements:l,outerSize:o,scrollOffset:e,lanes:a}):null,{key:!1,debug:()=>this.options.debug}
4),this.getVirtualIndexes=N(()=>{let l=null,o=null;const e=this.calculateRange();return e&&(l=e.startIndex,o=e.endIndex),this.maybeNotify.updateDeps([this.isScrolling,l,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,l,o]},(l,o,e,a,i)=>a===null||i===null?[]:l({startIndex:a,endIndex:i,overscan:o,count:e}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=l=>{const o=this.options.indexAttribute,e=l.getAttribute(o);return e?parseInt(e,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(l,o)=>{const e=this.indexFromElement(l),a=this.measurementsCache[e];if(!a)return;const i=a.key,t=this.elementsCache.get(i);t!==l&&(t&&this.observer.unobserve(t),this.observer.observe(l),this.elementsCache.set(i,l)),l.isConnected&&this.resizeItem(e,this.options.measureElement(l,o,this))},this.resizeItem=(l,o)=>{const e=this.measurementsCache[l];if(!e)return;const a=this.itemSizeCache.get(e.key)??e.size,i=o-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(e,i,this):e.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(e.index),this.itemSizeCache=new Map(this.itemSizeCache.set(e.key,o)),this.notify(!1))},this.measureElement=l=>{if(!l){this.elementsCache.forEach((o,e)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(e))});return}this._measureElement(l,void 0)},this.getVirtualItems=N(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(l,o)=>{const e=[];for(let a=0,i=l.length;a<i;a++){const t=l[a],h=o[t];e.push(h)}return e},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=l=>{const o=this.getMeasurements();if(o.length!==0)return ae(o[fe(0,o.length-1,e=>ae(o[e]).start,l)])},this.getOffsetForAlignment=(l,o,e=0)=>{const a=this.getSize(),i=this.getScrollOffset();o==="auto"&&(o=l>=i+a?"end":"start"),o==="center"?l+=(e-a)/2:o==="end"&&(l-=a);const t=this.getTotalSize()+this.options.scrollMargin-a;return Math.max(Math.min(t,l),0)},this.getOffsetForIndex=(l,o="auto")=>{l=Math.max(0,Math.min(l,this.options.count-1));const e=this.measurementsCache[l];if(!e)return;const a=this.getSize(),i=this.getScrollOffset();if(o==="auto")if(e.end>=i+a-this.options.scrollPaddingEnd)o="end";else if(e.start<=i+this.options.scrollPaddingStart)o="start";else return[i,o];const t=o==="end"?e.end+this.options.scrollPaddingEnd:e.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(t,o,e.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(l,{align:o="start",behavior:e}={})=>{e==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(l,o),{adjustments:void 0,behavior:e})},this.scrollToIndex=(l,{align:o="auto",behavior:e}={})=>{e==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),l=Math.max(0,Math.min(l,this.options.count-1));let a=0;const i=10,t=c=>{if(!this.targetWindow)return;const s=this.getOffsetForIndex(l,c);if(!s){console.warn("Failed to get offset for index:",l);return}const[p,O]=s;this._scrollToOffset(p,{adjustments:void 0,behavior:e}),this.targetWindow.requestAnimationFrame(()=>{const M=this.getScrollOffset(),R=this.getOffsetForIndex(l,O);if(!R){console.warn("Failed to get offset for index:",l);return}ke(R[0],M)||h(O)})},h=c=>{this.targetWindow&&(a++,a<i?this.targetWindow.requestAnimationFrame(()=>t(c)):console.warn(`Failed to scroll to index ${l} after ${i} attempts.`))};t(o)},this.scrollBy=(l,{behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+l,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var l;const o=this.getMeasurements();let e;if(o.length===0)e=this.options.paddingStart;else if(this.options.lanes===1)e=((l=o[o.length-1])==null?void 0:l.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=o.length-1;for(;i>=0&&a.some(t=>t===null);){const t=o[i];a[t.lane]===null&&(a[t.lane]=t.end),i--}e=Math.max(...a.filter(t=>t!==null))}return Math.max(e-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(l,{adjustments:o,behavior:e})=>{this.options.scrollToFn(l,{behavior:e,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(d)}}const fe=(n,d,l,o)=>{for(;n<=d;){const e=(n+d)/2|0,a=l(e);if(a<o)n=e+1;else if(a>o)d=e-1;else return e}return n>0?n-1:0};function Ue({measurements:n,outerSize:d,scrollOffset:l,lanes:o}){const e=n.length-1,a=h=>n[h].start;if(n.length<=o)return{startIndex:0,endIndex:e};let i=fe(0,e,a,l),t=i;if(o===1)for(;t<e&&n[t].end<l+d;)t++;else if(o>1){const h=Array(o).fill(0);for(;t<e&&h.some(s=>s<l+d);){const s=n[t];h[s.lane]=s.end,t++}const c=Array(o).fill(l+d);for(;i>=0&&c.some(s=>s>=l);){const s=n[i];c[s.lane]=s.start,i--}i=Math.max(0,i-i%o),t=Math.min(e,t+(o-1-t%o))}return{startIndex:i,endIndex:t}}function He(n){const d=new Ke(J(n)),l=ge(d),o=d._didMount();return j(()=>J(n).getScrollElement(),e=>{e&&d._willUpdate()},{immediate:!0}),j(()=>J(n),e=>{d.setOptions({...e,onChange:(a,i)=>{var t;ne(l),(t=e.onChange)==null||t.call(e,a,i)}}),d._willUpdate(),ne(l)},{immediate:!0}),xe(o),l}function Je(n){return He(x(()=>({observeElementRect:Le,observeElementOffset:Ne,scrollToFn:qe,...J(n)})))}function Ye(){let n=ee();return de(()=>n.dispose()),n}function Qe(){let n=Ye();return d=>{n.dispose(),n.nextFrame(d)}}var pe=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(pe||{}),Ge={};function Xe(n,d){return n===d}var Ze=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Ze||{}),et=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(et||{}),tt=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(tt||{});let he=Symbol("ComboboxContext");function K(n){let d=ce(he,null);if(d===null){let l=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,K),l}return d}let me=Symbol("VirtualContext"),lt=q({name:"VirtualProvider",setup(n,{slots:d}){let l=K("VirtualProvider"),o=x(()=>{let t=y(l.optionsRef);if(!t)return{start:0,end:0};let h=window.getComputedStyle(t);return{start:parseFloat(h.paddingBlockStart||h.paddingTop),end:parseFloat(h.paddingBlockEnd||h.paddingBottom)}}),e=Je(x(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:l.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return y(l.optionsRef)},overscan:12}
4))),a=x(()=>{var t;return(t=l.virtual.value)==null?void 0:t.options}),i=A(0);return j([a],()=>{i.value+=1}),ve(me,l.virtual.value?e:null),()=>[X("div",{style:{position:"relative",width:"100%",height:`${e.value.getTotalSize()}px`},ref:t=>{if(t){if(typeof process<"u"&&Ge.JEST_WORKER_ID!==void 0||l.activationTrigger.value===0)return;l.activeOptionIndex.value!==null&&l.virtual.value.options.length>l.activeOptionIndex.value&&e.value.scrollToIndex(l.activeOptionIndex.value)}}},e.value.getVirtualItems().map(t=>ze(d.default({option:l.virtual.value.options[t.index],open:l.comboboxState.value===0})[0],{key:`${i.value}-${t.index}`,"data-index":t.index,"aria-setsize":l.virtual.value.options.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}})))]}}),rt=q({name:"Combobox",emits:{"update:modelValue":n=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(n,{slots:d,attrs:l,emit:o}){let e=A(1),a=A(null),i=A(null),t=A(null),h=A(null),c=A({static:!1,hold:!1}),s=A([]),p=A(null),O=A(2),M=A(!1);function R(r=v=>v){let v=p.value!==null?s.value[p.value]:null,b=r(s.value.slice()),g=b.length>0&&b[0].dataRef.order.value!==null?b.sort((T,k)=>T.dataRef.order.value-k.dataRef.order.value):Fe(b,T=>y(T.dataRef.domRef)),E=v?g.indexOf(v):null;return E===-1&&(E=null),{options:g,activeOptionIndex:E}}let z=x(()=>n.multiple?1:0),V=x(()=>n.nullable),[P,m]=Ae(x(()=>n.modelValue),r=>o("update:modelValue",r),x(()=>n.defaultValue)),I=x(()=>P.value===void 0?W(z.value,{1:[],0:void 0}):P.value),D=null,f=null;function w(r){return W(z.value,{0(){return m?.(r)},1:()=>{let v=_(u.value.value).slice(),b=_(r),g=v.findIndex(E=>u.compare(b,_(E)));return g===-1?v.push(b):v.splice(g,1),m?.(v)}})}let C=x(()=>{});j([C],([r],[v])=>{if(u.virtual.value&&r&&v&&p.value!==null){let b=r.indexOf(v[p.value]);b!==-1?p.value=b:p.value=null}});let u={comboboxState:e,value:I,mode:z,compare(r,v){if(typeof n.by=="string"){let b=n.by;return r?.[b]===v?.[b]}return n.by===null?Xe(r,v):n.by(r,v)},calculateIndex(r){return u.virtual.value?n.by===null?u.virtual.value.options.indexOf(r):u.virtual.value.options.findIndex(v=>u.compare(v,r)):s.value.findIndex(v=>u.compare(v.dataRef.value,r))},defaultValue:x(()=>n.defaultValue),nullable:V,immediate:x(()=>!1),virtual:x(()=>null),inputRef:i,labelRef:a,buttonRef:t,optionsRef:h,disabled:x(()=>n.disabled),options:s,change(r){m(r)},activeOptionIndex:x(()=>{if(M.value&&p.value===null&&(u.virtual.value?u.virtual.value.options.length>0:s.value.length>0)){if(u.virtual.value){let v=u.virtual.value.options.findIndex(b=>{var g;return!((g=u.virtual.value)!=null&&g.disabled(b))});if(v!==-1)return v}let r=s.value.findIndex(v=>!v.dataRef.disabled);if(r!==-1)return r}return p.value}),activationTrigger:O,optionsPropsRef:c,closeCombobox(){M.value=!1,!n.disabled&&e.value!==1&&(e.value=1,p.value=null)},openCombobox(){if(M.value=!0,!n.disabled&&e.value!==0){if(u.value.value){let r=u.calculateIndex(u.value.value);r!==-1&&(p.value=r)}e.value=0}},setActivationTrigger(r){O.value=r},goToOption(r,v,b){M.value=!1,D!==null&&cancelAnimationFrame(D),D=requestAnimationFrame(()=>{if(n.disabled||h.value&&!c.value.static&&e.value===1)return;if(u.virtual.value){p.value=r===F.Specific?v:ie({focus:r},{resolveItems:()=>u.virtual.value.options,resolveActiveIndex:()=>{var T,k;return(k=(T=u.activeOptionIndex.value)!=null?T:u.virtual.value.options.findIndex(L=>{var U;return!((U=u.virtual.value)!=null&&U.disabled(L))}))!=null?k:null},resolveDisabled:T=>u.virtual.value.disabled(T),resolveId(){throw new Error("Function not implemented.")}}),O.value=b??2;return}let g=R();if(g.activeOptionIndex===null){let T=g.options.findIndex(k=>!k.dataRef.disabled);T!==-1&&(g.activeOptionIndex=T)}let E=r===F.Specific?v:ie({focus:r},{resolveItems:()=>g.options,resolveActiveIndex:()=>g.activeOptionIndex,resolveId:T=>T.id,resolveDisabled:T=>T.dataRef.disabled});p.value=E,O.value=b??2,s.value=g.options})},selectOption(r){let v=s.value.find(g=>g.id===r);if(!v)return;let{dataRef:b}=v;w(b.value)},selectActiveOption(){if(u.activeOptionIndex.value!==null){if(u.virtual.value)w(u.virtual.value.options[u.activeOptionIndex.value]);else{let{dataRef:r}=s.value[u.activeOptionIndex.value];w(r.value)}u.goToOption(F.Specific,u.activeOptionIndex.value)}},registerOption(r,v){let b=Te({id:r,dataRef:v});if(u.virtual.value){s.value.push(b);return}f&&cancelAnimationFrame(f);let g=R(E=>(E.push(b),E));p.value===null&&u.isSelected(v.value.value)&&(g.activeOptionIndex=g.options.indexOf(b)),s.value=g.options,p.value=g.activeOptionIndex,O.value=2,g.options.some(E=>!y(E.dataRef.domRef))&&(f=requestAnimationFrame(()=>{let E=R();s.value=E.options,p.value=E.activeOptionIndex}))},unregisterOption(r,v){if(D!==null&&cancelAnimationFrame(D),v&&(M.value=!0),u.virtual.value){s.value=s.value.filter(g=>g.id!==r);return}let b=R(g=>{let E=g.findIndex(T=>T.id===r);return E!==-1&&g.splice(E,1),g});s.value=b.options,p.value=b.activeOptionIndex,O.value=2},isSelected(r){return W(z.value,{0:()=>u.compare(_(u.value.value),_(r)),1:()=>_(u.value.value).some(v=>u.compare(_(v),_(r)))})},isActive(r){return p.value===u.calculateIndex(r)}};Re([i,t,h],()=>u.closeCombobox(),x(()=>e.value===0)),ve(he,u),Ie(x(()=>W(e.value,{0:G.Open,1:G.Closed})));let S=x(()=>{var r;return(r=y(i))==null?void 0:r.closest("form")});return te(()=>{j([S],()=>{if(!S.value||n.defaultValue===void 0)return;function r(){u.change(n.defaultValue)}return S.value.addEventListener("reset",r),()=>{var v;(v=S.value)==null||v.removeEventListener("reset",r)}},{immediate:!0})}),()=>{var r,v,b;let{name:g,disabled:E,form:T,...k}=n,L={open:e.value===0,disabled:E,activeIndex:u.activeOptionIndex.value,activeOption:u.activeOptionIndex.value===null?null:u.virtual.value?u.virtual.value.options[(r=u.activeOptionIndex.value)!=null?r:0]:(b=(v=u.options.value[u.activeOptionIndex.value])==null?void 0:v.dataRef.value)!=null?b:null,value:I.value};return X(Me,[...g!=null&&I.value!=null?Pe({[g]:I.value}).map(([U,be])=>X(we,Ce({features:Ee.Hidden,key:U,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:T,disabled:E,name:U,value:be}))):[],H({theirProps:{...l,...le(k,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:L,slots:d,attrs:l,name:"Combobox"})])}}}),ut=q({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(n,{attrs:d,slots:l,expose:o}){var e;let a=(e=n.id)!=null?e:`headlessui-combobox-button-${Z()}`,i=K("ComboboxButton");o({el:i.buttonRef,$el:i.buttonRef});
4function t(s){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(s.preventDefault(),i.openCombobox()),B(()=>{var p;return(p=y(i.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function h(s){switch(s.key){case $.ArrowDown:s.preventDefault(),s.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),B(()=>{var p;return(p=i.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case $.ArrowUp:s.preventDefault(),s.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),B(()=>{i.value.value||i.goToOption(F.Last)})),B(()=>{var p;return(p=i.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case $.Escape:if(i.comboboxState.value!==0)return;s.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&s.stopPropagation(),i.closeCombobox(),B(()=>{var p;return(p=i.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let c=$e(x(()=>({as:n.as,type:d.type})),i.buttonRef);return()=>{var s,p;let O={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...M}=n,R={ref:i.buttonRef,id:a,type:c.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(s=y(i.optionsRef))==null?void 0:s.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(p=y(i.labelRef))==null?void 0:p.id,a].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:h,onClick:t};return H({ourProps:R,theirProps:M,slot:O,attrs:d,slots:l,name:"ComboboxButton"})}}}),dt=q({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:n=>!0},setup(n,{emit:d,attrs:l,slots:o,expose:e}){var a;let i=(a=n.id)!=null?a:`headlessui-combobox-input-${Z()}`,t=K("ComboboxInput"),h=x(()=>Oe(y(t.inputRef))),c={value:!1};e({el:t.inputRef,$el:t.inputRef});function s(){t.change(null);let f=y(t.optionsRef);f&&(f.scrollTop=0),t.goToOption(F.Nothing)}let p=x(()=>{var f;let w=t.value.value;return y(t.inputRef)?typeof n.displayValue<"u"&&w!==void 0?(f=n.displayValue(w))!=null?f:"":typeof w=="string"?w:"":""});te(()=>{j([p,t.comboboxState,h],([f,w],[C,u])=>{if(c.value)return;let S=y(t.inputRef);S&&((u===0&&w===1||f!==C)&&(S.value=f),requestAnimationFrame(()=>{var r;if(c.value||!S||((r=h.value)==null?void 0:r.activeElement)!==S)return;let{selectionStart:v,selectionEnd:b}=S;Math.abs((b??0)-(v??0))===0&&v===0&&S.setSelectionRange(S.value.length,S.value.length)}))},{immediate:!0}),j([t.comboboxState],([f],[w])=>{if(f===0&&w===1){if(c.value)return;let C=y(t.inputRef);if(!C)return;let u=C.value,{selectionStart:S,selectionEnd:r,selectionDirection:v}=C;C.value="",C.value=u,v!==null?C.setSelectionRange(S,r,v):C.setSelectionRange(S,r)}})});let O=A(!1);function M(){O.value=!0}function R(){ee().nextFrame(()=>{O.value=!1})}let z=Qe();function V(f){switch(c.value=!0,z(()=>{c.value=!1}),f.key){case $.Enter:if(c.value=!1,t.comboboxState.value!==0||O.value)return;if(f.preventDefault(),f.stopPropagation(),t.activeOptionIndex.value===null){t.closeCombobox();return}t.selectActiveOption(),t.mode.value===0&&t.closeCombobox();break;case $.ArrowDown:return c.value=!1,f.preventDefault(),f.stopPropagation(),W(t.comboboxState.value,{0:()=>t.goToOption(F.Next),1:()=>t.openCombobox()});case $.ArrowUp:return c.value=!1,f.preventDefault(),f.stopPropagation(),W(t.comboboxState.value,{0:()=>t.goToOption(F.Previous),1:()=>{t.openCombobox(),B(()=>{t.value.value||t.goToOption(F.Last)})}});case $.Home:if(f.shiftKey)break;return c.value=!1,f.preventDefault(),f.stopPropagation(),t.goToOption(F.First);case $.PageUp:return c.value=!1,f.preventDefault(),f.stopPropagation(),t.goToOption(F.First);case $.End:if(f.shiftKey)break;return c.value=!1,f.preventDefault(),f.stopPropagation(),t.goToOption(F.Last);case $.PageDown:return c.value=!1,f.preventDefault(),f.stopPropagation(),t.goToOption(F.Last);case $.Escape:if(c.value=!1,t.comboboxState.value!==0)return;f.preventDefault(),t.optionsRef.value&&!t.optionsPropsRef.value.static&&f.stopPropagation(),t.nullable.value&&t.mode.value===0&&t.value.value===null&&s(),t.closeCombobox();break;case $.Tab:if(c.value=!1,t.comboboxState.value!==0)return;t.mode.value===0&&t.activationTrigger.value!==1&&t.selectActiveOption(),t.closeCombobox();break}}function P(f){d("change",f),t.nullable.value&&t.mode.value===0&&f.target.value===""&&s(),t.openCombobox()}function m(f){var w,C,u;let S=(w=f.relatedTarget)!=null?w:oe.find(r=>r!==f.currentTarget);if(c.value=!1,!((C=y(t.optionsRef))!=null&&C.contains(S))&&!((u=y(t.buttonRef))!=null&&u.contains(S))&&t.comboboxState.value===0)return f.preventDefault(),t.mode.value===0&&(t.nullable.value&&t.value.value===null?s():t.activationTrigger.value!==1&&t.selectActiveOption()),t.closeCombobox()}function I(f){var w,C,u;let S=(w=f.relatedTarget)!=null?w:oe.find(r=>r!==f.currentTarget);(C=y(t.buttonRef))!=null&&C.contains(S)||(u=y(t.optionsRef))!=null&&u.contains(S)||t.disabled.value||t.immediate.value&&t.comboboxState.value!==0&&(t.openCombobox(),ee().nextFrame(()=>{t.setActivationTrigger(1)}))}let D=x(()=>{var f,w,C,u;return(u=(C=(w=n.defaultValue)!=null?w:t.defaultValue.value!==void 0?(f=n.displayValue)==null?void 0:f.call(n,t.defaultValue.value):null)!=null?C:t.defaultValue.value)!=null?u:""});return()=>{var f,w,C,u,S,r,v;let b={open:t.comboboxState.value===0},{displayValue:g,onChange:E,...T}=n,k={"aria-controls":(f=t.optionsRef.value)==null?void 0:f.id,"aria-expanded":t.comboboxState.value===0,"aria-activedescendant":t.activeOptionIndex.value===null?void 0:t.virtual.value?(w=t.options.value.find(L=>
4!t.virtual.value.disabled(L.dataRef.value)&&t.compare(L.dataRef.value,t.virtual.value.options[t.activeOptionIndex.value])))==null?void 0:w.id:(C=t.options.value[t.activeOptionIndex.value])==null?void 0:C.id,"aria-labelledby":(r=(u=y(t.labelRef))==null?void 0:u.id)!=null?r:(S=y(t.buttonRef))==null?void 0:S.id,"aria-autocomplete":"list",id:i,onCompositionstart:M,onCompositionend:R,onKeydown:V,onInput:P,onFocus:I,onBlur:m,role:"combobox",type:(v=l.type)!=null?v:"text",tabIndex:0,ref:t.inputRef,defaultValue:D.value,disabled:t.disabled.value===!0?!0:void 0};return H({ourProps:k,theirProps:T,slot:b,attrs:l,slots:o,features:Y.RenderStrategy|Y.Static,name:"ComboboxInput"})}}}),ct=q({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(n,{attrs:d,slots:l,expose:o}){let e=K("ComboboxOptions"),a=`headlessui-combobox-options-${Z()}`;o({el:e.optionsRef,$el:e.optionsRef}),Q(()=>{e.optionsPropsRef.value.static=n.static}),Q(()=>{e.optionsPropsRef.value.hold=n.hold});let i=Se(),t=x(()=>i!==null?(i.value&G.Open)===G.Open:e.comboboxState.value===0);Ve({container:x(()=>y(e.optionsRef)),enabled:x(()=>e.comboboxState.value===0),accept(c){return c.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:c.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(c){c.setAttribute("role","none")}});function h(c){c.preventDefault()}return()=>{var c,s,p;let O={open:e.comboboxState.value===0},M={"aria-labelledby":(p=(c=y(e.labelRef))==null?void 0:c.id)!=null?p:(s=y(e.buttonRef))==null?void 0:s.id,id:a,ref:e.optionsRef,role:"listbox","aria-multiselectable":e.mode.value===1?!0:void 0,onMousedown:h},R=le(n,["hold"]);return H({ourProps:M,theirProps:R,slot:O,attrs:d,slots:e.virtual.value&&e.comboboxState.value===0?{...l,default:()=>[X(lt,{},l.default)]}:l,features:Y.RenderStrategy|Y.Static,visible:t.value,name:"ComboboxOptions"})}}}),vt=q({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(n,{slots:d,attrs:l,expose:o}){let e=K("ComboboxOption"),a=`headlessui-combobox-option-${Z()}`,i=A(null),t=x(()=>n.disabled);o({el:i,$el:i});let h=x(()=>{var m;return e.virtual.value?e.activeOptionIndex.value===e.calculateIndex(n.value):e.activeOptionIndex.value===null?!1:((m=e.options.value[e.activeOptionIndex.value])==null?void 0:m.id)===a}),c=x(()=>e.isSelected(n.value)),s=ce(me,null),p=x(()=>({disabled:n.disabled,value:n.value,domRef:i,order:x(()=>n.order)}));te(()=>e.registerOption(a,p)),de(()=>e.unregisterOption(a,h.value)),Q(()=>{let m=y(i);m&&s?.value.measureElement(m)}),Q(()=>{e.comboboxState.value===0&&h.value&&(e.virtual.value||e.activationTrigger.value!==0&&B(()=>{var m,I;return(I=(m=y(i))==null?void 0:m.scrollIntoView)==null?void 0:I.call(m,{block:"nearest"})}))});function O(m){m.preventDefault(),m.button===pe.Left&&(t.value||(e.selectOption(a),ye()||requestAnimationFrame(()=>{var I;return(I=y(e.inputRef))==null?void 0:I.focus({preventScroll:!0})}),e.mode.value===0&&e.closeCombobox()))}function M(){var m;if(n.disabled||(m=e.virtual.value)!=null&&m.disabled(n.value))return e.goToOption(F.Nothing);let I=e.calculateIndex(n.value);e.goToOption(F.Specific,I)}let R=De();function z(m){R.update(m)}function V(m){var I;if(!R.wasMoved(m)||n.disabled||(I=e.virtual.value)!=null&&I.disabled(n.value)||h.value)return;let D=e.calculateIndex(n.value);e.goToOption(F.Specific,D,0)}function P(m){var I;R.wasMoved(m)&&(n.disabled||(I=e.virtual.value)!=null&&I.disabled(n.value)||h.value&&(e.optionsPropsRef.value.hold||e.goToOption(F.Nothing)))}return()=>{let{disabled:m}=n,I={active:h.value,selected:c.value,disabled:m},D={id:a,ref:i,role:"option",tabIndex:m===!0?void 0:-1,"aria-disabled":m===!0?!0:void 0,"aria-selected":c.value,disabled:void 0,onMousedown:O,onFocus:M,onPointerenter:z,onMouseenter:z,onPointermove:V,onMousemove:V,onPointerleave:P,onMouseleave:P},f=le(n,["order","value"]);
4return H({ourProps:D,theirProps:f,slot:I,attrs:l,slots:d,name:"ComboboxOption"})}}});export{dt as i,rt as l,ut as n,vt as r,ct 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.