1import{g as W,O as N,cE as he,cl as Te,bF as _e,n as C,ac as xe,cF as ue,d as K,br as Me,bs as Ae,ab as de,bv as te,bw as ze,bx as Fe,by as Ve,bz as ke,bg as ee,bA as ce,F as Se,R as k,bi as J,bB as L,bh as M,bf as ie,bn as le,cG as De,bk as D,aJ as $,cH as fe,bj as Pe,an as se,bm as Le,bo as ne,bp as Oe,cI as $e,ad as Be,bC as je,bl as ye,bD as We,bq as Ne,o as B,k as Q,h as j,X as Ke,as as He,b as ve,e as G,f as U,l as pe,r as Ue,a5 as ae,t as qe,a0 as Je}from"./B2nRym9L.js";import{c as V,f as me,u as Xe}from"./YkCJDFW-.js";import{i as Ze}from"./Bghm2OSC.js";function Ge(s,r,l){const n=new Array(s);return new Proxy(n,{get(e,o,i){if(typeof o=="string"){const t=o.charCodeAt(0);if(t>=48&&t<=57){const a=+o;if(Number.isInteger(a)&&a>=0&&a<s){let u=e[a];if(!u){const d=r[a*2];u=e[a]={index:a,key:l(a),start:d,size:r[a*2+1],end:d+r[a*2+1],lane:0}}return u}}if(o==="length")return s}return Reflect.get(e,o,i)}})}function q(s,r,l){let n=l.initialDeps??[],e,o=!0;function i(){const t=s();return(t.length!==n.length||t.some((u,d)=>n[d]!==u))&&(n=t,e=r(...t),l?.onChange&&!(o&&l.skipInitialOnChange)&&l.onChange(e),o=!1),e}return i.updateDeps=t=>{n=t},i}function ge(s,r){if(s===void 0)throw new Error("Unexpected undefined");return s}const Ye=(s,r)=>Math.abs(s-r)<1.01,Qe=(s,r,l)=>{let n;return function(...e){s.clearTimeout(n),n=s.setTimeout(()=>r.apply(this,e),l)}};let Y;const re=()=>{if(Y!==void 0)return Y;if(typeof navigator>"u")return Y=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Y=!0;const s=navigator.maxTouchPoints;return Y=navigator.platform==="MacIntel"&&s!==void 0&&s>0},be=s=>{const{offsetWidth:r,offsetHeight:l}=s;return{width:r,height:l}},et=s=>s,tt=s=>{const r=Math.max(s.startIndex-s.overscan,0),n=Math.min(s.endIndex+s.overscan,s.count-1)-r+1,e=new Array(n);for(let o=0;o<n;o++)e[o]=r+o;return e},lt=(s,r)=>{const l=s.scrollElement;if(!l)return;const n=s.targetWindow;if(!n)return;const e=i=>{const{width:t,height:a}=i;r({width:Math.round(t),height:Math.round(a)})};if(e(be(l)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(i=>{const t=()=>{const a=i[0];if(a?.borderBoxSize){const u=a.borderBoxSize[0];if(u){e({width:u.inlineSize,height:u.blockSize});return}}e(be(l))};s.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()});return o.observe(l,{box:"border-box"}),()=>{o.unobserve(l)}},oe={passive:!0},st=typeof window>"u"?!0:"onscrollend"in window,nt=(s,r,l)=>{const n=s.scrollElement;if(!n)return;const e=s.targetWindow;if(!e)return;const o=s.options.useScrollendEvent&&st;let i=0;const t=o?null:Qe(e,()=>r(i,!1),s.options.isScrollingResetDelay),a=f=>()=>{i=l(n),t?.(),r(i,f)},u=a(!0),d=a(!1);return n.addEventListener("scroll",u,oe),o&&n.addEventListener("scrollend",d,oe),()=>{n.removeEventListener("scroll",u),o&&n.removeEventListener("scrollend",d)}},ot=(s,r)=>nt(s,r,l=>{const{horizontal:n,isRtl:e}=s.options;return n?l.scrollLeft*(e&&-1||1):l.scrollTop}),it=(s,r,l)=>{if(l.options.useCachedMeasurements){const n=l.indexFromElement(s),e=l.options.getItemKey(n);return l.itemSizeCache.get(e)??l.options.estimateSize(n)}if(r?.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[l.options.horizontal?"inlineSize":"blockSize"])}if(!r){const n=l.indexFromElement(s),e=l.options.getItemKey(n),o=l.itemSizeCache.get(e);if(o!==void 0)return o}return s[l.options.horizontal?"offsetWidth":"offsetHeight"]},at=(s,{adjustments:r=0,behavior:l},n)=>{var e,o;(o=(e=n.scrollElement)==null?void 0:e.scrollTo)==null||o.call(e,{[n.options.horizontal?"left":"top"]:s+r,behavior:l})},rt=at;class ut{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var l,n,e;return((e=(n=(l=this.targetWindow)==null?void 0:l.performance)==null?void 0:n.now)==null?void 0:e.call(n))??Date.now()},this.observer=(()=>{let l=null;const n=()=>l||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:l=new this.targetWindow.ResizeObserver(e=>{e.forEach(o=>{const i=()=>{const t=o.target,a=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(const[u,d]of this.elementsCache)if(d===t){this.elementsCache.delete(u);break}return}this.shouldMeasureDuringScroll(a)&&this.resizeItem(a,this.options.measureElement(t,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var e;(e=n())==null||e.disconnect(),l=null},observe:e=>{var o;return(o=n())==null?void 0:o.observe(e,{box:"border-box"})},unobserve:e=>{var o;return(o=n())==null?void 0:o.unobserve(e)}}})(),this.range=null,this.setOptions=l=>{var n,e;const o={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:et,rangeExtractor:tt,onCh
1ange:()=>{},measureElement:it,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const v in l){const S=l[v];S!==void 0&&(o[v]=S)}const i=this.options;let t=null,a=null,u=!1;if(i!==void 0&&i.enabled&&o.enabled&&o.anchorTo==="end"&&this.scrollElement!==null){const v=i.count,S=o.count,g=this.getMeasurements(),E=v>0?((n=g[0])==null?void 0:n.key)??i.getItemKey(0):null,R=v>0?((e=g[v-1])==null?void 0:e.key)??i.getItemKey(v-1):null;if(S!==v||v>0&&S>0&&(o.getItemKey(0)!==E||o.getItemKey(S-1)!==R)){u=!0;const x=v>0?this.getVirtualItemForOffset(this.getScrollOffset())??g[0]:null;x&&(t=[x.key,this.getScrollOffset()-x.start]);const F=o.followOnAppend===!0?"auto":o.followOnAppend||null;F&&S>v&&this.isAtEnd(i.scrollEndThreshold)&&(v===0||o.getItemKey(S-1)!==R)&&(a=F)}}this.options=o,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,f=0;if(t&&this.scrollOffset!==null){const[v,S]=t,g=this.getMeasurements(),{count:E,getItemKey:R}=this.options;let T=0;for(;T<E&&R(T)!==v;)T++;if(T<E){const b=g[T];if(b){const x=b.start+S;x!==this.scrollOffset&&(f=x-this.scrollOffset,this.scrollOffset=x,d=!0)}}}(d||a)&&(this.pendingScrollAnchor=[d?t[0]:null,d?t[1]:0,a,f])},this.notify=l=>{var n,e;(e=(n=this.options).onChange)==null||e.call(n,this,l)},this.maybeNotify=q(()=>(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=()=>{this.unsubs.filter(Boolean).forEach(l=>l()),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 l;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}if(this.scrollElement=n,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(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this._intendedScrollOffset!==null&&Math.abs(o-this._intendedScrollOffset)<1.5&&(o=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=i,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const o=this.scrollElement,i=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},t=()=>{this._iosTouching=!1,!(!re()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};o.addEventListener("touchstart",i,oe),o.addEventListener("touchend",t,oe),this.unsubs.push(()=>{o.removeEventListener("touchstart",i),o.removeEventListener("touchend",t),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const e=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,e&&this.scrollElement&&this.options.enabled){const[o,i,t,a]=e;o!==null&&!t&&(re()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?a!==0&&(this._iosDeferredAdjustment+=a):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),t&&this.scrollToEnd({behavior:t})}},this._flushIosDeferredIfReady=()=>
1{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const l=this.getScrollOffset(),n=this.getMaxScrollOffset();if(l<0||l>n)return;const e=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(l,{adjustments:this.scrollAdjustments+=e,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=(l,n)=>{const e=new Map,o=new Map;for(let i=n-1;i>=0;i--){const t=l[i];if(e.has(t.lane))continue;const a=o.get(t.lane);if(a==null||t.end>a.end?o.set(t.lane,t):t.end<a.end&&e.set(t.lane,!0),e.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((i,t)=>i.end===t.end?i.index-t.index:i.end-t.end)[0]:void 0},this.getMeasurementOptions=q(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(l,n,e,o,i,t,a)=>(this.prevLanes!==void 0&&this.prevLanes!==t&&(this.lanesChangedFlag=!0),this.prevLanes=t,this.pendingMin=null,{count:l,paddingStart:n,scrollMargin:e,getItemKey:o,enabled:i,lanes:t,laneAssignmentMode:a}),{key:!1}),this.getMeasurements=q(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:l,paddingStart:n,scrollMargin:e,getItemKey:o,enabled:i,lanes:t,laneAssignmentMode:a},u)=>{const d=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>l)for(const g of this.laneAssignments.keys())g>=l&&this.laneAssignments.delete(g);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(g=>{this.itemSizeCache.set(g.key,g.size)}));const f=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===l&&(this.lanesSettling=!1),t===1){const g=this.options.gap,E=l*2;let R=this._flatMeasurements;if(!R||R.length<E){const x=new Float64Array(E);R&&f>0&&x.set(R.subarray(0,f*2)),R=x,this._flatMeasurements=R}let T;if(f===0)T=n+e;else{const x=f-1;T=R[x*2]+R[x*2+1]+g}for(let x=f;x<l;x++){const F=o(x),p=d.get(F),w=typeof p=="number"?p:this.options.estimateSize(x);R[x*2]=T,R[x*2+1]=w,T+=w+g}const b=Ge(l,R,o);return this.measurementsCache=b,b}const v=this.measurementsCache.slice(0,f),S=new Array(t).fill(void 0);for(let g=0;g<f;g++){const E=v[g];E&&(S[E.lane]=g)}for(let g=f;g<l;g++){const E=o(g),R=this.laneAssignments.get(g);let T,b;const x=a==="estimate"||d.has(E);if(R!==void 0&&this.options.lanes>1){T=R;const I=S[T],h=I!==void 0?v[I]:void 0;b=h?h.end+this.options.gap:n+e}else{const I=this.options.lanes===1?v[g-1]:this.getFurthestMeasurement(v,g);b=I?I.end+this.options.gap:n+e,T=I?I.lane:g%this.options.lanes,this.options.lanes>1&&x&&this.laneAssignments.set(g,T)}const F=d.get(E),p=typeof F=="number"?F:this.options.estimateSize(g),w=b+p;v[g]={index:g,start:b,size:p,end:w,key:E,lane:T},S[T]=g}return this.measurementsCache=v,v},{key:!1,debug:()=>this.options.debug}),this.calculateRange=q(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(l,n,e,o)=>this.range=l.length>0&&n>0?dt({measurements:l,outerSize:n,scrollOffset:e,lanes:o,flat:o===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}
1),this.getVirtualIndexes=q(()=>{let l=null,n=null;const e=this.calculateRange();return e&&(l=e.startIndex,n=e.endIndex),this.maybeNotify.updateDeps([this.isScrolling,l,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,l,n]},(l,n,e,o,i)=>o===null||i===null?[]:l({startIndex:o,endIndex:i,overscan:n,count:e}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=l=>{const n=this.options.indexAttribute,e=l.getAttribute(n);return e?parseInt(e,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=l=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const e=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(e!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),i=Math.max(0,e-o),t=Math.min(this.options.count-1,e+o);return l>=i&&l<=t}return!0},this.measureElement=l=>{if(!l){this.elementsCache.forEach((i,t)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(t))});return}const n=this.indexFromElement(l),e=this.options.getItemKey(n),o=this.elementsCache.get(e);o!==l&&(o&&this.observer.unobserve(o),this.observer.observe(l),this.elementsCache.set(e,l)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(l,void 0,this))},this.resizeItem=(l,n)=>{var e,o;if(l<0||l>=this.options.count)return;let i,t,a;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)a=this.options.getItemKey(l),t=u[l*2],i=u[l*2+1];else{const v=this.measurementsCache[l];if(!v)return;a=v.key,t=v.start,i=v.size}const d=this.itemSizeCache.get(a)??i,f=n-d;if(f!==0){const v=this.options.anchorTo==="end"&&((e=this.scrollState)==null?void 0:e.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,S=v?this.getTotalSize():0,g=((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[l]??{index:l,key:a,start:t,size:i,end:t+i,lane:0},f,this):t<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(a)||this.scrollDirection!=="backward"));(this.pendingMin===null||l<this.pendingMin)&&(this.pendingMin=l),this.itemSizeCache.set(a,n),this.itemSizeCacheVersion++,v?this.applyScrollAdjustment(this.getTotalSize()-S):g&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=q(()=>
1[this.getVirtualIndexes(),this.getMeasurements()],(l,n)=>{const e=[];for(let o=0,i=l.length;o<i;o++){const t=l[o],a=n[t];e.push(a)}return e},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=l=>{const n=this.getMeasurements();if(n.length===0)return;const e=this._flatMeasurements,o=this.options.lanes===1&&e!=null,i=Ie(0,n.length-1,o?t=>e[t*2]:t=>ge(n[t]).start,l);return ge(n[i])},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 l=this.scrollElement.document.documentElement;return this.options.horizontal?l.scrollWidth-this.scrollElement.innerWidth:l.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(l=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=l,this.getOffsetForAlignment=(l,n,e=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),i=this.getScrollOffset();n==="auto"&&(n=l>=i+o?"end":"start"),n==="center"?l+=(e-o)/2:n==="end"&&(l-=o);const t=this.getMaxScrollOffset();
1return Math.max(Math.min(t,l),0)},this.getOffsetForIndex=(l,n="auto")=>{l=Math.max(0,Math.min(l,this.options.count-1));const e=this.getSize(),o=this.getScrollOffset(),i=this.measurementsCache[l];if(!i)return;if(n==="auto")if(i.end>=o+e-this.options.scrollPaddingEnd)n="end";else if(i.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&l===this.options.count-1)return[this.getMaxScrollOffset(),n];const t=n==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(t,n,i.size),n]},this.scrollToOffset=(l,{align:n="start",behavior:e="auto"}={})=>{const o=this.getOffsetForAlignment(l,n),i=this.now();this.scrollState={index:null,align:n,behavior:e,startedAt:i,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollToIndex=(l,{align:n="auto",behavior:e="auto"}={})=>{l=Math.max(0,Math.min(l,this.options.count-1));const o=this.getOffsetForIndex(l,n);if(!o)return;const[i,t]=o,a=this.now();this.scrollState={index:l,align:t,behavior:e,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollBy=(l,{behavior:n="auto"}={})=>{const e=this.getScrollOffset()+l,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:e,stableFrames:0},this._scrollToOffset(e,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:l="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:l});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:l})},this.getTotalSize=()=>{var l;const n=this.getMeasurements();let e;if(n.length===0)e=this.options.paddingStart;else if(this.options.lanes===1){const o=n.length-1,i=this._flatMeasurements;i!=null?e=i[o*2]+i[o*2+1]:e=((l=n[o])==null?void 0:l.end)??0}else{const o=Array(this.options.lanes).fill(null);let i=n.length-1;for(;i>=0&&o.some(t=>t===null);){const t=n[i];o[t.lane]===null&&(o[t.lane]=t.end),i--}e=Math.max(...o.filter(t=>t!==null))}return Math.max(e-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const l=[];if(this.itemSizeCache.size===0)return l;const n=this.getMeasurements();for(const e of n)e&&this.itemSizeCache.has(e.key)&&l.push({index:e.index,key:e.key,start:e.start,size:e.size,end:e.end,lane:e.lane});return l},this._scrollToOffset=(l,{adjustments:n,behavior:e})=>{this._intendedScrollOffset=l+(n??0),this.options.scrollToFn(l,{behavior:e,adjustments:n},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(r)}applyScrollAdjustment(r,l){r!==0&&(re()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=r:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:l}))}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 n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,e=n?n[0]:this.scrollState.lastTargetOffset,o=1,i=e!==this.scrollState.lastTargetOffset;if(!i&&Ye(e,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.getScrollOffset()!==e&&this._scrollToOffset(e,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,i){const t=this.getSize()||600,a=Math.abs(e-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&a>t;this.scrollState.lastTargetOffset=e,u||(this.scrollState.behavior="auto"),this._scrollToOffset(e,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const Ie=(s,r,l,n)=>{for(;s<=r;){const e=(s+r)/2|0,o=l(e);if(o<n)s=e+1;else if(o>n)r=e-1;else return e}return s>0?s-1:0};function dt({measurements:s,outerSize:r,scrollOffset:l,lanes:n,flat:e}){const o=s.length-1,i=e?d=>e[d*2]:d=>s[d].start,t=e?d=>e[d*2]+e[d*2+1]:d=>s[d].end;if(s.length<=n)return{startIndex:0,endIndex:o};let a=Ie(0,o,i,l),u=a;if(n===1)for(;u<o&&t(u)<l+r;)u++;else if(n>1){const d=Array(n).fill(0);for(;u<o&&d.some(v=>v<l+r);){const v=s[u];d[v.lane]=v.end,u++}const f=Array(n).fill(l+r);for(;a>=0&&f.some(v=>v>=l);){const v=s[a];f[v.lane]=v.start,a--}a=Math.max(0,a-a%n),u=Math.min(o,u+(n-1-u%n))}return{startIndex:a,endIndex:u}}function ct(s){const r=new ut(W(s)),l=_e(r),n=r._didMount();return N(()=>W(s).getScrollElement(),e=>{e&&r._willUpdate()},{immediate:!0}),N(()=>W(s),e=>{r.setOptions({...e,onChange:(o,i)=>{var t;
1he(l),(t=e.onChange)==null||t.call(e,o,i)}}),r._willUpdate(),he(l)},{immediate:!0}),Te(n),l}function ht(s){return ct(C(()=>({observeElementRect:lt,observeElementOffset:ot,scrollToFn:rt,...W(s)})))}function ft(){let s=ue();return xe(()=>s.dispose()),s}function vt(){let s=ft();return r=>{s.dispose(),s.nextFrame(r)}}var Ce=(s=>(s[s.Left=0]="Left",s[s.Right=2]="Right",s))(Ce||{}),pt={};function mt(s,r){return s===r}var gt=(s=>(s[s.Open=0]="Open",s[s.Closed=1]="Closed",s))(gt||{}),bt=(s=>(s[s.Single=0]="Single",s[s.Multi=1]="Multi",s))(bt||{}),xt=(s=>(s[s.Pointer=0]="Pointer",s[s.Focus=1]="Focus",s[s.Other=2]="Other",s))(xt||{});let Ee=Symbol("ComboboxContext");function X(s){let r=Oe(Ee,null);if(r===null){let l=new Error(`<${s} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,X),l}return r}let we=Symbol("VirtualContext"),St=K({name:"VirtualProvider",setup(s,{slots:r}){let l=X("VirtualProvider"),n=C(()=>{let t=M(l.optionsRef);if(!t)return{start:0,end:0};let a=window.getComputedStyle(t);return{start:parseFloat(a.paddingBlockStart||a.paddingTop),end:parseFloat(a.paddingBlockEnd||a.paddingBottom)}}),e=ht(C(()=>({scrollPaddingStart:n.value.start,scrollPaddingEnd:n.value.end,count:l.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return M(l.optionsRef)},overscan:12}))),o=C(()=>{var t;return(t=l.virtual.value)==null?void 0:t.options}),i=k(0);return N([o],()=>{i.value+=1}),ye(we,l.virtual.value?e:null),()=>[te("div",{style:{position:"relative",width:"100%",height:`${e.value.getTotalSize()}px`},ref:t=>{if(t){if(typeof process<"u"&&pt.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=>We(r.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"}})))]}}),Ot=K({name:"Combobox",emits:{"update:modelValue":s=>!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(s,{slots:r,attrs:l,emit:n}){let e=k(1),o=k(null),i=k(null),t=k(null),a=k(null),u=k({static:!1,hold:!1}),d=k([]),f=k(null),v=k(2),S=k(!1);function g(c=m=>m){let m=f.value!==null?d.value[f.value]:null,O=c(d.value.slice()),y=O.length>0&&O[0].dataRef.order.value!==null?O.sort((z,P)=>z.dataRef.order.value-P.dataRef.order.value):je(O,z=>M(z.dataRef.domRef)),A=m?y.indexOf(m):null;return A===-1&&(A=null),{options:y,activeOptionIndex:A}}let E=C(()=>s.multiple?1:0),R=C(()=>s.nullable),[T,b]=Me(C(()=>s.modelValue),c=>n("update:modelValue",c),C(()=>s.defaultValue)),x=C(()=>T.value===void 0?J(E.value,{1:[],0:void 0}):T.value),F=null,p=null;function w(c){return J(E.value,{0(){return b?.(c)},1:()=>{let m=L(h.value.value).slice(),O=L(c),y=m.findIndex(A=>h.compare(O,L(A)));return y===-1?m.push(O):m.splice(y,1),b?.(m)}})}let I=C(()=>{});N([I],([c],[m])=>{if(h.virtual.value&&c&&m&&f.value!==null){let O=c.indexOf(m[f.value]);O!==-1?f.value=O:f.value=null}});let h={comboboxState:e,value:x,mode:E,compare(c,m){if(typeof s.by=="string"){let O=s.by;return c?.[O]===m?.[O]}return s.by===null?mt(c,m):s.by(c,m)},calculateIndex(c){return h.virtual.value?s.by===null?h.virtual.value.options.indexOf(c):h.virtual.value.options.findIndex(m=>h.compare(m,c)):d.value.findIndex(m=>h.compare(m.dataRef.value,c))},defaultValue:C(()=>s.defaultValue),nullable:R,immediate:C(()=>!1),virtual:C(()=>null),inputRef:i,labelRef:o,buttonRef:t,optionsRef:a,disabled:C(()=>s.disabled),options:d,change(c){b(c)},activeOptionIndex:C(()=>
1{if(S.value&&f.value===null&&(h.virtual.value?h.virtual.value.options.length>0:d.value.length>0)){if(h.virtual.value){let m=h.virtual.value.options.findIndex(O=>{var y;return!((y=h.virtual.value)!=null&&y.disabled(O))});if(m!==-1)return m}let c=d.value.findIndex(m=>!m.dataRef.disabled);if(c!==-1)return c}return f.value}),activationTrigger:v,optionsPropsRef:u,closeCombobox(){S.value=!1,!s.disabled&&e.value!==1&&(e.value=1,f.value=null)},openCombobox(){if(S.value=!0,!s.disabled&&e.value!==0){if(h.value.value){let c=h.calculateIndex(h.value.value);c!==-1&&(f.value=c)}e.value=0}},setActivationTrigger(c){v.value=c},goToOption(c,m,O){S.value=!1,F!==null&&cancelAnimationFrame(F),F=requestAnimationFrame(()=>{if(s.disabled||a.value&&!u.value.static&&e.value===1)return;if(h.virtual.value){f.value=c===V.Specific?m:me({focus:c},{resolveItems:()=>h.virtual.value.options,resolveActiveIndex:()=>{var z,P;return(P=(z=h.activeOptionIndex.value)!=null?z:h.virtual.value.options.findIndex(H=>{var Z;return!((Z=h.virtual.value)!=null&&Z.disabled(H))}))!=null?P:null},resolveDisabled:z=>h.virtual.value.disabled(z),resolveId(){throw new Error("Function not implemented.")}}),v.value=O??2;return}let y=g();if(y.activeOptionIndex===null){let z=y.options.findIndex(P=>!P.dataRef.disabled);z!==-1&&(y.activeOptionIndex=z)}let A=c===V.Specific?m:me({focus:c},{resolveItems:()=>y.options,resolveActiveIndex:()=>y.activeOptionIndex,resolveId:z=>z.id,resolveDisabled:z=>z.dataRef.disabled});f.value=A,v.value=O??2,d.value=y.options})},selectOption(c){let m=d.value.find(y=>y.id===c);if(!m)return;let{dataRef:O}=m;w(O.value)},selectActiveOption(){if(h.activeOptionIndex.value!==null){if(h.virtual.value)w(h.virtual.value.options[h.activeOptionIndex.value]);else{let{dataRef:c}=d.value[h.activeOptionIndex.value];w(c.value)}h.goToOption(V.Specific,h.activeOptionIndex.value)}},registerOption(c,m){let O=Be({id:c,dataRef:m});if(h.virtual.value){d.value.push(O);return}p&&cancelAnimationFrame(p);let y=g(A=>(A.push(O),A));f.value===null&&h.isSelected(m.value.value)&&(y.activeOptionIndex=y.options.indexOf(O)),d.value=y.options,f.value=y.activeOptionIndex,v.value=2,y.options.some(A=>!M(A.dataRef.domRef))&&(p=requestAnimationFrame(()=>{let A=g();d.value=A.options,f.value=A.activeOptionIndex}))},unregisterOption(c,m){if(F!==null&&cancelAnimationFrame(F),m&&(S.value=!0),h.virtual.value){d.value=d.value.filter(y=>y.id!==c);return}let O=g(y=>{let A=y.findIndex(z=>z.id===c);return A!==-1&&y.splice(A,1),y});d.value=O.options,f.value=O.activeOptionIndex,v.value=2},isSelected(c){return J(E.value,{0:()=>h.compare(L(h.value.value),L(c)),1:()=>L(h.value.value).some(m=>h.compare(L(m),L(c)))})},isActive(c){return f.value===h.calculateIndex(c)}};Ae([i,t,a],()=>h.closeCombobox(),C(()=>e.value===0)),ye(Ee,h),Ne(C(()=>J(e.value,{0:ne.Open,1:ne.Closed})));let _=C(()=>{var c;return(c=M(i))==null?void 0:c.closest("form")});return de(()=>{N([_],()=>{if(!_.value||s.defaultValue===void 0)return;function c(){h.change(s.defaultValue)}return _.value.addEventListener("reset",c),()=>{var m;(m=_.value)==null||m.removeEventListener("reset",c)}},{immediate:!0})}),()=>{var c,m,O;let{name:y,disabled:A,form:z,...P}=s,H={open:e.value===0,disabled:A,activeIndex:h.activeOptionIndex.value,activeOption:h.activeOptionIndex.value===null?null:h.virtual.value?h.virtual.value.options[(c=h.activeOptionIndex.value)!=null?c:0]:(O=(m=h.options.value[h.activeOptionIndex.value])==null?void 0:m.dataRef.value)!=null?O:null,value:x.value};return te(Se,[...y!=null&&x.value!=null?ze({[y]:x.value}).map(([Z,Re])=>te(Fe,Ve({features:ke.Hidden,key:Z,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:z,disabled:A,name:Z,value:Re}))):[],ee({theirProps:{...l,...ce(P,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:H,slots:r,attrs:l,name:"Combobox"})])}}}),yt=K({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(s,{attrs:r,slots:l,expose:n}){var e;let o=(e=s.id)!=null?e:`headlessui-combobox-button-${ie()}`,i=X("ComboboxButton");n({el:i.buttonRef,$el:i.buttonRef});
1function t(d){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(d.preventDefault(),i.openCombobox()),$(()=>{var f;return(f=M(i.inputRef))==null?void 0:f.focus({preventScroll:!0})}))}function a(d){switch(d.key){case D.ArrowDown:d.preventDefault(),d.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),$(()=>{var f;return(f=i.inputRef.value)==null?void 0:f.focus({preventScroll:!0})});return;case D.ArrowUp:d.preventDefault(),d.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),$(()=>{i.value.value||i.goToOption(V.Last)})),$(()=>{var f;return(f=i.inputRef.value)==null?void 0:f.focus({preventScroll:!0})});return;case D.Escape:if(i.comboboxState.value!==0)return;d.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&d.stopPropagation(),i.closeCombobox(),$(()=>{var f;return(f=i.inputRef.value)==null?void 0:f.focus({preventScroll:!0})});return}}let u=Pe(C(()=>({as:s.as,type:r.type})),i.buttonRef);return()=>{var d,f;let v={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...S}=s,g={ref:i.buttonRef,id:o,type:u.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(d=M(i.optionsRef))==null?void 0:d.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(f=M(i.labelRef))==null?void 0:f.id,o].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:a,onClick:t};return ee({ourProps:g,theirProps:S,slot:v,attrs:r,slots:l,name:"ComboboxButton"})}}}),It=K({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:s=>!0},setup(s,{emit:r,attrs:l,slots:n,expose:e}){var o;let i=(o=s.id)!=null?o:`headlessui-combobox-input-${ie()}`,t=X("ComboboxInput"),a=C(()=>De(M(t.inputRef))),u={value:!1};e({el:t.inputRef,$el:t.inputRef});function d(){t.change(null);let p=M(t.optionsRef);p&&(p.scrollTop=0),t.goToOption(V.Nothing)}let f=C(()=>{var p;let w=t.value.value;return M(t.inputRef)?typeof s.displayValue<"u"&&w!==void 0?(p=s.displayValue(w))!=null?p:"":typeof w=="string"?w:"":""});de(()=>{N([f,t.comboboxState,a],([p,w],[I,h])=>{if(u.value)return;let _=M(t.inputRef);_&&((h===0&&w===1||p!==I)&&(_.value=p),requestAnimationFrame(()=>{var c;if(u.value||!_||((c=a.value)==null?void 0:c.activeElement)!==_)return;let{selectionStart:m,selectionEnd:O}=_;Math.abs((O??0)-(m??0))===0&&m===0&&_.setSelectionRange(_.value.length,_.value.length)}))},{immediate:!0}),N([t.comboboxState],([p],[w])=>{if(p===0&&w===1){if(u.value)return;let I=M(t.inputRef);if(!I)return;let h=I.value,{selectionStart:_,selectionEnd:c,selectionDirection:m}=I;I.value="",I.value=h,m!==null?I.setSelectionRange(_,c,m):I.setSelectionRange(_,c)}})});let v=k(!1);function S(){v.value=!0}function g(){ue().nextFrame(()=>{v.value=!1})}let E=vt();function R(p){switch(u.value=!0,E(()=>{u.value=!1}),p.key){case D.Enter:if(u.value=!1,t.comboboxState.value!==0||v.value)return;if(p.preventDefault(),p.stopPropagation(),t.activeOptionIndex.value===null){t.closeCombobox();return}t.selectActiveOption(),t.mode.value===0&&t.closeCombobox();break;case D.ArrowDown:return u.value=!1,p.preventDefault(),p.stopPropagation(),J(t.comboboxState.value,{0:()=>t.goToOption(V.Next),1:()=>t.openCombobox()});case D.ArrowUp:return u.value=!1,p.preventDefault(),p.stopPropagation(),J(t.comboboxState.value,{0:()=>t.goToOption(V.Previous),1:()=>{t.openCombobox(),$(()=>{t.value.value||t.goToOption(V.Last)})}});case D.Home:if(p.shiftKey)break;return u.value=!1,p.preventDefault(),p.stopPropagation(),t.goToOption(V.First);case D.PageUp:return u.value=!1,p.preventDefault(),p.stopPropagation(),t.goToOption(V.First);case D.End:if(p.shiftKey)break;return u.value=!1,p.preventDefault(),p.stopPropagation(),t.goToOption(V.Last);case D.PageDown:return u.value=!1,p.preventDefault(),p.stopPropagation(),t.goToOption(V.Last);case D.Escape:if(u.value=!1,t.comboboxState.value!==0)return;p.preventDefault(),t.optionsRef.value&&!t.optionsPropsRef.value.static&&p.stopPropagation(),t.nullable.value&&t.mode.value===0&&t.value.value===null&&d(),t.closeCombobox();break;case D.Tab:if(u.value=!1,t.comboboxState.value!==0)return;t.mode.value===0&&t.activationTrigger.value!==1&&t.selectActiveOption(),t.closeCombobox();break}}function T(p){r("change",p),t.nullable.value&&t.mode.value===0&&p.target.value===""&&d(),t.openCombobox()}function b(p){var w,I,h;let _=(w=p.relatedTarget)!=null?w:fe.find(c=>c!==p.currentTarget);if(u.value=!1,!((I=M(t.optionsRef))!=null&&I.contains(_))&&!((h=M(t.buttonRef))!=null&&h.contains(_))&&t.comboboxState.value===0)return p.preventDefault(),t.mode.value===0&&(t.nullable.value&&t.value.value===null?d():t.activationTrigger.value!==1&&t.selectActiveOption()),t.closeCombobox()}function x(p){var w,I,h;let _=(w=p.relatedTarget)!=null?w:fe.find(c=>c!==p.currentTarget);(I=M(t.buttonRef))!=null&&I.contains(_)||(h=M(t.optionsRef))!=null&&h.contains(_)||t.disabled.value||t.immediate.value&&t.comboboxState.value!==0&&(t.openCombobox(),ue().nextFrame(()=>{t.setActivationTrigger(1)}))}let F=C(()=>{var p,w,I,h;
1return(h=(I=(w=s.defaultValue)!=null?w:t.defaultValue.value!==void 0?(p=s.displayValue)==null?void 0:p.call(s,t.defaultValue.value):null)!=null?I:t.defaultValue.value)!=null?h:""});return()=>{var p,w,I,h,_,c,m;let O={open:t.comboboxState.value===0},{displayValue:y,onChange:A,...z}=s,P={"aria-controls":(p=t.optionsRef.value)==null?void 0:p.id,"aria-expanded":t.comboboxState.value===0,"aria-activedescendant":t.activeOptionIndex.value===null?void 0:t.virtual.value?(w=t.options.value.find(H=>!t.virtual.value.disabled(H.dataRef.value)&&t.compare(H.dataRef.value,t.virtual.value.options[t.activeOptionIndex.value])))==null?void 0:w.id:(I=t.options.value[t.activeOptionIndex.value])==null?void 0:I.id,"aria-labelledby":(c=(h=M(t.labelRef))==null?void 0:h.id)!=null?c:(_=M(t.buttonRef))==null?void 0:_.id,"aria-autocomplete":"list",id:i,onCompositionstart:S,onCompositionend:g,onKeydown:R,onInput:T,onFocus:x,onBlur:b,role:"combobox",type:(m=l.type)!=null?m:"text",tabIndex:0,ref:t.inputRef,defaultValue:F.value,disabled:t.disabled.value===!0?!0:void 0};return ee({ourProps:P,theirProps:z,slot:O,attrs:l,slots:n,features:le.RenderStrategy|le.Static,name:"ComboboxInput"})}}}),Ct=K({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(s,{attrs:r,slots:l,expose:n}
1){let e=X("ComboboxOptions"),o=`headlessui-combobox-options-${ie()}`;n({el:e.optionsRef,$el:e.optionsRef}),se(()=>{e.optionsPropsRef.value.static=s.static}),se(()=>{e.optionsPropsRef.value.hold=s.hold});let i=Le(),t=C(()=>i!==null?(i.value&ne.Open)===ne.Open:e.comboboxState.value===0);Ze({container:C(()=>M(e.optionsRef)),enabled:C(()=>e.comboboxState.value===0),accept(u){return u.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:u.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(u){u.setAttribute("role","none")}});function a(u){u.preventDefault()}return()=>{var u,d,f;let v={open:e.comboboxState.value===0},S={"aria-labelledby":(f=(u=M(e.labelRef))==null?void 0:u.id)!=null?f:(d=M(e.buttonRef))==null?void 0:d.id,id:o,ref:e.optionsRef,role:"listbox","aria-multiselectable":e.mode.value===1?!0:void 0,onMousedown:a},g=ce(s,["hold"]);return ee({ourProps:S,theirProps:g,slot:v,attrs:r,slots:e.virtual.value&&e.comboboxState.value===0?{...l,default:()=>[te(St,{},l.default)]}:l,features:le.RenderStrategy|le.Static,visible:t.value,name:"ComboboxOptions"})}}}),Et=K({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(s,{slots:r,attrs:l,expose:n}
1){let e=X("ComboboxOption"),o=`headlessui-combobox-option-${ie()}`,i=k(null),t=C(()=>s.disabled);n({el:i,$el:i});let a=C(()=>{var b;return e.virtual.value?e.activeOptionIndex.value===e.calculateIndex(s.value):e.activeOptionIndex.value===null?!1:((b=e.options.value[e.activeOptionIndex.value])==null?void 0:b.id)===o}),u=C(()=>e.isSelected(s.value)),d=Oe(we,null),f=C(()=>({disabled:s.disabled,value:s.value,domRef:i,order:C(()=>s.order)}));de(()=>e.registerOption(o,f)),xe(()=>e.unregisterOption(o,a.value)),se(()=>{let b=M(i);b&&d?.value.measureElement(b)}),se(()=>{e.comboboxState.value===0&&a.value&&(e.virtual.value||e.activationTrigger.value!==0&&$(()=>{var b,x;return(x=(b=M(i))==null?void 0:b.scrollIntoView)==null?void 0:x.call(b,{block:"nearest"})}))});function v(b){b.preventDefault(),b.button===Ce.Left&&(t.value||(e.selectOption(o),$e()||requestAnimationFrame(()=>{var x;return(x=M(e.inputRef))==null?void 0:x.focus({preventScroll:!0})}),e.mode.value===0&&e.closeCombobox()))}function S(){var b;if(s.disabled||(b=e.virtual.value)!=null&&b.disabled(s.value))return e.goToOption(V.Nothing);let x=e.calculateIndex(s.value);e.goToOption(V.Specific,x)}let g=Xe();function E(b){g.update(b)}function R(b){var x;if(!g.wasMoved(b)||s.disabled||(x=e.virtual.value)!=null&&x.disabled(s.value)||a.value)return;let F=e.calculateIndex(s.value);e.goToOption(V.Specific,F,0)}function T(b){var x;g.wasMoved(b)&&(s.disabled||(x=e.virtual.value)!=null&&x.disabled(s.value)||a.value&&(e.optionsPropsRef.value.hold||e.goToOption(V.Nothing)))}return()=>{let{disabled:b}=s,x={active:a.value,selected:u.value,disabled:b},F={id:o,ref:i,role:"option",tabIndex:b===!0?void 0:-1,"aria-disabled":b===!0?!0:void 0,"aria-selected":u.value,disabled:void 0,onMousedown:v,onFocus:S,onPointerenter:E,onMouseenter:E,onPointermove:R,onMousemove:R,onPointerleave:T,onMouseleave:T},p=ce(s,["order","value"]);return ee({ourProps:F,theirProps:p,slot:x,attrs:l,slots:r,name:"ComboboxOption"})}}});function wt(s,r){return B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[j("path",{"fill-rule":"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z","clip-rule":"evenodd"})])}function Rt(s,r){return B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[j("path",{"fill-rule":"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z","clip-rule":"evenodd"})])}const Tt={class:"relative mt-1"},_t={class:"relative w-full cursor-default overflow-hidden rounded-lg bg-white text-left shadow-md focus:outline-hidden focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2 focus-visible:ring-offset-secondary-300 sm:text-sm"},Mt={class:"absolute inset-y-0 right-0 flex items-center pr-2"},At={key:0,class:"relative cursor-default px-4 py-2 text-gray-700 select-none"},zt=K({__name:"FilterSelect",props:Je({options:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const r=s,l=Ke(s,"modelValue"),n=C(()=>e.value===""?r.options:r.options.filter(o=>o.name.toLowerCase().replace(/\s+/g,"").includes(e.value.toLowerCase().replace(/\s+/g,"")))),e=k("");return(o,i)=>{const t=It,a=yt,u=Et,d=Ct,f=He("TransitionRoot"),v=Ot;return B(),ve(v,{modelValue:l.value,"onUpdate:modelValue":i[2]||(i[2]=S=>l.value=S)},{default:G(()=>[j("div",Tt,[j("div",_t,[U(a,null,{default:G(()=>[U(t,{class:"w-full border-none py-2 pr-10 pl-3 text-base/5 text-gray-900 focus:ring-0 sm:text-sm","display-value":S=>S.name,onChange:i[0]||(i[0]=S=>e.value=S.target.value)},null,8,["display-value"]),j("div",Mt,[U(W(Rt),{class:"size-5 text-gray-400","aria-hidden":"true"})])]),_:1})]),U(f,{leave:"transition ease-in duration-100","leave-from":"opacity-100","leave-to":"opacity-0",onAfterLeave:i[1]||(i[1]=S=>e.value="")},{default:G(()=>[U(d,{class:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-hidden sm:text-sm"},{default:G(()=>[s.options.length===0&&e.value!==""?(B(),Q("div",At," Nothing found. ")):pe("",!0),(B(!0),Q(Se,null,Ue(W(n),S=>(B(),ve(u,{key:S.value,as:"template",value:S},{default:G(({selected:g,active:E})=>[j("li",{class:ae(["relative cursor-pointer py-2 pr-4 pl-10 select-none",{"bg-secondary-500 text-white":E,"text-gray-900":!E}])},[j("span",{class:ae(["block truncate",{"font-medium":g,"font-normal":!g}])},qe(S.name),3),g?(B(),Q("span",{key:0,class:ae(["absolute inset-y-0 left-0 flex items-center pl-3",{"text-white":E,"text-secondary-600":!E}])},[U(W(wt),{class:"size-5","aria-hidden":"true"})],2)):pe("",!0)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"])}}}),Dt=Object.assign(zt,{__name:"FilterSelect"});export{Dt as _};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.