omnigateway 0.7.2 → 0.8.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.
- package/README.md +90 -4
- package/bin/omni.js +6874 -4685
- package/gateway.js +17400 -14802
- package/package.json +1 -1
- package/public/assets/{Chip-BOyBT5TP.js → Chip-DG-mqRx0.js} +1 -1
- package/public/assets/{CopyValue-DRHHQlN_.js → CopyValue-CItB094V.js} +1 -1
- package/public/assets/Lamp-Cxp-OxUq.js +25 -0
- package/public/assets/{Rack-D798XvPQ.js → Rack-xBT_6EtM.js} +5 -5
- package/public/assets/{RequestTable-CEBhwDs7.js → RequestTable-CM9mPiMF.js} +1 -1
- package/public/assets/{SummaryDeck-DBCSHihY.js → SummaryDeck-C3ZwZ3ng.js} +1 -1
- package/public/assets/{Toggle-CdCCoDEo.js → Toggle-CmXXn6F3.js} +1 -1
- package/public/assets/{TokenBreakdown-DDI9uTPW.js → TokenBreakdown-COJ643vg.js} +1 -1
- package/public/assets/{WindowChart-C-Y6U3WF.js → WindowChart-BrLf4KCu.js} +1 -1
- package/public/assets/_app.accounts-B-OYO2Yi.js +59 -0
- package/public/assets/_app.console-BOZ1wncA.js +44 -0
- package/public/assets/{_app.database-D0W0pcxC.js → _app.database-B5oHZPbu.js} +4 -4
- package/public/assets/{_app.index-CyxnfhVX.js → _app.index-CB3UFRwF.js} +5 -5
- package/public/assets/{_app.keys-D9qmw9Tj.js → _app.keys-B89CMo3x.js} +2 -2
- package/public/assets/{_app.logs-DtXUZETW.js → _app.logs-CNAnRW07.js} +1 -1
- package/public/assets/{_app.models-CNxwXyFl.js → _app.models-DpRcGhag.js} +4 -4
- package/public/assets/_app.plugins._pluginId-LzBq-Zjj.js +2 -0
- package/public/assets/{_app.plugins._pluginId-87Ox_hkW.js → _app.plugins._pluginId-sYDTZ9Px.js} +1 -1
- package/public/assets/{_app.settings-DjiMSl1Y.js → _app.settings-BV085FpM.js} +4 -4
- package/public/assets/{_app.usage-CZz9raYR.js → _app.usage-CGuOdYun.js} +3 -3
- package/public/assets/{chevron-right-CPoaXYHw.js → chevron-right-BeVtzzum.js} +1 -1
- package/public/assets/{client-CZnyYbay.js → client-Mf5f5R9Z.js} +1 -1
- package/public/assets/index-3lpol4cr.js +13 -0
- package/public/assets/{login-BtlMmyKj.js → login-BpvnkW6i.js} +2 -2
- package/public/assets/{login-dV42ZQIA.js → login-CwYbEKWH.js} +2 -2
- package/public/assets/plus-nHMFjQ2I.js +1 -0
- package/public/assets/{preload-helper-4wSmu2-E.js → preload-helper-8jyVfd2a.js} +1 -1
- package/public/assets/{shared-OJcoRCqT.js → shared-B2Lmnazz.js} +1 -1
- package/public/assets/{stream-CEb81tzM.js → stream-VJMOV03S.js} +1 -1
- package/public/assets/{trash-2-BjpqTubo.js → trash-2-CbjLfrko.js} +1 -1
- package/public/index.html +7 -7
- package/public/shared/dashboard-sdk.js +1 -1
- package/public/assets/Lamp-ZlMzNs5N.js +0 -25
- package/public/assets/_app.accounts-CLLLwN77.js +0 -59
- package/public/assets/_app.console-Dr9qxU7J.js +0 -44
- package/public/assets/_app.plugins._pluginId-CZWipH1n.js +0 -2
- package/public/assets/index-DNSPtYpM.js +0 -13
- package/public/assets/plus-_zo43Lvf.js +0 -1
package/public/index.html
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
10
10
|
<title>OmniGateway — One endpoint in front of the AI accounts you already pay for.</title>
|
|
11
11
|
<script type="importmap">{"imports":{"react":"/shared/react.js","react/jsx-runtime":"/shared/jsx-runtime.js","react-dom":"/shared/react-dom.js","react-dom/client":"/shared/react-dom-client.js","styled-components":"/shared/styled-components.js","@tanstack/react-query":"/shared/react-query.js","@omnigateway/dashboard-sdk":"/shared/dashboard-sdk.js"}}</script>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-3lpol4cr.js"></script>
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/Panel-CYQvfI3L.js">
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/Lamp-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/preload-helper-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/Rack-
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/assets/stream-
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/login-
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/assets/_app.plugins._pluginId-
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/Lamp-Cxp-OxUq.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/preload-helper-8jyVfd2a.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/Rack-xBT_6EtM.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/assets/stream-VJMOV03S.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/login-CwYbEKWH.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/assets/_app.plugins._pluginId-LzBq-Zjj.js">
|
|
20
20
|
<link rel="stylesheet" crossorigin href="/assets/index-Co2s5xMk.css">
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunks/rolldown-runtime-CbXtAM7H.js";import{t}from"./chunks/react-GitiQ0dt.js";var n=`0.1.
|
|
1
|
+
import{n as e}from"./chunks/rolldown-runtime-CbXtAM7H.js";import{t}from"./chunks/react-GitiQ0dt.js";var n=`0.1.5`,r=class extends Error{status;code;constructor(e,t,n){super(n),this.name=`PluginApiError`,this.status=e,this.code=t}get isUnauthenticated(){return this.status===401||this.code===`AUTH`}},i=/%2e/i;function a(e,t){if(t.length===0)throw TypeError(`plugin api ${e} must not be empty`);if(t.startsWith(`/`))throw TypeError(`plugin api ${e} must be relative to the plugin's own prefix, got ${JSON.stringify(t)}`);if(t.includes(`..`)||i.test(t))throw TypeError(`plugin api ${e} must not escape the plugin's own prefix, got ${JSON.stringify(t)}`)}function o(e,t){if(a(`plugin id`,e),e.includes(`/`))throw TypeError(`plugin api plugin id must be a single path segment, got ${e}`);return a(`path`,t),`/api/plugins/${e}/${t}`}function s(e){if(typeof e!=`object`||!e)return!1;let t=e.error;return typeof t!=`object`||!t?!1:typeof t.message==`string`}async function c(e,t,n,i,a){let c=o(e,n),l={method:t,credentials:`same-origin`,headers:i===void 0?{}:{"content-type":`application/json`},...i===void 0?{}:{body:JSON.stringify(i)},...a===void 0?{}:{signal:a}},u=await fetch(c,l),d=null;if(u.status!==204){let e=await u.text();if(e.length>0)try{d=JSON.parse(e)}catch{d=null}}if(!u.ok){let e=s(d)?d.error.code??`INTERNAL`:`INTERNAL`,t=s(d)?d.error.message:`request failed with status ${u.status}`;throw new r(u.status,String(e),t)}return d}function l(e){return a(`plugin id`,e),{get:(t,n)=>c(e,`GET`,t,void 0,n),post:(t,n)=>c(e,`POST`,t,n,void 0),put:(t,n)=>c(e,`PUT`,t,n,void 0),del:t=>c(e,`DELETE`,t,void 0,void 0)}}var u=new Map;function d(e){let t=u.get(e);if(t!==void 0)return t;let n=l(e);return u.set(e,n),n}var f=e(t(),1),p={status:`poll`,pushed:()=>!1},m=(0,f.createContext)(null);function h({children:e,connection:t=p,channels:n}){let[r,i]=(0,f.useState)(!0),a=(0,f.useCallback)(()=>i(e=>!e),[]),o=(0,f.useMemo)(()=>({live:r,toggle:a,connection:t,...n===void 0?{}:{channels:n},cadence:(e,n)=>r?(n===void 0||!t.pushed(n))&&e:!1}),[r,a,t,n]);return(0,f.createElement)(m,{value:o},e)}function g(){return(0,f.use)(m)??{live:!1,toggle:()=>{},cadence:()=>!1,connection:{status:`offline`,pushed:()=>!1}}}function _(e,t,n){let{channels:r}=g(),i=`plugin:${e}:${t}`,[a,o]=(0,f.useState)(`idle`),s=(0,f.useRef)(n);return(0,f.useEffect)(()=>{s.current=n}),(0,f.useEffect)(()=>{if(r!==void 0)return r.subscribe(i,e=>{switch(e.kind){case`frame`:s.current(e.payload);return;case`open`:o(`open`);return;case`refused`:o(`refused`);return;case`closed`:o(`idle`);return}})},[r,i]),{status:a,topic:i,send:(0,f.useCallback)(e=>r===void 0||a!==`open`?!1:r.send(i,e),[r,a,i])}}var v=`--rack.--panel.--panel-sunk.--panel-raised.--rule.--rule-strong.--ink.--ink-dim.--ink-faint.--accent.--accent-ink.--accent-wash.--ok.--warn.--down.--ok-wash.--warn-wash.--down-wash.--p-anthropic.--p-openai.--p-kimi.--p-kilo.--p-grok.--p-custom.--grid-line.--shadow`.split(`.`);function y(e){return e}export{v as CSS_VARIABLES,h as LiveProvider,r as PluginApiError,n as SDK_VERSION,l as createPluginApi,y as definePluginUI,o as pluginApiPath,g as useLive,d as usePluginApi,_ as usePluginChannel};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{c as e,d as t,f as n,k as r,l as i,m as a,p as o,u as s}from"./Panel-CYQvfI3L.js";import{queryOptions as c,useMutation as l,useQuery as u,useQueryClient as d}from"@tanstack/react-query";import*as f from"react";import p,{useCallback as m,useDebugValue as h,useEffect as g,useMemo as _,useRef as v,useSyncExternalStore as y}from"react";import{jsx as b}from"react/jsx-runtime";import{flushSync as ee}from"react-dom";import x,{css as S,keyframes as C}from"styled-components";var w=f.use,T=f.useLayoutEffect;function te(e,t,n={},r){f.useEffect(()=>{if(!e.current||r||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,r,n,e])}function ne(e){let t=f.useRef(null);return f.useImperativeHandle(e,()=>t.current,[]),t}function E(e){return e[e.length-1]}function D(e){return typeof e==`function`}function re(e,t){return D(e)?e(t):e}var O=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable;function ae(e){for(let t in e)if(O.call(e,t))return!0;return!1}var oe=()=>Object.create(null),se=(e,t)=>ce(e,t,oe);function ce(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=de(e)&&de(i);if(!a&&!(k(e)&&k(i)))return i;let o=a?e:le(e);if(!o)return i;let s=a?i:le(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:O.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=ce(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function le(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!ie.call(e,r))return!1;t.push(r)}return t}function k(e){if(!ue(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ue(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ue(e){return Object.prototype.toString.call(e)===`[object Object]`}function de(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function A(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!A(e[r],t[r],n))return!1;return!0}if(k(e)&&k(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!A(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!A(e[o],t[o],n)))return!1;return i===a}return!1}function fe(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var pe=/[\x00-\x1f\x7f"<>`{}]/g;function me(e){return e.replace(pe,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function he(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return me(t)}var ge=[`http:`,`https:`,`mailto:`,`tel:`];function j(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function _e(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=he(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=he(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ve(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function M(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function N(){throw Error(`Invariant failed`)}function P(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var F=4,I=5;function ye(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function be(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ye(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function L(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=be(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=z(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c),m=t?p?t:t.toLowerCase():void 0,h=c?p?c:c.toLowerCase():void 0,g=f===1?i.dynamic:f===3?i.optional:i.wildcard,_=f!==2&&!d&&g?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===m&&e.suffix===h);if(_)n=_;else{let e=B(f,r,p,m,h);n=e,e.parent=i,e.depth=a;let t;t=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],t.push(e),t.length===2&&o?.push(t)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=z(r);e.kind=I,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=z(r);e.kind=F,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)L(e,t,r,c,i,a,o,s)}function R(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function z(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function B(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function V(e,t){let n=z(`/`),r=new Uint16Array(6),i=[];for(let t of e)L(!1,r,t,1,n,0,i);for(let e of i)e.sort(R);t.masksTree=n,t.flatCache=P(1e3)}function xe(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=Ee(e,t.masksTree);return t.flatCache.set(e,r),r}function Se(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=z(`/`),L(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Ee(r,o,n)}function Ce(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Ee(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Oe(a.route)),t.matchCache.set(r,a),a}function we(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function Te(e,t=!1,n){let r=z(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;L(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&N(),o[e.id]=e,c!==0&&e.path){let t=we(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(R);return{processedTree:{segmentTree:r,singleCache:P(1e3),matchCache:P(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function Ee(e,t,n=!1){let r=e.split(`/`),i=Ae(e,r,t,n);if(!i)return null;let[a]=De(e,r,i);return{route:i.node.route,rawParams:a}}function De(e,t,n){let r=ke(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===F)break;if(u.kind===I){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function Oe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ke(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ae(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!E(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!U(l,n))continue;if(i.parse){if(!Me(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==F&&U(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===F||i.kind===2)&&U(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Me(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&je(f,o))return n;U(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(_||!(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)))){if(a){if(_)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+H(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+H(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+H(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+H(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function H(e,t){return 2**(e-t-1)}function je(e,t){return e===2**(t-1)-1}function Me(e,t,n){let r,i;try{[r,i]=De(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function U(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===F)>(e.node.kind===F)||t.node.kind===F==(e.node.kind===F)&&t.node.depth>e.node.depth)))}function Ne(e){return Pe(e.filter(e=>e!==void 0).join(`/`))}function Pe(e){return e.replace(/\/{2,}/g,`/`)}function Fe(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Ie(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Le(e){return Ie(Fe(e))}function W(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Re(e,t,n){return W(e,n)===W(t,n)}function ze({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t===`.`,a=t.startsWith(`/`),o;if(r){o=a?t:i?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(i)s=e.split(`/`);else if(a)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&E(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.length>1?s.pop():s=[``]:r===`.`||s.push(r)}}s.length>1&&(E(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=Pe(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function Be(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Ve(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Ue(e,n)).join(`/`):Ue(r,n):r}function He({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=be(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Ve(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ve(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ve(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Ue(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var We=`Error preloading route! ☝️`;function Ge({children:e,fallback:t=null}){return b(p.Fragment,{children:Ke()?e:t})}function Ke(){return p.useSyncExternalStore(qe,()=>!0,()=>!1)}function qe(){return()=>{}}function Je(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ye=typeof Object.is==`function`?Object.is:Je;function Xe(e,t,n,r,i){let a=v(null),o;a.current===null?(o={hasValue:!1,value:null},a.current=o):o=a.current;let[s,c]=_(()=>{let e=!1,a,s,c=t=>{if(!e){e=!0,a=t;let n=r(t);if(i!==void 0&&o.hasValue){let e=o.value;if(i(e,n))return s=e,e}return s=n,n}let n=s;if(Ye(a,t))return n;let c=r(t);return i?.(n,c)?(a=t,n):(a=t,s=c,c)},l=n===void 0?null:n;return[()=>c(t()),l===null?void 0:()=>c(l())]},[t,n,r,i,o]),l=y(e,s,c);return g(()=>{o.hasValue=!0,o.value=l},[l,o]),h(l),l}function Ze(e,t){return e===t}function Qe(e,t,n=Ze){let r=m(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=m(()=>e?.get(),[e]);return Xe(r,i,i,t,n)}function $e(e){let t=r();return f.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function et(e){let t=f.useRef(e);return A(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function tt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function nt(e,t,n){if(e?.external)return j(e.href,n)?void 0:e.href;if(!ft(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),j(t,n)?void 0:t}catch{}}function rt(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!Re(e.pathname,t.pathname,r))return!1}else{let n=W(e.pathname,r),i=W(t.pathname,r);if(!(n.startsWith(i)&&(n.length===i.length||n[i.length]===`/`)))return!1}return(n?.includeSearch??!0)&&!A(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function it(e,t){let n=r(),i=ne(t),{activeProps:a,inactiveProps:o,activeOptions:s,to:c,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:p,replace:m,startTransition:h,resetScroll:g,viewTransition:_,children:v,target:y,disabled:b,style:x,className:S,onClick:C,onBlur:w,onFocus:T,onMouseEnter:E,onMouseLeave:D,onTouchStart:O,ignoreBlocker:ie,params:ae,search:oe,hash:se,state:ce,mask:le,reloadDocument:k,unsafeRelative:ue,from:de,_fromLocation:A,...fe}=e,pe=Ke(),me=et(e.search),he=et(e.params),ge=et(s),j=f.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,me,he,e.state,e.mask,e.unsafeRelative]),_e=f.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...j}),r=dt(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,b),i=nt(r,c,n.protocolAllowlist);return[r?.href,i,rt(e,t,ge,n.basepath,pe,i!==void 0)]},[ge,b,pe,j,n,c]),[ve,M,N]=Qe(n.stores.location,_e,tt),P=N?re(a,{})??ot:at,F=N?at:re(o,{})??at,I=[S,P.className,F.className].filter(Boolean).join(` `),ye=(x||P.style||F.style)&&{...x,...P.style,...F.style},[be,L]=f.useState(!1),R=f.useRef(!1),z=e.reloadDocument||M?!1:l??n.options.defaultPreload,B=u??n.options.defaultPreloadDelay??0,V=f.useCallback(()=>{n.preloadRoute(j).catch(e=>{console.warn(e),console.warn(We)})},[n,j]);te(i,f.useCallback(e=>{e?.isIntersecting&&V()},[V]),ut,!!b||z!==`viewport`),f.useEffect(()=>{R.current||!b&&z===`render`&&(V(),R.current=!0)},[b,V,z]);let xe=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!mt(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),ee(()=>{L(!0)});let t=n.subscribe(`onResolved`,()=>{t(),L(!1)});n.navigate({...j,replace:m,resetScroll:g,hashScrollIntoView:p,startTransition:h,viewTransition:_,ignoreBlocker:ie})}};if(M)return{...fe,ref:i,href:M,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...w&&{onBlur:w},...T&&{onFocus:T},...E&&{onMouseEnter:E},...D&&{onMouseLeave:D},...O&&{onTouchStart:O}};let Se=e=>{if(b||z!==`intent`)return;if(!B){V();return}let t=e.currentTarget;if(G.has(t))return;let n=setTimeout(()=>{G.delete(t),V()},B);G.set(t,n)},Ce=e=>{b||z!==`intent`||V()},we=e=>{if(b||!z||!B)return;let t=e.currentTarget,n=G.get(t);n&&(clearTimeout(n),G.delete(t))};return{...fe,...P,...F,href:ve,ref:i,onClick:K([C,xe]),onBlur:K([w,we]),onFocus:K([T,Se]),onMouseEnter:K([E,Se]),onMouseLeave:K([D,we]),onTouchStart:K([O,Ce]),disabled:!!b,target:y,...ye&&{style:ye},...I&&{className:I},...b&&st,...N&&ct,...pe&&be&<}}var at={},ot={className:`active`},st={role:`link`,"aria-disabled":!0},ct={"data-status":`active`,"aria-current":`page`},lt={"data-transitioning":`transitioning`},G=new WeakMap,ut={rootMargin:`100px`},K=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function dt(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function ft(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var pt=f.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=it(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return f.createElement(`a`,t,o)}return f.createElement(n,a,o)});function mt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var q={status:[`status`],credentials:[`credentials`],credentialHealth:[`credentials`,`health`],models:[`models`],keys:[`keys`],settings:[`settings`],agentSetup:(e,t)=>[`agent-setup`,e,t??null],usage:e=>[`usage`,e.grain??`raw`,e.groupBy,e.splitBy??null,e.since,e.until??null],quotaHistory:e=>[`quota-history`,e.credentialId,e.since,e.until??null],logs:e=>[`logs`,e],requestBody:e=>[`logs`,`body`,e],clientSummary:[`client`,`summary`],clientUsage:e=>[`client`,`usage`,e.grain??`raw`,e.groupBy,e.splitBy??null,e.since,e.until??null],clientLogs:e=>[`client`,`logs`,e],clientQuota:[`client`,`quota`],clientQuotaHistory:e=>[`client`,`quota-history`,e.since,e.until??null],console:(e,t)=>[`console`,e,t],database:[`database`],snapshots:[`database`,`snapshots`],lifecycle:[`lifecycle`],plugins:[`plugins`],catalog:[`catalog`]},ht=c({queryKey:q.catalog,queryFn:async({signal:e})=>{let{providers:t}=await i(`/api/catalog`,e);return[...t].sort((e,t)=>e.order-t.order)},staleTime:3e5});function gt(){return u(ht)}function _t(e,t){return e.find(e=>e.id===t)}function vt(){return u({queryKey:q.status,queryFn:({signal:e})=>i(`/api/status`,e),staleTime:3e4})}function yt(){return u({queryKey:q.credentials,queryFn:async({signal:e})=>(await i(`/api/credentials`,e)).credentials})}function bt(e=1e4){return u({queryKey:q.credentialHealth,queryFn:({signal:e})=>i(`/api/credentials/health`,e),refetchInterval:e})}function xt(e,t=!0){return u({queryKey:q.quotaHistory(e),enabled:t,queryFn:({signal:t})=>i(a(`/api/credentials/quota/history`,{credentialId:e.credentialId,since:e.since,...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:!1})}function St(){return u({queryKey:q.models,queryFn:async({signal:e})=>(await i(`/api/models`,e)).models})}function Ct(){return u({queryKey:q.keys,queryFn:async({signal:e})=>(await i(`/api/keys`,e)).keys})}var wt={queryKey:q.settings,queryFn:({signal:e})=>i(`/api/settings`,e)};function Tt(){return u({...wt,select:e=>e.settings})}function Et(){return u({...wt,select:e=>e.bodyLoggingAllowed&&e.settings.bodyLoggingEnabled})}function Dt(){return u({...wt,select:e=>e.bodyLoggingAllowed})}function Ot(e,t){return u({queryKey:q.agentSetup(e,t),enabled:t!==void 0,queryFn:async({signal:n})=>(await i(a(`/api/agent-setup`,{client:e,...t??{}}),n)).files})}function kt(e,t=6e4){return u({queryKey:q.usage(e),queryFn:async({signal:t})=>(await i(a(`/api/usage`,{groupBy:e.groupBy,since:e.since,...e.grain===void 0?{}:{grain:e.grain},...e.splitBy===void 0?{}:{splitBy:e.splitBy},...e.until===void 0?{}:{until:e.until}}),t)).rows,refetchInterval:t})}var At=2e3;function jt(e=100,t=At){return u({queryKey:q.logs(e),queryFn:async({signal:t})=>(await i(a(`/api/logs`,{limit:e}),t)).logs,refetchInterval:t})}function Mt(e){return u({queryKey:q.requestBody(e??``),enabled:e!==null,queryFn:({signal:t})=>i(`/api/requests/${encodeURIComponent(e??``)}/body`,t),refetchInterval:!1})}var Nt=5e3;function Pt(e=200,t=``,n=Nt){return u({queryKey:q.console(e,t),queryFn:async({signal:n})=>i(a(`/api/console`,{lines:e,...t===``?{}:{level:t}}),n),refetchInterval:n})}function Ft(){return u({queryKey:q.database,queryFn:({signal:e})=>i(`/api/database`,e),refetchInterval:!1})}function It(e){return`/api/database/snapshots/${encodeURIComponent(e)}/download`}function Lt(){return u({queryKey:q.snapshots,queryFn:async({signal:e})=>(await i(`/api/database/snapshots`,e)).snapshots,refetchInterval:!1})}function J(e){e.invalidateQueries({queryKey:q.database})}function Rt(){let e=d();return l({mutationFn:()=>t(`/api/database/snapshots`),onSuccess:()=>J(e)})}function zt(){let e=d();return l({mutationFn:e=>n(`/api/database/retention`,e),onSuccess:()=>{J(e),e.invalidateQueries({queryKey:q.settings})}})}function Bt(){let e=d();return l({mutationFn:()=>t(`/api/database/vacuum`),onSuccess:()=>J(e)})}function Vt(){let t=d();return l({mutationFn:t=>e(`/api/database/snapshots/${encodeURIComponent(t)}`),onSuccess:()=>J(t)})}function Ht(){return l({mutationFn:e=>t(`/api/database/snapshots/${encodeURIComponent(e)}/restore`)})}function Ut(){return l({mutationFn:e=>t(`/api/database/import`,e)})}function Wt(){return u({queryKey:q.lifecycle,queryFn:({signal:e})=>i(`/api/lifecycle`,e),refetchInterval:!1})}function Gt(){return l({mutationFn:()=>t(`/api/lifecycle/restart`)})}function Kt(){return l({mutationFn:()=>t(`/api/lifecycle/shutdown`)})}function qt(){let e=d();return l({mutationFn:({mode:e,secret:n})=>e===`client`?t(`/api/client/login`,{key:n}):t(`/api/login`,{password:n,...e===`viewer`?{mode:`viewer`}:{}}),onSuccess:()=>e.invalidateQueries()})}function Jt(){let e=d();return l({mutationFn:e=>t(`/api/setup`,{password:e}),onSuccess:()=>e.invalidateQueries()})}function Yt(){let e=d();return l({mutationFn:()=>t(`/api/logout`),onSuccess:()=>{e.clear()}})}function Xt(){let e=d();return l({mutationFn:()=>t(`/api/client/logout`),onSuccess:()=>e.clear()})}function Zt(){return u({queryKey:q.clientSummary,queryFn:({signal:e})=>i(`/api/client/summary`,e)})}function Qt(e,t=6e4){return u({queryKey:q.clientUsage(e),queryFn:({signal:t})=>i(a(`/api/client/usage`,{groupBy:e.groupBy,since:e.since,...e.grain===void 0?{}:{grain:e.grain},...e.splitBy===void 0?{}:{splitBy:e.splitBy},...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:t})}function $t(e=100,t=At){return u({queryKey:q.clientLogs(e),queryFn:async({signal:t})=>(await i(a(`/api/client/logs`,{limit:e}),t)).logs,refetchInterval:t})}function en(e=6e4){return u({queryKey:q.clientQuota,queryFn:async({signal:e})=>(await i(`/api/client/quota`,e)).accounts,refetchInterval:e})}function tn(e,t=!0){return u({queryKey:q.clientQuotaHistory(e),enabled:t,queryFn:({signal:t})=>i(a(`/api/client/quota/history`,{since:e.since,...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:3e5})}function nn(){let e=d();return l({mutationFn:({id:e,patch:t})=>s(`/api/credentials/${e}`,t),onSuccess:()=>{e.invalidateQueries({queryKey:q.credentials}),e.invalidateQueries({queryKey:q.credentialHealth})}})}function rn(){let t=d();return l({mutationFn:t=>e(`/api/credentials/${t}`),onSuccess:()=>{t.invalidateQueries({queryKey:q.credentials}),t.invalidateQueries({queryKey:q.credentialHealth})}})}function an(){let e=d();return l({mutationFn:e=>n(`/api/models/${e.id}`,e),onSuccess:()=>e.invalidateQueries({queryKey:q.models})})}function on(){let t=d();return l({mutationFn:t=>e(`/api/models/${t}`),onSuccess:()=>t.invalidateQueries({queryKey:q.models})})}function sn(){return l({mutationFn:({modelId:e,need:n})=>t(`/api/models/${e}/dry-run`,n)})}function cn(){let e=d();return l({mutationFn:e=>t(`/api/keys`,e),onSuccess:()=>e.invalidateQueries({queryKey:q.keys})})}function ln(){let e=d();return l({mutationFn:({id:e,limits:t})=>n(`/api/keys/${e}/limits`,{limits:t}),onSuccess:()=>e.invalidateQueries({queryKey:q.keys})})}function un(){let e=d();return l({mutationFn:({id:e,modelAllowlist:t})=>n(`/api/keys/${e}/models`,{modelAllowlist:t}),onSuccess:()=>e.invalidateQueries({queryKey:q.keys})})}function dn(){let t=d();return l({mutationFn:t=>e(`/api/keys/${t}`),onSuccess:()=>t.invalidateQueries({queryKey:q.keys})})}function fn(){let e=d();return l({mutationFn:e=>n(`/api/settings`,e),onSuccess:()=>e.invalidateQueries({queryKey:q.settings})})}function pn(){return l({mutationFn:e=>n(`/api/settings/password`,e)})}function mn(){let e=d();return l({mutationFn:e=>n(`/api/settings/viewer-password`,{password:e}),onSuccess:()=>e.invalidateQueries({queryKey:q.status})})}function hn(){return l({mutationFn:e=>t(`/api/connect/start`,e)})}function gn(){let e=d();return l({mutationFn:e=>t(`/api/credentials`,e),onSuccess:()=>e.invalidateQueries({queryKey:q.credentials})})}function _n(){let e=d();return l({mutationFn:e=>t(`/api/connect/finish`,e),onSuccess:()=>e.invalidateQueries({queryKey:q.credentials})})}function vn(){return u({queryKey:q.plugins,queryFn:async({signal:e})=>(await i(`/api/plugins`,e)).plugins,staleTime:3e5})}async function yn(e){let t=await o(`/api/connect/poll`,{method:`POST`,body:{flowId:e},accept:[202]});return t.status===202?{status:`pending`}:t.data}var bn=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),xn=new Intl.NumberFormat(`en-US`);function Sn(e){return Number.isFinite(e)?e<1e4?xn.format(Math.round(e)):bn.format(e).toLowerCase():`—`}function Cn(e){return Number.isFinite(e)?e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<100?`$${e.toFixed(2)}`:`$${bn.format(e).toLowerCase()}`:`—`}function wn(e){return e==null||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m`}function Tn(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:`—`}var En=[[6e4,1e3,`s`],[36e5,6e4,`m`],[864e5,36e5,`h`],[1/0,864e5,`d`]];function Y(e){let t=Math.abs(e);if(t<1e3)return`0s`;let n=En.find(([e])=>t<e);return n===void 0?`—`:`${Math.floor(t/n[1])}${n[2]}`}function Dn(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=e-t;return Math.abs(n)<5e3?`just now`:n<0?`${Y(n)} ago`:`in ${Y(n)}`}function On(e){return new Date(e).toLocaleTimeString(`en-GB`,{hour12:!1})}var kn=864e5;function An(e,t){let n=new Date(e),r=n.toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`,hour12:!1});return jn(t)?`${n.toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`})} ${r}`:r}function jn(e){return e>=kn}function Mn(e){return e==null||!Number.isFinite(e)?`—`:new Date(e).toLocaleString(`en-GB`,{year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}var Nn=[`B`,`KiB`,`MiB`,`GiB`,`TiB`];function Pn(e){if(e==null||!Number.isFinite(e))return`—`;if(Math.abs(e)<1024)return`${Math.round(e)} B`;let t=e,n=0;for(;Math.abs(t)>=1024&&n<Nn.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Nn[n]}`}function Fn(e,t=8){return e.length<=t?e:`${e.slice(0,t)}…`}var In={fiveHour:18e6,daily:864e5,weekly:6048e5};function X(e,t){return t!==null&&t>0?t:In[e]}var Ln=6e4;function Z(e,t){return e===null||t===null?e===t:Math.abs(e-t)<=Ln}function Rn(e,t){return e.resetsAt!==null&&e.resetsAt<=t}function zn(e,t){return t===void 0?`unknown`:e.observedAt>0&&t.stale?`stale`:t.ratePerHour===null||e.limit===null||e.limit<=0?`unknown`:t.survives===!1&&t.exhaustsAt!==null?`empty`:t.survives===!0?`ok`:`unknown`}function Bn(e,t){if(t.provider!==e.provider)return!1;let n=Symbol(`unusable-endpoint`);return(e=>e===void 0||e===``?void 0:e)(e.endpointId)===(e=>{if(e!==void 0)return typeof e==`string`&&e!==``?e:n})(t.providerData.endpointId)?e.credentialId===void 0||t.id===e.credentialId:!1}function Vn(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t);return n[Math.min(n.length-1,Math.max(0,Math.ceil(t*n.length)-1))]??null}function Q(e){return e.state===`pending`}function Hn(e){return e.filter(e=>!Q(e))}function $(e){return Q(e)?!1:e.status>=400||e.errorCode!==null}var Un={ok:`●`,warn:`◐`,down:`○`,idle:`·`,live:`●`};function Wn(e){return Q(e)?`live`:$(e)?`down`:`ok`}function Gn(e){return Q(e)?`in flight`:$(e)?`failed with ${e.status}`:`succeeded`}function Kn(e,t){let n=Hn(e),r=[],i=0,a=0,o=0,s=0,c=0,l=0;for(let e of n)$(e)&&(i+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&r.push(e.ttftMs),a+=e.costUsd,o+=e.inputTokens,s+=e.outputTokens,c+=e.cacheReadTokens,l+=e.cacheWriteTokens;let u=t/6e4;return{requests:n.length,errors:i,errorRate:n.length===0?0:i/n.length,ratePerMin:u<=0?0:n.length/u,ttftP50:Vn(r,.5),ttftP95:Vn(r,.95),costUsd:a,inputTokens:o,outputTokens:s,cacheReadTokens:c,cacheWriteTokens:l}}function qn(e,t){let n=Hn(e),{now:r,spanMs:i,count:a}=t,o=i/a,s=r-i,c=Array.from({length:a},(e,t)=>({at:s+t*o,total:0,errors:0,costUsd:0,tokens:0,ttftMs:null})),l=Array.from({length:a},()=>[]);for(let e of n){if(e.at<s||e.at>r)continue;let t=Math.min(a-1,Math.floor((e.at-s)/o)),n=c[t];n!==void 0&&(n.total+=1,n.costUsd+=e.costUsd,n.tokens+=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheWriteTokens,$(e)&&(n.errors+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&l[t]?.push(e.ttftMs))}for(let[e,t]of c.entries())t.ttftMs=Vn(l[e]??[],.5);return c}var Jn={tokenRejected:`reconnect needed — provider rejected the refresh token`,expiredNoRefresh:`reconnect needed — token expired with nothing to refresh from`};function Yn(e,t,n,r=null){if(!n){let e=r===`tokenRejected`||r===`expiredNoRefresh`;return{state:e?`down`:`idle`,note:e?Jn[r]:`disabled`,ttftMs:null,lastUsedAt:null,consecutiveFailures:0}}if(e.length===0)return{state:`idle`,note:`unused`,ttftMs:null,lastUsedAt:null,consecutiveFailures:0};let i=`ok`,a=``,o=null,s=null,c=0;for(let n of e){if(n.ewmaTtftMs!==null&&(o=o===null?n.ewmaTtftMs:Math.max(o,n.ewmaTtftMs)),n.lastUsedAt!==null&&(s=s===null?n.lastUsedAt:Math.max(s,n.lastUsedAt)),c=Math.max(c,n.consecutiveFailures),n.breakerState===`open`){i=`down`,a=`breaker open`;continue}if(n.rateLimitedUntil!==null&&n.rateLimitedUntil>t&&i!==`down`){i=`warn`,a=`rate limited`;continue}n.breakerState===`halfOpen`&&i===`ok`&&(i=`warn`,a=`probing`)}return{state:i,note:a,ttftMs:o,lastUsedAt:s,consecutiveFailures:c}}var Xn={fiveHour:`5h`,daily:`24h`,weekly:`7d`};function Zn(e){return Math.max(e,6e4)*3}function Qn(e,t,n){return e.observedAt<=0||t-e.observedAt>Zn(n)}function $n(e,t){return t?.ratePerHour===void 0||t.ratePerHour===null||e.limit===null||e.limit<=0?null:t.ratePerHour/e.limit}function er(e,t){return e.find(e=>e.windowType===t)}function tr(e,t,n,r,i){return nr(e,{stale:Qn(e,t,n),rolledOver:Rn(e,t),estimateStale:i===void 0||i.stale,survives:i?.survives??null,exhaustsAt:i?.exhaustsAt??null},t,r)}function nr(e,t,n,r){let i=Xn[e.windowType];if(e.observedAt<=0)return`${i} · never observed`;if(t.stale)return`${i} · stale, read ${r(e.observedAt,n)}`;if(t.rolledOver)return`${i} · rolled over, waiting for the next reading`;if(e.resetsAt===null)return i;let a=`resets ${r(e.resetsAt,n)}`;return t.estimateStale||t.survives!==!1||t.exhaustsAt===null?`${i} · ${a}`:`${i} · ${t.exhaustsAt<=n?`empty now`:`empty ~${Y(t.exhaustsAt-n)}`} · ${a}`}function rr(e){return{observedAt:e.observedAt,windowType:e.windowType,windowMs:e.windowMs,resetsAt:e.resetsAt,usedRatio:e.limit===null||e.limit<=0?null:Math.min(1,Math.max(0,e.used/e.limit))}}function ir(e,t){if(e.usedRatio!==0||t.usedRatio!==0)return!1;let n=X(e.windowType,e.windowMs),r=X(t.windowType,t.windowMs);return n===r&&Z(e.resetsAt,e.observedAt+n)&&Z(t.resetsAt,t.observedAt+r)&&!Z(t.resetsAt,e.resetsAt)}function ar(e){let t=e.filter(e=>e.usedRatio!==null).sort((e,t)=>e.observedAt-t.observedAt),n=[],r;for(let e of t){let t={at:e.observedAt,percent:Math.min(100,e.usedRatio*100)},i={resetsAt:e.resetsAt,startsAt:e.resetsAt===null?null:e.resetsAt-X(e.windowType,e.windowMs)},a=n[n.length-1],o=r!==void 0&&ir(r,e);a===void 0||r===void 0||!o&&!Z(e.resetsAt,r.resetsAt)?n.push({key:`window-${n.length}`,points:[t],...i}):(a.points.push(t),a.resetsAt=o?null:i.resetsAt,a.startsAt=o?null:i.startsAt),r=e}return n}function or(e,t){let{usedRatio:n,observedAt:r}=t;if(n===null)return[...e];let i=e.findLastIndex(e=>Z(e.resetsAt,t.resetsAt)),a=e[i];if(a===void 0)return[...e];let o=a.points[a.points.length-1];if(o===void 0||o.at>=r)return[...e];let s={at:r,percent:Math.min(100,n*100)};return e.map((e,t)=>t===i?{...e,points:[...e.points,s]}:e)}function sr(e){return e.startsAt===null||e.resetsAt===null?null:{from:{at:e.startsAt,percent:0},to:{at:e.resetsAt,percent:100}}}var cr=36e5;function lr(e,t){let{usedRatio:n,resetsAt:r,observedAt:i}=e,a=t;if(n===null||r===null||a===null||a<=0)return null;let o=Math.min(100,n*100),s=a*100,c={at:i,percent:o},l=o+s*((r-i)/cr);return l<=100?{from:c,to:{at:r,percent:l}}:{from:c,to:{at:i+(100-o)/s*cr,percent:100}}}var ur={fiveHour:0,daily:1,weekly:2};function dr(e){return e.filter(e=>e.limit!==null&&e.limit>0).map(e=>({window:e,fraction:Math.min(1,e.used/e.limit)})).sort((e,t)=>ur[e.window.windowType]-ur[t.window.windowType])}function fr(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return n}var pr=C`
|
|
2
|
-
0%, 100% { opacity: 1; }
|
|
3
|
-
50% { opacity: 0.28; }
|
|
4
|
-
`,mr=S`
|
|
5
|
-
color: ${({theme:e})=>e.color.ok};
|
|
6
|
-
animation: ${pr} 1.2s ease-in-out infinite;
|
|
7
|
-
|
|
8
|
-
@media (prefers-reduced-motion: reduce) {
|
|
9
|
-
animation: none;
|
|
10
|
-
}
|
|
11
|
-
`,hr={ok:S`
|
|
12
|
-
color: ${({theme:e})=>e.color.ok};
|
|
13
|
-
`,warn:S`
|
|
14
|
-
color: ${({theme:e})=>e.color.warn};
|
|
15
|
-
`,down:S`
|
|
16
|
-
color: ${({theme:e})=>e.color.down};
|
|
17
|
-
`,idle:S`
|
|
18
|
-
color: ${({theme:e})=>e.color.inkFaint};
|
|
19
|
-
`,live:mr},gr=x.span`
|
|
20
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
21
|
-
font-size: 12px;
|
|
22
|
-
line-height: 1;
|
|
23
|
-
flex: none;
|
|
24
|
-
${({$state:e})=>hr[e]}
|
|
25
|
-
`;function _r({state:e,label:t,className:n}){return b(gr,{$state:e,className:n,role:`img`,"aria-label":t,title:t,children:Un[e]})}export{tn as $,Le as $t,Sn as A,zt as At,At as B,nn as Bt,X as C,T as Cn,gt as Ct,Pn as D,Ht as Dt,Bn as E,Gt as Et,Dn as F,Tt as Ft,It as G,Qe as Gt,_t as H,Bt as Ht,Cn as I,Jt as It,Dt as J,Pe as Jt,Ot as K,Xe as Kt,jn as L,Kt as Lt,Y as M,ln as Mt,wn as N,un as Nt,An as O,dn as Ot,Tn as P,mn as Pt,en as Q,ze as Qt,Fn as R,Lt as Rt,or as S,w as Sn,vn as St,zn as T,Mt as Tt,yn as U,pt as Ut,ht as V,kt as Vt,q as W,$e as Wt,Xt as X,He as Xt,pn as Y,Be as Yt,$t as Z,Ne as Zt,ar as _,j as _n,Wt as _t,sr as a,Se as an,gn as at,rr as b,se as bn,jt as bt,fr as c,P as cn,bt as ct,Qn as d,M as dn,rn as dt,Fe as en,Zt as et,Gn as f,_e as fn,on as ft,nr as g,ae as gn,Ct as gt,tr as h,re as hn,Ut as ht,qn as i,Ce as in,Pt as it,Mn as j,fn as jt,On as k,an as kt,$ as l,N as ln,yt as lt,lr as m,ve as mn,sn as mt,Xn as n,Oe as nn,_n as nt,er as o,V as on,cn as ot,Wn as p,A as pn,Vt as pt,Et as q,Ge as qt,ur as r,xe as rn,hn as rt,Yn as s,Te as sn,Rt as st,_r as t,Ie as tn,Qt as tt,Q as u,ge as un,Ft as ut,dr as v,fe as vn,qt as vt,Rn as w,xt as wt,Kn as x,ce as xn,St as xt,$n as y,E as yn,Yt as yt,Nt as z,vt as zt};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import{A as e,Bt as t,Ct as n,F as r,Ft as i,H as a,N as o,P as s,U as c,at as l,b as u,c as d,ct as f,d as p,dt as m,h as ee,lt as h,n as g,nt as te,o as _,rt as v,s as y,t as ne,v as b,w as x,wt as S,xt as re,y as C}from"./Lamp-ZlMzNs5N.js";import{C as w,D as T,O as E,_ as D,a as O,b as k,i as ie,o as A,r as j,t as M,v as N,x as P}from"./Panel-CYQvfI3L.js";import{_ as F,b as I,i as ae,m as L,r as R,t as z}from"./Rack-D798XvPQ.js";import{t as B}from"./CopyValue-DRHHQlN_.js";import{n as V,t as oe}from"./chevron-right-CPoaXYHw.js";import{t as se}from"./plus-_zo43Lvf.js";import{t as ce}from"./trash-2-BjpqTubo.js";import{t as le}from"./Toggle-CdCCoDEo.js";import{t as ue}from"./Chip-BOyBT5TP.js";import{i as H,n as U,r as de,t as W}from"./Field-DK5zaBVA.js";import{t as fe}from"./Meter-stpt3vQu.js";import{i as pe,n as G,r as K,t as me}from"./Table-CVDZ69Zx.js";import{n as he,r as ge,t as _e}from"./WindowChart-C-Y6U3WF.js";import{Fragment as ve,useCallback as q,useEffect as ye,useState as J}from"react";import{Fragment as Y,jsx as X,jsxs as Z}from"react/jsx-runtime";import Q from"styled-components";var be=I(`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 $(e){return e?.authTypes??[]}function xe(e){return $(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=Q.ol`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: ${({theme:e})=>e.space(3)};
|
|
5
|
-
`,Ee=Q.div`
|
|
6
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
7
|
-
font-size: 26px;
|
|
8
|
-
letter-spacing: 0.22em;
|
|
9
|
-
text-align: center;
|
|
10
|
-
padding: ${({theme:e})=>e.space(3)};
|
|
11
|
-
background: ${({theme:e})=>e.color.panelSunk};
|
|
12
|
-
border: 1px solid ${({theme:e})=>e.color.ruleStrong};
|
|
13
|
-
border-radius: ${({theme:e})=>e.radius.control};
|
|
14
|
-
`,De=Q.p`
|
|
15
|
-
font-size: 12px;
|
|
16
|
-
color: ${({theme:e})=>e.color.down};
|
|
17
|
-
`,Oe=Q.p`
|
|
18
|
-
font-size: 12px;
|
|
19
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
20
|
-
`;function ke({open:e,credentials:t,onOpenChange:r,onConnected:i}){let o=n().data??[],[s,u]=J(()=>Se(o)),d=a(o,s),[f,p]=J(()=>xe(a(o,Se(o)))),[m,ee]=J(``),h=d?.label??s,[g,_]=J(null),[y,ne]=J(``),[b,x]=J(``),S=(t??[]).filter((e,t,n)=>e.provider===`custom`&&n.findIndex(t=>t.provider===`custom`&&t.providerData.endpointId===e.providerData.endpointId)===t),[re,C]=J(``),[E,O]=J(``),[ie,j]=J(`chat_completions`),[M,N]=J(``),[P,F]=J(null),I=v(),L=te(),R=l(),z=q(()=>{_(null),ne(``),x(``),C(``),O(``),j(`chat_completions`),N(``),F(null),ee(``),I.reset(),L.reset(),R.reset()},[I,L,R]),V=q(e=>{e||z(),r(e)},[r,z]);return ye(()=>{if(g===null||g.kind!==`device`)return;let e=!1,t=async()=>{try{let t=await c(g.flowId);if(e)return;if(t.status===`complete`){z(),r(!1),i();return}}catch(t){if(e)return;F(A(t)),_(null);return}e||(n=setTimeout(()=>void t(),g.pollIntervalMs))},n=setTimeout(()=>void t(),g.pollIntervalMs);return()=>{e=!0,clearTimeout(n)}},[g,i,r,z]),X(ae,{open:e,onOpenChange:V,title:`Connect an account`,description:`The gateway stores the resulting token encrypted. It is never shown again after this dialog.`,footer:g===null?Z(Y,{children:[X(T,{type:`button`,onClick:()=>V(!1),children:`Cancel`}),X(T,{type:`button`,$variant:`primary`,disabled:I.isPending||R.isPending,onClick:()=>{if(F(null),f===`apiKey`){R.mutate({provider:s,apiKey:M,label:m.trim()||void 0,...s===`custom`?{endpointId:b,endpointLabel:re,origin:E,protocol:ie}:{}},{onSuccess:()=>{z(),r(!1),i()},onError:e=>F(A(e))});return}I.mutate({provider:s,label:m.trim().length===0?h:m.trim()},{onSuccess:e=>_(e),onError:e=>F(A(e))})},children:f===`apiKey`?R.isPending?`Adding…`:`Add API key`:I.isPending?`Starting…`:`Start authorization`})]}):g.kind===`device`?X(T,{type:`button`,onClick:()=>V(!1),children:`Cancel`}):Z(Y,{children:[X(T,{type:`button`,onClick:()=>V(!1),children:`Cancel`}),X(T,{type:`button`,$variant:`primary`,disabled:L.isPending||y.trim().length===0,onClick:()=>{g!==null&&(F(null),L.mutate({flowId:g.flowId,code:y.trim()},{onSuccess:()=>{z(),r(!1),i()},onError:e=>F(A(e))}))},children:L.isPending?`Finishing…`:`Finish connecting`})]}),children:Z(Te,{children:[g===null?Z(w,{$gap:3,children:[X(W,{label:`Provider`,children:e=>X(H,{...e,value:s,onChange:e=>{let t=e.target.value;u(t),p(xe(a(o,t)))},children:o.map(e=>X(`option`,{value:e.id,children:e.label},e.id))})}),$(d).length>1?X(W,{label:`How to connect`,children:e=>X(H,{...e,value:f,onChange:e=>p(e.target.value),children:$(d).map(e=>X(`option`,{value:e,children:Ce[e]},e))})}):null,s===`custom`?Z(Y,{children:[S.length===0?null:X(W,{label:`Existing endpoint`,children:e=>Z(H,{...e,value:b,onChange:e=>{let t=S.find(t=>t.providerData.endpointId===e.target.value);if(t===void 0){x(``),C(``),O(``),j(`chat_completions`);return}x(String(t.providerData.endpointId)),C(String(t.providerData.endpointLabel)),O(String(t.providerData.origin)+String(t.providerData.basePath??``)),j(t.providerData.protocol===`responses`?`responses`:`chat_completions`)},children:[X(`option`,{value:``,children:`Create new endpoint`}),S.map(e=>X(`option`,{value:String(e.providerData.endpointId),children:String(e.providerData.endpointLabel)},String(e.providerData.endpointId)))]})}),X(W,{label:`Endpoint ID`,children:e=>X(U,{...e,value:b,onChange:e=>x(e.target.value)})}),X(W,{label:`Endpoint label`,children:e=>X(U,{...e,value:re,onChange:e=>C(e.target.value)})}),X(W,{label:`Server URL`,children:e=>X(U,{...e,value:E,placeholder:`https://server.example/api`,onChange:e=>O(e.target.value)})}),E.trim().toLowerCase().startsWith(`http://`)?X(De,{children:`Plaintext transport sends prompts and API keys without TLS.`}):null,X(W,{label:`Protocol`,children:e=>Z(H,{...e,value:ie,onChange:e=>j(e.target.value),children:[X(`option`,{value:`chat_completions`,children:`Chat Completions (/v1/chat/completions)`}),X(`option`,{value:`responses`,children:`Responses (/v1/responses)`})]})})]}):null,f===`apiKey`?X(W,{label:`API key`,children:e=>X(U,{...e,type:`password`,value:M,autoComplete:`off`,onChange:e=>N(e.target.value)})}):null,X(W,{label:`Label`,hint:`How this account is named in the rack. Defaults to the provider.`,children:e=>X(U,{...e,value:m,placeholder:h,onChange:e=>ee(e.target.value)})})]}):Z(w,{$gap:3,children:[Z(w,{$gap:1,children:[X(D,{children:`Step 1 — authorize`}),X(k,{$gap:2,children:Z(T,{as:`a`,href:g.authorizeUrl,target:`_blank`,rel:`noreferrer noopener`,$variant:`primary`,$size:`sm`,children:[X(be,{}),`Open `,h]})}),X(B,{value:g.authorizeUrl,label:`Copy authorization link`})]}),g.userCode===null?null:Z(w,{$gap:1,children:[X(D,{children:`Step 2 — enter this code`}),X(Ee,{children:g.userCode})]}),g.kind===`device`?Z(Oe,{children:[d?.pasteHint??``,` Waiting for authorization…`]}):X(W,{label:`Authorization code`,hint:d?.pasteHint??``,...P===null?{}:{problem:P},children:e=>X(U,{...e,value:y,autoFocus:!0,placeholder:we(d),onChange:e=>ne(e.target.value)})})]}),P===null||g?.kind===`pkce`?null:X(De,{children:P})]})})}function Ae({credentialId:e,windows:t,burn:n,pollIntervalMs:r,now:i}){let a=t.map(e=>({window:e,estimate:_(n,e.windowType),since:ge(u(e))})),o=a.map(e=>e.since).filter(e=>e!==null),s=o.length===0?0:Math.min(...o),c=S({credentialId:e,since:s},o.length>0),l=c.data?.samples??[],d=c.data?.gatewayRates??[];return X(w,{$gap:4,children:a.map(e=>X(je,{window:e.window,estimate:e.estimate,since:e.since,samples:l.filter(t=>t.windowType===e.window.windowType&&t.observedAt>=(e.since??0)),gatewayRate:d.find(t=>t.windowType===e.window.windowType),pollIntervalMs:r,now:i},e.window.windowType))})}function je({window:t,estimate:n,since:r,samples:i,gatewayRate:a,pollIntervalMs:o,now:s}){let c=t.limit===null?`${e(t.used)} used`:`${e(t.used)} of ${e(t.limit)} used`,l=x(t,s),d=n===void 0||p(t,s,o)||n.stale&&!l;return X(he,{live:u(t),samples:i.map(u),since:r,now:s,ratePerHourRatio:C(t,n),exhaustsAt:n?.exhaustsAt??null,survives:n?.survives??null,stale:d,rolledOver:l,spent:c,rateText:n?.ratePerHour===void 0||n.ratePerHour===null?`unknown`:`${e(n.ratePerHour)}/h`,extraFact:X(_e,{legend:`This gateway accounts for`,value:a?.gatewayRatePerHour===void 0||a.gatewayRatePerHour===null?`unknown`:`${e(a.gatewayRatePerHour)} tokens/h`})})}var Me=Q(M)`
|
|
21
|
-
border-left: 3px solid ${({$provider:e})=>L(e)};
|
|
22
|
-
`,Ne=Q(U)`
|
|
23
|
-
width: 100%;
|
|
24
|
-
min-width: 140px;
|
|
25
|
-
height: 26px;
|
|
26
|
-
font-family: ${({theme:e})=>e.font.sans};
|
|
27
|
-
font-size: 12.5px;
|
|
28
|
-
background: transparent;
|
|
29
|
-
border-color: transparent;
|
|
30
|
-
|
|
31
|
-
&:hover:not(:disabled),
|
|
32
|
-
&:focus {
|
|
33
|
-
background: ${({theme:e})=>e.color.panelSunk};
|
|
34
|
-
border-color: ${({theme:e})=>e.color.ruleStrong};
|
|
35
|
-
}
|
|
36
|
-
`,Pe=Q(de)`
|
|
37
|
-
width: 62px;
|
|
38
|
-
height: 26px;
|
|
39
|
-
`,Fe=Q.span`
|
|
40
|
-
display: block;
|
|
41
|
-
padding-left: 9px;
|
|
42
|
-
font-size: 11px;
|
|
43
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
44
|
-
`,Ie=Q.div`
|
|
45
|
-
display: grid;
|
|
46
|
-
/* Bar, figure, legend. The figure has a column of its own so the legends stay
|
|
47
|
-
aligned down the stack whether a window reads 4% or 100%. */
|
|
48
|
-
grid-template-columns: 96px 34px 1fr;
|
|
49
|
-
align-items: center;
|
|
50
|
-
min-width: 208px;
|
|
51
|
-
gap: 6px;
|
|
52
|
-
`,Le=Q(N)`
|
|
53
|
-
font-size: 11px;
|
|
54
|
-
text-align: right;
|
|
55
|
-
`,Re=Q.div`
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: column;
|
|
58
|
-
gap: 4px;
|
|
59
|
-
`;function ze(){let e=t();return{pending:e.isPending,commit:(t,n)=>{e.mutate({id:t,patch:n})}}}function Be(e,t){if(t===void 0)return` The list of models could not be read, so whether any target is pinned to this account is unknown.`;let n=t.filter(t=>t.targets.some(t=>t.credentialId===e.id)).map(e=>e.id);return n.length===0?``:` ${n.length===1?`The model`:`The models`} ${n.join(`, `)} ${n.length===1?`pins a target`:`pin targets`} to this account. Those targets will fail rather than fall back to another account.`}function Ve(){let{cadence:e}=F(),t=h(),c=f(e(1e4,`res:credentials`)),l=i(),u=re(),p=n(),te=m(),{commit:v}=ze(),[x,S]=J(!1),[C,A]=J(null),[N,I]=J(new Set),ae=e=>I(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n}),L=Date.now(),B=t.data??[],H=p.data??[],U=e=>a(H,e)?.order??1/0,de=[...new Set(B.map(e=>e.provider))].sort((e,t)=>U(e)-U(t)),W=e=>a(H,e)?.label??e,he=d(c.data?.health??[],e=>e.credentialId),ge=d(c.data?.quota??[],e=>e.credentialId),_e=d(c.data?.burn??[],e=>e.credentialId),q=l.data?.quotaPollIntervalMs??3e5,ye=B.filter(e=>e.enabled).length,Q=t.isLoading?`Reading connected accounts…`:B.length===0?`No provider credentials are connected, so every request fails at the router.`:`${ye} of ${B.length} accounts are enabled and eligible for routing.`;return Z(Y,{children:[X(z,{legend:`Accounts`,title:`Provider accounts`,summary:Q,actions:Z(T,{type:`button`,$variant:`primary`,onClick:()=>S(!0),children:[X(se,{}),`Connect an account`]})}),t.isError?X(M,{legend:`Accounts`,children:X(ie,{error:t.error,onRetry:()=>void t.refetch()})}):t.isLoading?X(M,{legend:`Accounts`,children:X(O,{rows:5})}):B.length===0?X(M,{legend:`Accounts`,children:X(j,{legend:`Nothing connected`,message:`Connect a provider account to give the router something to dispatch to. Tokens are encrypted at rest and never shown again.`,action:X(T,{type:`button`,$variant:`primary`,$size:`sm`,onClick:()=>S(!0),children:`Connect an account`})})}):X(w,{$gap:4,children:de.map(e=>{let t=B.filter(t=>t.provider===e);return X(Me,{$provider:e,legend:W(e),meta:`${t.length} account${t.length===1?``:`s`}`,flush:!0,children:X(P,{children:Z(me,{children:[X(`thead`,{children:Z(`tr`,{children:[X(K,{$width:`24%`,children:`Account`}),X(K,{$width:`20%`,children:`Sign-in`}),X(K,{$align:`right`,$width:`86px`,children:`Tier`}),X(K,{$align:`right`,$width:`94px`,children:`Weight`}),X(K,{$align:`center`,$width:`86px`,children:`Enabled`}),X(K,{$width:`240px`,children:`Quota`}),X(K,{$align:`right`,$width:`88px`,children:`TTFT`}),X(K,{$align:`right`,$width:`130px`,children:`Token expires`}),X(K,{$width:`76px`})]})}),X(`tbody`,{children:t.map(e=>{let t=y(he.get(e.id)??[],L,e.enabled,e.disabledReason),n=ge.get(e.id)??[],i=_e.get(e.id)??[],a=b(n),c=N.has(e.id);return Z(ve,{children:[Z(pe,{children:[Z(G,{children:[Z(k,{$gap:2,children:[X(ne,{state:t.state,label:t.note===``?`healthy`:t.note}),X(Ne,{defaultValue:e.label,"aria-label":`Label for ${e.label}`,onBlur:t=>{let n=t.target.value.trim();if(n.length===0||n===e.label){t.target.value=e.label;return}v(e.id,{label:n})}})]}),t.note===``?null:X(Fe,{children:t.note})]}),X(G,{children:Z(k,{$gap:1,children:[X(ue,{children:e.authType===`oauth`?`oauth`:`api key`}),e.accountEmail===null?null:X(D,{children:e.accountEmail})]})}),X(G,{$align:`right`,children:X(Pe,{min:1,step:1,defaultValue:e.tier,"aria-label":`Tier for ${e.label}`,onBlur:t=>{let n=Number(t.target.value);if(!Number.isInteger(n)||n<1||n===e.tier){t.target.value=String(e.tier);return}v(e.id,{tier:n})}})}),X(G,{$align:`right`,children:X(Pe,{min:.1,step:.1,defaultValue:e.weight,"aria-label":`Weight for ${e.label}`,onBlur:t=>{let n=Number(t.target.value);if(!Number.isFinite(n)||n<=0||n===e.weight){t.target.value=String(e.weight);return}v(e.id,{weight:n})}})}),X(G,{$align:`center`,children:X(le,{checked:e.enabled,label:`Route to ${e.label}`,onCheckedChange:t=>v(e.id,{enabled:t})})}),X(G,{children:a.length===0?X(D,{children:`unknown`}):X(Re,{children:a.map(({window:e,fraction:t})=>Z(Ie,{children:[X(fe,{fraction:t,label:`${g[e.windowType]} window, ${Math.round(t*100)}% used`}),X(Le,{children:s(t,0)}),X(D,{children:ee(e,L,q,r,_(i,e.windowType))})]},e.windowType))})}),X(G,{$align:`right`,$mono:!0,children:o(t.ttftMs)}),X(G,{$align:`right`,$mono:!0,children:e.expiresAt===null?`never`:r(e.expiresAt,L)}),X(G,{$align:`right`,children:Z(k,{$gap:1,$justify:`flex-end`,children:[n.length===0?null:X(E,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-expanded":c,"aria-label":`${c?`Hide`:`Show`} quota history for ${e.label}`,title:`${c?`Hide`:`Show`} quota history for ${e.label}`,onClick:()=>ae(e.id),children:X(c?V:oe,{})}),X(E,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-label":`Remove ${e.label}`,title:`Remove ${e.label}`,onClick:()=>A(e),children:X(ce,{})})]})})]}),c?X(pe,{children:X(G,{colSpan:9,children:X(Ae,{credentialId:e.id,windows:n,burn:i,pollIntervalMs:q,now:L})})}):null]},e.id)})})]})})},e)})}),X(ke,{open:x,credentials:t.data??[],onOpenChange:S,onConnected:()=>void t.refetch()}),X(R,{open:C!==null,onOpenChange:e=>{e||A(null)},title:`Remove account`,body:C===null?``:`Removing "${C.label}" deletes its stored token. Any model target pointing at ${W(C.provider)} loses this account, and reconnecting means authorizing again.`+Be(C,u.data),confirmLabel:`Remove account`,busy:te.isPending,onConfirm:()=>{C!==null&&te.mutate(C.id,{onSettled:()=>A(null)})}})]})}var He=Ve;export{He as component};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{A as e,it as t,z as n}from"./Lamp-ZlMzNs5N.js";import{a as r,b as i,i as a,r as o,t as s,y as c}from"./Panel-CYQvfI3L.js";import{_ as l,t as u}from"./Rack-D798XvPQ.js";import{a as d,i as f,r as p}from"./stream-CEb81tzM.js";import{i as m}from"./Field-DK5zaBVA.js";import{useQueryClient as h}from"@tanstack/react-query";import{useLayoutEffect as g,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],k=[{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`}],A=S(i)`
|
|
2
|
-
gap: ${({theme:e})=>e.space(2)};
|
|
3
|
-
flex-wrap: wrap;
|
|
4
|
-
`,j=S(m)`
|
|
5
|
-
width: auto;
|
|
6
|
-
`,M=S.div`
|
|
7
|
-
display: grid;
|
|
8
|
-
grid-template-rows: auto minmax(0, 1fr);
|
|
9
|
-
gap: ${({theme:e})=>e.space(4)};
|
|
10
|
-
min-height: 0;
|
|
11
|
-
flex: 1;
|
|
12
|
-
`,N=S(s)`
|
|
13
|
-
min-height: 0;
|
|
14
|
-
|
|
15
|
-
> div {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex: 1;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
min-height: 0;
|
|
20
|
-
}
|
|
21
|
-
`,P=S.div`
|
|
22
|
-
flex: 1;
|
|
23
|
-
min-height: 0;
|
|
24
|
-
overflow-x: auto;
|
|
25
|
-
overflow-y: auto;
|
|
26
|
-
`,F=S.pre`
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: ${({theme:e})=>e.space(3)};
|
|
29
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
30
|
-
font-size: 12px;
|
|
31
|
-
line-height: 1.65;
|
|
32
|
-
white-space: pre;
|
|
33
|
-
`,I=S.div`
|
|
34
|
-
color: ${({theme:e,$level:t})=>t===`error`?e.color.down:t===`warn`?e.color.warn:t===`debug`?e.color.inkFaint:e.color.ink};
|
|
35
|
-
`,L=S.p`
|
|
36
|
-
margin: 0;
|
|
37
|
-
padding: ${({theme:e})=>`${e.space(2)} ${e.space(3)}`};
|
|
38
|
-
border-top: 1px solid ${({theme:e})=>e.color.rule};
|
|
39
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
40
|
-
font-size: 12px;
|
|
41
|
-
`,R=S.code`
|
|
42
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
43
|
-
word-break: break-all;
|
|
44
|
-
`;function z({read:e}){return e.source===`file`?x(L,{children:[`Reading `,b(R,{children:e.path}),`, named by `,b(R,{children:`OMNI_LOG_FILE`}),`. That variable says where the gateway's output is being captured; it does not redirect it.`]}):e.source===`journal`?x(L,{children:[`Reading the systemd journal for `,b(R,{children:`omnigateway.service`}),`. To read a file instead, redirect the gateway's output to one and point `,b(R,{children:`OMNI_LOG_FILE`}),` at the same path.`]}):null}var B=[],V={read:void 0,lines:B};function H(){let{cadence:i}=l(),s=h(),[m,S]=y(200),[C,w]=y(``),E=t(m,C,i(n,f)),L=E.data,[R,H]=y(V),W=R.read===L?R.lines:B,G=_(()=>[...L?.lines??[],...W].slice(-m),[L,W,m]),K=v(null),q=v(!0);return p(f,e=>{if(e.kind!==`frame`&&e.kind!==`gap`)return;let t=e.kind===`frame`?D(e.payload):null;if(t===null){H({read:L,lines:B}),e.kind===`frame`&&d(s,f);return}let n=t.filter(e=>T(e,C));n.length!==0&&H(e=>({read:L,lines:[...e.read===L?e.lines:[],...n].slice(-m)}))}),g(()=>{let e=K.current;e!==null&&q.current&&G.length>0&&(e.scrollTop=e.scrollHeight)},[G]),x(M,{children:[b(u,{legend:`Console`,title:`Gateway output`,summary:E.isLoading?`Reading the gateway's own output…`:`${e(G.length)} lines of what this process is doing. Requests are in Logs; prompt bodies, tokens and keys are never written here.`,actions:x(A,{children:[b(j,{value:C,"aria-label":`Which levels to show`,onChange:e=>w(e.target.value),children:k.map(e=>b(`option`,{value:e.value,children:e.label},e.value))}),b(j,{value:m,"aria-label":`How many lines to fetch`,onChange:e=>S(Number(e.target.value)),children:O.map(e=>x(`option`,{value:e,children:[`last `,e]},e))})]})}),x(N,{legend:`Process output`,meta:L===void 0?void 0:b(c,{children:U(L)}),flush:!0,children:[L===void 0?null:b(z,{read:L}),b(P,{ref:K,"data-testid":`console-terminal`,onScroll:e=>{let t=e.currentTarget;q.current=t.scrollHeight-t.scrollTop-t.clientHeight<=8},children:E.isError?b(a,{error:E.error,onRetry:()=>void E.refetch()}):E.isLoading?b(`div`,{style:{padding:12},children:b(r,{rows:10})}):L!==void 0&&L.source===`none`?b(o,{legend:`Nothing is capturing this gateway`,message:"Its output is going to a terminal, so there is nothing to read back. To capture it, run the gateway under systemd with `omni service install`, or start it with `omni start`, which redirects output to a file and points OMNI_LOG_FILE at it."}):G.length===0?b(o,{legend:`Nothing to show`,message:C===``?`This log is empty. The gateway writes here when it boots, refreshes a token, or polls a quota.`:`No line in this window is at that level. Widen the filter to see everything.`}):b(F,{children:G.map((e,t)=>b(I,{$level:e.level,children:e.raw},`${e.at??0}-${t}`))})})]})]})}function U(e){return e.source===`file`?`log file`:e.source===`journal`?`systemd journal`:`not captured`}var W=H;export{W as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_app.plugins._pluginId-87Ox_hkW.js","assets/Lamp-ZlMzNs5N.js","assets/Panel-CYQvfI3L.js","assets/preload-helper-4wSmu2-E.js","assets/Rack-D798XvPQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,r as t,t as n}from"./preload-helper-4wSmu2-E.js";var r=t(`/_app/plugins/$pluginId`)({component:e(()=>n(()=>import(`./_app.plugins._pluginId-87Ox_hkW.js`),__vite__mapDeps([0,1,2,3,4])),`component`)});export{r as t};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_app-BWNEo1e-.js","assets/Panel-CYQvfI3L.js","assets/client-CZnyYbay.js","assets/shared-OJcoRCqT.js","assets/Lamp-ZlMzNs5N.js","assets/Rack-D798XvPQ.js","assets/chevron-right-CPoaXYHw.js","assets/stream-CEb81tzM.js","assets/Field-DK5zaBVA.js","assets/Meter-stpt3vQu.js","assets/Table-CVDZ69Zx.js","assets/WindowChart-C-Y6U3WF.js","assets/RequestTable-CEBhwDs7.js","assets/TokenBreakdown-DDI9uTPW.js","assets/Chip-BOyBT5TP.js","assets/SummaryDeck-DBCSHihY.js","assets/Readout-D6-aurU8.js","assets/_app.index-CyxnfhVX.js","assets/_app.accounts-CLLLwN77.js","assets/CopyValue-DRHHQlN_.js","assets/plus-_zo43Lvf.js","assets/trash-2-BjpqTubo.js","assets/Toggle-CdCCoDEo.js","assets/_app.console-Dr9qxU7J.js","assets/_app.database-D0W0pcxC.js","assets/reasons-Du1OBWAM.js","assets/_app.keys-D9qmw9Tj.js","assets/_app.logs-DtXUZETW.js","assets/_app.models-CNxwXyFl.js","assets/_app.settings-DjiMSl1Y.js","assets/_app.usage-CZz9raYR.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$t as e,Cn as t,Ct as n,Gt as r,Jt as i,Qt as a,V as o,W as s,Xt as c,Yt as l,Zt as u,_n as d,an as f,bn as p,cn as m,dn as h,fn as g,gn as _,hn as v,in as y,mn as b,nn as x,on as S,pn as C,qt as w,rn as T,sn as E,tn as D,un as ee,xn as te,yn as ne}from"./Lamp-ZlMzNs5N.js";import{a as re,c as ie,i as ae,n as O,o as oe,r as k,s as se,t as A}from"./preload-helper-4wSmu2-E.js";import{A as ce,C as le,D as ue,_ as de,a as fe,k as j,l as pe,s as me,t as he}from"./Panel-CYQvfI3L.js";import{h as ge,n as _e,p as ve}from"./Rack-D798XvPQ.js";import{n as ye,t as be}from"./stream-CEb81tzM.js";import{t as xe}from"./login-dV42ZQIA.js";import{t as Se}from"./_app.plugins._pluginId-CZWipH1n.js";import{MutationCache as Ce,QueryCache as we,QueryClient as Te,QueryClientProvider as Ee}from"@tanstack/react-query";import*as M from"react";import{StrictMode as De}from"react";import{Fragment as Oe,jsx as N,jsxs as P}from"react/jsx-runtime";import{createRoot as ke}from"react-dom/client";import Ae from"styled-components";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function F(e){return e?.isNotFound===!0}function je(){try{return sessionStorage}catch{return}}var Me=`tsr-scroll-restoration-v1_3`,Ne=je();function Pe(){try{return JSON.parse(Ne?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Fe(){try{Ne?.setItem(Me,JSON.stringify(I))}catch{}}var I=Pe(),Ie=`data-scroll-restoration-id`,Le=e=>e.state.__TSR_key||e.href;function Re(e){let t=e.getAttribute(Ie);if(t)return`[${Ie}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var ze=!1,Be=`window`;function Ve(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function He(e){let t=new Set;for(let n of e){if(n===Be)continue;let e=Ve(n);e&&t.add(e)}return t}function Ue(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Le,a=new Set,o=e=>{let t=I[e]||={};for(let e of a)e===document?t[Be]={scrollX,scrollY}:e.isConnected&&(t[Re(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,ze=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{ze||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Fe()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=I[d];if(e){let t=I[u];for(let n in e){if(n===Be){if(s)continue}else{let e=Ve(n);if(!e||s&&o&&(l??=He(o),l.has(e)))continue}t||=I[u]={},t[n]??=e[n]}}}ze=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=He(o));let t=e&&i&&c,s=r.restoring?I[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Be){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Ve(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{ze=!1}}))}function We(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Ge(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ke(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Ge(r):Array.isArray(t)?t.push(Ge(r)):n[e]=[t,Ge(r)]}return n}var qe=/^(?:\s|["[{\d-]|fa|nu|tr)/,Je=Xe(JSON.parse),Ye=Ze(JSON.stringify,JSON.parse);function Xe(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ke(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Ze(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!qe.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=We(e,r);return t?`?${t}`:``}}function Qe(e){return{input:({url:t})=>{for(let n of e)t=et(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=tt(e[n],t);return t}}}function $e(t){let n=e(t.basepath),r=`/${n}`,i=t.caseSensitive?r:r.toLowerCase(),a=`${i}/`;return{input:({url:e})=>{let n=t.caseSensitive?e.pathname:e.pathname.toLowerCase();return n===i?e.pathname=`/`:n.startsWith(a)&&(e.pathname=e.pathname.slice(r.length)),e},output:({url:e})=>(e.pathname=u([`/`,n,e.pathname]),e)}}function et(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function tt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function nt(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{h(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var L=`__TSR_index`,rt=`popstate`,it=`beforeunload`;function at(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=lt(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[L];i=ot(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[L];i=ot(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[L]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function ot(e,t){t||={};let n=ut();return{...t,key:n,__TSR_key:n,[L]:e}}function st(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>lt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=ut();t.history.replaceState({[L]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=lt(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[L]-l.state[L],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=at({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(it,x,{capture:!0}),t.removeEventListener(rt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(it,x,{capture:!0}),t.addEventListener(rt,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function ct(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function lt(e,t){let n=ct(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=ut();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[L]:0,key:a,__TSR_key:a}}}function ut(){return(Math.random()+1).toString(36).substring(7)}function dt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function ft(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function pt({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function mt(e,t,n,r){for(let i of t){if(r?.()===!1)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r?.()===!1)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var ht=class{constructor(t,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=t=>{let n=this.options,r=this.basepath??n?.basepath??`/`,i=this.basepath===void 0,a=n?.rewrite;if(this.options={...n,...t},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=l(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:st()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=m(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=nt(this.latestLocation,e),Ue(this)}let o=this.options.basepath??`/`,s=this.options.rewrite;if(i||r!==o||a!==s){this.basepath=o;let t=[],n=e(o);n&&n!==`/`&&t.push($e({basepath:o})),s&&t.push(s),this.rewrite=t.length===0?void 0:t.length===1?t[0]:Qe(t),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=E(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&S(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:g(e).path,external:!1,searchStr:o,search:p(t?.search,i),hash:g(r.slice(1)).path,state:te(t?.state,a)}}let o=new URL(i,this.origin),s=et(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:g(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:p(t?.search,c),hash:g(s.hash.slice(1)).path,state:te(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>a({base:e,to:t.includes(`//`)?i(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=y(D(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=t.to?`${t.to}`:void 0,o=r[2],s=Object.assign(Object.create(null),r[3]),l=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=a?this.resolvePathWithBase(l,a):l,d=xt(t.params,s),f=this.routesByPath[D(u)],m;if(f)m=this.getRouteBranch(f);else if(u.includes(`$`))m=[];else{let[e,t,n]=this.getMatchedRoutes(u);m=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(m=[...m,this.options.notFoundRoute])}if(m.length&&_(d))for(let e of m){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(d,t(d))}catch{}}let h=e.leaveParams?u:g(c({path:u,params:d,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,y=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};m.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,vt(t.options.validateSearch,{...e,...y}))}catch{}}),y=e}y=yt(y,t,m,e._includeValidateSearch),y=p(o,y);let x=this.options.stringifySearch(y),S=t.hash===!0?n.hash:t.hash?v(t.hash,n.hash):void 0,C=S?`#${S}`:``,w=t.state===!0?n.state:t.state?v(t.state,n.state):{};w=te(n.state,w);let T=`${h}${x}${C}`,E,ee,ne=!1;if(this.rewrite){let e=new URL(T,this.origin),t=tt(this.rewrite,e);E=e.href.replace(e.origin,``),t.origin===this.origin?ee=t.pathname+t.search+t.hash:(ee=t.href,ne=!0)}else E=b(T),ee=E;return{publicHref:ee,href:E,pathname:h,search:y,searchStr:x,state:w,hash:S??``,external:ne,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=T(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=xt(s,n);r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=D(this.latestLocation.href)===D(n.href)&&C(pt(n.state),pt(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,_redirects:a,href:o,...s}={})=>{if(o){let t=this.history.location.state.__TSR_index,n=lt(o,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);s.to=et(this.rewrite,r).pathname,s.search=this.options.parseSearch(n.search),s.hash=n.hash.slice(1)}let c=this.buildLocation({...s,_includeValidateSearch:!0});a&&(c._redirects=a),this._pendingLocation=c;let l=this.commitLocation({...c,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),l},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(d(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await tn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(ft(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&dt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=(e.options._builtLocation??this.buildLocation(e.options)).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&d(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=R,this.preloadRoute=e=>nn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=f(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!C(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?C(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??`fuzzy`,stringifySearch:t.stringifySearch??Ye,parseSearch:t.parseSearch??Je,protocolAllowlist:t.protocolAllowlist??ee}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=x(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:D(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?bt(this.options.notFoundMode,a):void 0,l=Array(a.length),u=this._committed,d=(e,t)=>{let n=u[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?u.find(t=>t.routeId===e.id):void 0},f;for(let n=0;n<a.length;n++){let i=a[n],o=l[n-1],u,m,h;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=vt(i.options.validateSearch,{...n})??void 0;u={...n,...e},m={...r,...e}}catch(e){let r=e;if(e instanceof gt||(r=new gt(e.message,{cause:e})),t?.throwOnError)throw r;u=n,m={},h=r}}let g=``,_=``;try{g=i.options.loaderDeps?.({search:u})??``,_=g&&JSON.stringify(g)||``}catch(e){if(t?.throwOnError)throw e;h??=e}let{interpolatedPath:v,usedParams:y}=c({path:i.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),b=i.id+v+_,x=d(i,n),S=this._cache.get(b)??(x?.id===b?x:void 0);f=S?._strictParams??Object.assign(y,f);let C;if(!S)try{St(i,f)}catch(e){if(C=F(e)||oe(e)?e:new _t(e.message,{cause:e}),t?.throwOnError)throw C}let w=x?`stay`:`enter`,T;if(S)T={...S,cause:w,search:p(x?x.search:S.search,u),_strictSearch:m,searchError:h};else{let e=dt(i)?`pending`:`success`;T={id:b,ssr:i.options.ssr,index:n,routeId:i.id,params:x?.params??f,_strictParams:f,pathname:v,updatedAt:Date.now(),search:x?p(x.search,u):u,_strictSearch:m,searchError:h,status:e,isFetching:!1,error:void 0,paramsError:C,context:{},abortController:t?._controller??new AbortController,cause:w,loaderDeps:x?te(x.loaderDeps,g):g,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let E=s===i.id;T._notFound&&!E&&(T.error=void 0),T._notFound=E,l[n]=T}for(let e=0;e<l.length;e++){let n=l[e];n.params=n.cause===`stay`?p(n.params,f):f,t?._controller&&(n.context={})}return l}matchRoutesLightweight(e){let t=ne(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=ne(a),c={...e.search};for(let e of a)try{Object.assign(c,vt(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=Object.assign(Object.create(null),o);for(let t of a)try{St(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}},gt=class extends Error{},_t=class extends Error{};function vt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new gt(`Async validation not supported`);if(n.issues)throw new gt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function yt(e,t,n,r){let i=[];for(let e of n){let t=e.options;`search`in t?t.search?.middlewares&&i.push(...t.search.middlewares):(t.preSearchFilters||t.postSearchFilters)&&i.push(({search:e,next:n})=>{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;n&&i.push(({search:e,next:t,meta:i})=>{let a=t(e);if(r)try{let e=vt(n,a);if(i&&e)for(let t in e)t in a||(i.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=v(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function bt(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return ie}function xt(e,t){return e===!1||e===null?Object.create(null):(e??!0)===!0?t:Object.assign(t,v(e,t))}function St(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Ct(e,t){return e.options[t]?.preload?.()}function wt(e,t){let n=Ct(e,`component`),r=Ct(e,`pendingComponent`),i=t&&r?r.then(t):r;return t&&!r&&t(),n&&i?Promise.all([n,i]).then(()=>{}):n??i}function R(e,t,n){let r=()=>t===!1?void 0:t?Ct(e,t):wt(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Tt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var z=0,B=1,Et=2,V=3,H=4;function U(e){return typeof e[0]==`number`}function W(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).finally(()=>t.removeEventListener(`abort`,i))})}function G(e,t){return e.routesById[t.routeId]}function Dt(e,t,n){return oe(e)?[V,e]:F(e)?(e.routeId||=n,[Et,e]):(t&&typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),t?[B,e]:[z,e])}function Ot(e,t){let n=Dt(t,!0,e.id);if(n[0]!==B)return n;try{e.options.onError?.(n[1])}catch(t){n=Dt(t,!0,e.id)}return n}function kt(e,t,n){return n[0].signal.aborted||!n[2]()?(n[0].abort(),[H]):Ot(e,t)}function At(e,t){return n=>e.navigate({...n,_fromLocation:t})}async function jt(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[4];for(let t=n[7]??0;t<r;t++){let r=s[t],i=G(e,r);r.abortController=n[0];let u=s[t-1]?.context??e.options.context??{},d={params:r.params,location:o,navigate:At(e,o),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:i.id},f=u;try{let e=r._ctx;!e&&i.options.context&&(e=r._ctx=i.options.context({...d,deps:r.loaderDeps,context:u})||{}),f={...u,...e},r.context=f}catch(a){return K(e,r),[t,kt(i,a,n)]}if(c.aborted||!n[2]())return n[0].abort(),[t,[H]];let p=r.paramsError??r.searchError;if(p!==void 0)return K(e,r),[t,kt(i,p,n)];let m=i.options.beforeLoad;if(!m)continue;let h={...d,search:r.search,context:f,...e.options.additionalContext},g=r.status;g===`success`&&t>=a&&(r.status=`pending`),n[8]?.();try{Pt(e,r,`beforeLoad`,n[0]);let a=await W(m(h),c);if(!n[2]())return n[0].abort(),[t,[H]];let o=Dt(a,!1,i.id);if(o[0]!==z)return K(e,r),[t,o];r.context={...f,...a}}catch(a){return K(e,r),[t,kt(i,a,n)]}finally{g===`success`&&r.status===`pending`&&(r.status=`success`),Pt(e,r,!1,n[0])}}i()}function Mt(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function K(e,t){let n=t._flight;t._flight=void 0,Mt(e,t,n)?.abort()}function q(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Mt(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Nt(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Pt(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Ft(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:At(e,s),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function It(e,t,n,r,i,a,o,s){let c=s.signal;if(c.aborted)return[H];if(!i)return[z,void 0];let l=n._flight;Pt(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Ft(e,t,n,r,s,a,o))).then(e=>Dt(e,!1,r.id),e=>Dt(e,!0,r.id)).then(t=>(t[0]!==z&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===B&&l[2]?Ot(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],await W(l[0],c)}catch(t){if(t!==c)throw t;return K(e,n),[H]}finally{Pt(e,n,!1,s)}}function Lt(e,t,n){t[0]===z?(e.loaderData=t[1],e.error=void 0,e.status=`success`,e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):t[0]!==V&&(e.status=`success`,e.error=void 0,e.invalid=!0)}function Rt(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&K(e,r)}function zt(e,t){return t[0]===B||t[0]===Et?{...e,status:t[0]===B?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Bt(e,t,n,r,i,a,o){let s=t[1][n],c=G(e,s),l=!!a[4],u=l?e._cache.get(s.id):void 0,d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Ft(e,t,s,c,a[0],i,l))),a[2]()||(a[0].abort(),p=[H])),!p)if(s.status!==`success`)f=!0;else{let t=a[4]||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[6]||s.cause===`enter`||a[3].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}catch(t){s.invalid=!0,K(e,s),p=kt(c,t,a)}let m=c.options.loader,h=typeof m==`function`?m:m?.handler,g=(!l||c.options.preload!==!1)&&m?e._flights?.get(s.id):void 0;g===s._flight||p?g=void 0:g&&!f&&!l&&d===void 0?f=!0:f||(g=void 0);let _=!!(m&&f&&s.status===`success`&&!l&&!a[5]&&((typeof m==`function`?void 0:m?.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),v=f&&(!l||c.options.preload!==!1),y=v&&!_&&(s.status!==`success`||!!m),b=c.lazyFn&&c._lazy!==!0?a[8]:void 0;if(v&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),g&&g[2]++,y){let t=s._flight;s._flight=g,Mt(e,s,t)?.abort(),s.status===`success`&&n>=o&&(s.status=`pending`),a[8]?.()}v||(s.isFetching=!1);let x=(p?Promise.resolve(p):y?It(e,t,s,c,h,i,l,a[0]):Promise.resolve([z,s.loaderData])).then(t=>(y&&(Lt(s,t,l),t[0]===z&&(l&&m&&!a[0].signal.aborted&&Rt(e,s,u),s.status=`pending`)),t)),S=W(Promise.resolve().then(()=>R(c,void 0,b)),a[0].signal).then(()=>void 0,e=>[n,kt(c,e,a)]).then(e=>x.then(t=>(y&&!e&&t[0]===z&&s.status===`pending`&&a[2]()&&(s.status=`success`,a[8]?.()),e)));if(r.push([n,x,S]),!_)return x.then(e=>zt(s,e));let C={...s,status:`pending`,preload:!1,_flight:g};s.invalid=!1,s.isFetching=`loader`;let w=It(e,t,C,c,h,i,!1,a[0]).then(e=>(s.isFetching=!1,Lt(C,e,!1),e));return(t[2]??=[]).push([n,w,S,C]),w.then(e=>zt(C,e))}async function Vt(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=G(e,t[n]),a=R(i,!1);if(a)try{await W(a,r)}catch(e){if(e===r)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function J(e,t){t[2]&&=(q(e,t[2].map(e=>e[3])),void 0)}async function Ht(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=V)throw[a,t];!i&&t[0]!==z&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===V)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}async function Ut(e,t,n,r,i,a,o){let s=t[1],c=await a,l=!1,u=s.findIndex(e=>e._notFound),d=t=>t[1][0]===Et?Vt(e,s,t,r.signal):t[0],f=u<0?s.length:u;if((c?.[1][0]??0)>=V)f=0;else if(c){f=c[2]??=await d(c);for(let e of n){if(e[0]>=f)break;let t=await e[1];if(t[0]!==z&&t[0]<V&&!(`loaderData`in s[e[0]])){c=[e[0],t],f=c[2]=await d(c);break}}}for(let e of n){if(e[0]>=f)break;let t=await e[2];if(t){c=t;break}}if((c?.[1][0]??0)>=V){let n=c[1];if(n[0]!==V||n[1].options.reloadDocument||i<20)return J(e,t),n;l=!0,c=[0,[B,Error(`Too many redirects`)]]}let p=c?c[2]??await d(c):u;if(p>=0){let i=c?.[1],a=i?.[0],u=s[p],d=i?.[1],f=()=>{i&&(u._notFound=void 0,a===B?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};f();let m=G(e,u);try{await W(i?Promise.resolve().then(()=>R(m,a===B?`errorComponent`:`notFoundComponent`)):Promise.all([R(m),R(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal)return J(e,t),[H]}i?l&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),J(e,t),q(e,s),f()):(u.status=`success`,o?.())}return t}async function Wt(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=G(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await W(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Gt(e,t,n,r){let i=[t,n],a=e.stores.matches.get(),o=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&o>=0){let t=await Vt(e,i[1],void 0,r[0].signal,o);t!==o&&(n[o]._notFound=void 0,n[t]._notFound=!0),o=t}let s=o<0?n.length:o+1,c=0;for(;c<s&&c!==o;){let e=n[c],t=r[3][c],i=a[c];if(t?.id!==e.id||t.status!==`success`||t._notFound||e.preload||i?.id!==e.id||i.status!==`success`||i._notFound)break;c++}let l=[],u=r[7]??0,d=u?Promise.resolve(i[1][u-1]):void 0,f=()=>{for(let t=u;t<s&&!r[0].signal.aborted;t++)d=Bt(e,i,t,l,d,r,c)},p=await jt(e,i,r,s,f,c);if(p&&(r[5]=!0,s=p[0],p[1][0]===Et?(p[2]=await Vt(e,i[1],p,r[0].signal),s=Math.min(s,p[2]+1)):p[1][0]>=V&&(s=0),f()),r[2]()&&!r[4]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let m;try{let t=Ut(e,i,l,r[0],r[1],Ht(l,p,i[2]),r[8]);i[2]?.length&&(i[3]=Ht(i[2],void 0,void 0,t.then(e=>U(e)?0:Tt(e[1]).length,()=>0))),m=await t}catch(t){throw J(e,i),t}return U(m)?m:Wt(e,m,r[0].signal,r[7]===m[1].length?r[7]:0)}function Kt(e,t){if(e._tx!==t)return;let n=e._pending,r=!1,i=n?.[0][3][n[1]]?.id;n?.[0]!==t&&(n&&t[3][n[1]]?.id===i?(n[0]=t,r=!0):(clearTimeout(n?.[3]),e._pending=n=void 0));let a=t[3],o=e.stores.matches.get(),s=-1,c,l,u,d=!1;for(let t=0;t<a.length;t++){let n=a[t],r=n.status===`success`;if(d=o[t]?.id===n.id&&o[t]?.status===`pending`,r&&!d)continue;let i=G(e,n);if(c=r&&d||n.invalid?0:i.options.pendingMs??e.options.defaultPendingMs,u=i.options.pendingComponent??e.options.defaultPendingComponent,!u||typeof c!=`number`||c===1/0)return;s=t,l=i.options.pendingMinMs??e.options.defaultPendingMinMs??0;break}if(s<0)return;let f=a[s].id;if((!n||n[1]!==s||i!==f)&&(clearTimeout(n?.[3]),e._pending=n=[t,s,d?Date.now()+l:t[4]+c,void 0,d?Promise.resolve(!0):void 0,u]),n[4]&&!r&&n[5]===u)return;if(n[5]=u,!n[4]){clearTimeout(n[3]);let r=n[2]-Date.now();if(r>0){n[3]=setTimeout(()=>Kt(e,t),r);return}n[2]=0}let p=a.map(e=>({...e,_flight:void 0}));p[s].status=`pending`;let m=e.startTransition(()=>e.stores.setMatches(p),p).then(t=>(t&&e._pending===n&&n[4]===m&&!n[2]&&(n[2]=Date.now()+l),t));n[4]=m}function qt(e,t){let n=e._pending;n?.[0]===t&&(clearTimeout(n[3]),e._pending=void 0)}function Jt(e,t){e._committed=t,e.stores.setMatches(t)}function Yt(e,t){q(e,t[1]),J(e,t)}function Xt(e,t,n,r){let i=e._committed,a=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=Tt(n).length,s=new Map,c=Date.now();for(let t of[...i,...a.values()]){if(t.status!==`success`||n.some((e,n)=>e.id===t.id&&(n<o||e.status===`success`)))continue;let r=G(e,t);!r.options.loader||c-t.updatedAt>=(t.preload?r.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:r.options.gcTime??e.options.defaultGcTime??3e5)||s.set(t.id,a.get(t.id)===t?t:{...t,_flight:void 0,isFetching:!1,context:{}})}t[3]=[],e._cache=s,Jt(e,n),q(e,[...a.values(),...i],[...n,...s.values()]),mt(e,i,n,()=>e._tx===t)}async function Y(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;n=e._tx}}async function Zt(e,t,n){await e.navigate({...n.options,replace:!0,ignoreBlocker:!0,_redirects:t[1]+1})}function Qt(e,t){qt(e,t),t[0].abort(),q(e,t[3]),t[3]=[],e._tx===t&&(e.batch(()=>{e.stores.status.set(`idle`),e.stores.setMatches(e._committed)}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0))}async function $t(e,t,n,r,i){let a=n.map(e=>({...e}));Nt(a);for(let t of r)K(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Ut(e,o,r,t[0],t[1],i)}catch(t){throw q(e,a),t}if(U(s)){q(e,a),s[0]===V&&e._tx===t&&e._committed===n&&await Zt(e,t,s[1]);return}let c=await Wt(e,s,t[0].signal);if(e._tx!==t||e._committed!==n){q(e,c[1]);return}for(let t of c[1]){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),K(e,n))}Jt(e,c[1]),q(e,n,c[1])}async function en(e,t,n,r,i,a){let o=[t[0],t[1],()=>e._tx===t&&!!t[3].length,e._committed,void 0,i,n,a,r],s=await Gt(e,t[2],t[3],o);if(U(s)){s[0]===V&&e._tx===t?(qt(e,t),q(e,t[3]),t[3]=[],e._tx===t&&await Zt(e,t,s[1])):Qt(e,t);return}let c=e._pending;if(c?.[0]===t&&(clearTimeout(c[3]),c[4])){let n=t[0].signal,r=!1;try{r=await W(c[4],n)}catch(e){if(e!==n)throw e}if(r&&e._pending===c&&c[0]===t){let e=c[2]-Date.now();if(e>0){try{await W(new Promise(t=>{c[3]=setTimeout(t,e)}),n)}catch{}clearTimeout(c[3])}}}if(e._tx!==t){qt(e,t),Yt(e,s);return}let l=t[2],u=ft(l,e.stores.resolvedLocation.get()),d=s[2];await e.startViewTransition(async()=>{if(e._tx!==t){Yt(e,s);return}let n=await e.startTransition(()=>{qt(e,t),Xt(e,t,s[1],a),e._tx===t&&(e.emit({type:`onLoad`,...u}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...u}))},s[1]);if(e._tx!==t){J(e,s);return}d?.length&&$t(e,t,s[1],d,s[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(l),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...u}),n&&e._tx===t&&e.emit({type:`onRendered`,...u})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function tn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),u.signal.aborted){await Y(e,n);return}let f=ft(a,r);if(e.emit({type:`onBeforeNavigate`,...f}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...f}),u.signal.aborted){await Y(e,n);return}let p=i.href===a.href,m,h=u;try{m=e.matchRoutes(a,{_controller:u}),Nt(m)}catch(t){if(u.abort(),!oe(t)){await Y(e),e._commitPromise?.resolve(),e._commitPromise=void 0;return}await e.navigate({...t.options,replace:!0,ignoreBlocker:!0}),await Y(e,n);return}let g=l?c[1](m):void 0;if(g?h=l:l?.abort(),u.signal.aborted){q(e,m),await Y(e,n);return}e._preflight=void 0;let _=[h,s,a,m,Date.now(),Promise.resolve().then(()=>en(e,_,p,()=>Kt(e,_),t?.sync,g)).catch(()=>{e._tx===_&&Qt(e,_)})];if(e._tx=_,n){for(let t of e.stores.matches.get()){if(e._tx!==_)break;t.isFetching&&Pt(e,t,!1)}n[0].abort(),q(e,n[3],_[3],!0)}if(e._tx!==_){q(e,_[3]),_[3]=[],await Y(e,_);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),!r&&!m.some(e=>e._notFound)&&Kt(e,_);try{await _[5]}finally{await Y(e,_)}}async function nn(e,t,n=0){if(n>20)return;let r=t._builtLocation??e.buildLocation(t),i=e._committed,a=new AbortController,o;try{o=e.matchRoutes(r,{_controller:a}),Nt(o)}catch(e){a.abort(),F(e)||console.error(e);return}(e._preloads??=new Map).set(a,o);let s;try{let t;try{t=await Gt(e,r,o,[a,n,()=>!0,i,!0])}finally{s=e._preloads.delete(a),q(e,o),a.abort()}if(!U(t))return t[1];if(s&&t[0]===V&&!t[1].options.reloadDocument)return nn(e,{...t[1].options,_fromLocation:r},n+1)}catch(e){F(e)||console.error(e)}}function rn(e){return N(an,{...e})}var an=class extends M.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?M.createElement(this.props.errorComponent??on,{error:e,reset:this.reset}):this.props.children}};function on({error:e}){let[t,n]=M.useState(!1);return P(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[P(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[N(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),N(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),N(`div`,{style:{height:`.25rem`}}),t?N(`div`,{children:N(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?N(`code`,{children:e.message}):null})}):null]})}var X=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(X||{});function sn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function cn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var ln=[],un=0,{link:dn,unlink:fn,propagate:pn,checkDirty:mn,shallowPropagate:hn}=sn({update(e){return e._update()},notify(e){ln[_n++]=e,e.flags&=~X.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=X.Mutable|X.Dirty,bn(e))}}),gn=0,_n=0,Z,vn=0;function yn(e){try{++vn,e()}finally{--vn||xn()}}function bn(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=fn(n,e)}function xn(){if(!(vn>0)){for(;gn<_n;){let e=ln[gn];ln[gn++]=void 0,e.notify()}gn=0,_n=0}}function Sn(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?X.None:X.Mutable,get(){return Z!==void 0&&dn(i,Z,un),i._snapshot},subscribe(e){let t=cn(e),n={current:!1},r=Cn(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Z,o=t?.compare??Object.is;if(n)Z=i,++un,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=X.Mutable|X.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Z=a,n&&(i.flags&=~X.RecursedCheck),bn(i)}}};return n?(i.flags=X.Mutable|X.Dirty,i.get=function(){let e=i.flags;if(e&X.Dirty||e&X.Pending&&mn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&hn(e)}}else e&X.Pending&&(i.flags=e&~X.Pending);return Z!==void 0&&dn(i,Z,un),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(pn(e),hn(e),xn())}},i}function Cn(e){let t=()=>{let t=Z;Z=n,++un,n.depsTail=void 0,n.flags=X.Watching|X.RecursedCheck;try{return e()}finally{Z=t,n.flags&=~X.RecursedCheck,bn(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:X.Watching|X.RecursedCheck,notify(){let e=this.flags;e&X.Dirty||e&X.Pending&&mn(this.deps,this)?t():this.flags=X.Watching},stop(){this.flags=X.None,this.depsTail=void 0,bn(this)}};return t(),n}function wn(e){let t=j(),n=`not-found-${r(t.stores.location,e=>e.pathname)}-${r(t.stores.status,e=>e)}`;return N(rn,{getResetKey:()=>n,onCatch:(t,n)=>{if(F(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(F(t))return e.fallback?.(t);throw t},children:e.children})}function Tn(){return N(`p`,{children:`Not Found`})}function Q(e){return N(Oe,{children:e.children})}function En(e,t,n){return t.options.notFoundComponent?N(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?N(e.options.defaultNotFoundComponent,{...n}):N(Tn,{})}function Dn(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?N(n,{}):null}var On=(e,t)=>e[0]===t[0]&&e[1]===t[1],kn=M.memo(function({routeId:e}){let t=j();return N(An,{router:t,match:r(t.stores.getMatchStore(e),e=>e)})});function An({router:e,match:t}){let n=e.routesById[t.routeId],r=Dn(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)?M.Suspense:Q,l=i?rn:Q,u=o?wn:Q;return P(n.isRoot?n.options.shellComponent??Q:Q,{children:[N(re.Provider,{value:t.routeId,children:N(c,{fallback:r,children:N(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(F(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:N(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return M.createElement(o,e)},children:s?N(w,{fallback:r,children:N(jn,{match:t})}):N(jn,{match:t})})})})}),null]})}var jn=M.memo(function({match:e}){let t=j(),n=e.routeId,r=t.routesById[n],i=M.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=M.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?N(e,{},i):N(Mn,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t._tx)throw t._tx[5];return Dn(t,r)}if(e.status===`notFound`)return En(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Mn=M.memo(function(){let e=j(),t=M.useContext(re),n,i,a;{let o=e.stores.getMatchStore(t);[n,i]=r(o,e=>[!!e._notFound,e.error],On),a=r(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return En(e,e.routesById[t],i);if(!a)return null;let o=N(kn,{routeId:a});return t===`__root__`?N(M.Suspense,{fallback:Dn(e),children:o}):o});function Nn(e,t){let n=e[1];e.length=0,n?.(t)}function Pn({t:e}){let n=j(),r=n._rendered??=[];return n.startTransition=(t,i)=>new Promise((a,o)=>{Nn(r,!1),r.push(i,a),e(n),M.startTransition(()=>{try{t()}catch(e){r[1]===a&&(r.length=0),o(e)}})}),t(()=>{let e=n.history.subscribe(n.load);n.updateLatestLocation();let t=n.latestLocation,i=n.buildLocation({to:t.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(D(t.publicHref)!==D(i.publicHref))return n.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=n.stores.resolvedLocation.get();return a?.href===t.href&&a.state.__TSR_key===t.state.__TSR_key?r.push(n.stores.matches.get(),e=>{e&&n.emit({type:`onRendered`,...ft(a,a)})}):n._tx||n.load().catch(console.error),e},[n,n.history]),null}function Fn(){let e=j(),t=e.routesById[ie],n=Dn(e,t),r=e.ssr?Q:M.Suspense,i=P(Oe,{children:[N(Pn,{t:M.useState()[1]}),N(r,{fallback:n,children:N(In,{})})]});return e.options.InnerWrap?N(e.options.InnerWrap,{children:i}):i}function In(){let e=j(),n=e._rendered,i=r(e.stores.matches,e=>n[0]??e),a=i[0],o=a?.routeId;t(()=>{n[0]===i&&Nn(n,!0)},[n,i]);let s=o?N(kn,{routeId:o}):null;return N(re.Provider,{value:o,children:e.options.disableGlobalCatchBoundary?s:N(rn,{getResetKey:()=>a,onCatch:void 0,children:s})})}var Ln=e=>({createMutableStore:Sn,createReadonlyStore:Sn,batch:yn}),Rn=e=>new zn(e),zn=class extends ht{constructor(e){super(e,Ln)}};function Bn({router:e,children:t,...n}){_(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=N(ce.Provider,{value:e,children:t});return e.options.Wrap?N(e.options.Wrap,{children:r}):r}function Vn({router:e,...t}){return N(Bn,{router:e,...t,children:N(Fn,{})})}var Hn=Ae.div`
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
min-height: 100vh;
|
|
7
|
-
padding: ${({theme:e})=>e.space(4)};
|
|
8
|
-
text-align: center;
|
|
9
|
-
`,Un=Ae.p`
|
|
10
|
-
font-size: 13px;
|
|
11
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
12
|
-
max-width: 48ch;
|
|
13
|
-
`,Wn=ae()({component:Mn,notFoundComponent:()=>N(Hn,{children:P(le,{$gap:3,style:{alignItems:`center`},children:[N(de,{children:`Not found`}),N(Un,{children:`This console has no screen at that address.`}),N(ue,{as:`a`,href:`/`,$variant:`primary`,$size:`sm`,children:`Back to the rack`})]})})});async function Gn(e){return e.queryClient.ensureQueryData({queryKey:s.status,queryFn:()=>pe(`/api/status`),revalidateIfStale:!0})}function Kn(e){let t=e.principal;return e.authenticated!==!0||t==null?`/login`:t.kind===`client`?`/client`:t.kind===`admin`||t.kind===`viewer`?`/`:`/login`}function qn(e,t){let n=Kn(e);if(n===`/login`)throw se({to:`/login`,search:{next:t}});if(n!==`/`)throw se({to:n})}function Jn(e,t){let n=Kn(e);if(n===`/login`)throw se({to:`/login`,search:{next:t}});if(n!==`/client`)throw se({to:n})}var Yn=k(`/_app`)({beforeLoad:async({context:e,location:t})=>{qn(await Gn(e),t.href),await e.queryClient.ensureQueryData(o)},pendingComponent:Xn,pendingMs:200,errorComponent:O(()=>A(()=>import(`./_app-BWNEo1e-.js`),__vite__mapDeps([0,1])),`errorComponent`),component:Zn});function Xn(){return N(he,{legend:`Console`,children:N(fe,{rows:6})})}function Zn(){let e=n().data??[];return N(be,{children:P(ye,{children:[N(ge,{$providers:e}),N(_e,{children:N(Mn,{})})]})})}var Qn=k(`/client`)({beforeLoad:async({context:e,location:t})=>{Jn(await Gn(e),t.href)},component:O(()=>A(()=>import(`./client-CZnyYbay.js`),__vite__mapDeps([2,3,4,1,5,6,7,8,9,10,11,12,13,14,15,16])),`component`)}),$n=k(`/_app/`)({component:O(()=>A(()=>import(`./_app.index-CyxnfhVX.js`),__vite__mapDeps([17,4,1,5,13,14,9,10,16])),`component`)}),er=k(`/_app/accounts`)({component:O(()=>A(()=>import(`./_app.accounts-CLLLwN77.js`),__vite__mapDeps([18,4,1,5,19,6,20,21,22,14,8,9,10,11,3])),`component`)}),tr=k(`/_app/console`)({component:O(()=>A(()=>import(`./_app.console-Dr9qxU7J.js`),__vite__mapDeps([23,4,1,5,7,8])),`component`)}),nr=k(`/_app/database`)({component:O(()=>A(()=>import(`./_app.database-D0W0pcxC.js`),__vite__mapDeps([24,4,1,5,8,9,10,16,25])),`component`)}),rr=k(`/_app/keys`)({component:O(()=>A(()=>import(`./_app.keys-D9qmw9Tj.js`),__vite__mapDeps([26,4,1,5,19,6,20,22,14,8,9,10])),`component`)}),ir=k(`/_app/logs`)({component:O(()=>A(()=>import(`./_app.logs-DtXUZETW.js`),__vite__mapDeps([27,4,1,5,14,8,12,13,10])),`component`)}),ar=k(`/_app/models`)({component:O(()=>A(()=>import(`./_app.models-CNxwXyFl.js`),__vite__mapDeps([28,4,1,5,20,21,22,14,8,9])),`component`)}),or=k(`/_app/settings`)({component:O(()=>A(()=>import(`./_app.settings-DjiMSl1Y.js`),__vite__mapDeps([29,4,1,5,22,8,9,25])),`component`)}),sr=k(`/_app/usage`)({component:O(()=>A(()=>import(`./_app.usage-CZz9raYR.js`),__vite__mapDeps([30,3,4,1,5,10,15,16])),`component`)}),$=Yn.update({id:`/_app`,getParentRoute:()=>Wn}),cr=Qn.update({id:`/client`,path:`/client`,getParentRoute:()=>Wn}),lr=xe.update({id:`/login`,path:`/login`,getParentRoute:()=>Wn}),ur=$n.update({id:`/`,path:`/`,getParentRoute:()=>$}),dr={AppAccountsRoute:er.update({id:`/accounts`,path:`/accounts`,getParentRoute:()=>$}),AppConsoleRoute:tr.update({id:`/console`,path:`/console`,getParentRoute:()=>$}),AppDatabaseRoute:nr.update({id:`/database`,path:`/database`,getParentRoute:()=>$}),AppKeysRoute:rr.update({id:`/keys`,path:`/keys`,getParentRoute:()=>$}),AppLogsRoute:ir.update({id:`/logs`,path:`/logs`,getParentRoute:()=>$}),AppModelsRoute:ar.update({id:`/models`,path:`/models`,getParentRoute:()=>$}),AppSettingsRoute:or.update({id:`/settings`,path:`/settings`,getParentRoute:()=>$}),AppUsageRoute:sr.update({id:`/usage`,path:`/usage`,getParentRoute:()=>$}),AppIndexRoute:ur,AppPluginsPluginIdRoute:Se.update({id:`/plugins/$pluginId`,path:`/plugins/$pluginId`,getParentRoute:()=>$})},fr={AppRoute:$._addFileChildren(dr),ClientRoute:cr,LoginRoute:lr},pr=Wn._addFileChildren(fr)._addFileTypes();function mr(e){return{isLoginRoute:()=>e().state.location.pathname===`/login`,onUnauthenticated:()=>void e().navigate({to:`/login`,search:{next:e().state.location.href}})}}function hr(e){let t=t=>{!(t instanceof me)||!t.isUnauthenticated||e.isLoginRoute()||e.onUnauthenticated()};return new Te({queryCache:new we({onError:t}),mutationCache:new Ce({onError:t}),defaultOptions:{queries:{retry:(e,t)=>t instanceof me&&t.isUnauthenticated?!1:e<2,staleTime:5e3,refetchOnWindowFocus:!0},mutations:{retry:!1}}})}var gr,_r=hr(mr(()=>gr));gr=Rn({routeTree:pr,context:{queryClient:_r}});var vr=document.getElementById(`root`);if(vr===null)throw Error(`#root is missing from index.html`);ke(vr).render(N(De,{children:N(ve,{children:N(Ee,{client:_r,children:N(Vn,{router:gr})})})}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./Rack-D798XvPQ.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|