omnigateway 0.4.12 → 0.4.13

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.
Files changed (25) hide show
  1. package/README.md +86 -238
  2. package/bin/omni.js +868 -377
  3. package/gateway.js +864 -348
  4. package/package.json +1 -1
  5. package/public/assets/{CopyValue-By5BAgv7.js → CopyValue-C2DkO9Yz.js} +1 -1
  6. package/public/assets/{Rack-fDZClWZL.js → Rack-HM36SprU.js} +1 -1
  7. package/public/assets/{Toggle-ClEeOh0F.js → Toggle-CRrH9nDt.js} +1 -1
  8. package/public/assets/{TokenBreakdown-D70VeZ2N.js → TokenBreakdown-C2NsJnqO.js} +1 -1
  9. package/public/assets/{_app-CDPKnQ72.js → _app-DVpIsUid.js} +1 -1
  10. package/public/assets/{_app.accounts-Dz0ox4Br.js → _app.accounts-64d_cxir.js} +2 -2
  11. package/public/assets/{_app.console-hPUmmYjp.js → _app.console-BBuBmLRI.js} +1 -1
  12. package/public/assets/{_app.database-DGtP4NdG.js → _app.database-J9Ujio8l.js} +1 -1
  13. package/public/assets/{_app.index-COcCAmbH.js → _app.index-BX4yKEXO.js} +1 -1
  14. package/public/assets/{_app.keys-yTXTbKTA.js → _app.keys-2sKwhZJc.js} +1 -1
  15. package/public/assets/{_app.logs-BhMvO_Fx.js → _app.logs-DuHXYrZU.js} +1 -1
  16. package/public/assets/{_app.models-0S3rurIl.js → _app.models-B0kTfPtn.js} +1 -1
  17. package/public/assets/{_app.plugins._pluginId-B-ZDQNPU.js → _app.plugins._pluginId-BOXRBToU.js} +1 -1
  18. package/public/assets/{_app.settings-DTnFwTeA.js → _app.settings-DoaOUmc1.js} +1 -1
  19. package/public/assets/{_app.usage-C2-VLiq9.js → _app.usage-B5sxB40E.js} +1 -1
  20. package/public/assets/{index-COwhxKU7.js → index-iCfSaRSG.js} +2 -2
  21. package/public/assets/{login-DjfMomJJ.js → login-B9CJqU--.js} +1 -1
  22. package/public/assets/plus-DKapAGoR.js +1 -0
  23. package/public/assets/{trash-2-U2ViYZum.js → trash-2-DwMK-JrZ.js} +1 -1
  24. package/public/index.html +1 -1
  25. package/public/assets/plus-UDQ_BTEr.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnigateway",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "Self-hosted AI gateway with Anthropic- and OpenAI-compatible APIs, an admin console, and a CLI",
5
5
  "license": "MIT",
6
6
  "author": "Harismawan <mail@harismawan.com>",
@@ -1,4 +1,4 @@
1
- import{at as e,ut as t}from"./queries-CX9mStps.js";import{g as n}from"./Rack-fDZClWZL.js";import{useCallback as r,useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import l from"styled-components";var u=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d=n(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),f=n(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),p=n(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);function m(e){if(e===null||typeof getSelection!=`function`)return!1;let t=getSelection();if(t===null)return!1;try{let n=document.createRange();return n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),!0}catch{return!1}}async function h(e,t){if(typeof navigator<`u`&&navigator.clipboard!==void 0)try{return await navigator.clipboard.writeText(e),`copied`}catch{}let n=m(t??null);if(n&&typeof document.execCommand==`function`)try{if(document.execCommand(`copy`))return`copied`}catch{}return n?`selected`:`failed`}var g=l.div`
1
+ import{at as e,ut as t}from"./queries-CX9mStps.js";import{g as n}from"./Rack-HM36SprU.js";import{useCallback as r,useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import l from"styled-components";var u=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d=n(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),f=n(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),p=n(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);function m(e){if(e===null||typeof getSelection!=`function`)return!1;let t=getSelection();if(t===null)return!1;try{let n=document.createRange();return n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),!0}catch{return!1}}async function h(e,t){if(typeof navigator<`u`&&navigator.clipboard!==void 0)try{return await navigator.clipboard.writeText(e),`copied`}catch{}let n=m(t??null);if(n&&typeof document.execCommand==`function`)try{if(document.execCommand(`copy`))return`copied`}catch{}return n?`selected`:`failed`}var g=l.div`
2
2
  display: flex;
3
3
  align-items: stretch;
4
4
  gap: 0;
@@ -1,4 +1,4 @@
1
- import{$ as e,D as t,E as n,M as r,V as i,at as a,ct as o,dt as s,et as c,ft as l,it as u,k as d,lt as f,nt as p,st as m,ut as h,w as g}from"./queries-CX9mStps.js";import{t as _}from"./index-COwhxKU7.js";import{A as v,N as y,a as ee,i as b,j as x,s as te,x as ne}from"./States-DtkkMzEu.js";import*as S from"react";import{createContext as C,createElement as w,forwardRef as re,useContext as ie,useEffect as ae,useId as oe,useMemo as se,useState as T}from"react";import{Fragment as ce,jsx as E,jsxs as D}from"react/jsx-runtime";import*as le from"react-dom";import O,{css as ue}from"styled-components";import{LiveProvider as de,useLive as fe}from"@omnigateway/dashboard-sdk";var pe=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),me=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),he=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ge=e=>{let t=he(e);return t.charAt(0).toUpperCase()+t.slice(1)},_e={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`},ve=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ye=C({}),be=()=>ie(ye),xe=re(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=be()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return w(`svg`,{ref:c,..._e,width:t??l??_e.width,height:t??l??_e.height,stroke:e??f,strokeWidth:m,className:pe(`lucide`,p,i),...!a&&!ve(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>w(e,t)),...Array.isArray(a)?a:[a]])}),k=(e,t)=>{let n=re(({className:n,...r},i)=>w(xe,{ref:i,iconNode:t,className:pe(`lucide-${me(ge(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ge(e),n},Se=k(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Ce=k(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),we=k(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Te=k(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),Ee=k(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),De=k(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Oe=k(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),ke=k(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Ae=k(`monitor-cog`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`m14.305 7.53.923-.382`,key:`1mlnsw`}],[`path`,{d:`m15.228 4.852-.923-.383`,key:`82mpwg`}],[`path`,{d:`m16.852 3.228-.383-.924`,key:`ln4sir`}],[`path`,{d:`m16.852 8.772-.383.923`,key:`1dejw0`}],[`path`,{d:`m19.148 3.228.383-.924`,key:`192kgf`}],[`path`,{d:`m19.53 9.696-.382-.924`,key:`fiavlr`}],[`path`,{d:`m20.772 4.852.924-.383`,key:`1j8mgp`}],[`path`,{d:`m20.772 7.148.924.383`,key:`zix9be`}],[`path`,{d:`M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7`,key:`1tnzv8`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}]]),je=k(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Me=k(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),Ne=k(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Pe=k(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Fe=k(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Ie=k(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Le=k(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Re=k(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ze=Object.defineProperty,Be=(e,t)=>ze(e,`name`,{value:t,configurable:!0});function Ve(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Be(Ve,`setRef`);function He(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ve(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ve(e[t],null)}}}}Be(He,`composeRefs`);function A(...e){return S.useCallback(He(...e),e)}Be(A,`useComposedRefs`);var Ue=Object.defineProperty,j=(e,t)=>Ue(e,`name`,{value:t,configurable:!0});function We(e){let t=S.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Qe(r)&&typeof nt==`function`&&(r=nt(r._payload)),S.Children.forEach(r,e=>{if(Xe(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Qe(n)&&typeof nt==`function`&&(n=nt(n._payload)),a=qe(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=S.cloneElement(a,void 0,s):!o&&S.Children.count(r)===1&&S.isValidElement(r)&&(a=r);let c=a?Ye(a):void 0,l=A(n,c);if(!a){if(r||r===0)throw Error(o?tt(e):et(e));return r}let u=Je(i,a.props??{});return a.type!==S.Fragment&&(u.ref=n?l:c),S.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}j(We,`createSlot`);var Ge=Symbol.for(`radix.slottable`);function Ke(e){let t=j(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ge,t}j(Ke,`createSlottable`);var qe=j((e,t)=>{if(`child`in e.props){let t=e.props.child;return S.isValidElement(t)?S.cloneElement(t,void 0,e.props.children(t.props.children)):null}return S.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Je(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}j(Je,`mergeProps`);function Ye(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}j(Ye,`getElementRef`);function Xe(e){return S.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ge}j(Xe,`isSlottable`);var Ze=Symbol.for(`react.lazy`);function Qe(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ze&&`_payload`in e&&$e(e._payload)}j(Qe,`isLazyComponent`);function $e(e){return typeof e==`object`&&!!e&&`then`in e}j($e,`isPromiseLike`);var et=j(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),tt=j(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),nt=S.use,rt=Object.defineProperty,it=(e,t)=>rt(e,`name`,{value:t,configurable:!0}),M=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=We(`Primitive.${t}`),r=S.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),E(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function at(e,t){e&&le.flushSync(()=>e.dispatchEvent(t))}it(at,`dispatchDiscreteCustomEvent`);var ot=Object.defineProperty,N=(e,t)=>ot(e,`name`,{value:t,configurable:!0});function st(e,t){let n=S.createContext(t);n.displayName=e+`Context`;let r=N(e=>{let{children:t,...r}=e,i=S.useMemo(()=>r,Object.values(r));return E(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=S.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return N(i,`useContext`),[r,i]}N(st,`createContext`);function ct(e,t=[]){let n=[];function r(t,r){let i=S.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=N(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=S.useMemo(()=>o,Object.values(o));return E(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=S.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return N(s,`useContext`),[o,s]}N(r,`createContext`);let i=N(()=>{let t=n.map(e=>S.createContext(e));return N(function(n){let r=n?.[e]||t;return S.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,lt(i,...t)]}N(ct,`createContextScope`);function lt(...e){let t=e[0];if(e.length===1)return t;let n=N(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return N(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}N(lt,`composeContextScopes`);var ut=Object.defineProperty,P=(e,t)=>ut(e,`name`,{value:t,configurable:!0}),dt=!!(typeof window<`u`&&window.document&&window.document.createElement);function F(e,t,{checkForDefaultPrevented:n=!0}={}){return P(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}P(F,`composeEventHandlers`);function ft(e){if(!dt)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}P(ft,`getOwnerWindow`);function pt(e){if(!dt)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}P(pt,`getOwnerDocument`);function mt(e,t=!1){let{activeElement:n}=pt(e);if(!n?.nodeName)return null;if(ht(n)&&n.contentDocument)return mt(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=pt(n).getElementById(e);if(t)return t}}return n}P(mt,`getActiveElement`);function ht(e){return e.tagName===`IFRAME`}P(ht,`isFrame`);var I=globalThis?.document?S.useLayoutEffect:()=>{},gt=Object.defineProperty,_t=(e,t)=>gt(e,`name`,{value:t,configurable:!0}),vt=S.useEffectEvent,yt=S.useInsertionEffect;function bt(e){if(typeof vt==`function`)return vt(e);let t=S.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof yt==`function`?yt(()=>{t.current=e}):I(()=>{t.current=e}),S.useMemo(()=>((...e)=>t.current?.(...e)),[])}_t(bt,`useEffectEvent`);var xt=Object.defineProperty,L=(e,t)=>xt(e,`name`,{value:t,configurable:!0}),St=S.useInsertionEffect||I;function Ct({prop:e,defaultProp:t,onChange:n=L(()=>{},`onChange`),caller:r}){let[i,a,o]=wt({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,S.useCallback(t=>{if(s){let n=Tt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}L(Ct,`useControllableState`);function wt({defaultProp:e,onChange:t}){let[n,r]=S.useState(e),i=S.useRef(n),a=S.useRef(t);return St(()=>{a.current=t},[t]),S.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}L(wt,`useUncontrolledState`);function Tt(e){return typeof e==`function`}L(Tt,`isFunction`);var Et=Symbol(`RADIX:SYNC_STATE`);function Dt(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=bt(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=S.useReducer((t,n)=>{if(n.type===Et)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=S.useRef(p);S.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=S.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return S.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Et,state:i})},[i,d.state,c]),[h,f]}L(Dt,`useControllableStateReducer`);var Ot=Object.defineProperty,R=(e,t)=>Ot(e,`name`,{value:t,configurable:!0});function kt(e,t){return S.useReducer((e,n)=>t[e][n]??e,e)}R(kt,`useStateMachine`);var At=R(e=>{let{present:t,children:n}=e,r=jt(t),i=typeof n==`function`?n({present:r.isPresent}):S.Children.only(n),a=Nt(r.ref,Pt(i));return typeof n==`function`||r.isPresent?S.cloneElement(i,{ref:a}):null},`Presence`);function jt(e){let[t,n]=S.useState(),r=S.useRef(null),i=S.useRef(e),a=S.useRef(`none`),o=S.useRef(void 0),[s,c]=kt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return S.useEffect(()=>{s===`mounted`?(a.current=o.current??z(r.current),o.current=void 0):a.current=`none`},[s]),I(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=z(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),I(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=R(a=>{let o=z(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=R(e=>{e.target===t&&(a.current=z(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:S.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=z(t)}else r.current=null;n(e)},[])}}R(jt,`usePresence`);function Mt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}R(Mt,`setRef`);function Nt(...e){let t=S.useRef(e);return t.current=e,S.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Mt(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Mt(n[e],null)}}},[])}R(Nt,`useStableComposedRefs`);function z(e){return e?.animationName||`none`}R(z,`getAnimationName`);function Pt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}R(Pt,`getElementRef`);var Ft=Object.defineProperty,It=(e,t)=>Ft(e,`name`,{value:t,configurable:!0}),Lt=S.useId||(()=>void 0),Rt=0;function zt(e){let[t,n]=S.useState(Lt());return I(()=>{e||n(e=>e??String(Rt++))},[e]),e||(t?`radix-${t}`:``)}It(zt,`useId`);var Bt=Object.defineProperty,Vt=(e,t)=>Bt(e,`name`,{value:t,configurable:!0});function B(e){let t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>((...e)=>t.current?.(...e)),[])}Vt(B,`useCallbackRef`);var Ht=Object.defineProperty,V=(e,t)=>Ht(e,`name`,{value:t,configurable:!0}),Ut=`dismissableLayer.update`,Wt=`dismissableLayer.pointerDownOutside`,Gt=`dismissableLayer.focusOutside`,Kt,qt=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Jt=S.forwardRef(V(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=S.useContext(qt),[d,f]=S.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=S.useState({}),h=A(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,ee=u.layersWithOutsidePointerEventsDisabled.size>0,b=y>=v,x=S.useRef(!1),te=Zt(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:x,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:S.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return b&&!t},[u.branches,b])}),ne=Qt(e=>{if(r&&x.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),C=d?y===g.length-1:!1,w=B(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return S.useEffect(()=>{if(C)return p.addEventListener(`keydown`,w,{capture:!0}),()=>p.removeEventListener(`keydown`,w,{capture:!0})},[p,C,w]),S.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Kt=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),$t(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Kt))}},[d,p,n,u]),S.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),$t())},[d,u]),S.useEffect(()=>{let e=V(()=>m({}),`handleUpdate`);return document.addEventListener(Ut,e),()=>document.removeEventListener(Ut,e)},[]),E(M.div,{...l,ref:h,style:{pointerEvents:ee?b?`auto`:`none`:void 0,...e.style},onFocusCapture:F(e.onFocusCapture,ne.onFocusCapture),onBlurCapture:F(e.onBlurCapture,ne.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,te.onPointerDownCapture)})},`DismissableLayer`));function Yt(){let e=S.useContext(qt),[t,n]=S.useState(null);return S.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}V(Yt,`useDismissableLayerSurface`);var Xt=V(()=>!0,`IS_TRUE`);function Zt(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Xt}=t,s=B(e),c=S.useRef(!1),l=S.useRef(!1),u=S.useRef(new Map),d=S.useRef(()=>{});return S.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}V(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}V(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}V(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}V(p,`handleInteractionBubble`);let m=V(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||en(Wt,s,p,{discrete:!0})};if(V(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:V(()=>c.current=!0,`onPointerDownCapture`)}}V(Zt,`usePointerDownOutside`);function Qt(e,t=globalThis?.document){let n=B(e),r=S.useRef(!1);return S.useEffect(()=>{let e=V(e=>{e.target&&!r.current&&en(Gt,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:V(()=>r.current=!0,`onFocusCapture`),onBlurCapture:V(()=>r.current=!1,`onBlurCapture`)}}V(Qt,`useFocusOutside`);function $t(){let e=new CustomEvent(Ut);document.dispatchEvent(e)}V($t,`dispatchUpdate`);function en(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?at(i,a):i.dispatchEvent(a)}V(en,`handleAndDispatchCustomEvent`);var tn=Object.defineProperty,H=(e,t)=>tn(e,`name`,{value:t,configurable:!0}),nn=`focusScope.autoFocusOnMount`,rn=`focusScope.autoFocusOnUnmount`,an={bubbles:!1,cancelable:!0},on=S.forwardRef(H(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=S.useState(null),l=B(i),u=B(a),d=S.useRef(null),f=A(t,c),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:U(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||U(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&U(s)};H(e,`handleFocusIn`),H(t,`handleFocusOut`),H(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),S.useEffect(()=>{if(s){pn.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(nn,an);s.addEventListener(nn,l),s.dispatchEvent(t),t.defaultPrevented||(sn(gn(ln(s)),{select:!0}),document.activeElement===e&&U(s))}return()=>{s.removeEventListener(nn,l),setTimeout(()=>{let t=new CustomEvent(rn,an);s.addEventListener(rn,u),s.dispatchEvent(t),t.defaultPrevented||U(e??document.body,{select:!0}),s.removeEventListener(rn,u),pn.remove(p)},0)}}},[s,l,u,p]);let m=S.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=cn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&U(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&U(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return E(M.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function sn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(U(r,{select:t}),document.activeElement!==n)return}H(sn,`focusFirst`);function cn(e){let t=ln(e);return[un(t,e),un(t.reverse(),e)]}H(cn,`getTabbableEdges`);function ln(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:H(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}H(ln,`getTabbableCandidates`);function un(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):dn(r,{upTo:t})))return r}H(un,`findVisible`);function dn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}H(dn,`isHidden`);function fn(e){return e instanceof HTMLInputElement&&`select`in e}H(fn,`isSelectableInput`);function U(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fn(e)&&t&&e.select()}}H(U,`focus`);var pn=mn();function mn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=hn(e,t),e.unshift(t)},remove(t){e=hn(e,t),e[0]?.resume()}}}H(mn,`createFocusScopesStack`);function hn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}H(hn,`arrayRemove`);function gn(e){return e.filter(e=>e.tagName!==`A`)}H(gn,`removeLinks`);var _n=Object.defineProperty,vn=S.forwardRef(((e,t)=>_n(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=S.useState(!1);I(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?le.createPortal(E(M.div,{...r,ref:t}),o):null},`Portal`)),yn=Object.defineProperty,bn=(e,t)=>yn(e,`name`,{value:t,configurable:!0}),xn=0,W=null;function Sn(e){return Cn(),e.children}bn(Sn,`FocusGuards`);function Cn(){S.useEffect(()=>{W||={start:wn(),end:wn()};let{start:e,end:t}=W;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),xn++,()=>{xn===1&&(W?.start.remove(),W?.end.remove(),W=null),xn=Math.max(0,xn-1)}},[])}bn(Cn,`useFocusGuards`);function wn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}bn(wn,`createFocusGuard`);var G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},G.apply(this,arguments)};function Tn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function En(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Dn=`right-scroll-bar-position`,On=`width-before-scroll-bar`,kn=`with-scroll-bars-hidden`,An=`--removed-body-scroll-bar-size`;function jn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Mn(e,t){var n=T(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Nn=typeof window<`u`?S.useLayoutEffect:S.useEffect,Pn=new WeakMap;function Fn(e,t){var n=Mn(t||null,function(t){return e.forEach(function(e){return jn(e,t)})});return Nn(function(){var t=Pn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||jn(e,null)}),i.forEach(function(e){r.has(e)||jn(e,a)})}Pn.set(n,e)},[e]),n}function In(e){return e}function Ln(e,t){t===void 0&&(t=In);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Rn(e){e===void 0&&(e={});var t=Ln(null);return t.options=G({async:!0,ssr:!1},e),t}var zn=function(e){var t=e.sideCar,n=Tn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return S.createElement(r,G({},n))};zn.isSideCarExport=!0;function Bn(e,t){return e.useMedium(t),zn}var Vn=Rn(),Hn=function(){},Un=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:Hn,onWheelCapture:Hn,onTouchMoveCapture:Hn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,ee=Tn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),b=f,x=Fn([n,t]),te=G(G({},ee),i);return S.createElement(S.Fragment,null,u&&S.createElement(b,{sideCar:Vn,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?S.cloneElement(S.Children.only(s),G(G({},te),{ref:x})):S.createElement(v,G({},te,{className:c,ref:x}),s))});Un.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Un.classNames={fullWidth:On,zeroRight:Dn};var Wn,Gn=function(){if(Wn)return Wn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Kn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Gn();return t&&e.setAttribute(`nonce`,t),e}function qn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Jn(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Yn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Kn())&&(qn(t,n),Jn(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xn=function(){var e=Yn();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Zn=function(){var e=Xn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Qn={left:0,top:0,right:0,gap:0},$n=function(e){return parseInt(e||``,10)||0},er=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[$n(n),$n(r),$n(i)]},tr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Qn;var t=er(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nr=Zn(),K=`data-scroll-locked`,rr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
1
+ import{$ as e,D as t,E as n,M as r,V as i,at as a,ct as o,dt as s,et as c,ft as l,it as u,k as d,lt as f,nt as p,st as m,ut as h,w as g}from"./queries-CX9mStps.js";import{t as _}from"./index-iCfSaRSG.js";import{A as v,N as y,a as ee,i as b,j as x,s as te,x as ne}from"./States-DtkkMzEu.js";import*as S from"react";import{createContext as C,createElement as w,forwardRef as re,useContext as ie,useEffect as ae,useId as oe,useMemo as se,useState as T}from"react";import{Fragment as ce,jsx as E,jsxs as D}from"react/jsx-runtime";import*as le from"react-dom";import O,{css as ue}from"styled-components";import{LiveProvider as de,useLive as fe}from"@omnigateway/dashboard-sdk";var pe=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),me=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),he=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ge=e=>{let t=he(e);return t.charAt(0).toUpperCase()+t.slice(1)},_e={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`},ve=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ye=C({}),be=()=>ie(ye),xe=re(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=be()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return w(`svg`,{ref:c,..._e,width:t??l??_e.width,height:t??l??_e.height,stroke:e??f,strokeWidth:m,className:pe(`lucide`,p,i),...!a&&!ve(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>w(e,t)),...Array.isArray(a)?a:[a]])}),k=(e,t)=>{let n=re(({className:n,...r},i)=>w(xe,{ref:i,iconNode:t,className:pe(`lucide-${me(ge(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ge(e),n},Se=k(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Ce=k(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),we=k(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Te=k(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),Ee=k(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),De=k(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Oe=k(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),ke=k(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Ae=k(`monitor-cog`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`m14.305 7.53.923-.382`,key:`1mlnsw`}],[`path`,{d:`m15.228 4.852-.923-.383`,key:`82mpwg`}],[`path`,{d:`m16.852 3.228-.383-.924`,key:`ln4sir`}],[`path`,{d:`m16.852 8.772-.383.923`,key:`1dejw0`}],[`path`,{d:`m19.148 3.228.383-.924`,key:`192kgf`}],[`path`,{d:`m19.53 9.696-.382-.924`,key:`fiavlr`}],[`path`,{d:`m20.772 4.852.924-.383`,key:`1j8mgp`}],[`path`,{d:`m20.772 7.148.924.383`,key:`zix9be`}],[`path`,{d:`M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7`,key:`1tnzv8`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}]]),je=k(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Me=k(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),Ne=k(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Pe=k(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Fe=k(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Ie=k(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Le=k(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Re=k(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ze=Object.defineProperty,Be=(e,t)=>ze(e,`name`,{value:t,configurable:!0});function Ve(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Be(Ve,`setRef`);function He(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ve(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ve(e[t],null)}}}}Be(He,`composeRefs`);function A(...e){return S.useCallback(He(...e),e)}Be(A,`useComposedRefs`);var Ue=Object.defineProperty,j=(e,t)=>Ue(e,`name`,{value:t,configurable:!0});function We(e){let t=S.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Qe(r)&&typeof nt==`function`&&(r=nt(r._payload)),S.Children.forEach(r,e=>{if(Xe(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Qe(n)&&typeof nt==`function`&&(n=nt(n._payload)),a=qe(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=S.cloneElement(a,void 0,s):!o&&S.Children.count(r)===1&&S.isValidElement(r)&&(a=r);let c=a?Ye(a):void 0,l=A(n,c);if(!a){if(r||r===0)throw Error(o?tt(e):et(e));return r}let u=Je(i,a.props??{});return a.type!==S.Fragment&&(u.ref=n?l:c),S.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}j(We,`createSlot`);var Ge=Symbol.for(`radix.slottable`);function Ke(e){let t=j(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ge,t}j(Ke,`createSlottable`);var qe=j((e,t)=>{if(`child`in e.props){let t=e.props.child;return S.isValidElement(t)?S.cloneElement(t,void 0,e.props.children(t.props.children)):null}return S.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Je(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}j(Je,`mergeProps`);function Ye(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}j(Ye,`getElementRef`);function Xe(e){return S.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ge}j(Xe,`isSlottable`);var Ze=Symbol.for(`react.lazy`);function Qe(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ze&&`_payload`in e&&$e(e._payload)}j(Qe,`isLazyComponent`);function $e(e){return typeof e==`object`&&!!e&&`then`in e}j($e,`isPromiseLike`);var et=j(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),tt=j(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),nt=S.use,rt=Object.defineProperty,it=(e,t)=>rt(e,`name`,{value:t,configurable:!0}),M=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=We(`Primitive.${t}`),r=S.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),E(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function at(e,t){e&&le.flushSync(()=>e.dispatchEvent(t))}it(at,`dispatchDiscreteCustomEvent`);var ot=Object.defineProperty,N=(e,t)=>ot(e,`name`,{value:t,configurable:!0});function st(e,t){let n=S.createContext(t);n.displayName=e+`Context`;let r=N(e=>{let{children:t,...r}=e,i=S.useMemo(()=>r,Object.values(r));return E(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=S.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return N(i,`useContext`),[r,i]}N(st,`createContext`);function ct(e,t=[]){let n=[];function r(t,r){let i=S.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=N(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=S.useMemo(()=>o,Object.values(o));return E(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=S.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return N(s,`useContext`),[o,s]}N(r,`createContext`);let i=N(()=>{let t=n.map(e=>S.createContext(e));return N(function(n){let r=n?.[e]||t;return S.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,lt(i,...t)]}N(ct,`createContextScope`);function lt(...e){let t=e[0];if(e.length===1)return t;let n=N(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return N(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}N(lt,`composeContextScopes`);var ut=Object.defineProperty,P=(e,t)=>ut(e,`name`,{value:t,configurable:!0}),dt=!!(typeof window<`u`&&window.document&&window.document.createElement);function F(e,t,{checkForDefaultPrevented:n=!0}={}){return P(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}P(F,`composeEventHandlers`);function ft(e){if(!dt)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}P(ft,`getOwnerWindow`);function pt(e){if(!dt)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}P(pt,`getOwnerDocument`);function mt(e,t=!1){let{activeElement:n}=pt(e);if(!n?.nodeName)return null;if(ht(n)&&n.contentDocument)return mt(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=pt(n).getElementById(e);if(t)return t}}return n}P(mt,`getActiveElement`);function ht(e){return e.tagName===`IFRAME`}P(ht,`isFrame`);var I=globalThis?.document?S.useLayoutEffect:()=>{},gt=Object.defineProperty,_t=(e,t)=>gt(e,`name`,{value:t,configurable:!0}),vt=S.useEffectEvent,yt=S.useInsertionEffect;function bt(e){if(typeof vt==`function`)return vt(e);let t=S.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof yt==`function`?yt(()=>{t.current=e}):I(()=>{t.current=e}),S.useMemo(()=>((...e)=>t.current?.(...e)),[])}_t(bt,`useEffectEvent`);var xt=Object.defineProperty,L=(e,t)=>xt(e,`name`,{value:t,configurable:!0}),St=S.useInsertionEffect||I;function Ct({prop:e,defaultProp:t,onChange:n=L(()=>{},`onChange`),caller:r}){let[i,a,o]=wt({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,S.useCallback(t=>{if(s){let n=Tt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}L(Ct,`useControllableState`);function wt({defaultProp:e,onChange:t}){let[n,r]=S.useState(e),i=S.useRef(n),a=S.useRef(t);return St(()=>{a.current=t},[t]),S.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}L(wt,`useUncontrolledState`);function Tt(e){return typeof e==`function`}L(Tt,`isFunction`);var Et=Symbol(`RADIX:SYNC_STATE`);function Dt(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=bt(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=S.useReducer((t,n)=>{if(n.type===Et)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=S.useRef(p);S.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=S.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return S.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Et,state:i})},[i,d.state,c]),[h,f]}L(Dt,`useControllableStateReducer`);var Ot=Object.defineProperty,R=(e,t)=>Ot(e,`name`,{value:t,configurable:!0});function kt(e,t){return S.useReducer((e,n)=>t[e][n]??e,e)}R(kt,`useStateMachine`);var At=R(e=>{let{present:t,children:n}=e,r=jt(t),i=typeof n==`function`?n({present:r.isPresent}):S.Children.only(n),a=Nt(r.ref,Pt(i));return typeof n==`function`||r.isPresent?S.cloneElement(i,{ref:a}):null},`Presence`);function jt(e){let[t,n]=S.useState(),r=S.useRef(null),i=S.useRef(e),a=S.useRef(`none`),o=S.useRef(void 0),[s,c]=kt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return S.useEffect(()=>{s===`mounted`?(a.current=o.current??z(r.current),o.current=void 0):a.current=`none`},[s]),I(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=z(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),I(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=R(a=>{let o=z(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=R(e=>{e.target===t&&(a.current=z(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:S.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=z(t)}else r.current=null;n(e)},[])}}R(jt,`usePresence`);function Mt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}R(Mt,`setRef`);function Nt(...e){let t=S.useRef(e);return t.current=e,S.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Mt(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Mt(n[e],null)}}},[])}R(Nt,`useStableComposedRefs`);function z(e){return e?.animationName||`none`}R(z,`getAnimationName`);function Pt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}R(Pt,`getElementRef`);var Ft=Object.defineProperty,It=(e,t)=>Ft(e,`name`,{value:t,configurable:!0}),Lt=S.useId||(()=>void 0),Rt=0;function zt(e){let[t,n]=S.useState(Lt());return I(()=>{e||n(e=>e??String(Rt++))},[e]),e||(t?`radix-${t}`:``)}It(zt,`useId`);var Bt=Object.defineProperty,Vt=(e,t)=>Bt(e,`name`,{value:t,configurable:!0});function B(e){let t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>((...e)=>t.current?.(...e)),[])}Vt(B,`useCallbackRef`);var Ht=Object.defineProperty,V=(e,t)=>Ht(e,`name`,{value:t,configurable:!0}),Ut=`dismissableLayer.update`,Wt=`dismissableLayer.pointerDownOutside`,Gt=`dismissableLayer.focusOutside`,Kt,qt=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Jt=S.forwardRef(V(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=S.useContext(qt),[d,f]=S.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=S.useState({}),h=A(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,ee=u.layersWithOutsidePointerEventsDisabled.size>0,b=y>=v,x=S.useRef(!1),te=Zt(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:x,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:S.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return b&&!t},[u.branches,b])}),ne=Qt(e=>{if(r&&x.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),C=d?y===g.length-1:!1,w=B(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return S.useEffect(()=>{if(C)return p.addEventListener(`keydown`,w,{capture:!0}),()=>p.removeEventListener(`keydown`,w,{capture:!0})},[p,C,w]),S.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Kt=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),$t(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Kt))}},[d,p,n,u]),S.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),$t())},[d,u]),S.useEffect(()=>{let e=V(()=>m({}),`handleUpdate`);return document.addEventListener(Ut,e),()=>document.removeEventListener(Ut,e)},[]),E(M.div,{...l,ref:h,style:{pointerEvents:ee?b?`auto`:`none`:void 0,...e.style},onFocusCapture:F(e.onFocusCapture,ne.onFocusCapture),onBlurCapture:F(e.onBlurCapture,ne.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,te.onPointerDownCapture)})},`DismissableLayer`));function Yt(){let e=S.useContext(qt),[t,n]=S.useState(null);return S.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}V(Yt,`useDismissableLayerSurface`);var Xt=V(()=>!0,`IS_TRUE`);function Zt(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Xt}=t,s=B(e),c=S.useRef(!1),l=S.useRef(!1),u=S.useRef(new Map),d=S.useRef(()=>{});return S.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}V(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}V(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}V(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}V(p,`handleInteractionBubble`);let m=V(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||en(Wt,s,p,{discrete:!0})};if(V(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:V(()=>c.current=!0,`onPointerDownCapture`)}}V(Zt,`usePointerDownOutside`);function Qt(e,t=globalThis?.document){let n=B(e),r=S.useRef(!1);return S.useEffect(()=>{let e=V(e=>{e.target&&!r.current&&en(Gt,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:V(()=>r.current=!0,`onFocusCapture`),onBlurCapture:V(()=>r.current=!1,`onBlurCapture`)}}V(Qt,`useFocusOutside`);function $t(){let e=new CustomEvent(Ut);document.dispatchEvent(e)}V($t,`dispatchUpdate`);function en(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?at(i,a):i.dispatchEvent(a)}V(en,`handleAndDispatchCustomEvent`);var tn=Object.defineProperty,H=(e,t)=>tn(e,`name`,{value:t,configurable:!0}),nn=`focusScope.autoFocusOnMount`,rn=`focusScope.autoFocusOnUnmount`,an={bubbles:!1,cancelable:!0},on=S.forwardRef(H(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=S.useState(null),l=B(i),u=B(a),d=S.useRef(null),f=A(t,c),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:U(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||U(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&U(s)};H(e,`handleFocusIn`),H(t,`handleFocusOut`),H(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),S.useEffect(()=>{if(s){pn.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(nn,an);s.addEventListener(nn,l),s.dispatchEvent(t),t.defaultPrevented||(sn(gn(ln(s)),{select:!0}),document.activeElement===e&&U(s))}return()=>{s.removeEventListener(nn,l),setTimeout(()=>{let t=new CustomEvent(rn,an);s.addEventListener(rn,u),s.dispatchEvent(t),t.defaultPrevented||U(e??document.body,{select:!0}),s.removeEventListener(rn,u),pn.remove(p)},0)}}},[s,l,u,p]);let m=S.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=cn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&U(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&U(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return E(M.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function sn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(U(r,{select:t}),document.activeElement!==n)return}H(sn,`focusFirst`);function cn(e){let t=ln(e);return[un(t,e),un(t.reverse(),e)]}H(cn,`getTabbableEdges`);function ln(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:H(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}H(ln,`getTabbableCandidates`);function un(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):dn(r,{upTo:t})))return r}H(un,`findVisible`);function dn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}H(dn,`isHidden`);function fn(e){return e instanceof HTMLInputElement&&`select`in e}H(fn,`isSelectableInput`);function U(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fn(e)&&t&&e.select()}}H(U,`focus`);var pn=mn();function mn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=hn(e,t),e.unshift(t)},remove(t){e=hn(e,t),e[0]?.resume()}}}H(mn,`createFocusScopesStack`);function hn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}H(hn,`arrayRemove`);function gn(e){return e.filter(e=>e.tagName!==`A`)}H(gn,`removeLinks`);var _n=Object.defineProperty,vn=S.forwardRef(((e,t)=>_n(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=S.useState(!1);I(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?le.createPortal(E(M.div,{...r,ref:t}),o):null},`Portal`)),yn=Object.defineProperty,bn=(e,t)=>yn(e,`name`,{value:t,configurable:!0}),xn=0,W=null;function Sn(e){return Cn(),e.children}bn(Sn,`FocusGuards`);function Cn(){S.useEffect(()=>{W||={start:wn(),end:wn()};let{start:e,end:t}=W;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),xn++,()=>{xn===1&&(W?.start.remove(),W?.end.remove(),W=null),xn=Math.max(0,xn-1)}},[])}bn(Cn,`useFocusGuards`);function wn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}bn(wn,`createFocusGuard`);var G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},G.apply(this,arguments)};function Tn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function En(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Dn=`right-scroll-bar-position`,On=`width-before-scroll-bar`,kn=`with-scroll-bars-hidden`,An=`--removed-body-scroll-bar-size`;function jn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Mn(e,t){var n=T(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Nn=typeof window<`u`?S.useLayoutEffect:S.useEffect,Pn=new WeakMap;function Fn(e,t){var n=Mn(t||null,function(t){return e.forEach(function(e){return jn(e,t)})});return Nn(function(){var t=Pn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||jn(e,null)}),i.forEach(function(e){r.has(e)||jn(e,a)})}Pn.set(n,e)},[e]),n}function In(e){return e}function Ln(e,t){t===void 0&&(t=In);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Rn(e){e===void 0&&(e={});var t=Ln(null);return t.options=G({async:!0,ssr:!1},e),t}var zn=function(e){var t=e.sideCar,n=Tn(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return S.createElement(r,G({},n))};zn.isSideCarExport=!0;function Bn(e,t){return e.useMedium(t),zn}var Vn=Rn(),Hn=function(){},Un=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:Hn,onWheelCapture:Hn,onTouchMoveCapture:Hn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,ee=Tn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),b=f,x=Fn([n,t]),te=G(G({},ee),i);return S.createElement(S.Fragment,null,u&&S.createElement(b,{sideCar:Vn,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?S.cloneElement(S.Children.only(s),G(G({},te),{ref:x})):S.createElement(v,G({},te,{className:c,ref:x}),s))});Un.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Un.classNames={fullWidth:On,zeroRight:Dn};var Wn,Gn=function(){if(Wn)return Wn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Kn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Gn();return t&&e.setAttribute(`nonce`,t),e}function qn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Jn(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Yn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Kn())&&(qn(t,n),Jn(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xn=function(){var e=Yn();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Zn=function(){var e=Xn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Qn={left:0,top:0,right:0,gap:0},$n=function(e){return parseInt(e||``,10)||0},er=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[$n(n),$n(r),$n(i)]},tr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Qn;var t=er(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nr=Zn(),K=`data-scroll-locked`,rr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
2
  .${kn} {
3
3
  overflow: hidden ${r};
4
4
  padding-right: ${s}px ${r};
@@ -1,4 +1,4 @@
1
- import{c as e,d as t,f as n,l as r,p as i,u as a}from"./Rack-fDZClWZL.js";import*as o from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import u from"styled-components";var d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e){let[t,n]=o.useState(void 0);return r(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}f(p,`useSize`);var m=Object.defineProperty,h=(e,t)=>m(e,`name`,{value:t,configurable:!0}),g=`Switch`,[_,v]=t(g),[y,b]=_(g);function x(t){let{__scopeSwitch:n,checked:r,children:i,defaultChecked:a,disabled:s,form:l,name:u,onCheckedChange:d,required:f,value:p=`on`,internal_do_not_use_render:m}=t,[h,_]=e({prop:r,defaultProp:a??!1,onChange:d,caller:g}),[v,b]=o.useState(null),[x,S]=o.useState(null),C=o.useRef(!1),[w,T]=o.useReducer(e=>e+1,0),E={checked:h,setChecked:_,disabled:s,control:v,setControl:b,name:u,form:l,value:p,hasConsumerStoppedPropagationRef:C,userInteractionCount:w,onUserInteraction:T,required:f,defaultChecked:a,isFormControl:!v||!!l||!!v.closest(`form`),bubbleInput:x,setBubbleInput:S};return c(y,{scope:n,...E,children:k(m)?m(E):i})}h(x,`SwitchProvider`);var S=`SwitchTrigger`,C=o.forwardRef(h(function({__scopeSwitch:e,onClick:t,...r},s){let{control:l,form:u,value:d,disabled:f,checked:p,required:m,setControl:g,setChecked:_,hasConsumerStoppedPropagationRef:v,onUserInteraction:y,isFormControl:x,bubbleInput:C}=b(S,e),w=i(s,g),T=o.useRef(p);return o.useEffect(()=>{let e=u?l?.ownerDocument.getElementById(u):l?.form;if(e instanceof HTMLFormElement){let t=h(()=>_(T.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[l,u,_]),c(n.button,{type:`button`,role:`switch`,"aria-checked":p,"aria-required":m,"data-state":A(p),"data-disabled":f?``:void 0,disabled:f,value:d,...r,ref:w,onClick:a(t,e=>{y(),_(e=>!e),C&&x&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})},`SwitchTrigger`)),w=o.forwardRef(h(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:u,value:d,onCheckedChange:f,form:p,...m}=e;return c(x,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:u,required:o,onCheckedChange:f,name:r,form:p,value:d,internal_do_not_use_render:({isFormControl:e})=>l(s,{children:[c(C,{...m,ref:t,__scopeSwitch:n}),e&&c(O,{__scopeSwitch:n})]})})},`Switch`)),T=`SwitchThumb`,E=o.forwardRef(h(function(e,t){let{__scopeSwitch:r,...i}=e,a=b(T,r);return c(n.span,{"data-state":A(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})},`SwitchThumb`)),D=`SwitchBubbleInput`,O=o.forwardRef(h(function({__scopeSwitch:e,onClick:t,...r},s){let{control:l,hasConsumerStoppedPropagationRef:u,userInteractionCount:d,checked:f,defaultChecked:m,required:h,disabled:g,name:_,value:v,form:y,bubbleInput:x,setBubbleInput:S}=b(D,e),C=i(s,S),w=p(l),T=o.useRef(!1),E=o.useRef(f),O=o.useRef(d);o.useEffect(()=>{let e=x;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=d!==O.current;O.current=d;let i=E.current!==f;E.current=f;let a=!(r&&u.current);if(i&&n){T.current=!r;let t=new Event(`click`,{bubbles:a});n.call(e,f),e.dispatchEvent(t),T.current=!1}},[x,f,u,d]);let k=o.useRef(f);return c(n.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:m??k.current,required:h,disabled:g,name:_,value:v,form:y,...r,tabIndex:-1,ref:C,onClick:a(t,e=>{T.current&&e.stopPropagation()}),style:{...r.style,...w,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function k(e){return typeof e==`function`}h(k,`isFunction`);function A(e){return e?`checked`:`unchecked`}h(A,`getState`);var j=u(w)`
1
+ import{c as e,d as t,f as n,l as r,p as i,u as a}from"./Rack-HM36SprU.js";import*as o from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import u from"styled-components";var d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e){let[t,n]=o.useState(void 0);return r(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}f(p,`useSize`);var m=Object.defineProperty,h=(e,t)=>m(e,`name`,{value:t,configurable:!0}),g=`Switch`,[_,v]=t(g),[y,b]=_(g);function x(t){let{__scopeSwitch:n,checked:r,children:i,defaultChecked:a,disabled:s,form:l,name:u,onCheckedChange:d,required:f,value:p=`on`,internal_do_not_use_render:m}=t,[h,_]=e({prop:r,defaultProp:a??!1,onChange:d,caller:g}),[v,b]=o.useState(null),[x,S]=o.useState(null),C=o.useRef(!1),[w,T]=o.useReducer(e=>e+1,0),E={checked:h,setChecked:_,disabled:s,control:v,setControl:b,name:u,form:l,value:p,hasConsumerStoppedPropagationRef:C,userInteractionCount:w,onUserInteraction:T,required:f,defaultChecked:a,isFormControl:!v||!!l||!!v.closest(`form`),bubbleInput:x,setBubbleInput:S};return c(y,{scope:n,...E,children:k(m)?m(E):i})}h(x,`SwitchProvider`);var S=`SwitchTrigger`,C=o.forwardRef(h(function({__scopeSwitch:e,onClick:t,...r},s){let{control:l,form:u,value:d,disabled:f,checked:p,required:m,setControl:g,setChecked:_,hasConsumerStoppedPropagationRef:v,onUserInteraction:y,isFormControl:x,bubbleInput:C}=b(S,e),w=i(s,g),T=o.useRef(p);return o.useEffect(()=>{let e=u?l?.ownerDocument.getElementById(u):l?.form;if(e instanceof HTMLFormElement){let t=h(()=>_(T.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[l,u,_]),c(n.button,{type:`button`,role:`switch`,"aria-checked":p,"aria-required":m,"data-state":A(p),"data-disabled":f?``:void 0,disabled:f,value:d,...r,ref:w,onClick:a(t,e=>{y(),_(e=>!e),C&&x&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})},`SwitchTrigger`)),w=o.forwardRef(h(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:u,value:d,onCheckedChange:f,form:p,...m}=e;return c(x,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:u,required:o,onCheckedChange:f,name:r,form:p,value:d,internal_do_not_use_render:({isFormControl:e})=>l(s,{children:[c(C,{...m,ref:t,__scopeSwitch:n}),e&&c(O,{__scopeSwitch:n})]})})},`Switch`)),T=`SwitchThumb`,E=o.forwardRef(h(function(e,t){let{__scopeSwitch:r,...i}=e,a=b(T,r);return c(n.span,{"data-state":A(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})},`SwitchThumb`)),D=`SwitchBubbleInput`,O=o.forwardRef(h(function({__scopeSwitch:e,onClick:t,...r},s){let{control:l,hasConsumerStoppedPropagationRef:u,userInteractionCount:d,checked:f,defaultChecked:m,required:h,disabled:g,name:_,value:v,form:y,bubbleInput:x,setBubbleInput:S}=b(D,e),C=i(s,S),w=p(l),T=o.useRef(!1),E=o.useRef(f),O=o.useRef(d);o.useEffect(()=>{let e=x;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=d!==O.current;O.current=d;let i=E.current!==f;E.current=f;let a=!(r&&u.current);if(i&&n){T.current=!r;let t=new Event(`click`,{bubbles:a});n.call(e,f),e.dispatchEvent(t),T.current=!1}},[x,f,u,d]);let k=o.useRef(f);return c(n.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:m??k.current,required:h,disabled:g,name:_,value:v,form:y,...r,tabIndex:-1,ref:C,onClick:a(t,e=>{T.current&&e.stopPropagation()}),style:{...r.style,...w,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function k(e){return typeof e==`function`}h(k,`isFunction`);function A(e){return e?`checked`:`unchecked`}h(A,`getState`);var j=u(w)`
2
2
  all: unset;
3
3
  width: 30px;
4
4
  height: 16px;
@@ -1,4 +1,4 @@
1
- import{g as e,h as t}from"./Rack-fDZClWZL.js";import{D as n}from"./States-DtkkMzEu.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a,{keyframes as o}from"styled-components";var s=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),l=new Intl.NumberFormat(`en-US`);function u(e){return`${l.format(e.inputTokens)} input, ${l.format(e.outputTokens)} output, ${l.format(e.cacheReadTokens)} cache read, ${l.format(e.cacheWriteTokens)} cache write tokens`}var d=a.span`
1
+ import{g as e,h as t}from"./Rack-HM36SprU.js";import{D as n}from"./States-DtkkMzEu.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a,{keyframes as o}from"styled-components";var s=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),l=new Intl.NumberFormat(`en-US`);function u(e){return`${l.format(e.inputTokens)} input, ${l.format(e.outputTokens)} output, ${l.format(e.cacheReadTokens)} cache read, ${l.format(e.cacheWriteTokens)} cache write tokens`}var d=a.span`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  flex-wrap: wrap;
@@ -1 +1 @@
1
- import{n as e}from"./Match-BWa6L0L1.js";import{i as t,n}from"./Rack-fDZClWZL.js";import{jsx as r}from"react/jsx-runtime";var i=()=>r(t,{children:r(n,{children:r(e,{})})});export{i as component};
1
+ import{n as e}from"./Match-BWa6L0L1.js";import{i as t,n}from"./Rack-HM36SprU.js";import{jsx as r}from"react/jsx-runtime";var i=()=>r(t,{children:r(n,{children:r(e,{})})});export{i as component};
@@ -1,4 +1,4 @@
1
- import{A as e,C as t,E as n,J as r,T as i,Y as a,c as o,dt as s,t as c,w as l}from"./shared-Cct_4xwp.js";import{$ as u,A as d,W as f,at as p,et as m,f as h,g,h as _,l as v,lt as y,nt as b,r as x,rt as S,u as C,ut as w,v as T,z as E}from"./queries-CX9mStps.js";import{a as D,g as O,o as k,s as ee,t as A}from"./Rack-fDZClWZL.js";import{n as te,r as ne,t as re}from"./CopyValue-By5BAgv7.js";import{t as j}from"./plus-UDQ_BTEr.js";import{t as M}from"./trash-2-U2ViYZum.js";import{t as N}from"./Toggle-ClEeOh0F.js";import{A as P,C as F,D as I,M as L,O as ie,P as ae,S as oe,T as se,_ as ce,a as le,b as ue,c as de,d as R,i as z,k as fe,l as pe,m as me,n as he,o as ge,r as _e,t as ve,u as ye,v as be,y as xe}from"./States-DtkkMzEu.js";import{t as Se}from"./Chip-BltJSw8A.js";import{i as B,n as V,r as Ce,t as H}from"./Field-B79Yxdit.js";import{t as we}from"./Meter-stpt3vQu.js";import{t as U}from"./Panel-CoulMx6R.js";import{i as Te,n as W,r as G,t as Ee}from"./Table-CVDZ69Zx.js";import{t as De}from"./catalog-BBKm8Ih8.js";import*as Oe from"react";import{Fragment as ke,forwardRef as Ae,useCallback as je,useEffect as Me,useState as K}from"react";import{Fragment as q,jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";var Ne=O(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Pe=Object.keys(De);function Fe(e){return De[e].authTypes}function Ie(e){return Fe(e).includes(`oauth`)?`oauth`:`apiKey`}var Le={oauth:`Authorize in the browser`,apiKey:`Paste an API key`},Z={anthropic:`Anthropic`,openai:`OpenAI`,kimi:`Kimi`,kilo:`Kilo`,grok:`Grok`,custom:`OpenAI Compatible`},Re={anthropic:`Authorize in the browser, then paste the code Anthropic shows you.`,openai:`Authorize in the browser. When it redirects to localhost, paste the whole URL.`,kimi:`Enter the code on Kimi's device page. This dialog finishes on its own.`,kilo:`Approve the code on Kilo's device page. This dialog finishes on its own.`,grok:`Authorize in the browser. When it redirects to 127.0.0.1, paste the whole URL.`,custom:`Enter endpoint metadata and API key.`},ze={openai:`http://localhost:1455/auth/callback?code=…`,grok:`http://127.0.0.1:56121/callback?code=…`},Be=X.ol`
1
+ import{A as e,C as t,E as n,J as r,T as i,Y as a,c as o,dt as s,t as c,w as l}from"./shared-Cct_4xwp.js";import{$ as u,A as d,W as f,at as p,et as m,f as h,g,h as _,l as v,lt as y,nt as b,r as x,rt as S,u as C,ut as w,v as T,z as E}from"./queries-CX9mStps.js";import{a as D,g as O,o as k,s as ee,t as A}from"./Rack-HM36SprU.js";import{n as te,r as ne,t as re}from"./CopyValue-C2DkO9Yz.js";import{t as j}from"./plus-DKapAGoR.js";import{t as M}from"./trash-2-DwMK-JrZ.js";import{t as N}from"./Toggle-CRrH9nDt.js";import{A as P,C as F,D as I,M as L,O as ie,P as ae,S as oe,T as se,_ as ce,a as le,b as ue,c as de,d as R,i as z,k as fe,l as pe,m as me,n as he,o as ge,r as _e,t as ve,u as ye,v as be,y as xe}from"./States-DtkkMzEu.js";import{t as Se}from"./Chip-BltJSw8A.js";import{i as B,n as V,r as Ce,t as H}from"./Field-B79Yxdit.js";import{t as we}from"./Meter-stpt3vQu.js";import{t as U}from"./Panel-CoulMx6R.js";import{i as Te,n as W,r as G,t as Ee}from"./Table-CVDZ69Zx.js";import{t as De}from"./catalog-BBKm8Ih8.js";import*as Oe from"react";import{Fragment as ke,forwardRef as Ae,useCallback as je,useEffect as Me,useState as K}from"react";import{Fragment as q,jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";var Ne=O(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Pe=Object.keys(De);function Fe(e){return De[e].authTypes}function Ie(e){return Fe(e).includes(`oauth`)?`oauth`:`apiKey`}var Le={oauth:`Authorize in the browser`,apiKey:`Paste an API key`},Z={anthropic:`Anthropic`,openai:`OpenAI`,kimi:`Kimi`,kilo:`Kilo`,grok:`Grok`,custom:`OpenAI Compatible`},Re={anthropic:`Authorize in the browser, then paste the code Anthropic shows you.`,openai:`Authorize in the browser. When it redirects to localhost, paste the whole URL.`,kimi:`Enter the code on Kimi's device page. This dialog finishes on its own.`,kilo:`Approve the code on Kilo's device page. This dialog finishes on its own.`,grok:`Authorize in the browser. When it redirects to 127.0.0.1, paste the whole URL.`,custom:`Enter endpoint metadata and API key.`},ze={openai:`http://localhost:1455/auth/callback?code=…`,grok:`http://127.0.0.1:56121/callback?code=…`},Be=X.ol`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${({theme:e})=>e.space(3)};
@@ -17,7 +17,7 @@ import{A as e,C as t,E as n,J as r,T as i,Y as a,c as o,dt as s,t as c,w as l}fr
17
17
  `,Ue=X.p`
18
18
  font-size: 12px;
19
19
  color: ${({theme:e})=>e.color.inkDim};
20
- `;function We({open:e,credentials:t,onOpenChange:n,onConnected:r}){let[i,a]=K(`anthropic`),[o,s]=K(Ie(`anthropic`)),[c,l]=K(``),[d,f]=K(null),[m,g]=K(``),[_,S]=K(``),w=(t??[]).filter((e,t,n)=>e.provider===`custom`&&n.findIndex(t=>t.provider===`custom`&&t.providerData.endpointId===e.providerData.endpointId)===t),[T,E]=K(``),[D,O]=K(``),[k,A]=K(`chat_completions`),[te,ne]=K(``),[j,M]=K(null),N=C(),P=v(),F=h(),I=je(()=>{f(null),g(``),S(``),E(``),O(``),A(`chat_completions`),ne(``),M(null),l(``),N.reset(),P.reset(),F.reset()},[N,P,F]),L=je(e=>{e||I(),n(e)},[n,I]);return Me(()=>{if(d===null||d.kind!==`device`)return;let e=!1,t=async()=>{try{let t=await x(d.flowId);if(e)return;if(t.status===`complete`){I(),n(!1),r();return}}catch(t){if(e)return;M(z(t)),f(null);return}e||(i=setTimeout(()=>void t(),d.pollIntervalMs))},i=setTimeout(()=>void t(),d.pollIntervalMs);return()=>{e=!0,clearTimeout(i)}},[d,r,n,I]),J(ee,{open:e,onOpenChange:L,title:`Connect an account`,description:`The gateway stores the resulting token encrypted. It is never shown again after this dialog.`,footer:d===null?Y(q,{children:[J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}),J(y,{type:`button`,$variant:`primary`,disabled:N.isPending||F.isPending,onClick:()=>{if(M(null),o===`apiKey`){F.mutate({provider:i,apiKey:te,label:c.trim()||void 0,...i===`custom`?{endpointId:_,endpointLabel:T,origin:D,protocol:k}:{}},{onSuccess:()=>{I(),n(!1),r()},onError:e=>M(z(e))});return}N.mutate({provider:i,label:c.trim().length===0?Z[i]:c.trim()},{onSuccess:e=>f(e),onError:e=>M(z(e))})},children:o===`apiKey`?F.isPending?`Adding…`:`Add API key`:N.isPending?`Starting…`:`Start authorization`})]}):d.kind===`device`?J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}):Y(q,{children:[J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}),J(y,{type:`button`,$variant:`primary`,disabled:P.isPending||m.trim().length===0,onClick:()=>{d!==null&&(M(null),P.mutate({flowId:d.flowId,code:m.trim()},{onSuccess:()=>{I(),n(!1),r()},onError:e=>M(z(e))}))},children:P.isPending?`Finishing…`:`Finish connecting`})]}),children:Y(Be,{children:[d===null?Y(p,{$gap:3,children:[J(H,{label:`Provider`,children:e=>J(B,{...e,value:i,onChange:e=>{let t=e.target.value;a(t),s(Ie(t))},children:Pe.map(e=>J(`option`,{value:e,children:Z[e]},e))})}),Fe(i).length>1?J(H,{label:`How to connect`,children:e=>J(B,{...e,value:o,onChange:e=>s(e.target.value),children:Fe(i).map(e=>J(`option`,{value:e,children:Le[e]},e))})}):null,i===`custom`?Y(q,{children:[w.length===0?null:J(H,{label:`Existing endpoint`,children:e=>Y(B,{...e,value:_,onChange:e=>{let t=w.find(t=>t.providerData.endpointId===e.target.value);if(t===void 0){S(``),E(``),O(``),A(`chat_completions`);return}S(String(t.providerData.endpointId)),E(String(t.providerData.endpointLabel)),O(String(t.providerData.origin)),A(t.providerData.protocol===`responses`?`responses`:`chat_completions`)},children:[J(`option`,{value:``,children:`Create new endpoint`}),w.map(e=>J(`option`,{value:String(e.providerData.endpointId),children:String(e.providerData.endpointLabel)},String(e.providerData.endpointId)))]})}),J(H,{label:`Endpoint ID`,children:e=>J(V,{...e,value:_,onChange:e=>S(e.target.value)})}),J(H,{label:`Endpoint label`,children:e=>J(V,{...e,value:T,onChange:e=>E(e.target.value)})}),J(H,{label:`Server origin`,children:e=>J(V,{...e,value:D,placeholder:`https://server.example`,onChange:e=>O(e.target.value)})}),D.trim().toLowerCase().startsWith(`http://`)?J(He,{children:`Plaintext transport sends prompts and API keys without TLS.`}):null,J(H,{label:`Protocol`,children:e=>Y(B,{...e,value:k,onChange:e=>A(e.target.value),children:[J(`option`,{value:`chat_completions`,children:`Chat Completions (/v1/chat/completions)`}),J(`option`,{value:`responses`,children:`Responses (/v1/responses)`})]})})]}):null,o===`apiKey`?J(H,{label:`API key`,children:e=>J(V,{...e,type:`password`,value:te,autoComplete:`off`,onChange:e=>ne(e.target.value)})}):null,J(H,{label:`Label`,hint:`How this account is named in the rack. Defaults to the provider.`,children:e=>J(V,{...e,value:c,placeholder:Z[i],onChange:e=>l(e.target.value)})})]}):Y(p,{$gap:3,children:[Y(p,{$gap:1,children:[J(u,{children:`Step 1 — authorize`}),J(b,{$gap:2,children:Y(y,{as:`a`,href:d.authorizeUrl,target:`_blank`,rel:`noreferrer noopener`,$variant:`primary`,$size:`sm`,children:[J(Ne,{}),`Open `,Z[i]]})}),J(re,{value:d.authorizeUrl,label:`Copy authorization link`})]}),d.userCode===null?null:Y(p,{$gap:1,children:[J(u,{children:`Step 2 — enter this code`}),J(Ve,{children:d.userCode})]}),d.kind===`device`?Y(Ue,{children:[Re[i],` Waiting for authorization…`]}):J(H,{label:`Authorization code`,hint:Re[i],...j===null?{}:{problem:j},children:e=>J(V,{...e,value:m,autoFocus:!0,placeholder:ze[i]??`code#state`,onChange:e=>g(e.target.value)})})]}),j===null||d?.kind===`pkce`?null:J(He,{children:j})]})})}var Ge=[`axis`],Ke=Ae((e,n)=>Oe.createElement(t,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Ge,tooltipPayloadSearcher:a,categoricalChartProps:e,ref:n})),qe=X(b)`
20
+ `;function We({open:e,credentials:t,onOpenChange:n,onConnected:r}){let[i,a]=K(`anthropic`),[o,s]=K(Ie(`anthropic`)),[c,l]=K(``),[d,f]=K(null),[m,g]=K(``),[_,S]=K(``),w=(t??[]).filter((e,t,n)=>e.provider===`custom`&&n.findIndex(t=>t.provider===`custom`&&t.providerData.endpointId===e.providerData.endpointId)===t),[T,E]=K(``),[D,O]=K(``),[k,A]=K(`chat_completions`),[te,ne]=K(``),[j,M]=K(null),N=C(),P=v(),F=h(),I=je(()=>{f(null),g(``),S(``),E(``),O(``),A(`chat_completions`),ne(``),M(null),l(``),N.reset(),P.reset(),F.reset()},[N,P,F]),L=je(e=>{e||I(),n(e)},[n,I]);return Me(()=>{if(d===null||d.kind!==`device`)return;let e=!1,t=async()=>{try{let t=await x(d.flowId);if(e)return;if(t.status===`complete`){I(),n(!1),r();return}}catch(t){if(e)return;M(z(t)),f(null);return}e||(i=setTimeout(()=>void t(),d.pollIntervalMs))},i=setTimeout(()=>void t(),d.pollIntervalMs);return()=>{e=!0,clearTimeout(i)}},[d,r,n,I]),J(ee,{open:e,onOpenChange:L,title:`Connect an account`,description:`The gateway stores the resulting token encrypted. It is never shown again after this dialog.`,footer:d===null?Y(q,{children:[J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}),J(y,{type:`button`,$variant:`primary`,disabled:N.isPending||F.isPending,onClick:()=>{if(M(null),o===`apiKey`){F.mutate({provider:i,apiKey:te,label:c.trim()||void 0,...i===`custom`?{endpointId:_,endpointLabel:T,origin:D,protocol:k}:{}},{onSuccess:()=>{I(),n(!1),r()},onError:e=>M(z(e))});return}N.mutate({provider:i,label:c.trim().length===0?Z[i]:c.trim()},{onSuccess:e=>f(e),onError:e=>M(z(e))})},children:o===`apiKey`?F.isPending?`Adding…`:`Add API key`:N.isPending?`Starting…`:`Start authorization`})]}):d.kind===`device`?J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}):Y(q,{children:[J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}),J(y,{type:`button`,$variant:`primary`,disabled:P.isPending||m.trim().length===0,onClick:()=>{d!==null&&(M(null),P.mutate({flowId:d.flowId,code:m.trim()},{onSuccess:()=>{I(),n(!1),r()},onError:e=>M(z(e))}))},children:P.isPending?`Finishing…`:`Finish connecting`})]}),children:Y(Be,{children:[d===null?Y(p,{$gap:3,children:[J(H,{label:`Provider`,children:e=>J(B,{...e,value:i,onChange:e=>{let t=e.target.value;a(t),s(Ie(t))},children:Pe.map(e=>J(`option`,{value:e,children:Z[e]},e))})}),Fe(i).length>1?J(H,{label:`How to connect`,children:e=>J(B,{...e,value:o,onChange:e=>s(e.target.value),children:Fe(i).map(e=>J(`option`,{value:e,children:Le[e]},e))})}):null,i===`custom`?Y(q,{children:[w.length===0?null:J(H,{label:`Existing endpoint`,children:e=>Y(B,{...e,value:_,onChange:e=>{let t=w.find(t=>t.providerData.endpointId===e.target.value);if(t===void 0){S(``),E(``),O(``),A(`chat_completions`);return}S(String(t.providerData.endpointId)),E(String(t.providerData.endpointLabel)),O(String(t.providerData.origin)+String(t.providerData.basePath??``)),A(t.providerData.protocol===`responses`?`responses`:`chat_completions`)},children:[J(`option`,{value:``,children:`Create new endpoint`}),w.map(e=>J(`option`,{value:String(e.providerData.endpointId),children:String(e.providerData.endpointLabel)},String(e.providerData.endpointId)))]})}),J(H,{label:`Endpoint ID`,children:e=>J(V,{...e,value:_,onChange:e=>S(e.target.value)})}),J(H,{label:`Endpoint label`,children:e=>J(V,{...e,value:T,onChange:e=>E(e.target.value)})}),J(H,{label:`Server URL`,children:e=>J(V,{...e,value:D,placeholder:`https://server.example/api`,onChange:e=>O(e.target.value)})}),D.trim().toLowerCase().startsWith(`http://`)?J(He,{children:`Plaintext transport sends prompts and API keys without TLS.`}):null,J(H,{label:`Protocol`,children:e=>Y(B,{...e,value:k,onChange:e=>A(e.target.value),children:[J(`option`,{value:`chat_completions`,children:`Chat Completions (/v1/chat/completions)`}),J(`option`,{value:`responses`,children:`Responses (/v1/responses)`})]})})]}):null,o===`apiKey`?J(H,{label:`API key`,children:e=>J(V,{...e,type:`password`,value:te,autoComplete:`off`,onChange:e=>ne(e.target.value)})}):null,J(H,{label:`Label`,hint:`How this account is named in the rack. Defaults to the provider.`,children:e=>J(V,{...e,value:c,placeholder:Z[i],onChange:e=>l(e.target.value)})})]}):Y(p,{$gap:3,children:[Y(p,{$gap:1,children:[J(u,{children:`Step 1 — authorize`}),J(b,{$gap:2,children:Y(y,{as:`a`,href:d.authorizeUrl,target:`_blank`,rel:`noreferrer noopener`,$variant:`primary`,$size:`sm`,children:[J(Ne,{}),`Open `,Z[i]]})}),J(re,{value:d.authorizeUrl,label:`Copy authorization link`})]}),d.userCode===null?null:Y(p,{$gap:1,children:[J(u,{children:`Step 2 — enter this code`}),J(Ve,{children:d.userCode})]}),d.kind===`device`?Y(Ue,{children:[Re[i],` Waiting for authorization…`]}):J(H,{label:`Authorization code`,hint:Re[i],...j===null?{}:{problem:j},children:e=>J(V,{...e,value:m,autoFocus:!0,placeholder:ze[i]??`code#state`,onChange:e=>g(e.target.value)})})]}),j===null||d?.kind===`pkce`?null:J(He,{children:j})]})})}var Ge=[`axis`],Ke=Ae((e,n)=>Oe.createElement(t,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Ge,tooltipPayloadSearcher:a,categoricalChartProps:e,ref:n})),qe=X(b)`
21
21
  gap: ${({theme:e})=>e.space(5)};
22
22
  flex-wrap: wrap;
23
23
  `,Q=X.div`
@@ -1,4 +1,4 @@
1
- import{d as e,nt as t,t as n,tt as r}from"./queries-CX9mStps.js";import{a as i,t as a}from"./Rack-fDZClWZL.js";import{D as o,n as s,r as c,t as l}from"./States-DtkkMzEu.js";import{i as u}from"./Field-B79Yxdit.js";import{t as d}from"./Panel-CoulMx6R.js";import{useLayoutEffect as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import _ from"styled-components";var v=[100,200,500],y=[{value:``,label:`All levels`},{value:`debug`,label:`Debug and above`},{value:`info`,label:`Info and above`},{value:`warn`,label:`Warnings and errors`},{value:`error`,label:`Errors only`}],b=_(t)`
1
+ import{d as e,nt as t,t as n,tt as r}from"./queries-CX9mStps.js";import{a as i,t as a}from"./Rack-HM36SprU.js";import{D as o,n as s,r as c,t as l}from"./States-DtkkMzEu.js";import{i as u}from"./Field-B79Yxdit.js";import{t as d}from"./Panel-CoulMx6R.js";import{useLayoutEffect as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import _ from"styled-components";var v=[100,200,500],y=[{value:``,label:`All levels`},{value:`debug`,label:`Debug and above`},{value:`info`,label:`Info and above`},{value:`warn`,label:`Warnings and errors`},{value:`error`,label:`Errors only`}],b=_(t)`
2
2
  gap: ${({theme:e})=>e.space(2)};
3
3
  flex-wrap: wrap;
4
4
  `,x=_(u)`
@@ -1,4 +1,4 @@
1
- import{$ as e,H as t,I as n,K as r,N as i,Q as a,S as o,_ as s,a as c,at as l,b as u,lt as d,m as f,nt as p,ot as m,rt as h}from"./queries-CX9mStps.js";import{g,o as _,t as v}from"./Rack-fDZClWZL.js";import{A as y,O as b,i as x,j as S,n as C,r as w,t as T,w as E}from"./States-DtkkMzEu.js";import{r as D,t as O}from"./Field-B79Yxdit.js";import{t as k}from"./Meter-stpt3vQu.js";import{t as A}from"./Panel-CoulMx6R.js";import{i as j,n as M,r as N,t as P}from"./Table-CVDZ69Zx.js";import{t as F}from"./Readout-D1XEfywe.js";import{n as I}from"./reasons-Cb8yF4Oy.js";import{useQueryClient as L}from"@tanstack/react-query";import{useCallback as R,useState as z}from"react";import{Fragment as B,jsx as V,jsxs as H}from"react/jsx-runtime";import U from"styled-components";var W=g(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),G=g(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),K=[{id:`keepLatest`,label:`Snapshots kept`,hint:`How many survive regardless of age. The newest is always kept, whatever both numbers say.`,unit:`files`,max:100},{id:`maxAgeDays`,label:`Maximum age`,hint:`Older snapshots are pruned after every new one and on the hourly maintenance sweep.`,unit:`days`,max:3650}],q=U.p`
1
+ import{$ as e,H as t,I as n,K as r,N as i,Q as a,S as o,_ as s,a as c,at as l,b as u,lt as d,m as f,nt as p,ot as m,rt as h}from"./queries-CX9mStps.js";import{g,o as _,t as v}from"./Rack-HM36SprU.js";import{A as y,O as b,i as x,j as S,n as C,r as w,t as T,w as E}from"./States-DtkkMzEu.js";import{r as D,t as O}from"./Field-B79Yxdit.js";import{t as k}from"./Meter-stpt3vQu.js";import{t as A}from"./Panel-CoulMx6R.js";import{i as j,n as M,r as N,t as P}from"./Table-CVDZ69Zx.js";import{t as F}from"./Readout-D1XEfywe.js";import{n as I}from"./reasons-Cb8yF4Oy.js";import{useQueryClient as L}from"@tanstack/react-query";import{useCallback as R,useState as z}from"react";import{Fragment as B,jsx as V,jsxs as H}from"react/jsx-runtime";import U from"styled-components";var W=g(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),G=g(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),K=[{id:`keepLatest`,label:`Snapshots kept`,hint:`How many survive regardless of age. The newest is always kept, whatever both numbers say.`,unit:`files`,max:100},{id:`maxAgeDays`,label:`Maximum age`,hint:`Older snapshots are pruned after every new one and on the hourly maintenance sweep.`,unit:`days`,max:3650}],q=U.p`
2
2
  font-size: 12px;
3
3
  color: ${({theme:e})=>e.color.down};
4
4
  `,J=U.p`
@@ -1,4 +1,4 @@
1
- import{$ as e,D as t,G as n,O as r,Q as i,at as a,dt as o,et as s,g as c,h as l,it as u,lt as d,nt as f,ot as p,rt as m,z as h}from"./queries-CX9mStps.js";import{a as g,r as _,t as ee}from"./Rack-fDZClWZL.js";import{n as v,t as y}from"./TokenBreakdown-D70VeZ2N.js";import{A as b,D as x,E as S,M as C,N as w,a as T,b as te,d as E,g as D,h as O,j as k,l as A,n as j,o as M,p as N,s as P,t as F,u as I,v as ne,x as re}from"./States-DtkkMzEu.js";import{n as L,t as R}from"./Chip-BltJSw8A.js";import{t as z}from"./Meter-stpt3vQu.js";import{t as B}from"./Panel-CoulMx6R.js";import{i as V,n as H,r as U,t as W}from"./Table-CVDZ69Zx.js";import{t as G}from"./Readout-D1XEfywe.js";import{Fragment as K,jsx as q,jsxs as J}from"react/jsx-runtime";import Y from"styled-components";var X=Y(p)`
1
+ import{$ as e,D as t,G as n,O as r,Q as i,at as a,dt as o,et as s,g as c,h as l,it as u,lt as d,nt as f,ot as p,rt as m,z as h}from"./queries-CX9mStps.js";import{a as g,r as _,t as ee}from"./Rack-HM36SprU.js";import{n as v,t as y}from"./TokenBreakdown-C2NsJnqO.js";import{A as b,D as x,E as S,M as C,N as w,a as T,b as te,d as E,g as D,h as O,j as k,l as A,n as j,o as M,p as N,s as P,t as F,u as I,v as ne,x as re}from"./States-DtkkMzEu.js";import{n as L,t as R}from"./Chip-BltJSw8A.js";import{t as z}from"./Meter-stpt3vQu.js";import{t as B}from"./Panel-CoulMx6R.js";import{i as V,n as H,r as U,t as W}from"./Table-CVDZ69Zx.js";import{t as G}from"./Readout-D1XEfywe.js";import{Fragment as K,jsx as q,jsxs as J}from"react/jsx-runtime";import Y from"styled-components";var X=Y(p)`
2
2
  font-weight: 500;
3
3
  display: block;
4
4
  max-width: 24ch;
@@ -1,4 +1,4 @@
1
- import{$ as e,C as t,O as n,P as r,R as i,at as a,et as o,lt as s,nt as c,ot as l,p as u,rt as d,ut as f}from"./queries-CX9mStps.js";import{m as p,o as m,s as h,t as g}from"./Rack-fDZClWZL.js";import{n as _,r as v,t as y}from"./CopyValue-By5BAgv7.js";import{t as b}from"./plus-UDQ_BTEr.js";import{t as x}from"./Toggle-ClEeOh0F.js";import{O as S,i as C,n as w,r as T,t as E}from"./States-DtkkMzEu.js";import{t as D}from"./Chip-BltJSw8A.js";import{n as O,r as k,t as A}from"./Field-B79Yxdit.js";import{t as j}from"./Meter-stpt3vQu.js";import{t as M}from"./Panel-CoulMx6R.js";import{i as N,n as P,r as F,t as I}from"./Table-CVDZ69Zx.js";import{Fragment as L,useState as R}from"react";import{Fragment as z,jsx as B,jsxs as V}from"react/jsx-runtime";import H from"styled-components";var U=[{dimension:`requests`,window:`1m`},{dimension:`requests`,window:`5h`},{dimension:`requests`,window:`1w`},{dimension:`tokens`,window:`1m`},{dimension:`tokens`,window:`5h`},{dimension:`tokens`,window:`1w`},{dimension:`spend`,window:`5h`},{dimension:`spend`,window:`1w`},{dimension:`concurrency`,window:null}];function W(e){return e.window===null?e.dimension:`${e.dimension}:${e.window}`}var G={requests:`Requests`,tokens:`Tokens`,spend:`Spend`,concurrency:`Concurrent`},ee={"1m":`per minute`,"5h":`per 5 hours`,"1w":`per week`};function K(e){let t=G[e.dimension];return e.window===null?t:`${t} ${ee[e.window]}`}function q(e,t){return e===`spend`?`$${t<1?t.toFixed(4):t.toFixed(2)}`:t.toLocaleString(`en-US`)}function J(e){return e.used===null||e.limit<=0?null:Math.max(0,e.used/e.limit)}function te(e){let t=null,n=-1;for(let r of e){let e=J(r);e!==null&&e>n&&(t=r,n=e)}return t}function Y(e){let t={};for(let e of U)t[W(e)]=``;if(e===null)return t;for(let n of U){let r=n.window===null?e.concurrency:n.dimension===`requests`?e.requests?.[n.window]:n.dimension===`tokens`?e.tokens?.[n.window]:n.window===`1m`?void 0:e.spend?.[n.window];r!=null&&(t[W(n)]=String(r))}return t}function X(e){let t={},n={},r={},i;for(let a of U){let o=(e[W(a)]??``).trim();if(o.length===0)continue;let s=Number(o),c=a.dimension===`spend`;if(!Number.isFinite(s)||s<=0||!c&&!Number.isInteger(s))return{problem:c?`${K(a)} must be an amount above zero, or blank for no limit.`:`${K(a)} must be a whole number above zero, or blank for no limit.`};a.window===null?i=s:a.dimension===`requests`?t[a.window]=s:a.dimension===`tokens`?n[a.window]=s:a.window!==`1m`&&(r[a.window]=s)}return{limits:{...Object.keys(t).length>0?{requests:t}:{},...Object.keys(n).length>0?{tokens:n}:{},...Object.keys(r).length>0?{spend:r}:{},...i===void 0?{}:{concurrency:i}}}}var Z=H.div`
1
+ import{$ as e,C as t,O as n,P as r,R as i,at as a,et as o,lt as s,nt as c,ot as l,p as u,rt as d,ut as f}from"./queries-CX9mStps.js";import{m as p,o as m,s as h,t as g}from"./Rack-HM36SprU.js";import{n as _,r as v,t as y}from"./CopyValue-C2DkO9Yz.js";import{t as b}from"./plus-DKapAGoR.js";import{t as x}from"./Toggle-CRrH9nDt.js";import{O as S,i as C,n as w,r as T,t as E}from"./States-DtkkMzEu.js";import{t as D}from"./Chip-BltJSw8A.js";import{n as O,r as k,t as A}from"./Field-B79Yxdit.js";import{t as j}from"./Meter-stpt3vQu.js";import{t as M}from"./Panel-CoulMx6R.js";import{i as N,n as P,r as F,t as I}from"./Table-CVDZ69Zx.js";import{Fragment as L,useState as R}from"react";import{Fragment as z,jsx as B,jsxs as V}from"react/jsx-runtime";import H from"styled-components";var U=[{dimension:`requests`,window:`1m`},{dimension:`requests`,window:`5h`},{dimension:`requests`,window:`1w`},{dimension:`tokens`,window:`1m`},{dimension:`tokens`,window:`5h`},{dimension:`tokens`,window:`1w`},{dimension:`spend`,window:`5h`},{dimension:`spend`,window:`1w`},{dimension:`concurrency`,window:null}];function W(e){return e.window===null?e.dimension:`${e.dimension}:${e.window}`}var G={requests:`Requests`,tokens:`Tokens`,spend:`Spend`,concurrency:`Concurrent`},ee={"1m":`per minute`,"5h":`per 5 hours`,"1w":`per week`};function K(e){let t=G[e.dimension];return e.window===null?t:`${t} ${ee[e.window]}`}function q(e,t){return e===`spend`?`$${t<1?t.toFixed(4):t.toFixed(2)}`:t.toLocaleString(`en-US`)}function J(e){return e.used===null||e.limit<=0?null:Math.max(0,e.used/e.limit)}function te(e){let t=null,n=-1;for(let r of e){let e=J(r);e!==null&&e>n&&(t=r,n=e)}return t}function Y(e){let t={};for(let e of U)t[W(e)]=``;if(e===null)return t;for(let n of U){let r=n.window===null?e.concurrency:n.dimension===`requests`?e.requests?.[n.window]:n.dimension===`tokens`?e.tokens?.[n.window]:n.window===`1m`?void 0:e.spend?.[n.window];r!=null&&(t[W(n)]=String(r))}return t}function X(e){let t={},n={},r={},i;for(let a of U){let o=(e[W(a)]??``).trim();if(o.length===0)continue;let s=Number(o),c=a.dimension===`spend`;if(!Number.isFinite(s)||s<=0||!c&&!Number.isInteger(s))return{problem:c?`${K(a)} must be an amount above zero, or blank for no limit.`:`${K(a)} must be a whole number above zero, or blank for no limit.`};a.window===null?i=s:a.dimension===`requests`?t[a.window]=s:a.dimension===`tokens`?n[a.window]=s:a.window!==`1m`&&(r[a.window]=s)}return{limits:{...Object.keys(t).length>0?{requests:t}:{},...Object.keys(n).length>0?{tokens:n}:{},...Object.keys(r).length>0?{spend:r}:{},...i===void 0?{}:{concurrency:i}}}}var Z=H.div`
2
2
  display: grid;
3
3
  grid-template-columns: repeat(3, minmax(0, 1fr));
4
4
  gap: ${({theme:e})=>e.space(2)};
@@ -1,4 +1,4 @@
1
- import{$ as e,C as t,D as n,at as r,et as i,g as ee,j as a,lt as o,n as te,nt as s,ot as c,rt as l,s as u}from"./queries-CX9mStps.js";import{a as ne,s as re,t as ie}from"./Rack-fDZClWZL.js";import{n as d,r as f,t as p}from"./TokenBreakdown-D70VeZ2N.js";import{A as m,D as h,E as g,F as _,N as v,O as y,a as ae,f as b,g as oe,h as se,k as ce,n as x,p as S,r as C,t as w}from"./States-DtkkMzEu.js";import{n as T,t as E}from"./Chip-BltJSw8A.js";import{i as D,n as O}from"./Field-B79Yxdit.js";import{t as k}from"./Panel-CoulMx6R.js";import{i as le,n as A,r as j,t as ue}from"./Table-CVDZ69Zx.js";import{useEffect as M,useMemo as N,useState as P}from"react";import{Fragment as F,jsx as I,jsxs as L}from"react/jsx-runtime";import R from"styled-components";var z={none:{legend:`Not captured`,message:`Body capture was not running for this request. It needs OMNI_BODY_LOGGING_ALLOWED in the environment and the body logging setting turned on, and the calling key must not have opted out.`},missing:{legend:`Captured, then lost`,message:`This request was captured, but its artifact is no longer on disk. Retention or the row cap has since pruned it, or something removed the file underneath the gateway.`},corrupt:{legend:`Captured, but unreadable`,message:`This request was captured and the artifact is still on disk, but it failed its checksum or would not decrypt. Changing OMNI_ENCRYPTION_KEY invalidates every artifact written under the old one.`}},B=new Intl.NumberFormat(`en-US`),V=R.p`
1
+ import{$ as e,C as t,D as n,at as r,et as i,g as ee,j as a,lt as o,n as te,nt as s,ot as c,rt as l,s as u}from"./queries-CX9mStps.js";import{a as ne,s as re,t as ie}from"./Rack-HM36SprU.js";import{n as d,r as f,t as p}from"./TokenBreakdown-C2NsJnqO.js";import{A as m,D as h,E as g,F as _,N as v,O as y,a as ae,f as b,g as oe,h as se,k as ce,n as x,p as S,r as C,t as w}from"./States-DtkkMzEu.js";import{n as T,t as E}from"./Chip-BltJSw8A.js";import{i as D,n as O}from"./Field-B79Yxdit.js";import{t as k}from"./Panel-CoulMx6R.js";import{i as le,n as A,r as j,t as ue}from"./Table-CVDZ69Zx.js";import{useEffect as M,useMemo as N,useState as P}from"react";import{Fragment as F,jsx as I,jsxs as L}from"react/jsx-runtime";import R from"styled-components";var z={none:{legend:`Not captured`,message:`Body capture was not running for this request. It needs OMNI_BODY_LOGGING_ALLOWED in the environment and the body logging setting turned on, and the calling key must not have opted out.`},missing:{legend:`Captured, then lost`,message:`This request was captured, but its artifact is no longer on disk. Retention or the row cap has since pruned it, or something removed the file underneath the gateway.`},corrupt:{legend:`Captured, but unreadable`,message:`This request was captured and the artifact is still on disk, but it failed its checksum or would not decrypt. Changing OMNI_ENCRYPTION_KEY invalidates every artifact written under the old one.`}},B=new Intl.NumberFormat(`en-US`),V=R.p`
2
2
  font-size: 12px;
3
3
  color: ${({theme:e})=>e.color.inkDim};
4
4
  max-width: 62ch;
@@ -1,4 +1,4 @@
1
- import{$ as e,F as t,O as n,at as r,et as i,g as a,it as o,lt as s,nt as c,ot as l,ut as u,x as d,y as f,z as p}from"./queries-CX9mStps.js";import{r as m}from"./index-COwhxKU7.js";import{g as h,o as g,t as _}from"./Rack-fDZClWZL.js";import{t as v}from"./plus-UDQ_BTEr.js";import{t as y}from"./trash-2-U2ViYZum.js";import{t as b}from"./Toggle-ClEeOh0F.js";import{i as x,n as S,r as C,t as w}from"./States-DtkkMzEu.js";import{n as T,t as E}from"./Chip-BltJSw8A.js";import{i as D,n as O,r as k,t as A}from"./Field-B79Yxdit.js";import{t as j}from"./Meter-stpt3vQu.js";import{t as M}from"./Panel-CoulMx6R.js";import{i as N,n as ee,r as P,t as F}from"./catalog-BBKm8Ih8.js";import{useEffect as I,useId as te,useState as L}from"react";import{Fragment as R,jsx as z,jsxs as B}from"react/jsx-runtime";import V from"styled-components";var ne=h(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),re=h(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),H=[`tier`,`health`,`quota`,`cost`,`latency`,`load`],ie={tier:`How preferred this tier is`,health:`Consecutive failures and breaker state`,quota:`Headroom in the tightest window, against how much of it is left`,cost:`Price of this request against the other candidates`,latency:`Observed time to first token`,load:`Requests in flight on this pair right now`},ae=V.li`
1
+ import{$ as e,F as t,O as n,at as r,et as i,g as a,it as o,lt as s,nt as c,ot as l,ut as u,x as d,y as f,z as p}from"./queries-CX9mStps.js";import{r as m}from"./index-iCfSaRSG.js";import{g as h,o as g,t as _}from"./Rack-HM36SprU.js";import{t as v}from"./plus-DKapAGoR.js";import{t as y}from"./trash-2-DwMK-JrZ.js";import{t as b}from"./Toggle-CRrH9nDt.js";import{i as x,n as S,r as C,t as w}from"./States-DtkkMzEu.js";import{n as T,t as E}from"./Chip-BltJSw8A.js";import{i as D,n as O,r as k,t as A}from"./Field-B79Yxdit.js";import{t as j}from"./Meter-stpt3vQu.js";import{t as M}from"./Panel-CoulMx6R.js";import{i as N,n as ee,r as P,t as F}from"./catalog-BBKm8Ih8.js";import{useEffect as I,useId as te,useState as L}from"react";import{Fragment as R,jsx as z,jsxs as B}from"react/jsx-runtime";import V from"styled-components";var ne=h(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),re=h(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),H=[`tier`,`health`,`quota`,`cost`,`latency`,`load`],ie={tier:`How preferred this tier is`,health:`Consecutive failures and breaker state`,quota:`Headroom in the tightest window, against how much of it is left`,cost:`Price of this request against the other candidates`,latency:`Observed time to first token`,load:`Requests in flight on this pair right now`},ae=V.li`
2
2
  padding: ${({theme:e})=>e.space(2)} 0;
3
3
  border-bottom: 1px solid ${({theme:e})=>e.color.rule};
4
4
 
@@ -1,4 +1,4 @@
1
- import{J as e,X as t,Y as n,Z as r,at as i,k as a}from"./queries-CX9mStps.js";import{a as o,s}from"./index-COwhxKU7.js";import{t as c}from"./Rack-fDZClWZL.js";import{n as l,r as u,t as d}from"./States-DtkkMzEu.js";import{t as f}from"./Panel-CoulMx6R.js";import{Component as p,Suspense as m,createContext as h,lazy as g,useContext as _,useMemo as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import S from"styled-components";import{pluginApiPath as C}from"@omnigateway/dashboard-sdk";var w=new Map;function T(i){let a=w.get(i);if(a!==void 0)return a;let o={get:(e,t)=>n(C(i,e),t),post:(e,n)=>t(C(i,e),n),put:(e,t)=>r(C(i,e),t),del:t=>e(C(i,t))};return w.set(i,o),o}var E=h(e=>s(()=>import(e),[]));E.Provider;function D(){return _(E)}function O(e,t){let n=e?.default;if(n==null)throw Error(`plugin ${t} has no default export from definePluginUI`);if(typeof n.mount!=`function`)throw Error(`plugin ${t} exported a default without a mount function`);return n}function k(e,t,n){return g(async()=>{let r=O(await n(t),e);return{default:()=>r.mount({pluginId:e,api:T(e)})}})}var A=S.p`
1
+ import{J as e,X as t,Y as n,Z as r,at as i,k as a}from"./queries-CX9mStps.js";import{a as o,s}from"./index-iCfSaRSG.js";import{t as c}from"./Rack-HM36SprU.js";import{n as l,r as u,t as d}from"./States-DtkkMzEu.js";import{t as f}from"./Panel-CoulMx6R.js";import{Component as p,Suspense as m,createContext as h,lazy as g,useContext as _,useMemo as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import S from"styled-components";import{pluginApiPath as C}from"@omnigateway/dashboard-sdk";var w=new Map;function T(i){let a=w.get(i);if(a!==void 0)return a;let o={get:(e,t)=>n(C(i,e),t),post:(e,n)=>t(C(i,e),n),put:(e,t)=>r(C(i,e),t),del:t=>e(C(i,t))};return w.set(i,o),o}var E=h(e=>s(()=>import(e),[]));E.Provider;function D(){return _(E)}function O(e,t){let n=e?.default;if(n==null)throw Error(`plugin ${t} has no default export from definePluginUI`);if(typeof n.mount!=`function`)throw Error(`plugin ${t} exported a default without a mount function`);return n}function k(e,t,n){return g(async()=>{let r=O(await n(t),e);return{default:()=>r.mount({pluginId:e,api:T(e)})}})}var A=S.p`
2
2
  font-size: 13px;
3
3
  color: ${({theme:e})=>e.color.down};
4
4
  `,j=S.p`
@@ -1,4 +1,4 @@
1
- import{$ as e,L as t,O as n,at as r,c as i,et as a,it as o,lt as s,nt as c,o as l,z as u}from"./queries-CX9mStps.js";import{t as d}from"./Rack-fDZClWZL.js";import{t as f}from"./Toggle-ClEeOh0F.js";import{i as p,n as m,r as h}from"./States-DtkkMzEu.js";import{i as g,n as _,t as v}from"./Field-B79Yxdit.js";import{t as y}from"./Meter-stpt3vQu.js";import{t as b}from"./Panel-CoulMx6R.js";import{useEffect as x,useState as S}from"react";import{Fragment as C,jsx as w,jsxs as T}from"react/jsx-runtime";import E from"styled-components";var D=[{id:`claude`,label:`Claude Code`,where:`settings.json under ~/.claude`},{id:`opencode`,label:`opencode`,where:`opencode.json in your project`}],O=E(a)`
1
+ import{$ as e,L as t,O as n,at as r,c as i,et as a,it as o,lt as s,nt as c,o as l,z as u}from"./queries-CX9mStps.js";import{t as d}from"./Rack-HM36SprU.js";import{t as f}from"./Toggle-CRrH9nDt.js";import{i as p,n as m,r as h}from"./States-DtkkMzEu.js";import{i as g,n as _,t as v}from"./Field-B79Yxdit.js";import{t as y}from"./Meter-stpt3vQu.js";import{t as b}from"./Panel-CoulMx6R.js";import{useEffect as x,useState as S}from"react";import{Fragment as C,jsx as w,jsxs as T}from"react/jsx-runtime";import E from"styled-components";var D=[{id:`claude`,label:`Claude Code`,where:`settings.json under ~/.claude`},{id:`opencode`,label:`opencode`,where:`opencode.json in your project`}],O=E(a)`
2
2
  display: block;
3
3
  white-space: pre;
4
4
  overflow-x: auto;
@@ -1,4 +1,4 @@
1
- import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,G as d,H as f,I as p,J as m,K as h,L as g,M as _,Mt as v,N as y,O as b,Ot as x,P as S,Q as C,R as ee,S as w,St as te,T,Tt as E,U as D,V as ne,W as re,X as ie,Y as ae,Z as oe,_ as se,_t as ce,a as le,at as O,b as k,bt as A,c as j,ct as M,d as ue,dt as de,et as fe,f as N,ft as pe,g as me,gt as he,h as ge,ht as _e,i as ve,it as ye,j as be,jt as xe,k as Se,kt as Ce,l as we,lt as Te,m as Ee,mt as De,n as Oe,nt as ke,o as Ae,ot as je,p as Me,pt as Ne,q as Pe,r as Fe,rt as Ie,s as P,st as Le,t as Re,tt as ze,u as Be,ut as Ve,v as He,vt as Ue,w as We,wt as Ge,x as F,xt as Ke,y as qe,yt as Je,z as Ye}from"./shared-Cct_4xwp.js";import{$ as Xe,C as Ze,G as I,O as Qe,Q as $e,at as L,et as R,g as et,nt as tt,ot as nt,rt}from"./queries-CX9mStps.js";import{i as it,n as at,r as ot}from"./index-COwhxKU7.js";import{a as st,r as z,t as ct}from"./Rack-fDZClWZL.js";import{A as lt,D as B,N as V,j as H,n as ut,r as dt,t as ft}from"./States-DtkkMzEu.js";import{t as pt}from"./Panel-CoulMx6R.js";import{i as mt,n as U,r as W,t as ht}from"./Table-CVDZ69Zx.js";import{t as gt}from"./catalog-BBKm8Ih8.js";import{t as G}from"./Readout-D1XEfywe.js";import*as K from"react";import{PureComponent as _t,forwardRef as vt,useMemo as q,useRef as yt,useState as bt}from"react";import{jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";function xt(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function St(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var Ct=(e,t,n)=>C(e,`xAxis`,xt(e,t),n),wt=(e,t,n)=>fe(e,`xAxis`,xt(e,t),n),Tt=(e,t,n)=>C(e,`yAxis`,St(e,t),n),Et=(e,t,n)=>fe(e,`yAxis`,St(e,t),n),Dt=A([M,Ct,Tt,wt,Et],(e,t,n,r,i)=>Ue(e,`xAxis`)?Ne(t,r,!1):Ne(n,i,!1)),Ot=A([ze,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),kt=e=>{var t=M(e);return Ue(t,`xAxis`)?`yAxis`:`xAxis`},At=(e,t)=>kt(e)===`yAxis`?St(e,t):xt(e,t),jt=(t,n,r)=>e(t,kt(t),At(t,n),r),Mt=A([Ot,jt],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=ke(e);if(n!=null&&r!=null){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),Nt=A([Ot,jt],(e,t)=>{if(e!=null&&e.stackId!=null&&t!=null){var n=t[e.stackId];if(n!=null)return n.graphicalItems.map(e=>e.dataKey).filter(E)}}),Pt=A([M,Ct,Tt,wt,Et,Mt,O,Dt,Ot,ye,Nt],(e,t,n,r,i,a,o,s,c,l,u)=>{var d=o.chartData,f=o.dataStartIndex,p=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var m=c.data,h=m&&m.length>0?m:d?.slice(f,p+1);if(h!=null)return pn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),Ft=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],It=[`id`,`baseLine`];function Lt(){return Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lt.apply(null,arguments)}function Rt(e,t){if(e==null)return{};var n,r,i=zt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Bt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!Je(a)||!Je(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.y||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.y||0),l)),s(l)?K.createElement(`rect`,{x:a<o?a:a-c,y:0,width:c,height:Math.floor(l+(i?parseInt(`${i}`,10):1))}):null}function Vt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!Je(a)||!Je(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.x||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.x||0),l)),s(l)?K.createElement(`rect`,{x:0,y:a<o?a:a-c,width:l+(i?parseInt(`${i}`,10):1),height:Math.floor(c)}):null}function Ht(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?K.createElement(Vt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):K.createElement(Bt,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function Ut(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r!==void 0&&r,a=e.isEntrance,o=a!==void 0&&a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=Rt(e,Ft),f=s===`vertical`?`vertical`:`horizontal`,m=u??!1,h=p(),g=d.id,_=d.baseLine,v=Rt(d,It),y=xe(v),b=K.createElement(je,Lt({},d,{id:g,baseLine:_,connectNulls:m,stroke:`none`,className:`recharts-area-area`,layout:f})),x=l!==`none`&&K.createElement(je,Lt({},y,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:m,fill:`none`,stroke:l,points:d.points})),S=l!==`none`&&c&&Array.isArray(_)&&K.createElement(je,Lt({},y,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:m,fill:`none`,stroke:l,points:_}));return o&&(i||n<1)?K.createElement(Ce,null,K.createElement(`defs`,null,K.createElement(`clipPath`,{id:h},K.createElement(Ht,{alpha:n,points:d.points??[],baseLine:_,layout:f,strokeWidth:d.strokeWidth}))),K.createElement(Ce,{clipPath:`url(#${h})`},b,x,S)):K.createElement(K.Fragment,null,b,x,S)}var Wt=[`id`],Gt=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function Kt(){return Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kt.apply(null,arguments)}function qt(e,t){if(e==null)return{};var n,r,i=Jt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yt(Object(n),!0).forEach(function(t){Xt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xt(e,t,n){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=Qt(e,`string`);return typeof t==`symbol`?t:t+``}function Qt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $t={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:ne,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[Z(Z({},e.next),{},{x:a(e.prev.x,e.next.x,t),y:a(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:Ut,xAxisId:0,yAxisId:0,zIndex:Ie.area};function en(e,t){return e&&e!==`none`?e:t}var tn=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:en(r,i),value:he(n,t),payload:e}]},nn=K.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:x,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:he(o,t),hide:s,type:u,color:en(r,a),unit:c,formatter:l,graphicalItemId:d}};return K.createElement(D,{tooltipEntrySettings:f})});function rn(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=xe(r);return K.createElement(y,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function an(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return K.createElement(h,{value:t?r:void 0},n)}function on(e){var t=e.points,r=e.baseLine,i=e.needClip,a=e.clipPathId,o=e.props,s=e.animationElapsedTime,c=e.isAnimating,l=e.isEntrance,u=o.layout,d=o.type,f=o.stroke,p=o.connectNulls,m=o.isRange,h=o.shape,g=o.id,_=qt(o,Wt),v=Z(Z({},n(_)),{},{id:g,points:t,connectNulls:p,type:d,baseLine:r,layout:u,stroke:f,isRange:m,animationElapsedTime:s,isAnimating:c,isEntrance:l});return K.createElement(K.Fragment,null,t?.length>1&&K.createElement(Ce,{clipPath:i?`url(#clipPath-${a})`:void 0},K.createElement(re,{option:h,DefaultShape:$t.shape,shapeProps:v})),K.createElement(rn,{points:t,props:_,clipPathId:a}))}function sn(e,t,n){if(s(e)){var r=s(t)?t:void 0;return a(r,e,n)}if(l(e)||Ge(e)){var i=s(t)?t:void 0;return a(i,0,n)}return e}function cn(e){var t=e.needClip,n=e.clipPathId,i=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,s=i.points,c=i.baseLine,l=i.isAnimationActive,u=i.animationBegin,d=i.animationDuration,f=i.animationEasing,p=i.animationMatchBy,m=i.animationInterpolateFn,h=q(()=>({points:s,baseLine:c}),[s,c]),_=Ye(h,o),v=Te(),y=ee(i.onAnimationStart,i.onAnimationEnd),b=y.isAnimating,x=y.handleAnimationStart,S=y.handleAnimationEnd,C=_.startValue;if(v==null)return null;var w=Array.isArray(c)&&Array.isArray(C)?r(C,c,p):Array.isArray(c)?r(null,c,p):null;return K.createElement(g,{animationInput:h,animationIdPrefix:`recharts-area-`,items:s,previousItemsRef:a,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:f,onAnimationStart:x,onAnimationEnd:S,animationInterpolateFn:m,animationMatchBy:p,layout:v},(e,r,a)=>{var o=r===1?c:Array.isArray(c)?m(w,r,v):a?c:sn(c,C,r);return _.syncStepValue(o,r),K.createElement(an,{showLabels:!b,points:s},i.children,K.createElement(on,{points:e,baseLine:o,needClip:t,clipPathId:n,props:i,animationElapsedTime:r,isAnimating:b||r<1,isEntrance:a}),K.createElement(Pe,{label:i.label}))})}function ln(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=yt(null),a=yt();return K.createElement(cn,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var un=class extends _t{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,s=e.left,c=e.needClip,l=e.xAxisId,u=e.yAxisId,f=e.width,p=e.height,m=e.id,h=e.baseLine,g=e.zIndex;if(t)return null;var _=v(`recharts-area`,i),y=m,x=o(n),S=x.r,C=x.strokeWidth,ee=d(n),w=S*2+C,te=c?`url(#clipPath-${ee?``:`dots-`}${y})`:void 0;return K.createElement(ie,{zIndex:g},K.createElement(Ce,{className:_},c&&K.createElement(`defs`,null,K.createElement(b,{clipPathId:y,xAxisId:l,yAxisId:u}),!ee&&K.createElement(`clipPath`,{id:`clipPath-dots-${y}`},K.createElement(`rect`,{x:s-w/2,y:a-w/2,width:f+w,height:p+w}))),K.createElement(ln,{needClip:c,clipPathId:y,props:this.props})),K.createElement(be,{points:r,mainColor:en(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:te}),this.props.isRange&&Array.isArray(h)&&K.createElement(be,{points:h,mainColor:en(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:te}))}};function dn(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=qt(e,Gt),g=Ve(),v=oe(),y=Se(p,m).needClip,b=pe(),x=Ke(t=>Pt(t,e.id,b))??{},S=x.points,C=x.isRange,ee=x.baseLine,w=_();if(g!==`horizontal`&&g!==`vertical`||w==null||v!==`AreaChart`&&v!==`ComposedChart`)return null;var te=w.height,T=w.width,E=w.x,D=w.y;return!S||!S.length?null:K.createElement(un,Kt({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:ee,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:te,hide:l,layout:g,isAnimationActive:u,isRange:C,legendType:d,needClip:y,points:S,stroke:f,width:T,left:E,top:D,xAxisId:p,yAxisId:m}))}var fn=(e,t,n,r,i)=>{var a=n??t;if(s(a))return a;var o=e===`horizontal`?i:r,c=o.scale.domain();if(o.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return a===`dataMin`?u:a===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return a===`dataMin`?c[0]:a===`dataMax`?c[1]:c[0]};function pn(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=e.stackDataKeys,g=a&&a.length,_=fn(o,s,r,c,l),v=o===`horizontal`,y=!1,b=u.map((e,t)=>{var r;if(g)r=a[d+t];else{var o=ce(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=ce(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>ce(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:De({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:x?null:l.scale.map(s)??null,value:r,payload:e}:{x:x?null:c.scale.map(s)??null,y:De({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:b,baseLine:(g||y?b.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):v?l.scale.map(_):c.scale.map(_))??0,isRange:y}}function mn(e){var t=te(e,$t),n=pe();return K.createElement(u,{id:t.id,type:`area`},e=>K.createElement(K.Fragment,null,K.createElement(f,{legendPayload:tn(t)}),K.createElement(nn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),K.createElement(S,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:_e(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),K.createElement(dn,Kt({},t,{id:e}))))}var hn=K.memo(mn,Le);hn.displayName=`Area`;var gn=[`axis`],_n=vt((e,t)=>K.createElement(i,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:gn,tooltipPayloadSearcher:ae,categoricalChartProps:e,ref:t})),vn=[`axis`],yn=vt((e,t)=>K.createElement(i,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:vn,tooltipPayloadSearcher:ae,categoricalChartProps:e,ref:t})),bn=53,Q=9,xn=2,Sn=X.div`
1
+ import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,G as d,H as f,I as p,J as m,K as h,L as g,M as _,Mt as v,N as y,O as b,Ot as x,P as S,Q as C,R as ee,S as w,St as te,T,Tt as E,U as D,V as ne,W as re,X as ie,Y as ae,Z as oe,_ as se,_t as ce,a as le,at as O,b as k,bt as A,c as j,ct as M,d as ue,dt as de,et as fe,f as N,ft as pe,g as me,gt as he,h as ge,ht as _e,i as ve,it as ye,j as be,jt as xe,k as Se,kt as Ce,l as we,lt as Te,m as Ee,mt as De,n as Oe,nt as ke,o as Ae,ot as je,p as Me,pt as Ne,q as Pe,r as Fe,rt as Ie,s as P,st as Le,t as Re,tt as ze,u as Be,ut as Ve,v as He,vt as Ue,w as We,wt as Ge,x as F,xt as Ke,y as qe,yt as Je,z as Ye}from"./shared-Cct_4xwp.js";import{$ as Xe,C as Ze,G as I,O as Qe,Q as $e,at as L,et as R,g as et,nt as tt,ot as nt,rt}from"./queries-CX9mStps.js";import{i as it,n as at,r as ot}from"./index-iCfSaRSG.js";import{a as st,r as z,t as ct}from"./Rack-HM36SprU.js";import{A as lt,D as B,N as V,j as H,n as ut,r as dt,t as ft}from"./States-DtkkMzEu.js";import{t as pt}from"./Panel-CoulMx6R.js";import{i as mt,n as U,r as W,t as ht}from"./Table-CVDZ69Zx.js";import{t as gt}from"./catalog-BBKm8Ih8.js";import{t as G}from"./Readout-D1XEfywe.js";import*as K from"react";import{PureComponent as _t,forwardRef as vt,useMemo as q,useRef as yt,useState as bt}from"react";import{jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";function xt(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function St(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var Ct=(e,t,n)=>C(e,`xAxis`,xt(e,t),n),wt=(e,t,n)=>fe(e,`xAxis`,xt(e,t),n),Tt=(e,t,n)=>C(e,`yAxis`,St(e,t),n),Et=(e,t,n)=>fe(e,`yAxis`,St(e,t),n),Dt=A([M,Ct,Tt,wt,Et],(e,t,n,r,i)=>Ue(e,`xAxis`)?Ne(t,r,!1):Ne(n,i,!1)),Ot=A([ze,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),kt=e=>{var t=M(e);return Ue(t,`xAxis`)?`yAxis`:`xAxis`},At=(e,t)=>kt(e)===`yAxis`?St(e,t):xt(e,t),jt=(t,n,r)=>e(t,kt(t),At(t,n),r),Mt=A([Ot,jt],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=ke(e);if(n!=null&&r!=null){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),Nt=A([Ot,jt],(e,t)=>{if(e!=null&&e.stackId!=null&&t!=null){var n=t[e.stackId];if(n!=null)return n.graphicalItems.map(e=>e.dataKey).filter(E)}}),Pt=A([M,Ct,Tt,wt,Et,Mt,O,Dt,Ot,ye,Nt],(e,t,n,r,i,a,o,s,c,l,u)=>{var d=o.chartData,f=o.dataStartIndex,p=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var m=c.data,h=m&&m.length>0?m:d?.slice(f,p+1);if(h!=null)return pn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),Ft=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],It=[`id`,`baseLine`];function Lt(){return Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lt.apply(null,arguments)}function Rt(e,t){if(e==null)return{};var n,r,i=zt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Bt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!Je(a)||!Je(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.y||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.y||0),l)),s(l)?K.createElement(`rect`,{x:a<o?a:a-c,y:0,width:c,height:Math.floor(l+(i?parseInt(`${i}`,10):1))}):null}function Vt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!Je(a)||!Je(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.x||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.x||0),l)),s(l)?K.createElement(`rect`,{x:0,y:a<o?a:a-c,width:l+(i?parseInt(`${i}`,10):1),height:Math.floor(c)}):null}function Ht(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?K.createElement(Vt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):K.createElement(Bt,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function Ut(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r!==void 0&&r,a=e.isEntrance,o=a!==void 0&&a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=Rt(e,Ft),f=s===`vertical`?`vertical`:`horizontal`,m=u??!1,h=p(),g=d.id,_=d.baseLine,v=Rt(d,It),y=xe(v),b=K.createElement(je,Lt({},d,{id:g,baseLine:_,connectNulls:m,stroke:`none`,className:`recharts-area-area`,layout:f})),x=l!==`none`&&K.createElement(je,Lt({},y,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:m,fill:`none`,stroke:l,points:d.points})),S=l!==`none`&&c&&Array.isArray(_)&&K.createElement(je,Lt({},y,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:m,fill:`none`,stroke:l,points:_}));return o&&(i||n<1)?K.createElement(Ce,null,K.createElement(`defs`,null,K.createElement(`clipPath`,{id:h},K.createElement(Ht,{alpha:n,points:d.points??[],baseLine:_,layout:f,strokeWidth:d.strokeWidth}))),K.createElement(Ce,{clipPath:`url(#${h})`},b,x,S)):K.createElement(K.Fragment,null,b,x,S)}var Wt=[`id`],Gt=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function Kt(){return Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kt.apply(null,arguments)}function qt(e,t){if(e==null)return{};var n,r,i=Jt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yt(Object(n),!0).forEach(function(t){Xt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xt(e,t,n){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=Qt(e,`string`);return typeof t==`symbol`?t:t+``}function Qt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $t={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:ne,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[Z(Z({},e.next),{},{x:a(e.prev.x,e.next.x,t),y:a(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:Ut,xAxisId:0,yAxisId:0,zIndex:Ie.area};function en(e,t){return e&&e!==`none`?e:t}var tn=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:en(r,i),value:he(n,t),payload:e}]},nn=K.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:x,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:he(o,t),hide:s,type:u,color:en(r,a),unit:c,formatter:l,graphicalItemId:d}};return K.createElement(D,{tooltipEntrySettings:f})});function rn(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=xe(r);return K.createElement(y,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function an(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return K.createElement(h,{value:t?r:void 0},n)}function on(e){var t=e.points,r=e.baseLine,i=e.needClip,a=e.clipPathId,o=e.props,s=e.animationElapsedTime,c=e.isAnimating,l=e.isEntrance,u=o.layout,d=o.type,f=o.stroke,p=o.connectNulls,m=o.isRange,h=o.shape,g=o.id,_=qt(o,Wt),v=Z(Z({},n(_)),{},{id:g,points:t,connectNulls:p,type:d,baseLine:r,layout:u,stroke:f,isRange:m,animationElapsedTime:s,isAnimating:c,isEntrance:l});return K.createElement(K.Fragment,null,t?.length>1&&K.createElement(Ce,{clipPath:i?`url(#clipPath-${a})`:void 0},K.createElement(re,{option:h,DefaultShape:$t.shape,shapeProps:v})),K.createElement(rn,{points:t,props:_,clipPathId:a}))}function sn(e,t,n){if(s(e)){var r=s(t)?t:void 0;return a(r,e,n)}if(l(e)||Ge(e)){var i=s(t)?t:void 0;return a(i,0,n)}return e}function cn(e){var t=e.needClip,n=e.clipPathId,i=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,s=i.points,c=i.baseLine,l=i.isAnimationActive,u=i.animationBegin,d=i.animationDuration,f=i.animationEasing,p=i.animationMatchBy,m=i.animationInterpolateFn,h=q(()=>({points:s,baseLine:c}),[s,c]),_=Ye(h,o),v=Te(),y=ee(i.onAnimationStart,i.onAnimationEnd),b=y.isAnimating,x=y.handleAnimationStart,S=y.handleAnimationEnd,C=_.startValue;if(v==null)return null;var w=Array.isArray(c)&&Array.isArray(C)?r(C,c,p):Array.isArray(c)?r(null,c,p):null;return K.createElement(g,{animationInput:h,animationIdPrefix:`recharts-area-`,items:s,previousItemsRef:a,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:f,onAnimationStart:x,onAnimationEnd:S,animationInterpolateFn:m,animationMatchBy:p,layout:v},(e,r,a)=>{var o=r===1?c:Array.isArray(c)?m(w,r,v):a?c:sn(c,C,r);return _.syncStepValue(o,r),K.createElement(an,{showLabels:!b,points:s},i.children,K.createElement(on,{points:e,baseLine:o,needClip:t,clipPathId:n,props:i,animationElapsedTime:r,isAnimating:b||r<1,isEntrance:a}),K.createElement(Pe,{label:i.label}))})}function ln(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=yt(null),a=yt();return K.createElement(cn,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var un=class extends _t{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,s=e.left,c=e.needClip,l=e.xAxisId,u=e.yAxisId,f=e.width,p=e.height,m=e.id,h=e.baseLine,g=e.zIndex;if(t)return null;var _=v(`recharts-area`,i),y=m,x=o(n),S=x.r,C=x.strokeWidth,ee=d(n),w=S*2+C,te=c?`url(#clipPath-${ee?``:`dots-`}${y})`:void 0;return K.createElement(ie,{zIndex:g},K.createElement(Ce,{className:_},c&&K.createElement(`defs`,null,K.createElement(b,{clipPathId:y,xAxisId:l,yAxisId:u}),!ee&&K.createElement(`clipPath`,{id:`clipPath-dots-${y}`},K.createElement(`rect`,{x:s-w/2,y:a-w/2,width:f+w,height:p+w}))),K.createElement(ln,{needClip:c,clipPathId:y,props:this.props})),K.createElement(be,{points:r,mainColor:en(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:te}),this.props.isRange&&Array.isArray(h)&&K.createElement(be,{points:h,mainColor:en(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:te}))}};function dn(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=qt(e,Gt),g=Ve(),v=oe(),y=Se(p,m).needClip,b=pe(),x=Ke(t=>Pt(t,e.id,b))??{},S=x.points,C=x.isRange,ee=x.baseLine,w=_();if(g!==`horizontal`&&g!==`vertical`||w==null||v!==`AreaChart`&&v!==`ComposedChart`)return null;var te=w.height,T=w.width,E=w.x,D=w.y;return!S||!S.length?null:K.createElement(un,Kt({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:ee,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:te,hide:l,layout:g,isAnimationActive:u,isRange:C,legendType:d,needClip:y,points:S,stroke:f,width:T,left:E,top:D,xAxisId:p,yAxisId:m}))}var fn=(e,t,n,r,i)=>{var a=n??t;if(s(a))return a;var o=e===`horizontal`?i:r,c=o.scale.domain();if(o.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return a===`dataMin`?u:a===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return a===`dataMin`?c[0]:a===`dataMax`?c[1]:c[0]};function pn(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=e.stackDataKeys,g=a&&a.length,_=fn(o,s,r,c,l),v=o===`horizontal`,y=!1,b=u.map((e,t)=>{var r;if(g)r=a[d+t];else{var o=ce(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=ce(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>ce(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:De({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:x?null:l.scale.map(s)??null,value:r,payload:e}:{x:x?null:c.scale.map(s)??null,y:De({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:b,baseLine:(g||y?b.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):v?l.scale.map(_):c.scale.map(_))??0,isRange:y}}function mn(e){var t=te(e,$t),n=pe();return K.createElement(u,{id:t.id,type:`area`},e=>K.createElement(K.Fragment,null,K.createElement(f,{legendPayload:tn(t)}),K.createElement(nn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),K.createElement(S,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:_e(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),K.createElement(dn,Kt({},t,{id:e}))))}var hn=K.memo(mn,Le);hn.displayName=`Area`;var gn=[`axis`],_n=vt((e,t)=>K.createElement(i,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:gn,tooltipPayloadSearcher:ae,categoricalChartProps:e,ref:t})),vn=[`axis`],yn=vt((e,t)=>K.createElement(i,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:vn,tooltipPayloadSearcher:ae,categoricalChartProps:e,ref:t})),bn=53,Q=9,xn=2,Sn=X.div`
2
2
  display: flex;
3
3
  gap: ${xn}px;
4
4
  `,Cn=X.div`