omnigateway 0.9.0 → 0.9.2
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 +89 -608
- package/bin/omni.js +6347 -2002
- package/gateway.js +7642 -2632
- package/package.json +1 -1
- package/public/assets/{Chip-shturdCv.js → Chip-Did4Zhvj.js} +1 -1
- package/public/assets/{CopyValue-BGt9RRTL.js → CopyValue-Cjg9QXrD.js} +1 -1
- package/public/assets/Lamp-C2Q3t5Mn.js +25 -0
- package/public/assets/Rack-D0_N-xsd.js +476 -0
- package/public/assets/{RequestTable-huSAoNZg.js → RequestTable-i9paP_7e.js} +1 -1
- package/public/assets/{SummaryDeck-BPo2bMSC.js → SummaryDeck-g4yLDeXB.js} +1 -1
- package/public/assets/{Toggle-C84xs_YB.js → Toggle-D-NDlneh.js} +1 -1
- package/public/assets/{TokenBreakdown-CmzXuENj.js → TokenBreakdown-D5ZIngM6.js} +1 -1
- package/public/assets/{WindowChart-BZzVrxYk.js → WindowChart-BsonO5Py.js} +1 -1
- package/public/assets/{_app.accounts-DMmtkwnl.js → _app.accounts-DFhyE62a.js} +1 -1
- package/public/assets/{_app.console-BBz3kCPV.js → _app.console-BfHcfQMp.js} +6 -6
- package/public/assets/{_app.database-ZvtMVgsh.js → _app.database-Cgw9z3rK.js} +1 -1
- package/public/assets/{_app.index-DKouD-rz.js → _app.index-Blw3S4-3.js} +1 -1
- package/public/assets/{_app.keys-BG9-zfh6.js → _app.keys-DrdfnfIk.js} +1 -1
- package/public/assets/{_app.logs-DjinYGYS.js → _app.logs-DUOqlJzB.js} +1 -1
- package/public/assets/{_app.models-BCfQVuoT.js → _app.models-Dm83HRaM.js} +1 -1
- package/public/assets/{_app.plugins._pluginId-Dm48f3wz.js → _app.plugins._pluginId-BmJGDYxw.js} +1 -1
- package/public/assets/{_app.settings-C42ylcNP.js → _app.settings-66rm4vHJ.js} +1 -1
- package/public/assets/{_app.usage-DfPM6eQ-.js → _app.usage-BCufy5XR.js} +1 -1
- package/public/assets/{chevron-right-HI_fK6Gw.js → chevron-right-BZ4QmUDM.js} +1 -1
- package/public/assets/{client-TUf0nuim.js → client-De1_cEH5.js} +1 -1
- package/public/assets/index-PP8vsvw3.js +13 -0
- package/public/assets/{login-w-hVstKf.js → login-CkZlwcdd.js} +1 -1
- package/public/assets/plus-D5AwIXj3.js +1 -0
- package/public/assets/preload-helper-BC9bKUg1.js +1 -0
- package/public/assets/shared-C47BfV_u.js +77 -0
- package/public/assets/{trash-2-Bq4GaXzx.js → trash-2-BLc5o7DN.js} +1 -1
- package/public/index.html +4 -7
- package/public/shared/chunks/{react-dom-BTlfKTOo.js → react-dom-BFxyned6.js} +1 -1
- package/public/shared/dashboard-sdk.js +1 -1
- package/public/shared/react-dom-client.js +3 -3
- package/public/shared/react-dom.js +1 -1
- package/public/shared/react-query.js +1 -1
- package/public/shared/styled-components.js +2 -2
- package/public/assets/Lamp-CVGUT2YK.js +0 -25
- package/public/assets/Rack-BbZyyu2u.js +0 -466
- package/public/assets/_app.plugins._pluginId-B9k5eqAt.js +0 -2
- package/public/assets/index-C66Zn0tX.js +0 -13
- package/public/assets/login-DWgivEPK.js +0 -2
- package/public/assets/plus-BCf2TPqz.js +0 -1
- package/public/assets/preload-helper-Unv7FI91.js +0 -1
- package/public/assets/shared-XRnr7At9.js +0 -77
- package/public/assets/stream-3PafhwhZ.js +0 -1
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_app-CWXzHdhc.js","assets/Panel-BlNr9j6-.js","assets/client-TUf0nuim.js","assets/shared-XRnr7At9.js","assets/Lamp-CVGUT2YK.js","assets/Rack-BbZyyu2u.js","assets/chevron-right-HI_fK6Gw.js","assets/stream-3PafhwhZ.js","assets/Field-DcNu4yw-.js","assets/Meter-stpt3vQu.js","assets/Table-CVDZ69Zx.js","assets/WindowChart-BZzVrxYk.js","assets/RequestTable-huSAoNZg.js","assets/TokenBreakdown-CmzXuENj.js","assets/Chip-shturdCv.js","assets/SummaryDeck-BPo2bMSC.js","assets/Readout-D8Ofl3Gz.js","assets/_app.index-DKouD-rz.js","assets/_app.accounts-DMmtkwnl.js","assets/CopyValue-BGt9RRTL.js","assets/plus-BCf2TPqz.js","assets/trash-2-Bq4GaXzx.js","assets/Toggle-C84xs_YB.js","assets/_app.console-BBz3kCPV.js","assets/_app.database-ZvtMVgsh.js","assets/reasons-Du1OBWAM.js","assets/_app.keys-BG9-zfh6.js","assets/_app.logs-DjinYGYS.js","assets/_app.models-BCfQVuoT.js","assets/_app.settings-C42ylcNP.js","assets/_app.usage-DfPM6eQ-.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$t as e,Cn as t,Qt as n,Sn as r,Tn as i,Tt as a,V as o,W as s,Xt as c,Yt as l,Zt as u,_n as d,an as f,cn as p,en as m,fn as h,gn as g,hn as _,in as v,ln as y,mn as b,on as x,pn as S,qt as C,rn as w,sn as T,tn as E,un as D,vn as ee,xn as O,yn as te}from"./Lamp-CVGUT2YK.js";import{a as ne,c as re,i as ie,n as k,o as ae,r as A,s as oe,t as j}from"./preload-helper-Unv7FI91.js";import{A as se,C as ce,D as le,_ as ue,a as de,k as M,l as fe,s as pe,t as me}from"./Panel-BlNr9j6-.js";import{h as he,n as ge,p as _e}from"./Rack-BbZyyu2u.js";import{n as ve,t as ye}from"./stream-3PafhwhZ.js";import{t as be}from"./login-DWgivEPK.js";import{t as xe}from"./_app.plugins._pluginId-B9k5eqAt.js";import{MutationCache as Se,QueryCache as Ce,QueryClient as we,QueryClientProvider as Te}from"@tanstack/react-query";import*as N from"react";import{StrictMode as Ee}from"react";import{Fragment as De,jsx as P,jsxs as F}from"react/jsx-runtime";import{createRoot as Oe}from"react-dom/client";import ke 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 I(e){return e?.isNotFound===!0}function Ae(){try{return sessionStorage}catch{return}}var je=`tsr-scroll-restoration-v1_3`,Me=Ae();function Ne(){try{return JSON.parse(Me?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Pe(){try{Me?.setItem(je,JSON.stringify(L))}catch{}}var L=Ne(),Fe=`data-scroll-restoration-id`,Ie=e=>e.state.__TSR_key||e.href;function Le(e){let t=e.getAttribute(Fe);if(t)return`[${Fe}="${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 Re=!1,ze=`window`;function Be(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ve(e){let t=new Set;for(let n of e){if(n===ze)continue;let e=Be(n);e&&t.add(e)}return t}function He(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Ie,a=new Set,o=e=>{let t=L[e]||={};for(let e of a)e===document?t[ze]={scrollX,scrollY}:e.isConnected&&(t[Le(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Re=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Re||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())),Pe()})),!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=L[d];if(e){let t=L[u];for(let n in e){if(n===ze){if(s)continue}else{let e=Be(n);if(!e||s&&o&&(l??=Ve(o),l.has(e)))continue}t||=L[u]={},t[n]??=e[n]}}}Re=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Ve(o));let t=e&&i&&c,s=r.restoring?L[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===ze){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Be(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{Re=!1}}))}function Ue(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 We(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ge(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]=We(r):Array.isArray(t)?t.push(We(r)):n[e]=[t,We(r)]}return n}var Ke=/^(?:\s|["[{\d-]|fa|nu|tr)/,qe=Ye(JSON.parse),Je=Xe(JSON.stringify,JSON.parse);function Ye(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ge(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Xe(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&&!Ke.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Ue(e,r);return t?`?${t}`:``}}function Ze(e){return{input:({url:t})=>{for(let n of e)t=$e(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=et(e[n],t);return t}}}function Qe(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:t})=>(t.pathname=e([`/`,n,t.pathname]),t)}}function $e(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 et(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 tt(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(()=>{S(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 R=`__TSR_index`,nt=`popstate`,rt=`beforeunload`;function it(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=ct(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[R];i=at(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[R];i=at(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[R]!==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 at(e,t){t||={};let n=lt();return{...t,key:n,__TSR_key:n,[R]:e}}function ot(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??(()=>ct(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=lt();t.history.replaceState({[R]: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=ct(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[R]-l.state[R],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=it({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(rt,x,{capture:!0}),t.removeEventListener(nt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(rt,x,{capture:!0}),t.addEventListener(nt,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 st(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function ct(e,t){let n=st(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=lt();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||{[R]:0,key:a,__TSR_key:a}}}function lt(){return(Math.random()+1).toString(36).substring(7)}function ut(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function dt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function ft({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function pt(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 mt=class{constructor(e,i){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=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=u(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:ot()),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=D(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=tt(this.latestLocation,e),He(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=E(a);t&&t!==`/`&&e.push(Qe({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Ze(e),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=y(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&p(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,n)=>{let i=({pathname:e,search:i,hash:a,href:o,state:s})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let o=this.options.parseSearch(i),c=this.options.stringifySearch(o);return{href:e+c+a,publicHref:e+c+a,pathname:b(e).path,external:!1,searchStr:c,search:r(n?.search,o),hash:b(a.slice(1)).path,state:t(n?.state,s)}}let c=new URL(o,this.origin),l=$e(this.rewrite,c),u=this.options.parseSearch(l.search),d=this.options.stringifySearch(u);return l.search=d,{href:l.href.replace(l.origin,``),publicHref:o,pathname:b(l.pathname).path,external:!!this.rewrite&&l.origin!==this.origin,searchStr:d,search:r(n?.search,u),hash:b(l.hash.slice(1)).path,state:t(n?.state,s)}},a=i(e),{__tempLocation:o,__tempKey:s}=a.state;if(o&&(!s||s===this.tempLocationKey)){let e=i(o);return e.state.key=a.state.key,e.state.__TSR_key=a.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:a}}return a},this.resolvePathWithBase=(e,t)=>m({base:e,to:t.includes(`//`)?c(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=x(w(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let i=(i={})=>{let a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;let s=i.unsafeRelative===`path`?a.pathname:i.from??o[1],c=i.to?`${i.to}`:void 0,l=o[2],u=Object.assign(Object.create(null),o[3]),f=c?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(s,`.`),p=c?this.resolvePathWithBase(f,c):f,m=bt(i.params,u),h=this.routesByPath[w(p)],_;if(h)_=this.getRouteBranch(h);else if(p.includes(`$`))_=[];else{let[e,t,n]=this.getMatchedRoutes(p);_=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(_=[..._,this.options.notFoundRoute])}if(_.length&&ee(m))for(let e of _){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(m,t(m))}catch{}}let v=e.leaveParams?p:b(n({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,y=l;if(e._includeValidateSearch&&this.options.search?.strict){let e={};_.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,_t(t.options.validateSearch,{...e,...y}))}catch{}}),y=e}y=vt(y,i,_,e._includeValidateSearch),y=r(l,y);let x=this.options.stringifySearch(y),S=i.hash===!0?a.hash:i.hash?d(i.hash,a.hash):void 0,C=S?`#${S}`:``,T=i.state===!0?a.state:i.state?d(i.state,a.state):{};T=t(a.state,T);let E=`${v}${x}${C}`,D,O,te=!1;if(this.rewrite){let e=new URL(E,this.origin),t=et(this.rewrite,e);D=e.href.replace(e.origin,``),t.origin===this.origin?O=t.pathname+t.search+t.hash:(O=t.href,te=!0)}else D=g(E),O=D;return{publicHref:O,href:D,pathname:v,search:y,searchStr:x,state:T,hash:S??``,external:te,unmaskOnReload:i.unmaskOnReload}},a=(t={},n)=>{let r=i(t),a=n?i(n):void 0;if(!a){let t=Object.create(null);if(this.options.routeMasks){let o=f(r.pathname,this.processedTree);if(o){Object.assign(t,o.rawParams);let{from:r,params:s,...c}=o.route,l=bt(s,t);n={from:e.from,...c,params:l},a=i(n)}}}return a&&(r.maskedLocation=a),r};return e.mask?a(e,{from:e.from,...e.mask}):a(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=w(this.latestLocation.href)===w(n.href)&&_(ft(n.state),ft(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=ct(o,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);s.to=$e(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(te(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(dt(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`)&&ut(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&&te(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=z,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=T(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!_(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?_(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=i,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Je,parseSearch:e.parseSearch??qe,protocolAllowlist:e.protocolAllowlist??h}),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=v(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,i){let[a,o,s]=this.getMatchedRoutes(e.pathname),c=a,l=!1;(s?s.path!==`/`&&o[`**`]:w(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:l=!0);let u=l?yt(this.options.notFoundMode,c):void 0,d=Array(c.length),f=this._committed,p=(e,t)=>{let n=f[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?f.find(t=>t.routeId===e.id):void 0},m;for(let a=0;a<c.length;a++){let s=c[a],l=d[a-1],f,h,g;{let t=l?.search??e.search,n=l?._strictSearch??void 0;try{let e=_t(s.options.validateSearch,{...t})??void 0;f={...t,...e},h={...n,...e}}catch(e){let n=e;if(e instanceof ht||(n=new ht(e.message,{cause:e})),i?.throwOnError)throw n;f=t,h={},g=n}}let _=``,v=``;try{_=s.options.loaderDeps?.({search:f})??``,v=_&&JSON.stringify(_)||``}catch(e){if(i?.throwOnError)throw e;g??=e}let{interpolatedPath:y,usedParams:b}=n({path:s.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),x=s.id+y+v,S=p(s,a),C=this._cache.get(x)??(S?.id===x?S:void 0);m=C?._strictParams??Object.assign(b,m);let w;if(!C)try{xt(s,m)}catch(e){if(w=I(e)||ae(e)?e:new gt(e.message,{cause:e}),i?.throwOnError)throw w}let T=S?`stay`:`enter`,E;if(C)E={...C,cause:T,search:r(S?S.search:C.search,f),_strictSearch:h,searchError:g};else{let e=ut(s)?`pending`:`success`;E={id:x,ssr:s.options.ssr,index:a,routeId:s.id,params:S?.params??m,_strictParams:m,pathname:y,updatedAt:Date.now(),search:S?r(S.search,f):f,_strictSearch:h,searchError:g,status:e,isFetching:!1,error:void 0,paramsError:w,context:{},abortController:i?._controller??new AbortController,cause:T,loaderDeps:S?t(S.loaderDeps,_):_,invalid:!1,preload:!1,staticData:s.options.staticData||{},fullPath:s.fullPath}}let D=u===s.id;E._notFound&&!D&&(E.error=void 0),E._notFound=D,d[a]=E}for(let e=0;e<d.length;e++){let t=d[e];t.params=t.cause===`stay`?r(t.params,m):m,i?._controller&&(t.context={})}return d}matchRoutesLightweight(e){let t=O(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=O(a),c={...e.search};for(let e of a)try{Object.assign(c,_t(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{xt(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}},ht=class extends Error{},gt=class extends Error{};function _t(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new ht(`Async validation not supported`);if(n.issues)throw new ht(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 vt(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=_t(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=d(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 yt(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 re}function bt(e,t){return e===!1||e===null?Object.create(null):(e??!0)===!0?t:Object.assign(t,d(e,t))}function xt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function St(e,t){return e.options[t]?.preload?.()}function Ct(e,t){let n=St(e,`component`),r=St(e,`pendingComponent`),i=t&&r?r.then(t):r;return t&&!r&&t(),n&&i?Promise.all([n,i]).then(()=>{}):n??i}function z(e,t,n){let r=()=>t===!1?void 0:t?St(e,t):Ct(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 wt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var B=0,V=1,Tt=2,H=3,U=4;function Et(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 ae(e)?[H,e]:I(e)?(e.routeId||=n,[Tt,e]):(t&&typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),t?[V,e]:[B,e])}function Ot(e,t){let n=Dt(t,!0,e.id);if(n[0]!==V)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(),[U]):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,[U]];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,[U]];let o=Dt(a,!1,i.id);if(o[0]!==B)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[U];if(!i)return[B,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]!==B&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===V&&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),[U]}finally{Pt(e,n,!1,s)}}function Lt(e,t,n){t[0]===B?(e.loaderData=t[1],e.error=void 0,e.status=`success`,e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):t[0]!==H&&(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]===V||t[0]===Tt?{...e,status:t[0]===V?`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=[U])),!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([B,s.loaderData])).then(t=>(y&&(Lt(s,t,l),t[0]===B&&(l&&m&&!a[0].signal.aborted&&Rt(e,s,u),s.status=`pending`)),t)),S=W(Promise.resolve().then(()=>z(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]===B&&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=z(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]>=H)throw[a,t];!i&&t[0]!==B&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===H)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]===Tt?Vt(e,s,t,r.signal):t[0],f=u<0?s.length:u;if((c?.[1][0]??0)>=H)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]!==B&&t[0]<H&&!(`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)>=H){let n=c[1];if(n[0]!==H||n[1].options.reloadDocument||i<20)return J(e,t),n;l=!0,c=[0,[V,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===V?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(()=>z(m,a===V?`errorComponent`:`notFoundComponent`)):Promise.all([z(m),z(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal)return J(e,t),[U]}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]===Tt?(p[2]=await Vt(e,i[1],p,r[0].signal),s=Math.min(s,p[2]+1)):p[1][0]>=H&&(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=>Et(e)?0:wt(e[1]).length,()=>0))),m=await t}catch(t){throw J(e,i),t}return Et(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=wt(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()]),pt(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(Et(s)){q(e,a),s[0]===H&&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(Et(s)){s[0]===H&&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=dt(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=dt(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(),!ae(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(),I(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(!Et(t))return t[1];if(s&&t[0]===H&&!t[1].options.reloadDocument)return nn(e,{...t[1].options,_fromLocation:r},n+1)}catch(e){I(e)||console.error(e)}}function rn(e){return P(an,{...e})}var an=class extends N.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?N.createElement(this.props.errorComponent??on,{error:e,reset:this.reset}):this.props.children}};function on({error:e}){let[t,n]=N.useState(!1);return F(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[F(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[P(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),P(`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`})]}),P(`div`,{style:{height:`.25rem`}}),t?P(`div`,{children:P(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?P(`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=M(),n=`not-found-${C(t.stores.location,e=>e.pathname)}-${C(t.stores.status,e=>e)}`;return P(rn,{getResetKey:()=>n,onCatch:(t,n)=>{if(I(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(I(t))return e.fallback?.(t);throw t},children:e.children})}function Tn(){return P(`p`,{children:`Not Found`})}function Q(e){return P(De,{children:e.children})}function En(e,t,n){return t.options.notFoundComponent?P(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?P(e.options.defaultNotFoundComponent,{...n}):P(Tn,{})}function Dn(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?P(n,{}):null}var On=(e,t)=>e[0]===t[0]&&e[1]===t[1],kn=N.memo(function({routeId:e}){let t=M();return P(An,{router:t,match:C(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)?N.Suspense:Q,u=i?rn:Q,d=o?wn:Q;return F(n.isRoot?n.options.shellComponent??Q:Q,{children:[P(ne.Provider,{value:t.routeId,children:P(c,{fallback:r,children:P(u,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(I(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:P(d,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return N.createElement(o,e)},children:s?P(l,{fallback:r,children:P(jn,{match:t})}):P(jn,{match:t})})})})}),null]})}var jn=N.memo(function({match:e}){let t=M(),n=e.routeId,r=t.routesById[n],i=N.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=N.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?P(e,{},i):P(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=N.memo(function(){let e=M(),t=N.useContext(ne),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=C(a,e=>[!!e._notFound,e.error],On),i=C(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return En(e,e.routesById[t],r);if(!i)return null;let a=P(kn,{routeId:i});return t===`__root__`?P(N.Suspense,{fallback:Dn(e),children:a}):a});function Nn(e,t){let n=e[1];e.length=0,n?.(t)}function Pn({t:e}){let t=M(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise((a,o)=>{Nn(n,!1),n.push(i,a),e(t),N.startTransition(()=>{try{r()}catch(e){n[1]===a&&(n.length=0),o(e)}})}),i(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(w(r.publicHref)!==w(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...dt(a,a)})}):t._tx||t.load().catch(console.error),e},[t,t.history]),null}function Fn(){let e=M(),t=e.routesById[re],n=Dn(e,t),r=e.ssr?Q:N.Suspense,i=F(De,{children:[P(Pn,{t:N.useState()[1]}),P(r,{fallback:n,children:P(In,{})})]});return e.options.InnerWrap?P(e.options.InnerWrap,{children:i}):i}function In(){let e=M(),t=e._rendered,n=C(e.stores.matches,e=>t[0]??e),r=n[0],a=r?.routeId;i(()=>{t[0]===n&&Nn(t,!0)},[t,n]);let o=a?P(kn,{routeId:a}):null;return P(ne.Provider,{value:a,children:e.options.disableGlobalCatchBoundary?o:P(rn,{getResetKey:()=>r,onCatch:void 0,children:o})})}var Ln=e=>({createMutableStore:Sn,createReadonlyStore:Sn,batch:yn}),Rn=e=>new zn(e),zn=class extends mt{constructor(e){super(e,Ln)}};function Bn({router:e,children:t,...n}){ee(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=P(se.Provider,{value:e,children:t});return e.options.Wrap?P(e.options.Wrap,{children:r}):r}function Vn({router:e,...t}){return P(Bn,{router:e,...t,children:P(Fn,{})})}var Hn=ke.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=ke.p`
|
|
10
|
-
font-size: 13px;
|
|
11
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
12
|
-
max-width: 48ch;
|
|
13
|
-
`,Wn=ie()({component:Mn,notFoundComponent:()=>P(Hn,{children:F(ce,{$gap:3,style:{alignItems:`center`},children:[P(ue,{children:`Not found`}),P(Un,{children:`This console has no screen at that address.`}),P(le,{as:`a`,href:`/`,$variant:`primary`,$size:`sm`,children:`Back to the rack`})]})})});async function Gn(e){return e.queryClient.ensureQueryData({queryKey:s.status,queryFn:()=>fe(`/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 oe({to:`/login`,search:{next:t}});if(n!==`/`)throw oe({to:n})}function Jn(e,t){let n=Kn(e);if(n===`/login`)throw oe({to:`/login`,search:{next:t}});if(n!==`/client`)throw oe({to:n})}var Yn=A(`/_app`)({beforeLoad:async({context:e,location:t})=>{qn(await Gn(e),t.href),await e.queryClient.ensureQueryData(o)},pendingComponent:Xn,pendingMs:200,errorComponent:k(()=>j(()=>import(`./_app-CWXzHdhc.js`),__vite__mapDeps([0,1])),`errorComponent`),component:Zn});function Xn(){return P(me,{legend:`Console`,children:P(de,{rows:6})})}function Zn(){let e=a().data??[];return P(ye,{children:F(ve,{children:[P(he,{$providers:e}),P(ge,{children:P(Mn,{})})]})})}var Qn=A(`/client`)({beforeLoad:async({context:e,location:t})=>{Jn(await Gn(e),t.href)},component:k(()=>j(()=>import(`./client-TUf0nuim.js`),__vite__mapDeps([2,3,4,1,5,6,7,8,9,10,11,12,13,14,15,16])),`component`)}),$n=A(`/_app/`)({component:k(()=>j(()=>import(`./_app.index-DKouD-rz.js`),__vite__mapDeps([17,4,1,5,13,14,9,10,16])),`component`)}),er=A(`/_app/accounts`)({component:k(()=>j(()=>import(`./_app.accounts-DMmtkwnl.js`),__vite__mapDeps([18,4,1,5,19,6,20,21,22,14,8,9,10,11,3])),`component`)}),tr=A(`/_app/console`)({component:k(()=>j(()=>import(`./_app.console-BBz3kCPV.js`),__vite__mapDeps([23,4,1,5,7,8])),`component`)}),nr=A(`/_app/database`)({component:k(()=>j(()=>import(`./_app.database-ZvtMVgsh.js`),__vite__mapDeps([24,4,1,5,21,8,9,10,16,25])),`component`)}),rr=A(`/_app/keys`)({component:k(()=>j(()=>import(`./_app.keys-BG9-zfh6.js`),__vite__mapDeps([26,4,1,5,19,6,20,22,14,8,9,10])),`component`)}),ir=A(`/_app/logs`)({component:k(()=>j(()=>import(`./_app.logs-DjinYGYS.js`),__vite__mapDeps([27,4,1,5,14,8,12,13,10])),`component`)}),ar=A(`/_app/models`)({component:k(()=>j(()=>import(`./_app.models-BCfQVuoT.js`),__vite__mapDeps([28,4,1,5,20,21,22,14,8,9])),`component`)}),or=A(`/_app/settings`)({component:k(()=>j(()=>import(`./_app.settings-C42ylcNP.js`),__vite__mapDeps([29,4,1,5,22,8,9,25])),`component`)}),sr=A(`/_app/usage`)({component:k(()=>j(()=>import(`./_app.usage-DfPM6eQ-.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=be.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:xe.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 pe)||!t.isUnauthenticated||e.isLoginRoute()||e.onUnauthenticated()};return new we({queryCache:new Ce({onError:t}),mutationCache:new Se({onError:t}),defaultOptions:{queries:{retry:(e,t)=>t instanceof pe&&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`);Oe(vr).render(P(Ee,{children:P(_e,{children:P(Te,{client:_r,children:P(Vn,{router:gr})})})}));
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-w-hVstKf.js","assets/Lamp-CVGUT2YK.js","assets/Panel-BlNr9j6-.js","assets/Field-DcNu4yw-.js","assets/reasons-Du1OBWAM.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,r as t,t as n}from"./preload-helper-Unv7FI91.js";var r=t(`/login`)({validateSearch:e=>({...typeof e.next==`string`?{next:e.next}:{},...typeof e.reason==`string`?{reason:e.reason}:{}}),component:e(()=>n(()=>import(`./login-w-hVstKf.js`),__vite__mapDeps([0,1,2,3,4])),`component`)});export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./Rack-BbZyyu2u.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Cn as t,Gt as n,Kt as r,bn as i,dn as a,nn as o,qt as s,rn as c,wn as l}from"./Lamp-CVGUT2YK.js";import{k as u}from"./Panel-BlNr9j6-.js";import*as d from"react";import f from"react";import{jsx as p}from"react/jsx-runtime";var m=`__root__`;function h(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function g(e){return e instanceof Response&&!!e.options}var _=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=t=>{this.originalIndex=t.originalIndex;let n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=m:this.parentRoute||a();let i=r?m:n?.path;i&&i!==`/`&&(i=o(i));let s=n?.id||i,l=r?m:e([this.parentRoute.id===`__root__`?``:this.parentRoute.id,s]);i===`__root__`&&(i=`/`),l!==`__root__`&&(l=e([`/`,l]));let u=l===`__root__`?`/`:e([this.parentRoute.fullPath,i]);this._path=i,this._id=l,this._fullPath=u,this._to=c(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>h({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},v=class extends _{constructor(e){super(e)}},y=d.createContext(void 0),b=d.createContext(void 0),x={};function S(e,n){let r=d.useRef();return i=>{let a=e?.select?e.select(i):i;return e?.structuralSharing??n.options.defaultStructuralSharing?r.current=t(r.current,a):a}}function C(e){let t=u(),n=d.useContext(e.from?b:y),r=e.from??n,i=t.stores.getMatchStore(r),o=S(e,t),c=s(i,e=>e?o(e):x);if(c!==x)return c;(e.shouldThrow??!0)&&a()}function w(e){return C({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function T(e){let{select:t,...n}=e;return C({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function E(e){return C({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function D(e){return C({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function O(e){return C({...e,select:t=>e.select?e.select(t.context):t.context})}var k=class extends _{constructor(e){super(e),this.useMatch=e=>C({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>O({...e,from:this.id}),this.useSearch=e=>D({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>E({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>T({...e,from:this.id}),this.useLoaderData=e=>w({...e,from:this.id}),this.useNavigate=()=>r({from:this.fullPath}),this.Link=f.forwardRef((e,t)=>p(n,{ref:t,from:this.fullPath,...e}))}};function A(e){return new k(e)}function j(){return e=>N(e)}var M=class extends v{constructor(e){super(e),this.useMatch=e=>C({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>O({...e,from:this.id}),this.useSearch=e=>D({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>E({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>T({...e,from:this.id}),this.useLoaderData=e=>w({...e,from:this.id}),this.useNavigate=()=>r({from:this.fullPath}),this.Link=f.forwardRef((e,t)=>p(n,{ref:t,from:this.fullPath,...e}))}};function N(e){return new M(e)}function P(e){return e=>{let t=A(e);return t.isRoot=!1,t}}function F(e,t){let n,r,a,o=()=>(n||=(a=void 0,e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,a=e})),n),s=function(e){if(a){if(i(a)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw a}if(!r)if(l)l(o());else throw o();return d.createElement(r,e)};return s.preload=o,s}var I=`modulepreload`,L=function(e){return`/`+e},R={},z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=L(t,n),t=s(t),t in R)return;R[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:I,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{y as a,m as c,j as i,F as n,g as o,P as r,h as s,z as t};
|