UNPKG

contextmax

Version:

Privacy-first, browser-based tool for creating precise context sets for LLMs

7 lines 4.39 MB
var Dh=Object.defineProperty;var Qd=n=>{throw TypeError(n)};var Mh=(n,e,t)=>e in n?Dh(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Na=(n,e,t)=>Mh(n,typeof e!="symbol"?e+"":e,t),Ph=(n,e,t)=>e.has(n)||Qd("Cannot "+t);var Xt=(n,e,t)=>(Ph(n,e,"read from private field"),t?t.call(n):e.get(n)),Jd=(n,e,t)=>e.has(n)?Qd("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t);import{B as Lh,e as Fh,C as h7,D as Bh,E as zh,f as Uh,g as Gh,F as ya,K as qh,R as jh,S as Hh,h as Vh,T as Jc,i as Yh,j as Wh,k as $h,l as f7,m as Kh,V as Qh,n as Jh,p as Xh,q as Zh,r as Xc,s as ef,v as af,x as nf,y as Ee,z as tf,A as Me,G as Pe,c as de,a as k,H as rf,I as of,J as sf,L as mf,M as lf,N as Wi,d as Ne,b as H,O as b7,P as cf,Q as De,U as df,W as uf,X as pf,Y as gf,Z as xf,$ as _f,a0 as hf,a1 as ff,a2 as bf,a3 as vf,a4 as Zc,a5 as vi,a6 as e1,a7 as Ef,a8 as Sf,a9 as Ji,aa as $i,ab as yf,ac as Tf,ad as Cf,ae as kf,af as Af,ag as Rf,ah as wf,ai as Of,aj as Nf,ak as Ki,al as If,am as Df,an as Mf,ao as Pf,ap as Ta,aq as Lf,ar as Ff,as as Bf,at as v7,au as E7,av as zf,aw as sa,ax as $a,ay as Je,az as Xi,aA as Ln,aB as Uf,aC as Gf,aD as Zr,aE as qf,aF as jf,aG as Hf,aH as za,aI as Vf,aJ as Yf,aK as a1,aL as Wf,aM as Ei,aN as $f,aO as Kf,o as W,aP as Qf,aQ as Rt,aR as Jf,aS as Xf,aT as Zf,aU as xi,aV as Sa,aW as _e,aX as eb,aY as ab,aZ as Ba,a_ as We,a$ as S7,b0 as nb,b1 as n1,b2 as ib,b3 as tb,b4 as rb,b5 as ob,b6 as sb,b7 as mb,b8 as Yi,b9 as ur,ba as lb,bb as cb,bc as db,t as Te,bd as y7,be as T7,bf as ub,bg as Qn,bh as _i,bi as tn,bj as pb,bk as gb,bl as S,bm as xb,bn as _b,bo as hb,bp as fb,bq as C7,br as bb,bs as vb,bt as Eb,bu as k7,bv as Sb,bw as yb,bx as Tb,by as Cb,bz as kb,bA as ar,bB as pr,bC as ir,bD as Ab,bE as Rb,bF as la,bG as Xa,bH as i1,bI as wb,bJ as Ob,w as ce,bK as Nb,bL as Tn,bM as gi,bN as Ib,bO as bn,bP as Db,bQ as Ka,bR as Mb,bS as Pb,bT as Xd,bU as Ua,bV as Za,bW as hn,bX as ye,bY as An,bZ as A7,b_ as an,b$ as Lb,_ as Zi,u as Fb}from"./Dhxe2AST.js";import"./CTO2oVUC.js";/** * vue v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const Bb=()=>{},zb=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Lh,BaseTransitionPropsValidators:Fh,Comment:h7,DeprecationTypes:Bh,EffectScope:zh,ErrorCodes:Uh,ErrorTypeStrings:Gh,Fragment:ya,KeepAlive:qh,ReactiveEffect:jh,Static:Hh,Suspense:Vh,Teleport:Jc,Text:Yh,TrackOpTypes:Wh,Transition:$h,TransitionGroup:f7,TriggerOpTypes:Kh,VueElement:Qh,assertNumber:Jh,callWithAsyncErrorHandling:Xh,callWithErrorHandling:Zh,camelize:Xc,capitalize:ef,cloneVNode:af,compatUtils:nf,compile:Bb,computed:Ee,createApp:tf,createBlock:Me,createCommentVNode:Pe,createElementBlock:de,createElementVNode:k,createHydrationRenderer:rf,createPropsRestProxy:of,createRenderer:sf,createSSRApp:mf,createSlots:lf,createStaticVNode:Wi,createTextVNode:Ne,createVNode:H,customRef:b7,defineAsyncComponent:cf,defineComponent:De,defineCustomElement:df,defineEmits:uf,defineExpose:pf,defineModel:gf,defineOptions:xf,defineProps:_f,defineSSRCustomElement:hf,defineSlots:ff,devtools:bf,effect:vf,effectScope:Zc,getCurrentInstance:vi,getCurrentScope:e1,getCurrentWatcher:Ef,getTransitionRawChildren:Sf,guardReactiveProps:Ji,h:$i,handleError:yf,hasInjectionContext:Tf,hydrate:Cf,hydrateOnIdle:kf,hydrateOnInteraction:Af,hydrateOnMediaQuery:Rf,hydrateOnVisible:wf,initCustomFormatter:Of,initDirectivesForSSR:Nf,inject:Ki,isMemoSame:If,isProxy:Df,isReactive:Mf,isReadonly:Pf,isRef:Ta,isRuntimeOnly:Lf,isShallow:Ff,isVNode:Bf,markRaw:v7,mergeDefaults:E7,mergeModels:zf,mergeProps:sa,nextTick:$a,normalizeClass:Je,normalizeProps:Xi,normalizeStyle:Ln,onActivated:Uf,onBeforeMount:Gf,onBeforeUnmount:Zr,onBeforeUpdate:qf,onDeactivated:jf,onErrorCaptured:Hf,onMounted:za,onRenderTracked:Vf,onRenderTriggered:Yf,onScopeDispose:a1,onServerPrefetch:Wf,onUnmounted:Ei,onUpdated:$f,onWatcherCleanup:Kf,openBlock:W,popScopeId:Qf,provide:Rt,proxyRefs:Jf,pushScopeId:Xf,queuePostFlushCb:Zf,reactive:xi,readonly:Sa,ref:_e,registerRuntimeCompiler:eb,render:ab,renderList:Ba,renderSlot:We,resolveComponent:S7,resolveDirective:nb,resolveDynamicComponent:n1,resolveFilter:ib,resolveTransitionHooks:tb,setBlockTracking:rb,setDevtoolsHook:ob,setTransitionHooks:sb,shallowReactive:mb,shallowReadonly:Yi,shallowRef:ur,ssrContextKey:lb,ssrUtils:cb,stop:db,toDisplayString:Te,toHandlerKey:y7,toHandlers:T7,toRaw:ub,toRef:Qn,toRefs:_i,toValue:tn,transformVNodeArgs:pb,triggerRef:gb,unref:S,useAttrs:xb,useCssModule:_b,useCssVars:hb,useHost:fb,useId:C7,useModel:bb,useSSRContext:vb,useShadowRoot:Eb,useSlots:k7,useTemplateRef:Sb,useTransitionState:yb,vModelCheckbox:Tb,vModelDynamic:Cb,vModelRadio:kb,vModelSelect:ar,vModelText:pr,vShow:ir,version:Ab,warn:Rb,watch:la,watchEffect:Xa,watchPostEffect:i1,watchSyncEffect:wb,withAsyncContext:Ob,withCtx:ce,withDefaults:Nb,withDirectives:Tn,withKeys:gi,withMemo:Ib,withModifiers:bn,withScopeId:Db},Symbol.toStringTag,{value:"Module"}));function Zd(n){return typeof n=="string"?`'${n}'`:new Ub().serialize(n)}const Ub=function(){var e;class n{constructor(){Jd(this,e,new Map)}compare(o,m){const c=typeof o,u=typeof m;return c==="string"&&u==="string"?o.localeCompare(m):c==="number"&&u==="number"?o-m:String.prototype.localeCompare.call(this.serialize(o,!0),this.serialize(m,!0))}serialize(o,m){if(o===null)return"null";switch(typeof o){case"string":return m?o:`'${o}'`;case"bigint":return`${o}n`;case"object":return this.$object(o);case"function":return this.$function(o)}return String(o)}serializeObject(o){const m=Object.prototype.toString.call(o);if(m!=="[object Object]")return this.serializeBuiltInType(m.length<10?`unknown:${m}`:m.slice(8,-1),o);const c=o.constructor,u=c===Object||c===void 0?"":c.name;if(u!==""&&globalThis[u]===c)return this.serializeBuiltInType(u,o);if(typeof o.toJSON=="function"){const p=o.toJSON();return u+(p!==null&&typeof p=="object"?this.$object(p):`(${this.serialize(p)})`)}return this.serializeObjectEntries(u,Object.entries(o))}serializeBuiltInType(o,m){const c=this["$"+o];if(c)return c.call(this,m);if(typeof(m==null?void 0:m.entries)=="function")return this.serializeObjectEntries(o,m.entries());throw new Error(`Cannot serialize ${o}`)}serializeObjectEntries(o,m){const c=Array.from(m).sort((p,f)=>this.compare(p[0],f[0]));let u=`${o}{`;for(let p=0;p<c.length;p++){const[f,h]=c[p];u+=`${this.serialize(f,!0)}:${this.serialize(h)}`,p<c.length-1&&(u+=",")}return u+"}"}$object(o){let m=Xt(this,e).get(o);return m===void 0&&(Xt(this,e).set(o,`#${Xt(this,e).size}`),m=this.serializeObject(o),Xt(this,e).set(o,m)),m}$function(o){const m=Function.prototype.toString.call(o);return m.slice(-15)==="[native code] }"?`${o.name||""}()[native]`:`${o.name}(${o.length})${m.replace(/\s*\n\s*/g,"")}`}$Array(o){let m="[";for(let c=0;c<o.length;c++)m+=this.serialize(o[c]),c<o.length-1&&(m+=",");return m+"]"}$Date(o){try{return`Date(${o.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(o){return`ArrayBuffer[${new Uint8Array(o).join(",")}]`}$Set(o){return`Set${this.$Array(Array.from(o).sort((m,c)=>this.compare(m,c)))}`}$Map(o){return this.serializeObjectEntries("Map",o.entries())}}e=new WeakMap;for(const t of["Error","RegExp","URL"])n.prototype["$"+t]=function(o){return`${t}(${o})`};for(const t of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])n.prototype["$"+t]=function(o){return`${t}[${o.join(",")}]`};for(const t of["BigInt64Array","BigUint64Array"])n.prototype["$"+t]=function(o){return`${t}[${o.join("n,")}${o.length>0?"n":""}]`};return n}();function Gb(n,e){return n===e||Zd(n)===Zd(e)}const qb=["top","right","bottom","left"],Ni=Math.min,yn=Math.max,Vr=Math.round,zr=Math.floor,Xn=n=>({x:n,y:n}),jb={left:"right",right:"left",bottom:"top",top:"bottom"},Hb={start:"end",end:"start"};function zc(n,e,t){return yn(n,Ni(e,t))}function hi(n,e){return typeof n=="function"?n(e):n}function fi(n){return n.split("-")[0]}function Nt(n){return n.split("-")[1]}function t1(n){return n==="x"?"y":"x"}function r1(n){return n==="y"?"height":"width"}function Jn(n){return["top","bottom"].includes(fi(n))?"y":"x"}function o1(n){return t1(Jn(n))}function Vb(n,e,t){t===void 0&&(t=!1);const o=Nt(n),m=o1(n),c=r1(m);let u=m==="x"?o===(t?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[c]>e.floating[c]&&(u=Yr(u)),[u,Yr(u)]}function Yb(n){const e=Yr(n);return[Uc(n),e,Uc(e)]}function Uc(n){return n.replace(/start|end/g,e=>Hb[e])}function Wb(n,e,t){const o=["left","right"],m=["right","left"],c=["top","bottom"],u=["bottom","top"];switch(n){case"top":case"bottom":return t?e?m:o:e?o:m;case"left":case"right":return e?c:u;default:return[]}}function $b(n,e,t,o){const m=Nt(n);let c=Wb(fi(n),t==="start",o);return m&&(c=c.map(u=>u+"-"+m),e&&(c=c.concat(c.map(Uc)))),c}function Yr(n){return n.replace(/left|right|bottom|top/g,e=>jb[e])}function Kb(n){return{top:0,right:0,bottom:0,left:0,...n}}function R7(n){return typeof n!="number"?Kb(n):{top:n,right:n,bottom:n,left:n}}function Wr(n){const{x:e,y:t,width:o,height:m}=n;return{width:o,height:m,top:t,left:e,right:e+o,bottom:t+m,x:e,y:t}}function e2(n,e,t){let{reference:o,floating:m}=n;const c=Jn(e),u=o1(e),p=r1(u),f=fi(e),h=c==="y",_=o.x+o.width/2-m.width/2,x=o.y+o.height/2-m.height/2,b=o[p]/2-m[p]/2;let y;switch(f){case"top":y={x:_,y:o.y-m.height};break;case"bottom":y={x:_,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:x};break;case"left":y={x:o.x-m.width,y:x};break;default:y={x:o.x,y:o.y}}switch(Nt(e)){case"start":y[u]-=b*(t&&h?-1:1);break;case"end":y[u]+=b*(t&&h?-1:1);break}return y}const Qb=async(n,e,t)=>{const{placement:o="bottom",strategy:m="absolute",middleware:c=[],platform:u}=t,p=c.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(e));let h=await u.getElementRects({reference:n,floating:e,strategy:m}),{x:_,y:x}=e2(h,o,f),b=o,y={},T=0;for(let C=0;C<p.length;C++){const{name:O,fn:I}=p[C],{x:A,y:w,data:N,reset:L}=await I({x:_,y:x,initialPlacement:o,placement:b,strategy:m,middlewareData:y,rects:h,platform:u,elements:{reference:n,floating:e}});_=A??_,x=w??x,y={...y,[O]:{...y[O],...N}},L&&T<=50&&(T++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(h=L.rects===!0?await u.getElementRects({reference:n,floating:e,strategy:m}):L.rects),{x:_,y:x}=e2(h,b,f)),C=-1)}return{x:_,y:x,placement:b,strategy:m,middlewareData:y}};async function tr(n,e){var t;e===void 0&&(e={});const{x:o,y:m,platform:c,rects:u,elements:p,strategy:f}=n,{boundary:h="clippingAncestors",rootBoundary:_="viewport",elementContext:x="floating",altBoundary:b=!1,padding:y=0}=hi(e,n),T=R7(y),O=p[b?x==="floating"?"reference":"floating":x],I=Wr(await c.getClippingRect({element:(t=await(c.isElement==null?void 0:c.isElement(O)))==null||t?O:O.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(p.floating)),boundary:h,rootBoundary:_,strategy:f})),A=x==="floating"?{x:o,y:m,width:u.floating.width,height:u.floating.height}:u.reference,w=await(c.getOffsetParent==null?void 0:c.getOffsetParent(p.floating)),N=await(c.isElement==null?void 0:c.isElement(w))?await(c.getScale==null?void 0:c.getScale(w))||{x:1,y:1}:{x:1,y:1},L=Wr(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:p,rect:A,offsetParent:w,strategy:f}):A);return{top:(I.top-L.top+T.top)/N.y,bottom:(L.bottom-I.bottom+T.bottom)/N.y,left:(I.left-L.left+T.left)/N.x,right:(L.right-I.right+T.right)/N.x}}const Jb=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:o,placement:m,rects:c,platform:u,elements:p,middlewareData:f}=e,{element:h,padding:_=0}=hi(n,e)||{};if(h==null)return{};const x=R7(_),b={x:t,y:o},y=o1(m),T=r1(y),C=await u.getDimensions(h),O=y==="y",I=O?"top":"left",A=O?"bottom":"right",w=O?"clientHeight":"clientWidth",N=c.reference[T]+c.reference[y]-b[y]-c.floating[T],L=b[y]-c.reference[y],M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let q=M?M[w]:0;(!q||!await(u.isElement==null?void 0:u.isElement(M)))&&(q=p.floating[w]||c.floating[T]);const $=N/2-L/2,j=q/2-C[T]/2-1,Y=Ni(x[I],j),P=Ni(x[A],j),V=Y,G=q-C[T]-P,B=q/2-C[T]/2+$,U=zc(V,B,G),F=!f.arrow&&Nt(m)!=null&&B!==U&&c.reference[T]/2-(B<V?Y:P)-C[T]/2<0,ae=F?B<V?B-V:B-G:0;return{[y]:b[y]+ae,data:{[y]:U,centerOffset:B-U-ae,...F&&{alignmentOffset:ae}},reset:F}}}),Xb=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,o;const{placement:m,middlewareData:c,rects:u,initialPlacement:p,platform:f,elements:h}=e,{mainAxis:_=!0,crossAxis:x=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:C=!0,...O}=hi(n,e);if((t=c.arrow)!=null&&t.alignmentOffset)return{};const I=fi(m),A=Jn(p),w=fi(p)===p,N=await(f.isRTL==null?void 0:f.isRTL(h.floating)),L=b||(w||!C?[Yr(p)]:Yb(p)),M=T!=="none";!b&&M&&L.push(...$b(p,C,T,N));const q=[p,...L],$=await tr(e,O),j=[];let Y=((o=c.flip)==null?void 0:o.overflows)||[];if(_&&j.push($[I]),x){const B=Vb(m,u,N);j.push($[B[0]],$[B[1]])}if(Y=[...Y,{placement:m,overflows:j}],!j.every(B=>B<=0)){var P,V;const B=(((P=c.flip)==null?void 0:P.index)||0)+1,U=q[B];if(U&&(!(x==="alignment"?A!==Jn(U):!1)||Y.every(be=>be.overflows[0]>0&&Jn(be.placement)===A)))return{data:{index:B,overflows:Y},reset:{placement:U}};let F=(V=Y.filter(ae=>ae.overflows[0]<=0).sort((ae,be)=>ae.overflows[1]-be.overflows[1])[0])==null?void 0:V.placement;if(!F)switch(y){case"bestFit":{var G;const ae=(G=Y.filter(be=>{if(M){const fe=Jn(be.placement);return fe===A||fe==="y"}return!0}).map(be=>[be.placement,be.overflows.filter(fe=>fe>0).reduce((fe,we)=>fe+we,0)]).sort((be,fe)=>be[1]-fe[1])[0])==null?void 0:G[0];ae&&(F=ae);break}case"initialPlacement":F=p;break}if(m!==F)return{reset:{placement:F}}}return{}}}};function a2(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function n2(n){return qb.some(e=>n[e]>=0)}const Zb=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:o="referenceHidden",...m}=hi(n,e);switch(o){case"referenceHidden":{const c=await tr(e,{...m,elementContext:"reference"}),u=a2(c,t.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:n2(u)}}}case"escaped":{const c=await tr(e,{...m,altBoundary:!0}),u=a2(c,t.floating);return{data:{escapedOffsets:u,escaped:n2(u)}}}default:return{}}}}};async function ev(n,e){const{placement:t,platform:o,elements:m}=n,c=await(o.isRTL==null?void 0:o.isRTL(m.floating)),u=fi(t),p=Nt(t),f=Jn(t)==="y",h=["left","top"].includes(u)?-1:1,_=c&&f?-1:1,x=hi(e,n);let{mainAxis:b,crossAxis:y,alignmentAxis:T}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return p&&typeof T=="number"&&(y=p==="end"?T*-1:T),f?{x:y*_,y:b*h}:{x:b*h,y:y*_}}const av=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,o;const{x:m,y:c,placement:u,middlewareData:p}=e,f=await ev(e,n);return u===((t=p.offset)==null?void 0:t.placement)&&(o=p.arrow)!=null&&o.alignmentOffset?{}:{x:m+f.x,y:c+f.y,data:{...f,placement:u}}}}},nv=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:o,placement:m}=e,{mainAxis:c=!0,crossAxis:u=!1,limiter:p={fn:O=>{let{x:I,y:A}=O;return{x:I,y:A}}},...f}=hi(n,e),h={x:t,y:o},_=await tr(e,f),x=Jn(fi(m)),b=t1(x);let y=h[b],T=h[x];if(c){const O=b==="y"?"top":"left",I=b==="y"?"bottom":"right",A=y+_[O],w=y-_[I];y=zc(A,y,w)}if(u){const O=x==="y"?"top":"left",I=x==="y"?"bottom":"right",A=T+_[O],w=T-_[I];T=zc(A,T,w)}const C=p.fn({...e,[b]:y,[x]:T});return{...C,data:{x:C.x-t,y:C.y-o,enabled:{[b]:c,[x]:u}}}}}},iv=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:o,placement:m,rects:c,middlewareData:u}=e,{offset:p=0,mainAxis:f=!0,crossAxis:h=!0}=hi(n,e),_={x:t,y:o},x=Jn(m),b=t1(x);let y=_[b],T=_[x];const C=hi(p,e),O=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(f){const w=b==="y"?"height":"width",N=c.reference[b]-c.floating[w]+O.mainAxis,L=c.reference[b]+c.reference[w]-O.mainAxis;y<N?y=N:y>L&&(y=L)}if(h){var I,A;const w=b==="y"?"width":"height",N=["top","left"].includes(fi(m)),L=c.reference[x]-c.floating[w]+(N&&((I=u.offset)==null?void 0:I[x])||0)+(N?0:O.crossAxis),M=c.reference[x]+c.reference[w]+(N?0:((A=u.offset)==null?void 0:A[x])||0)-(N?O.crossAxis:0);T<L?T=L:T>M&&(T=M)}return{[b]:y,[x]:T}}}},tv=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,o;const{placement:m,rects:c,platform:u,elements:p}=e,{apply:f=()=>{},...h}=hi(n,e),_=await tr(e,h),x=fi(m),b=Nt(m),y=Jn(m)==="y",{width:T,height:C}=c.floating;let O,I;x==="top"||x==="bottom"?(O=x,I=b===(await(u.isRTL==null?void 0:u.isRTL(p.floating))?"start":"end")?"left":"right"):(I=x,O=b==="end"?"top":"bottom");const A=C-_.top-_.bottom,w=T-_.left-_.right,N=Ni(C-_[O],A),L=Ni(T-_[I],w),M=!e.middlewareData.shift;let q=N,$=L;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&($=w),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(q=A),M&&!b){const Y=yn(_.left,0),P=yn(_.right,0),V=yn(_.top,0),G=yn(_.bottom,0);y?$=T-2*(Y!==0||P!==0?Y+P:yn(_.left,_.right)):q=C-2*(V!==0||G!==0?V+G:yn(_.top,_.bottom))}await f({...e,availableWidth:$,availableHeight:q});const j=await u.getDimensions(p.floating);return T!==j.width||C!==j.height?{reset:{rects:!0}}:{}}}};function eo(){return typeof window<"u"}function et(n){return s1(n)?(n.nodeName||"").toLowerCase():"#document"}function Cn(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function ai(n){var e;return(e=(s1(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function s1(n){return eo()?n instanceof Node||n instanceof Cn(n).Node:!1}function jn(n){return eo()?n instanceof Element||n instanceof Cn(n).Element:!1}function Zn(n){return eo()?n instanceof HTMLElement||n instanceof Cn(n).HTMLElement:!1}function i2(n){return!eo()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Cn(n).ShadowRoot}function gr(n){const{overflow:e,overflowX:t,overflowY:o,display:m}=Hn(n);return/auto|scroll|overlay|hidden|clip/.test(e+o+t)&&!["inline","contents"].includes(m)}function rv(n){return["table","td","th"].includes(et(n))}function ao(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function m1(n){const e=l1(),t=jn(n)?Hn(n):n;return["transform","translate","scale","rotate","perspective"].some(o=>t[o]?t[o]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(t.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(t.contain||"").includes(o))}function ov(n){let e=Ii(n);for(;Zn(e)&&!Ot(e);){if(m1(e))return e;if(ao(e))return null;e=Ii(e)}return null}function l1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ot(n){return["html","body","#document"].includes(et(n))}function Hn(n){return Cn(n).getComputedStyle(n)}function no(n){return jn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Ii(n){if(et(n)==="html")return n;const e=n.assignedSlot||n.parentNode||i2(n)&&n.host||ai(n);return i2(e)?e.host:e}function w7(n){const e=Ii(n);return Ot(e)?n.ownerDocument?n.ownerDocument.body:n.body:Zn(e)&&gr(e)?e:w7(e)}function rr(n,e,t){var o;e===void 0&&(e=[]),t===void 0&&(t=!0);const m=w7(n),c=m===((o=n.ownerDocument)==null?void 0:o.body),u=Cn(m);if(c){const p=Gc(u);return e.concat(u,u.visualViewport||[],gr(m)?m:[],p&&t?rr(p):[])}return e.concat(m,rr(m,[],t))}function Gc(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function O7(n){const e=Hn(n);let t=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const m=Zn(n),c=m?n.offsetWidth:t,u=m?n.offsetHeight:o,p=Vr(t)!==c||Vr(o)!==u;return p&&(t=c,o=u),{width:t,height:o,$:p}}function c1(n){return jn(n)?n:n.contextElement}function wt(n){const e=c1(n);if(!Zn(e))return Xn(1);const t=e.getBoundingClientRect(),{width:o,height:m,$:c}=O7(e);let u=(c?Vr(t.width):t.width)/o,p=(c?Vr(t.height):t.height)/m;return(!u||!Number.isFinite(u))&&(u=1),(!p||!Number.isFinite(p))&&(p=1),{x:u,y:p}}const sv=Xn(0);function N7(n){const e=Cn(n);return!l1()||!e.visualViewport?sv:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function mv(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Cn(n)?!1:e}function Qi(n,e,t,o){e===void 0&&(e=!1),t===void 0&&(t=!1);const m=n.getBoundingClientRect(),c=c1(n);let u=Xn(1);e&&(o?jn(o)&&(u=wt(o)):u=wt(n));const p=mv(c,t,o)?N7(c):Xn(0);let f=(m.left+p.x)/u.x,h=(m.top+p.y)/u.y,_=m.width/u.x,x=m.height/u.y;if(c){const b=Cn(c),y=o&&jn(o)?Cn(o):o;let T=b,C=Gc(T);for(;C&&o&&y!==T;){const O=wt(C),I=C.getBoundingClientRect(),A=Hn(C),w=I.left+(C.clientLeft+parseFloat(A.paddingLeft))*O.x,N=I.top+(C.clientTop+parseFloat(A.paddingTop))*O.y;f*=O.x,h*=O.y,_*=O.x,x*=O.y,f+=w,h+=N,T=Cn(C),C=Gc(T)}}return Wr({width:_,height:x,x:f,y:h})}function d1(n,e){const t=no(n).scrollLeft;return e?e.left+t:Qi(ai(n)).left+t}function I7(n,e,t){t===void 0&&(t=!1);const o=n.getBoundingClientRect(),m=o.left+e.scrollLeft-(t?0:d1(n,o)),c=o.top+e.scrollTop;return{x:m,y:c}}function lv(n){let{elements:e,rect:t,offsetParent:o,strategy:m}=n;const c=m==="fixed",u=ai(o),p=e?ao(e.floating):!1;if(o===u||p&&c)return t;let f={scrollLeft:0,scrollTop:0},h=Xn(1);const _=Xn(0),x=Zn(o);if((x||!x&&!c)&&((et(o)!=="body"||gr(u))&&(f=no(o)),Zn(o))){const y=Qi(o);h=wt(o),_.x=y.x+o.clientLeft,_.y=y.y+o.clientTop}const b=u&&!x&&!c?I7(u,f,!0):Xn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-f.scrollLeft*h.x+_.x+b.x,y:t.y*h.y-f.scrollTop*h.y+_.y+b.y}}function cv(n){return Array.from(n.getClientRects())}function dv(n){const e=ai(n),t=no(n),o=n.ownerDocument.body,m=yn(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),c=yn(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let u=-t.scrollLeft+d1(n);const p=-t.scrollTop;return Hn(o).direction==="rtl"&&(u+=yn(e.clientWidth,o.clientWidth)-m),{width:m,height:c,x:u,y:p}}function uv(n,e){const t=Cn(n),o=ai(n),m=t.visualViewport;let c=o.clientWidth,u=o.clientHeight,p=0,f=0;if(m){c=m.width,u=m.height;const h=l1();(!h||h&&e==="fixed")&&(p=m.offsetLeft,f=m.offsetTop)}return{width:c,height:u,x:p,y:f}}function pv(n,e){const t=Qi(n,!0,e==="fixed"),o=t.top+n.clientTop,m=t.left+n.clientLeft,c=Zn(n)?wt(n):Xn(1),u=n.clientWidth*c.x,p=n.clientHeight*c.y,f=m*c.x,h=o*c.y;return{width:u,height:p,x:f,y:h}}function t2(n,e,t){let o;if(e==="viewport")o=uv(n,t);else if(e==="document")o=dv(ai(n));else if(jn(e))o=pv(e,t);else{const m=N7(n);o={x:e.x-m.x,y:e.y-m.y,width:e.width,height:e.height}}return Wr(o)}function D7(n,e){const t=Ii(n);return t===e||!jn(t)||Ot(t)?!1:Hn(t).position==="fixed"||D7(t,e)}function gv(n,e){const t=e.get(n);if(t)return t;let o=rr(n,[],!1).filter(p=>jn(p)&&et(p)!=="body"),m=null;const c=Hn(n).position==="fixed";let u=c?Ii(n):n;for(;jn(u)&&!Ot(u);){const p=Hn(u),f=m1(u);!f&&p.position==="fixed"&&(m=null),(c?!f&&!m:!f&&p.position==="static"&&!!m&&["absolute","fixed"].includes(m.position)||gr(u)&&!f&&D7(n,u))?o=o.filter(_=>_!==u):m=p,u=Ii(u)}return e.set(n,o),o}function xv(n){let{element:e,boundary:t,rootBoundary:o,strategy:m}=n;const u=[...t==="clippingAncestors"?ao(e)?[]:gv(e,this._c):[].concat(t),o],p=u[0],f=u.reduce((h,_)=>{const x=t2(e,_,m);return h.top=yn(x.top,h.top),h.right=Ni(x.right,h.right),h.bottom=Ni(x.bottom,h.bottom),h.left=yn(x.left,h.left),h},t2(e,p,m));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function _v(n){const{width:e,height:t}=O7(n);return{width:e,height:t}}function hv(n,e,t){const o=Zn(e),m=ai(e),c=t==="fixed",u=Qi(n,!0,c,e);let p={scrollLeft:0,scrollTop:0};const f=Xn(0);function h(){f.x=d1(m)}if(o||!o&&!c)if((et(e)!=="body"||gr(m))&&(p=no(e)),o){const y=Qi(e,!0,c,e);f.x=y.x+e.clientLeft,f.y=y.y+e.clientTop}else m&&h();c&&!o&&m&&h();const _=m&&!o&&!c?I7(m,p):Xn(0),x=u.left+p.scrollLeft-f.x-_.x,b=u.top+p.scrollTop-f.y-_.y;return{x,y:b,width:u.width,height:u.height}}function Zo(n){return Hn(n).position==="static"}function r2(n,e){if(!Zn(n)||Hn(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return ai(n)===t&&(t=t.ownerDocument.body),t}function M7(n,e){const t=Cn(n);if(ao(n))return t;if(!Zn(n)){let m=Ii(n);for(;m&&!Ot(m);){if(jn(m)&&!Zo(m))return m;m=Ii(m)}return t}let o=r2(n,e);for(;o&&rv(o)&&Zo(o);)o=r2(o,e);return o&&Ot(o)&&Zo(o)&&!m1(o)?t:o||ov(n)||t}const fv=async function(n){const e=this.getOffsetParent||M7,t=this.getDimensions,o=await t(n.floating);return{reference:hv(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bv(n){return Hn(n).direction==="rtl"}const vv={convertOffsetParentRelativeRectToViewportRelativeRect:lv,getDocumentElement:ai,getClippingRect:xv,getOffsetParent:M7,getElementRects:fv,getClientRects:cv,getDimensions:_v,getScale:wt,isElement:jn,isRTL:bv};function P7(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function Ev(n,e){let t=null,o;const m=ai(n);function c(){var p;clearTimeout(o),(p=t)==null||p.disconnect(),t=null}function u(p,f){p===void 0&&(p=!1),f===void 0&&(f=1),c();const h=n.getBoundingClientRect(),{left:_,top:x,width:b,height:y}=h;if(p||e(),!b||!y)return;const T=zr(x),C=zr(m.clientWidth-(_+b)),O=zr(m.clientHeight-(x+y)),I=zr(_),w={rootMargin:-T+"px "+-C+"px "+-O+"px "+-I+"px",threshold:yn(0,Ni(1,f))||1};let N=!0;function L(M){const q=M[0].intersectionRatio;if(q!==f){if(!N)return u();q?u(!1,q):o=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!P7(h,n.getBoundingClientRect())&&u(),N=!1}try{t=new IntersectionObserver(L,{...w,root:m.ownerDocument})}catch{t=new IntersectionObserver(L,w)}t.observe(n)}return u(!0),c}function Sv(n,e,t,o){o===void 0&&(o={});const{ancestorScroll:m=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:p=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,h=c1(n),_=m||c?[...h?rr(h):[],...rr(e)]:[];_.forEach(I=>{m&&I.addEventListener("scroll",t,{passive:!0}),c&&I.addEventListener("resize",t)});const x=h&&p?Ev(h,t):null;let b=-1,y=null;u&&(y=new ResizeObserver(I=>{let[A]=I;A&&A.target===h&&y&&(y.unobserve(e),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(e)})),t()}),h&&!f&&y.observe(h),y.observe(e));let T,C=f?Qi(n):null;f&&O();function O(){const I=Qi(n);C&&!P7(C,I)&&t(),C=I,T=requestAnimationFrame(O)}return t(),()=>{var I;_.forEach(A=>{m&&A.removeEventListener("scroll",t),c&&A.removeEventListener("resize",t)}),x==null||x(),(I=y)==null||I.disconnect(),y=null,f&&cancelAnimationFrame(T)}}const yv=av,Tv=nv,o2=Xb,Cv=tv,kv=Zb,Av=Jb,Rv=iv,wv=(n,e,t)=>{const o=new Map,m={platform:vv,...t},c={...m.platform,_c:o};return Qb(n,e,{...m,platform:c})};function Ov(n){return n!=null&&typeof n=="object"&&"$el"in n}function qc(n){if(Ov(n)){const e=n.$el;return s1(e)&&et(e)==="#comment"?null:e}return n}function kt(n){return typeof n=="function"?n():S(n)}function Nv(n){return{name:"arrow",options:n,fn(e){const t=qc(kt(n.element));return t==null?{}:Av({element:t,padding:n.padding}).fn(e)}}}function L7(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function s2(n,e){const t=L7(n);return Math.round(e*t)/t}function Iv(n,e,t){t===void 0&&(t={});const o=t.whileElementsMounted,m=Ee(()=>{var q;return(q=kt(t.open))!=null?q:!0}),c=Ee(()=>kt(t.middleware)),u=Ee(()=>{var q;return(q=kt(t.placement))!=null?q:"bottom"}),p=Ee(()=>{var q;return(q=kt(t.strategy))!=null?q:"absolute"}),f=Ee(()=>{var q;return(q=kt(t.transform))!=null?q:!0}),h=Ee(()=>qc(n.value)),_=Ee(()=>qc(e.value)),x=_e(0),b=_e(0),y=_e(p.value),T=_e(u.value),C=ur({}),O=_e(!1),I=Ee(()=>{const q={position:y.value,left:"0",top:"0"};if(!_.value)return q;const $=s2(_.value,x.value),j=s2(_.value,b.value);return f.value?{...q,transform:"translate("+$+"px, "+j+"px)",...L7(_.value)>=1.5&&{willChange:"transform"}}:{position:y.value,left:$+"px",top:j+"px"}});let A;function w(){if(h.value==null||_.value==null)return;const q=m.value;wv(h.value,_.value,{middleware:c.value,placement:u.value,strategy:p.value}).then($=>{x.value=$.x,b.value=$.y,y.value=$.strategy,T.value=$.placement,C.value=$.middlewareData,O.value=q!==!1})}function N(){typeof A=="function"&&(A(),A=void 0)}function L(){if(N(),o===void 0){w();return}if(h.value!=null&&_.value!=null){A=o(h.value,_.value,w);return}}function M(){m.value||(O.value=!1)}return la([c,u,p,m],w,{flush:"sync"}),la([h,_],L,{flush:"sync"}),la(m,M,{flush:"sync"}),e1()&&a1(N),{x:Yi(x),y:Yi(b),strategy:Yi(y),placement:Yi(T),middlewareData:Yi(C),isPositioned:Yi(O),floatingStyles:I,update:w}}const F7=De({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(n){return(e,t)=>(W(),Me(S(Ka),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:ce(()=>[We(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function Dv(n,e){var t;const o=ur();return Xa(()=>{o.value=n()},{...e,flush:(t=void 0)!=null?t:"sync"}),Sa(o)}function It(n){return e1()?(a1(n),!0):!1}function Mv(){const n=new Set,e=c=>{n.delete(c)};return{on:c=>{n.add(c);const u=()=>e(c);return It(u),{off:u}},off:e,trigger:(...c)=>Promise.all(Array.from(n).map(u=>u(...c))),clear:()=>{n.clear()}}}function Pv(n){let e=!1,t;const o=Zc(!0);return(...m)=>(e||(t=o.run(()=>n(...m)),e=!0),t)}function Lv(n){let e=0,t,o;const m=()=>{e-=1,o&&e<=0&&(o.stop(),t=void 0,o=void 0)};return(...c)=>(e+=1,o||(o=Zc(!0),t=o.run(()=>n(...c))),It(m),t)}const Si=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fv=n=>typeof n<"u",Bv=Object.prototype.toString,zv=n=>Bv.call(n)==="[object Object]",m2=Uv();function Uv(){var n,e;return Si&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Gv(n){return vi()}function es(n){return Array.isArray(n)?n:[n]}function B7(n,e=1e4){return b7((t,o)=>{let m=tn(n),c;const u=()=>setTimeout(()=>{m=tn(n),o()},tn(e));return It(()=>{clearTimeout(c)}),{get(){return t(),m},set(p){m=p,o(),clearTimeout(c),c=u()}}})}const qv=tn;function jv(n,e){Gv()&&Zr(n,e)}function z7(n,e,t={}){const{immediate:o=!0,immediateCallback:m=!1}=t,c=ur(!1);let u=null;function p(){u&&(clearTimeout(u),u=null)}function f(){c.value=!1,p()}function h(..._){m&&n(),p(),c.value=!0,u=setTimeout(()=>{c.value=!1,u=null,n(..._)},tn(e))}return o&&(c.value=!0,Si&&h()),It(f),{isPending:Sa(c),start:h,stop:f}}function Hv(n,e,t){return la(n,e,{...t,immediate:!0})}const io=Si?window:void 0;function ei(n){var e;const t=tn(n);return(e=t==null?void 0:t.$el)!=null?e:t}function $r(...n){const e=[],t=()=>{e.forEach(p=>p()),e.length=0},o=(p,f,h,_)=>(p.addEventListener(f,h,_),()=>p.removeEventListener(f,h,_)),m=Ee(()=>{const p=es(tn(n[0])).filter(f=>f!=null);return p.every(f=>typeof f!="string")?p:void 0}),c=Hv(()=>{var p,f;return[(f=(p=m.value)==null?void 0:p.map(h=>ei(h)))!=null?f:[io].filter(h=>h!=null),es(tn(m.value?n[1]:n[0])),es(S(m.value?n[2]:n[1])),tn(m.value?n[3]:n[2])]},([p,f,h,_])=>{if(t(),!(p!=null&&p.length)||!(f!=null&&f.length)||!(h!=null&&h.length))return;const x=zv(_)?{..._}:_;e.push(...p.flatMap(b=>f.flatMap(y=>h.map(T=>o(b,y,T,x)))))},{flush:"post"}),u=()=>{c(),t()};return It(t),u}function U7(){const n=ur(!1),e=vi();return e&&za(()=>{n.value=!0},e),n}function Vv(n){const e=U7();return Ee(()=>(e.value,!!n()))}function Yv(n){return typeof n=="function"?n:typeof n=="string"?e=>e.key===n:Array.isArray(n)?e=>n.includes(e.key):()=>!0}function Wv(...n){let e,t,o={};n.length===3?(e=n[0],t=n[1],o=n[2]):n.length===2?typeof n[1]=="object"?(e=!0,t=n[0],o=n[1]):(e=n[0],t=n[1]):(e=!0,t=n[0]);const{target:m=io,eventName:c="keydown",passive:u=!1,dedupe:p=!1}=o,f=Yv(e);return $r(m,c,_=>{_.repeat&&tn(p)||f(_)&&t(_)},u)}function $v(n){return JSON.parse(JSON.stringify(n))}function Kv(n,e,t={}){const{window:o=io,...m}=t;let c;const u=Vv(()=>o&&"ResizeObserver"in o),p=()=>{c&&(c.disconnect(),c=void 0)},f=Ee(()=>{const x=tn(n);return Array.isArray(x)?x.map(b=>ei(b)):[ei(x)]}),h=la(f,x=>{if(p(),u.value&&o){c=new ResizeObserver(e);for(const b of x)b&&c.observe(b,m)}},{immediate:!0,flush:"post"}),_=()=>{p(),h()};return It(_),{isSupported:u,stop:_}}function Kr(n,e,t,o={}){var m,c,u;const{clone:p=!1,passive:f=!1,eventName:h,deep:_=!1,defaultValue:x,shouldEmit:b}=o,y=vi(),T=t||(y==null?void 0:y.emit)||((m=y==null?void 0:y.$emit)==null?void 0:m.bind(y))||((u=(c=y==null?void 0:y.proxy)==null?void 0:c.$emit)==null?void 0:u.bind(y==null?void 0:y.proxy));let C=h;e||(e="modelValue"),C=C||`update:${e.toString()}`;const O=w=>p?typeof p=="function"?p(w):$v(w):w,I=()=>Fv(n[e])?O(n[e]):x,A=w=>{b?b(w)&&T(C,w):T(C,w)};if(f){const w=I(),N=_e(w);let L=!1;return la(()=>n[e],M=>{L||(L=!0,N.value=O(M),$a(()=>L=!1))}),la(N,M=>{!L&&(M!==n[e]||_)&&A(M)},{deep:_}),N}else return Ee({get(){return I()},set(w){A(w)}})}function ni(n,e){const t=typeof n=="string"&&!e?`${n}Context`:e,o=Symbol(t);return[u=>{const p=Ki(o,u);if(p||p===null)return p;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(n)?`one of the following components: ${n.join(", ")}`:`\`${n}\``}`)},u=>(Rt(o,u),u)]}function l2(n){return n==null}const[to,IF]=ni("ConfigProvider");function Qv(n){const e=to({dir:_e("ltr")});return Ee(()=>{var t;return(n==null?void 0:n.value)||((t=e.dir)==null?void 0:t.value)||"ltr"})}function Ca(){const n=vi(),e=_e(),t=Ee(()=>{var u,p;return["#text","#comment"].includes((u=e.value)==null?void 0:u.$el.nodeName)?(p=e.value)==null?void 0:p.$el.nextElementSibling:ei(e)}),o=Object.assign({},n.exposed),m={};for(const u in n.props)Object.defineProperty(m,u,{enumerable:!0,configurable:!0,get:()=>n.props[u]});if(Object.keys(o).length>0)for(const u in o)Object.defineProperty(m,u,{enumerable:!0,configurable:!0,get:()=>o[u]});Object.defineProperty(m,"$el",{enumerable:!0,configurable:!0,get:()=>n.vnode.el}),n.exposed=m;function c(u){e.value=u,u&&(Object.defineProperty(m,"$el",{enumerable:!0,configurable:!0,get:()=>u instanceof Element?u:u.$el}),n.exposed=m)}return{forwardRef:c,currentRef:e,currentElement:t}}let Jv=0;function or(n,e="reka"){var o;const t=to({useId:void 0});return Object.hasOwn(zb,"useId")?`${e}-${(o=C7)==null?void 0:o()}`:t.useId?`${e}-${t.useId()}`:`${e}-${++Jv}`}function Xv(n,e){const t=_e(n);function o(c){return e[t.value][c]??t.value}return{state:t,dispatch:c=>{t.value=o(c)}}}function Zv(n,e){var O;const t=_e({}),o=_e("none"),m=_e(n),c=n.value?"mounted":"unmounted";let u;const p=((O=e.value)==null?void 0:O.ownerDocument.defaultView)??io,{state:f,dispatch:h}=Xv(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),_=I=>{var A;if(Si){const w=new CustomEvent(I,{bubbles:!1,cancelable:!1});(A=e.value)==null||A.dispatchEvent(w)}};la(n,async(I,A)=>{var N;const w=A!==I;if(await $a(),w){const L=o.value,M=Ur(e.value);I?(h("MOUNT"),_("enter"),M==="none"&&_("after-enter")):M==="none"||M==="undefined"||((N=t.value)==null?void 0:N.display)==="none"?(h("UNMOUNT"),_("leave"),_("after-leave")):A&&L!==M?(h("ANIMATION_OUT"),_("leave")):(h("UNMOUNT"),_("after-leave"))}},{immediate:!0});const x=I=>{const A=Ur(e.value),w=A.includes(I.animationName),N=f.value==="mounted"?"enter":"leave";if(I.target===e.value&&w&&(_(`after-${N}`),h("ANIMATION_END"),!m.value)){const L=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",u=p==null?void 0:p.setTimeout(()=>{var M;((M=e.value)==null?void 0:M.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=L)})}I.target===e.value&&A==="none"&&h("ANIMATION_END")},b=I=>{I.target===e.value&&(o.value=Ur(e.value))},y=la(e,(I,A)=>{I?(t.value=getComputedStyle(I),I.addEventListener("animationstart",b),I.addEventListener("animationcancel",x),I.addEventListener("animationend",x)):(h("ANIMATION_END"),u!==void 0&&(p==null||p.clearTimeout(u)),A==null||A.removeEventListener("animationstart",b),A==null||A.removeEventListener("animationcancel",x),A==null||A.removeEventListener("animationend",x))},{immediate:!0}),T=la(f,()=>{const I=Ur(e.value);o.value=f.value==="mounted"?I:"none"});return Ei(()=>{y(),T()}),{isPresent:Ee(()=>["mounted","unmountSuspended"].includes(f.value))}}function Ur(n){return n&&getComputedStyle(n).animationName||"none"}const ro=De({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(n,{slots:e,expose:t}){var h;const{present:o,forceMount:m}=_i(n),c=_e(),{isPresent:u}=Zv(o,c);t({present:u});let p=e.default({present:u.value});p=Mb(p||[]);const f=vi();if(p&&(p==null?void 0:p.length)>1){const _=(h=f==null?void 0:f.parent)!=null&&h.type.name?`<${f.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${_}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(x=>` - ${x}`).join(` `)].join(` `))}return()=>m.value||o.value||u.value?$i(e.default({present:u.value})[0],{ref:_=>{const x=ei(_);return typeof(x==null?void 0:x.hasAttribute)>"u"||(x!=null&&x.hasAttribute("data-reka-popper-content-wrapper")?c.value=x.firstElementChild:c.value=x),x}}):null}}),[yi,eE]=ni("DialogRoot"),aE=De({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(n,{emit:e}){const t=n,m=Kr(t,"open",e,{defaultValue:t.defaultOpen,passive:t.open===void 0}),c=_e(),u=_e(),{modal:p}=_i(t);return eE({open:m,modal:p,openModal:()=>{m.value=!0},onOpenChange:f=>{m.value=f},onOpenToggle:()=>{m.value=!m.value},contentId:"",titleId:"",descriptionId:"",triggerElement:c,contentElement:u}),(f,h)=>We(f.$slots,"default",{open:S(m),close:()=>m.value=!1})}}),nE=De({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(n){const e=n;Ca();const t=yi();return(o,m)=>(W(),Me(S(Ka),sa(e,{type:o.as==="button"?"button":void 0,onClick:m[0]||(m[0]=c=>S(t).onOpenChange(!1))}),{default:ce(()=>[We(o.$slots,"default")]),_:3},16,["type"]))}});function oo(n){const e=vi(),t=e==null?void 0:e.type.emits,o={};return t!=null&&t.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),t==null||t.forEach(m=>{o[y7(Xc(m))]=(...c)=>n(m,...c)}),o}function kn(){let n=document.activeElement;if(n==null)return null;for(;n!=null&&n.shadowRoot!=null&&n.shadowRoot.activeElement!=null;)n=n.shadowRoot.activeElement;return n}function iE(n){return n?"open":"closed"}function c2(n){const e=kn();for(const t of n)if(t===e||(t.focus(),kn()!==e))return}const tE=Pv(()=>_e([]));function rE(){const n=tE();return{add(e){const t=n.value[0];e!==t&&(t==null||t.pause()),n.value=d2(n.value,e),n.value.unshift(e)},remove(e){var t;n.value=d2(n.value,e),(t=n.value[0])==null||t.resume()}}}function d2(n,e){const t=[...n],o=t.indexOf(e);return o!==-1&&t.splice(o,1),t}function oE(n){return n.filter(e=>e.tagName!=="A")}const as="focusScope.autoFocusOnMount",ns="focusScope.autoFocusOnUnmount",u2={bubbles:!1,cancelable:!0};function sE(n,{select:e=!1}={}){const t=kn();for(const o of n)if(Oi(o,{select:e}),kn()!==t)return!0}function mE(n){const e=G7(n),t=p2(e,n),o=p2(e.reverse(),n);return[t,o]}function G7(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const m=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||m?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function p2(n,e){for(const t of n)if(!lE(t,{upTo:e}))return t}function lE(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function cE(n){return n instanceof HTMLInputElement&&"select"in n}function Oi(n,{select:e=!1}={}){if(n&&n.focus){const t=kn();n.focus({preventScroll:!0}),n!==t&&cE(n)&&e&&n.select()}}const q7=De({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(n,{emit:e}){const t=n,o=e,{currentRef:m,currentElement:c}=Ca(),u=_e(null),p=rE(),f=xi({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Xa(_=>{if(!Si)return;const x=c.value;if(!t.trapped)return;function b(O){if(f.paused||!x)return;const I=O.target;x.contains(I)?u.value=I:Oi(u.value,{select:!0})}function y(O){if(f.paused||!x)return;const I=O.relatedTarget;I!==null&&(x.contains(I)||Oi(u.value,{select:!0}))}function T(O){x.contains(u.value)||Oi(x)}document.addEventListener("focusin",b),document.addEventListener("focusout",y);const C=new MutationObserver(T);x&&C.observe(x,{childList:!0,subtree:!0}),_(()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",y),C.disconnect()})}),Xa(async _=>{const x=c.value;if(await $a(),!x)return;p.add(f);const b=kn();if(!x.contains(b)){const T=new CustomEvent(as,u2);x.addEventListener(as,C=>o("mountAutoFocus",C)),x.dispatchEvent(T),T.defaultPrevented||(sE(oE(G7(x)),{select:!0}),kn()===b&&Oi(x))}_(()=>{x.removeEventListener(as,O=>o("mountAutoFocus",O));const T=new CustomEvent(ns,u2),C=O=>{o("unmountAutoFocus",O)};x.addEventListener(ns,C),x.dispatchEvent(T),setTimeout(()=>{T.defaultPrevented||Oi(b??document.body,{select:!0}),x.removeEventListener(ns,C),p.remove(f)},0)})});function h(_){if(!t.loop&&!t.trapped||f.paused)return;const x=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,b=kn();if(x&&b){const y=_.currentTarget,[T,C]=mE(y);T&&C?!_.shiftKey&&b===C?(_.preventDefault(),t.loop&&Oi(T,{select:!0})):_.shiftKey&&b===T&&(_.preventDefault(),t.loop&&Oi(C,{select:!0})):b===y&&_.preventDefault()}}return(_,x)=>(W(),Me(S(Ka),{ref_key:"currentRef",ref:m,tabindex:"-1","as-child":_.asChild,as:_.as,onKeydown:h},{default:ce(()=>[We(_.$slots,"default")]),_:3},8,["as-child","as"]))}});function u1(n,e,t){const o=t.originalEvent.target,m=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&o.addEventListener(n,e,{once:!0}),o.dispatchEvent(m)}const dE="dismissableLayer.pointerDownOutside",uE="dismissableLayer.focusOutside";function j7(n,e){const t=e.closest("[data-dismissable-layer]"),o=n.dataset.dismissableLayer===""?n:n.querySelector("[data-dismissable-layer]"),m=Array.from(n.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(t&&(o===t||m.indexOf(o)<m.indexOf(t)))}function pE(n,e,t=!0){var u;const o=((u=e==null?void 0:e.value)==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),m=_e(!1),c=_e(()=>{});return Xa(p=>{if(!Si||!tn(t))return;const f=async _=>{const x=_.target;if(!(!(e!=null&&e.value)||!x)){if(j7(e.value,x)){m.value=!1;return}if(_.target&&!m.value){let b=function(){u1(dE,n,y)};const y={originalEvent:_};_.pointerType==="touch"?(o.removeEventListener("click",c.value),c.value=b,o.addEventListener("click",c.value,{once:!0})):b()}else o.removeEventListener("click",c.value);m.value=!1}},h=window.setTimeout(()=>{o.addEventListener("pointerdown",f)},0);p(()=>{window.clearTimeout(h),o.removeEventListener("pointerdown",f),o.removeEventListener("click",c.value)})}),{onPointerDownCapture:()=>{tn(t)&&(m.value=!0)}}}function gE(n,e,t=!0){var c;const o=((c=e==null?void 0:e.value)==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),m=_e(!1);return Xa(u=>{if(!Si||!tn(t))return;const p=async f=>{if(!(e!=null&&e.value))return;await $a(),await $a();const h=f.target;!e.value||!h||j7(e.value,h)||f.target&&!m.value&&u1(uE,n,{originalEvent:f})};o.addEventListener("focusin",p),u(()=>o.removeEventListener("focusin",p))}),{onFocusCapture:()=>{tn(t)&&(m.value=!0)},onBlurCapture:()=>{tn(t)&&(m.value=!1)}}}const ui=xi({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),p1=De({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(n,{emit:e}){const t=n,o=e,{forwardRef:m,currentElement:c}=Ca(),u=Ee(()=>{var T;return((T=c.value)==null?void 0:T.ownerDocument)??globalThis.document}),p=Ee(()=>ui.layersRoot),f=Ee(()=>c.value?Array.from(p.value).indexOf(c.value):-1),h=Ee(()=>ui.layersWithOutsidePointerEventsDisabled.size>0),_=Ee(()=>{const T=Array.from(p.value),[C]=[...ui.layersWithOutsidePointerEventsDisabled].slice(-1),O=T.indexOf(C);return f.value>=O}),x=pE(async T=>{const C=[...ui.branches].some(O=>O==null?void 0:O.contains(T.target));!_.value||C||(o("pointerDownOutside",T),o("interactOutside",T),await $a(),T.defaultPrevented||o("dismiss"))},c),b=gE(T=>{[...ui.branches].some(O=>O==null?void 0:O.contains(T.target))||(o("focusOutside",T),o("interactOutside",T),T.defaultPrevented||o("dismiss"))},c);Wv("Escape",T=>{f.value===p.value.size-1&&(o("escapeKeyDown",T),T.defaultPrevented||o("dismiss"))});let y;return Xa(T=>{c.value&&(t.disableOutsidePointerEvents&&(ui.layersWithOutsidePointerEventsDisabled.size===0&&(y=u.value.body.style.pointerEvents,u.value.body.style.pointerEvents="none"),ui.layersWithOutsidePointerEventsDisabled.add(c.value)),p.value.add(c.value),T(()=>{t.disableOutsidePointerEvents&&ui.layersWithOutsidePointerEventsDisabled.size===1&&(u.value.body.style.pointerEvents=y)}))}),Xa(T=>{T(()=>{c.value&&(p.value.delete(c.value),ui.layersWithOutsidePointerEventsDisabled.delete(c.value))})}),(T,C)=>(W(),Me(S(Ka),{ref:S(m),"as-child":T.asChild,as:T.as,"data-dismissable-layer":"",style:Ln({pointerEvents:h.value?_.value?"auto":"none":void 0}),onFocusCapture:S(b).onFocusCapture,onBlurCapture:S(b).onBlurCapture,onPointerdownCapture:S(x).onPointerDownCapture},{default:ce(()=>[We(T.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),H7=De({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(n,{emit:e}){const t=n,o=e,m=yi(),{forwardRef:c,currentElement:u}=Ca();return m.titleId||(m.titleId=or(void 0,"reka-dialog-title")),m.descriptionId||(m.descriptionId=or(void 0,"reka-dialog-description")),za(()=>{m.contentElement=u,kn()!==document.body&&(m.triggerElement.value=kn())}),(p,f)=>(W(),Me(S(q7),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:f[5]||(f[5]=h=>o("openAutoFocus",h)),onUnmountAutoFocus:f[6]||(f[6]=h=>o("closeAutoFocus",h))},{default:ce(()=>[H(S(p1),sa({id:S(m).contentId,ref:S(c),as:p.as,"as-child":p.asChild,"disable-outside-pointer-events":p.disableOutsidePointerEvents,role:"dialog","aria-describedby":S(m).descriptionId,"aria-labelledby":S(m).titleId,"data-state":S(iE)(S(m).open.value)},p.$attrs,{onDismiss:f[0]||(f[0]=h=>S(m).onOpenChange(!1)),onEscapeKeyDown:f[1]||(f[1]=h=>o("escapeKeyDown",h)),onFocusOutside:f[2]||(f[2]=h=>o("focusOutside",h)),onInteractOutside:f[3]||(f[3]=h=>o("interactOutside",h)),onPointerDownOutside:f[4]||(f[4]=h=>o("pointerDownOutside",h))}),{default:ce(()=>[We(p.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}});var xE=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},Tt=new WeakMap,Gr=new WeakMap,qr={},is=0,V7=function(n){return n&&(n.host||V7(n.parentNode))},_E=function(n,e){return e.map(function(t){if(n.contains(t))return t;var o=V7(t);return o&&n.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",n,". Doing nothing"),null)}).filter(function(t){return!!t})},hE=function(n,e,t,o){var m=_E(e,Array.isArray(n)?n:[n]);qr[t]||(qr[t]=new WeakMap);var c=qr[t],u=[],p=new Set,f=new Set(m),h=function(x){!x||p.has(x)||(p.add(x),h(x.parentNode))};m.forEach(h);var _=function(x){!x||f.has(x)||Array.prototype.forEach.call(x.children,function(b){if(p.has(b))_(b);else try{var y=b.getAttribute(o),T=y!==null&&y!=="false",C=(Tt.get(b)||0)+1,O=(c.get(b)||0)+1;Tt.set(b,C),c.set(b,O),u.push(b),C===1&&T&&Gr.set(b,!0),O===1&&b.setAttribute(t,"true"),T||b.setAttribute(o,"true")}catch(I){console.error("aria-hidden: cannot operate on ",b,I)}})};return _(e),p.clear(),is++,function(){u.forEach(function(x){var b=Tt.get(x)-1,y=c.get(x)-1;Tt.set(x,b),c.set(x,y),b||(Gr.has(x)||x.removeAttribute(o),Gr.delete(x)),y||x.removeAttribute(t)}),is--,is||(Tt=new WeakMap,Tt=new WeakMap,Gr=new WeakMap,qr={})}},fE=function(n,e,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(n)?n:[n]),m=xE(n);return m?(o.push.apply(o,Array.from(m.querySelectorAll("[aria-live], script"))),hE(o,m,t,"aria-hidden")):function(){return null}};function Y7(n){let e;la(()=>ei(n),t=>{t?e=fE(t):e&&e()}),Ei(()=>{e&&e()})}const bE=De({__name:"DialogContentModal",props:{forceMount:{type:Boole