PageSourceSearch

https://pdfassistant-develop.netlify.app/_nuxt/BTj4_fH-.js

js pdfassistant-develop.netlify.app collected 2026-10-03 11:15:12 UTC 55,913 bytes, 4 lines download raw bytes

vendor: 4,223 bytes, lines 1-4
1import{q as g,B as Se,b6 as gt,M as X,bI as Fe,bJ as yt,bK as we,aa as Ae,E as F,b8 as ce,bu as Ke,d as J,bd as ue,bf as I,a6 as ve,be as ee,aI as Ee,bL as xe,bg as Qe,bh as ae,bi as Ge,bM as Je,bn as U,bj as Ye,bm as Xe,ah as fe,bN as Ze,bx as _e,bO as et,F as Te,ad as Ot,aU as L,bo as tt,a0 as Ve,by as lt,a9 as H,bp as D,bq as pe,bP as ke,bQ as St,b2 as xt,bk as It,bl as Ct,_ as Rt,Q as wt,e as te,o as N,w as se,c as Q,f as _,n as z,aD as me,b as le,A as ne,m as Ce,a as Oe,h as nt,t as re,aQ as Mt,r as At,g as at,bF as Et,i as ze,y as ot,u as $e,p as Re,a5 as Tt,aF as Vt,a4 as Dt,bR as Ft,aV as Pe,v as kt,s as he,z as ie,bS as zt,aT as Le,bT as $t,bU as Pt,U as Lt,V as Bt}from"#entry";import{u as Nt}from"./DTfIF7G2.js";function de(e,s,n){let o=n.initialDeps??[],l;function i(){var t,a,f,c;let u;n.key&&((t=n.debug)!=null&&t.call(n))&&(u=Date.now());const r=e();if(!(r.length!==o.length||r.some((w,M)=>o[M]!==w)))return l;o=r;let R;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(R=Date.now()),l=s(...r),n.key&&((f=n.debug)!=null&&f.call(n))){const w=Math.round((Date.now()-u)*100)/100,M=Math.round((Date.now()-R)*100)/100,B=M/16,$=(y,v)=>{for(y=String(y);y.length<v;)y=" "+y;return y};console.info(`%c⏱ ${$(M,5)} /${$(w,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%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,l),l}return i.updateDeps=t=>{o=t},i}function Be(e,s){if(e===void 0)throw new Error("Unexpected undefined");return e}const jt=(e,s)=>Math.abs(e-s)<1.01,qt=(e,s,n)=>{let o;return function(...l){e.clearTimeout(o),o=e.setTimeout(()=>s.apply(this,l),n)}},Ne=e=>{const{offsetWidth:s,offsetHeight:n}=e;return{width:s,height:n}},Wt=e=>e,Ht=e=>{const s=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let l=s;l<=n;l++)o.push(l);return o},Ut=(e,s)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const l=t=>{const{width:a,height:f}=t;s({width:Math.round(a),height:Math.round(f)})};if(l(Ne(n)),!o.ResizeObserver)return()=>{};const i=new o.ResizeObserver(t=>{const a=()=>{const f=t[0];if(f?.borderBoxSize){const c=f.borderBoxSize[0];if(c){l({width:c.inlineSize,height:c.blockSize});return}}l(Ne(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},je={passive:!0},qe=typeof window>"u"?!0:"onscrollend"in window,Kt=(e,s)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let l=0;const i=e.options.useScrollendEvent&&qe?()=>{}:qt(o,()=>{s(l,!1)},e.options.isScrollingResetDelay),t=u=>()=>{const{horizontal:r,isRtl:m}=e.options;l=r?n.scrollLeft*(m&&-1||1):n.scrollTop,i(),s(l,u)},a=t(!0),f=t(!1);f(),n.addEventListener("scroll",a,je);const c=e.options.useScrollendEvent&&qe;return c&&n.addEventListener("scrollend",f,je),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",f)}},Qt=(e,s,n)=>{if(s?.borderBoxSize){const o=s.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Gt=(e,{adjustments:s=0,behavior:n},o)=>{var l,i;const t=e+s;(i=(l=o.scrollElement)==null?void 0:l.scrollTo)==null||i.call(l,{[o.options.horizontal?"left":"top"]:t,behavior:n})};class Jt{constructor(s){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 n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(l=>{l.forEach(i=>{const t=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var l;(l=o())==null||l.disconnect(),n=null},observe:l=>{var i;return(i=o())==null?void 0:i.observe(l,{box:"border-box"})},unobserve:l=>{var i;return(i=o())==null?void 0:i.unobserve(l)}}})(),this.range=null,this.setOptions=n=>
vendor: 5,747 bytes, line 4
4{Object.entries(n).forEach(([o,l])=>{typeof l>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Wt,rangeExtractor:Ht,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,...n}},this.notify=n=>{var o,l;(l=(o=this.options).onChange)==null||l.call(o,this,n)},this.maybeNotify=de(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{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(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;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=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=i,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=(n,o)=>{const l=new Map,i=new Map;for(let t=o-1;t>=0;t--){const a=n[t];if(l.has(a.lane))continue;const f=i.get(a.lane);if(f==null||a.end>f.end?i.set(a.lane,a):a.end<f.end&&l.set(a.lane,!0),l.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((t,a)=>t.end===a.end?t.index-a.index:t.end-a.end)[0]:void 0},this.getMeasurementOptions=de(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,l,i,t)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:l,getItemKey:i,enabled:t}),{key:!1}),this.getMeasurements=de(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:l,getItemKey:i,enabled:t},a)=>{if(!t)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const f=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,f);for(let u=f;u<n;u++){const r=i(u),m=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),R=m?m.end+this.options.gap:o+l,w=a.get(r),M=typeof w=="number"?w:this.options.estimateSize(u),B=R+M,$=m?m.lane:u%this.options.lanes;c[u]={index:u,start:R,size:M,end:B,key:r,lane:$}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=de(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,o,l,i)=>this.range=n.length>0&&o>0?Yt({measurements:n,outerSize:o,scrollOffset:l,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=de(()=>{let n=null,o=null;const l=this.calculateRange();return l&&(n=l.startIndex,o=l.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,l,i,t)=>i===null||t===null?[]:n({startIndex:i,endIndex:t,overscan:o,count:l}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,l=n.getAttribute(o);return l?parseInt(l,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const l=this.indexFromElement(n),i=this.measurementsCache[l];if(!i)return;const t=i.key,a=this.elementsCache.get(t);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(t,n)),n.isConnected&&this.resizeItem(l,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const l=this.measurementsCache[n];if(!l)return;const i=this.itemSizeCache.get(l.key)??l.size,t=o-i;t!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(l,t,this):l.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(l.index),this.itemSizeCache=new Map(this.itemSizeCache.set(l.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,l)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(l))});return}this._measureElement(n,void 0)},this.getVirtualItems=de(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const l=[];for(let i=0,t=n.length;i<t;i++){const a=n[i],f=o[a];l.push(f)}return l},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return Be(o[it(0,o.length-1,l=>Be(o[l]).start,n)])},this.getOffsetForAlignment=(n,o,l=0)=>{const i=this.getSize(),t=this.getScrollOffset();o==="auto"&&(o=n>=t+i?"end":"start"),o==="center"?n+=(l-i)/2:o==="end"&&(n-=i);const a=this.getTotalSize()+this.options.scrollMargin-i;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const l=this.measurementsCache[n];if(!l)return;const i=this.getSize(),t=this.getScrollOffset();if(o==="auto")if(l.end>=t+i-this.options.scrollPaddingEnd)o="end";else if(l.start<=t+this.options.scrollPaddingStart)o="start";else return[t,o];const a=o==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,l.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:o="start",behavior:l}={})=>{l==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:l})},this.scrollToIndex=(n,{align:o="auto",behavior:l}={})=>{l==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let i=0;const t=10,a=c=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(n,c);if(!u){console.warn("Failed to get offset for index:",n);return}const[r,m]=u;this._scrollToOffset(r,{adjustments:void 0,behavior:l}),this.targetWindow.requestAnimationFrame(()=>{const R=this.getScrollOffset(),w=this.getOffsetForIndex(n,m);if(!w){console.warn("Failed to get offset for index:",n);return}jt(w[0],R)||f(m)})},f=c=>{this.targetWindow&&(i++,i<t?this.targetWindow.requestAnimationFrame(()=>a(c)):console.warn(`Failed to scroll to index ${n} after ${t} attempts.`))};a(o)},this.scrollBy=(n,{behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let l;if(o.length===0)l=this.options.paddingStart;else if(this.options.lanes===1)l=((n=o[o.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let t=o.length-1;for(;t>=0&&i.some(a=>a===null);){const a=o[t];i[a.lane]===null&&(i[a.lane]=a.end),t--}l=Math.max(...i.filter(a=>a!==null))}return Math.max(l-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:l})=>{this.options.scrollToFn(n,{behavior:l,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(s)}}const it=(e,s,n,o)=>{for(;e<=s;){const l=(e+s)/2|0,i=n(l);if(i<o)e=l+1;else if(i>o)s=l-1;else return l}return e>0?e-1:0};function Yt({measurements:e,outerSize:s,scrollOffset:n,lanes:o}){const l=e.length-1,i=f=>e[f].start;if(e.length<=o)return{startIndex:0,endIndex:l};let t=it(0,l,i,n),a=t;if(o===1)for(;a<l&&e[a].end<n+s;)a++;else if(o>1){const f=Array(o).fill(0);for(;a<l&&f.some(u=>u<n+s);){const u=e[a];f[u.lane]=u.end,a++}const c=Array(o).fill(n+s);for(;t>=0&&c.some(u=>u>=n);){const u=e[t];c[u.lane]=u.start,t--}t=Math.max(0,t-t%o),a=Math.min(l,a+(o-1-a%o))}return{startIndex:t,endIndex:a}}function Xt(e){const s=new Jt(Se(e)),n=gt(s),o=s._didMount();return X(()=>Se(e).getScrollElement(),l=>{l&&s._willUpdate()},{immediate:!0}),X(()=>Se(e),l=>{s.setOptions({...l,onChange:(i,t)=>{var a;Fe(n),(a=l.onChange)==null||a.call(l,i,t)}}),s._willUpdate(),Fe(n)},{immediate:!0}),yt(o),n}function Zt(e){return Xt(g(()=>({observeElementRect:Ut,observeElementOffset:Kt,scrollToFn:Gt,...Se(e)})))}function _t(){let e=we();return Ae(()=>e.dispose()),e}function el(){let e=_t();return s=>{e.dispose(),e.nextFrame(s)}}function We(e){return[e.screenX,e.screenY]}function ut(){let e=F([-1,-1]);return{wasMoved(s){let n=We(s);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(s){e.value=We(s)}}}function tl({container:e,accept:s,walk:n,enabled:o}){ce(()=>{let l=e.value;if(!l||o!==void 0&&!o.value)return;let i=Ke(e);if(!i)return;let t=Object.assign(f=>s(f),{acceptNode:s}),a=i.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,t,!1);for(;a.nextNode();)n(a.currentNode)})}var st=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(st||{});function ll(e){throw new Error("Unexpected object: "+e)}var V=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(V||{});function Me(e,s){let n=s.resolveItems();if(n.length<=0)return null;let o=s.resolveActiveIndex(),l=o??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;
4++i)if(!s.resolveDisabled(n[i],i,n))return i;return o}case 1:{l===-1&&(l=n.length);for(let i=l-1;i>=0;--i)if(!s.resolveDisabled(n[i],i,n))return i;return o}case 2:{for(let i=l+1;i<n.length;++i)if(!s.resolveDisabled(n[i],i,n))return i;return o}case 3:{for(let i=n.length-1;i>=0;--i)if(!s.resolveDisabled(n[i],i,n))return i;return o}case 4:{for(let i=0;i<n.length;++i)if(s.resolveId(n[i],i,n)===e.id)return i;return o}case 5:return null;default:ll(e)}}var nl={};function al(e,s){return e===s}var ol=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ol||{}),il=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(il||{}),ul=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(ul||{});let rt=Symbol("ComboboxContext");function be(e){let s=Ee(rt,null);if(s===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,be),n}return s}let dt=Symbol("VirtualContext"),sl=J({name:"VirtualProvider",setup(e,{slots:s}){let n=be("VirtualProvider"),o=g(()=>{let a=I(n.optionsRef);if(!a)return{start:0,end:0};let f=window.getComputedStyle(a);return{start:parseFloat(f.paddingBlockStart||f.paddingTop),end:parseFloat(f.paddingBlockEnd||f.paddingBottom)}}),l=Zt(g(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return I(n.optionsRef)},overscan:12}))),i=g(()=>{var a;return(a=n.virtual.value)==null?void 0:a.options}),t=F(0);return X([i],()=>{t.value+=1}),Ve(dt,n.virtual.value?l:null),()=>[fe("div",{style:{position:"relative",width:"100%",height:`${l.value.getTotalSize()}px`},ref:a=>{if(a){if(typeof process<"u"&&nl.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&l.value.scrollToIndex(n.activeOptionIndex.value)}}},l.value.getVirtualItems().map(a=>xt(s.default({option:n.virtual.value.options[a.index],open:n.comboboxState.value===0})[0],{key:`${t.value}-${a.index}`,"data-index":a.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":a.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${a.start}px)`,overflowAnchor:"none"}})))]}}),rl=J({name:"Combobox",emits:{"update:modelValue":e=>!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(e,{slots:s,attrs:n,emit:o}){let l=F(1),i=F(null),t=F(null),a=F(null),f=F(null),c=F({static:!1,hold:!1}),u=F([]),r=F(null),m=F(2),R=F(!1);function w(b=O=>O){let O=r.value!==null?u.value[r.value]:null,C=b(u.value.slice()),A=C.length>0&&C[0].dataRef.order.value!==null?C.sort((P,W)=>P.dataRef.order.value-W.dataRef.order.value):tt(C,P=>I(P.dataRef.domRef)),k=O?A.indexOf(O):null;return k===-1&&(k=null),{options:A,activeOptionIndex:k}}let M=g(()=>e.multiple?1:0),B=g(()=>e.nullable),[$,y]=Je(g(()=>e.modelValue),b=>o("update:modelValue",b),g(()=>e.defaultValue)),v=g(()=>$.value===void 0?U(M.value,{1:[],0:void 0}):$.value),h=null,d=null;function S(b){return U(M.value,{0(){return y?.(b)},1:()=>{let O=L(p.value.value).slice(),C=L(b),A=O.findIndex(k=>p.compare(C,L(k)));return A===-1?O.push(C):O.splice(A,1),y?.(O)}})}let x=g(()=>{});X([x],([b],[O])=>{if(p.virtual.value&&b&&O&&r.value!==null){let C=b.indexOf(O[r.value]);C!==-1?r.value=C:r.value=null}});let p={comboboxState:l,value:v,mode:M,compare(b,O){if(typeof e.by=="string"){let C=e.by;return b?.[C]===O?.[C]}return e.by===null?al(b,O):e.by(b,O)},calculateIndex(b){return p.virtual.value?e.by===null?p.virtual.value.options.indexOf(b):p.virtual.value.options.findIndex(O=>p.compare(O,b)):u.value.findIndex(O=>p.compare(O.dataRef.value,b))},defaultValue:g(()=>e.defaultValue),nullable:B,immediate:g(()=>!1),virtual:g(()=>null),inputRef:t,labelRef:i,buttonRef:a,optionsRef:f,disabled:g(()=>e.disabled),options:u,change(b){y(b)},activeOptionIndex:g(()=>{if(R.value&&r.value===null&&(p.virtual.value?p.virtual.value.options.length>0:u.value.length>0)){if(p.virtual.value){let O=p.virtual.value.options.findIndex(C=>{var A;return!((A=p.virtual.value)!=null&&A.disabled(C))});if(O!==-1)return O}let b=u.value.findIndex(O=>!O.dataRef.disabled);if(b!==-1)return b}return r.value}),activationTrigger:m,optionsPropsRef:c,closeCombobox(){R.value=!1,!e.disabled&&l.value!==1&&(l.value=1,r.value=null)},openCombobox(){if(R.value=!0,!e.disabled&&l.value!==0){if(p.value.value){let b=p.calculateIndex(p.value.value);b!==-1&&(r.value=b)}l.value=0}},setActivationTrigger(b){m.value=b},goToOption(b,O,C){R.value=!1,h!==null&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{if(e.disabled||f.value&&!c.value.static&&l.value===1)return;if(p.virtual.value){r.value=b===V.Specific?O:Me({focus:b},{resolveItems:()=>p.virtual.value.options,resolveActiveIndex:()=>{var P,W;return(W=(P=p.activeOptionIndex.value)!=null?P:p.virtual.value.options.findIndex(G=>{var oe;return!((oe=p.virtual.value)!=null&&oe.disabled(G))}))!=null?W:null},resolveDisabled:P=>p.virtual.value.disabled(P),resolveId(){throw new Error("Function not implemented.")}}),m.value=C??2;return}let A=w();if(A.activeOptionIndex===null){let P=A.options.findIndex(W=>!W.dataRef.disabled);P!==-1&&(A.activeOptionIndex=P)}let k=b===V.Specific?O:Me({focus:b},{resolveItems:()=>A.options,resolveActiveIndex:()=>A.activeOptionIndex,resolveId:P=>P.id,resolveDisabled:P=>P.dataRef.disabled});r.value=k,m.value=C??2,u.value=A.options})},selectOption(b){let O=u.value.find(A=>A.id===b);if(!O)return;let{dataRef:C}=O;S(C.value)},selectActiveOption(){if(p.activeOptionIndex.value!==null){if(p.virtual.value)S(p.virtual.value.options[p.activeOptionIndex.value]);else{let{dataRef:b}=u.value[p.activeOptionIndex.value];S(b.value)}p.goToOption(V.Specific,p.activeOptionIndex.value)}},registerOption(b,O){let C=Ot({id:b,dataRef:O});if(p.virtual.value){u.value.push(C);return}d&&cancelAnimationFrame(d);let A=w(k=>(k.push(C),k));r.value===null&&p.isSelected(O.value.value)&&(A.activeOptionIndex=A.options.indexOf(C)),u.value=A.options,r.value=A.activeOptionIndex,m.value=2,A.options.some(k=>!I(k.dataRef.domRef))&&(d=requestAnimationFrame(()=>{let k=w();u.value=k.options,r.value=k.activeOptionIndex}))},unregisterOption(b,O){if(h!==null&&cancelAnimationFrame(h),O&&(R.value=!0),p.virtual.value){u.value=u.value.filter(A=>A.id!==b);return}let C=w(A=>{let k=A.findIndex(P=>P.id===b);return k!==-1&&A.splice(k,1),A});u.value=C.options,r.value=C.activeOptionIndex,m.value=2},isSelected(b){return U(M.value,{0:()=>p.compare(L(p.value.value),L(b)),1:()=>L(p.value.value).some(O=>p.compare(L(O),L(b)))})},isActive(b){return r.value===p.calculateIndex(b)}};Ye([t,a,f],()=>p.closeCombobox(),g(()=>l.value===0)),Ve(rt,p),Xe(g(()=>U(l.value,{0:ae.Open,1:ae.Closed})));let T=g(()=>{var b;return(b=I(t))==null?void 0:b.closest("form")});return ve(()=>{X([T],()=>{if(!T.value||e.defaultValue===void 0)return;function b(){p.change(e.defaultValue)}return T.value.addEventListener("reset",b),()=>{var O;(O=T.value)==null||O.removeEventListener("reset",b)}},{immediate:!0})}),()=>{var b,O,C;let{name:A,disabled:k,form:P,...W}=e,G={open:l.value===0,disabled:k,activeIndex:p.activeOptionIndex.value,activeOption:p.activeOptionIndex.value===null?null:p.virtual.value?p.virtual.value.options[(b=p.activeOptionIndex.value)!=null?b:0]:(C=(O=p.options.value[p.activeOptionIndex.value])==null?void 0:O.dataRef.value)!=null?C:null,value:v.value};return fe(Te,[...A!=null&&v.value!=null?Ze({[A]:v.value}).map(([oe,Z])=>fe(_e,et({features:lt.Hidden,key:oe,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:P,disabled:k,name:oe,value:Z}))):[],ee({theirProps:{...n,...xe(W,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:G,slots:s,attrs:n,name:"Combobox"})])}}}),dl=J({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:s,slots:n,expose:o}){var l;let i=(l=e.id)!=null?l:`headlessui-combobox-button-${ue()}`,t=be("ComboboxButton");o({el:t.buttonRef,$el:t.buttonRef});function a(u){t.disabled.value||(t.comboboxState.value===0?t.closeCombobox():(u.preventDefault(),t.openCombobox()),H(()=>{var r;return(r=I(t.inputRef))==null?void 0:r.focus({preventScroll:!0})}
4))}function f(u){switch(u.key){case D.ArrowDown:u.preventDefault(),u.stopPropagation(),t.comboboxState.value===1&&t.openCombobox(),H(()=>{var r;return(r=t.inputRef.value)==null?void 0:r.focus({preventScroll:!0})});return;case D.ArrowUp:u.preventDefault(),u.stopPropagation(),t.comboboxState.value===1&&(t.openCombobox(),H(()=>{t.value.value||t.goToOption(V.Last)})),H(()=>{var r;return(r=t.inputRef.value)==null?void 0:r.focus({preventScroll:!0})});return;case D.Escape:if(t.comboboxState.value!==0)return;u.preventDefault(),t.optionsRef.value&&!t.optionsPropsRef.value.static&&u.stopPropagation(),t.closeCombobox(),H(()=>{var r;return(r=t.inputRef.value)==null?void 0:r.focus({preventScroll:!0})});return}}let c=Ge(g(()=>({as:e.as,type:s.type})),t.buttonRef);return()=>{var u,r;let m={open:t.comboboxState.value===0,disabled:t.disabled.value,value:t.value.value},{...R}=e,w={ref:t.buttonRef,id:i,type:c.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(u=I(t.optionsRef))==null?void 0:u.id,"aria-expanded":t.comboboxState.value===0,"aria-labelledby":t.labelRef.value?[(r=I(t.labelRef))==null?void 0:r.id,i].join(" "):void 0,disabled:t.disabled.value===!0?!0:void 0,onKeydown:f,onClick:a};return ee({ourProps:w,theirProps:R,slot:m,attrs:s,slots:n,name:"ComboboxButton"})}}}),cl=J({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:e=>!0},setup(e,{emit:s,attrs:n,slots:o,expose:l}){var i;let t=(i=e.id)!=null?i:`headlessui-combobox-input-${ue()}`,a=be("ComboboxInput"),f=g(()=>Ke(I(a.inputRef))),c={value:!1};l({el:a.inputRef,$el:a.inputRef});function u(){a.change(null);let d=I(a.optionsRef);d&&(d.scrollTop=0),a.goToOption(V.Nothing)}let r=g(()=>{var d;let S=a.value.value;return I(a.inputRef)?typeof e.displayValue<"u"&&S!==void 0?(d=e.displayValue(S))!=null?d:"":typeof S=="string"?S:"":""});ve(()=>{X([r,a.comboboxState,f],([d,S],[x,p])=>{if(c.value)return;let T=I(a.inputRef);T&&((p===0&&S===1||d!==x)&&(T.value=d),requestAnimationFrame(()=>{var b;if(c.value||!T||((b=f.value)==null?void 0:b.activeElement)!==T)return;let{selectionStart:O,selectionEnd:C}=T;Math.abs((C??0)-(O??0))===0&&O===0&&T.setSelectionRange(T.value.length,T.value.length)}))},{immediate:!0}),X([a.comboboxState],([d],[S])=>{if(d===0&&S===1){if(c.value)return;let x=I(a.inputRef);if(!x)return;let p=x.value,{selectionStart:T,selectionEnd:b,selectionDirection:O}=x;x.value="",x.value=p,O!==null?x.setSelectionRange(T,b,O):x.setSelectionRange(T,b)}})});let m=F(!1);function R(){m.value=!0}function w(){we().nextFrame(()=>{m.value=!1})}let M=el();function B(d){switch(c.value=!0,M(()=>{c.value=!1}),d.key){case D.Enter:if(c.value=!1,a.comboboxState.value!==0||m.value)return;if(d.preventDefault(),d.stopPropagation(),a.activeOptionIndex.value===null){a.closeCombobox();return}a.selectActiveOption(),a.mode.value===0&&a.closeCombobox();break;case D.ArrowDown:return c.value=!1,d.preventDefault(),d.stopPropagation(),U(a.comboboxState.value,{0:()=>a.goToOption(V.Next),1:()=>a.openCombobox()});case D.ArrowUp:return c.value=!1,d.preventDefault(),d.stopPropagation(),U(a.comboboxState.value,{0:()=>a.goToOption(V.Previous),1:()=>{a.openCombobox(),H(()=>{a.value.value||a.goToOption(V.Last)})}});case D.Home:if(d.shiftKey)break;return c.value=!1,d.preventDefault(),d.stopPropagation(),a.goToOption(V.First);case D.PageUp:return c.value=!1,d.preventDefault(),d.stopPropagation(),a.goToOption(V.First);case D.End:if(d.shiftKey)break;return c.value=!1,d.preventDefault(),d.stopPropagation(),a.goToOption(V.Last);case D.PageDown:return c.value=!1,d.preventDefault(),d.stopPropagation(),a.goToOption(V.Last);case D.Escape:if(c.value=!1,a.comboboxState.value!==0)return;d.preventDefault(),a.optionsRef.value&&!a.optionsPropsRef.value.static&&d.stopPropagation(),a.nullable.value&&a.mode.value===0&&a.value.value===null&&u(),a.closeCombobox();break;case D.Tab:if(c.value=!1,a.comboboxState.value!==0)return;a.mode.value===0&&a.activationTrigger.value!==1&&a.selectActiveOption(),a.closeCombobox();break}}function $(d){s("change",d),a.nullable.value&&a.mode.value===0&&d.target.value===""&&u(),a.openCombobox()}function y(d){var S,x,p;let T=(S=d.relatedTarget)!=null?S:ke.find(b=>b!==d.currentTarget);if(c.value=!1,!((x=I(a.optionsRef))!=null&&x.contains(T))&&!((p=I(a.buttonRef))!=null&&p.contains(T))&&a.comboboxState.value===0)return d.preventDefault(),a.mode.value===0&&(a.nullable.value&&a.value.value===null?u():a.activationTrigger.value!==1&&a.selectActiveOption()),a.closeCombobox()}function v(d){var S,x,p;let T=(S=d.relatedTarget)!=null?S:ke.find(b=>b!==d.currentTarget);(x=I(a.buttonRef))!=null&&x.contains(T)||(p=I(a.optionsRef))!=null&&p.contains(T)||a.disabled.value||a.immediate.value&&a.comboboxState.value!==0&&(a.openCombobox(),we().nextFrame(()=>{a.setActivationTrigger(1)}))}let h=g(()=>{var d,S,x,p;return(p=(x=(S=e.defaultValue)!=null?S:a.defaultValue.value!==void 0?(d=e.displayValue)==null?void 0:d.call(e,a.defaultValue.value):null)!=null?x:a.defaultValue.value)!=null?p:""});return()=>{var d,S,x,p,T,b,O;
4let C={open:a.comboboxState.value===0},{displayValue:A,onChange:k,...P}=e,W={"aria-controls":(d=a.optionsRef.value)==null?void 0:d.id,"aria-expanded":a.comboboxState.value===0,"aria-activedescendant":a.activeOptionIndex.value===null?void 0:a.virtual.value?(S=a.options.value.find(G=>!a.virtual.value.disabled(G.dataRef.value)&&a.compare(G.dataRef.value,a.virtual.value.options[a.activeOptionIndex.value])))==null?void 0:S.id:(x=a.options.value[a.activeOptionIndex.value])==null?void 0:x.id,"aria-labelledby":(b=(p=I(a.labelRef))==null?void 0:p.id)!=null?b:(T=I(a.buttonRef))==null?void 0:T.id,"aria-autocomplete":"list",id:t,onCompositionstart:R,onCompositionend:w,onKeydown:B,onInput:$,onFocus:v,onBlur:y,role:"combobox",type:(O=n.type)!=null?O:"text",tabIndex:0,ref:a.inputRef,defaultValue:h.value,disabled:a.disabled.value===!0?!0:void 0};return ee({ourProps:W,theirProps:P,slot:C,attrs:n,slots:o,features:pe.RenderStrategy|pe.Static,name:"ComboboxInput"})}}}),vl=J({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(e,{attrs:s,slots:n,expose:o}){let l=be("ComboboxOptions"),i=`headlessui-combobox-options-${ue()}`;o({el:l.optionsRef,$el:l.optionsRef}),ce(()=>{l.optionsPropsRef.value.static=e.static}),ce(()=>{l.optionsPropsRef.value.hold=e.hold});let t=Qe(),a=g(()=>t!==null?(t.value&ae.Open)===ae.Open:l.comboboxState.value===0);tl({container:g(()=>I(l.optionsRef)),enabled:g(()=>l.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 f(c){c.preventDefault()}return()=>{var c,u,r;let m={open:l.comboboxState.value===0},R={"aria-labelledby":(r=(c=I(l.labelRef))==null?void 0:c.id)!=null?r:(u=I(l.buttonRef))==null?void 0:u.id,id:i,ref:l.optionsRef,role:"listbox","aria-multiselectable":l.mode.value===1?!0:void 0,onMousedown:f},w=xe(e,["hold"]);return ee({ourProps:R,theirProps:w,slot:m,attrs:s,slots:l.virtual.value&&l.comboboxState.value===0?{...n,default:()=>[fe(sl,{},n.default)]}:n,features:pe.RenderStrategy|pe.Static,visible:a.value,name:"ComboboxOptions"})}}}),fl=J({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(e,{slots:s,attrs:n,expose:o}){let l=be("ComboboxOption"),i=`headlessui-combobox-option-${ue()}`,t=F(null),a=g(()=>e.disabled);o({el:t,$el:t});let f=g(()=>{var y;return l.virtual.value?l.activeOptionIndex.value===l.calculateIndex(e.value):l.activeOptionIndex.value===null?!1:((y=l.options.value[l.activeOptionIndex.value])==null?void 0:y.id)===i}),c=g(()=>l.isSelected(e.value)),u=Ee(dt,null),r=g(()=>({disabled:e.disabled,value:e.value,domRef:t,order:g(()=>e.order)}));ve(()=>l.registerOption(i,r)),Ae(()=>l.unregisterOption(i,f.value)),ce(()=>{let y=I(t);y&&u?.value.measureElement(y)}),ce(()=>{l.comboboxState.value===0&&f.value&&(l.virtual.value||l.activationTrigger.value!==0&&H(()=>{var y,v;return(v=(y=I(t))==null?void 0:y.scrollIntoView)==null?void 0:v.call(y,{block:"nearest"})}))});function m(y){y.preventDefault(),y.button===st.Left&&(a.value||(l.selectOption(i),St()||requestAnimationFrame(()=>{var v;return(v=I(l.inputRef))==null?void 0:v.focus({preventScroll:!0})}),l.mode.value===0&&l.closeCombobox()))}function R(){var y;if(e.disabled||(y=l.virtual.value)!=null&&y.disabled(e.value))return l.goToOption(V.Nothing);let v=l.calculateIndex(e.value);l.goToOption(V.Specific,v)}let w=ut();function M(y){w.update(y)}function B(y){var v;if(!w.wasMoved(y)||e.disabled||(v=l.virtual.value)!=null&&v.disabled(e.value)||f.value)return;let h=l.calculateIndex(e.value);l.goToOption(V.Specific,h,0)}function $(y){var v;w.wasMoved(y)&&(e.disabled||(v=l.virtual.value)!=null&&v.disabled(e.value)||f.value&&(l.optionsPropsRef.value.hold||l.goToOption(V.Nothing)))}return()=>{let{disabled:y}=e,v={active:f.value,selected:c.value,disabled:y},h={id:i,ref:t,role:"option",tabIndex:y===!0?void 0:-1,"aria-disabled":y===!0?!0:void 0,"aria-selected":c.value,disabled:void 0,onMousedown:m,onFocus:R,onPointerenter:M,onMouseenter:M,onPointermove:B,onMousemove:B,onPointerleave:$,onMouseleave:$},d=xe(e,["order","value"]);return ee({ourProps:h,theirProps:d,slot:v,attrs:n,slots:s,name:"ComboboxOption"})}}}),He=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ue(e){var s,n;let o=(s=e.innerText)!=null?s:"",l=e.cloneNode(!0);if(!(l instanceof HTMLElement))return o;let i=!1;for(let a of l.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let t=i?(n=l.innerText)!=null?n:"":o;return He.test(t)&&(t=t.replace(He,"")),t}function pl(e){let s=e.getAttribute("aria-label");if(typeof s=="string")return s.trim();let n=e.getAttribute("aria-labelledby");if(n){let o=n.split(" ").map(l=>{let i=document.getElementById(l);if(i){let t=i.getAttribute("aria-label");return typeof t=="string"?t.trim():Ue(i).trim()}return null}
vendor: 5,093 bytes, line 4
4).filter(Boolean);if(o.length>0)return o.join(", ")}return Ue(e).trim()}function bl(e){let s=F(""),n=F("");return()=>{let o=I(e);if(!o)return"";let l=o.innerText;if(s.value===l)return n.value;let i=pl(o).trim().toLowerCase();return s.value=l,n.value=i,i}}function ml(e,s){return e===s}var hl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(hl||{}),gl=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(gl||{}),yl=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(yl||{});function Ol(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let ct=Symbol("ListboxContext");function Ie(e){let s=Ee(ct,null);if(s===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ie),n}return s}let Sl=J({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>ml},horizontal:{type:[Boolean],default:!1},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},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:s,attrs:n,emit:o}){let l=F(1),i=F(null),t=F(null),a=F(null),f=F([]),c=F(""),u=F(null),r=F(1);function m(v=h=>h){let h=u.value!==null?f.value[u.value]:null,d=tt(v(f.value.slice()),x=>I(x.dataRef.domRef)),S=h?d.indexOf(h):null;return S===-1&&(S=null),{options:d,activeOptionIndex:S}}let R=g(()=>e.multiple?1:0),[w,M]=Je(g(()=>e.modelValue),v=>o("update:modelValue",v),g(()=>e.defaultValue)),B=g(()=>w.value===void 0?U(R.value,{1:[],0:void 0}):w.value),$={listboxState:l,value:B,mode:R,compare(v,h){if(typeof e.by=="string"){let d=e.by;return v?.[d]===h?.[d]}return e.by(v,h)},orientation:g(()=>e.horizontal?"horizontal":"vertical"),labelRef:i,buttonRef:t,optionsRef:a,disabled:g(()=>e.disabled),options:f,searchQuery:c,activeOptionIndex:u,activationTrigger:r,closeListbox(){e.disabled||l.value!==1&&(l.value=1,u.value=null)},openListbox(){e.disabled||l.value!==0&&(l.value=0)},goToOption(v,h,d){if(e.disabled||l.value===1)return;let S=m(),x=Me(v===V.Specific?{focus:V.Specific,id:h}:{focus:v},{resolveItems:()=>S.options,resolveActiveIndex:()=>S.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.disabled});c.value="",u.value=x,r.value=d??1,f.value=S.options},search(v){if(e.disabled||l.value===1)return;let h=c.value!==""?0:1;c.value+=v.toLowerCase();let d=(u.value!==null?f.value.slice(u.value+h).concat(f.value.slice(0,u.value+h)):f.value).find(x=>x.dataRef.textValue.startsWith(c.value)&&!x.dataRef.disabled),S=d?f.value.indexOf(d):-1;S===-1||S===u.value||(u.value=S,r.value=1)},clearSearch(){e.disabled||l.value!==1&&c.value!==""&&(c.value="")},registerOption(v,h){let d=m(S=>[...S,{id:v,dataRef:h}]);f.value=d.options,u.value=d.activeOptionIndex},unregisterOption(v){let h=m(d=>{let S=d.findIndex(x=>x.id===v);return S!==-1&&d.splice(S,1),d});f.value=h.options,u.value=h.activeOptionIndex,r.value=1},theirOnChange(v){e.disabled||M(v)},select(v){e.disabled||M(U(R.value,{0:()=>v,1:()=>{let h=L($.value.value).slice(),d=L(v),S=h.findIndex(x=>$.compare(d,L(x)));return S===-1?h.push(d):h.splice(S,1),h}}))}};Ye([t,a],(v,h)=>{var d;$.closeListbox(),It(h,Ct.Loose)||(v.preventDefault(),(d=I(t))==null||d.focus())},g(()=>l.value===0)),Ve(ct,$),Xe(g(()=>U(l.value,{0:ae.Open,1:ae.Closed})));let y=g(()=>{var v;return(v=I(t))==null?void 0:v.closest("form")});return ve(()=>{X([y],()=>{if(!y.value||e.defaultValue===void 0)return;function v(){$.theirOnChange(e.defaultValue)}return y.value.addEventListener("reset",v),()=>{var h;(h=y.value)==null||h.removeEventListener("reset",v)}},{immediate:!0})}),()=>{let{name:v,modelValue:h,disabled:d,form:S,...x}=e,p={open:l.value===0,disabled:d,value:B.value};return fe(Te,[...v!=null&&B.value!=null?Ze({[v]:B.value}).map(([T,b])=>fe(_e,et({features:lt.Hidden,key:T,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:S,disabled:d,name:T,value:b}))):[],ee({ourProps:{},theirProps:{...n,...xe(x,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:p,slots:s,attrs:n,name:"Listbox"})])}}}),xl=J({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:s,slots:n,expose:o}){var l;let i=(l=e.id)!=null?l:`headlessui-listbox-button-${ue()}`,t=Ie("ListboxButton");o({el:t.buttonRef,$el:t.buttonRef});function a(r){switch(r.key){case D.Space:case D.Enter:case D.ArrowDown:r.preventDefault(),t.openListbox(),H(()=>{var m;(m=I(t.optionsRef))==null||m.focus({preventScroll:!0}),t.value.value||t.goToOption(V.First)});break;case D.ArrowUp:r.preventDefault(),t.openListbox(),H(()=>{var m;(m=I(t.optionsRef))==null||m.focus({preventScroll:!0}),t.value.value||t.goToOption(V.Last)});break}}function f(r){switch(r.key){case D.Space:r.preventDefault();break}}function c(r){t.disabled.value||(t.listboxState.value===0?(t.closeListbox(),H(()=>{var m;return(m=I(t.buttonRef))==null?void 0:m.focus({preventScroll:!0})}
4)):(r.preventDefault(),t.openListbox(),Ol(()=>{var m;return(m=I(t.optionsRef))==null?void 0:m.focus({preventScroll:!0})})))}let u=Ge(g(()=>({as:e.as,type:s.type})),t.buttonRef);return()=>{var r,m;let R={open:t.listboxState.value===0,disabled:t.disabled.value,value:t.value.value},{...w}=e,M={ref:t.buttonRef,id:i,type:u.value,"aria-haspopup":"listbox","aria-controls":(r=I(t.optionsRef))==null?void 0:r.id,"aria-expanded":t.listboxState.value===0,"aria-labelledby":t.labelRef.value?[(m=I(t.labelRef))==null?void 0:m.id,i].join(" "):void 0,disabled:t.disabled.value===!0?!0:void 0,onKeydown:a,onKeyup:f,onClick:c};return ee({ourProps:M,theirProps:w,slot:R,attrs:s,slots:n,name:"ListboxButton"})}}}),Il=J({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:s,slots:n,expose:o}){var l;let i=(l=e.id)!=null?l:`headlessui-listbox-options-${ue()}`,t=Ie("ListboxOptions"),a=F(null);o({el:t.optionsRef,$el:t.optionsRef});function f(r){switch(a.value&&clearTimeout(a.value),r.key){case D.Space:if(t.searchQuery.value!=="")return r.preventDefault(),r.stopPropagation(),t.search(r.key);case D.Enter:if(r.preventDefault(),r.stopPropagation(),t.activeOptionIndex.value!==null){let m=t.options.value[t.activeOptionIndex.value];t.select(m.dataRef.value)}t.mode.value===0&&(t.closeListbox(),H(()=>{var m;return(m=I(t.buttonRef))==null?void 0:m.focus({preventScroll:!0})}
4));break;case U(t.orientation.value,{vertical:D.ArrowDown,horizontal:D.ArrowRight}):return r.preventDefault(),r.stopPropagation(),t.goToOption(V.Next);case U(t.orientation.value,{vertical:D.ArrowUp,horizontal:D.ArrowLeft}):return r.preventDefault(),r.stopPropagation(),t.goToOption(V.Previous);case D.Home:case D.PageUp:return r.preventDefault(),r.stopPropagation(),t.goToOption(V.First);case D.End:case D.PageDown:return r.preventDefault(),r.stopPropagation(),t.goToOption(V.Last);case D.Escape:r.preventDefault(),r.stopPropagation(),t.closeListbox(),H(()=>{var m;return(m=I(t.buttonRef))==null?void 0:m.focus({preventScroll:!0})});break;case D.Tab:r.preventDefault(),r.stopPropagation();break;default:r.key.length===1&&(t.search(r.key),a.value=setTimeout(()=>t.clearSearch(),350));break}}let c=Qe(),u=g(()=>c!==null?(c.value&ae.Open)===ae.Open:t.listboxState.value===0);return()=>{var r,m;let R={open:t.listboxState.value===0},{...w}=e,M={"aria-activedescendant":t.activeOptionIndex.value===null||(r=t.options.value[t.activeOptionIndex.value])==null?void 0:r.id,"aria-multiselectable":t.mode.value===1?!0:void 0,"aria-labelledby":(m=I(t.buttonRef))==null?void 0:m.id,"aria-orientation":t.orientation.value,id:i,onKeydown:f,role:"listbox",tabIndex:0,ref:t.optionsRef};return ee({ourProps:M,theirProps:w,slot:R,attrs:s,slots:n,features:pe.RenderStrategy|pe.Static,visible:u.value,name:"ListboxOptions"})}}}),Cl=J({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:s,attrs:n,expose:o}){var l;let i=(l=e.id)!=null?l:`headlessui-listbox-option-${ue()}`,t=Ie("ListboxOption"),a=F(null);o({el:a,$el:a});let f=g(()=>t.activeOptionIndex.value!==null?t.options.value[t.activeOptionIndex.value].id===i:!1),c=g(()=>U(t.mode.value,{0:()=>t.compare(L(t.value.value),L(e.value)),1:()=>L(t.value.value).some(v=>t.compare(L(v),L(e.value)))})),u=g(()=>U(t.mode.value,{1:()=>{var v;let h=L(t.value.value);return((v=t.options.value.find(d=>h.some(S=>t.compare(L(S),L(d.dataRef.value)))))==null?void 0:v.id)===i},0:()=>c.value})),r=bl(a),m=g(()=>({disabled:e.disabled,value:e.value,get textValue(){return r()},domRef:a}));ve(()=>t.registerOption(i,m)),Ae(()=>t.unregisterOption(i)),ve(()=>{X([t.listboxState,c],()=>{t.listboxState.value===0&&c.value&&U(t.mode.value,{1:()=>{u.value&&t.goToOption(V.Specific,i)},0:()=>{t.goToOption(V.Specific,i)}})},{immediate:!0})}),ce(()=>{t.listboxState.value===0&&f.value&&t.activationTrigger.value!==0&&H(()=>{var v,h;return(h=(v=I(a))==null?void 0:v.scrollIntoView)==null?void 0:h.call(v,{block:"nearest"})})});function R(v){if(e.disabled)return v.preventDefault();t.select(e.value),t.mode.value===0&&(t.closeListbox(),H(()=>{var h;return(h=I(t.buttonRef))==null?void 0:h.focus({preventScroll:!0})}
4))}function w(){if(e.disabled)return t.goToOption(V.Nothing);t.goToOption(V.Specific,i)}let M=ut();function B(v){M.update(v)}function $(v){M.wasMoved(v)&&(e.disabled||f.value||t.goToOption(V.Specific,i,0))}function y(v){M.wasMoved(v)&&(e.disabled||f.value&&t.goToOption(V.Nothing))}return()=>{let{disabled:v}=e,h={active:f.value,selected:c.value,disabled:v},{value:d,disabled:S,...x}=e,p={id:i,ref:a,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":c.value,disabled:void 0,onClick:R,onFocus:w,onPointerenter:B,onMouseenter:B,onPointermove:$,onMousemove:$,onPointerleave:y,onMouseleave:y};return ee({ourProps:p,theirProps:x,slot:h,attrs:n,slots:s,name:"ListboxOption"})}}});const Y=ot(ie.ui.strategy,ie.ui.select,$t),ge=ot(ie.ui.strategy,ie.ui.selectMenu,Pt),Rl=J({components:{HCombobox:rl,HComboboxButton:dl,HComboboxOptions:vl,HComboboxOption:fl,HComboboxInput:cl,HListbox:Sl,HListboxButton:xl,HListboxOptions:Il,HListboxOption:Cl,UIcon:nt,UAvatar:at},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object,Array,Boolean],default:""},query:{type:String,default:null},by:{type:String,default:void 0},options:{type:Array,default:()=>[]},id:{type:String,default:null},name:{type:String,default:null},required:{type:Boolean,default:!1},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>Y.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:()=>Y.default.trailingIcon},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},selectedIcon:{type:String,default:()=>ge.default.selectedIcon},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},searchable:{type:[Boolean,Function],default:!1},searchablePlaceholder:{type:String,default:()=>ge.default.searchablePlaceholder.label},searchableLazy:{type:Boolean,default:!1},clearSearchOnClose:{type:Boolean,default:()=>ge.default.clearSearchOnClose},debounce:{type:Number,default:200},creatable:{type:Boolean,default:!1},showCreateOptionWhen:{type:[String,Function],default:()=>ge.default.showCreateOptionWhen},placeholder:{type:String,default:null},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(Y.size).includes(e)}},color:{type:String,default:()=>Y.default.color,validator(e){return[...ie.ui.colors,...Object.keys(Y.color)].includes(e)}},variant:{type:String,default:()=>Y.default.variant,validator(e){return[...Object.keys(Y.variant),...Object.values(Y.color).flatMap(s=>Object.keys(s))].includes(e)}},optionAttribute:{type:String,default:"label"},valueAttribute:{type:String,default:null},searchAttributes:{type:Array,default:null},inputTargetForm:{type:String,default:null},popper:{type:Object,default:()=>({})},selectClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},uiMenu:{type:Object,default:()=>({})}},emits:["update:modelValue","update:query","open","close","change"],setup(e,{emit:s,slots:n}){const{ui:o,attrs:l}=$e("select",Re(e,"ui"),Y,Re(e,"class")),{ui:i}=$e("selectMenu",Re(e,"uiMenu"),ge),t=g(()=>Tt({},e.popper,i.value.popper)),[a,f]=Nt(t.value),c=g(()=>{if(!e.by)return;if(typeof e.by=="function")return e.by;const E=e.by;return E.indexOf(".")>0?(j,K)=>Z(j,E)===Z(K,E):E}),{size:u,rounded:r}=Vt({ui:o,props:e}),{emitFormBlur:m,emitFormChange:R,inputId:w,color:M,size:B,name:$}=Dt(e,Y),y=g(()=>u.value??B.value),v=F(""),h=g({get(){return e.query??v.value},set(E){v.value=E,s("update:query",E)}}),d=g(()=>{function E(j,K){return c.value&&typeof c.value!="function"&&De(j)&&De(K)?Pe(j[c.value],K[c.value]):Pe(j,K)}function q(j){return e.valueAttribute?Z(j,e.valueAttribute):j}if(e.multiple){const j=e.modelValue;return!Array.isArray(j)||!j.length?[]:G.value.filter(K=>{const mt=q(K);return j.some(ht=>E(ht,mt))})}return G.value.find(j=>{const K=q(j);return E(K,L(e.modelValue))})??e.modelValue}),S=g(()=>e.modelValue?Array.isArray(e.modelValue)&&e.modelValue.length?`${e.modelValue.length} selected`:["string","number"].includes(typeof e.modelValue)?e.valueAttribute?Z(d.value,e.optionAttribute):e.modelValue:Z(e.modelValue,e.optionAttribute):null),x=g(()=>{const E=o.value.color?.[M.value]?.[e.variant]||o.value.variant[e.variant];return kt(he(o.value.base,i.value.select,r.value,o.value.size[y.value],o.value.gap[y.value],e.padded?o.value.padding[y.value]:"p-0",E?.replaceAll("{color}",M.value),(p.value||n.leading)&&o.value.leading.padding[y.value],(T.value||n.trailing)&&o.value.trailing.padding[y.value]),e.placeholder&&(!e.modelValue||Array.isArray(e.modelValue)&&!e.modelValue.length)&&o.value.placeholder,e.selectClass)}),p=g(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),T=g(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),b=g(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),O=g(()=>e.loading&&!p.value?e.loadingIcon:e.trailingIcon||e.icon),C=g(()=>he(o.value.icon.leading.wrapper,o.value.icon.leading.pointer,o.value.icon.leading.padding[y.value])),A=g(()=>he(o.value.icon.base,M.value&&ie.ui.colors.includes(M.value)&&o.value.icon.color.replaceAll("{color}",M.value),o.value.icon.size[y.value],e.loading&&o.value.icon.loading)),k=g(()=>he(o.value.icon.trailing.wrapper,o.value.icon.trailing.pointer,o.value.icon.trailing.padding[y.value])),P=g(()=>he(o.value.icon.base,M.value&&ie.ui.colors.includes(M.value)&&o.value.icon.color.replaceAll("{color}",M.value),o.value.icon.size[y.value],e.loading&&!p.value&&o.value.icon.loading)),W=e.searchable&&typeof e.searchable=="function"?zt(e.searchable,e.debounce):void 0,G=Ft(async()=>W?await W(h.value):e.options||[],[],{lazy:e.searchableLazy});function oe(E){return E.replace(/[.*+?^${}()|[\]\\]/g,q=>`\\${q}`)}function Z(E,q){return Le(E,q)}function De(E){return!Array.isArray(E)&&E!==null&&typeof E=="object"}const ye=g(()=>{if(!h.value||W)return G.value;const E=oe(h.value);return G.value.filter(q=>(e.searchAttributes?.length?e.searchAttributes:[e.optionAttribute]).some(j=>{if(["string","number"].includes(typeof q))return String(q).search(new RegExp(E,"i"))!==-1;const K=Le(q,j);return K!=null&&String(K).search(new RegExp(E,"i"))!==-1}))}),vt=g(()=>h.value===""||e.showCreateOptionWhen==="empty"&&ye.value.length||e.showCreateOptionWhen==="always"&&ye.value.find(q=>["string","number"].includes(typeof q)?q===h.value:Z(q,e.optionAttribute)===h.value)||typeof e.showCreateOptionWhen=="function"&&!e.showCreateOptionWhen(h.value,ye.value)?null:["string","number"].includes(typeof e.modelValue)?h.value:{[e.optionAttribute]:h.value});function ft(){e.clearSearchOnClose&&(h.value="")}X(f,E=>{E?s("open"):(ft(),s("close"),m())});function pt(E){L(e.modelValue)!==E&&(s("update:modelValue",E),s("change",E),R())}function bt(E){h.value=E.target.value}return Lt(()=>Bt()),{ui:o,uiMenu:i,attrs:l,name:$,inputId:w,popper:t,trigger:a,container:f,selected:d,label:S,accessor:Z,isLeading:p,isTrailing:T,selectClass:x,leadingIconName:b,leadingIconClass:A,leadingWrapperIconClass:C,trailingIconName:O,trailingIconClass:P,trailingWrapperIconClass:k,filteredOptions:ye,createOption:vt,query:h,onUp
4date:pt,onQueryChange:bt,by:c}}}),wl=["value","required","form"],Ml=["id","disabled"],Al={class:"truncate"};function El(e,s,n,o,l,i){const t=nt,a=wt("HComboboxInput"),f=at;return N(),te(me(e.searchable?"HCombobox":"HListbox"),{by:e.by,name:e.name,"model-value":e.multiple?Array.isArray(e.modelValue)?e.modelValue:[]:e.modelValue,multiple:e.multiple,disabled:e.disabled,as:"div",class:z(e.ui.wrapper),"onUpdate:modelValue":e.onUpdate},{default:se(({open:c})=>[e.required?(N(),Q("input",{key:0,value:e.modelValue,required:e.required,class:z(e.uiMenu.required),form:e.inputTargetForm,tabindex:"-1","aria-hidden":"true"},null,10,wl)):_("",!0),(N(),te(me(e.searchable?"HComboboxButton":"HListboxButton"),{ref:"trigger",as:"div",role:"button",class:z(e.uiMenu.trigger)},{default:se(()=>[le(e.$slots,"default",{open:c,disabled:e.disabled,loading:e.loading},()=>[ne("button",Ce({id:e.inputId,class:e.selectClass,disabled:e.disabled,type:"button"},e.attrs),[e.isLeading&&e.leadingIconName||e.$slots.leading?(N(),Q("span",{key:0,class:z(e.leadingWrapperIconClass)},[le(e.$slots,"leading",{selected:e.selected,disabled:e.disabled,loading:e.loading},()=>[Oe(t,{name:e.leadingIconName,class:z(e.leadingIconClass)},null,8,["name","class"])])],2)):_("",!0),le(e.$slots,"label",{selected:e.selected},()=>[e.label?(N(),Q("span",{key:0,class:z(e.uiMenu.label)},re(e.label),3)):(N(),Q("span",{key:1,class:z(e.uiMenu.label)},re(e.placeholder||" "),3))]),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(N(),Q("span",{key:1,class:z(e.trailingWrapperIconClass)},[le(e.$slots,"trailing",{selected:e.selected,disabled:e.disabled,loading:e.loading},()=>[Oe(t,{name:e.trailingIconName,class:z(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])])],2)):_("",!0)],16,Ml)])]),_:2},1032,["class"])),c?(N(),Q("div",{key:1,ref:"container",class:z([e.uiMenu.container,e.uiMenu.width])},[Oe(Mt,Ce({appear:""},e.uiMenu.transition),{default:se(()=>[ne("div",null,[e.popper.arrow?(N(),Q("div",{key:0,"data-popper-arrow":"",class:z(Object.values(e.uiMenu.arrow))},null,2)):_("",!0),(N(),te(me(e.searchable?"HComboboxOptions":"HListboxOptions"),{static:"",class:z([e.uiMenu.base,e.uiMenu.ring,e.uiMenu.rounded,e.uiMenu.shadow,e.uiMenu.background,e.uiMenu.padding,e.uiMenu.height])},{default:se(()=>[e.searchable?(N(),te(a,{key:0,"display-value":()=>e.query,name:"q",placeholder:e.searchablePlaceholder,autofocus:"",autocomplete:"off",class:z(e.uiMenu.input),onChange:e.onQueryChange},null,8,["display-value","placeholder","class","onChange"])):_("",!0),(N(!0),Q(Te,null,At(e.filteredOptions,(u,r)=>(N(),te(me(e.searchable?"HComboboxOption":"HListboxOption"),{key:r,as:"template",value:e.valueAttribute?e.accessor(u,e.valueAttribute):u,disabled:u.disabled},{default:se(({active:m,selected:R,disabled:w})=>[ne("li",{class:z([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,m?e.uiMenu.option.active:e.uiMenu.option.inactive,R&&e.uiMenu.option.selected,w&&e.uiMenu.option.disabled])},[ne("div",{class:z(e.uiMenu.option.container)},[le(e.$slots,"option",{option:u,active:m,selected:R},()=>[u.icon?(N(),te(t,{key:0,name:u.icon,class:z([e.uiMenu.option.icon.base,m?e.uiMenu.option.icon.active:e.uiMenu.option.icon.inactive,u.iconClass]),"aria-hidden":"true"},null,8,["name","class"])):u.avatar?(N(),te(f,Ce({key:1,ref_for:!0},{size:e.uiMenu.option.avatar.size,...u.avatar},{class:e.uiMenu.option.avatar.base,"aria-hidden":"true"}),null,16,["class"])):u.chip?(N(),Q("span",{key:2,class:z(e.uiMenu.option.chip.base),style:Et({background:`#${u.chip}`})},null,6)):_("",!0),ne("span",Al,re(["string","number"].includes(typeof u)?u:e.accessor(u,e.optionAttribute)),1)])],2),R?(N(),Q("span",{key:0,class:z([e.uiMenu.option.selectedIcon.wrapper,e.uiMenu.option.selectedIcon.padding])},[Oe(t,{name:e.selectedIcon,class:z(e.uiMenu.option.selectedIcon.base),"aria-hidden":"true"},null,8,["name","class"])],2)):_("",!0)],2)]),_:2},1032,["value","disabled"]))),128)),e.creatable&&e.createOption?(N(),te(me(e.searchable?"HComboboxOption":"HListboxOption"),{key:1,value:e.createOption,as:"template"},{default:se(({active:u,selected:r})=>[ne("li",{class:z([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,u?e.uiMenu.option.active:e.uiMenu.option.inactive])},[ne("div",{class:z(e.uiMenu.option.container)},[le(e.$slots,"option-create",{option:e.createOption,active:u,selected:r},()=>[ne("span",{class:z(e.uiMenu.option.create)}
4,'Create "'+re(typeof e.createOption=="string"?e.createOption:e.accessor(e.createOption,e.optionAttribute))+'"',3)])],2)],2)]),_:3},8,["value"])):e.searchable&&e.query&&!e.filteredOptions?.length?(N(),Q("p",{key:2,class:z(e.uiMenu.option.empty)},[le(e.$slots,"option-empty",{query:e.query},()=>[ze(re(e.uiMenu.default.optionEmpty.label.replace("{query}",e.query)),1)])],2)):e.filteredOptions?.length?_("",!0):(N(),Q("p",{key:3,class:z(e.uiMenu.empty)},[le(e.$slots,"empty",{query:e.query},()=>[ze(re(e.uiMenu.default.empty.label),1)])],2))]),_:3},8,["class"]))])]),_:3},16)],2)):_("",!0)]),_:3},8,["by","name","model-value","multiple","disabled","class","onUpdate:modelValue"])}const Dl=Rt(Rl,[["render",El]]);export{Dl as _,V as c,Me as f,tl as i,bl as p,ut 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.