clawmini 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/bBmtyQMj.js → dist/web/_app/immutable/chunks/D5iV40bG.js} +1 -1
- package/dist/web/_app/immutable/chunks/{G_zz-Gou.js → vDehDcuJ.js} +1 -1
- package/{web/.svelte-kit/output/client/_app/immutable/entry/app.CJmSwntr.js → dist/web/_app/immutable/entry/app.BCSV3nrG.js} +2 -2
- package/dist/web/_app/immutable/entry/start.D4eLEZUM.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.CYS8iApT.js → 0.CUGC2p-K.js} +1 -1
- package/dist/web/_app/immutable/nodes/{1.Bli0Hqzn.js → 1.CGC_42IQ.js} +1 -1
- package/dist/web/_app/immutable/nodes/{3.Dr0ot9sV.js → 3.0arZe_Uf.js} +1 -1
- package/dist/web/_app/immutable/nodes/{4.oBhvQhcA.js → 4.ClM1bXLE.js} +1 -1
- package/dist/web/_app/immutable/nodes/{5.BBGQ_i84.js → 5.Bq2JzCEj.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/templates/environments/macos-proxy/proxy.mjs +42 -12
- package/web/.svelte-kit/ambient.d.ts +40 -98
- package/web/.svelte-kit/generated/server/internal.js +1 -1
- package/web/.svelte-kit/output/client/.vite/manifest.json +26 -26
- package/{dist/web/_app/immutable/chunks/bBmtyQMj.js → web/.svelte-kit/output/client/_app/immutable/chunks/D5iV40bG.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{G_zz-Gou.js → vDehDcuJ.js} +1 -1
- package/{dist/web/_app/immutable/entry/app.CJmSwntr.js → web/.svelte-kit/output/client/_app/immutable/entry/app.BCSV3nrG.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.D4eLEZUM.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.CYS8iApT.js → 0.CUGC2p-K.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.Bli0Hqzn.js → 1.CGC_42IQ.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.Dr0ot9sV.js → 3.0arZe_Uf.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{4.oBhvQhcA.js → 4.ClM1bXLE.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.BBGQ_i84.js → 5.Bq2JzCEj.js} +1 -1
- package/web/.svelte-kit/output/client/_app/version.json +1 -1
- package/web/.svelte-kit/output/server/chunks/internal.js +1 -1
- package/web/.svelte-kit/output/server/manifest-full.js +1 -1
- package/web/.svelte-kit/output/server/manifest.js +1 -1
- package/web/.svelte-kit/output/server/nodes/0.js +1 -1
- package/web/.svelte-kit/output/server/nodes/1.js +1 -1
- package/web/.svelte-kit/output/server/nodes/3.js +1 -1
- package/web/.svelte-kit/output/server/nodes/4.js +1 -1
- package/web/.svelte-kit/output/server/nodes/5.js +1 -1
- package/dist/web/_app/immutable/entry/start.ZpUrT2ak.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.ZpUrT2ak.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m,f as F,c as T,p as fr,d as Cn,t as Ct}from"../chunks/BmRlVmv6.js";import{o as Gr}from"../chunks/DhD271EB.js";import{bg as Sn,bh as An,G as _,w as c,D as P,I as it,p as z,c as B,r as N,a as H,be as tt,f as x,n as St,o as Tn,l as Me,t as At,s as Q,bi as Dn,C as bt}from"../chunks/CME08kGM.js";import{g as Jr,o as Gt,s as ie,e as En,d as In,a as Er}from"../chunks/DMtIqaiV.js";import{p as b,b as pt,r as K,i as lt,s as G,l as le}from"../chunks/B6YN0Nuq.js";import{a as at,c as ct,j as W,f as wt,t as Qr,B as $r,k as Mn,h as Fn,I as ce,s as de,e as Ir,g as kn}from"../chunks/CK9JZLaG.js";import{c as D}from"../chunks/Zeh-C-mx.js";import{f as Bn,g as hr,h as Nn,i as E,m as It,s as Tt,C as Oe,j as _e,u as He,k as Ln,l as Wn,n as zn,w as Dt,o as Hn,F as Rn,S as Mr,E as Kn,p as Vn,T as Xn,q as Yn,r as oe,t as jn,v as Un,x as qn,y as tn,P as Zn,z as Gn,A as Fe,G as en,I as Jn,H as Qn,J as $n,K as ti,L as ei,X as ri,M as ni,N as ii,e as oi,D as si,a as ai,b as li,c as ci,d as di,B as ui}from"../chunks/Ck-be5J2.js";import{p as ne}from"../chunks/G_zz-Gou.js";import{I as fi,P as hi}from"../chunks/Drm9vgeP.js";import{i as gi,g as vi}from"../chunks/bBmtyQMj.js";import"../chunks/Ck3rYNON.js";import{a as ft}from"../chunks/DsIToJCP.js";const mi=!1,pi=async({fetch:e,depends:t})=>{t("app:chats"),t("app:agents");let r=[],i=[];const[n,s]=await Promise.all([e("/api/chats").catch(o=>(console.error("Failed to load chats:",o),null)),e("/api/agents").catch(o=>(console.error("Failed to load agents:",o),null))]);return n?.ok&&(r=await n.json()),s?.ok&&(i=await s.json()),{chats:r,agents:i}},Ia=Object.freeze(Object.defineProperty({__proto__:null,load:pi,ssr:mi},Symbol.toStringTag,{value:"Module"}));class bi{#t;#e;constructor(t,r){this.#t=t,this.#e=Jr(r)}get current(){return this.#e(),this.#t()}}const yi=/\(.+\)/,wi=new Set(["all","print","screen","and","or","not","only"]);class xi extends bi{constructor(t,r){let i=yi.test(t)||t.split(/[\s,]+/).some(s=>wi.has(s.trim()))?t:`(${t})`;const n=window.matchMedia(i);super(()=>n.matches,s=>Gt(n,"change",s))}}const _i=768;class Pi extends xi{constructor(t=_i){super(`max-width: ${t-1}px`)}}const Oi="sidebar:state",Ci=3600*24*7,Si="16rem",Ai="18rem",Ti="3rem",Di="b";class Ei{props;#t=_(()=>this.props.open());get open(){return c(this.#t)}set open(t){P(this.#t,t)}#e=it(!1);get openMobile(){return c(this.#e)}set openMobile(t){P(this.#e,t,!0)}setOpen;#r;#i=_(()=>this.open?"expanded":"collapsed");get state(){return c(this.#i)}set state(t){P(this.#i,t)}constructor(t){this.setOpen=t.setOpen,this.#r=new Pi,this.props=t}get isMobile(){return this.#r.current}handleShortcutKeydown=t=>{t.key===Di&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.toggle())};setOpenMobile=t=>{this.openMobile=t};toggle=()=>this.#r.current?this.openMobile=!this.openMobile:this.setOpen(!this.open)}const rn="scn-sidebar";function Ii(e){return An(Symbol.for(rn),new Ei(e))}function gr(){return Sn(Symbol.for(rn))}var Mi=F("<div><!></div>");function Fi(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Mi();at(n,o=>({"data-slot":"sidebar-content","data-sidebar":"content",class:o,...i}),[()=>ct("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var ki=F("<div><!></div>");function Fr(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=ki();at(n,o=>({"data-slot":"sidebar-group-content","data-sidebar":"group-content",class:o,...i}),[()=>ct("w-full text-sm",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var Bi=F("<div><!></div>");function kr(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","children","child","class"]);const n=_(()=>({class:ct("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t.class),"data-slot":"sidebar-group-label","data-sidebar":"group-label",...i}));var s=T(),o=x(s);{var a=u=>{var h=T(),f=x(h);W(f,()=>t.child,()=>({props:c(n)})),m(u,h)},l=u=>{var h=Bi();at(h,()=>({...c(n)}));var f=B(h);W(f,()=>t.children??tt),N(h),pt(h,g=>r(g),()=>r()),m(u,h)};lt(o,u=>{t.child?u(a):u(l,-1)})}m(e,s),H()}var Ni=F("<div><!></div>");function Br(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Ni();at(n,o=>({"data-slot":"sidebar-group","data-sidebar":"group",class:o,...i}),[()=>ct("relative flex w-full min-w-0 flex-col p-2",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var Li=F("<div><!></div>");function Wi(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Li();at(n,o=>({"data-slot":"sidebar-header","data-sidebar":"header",class:o,...i}),[()=>ct("flex flex-col gap-2 p-2",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var zi=F("<main><!></main>");function Hi(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=zi();at(n,o=>({"data-slot":"sidebar-inset",class:o,...i}),[()=>ct("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}function Ri(e){return typeof e=="function"}function Nr(e){return Ri(e)?e():e}class Ki{#t={width:0,height:0};#e=!1;#r;#i;#n;#a=_(()=>(c(this.#o)?.(),this.getSize().width));#s=_(()=>(c(this.#o)?.(),this.getSize().height));#o=_(()=>{const t=Nr(this.#i);if(t)return Jr(r=>{if(!this.#n)return;const i=new this.#n.ResizeObserver(n=>{this.#e=!0;for(const s of n){const o=this.#r.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((l,u)=>Math.max(l,u.inlineSize),0),this.#t.height=a.reduce((l,u)=>Math.max(l,u.blockSize),0)}r()});return i.observe(t),()=>{this.#e=!1,i.disconnect()}})});constructor(t,r={box:"border-box"}){this.#n=r.window??Bn,this.#r=r,this.#i=t,this.#t={width:0,height:0}}calculateSize(){const t=Nr(this.#i);if(!t||!this.#n)return;const r=t.offsetWidth,i=t.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:i};const n=this.#n.getComputedStyle(t),s=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),o=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),l=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),u=r-s-a,h=i-o-l;return{width:u,height:h}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return c(this.#o)?.(),this.getSize()}get width(){return c(this.#a)}get height(){return c(this.#s)}}function vr(e){St(()=>Tn(()=>e()))}var Vi=F("<button><!></button>");function Xi(e,t){const r=fr();z(t,!0);let i=b(t,"id",19,()=>hr(r)),n=b(t,"ref",15,null),s=b(t,"disabled",3,!1),o=K(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const a=Nn.create({id:E(()=>i()),ref:E(()=>n(),d=>n(d)),disabled:E(()=>!!s())}),l=_(()=>It(o,a.props));var u=T(),h=x(u);{var f=d=>{var v=T(),p=x(v);W(p,()=>t.child,()=>({props:c(l)})),m(d,v)},g=d=>{var v=Vi();at(v,()=>({...c(l)}));var p=B(v);W(p,()=>t.children??tt),N(v),m(d,v)};lt(h,d=>{t.child?d(f):d(g,-1)})}m(e,u),H()}const Yi=["top","right","bottom","left"],Ht=Math.min,vt=Math.max,ke=Math.round,Ie=Math.floor,Mt=e=>({x:e,y:e}),ji={left:"right",right:"left",bottom:"top",top:"bottom"};function sr(e,t,r){return vt(e,Ht(t,r))}function Nt(e,t){return typeof e=="function"?e(t):e}function Lt(e){return e.split("-")[0]}function ue(e){return e.split("-")[1]}function mr(e){return e==="x"?"y":"x"}function pr(e){return e==="y"?"height":"width"}function Et(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function br(e){return mr(Et(e))}function Ui(e,t,r){r===void 0&&(r=!1);const i=ue(e),n=br(e),s=pr(n);let o=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Be(o)),[o,Be(o)]}function qi(e){const t=Be(e);return[ar(e),t,ar(t)]}function ar(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lr=["left","right"],Wr=["right","left"],Zi=["top","bottom"],Gi=["bottom","top"];function Ji(e,t,r){switch(e){case"top":case"bottom":return r?t?Wr:Lr:t?Lr:Wr;case"left":case"right":return t?Zi:Gi;default:return[]}}function Qi(e,t,r,i){const n=ue(e);let s=Ji(Lt(e),r==="start",i);return n&&(s=s.map(o=>o+"-"+n),t&&(s=s.concat(s.map(ar)))),s}function Be(e){const t=Lt(e);return ji[t]+e.slice(t.length)}function $i(e){return{top:0,right:0,bottom:0,left:0,...e}}function nn(e){return typeof e!="number"?$i(e):{top:e,right:e,bottom:e,left:e}}function Ne(e){const{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function zr(e,t,r){let{reference:i,floating:n}=e;const s=Et(t),o=br(t),a=pr(o),l=Lt(t),u=s==="y",h=i.x+i.width/2-n.width/2,f=i.y+i.height/2-n.height/2,g=i[a]/2-n[a]/2;let d;switch(l){case"top":d={x:h,y:i.y-n.height};break;case"bottom":d={x:h,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-n.width,y:f};break;default:d={x:i.x,y:i.y}}switch(ue(t)){case"start":d[o]-=g*(r&&u?-1:1);break;case"end":d[o]+=g*(r&&u?-1:1);break}return d}async function to(e,t){var r;t===void 0&&(t={});const{x:i,y:n,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:g=!1,padding:d=0}=Nt(t,e),v=nn(d),w=a[g?f==="floating"?"reference":"floating":f],y=Ne(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(w)))==null||r?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:h,strategy:l})),O=f==="floating"?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},I=Ne(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:C,strategy:l}):O);return{top:(y.top-I.top+v.top)/S.y,bottom:(I.bottom-y.bottom+v.bottom)/S.y,left:(y.left-I.left+v.left)/S.x,right:(I.right-y.right+v.right)/S.x}}const eo=50,ro=async(e,t,r)=>{const{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:to},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:n}),{x:h,y:f}=zr(u,i,l),g=i,d=0;const v={};for(let p=0;p<s.length;p++){const w=s[p];if(!w)continue;const{name:y,fn:O}=w,{x:C,y:S,data:I,reset:A}=await O({x:h,y:f,initialPlacement:i,placement:g,strategy:n,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});h=C??h,f=S??f,v[y]={...v[y],...I},A&&d<eo&&(d++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(u=A.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:n}):A.rects),{x:h,y:f}=zr(u,g,l)),p=-1)}return{x:h,y:f,placement:g,strategy:n,middlewareData:v}},no=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:n,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:h=0}=Nt(e,t)||{};if(u==null)return{};const f=nn(h),g={x:r,y:i},d=br(n),v=pr(d),p=await o.getDimensions(u),w=d==="y",y=w?"top":"left",O=w?"bottom":"right",C=w?"clientHeight":"clientWidth",S=s.reference[v]+s.reference[d]-g[d]-s.floating[v],I=g[d]-s.reference[d],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=A?A[C]:0;(!M||!await(o.isElement==null?void 0:o.isElement(A)))&&(M=a.floating[C]||s.floating[v]);const L=S/2-I/2,q=M/2-p[v]/2-1,k=Ht(f[y],q),Z=Ht(f[O],q),et=k,X=M-p[v]-Z,R=M/2-p[v]/2+L,j=sr(et,R,X),nt=!l.arrow&&ue(n)!=null&&R!==j&&s.reference[v]/2-(R<et?k:Z)-p[v]/2<0,U=nt?R<et?R-et:R-X:0;return{[d]:g[d]+U,data:{[d]:j,centerOffset:R-j-U,...nt&&{alignmentOffset:U}},reset:nt}}}),io=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,i;const{placement:n,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...w}=Nt(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Lt(n),O=Et(a),C=Lt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),I=g||(C||!p?[Be(a)]:qi(a)),A=v!=="none";!g&&A&&I.push(...Qi(a,p,v,S));const M=[a,...I],L=await l.detectOverflow(t,w),q=[];let k=((i=s.flip)==null?void 0:i.overflows)||[];if(h&&q.push(L[y]),f){const R=Ui(n,o,S);q.push(L[R[0]],L[R[1]])}if(k=[...k,{placement:n,overflows:q}],!q.every(R=>R<=0)){var Z,et;const R=(((Z=s.flip)==null?void 0:Z.index)||0)+1,j=M[R];if(j&&(!(f==="alignment"?O!==Et(j):!1)||k.every(Y=>Et(Y.placement)===O?Y.overflows[0]>0:!0)))return{data:{index:R,overflows:k},reset:{placement:j}};let nt=(et=k.filter(U=>U.overflows[0]<=0).sort((U,Y)=>U.overflows[1]-Y.overflows[1])[0])==null?void 0:et.placement;if(!nt)switch(d){case"bestFit":{var X;const U=(X=k.filter(Y=>{if(A){const rt=Et(Y.placement);return rt===O||rt==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(rt=>rt>0).reduce((rt,J)=>rt+J,0)]).sort((Y,rt)=>Y[1]-rt[1])[0])==null?void 0:X[0];U&&(nt=U);break}case"initialPlacement":nt=a;break}if(n!==nt)return{reset:{placement:nt}}}return{}}}};function Hr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rr(e){return Yi.some(t=>e[t]>=0)}const oo=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:i}=t,{strategy:n="referenceHidden",...s}=Nt(e,t);switch(n){case"referenceHidden":{const o=await i.detectOverflow(t,{...s,elementContext:"reference"}),a=Hr(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Rr(a)}}}case"escaped":{const o=await i.detectOverflow(t,{...s,altBoundary:!0}),a=Hr(o,r.floating);return{data:{escapedOffsets:a,escaped:Rr(a)}}}default:return{}}}}},on=new Set(["left","top"]);async function so(e,t){const{placement:r,platform:i,elements:n}=e,s=await(i.isRTL==null?void 0:i.isRTL(n.floating)),o=Lt(r),a=ue(r),l=Et(r)==="y",u=on.has(o)?-1:1,h=s&&l?-1:1,f=Nt(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(d=a==="end"?v*-1:v),l?{x:d*h,y:g*u}:{x:g*u,y:d*h}}const ao=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:n,y:s,placement:o,middlewareData:a}=t,l=await so(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:o}}}}},lo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:n,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:O,y:C}=y;return{x:O,y:C}}},...u}=Nt(e,t),h={x:r,y:i},f=await s.detectOverflow(t,u),g=Et(Lt(n)),d=mr(g);let v=h[d],p=h[g];if(o){const y=d==="y"?"top":"left",O=d==="y"?"bottom":"right",C=v+f[y],S=v-f[O];v=sr(C,v,S)}if(a){const y=g==="y"?"top":"left",O=g==="y"?"bottom":"right",C=p+f[y],S=p-f[O];p=sr(C,p,S)}const w=l.fn({...t,[d]:v,[g]:p});return{...w,data:{x:w.x-r,y:w.y-i,enabled:{[d]:o,[g]:a}}}}}},co=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:n,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Nt(e,t),h={x:r,y:i},f=Et(n),g=mr(f);let d=h[g],v=h[f];const p=Nt(a,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const C=g==="y"?"height":"width",S=s.reference[g]-s.floating[C]+w.mainAxis,I=s.reference[g]+s.reference[C]-w.mainAxis;d<S?d=S:d>I&&(d=I)}if(u){var y,O;const C=g==="y"?"width":"height",S=on.has(Lt(n)),I=s.reference[f]-s.floating[C]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:w.crossAxis),A=s.reference[f]+s.reference[C]+(S?0:((O=o.offset)==null?void 0:O[f])||0)-(S?w.crossAxis:0);v<I?v=I:v>A&&(v=A)}return{[g]:d,[f]:v}}}},uo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:n,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Nt(e,t),h=await o.detectOverflow(t,u),f=Lt(n),g=ue(n),d=Et(n)==="y",{width:v,height:p}=s.floating;let w,y;f==="top"||f==="bottom"?(w=f,y=g===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,w=g==="end"?"top":"bottom");const O=p-h.top-h.bottom,C=v-h.left-h.right,S=Ht(p-h[w],O),I=Ht(v-h[y],C),A=!t.middlewareData.shift;let M=S,L=I;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=C),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=O),A&&!g){const k=vt(h.left,0),Z=vt(h.right,0),et=vt(h.top,0),X=vt(h.bottom,0);d?L=v-2*(k!==0||Z!==0?k+Z:vt(h.left,h.right)):M=p-2*(et!==0||X!==0?et+X:vt(h.top,h.bottom))}await l({...t,availableWidth:L,availableHeight:M});const q=await o.getDimensions(a.floating);return v!==q.width||p!==q.height?{reset:{rects:!0}}:{}}}};function Re(){return typeof window<"u"}function fe(e){return sn(e)?(e.nodeName||"").toLowerCase():"#document"}function mt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=(sn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sn(e){return Re()?e instanceof Node||e instanceof mt(e).Node:!1}function xt(e){return Re()?e instanceof Element||e instanceof mt(e).Element:!1}function Wt(e){return Re()?e instanceof HTMLElement||e instanceof mt(e).HTMLElement:!1}function Kr(e){return!Re()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mt(e).ShadowRoot}function Ce(e){const{overflow:t,overflowX:r,overflowY:i,display:n}=_t(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function fo(e){return/^(table|td|th)$/.test(fe(e))}function Ke(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ho=/transform|translate|scale|rotate|perspective|filter/,go=/paint|layout|strict|content/,qt=e=>!!e&&e!=="none";let tr;function yr(e){const t=xt(e)?_t(e):e;return qt(t.transform)||qt(t.translate)||qt(t.scale)||qt(t.rotate)||qt(t.perspective)||!wr()&&(qt(t.backdropFilter)||qt(t.filter))||ho.test(t.willChange||"")||go.test(t.contain||"")}function vo(e){let t=Rt(e);for(;Wt(t)&&!ae(t);){if(yr(t))return t;if(Ke(t))return null;t=Rt(t)}return null}function wr(){return tr==null&&(tr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tr}function ae(e){return/^(html|body|#document)$/.test(fe(e))}function _t(e){return mt(e).getComputedStyle(e)}function Ve(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rt(e){if(fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Kr(e)&&e.host||Ft(e);return Kr(t)?t.host:t}function an(e){const t=Rt(e);return ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wt(t)&&Ce(t)?t:an(t)}function Pe(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=an(e),s=n===((i=e.ownerDocument)==null?void 0:i.body),o=mt(n);if(s){const a=lr(o);return t.concat(o,o.visualViewport||[],Ce(n)?n:[],a&&r?Pe(a):[])}else return t.concat(n,Pe(n,[],r))}function lr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ln(e){const t=_t(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=Wt(e),s=n?e.offsetWidth:r,o=n?e.offsetHeight:i,a=ke(r)!==s||ke(i)!==o;return a&&(r=s,i=o),{width:r,height:i,$:a}}function xr(e){return xt(e)?e:e.contextElement}function se(e){const t=xr(e);if(!Wt(t))return Mt(1);const r=t.getBoundingClientRect(),{width:i,height:n,$:s}=ln(t);let o=(s?ke(r.width):r.width)/i,a=(s?ke(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const mo=Mt(0);function cn(e){const t=mt(e);return!wr()||!t.visualViewport?mo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function po(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==mt(e)?!1:t}function Jt(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=xr(e);let o=Mt(1);t&&(i?xt(i)&&(o=se(i)):o=se(e));const a=po(s,r,i)?cn(s):Mt(0);let l=(n.left+a.x)/o.x,u=(n.top+a.y)/o.y,h=n.width/o.x,f=n.height/o.y;if(s){const g=mt(s),d=i&&xt(i)?mt(i):i;let v=g,p=lr(v);for(;p&&i&&d!==v;){const w=se(p),y=p.getBoundingClientRect(),O=_t(p),C=y.left+(p.clientLeft+parseFloat(O.paddingLeft))*w.x,S=y.top+(p.clientTop+parseFloat(O.paddingTop))*w.y;l*=w.x,u*=w.y,h*=w.x,f*=w.y,l+=C,u+=S,v=mt(p),p=lr(v)}}return Ne({width:h,height:f,x:l,y:u})}function Xe(e,t){const r=Ve(e).scrollLeft;return t?t.left+r:Jt(Ft(e)).left+r}function dn(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Xe(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function bo(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e;const s=n==="fixed",o=Ft(i),a=t?Ke(t.floating):!1;if(i===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},u=Mt(1);const h=Mt(0),f=Wt(i);if((f||!f&&!s)&&((fe(i)!=="body"||Ce(o))&&(l=Ve(i)),f)){const d=Jt(i);u=se(i),h.x=d.x+i.clientLeft,h.y=d.y+i.clientTop}const g=o&&!f&&!s?dn(o,l):Mt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+h.x+g.x,y:r.y*u.y-l.scrollTop*u.y+h.y+g.y}}function yo(e){return Array.from(e.getClientRects())}function wo(e){const t=Ft(e),r=Ve(e),i=e.ownerDocument.body,n=vt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=vt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-r.scrollLeft+Xe(e);const a=-r.scrollTop;return _t(i).direction==="rtl"&&(o+=vt(t.clientWidth,i.clientWidth)-n),{width:n,height:s,x:o,y:a}}const Vr=25;function xo(e,t){const r=mt(e),i=Ft(e),n=r.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(n){s=n.width,o=n.height;const h=wr();(!h||h&&t==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}const u=Xe(i);if(u<=0){const h=i.ownerDocument,f=h.body,g=getComputedStyle(f),d=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(i.clientWidth-f.clientWidth-d);v<=Vr&&(s-=v)}else u<=Vr&&(s+=u);return{width:s,height:o,x:a,y:l}}function _o(e,t){const r=Jt(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,s=Wt(e)?se(e):Mt(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=n*s.x,u=i*s.y;return{width:o,height:a,x:l,y:u}}function Xr(e,t,r){let i;if(t==="viewport")i=xo(e,r);else if(t==="document")i=wo(Ft(e));else if(xt(t))i=_o(t,r);else{const n=cn(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ne(i)}function un(e,t){const r=Rt(e);return r===t||!xt(r)||ae(r)?!1:_t(r).position==="fixed"||un(r,t)}function Po(e,t){const r=t.get(e);if(r)return r;let i=Pe(e,[],!1).filter(a=>xt(a)&&fe(a)!=="body"),n=null;const s=_t(e).position==="fixed";let o=s?Rt(e):e;for(;xt(o)&&!ae(o);){const a=_t(o),l=yr(o);!l&&a.position==="fixed"&&(n=null),(s?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Ce(o)&&!l&&un(e,o))?i=i.filter(h=>h!==o):n=a,o=Rt(o)}return t.set(e,i),i}function Oo(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e;const o=[...r==="clippingAncestors"?Ke(t)?[]:Po(t,this._c):[].concat(r),i],a=Xr(t,o[0],n);let l=a.top,u=a.right,h=a.bottom,f=a.left;for(let g=1;g<o.length;g++){const d=Xr(t,o[g],n);l=vt(d.top,l),u=Ht(d.right,u),h=Ht(d.bottom,h),f=vt(d.left,f)}return{width:u-f,height:h-l,x:f,y:l}}function Co(e){const{width:t,height:r}=ln(e);return{width:t,height:r}}function So(e,t,r){const i=Wt(t),n=Ft(t),s=r==="fixed",o=Jt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Mt(0);function u(){l.x=Xe(n)}if(i||!i&&!s)if((fe(t)!=="body"||Ce(n))&&(a=Ve(t)),i){const d=Jt(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else n&&u();s&&!i&&n&&u();const h=n&&!i&&!s?dn(n,a):Mt(0),f=o.left+a.scrollLeft-l.x-h.x,g=o.top+a.scrollTop-l.y-h.y;return{x:f,y:g,width:o.width,height:o.height}}function er(e){return _t(e).position==="static"}function Yr(e,t){if(!Wt(e)||_t(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ft(e)===r&&(r=r.ownerDocument.body),r}function fn(e,t){const r=mt(e);if(Ke(e))return r;if(!Wt(e)){let n=Rt(e);for(;n&&!ae(n);){if(xt(n)&&!er(n))return n;n=Rt(n)}return r}let i=Yr(e,t);for(;i&&fo(i)&&er(i);)i=Yr(i,t);return i&&ae(i)&&er(i)&&!yr(i)?r:i||vo(e)||r}const Ao=async function(e){const t=this.getOffsetParent||fn,r=this.getDimensions,i=await r(e.floating);return{reference:So(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function To(e){return _t(e).direction==="rtl"}const Do={convertOffsetParentRelativeRectToViewportRelativeRect:bo,getDocumentElement:Ft,getClippingRect:Oo,getOffsetParent:fn,getElementRects:Ao,getClientRects:yo,getDimensions:Co,getScale:se,isElement:xt,isRTL:To};function hn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Eo(e,t){let r=null,i;const n=Ft(e);function s(){var a;clearTimeout(i),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:h,top:f,width:g,height:d}=u;if(a||t(),!g||!d)return;const v=Ie(f),p=Ie(n.clientWidth-(h+g)),w=Ie(n.clientHeight-(f+d)),y=Ie(h),C={rootMargin:-v+"px "+-p+"px "+-w+"px "+-y+"px",threshold:vt(0,Ht(1,l))||1};let S=!0;function I(A){const M=A[0].intersectionRatio;if(M!==l){if(!S)return o();M?o(!1,M):i=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!hn(u,e.getBoundingClientRect())&&o(),S=!1}try{r=new IntersectionObserver(I,{...C,root:n.ownerDocument})}catch{r=new IntersectionObserver(I,C)}r.observe(e)}return o(!0),s}function Io(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=xr(e),h=n||s?[...u?Pe(u):[],...t?Pe(t):[]]:[];h.forEach(y=>{n&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=u&&a?Eo(u,r):null;let g=-1,d=null;o&&(d=new ResizeObserver(y=>{let[O]=y;O&&O.target===u&&d&&t&&(d.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=d)==null||C.observe(t)})),r()}),u&&!l&&d.observe(u),t&&d.observe(t));let v,p=l?Jt(e):null;l&&w();function w(){const y=Jt(e);p&&!hn(p,y)&&r(),p=y,v=requestAnimationFrame(w)}return r(),()=>{var y;h.forEach(O=>{n&&O.removeEventListener("scroll",r),s&&O.removeEventListener("resize",r)}),f?.(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(v)}}const Mo=ao,Fo=lo,ko=io,Bo=uo,No=oo,Lo=no,Wo=co,zo=(e,t,r)=>{const i=new Map,n={platform:Do,...r},s={...n.platform,_c:i};return ro(e,t,{...n,platform:s})};function Zt(e){return typeof e=="function"?e():e}function gn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jr(e,t){const r=gn(e);return Math.round(t*r)/r}function Ur(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Ho(e){const t=e.whileElementsMounted,r=_(()=>Zt(e.open)??!0),i=_(()=>Zt(e.middleware)),n=_(()=>Zt(e.transform)??!0),s=_(()=>Zt(e.placement)??"bottom"),o=_(()=>Zt(e.strategy)??"absolute"),a=_(()=>Zt(e.sideOffset)??0),l=_(()=>Zt(e.alignOffset)??0),u=e.reference;let h=it(0),f=it(0);const g=Tt(null);let d=it(Me(c(o))),v=it(Me(c(s))),p=it(Me({})),w=it(!1),y=!1,O=0;const C=_(()=>{const k=g.current?jr(g.current,c(h)):c(h),Z=g.current?jr(g.current,c(f)):c(f);return c(n)?{position:c(d),left:"0",top:"0",transform:`translate(${k}px, ${Z}px)`,...g.current&&gn(g.current)>=1.5&&{willChange:"transform"}}:{position:c(d),left:`${k}px`,top:`${Z}px`}});let S;function I(){if(u.current===null||g.current===null)return;const k=u.current,Z=g.current,et=++O;zo(k,Z,{middleware:c(i),placement:c(s),strategy:c(o)}).then(X=>{if(et!==O||u.current!==k||g.current!==Z)return;if(Ro(k)){P(p,{...c(p),hide:{...c(p).hide,referenceHidden:!0}},!0);return}if(!c(r)&&c(h)!==0&&c(f)!==0){const j=Math.max(Math.abs(c(a)),Math.abs(c(l)),15);if(X.x<=j&&X.y<=j)return}P(h,X.x,!0),P(f,X.y,!0),P(d,X.strategy,!0),P(v,X.placement,!0),P(p,X.middlewareData,!0),P(w,!0)})}function A(){typeof S=="function"&&(S(),S=void 0),O++}function M(){if(A(),t===void 0){I();return}c(r)&&(u.current===null||g.current===null||(S=t(u.current,g.current,I)))}function L(){!c(r)&&g.current===null&&P(w,!1)}function q(){return[c(i),c(s),c(o),c(a),c(l),c(r)]}return St(()=>{t===void 0&&c(r)&&I()}),St(M),St(()=>{if(t!==void 0){if(q(),!c(r)){y=!1;return}if(!c(w)){y=!1;return}if(!y){y=!0;return}I()}}),St(L),St(()=>A),{floating:g,reference:u,get strategy(){return c(d)},get placement(){return c(v)},get middlewareData(){return c(p)},get isPositioned(){return c(w)},get floatingStyles(){return c(C)},get update(){return I}}}function Ro(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const Ko={top:"bottom",right:"left",bottom:"top",left:"right"},vn=new Oe("Floating.Root"),cr=new Oe("Floating.Content"),mn=new Oe("Floating.Root");class Le{static create(t=!1){return t?mn.set(new Le):vn.set(new Le)}anchorNode=Tt(null);customAnchorNode=Tt(null);triggerNode=Tt(null);constructor(){St(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class We{static create(t,r=!1){return r?cr.set(new We(t,mn.get())):cr.set(new We(t,vn.get()))}opts;root;contentRef=Tt(null);wrapperRef=Tt(null);arrowRef=Tt(null);contentAttachment=_e(this.contentRef);wrapperAttachment=_e(this.wrapperRef);arrowAttachment=_e(this.arrowRef);arrowId=Tt(He());#t=_(()=>{if(typeof this.opts.style=="string")return Ln(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#r=new Ki(()=>this.arrowRef.current??void 0);#i=_(()=>this.#r?.width??0);#n=_(()=>this.#r?.height??0);#a=_(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=_(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=_(()=>c(this.#s).length>0);get hasExplicitBoundaries(){return c(this.#o)}set hasExplicitBoundaries(t){P(this.#o,t)}#l=_(()=>({padding:this.opts.collisionPadding.current,boundary:c(this.#s).filter(Wn),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return c(this.#l)}set detectOverflowOptions(t){P(this.#l,t)}#d=it(void 0);#u=it(void 0);#f=it(void 0);#v=it(void 0);#m=_(()=>[Mo({mainAxis:this.opts.sideOffset.current+c(this.#n),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Fo({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?Wo():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&ko({...this.detectOverflowOptions}),Bo({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:i})=>{const{width:n,height:s}=t.reference;P(this.#d,r,!0),P(this.#u,i,!0),P(this.#f,n,!0),P(this.#v,s,!0)}}),this.arrowRef.current&&Lo({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Vo({arrowWidth:c(this.#i),arrowHeight:c(this.#n)}),this.opts.hideWhenDetached.current&&No({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return c(this.#m)}set middleware(t){P(this.#m,t)}floating;#c=_(()=>Xo(this.floating.placement));get placedSide(){return c(this.#c)}set placedSide(t){P(this.#c,t)}#h=_(()=>Yo(this.floating.placement));get placedAlign(){return c(this.#h)}set placedAlign(t){P(this.#h,t)}#p=_(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return c(this.#p)}set arrowX(t){P(this.#p,t)}#g=_(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return c(this.#g)}set arrowY(t){P(this.#g,t)}#b=_(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return c(this.#b)}set cannotCenterArrow(t){P(this.#b,t)}#y=it();get contentZIndex(){return c(this.#y)}set contentZIndex(t){P(this.#y,t,!0)}#w=_(()=>Ko[this.placedSide]);get arrowBaseSide(){return c(this.#w)}set arrowBaseSide(t){P(this.#w,t)}#x=_(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${c(this.#d)}px`,"--bits-floating-available-height":`${c(this.#u)}px`,"--bits-floating-anchor-width":`${c(this.#f)}px`,"--bits-floating-anchor-height":`${c(this.#v)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...c(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return c(this.#x)}set wrapperProps(t){P(this.#x,t)}#_=_(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:zn({...c(this.#t)}),...this.contentAttachment}));get props(){return c(this.#_)}set props(t){P(this.#_,t)}#P=_(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return c(this.#P)}set arrowStyle(t){P(this.#P,t)}constructor(t,r){this.opts=t,this.root=r,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),Dt(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),this.floating=Ho({strategy:()=>this.opts.strategy.current,placement:()=>c(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>Io(...i,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),St(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Dt(()=>this.contentRef.current,i=>{if(!i||!this.opts.enabled.current)return;const n=Hn(i),s=n.requestAnimationFrame(()=>{if(this.contentRef.current!==i||!this.opts.enabled.current)return;const o=n.getComputedStyle(i).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{n.cancelAnimationFrame(s)}}),St(()=>{this.floating.floating.current=this.wrapperRef.current})}}class _r{static create(t){return new _r(t,cr.get())}opts;content;constructor(t,r){this.opts=t,this.content=r}#t=_(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return c(this.#t)}set props(t){P(this.#t,t)}}function Vo(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:i,middlewareData:n}=t,o=n.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,h]=Pr(r),f={start:"0%",center:"50%",end:"100%"}[h],g=(n.arrow?.x??0)+a/2,d=(n.arrow?.y??0)+l/2;let v="",p="";return u==="bottom"?(v=o?f:`${g}px`,p=`${-l}px`):u==="top"?(v=o?f:`${g}px`,p=`${i.floating.height+l}px`):u==="right"?(v=`${-l}px`,p=o?f:`${d}px`):u==="left"&&(v=`${i.floating.width+l}px`,p=o?f:`${d}px`),{data:{x:v,y:p}}}}}function Pr(e){const[t,r="center"]=e.split("-");return[t,r]}function Xo(e){return Pr(e)[0]}function Yo(e){return Pr(e)[1]}function jo(e,t){z(t,!0);let r=b(t,"tooltip",3,!1);Le.create(r());var i=T(),n=x(i);W(n,()=>t.children??tt),m(e,i),H()}var Uo=Cn('<svg viewBox="0 0 30 10" preserveAspectRatio="none" data-arrow=""><polygon points="0,0 30,0 15,10" fill="currentColor"></polygon></svg>'),qo=F("<span><!></span>");function Zo(e,t){z(t,!0);let r=b(t,"id",19,He),i=b(t,"width",3,10),n=b(t,"height",3,5),s=K(t,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const o=_(()=>It(s,{id:r()}));var a=T(),l=x(a);{var u=f=>{var g=T(),d=x(g);W(d,()=>t.child,()=>({props:c(o)})),m(f,g)},h=f=>{var g=qo();at(g,()=>({...c(o)}));var d=B(g);{var v=w=>{var y=T(),O=x(y);W(O,()=>t.children??tt),m(w,y)},p=w=>{var y=Uo();At(()=>{wt(y,"width",i()),wt(y,"height",n())}),m(w,y)};lt(d,w=>{t.children?w(v):w(p,-1)})}N(g),m(f,g)};lt(l,f=>{t.child?f(u):f(h,-1)})}m(e,a),H()}function Go(e,t){z(t,!0);let r=b(t,"id",19,He),i=b(t,"ref",15,null),n=K(t,["$$slots","$$events","$$legacy","id","ref"]);const s=_r.create({id:E(()=>r()),ref:E(()=>i(),a=>i(a))}),o=_(()=>It(n,s.props));Zo(e,G(()=>c(o))),H()}function Jo(e,t){z(t,!0);let r=b(t,"side",3,"bottom"),i=b(t,"sideOffset",3,0),n=b(t,"align",3,"center"),s=b(t,"alignOffset",3,0),o=b(t,"arrowPadding",3,0),a=b(t,"avoidCollisions",3,!0),l=b(t,"collisionBoundary",19,()=>[]),u=b(t,"collisionPadding",3,0),h=b(t,"hideWhenDetached",3,!1),f=b(t,"onPlaced",3,()=>{}),g=b(t,"sticky",3,"partial"),d=b(t,"updatePositionStrategy",3,"optimized"),v=b(t,"strategy",3,"fixed"),p=b(t,"dir",3,"ltr"),w=b(t,"style",19,()=>({})),y=b(t,"wrapperId",19,He),O=b(t,"customAnchor",3,null),C=b(t,"tooltip",3,!1);const S=We.create({side:E(()=>r()),sideOffset:E(()=>i()),align:E(()=>n()),alignOffset:E(()=>s()),id:E(()=>t.id),arrowPadding:E(()=>o()),avoidCollisions:E(()=>a()),collisionBoundary:E(()=>l()),collisionPadding:E(()=>u()),hideWhenDetached:E(()=>h()),onPlaced:E(()=>f()),sticky:E(()=>g()),updatePositionStrategy:E(()=>d()),strategy:E(()=>v()),dir:E(()=>p()),style:E(()=>w()),enabled:E(()=>t.enabled),wrapperId:E(()=>y()),customAnchor:E(()=>O())},C()),I=_(()=>It(S.wrapperProps,{style:{pointerEvents:"auto"}}));var A=T(),M=x(A);W(M,()=>t.content??tt,()=>({props:S.props,wrapperProps:c(I)})),m(e,A),H()}function Qo(e,t){z(t,!0),Gr(()=>{t.onPlaced?.()});var r=T(),i=x(r);W(i,()=>t.content??tt,()=>({props:{},wrapperProps:{}})),m(e,r),H()}function $o(e,t){let r=b(t,"isStatic",3,!1),i=K(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var n=T(),s=x(n);{var o=l=>{Qo(l,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=l=>{Jo(l,G({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};lt(s,l=>{r()?l(o):l(a,-1)})}m(e,n)}var ts=F("<!> <!>",1);function pn(e,t){z(t,!0);let r=b(t,"interactOutsideBehavior",3,"close"),i=b(t,"trapFocus",3,!0),n=b(t,"isValidEvent",3,()=>!1),s=b(t,"customAnchor",3,null),o=b(t,"isStatic",3,!1),a=b(t,"tooltip",3,!1),l=b(t,"contentPointerEvents",3,"auto"),u=K(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);const h=_(()=>t.preventScroll??!0),f=_(()=>t.strategy??(c(h)?"fixed":"absolute"));$o(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return c(f)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(d,v)=>{let p=()=>v?.().props,w=()=>v?.().wrapperProps;var y=ts(),O=x(y);{var C=A=>{Mr(A,{get preventScroll(){return c(h)}})},S=A=>{Mr(A,{get preventScroll(){return c(h)}})};lt(O,A=>{t.forceMount&&t.enabled?A(C):t.forceMount||A(S,1)})}var I=Q(O,2);Rn(I,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return i()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(M,L)=>{let q=()=>L?.().props;Kn(M,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(k,Z)=>{Vn(k,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return r()},get isValidEvent(){return n()},get enabled(){return t.enabled},get ref(){return t.ref},children:(X,R)=>{let j=()=>R?.().props;Xn(X,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(nt,U)=>{var Y=T(),rt=x(Y);{let J=_(()=>({props:It(u,p(),j(),q(),{style:{pointerEvents:l()}}),wrapperProps:w()}));W(rt,()=>t.popper??tt,()=>c(J))}m(nt,Y)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),m(d,y)},$$slots:{content:!0}}),H()}function es(e,t){let r=b(t,"interactOutsideBehavior",3,"close"),i=b(t,"trapFocus",3,!0),n=b(t,"isValidEvent",3,()=>!1),s=b(t,"customAnchor",3,null),o=b(t,"isStatic",3,!1),a=K(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var l=T(),u=x(l);{var h=f=>{pn(f,G({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return n()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};lt(u,f=>{t.shouldRender&&f(h)})}m(e,l)}function rs(e,t){let r=b(t,"interactOutsideBehavior",3,"close"),i=b(t,"trapFocus",3,!0),n=b(t,"isValidEvent",3,()=>!1),s=b(t,"customAnchor",3,null),o=b(t,"isStatic",3,!1),a=K(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);pn(e,G({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return n()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}function rr(e,t){const[r,i]=e;let n=!1;const s=t.length;for(let o=0,a=s-1;o<s;a=o++){const[l,u]=t[o]??[0,0],[h,f]=t[a]??[0,0];u>=i!=f>=i&&r<=(h-l)*(i-u)/(f-u)+l&&(n=!n)}return n}function nr(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function qr(e,t){const r=e.left+e.width/2,i=e.top+e.height/2,n=t.left+t.width/2,s=t.top+t.height/2,o=n-r,a=s-i;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}class ns{#t;#e;#r;#i=null;#n=null;#a=[];#s=null;#o=null;#l=null;#d(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#u(){this.#d(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#i||!this.#n)&&(this.#c(),this.#t.onPointerExit())})}#f(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#v(){this.#r!==null&&(this.#f(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#i||!this.#n)&&(this.#c(),this.#t.onPointerExit())},this.#r))}constructor(t){this.#t=t,this.#e=t.buffer??1;const r=t.transitIntentTimeout;this.#r=typeof r=="number"&&r>0?r:null,Dt([t.triggerNode,t.contentNode,t.enabled],([i,n,s])=>{if(!i||!n||!s){this.#s=null,this.#c();return}this.#s&&this.#s!==i&&this.#c(),this.#s=i;const o=Yn(i),a=g=>{this.#m([g.clientX,g.clientY],i,n)},l=g=>{const d=g.relatedTarget;if(oe(d)&&n.contains(d))return;const v=this.#t.ignoredTargets?.()??[];oe(d)&&v.some(p=>p===d||p.contains(d))||(this.#a=oe(d)&&v.length>0?v.filter(p=>d.contains(p)):[],this.#i=[g.clientX,g.clientY],this.#n="content",this.#u())},u=()=>{this.#c()},h=()=>{this.#c()},f=g=>{const d=g.relatedTarget;oe(d)&&i.contains(d)||(this.#i=[g.clientX,g.clientY],this.#n="trigger",this.#u())};return[Gt(o,"pointermove",a),Gt(i,"pointerleave",l),Gt(i,"pointerenter",u),Gt(n,"pointerenter",h),Gt(n,"pointerleave",f)].reduce((g,d)=>()=>{g(),d()},()=>{})})}#m(t,r,i){if(!this.#i||!this.#n)return;this.#d(),this.#v();const n=r.getBoundingClientRect(),s=i.getBoundingClientRect();if(this.#n==="content"&&nr(t,s)){this.#c();return}if(this.#n==="trigger"&&nr(t,n)){this.#c();return}if(this.#n==="content"&&this.#a.length>0)for(const h of this.#a){const f=h.getBoundingClientRect();if(nr(t,f))return;const g=qr(n,f),d=this.#h(n,f,g);if(d&&rr(t,d))return}const o=qr(n,s),a=this.#h(n,s,o);if(a&&rr(t,a))return;const l=this.#n==="content"?s:n,u=this.#p(this.#i,l,o,this.#n);rr(t,u)||(this.#c(),this.#t.onPointerExit())}#c(){this.#i=null,this.#n=null,this.#a=[],this.#d(),this.#f()}#h(t,r,i){const n=this.#e;switch(i){case"top":return[[Math.min(t.left,r.left)-n,t.top],[Math.min(t.left,r.left)-n,r.bottom],[Math.max(t.right,r.right)+n,r.bottom],[Math.max(t.right,r.right)+n,t.top]];case"bottom":return[[Math.min(t.left,r.left)-n,t.bottom],[Math.min(t.left,r.left)-n,r.top],[Math.max(t.right,r.right)+n,r.top],[Math.max(t.right,r.right)+n,t.bottom]];case"left":return[[t.left,Math.min(t.top,r.top)-n],[r.right,Math.min(t.top,r.top)-n],[r.right,Math.max(t.bottom,r.bottom)+n],[t.left,Math.max(t.bottom,r.bottom)+n]];case"right":return[[t.right,Math.min(t.top,r.top)-n],[r.left,Math.min(t.top,r.top)-n],[r.left,Math.max(t.bottom,r.bottom)+n],[t.right,Math.max(t.bottom,r.bottom)+n]]}}#p(t,r,i,n){const s=this.#e*4,[o,a]=t;switch(n==="trigger"?this.#g(i):i){case"top":return[[o-s,a+s],[o+s,a+s],[r.right+s,r.bottom],[r.right+s,r.top],[r.left-s,r.top],[r.left-s,r.bottom]];case"bottom":return[[o-s,a-s],[o+s,a-s],[r.right+s,r.top],[r.right+s,r.bottom],[r.left-s,r.bottom],[r.left-s,r.top]];case"left":return[[o+s,a-s],[o+s,a+s],[r.right,r.bottom+s],[r.left,r.bottom+s],[r.left,r.top-s],[r.right,r.top-s]];case"right":return[[o-s,a-s],[o-s,a+s],[r.left,r.bottom+s],[r.right,r.bottom+s],[r.right,r.top-s],[r.left,r.top-s]]}}#g(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}class dr{#t;#e;#r=null;constructor(t,r){this.#e=t,this.#t=r,this.stop=this.stop.bind(this),this.start=this.start.bind(this),jn(this.stop)}#i(){this.#r!==null&&(window.clearTimeout(this.#r),this.#r=null)}stop(){this.#i()}start(...t){this.#i(),this.#r=window.setTimeout(()=>{this.#r=null,this.#e(...t)},this.#t)}}const bn=Gn({component:"tooltip",parts:["content","trigger"]}),yn=new Oe("Tooltip.Provider"),Or=new Oe("Tooltip.Root");class is{#t=it(Me(new Map));get triggers(){return c(this.#t)}set triggers(t){P(this.#t,t,!0)}#e=it(null);get activeTriggerId(){return c(this.#e)}set activeTriggerId(t){P(this.#e,t,!0)}#r=_(()=>{const t=this.activeTriggerId;return t===null?null:this.triggers.get(t)?.node??null});get activeTriggerNode(){return c(this.#r)}set activeTriggerNode(t){P(this.#r,t)}#i=_(()=>{const t=this.activeTriggerId;return t===null?null:this.triggers.get(t)?.payload??null});get activePayload(){return c(this.#i)}set activePayload(t){P(this.#i,t)}register=t=>{const r=new Map(this.triggers);r.set(t.id,t),this.triggers=r,this.#n()};update=t=>{const r=new Map(this.triggers);r.set(t.id,t),this.triggers=r,this.#n()};unregister=t=>{if(!this.triggers.has(t))return;const r=new Map(this.triggers);r.delete(t),this.triggers=r,this.activeTriggerId===t&&(this.activeTriggerId=null)};setActiveTrigger=t=>{if(t===null){this.activeTriggerId=null;return}if(!this.triggers.has(t)){this.activeTriggerId=null;return}this.activeTriggerId=t};get=t=>this.triggers.get(t);has=t=>this.triggers.has(t);getFirstTriggerId=()=>{const t=this.triggers.entries().next();return t.done?null:t.value[0]};#n=()=>{const t=this.activeTriggerId;t!==null&&(this.triggers.has(t)||(this.activeTriggerId=null))}}class Cr{static create(t){return yn.set(new Cr(t))}opts;#t=it(!0);get isOpenDelayed(){return c(this.#t)}set isOpenDelayed(t){P(this.#t,t,!0)}isPointerInTransit=Tt(!1);#e;#r=it(null);constructor(t){this.opts=t,this.#e=new dr(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current),vr(()=>Gt(window,"scroll",r=>{const i=c(this.#r);if(!i)return;const n=i.triggerNode;if(!n)return;const s=r.target;(s instanceof Element||s instanceof Document)&&s.contains(n)&&i.handleClose()}))}#i=()=>{if(this.opts.skipDelayDuration.current===0){this.isOpenDelayed=!0;return}else this.#e.start()};#n=()=>{this.#e.stop()};onOpen=t=>{c(this.#r)&&c(this.#r)!==t&&c(this.#r).handleClose(),this.#n(),this.isOpenDelayed=!1,P(this.#r,t,!0)};onClose=t=>{c(this.#r)===t&&P(this.#r,null),this.#i()};isTooltipOpen=t=>c(this.#r)===t}class Sr{static create(t){return Or.set(new Sr(t,yn.get()))}opts;provider;#t=_(()=>this.opts.delayDuration.current??this.provider.opts.delayDuration.current);get delayDuration(){return c(this.#t)}set delayDuration(t){P(this.#t,t)}#e=_(()=>this.opts.disableHoverableContent.current??this.provider.opts.disableHoverableContent.current);get disableHoverableContent(){return c(this.#e)}set disableHoverableContent(t){P(this.#e,t)}#r=_(()=>this.opts.disableCloseOnTriggerClick.current??this.provider.opts.disableCloseOnTriggerClick.current);get disableCloseOnTriggerClick(){return c(this.#r)}set disableCloseOnTriggerClick(t){P(this.#r,t)}#i=_(()=>this.opts.disabled.current??this.provider.opts.disabled.current);get disabled(){return c(this.#i)}set disabled(t){P(this.#i,t)}#n=_(()=>this.opts.ignoreNonKeyboardFocus.current??this.provider.opts.ignoreNonKeyboardFocus.current);get ignoreNonKeyboardFocus(){return c(this.#n)}set ignoreNonKeyboardFocus(t){P(this.#n,t)}registry;tether;#a=it(null);get contentNode(){return c(this.#a)}set contentNode(t){P(this.#a,t,!0)}contentPresence;#s=it(!1);#o;#l=_(()=>this.opts.open.current?c(this.#s)?"delayed-open":"instant-open":"closed");get stateAttr(){return c(this.#l)}set stateAttr(t){P(this.#l,t)}constructor(t,r){this.opts=t,this.provider=r,this.tether=t.tether.current?.state??null,this.registry=this.tether?.registry??new is,this.#o=new dr(()=>{P(this.#s,!0),this.opts.open.current=!0},this.delayDuration??0),this.tether&&(this.tether.root=this,vr(()=>()=>{this.tether?.root===this&&(this.tether.root=null)})),this.contentPresence=new Zn({open:this.opts.open,ref:E(()=>this.contentNode),onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Dt(()=>this.delayDuration,()=>{this.delayDuration!==void 0&&(this.#o=new dr(()=>{P(this.#s,!0),this.opts.open.current=!0},this.delayDuration))}),Dt(()=>this.opts.open.current,i=>{i?(this.ensureActiveTrigger(),this.provider.onOpen(this)):this.provider.onClose(this)},{lazy:!0}),Dt(()=>this.opts.triggerId.current,i=>{i!==this.registry.activeTriggerId&&this.registry.setActiveTrigger(i)}),Dt(()=>this.registry.activeTriggerId,i=>{this.opts.triggerId.current!==i&&(this.opts.triggerId.current=i)})}handleOpen=()=>{this.#o.stop(),P(this.#s,!1),this.ensureActiveTrigger(),this.opts.open.current=!0};handleClose=()=>{this.#o.stop(),this.opts.open.current=!1};#d=()=>{this.#o.stop();const t=!this.provider.isOpenDelayed,r=this.delayDuration??0;t||r===0?(P(this.#s,!1),this.opts.open.current=!0):this.#o.start()};onTriggerEnter=t=>{this.setActiveTrigger(t),this.#d()};onTriggerLeave=()=>{this.disableHoverableContent?this.handleClose():this.#o.stop()};ensureActiveTrigger=()=>{if(this.registry.activeTriggerId!==null&&this.registry.has(this.registry.activeTriggerId))return;if(this.opts.triggerId.current!==null&&this.registry.has(this.opts.triggerId.current)){this.registry.setActiveTrigger(this.opts.triggerId.current);return}const t=this.registry.getFirstTriggerId();this.registry.setActiveTrigger(t)};setActiveTrigger=t=>{this.registry.setActiveTrigger(t)};registerTrigger=t=>{this.registry.register(t),t.disabled&&this.registry.activeTriggerId===t.id&&this.opts.open.current&&this.handleClose()};updateTrigger=t=>{this.registry.update(t),t.disabled&&this.registry.activeTriggerId===t.id&&this.opts.open.current&&this.handleClose()};unregisterTrigger=t=>{const r=this.registry.activeTriggerId===t;this.registry.unregister(t),r&&this.opts.open.current&&this.handleClose()};isActiveTrigger=t=>this.registry.activeTriggerId===t;get triggerNode(){return this.registry.activeTriggerNode}get activePayload(){return this.registry.activePayload}get activeTriggerId(){return this.registry.activeTriggerId}}class ze{static create(t){return t.tether.current?new ze(t,null,t.tether.current.state):new ze(t,Or.get(),null)}opts;root;tether;attachment;#t=Tt(!1);#e=it(!1);domContext;#r=null;#i=!1;#n=null;constructor(t,r,i){this.opts=t,this.root=r,this.tether=i,this.domContext=new Un(t.ref),this.attachment=_e(this.opts.ref,n=>this.#o(n)),Dt(()=>this.opts.id.current,()=>{this.#o(this.opts.ref.current)}),Dt(()=>this.opts.payload.current,()=>{this.#o(this.opts.ref.current)}),Dt(()=>this.opts.disabled.current,()=>{this.#o(this.opts.ref.current)}),vr(()=>(this.#i=!0,this.#o(this.opts.ref.current),()=>{const n=this.#a(),s=this.#n;s&&(this.tether?this.tether.registry.unregister(s):n?.unregisterTrigger(s)),this.#n=null,this.#i=!1}))}#a=()=>this.tether?.root??this.root;#s=()=>{const t=this.#a();return this.opts.disabled.current||!!t?.disabled};#o=t=>{if(!this.#i)return;const r=this.opts.id.current,i=this.opts.payload.current,n=this.opts.disabled.current;if(this.#n&&this.#n!==r){const a=this.#a();this.tether?this.tether.registry.unregister(this.#n):a?.unregisterTrigger(this.#n)}const s={id:r,node:t,payload:i,disabled:n},o=this.#a();this.tether?(this.tether.registry.has(r)?this.tether.registry.update(s):this.tether.registry.register(s),n&&this.tether.registry.activeTriggerId===r&&o?.opts.open.current&&o.handleClose()):o?.registry.has(r)?o.updateTrigger(s):o?.registerTrigger(s),this.#n=r};#l=()=>{this.#r!==null&&(clearTimeout(this.#r),this.#r=null)};handlePointerUp=()=>{this.#t.current=!1};#d=()=>{this.#s()||(this.#t.current=!1)};#u=()=>{this.#s()||(this.#t.current=!0,this.domContext.getDocument().addEventListener("pointerup",()=>{this.handlePointerUp()},{once:!0}))};#f=t=>{const r=this.#a();if(r){if(this.#s()){r.opts.open.current&&r.handleClose();return}if(t.pointerType!=="touch"){if(r.provider.isPointerInTransit.current){this.#l(),this.#r=window.setTimeout(()=>{r.provider.isPointerInTransit.current&&(r.provider.isPointerInTransit.current=!1,r.onTriggerEnter(this.opts.id.current),P(this.#e,!0))},250);return}r.onTriggerEnter(this.opts.id.current),P(this.#e,!0)}}};#v=t=>{const r=this.#a();if(r){if(this.#s()){r.opts.open.current&&r.handleClose();return}t.pointerType!=="touch"&&(c(this.#e)||(this.#l(),r.provider.isPointerInTransit.current=!1,r.onTriggerEnter(this.opts.id.current),P(this.#e,!0)))}};#m=t=>{const r=this.#a();if(!r||this.#s())return;if(this.#l(),!r.isActiveTrigger(this.opts.id.current)){P(this.#e,!1);return}const i=t.relatedTarget;if(oe(i)){for(const n of r.registry.triggers.values())if(n.node===i){if(r.provider.opts.skipDelayDuration.current>0){P(this.#e,!1);return}r.handleClose(),P(this.#e,!1);return}}r.onTriggerLeave(),P(this.#e,!1)};#c=t=>{const r=this.#a();if(r&&!this.#t.current){if(this.#s()){r.opts.open.current&&r.handleClose();return}r.ignoreNonKeyboardFocus&&!qn(t.currentTarget)||(r.setActiveTrigger(this.opts.id.current),r.handleOpen())}};#h=()=>{const t=this.#a();!t||this.#s()||t.handleClose()};#p=()=>{const t=this.#a();!t||t.disableCloseOnTriggerClick||this.#s()||t.handleClose()};#g=_(()=>{const t=this.#a(),r=!!(t?.opts.open.current&&t.isActiveTrigger(this.opts.id.current)),i=this.#s();return{id:this.opts.id.current,"aria-describedby":r?t?.contentNode?.id:void 0,"data-state":r?t?.stateAttr:"closed","data-disabled":tn(i),"data-delay-duration":`${t?.delayDuration??0}`,[bn.trigger]:"",tabindex:i?void 0:this.opts.tabindex.current,disabled:this.opts.disabled.current,onpointerup:this.#d,onpointerdown:this.#u,onpointerenter:this.#f,onpointermove:this.#v,onpointerleave:this.#m,onfocus:this.#c,onblur:this.#h,onclick:this.#p,...this.attachment}});get props(){return c(this.#g)}set props(t){P(this.#g,t)}}class Ar{static create(t){return new Ar(t,Or.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=_e(this.opts.ref,i=>this.root.contentNode=i),new ns({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&!this.root.disableHoverableContent,transitIntentTimeout:180,ignoredTargets:()=>{if(this.root.provider.opts.skipDelayDuration.current===0)return[];const i=[],n=this.root.triggerNode;for(const s of this.root.registry.triggers.values())s.node&&s.node!==n&&i.push(s.node);return i},onPointerExit:()=>{this.root.provider.isTooltipOpen(this.root)&&this.root.handleClose()}})}onInteractOutside=t=>{if(oe(t.target)&&this.root.triggerNode?.contains(t.target)&&this.root.disableCloseOnTriggerClick){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current?.(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#t=_(()=>({open:this.root.opts.open.current}));get snippetProps(){return c(this.#t)}set snippetProps(t){P(this.#t,t)}#e=_(()=>({id:this.opts.id.current,"data-state":this.root.stateAttr,"data-disabled":tn(this.root.disabled),style:{outline:"none"},[bn.content]:"",...this.attachment}));get props(){return c(this.#e)}set props(t){P(this.#e,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus}}function os(e,t){z(t,!0);let r=b(t,"open",15,!1),i=b(t,"triggerId",15,null),n=b(t,"onOpenChange",3,Fe),s=b(t,"onOpenChangeComplete",3,Fe);const o=Sr.create({open:E(()=>r(),a=>{r(a),n()(a)}),triggerId:E(()=>i(),a=>{i(a)}),delayDuration:E(()=>t.delayDuration),disableCloseOnTriggerClick:E(()=>t.disableCloseOnTriggerClick),disableHoverableContent:E(()=>t.disableHoverableContent),ignoreNonKeyboardFocus:E(()=>t.ignoreNonKeyboardFocus),disabled:E(()=>t.disabled),onOpenChangeComplete:E(()=>s()),tether:E(()=>t.tether)});jo(e,{tooltip:!0,children:(a,l)=>{var u=T(),h=x(u);W(h,()=>t.children??tt,()=>({open:o.opts.open.current,triggerId:o.activeTriggerId,payload:o.activePayload})),m(a,u)},$$slots:{default:!0}}),H()}var ss=F("<div><div><!></div></div>"),as=F("<div><div><!></div></div>");function ls(e,t){const r=fr();z(t,!0);let i=b(t,"id",19,()=>hr(r)),n=b(t,"ref",15,null),s=b(t,"side",3,"top"),o=b(t,"sideOffset",3,0),a=b(t,"align",3,"center"),l=b(t,"avoidCollisions",3,!0),u=b(t,"arrowPadding",3,0),h=b(t,"sticky",3,"partial"),f=b(t,"hideWhenDetached",3,!1),g=b(t,"collisionPadding",3,0),d=b(t,"onInteractOutside",3,Fe),v=b(t,"onEscapeKeydown",3,Fe),p=b(t,"forceMount",3,!1),w=K(t,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","customAnchor","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const y=Ar.create({id:E(()=>i()),ref:E(()=>n(),L=>n(L)),onInteractOutside:E(()=>d()),onEscapeKeydown:E(()=>v())}),O=_(()=>({side:s(),sideOffset:o(),align:a(),avoidCollisions:l(),arrowPadding:u(),sticky:h(),hideWhenDetached:f(),collisionPadding:g(),strategy:t.strategy,customAnchor:t.customAnchor??y.root.triggerNode})),C=_(()=>It(w,c(O),y.props));var S=T(),I=x(S);{var A=L=>{{const q=(Z,et)=>{let X=()=>et?.().props,R=()=>et?.().wrapperProps;const j=_(()=>It(X(),{style:Ur("tooltip")},{style:t.style}));var nt=T(),U=x(nt);{var Y=J=>{var $=T(),ot=x($);{let ut=_(()=>({props:c(j),wrapperProps:R(),...y.snippetProps}));W(ot,()=>t.child,()=>c(ut))}m(J,$)},rt=J=>{var $=ss();at($,()=>({...R()}));var ot=B($);at(ot,()=>({...c(j)}));var ut=B(ot);W(ut,()=>t.children??tt),N(ot),N($),m(J,$)};lt(U,J=>{t.child?J(Y):J(rt,-1)})}m(Z,nt)};let k=_(()=>y.root.disableHoverableContent?"none":"auto");rs(L,G(()=>c(C),()=>y.popperProps,{get enabled(){return y.root.opts.open.current},get id(){return i()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return y.opts.ref},tooltip:!0,get shouldRender(){return y.shouldRender},get contentPointerEvents(){return c(k)},popper:q,$$slots:{popper:!0}}))}},M=L=>{{const q=(Z,et)=>{let X=()=>et?.().props,R=()=>et?.().wrapperProps;const j=_(()=>It(X(),{style:Ur("tooltip")},{style:t.style}));var nt=T(),U=x(nt);{var Y=J=>{var $=T(),ot=x($);{let ut=_(()=>({props:c(j),wrapperProps:R(),...y.snippetProps}));W(ot,()=>t.child,()=>c(ut))}m(J,$)},rt=J=>{var $=as();at($,()=>({...R()}));var ot=B($);at(ot,()=>({...c(j)}));var ut=B(ot);W(ut,()=>t.children??tt),N(ot),N($),m(J,$)};lt(U,J=>{t.child?J(Y):J(rt,-1)})}m(Z,nt)};let k=_(()=>y.root.disableHoverableContent?"none":"auto");es(L,G(()=>c(C),()=>y.popperProps,{get open(){return y.root.opts.open.current},get id(){return i()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return y.opts.ref},tooltip:!0,get shouldRender(){return y.shouldRender},get contentPointerEvents(){return c(k)},popper:q,$$slots:{popper:!0}}))}};lt(I,L=>{p()?L(A):p()||L(M,1)})}m(e,S),H()}var cs=F("<button><!></button>");function ds(e,t){const r=fr();z(t,!0);let i=b(t,"id",19,()=>hr(r)),n=b(t,"disabled",3,!1),s=b(t,"type",3,"button"),o=b(t,"tabindex",3,0),a=b(t,"ref",15,null),l=K(t,["$$slots","$$events","$$legacy","children","child","id","disabled","payload","tether","type","tabindex","ref"]);const u=ze.create({id:E(()=>i()),disabled:E(()=>n()??!1),tabindex:E(()=>o()??0),payload:E(()=>t.payload),tether:E(()=>t.tether),ref:E(()=>a(),p=>a(p))}),h=_(()=>It(l,u.props,{type:s()}));var f=T(),g=x(f);{var d=p=>{var w=T(),y=x(w);W(y,()=>t.child,()=>({props:c(h)})),m(p,w)},v=p=>{var w=cs();at(w,()=>({...c(h)}));var y=B(w);W(y,()=>t.children??tt),N(w),m(p,w)};lt(g,p=>{t.child?p(d):p(v,-1)})}m(e,f),H()}function us(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref"]);Go(e,G(()=>i,{get ref(){return r()},set ref(n){r(n)}})),H()}function fs(e,t){z(t,!0);let r=b(t,"delayDuration",3,700),i=b(t,"disableCloseOnTriggerClick",3,!1),n=b(t,"disableHoverableContent",3,!1),s=b(t,"disabled",3,!1),o=b(t,"ignoreNonKeyboardFocus",3,!1),a=b(t,"skipDelayDuration",3,300);Cr.create({delayDuration:E(()=>r()),disableCloseOnTriggerClick:E(()=>i()),disableHoverableContent:E(()=>n()),disabled:E(()=>s()),ignoreNonKeyboardFocus:E(()=>o()),skipDelayDuration:E(()=>a())});var l=T(),u=x(l);W(u,()=>t.children??tt),m(e,l),H()}function hs(e,t){z(t,!0);let r=b(t,"open",15,!1),i=K(t,["$$slots","$$events","$$legacy","open"]);var n=T(),s=x(n);D(s,()=>os,(o,a)=>{a(o,G(()=>i,{get open(){return r()},set open(l){r(l)}}))}),m(e,n),H()}function gs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref"]);var n=T(),s=x(n);D(s,()=>ds,(o,a)=>{a(o,G({"data-slot":"tooltip-trigger"},()=>i,{get ref(){return r()},set ref(l){r(l)}}))}),m(e,n),H()}function vs(e,t){let r=K(t,["$$slots","$$events","$$legacy"]);var i=T(),n=x(i);D(n,()=>en,(s,o)=>{o(s,G(()=>r))}),m(e,i)}var ms=F("<div></div>"),ps=F("<!> <!>",1);function bs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=b(t,"sideOffset",3,0),n=b(t,"side",3,"top"),s=K(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","children","arrowClasses","portalProps"]);vs(e,G(()=>t.portalProps,{children:(o,a)=>{var l=T(),u=x(l);{let h=_(()=>ct("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--bits-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t.class));D(u,()=>ls,(f,g)=>{g(f,G({"data-slot":"tooltip-content",get sideOffset(){return i()},get side(){return n()},get class(){return c(h)}},()=>s,{get ref(){return r()},set ref(d){r(d)},children:(d,v)=>{var p=ps(),w=x(p);W(w,()=>t.children??tt);var y=Q(w,2);{const O=(C,S)=>{let I=()=>S?.().props;var A=ms();at(A,M=>({class:M,...I()}),[()=>ct("bg-foreground z-50 size-2.5 rotate-45 rounded-[2px]","data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]","data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]","data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2","data-[side=left]:-translate-y-[calc(50%_-_3px)]",t.arrowClasses)]),m(C,A)};D(y,()=>us,(C,S)=>{S(C,{child:O,$$slots:{child:!0}})})}m(d,p)},$$slots:{default:!0}}))})}m(o,l)},$$slots:{default:!0}})),H()}function ys(e,t){let r=K(t,["$$slots","$$events","$$legacy"]);var i=T(),n=x(i);D(n,()=>fs,(s,o)=>{o(s,G(()=>r))}),m(e,i)}const ws=Qr({base:"peer/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});var xs=F("<button><!></button>"),_s=F("<!> <!>",1);function ir(e,t){z(t,!0);const r=(v,p)=>{let w=()=>p?.().props;const y=_(()=>It(c(u),w()));var O=T(),C=x(O);{var S=A=>{var M=T(),L=x(M);W(L,()=>t.child,()=>({props:c(y)})),m(A,M)},I=A=>{var M=xs();at(M,()=>({...c(y)}));var L=B(M);W(L,()=>t.children??tt),N(M),pt(M,q=>i(q),()=>i()),m(A,M)};lt(C,A=>{t.child?A(S):A(I,-1)})}m(v,O)};let i=b(t,"ref",15,null),n=b(t,"variant",3,"default"),s=b(t,"size",3,"default"),o=b(t,"isActive",3,!1),a=K(t,["$$slots","$$events","$$legacy","ref","class","children","child","variant","size","isActive","tooltipContent","tooltipContentProps"]);const l=gr(),u=_(()=>({class:ct(ws({variant:n(),size:s()}),t.class),"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s(),"data-active":o(),...a}));var h=T(),f=x(h);{var g=v=>{r(v,()=>({}))},d=v=>{var p=T(),w=x(p);D(w,()=>hs,(y,O)=>{O(y,{children:(C,S)=>{var I=_s(),A=x(I);{const L=(q,k)=>{let Z=()=>k?.().props;r(q,()=>({props:Z()}))};D(A,()=>gs,(q,k)=>{k(q,{child:L,$$slots:{child:!0}})})}var M=Q(A,2);{let L=_(()=>l.state!=="collapsed"||l.isMobile);D(M,()=>bs,(q,k)=>{k(q,G({side:"right",align:"center",get hidden(){return c(L)}},()=>t.tooltipContentProps,{children:(Z,et)=>{var X=T(),R=x(X);{var j=U=>{var Y=Ct();At(()=>ie(Y,t.tooltipContent)),m(U,Y)},nt=U=>{var Y=T(),rt=x(Y);W(rt,()=>t.tooltipContent),m(U,Y)};lt(R,U=>{typeof t.tooltipContent=="string"?U(j):t.tooltipContent&&U(nt,1)})}m(Z,X)},$$slots:{default:!0}}))})}m(C,I)},$$slots:{default:!0}})}),m(v,p)};lt(f,v=>{t.tooltipContent?v(d,-1):v(g)})}m(e,h),H()}var Ps=F("<li><!></li>");function or(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Ps();at(n,o=>({"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",class:o,...i}),[()=>ct("group/menu-item relative",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var Os=F("<ul><!></ul>");function Zr(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Os();at(n,o=>({"data-slot":"sidebar-menu","data-sidebar":"menu",class:o,...i}),[()=>ct("flex w-full min-w-0 flex-col gap-1",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var Cs=F("<div><!></div>");function Ss(e,t){z(t,!0);let r=b(t,"ref",15,null),i=b(t,"open",15,!0),n=b(t,"onOpenChange",3,()=>{}),s=K(t,["$$slots","$$events","$$legacy","ref","open","onOpenChange","class","style","children"]);const o=Ii({open:()=>i(),setOpen:u=>{i(u),n()(u),document.cookie=`${Oi}=${i()}; path=/; max-age=${Ci}`}});var a=T();En("keydown",Dn,function(...u){o.handleShortcutKeydown?.apply(this,u)});var l=x(a);D(l,()=>ys,(u,h)=>{h(u,{delayDuration:0,children:(f,g)=>{var d=Cs();at(d,p=>({"data-slot":"sidebar-wrapper",style:`--sidebar-width: ${Si}; --sidebar-width-icon: ${Ti}; ${t.style??""}`,class:p,...s}),[()=>ct("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",t.class)]);var v=B(d);W(v,()=>t.children??tt),N(d),pt(d,p=>r(p),()=>r()),m(f,d)},$$slots:{default:!0}})}),m(e,a),H()}function As(e,t){z(t,!0);let r=K(t,["$$slots","$$events","$$legacy"]);const i=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];Jn(e,G({name:"panel-left"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);W(a,()=>t.children??tt),m(n,o)},$$slots:{default:!0}})),H()}var Ts=F('<!> <span class="sr-only">Toggle Sidebar</span>',1);function Ds(e,t){z(t,!0),b(t,"ref",11,null);let r=K(t,["$$slots","$$events","$$legacy","ref","class","onclick"]);const i=gr();{let n=_(()=>ct("size-7",t.class));$r(e,G({"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",get class(){return c(n)},type:"button",onclick:s=>{t.onclick?.(s),i.toggle()}},()=>r,{children:(s,o)=>{var a=Ts(),l=x(a);As(l,{}),bt(2),m(s,a)},$$slots:{default:!0}}))}H()}function Es(e,t){z(t,!0);let r=b(t,"open",15,!1),i=K(t,["$$slots","$$events","$$legacy","open"]);var n=T(),s=x(n);D(s,()=>Qn,(o,a)=>{a(o,G(()=>i,{get open(){return r()},set open(l){r(l)}}))}),m(e,n),H()}function Is(e,t){let r=K(t,["$$slots","$$events","$$legacy"]);var i=T(),n=x(i);D(n,()=>en,(s,o)=>{o(s,G(()=>r))}),m(e,i)}function Ms(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class"]);var n=T(),s=x(n);{let o=_(()=>ct("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t.class));D(s,()=>$n,(a,l)=>{l(a,G({"data-slot":"sheet-overlay",get class(){return c(o)}},()=>i,{get ref(){return r()},set ref(u){r(u)}}))})}m(e,n),H()}const Fs=Qr({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",left:"data-[state=closed]:slide-out-to-start data-[state=open]:slide-in-from-start inset-y-0 start-0 h-full w-3/4 border-e sm:max-w-sm",right:"data-[state=closed]:slide-out-to-end data-[state=open]:slide-in-from-end inset-y-0 end-0 h-full w-3/4 border-s sm:max-w-sm"}},defaultVariants:{side:"right"}});var ks=F('<!> <span class="sr-only">Close</span>',1),Bs=F("<!> <!>",1),Ns=F("<!> <!>",1);function Ls(e,t){z(t,!0);let r=b(t,"ref",15,null),i=b(t,"side",3,"right"),n=K(t,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);Is(e,G(()=>t.portalProps,{children:(s,o)=>{var a=Ns(),l=x(a);Ms(l,{});var u=Q(l,2);{let h=_(()=>ct(Fs({side:i()}),t.class));D(u,()=>ti,(f,g)=>{g(f,G({"data-slot":"sheet-content",get class(){return c(h)}},()=>n,{get ref(){return r()},set ref(d){r(d)},children:(d,v)=>{var p=Bs(),w=x(p);W(w,()=>t.children??tt);var y=Q(w,2);D(y,()=>ei,(O,C)=>{C(O,{class:"ring-offset-background focus-visible:ring-ring absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none",children:(S,I)=>{var A=ks(),M=x(A);ri(M,{class:"size-4"}),bt(2),m(S,A)},$$slots:{default:!0}})}),m(d,p)},$$slots:{default:!0}}))})}m(s,a)},$$slots:{default:!0}})),H()}var Ws=F("<div><!></div>");function zs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Ws();at(n,o=>({"data-slot":"sheet-header",class:o,...i}),[()=>ct("flex flex-col gap-1.5 p-4",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}function Hs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class"]);var n=T(),s=x(n);{let o=_(()=>ct("text-foreground font-semibold",t.class));D(s,()=>ni,(a,l)=>{l(a,G({"data-slot":"sheet-title",get class(){return c(o)}},()=>i,{get ref(){return r()},set ref(u){r(u)}}))})}m(e,n),H()}function Rs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class"]);var n=T(),s=x(n);{let o=_(()=>ct("text-muted-foreground text-sm",t.class));D(s,()=>ii,(a,l)=>{l(a,G({"data-slot":"sheet-description",get class(){return c(o)}},()=>i,{get ref(){return r()},set ref(u){r(u)}}))})}m(e,n),H()}var Ks=F("<div><!></div>"),Vs=F("<!> <!>",1),Xs=F('<!> <div class="flex h-full w-full flex-col"><!></div>',1),Ys=F('<div class="text-sidebar-foreground group peer hidden md:block" data-slot="sidebar"><div data-slot="sidebar-gap"></div> <div><div data-sidebar="sidebar" data-slot="sidebar-inner" class="bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"><!></div></div></div>');function js(e,t){z(t,!0);let r=b(t,"ref",15,null),i=b(t,"side",3,"left"),n=b(t,"variant",3,"sidebar"),s=b(t,"collapsible",3,"offcanvas"),o=K(t,["$$slots","$$events","$$legacy","ref","side","variant","collapsible","class","children"]);const a=gr();var l=T(),u=x(l);{var h=d=>{var v=Ks();at(v,w=>({class:w,...o}),[()=>ct("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",t.class)]);var p=B(v);W(p,()=>t.children??tt),N(v),pt(v,w=>r(w),()=>r()),m(d,v)},f=d=>{var v=T(),p=x(v),w=()=>a.openMobile,y=O=>a.setOpenMobile(O);D(p,()=>Es,(O,C)=>{C(O,G({get open(){return w()},set open(S){y(S)}},()=>o,{children:(S,I)=>{var A=T(),M=x(A);D(M,()=>Ls,(L,q)=>{q(L,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",class:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",get style(){return`--sidebar-width: ${Ai};`},get side(){return i()},children:(k,Z)=>{var et=Xs(),X=x(et);D(X,()=>zs,(nt,U)=>{U(nt,{class:"sr-only",children:(Y,rt)=>{var J=Vs(),$=x(J);D($,()=>Hs,(ut,ht)=>{ht(ut,{children:(kt,V)=>{bt();var dt=Ct("Sidebar");m(kt,dt)},$$slots:{default:!0}})});var ot=Q($,2);D(ot,()=>Rs,(ut,ht)=>{ht(ut,{children:(kt,V)=>{bt();var dt=Ct("Displays the mobile sidebar.");m(kt,dt)},$$slots:{default:!0}})}),m(Y,J)},$$slots:{default:!0}})});var R=Q(X,2),j=B(R);W(j,()=>t.children??tt),N(R),m(k,et)},$$slots:{default:!0}})}),m(S,A)},$$slots:{default:!0}}))}),m(d,v)},g=d=>{var v=Ys(),p=B(v),w=Q(p,2);at(w,C=>({"data-slot":"sidebar-container",class:C,...o}),[()=>ct("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",i()==="left"?"start-0 group-data-[collapsible=offcanvas]:start-[calc(var(--sidebar-width)*-1)]":"end-0 group-data-[collapsible=offcanvas]:end-[calc(var(--sidebar-width)*-1)]",n()==="floating"||n()==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",t.class)]);var y=B(w),O=B(y);W(O,()=>t.children??tt),N(y),N(w),N(v),pt(v,C=>r(C),()=>r()),At(C=>{wt(v,"data-state",a.state),wt(v,"data-collapsible",a.state==="collapsed"?s():""),wt(v,"data-variant",n()),wt(v,"data-side",i()),Fn(p,1,C)},[()=>Mn(ct("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n()==="floating"||n()==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)"))]),m(d,v)};lt(u,d=>{s()==="none"?d(h):a.isMobile?d(f,1):d(g,-1)})}m(e,l),H()}function Us(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref"]);var n=T(),s=x(n);D(s,()=>Xi,(o,a)=>{a(o,G({"data-slot":"dialog-trigger"},()=>i,{get ref(){return r()},set ref(l){r(l)}}))}),m(e,n),H()}function qs(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12 20v-9"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M22 13h-4"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];ce(e,G({name:"bug"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function Zs(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 12.5 8 15l2 2.5"}],["path",{d:"m14 12.5 2 2.5-2 2.5"}]];ce(e,G({name:"file-code"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function ur(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]];ce(e,G({name:"message-square"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function Gs(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];ce(e,G({name:"settings"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function Js(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12 19h8"}],["path",{d:"m4 17 6-6-6-6"}]];ce(e,G({name:"terminal"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function Qs(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12 4v16"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"}],["path",{d:"M9 20h6"}]];ce(e,G({name:"type"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}var $s=F('<div class="flex items-center gap-2 p-2 px-4 text-lg font-semibold tracking-tight"><!> Clawmini</div>'),ta=F("<a><!> <span>Agents</span></a>"),ea=F("<!> <!>",1),ra=F("<!> <span>New Chat</span>",1),na=F("<!> <!>",1),ia=F('<div class="bg-destructive/15 text-destructive text-sm p-3 rounded-md flex items-center"> </div>'),oa=F('<p class="text-sm text-destructive">Name cannot contain spaces.</p>'),sa=F("<option> </option>"),aa=F('<!> <div class="grid gap-4 py-4"><!> <div class="flex flex-col gap-2"><label class="text-sm font-medium leading-none" for="name">Name</label> <!> <!></div> <div class="flex flex-col gap-2"><label class="text-sm font-medium leading-none" for="agent">Initial Agent (optional)</label> <select id="agent" class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"><option>Default</option><!></select></div></div> <!>',1),la=F("<!> <!>",1),ca=F('<a><!> <span data-testid="chat-link"> </span></a>'),da=F("<!> <!>",1),ua=F("<!> <!>",1),fa=F("<!> <!>",1),ha=F("<!> <!>",1);function ga(e,t){z(t,!0);let r=b(t,"agents",19,()=>[]),i=b(t,"currentPath",3,"/"),n=b(t,"collapsible",3,"offcanvas"),s=it(!1),o=it(""),a=it(""),l=it(!1),u=it(""),h=_(()=>c(o).length>0&&/\s/.test(c(o))),f=_(()=>c(o).trim().length>0&&!/\s/.test(c(o)));async function g(){if(!c(f))return;const p=c(o).trim();P(l,!0),P(u,"");try{const w={id:p};c(a)&&(w.agent=c(a));const y=await fetch("/api/chats",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)});if(y.ok)P(s,!1),P(o,""),P(a,""),P(u,""),await gi("app:chats"),await vi(`/chats/${p}`);else{const O=await y.json();P(u,O.error||"Failed to create chat.",!0)}}catch(w){console.error(w),P(u,"An error occurred while creating the chat.")}finally{P(l,!1)}}var d=T(),v=x(d);D(v,()=>js,(p,w)=>{w(p,{get collapsible(){return n()},children:(y,O)=>{var C=ha(),S=x(C);D(S,()=>Wi,(A,M)=>{M(A,{children:(L,q)=>{var k=$s(),Z=B(k);ur(Z,{class:"w-5 h-5"}),bt(),N(k),m(L,k)},$$slots:{default:!0}})});var I=Q(S,2);D(I,()=>Fi,(A,M)=>{M(A,{children:(L,q)=>{var k=fa(),Z=x(k);D(Z,()=>Br,(X,R)=>{R(X,{children:(j,nt)=>{var U=ea(),Y=x(U);D(Y,()=>kr,(J,$)=>{$(J,{children:(ot,ut)=>{bt();var ht=Ct("General");m(ot,ht)},$$slots:{default:!0}})});var rt=Q(Y,2);D(rt,()=>Fr,(J,$)=>{$(J,{children:(ot,ut)=>{var ht=T(),kt=x(ht);D(kt,()=>Zr,(V,dt)=>{dt(V,{children:(Kt,wn)=>{var he=T(),Se=x(he);D(Se,()=>or,(Ye,Vt)=>{Vt(Ye,{children:(Xt,ge)=>{var ve=T(),Qt=x(ve);{const me=($t,Pt)=>{let Ae=()=>Pt?.().props;var Bt=ta();at(Bt,()=>({href:"/agents",...Ae()}));var te=B(Bt);ui(te,{}),bt(2),N(Bt),m($t,Bt)};let pe=_(()=>i()==="/agents");D(Qt,()=>ir,($t,Pt)=>{Pt($t,{get isActive(){return c(pe)},child:me,$$slots:{child:!0}})})}m(Xt,ve)},$$slots:{default:!0}})}),m(Kt,he)},$$slots:{default:!0}})}),m(ot,ht)},$$slots:{default:!0}})}),m(j,U)},$$slots:{default:!0}})});var et=Q(Z,2);D(et,()=>Br,(X,R)=>{R(X,{children:(j,nt)=>{var U=ua(),Y=x(U);D(Y,()=>kr,(J,$)=>{$(J,{children:(ot,ut)=>{bt();var ht=Ct("Chats");m(ot,ht)},$$slots:{default:!0}})});var rt=Q(Y,2);D(rt,()=>Fr,(J,$)=>{$(J,{children:(ot,ut)=>{var ht=T(),kt=x(ht);D(kt,()=>Zr,(V,dt)=>{dt(V,{children:(Kt,wn)=>{var he=da(),Se=x(he);D(Se,()=>or,(Vt,Xt)=>{Xt(Vt,{children:(ge,ve)=>{var Qt=T(),me=x(Qt);D(me,()=>oi,(pe,$t)=>{$t(pe,{get open(){return c(s)},set open(Pt){P(s,Pt,!0)},children:(Pt,Ae)=>{var Bt=la(),te=x(Bt);{const Yt=(jt,Ot)=>{let ye=()=>Ot?.().props;var zt=T(),ee=x(zt);D(ee,()=>ir,(we,Te)=>{Te(we,G(ye,{children:(je,De)=>{var xe=ra(),Ue=x(xe);hi(Ue,{}),bt(2),m(je,xe)},$$slots:{default:!0}}))}),m(jt,zt)};D(te,()=>Us,(jt,Ot)=>{Ot(jt,{child:Yt,$$slots:{child:!0}})})}var be=Q(te,2);D(be,()=>si,(Yt,jt)=>{jt(Yt,{class:"sm:max-w-[425px]",children:(Ot,ye)=>{var zt=aa(),ee=x(zt);D(ee,()=>ai,(st,gt)=>{gt(st,{children:(yt,Ge)=>{var Ut=na(),Ee=x(Ut);D(Ee,()=>li,(re,Je)=>{Je(re,{children:(Qe,On)=>{bt();var $e=Ct("Create New Chat");m(Qe,$e)},$$slots:{default:!0}})});var Dr=Q(Ee,2);D(Dr,()=>ci,(re,Je)=>{Je(re,{children:(Qe,On)=>{bt();var $e=Ct("Enter a name for the new chat and optionally select an agent.");m(Qe,$e)},$$slots:{default:!0}})}),m(yt,Ut)},$$slots:{default:!0}})});var we=Q(ee,2),Te=B(we);{var je=st=>{var gt=ia(),yt=B(gt,!0);N(gt),At(()=>ie(yt,c(u))),m(st,gt)};lt(Te,st=>{c(u)&&st(je)})}var De=Q(Te,2),xe=Q(B(De),2);fi(xe,{id:"name",placeholder:"e.g. debugging-session",class:"col-span-3",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",onkeydown:st=>{st.key==="Enter"&&!st.shiftKey&&(st.preventDefault(),g())},get value(){return c(o)},set value(st){P(o,st,!0)}});var Ue=Q(xe,2);{var xn=st=>{var gt=oa();m(st,gt)};lt(Ue,st=>{c(h)&&st(xn)})}N(De);var Tr=Q(De,2),qe=Q(B(Tr),2),Ze=B(qe);Ze.value=Ze.__value="";var _n=Q(Ze);Ir(_n,17,r,st=>st.id,(st,gt)=>{var yt=sa(),Ge=B(yt,!0);N(yt);var Ut={};At(()=>{ie(Ge,c(gt).id),Ut!==(Ut=c(gt).id)&&(yt.value=(yt.__value=c(gt).id)??"")}),m(st,yt)}),N(qe),N(Tr),N(we);var Pn=Q(we,2);D(Pn,()=>di,(st,gt)=>{gt(st,{children:(yt,Ge)=>{{let Ut=_(()=>!c(f)||c(l));$r(yt,{type:"submit",get disabled(){return c(Ut)},onclick:g,children:(Ee,Dr)=>{bt();var re=Ct();At(()=>ie(re,c(l)?"Creating...":"Create Chat")),m(Ee,re)},$$slots:{default:!0}})}},$$slots:{default:!0}})}),kn(qe,()=>c(a),st=>P(a,st)),m(Ot,zt)},$$slots:{default:!0}})}),m(Pt,Bt)},$$slots:{default:!0}})}),m(ge,Qt)},$$slots:{default:!0}})});var Ye=Q(Se,2);Ir(Ye,16,()=>t.chats,Vt=>Vt,(Vt,Xt)=>{var ge=T(),ve=x(ge);D(ve,()=>or,(Qt,me)=>{me(Qt,{children:(pe,$t)=>{var Pt=T(),Ae=x(Pt);{const Bt=(be,Yt)=>{let jt=()=>Yt?.().props;var Ot=ca();at(Ot,()=>({href:`/chats/${Xt??""}`,...jt()}));var ye=B(Ot);ur(ye,{});var zt=Q(ye,2),ee=B(zt,!0);N(zt),N(Ot),At(()=>ie(ee,Xt)),m(be,Ot)};let te=_(()=>i()===`/chats/${Xt}`);D(Ae,()=>ir,(be,Yt)=>{Yt(be,{get isActive(){return c(te)},child:Bt,$$slots:{child:!0}})})}m(pe,Pt)},$$slots:{default:!0}})}),m(Vt,ge)}),m(Kt,he)},$$slots:{default:!0}})}),m(ot,ht)},$$slots:{default:!0}})}),m(j,U)},$$slots:{default:!0}})}),m(L,k)},$$slots:{default:!0}})}),m(y,C)},$$slots:{default:!0}})}),m(e,d),H()}var va=F('<a class="text-muted-foreground hover:text-foreground transition-colors" title="Chat Settings"><!></a>'),ma=F('<header class="flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4"><!> <div class="w-full flex items-center justify-between"><div class="font-semibold text-sm"><!></div> <div class="flex items-center gap-4"><!> <div class="flex items-center gap-2"><button id="markdown-toggle" type="button" class="flex items-center justify-center p-2 rounded-md hover:bg-muted transition-colors"><!></button> <button id="verbosity-toggle" type="button" class="flex items-center justify-center p-2 rounded-md hover:bg-muted transition-colors"><!></button></div></div></div></header> <main class="flex flex-1 flex-col overflow-hidden bg-muted/20"><!></main>',1),pa=F("<!> <!>",1);function Ma(e,t){z(t,!0),Gr(()=>{const o=localStorage.getItem("appState.markdownEnabled");o!==null&&(ft.markdownEnabled=o==="true")}),St(()=>{localStorage.setItem("appState.markdownEnabled",String(ft.markdownEnabled))});function r(){ft.verbosityLevel==="default"?ft.verbosityLevel="debug":ft.verbosityLevel==="debug"?ft.verbosityLevel="verbose":ft.verbosityLevel="default"}function i(){ft.markdownEnabled=!ft.markdownEnabled}var n=T(),s=x(n);D(s,()=>Ss,(o,a)=>{a(o,{class:"h-[100dvh] overflow-hidden",children:(l,u)=>{var h=pa(),f=x(h);ga(f,{get chats(){return t.data.chats},get agents(){return t.data.agents},get currentPath(){return ne.url.pathname}});var g=Q(f,2);D(g,()=>Hi,(d,v)=>{v(d,{children:(p,w)=>{var y=ma(),O=x(y),C=B(O);D(C,()=>Ds,(V,dt)=>{dt(V,{})});var S=Q(C,2),I=B(S),A=B(I);{var M=V=>{var dt=Ct();At(Kt=>ie(dt,Kt),[()=>ne.url.pathname.replace("/chats/","").replace("/settings","")]),m(V,dt)},L=_(()=>ne.url.pathname.startsWith("/chats/")),q=V=>{var dt=Ct("Home");m(V,dt)};lt(A,V=>{c(L)?V(M):V(q,-1)})}N(I);var k=Q(I,2),Z=B(k);{var et=V=>{var dt=va(),Kt=B(dt);Gs(Kt,{class:"w-5 h-5"}),N(dt),At(()=>wt(dt,"href",`${ne.url.pathname??""}/settings`)),m(V,dt)},X=_(()=>ne.url.pathname.startsWith("/chats/")&&!ne.url.pathname.endsWith("/settings"));lt(Z,V=>{c(X)&&V(et)})}var R=Q(Z,2),j=B(R),nt=B(j);{var U=V=>{Zs(V,{class:"w-5 h-5 text-muted-foreground"})},Y=V=>{Qs(V,{class:"w-5 h-5 text-muted-foreground"})};lt(nt,V=>{ft.markdownEnabled?V(U):V(Y,-1)})}N(j);var rt=Q(j,2),J=B(rt);{var $=V=>{ur(V,{class:"w-5 h-5 text-muted-foreground"})},ot=V=>{qs(V,{class:"w-5 h-5 text-amber-500"})},ut=V=>{Js(V,{class:"w-5 h-5 text-red-500"})};lt(J,V=>{ft.verbosityLevel==="default"?V($):ft.verbosityLevel==="debug"?V(ot,1):ft.verbosityLevel==="verbose"&&V(ut,2)})}N(rt),N(R),N(k),N(S),N(O);var ht=Q(O,2),kt=B(ht);W(kt,()=>t.children),N(ht),At(()=>{wt(j,"aria-label",`Markdown ${ft.markdownEnabled?"enabled":"disabled"}`),wt(j,"title",`Markdown: ${ft.markdownEnabled?"On":"Off"}`),wt(rt,"aria-label",`Verbosity level: ${ft.verbosityLevel}`),wt(rt,"title",`Verbosity: ${ft.verbosityLevel}`)}),Er("click",j,i),Er("click",rt,r),m(p,y)},$$slots:{default:!0}})}),m(l,h)},$$slots:{default:!0}})}),m(e,n),H()}In(["click"]);export{Ma as component,Ia as universal};
|
|
1
|
+
import{a as m,f as F,c as T,p as fr,d as Cn,t as Ct}from"../chunks/BmRlVmv6.js";import{o as Gr}from"../chunks/DhD271EB.js";import{bg as Sn,bh as An,G as _,w as c,D as P,I as it,p as z,c as B,r as N,a as H,be as tt,f as x,n as St,o as Tn,l as Me,t as At,s as Q,bi as Dn,C as bt}from"../chunks/CME08kGM.js";import{g as Jr,o as Gt,s as ie,e as En,d as In,a as Er}from"../chunks/DMtIqaiV.js";import{p as b,b as pt,r as K,i as lt,s as G,l as le}from"../chunks/B6YN0Nuq.js";import{a as at,c as ct,j as W,f as wt,t as Qr,B as $r,k as Mn,h as Fn,I as ce,s as de,e as Ir,g as kn}from"../chunks/CK9JZLaG.js";import{c as D}from"../chunks/Zeh-C-mx.js";import{f as Bn,g as hr,h as Nn,i as E,m as It,s as Tt,C as Oe,j as _e,u as He,k as Ln,l as Wn,n as zn,w as Dt,o as Hn,F as Rn,S as Mr,E as Kn,p as Vn,T as Xn,q as Yn,r as oe,t as jn,v as Un,x as qn,y as tn,P as Zn,z as Gn,A as Fe,G as en,I as Jn,H as Qn,J as $n,K as ti,L as ei,X as ri,M as ni,N as ii,e as oi,D as si,a as ai,b as li,c as ci,d as di,B as ui}from"../chunks/Ck-be5J2.js";import{p as ne}from"../chunks/vDehDcuJ.js";import{I as fi,P as hi}from"../chunks/Drm9vgeP.js";import{i as gi,g as vi}from"../chunks/D5iV40bG.js";import"../chunks/Ck3rYNON.js";import{a as ft}from"../chunks/DsIToJCP.js";const mi=!1,pi=async({fetch:e,depends:t})=>{t("app:chats"),t("app:agents");let r=[],i=[];const[n,s]=await Promise.all([e("/api/chats").catch(o=>(console.error("Failed to load chats:",o),null)),e("/api/agents").catch(o=>(console.error("Failed to load agents:",o),null))]);return n?.ok&&(r=await n.json()),s?.ok&&(i=await s.json()),{chats:r,agents:i}},Ia=Object.freeze(Object.defineProperty({__proto__:null,load:pi,ssr:mi},Symbol.toStringTag,{value:"Module"}));class bi{#t;#e;constructor(t,r){this.#t=t,this.#e=Jr(r)}get current(){return this.#e(),this.#t()}}const yi=/\(.+\)/,wi=new Set(["all","print","screen","and","or","not","only"]);class xi extends bi{constructor(t,r){let i=yi.test(t)||t.split(/[\s,]+/).some(s=>wi.has(s.trim()))?t:`(${t})`;const n=window.matchMedia(i);super(()=>n.matches,s=>Gt(n,"change",s))}}const _i=768;class Pi extends xi{constructor(t=_i){super(`max-width: ${t-1}px`)}}const Oi="sidebar:state",Ci=3600*24*7,Si="16rem",Ai="18rem",Ti="3rem",Di="b";class Ei{props;#t=_(()=>this.props.open());get open(){return c(this.#t)}set open(t){P(this.#t,t)}#e=it(!1);get openMobile(){return c(this.#e)}set openMobile(t){P(this.#e,t,!0)}setOpen;#r;#i=_(()=>this.open?"expanded":"collapsed");get state(){return c(this.#i)}set state(t){P(this.#i,t)}constructor(t){this.setOpen=t.setOpen,this.#r=new Pi,this.props=t}get isMobile(){return this.#r.current}handleShortcutKeydown=t=>{t.key===Di&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.toggle())};setOpenMobile=t=>{this.openMobile=t};toggle=()=>this.#r.current?this.openMobile=!this.openMobile:this.setOpen(!this.open)}const rn="scn-sidebar";function Ii(e){return An(Symbol.for(rn),new Ei(e))}function gr(){return Sn(Symbol.for(rn))}var Mi=F("<div><!></div>");function Fi(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Mi();at(n,o=>({"data-slot":"sidebar-content","data-sidebar":"content",class:o,...i}),[()=>ct("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var ki=F("<div><!></div>");function Fr(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=ki();at(n,o=>({"data-slot":"sidebar-group-content","data-sidebar":"group-content",class:o,...i}),[()=>ct("w-full text-sm",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var Bi=F("<div><!></div>");function kr(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","children","child","class"]);const n=_(()=>({class:ct("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t.class),"data-slot":"sidebar-group-label","data-sidebar":"group-label",...i}));var s=T(),o=x(s);{var a=u=>{var h=T(),f=x(h);W(f,()=>t.child,()=>({props:c(n)})),m(u,h)},l=u=>{var h=Bi();at(h,()=>({...c(n)}));var f=B(h);W(f,()=>t.children??tt),N(h),pt(h,g=>r(g),()=>r()),m(u,h)};lt(o,u=>{t.child?u(a):u(l,-1)})}m(e,s),H()}var Ni=F("<div><!></div>");function Br(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Ni();at(n,o=>({"data-slot":"sidebar-group","data-sidebar":"group",class:o,...i}),[()=>ct("relative flex w-full min-w-0 flex-col p-2",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var Li=F("<div><!></div>");function Wi(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Li();at(n,o=>({"data-slot":"sidebar-header","data-sidebar":"header",class:o,...i}),[()=>ct("flex flex-col gap-2 p-2",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var zi=F("<main><!></main>");function Hi(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=zi();at(n,o=>({"data-slot":"sidebar-inset",class:o,...i}),[()=>ct("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}function Ri(e){return typeof e=="function"}function Nr(e){return Ri(e)?e():e}class Ki{#t={width:0,height:0};#e=!1;#r;#i;#n;#a=_(()=>(c(this.#o)?.(),this.getSize().width));#s=_(()=>(c(this.#o)?.(),this.getSize().height));#o=_(()=>{const t=Nr(this.#i);if(t)return Jr(r=>{if(!this.#n)return;const i=new this.#n.ResizeObserver(n=>{this.#e=!0;for(const s of n){const o=this.#r.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((l,u)=>Math.max(l,u.inlineSize),0),this.#t.height=a.reduce((l,u)=>Math.max(l,u.blockSize),0)}r()});return i.observe(t),()=>{this.#e=!1,i.disconnect()}})});constructor(t,r={box:"border-box"}){this.#n=r.window??Bn,this.#r=r,this.#i=t,this.#t={width:0,height:0}}calculateSize(){const t=Nr(this.#i);if(!t||!this.#n)return;const r=t.offsetWidth,i=t.offsetHeight;if(this.#r.box==="border-box")return{width:r,height:i};const n=this.#n.getComputedStyle(t),s=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),o=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),l=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),u=r-s-a,h=i-o-l;return{width:u,height:h}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return c(this.#o)?.(),this.getSize()}get width(){return c(this.#a)}get height(){return c(this.#s)}}function vr(e){St(()=>Tn(()=>e()))}var Vi=F("<button><!></button>");function Xi(e,t){const r=fr();z(t,!0);let i=b(t,"id",19,()=>hr(r)),n=b(t,"ref",15,null),s=b(t,"disabled",3,!1),o=K(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const a=Nn.create({id:E(()=>i()),ref:E(()=>n(),d=>n(d)),disabled:E(()=>!!s())}),l=_(()=>It(o,a.props));var u=T(),h=x(u);{var f=d=>{var v=T(),p=x(v);W(p,()=>t.child,()=>({props:c(l)})),m(d,v)},g=d=>{var v=Vi();at(v,()=>({...c(l)}));var p=B(v);W(p,()=>t.children??tt),N(v),m(d,v)};lt(h,d=>{t.child?d(f):d(g,-1)})}m(e,u),H()}const Yi=["top","right","bottom","left"],Ht=Math.min,vt=Math.max,ke=Math.round,Ie=Math.floor,Mt=e=>({x:e,y:e}),ji={left:"right",right:"left",bottom:"top",top:"bottom"};function sr(e,t,r){return vt(e,Ht(t,r))}function Nt(e,t){return typeof e=="function"?e(t):e}function Lt(e){return e.split("-")[0]}function ue(e){return e.split("-")[1]}function mr(e){return e==="x"?"y":"x"}function pr(e){return e==="y"?"height":"width"}function Et(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function br(e){return mr(Et(e))}function Ui(e,t,r){r===void 0&&(r=!1);const i=ue(e),n=br(e),s=pr(n);let o=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Be(o)),[o,Be(o)]}function qi(e){const t=Be(e);return[ar(e),t,ar(t)]}function ar(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lr=["left","right"],Wr=["right","left"],Zi=["top","bottom"],Gi=["bottom","top"];function Ji(e,t,r){switch(e){case"top":case"bottom":return r?t?Wr:Lr:t?Lr:Wr;case"left":case"right":return t?Zi:Gi;default:return[]}}function Qi(e,t,r,i){const n=ue(e);let s=Ji(Lt(e),r==="start",i);return n&&(s=s.map(o=>o+"-"+n),t&&(s=s.concat(s.map(ar)))),s}function Be(e){const t=Lt(e);return ji[t]+e.slice(t.length)}function $i(e){return{top:0,right:0,bottom:0,left:0,...e}}function nn(e){return typeof e!="number"?$i(e):{top:e,right:e,bottom:e,left:e}}function Ne(e){const{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function zr(e,t,r){let{reference:i,floating:n}=e;const s=Et(t),o=br(t),a=pr(o),l=Lt(t),u=s==="y",h=i.x+i.width/2-n.width/2,f=i.y+i.height/2-n.height/2,g=i[a]/2-n[a]/2;let d;switch(l){case"top":d={x:h,y:i.y-n.height};break;case"bottom":d={x:h,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-n.width,y:f};break;default:d={x:i.x,y:i.y}}switch(ue(t)){case"start":d[o]-=g*(r&&u?-1:1);break;case"end":d[o]+=g*(r&&u?-1:1);break}return d}async function to(e,t){var r;t===void 0&&(t={});const{x:i,y:n,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:g=!1,padding:d=0}=Nt(t,e),v=nn(d),w=a[g?f==="floating"?"reference":"floating":f],y=Ne(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(w)))==null||r?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:h,strategy:l})),O=f==="floating"?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},I=Ne(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:C,strategy:l}):O);return{top:(y.top-I.top+v.top)/S.y,bottom:(I.bottom-y.bottom+v.bottom)/S.y,left:(y.left-I.left+v.left)/S.x,right:(I.right-y.right+v.right)/S.x}}const eo=50,ro=async(e,t,r)=>{const{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:to},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:n}),{x:h,y:f}=zr(u,i,l),g=i,d=0;const v={};for(let p=0;p<s.length;p++){const w=s[p];if(!w)continue;const{name:y,fn:O}=w,{x:C,y:S,data:I,reset:A}=await O({x:h,y:f,initialPlacement:i,placement:g,strategy:n,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});h=C??h,f=S??f,v[y]={...v[y],...I},A&&d<eo&&(d++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(u=A.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:n}):A.rects),{x:h,y:f}=zr(u,g,l)),p=-1)}return{x:h,y:f,placement:g,strategy:n,middlewareData:v}},no=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:n,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:h=0}=Nt(e,t)||{};if(u==null)return{};const f=nn(h),g={x:r,y:i},d=br(n),v=pr(d),p=await o.getDimensions(u),w=d==="y",y=w?"top":"left",O=w?"bottom":"right",C=w?"clientHeight":"clientWidth",S=s.reference[v]+s.reference[d]-g[d]-s.floating[v],I=g[d]-s.reference[d],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=A?A[C]:0;(!M||!await(o.isElement==null?void 0:o.isElement(A)))&&(M=a.floating[C]||s.floating[v]);const L=S/2-I/2,q=M/2-p[v]/2-1,k=Ht(f[y],q),Z=Ht(f[O],q),et=k,X=M-p[v]-Z,R=M/2-p[v]/2+L,j=sr(et,R,X),nt=!l.arrow&&ue(n)!=null&&R!==j&&s.reference[v]/2-(R<et?k:Z)-p[v]/2<0,U=nt?R<et?R-et:R-X:0;return{[d]:g[d]+U,data:{[d]:j,centerOffset:R-j-U,...nt&&{alignmentOffset:U}},reset:nt}}}),io=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,i;const{placement:n,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...w}=Nt(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Lt(n),O=Et(a),C=Lt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),I=g||(C||!p?[Be(a)]:qi(a)),A=v!=="none";!g&&A&&I.push(...Qi(a,p,v,S));const M=[a,...I],L=await l.detectOverflow(t,w),q=[];let k=((i=s.flip)==null?void 0:i.overflows)||[];if(h&&q.push(L[y]),f){const R=Ui(n,o,S);q.push(L[R[0]],L[R[1]])}if(k=[...k,{placement:n,overflows:q}],!q.every(R=>R<=0)){var Z,et;const R=(((Z=s.flip)==null?void 0:Z.index)||0)+1,j=M[R];if(j&&(!(f==="alignment"?O!==Et(j):!1)||k.every(Y=>Et(Y.placement)===O?Y.overflows[0]>0:!0)))return{data:{index:R,overflows:k},reset:{placement:j}};let nt=(et=k.filter(U=>U.overflows[0]<=0).sort((U,Y)=>U.overflows[1]-Y.overflows[1])[0])==null?void 0:et.placement;if(!nt)switch(d){case"bestFit":{var X;const U=(X=k.filter(Y=>{if(A){const rt=Et(Y.placement);return rt===O||rt==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(rt=>rt>0).reduce((rt,J)=>rt+J,0)]).sort((Y,rt)=>Y[1]-rt[1])[0])==null?void 0:X[0];U&&(nt=U);break}case"initialPlacement":nt=a;break}if(n!==nt)return{reset:{placement:nt}}}return{}}}};function Hr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rr(e){return Yi.some(t=>e[t]>=0)}const oo=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:i}=t,{strategy:n="referenceHidden",...s}=Nt(e,t);switch(n){case"referenceHidden":{const o=await i.detectOverflow(t,{...s,elementContext:"reference"}),a=Hr(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Rr(a)}}}case"escaped":{const o=await i.detectOverflow(t,{...s,altBoundary:!0}),a=Hr(o,r.floating);return{data:{escapedOffsets:a,escaped:Rr(a)}}}default:return{}}}}},on=new Set(["left","top"]);async function so(e,t){const{placement:r,platform:i,elements:n}=e,s=await(i.isRTL==null?void 0:i.isRTL(n.floating)),o=Lt(r),a=ue(r),l=Et(r)==="y",u=on.has(o)?-1:1,h=s&&l?-1:1,f=Nt(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(d=a==="end"?v*-1:v),l?{x:d*h,y:g*u}:{x:g*u,y:d*h}}const ao=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:n,y:s,placement:o,middlewareData:a}=t,l=await so(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:o}}}}},lo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:n,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:O,y:C}=y;return{x:O,y:C}}},...u}=Nt(e,t),h={x:r,y:i},f=await s.detectOverflow(t,u),g=Et(Lt(n)),d=mr(g);let v=h[d],p=h[g];if(o){const y=d==="y"?"top":"left",O=d==="y"?"bottom":"right",C=v+f[y],S=v-f[O];v=sr(C,v,S)}if(a){const y=g==="y"?"top":"left",O=g==="y"?"bottom":"right",C=p+f[y],S=p-f[O];p=sr(C,p,S)}const w=l.fn({...t,[d]:v,[g]:p});return{...w,data:{x:w.x-r,y:w.y-i,enabled:{[d]:o,[g]:a}}}}}},co=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:n,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Nt(e,t),h={x:r,y:i},f=Et(n),g=mr(f);let d=h[g],v=h[f];const p=Nt(a,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const C=g==="y"?"height":"width",S=s.reference[g]-s.floating[C]+w.mainAxis,I=s.reference[g]+s.reference[C]-w.mainAxis;d<S?d=S:d>I&&(d=I)}if(u){var y,O;const C=g==="y"?"width":"height",S=on.has(Lt(n)),I=s.reference[f]-s.floating[C]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:w.crossAxis),A=s.reference[f]+s.reference[C]+(S?0:((O=o.offset)==null?void 0:O[f])||0)-(S?w.crossAxis:0);v<I?v=I:v>A&&(v=A)}return{[g]:d,[f]:v}}}},uo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:n,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Nt(e,t),h=await o.detectOverflow(t,u),f=Lt(n),g=ue(n),d=Et(n)==="y",{width:v,height:p}=s.floating;let w,y;f==="top"||f==="bottom"?(w=f,y=g===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,w=g==="end"?"top":"bottom");const O=p-h.top-h.bottom,C=v-h.left-h.right,S=Ht(p-h[w],O),I=Ht(v-h[y],C),A=!t.middlewareData.shift;let M=S,L=I;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=C),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=O),A&&!g){const k=vt(h.left,0),Z=vt(h.right,0),et=vt(h.top,0),X=vt(h.bottom,0);d?L=v-2*(k!==0||Z!==0?k+Z:vt(h.left,h.right)):M=p-2*(et!==0||X!==0?et+X:vt(h.top,h.bottom))}await l({...t,availableWidth:L,availableHeight:M});const q=await o.getDimensions(a.floating);return v!==q.width||p!==q.height?{reset:{rects:!0}}:{}}}};function Re(){return typeof window<"u"}function fe(e){return sn(e)?(e.nodeName||"").toLowerCase():"#document"}function mt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=(sn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sn(e){return Re()?e instanceof Node||e instanceof mt(e).Node:!1}function xt(e){return Re()?e instanceof Element||e instanceof mt(e).Element:!1}function Wt(e){return Re()?e instanceof HTMLElement||e instanceof mt(e).HTMLElement:!1}function Kr(e){return!Re()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mt(e).ShadowRoot}function Ce(e){const{overflow:t,overflowX:r,overflowY:i,display:n}=_t(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function fo(e){return/^(table|td|th)$/.test(fe(e))}function Ke(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ho=/transform|translate|scale|rotate|perspective|filter/,go=/paint|layout|strict|content/,qt=e=>!!e&&e!=="none";let tr;function yr(e){const t=xt(e)?_t(e):e;return qt(t.transform)||qt(t.translate)||qt(t.scale)||qt(t.rotate)||qt(t.perspective)||!wr()&&(qt(t.backdropFilter)||qt(t.filter))||ho.test(t.willChange||"")||go.test(t.contain||"")}function vo(e){let t=Rt(e);for(;Wt(t)&&!ae(t);){if(yr(t))return t;if(Ke(t))return null;t=Rt(t)}return null}function wr(){return tr==null&&(tr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tr}function ae(e){return/^(html|body|#document)$/.test(fe(e))}function _t(e){return mt(e).getComputedStyle(e)}function Ve(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rt(e){if(fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Kr(e)&&e.host||Ft(e);return Kr(t)?t.host:t}function an(e){const t=Rt(e);return ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wt(t)&&Ce(t)?t:an(t)}function Pe(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=an(e),s=n===((i=e.ownerDocument)==null?void 0:i.body),o=mt(n);if(s){const a=lr(o);return t.concat(o,o.visualViewport||[],Ce(n)?n:[],a&&r?Pe(a):[])}else return t.concat(n,Pe(n,[],r))}function lr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ln(e){const t=_t(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=Wt(e),s=n?e.offsetWidth:r,o=n?e.offsetHeight:i,a=ke(r)!==s||ke(i)!==o;return a&&(r=s,i=o),{width:r,height:i,$:a}}function xr(e){return xt(e)?e:e.contextElement}function se(e){const t=xr(e);if(!Wt(t))return Mt(1);const r=t.getBoundingClientRect(),{width:i,height:n,$:s}=ln(t);let o=(s?ke(r.width):r.width)/i,a=(s?ke(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const mo=Mt(0);function cn(e){const t=mt(e);return!wr()||!t.visualViewport?mo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function po(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==mt(e)?!1:t}function Jt(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=xr(e);let o=Mt(1);t&&(i?xt(i)&&(o=se(i)):o=se(e));const a=po(s,r,i)?cn(s):Mt(0);let l=(n.left+a.x)/o.x,u=(n.top+a.y)/o.y,h=n.width/o.x,f=n.height/o.y;if(s){const g=mt(s),d=i&&xt(i)?mt(i):i;let v=g,p=lr(v);for(;p&&i&&d!==v;){const w=se(p),y=p.getBoundingClientRect(),O=_t(p),C=y.left+(p.clientLeft+parseFloat(O.paddingLeft))*w.x,S=y.top+(p.clientTop+parseFloat(O.paddingTop))*w.y;l*=w.x,u*=w.y,h*=w.x,f*=w.y,l+=C,u+=S,v=mt(p),p=lr(v)}}return Ne({width:h,height:f,x:l,y:u})}function Xe(e,t){const r=Ve(e).scrollLeft;return t?t.left+r:Jt(Ft(e)).left+r}function dn(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Xe(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function bo(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e;const s=n==="fixed",o=Ft(i),a=t?Ke(t.floating):!1;if(i===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},u=Mt(1);const h=Mt(0),f=Wt(i);if((f||!f&&!s)&&((fe(i)!=="body"||Ce(o))&&(l=Ve(i)),f)){const d=Jt(i);u=se(i),h.x=d.x+i.clientLeft,h.y=d.y+i.clientTop}const g=o&&!f&&!s?dn(o,l):Mt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+h.x+g.x,y:r.y*u.y-l.scrollTop*u.y+h.y+g.y}}function yo(e){return Array.from(e.getClientRects())}function wo(e){const t=Ft(e),r=Ve(e),i=e.ownerDocument.body,n=vt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=vt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-r.scrollLeft+Xe(e);const a=-r.scrollTop;return _t(i).direction==="rtl"&&(o+=vt(t.clientWidth,i.clientWidth)-n),{width:n,height:s,x:o,y:a}}const Vr=25;function xo(e,t){const r=mt(e),i=Ft(e),n=r.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(n){s=n.width,o=n.height;const h=wr();(!h||h&&t==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}const u=Xe(i);if(u<=0){const h=i.ownerDocument,f=h.body,g=getComputedStyle(f),d=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(i.clientWidth-f.clientWidth-d);v<=Vr&&(s-=v)}else u<=Vr&&(s+=u);return{width:s,height:o,x:a,y:l}}function _o(e,t){const r=Jt(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,s=Wt(e)?se(e):Mt(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=n*s.x,u=i*s.y;return{width:o,height:a,x:l,y:u}}function Xr(e,t,r){let i;if(t==="viewport")i=xo(e,r);else if(t==="document")i=wo(Ft(e));else if(xt(t))i=_o(t,r);else{const n=cn(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ne(i)}function un(e,t){const r=Rt(e);return r===t||!xt(r)||ae(r)?!1:_t(r).position==="fixed"||un(r,t)}function Po(e,t){const r=t.get(e);if(r)return r;let i=Pe(e,[],!1).filter(a=>xt(a)&&fe(a)!=="body"),n=null;const s=_t(e).position==="fixed";let o=s?Rt(e):e;for(;xt(o)&&!ae(o);){const a=_t(o),l=yr(o);!l&&a.position==="fixed"&&(n=null),(s?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Ce(o)&&!l&&un(e,o))?i=i.filter(h=>h!==o):n=a,o=Rt(o)}return t.set(e,i),i}function Oo(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e;const o=[...r==="clippingAncestors"?Ke(t)?[]:Po(t,this._c):[].concat(r),i],a=Xr(t,o[0],n);let l=a.top,u=a.right,h=a.bottom,f=a.left;for(let g=1;g<o.length;g++){const d=Xr(t,o[g],n);l=vt(d.top,l),u=Ht(d.right,u),h=Ht(d.bottom,h),f=vt(d.left,f)}return{width:u-f,height:h-l,x:f,y:l}}function Co(e){const{width:t,height:r}=ln(e);return{width:t,height:r}}function So(e,t,r){const i=Wt(t),n=Ft(t),s=r==="fixed",o=Jt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Mt(0);function u(){l.x=Xe(n)}if(i||!i&&!s)if((fe(t)!=="body"||Ce(n))&&(a=Ve(t)),i){const d=Jt(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else n&&u();s&&!i&&n&&u();const h=n&&!i&&!s?dn(n,a):Mt(0),f=o.left+a.scrollLeft-l.x-h.x,g=o.top+a.scrollTop-l.y-h.y;return{x:f,y:g,width:o.width,height:o.height}}function er(e){return _t(e).position==="static"}function Yr(e,t){if(!Wt(e)||_t(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ft(e)===r&&(r=r.ownerDocument.body),r}function fn(e,t){const r=mt(e);if(Ke(e))return r;if(!Wt(e)){let n=Rt(e);for(;n&&!ae(n);){if(xt(n)&&!er(n))return n;n=Rt(n)}return r}let i=Yr(e,t);for(;i&&fo(i)&&er(i);)i=Yr(i,t);return i&&ae(i)&&er(i)&&!yr(i)?r:i||vo(e)||r}const Ao=async function(e){const t=this.getOffsetParent||fn,r=this.getDimensions,i=await r(e.floating);return{reference:So(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function To(e){return _t(e).direction==="rtl"}const Do={convertOffsetParentRelativeRectToViewportRelativeRect:bo,getDocumentElement:Ft,getClippingRect:Oo,getOffsetParent:fn,getElementRects:Ao,getClientRects:yo,getDimensions:Co,getScale:se,isElement:xt,isRTL:To};function hn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Eo(e,t){let r=null,i;const n=Ft(e);function s(){var a;clearTimeout(i),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:h,top:f,width:g,height:d}=u;if(a||t(),!g||!d)return;const v=Ie(f),p=Ie(n.clientWidth-(h+g)),w=Ie(n.clientHeight-(f+d)),y=Ie(h),C={rootMargin:-v+"px "+-p+"px "+-w+"px "+-y+"px",threshold:vt(0,Ht(1,l))||1};let S=!0;function I(A){const M=A[0].intersectionRatio;if(M!==l){if(!S)return o();M?o(!1,M):i=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!hn(u,e.getBoundingClientRect())&&o(),S=!1}try{r=new IntersectionObserver(I,{...C,root:n.ownerDocument})}catch{r=new IntersectionObserver(I,C)}r.observe(e)}return o(!0),s}function Io(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=xr(e),h=n||s?[...u?Pe(u):[],...t?Pe(t):[]]:[];h.forEach(y=>{n&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=u&&a?Eo(u,r):null;let g=-1,d=null;o&&(d=new ResizeObserver(y=>{let[O]=y;O&&O.target===u&&d&&t&&(d.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=d)==null||C.observe(t)})),r()}),u&&!l&&d.observe(u),t&&d.observe(t));let v,p=l?Jt(e):null;l&&w();function w(){const y=Jt(e);p&&!hn(p,y)&&r(),p=y,v=requestAnimationFrame(w)}return r(),()=>{var y;h.forEach(O=>{n&&O.removeEventListener("scroll",r),s&&O.removeEventListener("resize",r)}),f?.(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(v)}}const Mo=ao,Fo=lo,ko=io,Bo=uo,No=oo,Lo=no,Wo=co,zo=(e,t,r)=>{const i=new Map,n={platform:Do,...r},s={...n.platform,_c:i};return ro(e,t,{...n,platform:s})};function Zt(e){return typeof e=="function"?e():e}function gn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jr(e,t){const r=gn(e);return Math.round(t*r)/r}function Ur(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Ho(e){const t=e.whileElementsMounted,r=_(()=>Zt(e.open)??!0),i=_(()=>Zt(e.middleware)),n=_(()=>Zt(e.transform)??!0),s=_(()=>Zt(e.placement)??"bottom"),o=_(()=>Zt(e.strategy)??"absolute"),a=_(()=>Zt(e.sideOffset)??0),l=_(()=>Zt(e.alignOffset)??0),u=e.reference;let h=it(0),f=it(0);const g=Tt(null);let d=it(Me(c(o))),v=it(Me(c(s))),p=it(Me({})),w=it(!1),y=!1,O=0;const C=_(()=>{const k=g.current?jr(g.current,c(h)):c(h),Z=g.current?jr(g.current,c(f)):c(f);return c(n)?{position:c(d),left:"0",top:"0",transform:`translate(${k}px, ${Z}px)`,...g.current&&gn(g.current)>=1.5&&{willChange:"transform"}}:{position:c(d),left:`${k}px`,top:`${Z}px`}});let S;function I(){if(u.current===null||g.current===null)return;const k=u.current,Z=g.current,et=++O;zo(k,Z,{middleware:c(i),placement:c(s),strategy:c(o)}).then(X=>{if(et!==O||u.current!==k||g.current!==Z)return;if(Ro(k)){P(p,{...c(p),hide:{...c(p).hide,referenceHidden:!0}},!0);return}if(!c(r)&&c(h)!==0&&c(f)!==0){const j=Math.max(Math.abs(c(a)),Math.abs(c(l)),15);if(X.x<=j&&X.y<=j)return}P(h,X.x,!0),P(f,X.y,!0),P(d,X.strategy,!0),P(v,X.placement,!0),P(p,X.middlewareData,!0),P(w,!0)})}function A(){typeof S=="function"&&(S(),S=void 0),O++}function M(){if(A(),t===void 0){I();return}c(r)&&(u.current===null||g.current===null||(S=t(u.current,g.current,I)))}function L(){!c(r)&&g.current===null&&P(w,!1)}function q(){return[c(i),c(s),c(o),c(a),c(l),c(r)]}return St(()=>{t===void 0&&c(r)&&I()}),St(M),St(()=>{if(t!==void 0){if(q(),!c(r)){y=!1;return}if(!c(w)){y=!1;return}if(!y){y=!0;return}I()}}),St(L),St(()=>A),{floating:g,reference:u,get strategy(){return c(d)},get placement(){return c(v)},get middlewareData(){return c(p)},get isPositioned(){return c(w)},get floatingStyles(){return c(C)},get update(){return I}}}function Ro(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const Ko={top:"bottom",right:"left",bottom:"top",left:"right"},vn=new Oe("Floating.Root"),cr=new Oe("Floating.Content"),mn=new Oe("Floating.Root");class Le{static create(t=!1){return t?mn.set(new Le):vn.set(new Le)}anchorNode=Tt(null);customAnchorNode=Tt(null);triggerNode=Tt(null);constructor(){St(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class We{static create(t,r=!1){return r?cr.set(new We(t,mn.get())):cr.set(new We(t,vn.get()))}opts;root;contentRef=Tt(null);wrapperRef=Tt(null);arrowRef=Tt(null);contentAttachment=_e(this.contentRef);wrapperAttachment=_e(this.wrapperRef);arrowAttachment=_e(this.arrowRef);arrowId=Tt(He());#t=_(()=>{if(typeof this.opts.style=="string")return Ln(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#r=new Ki(()=>this.arrowRef.current??void 0);#i=_(()=>this.#r?.width??0);#n=_(()=>this.#r?.height??0);#a=_(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=_(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#o=_(()=>c(this.#s).length>0);get hasExplicitBoundaries(){return c(this.#o)}set hasExplicitBoundaries(t){P(this.#o,t)}#l=_(()=>({padding:this.opts.collisionPadding.current,boundary:c(this.#s).filter(Wn),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return c(this.#l)}set detectOverflowOptions(t){P(this.#l,t)}#d=it(void 0);#u=it(void 0);#f=it(void 0);#v=it(void 0);#m=_(()=>[Mo({mainAxis:this.opts.sideOffset.current+c(this.#n),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Fo({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?Wo():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&ko({...this.detectOverflowOptions}),Bo({...this.detectOverflowOptions,apply:({rects:t,availableWidth:r,availableHeight:i})=>{const{width:n,height:s}=t.reference;P(this.#d,r,!0),P(this.#u,i,!0),P(this.#f,n,!0),P(this.#v,s,!0)}}),this.arrowRef.current&&Lo({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Vo({arrowWidth:c(this.#i),arrowHeight:c(this.#n)}),this.opts.hideWhenDetached.current&&No({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return c(this.#m)}set middleware(t){P(this.#m,t)}floating;#c=_(()=>Xo(this.floating.placement));get placedSide(){return c(this.#c)}set placedSide(t){P(this.#c,t)}#h=_(()=>Yo(this.floating.placement));get placedAlign(){return c(this.#h)}set placedAlign(t){P(this.#h,t)}#p=_(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return c(this.#p)}set arrowX(t){P(this.#p,t)}#g=_(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return c(this.#g)}set arrowY(t){P(this.#g,t)}#b=_(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return c(this.#b)}set cannotCenterArrow(t){P(this.#b,t)}#y=it();get contentZIndex(){return c(this.#y)}set contentZIndex(t){P(this.#y,t,!0)}#w=_(()=>Ko[this.placedSide]);get arrowBaseSide(){return c(this.#w)}set arrowBaseSide(t){P(this.#w,t)}#x=_(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${c(this.#d)}px`,"--bits-floating-available-height":`${c(this.#u)}px`,"--bits-floating-anchor-width":`${c(this.#f)}px`,"--bits-floating-anchor-height":`${c(this.#v)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...c(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return c(this.#x)}set wrapperProps(t){P(this.#x,t)}#_=_(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:zn({...c(this.#t)}),...this.contentAttachment}));get props(){return c(this.#_)}set props(t){P(this.#_,t)}#P=_(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return c(this.#P)}set arrowStyle(t){P(this.#P,t)}constructor(t,r){this.opts=t,this.root=r,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),Dt(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),this.floating=Ho({strategy:()=>this.opts.strategy.current,placement:()=>c(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>Io(...i,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),St(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),Dt(()=>this.contentRef.current,i=>{if(!i||!this.opts.enabled.current)return;const n=Hn(i),s=n.requestAnimationFrame(()=>{if(this.contentRef.current!==i||!this.opts.enabled.current)return;const o=n.getComputedStyle(i).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{n.cancelAnimationFrame(s)}}),St(()=>{this.floating.floating.current=this.wrapperRef.current})}}class _r{static create(t){return new _r(t,cr.get())}opts;content;constructor(t,r){this.opts=t,this.content=r}#t=_(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return c(this.#t)}set props(t){P(this.#t,t)}}function Vo(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:i,middlewareData:n}=t,o=n.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,h]=Pr(r),f={start:"0%",center:"50%",end:"100%"}[h],g=(n.arrow?.x??0)+a/2,d=(n.arrow?.y??0)+l/2;let v="",p="";return u==="bottom"?(v=o?f:`${g}px`,p=`${-l}px`):u==="top"?(v=o?f:`${g}px`,p=`${i.floating.height+l}px`):u==="right"?(v=`${-l}px`,p=o?f:`${d}px`):u==="left"&&(v=`${i.floating.width+l}px`,p=o?f:`${d}px`),{data:{x:v,y:p}}}}}function Pr(e){const[t,r="center"]=e.split("-");return[t,r]}function Xo(e){return Pr(e)[0]}function Yo(e){return Pr(e)[1]}function jo(e,t){z(t,!0);let r=b(t,"tooltip",3,!1);Le.create(r());var i=T(),n=x(i);W(n,()=>t.children??tt),m(e,i),H()}var Uo=Cn('<svg viewBox="0 0 30 10" preserveAspectRatio="none" data-arrow=""><polygon points="0,0 30,0 15,10" fill="currentColor"></polygon></svg>'),qo=F("<span><!></span>");function Zo(e,t){z(t,!0);let r=b(t,"id",19,He),i=b(t,"width",3,10),n=b(t,"height",3,5),s=K(t,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const o=_(()=>It(s,{id:r()}));var a=T(),l=x(a);{var u=f=>{var g=T(),d=x(g);W(d,()=>t.child,()=>({props:c(o)})),m(f,g)},h=f=>{var g=qo();at(g,()=>({...c(o)}));var d=B(g);{var v=w=>{var y=T(),O=x(y);W(O,()=>t.children??tt),m(w,y)},p=w=>{var y=Uo();At(()=>{wt(y,"width",i()),wt(y,"height",n())}),m(w,y)};lt(d,w=>{t.children?w(v):w(p,-1)})}N(g),m(f,g)};lt(l,f=>{t.child?f(u):f(h,-1)})}m(e,a),H()}function Go(e,t){z(t,!0);let r=b(t,"id",19,He),i=b(t,"ref",15,null),n=K(t,["$$slots","$$events","$$legacy","id","ref"]);const s=_r.create({id:E(()=>r()),ref:E(()=>i(),a=>i(a))}),o=_(()=>It(n,s.props));Zo(e,G(()=>c(o))),H()}function Jo(e,t){z(t,!0);let r=b(t,"side",3,"bottom"),i=b(t,"sideOffset",3,0),n=b(t,"align",3,"center"),s=b(t,"alignOffset",3,0),o=b(t,"arrowPadding",3,0),a=b(t,"avoidCollisions",3,!0),l=b(t,"collisionBoundary",19,()=>[]),u=b(t,"collisionPadding",3,0),h=b(t,"hideWhenDetached",3,!1),f=b(t,"onPlaced",3,()=>{}),g=b(t,"sticky",3,"partial"),d=b(t,"updatePositionStrategy",3,"optimized"),v=b(t,"strategy",3,"fixed"),p=b(t,"dir",3,"ltr"),w=b(t,"style",19,()=>({})),y=b(t,"wrapperId",19,He),O=b(t,"customAnchor",3,null),C=b(t,"tooltip",3,!1);const S=We.create({side:E(()=>r()),sideOffset:E(()=>i()),align:E(()=>n()),alignOffset:E(()=>s()),id:E(()=>t.id),arrowPadding:E(()=>o()),avoidCollisions:E(()=>a()),collisionBoundary:E(()=>l()),collisionPadding:E(()=>u()),hideWhenDetached:E(()=>h()),onPlaced:E(()=>f()),sticky:E(()=>g()),updatePositionStrategy:E(()=>d()),strategy:E(()=>v()),dir:E(()=>p()),style:E(()=>w()),enabled:E(()=>t.enabled),wrapperId:E(()=>y()),customAnchor:E(()=>O())},C()),I=_(()=>It(S.wrapperProps,{style:{pointerEvents:"auto"}}));var A=T(),M=x(A);W(M,()=>t.content??tt,()=>({props:S.props,wrapperProps:c(I)})),m(e,A),H()}function Qo(e,t){z(t,!0),Gr(()=>{t.onPlaced?.()});var r=T(),i=x(r);W(i,()=>t.content??tt,()=>({props:{},wrapperProps:{}})),m(e,r),H()}function $o(e,t){let r=b(t,"isStatic",3,!1),i=K(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var n=T(),s=x(n);{var o=l=>{Qo(l,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=l=>{Jo(l,G({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};lt(s,l=>{r()?l(o):l(a,-1)})}m(e,n)}var ts=F("<!> <!>",1);function pn(e,t){z(t,!0);let r=b(t,"interactOutsideBehavior",3,"close"),i=b(t,"trapFocus",3,!0),n=b(t,"isValidEvent",3,()=>!1),s=b(t,"customAnchor",3,null),o=b(t,"isStatic",3,!1),a=b(t,"tooltip",3,!1),l=b(t,"contentPointerEvents",3,"auto"),u=K(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);const h=_(()=>t.preventScroll??!0),f=_(()=>t.strategy??(c(h)?"fixed":"absolute"));$o(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return c(f)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(d,v)=>{let p=()=>v?.().props,w=()=>v?.().wrapperProps;var y=ts(),O=x(y);{var C=A=>{Mr(A,{get preventScroll(){return c(h)}})},S=A=>{Mr(A,{get preventScroll(){return c(h)}})};lt(O,A=>{t.forceMount&&t.enabled?A(C):t.forceMount||A(S,1)})}var I=Q(O,2);Rn(I,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return i()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(M,L)=>{let q=()=>L?.().props;Kn(M,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(k,Z)=>{Vn(k,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return r()},get isValidEvent(){return n()},get enabled(){return t.enabled},get ref(){return t.ref},children:(X,R)=>{let j=()=>R?.().props;Xn(X,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(nt,U)=>{var Y=T(),rt=x(Y);{let J=_(()=>({props:It(u,p(),j(),q(),{style:{pointerEvents:l()}}),wrapperProps:w()}));W(rt,()=>t.popper??tt,()=>c(J))}m(nt,Y)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),m(d,y)},$$slots:{content:!0}}),H()}function es(e,t){let r=b(t,"interactOutsideBehavior",3,"close"),i=b(t,"trapFocus",3,!0),n=b(t,"isValidEvent",3,()=>!1),s=b(t,"customAnchor",3,null),o=b(t,"isStatic",3,!1),a=K(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var l=T(),u=x(l);{var h=f=>{pn(f,G({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return n()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};lt(u,f=>{t.shouldRender&&f(h)})}m(e,l)}function rs(e,t){let r=b(t,"interactOutsideBehavior",3,"close"),i=b(t,"trapFocus",3,!0),n=b(t,"isValidEvent",3,()=>!1),s=b(t,"customAnchor",3,null),o=b(t,"isStatic",3,!1),a=K(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);pn(e,G({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return r()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return n()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}function rr(e,t){const[r,i]=e;let n=!1;const s=t.length;for(let o=0,a=s-1;o<s;a=o++){const[l,u]=t[o]??[0,0],[h,f]=t[a]??[0,0];u>=i!=f>=i&&r<=(h-l)*(i-u)/(f-u)+l&&(n=!n)}return n}function nr(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function qr(e,t){const r=e.left+e.width/2,i=e.top+e.height/2,n=t.left+t.width/2,s=t.top+t.height/2,o=n-r,a=s-i;return Math.abs(o)>Math.abs(a)?o>0?"right":"left":a>0?"bottom":"top"}class ns{#t;#e;#r;#i=null;#n=null;#a=[];#s=null;#o=null;#l=null;#d(){this.#o!==null&&(cancelAnimationFrame(this.#o),this.#o=null)}#u(){this.#d(),this.#o=requestAnimationFrame(()=>{this.#o=null,!(!this.#i||!this.#n)&&(this.#c(),this.#t.onPointerExit())})}#f(){this.#l!==null&&(clearTimeout(this.#l),this.#l=null)}#v(){this.#r!==null&&(this.#f(),this.#l=window.setTimeout(()=>{this.#l=null,!(!this.#i||!this.#n)&&(this.#c(),this.#t.onPointerExit())},this.#r))}constructor(t){this.#t=t,this.#e=t.buffer??1;const r=t.transitIntentTimeout;this.#r=typeof r=="number"&&r>0?r:null,Dt([t.triggerNode,t.contentNode,t.enabled],([i,n,s])=>{if(!i||!n||!s){this.#s=null,this.#c();return}this.#s&&this.#s!==i&&this.#c(),this.#s=i;const o=Yn(i),a=g=>{this.#m([g.clientX,g.clientY],i,n)},l=g=>{const d=g.relatedTarget;if(oe(d)&&n.contains(d))return;const v=this.#t.ignoredTargets?.()??[];oe(d)&&v.some(p=>p===d||p.contains(d))||(this.#a=oe(d)&&v.length>0?v.filter(p=>d.contains(p)):[],this.#i=[g.clientX,g.clientY],this.#n="content",this.#u())},u=()=>{this.#c()},h=()=>{this.#c()},f=g=>{const d=g.relatedTarget;oe(d)&&i.contains(d)||(this.#i=[g.clientX,g.clientY],this.#n="trigger",this.#u())};return[Gt(o,"pointermove",a),Gt(i,"pointerleave",l),Gt(i,"pointerenter",u),Gt(n,"pointerenter",h),Gt(n,"pointerleave",f)].reduce((g,d)=>()=>{g(),d()},()=>{})})}#m(t,r,i){if(!this.#i||!this.#n)return;this.#d(),this.#v();const n=r.getBoundingClientRect(),s=i.getBoundingClientRect();if(this.#n==="content"&&nr(t,s)){this.#c();return}if(this.#n==="trigger"&&nr(t,n)){this.#c();return}if(this.#n==="content"&&this.#a.length>0)for(const h of this.#a){const f=h.getBoundingClientRect();if(nr(t,f))return;const g=qr(n,f),d=this.#h(n,f,g);if(d&&rr(t,d))return}const o=qr(n,s),a=this.#h(n,s,o);if(a&&rr(t,a))return;const l=this.#n==="content"?s:n,u=this.#p(this.#i,l,o,this.#n);rr(t,u)||(this.#c(),this.#t.onPointerExit())}#c(){this.#i=null,this.#n=null,this.#a=[],this.#d(),this.#f()}#h(t,r,i){const n=this.#e;switch(i){case"top":return[[Math.min(t.left,r.left)-n,t.top],[Math.min(t.left,r.left)-n,r.bottom],[Math.max(t.right,r.right)+n,r.bottom],[Math.max(t.right,r.right)+n,t.top]];case"bottom":return[[Math.min(t.left,r.left)-n,t.bottom],[Math.min(t.left,r.left)-n,r.top],[Math.max(t.right,r.right)+n,r.top],[Math.max(t.right,r.right)+n,t.bottom]];case"left":return[[t.left,Math.min(t.top,r.top)-n],[r.right,Math.min(t.top,r.top)-n],[r.right,Math.max(t.bottom,r.bottom)+n],[t.left,Math.max(t.bottom,r.bottom)+n]];case"right":return[[t.right,Math.min(t.top,r.top)-n],[r.left,Math.min(t.top,r.top)-n],[r.left,Math.max(t.bottom,r.bottom)+n],[t.right,Math.max(t.bottom,r.bottom)+n]]}}#p(t,r,i,n){const s=this.#e*4,[o,a]=t;switch(n==="trigger"?this.#g(i):i){case"top":return[[o-s,a+s],[o+s,a+s],[r.right+s,r.bottom],[r.right+s,r.top],[r.left-s,r.top],[r.left-s,r.bottom]];case"bottom":return[[o-s,a-s],[o+s,a-s],[r.right+s,r.top],[r.right+s,r.bottom],[r.left-s,r.bottom],[r.left-s,r.top]];case"left":return[[o+s,a-s],[o+s,a+s],[r.right,r.bottom+s],[r.left,r.bottom+s],[r.left,r.top-s],[r.right,r.top-s]];case"right":return[[o-s,a-s],[o-s,a+s],[r.left,r.bottom+s],[r.right,r.bottom+s],[r.right,r.top-s],[r.left,r.top-s]]}}#g(t){switch(t){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}class dr{#t;#e;#r=null;constructor(t,r){this.#e=t,this.#t=r,this.stop=this.stop.bind(this),this.start=this.start.bind(this),jn(this.stop)}#i(){this.#r!==null&&(window.clearTimeout(this.#r),this.#r=null)}stop(){this.#i()}start(...t){this.#i(),this.#r=window.setTimeout(()=>{this.#r=null,this.#e(...t)},this.#t)}}const bn=Gn({component:"tooltip",parts:["content","trigger"]}),yn=new Oe("Tooltip.Provider"),Or=new Oe("Tooltip.Root");class is{#t=it(Me(new Map));get triggers(){return c(this.#t)}set triggers(t){P(this.#t,t,!0)}#e=it(null);get activeTriggerId(){return c(this.#e)}set activeTriggerId(t){P(this.#e,t,!0)}#r=_(()=>{const t=this.activeTriggerId;return t===null?null:this.triggers.get(t)?.node??null});get activeTriggerNode(){return c(this.#r)}set activeTriggerNode(t){P(this.#r,t)}#i=_(()=>{const t=this.activeTriggerId;return t===null?null:this.triggers.get(t)?.payload??null});get activePayload(){return c(this.#i)}set activePayload(t){P(this.#i,t)}register=t=>{const r=new Map(this.triggers);r.set(t.id,t),this.triggers=r,this.#n()};update=t=>{const r=new Map(this.triggers);r.set(t.id,t),this.triggers=r,this.#n()};unregister=t=>{if(!this.triggers.has(t))return;const r=new Map(this.triggers);r.delete(t),this.triggers=r,this.activeTriggerId===t&&(this.activeTriggerId=null)};setActiveTrigger=t=>{if(t===null){this.activeTriggerId=null;return}if(!this.triggers.has(t)){this.activeTriggerId=null;return}this.activeTriggerId=t};get=t=>this.triggers.get(t);has=t=>this.triggers.has(t);getFirstTriggerId=()=>{const t=this.triggers.entries().next();return t.done?null:t.value[0]};#n=()=>{const t=this.activeTriggerId;t!==null&&(this.triggers.has(t)||(this.activeTriggerId=null))}}class Cr{static create(t){return yn.set(new Cr(t))}opts;#t=it(!0);get isOpenDelayed(){return c(this.#t)}set isOpenDelayed(t){P(this.#t,t,!0)}isPointerInTransit=Tt(!1);#e;#r=it(null);constructor(t){this.opts=t,this.#e=new dr(()=>{this.isOpenDelayed=!0},this.opts.skipDelayDuration.current),vr(()=>Gt(window,"scroll",r=>{const i=c(this.#r);if(!i)return;const n=i.triggerNode;if(!n)return;const s=r.target;(s instanceof Element||s instanceof Document)&&s.contains(n)&&i.handleClose()}))}#i=()=>{if(this.opts.skipDelayDuration.current===0){this.isOpenDelayed=!0;return}else this.#e.start()};#n=()=>{this.#e.stop()};onOpen=t=>{c(this.#r)&&c(this.#r)!==t&&c(this.#r).handleClose(),this.#n(),this.isOpenDelayed=!1,P(this.#r,t,!0)};onClose=t=>{c(this.#r)===t&&P(this.#r,null),this.#i()};isTooltipOpen=t=>c(this.#r)===t}class Sr{static create(t){return Or.set(new Sr(t,yn.get()))}opts;provider;#t=_(()=>this.opts.delayDuration.current??this.provider.opts.delayDuration.current);get delayDuration(){return c(this.#t)}set delayDuration(t){P(this.#t,t)}#e=_(()=>this.opts.disableHoverableContent.current??this.provider.opts.disableHoverableContent.current);get disableHoverableContent(){return c(this.#e)}set disableHoverableContent(t){P(this.#e,t)}#r=_(()=>this.opts.disableCloseOnTriggerClick.current??this.provider.opts.disableCloseOnTriggerClick.current);get disableCloseOnTriggerClick(){return c(this.#r)}set disableCloseOnTriggerClick(t){P(this.#r,t)}#i=_(()=>this.opts.disabled.current??this.provider.opts.disabled.current);get disabled(){return c(this.#i)}set disabled(t){P(this.#i,t)}#n=_(()=>this.opts.ignoreNonKeyboardFocus.current??this.provider.opts.ignoreNonKeyboardFocus.current);get ignoreNonKeyboardFocus(){return c(this.#n)}set ignoreNonKeyboardFocus(t){P(this.#n,t)}registry;tether;#a=it(null);get contentNode(){return c(this.#a)}set contentNode(t){P(this.#a,t,!0)}contentPresence;#s=it(!1);#o;#l=_(()=>this.opts.open.current?c(this.#s)?"delayed-open":"instant-open":"closed");get stateAttr(){return c(this.#l)}set stateAttr(t){P(this.#l,t)}constructor(t,r){this.opts=t,this.provider=r,this.tether=t.tether.current?.state??null,this.registry=this.tether?.registry??new is,this.#o=new dr(()=>{P(this.#s,!0),this.opts.open.current=!0},this.delayDuration??0),this.tether&&(this.tether.root=this,vr(()=>()=>{this.tether?.root===this&&(this.tether.root=null)})),this.contentPresence=new Zn({open:this.opts.open,ref:E(()=>this.contentNode),onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Dt(()=>this.delayDuration,()=>{this.delayDuration!==void 0&&(this.#o=new dr(()=>{P(this.#s,!0),this.opts.open.current=!0},this.delayDuration))}),Dt(()=>this.opts.open.current,i=>{i?(this.ensureActiveTrigger(),this.provider.onOpen(this)):this.provider.onClose(this)},{lazy:!0}),Dt(()=>this.opts.triggerId.current,i=>{i!==this.registry.activeTriggerId&&this.registry.setActiveTrigger(i)}),Dt(()=>this.registry.activeTriggerId,i=>{this.opts.triggerId.current!==i&&(this.opts.triggerId.current=i)})}handleOpen=()=>{this.#o.stop(),P(this.#s,!1),this.ensureActiveTrigger(),this.opts.open.current=!0};handleClose=()=>{this.#o.stop(),this.opts.open.current=!1};#d=()=>{this.#o.stop();const t=!this.provider.isOpenDelayed,r=this.delayDuration??0;t||r===0?(P(this.#s,!1),this.opts.open.current=!0):this.#o.start()};onTriggerEnter=t=>{this.setActiveTrigger(t),this.#d()};onTriggerLeave=()=>{this.disableHoverableContent?this.handleClose():this.#o.stop()};ensureActiveTrigger=()=>{if(this.registry.activeTriggerId!==null&&this.registry.has(this.registry.activeTriggerId))return;if(this.opts.triggerId.current!==null&&this.registry.has(this.opts.triggerId.current)){this.registry.setActiveTrigger(this.opts.triggerId.current);return}const t=this.registry.getFirstTriggerId();this.registry.setActiveTrigger(t)};setActiveTrigger=t=>{this.registry.setActiveTrigger(t)};registerTrigger=t=>{this.registry.register(t),t.disabled&&this.registry.activeTriggerId===t.id&&this.opts.open.current&&this.handleClose()};updateTrigger=t=>{this.registry.update(t),t.disabled&&this.registry.activeTriggerId===t.id&&this.opts.open.current&&this.handleClose()};unregisterTrigger=t=>{const r=this.registry.activeTriggerId===t;this.registry.unregister(t),r&&this.opts.open.current&&this.handleClose()};isActiveTrigger=t=>this.registry.activeTriggerId===t;get triggerNode(){return this.registry.activeTriggerNode}get activePayload(){return this.registry.activePayload}get activeTriggerId(){return this.registry.activeTriggerId}}class ze{static create(t){return t.tether.current?new ze(t,null,t.tether.current.state):new ze(t,Or.get(),null)}opts;root;tether;attachment;#t=Tt(!1);#e=it(!1);domContext;#r=null;#i=!1;#n=null;constructor(t,r,i){this.opts=t,this.root=r,this.tether=i,this.domContext=new Un(t.ref),this.attachment=_e(this.opts.ref,n=>this.#o(n)),Dt(()=>this.opts.id.current,()=>{this.#o(this.opts.ref.current)}),Dt(()=>this.opts.payload.current,()=>{this.#o(this.opts.ref.current)}),Dt(()=>this.opts.disabled.current,()=>{this.#o(this.opts.ref.current)}),vr(()=>(this.#i=!0,this.#o(this.opts.ref.current),()=>{const n=this.#a(),s=this.#n;s&&(this.tether?this.tether.registry.unregister(s):n?.unregisterTrigger(s)),this.#n=null,this.#i=!1}))}#a=()=>this.tether?.root??this.root;#s=()=>{const t=this.#a();return this.opts.disabled.current||!!t?.disabled};#o=t=>{if(!this.#i)return;const r=this.opts.id.current,i=this.opts.payload.current,n=this.opts.disabled.current;if(this.#n&&this.#n!==r){const a=this.#a();this.tether?this.tether.registry.unregister(this.#n):a?.unregisterTrigger(this.#n)}const s={id:r,node:t,payload:i,disabled:n},o=this.#a();this.tether?(this.tether.registry.has(r)?this.tether.registry.update(s):this.tether.registry.register(s),n&&this.tether.registry.activeTriggerId===r&&o?.opts.open.current&&o.handleClose()):o?.registry.has(r)?o.updateTrigger(s):o?.registerTrigger(s),this.#n=r};#l=()=>{this.#r!==null&&(clearTimeout(this.#r),this.#r=null)};handlePointerUp=()=>{this.#t.current=!1};#d=()=>{this.#s()||(this.#t.current=!1)};#u=()=>{this.#s()||(this.#t.current=!0,this.domContext.getDocument().addEventListener("pointerup",()=>{this.handlePointerUp()},{once:!0}))};#f=t=>{const r=this.#a();if(r){if(this.#s()){r.opts.open.current&&r.handleClose();return}if(t.pointerType!=="touch"){if(r.provider.isPointerInTransit.current){this.#l(),this.#r=window.setTimeout(()=>{r.provider.isPointerInTransit.current&&(r.provider.isPointerInTransit.current=!1,r.onTriggerEnter(this.opts.id.current),P(this.#e,!0))},250);return}r.onTriggerEnter(this.opts.id.current),P(this.#e,!0)}}};#v=t=>{const r=this.#a();if(r){if(this.#s()){r.opts.open.current&&r.handleClose();return}t.pointerType!=="touch"&&(c(this.#e)||(this.#l(),r.provider.isPointerInTransit.current=!1,r.onTriggerEnter(this.opts.id.current),P(this.#e,!0)))}};#m=t=>{const r=this.#a();if(!r||this.#s())return;if(this.#l(),!r.isActiveTrigger(this.opts.id.current)){P(this.#e,!1);return}const i=t.relatedTarget;if(oe(i)){for(const n of r.registry.triggers.values())if(n.node===i){if(r.provider.opts.skipDelayDuration.current>0){P(this.#e,!1);return}r.handleClose(),P(this.#e,!1);return}}r.onTriggerLeave(),P(this.#e,!1)};#c=t=>{const r=this.#a();if(r&&!this.#t.current){if(this.#s()){r.opts.open.current&&r.handleClose();return}r.ignoreNonKeyboardFocus&&!qn(t.currentTarget)||(r.setActiveTrigger(this.opts.id.current),r.handleOpen())}};#h=()=>{const t=this.#a();!t||this.#s()||t.handleClose()};#p=()=>{const t=this.#a();!t||t.disableCloseOnTriggerClick||this.#s()||t.handleClose()};#g=_(()=>{const t=this.#a(),r=!!(t?.opts.open.current&&t.isActiveTrigger(this.opts.id.current)),i=this.#s();return{id:this.opts.id.current,"aria-describedby":r?t?.contentNode?.id:void 0,"data-state":r?t?.stateAttr:"closed","data-disabled":tn(i),"data-delay-duration":`${t?.delayDuration??0}`,[bn.trigger]:"",tabindex:i?void 0:this.opts.tabindex.current,disabled:this.opts.disabled.current,onpointerup:this.#d,onpointerdown:this.#u,onpointerenter:this.#f,onpointermove:this.#v,onpointerleave:this.#m,onfocus:this.#c,onblur:this.#h,onclick:this.#p,...this.attachment}});get props(){return c(this.#g)}set props(t){P(this.#g,t)}}class Ar{static create(t){return new Ar(t,Or.get())}opts;root;attachment;constructor(t,r){this.opts=t,this.root=r,this.attachment=_e(this.opts.ref,i=>this.root.contentNode=i),new ns({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&!this.root.disableHoverableContent,transitIntentTimeout:180,ignoredTargets:()=>{if(this.root.provider.opts.skipDelayDuration.current===0)return[];const i=[],n=this.root.triggerNode;for(const s of this.root.registry.triggers.values())s.node&&s.node!==n&&i.push(s.node);return i},onPointerExit:()=>{this.root.provider.isTooltipOpen(this.root)&&this.root.handleClose()}})}onInteractOutside=t=>{if(oe(t.target)&&this.root.triggerNode?.contains(t.target)&&this.root.disableCloseOnTriggerClick){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current?.(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#t=_(()=>({open:this.root.opts.open.current}));get snippetProps(){return c(this.#t)}set snippetProps(t){P(this.#t,t)}#e=_(()=>({id:this.opts.id.current,"data-state":this.root.stateAttr,"data-disabled":tn(this.root.disabled),style:{outline:"none"},[bn.content]:"",...this.attachment}));get props(){return c(this.#e)}set props(t){P(this.#e,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus}}function os(e,t){z(t,!0);let r=b(t,"open",15,!1),i=b(t,"triggerId",15,null),n=b(t,"onOpenChange",3,Fe),s=b(t,"onOpenChangeComplete",3,Fe);const o=Sr.create({open:E(()=>r(),a=>{r(a),n()(a)}),triggerId:E(()=>i(),a=>{i(a)}),delayDuration:E(()=>t.delayDuration),disableCloseOnTriggerClick:E(()=>t.disableCloseOnTriggerClick),disableHoverableContent:E(()=>t.disableHoverableContent),ignoreNonKeyboardFocus:E(()=>t.ignoreNonKeyboardFocus),disabled:E(()=>t.disabled),onOpenChangeComplete:E(()=>s()),tether:E(()=>t.tether)});jo(e,{tooltip:!0,children:(a,l)=>{var u=T(),h=x(u);W(h,()=>t.children??tt,()=>({open:o.opts.open.current,triggerId:o.activeTriggerId,payload:o.activePayload})),m(a,u)},$$slots:{default:!0}}),H()}var ss=F("<div><div><!></div></div>"),as=F("<div><div><!></div></div>");function ls(e,t){const r=fr();z(t,!0);let i=b(t,"id",19,()=>hr(r)),n=b(t,"ref",15,null),s=b(t,"side",3,"top"),o=b(t,"sideOffset",3,0),a=b(t,"align",3,"center"),l=b(t,"avoidCollisions",3,!0),u=b(t,"arrowPadding",3,0),h=b(t,"sticky",3,"partial"),f=b(t,"hideWhenDetached",3,!1),g=b(t,"collisionPadding",3,0),d=b(t,"onInteractOutside",3,Fe),v=b(t,"onEscapeKeydown",3,Fe),p=b(t,"forceMount",3,!1),w=K(t,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","customAnchor","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const y=Ar.create({id:E(()=>i()),ref:E(()=>n(),L=>n(L)),onInteractOutside:E(()=>d()),onEscapeKeydown:E(()=>v())}),O=_(()=>({side:s(),sideOffset:o(),align:a(),avoidCollisions:l(),arrowPadding:u(),sticky:h(),hideWhenDetached:f(),collisionPadding:g(),strategy:t.strategy,customAnchor:t.customAnchor??y.root.triggerNode})),C=_(()=>It(w,c(O),y.props));var S=T(),I=x(S);{var A=L=>{{const q=(Z,et)=>{let X=()=>et?.().props,R=()=>et?.().wrapperProps;const j=_(()=>It(X(),{style:Ur("tooltip")},{style:t.style}));var nt=T(),U=x(nt);{var Y=J=>{var $=T(),ot=x($);{let ut=_(()=>({props:c(j),wrapperProps:R(),...y.snippetProps}));W(ot,()=>t.child,()=>c(ut))}m(J,$)},rt=J=>{var $=ss();at($,()=>({...R()}));var ot=B($);at(ot,()=>({...c(j)}));var ut=B(ot);W(ut,()=>t.children??tt),N(ot),N($),m(J,$)};lt(U,J=>{t.child?J(Y):J(rt,-1)})}m(Z,nt)};let k=_(()=>y.root.disableHoverableContent?"none":"auto");rs(L,G(()=>c(C),()=>y.popperProps,{get enabled(){return y.root.opts.open.current},get id(){return i()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return y.opts.ref},tooltip:!0,get shouldRender(){return y.shouldRender},get contentPointerEvents(){return c(k)},popper:q,$$slots:{popper:!0}}))}},M=L=>{{const q=(Z,et)=>{let X=()=>et?.().props,R=()=>et?.().wrapperProps;const j=_(()=>It(X(),{style:Ur("tooltip")},{style:t.style}));var nt=T(),U=x(nt);{var Y=J=>{var $=T(),ot=x($);{let ut=_(()=>({props:c(j),wrapperProps:R(),...y.snippetProps}));W(ot,()=>t.child,()=>c(ut))}m(J,$)},rt=J=>{var $=as();at($,()=>({...R()}));var ot=B($);at(ot,()=>({...c(j)}));var ut=B(ot);W(ut,()=>t.children??tt),N(ot),N($),m(J,$)};lt(U,J=>{t.child?J(Y):J(rt,-1)})}m(Z,nt)};let k=_(()=>y.root.disableHoverableContent?"none":"auto");es(L,G(()=>c(C),()=>y.popperProps,{get open(){return y.root.opts.open.current},get id(){return i()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return y.opts.ref},tooltip:!0,get shouldRender(){return y.shouldRender},get contentPointerEvents(){return c(k)},popper:q,$$slots:{popper:!0}}))}};lt(I,L=>{p()?L(A):p()||L(M,1)})}m(e,S),H()}var cs=F("<button><!></button>");function ds(e,t){const r=fr();z(t,!0);let i=b(t,"id",19,()=>hr(r)),n=b(t,"disabled",3,!1),s=b(t,"type",3,"button"),o=b(t,"tabindex",3,0),a=b(t,"ref",15,null),l=K(t,["$$slots","$$events","$$legacy","children","child","id","disabled","payload","tether","type","tabindex","ref"]);const u=ze.create({id:E(()=>i()),disabled:E(()=>n()??!1),tabindex:E(()=>o()??0),payload:E(()=>t.payload),tether:E(()=>t.tether),ref:E(()=>a(),p=>a(p))}),h=_(()=>It(l,u.props,{type:s()}));var f=T(),g=x(f);{var d=p=>{var w=T(),y=x(w);W(y,()=>t.child,()=>({props:c(h)})),m(p,w)},v=p=>{var w=cs();at(w,()=>({...c(h)}));var y=B(w);W(y,()=>t.children??tt),N(w),m(p,w)};lt(g,p=>{t.child?p(d):p(v,-1)})}m(e,f),H()}function us(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref"]);Go(e,G(()=>i,{get ref(){return r()},set ref(n){r(n)}})),H()}function fs(e,t){z(t,!0);let r=b(t,"delayDuration",3,700),i=b(t,"disableCloseOnTriggerClick",3,!1),n=b(t,"disableHoverableContent",3,!1),s=b(t,"disabled",3,!1),o=b(t,"ignoreNonKeyboardFocus",3,!1),a=b(t,"skipDelayDuration",3,300);Cr.create({delayDuration:E(()=>r()),disableCloseOnTriggerClick:E(()=>i()),disableHoverableContent:E(()=>n()),disabled:E(()=>s()),ignoreNonKeyboardFocus:E(()=>o()),skipDelayDuration:E(()=>a())});var l=T(),u=x(l);W(u,()=>t.children??tt),m(e,l),H()}function hs(e,t){z(t,!0);let r=b(t,"open",15,!1),i=K(t,["$$slots","$$events","$$legacy","open"]);var n=T(),s=x(n);D(s,()=>os,(o,a)=>{a(o,G(()=>i,{get open(){return r()},set open(l){r(l)}}))}),m(e,n),H()}function gs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref"]);var n=T(),s=x(n);D(s,()=>ds,(o,a)=>{a(o,G({"data-slot":"tooltip-trigger"},()=>i,{get ref(){return r()},set ref(l){r(l)}}))}),m(e,n),H()}function vs(e,t){let r=K(t,["$$slots","$$events","$$legacy"]);var i=T(),n=x(i);D(n,()=>en,(s,o)=>{o(s,G(()=>r))}),m(e,i)}var ms=F("<div></div>"),ps=F("<!> <!>",1);function bs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=b(t,"sideOffset",3,0),n=b(t,"side",3,"top"),s=K(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","children","arrowClasses","portalProps"]);vs(e,G(()=>t.portalProps,{children:(o,a)=>{var l=T(),u=x(l);{let h=_(()=>ct("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--bits-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t.class));D(u,()=>ls,(f,g)=>{g(f,G({"data-slot":"tooltip-content",get sideOffset(){return i()},get side(){return n()},get class(){return c(h)}},()=>s,{get ref(){return r()},set ref(d){r(d)},children:(d,v)=>{var p=ps(),w=x(p);W(w,()=>t.children??tt);var y=Q(w,2);{const O=(C,S)=>{let I=()=>S?.().props;var A=ms();at(A,M=>({class:M,...I()}),[()=>ct("bg-foreground z-50 size-2.5 rotate-45 rounded-[2px]","data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]","data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]","data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2","data-[side=left]:-translate-y-[calc(50%_-_3px)]",t.arrowClasses)]),m(C,A)};D(y,()=>us,(C,S)=>{S(C,{child:O,$$slots:{child:!0}})})}m(d,p)},$$slots:{default:!0}}))})}m(o,l)},$$slots:{default:!0}})),H()}function ys(e,t){let r=K(t,["$$slots","$$events","$$legacy"]);var i=T(),n=x(i);D(n,()=>fs,(s,o)=>{o(s,G(()=>r))}),m(e,i)}const ws=Qr({base:"peer/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});var xs=F("<button><!></button>"),_s=F("<!> <!>",1);function ir(e,t){z(t,!0);const r=(v,p)=>{let w=()=>p?.().props;const y=_(()=>It(c(u),w()));var O=T(),C=x(O);{var S=A=>{var M=T(),L=x(M);W(L,()=>t.child,()=>({props:c(y)})),m(A,M)},I=A=>{var M=xs();at(M,()=>({...c(y)}));var L=B(M);W(L,()=>t.children??tt),N(M),pt(M,q=>i(q),()=>i()),m(A,M)};lt(C,A=>{t.child?A(S):A(I,-1)})}m(v,O)};let i=b(t,"ref",15,null),n=b(t,"variant",3,"default"),s=b(t,"size",3,"default"),o=b(t,"isActive",3,!1),a=K(t,["$$slots","$$events","$$legacy","ref","class","children","child","variant","size","isActive","tooltipContent","tooltipContentProps"]);const l=gr(),u=_(()=>({class:ct(ws({variant:n(),size:s()}),t.class),"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s(),"data-active":o(),...a}));var h=T(),f=x(h);{var g=v=>{r(v,()=>({}))},d=v=>{var p=T(),w=x(p);D(w,()=>hs,(y,O)=>{O(y,{children:(C,S)=>{var I=_s(),A=x(I);{const L=(q,k)=>{let Z=()=>k?.().props;r(q,()=>({props:Z()}))};D(A,()=>gs,(q,k)=>{k(q,{child:L,$$slots:{child:!0}})})}var M=Q(A,2);{let L=_(()=>l.state!=="collapsed"||l.isMobile);D(M,()=>bs,(q,k)=>{k(q,G({side:"right",align:"center",get hidden(){return c(L)}},()=>t.tooltipContentProps,{children:(Z,et)=>{var X=T(),R=x(X);{var j=U=>{var Y=Ct();At(()=>ie(Y,t.tooltipContent)),m(U,Y)},nt=U=>{var Y=T(),rt=x(Y);W(rt,()=>t.tooltipContent),m(U,Y)};lt(R,U=>{typeof t.tooltipContent=="string"?U(j):t.tooltipContent&&U(nt,1)})}m(Z,X)},$$slots:{default:!0}}))})}m(C,I)},$$slots:{default:!0}})}),m(v,p)};lt(f,v=>{t.tooltipContent?v(d,-1):v(g)})}m(e,h),H()}var Ps=F("<li><!></li>");function or(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Ps();at(n,o=>({"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",class:o,...i}),[()=>ct("group/menu-item relative",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var Os=F("<ul><!></ul>");function Zr(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Os();at(n,o=>({"data-slot":"sidebar-menu","data-sidebar":"menu",class:o,...i}),[()=>ct("flex w-full min-w-0 flex-col gap-1",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}var Cs=F("<div><!></div>");function Ss(e,t){z(t,!0);let r=b(t,"ref",15,null),i=b(t,"open",15,!0),n=b(t,"onOpenChange",3,()=>{}),s=K(t,["$$slots","$$events","$$legacy","ref","open","onOpenChange","class","style","children"]);const o=Ii({open:()=>i(),setOpen:u=>{i(u),n()(u),document.cookie=`${Oi}=${i()}; path=/; max-age=${Ci}`}});var a=T();En("keydown",Dn,function(...u){o.handleShortcutKeydown?.apply(this,u)});var l=x(a);D(l,()=>ys,(u,h)=>{h(u,{delayDuration:0,children:(f,g)=>{var d=Cs();at(d,p=>({"data-slot":"sidebar-wrapper",style:`--sidebar-width: ${Si}; --sidebar-width-icon: ${Ti}; ${t.style??""}`,class:p,...s}),[()=>ct("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",t.class)]);var v=B(d);W(v,()=>t.children??tt),N(d),pt(d,p=>r(p),()=>r()),m(f,d)},$$slots:{default:!0}})}),m(e,a),H()}function As(e,t){z(t,!0);let r=K(t,["$$slots","$$events","$$legacy"]);const i=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];Jn(e,G({name:"panel-left"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);W(a,()=>t.children??tt),m(n,o)},$$slots:{default:!0}})),H()}var Ts=F('<!> <span class="sr-only">Toggle Sidebar</span>',1);function Ds(e,t){z(t,!0),b(t,"ref",11,null);let r=K(t,["$$slots","$$events","$$legacy","ref","class","onclick"]);const i=gr();{let n=_(()=>ct("size-7",t.class));$r(e,G({"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",get class(){return c(n)},type:"button",onclick:s=>{t.onclick?.(s),i.toggle()}},()=>r,{children:(s,o)=>{var a=Ts(),l=x(a);As(l,{}),bt(2),m(s,a)},$$slots:{default:!0}}))}H()}function Es(e,t){z(t,!0);let r=b(t,"open",15,!1),i=K(t,["$$slots","$$events","$$legacy","open"]);var n=T(),s=x(n);D(s,()=>Qn,(o,a)=>{a(o,G(()=>i,{get open(){return r()},set open(l){r(l)}}))}),m(e,n),H()}function Is(e,t){let r=K(t,["$$slots","$$events","$$legacy"]);var i=T(),n=x(i);D(n,()=>en,(s,o)=>{o(s,G(()=>r))}),m(e,i)}function Ms(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class"]);var n=T(),s=x(n);{let o=_(()=>ct("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t.class));D(s,()=>$n,(a,l)=>{l(a,G({"data-slot":"sheet-overlay",get class(){return c(o)}},()=>i,{get ref(){return r()},set ref(u){r(u)}}))})}m(e,n),H()}const Fs=Qr({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",left:"data-[state=closed]:slide-out-to-start data-[state=open]:slide-in-from-start inset-y-0 start-0 h-full w-3/4 border-e sm:max-w-sm",right:"data-[state=closed]:slide-out-to-end data-[state=open]:slide-in-from-end inset-y-0 end-0 h-full w-3/4 border-s sm:max-w-sm"}},defaultVariants:{side:"right"}});var ks=F('<!> <span class="sr-only">Close</span>',1),Bs=F("<!> <!>",1),Ns=F("<!> <!>",1);function Ls(e,t){z(t,!0);let r=b(t,"ref",15,null),i=b(t,"side",3,"right"),n=K(t,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);Is(e,G(()=>t.portalProps,{children:(s,o)=>{var a=Ns(),l=x(a);Ms(l,{});var u=Q(l,2);{let h=_(()=>ct(Fs({side:i()}),t.class));D(u,()=>ti,(f,g)=>{g(f,G({"data-slot":"sheet-content",get class(){return c(h)}},()=>n,{get ref(){return r()},set ref(d){r(d)},children:(d,v)=>{var p=Bs(),w=x(p);W(w,()=>t.children??tt);var y=Q(w,2);D(y,()=>ei,(O,C)=>{C(O,{class:"ring-offset-background focus-visible:ring-ring absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none",children:(S,I)=>{var A=ks(),M=x(A);ri(M,{class:"size-4"}),bt(2),m(S,A)},$$slots:{default:!0}})}),m(d,p)},$$slots:{default:!0}}))})}m(s,a)},$$slots:{default:!0}})),H()}var Ws=F("<div><!></div>");function zs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var n=Ws();at(n,o=>({"data-slot":"sheet-header",class:o,...i}),[()=>ct("flex flex-col gap-1.5 p-4",t.class)]);var s=B(n);W(s,()=>t.children??tt),N(n),pt(n,o=>r(o),()=>r()),m(e,n),H()}function Hs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class"]);var n=T(),s=x(n);{let o=_(()=>ct("text-foreground font-semibold",t.class));D(s,()=>ni,(a,l)=>{l(a,G({"data-slot":"sheet-title",get class(){return c(o)}},()=>i,{get ref(){return r()},set ref(u){r(u)}}))})}m(e,n),H()}function Rs(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref","class"]);var n=T(),s=x(n);{let o=_(()=>ct("text-muted-foreground text-sm",t.class));D(s,()=>ii,(a,l)=>{l(a,G({"data-slot":"sheet-description",get class(){return c(o)}},()=>i,{get ref(){return r()},set ref(u){r(u)}}))})}m(e,n),H()}var Ks=F("<div><!></div>"),Vs=F("<!> <!>",1),Xs=F('<!> <div class="flex h-full w-full flex-col"><!></div>',1),Ys=F('<div class="text-sidebar-foreground group peer hidden md:block" data-slot="sidebar"><div data-slot="sidebar-gap"></div> <div><div data-sidebar="sidebar" data-slot="sidebar-inner" class="bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"><!></div></div></div>');function js(e,t){z(t,!0);let r=b(t,"ref",15,null),i=b(t,"side",3,"left"),n=b(t,"variant",3,"sidebar"),s=b(t,"collapsible",3,"offcanvas"),o=K(t,["$$slots","$$events","$$legacy","ref","side","variant","collapsible","class","children"]);const a=gr();var l=T(),u=x(l);{var h=d=>{var v=Ks();at(v,w=>({class:w,...o}),[()=>ct("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",t.class)]);var p=B(v);W(p,()=>t.children??tt),N(v),pt(v,w=>r(w),()=>r()),m(d,v)},f=d=>{var v=T(),p=x(v),w=()=>a.openMobile,y=O=>a.setOpenMobile(O);D(p,()=>Es,(O,C)=>{C(O,G({get open(){return w()},set open(S){y(S)}},()=>o,{children:(S,I)=>{var A=T(),M=x(A);D(M,()=>Ls,(L,q)=>{q(L,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",class:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",get style(){return`--sidebar-width: ${Ai};`},get side(){return i()},children:(k,Z)=>{var et=Xs(),X=x(et);D(X,()=>zs,(nt,U)=>{U(nt,{class:"sr-only",children:(Y,rt)=>{var J=Vs(),$=x(J);D($,()=>Hs,(ut,ht)=>{ht(ut,{children:(kt,V)=>{bt();var dt=Ct("Sidebar");m(kt,dt)},$$slots:{default:!0}})});var ot=Q($,2);D(ot,()=>Rs,(ut,ht)=>{ht(ut,{children:(kt,V)=>{bt();var dt=Ct("Displays the mobile sidebar.");m(kt,dt)},$$slots:{default:!0}})}),m(Y,J)},$$slots:{default:!0}})});var R=Q(X,2),j=B(R);W(j,()=>t.children??tt),N(R),m(k,et)},$$slots:{default:!0}})}),m(S,A)},$$slots:{default:!0}}))}),m(d,v)},g=d=>{var v=Ys(),p=B(v),w=Q(p,2);at(w,C=>({"data-slot":"sidebar-container",class:C,...o}),[()=>ct("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",i()==="left"?"start-0 group-data-[collapsible=offcanvas]:start-[calc(var(--sidebar-width)*-1)]":"end-0 group-data-[collapsible=offcanvas]:end-[calc(var(--sidebar-width)*-1)]",n()==="floating"||n()==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",t.class)]);var y=B(w),O=B(y);W(O,()=>t.children??tt),N(y),N(w),N(v),pt(v,C=>r(C),()=>r()),At(C=>{wt(v,"data-state",a.state),wt(v,"data-collapsible",a.state==="collapsed"?s():""),wt(v,"data-variant",n()),wt(v,"data-side",i()),Fn(p,1,C)},[()=>Mn(ct("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n()==="floating"||n()==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)"))]),m(d,v)};lt(u,d=>{s()==="none"?d(h):a.isMobile?d(f,1):d(g,-1)})}m(e,l),H()}function Us(e,t){z(t,!0);let r=b(t,"ref",15,null),i=K(t,["$$slots","$$events","$$legacy","ref"]);var n=T(),s=x(n);D(s,()=>Xi,(o,a)=>{a(o,G({"data-slot":"dialog-trigger"},()=>i,{get ref(){return r()},set ref(l){r(l)}}))}),m(e,n),H()}function qs(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12 20v-9"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M22 13h-4"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];ce(e,G({name:"bug"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function Zs(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 12.5 8 15l2 2.5"}],["path",{d:"m14 12.5 2 2.5-2 2.5"}]];ce(e,G({name:"file-code"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function ur(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]];ce(e,G({name:"message-square"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function Gs(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];ce(e,G({name:"settings"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function Js(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12 19h8"}],["path",{d:"m4 17 6-6-6-6"}]];ce(e,G({name:"terminal"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}function Qs(e,t){const r=le(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12 4v16"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"}],["path",{d:"M9 20h6"}]];ce(e,G({name:"type"},()=>r,{get iconNode(){return i},children:(n,s)=>{var o=T(),a=x(o);de(a,t,"default",{}),m(n,o)},$$slots:{default:!0}}))}var $s=F('<div class="flex items-center gap-2 p-2 px-4 text-lg font-semibold tracking-tight"><!> Clawmini</div>'),ta=F("<a><!> <span>Agents</span></a>"),ea=F("<!> <!>",1),ra=F("<!> <span>New Chat</span>",1),na=F("<!> <!>",1),ia=F('<div class="bg-destructive/15 text-destructive text-sm p-3 rounded-md flex items-center"> </div>'),oa=F('<p class="text-sm text-destructive">Name cannot contain spaces.</p>'),sa=F("<option> </option>"),aa=F('<!> <div class="grid gap-4 py-4"><!> <div class="flex flex-col gap-2"><label class="text-sm font-medium leading-none" for="name">Name</label> <!> <!></div> <div class="flex flex-col gap-2"><label class="text-sm font-medium leading-none" for="agent">Initial Agent (optional)</label> <select id="agent" class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"><option>Default</option><!></select></div></div> <!>',1),la=F("<!> <!>",1),ca=F('<a><!> <span data-testid="chat-link"> </span></a>'),da=F("<!> <!>",1),ua=F("<!> <!>",1),fa=F("<!> <!>",1),ha=F("<!> <!>",1);function ga(e,t){z(t,!0);let r=b(t,"agents",19,()=>[]),i=b(t,"currentPath",3,"/"),n=b(t,"collapsible",3,"offcanvas"),s=it(!1),o=it(""),a=it(""),l=it(!1),u=it(""),h=_(()=>c(o).length>0&&/\s/.test(c(o))),f=_(()=>c(o).trim().length>0&&!/\s/.test(c(o)));async function g(){if(!c(f))return;const p=c(o).trim();P(l,!0),P(u,"");try{const w={id:p};c(a)&&(w.agent=c(a));const y=await fetch("/api/chats",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)});if(y.ok)P(s,!1),P(o,""),P(a,""),P(u,""),await gi("app:chats"),await vi(`/chats/${p}`);else{const O=await y.json();P(u,O.error||"Failed to create chat.",!0)}}catch(w){console.error(w),P(u,"An error occurred while creating the chat.")}finally{P(l,!1)}}var d=T(),v=x(d);D(v,()=>js,(p,w)=>{w(p,{get collapsible(){return n()},children:(y,O)=>{var C=ha(),S=x(C);D(S,()=>Wi,(A,M)=>{M(A,{children:(L,q)=>{var k=$s(),Z=B(k);ur(Z,{class:"w-5 h-5"}),bt(),N(k),m(L,k)},$$slots:{default:!0}})});var I=Q(S,2);D(I,()=>Fi,(A,M)=>{M(A,{children:(L,q)=>{var k=fa(),Z=x(k);D(Z,()=>Br,(X,R)=>{R(X,{children:(j,nt)=>{var U=ea(),Y=x(U);D(Y,()=>kr,(J,$)=>{$(J,{children:(ot,ut)=>{bt();var ht=Ct("General");m(ot,ht)},$$slots:{default:!0}})});var rt=Q(Y,2);D(rt,()=>Fr,(J,$)=>{$(J,{children:(ot,ut)=>{var ht=T(),kt=x(ht);D(kt,()=>Zr,(V,dt)=>{dt(V,{children:(Kt,wn)=>{var he=T(),Se=x(he);D(Se,()=>or,(Ye,Vt)=>{Vt(Ye,{children:(Xt,ge)=>{var ve=T(),Qt=x(ve);{const me=($t,Pt)=>{let Ae=()=>Pt?.().props;var Bt=ta();at(Bt,()=>({href:"/agents",...Ae()}));var te=B(Bt);ui(te,{}),bt(2),N(Bt),m($t,Bt)};let pe=_(()=>i()==="/agents");D(Qt,()=>ir,($t,Pt)=>{Pt($t,{get isActive(){return c(pe)},child:me,$$slots:{child:!0}})})}m(Xt,ve)},$$slots:{default:!0}})}),m(Kt,he)},$$slots:{default:!0}})}),m(ot,ht)},$$slots:{default:!0}})}),m(j,U)},$$slots:{default:!0}})});var et=Q(Z,2);D(et,()=>Br,(X,R)=>{R(X,{children:(j,nt)=>{var U=ua(),Y=x(U);D(Y,()=>kr,(J,$)=>{$(J,{children:(ot,ut)=>{bt();var ht=Ct("Chats");m(ot,ht)},$$slots:{default:!0}})});var rt=Q(Y,2);D(rt,()=>Fr,(J,$)=>{$(J,{children:(ot,ut)=>{var ht=T(),kt=x(ht);D(kt,()=>Zr,(V,dt)=>{dt(V,{children:(Kt,wn)=>{var he=da(),Se=x(he);D(Se,()=>or,(Vt,Xt)=>{Xt(Vt,{children:(ge,ve)=>{var Qt=T(),me=x(Qt);D(me,()=>oi,(pe,$t)=>{$t(pe,{get open(){return c(s)},set open(Pt){P(s,Pt,!0)},children:(Pt,Ae)=>{var Bt=la(),te=x(Bt);{const Yt=(jt,Ot)=>{let ye=()=>Ot?.().props;var zt=T(),ee=x(zt);D(ee,()=>ir,(we,Te)=>{Te(we,G(ye,{children:(je,De)=>{var xe=ra(),Ue=x(xe);hi(Ue,{}),bt(2),m(je,xe)},$$slots:{default:!0}}))}),m(jt,zt)};D(te,()=>Us,(jt,Ot)=>{Ot(jt,{child:Yt,$$slots:{child:!0}})})}var be=Q(te,2);D(be,()=>si,(Yt,jt)=>{jt(Yt,{class:"sm:max-w-[425px]",children:(Ot,ye)=>{var zt=aa(),ee=x(zt);D(ee,()=>ai,(st,gt)=>{gt(st,{children:(yt,Ge)=>{var Ut=na(),Ee=x(Ut);D(Ee,()=>li,(re,Je)=>{Je(re,{children:(Qe,On)=>{bt();var $e=Ct("Create New Chat");m(Qe,$e)},$$slots:{default:!0}})});var Dr=Q(Ee,2);D(Dr,()=>ci,(re,Je)=>{Je(re,{children:(Qe,On)=>{bt();var $e=Ct("Enter a name for the new chat and optionally select an agent.");m(Qe,$e)},$$slots:{default:!0}})}),m(yt,Ut)},$$slots:{default:!0}})});var we=Q(ee,2),Te=B(we);{var je=st=>{var gt=ia(),yt=B(gt,!0);N(gt),At(()=>ie(yt,c(u))),m(st,gt)};lt(Te,st=>{c(u)&&st(je)})}var De=Q(Te,2),xe=Q(B(De),2);fi(xe,{id:"name",placeholder:"e.g. debugging-session",class:"col-span-3",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",onkeydown:st=>{st.key==="Enter"&&!st.shiftKey&&(st.preventDefault(),g())},get value(){return c(o)},set value(st){P(o,st,!0)}});var Ue=Q(xe,2);{var xn=st=>{var gt=oa();m(st,gt)};lt(Ue,st=>{c(h)&&st(xn)})}N(De);var Tr=Q(De,2),qe=Q(B(Tr),2),Ze=B(qe);Ze.value=Ze.__value="";var _n=Q(Ze);Ir(_n,17,r,st=>st.id,(st,gt)=>{var yt=sa(),Ge=B(yt,!0);N(yt);var Ut={};At(()=>{ie(Ge,c(gt).id),Ut!==(Ut=c(gt).id)&&(yt.value=(yt.__value=c(gt).id)??"")}),m(st,yt)}),N(qe),N(Tr),N(we);var Pn=Q(we,2);D(Pn,()=>di,(st,gt)=>{gt(st,{children:(yt,Ge)=>{{let Ut=_(()=>!c(f)||c(l));$r(yt,{type:"submit",get disabled(){return c(Ut)},onclick:g,children:(Ee,Dr)=>{bt();var re=Ct();At(()=>ie(re,c(l)?"Creating...":"Create Chat")),m(Ee,re)},$$slots:{default:!0}})}},$$slots:{default:!0}})}),kn(qe,()=>c(a),st=>P(a,st)),m(Ot,zt)},$$slots:{default:!0}})}),m(Pt,Bt)},$$slots:{default:!0}})}),m(ge,Qt)},$$slots:{default:!0}})});var Ye=Q(Se,2);Ir(Ye,16,()=>t.chats,Vt=>Vt,(Vt,Xt)=>{var ge=T(),ve=x(ge);D(ve,()=>or,(Qt,me)=>{me(Qt,{children:(pe,$t)=>{var Pt=T(),Ae=x(Pt);{const Bt=(be,Yt)=>{let jt=()=>Yt?.().props;var Ot=ca();at(Ot,()=>({href:`/chats/${Xt??""}`,...jt()}));var ye=B(Ot);ur(ye,{});var zt=Q(ye,2),ee=B(zt,!0);N(zt),N(Ot),At(()=>ie(ee,Xt)),m(be,Ot)};let te=_(()=>i()===`/chats/${Xt}`);D(Ae,()=>ir,(be,Yt)=>{Yt(be,{get isActive(){return c(te)},child:Bt,$$slots:{child:!0}})})}m(pe,Pt)},$$slots:{default:!0}})}),m(Vt,ge)}),m(Kt,he)},$$slots:{default:!0}})}),m(ot,ht)},$$slots:{default:!0}})}),m(j,U)},$$slots:{default:!0}})}),m(L,k)},$$slots:{default:!0}})}),m(y,C)},$$slots:{default:!0}})}),m(e,d),H()}var va=F('<a class="text-muted-foreground hover:text-foreground transition-colors" title="Chat Settings"><!></a>'),ma=F('<header class="flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4"><!> <div class="w-full flex items-center justify-between"><div class="font-semibold text-sm"><!></div> <div class="flex items-center gap-4"><!> <div class="flex items-center gap-2"><button id="markdown-toggle" type="button" class="flex items-center justify-center p-2 rounded-md hover:bg-muted transition-colors"><!></button> <button id="verbosity-toggle" type="button" class="flex items-center justify-center p-2 rounded-md hover:bg-muted transition-colors"><!></button></div></div></div></header> <main class="flex flex-1 flex-col overflow-hidden bg-muted/20"><!></main>',1),pa=F("<!> <!>",1);function Ma(e,t){z(t,!0),Gr(()=>{const o=localStorage.getItem("appState.markdownEnabled");o!==null&&(ft.markdownEnabled=o==="true")}),St(()=>{localStorage.setItem("appState.markdownEnabled",String(ft.markdownEnabled))});function r(){ft.verbosityLevel==="default"?ft.verbosityLevel="debug":ft.verbosityLevel==="debug"?ft.verbosityLevel="verbose":ft.verbosityLevel="default"}function i(){ft.markdownEnabled=!ft.markdownEnabled}var n=T(),s=x(n);D(s,()=>Ss,(o,a)=>{a(o,{class:"h-[100dvh] overflow-hidden",children:(l,u)=>{var h=pa(),f=x(h);ga(f,{get chats(){return t.data.chats},get agents(){return t.data.agents},get currentPath(){return ne.url.pathname}});var g=Q(f,2);D(g,()=>Hi,(d,v)=>{v(d,{children:(p,w)=>{var y=ma(),O=x(y),C=B(O);D(C,()=>Ds,(V,dt)=>{dt(V,{})});var S=Q(C,2),I=B(S),A=B(I);{var M=V=>{var dt=Ct();At(Kt=>ie(dt,Kt),[()=>ne.url.pathname.replace("/chats/","").replace("/settings","")]),m(V,dt)},L=_(()=>ne.url.pathname.startsWith("/chats/")),q=V=>{var dt=Ct("Home");m(V,dt)};lt(A,V=>{c(L)?V(M):V(q,-1)})}N(I);var k=Q(I,2),Z=B(k);{var et=V=>{var dt=va(),Kt=B(dt);Gs(Kt,{class:"w-5 h-5"}),N(dt),At(()=>wt(dt,"href",`${ne.url.pathname??""}/settings`)),m(V,dt)},X=_(()=>ne.url.pathname.startsWith("/chats/")&&!ne.url.pathname.endsWith("/settings"));lt(Z,V=>{c(X)&&V(et)})}var R=Q(Z,2),j=B(R),nt=B(j);{var U=V=>{Zs(V,{class:"w-5 h-5 text-muted-foreground"})},Y=V=>{Qs(V,{class:"w-5 h-5 text-muted-foreground"})};lt(nt,V=>{ft.markdownEnabled?V(U):V(Y,-1)})}N(j);var rt=Q(j,2),J=B(rt);{var $=V=>{ur(V,{class:"w-5 h-5 text-muted-foreground"})},ot=V=>{qs(V,{class:"w-5 h-5 text-amber-500"})},ut=V=>{Js(V,{class:"w-5 h-5 text-red-500"})};lt(J,V=>{ft.verbosityLevel==="default"?V($):ft.verbosityLevel==="debug"?V(ot,1):ft.verbosityLevel==="verbose"&&V(ut,2)})}N(rt),N(R),N(k),N(S),N(O);var ht=Q(O,2),kt=B(ht);W(kt,()=>t.children),N(ht),At(()=>{wt(j,"aria-label",`Markdown ${ft.markdownEnabled?"enabled":"disabled"}`),wt(j,"title",`Markdown: ${ft.markdownEnabled?"On":"Off"}`),wt(rt,"aria-label",`Verbosity level: ${ft.verbosityLevel}`),wt(rt,"title",`Verbosity: ${ft.verbosityLevel}`)}),Er("click",j,i),Er("click",rt,r),m(p,y)},$$slots:{default:!0}})}),m(l,h)},$$slots:{default:!0}})}),m(e,n),H()}In(["click"]);export{Ma as component,Ia as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,f as c}from"../chunks/BmRlVmv6.js";import"../chunks/Ck3rYNON.js";import{p as l,f as v,t as u,a as _,c as s,r as e,s as g}from"../chunks/CME08kGM.js";import{s as o}from"../chunks/DMtIqaiV.js";import{i as x}from"../chunks/DpuLqk8d.js";import{p}from"../chunks/
|
|
1
|
+
import{a as h,f as c}from"../chunks/BmRlVmv6.js";import"../chunks/Ck3rYNON.js";import{p as l,f as v,t as u,a as _,c as s,r as e,s as g}from"../chunks/CME08kGM.js";import{s as o}from"../chunks/DMtIqaiV.js";import{i as x}from"../chunks/DpuLqk8d.js";import{p}from"../chunks/vDehDcuJ.js";var d=c("<h1> </h1> <p> </p>",1);function y(m,i){l(i,!1),x();var t=d(),r=v(t),f=s(r,!0);e(r);var a=g(r,2),n=s(a,!0);e(a),u(()=>{o(f,p.status),o(n,p.error?.message)}),h(m,t),_()}export{y as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ie,a as l,f as m,t as oe}from"../chunks/BmRlVmv6.js";import{f as z,p as Ie,a as Oe,c as i,s,C as q,r as n,w as e,t as k,D as a,F as ze,G as ne,I as y}from"../chunks/CME08kGM.js";import{s as D}from"../chunks/DMtIqaiV.js";import{l as pe,s as ge,i as H}from"../chunks/B6YN0Nuq.js";import{I as me,s as _e,B as Q,d as Ce,e as Me,i as Se}from"../chunks/CK9JZLaG.js";import{c as O}from"../chunks/Zeh-C-mx.js";import{i as ce}from"../chunks/
|
|
1
|
+
import{c as ie,a as l,f as m,t as oe}from"../chunks/BmRlVmv6.js";import{f as z,p as Ie,a as Oe,c as i,s,C as q,r as n,w as e,t as k,D as a,F as ze,G as ne,I as y}from"../chunks/CME08kGM.js";import{s as D}from"../chunks/DMtIqaiV.js";import{l as pe,s as ge,i as H}from"../chunks/B6YN0Nuq.js";import{I as me,s as _e,B as Q,d as Ce,e as Me,i as Se}from"../chunks/CK9JZLaG.js";import{c as O}from"../chunks/Zeh-C-mx.js";import{i as ce}from"../chunks/D5iV40bG.js";import{P as Te,I as ue}from"../chunks/Drm9vgeP.js";import{D as Ve,a as Be,b as Fe,c as qe,d as He,e as Le,B as fe}from"../chunks/Ck-be5J2.js";import"../chunks/Ck3rYNON.js";function Ue(C,h){const j=pe(h,["children","$$slots","$$events","$$legacy"]);const _=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];me(C,ge({name:"square-pen"},()=>j,{get iconNode(){return _},children:(f,x)=>{var p=ie(),$=z(p);_e($,h,"default",{}),l(f,p)},$$slots:{default:!0}}))}function Ge(C,h){const j=pe(h,["children","$$slots","$$events","$$legacy"]);const _=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];me(C,ge({name:"trash"},()=>j,{get iconNode(){return _},children:(f,x)=>{var p=ie(),$=z(p);_e($,h,"default",{}),l(f,p)},$$slots:{default:!0}}))}var Je=m("<!> Create Agent",1),Ke=m('<div class="bg-destructive/15 text-destructive text-sm p-3 rounded-md flex items-center"> </div>'),Re=m('<div class="flex flex-col items-center justify-center p-12 text-center text-muted-foreground border rounded-lg bg-background"><!> <p>No agents created yet.</p></div>'),Ye=m('<div class="text-sm mt-2"><span class="text-muted-foreground font-medium">Directory:</span> <code class="ml-1 bg-muted px-1 py-0.5 rounded text-xs"> </code></div>'),Qe=m('<div class="text-sm mt-2"><span class="text-muted-foreground font-medium">Environment Variables:</span> <div class="mt-1 bg-muted p-2 rounded text-xs overflow-x-auto whitespace-pre"> </div></div>'),We=m('<div class="flex flex-col gap-2 p-4 border rounded-lg bg-background shadow-sm"><div class="flex items-center justify-between"><h2 class="font-semibold text-lg flex items-center gap-2"><!> </h2> <div class="flex gap-2"><!> <!></div></div> <!> <!></div>'),Xe=m('<div class="grid gap-4 md:grid-cols-2"></div>'),Ze=m("<!> <!>",1),et=m('<div class="bg-destructive/15 text-destructive text-sm p-3 rounded-md flex items-center"> </div>'),tt=m('<!> <div class="grid gap-4 py-4"><!> <div class="flex flex-col gap-2"><label class="text-sm font-medium leading-none" for="agent-id">ID</label> <!></div> <div class="flex flex-col gap-2"><label class="text-sm font-medium leading-none" for="agent-dir">Directory</label> <!></div> <div class="flex flex-col gap-2"><label class="text-sm font-medium leading-none" for="agent-env">Environment Variables (KEY=VALUE)</label> <textarea id="agent-env" placeholder="PORT=8080 NODE_ENV=development" class="flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"></textarea></div></div> <!>',1),at=m('<div class="p-6 max-w-4xl mx-auto flex flex-col gap-6 h-full overflow-y-auto"><div class="flex items-center justify-between"><h1 class="text-2xl font-bold tracking-tight">Agents</h1> <!></div> <!> <!> <!></div>');function ft(C,h){Ie(h,!0);let j=ne(()=>h.data.agents||[]),_=y(!1),f=y(!1),x=y(""),p=y(""),$=y(""),L=y(!1),w=y(""),E=y("");function xe(t){return t?Object.entries(t).map(([r,o])=>`${r}=${o}`).join(`
|
|
2
2
|
`):""}function $e(t){const r={},o=t.split(`
|
|
3
3
|
`);for(const d of o){const u=d.match(/^([^=]+)=(.*)$/);u&&(r[u[1].trim()]=u[2].trim())}return r}function he(){a(f,!1),a(x,""),a(p,""),a($,""),a(w,""),a(E,""),a(_,!0)}function be(t){a(f,!0),a(x,t.id,!0),a(p,t.directory||"",!0),a($,xe(t.env),!0),a(w,""),a(E,""),a(_,!0)}async function ye(){a(L,!0),a(w,"");try{const t={directory:e(p).trim(),env:$e(e($))};e(f)||(t.id=e(x));const r=e(f)?`/api/agents/${e(x)}`:"/api/agents",o=e(f)?"PUT":"POST",d=await fetch(r,{method:o,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(d.ok)a(_,!1),await ce("app:agents");else{const u=await d.json();a(w,u.error||"Failed to save agent",!0)}}catch{a(w,"Error saving agent")}finally{a(L,!1)}}async function we(t){if(confirm(`Are you sure you want to delete agent "${t}"?`)){a(E,"");try{(await fetch(`/api/agents/${t}`,{method:"DELETE"})).ok?await ce("app:agents"):a(E,"Failed to delete agent")}catch{a(E,"Error deleting agent")}}}var W=at(),X=i(W),Ee=s(i(X),2);Q(Ee,{onclick:he,size:"sm",children:(t,r)=>{var o=Je(),d=z(o);Te(d,{class:"w-4 h-4 mr-2"}),q(),l(t,o)},$$slots:{default:!0}}),n(X);var le=s(X,2);{var Pe=t=>{var r=Ke(),o=i(r,!0);n(r),k(()=>D(o,e(E))),l(t,r)};H(le,t=>{e(E)&&t(Pe)})}var de=s(le,2);{var ke=t=>{var r=Re(),o=i(r);fe(o,{class:"w-12 h-12 mb-4 text-muted-foreground/50"}),q(2),n(r),l(t,r)},De=t=>{var r=Xe();Me(r,21,()=>e(j),Se,(o,d)=>{var u=We(),M=i(u),S=i(M),U=i(S);fe(U,{class:"w-5 h-5 text-primary"});var Z=s(U);n(S);var ee=s(S,2),T=i(ee);Q(T,{variant:"outline",size:"icon",onclick:()=>be(e(d)),children:(v,g)=>{Ue(v,{class:"w-4 h-4"})},$$slots:{default:!0}});var G=s(T,2);Q(G,{variant:"destructive",size:"icon",onclick:()=>we(e(d).id),children:(v,g)=>{Ge(v,{class:"w-4 h-4"})},$$slots:{default:!0}}),n(ee),n(M);var A=s(M,2);{var J=v=>{var g=Ye(),b=s(i(g),2),N=i(b,!0);n(b),n(g),k(()=>D(N,e(d).directory)),l(v,g)};H(A,v=>{e(d).directory&&v(J)})}var te=s(A,2);{var V=v=>{var g=Qe(),b=s(i(g),2),N=i(b,!0);n(b),n(g),k(B=>D(N,B),[()=>Object.entries(e(d).env).map(([B,c])=>`${B}=${c}`).join(`
|
|
4
4
|
`)]),l(v,g)},ae=ne(()=>e(d).env&&Object.keys(e(d).env).length>0);H(te,v=>{e(ae)&&v(V)})}n(u),k(()=>D(Z,` ${e(d).id??""}`)),l(o,u)}),n(r),l(t,r)};H(de,t=>{e(j).length===0?t(ke):t(De,-1)})}var je=s(de,2);O(je,()=>Le,(t,r)=>{r(t,{get open(){return e(_)},set open(o){a(_,o,!0)},children:(o,d)=>{var u=ie(),M=z(u);O(M,()=>Ve,(S,U)=>{U(S,{class:"sm:max-w-[425px]",children:(Z,ee)=>{var T=tt(),G=z(T);O(G,()=>Be,(c,P)=>{P(c,{children:(F,Ae)=>{var K=Ze(),R=z(K);O(R,()=>Fe,(I,re)=>{re(I,{children:(se,Ne)=>{q();var Y=oe();k(()=>D(Y,e(f)?"Edit Agent":"Create Agent")),l(se,Y)},$$slots:{default:!0}})});var ve=s(R,2);O(ve,()=>qe,(I,re)=>{re(I,{children:(se,Ne)=>{q();var Y=oe("Configure the agent's working directory and environment variables.");l(se,Y)},$$slots:{default:!0}})}),l(F,K)},$$slots:{default:!0}})});var A=s(G,2),J=i(A);{var te=c=>{var P=et(),F=i(P,!0);n(P),k(()=>D(F,e(w))),l(c,P)};H(J,c=>{e(w)&&c(te)})}var V=s(J,2),ae=s(i(V),2);ue(ae,{id:"agent-id",get disabled(){return e(f)},placeholder:"e.g. backend-agent",get value(){return e(x)},set value(c){a(x,c,!0)}}),n(V);var v=s(V,2),g=s(i(v),2);ue(g,{id:"agent-dir",placeholder:"e.g. ./apps/backend",get value(){return e(p)},set value(c){a(p,c,!0)}}),n(v);var b=s(v,2),N=s(i(b),2);ze(N),n(b),n(A);var B=s(A,2);O(B,()=>He,(c,P)=>{P(c,{children:(F,Ae)=>{{let K=ne(()=>!e(x)||e(L));Q(F,{get disabled(){return e(K)},onclick:ye,children:(R,ve)=>{q();var I=oe();k(()=>D(I,e(L)?"Saving...":"Save Agent")),l(R,I)},$$slots:{default:!0}})}},$$slots:{default:!0}})}),Ce(N,()=>e($),c=>a($,c)),l(Z,T)},$$slots:{default:!0}})}),l(o,u)},$$slots:{default:!0}})}),n(W),l(C,W),Oe()}export{ft as component};
|