omnigateway 0.9.2 → 0.10.0

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 (29) hide show
  1. package/bin/omni.js +1754 -113
  2. package/gateway.js +1831 -194
  3. package/package.json +1 -1
  4. package/public/assets/{Chip-Did4Zhvj.js → Chip-BeKVtewW.js} +1 -1
  5. package/public/assets/{CopyValue-Cjg9QXrD.js → CopyValue-NTHhiCuT.js} +1 -1
  6. package/public/assets/{Rack-D0_N-xsd.js → Rack-sUGRoZUx.js} +1 -1
  7. package/public/assets/{RequestTable-i9paP_7e.js → RequestTable-C2RLARWy.js} +1 -1
  8. package/public/assets/{SummaryDeck-g4yLDeXB.js → SummaryDeck-BHXcb_Ji.js} +1 -1
  9. package/public/assets/{Toggle-D-NDlneh.js → Toggle-DwKz1aVq.js} +1 -1
  10. package/public/assets/{TokenBreakdown-D5ZIngM6.js → TokenBreakdown-DM-1HvOr.js} +1 -1
  11. package/public/assets/{_app.accounts-DFhyE62a.js → _app.accounts-DUYxItf0.js} +1 -1
  12. package/public/assets/{_app.console-BfHcfQMp.js → _app.console-BQJMLRv4.js} +1 -1
  13. package/public/assets/{_app.database-Cgw9z3rK.js → _app.database-BIiajZm6.js} +1 -1
  14. package/public/assets/{_app.index-Blw3S4-3.js → _app.index-DagK0Pqp.js} +1 -1
  15. package/public/assets/{_app.keys-DrdfnfIk.js → _app.keys-DLAG_bmt.js} +1 -1
  16. package/public/assets/{_app.logs-DUOqlJzB.js → _app.logs-AyVq3lLb.js} +1 -1
  17. package/public/assets/{_app.models-Dm83HRaM.js → _app.models-CwlkGPrx.js} +1 -1
  18. package/public/assets/{_app.plugins._pluginId-BmJGDYxw.js → _app.plugins._pluginId-BhvEnawY.js} +1 -1
  19. package/public/assets/{_app.settings-66rm4vHJ.js → _app.settings-BKA-1YLs.js} +1 -1
  20. package/public/assets/{_app.usage-BCufy5XR.js → _app.usage-C7JEWKZM.js} +1 -1
  21. package/public/assets/{chevron-right-BZ4QmUDM.js → chevron-right-S84SGCvk.js} +1 -1
  22. package/public/assets/{client-De1_cEH5.js → client-DCvpw0LS.js} +1 -1
  23. package/public/assets/{index-PP8vsvw3.js → index-pZbadEun.js} +3 -3
  24. package/public/assets/{login-CkZlwcdd.js → login-CitmheGz.js} +1 -1
  25. package/public/assets/plus-E7qLz9CF.js +1 -0
  26. package/public/assets/{trash-2-BLc5o7DN.js → trash-2-DmtElUHr.js} +1 -1
  27. package/public/index.html +2 -2
  28. package/public/shared/dashboard-sdk.js +1 -1
  29. package/public/assets/plus-D5AwIXj3.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnigateway",
3
- "version": "0.9.2",
3
+ "version": "0.10.0",
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{m as e}from"./Rack-D0_N-xsd.js";import{jsx as t}from"react/jsx-runtime";import n from"styled-components";var r={neutral:{fg:`var(--ink-dim)`,bg:`transparent`},ok:{fg:`var(--ok)`,bg:`var(--ok-wash)`},warn:{fg:`var(--warn)`,bg:`var(--warn-wash)`},down:{fg:`var(--down)`,bg:`var(--down-wash)`},accent:{fg:`var(--accent)`,bg:`var(--accent-wash)`}},i=n.span`
1
+ import{m as e}from"./Rack-sUGRoZUx.js";import{jsx as t}from"react/jsx-runtime";import n from"styled-components";var r={neutral:{fg:`var(--ink-dim)`,bg:`transparent`},ok:{fg:`var(--ok)`,bg:`var(--ok-wash)`},warn:{fg:`var(--warn)`,bg:`var(--warn-wash)`},down:{fg:`var(--down)`,bg:`var(--down-wash)`},accent:{fg:`var(--accent)`,bg:`var(--accent-wash)`}},i=n.span`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  gap: 4px;
@@ -1,4 +1,4 @@
1
- import{C as e,O as t}from"./Panel-BlNr9j6-.js";import{b as n}from"./Rack-D0_N-xsd.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(`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 f(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 p(e,t){if(typeof navigator<`u`&&navigator.clipboard!==void 0)try{return await navigator.clipboard.writeText(e),`copied`}catch{}let n=f(t??null);if(n&&typeof document.execCommand==`function`)try{if(document.execCommand(`copy`))return`copied`}catch{}return n?`selected`:`failed`}var m=l.div`
1
+ import{C as e,O as t}from"./Panel-BlNr9j6-.js";import{b as n}from"./Rack-sUGRoZUx.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(`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 f(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 p(e,t){if(typeof navigator<`u`&&navigator.clipboard!==void 0)try{return await navigator.clipboard.writeText(e),`copied`}catch{}let n=f(t??null);if(n&&typeof document.execCommand==`function`)try{if(document.execCommand(`copy`))return`copied`}catch{}return n?`selected`:`failed`}var m=l.div`
2
2
  display: flex;
3
3
  align-items: stretch;
4
4
  gap: 0;
@@ -346,7 +346,7 @@ import{Gt as e,I as t,Kt as n,N as r,Ot as i,P as a,bt as o,i as s,t as c,vt as
346
346
  font-size: 10.5px;
347
347
  line-height: 1.3;
348
348
  color: ${({theme:e})=>e.color.inkDim};
349
- `,la=9e4;async function ua(){try{return(await fetch(`/health`,{cache:`no-store`})).ok}catch{return!1}}function da({pollMs:e=750}){let t=l(),n=i(),r=p(),[a,o]=D(null),[s,c]=D(!1),[u,d]=D(!1),[f,h]=D(`idle`),g=t.data;ie(()=>{if(!s)return;let t=!1,n,r=!1,i=0,a=Math.max(1,Math.ceil(la/e)),o=async()=>{let s=await ua();if(!t){if(!r&&!s)r=!0,h(`returning`);else if(r&&s){window.location.reload();return}if(i+=1,i>=a){h(`lost`),c(!1);return}n=setTimeout(()=>void o(),e)}};return n=setTimeout(()=>void o(),e),()=>{t=!0,n!==void 0&&clearTimeout(n)}},[s,e]);let _=()=>{h(`leaving`),n.mutate(void 0,{onSuccess:()=>c(!0),onError:()=>h(`idle`)})};return u?k(se,{children:[O(v,{}),g===void 0?null:k(sa,{children:[`v`,g.version]}),O(ta,{}),O(na,{children:k(m,{$gap:1,children:[O(b,{children:`Gateway stopped`}),k(ca,{children:[`Nothing on this screen will update again, and nothing here can start it: that needs`,` `,g?.supervisor===`container`?`the host that runs this container`:`a shell on the machine it runs on`,`.`]})]})})]}):k(se,{children:[O(v,{}),g===void 0?null:k(sa,{children:[`v`,g.version]}),O(ta,{}),k(na,{title:g===void 0?void 0:ea[g.supervisor],children:[k(ra,{type:`button`,$size:`sm`,"aria-label":`Restart gateway`,disabled:g===void 0||!g.canRestart||n.isPending||s,onClick:()=>o(`restart`),children:[O(Pe,{}),`Restart`]}),k(ra,{type:`button`,$size:`sm`,$variant:`danger`,"aria-label":`Shut down gateway`,disabled:g===void 0||!g.canShutdown||r.isPending||s,onClick:()=>o(`shutdown`),children:[O(Ne,{}),`Shut down`]}),g?.note===void 0?null:O(ia,{children:g.note}),f===`leaving`?O(oa,{role:`status`,children:`Restarting. Waiting for the gateway to stop answering.`}):f===`returning`?O(oa,{role:`status`,children:`The gateway has stopped answering. Waiting for it to come back, then this page reloads.`}):f===`lost`?O(aa,{role:`alert`,children:`The gateway has not come back. Reload this page once it is running again, or check the machine it runs on.`}):null,n.isError?O(aa,{role:`alert`,children:S(n.error)}):null,r.isError?O(aa,{role:`alert`,children:S(r.error)}):null]}),O($i,{open:a===`restart`,onOpenChange:e=>{e||o(null)},title:`Restart gateway`,body:`${g===void 0?``:`${ea[g.supervisor]} `}Requests in flight are dropped when the process goes. This console waits for the gateway to stop answering and to answer again, then reloads itself.`,confirmLabel:`Restart now`,busy:n.isPending,onConfirm:()=>{o(null),_()}}),O($i,{open:a===`shutdown`,onOpenChange:e=>{e||o(null)},title:`Shut down gateway`,body:g?.supervisor===`container`?`Stopping the only process in this container takes this dashboard with it, and the dashboard is what would have restarted the gateway. Unless the container's restart policy brings it back, getting it running again needs access to the host.`:`The gateway stops serving and stays stopped. This console goes with it, so starting the gateway again needs a shell on the machine it runs on.`,confirmLabel:`Shut down now`,busy:r.isPending,onConfirm:()=>{o(null),r.mutate(void 0,{onSuccess:()=>d(!0)})}})]})}var fa=[{to:`/`,label:`Rack`,blurb:`Live state of every account and model`,Icon:Ce},{to:`/accounts`,label:`Accounts`,blurb:`Provider credentials and their health`,Icon:Ee},{to:`/models`,label:`Models`,blurb:`Virtual models, targets, and routing`,Icon:Te},{to:`/keys`,label:`Keys`,blurb:`Gateway API keys and their limits`,Icon:ke},{to:`/usage`,label:`Usage`,blurb:`Requests, tokens, and spend over time`,Icon:Oe},{to:`/logs`,label:`Logs`,blurb:`Recent requests, one row each`,Icon:Fe},{to:`/console`,label:`Console`,blurb:`The gateway's own output, as it was printed`,Icon:Re},{to:`/settings`,label:`Settings`,blurb:`Routing weights, retries, retention`,Icon:Ie},{to:`/database`,label:`Database`,blurb:`Size, snapshots, and retention`,Icon:De}],pa=A.nav`
349
+ `,la=9e4;async function ua(){try{return(await fetch(`/health`,{cache:`no-store`})).ok}catch{return!1}}function da({pollMs:e=750}){let t=l(),n=i(),r=p(),[a,o]=D(null),[s,c]=D(!1),[u,d]=D(!1),[f,h]=D(`idle`),g=t.data;ie(()=>{if(!s)return;let t=!1,n,r=!1,i=0,a=Math.max(1,Math.ceil(la/e)),o=async()=>{let s=await ua();if(!t){if(!r&&!s)r=!0,h(`returning`);else if(r&&s){window.location.reload();return}if(i+=1,i>=a){h(`lost`),c(!1);return}n=setTimeout(()=>void o(),e)}};return n=setTimeout(()=>void o(),e),()=>{t=!0,n!==void 0&&clearTimeout(n)}},[s,e]);let _=()=>{h(`leaving`),n.mutate(void 0,{onSuccess:()=>c(!0),onError:()=>h(`idle`)})};return u?k(se,{children:[O(v,{}),g===void 0?null:k(sa,{children:[`omnigateway v`,g.version]}),O(ta,{}),O(na,{children:k(m,{$gap:1,children:[O(b,{children:`Gateway stopped`}),k(ca,{children:[`Nothing on this screen will update again, and nothing here can start it: that needs`,` `,g?.supervisor===`container`?`the host that runs this container`:`a shell on the machine it runs on`,`.`]})]})})]}):k(se,{children:[O(v,{}),g===void 0?null:k(sa,{children:[`omnigateway v`,g.version]}),O(ta,{}),k(na,{title:g===void 0?void 0:ea[g.supervisor],children:[k(ra,{type:`button`,$size:`sm`,"aria-label":`Restart gateway`,disabled:g===void 0||!g.canRestart||n.isPending||s,onClick:()=>o(`restart`),children:[O(Pe,{}),`Restart`]}),k(ra,{type:`button`,$size:`sm`,$variant:`danger`,"aria-label":`Shut down gateway`,disabled:g===void 0||!g.canShutdown||r.isPending||s,onClick:()=>o(`shutdown`),children:[O(Ne,{}),`Shut down`]}),g?.note===void 0?null:O(ia,{children:g.note}),f===`leaving`?O(oa,{role:`status`,children:`Restarting. Waiting for the gateway to stop answering.`}):f===`returning`?O(oa,{role:`status`,children:`The gateway has stopped answering. Waiting for it to come back, then this page reloads.`}):f===`lost`?O(aa,{role:`alert`,children:`The gateway has not come back. Reload this page once it is running again, or check the machine it runs on.`}):null,n.isError?O(aa,{role:`alert`,children:S(n.error)}):null,r.isError?O(aa,{role:`alert`,children:S(r.error)}):null]}),O($i,{open:a===`restart`,onOpenChange:e=>{e||o(null)},title:`Restart gateway`,body:`${g===void 0?``:`${ea[g.supervisor]} `}Requests in flight are dropped when the process goes. This console waits for the gateway to stop answering and to answer again, then reloads itself.`,confirmLabel:`Restart now`,busy:n.isPending,onConfirm:()=>{o(null),_()}}),O($i,{open:a===`shutdown`,onOpenChange:e=>{e||o(null)},title:`Shut down gateway`,body:g?.supervisor===`container`?`Stopping the only process in this container takes this dashboard with it, and the dashboard is what would have restarted the gateway. Unless the container's restart policy brings it back, getting it running again needs access to the host.`:`The gateway stops serving and stays stopped. This console goes with it, so starting the gateway again needs a shell on the machine it runs on.`,confirmLabel:`Shut down now`,busy:r.isPending,onConfirm:()=>{o(null),r.mutate(void 0,{onSuccess:()=>d(!0)})}})]})}var fa=[{to:`/`,label:`Rack`,blurb:`Live state of every account and model`,Icon:Ce},{to:`/accounts`,label:`Accounts`,blurb:`Provider credentials and their health`,Icon:Ee},{to:`/models`,label:`Models`,blurb:`Virtual models, targets, and routing`,Icon:Te},{to:`/keys`,label:`Keys`,blurb:`Gateway API keys and their limits`,Icon:ke},{to:`/usage`,label:`Usage`,blurb:`Requests, tokens, and spend over time`,Icon:Oe},{to:`/logs`,label:`Logs`,blurb:`Recent requests, one row each`,Icon:Fe},{to:`/console`,label:`Console`,blurb:`The gateway's own output, as it was printed`,Icon:Re},{to:`/settings`,label:`Settings`,blurb:`Routing weights, retries, retention`,Icon:Ie},{to:`/database`,label:`Database`,blurb:`Size, snapshots, and retention`,Icon:De}],pa=A.nav`
350
350
  grid-area: rail;
351
351
  display: flex;
352
352
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{A as e,I as t,M as n,N as r,R as i,f as a,j as o,k as s,l as c,p as l,t as u,u as d}from"./Lamp-C2Q3t5Mn.js";import{C as f,_ as p,b as m,v as h,w as g}from"./Panel-BlNr9j6-.js";import{n as _,r as v,t as y}from"./TokenBreakdown-D5ZIngM6.js";import{n as b,t as x}from"./Chip-Did4Zhvj.js";import{i as S,n as C,r as w,t as T}from"./Table-CVDZ69Zx.js";import{useEffect as E,useState as D}from"react";import{Fragment as O,jsx as k,jsxs as A}from"react/jsx-runtime";import j from"styled-components";function M(e){let[t,n]=D(Date.now);return E(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),t}function N(e,t,n){if(t.length===0||e.requestedModel.toLowerCase().includes(t)||(e.resolvedModel??``).toLowerCase().includes(t)||(e.errorCode??``).toLowerCase().includes(t))return!0;if(n===void 0)return!1;let r=e.credentialId==null?``:n.accounts.get(e.credentialId)??``,i=e.apiKeyId==null?``:n.keys.get(e.apiKeyId)??e.apiKeyId;return r.toLowerCase().includes(t)||i.toLowerCase().includes(t)}function P(e,t,n,r){let i=n.trim().toLowerCase();return e.filter(e=>(t!==`failed`||c(e))&&N(e,i,r))}function F({log:e}){return k(C,{$align:`right`,$mono:!0,...d(e)?{"aria-label":`processing`}:{title:v(e)},children:d(e)?k(y,{}):k(_,{tokens:e})})}function I({rows:e,now:c,names:f,onOpen:_}){return A(T,{children:[k(`thead`,{children:A(`tr`,{children:[k(w,{}),k(w,{$align:`right`,children:`Time`}),k(w,{children:`Requested`}),k(w,{children:`Routed to`}),f===void 0?null:A(O,{children:[k(w,{children:`Account`}),k(w,{children:`Key`})]}),k(w,{$align:`right`,children:`Try`}),k(w,{$align:`right`,children:`TTFT`}),k(w,{$align:`right`,children:`Total`}),k(w,{$align:`right`,children:`Tokens`}),k(w,{$align:`right`,children:`Cost`}),k(w,{children:`Outcome`})]})}),k(`tbody`,{children:e.map(e=>A(S,{$selectable:!0,onClick:()=>_(e),children:[k(C,{children:k(u,{state:l(e),label:a(e)})}),k(C,{$align:`right`,$mono:!0,title:o(e.at),children:s(e.at)}),k(C,{$mono:!0,children:k(g,{style:{display:`block`,maxWidth:`20ch`},children:e.requestedModel||`—`})}),k(C,{children:e.resolvedProvider===null?k(p,{children:d(e)?`routing…`:`not routed`}):A(m,{$gap:1,children:[k(b,{provider:e.resolvedProvider}),k(h,{$dim:!0,children:e.resolvedModel??`—`})]})}),f===void 0?null:A(O,{children:[k(C,{children:k(g,{style:{display:`block`,maxWidth:`18ch`},children:e.credentialId==null?`—`:f.accounts.get(e.credentialId)??i(e.credentialId)})}),k(C,{children:k(g,{style:{display:`block`,maxWidth:`16ch`},title:e.apiKeyId??void 0,children:e.apiKeyId==null?`—`:f.keys.get(e.apiKeyId)??i(e.apiKeyId)})})]}),k(C,{$align:`right`,$mono:!0,children:d(e)?`—`:e.attempts}),k(C,{$align:`right`,$mono:!0,children:d(e)?`—`:r(e.ttftMs)}),k(C,{$align:`right`,$mono:!0,children:d(e)?n(Math.max(0,c-e.at)):r(e.durationMs)}),k(F,{log:e}),k(C,{$align:`right`,$mono:!0,children:d(e)?`—`:t(e.costUsd)}),k(C,{children:d(e)?k(x,{$tone:`accent`,children:`live`}):e.errorCode===null?k(x,{$tone:`ok`,children:e.status}):k(x,{$tone:`down`,children:e.errorCode})})]},e.id))})]})}var L=j.dl`
1
+ import{A as e,I as t,M as n,N as r,R as i,f as a,j as o,k as s,l as c,p as l,t as u,u as d}from"./Lamp-C2Q3t5Mn.js";import{C as f,_ as p,b as m,v as h,w as g}from"./Panel-BlNr9j6-.js";import{n as _,r as v,t as y}from"./TokenBreakdown-DM-1HvOr.js";import{n as b,t as x}from"./Chip-BeKVtewW.js";import{i as S,n as C,r as w,t as T}from"./Table-CVDZ69Zx.js";import{useEffect as E,useState as D}from"react";import{Fragment as O,jsx as k,jsxs as A}from"react/jsx-runtime";import j from"styled-components";function M(e){let[t,n]=D(Date.now);return E(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),t}function N(e,t,n){if(t.length===0||e.requestedModel.toLowerCase().includes(t)||(e.resolvedModel??``).toLowerCase().includes(t)||(e.errorCode??``).toLowerCase().includes(t))return!0;if(n===void 0)return!1;let r=e.credentialId==null?``:n.accounts.get(e.credentialId)??``,i=e.apiKeyId==null?``:n.keys.get(e.apiKeyId)??e.apiKeyId;return r.toLowerCase().includes(t)||i.toLowerCase().includes(t)}function P(e,t,n,r){let i=n.trim().toLowerCase();return e.filter(e=>(t!==`failed`||c(e))&&N(e,i,r))}function F({log:e}){return k(C,{$align:`right`,$mono:!0,...d(e)?{"aria-label":`processing`}:{title:v(e)},children:d(e)?k(y,{}):k(_,{tokens:e})})}function I({rows:e,now:c,names:f,onOpen:_}){return A(T,{children:[k(`thead`,{children:A(`tr`,{children:[k(w,{}),k(w,{$align:`right`,children:`Time`}),k(w,{children:`Requested`}),k(w,{children:`Routed to`}),f===void 0?null:A(O,{children:[k(w,{children:`Account`}),k(w,{children:`Key`})]}),k(w,{$align:`right`,children:`Try`}),k(w,{$align:`right`,children:`TTFT`}),k(w,{$align:`right`,children:`Total`}),k(w,{$align:`right`,children:`Tokens`}),k(w,{$align:`right`,children:`Cost`}),k(w,{children:`Outcome`})]})}),k(`tbody`,{children:e.map(e=>A(S,{$selectable:!0,onClick:()=>_(e),children:[k(C,{children:k(u,{state:l(e),label:a(e)})}),k(C,{$align:`right`,$mono:!0,title:o(e.at),children:s(e.at)}),k(C,{$mono:!0,children:k(g,{style:{display:`block`,maxWidth:`20ch`},children:e.requestedModel||`—`})}),k(C,{children:e.resolvedProvider===null?k(p,{children:d(e)?`routing…`:`not routed`}):A(m,{$gap:1,children:[k(b,{provider:e.resolvedProvider}),k(h,{$dim:!0,children:e.resolvedModel??`—`})]})}),f===void 0?null:A(O,{children:[k(C,{children:k(g,{style:{display:`block`,maxWidth:`18ch`},children:e.credentialId==null?`—`:f.accounts.get(e.credentialId)??i(e.credentialId)})}),k(C,{children:k(g,{style:{display:`block`,maxWidth:`16ch`},title:e.apiKeyId??void 0,children:e.apiKeyId==null?`—`:f.keys.get(e.apiKeyId)??i(e.apiKeyId)})})]}),k(C,{$align:`right`,$mono:!0,children:d(e)?`—`:e.attempts}),k(C,{$align:`right`,$mono:!0,children:d(e)?`—`:r(e.ttftMs)}),k(C,{$align:`right`,$mono:!0,children:d(e)?n(Math.max(0,c-e.at)):r(e.durationMs)}),k(F,{log:e}),k(C,{$align:`right`,$mono:!0,children:d(e)?`—`:t(e.costUsd)}),k(C,{children:d(e)?k(x,{$tone:`accent`,children:`live`}):e.errorCode===null?k(x,{$tone:`ok`,children:e.status}):k(x,{$tone:`down`,children:e.errorCode})})]},e.id))})]})}var L=j.dl`
2
2
  display: grid;
3
3
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
4
4
  gap: 6px ${({theme:e})=>e.space(3)};
@@ -1,4 +1,4 @@
1
- import{b as e,p as t,y as n}from"./shared-C47BfV_u.js";import{A as r,I as i,N as a,P as o}from"./Lamp-C2Q3t5Mn.js";import{D as s,a as c,b as l,i as u,r as d,t as f}from"./Panel-BlNr9j6-.js";import{f as p}from"./Rack-D0_N-xsd.js";import{t as m}from"./Readout-D8Ofl3Gz.js";import{jsx as h,jsxs as g}from"react/jsx-runtime";import _ from"styled-components";function v({legend:e,meta:t,actions:n,footer:r,query:i,failure:a,empty:o,isEmpty:s,children:l}){return h(f,{legend:e,...t===void 0?{}:{meta:t},...n===void 0?{}:{actions:n},...r===void 0?{}:{footer:r},children:i.isError?h(u,{...a===void 0?{}:{legend:a},error:i.error,onRetry:i.refetch}):i.isLoading?h(c,{rows:4}):s?h(d,{legend:o.legend,message:o.message}):l})}var y=_(s)`
1
+ import{b as e,p as t,y as n}from"./shared-C47BfV_u.js";import{A as r,I as i,N as a,P as o}from"./Lamp-C2Q3t5Mn.js";import{D as s,a as c,b as l,i as u,r as d,t as f}from"./Panel-BlNr9j6-.js";import{f as p}from"./Rack-sUGRoZUx.js";import{t as m}from"./Readout-D8Ofl3Gz.js";import{jsx as h,jsxs as g}from"react/jsx-runtime";import _ from"styled-components";function v({legend:e,meta:t,actions:n,footer:r,query:i,failure:a,empty:o,isEmpty:s,children:l}){return h(f,{legend:e,...t===void 0?{}:{meta:t},...n===void 0?{}:{actions:n},...r===void 0?{}:{footer:r},children:i.isError?h(u,{...a===void 0?{}:{legend:a},error:i.error,onRetry:i.refetch}):i.isLoading?h(c,{rows:4}):s?h(d,{legend:o.legend,message:o.message}):l})}var y=_(s)`
2
2
  border-color: ${({theme:e,$on:t})=>t?e.color.accent:e.color.ruleStrong};
3
3
  color: ${({theme:e,$on:t})=>t?e.color.accent:e.color.inkDim};
4
4
  background: ${({theme:e,$on:t})=>t?e.color.accentWash:e.color.panelRaised};
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,l as n,o as r,s as i,u as a}from"./Rack-D0_N-xsd.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=a(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:i(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=a(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:i(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{a as e,c as t,l as n,o as r,s as i,u as a}from"./Rack-sUGRoZUx.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=a(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:i(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=a(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:i(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{A as e}from"./Lamp-C2Q3t5Mn.js";import{b as t,y as n}from"./Rack-D0_N-xsd.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a,{keyframes as o}from"styled-components";var s=t(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=t(`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{A as e}from"./Lamp-C2Q3t5Mn.js";import{b as t,y as n}from"./Rack-sUGRoZUx.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a,{keyframes as o}from"styled-components";var s=t(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=t(`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,4 +1,4 @@
1
- import{A as e,Et as t,F as n,H as r,Ht as i,Lt as a,N as o,P as s,St as c,Tt as l,U as u,b as d,c as f,d as p,ft as ee,h as m,it as te,lt as h,n as g,o as _,ot as v,rt as ne,s as y,t as b,ut as x,v as S,w as C,y as w}from"./Lamp-C2Q3t5Mn.js";import{C as T,D as E,O as D,_ as O,a as k,b as A,i as re,o as j,r as M,t as N,v as P,x as F}from"./Panel-BlNr9j6-.js";import{_ as I,b as L,i as ie,m as R,r as z,t as B}from"./Rack-D0_N-xsd.js";import{t as V}from"./CopyValue-Cjg9QXrD.js";import{n as H,t as ae}from"./chevron-right-BZ4QmUDM.js";import{t as oe}from"./plus-D5AwIXj3.js";import{t as se}from"./trash-2-BLc5o7DN.js";import{t as ce}from"./Toggle-D-NDlneh.js";import{t as le}from"./Chip-Did4Zhvj.js";import{i as U,n as W,r as ue,t as G}from"./Field-DcNu4yw-.js";import{t as de}from"./Meter-stpt3vQu.js";import{i as fe,n as K,r as q,t as pe}from"./Table-CVDZ69Zx.js";import{n as me,r as he,t as ge}from"./WindowChart-BsonO5Py.js";import{Fragment as _e,useCallback as J,useEffect as ve,useState as Y}from"react";import{Fragment as X,jsx as Z,jsxs as Q}from"react/jsx-runtime";import $ from"styled-components";var ye=L(`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`}]]);function be(e){return e?.authTypes??[]}function xe(e){return be(e).includes(`oauth`)?`oauth`:`apiKey`}function Se(e){return e[0]?.id??`anthropic`}var Ce={oauth:`Authorize in the browser`,apiKey:`Paste an API key`};function we(e){let t=e?.callback;return t===void 0?`code#state`:`${t.uri}?code=…`}var Te=$.ol`
1
+ import{A as e,Et as t,F as n,H as r,Ht as i,Lt as a,N as o,P as s,St as c,Tt as l,U as u,b as d,c as f,d as p,ft as ee,h as m,it as te,lt as h,n as g,o as _,ot as v,rt as ne,s as y,t as b,ut as x,v as S,w as C,y as w}from"./Lamp-C2Q3t5Mn.js";import{C as T,D as E,O as D,_ as O,a as k,b as A,i as re,o as j,r as M,t as N,v as P,x as F}from"./Panel-BlNr9j6-.js";import{_ as I,b as L,i as ie,m as R,r as z,t as B}from"./Rack-sUGRoZUx.js";import{t as V}from"./CopyValue-NTHhiCuT.js";import{n as H,t as ae}from"./chevron-right-S84SGCvk.js";import{t as oe}from"./plus-E7qLz9CF.js";import{t as se}from"./trash-2-DmtElUHr.js";import{t as ce}from"./Toggle-DwKz1aVq.js";import{t as le}from"./Chip-BeKVtewW.js";import{i as U,n as W,r as ue,t as G}from"./Field-DcNu4yw-.js";import{t as de}from"./Meter-stpt3vQu.js";import{i as fe,n as K,r as q,t as pe}from"./Table-CVDZ69Zx.js";import{n as me,r as he,t as ge}from"./WindowChart-BsonO5Py.js";import{Fragment as _e,useCallback as J,useEffect as ve,useState as Y}from"react";import{Fragment as X,jsx as Z,jsxs as Q}from"react/jsx-runtime";import $ from"styled-components";var ye=L(`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`}]]);function be(e){return e?.authTypes??[]}function xe(e){return be(e).includes(`oauth`)?`oauth`:`apiKey`}function Se(e){return e[0]?.id??`anthropic`}var Ce={oauth:`Authorize in the browser`,apiKey:`Paste an API key`};function we(e){let t=e?.callback;return t===void 0?`code#state`:`${t.uri}?code=…`}var Te=$.ol`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${({theme:e})=>e.space(3)};
@@ -1,4 +1,4 @@
1
- import{A as e,Ct as t,at as n,z as r}from"./Lamp-C2Q3t5Mn.js";import{a as i,b as a,i as o,r as s,t as c,y as ee}from"./Panel-BlNr9j6-.js";import{_ as l,t as u}from"./Rack-D0_N-xsd.js";import{a as d,c as f,o as p,s as m}from"./index-PP8vsvw3.js";import{i as h}from"./Field-DcNu4yw-.js";import{useQueryClient as g}from"@tanstack/react-query";import{useLayoutEffect as te,useMemo as _,useRef as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import S from"styled-components";var C={debug:10,info:20,warn:30,error:40};function w(e){return typeof e==`string`&&e in C}function T(e,t){return!w(t)||e.level===null||C[e.level]>=C[t]}function E(e){if(typeof e!=`object`||!e)return null;let{raw:t,at:n,level:r,msg:i}=e;return typeof t!=`string`||n!==null&&typeof n!=`number`||r!==null&&!w(r)||i!==null&&typeof i!=`string`?null:{raw:t,at:n,level:r,msg:i}}function D(e){if(typeof e!=`object`||!e)return null;let{lines:t}=e;if(!Array.isArray(t))return null;let n=[];for(let e of t){let t=E(e);if(t===null)return null;n.push(t)}return n}var O=[100,200,500],ne=[{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`}],re=S(a)`
1
+ import{A as e,Ct as t,at as n,z as r}from"./Lamp-C2Q3t5Mn.js";import{a as i,b as a,i as o,r as s,t as c,y as ee}from"./Panel-BlNr9j6-.js";import{_ as l,t as u}from"./Rack-sUGRoZUx.js";import{a as d,c as f,o as p,s as m}from"./index-pZbadEun.js";import{i as h}from"./Field-DcNu4yw-.js";import{useQueryClient as g}from"@tanstack/react-query";import{useLayoutEffect as te,useMemo as _,useRef as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import S from"styled-components";var C={debug:10,info:20,warn:30,error:40};function w(e){return typeof e==`string`&&e in C}function T(e,t){return!w(t)||e.level===null||C[e.level]>=C[t]}function E(e){if(typeof e!=`object`||!e)return null;let{raw:t,at:n,level:r,msg:i}=e;return typeof t!=`string`||n!==null&&typeof n!=`number`||r!==null&&!w(r)||i!==null&&typeof i!=`string`?null:{raw:t,at:n,level:r,msg:i}}function D(e){if(typeof e!=`object`||!e)return null;let{lines:t}=e;if(!Array.isArray(t))return null;let n=[];for(let e of t){let t=E(e);if(t===null)return null;n.push(t)}return n}var O=[100,200,500],ne=[{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`}],re=S(a)`
2
2
  gap: ${({theme:e})=>e.space(2)};
3
3
  flex-wrap: wrap;
4
4
  `,k=S(h)`
@@ -1,4 +1,4 @@
1
- import{A as e,Bt as t,D as n,G as r,Mt as i,N as a,P as o,Wt as s,X as c,ct as l,dt as u,gt as d,j as f,kt as p,mt as m}from"./Lamp-C2Q3t5Mn.js";import{C as h,D as g,_,a as v,b as y,g as b,i as x,o as S,r as ee,t as C,w,x as T}from"./Panel-BlNr9j6-.js";import{b as E,r as D,t as O}from"./Rack-D0_N-xsd.js";import{t as k}from"./trash-2-BLc5o7DN.js";import{r as A,t as j}from"./Field-DcNu4yw-.js";import{t as M}from"./Meter-stpt3vQu.js";import{i as N,n as P,r as F,t as I}from"./Table-CVDZ69Zx.js";import{t as L}from"./Readout-D8Ofl3Gz.js";import{n as R}from"./reasons-Du1OBWAM.js";import{useQueryClient as z}from"@tanstack/react-query";import{useCallback as B,useState as V}from"react";import{Fragment as H,jsx as U,jsxs as W}from"react/jsx-runtime";import G from"styled-components";var K=E(`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`}]]),q=E(`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`}]]),J=[{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}],Y=G.p`
1
+ import{A as e,Bt as t,D as n,G as r,Mt as i,N as a,P as o,Wt as s,X as c,ct as l,dt as u,gt as d,j as f,kt as p,mt as m}from"./Lamp-C2Q3t5Mn.js";import{C as h,D as g,_,a as v,b as y,g as b,i as x,o as S,r as ee,t as C,w,x as T}from"./Panel-BlNr9j6-.js";import{b as E,r as D,t as O}from"./Rack-sUGRoZUx.js";import{t as k}from"./trash-2-DmtElUHr.js";import{r as A,t as j}from"./Field-DcNu4yw-.js";import{t as M}from"./Meter-stpt3vQu.js";import{i as N,n as P,r as F,t as I}from"./Table-CVDZ69Zx.js";import{t as L}from"./Readout-D8Ofl3Gz.js";import{n as R}from"./reasons-Du1OBWAM.js";import{useQueryClient as z}from"@tanstack/react-query";import{useCallback as B,useState as V}from"react";import{Fragment as H,jsx as U,jsxs as W}from"react/jsx-runtime";import G from"styled-components";var K=E(`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`}]]),q=E(`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`}]]),J=[{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}],Y=G.p`
2
2
  font-size: 12px;
3
3
  color: ${({theme:e})=>e.color.down};
4
4
  `,X=G.p`
@@ -1,4 +1,4 @@
1
- import{A as e,F as t,Gt as n,I as r,Lt as i,N as a,P as o,St as s,Ut as c,c as l,f as u,h as d,i as f,k as p,lt as m,n as h,o as g,p as _,s as v,t as y,u as b,ut as x,v as ee,x as S,xt as C}from"./Lamp-C2Q3t5Mn.js";import{C as w,D as T,S as E,_ as D,b as O,g as k,i as A,r as j,t as M,v as N,w as P,x as F}from"./Panel-BlNr9j6-.js";import{_ as I,f as L,m as R,t as z}from"./Rack-D0_N-xsd.js";import{n as B,t as te}from"./TokenBreakdown-D5ZIngM6.js";import{n as ne,t as V}from"./Chip-Did4Zhvj.js";import{t as re}from"./Meter-stpt3vQu.js";import{i as H,n as U,r as W,t as G}from"./Table-CVDZ69Zx.js";import{t as K}from"./Readout-D8Ofl3Gz.js";import{Fragment as q,jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";var ie=X(P)`
1
+ import{A as e,F as t,Gt as n,I as r,Lt as i,N as a,P as o,St as s,Ut as c,c as l,f as u,h as d,i as f,k as p,lt as m,n as h,o as g,p as _,s as v,t as y,u as b,ut as x,v as ee,x as S,xt as C}from"./Lamp-C2Q3t5Mn.js";import{C as w,D as T,S as E,_ as D,b as O,g as k,i as A,r as j,t as M,v as N,w as P,x as F}from"./Panel-BlNr9j6-.js";import{_ as I,f as L,m as R,t as z}from"./Rack-sUGRoZUx.js";import{n as B,t as te}from"./TokenBreakdown-DM-1HvOr.js";import{n as ne,t as V}from"./Chip-BeKVtewW.js";import{t as re}from"./Meter-stpt3vQu.js";import{i as H,n as U,r as W,t as G}from"./Table-CVDZ69Zx.js";import{t as K}from"./Readout-D8Ofl3Gz.js";import{Fragment as q,jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";var ie=X(P)`
2
2
  font-weight: 500;
3
3
  display: block;
4
4
  max-width: 24ch;
@@ -1,4 +1,4 @@
1
- import{At as e,Ft as t,Pt as n,St as r,_t as i,j as a,st as o}from"./Lamp-C2Q3t5Mn.js";import{C as s,D as c,O as l,_ as u,a as d,b as f,i as p,o as m,r as h,t as g,v as _,w as v,x as y}from"./Panel-BlNr9j6-.js";import{b,i as x,r as S,t as C,v as w}from"./Rack-D0_N-xsd.js";import{t as T}from"./CopyValue-Cjg9QXrD.js";import{n as E,t as D}from"./chevron-right-BZ4QmUDM.js";import{t as O}from"./plus-D5AwIXj3.js";import{t as k}from"./Toggle-D-NDlneh.js";import{t as A}from"./Chip-Did4Zhvj.js";import{n as j,r as M,t as N}from"./Field-DcNu4yw-.js";import{t as P}from"./Meter-stpt3vQu.js";import{i as F,n as I,r as L,t as ee}from"./Table-CVDZ69Zx.js";import{Fragment 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 te=b(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),W=[{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 G(e){return e.window===null?e.dimension:`${e.dimension}:${e.window}`}var ne={requests:`Requests`,tokens:`Tokens`,spend:`Spend`,concurrency:`Concurrent`},re={"1m":`per minute`,"5h":`per 5 hours`,"1w":`per week`};function K(e){let t=ne[e.dimension];return e.window===null?t:`${t} ${re[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 ie(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 W)t[G(e)]=``;if(e===null)return t;for(let n of W){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[G(n)]=String(r))}return t}function X(e){let t={},n={},r={},i;for(let a of W){let o=(e[G(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 ae=U.div`
1
+ import{At as e,Ft as t,Pt as n,St as r,_t as i,j as a,st as o}from"./Lamp-C2Q3t5Mn.js";import{C as s,D as c,O as l,_ as u,a as d,b as f,i as p,o as m,r as h,t as g,v as _,w as v,x as y}from"./Panel-BlNr9j6-.js";import{b,i as x,r as S,t as C,v as w}from"./Rack-sUGRoZUx.js";import{t as T}from"./CopyValue-NTHhiCuT.js";import{n as E,t as D}from"./chevron-right-S84SGCvk.js";import{t as O}from"./plus-E7qLz9CF.js";import{t as k}from"./Toggle-DwKz1aVq.js";import{t as A}from"./Chip-BeKVtewW.js";import{n as j,r as M,t as N}from"./Field-DcNu4yw-.js";import{t as P}from"./Meter-stpt3vQu.js";import{i as F,n as I,r as L,t as ee}from"./Table-CVDZ69Zx.js";import{Fragment 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 te=b(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),W=[{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 G(e){return e.window===null?e.dimension:`${e.dimension}:${e.window}`}var ne={requests:`Requests`,tokens:`Tokens`,spend:`Spend`,concurrency:`Concurrent`},re={"1m":`per minute`,"5h":`per 5 hours`,"1w":`per week`};function K(e){let t=ne[e.dimension];return e.window===null?t:`${t} ${re[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 ie(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 W)t[G(e)]=``;if(e===null)return t;for(let n of W){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[G(n)]=String(r))}return t}function X(e){let t={},n={},r={},i;for(let a of W){let o=(e[G(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 ae=U.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{A as e,B as t,Dt as n,_t as r,l as i,q as a,u as o,ut as s,xt as c}from"./Lamp-C2Q3t5Mn.js";import{C as l,D as u,_ as d,a as f,b as p,i as m,r as h,t as g,x as _}from"./Panel-BlNr9j6-.js";import{_ as v,i as y,t as b}from"./Rack-D0_N-xsd.js";import{t as x}from"./Chip-Did4Zhvj.js";import{i as S,n as C}from"./Field-DcNu4yw-.js";import{i as w,n as T,r as E,t as D}from"./RequestTable-i9paP_7e.js";import{useMemo as O,useState as k}from"react";import{Fragment as A,jsx as j,jsxs as M}from"react/jsx-runtime";import N from"styled-components";var P={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.`}},F=new Intl.NumberFormat(`en-US`),I=N.p`
1
+ import{A as e,B as t,Dt as n,_t as r,l as i,q as a,u as o,ut as s,xt as c}from"./Lamp-C2Q3t5Mn.js";import{C as l,D as u,_ as d,a as f,b as p,i as m,r as h,t as g,x as _}from"./Panel-BlNr9j6-.js";import{_ as v,i as y,t as b}from"./Rack-sUGRoZUx.js";import{t as x}from"./Chip-BeKVtewW.js";import{i as S,n as C}from"./Field-DcNu4yw-.js";import{i as w,n as T,r as E,t as D}from"./RequestTable-C2RLARWy.js";import{useMemo as O,useState as k}from"react";import{Fragment as A,jsx as j,jsxs as M}from"react/jsx-runtime";import N from"styled-components";var P={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.`}},F=new Intl.NumberFormat(`en-US`),I=N.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{E as e,H as t,Lt as n,St as r,Tt as i,ht as a,jt as o,pt as s,ut as c}from"./Lamp-C2Q3t5Mn.js";import{C as l,D as u,O as d,S as f,_ as p,a as m,b as h,i as g,o as _,r as v,t as y,v as b,w as x}from"./Panel-BlNr9j6-.js";import{b as S,m as C,r as w,t as T}from"./Rack-D0_N-xsd.js";import{t as E}from"./plus-D5AwIXj3.js";import{t as D}from"./trash-2-BLc5o7DN.js";import{t as O}from"./Toggle-D-NDlneh.js";import{n as ee,t as k}from"./Chip-Did4Zhvj.js";import{i as A,n as j,r as M,t as N}from"./Field-DcNu4yw-.js";import{t as P}from"./Meter-stpt3vQu.js";import{useEffect as te,useId as ne,useState as F}from"react";import{Fragment as I,jsx as L,jsxs as R}from"react/jsx-runtime";import z from"styled-components";var re=S(`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`}]]),ie=S(`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`}]]),B=[`tier`,`health`,`quota`,`cost`,`latency`,`load`],ae={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`},oe=z.li`
1
+ import{E as e,H as t,Lt as n,St as r,Tt as i,ht as a,jt as o,pt as s,ut as c}from"./Lamp-C2Q3t5Mn.js";import{C as l,D as u,O as d,S as f,_ as p,a as m,b as h,i as g,o as _,r as v,t as y,v as b,w as x}from"./Panel-BlNr9j6-.js";import{b as S,m as C,r as w,t as T}from"./Rack-sUGRoZUx.js";import{t as E}from"./plus-E7qLz9CF.js";import{t as D}from"./trash-2-DmtElUHr.js";import{t as O}from"./Toggle-DwKz1aVq.js";import{n as ee,t as k}from"./Chip-BeKVtewW.js";import{i as A,n as j,r as M,t as N}from"./Field-DcNu4yw-.js";import{t as P}from"./Meter-stpt3vQu.js";import{useEffect as te,useId as ne,useState as F}from"react";import{Fragment as I,jsx as L,jsxs as R}from"react/jsx-runtime";import z from"styled-components";var re=S(`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`}]]),ie=S(`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`}]]),B=[`tier`,`health`,`quota`,`cost`,`latency`,`load`],ae={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`},oe=z.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{wt as e}from"./Lamp-C2Q3t5Mn.js";import{t}from"./preload-helper-BC9bKUg1.js";import{C as n,a as r,c as i,d as a,f as o,i as s,l as c,r as l,t as u}from"./Panel-BlNr9j6-.js";import{t as d}from"./Rack-D0_N-xsd.js";import{t as f}from"./index-PP8vsvw3.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(e){let t=w.get(e);if(t!==void 0)return t;let n={get:(t,n)=>c(C(e,t),n),post:(t,n)=>a(C(e,t),n),put:(t,n)=>o(C(e,t),n),del:t=>i(C(e,t))};return w.set(e,n),n}var E=h(e=>t(()=>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{wt as e}from"./Lamp-C2Q3t5Mn.js";import{t}from"./preload-helper-BC9bKUg1.js";import{C as n,a as r,c as i,d as a,f as o,i as s,l as c,r as l,t as u}from"./Panel-BlNr9j6-.js";import{t as d}from"./Rack-sUGRoZUx.js";import{t as f}from"./index-pZbadEun.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(e){let t=w.get(e);if(t!==void 0)return t;let n={get:(t,n)=>c(C(e,t),n),post:(t,n)=>a(C(e,t),n),put:(t,n)=>o(C(e,t),n),del:t=>i(C(e,t))};return w.set(e,n),n}var E=h(e=>t(()=>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{It as e,J as t,K as n,Lt as r,Nt as i,St as a,Vt as o,Y as s}from"./Lamp-C2Q3t5Mn.js";import{C as c,D as l,S as u,_ as d,a as f,b as p,g as m,h,i as g,o as _,t as v,v as y}from"./Panel-BlNr9j6-.js";import{t as ee}from"./Rack-D0_N-xsd.js";import{t as b}from"./Toggle-D-NDlneh.js";import{i as x,n as S,t as C}from"./Field-DcNu4yw-.js";import{t as te}from"./Meter-stpt3vQu.js";import{n as w}from"./reasons-Du1OBWAM.js";import{useEffect as ne,useId as T,useState as E}from"react";import{Fragment as D,jsx as O,jsxs as k}from"react/jsx-runtime";import A from"styled-components";var j=12,M=A.p`
1
+ import{It as e,J as t,K as n,Lt as r,Nt as i,St as a,Vt as o,Y as s}from"./Lamp-C2Q3t5Mn.js";import{C as c,D as l,S as u,_ as d,a as f,b as p,g as m,h,i as g,o as _,t as v,v as y}from"./Panel-BlNr9j6-.js";import{t as ee}from"./Rack-sUGRoZUx.js";import{t as b}from"./Toggle-DwKz1aVq.js";import{i as x,n as S,t as C}from"./Field-DcNu4yw-.js";import{t as te}from"./Meter-stpt3vQu.js";import{n as w}from"./reasons-Du1OBWAM.js";import{useEffect as ne,useId as T,useState as E}from"react";import{Fragment as D,jsx as O,jsxs as k}from"react/jsx-runtime";import A from"styled-components";var j=12,M=A.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,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 _,N as v,O as y,Ot as b,P as x,Q as S,R as C,S as w,St as T,T as E,Tt as D,U as ee,V as O,W as te,X as ne,Y as re,Z as ie,_ as ae,_t as oe,a as k,at as se,b as ce,bt as le,c as ue,ct as de,d as fe,dt as pe,et as me,f as he,ft as ge,g as _e,gt as ve,h as ye,ht as be,i as xe,it as Se,j as Ce,k as we,kt as Te,l as A,lt as Ee,m as De,mt as Oe,n as ke,nt as Ae,o as je,ot as Me,p as Ne,pt as Pe,q as Fe,r as Ie,rt as Le,s as j,st as Re,t as ze,tt as Be,u as M,ut as Ve,v as N,vt as P,w as He,wt as Ue,x as We,xt as Ge,y as F,yt as Ke,z as qe}from"./shared-C47BfV_u.js";import{A as I,H as Je,I as L,N as Ye,P as Xe,St as Ze,Tt as Qe,Ut as R,_t as $e,ut as et}from"./Lamp-C2Q3t5Mn.js";import{C as z,_ as tt,b as B,g as nt,t as rt,v as V,w as it,x as at}from"./Panel-BlNr9j6-.js";import{_ as ot,f as st,m as ct,t as lt}from"./Rack-D0_N-xsd.js";import{i as ut,n as H,r as U,t as dt}from"./Table-CVDZ69Zx.js";import{i as W,n as ft,r as pt,t as mt}from"./SummaryDeck-g4yLDeXB.js";import*as G from"react";import{PureComponent as ht,forwardRef as gt,useMemo as K,useRef as _t,useState as q}from"react";import{jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";function vt(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function yt(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var bt=(e,t,n)=>ne(e,`xAxis`,vt(e,t),n),xt=(e,t,n)=>S(e,`xAxis`,vt(e,t),n),St=(e,t,n)=>ne(e,`yAxis`,yt(e,t),n),Ct=(e,t,n)=>S(e,`yAxis`,yt(e,t),n),wt=P([Me,bt,St,xt,Ct],(e,t,n,r,i)=>ve(e,`xAxis`)?pe(t,r,!1):pe(n,i,!1)),Tt=P([e,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),Et=e=>{var t=Me(e);return ve(t,`xAxis`)?`yAxis`:`xAxis`},Dt=(e,t)=>Et(e)===`yAxis`?yt(e,t):vt(e,t),Ot=(e,t,n)=>ie(e,Et(e),Dt(e,t),n),kt=P([Tt,Ot],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=me(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]])}}}),At=P([Tt,Ot],(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(a)}}),jt=P([Me,bt,St,xt,Ct,kt,Le,wt,Tt,Ae,At],(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 un({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),Mt=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],Nt=[`id`,`baseLine`];function Pt(){return Pt=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},Pt.apply(null,arguments)}function Ft(e,t){if(e==null)return{};var n,r,i=It(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 It(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 Lt(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(!oe(a)||!oe(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return D(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),D(c)?G.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function Rt(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(!oe(a)||!oe(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return D(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),D(c)?G.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function zt(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?G.createElement(Rt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):G.createElement(Lt,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function Bt(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,c=e.layout,l=e.isRange,u=e.stroke,d=e.connectNulls,f=Ft(e,Mt),p=c===`vertical`?`vertical`:`horizontal`,m=d??!1,h=x(),g=f.id,_=f.baseLine,v=Ft(f,Nt),y=Te(v),b=G.createElement(Se,Pt({},f,{id:g,baseLine:_,connectNulls:m,stroke:`none`,className:`recharts-area-area`,layout:p})),S=u!==`none`&&G.createElement(Se,Pt({},y,{className:`recharts-area-curve`,layout:p,type:f.type,connectNulls:m,fill:`none`,stroke:u,points:f.points})),C=u!==`none`&&l&&Array.isArray(_)&&G.createElement(Se,Pt({},y,{className:`recharts-area-curve`,layout:p,type:f.type,connectNulls:m,fill:`none`,stroke:u,points:_}));return o&&(i||n<1)?G.createElement(s,null,G.createElement(`defs`,null,G.createElement(`clipPath`,{id:h},G.createElement(zt,{alpha:n,points:f.points??[],baseLine:_,layout:p,strokeWidth:f.strokeWidth}))),G.createElement(s,{clipPath:`url(#${h})`},b,S,C)):G.createElement(G.Fragment,null,b,S,C)}var Vt=[`id`],Ht=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function Ut(){return Ut=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},Ut.apply(null,arguments)}function Wt(e,t){if(e==null)return{};var n,r,i=Gt(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 Gt(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 Kt(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?Kt(Object(n),!0).forEach(function(t){qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qt(e,t,n){return(t=Jt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e){var t=Yt(e,`string`);return typeof t==`symbol`?t:t+``}function Yt(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 Xt={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:qe,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:Ge(e.prev.x,e.next.x,t),y:Ge(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:Bt,xAxisId:0,yAxisId:0,zIndex:Be.area};function Zt(e,t){return e&&e!==`none`?e:t}var Qt=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:Zt(r,i),value:Oe(n,t),payload:e}]},$t=G.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,u=e.formatter,d=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:l,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Oe(o,t),hide:s,type:d,color:Zt(r,a),unit:c,formatter:u,graphicalItemId:f}};return G.createElement(O,{tooltipEntrySettings:p})});function en(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=Te(r);return G.createElement(Ce,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function tn(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 G.createElement(te,{value:t?r:void 0},n)}function nn(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,c=e.isAnimating,l=e.isEntrance,u=a.layout,d=a.type,p=a.stroke,m=a.connectNulls,h=a.isRange,g=a.shape,_=a.id,v=Wt(a,Vt),y=Z(Z({},b(v)),{},{id:_,points:t,connectNulls:m,type:d,baseLine:n,layout:u,stroke:p,isRange:h,animationElapsedTime:o,isAnimating:c,isEntrance:l});return G.createElement(G.Fragment,null,t?.length>1&&G.createElement(s,{clipPath:r?`url(#clipPath-${i})`:void 0},G.createElement(f,{option:g,DefaultShape:Xt.shape,shapeProps:y})),G.createElement(en,{points:t,props:v,clipPathId:i}))}function rn(e,t,n){if(D(e)){var r=D(t)?t:void 0;return Ge(r,e,n)}if(Ue(e)||T(e)){var i=D(t)?t:void 0;return Ge(i,0,n)}return e}function an(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,c=r.isAnimationActive,l=r.animationBegin,f=r.animationDuration,m=r.animationEasing,h=r.animationMatchBy,_=r.animationInterpolateFn,v=K(()=>({points:o,baseLine:s}),[o,s]),y=g(v,a),b=Re(),x=p(r.onAnimationStart,r.onAnimationEnd),S=x.isAnimating,w=x.handleAnimationStart,T=x.handleAnimationEnd,E=y.startValue;if(b==null)return null;var D=Array.isArray(s)&&Array.isArray(E)?C(E,s,h):Array.isArray(s)?C(null,s,h):null;return G.createElement(u,{animationInput:v,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:c,animationBegin:l,animationDuration:f,animationEasing:m,onAnimationStart:w,onAnimationEnd:T,animationInterpolateFn:_,animationMatchBy:h,layout:b},(e,i,a)=>{var c=i===1?s:Array.isArray(s)?_(D,i,b):a?s:rn(s,E,i);return y.syncStepValue(c,i),G.createElement(tn,{showLabels:!S,points:o},r.children,G.createElement(nn,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:S||i<1,isEntrance:a}),G.createElement(d,{label:r.label}))})}function on(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=_t(null),a=_t();return G.createElement(an,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var sn=class extends ht{render(){var e=this.props,t=e.hide,r=e.dot,i=e.points,a=e.className,o=e.top,l=e.left,u=e.needClip,d=e.xAxisId,f=e.yAxisId,p=e.width,h=e.height,g=e.id,_=e.baseLine,v=e.zIndex;if(t)return null;var y=n(`recharts-area`,a),b=g,x=E(r),S=x.r,C=x.strokeWidth,w=ee(r),T=S*2+C,D=u?`url(#clipPath-${w?``:`dots-`}${b})`:void 0;return G.createElement(m,{zIndex:v},G.createElement(s,{className:y},u&&G.createElement(`defs`,null,G.createElement(c,{clipPathId:b,xAxisId:d,yAxisId:f}),!w&&G.createElement(`clipPath`,{id:`clipPath-dots-${b}`},G.createElement(`rect`,{x:l-T/2,y:o-T/2,width:p+T,height:h+T}))),G.createElement(on,{needClip:u,clipPathId:b,props:this.props})),G.createElement(we,{points:i,mainColor:Zt(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(_)&&G.createElement(we,{points:_,mainColor:Zt(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}};function cn(e){var n=e.activeDot,r=e.animationBegin,i=e.animationDuration,a=e.animationEasing,s=e.connectNulls,c=e.dot,l=e.fill,u=e.fillOpacity,d=e.hide,f=e.isAnimationActive,p=e.legendType,m=e.stroke,h=e.xAxisId,g=e.yAxisId,_=Wt(e,Ht),v=de(),y=re(),b=o(h,g).needClip,x=Ve(),S=Ke(t=>jt(t,e.id,x))??{},C=S.points,w=S.isRange,T=S.baseLine,E=t();if(v!==`horizontal`&&v!==`vertical`||E==null||y!==`AreaChart`&&y!==`ComposedChart`)return null;var D=E.height,ee=E.width,O=E.x,te=E.y;return!C||!C.length?null:G.createElement(sn,Ut({},_,{activeDot:n,animationBegin:r,animationDuration:i,animationEasing:a,baseLine:T,connectNulls:s,dot:c,fill:l,fillOpacity:u,height:D,hide:d,layout:v,isAnimationActive:f,isRange:w,legendType:p,needClip:b,points:C,stroke:m,width:ee,left:O,top:te,xAxisId:h,yAxisId:g}))}var ln=(e,t,n,r,i)=>{var a=n??t;if(D(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a===`dataMin`?l:a===`dataMax`||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]};function un(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,_=ln(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=be(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=be(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>be(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:ge({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:ge({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 dn(e){var t=le(e,Xt),n=Ve();return G.createElement(v,{id:t.id,type:`area`},e=>G.createElement(G.Fragment,null,G.createElement(r,{legendPayload:Qt(t)}),G.createElement($t,{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}),G.createElement(_,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:Pe(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),G.createElement(cn,Ut({},t,{id:e}))))}var fn=G.memo(dn,se);fn.displayName=`Area`;var pn=[`axis`],mn=gt((e,t)=>G.createElement(We,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:pn,tooltipPayloadSearcher:Fe,categoricalChartProps:e,ref:t})),hn=[`axis`],gn=gt((e,t)=>G.createElement(We,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:hn,tooltipPayloadSearcher:Fe,categoricalChartProps:e,ref:t})),_n=53,Q=9,$=2,vn=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 _,N as v,O as y,Ot as b,P as x,Q as S,R as C,S as w,St as T,T as E,Tt as D,U as ee,V as O,W as te,X as ne,Y as re,Z as ie,_ as ae,_t as oe,a as k,at as se,b as ce,bt as le,c as ue,ct as de,d as fe,dt as pe,et as me,f as he,ft as ge,g as _e,gt as ve,h as ye,ht as be,i as xe,it as Se,j as Ce,k as we,kt as Te,l as A,lt as Ee,m as De,mt as Oe,n as ke,nt as Ae,o as je,ot as Me,p as Ne,pt as Pe,q as Fe,r as Ie,rt as Le,s as j,st as Re,t as ze,tt as Be,u as M,ut as Ve,v as N,vt as P,w as He,wt as Ue,x as We,xt as Ge,y as F,yt as Ke,z as qe}from"./shared-C47BfV_u.js";import{A as I,H as Je,I as L,N as Ye,P as Xe,St as Ze,Tt as Qe,Ut as R,_t as $e,ut as et}from"./Lamp-C2Q3t5Mn.js";import{C as z,_ as tt,b as B,g as nt,t as rt,v as V,w as it,x as at}from"./Panel-BlNr9j6-.js";import{_ as ot,f as st,m as ct,t as lt}from"./Rack-sUGRoZUx.js";import{i as ut,n as H,r as U,t as dt}from"./Table-CVDZ69Zx.js";import{i as W,n as ft,r as pt,t as mt}from"./SummaryDeck-BHXcb_Ji.js";import*as G from"react";import{PureComponent as ht,forwardRef as gt,useMemo as K,useRef as _t,useState as q}from"react";import{jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";function vt(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function yt(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var bt=(e,t,n)=>ne(e,`xAxis`,vt(e,t),n),xt=(e,t,n)=>S(e,`xAxis`,vt(e,t),n),St=(e,t,n)=>ne(e,`yAxis`,yt(e,t),n),Ct=(e,t,n)=>S(e,`yAxis`,yt(e,t),n),wt=P([Me,bt,St,xt,Ct],(e,t,n,r,i)=>ve(e,`xAxis`)?pe(t,r,!1):pe(n,i,!1)),Tt=P([e,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),Et=e=>{var t=Me(e);return ve(t,`xAxis`)?`yAxis`:`xAxis`},Dt=(e,t)=>Et(e)===`yAxis`?yt(e,t):vt(e,t),Ot=(e,t,n)=>ie(e,Et(e),Dt(e,t),n),kt=P([Tt,Ot],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=me(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]])}}}),At=P([Tt,Ot],(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(a)}}),jt=P([Me,bt,St,xt,Ct,kt,Le,wt,Tt,Ae,At],(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 un({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),Mt=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],Nt=[`id`,`baseLine`];function Pt(){return Pt=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},Pt.apply(null,arguments)}function Ft(e,t){if(e==null)return{};var n,r,i=It(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 It(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 Lt(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(!oe(a)||!oe(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return D(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),D(c)?G.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function Rt(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(!oe(a)||!oe(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return D(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),D(c)?G.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function zt(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?G.createElement(Rt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):G.createElement(Lt,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function Bt(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,c=e.layout,l=e.isRange,u=e.stroke,d=e.connectNulls,f=Ft(e,Mt),p=c===`vertical`?`vertical`:`horizontal`,m=d??!1,h=x(),g=f.id,_=f.baseLine,v=Ft(f,Nt),y=Te(v),b=G.createElement(Se,Pt({},f,{id:g,baseLine:_,connectNulls:m,stroke:`none`,className:`recharts-area-area`,layout:p})),S=u!==`none`&&G.createElement(Se,Pt({},y,{className:`recharts-area-curve`,layout:p,type:f.type,connectNulls:m,fill:`none`,stroke:u,points:f.points})),C=u!==`none`&&l&&Array.isArray(_)&&G.createElement(Se,Pt({},y,{className:`recharts-area-curve`,layout:p,type:f.type,connectNulls:m,fill:`none`,stroke:u,points:_}));return o&&(i||n<1)?G.createElement(s,null,G.createElement(`defs`,null,G.createElement(`clipPath`,{id:h},G.createElement(zt,{alpha:n,points:f.points??[],baseLine:_,layout:p,strokeWidth:f.strokeWidth}))),G.createElement(s,{clipPath:`url(#${h})`},b,S,C)):G.createElement(G.Fragment,null,b,S,C)}var Vt=[`id`],Ht=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function Ut(){return Ut=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},Ut.apply(null,arguments)}function Wt(e,t){if(e==null)return{};var n,r,i=Gt(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 Gt(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 Kt(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?Kt(Object(n),!0).forEach(function(t){qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qt(e,t,n){return(t=Jt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e){var t=Yt(e,`string`);return typeof t==`symbol`?t:t+``}function Yt(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 Xt={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:qe,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:Ge(e.prev.x,e.next.x,t),y:Ge(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:Bt,xAxisId:0,yAxisId:0,zIndex:Be.area};function Zt(e,t){return e&&e!==`none`?e:t}var Qt=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:Zt(r,i),value:Oe(n,t),payload:e}]},$t=G.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,u=e.formatter,d=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:l,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Oe(o,t),hide:s,type:d,color:Zt(r,a),unit:c,formatter:u,graphicalItemId:f}};return G.createElement(O,{tooltipEntrySettings:p})});function en(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=Te(r);return G.createElement(Ce,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function tn(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 G.createElement(te,{value:t?r:void 0},n)}function nn(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,c=e.isAnimating,l=e.isEntrance,u=a.layout,d=a.type,p=a.stroke,m=a.connectNulls,h=a.isRange,g=a.shape,_=a.id,v=Wt(a,Vt),y=Z(Z({},b(v)),{},{id:_,points:t,connectNulls:m,type:d,baseLine:n,layout:u,stroke:p,isRange:h,animationElapsedTime:o,isAnimating:c,isEntrance:l});return G.createElement(G.Fragment,null,t?.length>1&&G.createElement(s,{clipPath:r?`url(#clipPath-${i})`:void 0},G.createElement(f,{option:g,DefaultShape:Xt.shape,shapeProps:y})),G.createElement(en,{points:t,props:v,clipPathId:i}))}function rn(e,t,n){if(D(e)){var r=D(t)?t:void 0;return Ge(r,e,n)}if(Ue(e)||T(e)){var i=D(t)?t:void 0;return Ge(i,0,n)}return e}function an(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,c=r.isAnimationActive,l=r.animationBegin,f=r.animationDuration,m=r.animationEasing,h=r.animationMatchBy,_=r.animationInterpolateFn,v=K(()=>({points:o,baseLine:s}),[o,s]),y=g(v,a),b=Re(),x=p(r.onAnimationStart,r.onAnimationEnd),S=x.isAnimating,w=x.handleAnimationStart,T=x.handleAnimationEnd,E=y.startValue;if(b==null)return null;var D=Array.isArray(s)&&Array.isArray(E)?C(E,s,h):Array.isArray(s)?C(null,s,h):null;return G.createElement(u,{animationInput:v,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:c,animationBegin:l,animationDuration:f,animationEasing:m,onAnimationStart:w,onAnimationEnd:T,animationInterpolateFn:_,animationMatchBy:h,layout:b},(e,i,a)=>{var c=i===1?s:Array.isArray(s)?_(D,i,b):a?s:rn(s,E,i);return y.syncStepValue(c,i),G.createElement(tn,{showLabels:!S,points:o},r.children,G.createElement(nn,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:S||i<1,isEntrance:a}),G.createElement(d,{label:r.label}))})}function on(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=_t(null),a=_t();return G.createElement(an,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var sn=class extends ht{render(){var e=this.props,t=e.hide,r=e.dot,i=e.points,a=e.className,o=e.top,l=e.left,u=e.needClip,d=e.xAxisId,f=e.yAxisId,p=e.width,h=e.height,g=e.id,_=e.baseLine,v=e.zIndex;if(t)return null;var y=n(`recharts-area`,a),b=g,x=E(r),S=x.r,C=x.strokeWidth,w=ee(r),T=S*2+C,D=u?`url(#clipPath-${w?``:`dots-`}${b})`:void 0;return G.createElement(m,{zIndex:v},G.createElement(s,{className:y},u&&G.createElement(`defs`,null,G.createElement(c,{clipPathId:b,xAxisId:d,yAxisId:f}),!w&&G.createElement(`clipPath`,{id:`clipPath-dots-${b}`},G.createElement(`rect`,{x:l-T/2,y:o-T/2,width:p+T,height:h+T}))),G.createElement(on,{needClip:u,clipPathId:b,props:this.props})),G.createElement(we,{points:i,mainColor:Zt(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(_)&&G.createElement(we,{points:_,mainColor:Zt(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}};function cn(e){var n=e.activeDot,r=e.animationBegin,i=e.animationDuration,a=e.animationEasing,s=e.connectNulls,c=e.dot,l=e.fill,u=e.fillOpacity,d=e.hide,f=e.isAnimationActive,p=e.legendType,m=e.stroke,h=e.xAxisId,g=e.yAxisId,_=Wt(e,Ht),v=de(),y=re(),b=o(h,g).needClip,x=Ve(),S=Ke(t=>jt(t,e.id,x))??{},C=S.points,w=S.isRange,T=S.baseLine,E=t();if(v!==`horizontal`&&v!==`vertical`||E==null||y!==`AreaChart`&&y!==`ComposedChart`)return null;var D=E.height,ee=E.width,O=E.x,te=E.y;return!C||!C.length?null:G.createElement(sn,Ut({},_,{activeDot:n,animationBegin:r,animationDuration:i,animationEasing:a,baseLine:T,connectNulls:s,dot:c,fill:l,fillOpacity:u,height:D,hide:d,layout:v,isAnimationActive:f,isRange:w,legendType:p,needClip:b,points:C,stroke:m,width:ee,left:O,top:te,xAxisId:h,yAxisId:g}))}var ln=(e,t,n,r,i)=>{var a=n??t;if(D(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a===`dataMin`?l:a===`dataMax`||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]};function un(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,_=ln(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=be(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=be(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>be(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:ge({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:ge({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 dn(e){var t=le(e,Xt),n=Ve();return G.createElement(v,{id:t.id,type:`area`},e=>G.createElement(G.Fragment,null,G.createElement(r,{legendPayload:Qt(t)}),G.createElement($t,{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}),G.createElement(_,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:Pe(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),G.createElement(cn,Ut({},t,{id:e}))))}var fn=G.memo(dn,se);fn.displayName=`Area`;var pn=[`axis`],mn=gt((e,t)=>G.createElement(We,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:pn,tooltipPayloadSearcher:Fe,categoricalChartProps:e,ref:t})),hn=[`axis`],gn=gt((e,t)=>G.createElement(We,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:hn,tooltipPayloadSearcher:Fe,categoricalChartProps:e,ref:t})),_n=53,Q=9,$=2,vn=X.div`
2
2
  display: flex;
3
3
  gap: ${$}px;
4
4
  `,yn=X.div`
@@ -1 +1 @@
1
- import{b as e}from"./Rack-D0_N-xsd.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),n=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t as n,n as t};
1
+ import{b as e}from"./Rack-sUGRoZUx.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),n=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t as n,n as t};
@@ -1,4 +1,4 @@
1
- import{_ as e,h as t,i as n}from"./shared-C47BfV_u.js";import{$ as r,A as i,B as ee,F as a,I as o,P as s,Q as c,Z as te,et as ne,g as l,l as re,nt as u,r as d,tt as ie,u as ae}from"./Lamp-C2Q3t5Mn.js";import{C as f,D as oe,O as se,_ as p,a as ce,b as m,i as le,t as ue,v as h,x as g,y as _}from"./Panel-BlNr9j6-.js";import{_ as de,d as v,i as fe,t as pe}from"./Rack-D0_N-xsd.js";import{n as me,t as y}from"./chevron-right-BZ4QmUDM.js";import{i as b,r as x}from"./index-PP8vsvw3.js";import{i as S,n as he}from"./Field-DcNu4yw-.js";import{t as C}from"./Meter-stpt3vQu.js";import{i as w,n as T,r as E,t as D}from"./Table-CVDZ69Zx.js";import{n as ge,r as O}from"./WindowChart-BsonO5Py.js";import{i as _e,n as ve,r as ye,t as be}from"./RequestTable-i9paP_7e.js";import{i as k,n as A,r as xe,t as Se}from"./SummaryDeck-g4yLDeXB.js";import{Fragment as Ce,useMemo as j,useState as M}from"react";import{jsx as N,jsxs as P}from"react/jsx-runtime";import F from"styled-components";var I=F.div`
1
+ import{_ as e,h as t,i as n}from"./shared-C47BfV_u.js";import{$ as r,A as i,B as ee,F as a,I as o,P as s,Q as c,Z as te,et as ne,g as l,l as re,nt as u,r as d,tt as ie,u as ae}from"./Lamp-C2Q3t5Mn.js";import{C as f,D as oe,O as se,_ as p,a as ce,b as m,i as le,t as ue,v as h,x as g,y as _}from"./Panel-BlNr9j6-.js";import{_ as de,d as v,i as fe,t as pe}from"./Rack-sUGRoZUx.js";import{n as me,t as y}from"./chevron-right-S84SGCvk.js";import{i as b,r as x}from"./index-pZbadEun.js";import{i as S,n as he}from"./Field-DcNu4yw-.js";import{t as C}from"./Meter-stpt3vQu.js";import{i as w,n as T,r as E,t as D}from"./Table-CVDZ69Zx.js";import{n as ge,r as O}from"./WindowChart-BsonO5Py.js";import{i as _e,n as ve,r as ye,t as be}from"./RequestTable-C2RLARWy.js";import{i as k,n as A,r as xe,t as Se}from"./SummaryDeck-BHXcb_Ji.js";import{Fragment as Ce,useMemo as j,useState as M}from"react";import{jsx as N,jsxs as P}from"react/jsx-runtime";import F from"styled-components";var I=F.div`
2
2
  display: grid;
3
3
  grid-template-areas:
4
4
  "chassis"