@lovelybunch/api 1.0.69-alpha.0 → 1.0.69-alpha.1
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.
|
@@ -158,6 +158,7 @@ import config from './routes/api/v1/config/index.js';
|
|
|
158
158
|
import user from './routes/api/v1/user/index.js';
|
|
159
159
|
import agents from './routes/api/v1/agents/index.js';
|
|
160
160
|
import agentsById from './routes/api/v1/agents/[id]/index.js';
|
|
161
|
+
import identity, { readAgentCard, PUBLIC_AGENT_CARD_PATH } from './routes/api/v1/identity/index.js';
|
|
161
162
|
import git from './routes/api/v1/git/index.js';
|
|
162
163
|
import mcp from './routes/api/v1/mcp/index.js';
|
|
163
164
|
import jobs from './routes/api/v1/jobs/index.js';
|
|
@@ -183,11 +184,28 @@ app.route('/api/v1/config', config);
|
|
|
183
184
|
app.route('/api/v1/user', user);
|
|
184
185
|
app.route('/api/v1/agents', agents);
|
|
185
186
|
app.route('/api/v1/agents/:id', agentsById);
|
|
187
|
+
app.route('/api/v1/identity', identity);
|
|
186
188
|
app.route('/api/v1/git', git);
|
|
187
189
|
app.route('/api/v1/mcp', mcp);
|
|
188
190
|
app.route('/api/v1/jobs', jobs);
|
|
189
191
|
app.route('/api/v1/events', events);
|
|
190
192
|
console.log('✅ API routes registered');
|
|
193
|
+
app.get(PUBLIC_AGENT_CARD_PATH, authMiddleware, async (c) => {
|
|
194
|
+
try {
|
|
195
|
+
const document = await readAgentCard();
|
|
196
|
+
if (!document.exists || !document.card) {
|
|
197
|
+
return c.json({ error: 'Agent card not found' }, 404);
|
|
198
|
+
}
|
|
199
|
+
return c.json(document.card);
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
if (error.message === 'GAIT directory not found') {
|
|
203
|
+
return c.json({ error: error.message }, 404);
|
|
204
|
+
}
|
|
205
|
+
console.error('Failed to serve agent card:', error);
|
|
206
|
+
return c.json({ error: 'Failed to load agent card' }, 500);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
191
209
|
// Initialize background services
|
|
192
210
|
getGlobalJobScheduler();
|
|
193
211
|
// Health check endpoint
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovelybunch/api",
|
|
3
|
-
"version": "1.0.69-alpha.
|
|
3
|
+
"version": "1.0.69-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/server-with-static.js",
|
|
6
6
|
"exports": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@hono/node-server": "^1.13.7",
|
|
38
38
|
"@hono/node-ws": "^1.0.6",
|
|
39
|
-
"@lovelybunch/core": "^1.0.69-alpha.
|
|
40
|
-
"@lovelybunch/mcp": "^1.0.69-alpha.
|
|
41
|
-
"@lovelybunch/types": "^1.0.69-alpha.
|
|
39
|
+
"@lovelybunch/core": "^1.0.69-alpha.1",
|
|
40
|
+
"@lovelybunch/mcp": "^1.0.69-alpha.1",
|
|
41
|
+
"@lovelybunch/types": "^1.0.69-alpha.1",
|
|
42
42
|
"arctic": "^1.9.2",
|
|
43
43
|
"bcrypt": "^5.1.1",
|
|
44
44
|
"cookie": "^0.6.0",
|
|
@@ -581,7 +581,7 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
|
|
|
581
581
|
|
|
582
582
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
583
583
|
|
|
584
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},$$="DialogDescriptionWarning",z$=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pO($$).contentName}}.`;return C.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Xy=eO,mO=nO,Zy=aO,_d=sO,Sd=iO,wd=lO,Cd=uO,Zp=hO;const gO=Xy,G$=Zy,bO=C.forwardRef(({className:e,...t},n)=>r.jsx(_d,{className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));bO.displayName=_d.displayName;const q$=ec("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Qy=C.forwardRef(({side:e="right",className:t,children:n,...a},s)=>r.jsxs(G$,{children:[r.jsx(bO,{}),r.jsxs(Sd,{ref:s,className:Te(q$({side:e}),t),...a,children:[n,r.jsxs(Zp,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(Cr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qy.displayName=Sd.displayName;const Jy=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});Jy.displayName="SheetHeader";const ev=C.forwardRef(({className:e,...t},n)=>r.jsx(wd,{ref:n,className:Te("text-lg font-semibold text-foreground",e),...t}));ev.displayName=wd.displayName;const xO=C.forwardRef(({className:e,...t},n)=>r.jsx(Cd,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));xO.displayName=Cd.displayName;function L2({className:e,...t}){return r.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const W$=["top","right","bottom","left"],vi=Math.min,Zr=Math.max,lp=Math.round,vf=Math.floor,Ka=e=>({x:e,y:e}),V$={left:"right",right:"left",bottom:"top",top:"bottom"},Y$={start:"end",end:"start"};function Nx(e,t,n){return Zr(e,vi(t,n))}function As(e,t){return typeof e=="function"?e(t):e}function Ns(e){return e.split("-")[0]}function rc(e){return e.split("-")[1]}function tv(e){return e==="x"?"y":"x"}function nv(e){return e==="y"?"height":"width"}const K$=new Set(["top","bottom"]);function Wa(e){return K$.has(Ns(e))?"y":"x"}function rv(e){return tv(Wa(e))}function X$(e,t,n){n===void 0&&(n=!1);const a=rc(e),s=rv(e),o=nv(s);let u=s==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(u=cp(u)),[u,cp(u)]}function Z$(e){const t=cp(e);return[kx(e),t,kx(t)]}function kx(e){return e.replace(/start|end/g,t=>Y$[t])}const j2=["left","right"],M2=["right","left"],Q$=["top","bottom"],J$=["bottom","top"];function ez(e,t,n){switch(e){case"top":case"bottom":return n?t?M2:j2:t?j2:M2;case"left":case"right":return t?Q$:J$;default:return[]}}function tz(e,t,n,a){const s=rc(e);let o=ez(Ns(e),n==="start",a);return s&&(o=o.map(u=>u+"-"+s),t&&(o=o.concat(o.map(kx)))),o}function cp(e){return e.replace(/left|right|bottom|top/g,t=>V$[t])}function nz(e){return{top:0,right:0,bottom:0,left:0,...e}}function yO(e){return typeof e!="number"?nz(e):{top:e,right:e,bottom:e,left:e}}function up(e){const{x:t,y:n,width:a,height:s}=e;return{width:a,height:s,top:n,left:t,right:t+a,bottom:n+s,x:t,y:n}}function F2(e,t,n){let{reference:a,floating:s}=e;const o=Wa(t),u=rv(t),c=nv(u),d=Ns(t),h=o==="y",p=a.x+a.width/2-s.width/2,m=a.y+a.height/2-s.height/2,g=a[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:a.y-s.height};break;case"bottom":y={x:p,y:a.y+a.height};break;case"right":y={x:a.x+a.width,y:m};break;case"left":y={x:a.x-s.width,y:m};break;default:y={x:a.x,y:a.y}}switch(rc(t)){case"start":y[u]-=g*(n&&h?-1:1);break;case"end":y[u]+=g*(n&&h?-1:1);break}return y}const rz=async(e,t,n)=>{const{placement:a="bottom",strategy:s="absolute",middleware:o=[],platform:u}=n,c=o.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=F2(h,a,d),g=a,y={},w=0;for(let S=0;S<c.length;S++){const{name:b,fn:v}=c[S],{x:_,y:E,data:T,reset:N}=await v({x:p,y:m,initialPlacement:a,placement:g,strategy:s,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=_??p,m=E??m,y={...y,[b]:{...y[b],...T}},N&&w<=50&&(w++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(h=N.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:p,y:m}=F2(h,g,d)),S=-1)}return{x:p,y:m,placement:g,strategy:s,middlewareData:y}};async function Ju(e,t){var n;t===void 0&&(t={});const{x:a,y:s,platform:o,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:y=0}=As(t,e),w=yO(y),b=c[g?m==="floating"?"reference":"floating":m],v=up(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),_=m==="floating"?{x:a,y:s,width:u.floating.width,height:u.floating.height}:u.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},N=up(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:E,strategy:d}):_);return{top:(v.top-N.top+w.top)/T.y,bottom:(N.bottom-v.bottom+w.bottom)/T.y,left:(v.left-N.left+w.left)/T.x,right:(N.right-v.right+w.right)/T.x}}const az=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:s,rects:o,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=As(e,t)||{};if(h==null)return{};const m=yO(p),g={x:n,y:a},y=rv(s),w=nv(y),S=await u.getDimensions(h),b=y==="y",v=b?"top":"left",_=b?"bottom":"right",E=b?"clientHeight":"clientWidth",T=o.reference[w]+o.reference[y]-g[y]-o.floating[w],N=g[y]-o.reference[y],k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let L=k?k[E]:0;(!L||!await(u.isElement==null?void 0:u.isElement(k)))&&(L=c.floating[E]||o.floating[w]);const R=T/2-N/2,j=L/2-S[w]/2-1,M=vi(m[v],j),B=vi(m[_],j),H=M,P=L-S[w]-B,$=L/2-S[w]/2+R,ee=Nx(H,$,P),U=!d.arrow&&rc(s)!=null&&$!==ee&&o.reference[w]/2-($<H?M:B)-S[w]/2<0,q=U?$<H?$-H:$-P:0;return{[y]:g[y]+q,data:{[y]:ee,centerOffset:$-ee-q,...U&&{alignmentOffset:q}},reset:U}}}),sz=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:s,middlewareData:o,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...b}=As(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=Ns(s),_=Wa(c),E=Ns(c)===c,T=await(d.isRTL==null?void 0:d.isRTL(h.floating)),N=g||(E||!S?[cp(c)]:Z$(c)),k=w!=="none";!g&&k&&N.push(...tz(c,S,w,T));const L=[c,...N],R=await Ju(t,b),j=[];let M=((a=o.flip)==null?void 0:a.overflows)||[];if(p&&j.push(R[v]),m){const $=X$(s,u,T);j.push(R[$[0]],R[$[1]])}if(M=[...M,{placement:s,overflows:j}],!j.every($=>$<=0)){var B,H;const $=(((B=o.flip)==null?void 0:B.index)||0)+1,ee=L[$];if(ee&&(!(m==="alignment"?_!==Wa(ee):!1)||M.every(K=>Wa(K.placement)===_?K.overflows[0]>0:!0)))return{data:{index:$,overflows:M},reset:{placement:ee}};let U=(H=M.filter(q=>q.overflows[0]<=0).sort((q,K)=>q.overflows[1]-K.overflows[1])[0])==null?void 0:H.placement;if(!U)switch(y){case"bestFit":{var P;const q=(P=M.filter(K=>{if(k){const F=Wa(K.placement);return F===_||F==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(F=>F>0).reduce((F,O)=>F+O,0)]).sort((K,F)=>K[1]-F[1])[0])==null?void 0:P[0];q&&(U=q);break}case"initialPlacement":U=c;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function P2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function B2(e){return W$.some(t=>e[t]>=0)}const iz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...s}=As(e,t);switch(a){case"referenceHidden":{const o=await Ju(t,{...s,elementContext:"reference"}),u=P2(o,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:B2(u)}}}case"escaped":{const o=await Ju(t,{...s,altBoundary:!0}),u=P2(o,n.floating);return{data:{escapedOffsets:u,escaped:B2(u)}}}default:return{}}}}},vO=new Set(["left","top"]);async function oz(e,t){const{placement:n,platform:a,elements:s}=e,o=await(a.isRTL==null?void 0:a.isRTL(s.floating)),u=Ns(n),c=rc(n),d=Wa(n)==="y",h=vO.has(u)?-1:1,p=o&&d?-1:1,m=As(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),d?{x:y*p,y:g*h}:{x:g*h,y:y*p}}const lz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:s,y:o,placement:u,middlewareData:c}=t,d=await oz(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(a=c.arrow)!=null&&a.alignmentOffset?{}:{x:s+d.x,y:o+d.y,data:{...d,placement:u}}}}},cz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:s}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:b=>{let{x:v,y:_}=b;return{x:v,y:_}}},...d}=As(e,t),h={x:n,y:a},p=await Ju(t,d),m=Wa(Ns(s)),g=tv(m);let y=h[g],w=h[m];if(o){const b=g==="y"?"top":"left",v=g==="y"?"bottom":"right",_=y+p[b],E=y-p[v];y=Nx(_,y,E)}if(u){const b=m==="y"?"top":"left",v=m==="y"?"bottom":"right",_=w+p[b],E=w-p[v];w=Nx(_,w,E)}const S=c.fn({...t,[g]:y,[m]:w});return{...S,data:{x:S.x-n,y:S.y-a,enabled:{[g]:o,[m]:u}}}}}},uz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:s,rects:o,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=As(e,t),p={x:n,y:a},m=Wa(s),g=tv(m);let y=p[g],w=p[m];const S=As(c,t),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const E=g==="y"?"height":"width",T=o.reference[g]-o.floating[E]+b.mainAxis,N=o.reference[g]+o.reference[E]-b.mainAxis;y<T?y=T:y>N&&(y=N)}if(h){var v,_;const E=g==="y"?"width":"height",T=vO.has(Ns(s)),N=o.reference[m]-o.floating[E]+(T&&((v=u.offset)==null?void 0:v[m])||0)+(T?0:b.crossAxis),k=o.reference[m]+o.reference[E]+(T?0:((_=u.offset)==null?void 0:_[m])||0)-(T?b.crossAxis:0);w<N?w=N:w>k&&(w=k)}return{[g]:y,[m]:w}}}},dz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:s,rects:o,platform:u,elements:c}=t,{apply:d=()=>{},...h}=As(e,t),p=await Ju(t,h),m=Ns(s),g=rc(s),y=Wa(s)==="y",{width:w,height:S}=o.floating;let b,v;m==="top"||m==="bottom"?(b=m,v=g===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(v=m,b=g==="end"?"top":"bottom");const _=S-p.top-p.bottom,E=w-p.left-p.right,T=vi(S-p[b],_),N=vi(w-p[v],E),k=!t.middlewareData.shift;let L=T,R=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=E),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(L=_),k&&!g){const M=Zr(p.left,0),B=Zr(p.right,0),H=Zr(p.top,0),P=Zr(p.bottom,0);y?R=w-2*(M!==0||B!==0?M+B:Zr(p.left,p.right)):L=S-2*(H!==0||P!==0?H+P:Zr(p.top,p.bottom))}await d({...t,availableWidth:R,availableHeight:L});const j=await u.getDimensions(c.floating);return w!==j.width||S!==j.height?{reset:{rects:!0}}:{}}}};function Qp(){return typeof window<"u"}function ac(e){return EO(e)?(e.nodeName||"").toLowerCase():"#document"}function ea(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ja(e){var t;return(t=(EO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EO(e){return Qp()?e instanceof Node||e instanceof ea(e).Node:!1}function Ra(e){return Qp()?e instanceof Element||e instanceof ea(e).Element:!1}function Za(e){return Qp()?e instanceof HTMLElement||e instanceof ea(e).HTMLElement:!1}function U2(e){return!Qp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ea(e).ShadowRoot}const hz=new Set(["inline","contents"]);function Td(e){const{overflow:t,overflowX:n,overflowY:a,display:s}=Da(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!hz.has(s)}const fz=new Set(["table","td","th"]);function pz(e){return fz.has(ac(e))}const mz=[":popover-open",":modal"];function Jp(e){return mz.some(t=>{try{return e.matches(t)}catch{return!1}})}const gz=["transform","translate","scale","rotate","perspective"],bz=["transform","translate","scale","rotate","perspective","filter"],xz=["paint","layout","strict","content"];function av(e){const t=sv(),n=Ra(e)?Da(e):e;return gz.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bz.some(a=>(n.willChange||"").includes(a))||xz.some(a=>(n.contain||"").includes(a))}function yz(e){let t=Ei(e);for(;Za(t)&&!Bl(t);){if(av(t))return t;if(Jp(t))return null;t=Ei(t)}return null}function sv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vz=new Set(["html","body","#document"]);function Bl(e){return vz.has(ac(e))}function Da(e){return ea(e).getComputedStyle(e)}function em(e){return Ra(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ei(e){if(ac(e)==="html")return e;const t=e.assignedSlot||e.parentNode||U2(e)&&e.host||Ja(e);return U2(t)?t.host:t}function _O(e){const t=Ei(e);return Bl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Za(t)&&Td(t)?t:_O(t)}function ed(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=_O(e),o=s===((a=e.ownerDocument)==null?void 0:a.body),u=ea(s);if(o){const c=Rx(u);return t.concat(u,u.visualViewport||[],Td(s)?s:[],c&&n?ed(c):[])}return t.concat(s,ed(s,[],n))}function Rx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SO(e){const t=Da(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=Za(e),o=s?e.offsetWidth:n,u=s?e.offsetHeight:a,c=lp(n)!==o||lp(a)!==u;return c&&(n=o,a=u),{width:n,height:a,$:c}}function iv(e){return Ra(e)?e:e.contextElement}function Rl(e){const t=iv(e);if(!Za(t))return Ka(1);const n=t.getBoundingClientRect(),{width:a,height:s,$:o}=SO(t);let u=(o?lp(n.width):n.width)/a,c=(o?lp(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const Ez=Ka(0);function wO(e){const t=ea(e);return!sv()||!t.visualViewport?Ez:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _z(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ea(e)?!1:t}function fo(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=iv(e);let u=Ka(1);t&&(a?Ra(a)&&(u=Rl(a)):u=Rl(e));const c=_z(o,n,a)?wO(o):Ka(0);let d=(s.left+c.x)/u.x,h=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(o){const g=ea(o),y=a&&Ra(a)?ea(a):a;let w=g,S=Rx(w);for(;S&&a&&y!==w;){const b=Rl(S),v=S.getBoundingClientRect(),_=Da(S),E=v.left+(S.clientLeft+parseFloat(_.paddingLeft))*b.x,T=v.top+(S.clientTop+parseFloat(_.paddingTop))*b.y;d*=b.x,h*=b.y,p*=b.x,m*=b.y,d+=E,h+=T,w=ea(S),S=Rx(w)}}return up({width:p,height:m,x:d,y:h})}function ov(e,t){const n=em(e).scrollLeft;return t?t.left+n:fo(Ja(e)).left+n}function CO(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=a.left+t.scrollLeft-(n?0:ov(e,a)),o=a.top+t.scrollTop;return{x:s,y:o}}function Sz(e){let{elements:t,rect:n,offsetParent:a,strategy:s}=e;const o=s==="fixed",u=Ja(a),c=t?Jp(t.floating):!1;if(a===u||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=Ka(1);const p=Ka(0),m=Za(a);if((m||!m&&!o)&&((ac(a)!=="body"||Td(u))&&(d=em(a)),Za(a))){const y=fo(a);h=Rl(a),p.x=y.x+a.clientLeft,p.y=y.y+a.clientTop}const g=u&&!m&&!o?CO(u,d,!0):Ka(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+g.x,y:n.y*h.y-d.scrollTop*h.y+p.y+g.y}}function wz(e){return Array.from(e.getClientRects())}function Cz(e){const t=Ja(e),n=em(e),a=e.ownerDocument.body,s=Zr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),o=Zr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+ov(e);const c=-n.scrollTop;return Da(a).direction==="rtl"&&(u+=Zr(t.clientWidth,a.clientWidth)-s),{width:s,height:o,x:u,y:c}}function Tz(e,t){const n=ea(e),a=Ja(e),s=n.visualViewport;let o=a.clientWidth,u=a.clientHeight,c=0,d=0;if(s){o=s.width,u=s.height;const h=sv();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:o,height:u,x:c,y:d}}const Az=new Set(["absolute","fixed"]);function Nz(e,t){const n=fo(e,!0,t==="fixed"),a=n.top+e.clientTop,s=n.left+e.clientLeft,o=Za(e)?Rl(e):Ka(1),u=e.clientWidth*o.x,c=e.clientHeight*o.y,d=s*o.x,h=a*o.y;return{width:u,height:c,x:d,y:h}}function H2(e,t,n){let a;if(t==="viewport")a=Tz(e,n);else if(t==="document")a=Cz(Ja(e));else if(Ra(t))a=Nz(t,n);else{const s=wO(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return up(a)}function TO(e,t){const n=Ei(e);return n===t||!Ra(n)||Bl(n)?!1:Da(n).position==="fixed"||TO(n,t)}function kz(e,t){const n=t.get(e);if(n)return n;let a=ed(e,[],!1).filter(c=>Ra(c)&&ac(c)!=="body"),s=null;const o=Da(e).position==="fixed";let u=o?Ei(e):e;for(;Ra(u)&&!Bl(u);){const c=Da(u),d=av(u);!d&&c.position==="fixed"&&(s=null),(o?!d&&!s:!d&&c.position==="static"&&!!s&&Az.has(s.position)||Td(u)&&!d&&TO(e,u))?a=a.filter(p=>p!==u):s=c,u=Ei(u)}return t.set(e,a),a}function Rz(e){let{element:t,boundary:n,rootBoundary:a,strategy:s}=e;const u=[...n==="clippingAncestors"?Jp(t)?[]:kz(t,this._c):[].concat(n),a],c=u[0],d=u.reduce((h,p)=>{const m=H2(t,p,s);return h.top=Zr(m.top,h.top),h.right=vi(m.right,h.right),h.bottom=vi(m.bottom,h.bottom),h.left=Zr(m.left,h.left),h},H2(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Dz(e){const{width:t,height:n}=SO(e);return{width:t,height:n}}function Iz(e,t,n){const a=Za(t),s=Ja(t),o=n==="fixed",u=fo(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=Ka(0);function h(){d.x=ov(s)}if(a||!a&&!o)if((ac(t)!=="body"||Td(s))&&(c=em(t)),a){const y=fo(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&h();o&&!a&&s&&h();const p=s&&!a&&!o?CO(s,c):Ka(0),m=u.left+c.scrollLeft-d.x-p.x,g=u.top+c.scrollTop-d.y-p.y;return{x:m,y:g,width:u.width,height:u.height}}function w0(e){return Da(e).position==="static"}function $2(e,t){if(!Za(e)||Da(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ja(e)===n&&(n=n.ownerDocument.body),n}function AO(e,t){const n=ea(e);if(Jp(e))return n;if(!Za(e)){let s=Ei(e);for(;s&&!Bl(s);){if(Ra(s)&&!w0(s))return s;s=Ei(s)}return n}let a=$2(e,t);for(;a&&pz(a)&&w0(a);)a=$2(a,t);return a&&Bl(a)&&w0(a)&&!av(a)?n:a||yz(e)||n}const Oz=async function(e){const t=this.getOffsetParent||AO,n=this.getDimensions,a=await n(e.floating);return{reference:Iz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Lz(e){return Da(e).direction==="rtl"}const jz={convertOffsetParentRelativeRectToViewportRelativeRect:Sz,getDocumentElement:Ja,getClippingRect:Rz,getOffsetParent:AO,getElementRects:Oz,getClientRects:wz,getDimensions:Dz,getScale:Rl,isElement:Ra,isRTL:Lz};function NO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mz(e,t){let n=null,a;const s=Ja(e);function o(){var c;clearTimeout(a),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:g,height:y}=h;if(c||t(),!g||!y)return;const w=vf(m),S=vf(s.clientWidth-(p+g)),b=vf(s.clientHeight-(m+y)),v=vf(p),E={rootMargin:-w+"px "+-S+"px "+-b+"px "+-v+"px",threshold:Zr(0,vi(1,d))||1};let T=!0;function N(k){const L=k[0].intersectionRatio;if(L!==d){if(!T)return u();L?u(!1,L):a=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!NO(h,e.getBoundingClientRect())&&u(),T=!1}try{n=new IntersectionObserver(N,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(N,E)}n.observe(e)}return u(!0),o}function Fz(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=a,h=iv(e),p=s||o?[...h?ed(h):[],...ed(t)]:[];p.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const m=h&&c?Mz(h,n):null;let g=-1,y=null;u&&(y=new ResizeObserver(v=>{let[_]=v;_&&_.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let w,S=d?fo(e):null;d&&b();function b(){const v=fo(e);S&&!NO(S,v)&&n(),S=v,w=requestAnimationFrame(b)}return n(),()=>{var v;p.forEach(_=>{s&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),m?.(),(v=y)==null||v.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const Pz=lz,Bz=cz,Uz=sz,Hz=dz,$z=iz,z2=az,zz=uz,Gz=(e,t,n)=>{const a=new Map,s={platform:jz,...n},o={...s.platform,_c:a};return rz(e,t,{...s,platform:o})};var qz=typeof document<"u",Wz=function(){},zf=qz?C.useLayoutEffect:Wz;function dp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!dp(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){const o=s[a];if(!(o==="_owner"&&e.$$typeof)&&!dp(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function kO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function G2(e,t){const n=kO(e);return Math.round(t*n)/n}function C0(e){const t=C.useRef(e);return zf(()=>{t.current=e}),t}function Vz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:s,elements:{reference:o,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=C.useState(a);dp(g,a)||y(a);const[w,S]=C.useState(null),[b,v]=C.useState(null),_=C.useCallback(K=>{K!==k.current&&(k.current=K,S(K))},[]),E=C.useCallback(K=>{K!==L.current&&(L.current=K,v(K))},[]),T=o||w,N=u||b,k=C.useRef(null),L=C.useRef(null),R=C.useRef(p),j=d!=null,M=C0(d),B=C0(s),H=C0(h),P=C.useCallback(()=>{if(!k.current||!L.current)return;const K={placement:t,strategy:n,middleware:g};B.current&&(K.platform=B.current),Gz(k.current,L.current,K).then(F=>{const O={...F,isPositioned:H.current!==!1};$.current&&!dp(R.current,O)&&(R.current=O,Xl.flushSync(()=>{m(O)}))})},[g,t,n,B,H]);zf(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(K=>({...K,isPositioned:!1})))},[h]);const $=C.useRef(!1);zf(()=>($.current=!0,()=>{$.current=!1}),[]),zf(()=>{if(T&&(k.current=T),N&&(L.current=N),T&&N){if(M.current)return M.current(T,N,P);P()}},[T,N,P,M,j]);const ee=C.useMemo(()=>({reference:k,floating:L,setReference:_,setFloating:E}),[_,E]),U=C.useMemo(()=>({reference:T,floating:N}),[T,N]),q=C.useMemo(()=>{const K={position:n,left:0,top:0};if(!U.floating)return K;const F=G2(U.floating,p.x),O=G2(U.floating,p.y);return c?{...K,transform:"translate("+F+"px, "+O+"px)",...kO(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:O}},[n,c,U.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:P,refs:ee,elements:U,floatingStyles:q}),[p,P,ee,U,q])}const Yz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:s}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?z2({element:a.current,padding:s}).fn(n):{}:a?z2({element:a,padding:s}).fn(n):{}}}},Kz=(e,t)=>({...Pz(e),options:[e,t]}),Xz=(e,t)=>({...Bz(e),options:[e,t]}),Zz=(e,t)=>({...zz(e),options:[e,t]}),Qz=(e,t)=>({...Uz(e),options:[e,t]}),Jz=(e,t)=>({...Hz(e),options:[e,t]}),eG=(e,t)=>({...$z(e),options:[e,t]}),tG=(e,t)=>({...Yz(e),options:[e,t]});var nG="Arrow",RO=C.forwardRef((e,t)=>{const{children:n,width:a=10,height:s=5,...o}=e;return r.jsx(lt.svg,{...o,ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});RO.displayName=nG;var rG=RO;function lv(e){const[t,n]=C.useState(void 0);return nr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let u,c;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,c=h.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var cv="Popper",[DO,sc]=kr(cv),[aG,IO]=DO(cv),OO=e=>{const{__scopePopper:t,children:n}=e,[a,s]=C.useState(null);return r.jsx(aG,{scope:t,anchor:a,onAnchorChange:s,children:n})};OO.displayName=cv;var LO="PopperAnchor",jO=C.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...s}=e,o=IO(LO,n),u=C.useRef(null),c=Et(t,u),d=C.useRef(null);return C.useEffect(()=>{const h=d.current;d.current=a?.current||u.current,h!==d.current&&o.onAnchorChange(d.current)}),a?null:r.jsx(lt.div,{...s,ref:c})});jO.displayName=LO;var uv="PopperContent",[sG,iG]=DO(uv),MO=C.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:s=0,align:o="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,b=IO(uv,n),[v,_]=C.useState(null),E=Et(t,X=>_(X)),[T,N]=C.useState(null),k=lv(T),L=k?.width??0,R=k?.height??0,j=a+(o!=="center"?"-"+o:""),M=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},B=Array.isArray(h)?h:[h],H=B.length>0,P={padding:M,boundary:B.filter(lG),altBoundary:H},{refs:$,floatingStyles:ee,placement:U,isPositioned:q,middlewareData:K}=Vz({strategy:"fixed",placement:j,whileElementsMounted:(...X)=>Fz(...X,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[Kz({mainAxis:s+R,alignmentAxis:u}),d&&Xz({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Zz():void 0,...P}),d&&Qz({...P}),Jz({...P,apply:({elements:X,rects:G,availableWidth:ie,availableHeight:de})=>{const{width:ce,height:fe}=G.reference,Ue=X.floating.style;Ue.setProperty("--radix-popper-available-width",`${ie}px`),Ue.setProperty("--radix-popper-available-height",`${de}px`),Ue.setProperty("--radix-popper-anchor-width",`${ce}px`),Ue.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),T&&tG({element:T,padding:c}),cG({arrowWidth:L,arrowHeight:R}),g&&eG({strategy:"referenceHidden",...P})]}),[F,O]=BO(U),Y=kn(w);nr(()=>{q&&Y?.()},[q,Y]);const J=K.arrow?.x,W=K.arrow?.y,V=K.arrow?.centerOffset!==0,[re,te]=C.useState();return nr(()=>{v&&te(window.getComputedStyle(v).zIndex)},[v]),r.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:q?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[K.transformOrigin?.x,K.transformOrigin?.y].join(" "),...K.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(sG,{scope:n,placedSide:F,onArrowChange:N,arrowX:J,arrowY:W,shouldHideArrow:V,children:r.jsx(lt.div,{"data-side":F,"data-align":O,...S,ref:E,style:{...S.style,animation:q?void 0:"none"}})})})});MO.displayName=uv;var FO="PopperArrow",oG={top:"bottom",right:"left",bottom:"top",left:"right"},PO=C.forwardRef(function(t,n){const{__scopePopper:a,...s}=t,o=iG(FO,a),u=oG[o.placedSide];return r.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:r.jsx(rG,{...s,ref:n,style:{...s.style,display:"block"}})})});PO.displayName=FO;function lG(e){return e!==null}var cG=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:s}=t,u=s.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,p]=BO(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(s.arrow?.x??0)+c/2,y=(s.arrow?.y??0)+d/2;let w="",S="";return h==="bottom"?(w=u?m:`${g}px`,S=`${-d}px`):h==="top"?(w=u?m:`${g}px`,S=`${a.floating.height+d}px`):h==="right"?(w=`${-d}px`,S=u?m:`${y}px`):h==="left"&&(w=`${a.floating.width+d}px`,S=u?m:`${y}px`),{data:{x:w,y:S}}}});function BO(e){const[t,n="center"]=e.split("-");return[t,n]}var dv=OO,hv=jO,fv=MO,pv=PO,[tm,Que]=kr("Tooltip",[sc]),nm=sc(),UO="TooltipProvider",uG=700,Dx="tooltip.open",[dG,mv]=tm(UO),HO=e=>{const{__scopeTooltip:t,delayDuration:n=uG,skipDelayDuration:a=300,disableHoverableContent:s=!1,children:o}=e,u=C.useRef(!0),c=C.useRef(!1),d=C.useRef(0);return C.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),r.jsx(dG,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:C.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:C.useCallback(h=>{c.current=h},[]),disableHoverableContent:s,children:o})};HO.displayName=UO;var td="Tooltip",[hG,rm]=tm(td),$O=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:s,onOpenChange:o,disableHoverableContent:u,delayDuration:c}=e,d=mv(td,e.__scopeTooltip),h=nm(t),[p,m]=C.useState(null),g=Na(),y=C.useRef(0),w=u??d.disableHoverableContent,S=c??d.delayDuration,b=C.useRef(!1),[v,_]=Xa({prop:a,defaultProp:s??!1,onChange:L=>{L?(d.onOpen(),document.dispatchEvent(new CustomEvent(Dx))):d.onClose(),o?.(L)},caller:td}),E=C.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),T=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,b.current=!1,_(!0)},[_]),N=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),k=C.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,_(!0),y.current=0},S)},[S,_]);return C.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),r.jsx(dv,{...h,children:r.jsx(hG,{scope:t,contentId:g,open:v,stateAttribute:E,trigger:p,onTriggerChange:m,onTriggerEnter:C.useCallback(()=>{d.isOpenDelayedRef.current?k():T()},[d.isOpenDelayedRef,k,T]),onTriggerLeave:C.useCallback(()=>{w?N():(window.clearTimeout(y.current),y.current=0)},[N,w]),onOpen:T,onClose:N,disableHoverableContent:w,children:n})})};$O.displayName=td;var Ix="TooltipTrigger",zO=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=rm(Ix,n),o=mv(Ix,n),u=nm(n),c=C.useRef(null),d=Et(t,c,s.onTriggerChange),h=C.useRef(!1),p=C.useRef(!1),m=C.useCallback(()=>h.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),r.jsx(hv,{asChild:!0,...u,children:r.jsx(lt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:d,onPointerMove:We(e.onPointerMove,g=>{g.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:We(e.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:We(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:We(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:We(e.onBlur,s.onClose),onClick:We(e.onClick,s.onClose)})})});zO.displayName=Ix;var fG="TooltipPortal",[Jue,pG]=tm(fG,{forceMount:void 0}),Ul="TooltipContent",GO=C.forwardRef((e,t)=>{const n=pG(Ul,e.__scopeTooltip),{forceMount:a=n.forceMount,side:s="top",...o}=e,u=rm(Ul,e.__scopeTooltip);return r.jsx(ur,{present:a||u.open,children:u.disableHoverableContent?r.jsx(qO,{side:s,...o,ref:t}):r.jsx(mG,{side:s,...o,ref:t})})}),mG=C.forwardRef((e,t)=>{const n=rm(Ul,e.__scopeTooltip),a=mv(Ul,e.__scopeTooltip),s=C.useRef(null),o=Et(t,s),[u,c]=C.useState(null),{trigger:d,onClose:h}=n,p=s.current,{onPointerInTransitChange:m}=a,g=C.useCallback(()=>{c(null),m(!1)},[m]),y=C.useCallback((w,S)=>{const b=w.currentTarget,v={x:w.clientX,y:w.clientY},_=vG(v,b.getBoundingClientRect()),E=EG(v,_),T=_G(S.getBoundingClientRect()),N=wG([...E,...T]);c(N),m(!0)},[m]);return C.useEffect(()=>()=>g(),[g]),C.useEffect(()=>{if(d&&p){const w=b=>y(b,p),S=b=>y(b,d);return d.addEventListener("pointerleave",w),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",S)}}},[d,p,y,g]),C.useEffect(()=>{if(u){const w=S=>{const b=S.target,v={x:S.clientX,y:S.clientY},_=d?.contains(b)||p?.contains(b),E=!SG(v,u);_?g():E&&(g(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,p,u,h,g]),r.jsx(qO,{...e,ref:o})}),[gG,bG]=tm(td,{isInside:!1}),xG=BD("TooltipContent"),qO=C.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:u,...c}=e,d=rm(Ul,n),h=nm(n),{onClose:p}=d;return C.useEffect(()=>(document.addEventListener(Dx,p),()=>document.removeEventListener(Dx,p)),[p]),C.useEffect(()=>{if(d.trigger){const m=g=>{g.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),r.jsx(Jl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:r.jsxs(fv,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[r.jsx(xG,{children:a}),r.jsx(gG,{scope:n,isInside:!0,children:r.jsx(f7,{id:d.contentId,role:"tooltip",children:s||a})})]})})});GO.displayName=Ul;var WO="TooltipArrow",yG=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=nm(n);return bG(WO,n).isInside?null:r.jsx(pv,{...s,...a,ref:t})});yG.displayName=WO;function vG(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,a,s,o)){case o:return"left";case s:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function EG(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function _G(e){const{top:t,right:n,bottom:a,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:a},{x:s,y:a}]}function SG(e,t){const{x:n,y:a}=e;let s=!1;for(let o=0,u=t.length-1;o<t.length;u=o++){const c=t[o],d=t[u],h=c.x,p=c.y,m=d.x,g=d.y;p>a!=g>a&&n<(m-h)*(a-p)/(g-p)+h&&(s=!s)}return s}function wG(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),CG(t)}function CG(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const s=e[a];for(;t.length>=2;){const o=t[t.length-1],u=t[t.length-2];if((o.x-u.x)*(s.y-u.y)>=(o.y-u.y)*(s.x-u.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const s=e[a];for(;n.length>=2;){const o=n[n.length-1],u=n[n.length-2];if((o.x-u.x)*(s.y-u.y)>=(o.y-u.y)*(s.x-u.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var TG=HO,AG=$O,NG=zO,VO=GO;const kG=TG,RG=AG,DG=NG,YO=C.forwardRef(({className:e,sideOffset:t=4,...n},a)=>r.jsx(VO,{ref:a,sideOffset:t,className:Te("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));YO.displayName=VO.displayName;const IG="sidebar_state",OG=3600*24*7,LG="16rem",jG="18rem",MG="3rem",FG="b",KO=C.createContext(null);function am(){const e=C.useContext(KO);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const XO=C.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:a,style:s,children:o,...u},c)=>{const d=UI(),[h,p]=C.useState(!1),[m,g]=C.useState(e),y=t??m,w=C.useCallback(_=>{const E=typeof _=="function"?_(y):_;n?n(E):g(E),document.cookie=`${IG}=${E}; path=/; max-age=${OG}`},[n,y]),S=C.useCallback(()=>d?p(_=>!_):w(_=>!_),[d,w,p]);C.useEffect(()=>{const _=E=>{E.key===FG&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),S())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[S]);const b=y?"expanded":"collapsed",v=C.useMemo(()=>({state:b,open:y,setOpen:w,isMobile:d,openMobile:h,setOpenMobile:p,toggleSidebar:S}),[b,y,w,d,h,p,S]);return r.jsx(KO.Provider,{value:v,children:r.jsx(kG,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":LG,"--sidebar-width-icon":MG,...s},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",a),ref:c,...u,children:o})})})});XO.displayName="SidebarProvider";const ZO=C.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:a,children:s,...o},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:p}=am();return n==="none"?r.jsx("div",{className:Te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",a),ref:u,...o,children:s}):c?r.jsx(gO,{open:h,onOpenChange:p,...o,children:r.jsxs(Qy,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":jG},side:e,children:[r.jsxs(Jy,{className:"sr-only",children:[r.jsx(ev,{children:"Sidebar"}),r.jsx(xO,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):r.jsxs("div",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,children:[r.jsx("div",{className:Te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r.jsx("div",{className:Te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...o,children:r.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});ZO.displayName="Sidebar";const QO=C.forwardRef(({className:e,onClick:t,...n},a)=>{const{toggleSidebar:s}=am();return r.jsxs(ae,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Te("h-7 w-7",e),onClick:o=>{t?.(o),s()},...n,children:[r.jsx(p9,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});QO.displayName="SidebarTrigger";const PG=C.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:a}=am();return r.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:Te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});PG.displayName="SidebarRail";const JO=C.forwardRef(({className:e,...t},n)=>r.jsx("main",{ref:n,className:Te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));JO.displayName="SidebarInset";const BG=C.forwardRef(({className:e,...t},n)=>r.jsx(Le,{ref:n,"data-sidebar":"input",className:Te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));BG.displayName="SidebarInput";const e3=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"header",className:Te("flex flex-col gap-2 p-2",e),...t}));e3.displayName="SidebarHeader";const t3=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t}));t3.displayName="SidebarFooter";const UG=C.forwardRef(({className:e,...t},n)=>r.jsx(xr,{ref:n,"data-sidebar":"separator",className:Te("mx-2 w-auto bg-sidebar-border",e),...t}));UG.displayName="SidebarSeparator";const n3=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"content",className:Te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));n3.displayName="SidebarContent";const Gf=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col p-2",e),...t}));Gf.displayName="SidebarGroup";const qf=C.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const s=t?Ql:"div";return r.jsx(s,{ref:a,"data-sidebar":"group-label",className:Te("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring 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",e),...n})});qf.displayName="SidebarGroupLabel";const HG=C.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const s=t?Ql:"button";return r.jsx(s,{ref:a,"data-sidebar":"group-action",className:Te("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});HG.displayName="SidebarGroupAction";const Wf=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group-content",className:Te("w-full text-sm",e),...t}));Wf.displayName="SidebarGroupContent";const Sl=C.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-1",e),...t}));Sl.displayName="SidebarMenu";const wl=C.forwardRef(({className:e,...t},n)=>r.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t}));wl.displayName="SidebarMenuItem";const $G=ec("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>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 shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(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"}}),Cl=C.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:a="default",tooltip:s,className:o,...u},c)=>{const d=e?Ql:"button",{isMobile:h,state:p}=am(),m=r.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:Te($G({variant:n,size:a}),o),...u});return s?(typeof s=="string"&&(s={children:s}),r.jsxs(RG,{children:[r.jsx(DG,{asChild:!0,children:m}),r.jsx(YO,{side:"right",align:"center",hidden:p!=="collapsed"||h,...s})]})):m});Cl.displayName="SidebarMenuButton";const zG=C.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...a},s)=>{const o=t?Ql:"button";return r.jsx(o,{ref:s,"data-sidebar":"menu-action",className:Te("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...a})});zG.displayName="SidebarMenuAction";const Ox=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Te("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Ox.displayName="SidebarMenuBadge";const GG=C.forwardRef(({className:e,showIcon:t=!1,...n},a)=>{const s=C.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:Te("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&r.jsx(L2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(L2,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});GG.displayName="SidebarMenuSkeleton";const qG=C.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Te("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));qG.displayName="SidebarMenuSub";const WG=C.forwardRef(({...e},t)=>r.jsx("li",{ref:t,...e}));WG.displayName="SidebarMenuSubItem";const VG=C.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:a,...s},o)=>{const u=e?Ql:"a";return r.jsx(u,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Te("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",a),...s})});VG.displayName="SidebarMenuSubButton";const YG="1.0.69-alpha.0",KG={version:YG};function XG({className:e}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[r.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),r.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),r.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),r.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const ZG=[{title:"Home",url:"/",icon:zU},{title:"Proposals",url:"/proposals",icon:Fu},{title:"Agents",url:"/agents",icon:Jr},{title:"Code",url:"/code",icon:hi},{title:"Utilities",url:"/utilities",icon:SI}],QG=[{title:"Overview",url:"/context/project",icon:ga},{title:"Architecture",url:"/context/architecture",icon:Qu},{title:"Knowledge",url:"/context/knowledge",icon:X7},{title:"Resources",url:"/resources",icon:qp}],JG=[{title:"Source Control",url:"/git",icon:di},{title:"Terminal",url:"/terminal",icon:Cs},{title:"Schedule",url:"/schedule",icon:hI},{title:"Identity",url:"/identity",icon:qU}],eq=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:h9,external:!0},{title:"Settings",url:"/settings",icon:Pl}];function tq(){const{badges:e}=yd();return r.jsxs(ZO,{className:"bg-sidebar border-r border-sidebar-border",children:[r.jsx(e3,{children:r.jsx(Sl,{children:r.jsx(wl,{children:r.jsx(Cl,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:r.jsxs(nt,{to:"/",children:[r.jsx(XG,{className:"size-8"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsxs("span",{className:"font-semibold",children:[r.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),r.jsx("span",{children:" Studio"})]}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",KG.version]})]})]})})})})}),r.jsxs(n3,{children:[r.jsxs(Gf,{children:[r.jsx(qf,{children:"Main"}),r.jsx(Wf,{children:r.jsx(Sl,{children:ZG.map(t=>r.jsxs(wl,{children:[r.jsx(Cl,{asChild:!0,children:r.jsxs(nt,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),t.title==="Code"&&e.codeSessions>0&&r.jsx(Ox,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},t.title))})})]}),r.jsxs(Gf,{children:[r.jsx(qf,{children:"Project"}),r.jsx(Wf,{children:r.jsx(Sl,{children:QG.map(t=>r.jsx(wl,{children:r.jsx(Cl,{asChild:!0,children:r.jsxs(nt,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]}),r.jsxs(Gf,{children:[r.jsx(qf,{children:"System"}),r.jsx(Wf,{children:r.jsx(Sl,{children:JG.map(t=>{let n=0;return t.title==="Source Control"&&e.gitChanges>0?n=e.gitChanges:t.title==="Terminal"&&e.terminalSessions>0?n=e.terminalSessions:t.title==="Schedule"&&e.runningScheduledJobs>0&&(n=e.runningScheduledJobs),r.jsxs(wl,{children:[r.jsx(Cl,{asChild:!0,children:r.jsxs(nt,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),n>0&&r.jsx(Ox,{className:"bg-blue-600 text-white dark:bg-blue-500",children:n})]},t.title)})})})]})]}),r.jsx(t3,{children:r.jsx(Sl,{children:eq.map(t=>r.jsx(wl,{children:r.jsx(Cl,{asChild:!0,children:t.external?r.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]}):r.jsxs(nt,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]})}function Lx(e,[t,n]){return Math.min(n,Math.max(t,e))}var nq=C.createContext(void 0);function ic(e){const t=C.useContext(nq);return e||t||"ltr"}function gv(e){const t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rq=[" ","Enter","ArrowUp","ArrowDown"],aq=[" ","Enter"],po="Select",[sm,im,sq]=Up(po),[oc,ede]=kr(po,[sq,sc]),om=sc(),[iq,Ci]=oc(po),[oq,lq]=oc(po),r3=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:s,onOpenChange:o,value:u,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:g,required:y,form:w}=e,S=om(t),[b,v]=C.useState(null),[_,E]=C.useState(null),[T,N]=C.useState(!1),k=ic(h),[L,R]=Xa({prop:a,defaultProp:s??!1,onChange:o,caller:po}),[j,M]=Xa({prop:u,defaultProp:c,onChange:d,caller:po}),B=C.useRef(null),H=b?w||!!b.closest("form"):!0,[P,$]=C.useState(new Set),ee=Array.from(P).map(U=>U.props.value).join(";");return r.jsx(dv,{...S,children:r.jsxs(iq,{required:y,scope:t,trigger:b,onTriggerChange:v,valueNode:_,onValueNodeChange:E,valueNodeHasChildren:T,onValueNodeHasChildrenChange:N,contentId:Na(),value:j,onValueChange:M,open:L,onOpenChange:R,dir:k,triggerPointerDownPosRef:B,disabled:g,children:[r.jsx(sm.Provider,{scope:t,children:r.jsx(oq,{scope:e.__scopeSelect,onNativeOptionAdd:C.useCallback(U=>{$(q=>new Set(q).add(U))},[]),onNativeOptionRemove:C.useCallback(U=>{$(q=>{const K=new Set(q);return K.delete(U),K})},[]),children:n})}),H?r.jsxs(A3,{"aria-hidden":!0,required:y,tabIndex:-1,name:p,autoComplete:m,value:j,onChange:U=>M(U.target.value),disabled:g,form:w,children:[j===void 0?r.jsx("option",{value:""}):null,Array.from(P)]},ee):null]})})};r3.displayName=po;var a3="SelectTrigger",s3=C.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...s}=e,o=om(n),u=Ci(a3,n),c=u.disabled||a,d=Et(t,u.onTriggerChange),h=im(n),p=C.useRef("touch"),[m,g,y]=k3(S=>{const b=h().filter(E=>!E.disabled),v=b.find(E=>E.value===u.value),_=R3(b,S,v);_!==void 0&&u.onValueChange(_.value)}),w=S=>{c||(u.onOpenChange(!0),y()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(hv,{asChild:!0,...o,children:r.jsx(lt.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":N3(u.value)?"":void 0,...s,ref:d,onClick:We(s.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&w(S)}),onPointerDown:We(s.onPointerDown,S=>{p.current=S.pointerType;const b=S.target;b.hasPointerCapture(S.pointerId)&&b.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:We(s.onKeyDown,S=>{const b=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(b&&S.key===" ")&&rq.includes(S.key)&&(w(),S.preventDefault())})})})});s3.displayName=a3;var i3="SelectValue",o3=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,children:o,placeholder:u="",...c}=e,d=Ci(i3,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=Et(t,d.onValueNodeChange);return nr(()=>{h(p)},[h,p]),r.jsx(lt.span,{...c,ref:m,style:{pointerEvents:"none"},children:N3(d.value)?r.jsx(r.Fragment,{children:u}):o})});o3.displayName=i3;var cq="SelectIcon",l3=C.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...s}=e;return r.jsx(lt.span,{"aria-hidden":!0,...s,ref:t,children:a||"▼"})});l3.displayName=cq;var uq="SelectPortal",c3=e=>r.jsx(vd,{asChild:!0,...e});c3.displayName=uq;var mo="SelectContent",u3=C.forwardRef((e,t)=>{const n=Ci(mo,e.__scopeSelect),[a,s]=C.useState();if(nr(()=>{s(new DocumentFragment)},[]),!n.open){const o=a;return o?Xl.createPortal(r.jsx(d3,{scope:e.__scopeSelect,children:r.jsx(sm.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),o):null}return r.jsx(h3,{...e,ref:t})});u3.displayName=mo;var wa=10,[d3,Ti]=oc(mo),dq="SelectContentImpl",hq=uo("SelectContent.RemoveScroll"),h3=C.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:b,...v}=e,_=Ci(mo,n),[E,T]=C.useState(null),[N,k]=C.useState(null),L=Et(t,X=>T(X)),[R,j]=C.useState(null),[M,B]=C.useState(null),H=im(n),[P,$]=C.useState(!1),ee=C.useRef(!1);C.useEffect(()=>{if(E)return Wy(E)},[E]),qy();const U=C.useCallback(X=>{const[G,...ie]=H().map(fe=>fe.ref.current),[de]=ie.slice(-1),ce=document.activeElement;for(const fe of X)if(fe===ce||(fe?.scrollIntoView({block:"nearest"}),fe===G&&N&&(N.scrollTop=0),fe===de&&N&&(N.scrollTop=N.scrollHeight),fe?.focus(),document.activeElement!==ce))return},[H,N]),q=C.useCallback(()=>U([R,E]),[U,R,E]);C.useEffect(()=>{P&&q()},[P,q]);const{onOpenChange:K,triggerPointerDownPosRef:F}=_;C.useEffect(()=>{if(E){let X={x:0,y:0};const G=de=>{X={x:Math.abs(Math.round(de.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(de.pageY)-(F.current?.y??0))}},ie=de=>{X.x<=10&&X.y<=10?de.preventDefault():E.contains(de.target)||K(!1),document.removeEventListener("pointermove",G),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",ie,{capture:!0})}}},[E,K,F]),C.useEffect(()=>{const X=()=>K(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[K]);const[O,Y]=k3(X=>{const G=H().filter(ce=>!ce.disabled),ie=G.find(ce=>ce.ref.current===document.activeElement),de=R3(G,X,ie);de&&setTimeout(()=>de.ref.current.focus())}),J=C.useCallback((X,G,ie)=>{const de=!ee.current&&!ie;(_.value!==void 0&&_.value===G||de)&&(j(X),de&&(ee.current=!0))},[_.value]),W=C.useCallback(()=>E?.focus(),[E]),V=C.useCallback((X,G,ie)=>{const de=!ee.current&&!ie;(_.value!==void 0&&_.value===G||de)&&B(X)},[_.value]),re=a==="popper"?jx:f3,te=re===jx?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:b}:{};return r.jsx(d3,{scope:n,content:E,viewport:N,onViewportChange:k,itemRefCallback:J,selectedItem:R,onItemLeave:W,itemTextRefCallback:V,focusSelectedItem:q,selectedItemText:M,position:a,isPositioned:P,searchRef:O,children:r.jsx(Kp,{as:hq,allowPinchZoom:!0,children:r.jsx(Vp,{asChild:!0,trapped:_.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:We(s,X=>{_.trigger?.focus({preventScroll:!0}),X.preventDefault()}),children:r.jsx(Jl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:r.jsx(re,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:X=>X.preventDefault(),...v,...te,onPlaced:()=>$(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:We(v.onKeyDown,X=>{const G=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!G&&X.key.length===1&&Y(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let de=H().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(X.key)&&(de=de.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const ce=X.target,fe=de.indexOf(ce);de=de.slice(fe+1)}setTimeout(()=>U(de)),X.preventDefault()}})})})})})})});h3.displayName=dq;var fq="SelectItemAlignedPosition",f3=C.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...s}=e,o=Ci(mo,n),u=Ti(mo,n),[c,d]=C.useState(null),[h,p]=C.useState(null),m=Et(t,L=>p(L)),g=im(n),y=C.useRef(!1),w=C.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:v,focusSelectedItem:_}=u,E=C.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&b&&v){const L=o.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),j=o.valueNode.getBoundingClientRect(),M=v.getBoundingClientRect();if(o.dir!=="rtl"){const ce=M.left-R.left,fe=j.left-ce,Ue=L.left-fe,De=L.width+Ue,et=Math.max(De,R.width),it=window.innerWidth-wa,Oe=Lx(fe,[wa,Math.max(wa,it-et)]);c.style.minWidth=De+"px",c.style.left=Oe+"px"}else{const ce=R.right-M.right,fe=window.innerWidth-j.right-ce,Ue=window.innerWidth-L.right-fe,De=L.width+Ue,et=Math.max(De,R.width),it=window.innerWidth-wa,Oe=Lx(fe,[wa,Math.max(wa,it-et)]);c.style.minWidth=De+"px",c.style.right=Oe+"px"}const B=g(),H=window.innerHeight-wa*2,P=S.scrollHeight,$=window.getComputedStyle(h),ee=parseInt($.borderTopWidth,10),U=parseInt($.paddingTop,10),q=parseInt($.borderBottomWidth,10),K=parseInt($.paddingBottom,10),F=ee+U+P+K+q,O=Math.min(b.offsetHeight*5,F),Y=window.getComputedStyle(S),J=parseInt(Y.paddingTop,10),W=parseInt(Y.paddingBottom,10),V=L.top+L.height/2-wa,re=H-V,te=b.offsetHeight/2,X=b.offsetTop+te,G=ee+U+X,ie=F-G;if(G<=V){const ce=B.length>0&&b===B[B.length-1].ref.current;c.style.bottom="0px";const fe=h.clientHeight-S.offsetTop-S.offsetHeight,Ue=Math.max(re,te+(ce?W:0)+fe+q),De=G+Ue;c.style.height=De+"px"}else{const ce=B.length>0&&b===B[0].ref.current;c.style.top="0px";const Ue=Math.max(V,ee+S.offsetTop+(ce?J:0)+te)+ie;c.style.height=Ue+"px",S.scrollTop=G-V+S.offsetTop}c.style.margin=`${wa}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=H+"px",a?.(),requestAnimationFrame(()=>y.current=!0)}},[g,o.trigger,o.valueNode,c,h,S,b,v,o.dir,a]);nr(()=>E(),[E]);const[T,N]=C.useState();nr(()=>{h&&N(window.getComputedStyle(h).zIndex)},[h]);const k=C.useCallback(L=>{L&&w.current===!0&&(E(),_?.(),w.current=!1)},[E,_]);return r.jsx(mq,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:k,children:r.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:r.jsx(lt.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});f3.displayName=fq;var pq="SelectPopperPosition",jx=C.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:s=wa,...o}=e,u=om(n);return r.jsx(fv,{...u,...o,ref:t,align:a,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});jx.displayName=pq;var[mq,bv]=oc(mo,{}),Mx="SelectViewport",p3=C.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...s}=e,o=Ti(Mx,n),u=bv(Mx,n),c=Et(t,o.onViewportChange),d=C.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),r.jsx(sm.Slot,{scope:n,children:r.jsx(lt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:We(s.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=u;if(g?.current&&m){const y=Math.abs(d.current-p.scrollTop);if(y>0){const w=window.innerHeight-wa*2,S=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),v=Math.max(S,b);if(v<w){const _=v+y,E=Math.min(w,_),T=_-E;m.style.height=E+"px",m.style.bottom==="0px"&&(p.scrollTop=T>0?T:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});p3.displayName=Mx;var m3="SelectGroup",[gq,bq]=oc(m3),xq=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=Na();return r.jsx(gq,{scope:n,id:s,children:r.jsx(lt.div,{role:"group","aria-labelledby":s,...a,ref:t})})});xq.displayName=m3;var g3="SelectLabel",b3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=bq(g3,n);return r.jsx(lt.div,{id:s.id,...a,ref:t})});b3.displayName=g3;var hp="SelectItem",[yq,x3]=oc(hp),y3=C.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:s=!1,textValue:o,...u}=e,c=Ci(hp,n),d=Ti(hp,n),h=c.value===a,[p,m]=C.useState(o??""),[g,y]=C.useState(!1),w=Et(t,_=>d.itemRefCallback?.(_,a,s)),S=Na(),b=C.useRef("touch"),v=()=>{s||(c.onValueChange(a),c.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(yq,{scope:n,value:a,disabled:s,textId:S,isSelected:h,onItemTextChange:C.useCallback(_=>{m(E=>E||(_?.textContent??"").trim())},[]),children:r.jsx(sm.ItemSlot,{scope:n,value:a,disabled:s,textValue:p,children:r.jsx(lt.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":h&&g,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...u,ref:w,onFocus:We(u.onFocus,()=>y(!0)),onBlur:We(u.onBlur,()=>y(!1)),onClick:We(u.onClick,()=>{b.current!=="mouse"&&v()}),onPointerUp:We(u.onPointerUp,()=>{b.current==="mouse"&&v()}),onPointerDown:We(u.onPointerDown,_=>{b.current=_.pointerType}),onPointerMove:We(u.onPointerMove,_=>{b.current=_.pointerType,s?d.onItemLeave?.():b.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:We(u.onPointerLeave,_=>{_.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:We(u.onKeyDown,_=>{d.searchRef?.current!==""&&_.key===" "||(aq.includes(_.key)&&v(),_.key===" "&&_.preventDefault())})})})})});y3.displayName=hp;var Du="SelectItemText",v3=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,...o}=e,u=Ci(Du,n),c=Ti(Du,n),d=x3(Du,n),h=lq(Du,n),[p,m]=C.useState(null),g=Et(t,v=>m(v),d.onItemTextChange,v=>c.itemTextRefCallback?.(v,d.value,d.disabled)),y=p?.textContent,w=C.useMemo(()=>r.jsx("option",{value:d.value,disabled:d.disabled,children:y},d.value),[d.disabled,d.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=h;return nr(()=>(S(w),()=>b(w)),[S,b,w]),r.jsxs(r.Fragment,{children:[r.jsx(lt.span,{id:d.textId,...o,ref:g}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Xl.createPortal(o.children,u.valueNode):null]})});v3.displayName=Du;var E3="SelectItemIndicator",_3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return x3(E3,n).isSelected?r.jsx(lt.span,{"aria-hidden":!0,...a,ref:t}):null});_3.displayName=E3;var Fx="SelectScrollUpButton",S3=C.forwardRef((e,t)=>{const n=Ti(Fx,e.__scopeSelect),a=bv(Fx,e.__scopeSelect),[s,o]=C.useState(!1),u=Et(t,a.onScrollButtonChange);return nr(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?r.jsx(C3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});S3.displayName=Fx;var Px="SelectScrollDownButton",w3=C.forwardRef((e,t)=>{const n=Ti(Px,e.__scopeSelect),a=bv(Px,e.__scopeSelect),[s,o]=C.useState(!1),u=Et(t,a.onScrollButtonChange);return nr(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;o(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?r.jsx(C3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});w3.displayName=Px;var C3=C.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...s}=e,o=Ti("SelectScrollButton",n),u=C.useRef(null),c=im(n),d=C.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return C.useEffect(()=>()=>d(),[d]),nr(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),r.jsx(lt.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:We(s.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(a,50))}),onPointerMove:We(s.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(a,50))}),onPointerLeave:We(s.onPointerLeave,()=>{d()})})}),vq="SelectSeparator",T3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return r.jsx(lt.div,{"aria-hidden":!0,...a,ref:t})});T3.displayName=vq;var Bx="SelectArrow",Eq=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=om(n),o=Ci(Bx,n),u=Ti(Bx,n);return o.open&&u.position==="popper"?r.jsx(pv,{...s,...a,ref:t}):null});Eq.displayName=Bx;var _q="SelectBubbleInput",A3=C.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const s=C.useRef(null),o=Et(a,s),u=gv(t);return C.useEffect(()=>{const c=s.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&p){const m=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(m)}},[u,t]),r.jsx(lt.select,{...n,style:{...zD,...n.style},ref:o,defaultValue:t})});A3.displayName=_q;function N3(e){return e===""||e===void 0}function k3(e){const t=kn(e),n=C.useRef(""),a=C.useRef(0),s=C.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(a.current),h!==""&&(a.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=C.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,s,o]}function R3(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let u=Sq(e,Math.max(o,0));s.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function Sq(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var wq=r3,D3=s3,Cq=o3,Tq=l3,Aq=c3,I3=u3,Nq=p3,O3=b3,L3=y3,kq=v3,Rq=_3,j3=S3,M3=w3,F3=T3;const en=wq,tn=Cq,Xt=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(D3,{ref:a,className:Te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(Tq,{asChild:!0,children:r.jsx(pi,{className:"h-4 w-4 opacity-50"})})]}));Xt.displayName=D3.displayName;const P3=C.forwardRef(({className:e,...t},n)=>r.jsx(j3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Fy,{className:"h-4 w-4"})}));P3.displayName=j3.displayName;const B3=C.forwardRef(({className:e,...t},n)=>r.jsx(M3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(pi,{className:"h-4 w-4"})}));B3.displayName=M3.displayName;const Zt=C.forwardRef(({className:e,children:t,position:n="popper",...a},s)=>r.jsx(Aq,{children:r.jsxs(I3,{ref:s,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...a,children:[r.jsx(P3,{}),r.jsx(Nq,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(B3,{})]})}));Zt.displayName=I3.displayName;const Dq=C.forwardRef(({className:e,...t},n)=>r.jsx(O3,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));Dq.displayName=O3.displayName;const je=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(L3,{ref:a,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(Rq,{children:r.jsx(xo,{className:"h-4 w-4"})})}),r.jsx(kq,{children:t})]}));je.displayName=L3.displayName;const Iq=C.forwardRef(({className:e,...t},n)=>r.jsx(F3,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));Iq.displayName=F3.displayName;const $n=Xy,fp=mO,Oq=Zy,U3=C.forwardRef(({className:e,...t},n)=>r.jsx(_d,{ref:n,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));U3.displayName=_d.displayName;const Dn=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(Oq,{children:[r.jsx(U3,{}),r.jsxs(Sd,{ref:a,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,r.jsxs(Zp,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(Cr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Dn.displayName=Sd.displayName;const Cn=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Cn.displayName="DialogHeader";const Tr=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Tr.displayName="DialogFooter";const Tn=C.forwardRef(({className:e,...t},n)=>r.jsx(wd,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));Tn.displayName=wd.displayName;const Hn=C.forwardRef(({className:e,...t},n)=>r.jsx(Cd,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Hn.displayName=Cd.displayName;var lm="Checkbox",[Lq,tde]=kr(lm),[jq,xv]=Lq(lm);function Mq(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:s,disabled:o,form:u,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[g,y]=Xa({prop:n,defaultProp:s??!1,onChange:d,caller:lm}),[w,S]=C.useState(null),[b,v]=C.useState(null),_=C.useRef(!1),E=w?!!u||!!w.closest("form"):!0,T={checked:g,disabled:o,setChecked:y,control:w,setControl:S,name:c,form:u,value:p,hasConsumerStoppedPropagationRef:_,required:h,defaultChecked:bi(s)?!1:s,isFormControl:E,bubbleInput:b,setBubbleInput:v};return r.jsx(jq,{scope:t,...T,children:Fq(m)?m(T):a})}var H3="CheckboxTrigger",$3=C.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},s)=>{const{control:o,value:u,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:w}=xv(H3,e),S=Et(s,p),b=C.useRef(d);return C.useEffect(()=>{const v=o?.form;if(v){const _=()=>m(b.current);return v.addEventListener("reset",_),()=>v.removeEventListener("reset",_)}},[o,m]),r.jsx(lt.button,{type:"button",role:"checkbox","aria-checked":bi(d)?"mixed":d,"aria-required":h,"data-state":V3(d),"data-disabled":c?"":void 0,disabled:c,value:u,...a,ref:S,onKeyDown:We(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:We(n,v=>{m(_=>bi(_)?!0:!_),w&&y&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})})});$3.displayName=H3;var yv=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:s,defaultChecked:o,required:u,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return r.jsx(Mq,{__scopeCheckbox:n,checked:s,defaultChecked:o,disabled:c,required:u,onCheckedChange:h,name:a,form:p,value:d,internal_do_not_use_render:({isFormControl:g})=>r.jsxs(r.Fragment,{children:[r.jsx($3,{...m,ref:t,__scopeCheckbox:n}),g&&r.jsx(W3,{__scopeCheckbox:n})]})})});yv.displayName=lm;var z3="CheckboxIndicator",G3=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...s}=e,o=xv(z3,n);return r.jsx(ur,{present:a||bi(o.checked)||o.checked===!0,children:r.jsx(lt.span,{"data-state":V3(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});G3.displayName=z3;var q3="CheckboxBubbleInput",W3=C.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:g,setBubbleInput:y}=xv(q3,e),w=Et(n,y),S=gv(o),b=lv(a);C.useEffect(()=>{const _=g;if(!_)return;const E=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(E,"checked").set,k=!s.current;if(S!==o&&N){const L=new Event("click",{bubbles:k});_.indeterminate=bi(o),N.call(_,bi(o)?!1:o),_.dispatchEvent(L)}},[g,S,o,s]);const v=C.useRef(bi(o)?!1:o);return r.jsx(lt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??v.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});W3.displayName=q3;function Fq(e){return typeof e=="function"}function bi(e){return e==="indeterminate"}function V3(e){return bi(e)?"indeterminate":e?"checked":"unchecked"}const fa=C.forwardRef(({className:e,...t},n)=>r.jsx(yv,{ref:n,className:Te("peer h-4 w-4 shrink-0 rounded-sm border border-primary 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 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:r.jsx(G3,{className:Te("flex items-center justify-center text-current"),children:r.jsx(xo,{className:"h-4 w-4"})})}));fa.displayName=yv.displayName;const xi=C.forwardRef(({className:e,onCheckedChange:t,onChange:n,...a},s)=>{const o=u=>{n?.(u),t?.(u.target.checked)};return r.jsxs("label",{className:Te("relative inline-flex cursor-pointer",e),children:[r.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:o,ref:s,...a}),r.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),r.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});xi.displayName="Switch";function Pq(e,t){return C.useReducer((n,a)=>t[n][a]??n,e)}var vv="ScrollArea",[Y3,nde]=kr(vv),[Bq,xa]=Y3(vv),K3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:a="hover",dir:s,scrollHideDelay:o=600,...u}=e,[c,d]=C.useState(null),[h,p]=C.useState(null),[m,g]=C.useState(null),[y,w]=C.useState(null),[S,b]=C.useState(null),[v,_]=C.useState(0),[E,T]=C.useState(0),[N,k]=C.useState(!1),[L,R]=C.useState(!1),j=Et(t,B=>d(B)),M=ic(s);return r.jsx(Bq,{scope:n,type:a,dir:M,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:m,onContentChange:g,scrollbarX:y,onScrollbarXChange:w,scrollbarXEnabled:N,onScrollbarXEnabledChange:k,scrollbarY:S,onScrollbarYChange:b,scrollbarYEnabled:L,onScrollbarYEnabledChange:R,onCornerWidthChange:_,onCornerHeightChange:T,children:r.jsx(lt.div,{dir:M,...u,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});K3.displayName=vv;var X3="ScrollAreaViewport",Z3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:a,nonce:s,...o}=e,u=xa(X3,n),c=C.useRef(null),d=Et(t,c,u.onViewportChange);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(lt.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:r.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})});Z3.displayName=X3;var es="ScrollAreaScrollbar",Ev=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=xa(es,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=s,c=e.orientation==="horizontal";return C.useEffect(()=>(c?o(!0):u(!0),()=>{c?o(!1):u(!1)}),[c,o,u]),s.type==="hover"?r.jsx(Uq,{...a,ref:t,forceMount:n}):s.type==="scroll"?r.jsx(Hq,{...a,ref:t,forceMount:n}):s.type==="auto"?r.jsx(Q3,{...a,ref:t,forceMount:n}):s.type==="always"?r.jsx(_v,{...a,ref:t}):null});Ev.displayName=es;var Uq=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=xa(es,e.__scopeScrollArea),[o,u]=C.useState(!1);return C.useEffect(()=>{const c=s.scrollArea;let d=0;if(c){const h=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),s.scrollHideDelay)};return c.addEventListener("pointerenter",h),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",h),c.removeEventListener("pointerleave",p)}}},[s.scrollArea,s.scrollHideDelay]),r.jsx(ur,{present:n||o,children:r.jsx(Q3,{"data-state":o?"visible":"hidden",...a,ref:t})})}),Hq=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=xa(es,e.__scopeScrollArea),o=e.orientation==="horizontal",u=um(()=>d("SCROLL_END"),100),[c,d]=Pq("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return C.useEffect(()=>{if(c==="idle"){const h=window.setTimeout(()=>d("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(h)}},[c,s.scrollHideDelay,d]),C.useEffect(()=>{const h=s.viewport,p=o?"scrollLeft":"scrollTop";if(h){let m=h[p];const g=()=>{const y=h[p];m!==y&&(d("SCROLL"),u()),m=y};return h.addEventListener("scroll",g),()=>h.removeEventListener("scroll",g)}},[s.viewport,o,d,u]),r.jsx(ur,{present:n||c!=="hidden",children:r.jsx(_v,{"data-state":c==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:We(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:We(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),Q3=C.forwardRef((e,t)=>{const n=xa(es,e.__scopeScrollArea),{forceMount:a,...s}=e,[o,u]=C.useState(!1),c=e.orientation==="horizontal",d=um(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?h:p)}},10);return Hl(n.viewport,d),Hl(n.content,d),r.jsx(ur,{present:a||o,children:r.jsx(_v,{"data-state":o?"visible":"hidden",...s,ref:t})})}),_v=C.forwardRef((e,t)=>{const{orientation:n="vertical",...a}=e,s=xa(es,e.__scopeScrollArea),o=C.useRef(null),u=C.useRef(0),[c,d]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=rL(c.viewport,c.content),p={...a,sizes:c,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:g=>u.current=g};function m(g,y){return Vq(g,u.current,c,y)}return n==="horizontal"?r.jsx($q,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const g=s.viewport.scrollLeft,y=q2(g,c,s.dir);o.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollLeft=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollLeft=m(g,s.dir))}}):n==="vertical"?r.jsx(zq,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const g=s.viewport.scrollTop,y=q2(g,c);o.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollTop=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollTop=m(g))}}):null}),$q=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...s}=e,o=xa(es,e.__scopeScrollArea),[u,c]=C.useState(),d=C.useRef(null),h=Et(t,d,o.onScrollbarXChange);return C.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(eL,{"data-orientation":"horizontal",...s,ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":cm(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(g),sL(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&a({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:mp(u.paddingLeft),paddingEnd:mp(u.paddingRight)}})}})}),zq=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...s}=e,o=xa(es,e.__scopeScrollArea),[u,c]=C.useState(),d=C.useRef(null),h=Et(t,d,o.onScrollbarYChange);return C.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(eL,{"data-orientation":"vertical",...s,ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":cm(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(g),sL(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&a({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:mp(u.paddingTop),paddingEnd:mp(u.paddingBottom)}})}})}),[Gq,J3]=Y3(es),eL=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:a,hasThumb:s,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:p,onResize:m,...g}=e,y=xa(es,n),[w,S]=C.useState(null),b=Et(t,j=>S(j)),v=C.useRef(null),_=C.useRef(""),E=y.viewport,T=a.content-a.viewport,N=kn(p),k=kn(d),L=um(m,10);function R(j){if(v.current){const M=j.clientX-v.current.left,B=j.clientY-v.current.top;h({x:M,y:B})}}return C.useEffect(()=>{const j=M=>{const B=M.target;w?.contains(B)&&N(M,T)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[E,w,T,N]),C.useEffect(k,[a,k]),Hl(w,L),Hl(y.content,L),r.jsx(Gq,{scope:n,scrollbar:w,hasThumb:s,onThumbChange:kn(o),onThumbPointerUp:kn(u),onThumbPositionChange:k,onThumbPointerDown:kn(c),children:r.jsx(lt.div,{...g,ref:b,style:{position:"absolute",...g.style},onPointerDown:We(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),v.current=w.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),R(j))}),onPointerMove:We(e.onPointerMove,R),onPointerUp:We(e.onPointerUp,j=>{const M=j.target;M.hasPointerCapture(j.pointerId)&&M.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=_.current,y.viewport&&(y.viewport.style.scrollBehavior=""),v.current=null})})})}),pp="ScrollAreaThumb",tL=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=J3(pp,e.__scopeScrollArea);return r.jsx(ur,{present:n||s.hasThumb,children:r.jsx(qq,{ref:t,...a})})}),qq=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:a,...s}=e,o=xa(pp,n),u=J3(pp,n),{onThumbPositionChange:c}=u,d=Et(t,m=>u.onThumbChange(m)),h=C.useRef(void 0),p=um(()=>{h.current&&(h.current(),h.current=void 0)},100);return C.useEffect(()=>{const m=o.viewport;if(m){const g=()=>{if(p(),!h.current){const y=Yq(m,c);h.current=y,c()}};return c(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[o.viewport,p,c]),r.jsx(lt.div,{"data-state":u.hasThumb?"visible":"hidden",...s,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:We(e.onPointerDownCapture,m=>{const y=m.target.getBoundingClientRect(),w=m.clientX-y.left,S=m.clientY-y.top;u.onThumbPointerDown({x:w,y:S})}),onPointerUp:We(e.onPointerUp,u.onThumbPointerUp)})});tL.displayName=pp;var Sv="ScrollAreaCorner",nL=C.forwardRef((e,t)=>{const n=xa(Sv,e.__scopeScrollArea),a=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&a?r.jsx(Wq,{...e,ref:t}):null});nL.displayName=Sv;var Wq=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,...a}=e,s=xa(Sv,n),[o,u]=C.useState(0),[c,d]=C.useState(0),h=!!(o&&c);return Hl(s.scrollbarX,()=>{const p=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(p),d(p)}),Hl(s.scrollbarY,()=>{const p=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(p),u(p)}),h?r.jsx(lt.div,{...a,ref:t,style:{width:o,height:c,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function mp(e){return e?parseInt(e,10):0}function rL(e,t){const n=e/t;return isNaN(n)?0:n}function cm(e){const t=rL(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-n)*t;return Math.max(a,18)}function Vq(e,t,n,a="ltr"){const s=cm(n),o=s/2,u=t||o,c=s-u,d=n.scrollbar.paddingStart+u,h=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,m=a==="ltr"?[0,p]:[p*-1,0];return aL([d,h],m)(e)}function q2(e,t,n="ltr"){const a=cm(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,u=t.content-t.viewport,c=o-a,d=n==="ltr"?[0,u]:[u*-1,0],h=Lx(e,d);return aL([0,u],[0,c])(h)}function aL(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}function sL(e,t){return e>0&&e<t}var Yq=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},a=0;return(function s(){const o={left:e.scrollLeft,top:e.scrollTop},u=n.left!==o.left,c=n.top!==o.top;(u||c)&&t(),n=o,a=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(a)};function um(e,t){const n=kn(e),a=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(a.current),[]),C.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(n,t)},[n,t])}function Hl(e,t){const n=kn(t);nr(()=>{let a=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(a),s.unobserve(e)}}},[e,n])}var iL=K3,Kq=Z3,Xq=nL;const Ia=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(iL,{ref:a,className:Te("relative overflow-hidden",e),...n,children:[r.jsx(Kq,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsx(oL,{}),r.jsx(Xq,{})]}));Ia.displayName=iL.displayName;const oL=C.forwardRef(({className:e,orientation:t="vertical",...n},a)=>r.jsx(Ev,{ref:a,orientation:t,className:Te("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:r.jsx(tL,{className:"relative flex-1 rounded-full bg-border"})}));oL.displayName=Ev.displayName;function nd(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,o=!1;for(;!o;){a===-1&&(a=n.length,o=!0);const u=n.slice(s,a).trim();(u||!o)&&t.push(u),s=a+1,a=n.indexOf(",",s)}return t}function dm(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Zq=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qq=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jq={};function W2(e,t){return(Jq.jsx?Qq:Zq).test(e)}const eW=/[ \t\n\f\r]/g;function Ad(e){return typeof e=="object"?e.type==="text"?V2(e.value):!1:V2(e)}function V2(e){return e.replace(eW,"")===""}let Nd=class{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}};Nd.prototype.normal={};Nd.prototype.property={};Nd.prototype.space=void 0;function lL(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new Nd(n,a,t)}function rd(e){return e.toLowerCase()}let Pr=class{constructor(t,n){this.attribute=n,this.property=t}};Pr.prototype.attribute="";Pr.prototype.booleanish=!1;Pr.prototype.boolean=!1;Pr.prototype.commaOrSpaceSeparated=!1;Pr.prototype.commaSeparated=!1;Pr.prototype.defined=!1;Pr.prototype.mustUseProperty=!1;Pr.prototype.number=!1;Pr.prototype.overloadedBoolean=!1;Pr.prototype.property="";Pr.prototype.spaceSeparated=!1;Pr.prototype.space=void 0;let tW=0;const Nt=yo(),Bn=yo(),Ux=yo(),Ge=yo(),hn=yo(),Dl=yo(),Kr=yo();function yo(){return 2**++tW}const Hx=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nt,booleanish:Bn,commaOrSpaceSeparated:Kr,commaSeparated:Dl,number:Ge,overloadedBoolean:Ux,spaceSeparated:hn},Symbol.toStringTag,{value:"Module"})),T0=Object.keys(Hx);let wv=class extends Pr{constructor(t,n,a,s){let o=-1;if(super(t,n),Y2(this,"space",s),typeof a=="number")for(;++o<T0.length;){const u=T0[o];Y2(this,T0[o],(a&Hx[u])===Hx[u])}}};wv.prototype.defined=!0;function Y2(e,t,n){n&&(e[t]=n)}function lc(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new wv(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[rd(a)]=a,n[rd(o.attribute)]=a}return new Nd(t,n,e.space)}const cL=lc({properties:{ariaActiveDescendant:null,ariaAtomic:Bn,ariaAutoComplete:null,ariaBusy:Bn,ariaChecked:Bn,ariaColCount:Ge,ariaColIndex:Ge,ariaColSpan:Ge,ariaControls:hn,ariaCurrent:null,ariaDescribedBy:hn,ariaDetails:null,ariaDisabled:Bn,ariaDropEffect:hn,ariaErrorMessage:null,ariaExpanded:Bn,ariaFlowTo:hn,ariaGrabbed:Bn,ariaHasPopup:null,ariaHidden:Bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:hn,ariaLevel:Ge,ariaLive:null,ariaModal:Bn,ariaMultiLine:Bn,ariaMultiSelectable:Bn,ariaOrientation:null,ariaOwns:hn,ariaPlaceholder:null,ariaPosInSet:Ge,ariaPressed:Bn,ariaReadOnly:Bn,ariaRelevant:null,ariaRequired:Bn,ariaRoleDescription:hn,ariaRowCount:Ge,ariaRowIndex:Ge,ariaRowSpan:Ge,ariaSelected:Bn,ariaSetSize:Ge,ariaSort:null,ariaValueMax:Ge,ariaValueMin:Ge,ariaValueNow:Ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uL(e,t){return t in e?e[t]:t}function dL(e,t){return uL(e,t.toLowerCase())}const nW=lc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dl,acceptCharset:hn,accessKey:hn,action:null,allow:null,allowFullScreen:Nt,allowPaymentRequest:Nt,allowUserMedia:Nt,alt:null,as:null,async:Nt,autoCapitalize:null,autoComplete:hn,autoFocus:Nt,autoPlay:Nt,blocking:hn,capture:null,charSet:null,checked:Nt,cite:null,className:hn,cols:Ge,colSpan:null,content:null,contentEditable:Bn,controls:Nt,controlsList:hn,coords:Ge|Dl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Nt,defer:Nt,dir:null,dirName:null,disabled:Nt,download:Ux,draggable:Bn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Nt,formTarget:null,headers:hn,height:Ge,hidden:Ux,high:Ge,href:null,hrefLang:null,htmlFor:hn,httpEquiv:hn,id:null,imageSizes:null,imageSrcSet:null,inert:Nt,inputMode:null,integrity:null,is:null,isMap:Nt,itemId:null,itemProp:hn,itemRef:hn,itemScope:Nt,itemType:hn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Nt,low:Ge,manifest:null,max:null,maxLength:Ge,media:null,method:null,min:null,minLength:Ge,multiple:Nt,muted:Nt,name:null,nonce:null,noModule:Nt,noValidate:Nt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Nt,optimum:Ge,pattern:null,ping:hn,placeholder:null,playsInline:Nt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Nt,referrerPolicy:null,rel:hn,required:Nt,reversed:Nt,rows:Ge,rowSpan:Ge,sandbox:hn,scope:null,scoped:Nt,seamless:Nt,selected:Nt,shadowRootClonable:Nt,shadowRootDelegatesFocus:Nt,shadowRootMode:null,shape:null,size:Ge,sizes:null,slot:null,span:Ge,spellCheck:Bn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ge,step:null,style:null,tabIndex:Ge,target:null,title:null,translate:null,type:null,typeMustMatch:Nt,useMap:null,value:Bn,width:Ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:hn,axis:null,background:null,bgColor:null,border:Ge,borderColor:null,bottomMargin:Ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Nt,declare:Nt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ge,leftMargin:Ge,link:null,longDesc:null,lowSrc:null,marginHeight:Ge,marginWidth:Ge,noResize:Nt,noHref:Nt,noShade:Nt,noWrap:Nt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ge,rules:null,scheme:null,scrolling:Bn,standby:null,summary:null,text:null,topMargin:Ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Nt,disableRemotePlayback:Nt,prefix:null,property:null,results:Ge,security:null,unselectable:null},space:"html",transform:dL}),rW=lc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Kr,accentHeight:Ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ge,amplitude:Ge,arabicForm:null,ascent:Ge,attributeName:null,attributeType:null,azimuth:Ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ge,by:null,calcMode:null,capHeight:Ge,className:hn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ge,diffuseConstant:Ge,direction:null,display:null,dur:null,divisor:Ge,dominantBaseline:null,download:Nt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ge,enableBackground:null,end:null,event:null,exponent:Ge,externalResourcesRequired:null,fill:null,fillOpacity:Ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dl,g2:Dl,glyphName:Dl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ge,horizOriginX:Ge,horizOriginY:Ge,id:null,ideographic:Ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ge,k:Ge,k1:Ge,k2:Ge,k3:Ge,k4:Ge,kernelMatrix:Kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ge,overlineThickness:Ge,paintOrder:null,panose1:null,path:null,pathLength:Ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:hn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ge,pointsAtY:Ge,pointsAtZ:Ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kr,rev:Kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kr,requiredFeatures:Kr,requiredFonts:Kr,requiredFormats:Kr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ge,specularExponent:Ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ge,strikethroughThickness:Ge,string:null,stroke:null,strokeDashArray:Kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ge,strokeOpacity:Ge,strokeWidth:null,style:null,surfaceScale:Ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kr,tabIndex:Ge,tableValues:null,target:null,targetX:Ge,targetY:Ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ge,underlineThickness:Ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ge,values:null,vAlphabetic:Ge,vMathematical:Ge,vectorEffect:null,vHanging:Ge,vIdeographic:Ge,version:null,vertAdvY:Ge,vertOriginX:Ge,vertOriginY:Ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uL}),hL=lc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fL=lc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dL}),pL=lc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),aW={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},sW=/[A-Z]/g,K2=/-[a-z]/g,iW=/^data[-\w.:]+$/i;function kd(e,t){const n=rd(t);let a=t,s=Pr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&iW.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(K2,lW);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!K2.test(o)){let u=o.replace(sW,oW);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=wv}return new s(a,t)}function oW(e){return"-"+e.toLowerCase()}function lW(e){return e.charAt(1).toUpperCase()}const cc=lL([cL,nW,hL,fL,pL],"html"),Is=lL([cL,rW,hL,fL,pL],"svg");function ad(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function hm(e){return e.join(" ").trim()}var bl={},A0,X2;function cW(){if(X2)return A0;X2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
584
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},$$="DialogDescriptionWarning",z$=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pO($$).contentName}}.`;return C.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Xy=eO,mO=nO,Zy=aO,_d=sO,Sd=iO,wd=lO,Cd=uO,Zp=hO;const gO=Xy,G$=Zy,bO=C.forwardRef(({className:e,...t},n)=>r.jsx(_d,{className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));bO.displayName=_d.displayName;const q$=ec("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Qy=C.forwardRef(({side:e="right",className:t,children:n,...a},s)=>r.jsxs(G$,{children:[r.jsx(bO,{}),r.jsxs(Sd,{ref:s,className:Te(q$({side:e}),t),...a,children:[n,r.jsxs(Zp,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(Cr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qy.displayName=Sd.displayName;const Jy=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});Jy.displayName="SheetHeader";const ev=C.forwardRef(({className:e,...t},n)=>r.jsx(wd,{ref:n,className:Te("text-lg font-semibold text-foreground",e),...t}));ev.displayName=wd.displayName;const xO=C.forwardRef(({className:e,...t},n)=>r.jsx(Cd,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));xO.displayName=Cd.displayName;function L2({className:e,...t}){return r.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const W$=["top","right","bottom","left"],vi=Math.min,Zr=Math.max,lp=Math.round,vf=Math.floor,Ka=e=>({x:e,y:e}),V$={left:"right",right:"left",bottom:"top",top:"bottom"},Y$={start:"end",end:"start"};function Nx(e,t,n){return Zr(e,vi(t,n))}function As(e,t){return typeof e=="function"?e(t):e}function Ns(e){return e.split("-")[0]}function rc(e){return e.split("-")[1]}function tv(e){return e==="x"?"y":"x"}function nv(e){return e==="y"?"height":"width"}const K$=new Set(["top","bottom"]);function Wa(e){return K$.has(Ns(e))?"y":"x"}function rv(e){return tv(Wa(e))}function X$(e,t,n){n===void 0&&(n=!1);const a=rc(e),s=rv(e),o=nv(s);let u=s==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(u=cp(u)),[u,cp(u)]}function Z$(e){const t=cp(e);return[kx(e),t,kx(t)]}function kx(e){return e.replace(/start|end/g,t=>Y$[t])}const j2=["left","right"],M2=["right","left"],Q$=["top","bottom"],J$=["bottom","top"];function ez(e,t,n){switch(e){case"top":case"bottom":return n?t?M2:j2:t?j2:M2;case"left":case"right":return t?Q$:J$;default:return[]}}function tz(e,t,n,a){const s=rc(e);let o=ez(Ns(e),n==="start",a);return s&&(o=o.map(u=>u+"-"+s),t&&(o=o.concat(o.map(kx)))),o}function cp(e){return e.replace(/left|right|bottom|top/g,t=>V$[t])}function nz(e){return{top:0,right:0,bottom:0,left:0,...e}}function yO(e){return typeof e!="number"?nz(e):{top:e,right:e,bottom:e,left:e}}function up(e){const{x:t,y:n,width:a,height:s}=e;return{width:a,height:s,top:n,left:t,right:t+a,bottom:n+s,x:t,y:n}}function F2(e,t,n){let{reference:a,floating:s}=e;const o=Wa(t),u=rv(t),c=nv(u),d=Ns(t),h=o==="y",p=a.x+a.width/2-s.width/2,m=a.y+a.height/2-s.height/2,g=a[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:a.y-s.height};break;case"bottom":y={x:p,y:a.y+a.height};break;case"right":y={x:a.x+a.width,y:m};break;case"left":y={x:a.x-s.width,y:m};break;default:y={x:a.x,y:a.y}}switch(rc(t)){case"start":y[u]-=g*(n&&h?-1:1);break;case"end":y[u]+=g*(n&&h?-1:1);break}return y}const rz=async(e,t,n)=>{const{placement:a="bottom",strategy:s="absolute",middleware:o=[],platform:u}=n,c=o.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=F2(h,a,d),g=a,y={},w=0;for(let S=0;S<c.length;S++){const{name:b,fn:v}=c[S],{x:_,y:E,data:T,reset:N}=await v({x:p,y:m,initialPlacement:a,placement:g,strategy:s,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=_??p,m=E??m,y={...y,[b]:{...y[b],...T}},N&&w<=50&&(w++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(h=N.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:p,y:m}=F2(h,g,d)),S=-1)}return{x:p,y:m,placement:g,strategy:s,middlewareData:y}};async function Ju(e,t){var n;t===void 0&&(t={});const{x:a,y:s,platform:o,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:y=0}=As(t,e),w=yO(y),b=c[g?m==="floating"?"reference":"floating":m],v=up(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),_=m==="floating"?{x:a,y:s,width:u.floating.width,height:u.floating.height}:u.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},N=up(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:E,strategy:d}):_);return{top:(v.top-N.top+w.top)/T.y,bottom:(N.bottom-v.bottom+w.bottom)/T.y,left:(v.left-N.left+w.left)/T.x,right:(N.right-v.right+w.right)/T.x}}const az=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:s,rects:o,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=As(e,t)||{};if(h==null)return{};const m=yO(p),g={x:n,y:a},y=rv(s),w=nv(y),S=await u.getDimensions(h),b=y==="y",v=b?"top":"left",_=b?"bottom":"right",E=b?"clientHeight":"clientWidth",T=o.reference[w]+o.reference[y]-g[y]-o.floating[w],N=g[y]-o.reference[y],k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let L=k?k[E]:0;(!L||!await(u.isElement==null?void 0:u.isElement(k)))&&(L=c.floating[E]||o.floating[w]);const R=T/2-N/2,j=L/2-S[w]/2-1,M=vi(m[v],j),B=vi(m[_],j),H=M,P=L-S[w]-B,$=L/2-S[w]/2+R,ee=Nx(H,$,P),U=!d.arrow&&rc(s)!=null&&$!==ee&&o.reference[w]/2-($<H?M:B)-S[w]/2<0,q=U?$<H?$-H:$-P:0;return{[y]:g[y]+q,data:{[y]:ee,centerOffset:$-ee-q,...U&&{alignmentOffset:q}},reset:U}}}),sz=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:s,middlewareData:o,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...b}=As(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=Ns(s),_=Wa(c),E=Ns(c)===c,T=await(d.isRTL==null?void 0:d.isRTL(h.floating)),N=g||(E||!S?[cp(c)]:Z$(c)),k=w!=="none";!g&&k&&N.push(...tz(c,S,w,T));const L=[c,...N],R=await Ju(t,b),j=[];let M=((a=o.flip)==null?void 0:a.overflows)||[];if(p&&j.push(R[v]),m){const $=X$(s,u,T);j.push(R[$[0]],R[$[1]])}if(M=[...M,{placement:s,overflows:j}],!j.every($=>$<=0)){var B,H;const $=(((B=o.flip)==null?void 0:B.index)||0)+1,ee=L[$];if(ee&&(!(m==="alignment"?_!==Wa(ee):!1)||M.every(K=>Wa(K.placement)===_?K.overflows[0]>0:!0)))return{data:{index:$,overflows:M},reset:{placement:ee}};let U=(H=M.filter(q=>q.overflows[0]<=0).sort((q,K)=>q.overflows[1]-K.overflows[1])[0])==null?void 0:H.placement;if(!U)switch(y){case"bestFit":{var P;const q=(P=M.filter(K=>{if(k){const F=Wa(K.placement);return F===_||F==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(F=>F>0).reduce((F,O)=>F+O,0)]).sort((K,F)=>K[1]-F[1])[0])==null?void 0:P[0];q&&(U=q);break}case"initialPlacement":U=c;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function P2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function B2(e){return W$.some(t=>e[t]>=0)}const iz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...s}=As(e,t);switch(a){case"referenceHidden":{const o=await Ju(t,{...s,elementContext:"reference"}),u=P2(o,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:B2(u)}}}case"escaped":{const o=await Ju(t,{...s,altBoundary:!0}),u=P2(o,n.floating);return{data:{escapedOffsets:u,escaped:B2(u)}}}default:return{}}}}},vO=new Set(["left","top"]);async function oz(e,t){const{placement:n,platform:a,elements:s}=e,o=await(a.isRTL==null?void 0:a.isRTL(s.floating)),u=Ns(n),c=rc(n),d=Wa(n)==="y",h=vO.has(u)?-1:1,p=o&&d?-1:1,m=As(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),d?{x:y*p,y:g*h}:{x:g*h,y:y*p}}const lz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:s,y:o,placement:u,middlewareData:c}=t,d=await oz(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(a=c.arrow)!=null&&a.alignmentOffset?{}:{x:s+d.x,y:o+d.y,data:{...d,placement:u}}}}},cz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:s}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:b=>{let{x:v,y:_}=b;return{x:v,y:_}}},...d}=As(e,t),h={x:n,y:a},p=await Ju(t,d),m=Wa(Ns(s)),g=tv(m);let y=h[g],w=h[m];if(o){const b=g==="y"?"top":"left",v=g==="y"?"bottom":"right",_=y+p[b],E=y-p[v];y=Nx(_,y,E)}if(u){const b=m==="y"?"top":"left",v=m==="y"?"bottom":"right",_=w+p[b],E=w-p[v];w=Nx(_,w,E)}const S=c.fn({...t,[g]:y,[m]:w});return{...S,data:{x:S.x-n,y:S.y-a,enabled:{[g]:o,[m]:u}}}}}},uz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:s,rects:o,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=As(e,t),p={x:n,y:a},m=Wa(s),g=tv(m);let y=p[g],w=p[m];const S=As(c,t),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const E=g==="y"?"height":"width",T=o.reference[g]-o.floating[E]+b.mainAxis,N=o.reference[g]+o.reference[E]-b.mainAxis;y<T?y=T:y>N&&(y=N)}if(h){var v,_;const E=g==="y"?"width":"height",T=vO.has(Ns(s)),N=o.reference[m]-o.floating[E]+(T&&((v=u.offset)==null?void 0:v[m])||0)+(T?0:b.crossAxis),k=o.reference[m]+o.reference[E]+(T?0:((_=u.offset)==null?void 0:_[m])||0)-(T?b.crossAxis:0);w<N?w=N:w>k&&(w=k)}return{[g]:y,[m]:w}}}},dz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:s,rects:o,platform:u,elements:c}=t,{apply:d=()=>{},...h}=As(e,t),p=await Ju(t,h),m=Ns(s),g=rc(s),y=Wa(s)==="y",{width:w,height:S}=o.floating;let b,v;m==="top"||m==="bottom"?(b=m,v=g===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(v=m,b=g==="end"?"top":"bottom");const _=S-p.top-p.bottom,E=w-p.left-p.right,T=vi(S-p[b],_),N=vi(w-p[v],E),k=!t.middlewareData.shift;let L=T,R=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=E),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(L=_),k&&!g){const M=Zr(p.left,0),B=Zr(p.right,0),H=Zr(p.top,0),P=Zr(p.bottom,0);y?R=w-2*(M!==0||B!==0?M+B:Zr(p.left,p.right)):L=S-2*(H!==0||P!==0?H+P:Zr(p.top,p.bottom))}await d({...t,availableWidth:R,availableHeight:L});const j=await u.getDimensions(c.floating);return w!==j.width||S!==j.height?{reset:{rects:!0}}:{}}}};function Qp(){return typeof window<"u"}function ac(e){return EO(e)?(e.nodeName||"").toLowerCase():"#document"}function ea(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ja(e){var t;return(t=(EO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EO(e){return Qp()?e instanceof Node||e instanceof ea(e).Node:!1}function Ra(e){return Qp()?e instanceof Element||e instanceof ea(e).Element:!1}function Za(e){return Qp()?e instanceof HTMLElement||e instanceof ea(e).HTMLElement:!1}function U2(e){return!Qp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ea(e).ShadowRoot}const hz=new Set(["inline","contents"]);function Td(e){const{overflow:t,overflowX:n,overflowY:a,display:s}=Da(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!hz.has(s)}const fz=new Set(["table","td","th"]);function pz(e){return fz.has(ac(e))}const mz=[":popover-open",":modal"];function Jp(e){return mz.some(t=>{try{return e.matches(t)}catch{return!1}})}const gz=["transform","translate","scale","rotate","perspective"],bz=["transform","translate","scale","rotate","perspective","filter"],xz=["paint","layout","strict","content"];function av(e){const t=sv(),n=Ra(e)?Da(e):e;return gz.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bz.some(a=>(n.willChange||"").includes(a))||xz.some(a=>(n.contain||"").includes(a))}function yz(e){let t=Ei(e);for(;Za(t)&&!Bl(t);){if(av(t))return t;if(Jp(t))return null;t=Ei(t)}return null}function sv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vz=new Set(["html","body","#document"]);function Bl(e){return vz.has(ac(e))}function Da(e){return ea(e).getComputedStyle(e)}function em(e){return Ra(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ei(e){if(ac(e)==="html")return e;const t=e.assignedSlot||e.parentNode||U2(e)&&e.host||Ja(e);return U2(t)?t.host:t}function _O(e){const t=Ei(e);return Bl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Za(t)&&Td(t)?t:_O(t)}function ed(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=_O(e),o=s===((a=e.ownerDocument)==null?void 0:a.body),u=ea(s);if(o){const c=Rx(u);return t.concat(u,u.visualViewport||[],Td(s)?s:[],c&&n?ed(c):[])}return t.concat(s,ed(s,[],n))}function Rx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SO(e){const t=Da(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=Za(e),o=s?e.offsetWidth:n,u=s?e.offsetHeight:a,c=lp(n)!==o||lp(a)!==u;return c&&(n=o,a=u),{width:n,height:a,$:c}}function iv(e){return Ra(e)?e:e.contextElement}function Rl(e){const t=iv(e);if(!Za(t))return Ka(1);const n=t.getBoundingClientRect(),{width:a,height:s,$:o}=SO(t);let u=(o?lp(n.width):n.width)/a,c=(o?lp(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const Ez=Ka(0);function wO(e){const t=ea(e);return!sv()||!t.visualViewport?Ez:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _z(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ea(e)?!1:t}function fo(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=iv(e);let u=Ka(1);t&&(a?Ra(a)&&(u=Rl(a)):u=Rl(e));const c=_z(o,n,a)?wO(o):Ka(0);let d=(s.left+c.x)/u.x,h=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(o){const g=ea(o),y=a&&Ra(a)?ea(a):a;let w=g,S=Rx(w);for(;S&&a&&y!==w;){const b=Rl(S),v=S.getBoundingClientRect(),_=Da(S),E=v.left+(S.clientLeft+parseFloat(_.paddingLeft))*b.x,T=v.top+(S.clientTop+parseFloat(_.paddingTop))*b.y;d*=b.x,h*=b.y,p*=b.x,m*=b.y,d+=E,h+=T,w=ea(S),S=Rx(w)}}return up({width:p,height:m,x:d,y:h})}function ov(e,t){const n=em(e).scrollLeft;return t?t.left+n:fo(Ja(e)).left+n}function CO(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=a.left+t.scrollLeft-(n?0:ov(e,a)),o=a.top+t.scrollTop;return{x:s,y:o}}function Sz(e){let{elements:t,rect:n,offsetParent:a,strategy:s}=e;const o=s==="fixed",u=Ja(a),c=t?Jp(t.floating):!1;if(a===u||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=Ka(1);const p=Ka(0),m=Za(a);if((m||!m&&!o)&&((ac(a)!=="body"||Td(u))&&(d=em(a)),Za(a))){const y=fo(a);h=Rl(a),p.x=y.x+a.clientLeft,p.y=y.y+a.clientTop}const g=u&&!m&&!o?CO(u,d,!0):Ka(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+g.x,y:n.y*h.y-d.scrollTop*h.y+p.y+g.y}}function wz(e){return Array.from(e.getClientRects())}function Cz(e){const t=Ja(e),n=em(e),a=e.ownerDocument.body,s=Zr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),o=Zr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+ov(e);const c=-n.scrollTop;return Da(a).direction==="rtl"&&(u+=Zr(t.clientWidth,a.clientWidth)-s),{width:s,height:o,x:u,y:c}}function Tz(e,t){const n=ea(e),a=Ja(e),s=n.visualViewport;let o=a.clientWidth,u=a.clientHeight,c=0,d=0;if(s){o=s.width,u=s.height;const h=sv();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:o,height:u,x:c,y:d}}const Az=new Set(["absolute","fixed"]);function Nz(e,t){const n=fo(e,!0,t==="fixed"),a=n.top+e.clientTop,s=n.left+e.clientLeft,o=Za(e)?Rl(e):Ka(1),u=e.clientWidth*o.x,c=e.clientHeight*o.y,d=s*o.x,h=a*o.y;return{width:u,height:c,x:d,y:h}}function H2(e,t,n){let a;if(t==="viewport")a=Tz(e,n);else if(t==="document")a=Cz(Ja(e));else if(Ra(t))a=Nz(t,n);else{const s=wO(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return up(a)}function TO(e,t){const n=Ei(e);return n===t||!Ra(n)||Bl(n)?!1:Da(n).position==="fixed"||TO(n,t)}function kz(e,t){const n=t.get(e);if(n)return n;let a=ed(e,[],!1).filter(c=>Ra(c)&&ac(c)!=="body"),s=null;const o=Da(e).position==="fixed";let u=o?Ei(e):e;for(;Ra(u)&&!Bl(u);){const c=Da(u),d=av(u);!d&&c.position==="fixed"&&(s=null),(o?!d&&!s:!d&&c.position==="static"&&!!s&&Az.has(s.position)||Td(u)&&!d&&TO(e,u))?a=a.filter(p=>p!==u):s=c,u=Ei(u)}return t.set(e,a),a}function Rz(e){let{element:t,boundary:n,rootBoundary:a,strategy:s}=e;const u=[...n==="clippingAncestors"?Jp(t)?[]:kz(t,this._c):[].concat(n),a],c=u[0],d=u.reduce((h,p)=>{const m=H2(t,p,s);return h.top=Zr(m.top,h.top),h.right=vi(m.right,h.right),h.bottom=vi(m.bottom,h.bottom),h.left=Zr(m.left,h.left),h},H2(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Dz(e){const{width:t,height:n}=SO(e);return{width:t,height:n}}function Iz(e,t,n){const a=Za(t),s=Ja(t),o=n==="fixed",u=fo(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=Ka(0);function h(){d.x=ov(s)}if(a||!a&&!o)if((ac(t)!=="body"||Td(s))&&(c=em(t)),a){const y=fo(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&h();o&&!a&&s&&h();const p=s&&!a&&!o?CO(s,c):Ka(0),m=u.left+c.scrollLeft-d.x-p.x,g=u.top+c.scrollTop-d.y-p.y;return{x:m,y:g,width:u.width,height:u.height}}function w0(e){return Da(e).position==="static"}function $2(e,t){if(!Za(e)||Da(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ja(e)===n&&(n=n.ownerDocument.body),n}function AO(e,t){const n=ea(e);if(Jp(e))return n;if(!Za(e)){let s=Ei(e);for(;s&&!Bl(s);){if(Ra(s)&&!w0(s))return s;s=Ei(s)}return n}let a=$2(e,t);for(;a&&pz(a)&&w0(a);)a=$2(a,t);return a&&Bl(a)&&w0(a)&&!av(a)?n:a||yz(e)||n}const Oz=async function(e){const t=this.getOffsetParent||AO,n=this.getDimensions,a=await n(e.floating);return{reference:Iz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Lz(e){return Da(e).direction==="rtl"}const jz={convertOffsetParentRelativeRectToViewportRelativeRect:Sz,getDocumentElement:Ja,getClippingRect:Rz,getOffsetParent:AO,getElementRects:Oz,getClientRects:wz,getDimensions:Dz,getScale:Rl,isElement:Ra,isRTL:Lz};function NO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mz(e,t){let n=null,a;const s=Ja(e);function o(){var c;clearTimeout(a),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:g,height:y}=h;if(c||t(),!g||!y)return;const w=vf(m),S=vf(s.clientWidth-(p+g)),b=vf(s.clientHeight-(m+y)),v=vf(p),E={rootMargin:-w+"px "+-S+"px "+-b+"px "+-v+"px",threshold:Zr(0,vi(1,d))||1};let T=!0;function N(k){const L=k[0].intersectionRatio;if(L!==d){if(!T)return u();L?u(!1,L):a=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!NO(h,e.getBoundingClientRect())&&u(),T=!1}try{n=new IntersectionObserver(N,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(N,E)}n.observe(e)}return u(!0),o}function Fz(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=a,h=iv(e),p=s||o?[...h?ed(h):[],...ed(t)]:[];p.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const m=h&&c?Mz(h,n):null;let g=-1,y=null;u&&(y=new ResizeObserver(v=>{let[_]=v;_&&_.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let w,S=d?fo(e):null;d&&b();function b(){const v=fo(e);S&&!NO(S,v)&&n(),S=v,w=requestAnimationFrame(b)}return n(),()=>{var v;p.forEach(_=>{s&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),m?.(),(v=y)==null||v.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const Pz=lz,Bz=cz,Uz=sz,Hz=dz,$z=iz,z2=az,zz=uz,Gz=(e,t,n)=>{const a=new Map,s={platform:jz,...n},o={...s.platform,_c:a};return rz(e,t,{...s,platform:o})};var qz=typeof document<"u",Wz=function(){},zf=qz?C.useLayoutEffect:Wz;function dp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!dp(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){const o=s[a];if(!(o==="_owner"&&e.$$typeof)&&!dp(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function kO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function G2(e,t){const n=kO(e);return Math.round(t*n)/n}function C0(e){const t=C.useRef(e);return zf(()=>{t.current=e}),t}function Vz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:s,elements:{reference:o,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=C.useState(a);dp(g,a)||y(a);const[w,S]=C.useState(null),[b,v]=C.useState(null),_=C.useCallback(K=>{K!==k.current&&(k.current=K,S(K))},[]),E=C.useCallback(K=>{K!==L.current&&(L.current=K,v(K))},[]),T=o||w,N=u||b,k=C.useRef(null),L=C.useRef(null),R=C.useRef(p),j=d!=null,M=C0(d),B=C0(s),H=C0(h),P=C.useCallback(()=>{if(!k.current||!L.current)return;const K={placement:t,strategy:n,middleware:g};B.current&&(K.platform=B.current),Gz(k.current,L.current,K).then(F=>{const O={...F,isPositioned:H.current!==!1};$.current&&!dp(R.current,O)&&(R.current=O,Xl.flushSync(()=>{m(O)}))})},[g,t,n,B,H]);zf(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(K=>({...K,isPositioned:!1})))},[h]);const $=C.useRef(!1);zf(()=>($.current=!0,()=>{$.current=!1}),[]),zf(()=>{if(T&&(k.current=T),N&&(L.current=N),T&&N){if(M.current)return M.current(T,N,P);P()}},[T,N,P,M,j]);const ee=C.useMemo(()=>({reference:k,floating:L,setReference:_,setFloating:E}),[_,E]),U=C.useMemo(()=>({reference:T,floating:N}),[T,N]),q=C.useMemo(()=>{const K={position:n,left:0,top:0};if(!U.floating)return K;const F=G2(U.floating,p.x),O=G2(U.floating,p.y);return c?{...K,transform:"translate("+F+"px, "+O+"px)",...kO(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:O}},[n,c,U.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:P,refs:ee,elements:U,floatingStyles:q}),[p,P,ee,U,q])}const Yz=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:s}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?z2({element:a.current,padding:s}).fn(n):{}:a?z2({element:a,padding:s}).fn(n):{}}}},Kz=(e,t)=>({...Pz(e),options:[e,t]}),Xz=(e,t)=>({...Bz(e),options:[e,t]}),Zz=(e,t)=>({...zz(e),options:[e,t]}),Qz=(e,t)=>({...Uz(e),options:[e,t]}),Jz=(e,t)=>({...Hz(e),options:[e,t]}),eG=(e,t)=>({...$z(e),options:[e,t]}),tG=(e,t)=>({...Yz(e),options:[e,t]});var nG="Arrow",RO=C.forwardRef((e,t)=>{const{children:n,width:a=10,height:s=5,...o}=e;return r.jsx(lt.svg,{...o,ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});RO.displayName=nG;var rG=RO;function lv(e){const[t,n]=C.useState(void 0);return nr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let u,c;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,c=h.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var cv="Popper",[DO,sc]=kr(cv),[aG,IO]=DO(cv),OO=e=>{const{__scopePopper:t,children:n}=e,[a,s]=C.useState(null);return r.jsx(aG,{scope:t,anchor:a,onAnchorChange:s,children:n})};OO.displayName=cv;var LO="PopperAnchor",jO=C.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...s}=e,o=IO(LO,n),u=C.useRef(null),c=Et(t,u),d=C.useRef(null);return C.useEffect(()=>{const h=d.current;d.current=a?.current||u.current,h!==d.current&&o.onAnchorChange(d.current)}),a?null:r.jsx(lt.div,{...s,ref:c})});jO.displayName=LO;var uv="PopperContent",[sG,iG]=DO(uv),MO=C.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:s=0,align:o="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,b=IO(uv,n),[v,_]=C.useState(null),E=Et(t,X=>_(X)),[T,N]=C.useState(null),k=lv(T),L=k?.width??0,R=k?.height??0,j=a+(o!=="center"?"-"+o:""),M=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},B=Array.isArray(h)?h:[h],H=B.length>0,P={padding:M,boundary:B.filter(lG),altBoundary:H},{refs:$,floatingStyles:ee,placement:U,isPositioned:q,middlewareData:K}=Vz({strategy:"fixed",placement:j,whileElementsMounted:(...X)=>Fz(...X,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[Kz({mainAxis:s+R,alignmentAxis:u}),d&&Xz({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Zz():void 0,...P}),d&&Qz({...P}),Jz({...P,apply:({elements:X,rects:G,availableWidth:ie,availableHeight:de})=>{const{width:ce,height:fe}=G.reference,Ue=X.floating.style;Ue.setProperty("--radix-popper-available-width",`${ie}px`),Ue.setProperty("--radix-popper-available-height",`${de}px`),Ue.setProperty("--radix-popper-anchor-width",`${ce}px`),Ue.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),T&&tG({element:T,padding:c}),cG({arrowWidth:L,arrowHeight:R}),g&&eG({strategy:"referenceHidden",...P})]}),[F,O]=BO(U),Y=kn(w);nr(()=>{q&&Y?.()},[q,Y]);const J=K.arrow?.x,W=K.arrow?.y,V=K.arrow?.centerOffset!==0,[re,te]=C.useState();return nr(()=>{v&&te(window.getComputedStyle(v).zIndex)},[v]),r.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:q?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[K.transformOrigin?.x,K.transformOrigin?.y].join(" "),...K.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(sG,{scope:n,placedSide:F,onArrowChange:N,arrowX:J,arrowY:W,shouldHideArrow:V,children:r.jsx(lt.div,{"data-side":F,"data-align":O,...S,ref:E,style:{...S.style,animation:q?void 0:"none"}})})})});MO.displayName=uv;var FO="PopperArrow",oG={top:"bottom",right:"left",bottom:"top",left:"right"},PO=C.forwardRef(function(t,n){const{__scopePopper:a,...s}=t,o=iG(FO,a),u=oG[o.placedSide];return r.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:r.jsx(rG,{...s,ref:n,style:{...s.style,display:"block"}})})});PO.displayName=FO;function lG(e){return e!==null}var cG=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:s}=t,u=s.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,p]=BO(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(s.arrow?.x??0)+c/2,y=(s.arrow?.y??0)+d/2;let w="",S="";return h==="bottom"?(w=u?m:`${g}px`,S=`${-d}px`):h==="top"?(w=u?m:`${g}px`,S=`${a.floating.height+d}px`):h==="right"?(w=`${-d}px`,S=u?m:`${y}px`):h==="left"&&(w=`${a.floating.width+d}px`,S=u?m:`${y}px`),{data:{x:w,y:S}}}});function BO(e){const[t,n="center"]=e.split("-");return[t,n]}var dv=OO,hv=jO,fv=MO,pv=PO,[tm,Que]=kr("Tooltip",[sc]),nm=sc(),UO="TooltipProvider",uG=700,Dx="tooltip.open",[dG,mv]=tm(UO),HO=e=>{const{__scopeTooltip:t,delayDuration:n=uG,skipDelayDuration:a=300,disableHoverableContent:s=!1,children:o}=e,u=C.useRef(!0),c=C.useRef(!1),d=C.useRef(0);return C.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),r.jsx(dG,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:C.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:C.useCallback(h=>{c.current=h},[]),disableHoverableContent:s,children:o})};HO.displayName=UO;var td="Tooltip",[hG,rm]=tm(td),$O=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:s,onOpenChange:o,disableHoverableContent:u,delayDuration:c}=e,d=mv(td,e.__scopeTooltip),h=nm(t),[p,m]=C.useState(null),g=Na(),y=C.useRef(0),w=u??d.disableHoverableContent,S=c??d.delayDuration,b=C.useRef(!1),[v,_]=Xa({prop:a,defaultProp:s??!1,onChange:L=>{L?(d.onOpen(),document.dispatchEvent(new CustomEvent(Dx))):d.onClose(),o?.(L)},caller:td}),E=C.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),T=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,b.current=!1,_(!0)},[_]),N=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),k=C.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,_(!0),y.current=0},S)},[S,_]);return C.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),r.jsx(dv,{...h,children:r.jsx(hG,{scope:t,contentId:g,open:v,stateAttribute:E,trigger:p,onTriggerChange:m,onTriggerEnter:C.useCallback(()=>{d.isOpenDelayedRef.current?k():T()},[d.isOpenDelayedRef,k,T]),onTriggerLeave:C.useCallback(()=>{w?N():(window.clearTimeout(y.current),y.current=0)},[N,w]),onOpen:T,onClose:N,disableHoverableContent:w,children:n})})};$O.displayName=td;var Ix="TooltipTrigger",zO=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=rm(Ix,n),o=mv(Ix,n),u=nm(n),c=C.useRef(null),d=Et(t,c,s.onTriggerChange),h=C.useRef(!1),p=C.useRef(!1),m=C.useCallback(()=>h.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),r.jsx(hv,{asChild:!0,...u,children:r.jsx(lt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:d,onPointerMove:We(e.onPointerMove,g=>{g.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:We(e.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:We(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:We(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:We(e.onBlur,s.onClose),onClick:We(e.onClick,s.onClose)})})});zO.displayName=Ix;var fG="TooltipPortal",[Jue,pG]=tm(fG,{forceMount:void 0}),Ul="TooltipContent",GO=C.forwardRef((e,t)=>{const n=pG(Ul,e.__scopeTooltip),{forceMount:a=n.forceMount,side:s="top",...o}=e,u=rm(Ul,e.__scopeTooltip);return r.jsx(ur,{present:a||u.open,children:u.disableHoverableContent?r.jsx(qO,{side:s,...o,ref:t}):r.jsx(mG,{side:s,...o,ref:t})})}),mG=C.forwardRef((e,t)=>{const n=rm(Ul,e.__scopeTooltip),a=mv(Ul,e.__scopeTooltip),s=C.useRef(null),o=Et(t,s),[u,c]=C.useState(null),{trigger:d,onClose:h}=n,p=s.current,{onPointerInTransitChange:m}=a,g=C.useCallback(()=>{c(null),m(!1)},[m]),y=C.useCallback((w,S)=>{const b=w.currentTarget,v={x:w.clientX,y:w.clientY},_=vG(v,b.getBoundingClientRect()),E=EG(v,_),T=_G(S.getBoundingClientRect()),N=wG([...E,...T]);c(N),m(!0)},[m]);return C.useEffect(()=>()=>g(),[g]),C.useEffect(()=>{if(d&&p){const w=b=>y(b,p),S=b=>y(b,d);return d.addEventListener("pointerleave",w),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",S)}}},[d,p,y,g]),C.useEffect(()=>{if(u){const w=S=>{const b=S.target,v={x:S.clientX,y:S.clientY},_=d?.contains(b)||p?.contains(b),E=!SG(v,u);_?g():E&&(g(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,p,u,h,g]),r.jsx(qO,{...e,ref:o})}),[gG,bG]=tm(td,{isInside:!1}),xG=BD("TooltipContent"),qO=C.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:u,...c}=e,d=rm(Ul,n),h=nm(n),{onClose:p}=d;return C.useEffect(()=>(document.addEventListener(Dx,p),()=>document.removeEventListener(Dx,p)),[p]),C.useEffect(()=>{if(d.trigger){const m=g=>{g.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),r.jsx(Jl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:r.jsxs(fv,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[r.jsx(xG,{children:a}),r.jsx(gG,{scope:n,isInside:!0,children:r.jsx(f7,{id:d.contentId,role:"tooltip",children:s||a})})]})})});GO.displayName=Ul;var WO="TooltipArrow",yG=C.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=nm(n);return bG(WO,n).isInside?null:r.jsx(pv,{...s,...a,ref:t})});yG.displayName=WO;function vG(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,a,s,o)){case o:return"left";case s:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function EG(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function _G(e){const{top:t,right:n,bottom:a,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:a},{x:s,y:a}]}function SG(e,t){const{x:n,y:a}=e;let s=!1;for(let o=0,u=t.length-1;o<t.length;u=o++){const c=t[o],d=t[u],h=c.x,p=c.y,m=d.x,g=d.y;p>a!=g>a&&n<(m-h)*(a-p)/(g-p)+h&&(s=!s)}return s}function wG(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),CG(t)}function CG(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const s=e[a];for(;t.length>=2;){const o=t[t.length-1],u=t[t.length-2];if((o.x-u.x)*(s.y-u.y)>=(o.y-u.y)*(s.x-u.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const s=e[a];for(;n.length>=2;){const o=n[n.length-1],u=n[n.length-2];if((o.x-u.x)*(s.y-u.y)>=(o.y-u.y)*(s.x-u.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var TG=HO,AG=$O,NG=zO,VO=GO;const kG=TG,RG=AG,DG=NG,YO=C.forwardRef(({className:e,sideOffset:t=4,...n},a)=>r.jsx(VO,{ref:a,sideOffset:t,className:Te("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));YO.displayName=VO.displayName;const IG="sidebar_state",OG=3600*24*7,LG="16rem",jG="18rem",MG="3rem",FG="b",KO=C.createContext(null);function am(){const e=C.useContext(KO);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const XO=C.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:a,style:s,children:o,...u},c)=>{const d=UI(),[h,p]=C.useState(!1),[m,g]=C.useState(e),y=t??m,w=C.useCallback(_=>{const E=typeof _=="function"?_(y):_;n?n(E):g(E),document.cookie=`${IG}=${E}; path=/; max-age=${OG}`},[n,y]),S=C.useCallback(()=>d?p(_=>!_):w(_=>!_),[d,w,p]);C.useEffect(()=>{const _=E=>{E.key===FG&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),S())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[S]);const b=y?"expanded":"collapsed",v=C.useMemo(()=>({state:b,open:y,setOpen:w,isMobile:d,openMobile:h,setOpenMobile:p,toggleSidebar:S}),[b,y,w,d,h,p,S]);return r.jsx(KO.Provider,{value:v,children:r.jsx(kG,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":LG,"--sidebar-width-icon":MG,...s},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",a),ref:c,...u,children:o})})})});XO.displayName="SidebarProvider";const ZO=C.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:a,children:s,...o},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:p}=am();return n==="none"?r.jsx("div",{className:Te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",a),ref:u,...o,children:s}):c?r.jsx(gO,{open:h,onOpenChange:p,...o,children:r.jsxs(Qy,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":jG},side:e,children:[r.jsxs(Jy,{className:"sr-only",children:[r.jsx(ev,{children:"Sidebar"}),r.jsx(xO,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):r.jsxs("div",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,children:[r.jsx("div",{className:Te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r.jsx("div",{className:Te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...o,children:r.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});ZO.displayName="Sidebar";const QO=C.forwardRef(({className:e,onClick:t,...n},a)=>{const{toggleSidebar:s}=am();return r.jsxs(ae,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Te("h-7 w-7",e),onClick:o=>{t?.(o),s()},...n,children:[r.jsx(p9,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});QO.displayName="SidebarTrigger";const PG=C.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:a}=am();return r.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:Te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});PG.displayName="SidebarRail";const JO=C.forwardRef(({className:e,...t},n)=>r.jsx("main",{ref:n,className:Te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));JO.displayName="SidebarInset";const BG=C.forwardRef(({className:e,...t},n)=>r.jsx(Le,{ref:n,"data-sidebar":"input",className:Te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));BG.displayName="SidebarInput";const e3=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"header",className:Te("flex flex-col gap-2 p-2",e),...t}));e3.displayName="SidebarHeader";const t3=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t}));t3.displayName="SidebarFooter";const UG=C.forwardRef(({className:e,...t},n)=>r.jsx(xr,{ref:n,"data-sidebar":"separator",className:Te("mx-2 w-auto bg-sidebar-border",e),...t}));UG.displayName="SidebarSeparator";const n3=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"content",className:Te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));n3.displayName="SidebarContent";const Gf=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col p-2",e),...t}));Gf.displayName="SidebarGroup";const qf=C.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const s=t?Ql:"div";return r.jsx(s,{ref:a,"data-sidebar":"group-label",className:Te("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring 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",e),...n})});qf.displayName="SidebarGroupLabel";const HG=C.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const s=t?Ql:"button";return r.jsx(s,{ref:a,"data-sidebar":"group-action",className:Te("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});HG.displayName="SidebarGroupAction";const Wf=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group-content",className:Te("w-full text-sm",e),...t}));Wf.displayName="SidebarGroupContent";const Sl=C.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-1",e),...t}));Sl.displayName="SidebarMenu";const wl=C.forwardRef(({className:e,...t},n)=>r.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t}));wl.displayName="SidebarMenuItem";const $G=ec("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>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 shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(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"}}),Cl=C.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:a="default",tooltip:s,className:o,...u},c)=>{const d=e?Ql:"button",{isMobile:h,state:p}=am(),m=r.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:Te($G({variant:n,size:a}),o),...u});return s?(typeof s=="string"&&(s={children:s}),r.jsxs(RG,{children:[r.jsx(DG,{asChild:!0,children:m}),r.jsx(YO,{side:"right",align:"center",hidden:p!=="collapsed"||h,...s})]})):m});Cl.displayName="SidebarMenuButton";const zG=C.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...a},s)=>{const o=t?Ql:"button";return r.jsx(o,{ref:s,"data-sidebar":"menu-action",className:Te("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...a})});zG.displayName="SidebarMenuAction";const Ox=C.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Te("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Ox.displayName="SidebarMenuBadge";const GG=C.forwardRef(({className:e,showIcon:t=!1,...n},a)=>{const s=C.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:Te("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&r.jsx(L2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(L2,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});GG.displayName="SidebarMenuSkeleton";const qG=C.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Te("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));qG.displayName="SidebarMenuSub";const WG=C.forwardRef(({...e},t)=>r.jsx("li",{ref:t,...e}));WG.displayName="SidebarMenuSubItem";const VG=C.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:a,...s},o)=>{const u=e?Ql:"a";return r.jsx(u,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Te("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",a),...s})});VG.displayName="SidebarMenuSubButton";const YG="1.0.69-alpha.1",KG={version:YG};function XG({className:e}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[r.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),r.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),r.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),r.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const ZG=[{title:"Home",url:"/",icon:zU},{title:"Proposals",url:"/proposals",icon:Fu},{title:"Agents",url:"/agents",icon:Jr},{title:"Code",url:"/code",icon:hi},{title:"Utilities",url:"/utilities",icon:SI}],QG=[{title:"Overview",url:"/context/project",icon:ga},{title:"Architecture",url:"/context/architecture",icon:Qu},{title:"Knowledge",url:"/context/knowledge",icon:X7},{title:"Resources",url:"/resources",icon:qp}],JG=[{title:"Source Control",url:"/git",icon:di},{title:"Terminal",url:"/terminal",icon:Cs},{title:"Schedule",url:"/schedule",icon:hI},{title:"Identity",url:"/identity",icon:qU}],eq=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:h9,external:!0},{title:"Settings",url:"/settings",icon:Pl}];function tq(){const{badges:e}=yd();return r.jsxs(ZO,{className:"bg-sidebar border-r border-sidebar-border",children:[r.jsx(e3,{children:r.jsx(Sl,{children:r.jsx(wl,{children:r.jsx(Cl,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:r.jsxs(nt,{to:"/",children:[r.jsx(XG,{className:"size-8"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsxs("span",{className:"font-semibold",children:[r.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),r.jsx("span",{children:" Studio"})]}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",KG.version]})]})]})})})})}),r.jsxs(n3,{children:[r.jsxs(Gf,{children:[r.jsx(qf,{children:"Main"}),r.jsx(Wf,{children:r.jsx(Sl,{children:ZG.map(t=>r.jsxs(wl,{children:[r.jsx(Cl,{asChild:!0,children:r.jsxs(nt,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),t.title==="Code"&&e.codeSessions>0&&r.jsx(Ox,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},t.title))})})]}),r.jsxs(Gf,{children:[r.jsx(qf,{children:"Project"}),r.jsx(Wf,{children:r.jsx(Sl,{children:QG.map(t=>r.jsx(wl,{children:r.jsx(Cl,{asChild:!0,children:r.jsxs(nt,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]}),r.jsxs(Gf,{children:[r.jsx(qf,{children:"System"}),r.jsx(Wf,{children:r.jsx(Sl,{children:JG.map(t=>{let n=0;return t.title==="Source Control"&&e.gitChanges>0?n=e.gitChanges:t.title==="Terminal"&&e.terminalSessions>0?n=e.terminalSessions:t.title==="Schedule"&&e.runningScheduledJobs>0&&(n=e.runningScheduledJobs),r.jsxs(wl,{children:[r.jsx(Cl,{asChild:!0,children:r.jsxs(nt,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),n>0&&r.jsx(Ox,{className:"bg-blue-600 text-white dark:bg-blue-500",children:n})]},t.title)})})})]})]}),r.jsx(t3,{children:r.jsx(Sl,{children:eq.map(t=>r.jsx(wl,{children:r.jsx(Cl,{asChild:!0,children:t.external?r.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]}):r.jsxs(nt,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]})}function Lx(e,[t,n]){return Math.min(n,Math.max(t,e))}var nq=C.createContext(void 0);function ic(e){const t=C.useContext(nq);return e||t||"ltr"}function gv(e){const t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rq=[" ","Enter","ArrowUp","ArrowDown"],aq=[" ","Enter"],po="Select",[sm,im,sq]=Up(po),[oc,ede]=kr(po,[sq,sc]),om=sc(),[iq,Ci]=oc(po),[oq,lq]=oc(po),r3=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:s,onOpenChange:o,value:u,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:g,required:y,form:w}=e,S=om(t),[b,v]=C.useState(null),[_,E]=C.useState(null),[T,N]=C.useState(!1),k=ic(h),[L,R]=Xa({prop:a,defaultProp:s??!1,onChange:o,caller:po}),[j,M]=Xa({prop:u,defaultProp:c,onChange:d,caller:po}),B=C.useRef(null),H=b?w||!!b.closest("form"):!0,[P,$]=C.useState(new Set),ee=Array.from(P).map(U=>U.props.value).join(";");return r.jsx(dv,{...S,children:r.jsxs(iq,{required:y,scope:t,trigger:b,onTriggerChange:v,valueNode:_,onValueNodeChange:E,valueNodeHasChildren:T,onValueNodeHasChildrenChange:N,contentId:Na(),value:j,onValueChange:M,open:L,onOpenChange:R,dir:k,triggerPointerDownPosRef:B,disabled:g,children:[r.jsx(sm.Provider,{scope:t,children:r.jsx(oq,{scope:e.__scopeSelect,onNativeOptionAdd:C.useCallback(U=>{$(q=>new Set(q).add(U))},[]),onNativeOptionRemove:C.useCallback(U=>{$(q=>{const K=new Set(q);return K.delete(U),K})},[]),children:n})}),H?r.jsxs(A3,{"aria-hidden":!0,required:y,tabIndex:-1,name:p,autoComplete:m,value:j,onChange:U=>M(U.target.value),disabled:g,form:w,children:[j===void 0?r.jsx("option",{value:""}):null,Array.from(P)]},ee):null]})})};r3.displayName=po;var a3="SelectTrigger",s3=C.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...s}=e,o=om(n),u=Ci(a3,n),c=u.disabled||a,d=Et(t,u.onTriggerChange),h=im(n),p=C.useRef("touch"),[m,g,y]=k3(S=>{const b=h().filter(E=>!E.disabled),v=b.find(E=>E.value===u.value),_=R3(b,S,v);_!==void 0&&u.onValueChange(_.value)}),w=S=>{c||(u.onOpenChange(!0),y()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(hv,{asChild:!0,...o,children:r.jsx(lt.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":N3(u.value)?"":void 0,...s,ref:d,onClick:We(s.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&w(S)}),onPointerDown:We(s.onPointerDown,S=>{p.current=S.pointerType;const b=S.target;b.hasPointerCapture(S.pointerId)&&b.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:We(s.onKeyDown,S=>{const b=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(b&&S.key===" ")&&rq.includes(S.key)&&(w(),S.preventDefault())})})})});s3.displayName=a3;var i3="SelectValue",o3=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,children:o,placeholder:u="",...c}=e,d=Ci(i3,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=Et(t,d.onValueNodeChange);return nr(()=>{h(p)},[h,p]),r.jsx(lt.span,{...c,ref:m,style:{pointerEvents:"none"},children:N3(d.value)?r.jsx(r.Fragment,{children:u}):o})});o3.displayName=i3;var cq="SelectIcon",l3=C.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...s}=e;return r.jsx(lt.span,{"aria-hidden":!0,...s,ref:t,children:a||"▼"})});l3.displayName=cq;var uq="SelectPortal",c3=e=>r.jsx(vd,{asChild:!0,...e});c3.displayName=uq;var mo="SelectContent",u3=C.forwardRef((e,t)=>{const n=Ci(mo,e.__scopeSelect),[a,s]=C.useState();if(nr(()=>{s(new DocumentFragment)},[]),!n.open){const o=a;return o?Xl.createPortal(r.jsx(d3,{scope:e.__scopeSelect,children:r.jsx(sm.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),o):null}return r.jsx(h3,{...e,ref:t})});u3.displayName=mo;var wa=10,[d3,Ti]=oc(mo),dq="SelectContentImpl",hq=uo("SelectContent.RemoveScroll"),h3=C.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:b,...v}=e,_=Ci(mo,n),[E,T]=C.useState(null),[N,k]=C.useState(null),L=Et(t,X=>T(X)),[R,j]=C.useState(null),[M,B]=C.useState(null),H=im(n),[P,$]=C.useState(!1),ee=C.useRef(!1);C.useEffect(()=>{if(E)return Wy(E)},[E]),qy();const U=C.useCallback(X=>{const[G,...ie]=H().map(fe=>fe.ref.current),[de]=ie.slice(-1),ce=document.activeElement;for(const fe of X)if(fe===ce||(fe?.scrollIntoView({block:"nearest"}),fe===G&&N&&(N.scrollTop=0),fe===de&&N&&(N.scrollTop=N.scrollHeight),fe?.focus(),document.activeElement!==ce))return},[H,N]),q=C.useCallback(()=>U([R,E]),[U,R,E]);C.useEffect(()=>{P&&q()},[P,q]);const{onOpenChange:K,triggerPointerDownPosRef:F}=_;C.useEffect(()=>{if(E){let X={x:0,y:0};const G=de=>{X={x:Math.abs(Math.round(de.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(de.pageY)-(F.current?.y??0))}},ie=de=>{X.x<=10&&X.y<=10?de.preventDefault():E.contains(de.target)||K(!1),document.removeEventListener("pointermove",G),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",ie,{capture:!0})}}},[E,K,F]),C.useEffect(()=>{const X=()=>K(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[K]);const[O,Y]=k3(X=>{const G=H().filter(ce=>!ce.disabled),ie=G.find(ce=>ce.ref.current===document.activeElement),de=R3(G,X,ie);de&&setTimeout(()=>de.ref.current.focus())}),J=C.useCallback((X,G,ie)=>{const de=!ee.current&&!ie;(_.value!==void 0&&_.value===G||de)&&(j(X),de&&(ee.current=!0))},[_.value]),W=C.useCallback(()=>E?.focus(),[E]),V=C.useCallback((X,G,ie)=>{const de=!ee.current&&!ie;(_.value!==void 0&&_.value===G||de)&&B(X)},[_.value]),re=a==="popper"?jx:f3,te=re===jx?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:y,sticky:w,hideWhenDetached:S,avoidCollisions:b}:{};return r.jsx(d3,{scope:n,content:E,viewport:N,onViewportChange:k,itemRefCallback:J,selectedItem:R,onItemLeave:W,itemTextRefCallback:V,focusSelectedItem:q,selectedItemText:M,position:a,isPositioned:P,searchRef:O,children:r.jsx(Kp,{as:hq,allowPinchZoom:!0,children:r.jsx(Vp,{asChild:!0,trapped:_.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:We(s,X=>{_.trigger?.focus({preventScroll:!0}),X.preventDefault()}),children:r.jsx(Jl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:r.jsx(re,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:X=>X.preventDefault(),...v,...te,onPlaced:()=>$(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:We(v.onKeyDown,X=>{const G=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!G&&X.key.length===1&&Y(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let de=H().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(X.key)&&(de=de.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const ce=X.target,fe=de.indexOf(ce);de=de.slice(fe+1)}setTimeout(()=>U(de)),X.preventDefault()}})})})})})})});h3.displayName=dq;var fq="SelectItemAlignedPosition",f3=C.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...s}=e,o=Ci(mo,n),u=Ti(mo,n),[c,d]=C.useState(null),[h,p]=C.useState(null),m=Et(t,L=>p(L)),g=im(n),y=C.useRef(!1),w=C.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:v,focusSelectedItem:_}=u,E=C.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&b&&v){const L=o.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),j=o.valueNode.getBoundingClientRect(),M=v.getBoundingClientRect();if(o.dir!=="rtl"){const ce=M.left-R.left,fe=j.left-ce,Ue=L.left-fe,De=L.width+Ue,et=Math.max(De,R.width),it=window.innerWidth-wa,Oe=Lx(fe,[wa,Math.max(wa,it-et)]);c.style.minWidth=De+"px",c.style.left=Oe+"px"}else{const ce=R.right-M.right,fe=window.innerWidth-j.right-ce,Ue=window.innerWidth-L.right-fe,De=L.width+Ue,et=Math.max(De,R.width),it=window.innerWidth-wa,Oe=Lx(fe,[wa,Math.max(wa,it-et)]);c.style.minWidth=De+"px",c.style.right=Oe+"px"}const B=g(),H=window.innerHeight-wa*2,P=S.scrollHeight,$=window.getComputedStyle(h),ee=parseInt($.borderTopWidth,10),U=parseInt($.paddingTop,10),q=parseInt($.borderBottomWidth,10),K=parseInt($.paddingBottom,10),F=ee+U+P+K+q,O=Math.min(b.offsetHeight*5,F),Y=window.getComputedStyle(S),J=parseInt(Y.paddingTop,10),W=parseInt(Y.paddingBottom,10),V=L.top+L.height/2-wa,re=H-V,te=b.offsetHeight/2,X=b.offsetTop+te,G=ee+U+X,ie=F-G;if(G<=V){const ce=B.length>0&&b===B[B.length-1].ref.current;c.style.bottom="0px";const fe=h.clientHeight-S.offsetTop-S.offsetHeight,Ue=Math.max(re,te+(ce?W:0)+fe+q),De=G+Ue;c.style.height=De+"px"}else{const ce=B.length>0&&b===B[0].ref.current;c.style.top="0px";const Ue=Math.max(V,ee+S.offsetTop+(ce?J:0)+te)+ie;c.style.height=Ue+"px",S.scrollTop=G-V+S.offsetTop}c.style.margin=`${wa}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=H+"px",a?.(),requestAnimationFrame(()=>y.current=!0)}},[g,o.trigger,o.valueNode,c,h,S,b,v,o.dir,a]);nr(()=>E(),[E]);const[T,N]=C.useState();nr(()=>{h&&N(window.getComputedStyle(h).zIndex)},[h]);const k=C.useCallback(L=>{L&&w.current===!0&&(E(),_?.(),w.current=!1)},[E,_]);return r.jsx(mq,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:k,children:r.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:r.jsx(lt.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});f3.displayName=fq;var pq="SelectPopperPosition",jx=C.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:s=wa,...o}=e,u=om(n);return r.jsx(fv,{...u,...o,ref:t,align:a,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});jx.displayName=pq;var[mq,bv]=oc(mo,{}),Mx="SelectViewport",p3=C.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...s}=e,o=Ti(Mx,n),u=bv(Mx,n),c=Et(t,o.onViewportChange),d=C.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),r.jsx(sm.Slot,{scope:n,children:r.jsx(lt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:We(s.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=u;if(g?.current&&m){const y=Math.abs(d.current-p.scrollTop);if(y>0){const w=window.innerHeight-wa*2,S=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),v=Math.max(S,b);if(v<w){const _=v+y,E=Math.min(w,_),T=_-E;m.style.height=E+"px",m.style.bottom==="0px"&&(p.scrollTop=T>0?T:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});p3.displayName=Mx;var m3="SelectGroup",[gq,bq]=oc(m3),xq=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=Na();return r.jsx(gq,{scope:n,id:s,children:r.jsx(lt.div,{role:"group","aria-labelledby":s,...a,ref:t})})});xq.displayName=m3;var g3="SelectLabel",b3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=bq(g3,n);return r.jsx(lt.div,{id:s.id,...a,ref:t})});b3.displayName=g3;var hp="SelectItem",[yq,x3]=oc(hp),y3=C.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:s=!1,textValue:o,...u}=e,c=Ci(hp,n),d=Ti(hp,n),h=c.value===a,[p,m]=C.useState(o??""),[g,y]=C.useState(!1),w=Et(t,_=>d.itemRefCallback?.(_,a,s)),S=Na(),b=C.useRef("touch"),v=()=>{s||(c.onValueChange(a),c.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(yq,{scope:n,value:a,disabled:s,textId:S,isSelected:h,onItemTextChange:C.useCallback(_=>{m(E=>E||(_?.textContent??"").trim())},[]),children:r.jsx(sm.ItemSlot,{scope:n,value:a,disabled:s,textValue:p,children:r.jsx(lt.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":h&&g,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...u,ref:w,onFocus:We(u.onFocus,()=>y(!0)),onBlur:We(u.onBlur,()=>y(!1)),onClick:We(u.onClick,()=>{b.current!=="mouse"&&v()}),onPointerUp:We(u.onPointerUp,()=>{b.current==="mouse"&&v()}),onPointerDown:We(u.onPointerDown,_=>{b.current=_.pointerType}),onPointerMove:We(u.onPointerMove,_=>{b.current=_.pointerType,s?d.onItemLeave?.():b.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:We(u.onPointerLeave,_=>{_.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:We(u.onKeyDown,_=>{d.searchRef?.current!==""&&_.key===" "||(aq.includes(_.key)&&v(),_.key===" "&&_.preventDefault())})})})})});y3.displayName=hp;var Du="SelectItemText",v3=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,...o}=e,u=Ci(Du,n),c=Ti(Du,n),d=x3(Du,n),h=lq(Du,n),[p,m]=C.useState(null),g=Et(t,v=>m(v),d.onItemTextChange,v=>c.itemTextRefCallback?.(v,d.value,d.disabled)),y=p?.textContent,w=C.useMemo(()=>r.jsx("option",{value:d.value,disabled:d.disabled,children:y},d.value),[d.disabled,d.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=h;return nr(()=>(S(w),()=>b(w)),[S,b,w]),r.jsxs(r.Fragment,{children:[r.jsx(lt.span,{id:d.textId,...o,ref:g}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Xl.createPortal(o.children,u.valueNode):null]})});v3.displayName=Du;var E3="SelectItemIndicator",_3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return x3(E3,n).isSelected?r.jsx(lt.span,{"aria-hidden":!0,...a,ref:t}):null});_3.displayName=E3;var Fx="SelectScrollUpButton",S3=C.forwardRef((e,t)=>{const n=Ti(Fx,e.__scopeSelect),a=bv(Fx,e.__scopeSelect),[s,o]=C.useState(!1),u=Et(t,a.onScrollButtonChange);return nr(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?r.jsx(C3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});S3.displayName=Fx;var Px="SelectScrollDownButton",w3=C.forwardRef((e,t)=>{const n=Ti(Px,e.__scopeSelect),a=bv(Px,e.__scopeSelect),[s,o]=C.useState(!1),u=Et(t,a.onScrollButtonChange);return nr(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;o(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?r.jsx(C3,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});w3.displayName=Px;var C3=C.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...s}=e,o=Ti("SelectScrollButton",n),u=C.useRef(null),c=im(n),d=C.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return C.useEffect(()=>()=>d(),[d]),nr(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),r.jsx(lt.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:We(s.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(a,50))}),onPointerMove:We(s.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(a,50))}),onPointerLeave:We(s.onPointerLeave,()=>{d()})})}),vq="SelectSeparator",T3=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return r.jsx(lt.div,{"aria-hidden":!0,...a,ref:t})});T3.displayName=vq;var Bx="SelectArrow",Eq=C.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=om(n),o=Ci(Bx,n),u=Ti(Bx,n);return o.open&&u.position==="popper"?r.jsx(pv,{...s,...a,ref:t}):null});Eq.displayName=Bx;var _q="SelectBubbleInput",A3=C.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const s=C.useRef(null),o=Et(a,s),u=gv(t);return C.useEffect(()=>{const c=s.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&p){const m=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(m)}},[u,t]),r.jsx(lt.select,{...n,style:{...zD,...n.style},ref:o,defaultValue:t})});A3.displayName=_q;function N3(e){return e===""||e===void 0}function k3(e){const t=kn(e),n=C.useRef(""),a=C.useRef(0),s=C.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(a.current),h!==""&&(a.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=C.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,s,o]}function R3(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let u=Sq(e,Math.max(o,0));s.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function Sq(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var wq=r3,D3=s3,Cq=o3,Tq=l3,Aq=c3,I3=u3,Nq=p3,O3=b3,L3=y3,kq=v3,Rq=_3,j3=S3,M3=w3,F3=T3;const en=wq,tn=Cq,Xt=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(D3,{ref:a,className:Te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(Tq,{asChild:!0,children:r.jsx(pi,{className:"h-4 w-4 opacity-50"})})]}));Xt.displayName=D3.displayName;const P3=C.forwardRef(({className:e,...t},n)=>r.jsx(j3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Fy,{className:"h-4 w-4"})}));P3.displayName=j3.displayName;const B3=C.forwardRef(({className:e,...t},n)=>r.jsx(M3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(pi,{className:"h-4 w-4"})}));B3.displayName=M3.displayName;const Zt=C.forwardRef(({className:e,children:t,position:n="popper",...a},s)=>r.jsx(Aq,{children:r.jsxs(I3,{ref:s,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...a,children:[r.jsx(P3,{}),r.jsx(Nq,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(B3,{})]})}));Zt.displayName=I3.displayName;const Dq=C.forwardRef(({className:e,...t},n)=>r.jsx(O3,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));Dq.displayName=O3.displayName;const je=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(L3,{ref:a,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(Rq,{children:r.jsx(xo,{className:"h-4 w-4"})})}),r.jsx(kq,{children:t})]}));je.displayName=L3.displayName;const Iq=C.forwardRef(({className:e,...t},n)=>r.jsx(F3,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));Iq.displayName=F3.displayName;const $n=Xy,fp=mO,Oq=Zy,U3=C.forwardRef(({className:e,...t},n)=>r.jsx(_d,{ref:n,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));U3.displayName=_d.displayName;const Dn=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(Oq,{children:[r.jsx(U3,{}),r.jsxs(Sd,{ref:a,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,r.jsxs(Zp,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(Cr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Dn.displayName=Sd.displayName;const Cn=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Cn.displayName="DialogHeader";const Tr=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Tr.displayName="DialogFooter";const Tn=C.forwardRef(({className:e,...t},n)=>r.jsx(wd,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));Tn.displayName=wd.displayName;const Hn=C.forwardRef(({className:e,...t},n)=>r.jsx(Cd,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Hn.displayName=Cd.displayName;var lm="Checkbox",[Lq,tde]=kr(lm),[jq,xv]=Lq(lm);function Mq(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:s,disabled:o,form:u,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[g,y]=Xa({prop:n,defaultProp:s??!1,onChange:d,caller:lm}),[w,S]=C.useState(null),[b,v]=C.useState(null),_=C.useRef(!1),E=w?!!u||!!w.closest("form"):!0,T={checked:g,disabled:o,setChecked:y,control:w,setControl:S,name:c,form:u,value:p,hasConsumerStoppedPropagationRef:_,required:h,defaultChecked:bi(s)?!1:s,isFormControl:E,bubbleInput:b,setBubbleInput:v};return r.jsx(jq,{scope:t,...T,children:Fq(m)?m(T):a})}var H3="CheckboxTrigger",$3=C.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},s)=>{const{control:o,value:u,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:w}=xv(H3,e),S=Et(s,p),b=C.useRef(d);return C.useEffect(()=>{const v=o?.form;if(v){const _=()=>m(b.current);return v.addEventListener("reset",_),()=>v.removeEventListener("reset",_)}},[o,m]),r.jsx(lt.button,{type:"button",role:"checkbox","aria-checked":bi(d)?"mixed":d,"aria-required":h,"data-state":V3(d),"data-disabled":c?"":void 0,disabled:c,value:u,...a,ref:S,onKeyDown:We(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:We(n,v=>{m(_=>bi(_)?!0:!_),w&&y&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})})});$3.displayName=H3;var yv=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:s,defaultChecked:o,required:u,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return r.jsx(Mq,{__scopeCheckbox:n,checked:s,defaultChecked:o,disabled:c,required:u,onCheckedChange:h,name:a,form:p,value:d,internal_do_not_use_render:({isFormControl:g})=>r.jsxs(r.Fragment,{children:[r.jsx($3,{...m,ref:t,__scopeCheckbox:n}),g&&r.jsx(W3,{__scopeCheckbox:n})]})})});yv.displayName=lm;var z3="CheckboxIndicator",G3=C.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...s}=e,o=xv(z3,n);return r.jsx(ur,{present:a||bi(o.checked)||o.checked===!0,children:r.jsx(lt.span,{"data-state":V3(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});G3.displayName=z3;var q3="CheckboxBubbleInput",W3=C.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:g,setBubbleInput:y}=xv(q3,e),w=Et(n,y),S=gv(o),b=lv(a);C.useEffect(()=>{const _=g;if(!_)return;const E=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(E,"checked").set,k=!s.current;if(S!==o&&N){const L=new Event("click",{bubbles:k});_.indeterminate=bi(o),N.call(_,bi(o)?!1:o),_.dispatchEvent(L)}},[g,S,o,s]);const v=C.useRef(bi(o)?!1:o);return r.jsx(lt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??v.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});W3.displayName=q3;function Fq(e){return typeof e=="function"}function bi(e){return e==="indeterminate"}function V3(e){return bi(e)?"indeterminate":e?"checked":"unchecked"}const fa=C.forwardRef(({className:e,...t},n)=>r.jsx(yv,{ref:n,className:Te("peer h-4 w-4 shrink-0 rounded-sm border border-primary 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 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:r.jsx(G3,{className:Te("flex items-center justify-center text-current"),children:r.jsx(xo,{className:"h-4 w-4"})})}));fa.displayName=yv.displayName;const xi=C.forwardRef(({className:e,onCheckedChange:t,onChange:n,...a},s)=>{const o=u=>{n?.(u),t?.(u.target.checked)};return r.jsxs("label",{className:Te("relative inline-flex cursor-pointer",e),children:[r.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:o,ref:s,...a}),r.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),r.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});xi.displayName="Switch";function Pq(e,t){return C.useReducer((n,a)=>t[n][a]??n,e)}var vv="ScrollArea",[Y3,nde]=kr(vv),[Bq,xa]=Y3(vv),K3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:a="hover",dir:s,scrollHideDelay:o=600,...u}=e,[c,d]=C.useState(null),[h,p]=C.useState(null),[m,g]=C.useState(null),[y,w]=C.useState(null),[S,b]=C.useState(null),[v,_]=C.useState(0),[E,T]=C.useState(0),[N,k]=C.useState(!1),[L,R]=C.useState(!1),j=Et(t,B=>d(B)),M=ic(s);return r.jsx(Bq,{scope:n,type:a,dir:M,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:m,onContentChange:g,scrollbarX:y,onScrollbarXChange:w,scrollbarXEnabled:N,onScrollbarXEnabledChange:k,scrollbarY:S,onScrollbarYChange:b,scrollbarYEnabled:L,onScrollbarYEnabledChange:R,onCornerWidthChange:_,onCornerHeightChange:T,children:r.jsx(lt.div,{dir:M,...u,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});K3.displayName=vv;var X3="ScrollAreaViewport",Z3=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:a,nonce:s,...o}=e,u=xa(X3,n),c=C.useRef(null),d=Et(t,c,u.onViewportChange);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(lt.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:r.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})});Z3.displayName=X3;var es="ScrollAreaScrollbar",Ev=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=xa(es,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=s,c=e.orientation==="horizontal";return C.useEffect(()=>(c?o(!0):u(!0),()=>{c?o(!1):u(!1)}),[c,o,u]),s.type==="hover"?r.jsx(Uq,{...a,ref:t,forceMount:n}):s.type==="scroll"?r.jsx(Hq,{...a,ref:t,forceMount:n}):s.type==="auto"?r.jsx(Q3,{...a,ref:t,forceMount:n}):s.type==="always"?r.jsx(_v,{...a,ref:t}):null});Ev.displayName=es;var Uq=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=xa(es,e.__scopeScrollArea),[o,u]=C.useState(!1);return C.useEffect(()=>{const c=s.scrollArea;let d=0;if(c){const h=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),s.scrollHideDelay)};return c.addEventListener("pointerenter",h),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",h),c.removeEventListener("pointerleave",p)}}},[s.scrollArea,s.scrollHideDelay]),r.jsx(ur,{present:n||o,children:r.jsx(Q3,{"data-state":o?"visible":"hidden",...a,ref:t})})}),Hq=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=xa(es,e.__scopeScrollArea),o=e.orientation==="horizontal",u=um(()=>d("SCROLL_END"),100),[c,d]=Pq("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return C.useEffect(()=>{if(c==="idle"){const h=window.setTimeout(()=>d("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(h)}},[c,s.scrollHideDelay,d]),C.useEffect(()=>{const h=s.viewport,p=o?"scrollLeft":"scrollTop";if(h){let m=h[p];const g=()=>{const y=h[p];m!==y&&(d("SCROLL"),u()),m=y};return h.addEventListener("scroll",g),()=>h.removeEventListener("scroll",g)}},[s.viewport,o,d,u]),r.jsx(ur,{present:n||c!=="hidden",children:r.jsx(_v,{"data-state":c==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:We(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:We(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),Q3=C.forwardRef((e,t)=>{const n=xa(es,e.__scopeScrollArea),{forceMount:a,...s}=e,[o,u]=C.useState(!1),c=e.orientation==="horizontal",d=um(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?h:p)}},10);return Hl(n.viewport,d),Hl(n.content,d),r.jsx(ur,{present:a||o,children:r.jsx(_v,{"data-state":o?"visible":"hidden",...s,ref:t})})}),_v=C.forwardRef((e,t)=>{const{orientation:n="vertical",...a}=e,s=xa(es,e.__scopeScrollArea),o=C.useRef(null),u=C.useRef(0),[c,d]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=rL(c.viewport,c.content),p={...a,sizes:c,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:g=>u.current=g};function m(g,y){return Vq(g,u.current,c,y)}return n==="horizontal"?r.jsx($q,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const g=s.viewport.scrollLeft,y=q2(g,c,s.dir);o.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollLeft=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollLeft=m(g,s.dir))}}):n==="vertical"?r.jsx(zq,{...p,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const g=s.viewport.scrollTop,y=q2(g,c);o.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollTop=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollTop=m(g))}}):null}),$q=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...s}=e,o=xa(es,e.__scopeScrollArea),[u,c]=C.useState(),d=C.useRef(null),h=Et(t,d,o.onScrollbarXChange);return C.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(eL,{"data-orientation":"horizontal",...s,ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":cm(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(g),sL(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&a({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:mp(u.paddingLeft),paddingEnd:mp(u.paddingRight)}})}})}),zq=C.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...s}=e,o=xa(es,e.__scopeScrollArea),[u,c]=C.useState(),d=C.useRef(null),h=Et(t,d,o.onScrollbarYChange);return C.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(eL,{"data-orientation":"vertical",...s,ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":cm(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(g),sL(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&a({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:mp(u.paddingTop),paddingEnd:mp(u.paddingBottom)}})}})}),[Gq,J3]=Y3(es),eL=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:a,hasThumb:s,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:p,onResize:m,...g}=e,y=xa(es,n),[w,S]=C.useState(null),b=Et(t,j=>S(j)),v=C.useRef(null),_=C.useRef(""),E=y.viewport,T=a.content-a.viewport,N=kn(p),k=kn(d),L=um(m,10);function R(j){if(v.current){const M=j.clientX-v.current.left,B=j.clientY-v.current.top;h({x:M,y:B})}}return C.useEffect(()=>{const j=M=>{const B=M.target;w?.contains(B)&&N(M,T)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[E,w,T,N]),C.useEffect(k,[a,k]),Hl(w,L),Hl(y.content,L),r.jsx(Gq,{scope:n,scrollbar:w,hasThumb:s,onThumbChange:kn(o),onThumbPointerUp:kn(u),onThumbPositionChange:k,onThumbPointerDown:kn(c),children:r.jsx(lt.div,{...g,ref:b,style:{position:"absolute",...g.style},onPointerDown:We(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),v.current=w.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),R(j))}),onPointerMove:We(e.onPointerMove,R),onPointerUp:We(e.onPointerUp,j=>{const M=j.target;M.hasPointerCapture(j.pointerId)&&M.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=_.current,y.viewport&&(y.viewport.style.scrollBehavior=""),v.current=null})})})}),pp="ScrollAreaThumb",tL=C.forwardRef((e,t)=>{const{forceMount:n,...a}=e,s=J3(pp,e.__scopeScrollArea);return r.jsx(ur,{present:n||s.hasThumb,children:r.jsx(qq,{ref:t,...a})})}),qq=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:a,...s}=e,o=xa(pp,n),u=J3(pp,n),{onThumbPositionChange:c}=u,d=Et(t,m=>u.onThumbChange(m)),h=C.useRef(void 0),p=um(()=>{h.current&&(h.current(),h.current=void 0)},100);return C.useEffect(()=>{const m=o.viewport;if(m){const g=()=>{if(p(),!h.current){const y=Yq(m,c);h.current=y,c()}};return c(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[o.viewport,p,c]),r.jsx(lt.div,{"data-state":u.hasThumb?"visible":"hidden",...s,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:We(e.onPointerDownCapture,m=>{const y=m.target.getBoundingClientRect(),w=m.clientX-y.left,S=m.clientY-y.top;u.onThumbPointerDown({x:w,y:S})}),onPointerUp:We(e.onPointerUp,u.onThumbPointerUp)})});tL.displayName=pp;var Sv="ScrollAreaCorner",nL=C.forwardRef((e,t)=>{const n=xa(Sv,e.__scopeScrollArea),a=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&a?r.jsx(Wq,{...e,ref:t}):null});nL.displayName=Sv;var Wq=C.forwardRef((e,t)=>{const{__scopeScrollArea:n,...a}=e,s=xa(Sv,n),[o,u]=C.useState(0),[c,d]=C.useState(0),h=!!(o&&c);return Hl(s.scrollbarX,()=>{const p=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(p),d(p)}),Hl(s.scrollbarY,()=>{const p=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(p),u(p)}),h?r.jsx(lt.div,{...a,ref:t,style:{width:o,height:c,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function mp(e){return e?parseInt(e,10):0}function rL(e,t){const n=e/t;return isNaN(n)?0:n}function cm(e){const t=rL(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-n)*t;return Math.max(a,18)}function Vq(e,t,n,a="ltr"){const s=cm(n),o=s/2,u=t||o,c=s-u,d=n.scrollbar.paddingStart+u,h=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,m=a==="ltr"?[0,p]:[p*-1,0];return aL([d,h],m)(e)}function q2(e,t,n="ltr"){const a=cm(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,u=t.content-t.viewport,c=o-a,d=n==="ltr"?[0,u]:[u*-1,0],h=Lx(e,d);return aL([0,u],[0,c])(h)}function aL(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}function sL(e,t){return e>0&&e<t}var Yq=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},a=0;return(function s(){const o={left:e.scrollLeft,top:e.scrollTop},u=n.left!==o.left,c=n.top!==o.top;(u||c)&&t(),n=o,a=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(a)};function um(e,t){const n=kn(e),a=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(a.current),[]),C.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(n,t)},[n,t])}function Hl(e,t){const n=kn(t);nr(()=>{let a=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(a),s.unobserve(e)}}},[e,n])}var iL=K3,Kq=Z3,Xq=nL;const Ia=C.forwardRef(({className:e,children:t,...n},a)=>r.jsxs(iL,{ref:a,className:Te("relative overflow-hidden",e),...n,children:[r.jsx(Kq,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsx(oL,{}),r.jsx(Xq,{})]}));Ia.displayName=iL.displayName;const oL=C.forwardRef(({className:e,orientation:t="vertical",...n},a)=>r.jsx(Ev,{ref:a,orientation:t,className:Te("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:r.jsx(tL,{className:"relative flex-1 rounded-full bg-border"})}));oL.displayName=Ev.displayName;function nd(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,o=!1;for(;!o;){a===-1&&(a=n.length,o=!0);const u=n.slice(s,a).trim();(u||!o)&&t.push(u),s=a+1,a=n.indexOf(",",s)}return t}function dm(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Zq=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qq=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jq={};function W2(e,t){return(Jq.jsx?Qq:Zq).test(e)}const eW=/[ \t\n\f\r]/g;function Ad(e){return typeof e=="object"?e.type==="text"?V2(e.value):!1:V2(e)}function V2(e){return e.replace(eW,"")===""}let Nd=class{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}};Nd.prototype.normal={};Nd.prototype.property={};Nd.prototype.space=void 0;function lL(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new Nd(n,a,t)}function rd(e){return e.toLowerCase()}let Pr=class{constructor(t,n){this.attribute=n,this.property=t}};Pr.prototype.attribute="";Pr.prototype.booleanish=!1;Pr.prototype.boolean=!1;Pr.prototype.commaOrSpaceSeparated=!1;Pr.prototype.commaSeparated=!1;Pr.prototype.defined=!1;Pr.prototype.mustUseProperty=!1;Pr.prototype.number=!1;Pr.prototype.overloadedBoolean=!1;Pr.prototype.property="";Pr.prototype.spaceSeparated=!1;Pr.prototype.space=void 0;let tW=0;const Nt=yo(),Bn=yo(),Ux=yo(),Ge=yo(),hn=yo(),Dl=yo(),Kr=yo();function yo(){return 2**++tW}const Hx=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nt,booleanish:Bn,commaOrSpaceSeparated:Kr,commaSeparated:Dl,number:Ge,overloadedBoolean:Ux,spaceSeparated:hn},Symbol.toStringTag,{value:"Module"})),T0=Object.keys(Hx);let wv=class extends Pr{constructor(t,n,a,s){let o=-1;if(super(t,n),Y2(this,"space",s),typeof a=="number")for(;++o<T0.length;){const u=T0[o];Y2(this,T0[o],(a&Hx[u])===Hx[u])}}};wv.prototype.defined=!0;function Y2(e,t,n){n&&(e[t]=n)}function lc(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new wv(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[rd(a)]=a,n[rd(o.attribute)]=a}return new Nd(t,n,e.space)}const cL=lc({properties:{ariaActiveDescendant:null,ariaAtomic:Bn,ariaAutoComplete:null,ariaBusy:Bn,ariaChecked:Bn,ariaColCount:Ge,ariaColIndex:Ge,ariaColSpan:Ge,ariaControls:hn,ariaCurrent:null,ariaDescribedBy:hn,ariaDetails:null,ariaDisabled:Bn,ariaDropEffect:hn,ariaErrorMessage:null,ariaExpanded:Bn,ariaFlowTo:hn,ariaGrabbed:Bn,ariaHasPopup:null,ariaHidden:Bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:hn,ariaLevel:Ge,ariaLive:null,ariaModal:Bn,ariaMultiLine:Bn,ariaMultiSelectable:Bn,ariaOrientation:null,ariaOwns:hn,ariaPlaceholder:null,ariaPosInSet:Ge,ariaPressed:Bn,ariaReadOnly:Bn,ariaRelevant:null,ariaRequired:Bn,ariaRoleDescription:hn,ariaRowCount:Ge,ariaRowIndex:Ge,ariaRowSpan:Ge,ariaSelected:Bn,ariaSetSize:Ge,ariaSort:null,ariaValueMax:Ge,ariaValueMin:Ge,ariaValueNow:Ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uL(e,t){return t in e?e[t]:t}function dL(e,t){return uL(e,t.toLowerCase())}const nW=lc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dl,acceptCharset:hn,accessKey:hn,action:null,allow:null,allowFullScreen:Nt,allowPaymentRequest:Nt,allowUserMedia:Nt,alt:null,as:null,async:Nt,autoCapitalize:null,autoComplete:hn,autoFocus:Nt,autoPlay:Nt,blocking:hn,capture:null,charSet:null,checked:Nt,cite:null,className:hn,cols:Ge,colSpan:null,content:null,contentEditable:Bn,controls:Nt,controlsList:hn,coords:Ge|Dl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Nt,defer:Nt,dir:null,dirName:null,disabled:Nt,download:Ux,draggable:Bn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Nt,formTarget:null,headers:hn,height:Ge,hidden:Ux,high:Ge,href:null,hrefLang:null,htmlFor:hn,httpEquiv:hn,id:null,imageSizes:null,imageSrcSet:null,inert:Nt,inputMode:null,integrity:null,is:null,isMap:Nt,itemId:null,itemProp:hn,itemRef:hn,itemScope:Nt,itemType:hn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Nt,low:Ge,manifest:null,max:null,maxLength:Ge,media:null,method:null,min:null,minLength:Ge,multiple:Nt,muted:Nt,name:null,nonce:null,noModule:Nt,noValidate:Nt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Nt,optimum:Ge,pattern:null,ping:hn,placeholder:null,playsInline:Nt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Nt,referrerPolicy:null,rel:hn,required:Nt,reversed:Nt,rows:Ge,rowSpan:Ge,sandbox:hn,scope:null,scoped:Nt,seamless:Nt,selected:Nt,shadowRootClonable:Nt,shadowRootDelegatesFocus:Nt,shadowRootMode:null,shape:null,size:Ge,sizes:null,slot:null,span:Ge,spellCheck:Bn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ge,step:null,style:null,tabIndex:Ge,target:null,title:null,translate:null,type:null,typeMustMatch:Nt,useMap:null,value:Bn,width:Ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:hn,axis:null,background:null,bgColor:null,border:Ge,borderColor:null,bottomMargin:Ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Nt,declare:Nt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ge,leftMargin:Ge,link:null,longDesc:null,lowSrc:null,marginHeight:Ge,marginWidth:Ge,noResize:Nt,noHref:Nt,noShade:Nt,noWrap:Nt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ge,rules:null,scheme:null,scrolling:Bn,standby:null,summary:null,text:null,topMargin:Ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Nt,disableRemotePlayback:Nt,prefix:null,property:null,results:Ge,security:null,unselectable:null},space:"html",transform:dL}),rW=lc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Kr,accentHeight:Ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ge,amplitude:Ge,arabicForm:null,ascent:Ge,attributeName:null,attributeType:null,azimuth:Ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ge,by:null,calcMode:null,capHeight:Ge,className:hn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ge,diffuseConstant:Ge,direction:null,display:null,dur:null,divisor:Ge,dominantBaseline:null,download:Nt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ge,enableBackground:null,end:null,event:null,exponent:Ge,externalResourcesRequired:null,fill:null,fillOpacity:Ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dl,g2:Dl,glyphName:Dl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ge,horizOriginX:Ge,horizOriginY:Ge,id:null,ideographic:Ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ge,k:Ge,k1:Ge,k2:Ge,k3:Ge,k4:Ge,kernelMatrix:Kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ge,overlineThickness:Ge,paintOrder:null,panose1:null,path:null,pathLength:Ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:hn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ge,pointsAtY:Ge,pointsAtZ:Ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kr,rev:Kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kr,requiredFeatures:Kr,requiredFonts:Kr,requiredFormats:Kr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ge,specularExponent:Ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ge,strikethroughThickness:Ge,string:null,stroke:null,strokeDashArray:Kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ge,strokeOpacity:Ge,strokeWidth:null,style:null,surfaceScale:Ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kr,tabIndex:Ge,tableValues:null,target:null,targetX:Ge,targetY:Ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ge,underlineThickness:Ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ge,values:null,vAlphabetic:Ge,vMathematical:Ge,vectorEffect:null,vHanging:Ge,vIdeographic:Ge,version:null,vertAdvY:Ge,vertOriginX:Ge,vertOriginY:Ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uL}),hL=lc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fL=lc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dL}),pL=lc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),aW={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},sW=/[A-Z]/g,K2=/-[a-z]/g,iW=/^data[-\w.:]+$/i;function kd(e,t){const n=rd(t);let a=t,s=Pr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&iW.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(K2,lW);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!K2.test(o)){let u=o.replace(sW,oW);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=wv}return new s(a,t)}function oW(e){return"-"+e.toLowerCase()}function lW(e){return e.charAt(1).toUpperCase()}const cc=lL([cL,nW,hL,fL,pL],"html"),Is=lL([cL,rW,hL,fL,pL],"svg");function ad(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function hm(e){return e.join(" ").trim()}var bl={},A0,X2;function cW(){if(X2)return A0;X2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
585
585
|
`,h="/",p="*",m="",g="comment",y="declaration";A0=function(S,b){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];b=b||{};var v=1,_=1;function E(P){var $=P.match(t);$&&(v+=$.length);var ee=P.lastIndexOf(d);_=~ee?P.length-ee:_+P.length}function T(){var P={line:v,column:_};return function($){return $.position=new N(P),R(),$}}function N(P){this.start=P,this.end={line:v,column:_},this.source=b.source}N.prototype.content=S;function k(P){var $=new Error(b.source+":"+v+":"+_+": "+P);if($.reason=P,$.filename=b.source,$.line=v,$.column=_,$.source=S,!b.silent)throw $}function L(P){var $=P.exec(S);if($){var ee=$[0];return E(ee),S=S.slice(ee.length),$}}function R(){L(n)}function j(P){var $;for(P=P||[];$=M();)$!==!1&&P.push($);return P}function M(){var P=T();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var $=2;m!=S.charAt($)&&(p!=S.charAt($)||h!=S.charAt($+1));)++$;if($+=2,m===S.charAt($-1))return k("End of comment missing");var ee=S.slice(2,$-2);return _+=2,E(ee),S=S.slice($),_+=2,P({type:g,comment:ee})}}function B(){var P=T(),$=L(a);if($){if(M(),!L(s))return k("property missing ':'");var ee=L(o),U=P({type:y,property:w($[0].replace(e,m)),value:ee?w(ee[0].replace(e,m)):m});return L(u),U}}function H(){var P=[];j(P);for(var $;$=B();)$!==!1&&(P.push($),j(P));return P}return R(),H()};function w(S){return S?S.replace(c,m):m}return A0}var Z2;function uW(){if(Z2)return bl;Z2=1;var e=bl&&bl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(bl,"__esModule",{value:!0}),bl.default=n;var t=e(cW());function n(a,s){var o=null;if(!a||typeof a!="string")return o;var u=(0,t.default)(a),c=typeof s=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?s(h,p,d):p&&(o=o||{},o[h]=p)}}),o}return bl}var Eu={},Q2;function dW(){if(Q2)return Eu;Q2=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),o(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(s,c):h=h.replace(a,c),h.replace(t,u))};return Eu.camelCase=d,Eu}var _u,J2;function hW(){if(J2)return _u;J2=1;var e=_u&&_u.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(uW()),n=dW();function a(s,o){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,o)]=d)}),u}return a.default=a,_u=a,_u}var fW=hW();const pW=ql(fW),fm=mL("end"),ts=mL("start");function mL(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function gL(e){const t=ts(e),n=fm(e);if(t&&n)return{start:t,end:n}}function Pu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ek(e.position):"start"in e||"end"in e?ek(e):"line"in e||"column"in e?$x(e):""}function $x(e){return tk(e&&e.line)+":"+tk(e&&e.column)}function ek(e){return $x(e&&e.start)+"-"+$x(e&&e.end)}function tk(e){return e&&typeof e=="number"?e:1}class dr extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},u=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(u=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?o.ruleId=a:(o.source=a.slice(0,d),o.ruleId=a.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=Pu(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}dr.prototype.file="";dr.prototype.name="";dr.prototype.reason="";dr.prototype.message="";dr.prototype.stack="";dr.prototype.column=void 0;dr.prototype.line=void 0;dr.prototype.ancestors=void 0;dr.prototype.cause=void 0;dr.prototype.fatal=void 0;dr.prototype.place=void 0;dr.prototype.ruleId=void 0;dr.prototype.source=void 0;const Cv={}.hasOwnProperty,mW=new Map,gW=/[A-Z]/g,bW=new Set(["table","tbody","thead","tfoot","tr"]),xW=new Set(["td","th"]),bL="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xL(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=TW(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=CW(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Is:cc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=yL(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function yL(e,t,n){if(t.type==="element")return yW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return vW(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return _W(e,t,n);if(t.type==="mdxjsEsm")return EW(e,t);if(t.type==="root")return SW(e,t,n);if(t.type==="text")return wW(e,t)}function yW(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=Is,e.schema=s),e.ancestors.push(t);const o=EL(e,t.tagName,!1),u=AW(e,t);let c=Av(e,t);return bW.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Ad(d):!0})),vL(e,u,o,t),Tv(u,c),e.ancestors.pop(),e.schema=a,e.create(t,o,u,n)}function vW(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}sd(e,t.position)}function EW(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sd(e,t.position)}function _W(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=Is,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:EL(e,t.name,!0),u=NW(e,t),c=Av(e,t);return vL(e,u,o,t),Tv(u,c),e.ancestors.pop(),e.schema=a,e.create(t,o,u,n)}function SW(e,t,n){const a={};return Tv(a,Av(e,t)),e.create(t,e.Fragment,a,n)}function wW(e,t){return t.value}function vL(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Tv(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function CW(e,t,n){return a;function a(s,o,u,c){const h=Array.isArray(u.children)?n:t;return c?h(o,u,c):h(o,u)}}function TW(e,t){return n;function n(a,s,o,u){const c=Array.isArray(o.children),d=ts(a);return t(s,o,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function AW(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&Cv.call(t.properties,s)){const o=kW(e,s,t.properties[s]);if(o){const[u,c]=o;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&xW.has(t.tagName)?a=c:n[u]=c}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function NW(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const u=o.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else sd(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const c=a.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else sd(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function Av(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:mW;for(;++a<t.children.length;){const o=t.children[a];let u;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=s.get(d)||0;u=d+"-"+h,s.set(d,h+1)}}const c=yL(e,o,u);c!==void 0&&n.push(c)}return n}function kW(e,t,n){const a=kd(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?dm(n):hm(n)),a.property==="style"){let s=typeof n=="object"?n:RW(e,String(n));return e.stylePropertyNameCase==="css"&&(s=DW(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?aW[a.property]||a.property:a.attribute,n]}}function RW(e,t){try{return pW(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new dr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=bL+"#cannot-parse-style-attribute",s}}function EL(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,u;for(;++o<s.length;){const c=W2(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}a=u}else a=W2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return Cv.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);sd(e)}function sd(e,t){const n=new dr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=bL+"#cannot-handle-mdx-estrees-without-createevaluater",n}function DW(e){const t={};let n;for(n in e)Cv.call(e,n)&&(t[IW(n)]=e[n]);return t}function IW(e){let t=e.replace(gW,OW);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function OW(e){return"-"+e.toLowerCase()}const Il={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},LW={};function Nv(e,t){const n=LW,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _L(e,a,s)}function _L(e,t,n){if(jW(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return nk(e.children,t,n)}return Array.isArray(e)?nk(e,t,n):""}function nk(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=_L(e[s],t,n);return a.join("")}function jW(e){return!!(e&&typeof e=="object")}const rk=document.createElement("i");function id(e){const t="&"+e+";";rk.innerHTML=t;const n=rk.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ta(e,t,n,a){const s=e.length;let o=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)u=Array.from(a),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);o<a.length;)u=a.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function da(e,t){return e.length>0?(ta(e,e.length,0,t),e):t}const ak={}.hasOwnProperty;function SL(e){const t={};let n=-1;for(;++n<e.length;)MW(t,e[n]);return t}function MW(e,t){let n;for(n in t){const s=(ak.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let u;if(o)for(u in o){ak.call(s,u)||(s[u]=[]);const c=o[u];FW(s[u],Array.isArray(c)?c:c?[c]:[])}}}function FW(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);ta(e,0,0,a)}function wL(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ka(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sr=Ai(/[A-Za-z]/),br=Ai(/[\dA-Za-z]/),PW=Ai(/[#-'*+\--9=?A-Z^-~]/);function gp(e){return e!==null&&(e<32||e===127)}const zx=Ai(/\d/),BW=Ai(/[\dA-Fa-f]/),UW=Ai(/[!-/:-@[-`{-~]/);function mt(e){return e!==null&&e<-2}function un(e){return e!==null&&(e<0||e===32)}function Ut(e){return e===-2||e===-1||e===32}const pm=Ai(new RegExp("\\p{P}|\\p{S}","u")),go=Ai(/\s/);function Ai(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function uc(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let u="";if(o===37&&br(e.charCodeAt(n+1))&&br(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(u=String.fromCharCode(o,c),s=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(a,n),encodeURIComponent(u)),a=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function Gt(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(d){return Ut(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ut(d)&&o++<s?(e.consume(d),c):(e.exit(n),t(d))}}const HW={tokenize:$W};function $W(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Gt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),o(c)}function o(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return mt(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),u)}}const zW={tokenize:GW},sk={tokenize:qW};function GW(e){const t=this,n=[];let a=0,s,o,u;return c;function c(E){if(a<n.length){const T=n[a];return t.containerState=T[1],e.attempt(T[0].continuation,d,h)(E)}return h(E)}function d(E){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&_();const T=t.events.length;let N=T,k;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){k=t.events[N][1].end;break}v(a);let L=T;for(;L<t.events.length;)t.events[L][1].end={...k},L++;return ta(t.events,N+1,0,t.events.slice(T)),t.events.length=L,h(E)}return c(E)}function h(E){if(a===n.length){if(!s)return g(E);if(s.currentConstruct&&s.currentConstruct.concrete)return w(E);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sk,p,m)(E)}function p(E){return s&&_(),v(a),g(E)}function m(E){return t.parser.lazy[t.now().line]=a!==n.length,u=t.now().offset,w(E)}function g(E){return t.containerState={},e.attempt(sk,y,w)(E)}function y(E){return a++,n.push([t.currentConstruct,t.containerState]),g(E)}function w(E){if(E===null){s&&_(),v(0),e.consume(E);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),S(E)}function S(E){if(E===null){b(e.exit("chunkFlow"),!0),v(0),e.consume(E);return}return mt(E)?(e.consume(E),b(e.exit("chunkFlow")),a=0,t.interrupt=void 0,c):(e.consume(E),S)}function b(E,T){const N=t.sliceStream(E);if(T&&N.push(null),E.previous=o,o&&(o.next=E),o=E,s.defineSkip(E.start),s.write(N),t.parser.lazy[E.start.line]){let k=s.events.length;for(;k--;)if(s.events[k][1].start.offset<u&&(!s.events[k][1].end||s.events[k][1].end.offset>u))return;const L=t.events.length;let R=L,j,M;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(j){M=t.events[R][1].end;break}j=!0}for(v(a),k=L;k<t.events.length;)t.events[k][1].end={...M},k++;ta(t.events,R+1,0,t.events.slice(L)),t.events.length=k}}function v(E){let T=n.length;for(;T-- >E;){const N=n[T];t.containerState=N[1],N[0].exit.call(t,e)}n.length=E}function _(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function qW(e,t,n){return Gt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $l(e){if(e===null||un(e)||go(e))return 1;if(pm(e))return 2}function mm(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const Gx={name:"attention",resolveAll:WW,tokenize:VW};function WW(e,t){let n=-1,a,s,o,u,c,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[a][1].end},g={...e[n][1].start};ik(m,-d),ik(g,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[a][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},o={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...u.start},end:{...c.end}},e[a][1].end={...u.start},e[n][1].start={...c.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=da(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=da(h,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",o,t]]),h=da(h,mm(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=da(h,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=da(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,ta(e,a-1,n-a+3,h),n=a+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function VW(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=$l(a);let o;return u;function u(d){return o=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===o)return e.consume(d),c;const h=e.exit("attentionSequence"),p=$l(d),m=!p||p===2&&s||n.includes(d),g=!s||s===2&&p||n.includes(a);return h._open=!!(o===42?m:m&&(s||!g)),h._close=!!(o===42?g:g&&(p||!m)),t(d)}}function ik(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const YW={name:"autolink",tokenize:KW};function KW(e,t,n){let a=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return Sr(y)?(e.consume(y),u):y===64?n(y):h(y)}function u(y){return y===43||y===45||y===46||br(y)?(a=1,c(y)):h(y)}function c(y){return y===58?(e.consume(y),a=0,d):(y===43||y===45||y===46||br(y))&&a++<32?(e.consume(y),c):(a=0,h(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||gp(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):PW(y)?(e.consume(y),h):n(y)}function p(y){return br(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),a=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):g(y)}function g(y){if((y===45||br(y))&&a++<63){const w=y===45?g:m;return e.consume(y),w}return n(y)}}const Rd={partial:!0,tokenize:XW};function XW(e,t,n){return a;function a(o){return Ut(o)?Gt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||mt(o)?t(o):n(o)}}const CL={continuation:{tokenize:QW},exit:JW,name:"blockQuote",tokenize:ZW};function ZW(e,t,n){const a=this;return s;function s(u){if(u===62){const c=a.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return n(u)}function o(u){return Ut(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function QW(e,t,n){const a=this;return s;function s(u){return Ut(u)?Gt(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(CL,t,n)(u)}}function JW(e){e.exit("blockQuote")}const TL={name:"characterEscape",tokenize:eV};function eV(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return UW(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const AL={name:"characterReference",tokenize:tV};function tV(e,t,n){const a=this;let s=0,o,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,u=br,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=BW,p):(e.enter("characterReferenceValue"),o=7,u=zx,p(m))}function p(m){if(m===59&&s){const g=e.exit("characterReferenceValue");return u===br&&!id(a.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<o?(e.consume(m),p):n(m)}}const ok={partial:!0,tokenize:rV},lk={concrete:!0,name:"codeFenced",tokenize:nV};function nV(e,t,n){const a=this,s={partial:!0,tokenize:N};let o=0,u=0,c;return d;function d(k){return h(k)}function h(k){const L=a.events[a.events.length-1];return o=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,c=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(k)}function p(k){return k===c?(u++,e.consume(k),p):u<3?n(k):(e.exit("codeFencedFenceSequence"),Ut(k)?Gt(e,m,"whitespace")(k):m(k))}function m(k){return k===null||mt(k)?(e.exit("codeFencedFence"),a.interrupt?t(k):e.check(ok,S,T)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||mt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(k)):Ut(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Gt(e,y,"whitespace")(k)):k===96&&k===c?n(k):(e.consume(k),g)}function y(k){return k===null||mt(k)?m(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(k))}function w(k){return k===null||mt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(k)):k===96&&k===c?n(k):(e.consume(k),w)}function S(k){return e.attempt(s,T,b)(k)}function b(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),v}function v(k){return o>0&&Ut(k)?Gt(e,_,"linePrefix",o+1)(k):_(k)}function _(k){return k===null||mt(k)?e.check(ok,S,T)(k):(e.enter("codeFlowValue"),E(k))}function E(k){return k===null||mt(k)?(e.exit("codeFlowValue"),_(k)):(e.consume(k),E)}function T(k){return e.exit("codeFenced"),t(k)}function N(k,L,R){let j=0;return M;function M(ee){return k.enter("lineEnding"),k.consume(ee),k.exit("lineEnding"),B}function B(ee){return k.enter("codeFencedFence"),Ut(ee)?Gt(k,H,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):H(ee)}function H(ee){return ee===c?(k.enter("codeFencedFenceSequence"),P(ee)):R(ee)}function P(ee){return ee===c?(j++,k.consume(ee),P):j>=u?(k.exit("codeFencedFenceSequence"),Ut(ee)?Gt(k,$,"whitespace")(ee):$(ee)):R(ee)}function $(ee){return ee===null||mt(ee)?(k.exit("codeFencedFence"),L(ee)):R(ee)}}}function rV(e,t,n){const a=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return a.parser.lazy[a.now().line]?n(u):t(u)}}const N0={name:"codeIndented",tokenize:sV},aV={partial:!0,tokenize:iV};function sV(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),Gt(e,o,"linePrefix",5)(h)}function o(h){const p=a.events[a.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):mt(h)?e.attempt(aV,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||mt(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function iV(e,t,n){const a=this;return s;function s(u){return a.parser.lazy[a.now().line]?n(u):mt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):Gt(e,o,"linePrefix",5)(u)}function o(u){const c=a.events[a.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):mt(u)?s(u):n(u)}}const oV={name:"codeText",previous:cV,resolve:lV,tokenize:uV};function lV(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function cV(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uV(e,t,n){let a=0,s,o;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),a++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),s=0,p(m)):mt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||mt(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),s++,p):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class dV{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Su(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Su(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Su(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Su(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Su(this.left,n.reverse())}}}function Su(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function NL(e){const t={};let n=-1,a,s,o,u,c,d,h;const p=new dV(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(a=p.get(n),n&&a[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=a[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,hV(p,n)),n=t[n],h=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(u=p.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(a[1].end={...p.get(s)[1].start},c=p.slice(s,n),c.unshift(a),p.splice(s,n-s+1,c))}}return ta(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function hV(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let u=n._tokenizer;u||(u=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,m,g=-1,y=n,w=0,S=0;const b=[S];for(;y;){for(;e.get(++s)[1]!==y;);o.push(s),y._tokenizer||(p=a.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++g<c.length;)c[g][0]==="exit"&&c[g-1][0]==="enter"&&c[g][1].type===c[g-1][1].type&&c[g][1].start.line!==c[g][1].end.line&&(S=g+1,b.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):b.pop(),g=b.length;g--;){const v=c.slice(b[g],b[g+1]),_=o.pop();d.push([_,_+v.length-1]),e.splice(_,2,v)}for(d.reverse(),g=-1;++g<d.length;)h[w+d[g][0]]=w+d[g][1],w+=d[g][1]-d[g][0]-1;return h}const fV={resolve:mV,tokenize:gV},pV={partial:!0,tokenize:bV};function mV(e){return NL(e),e}function gV(e,t){let n;return a;function a(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?o(c):mt(c)?e.check(pV,u,o)(c):(e.consume(c),s)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function bV(e,t,n){const a=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Gt(e,o,"linePrefix")}function o(u){if(u===null||mt(u))return n(u);const c=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(a.parser.constructs.flow,n,t)(u)}}function kL(e,t,n,a,s,o,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(v){return v===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(v),e.exit(o),g):v===null||v===32||v===41||gp(v)?n(v):(e.enter(a),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(v))}function g(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===62?(e.exit("chunkString"),e.exit(c),g(v)):v===null||v===60||mt(v)?n(v):(e.consume(v),v===92?w:y)}function w(v){return v===60||v===62||v===92?(e.consume(v),y):y(v)}function S(v){return!p&&(v===null||v===41||un(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(a),t(v)):p<h&&v===40?(e.consume(v),p++,S):v===41?(e.consume(v),p--,S):v===null||v===32||v===40||gp(v)?n(v):(e.consume(v),v===92?b:S)}function b(v){return v===40||v===41||v===92?(e.consume(v),S):S(v)}}function RL(e,t,n,a,s,o){const u=this;let c=0,d;return h;function h(y){return e.enter(a),e.enter(s),e.consume(y),e.exit(s),e.enter(o),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(o),e.enter(s),e.consume(y),e.exit(s),e.exit(a),t):mt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||mt(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ut(y)),y===92?g:m)}function g(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function DL(e,t,n,a,s,o){let u;return c;function c(g){return g===34||g===39||g===40?(e.enter(a),e.enter(s),e.consume(g),e.exit(s),u=g===40?41:g,d):n(g)}function d(g){return g===u?(e.enter(s),e.consume(g),e.exit(s),e.exit(a),t):(e.enter(o),h(g))}function h(g){return g===u?(e.exit(o),d(u)):g===null?n(g):mt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Gt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===u||g===null||mt(g)?(e.exit("chunkString"),h(g)):(e.consume(g),g===92?m:p)}function m(g){return g===u||g===92?(e.consume(g),p):p(g)}}function Bu(e,t){let n;return a;function a(s){return mt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Ut(s)?Gt(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const xV={name:"definition",tokenize:vV},yV={partial:!0,tokenize:EV};function vV(e,t,n){const a=this;let s;return o;function o(y){return e.enter("definition"),u(y)}function u(y){return RL.call(a,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=ka(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return un(y)?Bu(e,h)(y):h(y)}function h(y){return kL(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(yV,m,m)(y)}function m(y){return Ut(y)?Gt(e,g,"whitespace")(y):g(y)}function g(y){return y===null||mt(y)?(e.exit("definition"),a.parser.defined.push(s),t(y)):n(y)}}function EV(e,t,n){return a;function a(c){return un(c)?Bu(e,s)(c):n(c)}function s(c){return DL(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return Ut(c)?Gt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||mt(c)?t(c):n(c)}}const _V={name:"hardBreakEscape",tokenize:SV};function SV(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return mt(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const wV={name:"headingAtx",resolve:CV,tokenize:TV};function CV(e,t){let n=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},ta(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function TV(e,t,n){let a=0;return s;function s(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&a++<6?(e.consume(p),u):p===null||un(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||mt(p)?(e.exit("atxHeading"),t(p)):Ut(p)?Gt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||un(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const AV=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ck=["pre","script","style","textarea"],NV={concrete:!0,name:"htmlFlow",resolveTo:DV,tokenize:IV},kV={partial:!0,tokenize:LV},RV={partial:!0,tokenize:OV};function DV(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function IV(e,t,n){const a=this;let s,o,u,c,d;return h;function h(W){return p(W)}function p(W){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(W),m}function m(W){return W===33?(e.consume(W),g):W===47?(e.consume(W),o=!0,S):W===63?(e.consume(W),s=3,a.interrupt?t:O):Sr(W)?(e.consume(W),u=String.fromCharCode(W),b):n(W)}function g(W){return W===45?(e.consume(W),s=2,y):W===91?(e.consume(W),s=5,c=0,w):Sr(W)?(e.consume(W),s=4,a.interrupt?t:O):n(W)}function y(W){return W===45?(e.consume(W),a.interrupt?t:O):n(W)}function w(W){const V="CDATA[";return W===V.charCodeAt(c++)?(e.consume(W),c===V.length?a.interrupt?t:H:w):n(W)}function S(W){return Sr(W)?(e.consume(W),u=String.fromCharCode(W),b):n(W)}function b(W){if(W===null||W===47||W===62||un(W)){const V=W===47,re=u.toLowerCase();return!V&&!o&&ck.includes(re)?(s=1,a.interrupt?t(W):H(W)):AV.includes(u.toLowerCase())?(s=6,V?(e.consume(W),v):a.interrupt?t(W):H(W)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(W):o?_(W):E(W))}return W===45||br(W)?(e.consume(W),u+=String.fromCharCode(W),b):n(W)}function v(W){return W===62?(e.consume(W),a.interrupt?t:H):n(W)}function _(W){return Ut(W)?(e.consume(W),_):M(W)}function E(W){return W===47?(e.consume(W),M):W===58||W===95||Sr(W)?(e.consume(W),T):Ut(W)?(e.consume(W),E):M(W)}function T(W){return W===45||W===46||W===58||W===95||br(W)?(e.consume(W),T):N(W)}function N(W){return W===61?(e.consume(W),k):Ut(W)?(e.consume(W),N):E(W)}function k(W){return W===null||W===60||W===61||W===62||W===96?n(W):W===34||W===39?(e.consume(W),d=W,L):Ut(W)?(e.consume(W),k):R(W)}function L(W){return W===d?(e.consume(W),d=null,j):W===null||mt(W)?n(W):(e.consume(W),L)}function R(W){return W===null||W===34||W===39||W===47||W===60||W===61||W===62||W===96||un(W)?N(W):(e.consume(W),R)}function j(W){return W===47||W===62||Ut(W)?E(W):n(W)}function M(W){return W===62?(e.consume(W),B):n(W)}function B(W){return W===null||mt(W)?H(W):Ut(W)?(e.consume(W),B):n(W)}function H(W){return W===45&&s===2?(e.consume(W),U):W===60&&s===1?(e.consume(W),q):W===62&&s===4?(e.consume(W),Y):W===63&&s===3?(e.consume(W),O):W===93&&s===5?(e.consume(W),F):mt(W)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(kV,J,P)(W)):W===null||mt(W)?(e.exit("htmlFlowData"),P(W)):(e.consume(W),H)}function P(W){return e.check(RV,$,J)(W)}function $(W){return e.enter("lineEnding"),e.consume(W),e.exit("lineEnding"),ee}function ee(W){return W===null||mt(W)?P(W):(e.enter("htmlFlowData"),H(W))}function U(W){return W===45?(e.consume(W),O):H(W)}function q(W){return W===47?(e.consume(W),u="",K):H(W)}function K(W){if(W===62){const V=u.toLowerCase();return ck.includes(V)?(e.consume(W),Y):H(W)}return Sr(W)&&u.length<8?(e.consume(W),u+=String.fromCharCode(W),K):H(W)}function F(W){return W===93?(e.consume(W),O):H(W)}function O(W){return W===62?(e.consume(W),Y):W===45&&s===2?(e.consume(W),O):H(W)}function Y(W){return W===null||mt(W)?(e.exit("htmlFlowData"),J(W)):(e.consume(W),Y)}function J(W){return e.exit("htmlFlow"),t(W)}}function OV(e,t,n){const a=this;return s;function s(u){return mt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):n(u)}function o(u){return a.parser.lazy[a.now().line]?n(u):t(u)}}function LV(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Rd,t,n)}}const jV={name:"htmlText",tokenize:MV};function MV(e,t,n){const a=this;let s,o,u;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),N):O===63?(e.consume(O),E):Sr(O)?(e.consume(O),R):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),o=0,w):Sr(O)?(e.consume(O),_):n(O)}function p(O){return O===45?(e.consume(O),y):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),g):mt(O)?(u=m,q(O)):(e.consume(O),m)}function g(O){return O===45?(e.consume(O),y):m(O)}function y(O){return O===62?U(O):O===45?g(O):m(O)}function w(O){const Y="CDATA[";return O===Y.charCodeAt(o++)?(e.consume(O),o===Y.length?S:w):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),b):mt(O)?(u=S,q(O)):(e.consume(O),S)}function b(O){return O===93?(e.consume(O),v):S(O)}function v(O){return O===62?U(O):O===93?(e.consume(O),v):S(O)}function _(O){return O===null||O===62?U(O):mt(O)?(u=_,q(O)):(e.consume(O),_)}function E(O){return O===null?n(O):O===63?(e.consume(O),T):mt(O)?(u=E,q(O)):(e.consume(O),E)}function T(O){return O===62?U(O):E(O)}function N(O){return Sr(O)?(e.consume(O),k):n(O)}function k(O){return O===45||br(O)?(e.consume(O),k):L(O)}function L(O){return mt(O)?(u=L,q(O)):Ut(O)?(e.consume(O),L):U(O)}function R(O){return O===45||br(O)?(e.consume(O),R):O===47||O===62||un(O)?j(O):n(O)}function j(O){return O===47?(e.consume(O),U):O===58||O===95||Sr(O)?(e.consume(O),M):mt(O)?(u=j,q(O)):Ut(O)?(e.consume(O),j):U(O)}function M(O){return O===45||O===46||O===58||O===95||br(O)?(e.consume(O),M):B(O)}function B(O){return O===61?(e.consume(O),H):mt(O)?(u=B,q(O)):Ut(O)?(e.consume(O),B):j(O)}function H(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,P):mt(O)?(u=H,q(O)):Ut(O)?(e.consume(O),H):(e.consume(O),$)}function P(O){return O===s?(e.consume(O),s=void 0,ee):O===null?n(O):mt(O)?(u=P,q(O)):(e.consume(O),P)}function $(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||un(O)?j(O):(e.consume(O),$)}function ee(O){return O===47||O===62||un(O)?j(O):n(O)}function U(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function q(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),K}function K(O){return Ut(O)?Gt(e,F,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):F(O)}function F(O){return e.enter("htmlTextData"),u(O)}}const kv={name:"labelEnd",resolveAll:UV,resolveTo:HV,tokenize:$V},FV={tokenize:zV},PV={tokenize:GV},BV={tokenize:qV};function UV(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&ta(e,0,e.length,n),e}function HV(e,t){let n=e.length,a=0,s,o,u,c;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},p={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[u-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=da(c,e.slice(o+1,o+a+3)),c=da(c,[["enter",p,t]]),c=da(c,mm(t.parser.constructs.insideSpan.null,e.slice(o+a+4,u-3),t)),c=da(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=da(c,e.slice(u+1)),c=da(c,[["exit",d,t]]),ta(e,o,e.length,c),e}function $V(e,t,n){const a=this;let s=a.events.length,o,u;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return c;function c(g){return o?o._inactive?m(g):(u=a.parser.defined.includes(ka(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),d):n(g)}function d(g){return g===40?e.attempt(FV,p,u?p:m)(g):g===91?e.attempt(PV,p,u?h:m)(g):u?p(g):m(g)}function h(g){return e.attempt(BV,p,m)(g)}function p(g){return t(g)}function m(g){return o._balanced=!0,n(g)}}function zV(e,t,n){return a;function a(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return un(m)?Bu(e,o)(m):o(m)}function o(m){return m===41?p(m):kL(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return un(m)?Bu(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?DL(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return un(m)?Bu(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function GV(e,t,n){const a=this;return s;function s(c){return RL.call(a,e,o,u,"reference","referenceMarker","referenceString")(c)}function o(c){return a.parser.defined.includes(ka(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function qV(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const WV={name:"labelStartImage",resolveAll:kv.resolveAll,tokenize:VV};function VV(e,t,n){const a=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const YV={name:"labelStartLink",resolveAll:kv.resolveAll,tokenize:KV};function KV(e,t,n){const a=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(u):t(u)}}const k0={name:"lineEnding",tokenize:XV};function XV(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Gt(e,t,"linePrefix")}}const Vf={name:"thematicBreak",tokenize:ZV};function ZV(e,t,n){let a=0,s;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return s=h,c(h)}function c(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):a>=3&&(h===null||mt(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),a++,d):(e.exit("thematicBreakSequence"),Ut(h)?Gt(e,c,"whitespace")(h):c(h))}}const Fr={continuation:{tokenize:tY},exit:rY,name:"list",tokenize:eY},QV={partial:!0,tokenize:aY},JV={partial:!0,tokenize:nY};function eY(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const w=a.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!a.containerState.marker||y===a.containerState.marker:zx(y)){if(a.containerState.type||(a.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Vf,n,h)(y):h(y);if(!a.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return zx(y)&&++u<10?(e.consume(y),d):(!a.interrupt||u<2)&&(a.containerState.marker?y===a.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||y,e.check(Rd,a.interrupt?n:p,e.attempt(QV,g,m))}function p(y){return a.containerState.initialBlankLine=!0,o++,g(y)}function m(y){return Ut(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function tY(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Rd,s,o);function s(c){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Gt(e,t,"listItemIndent",a.containerState.size+1)(c)}function o(c){return a.containerState.furtherBlankLines||!Ut(c)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,u(c)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(JV,t,u)(c))}function u(c){return a.containerState._closeFlow=!0,a.interrupt=void 0,Gt(e,e.attempt(Fr,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function nY(e,t,n){const a=this;return Gt(e,s,"listItemIndent",a.containerState.size+1);function s(o){const u=a.events[a.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===a.containerState.size?t(o):n(o)}}function rY(e){e.exit(this.containerState.type)}function aY(e,t,n){const a=this;return Gt(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const u=a.events[a.events.length-1];return!Ut(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const uk={name:"setextUnderline",resolveTo:sY,tokenize:iY};function sY(e,t){let n=e.length,a,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const u={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",u,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=u,e.push(["exit",u,t]),e}function iY(e,t,n){const a=this;let s;return o;function o(h){let p=a.events.length,m;for(;p--;)if(a.events[p][1].type!=="lineEnding"&&a.events[p][1].type!=="linePrefix"&&a.events[p][1].type!=="content"){m=a.events[p][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||m)?(e.enter("setextHeadingLine"),s=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===s?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ut(h)?Gt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||mt(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const oY={tokenize:lY};function lY(e){const t=this,n=e.attempt(Rd,a,e.attempt(this.parser.constructs.flowInitial,s,Gt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(fV,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const cY={resolveAll:OL()},uY=IL("string"),dY=IL("text");function IL(e){return{resolveAll:OL(e==="text"?hY:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,u,c);return u;function u(p){return h(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),o(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=s[p];let g=-1;if(m)for(;++g<m.length;){const y=m[g];if(!y.previous||y.previous.call(a,a.previous))return!0}return!1}}}function OL(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function hY(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let o=s.length,u=-1,c=0,d;for(;o--;){const h=s[o];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:a.start._bufferIndex+u,_index:a.start._index+o,line:a.end.line,column:a.end.column-c,offset:a.end.offset-c},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const fY={42:Fr,43:Fr,45:Fr,48:Fr,49:Fr,50:Fr,51:Fr,52:Fr,53:Fr,54:Fr,55:Fr,56:Fr,57:Fr,62:CL},pY={91:xV},mY={[-2]:N0,[-1]:N0,32:N0},gY={35:wV,42:Vf,45:[uk,Vf],60:NV,61:uk,95:Vf,96:lk,126:lk},bY={38:AL,92:TL},xY={[-5]:k0,[-4]:k0,[-3]:k0,33:WV,38:AL,42:Gx,60:[YW,jV],91:YV,92:[_V,TL],93:kv,95:Gx,96:oV},yY={null:[Gx,cY]},vY={null:[42,95]},EY={null:[]},_Y=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vY,contentInitial:pY,disable:EY,document:fY,flow:gY,flowInitial:mY,insideSpan:yY,string:bY,text:xY},Symbol.toStringTag,{value:"Module"}));function SY(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let u=[],c=[];const d={attempt:L(N),check:L(k),consume:_,enter:E,exit:T,interrupt:L(k,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:g,sliceStream:y,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function m(B){return u=da(u,B),b(),u[u.length-1]!==null?[]:(R(t,0),h.events=mm(o,h.events,h),h.events)}function g(B,H){return CY(y(B),H)}function y(B){return wY(u,B)}function w(){const{_bufferIndex:B,_index:H,line:P,column:$,offset:ee}=a;return{_bufferIndex:B,_index:H,line:P,column:$,offset:ee}}function S(B){s[B.line]=B.column,M()}function b(){let B;for(;a._index<u.length;){const H=u[a._index];if(typeof H=="string")for(B=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===B&&a._bufferIndex<H.length;)v(H.charCodeAt(a._bufferIndex));else v(H)}}function v(B){p=p(B)}function _(B){mt(B)?(a.line++,a.column=1,a.offset+=B===-3?2:1,M()):B!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===u[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=B}function E(B,H){const P=H||{};return P.type=B,P.start=w(),h.events.push(["enter",P,h]),c.push(P),P}function T(B){const H=c.pop();return H.end=w(),h.events.push(["exit",H,h]),H}function N(B,H){R(B,H.from)}function k(B,H){H.restore()}function L(B,H){return P;function P($,ee,U){let q,K,F,O;return Array.isArray($)?J($):"tokenize"in $?J([$]):Y($);function Y(te){return X;function X(G){const ie=G!==null&&te[G],de=G!==null&&te.null,ce=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(de)?de:de?[de]:[]];return J(ce)(G)}}function J(te){return q=te,K=0,te.length===0?U:W(te[K])}function W(te){return X;function X(G){return O=j(),F=te,te.partial||(h.currentConstruct=te),te.name&&h.parser.constructs.disable.null.includes(te.name)?re():te.tokenize.call(H?Object.assign(Object.create(h),H):h,d,V,re)(G)}}function V(te){return B(F,O),ee}function re(te){return O.restore(),++K<q.length?W(q[K]):U}}}function R(B,H){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&ta(h.events,H,h.events.length-H,B.resolve(h.events.slice(H),h)),B.resolveTo&&(h.events=B.resolveTo(h.events,h))}function j(){const B=w(),H=h.previous,P=h.currentConstruct,$=h.events.length,ee=Array.from(c);return{from:$,restore:U};function U(){a=B,h.previous=H,h.currentConstruct=P,h.events.length=$,c=ee,M()}}function M(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function wY(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(a,o)];else{if(u=e.slice(n,s),a>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(a):u.shift()}o>0&&u.push(e[s].slice(0,o))}return u}function CY(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const o=e[n];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
|
|
586
586
|
`;break}case-3:{u=`\r
|
|
587
587
|
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(o)}s=o===-2,a.push(u)}return a.join("")}function TY(e){const a={constructs:SL([_Y,...(e||{}).extensions||[]]),content:s(HW),defined:[],document:s(zW),flow:s(oY),lazy:{},string:s(uY),text:s(dY)};return a;function s(o){return u;function u(c){return SY(a,o,c)}}}function AY(e){for(;!NL(e););return e}const dk=/[\0\t\n\r]/g;function NY(){let e=1,t="",n=!0,a;return s;function s(o,u,c){const d=[];let h,p,m,g,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(dk.lastIndex=m,h=dk.exec(o),g=h&&h.index!==void 0?h.index:o.length,y=o.charCodeAt(g),!h){t=o.slice(m);break}if(y===10&&m===g&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),m<g&&(d.push(o.slice(m,g)),e+=g-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}m=g+1}return c&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const kY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RY(e){return e.replace(kY,DY)}function DY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return wL(n.slice(o?2:1),o?16:10)}return id(n)||e}const LL={}.hasOwnProperty;function IY(e,t,n){return typeof t!="string"&&(n=t,t=void 0),OY(n)(AY(TY(n).document().write(NY()(e,t,!0))))}function OY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(It),autolinkProtocol:j,autolinkEmail:j,atxHeading:o(et),blockQuote:o(de),characterEscape:j,characterReference:j,codeFenced:o(ce),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(ce,u),codeText:o(fe,u),codeTextData:j,data:j,codeFlowValue:j,definition:o(Ue),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(De),hardBreakEscape:o(it),hardBreakTrailing:o(it),htmlFlow:o(Oe,u),htmlFlowData:j,htmlText:o(Oe,u),htmlTextData:j,image:o(qt),label:u,link:o(It),listItem:o(nn),listItemValue:g,listOrdered:o(St,m),listUnordered:o(St),paragraph:o(Mt),reference:W,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(et),strong:o(wt),thematicBreak:o(Ce)},exit:{atxHeading:d(),atxHeadingSequence:N,autolink:d(),autolinkEmail:ie,autolinkProtocol:G,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:te,characterReference:X,codeFenced:d(b),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:M,codeIndented:d(v),codeText:d(ee),codeTextData:M,data:M,definition:d(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:E,emphasis:d(),hardBreakEscape:d(H),hardBreakTrailing:d(H),htmlFlow:d(P),htmlFlowData:M,htmlText:d($),htmlTextData:M,image:d(q),label:F,labelText:K,lineEnding:B,link:d(U),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:V,resourceDestinationString:O,resourceTitleString:Y,resource:J,setextHeading:d(R),setextHeadingLineSequence:L,setextHeadingText:k,strong:d(),thematicBreak:d()}};jL(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(he){let _e={type:"root",children:[]};const Fe={stack:[_e],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Ze=[];let ut=-1;for(;++ut<he.length;)if(he[ut][1].type==="listOrdered"||he[ut][1].type==="listUnordered")if(he[ut][0]==="enter")Ze.push(ut);else{const Wt=Ze.pop();ut=s(he,Wt,ut)}for(ut=-1;++ut<he.length;){const Wt=t[he[ut][0]];LL.call(Wt,he[ut][1].type)&&Wt[he[ut][1].type].call(Object.assign({sliceSerialize:he[ut][2].sliceSerialize},Fe),he[ut][1])}if(Fe.tokenStack.length>0){const Wt=Fe.tokenStack[Fe.tokenStack.length-1];(Wt[1]||hk).call(Fe,void 0,Wt[0])}for(_e.position={start:ii(he.length>0?he[0][1].start:{line:1,column:1,offset:0}),end:ii(he.length>0?he[he.length-2][1].end:{line:1,column:1,offset:0})},ut=-1;++ut<t.transforms.length;)_e=t.transforms[ut](_e)||_e;return _e}function s(he,_e,Fe){let Ze=_e-1,ut=-1,Wt=!1,ht,on,On,Be;for(;++Ze<=Fe;){const Ke=he[Ze];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?ut++:ut--,Be=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(ht&&!Be&&!ut&&!On&&(On=Ze),Be=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Be=void 0}if(!ut&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||ut===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(ht){let vt=Ze;for(on=void 0;vt--;){const ft=he[vt];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;on&&(he[on][1].type="lineEndingBlank",Wt=!0),ft[1].type="lineEnding",on=vt}else if(!(ft[1].type==="linePrefix"||ft[1].type==="blockQuotePrefix"||ft[1].type==="blockQuotePrefixWhitespace"||ft[1].type==="blockQuoteMarker"||ft[1].type==="listItemIndent"))break}On&&(!on||On<on)&&(ht._spread=!0),ht.end=Object.assign({},on?he[on][1].start:Ke[1].end),he.splice(on||Ze,0,["exit",ht,Ke[2]]),Ze++,Fe++}if(Ke[1].type==="listItemPrefix"){const vt={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};ht=vt,he.splice(Ze,0,["enter",vt,Ke[2]]),Ze++,Fe++,On=void 0,Be=!0}}}return he[_e][1]._spread=Wt,Fe}function o(he,_e){return Fe;function Fe(Ze){c.call(this,he(Ze),Ze),_e&&_e.call(this,Ze)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(he,_e,Fe){this.stack[this.stack.length-1].children.push(he),this.stack.push(he),this.tokenStack.push([_e,Fe||void 0]),he.position={start:ii(_e.start),end:void 0}}function d(he){return _e;function _e(Fe){he&&he.call(this,Fe),h.call(this,Fe)}}function h(he,_e){const Fe=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==he.type&&(_e?_e.call(this,he,Ze[0]):(Ze[1]||hk).call(this,he,Ze[0]));else throw new Error("Cannot close `"+he.type+"` ("+Pu({start:he.start,end:he.end})+"): it’s not open");Fe.position.end=ii(he.end)}function p(){return Nv(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(he){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(he),10),this.data.expectingFirstListItemValue=void 0}}function y(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=he}function w(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=he}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.value=he.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.value=he.replace(/(\r?\n|\r)$/g,"")}function _(he){const _e=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=_e,Fe.identifier=ka(this.sliceSerialize(he)).toLowerCase()}function E(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.title=he}function T(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.url=he}function N(he){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Fe=this.sliceSerialize(he).length;_e.depth=Fe}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function L(he){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(he).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function j(he){const Fe=this.stack[this.stack.length-1].children;let Ze=Fe[Fe.length-1];(!Ze||Ze.type!=="text")&&(Ze=gn(),Ze.position={start:ii(he.start),end:void 0},Fe.push(Ze)),this.stack.push(Ze)}function M(he){const _e=this.stack.pop();_e.value+=this.sliceSerialize(he),_e.position.end=ii(he.end)}function B(he){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=_e.children[_e.children.length-1];Fe.position.end=ii(he.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(j.call(this,he),M.call(this,he))}function H(){this.data.atHardBreak=!0}function P(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.value=he}function $(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.value=he}function ee(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.value=he}function U(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=_e,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function q(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=_e,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function K(he){const _e=this.sliceSerialize(he),Fe=this.stack[this.stack.length-2];Fe.label=RY(_e),Fe.identifier=ka(_e).toLowerCase()}function F(){const he=this.stack[this.stack.length-1],_e=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const Ze=he.children;Fe.children=Ze}else Fe.alt=_e}function O(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.url=he}function Y(){const he=this.resume(),_e=this.stack[this.stack.length-1];_e.title=he}function J(){this.data.inReference=void 0}function W(){this.data.referenceType="collapsed"}function V(he){const _e=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=_e,Fe.identifier=ka(this.sliceSerialize(he)).toLowerCase(),this.data.referenceType="full"}function re(he){this.data.characterReferenceType=he.type}function te(he){const _e=this.sliceSerialize(he),Fe=this.data.characterReferenceType;let Ze;Fe?(Ze=wL(_e,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=id(_e);const ut=this.stack[this.stack.length-1];ut.value+=Ze}function X(he){const _e=this.stack.pop();_e.position.end=ii(he.end)}function G(he){M.call(this,he);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(he)}function ie(he){M.call(this,he);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(he)}function de(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function fe(){return{type:"inlineCode",value:""}}function Ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function et(){return{type:"heading",depth:0,children:[]}}function it(){return{type:"break"}}function Oe(){return{type:"html",value:""}}function qt(){return{type:"image",title:null,url:"",alt:null}}function It(){return{type:"link",title:null,url:"",children:[]}}function St(he){return{type:"list",ordered:he.type==="listOrdered",start:null,spread:he._spread,children:[]}}function nn(he){return{type:"listItem",spread:he._spread,checked:null,children:[]}}function Mt(){return{type:"paragraph",children:[]}}function wt(){return{type:"strong",children:[]}}function gn(){return{type:"text",value:""}}function Ce(){return{type:"thematicBreak"}}}function ii(e){return{line:e.line,column:e.column,offset:e.offset}}function jL(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?jL(e,a):LY(e,a)}}function LY(e,t){let n;for(n in t)if(LL.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function hk(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pu({start:t.start,end:t.end})+") is still open")}function ML(e){const t=this;t.parser=n;function n(a){return IY(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jY(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function MY(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
package/static/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
|
10
10
|
<title>Coconut - Agentic Development Environment</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-gdnIvn_s.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-DIVD0EVP.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body class="font-inter">
|