dexto 1.6.2 → 1.6.3
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/dist/cli/auth/oauth.d.ts.map +1 -1
- package/dist/cli/auth/oauth.js +29 -3
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -1
- package/dist/cli/utils/scaffolding-utils.js +38 -4
- package/dist/index-main.js +42 -9
- package/dist/index.js +12 -0
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +18 -11
- package/dist/webui/assets/index-d6c-yJNn.js +2059 -0
- package/dist/webui/assets/index-yKdFLN1k.css +1 -0
- package/dist/webui/assets/react-vendor-l0sNRNKZ.js +1 -0
- package/dist/webui/assets/tanstack-BjCuxfF-.js +41 -0
- package/dist/webui/index.html +3 -4
- package/package.json +12 -12
- package/dist/webui/assets/index-BPlk2Wbt.css +0 -1
- package/dist/webui/assets/index-BZvrpxyh.js +0 -2059
- package/dist/webui/assets/react-vendor-gH-7aFTg.js +0 -17
- package/dist/webui/assets/tanstack-Br79RQ-n.js +0 -25
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
function Dn(t,e){for(var s=0;s<e.length;s++){const n=e[s];if(typeof n!="string"&&!Array.isArray(n)){for(const r in n)if(r!=="default"&&!(r in t)){const i=Object.getOwnPropertyDescriptor(n,r);i&&Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>n[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function zs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var me={exports:{}},Et={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var ls;function jn(){if(ls)return Et;ls=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function s(n,r,i){var a=null;if(i!==void 0&&(a=""+i),r.key!==void 0&&(a=""+r.key),"key"in r){i={};for(var o in r)o!=="key"&&(i[o]=r[o])}else i=r;return r=i.ref,{$$typeof:t,type:n,key:a,ref:r!==void 0?r:null,props:i}}return Et.Fragment=e,Et.jsx=s,Et.jsxs=s,Et}var hs;function Un(){return hs||(hs=1,me.exports=jn()),me.exports}var M=Un(),ye={exports:{}},k={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var fs;function Nn(){if(fs)return k;fs=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),l=Symbol.iterator;function f(d){return d===null||typeof d!="object"?null:(d=l&&d[l]||d["@@iterator"],typeof d=="function"?d:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function m(d,S,L){this.props=d,this.context=S,this.refs=y,this.updater=L||p}m.prototype.isReactComponent={},m.prototype.setState=function(d,S){if(typeof d!="object"&&typeof d!="function"&&d!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,d,S,"setState")},m.prototype.forceUpdate=function(d){this.updater.enqueueForceUpdate(this,d,"forceUpdate")};function v(){}v.prototype=m.prototype;function R(d,S,L){this.props=d,this.context=S,this.refs=y,this.updater=L||p}var w=R.prototype=new v;w.constructor=R,g(w,m.prototype),w.isPureReactComponent=!0;var E=Array.isArray,C={H:null,A:null,T:null,S:null,V:null},P=Object.prototype.hasOwnProperty;function b(d,S,L,T,D,j){return L=j.ref,{$$typeof:t,type:d,key:S,ref:L!==void 0?L:null,props:j}}function _(d,S){return b(d.type,S,void 0,void 0,void 0,d.props)}function O(d){return typeof d=="object"&&d!==null&&d.$$typeof===t}function F(d){var S={"=":"=0",":":"=2"};return"$"+d.replace(/[=:]/g,function(L){return S[L]})}var A=/\/+/g;function Q(d,S){return typeof d=="object"&&d!==null&&d.key!=null?F(""+d.key):S.toString(36)}function H(){}function V(d){switch(d.status){case"fulfilled":return d.value;case"rejected":throw d.reason;default:switch(typeof d.status=="string"?d.then(H,H):(d.status="pending",d.then(function(S){d.status==="pending"&&(d.status="fulfilled",d.value=S)},function(S){d.status==="pending"&&(d.status="rejected",d.reason=S)})),d.status){case"fulfilled":return d.value;case"rejected":throw d.reason}}throw d}function $(d,S,L,T,D){var j=typeof d;(j==="undefined"||j==="boolean")&&(d=null);var I=!1;if(d===null)I=!0;else switch(j){case"bigint":case"string":case"number":I=!0;break;case"object":switch(d.$$typeof){case t:case e:I=!0;break;case h:return I=d._init,$(I(d._payload),S,L,T,D)}}if(I)return D=D(d),I=T===""?"."+Q(d,0):T,E(D)?(L="",I!=null&&(L=I.replace(A,"$&/")+"/"),$(D,S,L,"",function(ot){return ot})):D!=null&&(O(D)&&(D=_(D,L+(D.key==null||d&&d.key===D.key?"":(""+D.key).replace(A,"$&/")+"/")+I)),S.push(D)),1;I=0;var G=T===""?".":T+":";if(E(d))for(var N=0;N<d.length;N++)T=d[N],j=G+Q(T,N),I+=$(T,S,L,j,D);else if(N=f(d),typeof N=="function")for(d=N.call(d),N=0;!(T=d.next()).done;)T=T.value,j=G+Q(T,N++),I+=$(T,S,L,j,D);else if(j==="object"){if(typeof d.then=="function")return $(V(d),S,L,T,D);throw S=String(d),Error("Objects are not valid as a React child (found: "+(S==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":S)+"). If you meant to render a collection of children, use an array instead.")}return I}function et(d,S,L){if(d==null)return d;var T=[],D=0;return $(d,T,"","",function(j){return S.call(L,j,D++)}),T}function he(d){if(d._status===-1){var S=d._result;S=S(),S.then(function(L){(d._status===0||d._status===-1)&&(d._status=1,d._result=L)},function(L){(d._status===0||d._status===-1)&&(d._status=2,d._result=L)}),d._status===-1&&(d._status=0,d._result=S)}if(d._status===1)return d._result.default;throw d._result}var fe=typeof reportError=="function"?reportError:function(d){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var S=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof d=="object"&&d!==null&&typeof d.message=="string"?String(d.message):String(d),error:d});if(!window.dispatchEvent(S))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",d);return}console.error(d)};function is(){}return k.Children={map:et,forEach:function(d,S,L){et(d,function(){S.apply(this,arguments)},L)},count:function(d){var S=0;return et(d,function(){S++}),S},toArray:function(d){return et(d,function(S){return S})||[]},only:function(d){if(!O(d))throw Error("React.Children.only expected to receive a single React element child.");return d}},k.Component=m,k.Fragment=s,k.Profiler=r,k.PureComponent=R,k.StrictMode=n,k.Suspense=c,k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,k.__COMPILER_RUNTIME={__proto__:null,c:function(d){return C.H.useMemoCache(d)}},k.cache=function(d){return function(){return d.apply(null,arguments)}},k.cloneElement=function(d,S,L){if(d==null)throw Error("The argument must be a React element, but you passed "+d+".");var T=g({},d.props),D=d.key,j=void 0;if(S!=null)for(I in S.ref!==void 0&&(j=void 0),S.key!==void 0&&(D=""+S.key),S)!P.call(S,I)||I==="key"||I==="__self"||I==="__source"||I==="ref"&&S.ref===void 0||(T[I]=S[I]);var I=arguments.length-2;if(I===1)T.children=L;else if(1<I){for(var G=Array(I),N=0;N<I;N++)G[N]=arguments[N+2];T.children=G}return b(d.type,D,void 0,void 0,j,T)},k.createContext=function(d){return d={$$typeof:a,_currentValue:d,_currentValue2:d,_threadCount:0,Provider:null,Consumer:null},d.Provider=d,d.Consumer={$$typeof:i,_context:d},d},k.createElement=function(d,S,L){var T,D={},j=null;if(S!=null)for(T in S.key!==void 0&&(j=""+S.key),S)P.call(S,T)&&T!=="key"&&T!=="__self"&&T!=="__source"&&(D[T]=S[T]);var I=arguments.length-2;if(I===1)D.children=L;else if(1<I){for(var G=Array(I),N=0;N<I;N++)G[N]=arguments[N+2];D.children=G}if(d&&d.defaultProps)for(T in I=d.defaultProps,I)D[T]===void 0&&(D[T]=I[T]);return b(d,j,void 0,void 0,null,D)},k.createRef=function(){return{current:null}},k.forwardRef=function(d){return{$$typeof:o,render:d}},k.isValidElement=O,k.lazy=function(d){return{$$typeof:h,_payload:{_status:-1,_result:d},_init:he}},k.memo=function(d,S){return{$$typeof:u,type:d,compare:S===void 0?null:S}},k.startTransition=function(d){var S=C.T,L={};C.T=L;try{var T=d(),D=C.S;D!==null&&D(L,T),typeof T=="object"&&T!==null&&typeof T.then=="function"&&T.then(is,fe)}catch(j){fe(j)}finally{C.T=S}},k.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},k.use=function(d){return C.H.use(d)},k.useActionState=function(d,S,L){return C.H.useActionState(d,S,L)},k.useCallback=function(d,S){return C.H.useCallback(d,S)},k.useContext=function(d){return C.H.useContext(d)},k.useDebugValue=function(){},k.useDeferredValue=function(d,S){return C.H.useDeferredValue(d,S)},k.useEffect=function(d,S,L){var T=C.H;if(typeof L=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return T.useEffect(d,S)},k.useId=function(){return C.H.useId()},k.useImperativeHandle=function(d,S,L){return C.H.useImperativeHandle(d,S,L)},k.useInsertionEffect=function(d,S){return C.H.useInsertionEffect(d,S)},k.useLayoutEffect=function(d,S){return C.H.useLayoutEffect(d,S)},k.useMemo=function(d,S){return C.H.useMemo(d,S)},k.useOptimistic=function(d,S){return C.H.useOptimistic(d,S)},k.useReducer=function(d,S,L){return C.H.useReducer(d,S,L)},k.useRef=function(d){return C.H.useRef(d)},k.useState=function(d){return C.H.useState(d)},k.useSyncExternalStore=function(d,S,L){return C.H.useSyncExternalStore(d,S,L)},k.useTransition=function(){return C.H.useTransition()},k.version="19.1.1",k}var ds;function oe(){return ds||(ds=1,ye.exports=Nn()),ye.exports}var x=oe();const Pt=zs(x),Vi=Dn({__proto__:null,default:Pt},[x]);var ge={exports:{}},K={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react-dom.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var ps;function Bn(){if(ps)return K;ps=1;var t=oe();function e(c){var u="https://react.dev/errors/"+c;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var n={d:{f:s,r:function(){throw Error(e(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},r=Symbol.for("react.portal");function i(c,u,h){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:l==null?null:""+l,children:c,containerInfo:u,implementation:h}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return K.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,K.createPortal=function(c,u){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(e(299));return i(c,u,null,h)},K.flushSync=function(c){var u=a.T,h=n.p;try{if(a.T=null,n.p=2,c)return c()}finally{a.T=u,n.p=h,n.d.f()}},K.preconnect=function(c,u){typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,n.d.C(c,u))},K.prefetchDNS=function(c){typeof c=="string"&&n.d.D(c)},K.preinit=function(c,u){if(typeof c=="string"&&u&&typeof u.as=="string"){var h=u.as,l=o(h,u.crossOrigin),f=typeof u.integrity=="string"?u.integrity:void 0,p=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;h==="style"?n.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:l,integrity:f,fetchPriority:p}):h==="script"&&n.d.X(c,{crossOrigin:l,integrity:f,fetchPriority:p,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},K.preinitModule=function(c,u){if(typeof c=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var h=o(u.as,u.crossOrigin);n.d.M(c,{crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&n.d.M(c)},K.preload=function(c,u){if(typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var h=u.as,l=o(h,u.crossOrigin);n.d.L(c,h,{crossOrigin:l,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},K.preloadModule=function(c,u){if(typeof c=="string")if(u){var h=o(u.as,u.crossOrigin);n.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else n.d.m(c)},K.requestFormReset=function(c){n.d.r(c)},K.unstable_batchedUpdates=function(c,u){return c(u)},K.useFormState=function(c,u,h){return a.H.useFormState(c,u,h)},K.useFormStatus=function(){return a.H.useHostTransitionStatus()},K.version="19.1.1",K}var ms;function $n(){if(ms)return ge.exports;ms=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),ge.exports=Bn(),ge.exports}const Ie=new WeakMap,Qn=new WeakMap,Gt={current:[]};let ve=!1,It=0;const Tt=new Set,$t=new Map;function Vs(t){for(const e of t){if(Gt.current.includes(e))continue;Gt.current.push(e),e.recompute();const s=Qn.get(e);if(s)for(const n of s){const r=Ie.get(n);r?.length&&Vs(r)}}}function qn(t){const e={prevVal:t.prevState,currentVal:t.state};for(const s of t.listeners)s(e)}function Hn(t){const e={prevVal:t.prevState,currentVal:t.state};for(const s of t.listeners)s(e)}function Gs(t){if(It>0&&!$t.has(t)&&$t.set(t,t.prevState),Tt.add(t),!(It>0)&&!ve)try{for(ve=!0;Tt.size>0;){const e=Array.from(Tt);Tt.clear();for(const s of e){const n=$t.get(s)??s.prevState;s.prevState=n,qn(s)}for(const s of e){const n=Ie.get(s);n&&(Gt.current.push(s),Vs(n))}for(const s of e){const n=Ie.get(s);if(n)for(const r of n)Hn(r)}}}finally{ve=!1,Gt.current=[],$t.clear()}}function kt(t){It++;try{t()}finally{if(It--,It===0){const e=Tt.values().next().value;e&&Gs(e)}}}function Kn(t){return typeof t=="function"}class Wn{constructor(e,s){this.listeners=new Set,this.subscribe=n=>{var r,i;this.listeners.add(n);const a=(i=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:i.call(r,n,this);return()=>{this.listeners.delete(n),a?.()}},this.prevState=e,this.state=e,this.options=s}setState(e){var s,n,r;this.prevState=this.state,(s=this.options)!=null&&s.updateFn?this.state=this.options.updateFn(this.prevState)(e):Kn(e)?this.state=e(this.prevState):this.state=e,(r=(n=this.options)==null?void 0:n.onUpdate)==null||r.call(n),Gs(this)}}const ct="__TSR_index",ys="popstate",gs="beforeunload";function zn(t){let e=t.getLocation();const s=new Set,n=a=>{e=t.getLocation(),s.forEach(o=>o({location:e,action:a}))},r=a=>{t.notifyOnIndexChange??!0?n(a):e=t.getLocation()},i=async({task:a,navigateOpts:o,...c})=>{if(o?.ignoreBlocker??!1){a();return}const h=t.getBlockers?.()??[],l=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&h.length&&l)for(const f of h){const p=Yt(c.path,c.state);if(await f.blockerFn({currentLocation:e,nextLocation:p,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:s,subscribe:a=>(s.add(a),()=>{s.delete(a)}),push:(a,o,c)=>{const u=e.state[ct];o=vs(u+1,o),i({task:()=>{t.pushState(a,o),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=e.state[ct];o=vs(u,o),i({task:()=>{t.replaceState(a,o),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{t.go(a),r({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{t.back(a?.ignoreBlocker??!1),r({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{t.forward(a?.ignoreBlocker??!1),r({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[ct]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const o=t.getBlockers?.()??[];return t.setBlockers([...o,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(u=>u!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:n}}function vs(t,e){e||(e={});const s=Qe();return{...e,key:s,__TSR_key:s,[ct]:t}}function Vn(t){const e=typeof document<"u"?window:void 0,s=e.history.pushState,n=e.history.replaceState;let r=[];const i=()=>r,a=_=>r=_,o=(_=>_),c=(()=>Yt(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const _=Qe();e.history.replaceState({[ct]:0,key:_,__TSR_key:_},"")}let u=c(),h,l=!1,f=!1,p=!1,g=!1;const y=()=>u;let m,v;const R=()=>{m&&(b._ignoreSubscribers=!0,(m.isPush?e.history.pushState:e.history.replaceState)(m.state,"",m.href),b._ignoreSubscribers=!1,m=void 0,v=void 0,h=void 0)},w=(_,O,F)=>{const A=o(O);v||(h=u),u=Yt(O,F),m={href:A,state:F,isPush:m?.isPush||_==="push"},v||(v=Promise.resolve().then(()=>R()))},E=_=>{u=c(),b.notify({type:_})},C=async()=>{if(f){f=!1;return}const _=c(),O=_.state[ct]-u.state[ct],F=O===1,A=O===-1,Q=!F&&!A||l;l=!1;const H=Q?"GO":A?"BACK":"FORWARD",V=Q?{type:"GO",index:O}:{type:A?"BACK":"FORWARD"};if(p)p=!1;else{const $=i();if(typeof document<"u"&&$.length){for(const et of $)if(await et.blockerFn({currentLocation:u,nextLocation:_,action:H})){f=!0,e.history.go(1),b.notify(V);return}}}u=c(),b.notify(V)},P=_=>{if(g){g=!1;return}let O=!1;const F=i();if(typeof document<"u"&&F.length)for(const A of F){const Q=A.enableBeforeUnload??!0;if(Q===!0){O=!0;break}if(typeof Q=="function"&&Q()===!0){O=!0;break}}if(O)return _.preventDefault(),_.returnValue=""},b=zn({getLocation:y,getLength:()=>e.history.length,pushState:(_,O)=>w("push",_,O),replaceState:(_,O)=>w("replace",_,O),back:_=>(_&&(p=!0),g=!0,e.history.back()),forward:_=>{_&&(p=!0),g=!0,e.history.forward()},go:_=>{l=!0,e.history.go(_)},createHref:_=>o(_),flush:R,destroy:()=>{e.history.pushState=s,e.history.replaceState=n,e.removeEventListener(gs,P,{capture:!0}),e.removeEventListener(ys,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(gs,P,{capture:!0}),e.addEventListener(ys,C),e.history.pushState=function(..._){const O=s.apply(e.history,_);return b._ignoreSubscribers||E("PUSH"),O},e.history.replaceState=function(..._){const O=n.apply(e.history,_);return b._ignoreSubscribers||E("REPLACE"),O},b}function Yt(t,e){const s=t.indexOf("#"),n=t.indexOf("?"),r=Qe();return{href:t,pathname:t.substring(0,s>0?n>0?Math.min(s,n):s:n>0?n:t.length),hash:s>-1?t.substring(s):"",search:n>-1?t.slice(n,s===-1?void 0:s):"",state:e||{[ct]:0,key:r,__TSR_key:r}}}function Qe(){return(Math.random()+1).toString(36).substring(7)}function Jt(t){return t[t.length-1]}function Gn(t){return typeof t=="function"}function pt(t,e){return Gn(t)?t(e):t}const Yn=Object.prototype.hasOwnProperty;function X(t,e){if(t===e)return t;const s=e,n=_s(t)&&_s(s);if(!n&&!(Xt(t)&&Xt(s)))return s;const r=n?t:Ss(t);if(!r)return s;const i=n?s:Ss(s);if(!i)return s;const a=r.length,o=i.length,c=n?new Array(o):{};let u=0;for(let h=0;h<o;h++){const l=n?h:i[h],f=t[l],p=s[l];if(f===p){c[l]=f,(n?h<a:Yn.call(t,l))&&u++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){c[l]=p;continue}const g=X(f,p);c[l]=g,g===f&&u++}return a===o&&u===a?t:c}function Ss(t){const e=[],s=Object.getOwnPropertyNames(t);for(const r of s){if(!Object.prototype.propertyIsEnumerable.call(t,r))return!1;e.push(r)}const n=Object.getOwnPropertySymbols(t);for(const r of n){if(!Object.prototype.propertyIsEnumerable.call(t,r))return!1;e.push(r)}return e}function Xt(t){if(!Rs(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const s=e.prototype;return!(!Rs(s)||!s.hasOwnProperty("isPrototypeOf"))}function Rs(t){return Object.prototype.toString.call(t)==="[object Object]"}function _s(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function mt(t,e,s){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(!mt(t[n],e[n],s))return!1;return!0}if(Xt(t)&&Xt(e)){const n=s?.ignoreUndefined??!0;if(s?.partial){for(const a in e)if((!n||e[a]!==void 0)&&!mt(t[a],e[a],s))return!1;return!0}let r=0;if(!n)r=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&r++;let i=0;for(const a in e)if((!n||e[a]!==void 0)&&(i++,i>r||!mt(t[a],e[a],s)))return!1;return r===i}return!1}function Ct(t){let e,s;const n=new Promise((r,i)=>{e=r,s=i});return n.status="pending",n.resolve=r=>{n.status="resolved",n.value=r,e(r),t?.(r)},n.reject=r=>{n.status="rejected",s(r)},n}function ut(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function bs(t){try{return decodeURI(t)}catch{return t.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}}function ws(t,e){if(!t)return t;const s=/%25|%5C/gi;let n=0,r="",i;for(;(i=s.exec(t))!==null;)r+=bs(t.slice(n,i.index))+i[0],n=s.lastIndex;return r+bs(n?t.slice(n):t)}var Jn="Invariant failed";function it(t,e){if(!t)throw new Error(Jn)}function Zt(t){const e=new Map;let s,n;const r=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,n&&(n.next=i,i.prev=n)):(i.next.prev=void 0,s=i.next,i.next=void 0,n&&(i.prev=n,n.next=i)),n=i)};return{get(i){const a=e.get(i);if(a)return r(a),a.value},set(i,a){if(e.size>=t&&s){const c=s;e.delete(c.key),c.next&&(s=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const o=e.get(i);if(o)o.value=a,r(o);else{const c={key:i,value:a,prev:n};n&&(n.next=c),n=c,s||(s=c),e.set(i,c)}},clear(){e.clear(),s=void 0,n=void 0}}}const xt=0,vt=1,St=2,At=3,Xn=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,Zn=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,tr=/^([^{]*)\{\$\}([^}]*)$/;function qe(t,e,s=new Uint16Array(6)){const n=t.indexOf("/",e),r=n===-1?t.length:n,i=t.substring(e,r);if(!i||!i.includes("$"))return s[0]=xt,s[1]=e,s[2]=e,s[3]=r,s[4]=r,s[5]=r,s;if(i==="$"){const u=t.length;return s[0]=St,s[1]=e,s[2]=e,s[3]=u,s[4]=u,s[5]=u,s}if(i.charCodeAt(0)===36)return s[0]=vt,s[1]=e,s[2]=e+1,s[3]=r,s[4]=r,s[5]=r,s;const a=i.match(tr);if(a){const h=a[1].length;return s[0]=St,s[1]=e+h,s[2]=e+h+1,s[3]=e+h+2,s[4]=e+h+3,s[5]=t.length,s}const o=i.match(Zn);if(o){const u=o[1],h=o[2],l=o[3],f=u.length;return s[0]=At,s[1]=e+f,s[2]=e+f+3,s[3]=e+f+3+h.length,s[4]=r-l.length,s[5]=r,s}const c=i.match(Xn);if(c){const u=c[1],h=c[2],l=c[3],f=u.length;return s[0]=vt,s[1]=e+f,s[2]=e+f+2,s[3]=e+f+2+h.length,s[4]=r-l.length,s[5]=r,s}return s[0]=xt,s[1]=e,s[2]=e,s[3]=r,s[4]=r,s[5]=r,s}function ae(t,e,s,n,r,i,a){a?.(s);let o=n;{const c=s.fullPath??s.from,u=c.length,h=s.options?.caseSensitive??t;for(;o<u;){const l=qe(c,o,e);let f;const p=o,g=l[5];switch(o=g+1,i++,l[0]){case xt:{const m=c.substring(l[2],l[3]);if(h){const v=r.static?.get(m);if(v)f=v;else{r.static??=new Map;const R=Dt(s.fullPath??s.from);R.parent=r,R.depth=i,f=R,r.static.set(m,R)}}else{const v=m.toLowerCase(),R=r.staticInsensitive?.get(v);if(R)f=R;else{r.staticInsensitive??=new Map;const w=Dt(s.fullPath??s.from);w.parent=r,w.depth=i,f=w,r.staticInsensitive.set(v,w)}}break}case vt:{const m=c.substring(p,l[1]),v=c.substring(l[4],g),R=h&&!!(m||v),w=m?R?m:m.toLowerCase():void 0,E=v?R?v:v.toLowerCase():void 0,C=r.dynamic?.find(P=>P.caseSensitive===R&&P.prefix===w&&P.suffix===E);if(C)f=C;else{const P=Re(vt,s.fullPath??s.from,R,w,E);f=P,P.depth=i,P.parent=r,r.dynamic??=[],r.dynamic.push(P)}break}case At:{const m=c.substring(p,l[1]),v=c.substring(l[4],g),R=h&&!!(m||v),w=m?R?m:m.toLowerCase():void 0,E=v?R?v:v.toLowerCase():void 0,C=r.optional?.find(P=>P.caseSensitive===R&&P.prefix===w&&P.suffix===E);if(C)f=C;else{const P=Re(At,s.fullPath??s.from,R,w,E);f=P,P.parent=r,P.depth=i,r.optional??=[],r.optional.push(P)}break}case St:{const m=c.substring(p,l[1]),v=c.substring(l[4],g),R=h&&!!(m||v),w=m?R?m:m.toLowerCase():void 0,E=v?R?v:v.toLowerCase():void 0,C=Re(St,s.fullPath??s.from,R,w,E);f=C,C.parent=r,C.depth=i,r.wildcard??=[],r.wildcard.push(C)}}r=f}if((s.path||!s.children)&&!s.isRoot){const l=c.endsWith("/");l||(r.notFound=s),(!r.route||!r.isIndex&&l)&&(r.route=s),r.isIndex||=l}}if(s.children)for(const c of s.children)ae(t,e,c,o,r,i,a)}function Se(t,e){if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function ft(t){if(t.static)for(const e of t.static.values())ft(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ft(e);if(t.dynamic?.length){t.dynamic.sort(Se);for(const e of t.dynamic)ft(e)}if(t.optional?.length){t.optional.sort(Se);for(const e of t.optional)ft(e)}if(t.wildcard?.length){t.wildcard.sort(Se);for(const e of t.wildcard)ft(e)}}function Dt(t){return{kind:xt,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null}}function Re(t,e,s,n,r){return{kind:t,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null,caseSensitive:s,prefix:n,suffix:r}}function er(t,e){const s=Dt("/"),n=new Uint16Array(6);for(const r of t)ae(!1,n,r,1,s,0);ft(s),e.masksTree=s,e.flatCache=Zt(1e3)}function sr(t,e){t||="/";const s=e.flatCache.get(t);if(s)return s;const n=He(t,e.masksTree);return e.flatCache.set(t,n),n}function nr(t,e,s,n,r){t||="/",n||="/";const i=e?`case\0${t}`:t;let a=r.singleCache.get(i);if(!a){a=Dt("/");const o=new Uint16Array(6);ae(e,o,{from:t},1,a,0),r.singleCache.set(i,a)}return He(n,a,s)}function rr(t,e,s=!1){const n=s?t:`nofuzz\0${t}`,r=e.matchCache.get(n);if(r!==void 0)return r;t||="/";const i=He(t,e.segmentTree,s);return i&&(i.branch=cr(i.route)),e.matchCache.set(n,i),i}function ir(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function or(t,e=!1,s){const n=Dt(t.fullPath),r=new Uint16Array(6),i={},a={};let o=0;return ae(e,r,t,1,n,0,u=>{if(s?.(u,o),it(!(u.id in i),`Duplicate routes found with id: ${String(u.id)}`),i[u.id]=u,o!==0&&u.path){const h=ir(u.fullPath);(!a[h]||u.fullPath.endsWith("/"))&&(a[h]=u)}o++}),ft(n),{processedTree:{segmentTree:n,singleCache:Zt(1e3),matchCache:Zt(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function He(t,e,s=!1){const n=t.split("/"),r=lr(t,n,e,s);if(!r)return null;const i=ar(t,n,r),a="**"in r;return a&&(i["**"]=r["**"]),{route:a?r.node.notFound??r.node.route:r.node.route,params:i}}function ar(t,e,s){const n=ur(s.node);let r=null;const i={};for(let a=0,o=0,c=0;o<n.length;a++,o++,c++){const u=n[o],h=e[a],l=c;if(h&&(c+=h.length),u.kind===vt){r??=s.node.fullPath.split("/");const f=r[o],p=u.prefix?.length??0;if(f.charCodeAt(p)===123){const y=u.suffix?.length??0,m=f.substring(p+2,f.length-y-1),v=h.substring(p,h.length-y);i[m]=decodeURIComponent(v)}else{const y=f.substring(1);i[y]=decodeURIComponent(h)}}else if(u.kind===At){if(s.skipped&1<<o){a--;continue}r??=s.node.fullPath.split("/");const f=r[o],p=u.prefix?.length??0,g=u.suffix?.length??0,y=f.substring(p+3,f.length-g-1),m=u.suffix||u.prefix?h.substring(p,h.length-g):h;m&&(i[y]=decodeURIComponent(m))}else if(u.kind===St){const f=u,p=t.substring(l+(f.prefix?.length??0),t.length-(f.suffix?.length??0)),g=decodeURIComponent(p);i["*"]=g,i._splat=g;break}}return i}function cr(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function ur(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function lr(t,e,s,n){const r=!Jt(e),i=r&&t!=="/",a=e.length-(r?1:0),o=[{node:s,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,u=null,h=null;for(;o.length;){const l=o.pop();let{node:f,index:p,skipped:g,depth:y,statics:m,dynamics:v,optionals:R}=l;n&&f.notFound&&_e(u,l)&&(u=l);const w=p===a;if(w){if(f.route&&(!i||f.isIndex)&&(_e(h,l)&&(h=l),m===a&&f.isIndex))return h;if(!f.optional&&!f.wildcard)continue}const E=w?void 0:e[p];let C;if(f.wildcard&&_e(c,l))for(const P of f.wildcard){const{prefix:b,suffix:_}=P;if(!(b&&(w||!(P.caseSensitive?E:C??=E.toLowerCase()).startsWith(b)))){if(_){if(w)continue;const O=e.slice(p).join("/").slice(-_.length);if((P.caseSensitive?O:O.toLowerCase())!==_)continue}c={node:P,index:p,skipped:g,depth:y,statics:m,dynamics:v,optionals:R};break}}if(f.optional){const P=g|1<<y,b=y+1;for(let _=f.optional.length-1;_>=0;_--){const O=f.optional[_];o.push({node:O,index:p,skipped:P,depth:b,statics:m,dynamics:v,optionals:R})}if(!w)for(let _=f.optional.length-1;_>=0;_--){const O=f.optional[_],{prefix:F,suffix:A}=O;if(F||A){const Q=O.caseSensitive?E:C??=E.toLowerCase();if(F&&!Q.startsWith(F)||A&&!Q.endsWith(A))continue}o.push({node:O,index:p+1,skipped:g,depth:b,statics:m,dynamics:v,optionals:R+1})}}if(!w&&f.dynamic&&E)for(let P=f.dynamic.length-1;P>=0;P--){const b=f.dynamic[P],{prefix:_,suffix:O}=b;if(_||O){const F=b.caseSensitive?E:C??=E.toLowerCase();if(_&&!F.startsWith(_)||O&&!F.endsWith(O))continue}o.push({node:b,index:p+1,skipped:g,depth:y+1,statics:m,dynamics:v+1,optionals:R})}if(!w&&f.staticInsensitive){const P=f.staticInsensitive.get(C??=E.toLowerCase());P&&o.push({node:P,index:p+1,skipped:g,depth:y+1,statics:m+1,dynamics:v,optionals:R})}if(!w&&f.static){const P=f.static.get(E);P&&o.push({node:P,index:p+1,skipped:g,depth:y+1,statics:m+1,dynamics:v,optionals:R})}}if(h)return h;if(c)return c;if(n&&u){let l=u.index;for(let p=0;p<u.index;p++)l+=e[p].length;const f=l===t.length?"/":t.slice(l);return{node:u.node,skipped:u.skipped,"**":decodeURIComponent(f)}}return null}function _e(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&(e.node.isIndex>t.node.isIndex||e.node.isIndex===t.node.isIndex&&e.depth>t.depth))):!0}function Wt(t){return Ke(t.filter(e=>e!==void 0).join("/"))}function Ke(t){return t.replace(/\/{2,}/g,"/")}function Ys(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function yt(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function zt(t){return yt(Ys(t))}function te(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function hr(t,e,s){return te(t,s)===te(e,s)}function fr({base:t,to:e,trailingSlash:s="never",cache:n}){const r=e.startsWith("/"),i=!r&&e===".";let a;if(n){a=r?e:i?t:t+"\0"+e;const l=n.get(a);if(l)return l}let o;if(i)o=t.split("/");else if(r)o=e.split("/");else{for(o=t.split("/");o.length>1&&Jt(o)==="";)o.pop();const l=e.split("/");for(let f=0,p=l.length;f<p;f++){const g=l[f];g===""?f?f===p-1&&o.push(g):o=[g]:g===".."?o.pop():g==="."||o.push(g)}}o.length>1&&(Jt(o)===""?s==="never"&&o.pop():s==="always"&&o.push(""));let c,u="";for(let l=0;l<o.length;l++){l>0&&(u+="/");const f=o[l];if(!f)continue;c=qe(f,0,c);const p=c[0];if(p===xt){u+=f;continue}const g=c[5],y=f.substring(0,c[1]),m=f.substring(c[4],g),v=f.substring(c[2],c[3]);p===vt?u+=y||m?`${y}{$${v}}${m}`:`$${v}`:p===St?u+=y||m?`${y}{$}${m}`:"$":u+=`${y}{-$${v}}${m}`}u=Ke(u);const h=u||"/";return a&&n&&n.set(a,h),h}function be(t,e,s){const n=e[t];return typeof n!="string"?n:t==="_splat"?encodeURI(n):dr(n,s)}function we({path:t,params:e,decodeCharMap:s}){let n=!1;const r={};if(!t||t==="/")return{interpolatedPath:"/",usedParams:r,isMissingParams:n};if(!t.includes("$"))return{interpolatedPath:t,usedParams:r,isMissingParams:n};const i=t.length;let a=0,o,c="";for(;a<i;){const h=a;o=qe(t,h,o);const l=o[5];if(a=l+1,h===l)continue;const f=o[0];if(f===xt){c+="/"+t.substring(h,l);continue}if(f===St){const p=e._splat;r._splat=p,r["*"]=p;const g=t.substring(h,o[1]),y=t.substring(o[4],l);if(!p){n=!0,(g||y)&&(c+="/"+g+y);continue}const m=be("_splat",e,s);c+="/"+g+m+y;continue}if(f===vt){const p=t.substring(o[2],o[3]);!n&&!(p in e)&&(n=!0),r[p]=e[p];const g=t.substring(h,o[1]),y=t.substring(o[4],l),m=be(p,e,s)??"undefined";c+="/"+g+m+y;continue}if(f===At){const p=t.substring(o[2],o[3]),g=e[p];if(g==null)continue;r[p]=g;const y=t.substring(h,o[1]),m=t.substring(o[4],l),v=be(p,e,s)??"";c+="/"+y+v+m;continue}}return t.endsWith("/")&&(c+="/"),{usedParams:r,interpolatedPath:c||"/",isMissingParams:n}}function dr(t,e){let s=encodeURIComponent(t);if(e)for(const[n,r]of e)s=s.replaceAll(n,r);return s}function tt(t){return!!t?.isNotFound}function pr(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const ee="tsr-scroll-restoration-v1_3",mr=(t,e)=>{let s;return(...n)=>{s||(s=setTimeout(()=>{t(...n),s=null},e))}};function yr(){const t=pr();if(!t)return null;const e=t.getItem(ee);let s=e?JSON.parse(e):{};return{state:s,set:n=>(s=pt(n,s)||s,t.setItem(ee,JSON.stringify(s)))}}const Qt=yr(),ke=t=>t.state.__TSR_key||t.href;function gr(t){const e=[];let s;for(;s=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,t)+1})`),t=s;return`${e.reverse().join(" > ")}`.toLowerCase()}let se=!1;function Js({storageKey:t,key:e,behavior:s,shouldScrollRestoration:n,scrollToTopSelectors:r,location:i}){let a;try{a=JSON.parse(sessionStorage.getItem(t)||"{}")}catch(u){console.error(u);return}const o=e||window.history.state?.__TSR_key,c=a[o];se=!0;t:{if(n&&c&&Object.keys(c).length>0){for(const l in c){const f=c[l];if(l==="window")window.scrollTo({top:f.scrollY,left:f.scrollX,behavior:s});else if(l){const p=document.querySelector(l);p&&(p.scrollLeft=f.scrollX,p.scrollTop=f.scrollY)}}break t}const u=(i??window.location).hash.split("#",2)[1];if(u){const l=window.history.state?.__hashScrollIntoViewOptions??!0;if(l){const f=document.getElementById(u);f&&f.scrollIntoView(l)}break t}const h={top:0,left:0,behavior:s};if(window.scrollTo(h),r)for(const l of r){if(l==="window")continue;const f=typeof l=="function"?l():document.querySelector(l);f&&f.scrollTo(h)}}se=!1}function vr(t,e){if(!Qt&&!t.isServer||((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isServer||t.isScrollRestorationSetup||!Qt))return;t.isScrollRestorationSetup=!0,se=!1;const n=t.options.getScrollRestorationKey||ke;window.history.scrollRestoration="manual";const r=i=>{if(se||!t.isScrollRestoring)return;let a="";if(i.target===document||i.target===window)a="window";else{const c=i.target.getAttribute("data-scroll-restoration-id");c?a=`[data-scroll-restoration-id="${c}"]`:a=gr(i.target)}const o=n(t.state.location);Qt.set(c=>{const u=c[o]||={},h=u[a]||={};if(a==="window")h.scrollX=window.scrollX||0,h.scrollY=window.scrollY||0;else if(a){const l=document.querySelector(a);l&&(h.scrollX=l.scrollLeft||0,h.scrollY=l.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",mr(r,100),!0),t.subscribe("onRendered",i=>{const a=n(i.toLocation);if(!t.resetNextScroll){t.resetNextScroll=!0;return}typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation})||(Js({storageKey:ee,key:a,behavior:t.options.scrollRestorationBehavior,shouldScrollRestoration:t.isScrollRestoring,scrollToTopSelectors:t.options.scrollToTopSelectors,location:t.history.location}),t.isScrollRestoring&&Qt.set(o=>(o[a]||={},o)))})}function Sr(t){if(typeof document<"u"&&document.querySelector){const e=t.state.location.state.__hashScrollIntoViewOptions??!0;if(e&&t.state.location.hash!==""){const s=document.getElementById(t.state.location.hash);s&&s.scrollIntoView(e)}}}function Rr(t,e=String){const s=new URLSearchParams;for(const n in t){const r=t[n];r!==void 0&&s.set(n,e(r))}return s.toString()}function Pe(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function _r(t){const e=new URLSearchParams(t),s={};for(const[n,r]of e.entries()){const i=s[n];i==null?s[n]=Pe(r):Array.isArray(i)?i.push(Pe(r)):s[n]=[i,Pe(r)]}return s}const br=Pr(JSON.parse),wr=Cr(JSON.stringify,JSON.parse);function Pr(t){return e=>{e[0]==="?"&&(e=e.substring(1));const s=_r(e);for(const n in s){const r=s[n];if(typeof r=="string")try{s[n]=t(r)}catch{}}return s}}function Cr(t,e){const s=typeof e=="function";function n(r){if(typeof r=="object"&&r!==null)try{return t(r)}catch{}else if(s&&typeof r=="string")try{return e(r),t(r)}catch{}return r}return r=>{const i=Rr(r,n);return i?`?${i}`:""}}const Y="__root__";function xr(t){if(t.statusCode=t.statusCode||t.code||307,!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:e});if(s.options=t,t.throw)throw s;return s}function nt(t){return t instanceof Response&&!!t.options}const Vt=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},ce=(t,e)=>!!(t.preload&&!t.router.state.matches.some(s=>s.id===e)),Xs=(t,e)=>{const s=t.router.routesById[e.routeId??""]??t.router.routeTree;!s.options.notFoundComponent&&t.router.options?.defaultNotFoundComponent&&(s.options.notFoundComponent=t.router.options.defaultNotFoundComponent),it(s.options.notFoundComponent);const n=t.matches.find(r=>r.routeId===s.id);it(n,"Could not find match for route: "+s.id),t.updateMatch(n.id,r=>({...r,status:"notFound",error:e,isFetching:!1})),e.routerCode==="BEFORE_LOAD"&&s.parentRoute&&(e.routeId=s.parentRoute.id,Xs(t,e))},at=(t,e,s)=>{if(!(!nt(s)&&!tt(s))){if(nt(s)&&s.redirectHandled&&!s.options.reloadDocument)throw s;if(e){e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0;const n=nt(s)?"redirected":"notFound";e._nonReactive.error=s,t.updateMatch(e.id,r=>({...r,status:n,isFetching:!1,error:s})),tt(s)&&!s.routeId&&(s.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()}throw nt(s)?(t.rendered=!0,s.options._fromLocation=t.location,s.redirectHandled=!0,s=t.router.resolveRedirect(s),s):(Xs(t,s),s)}},Zs=(t,e)=>{const s=t.router.getMatch(e);return!!(!t.router.isServer&&s._nonReactive.dehydrated||t.router.isServer&&s.ssr===!1)},Ot=(t,e,s,n)=>{const{id:r,routeId:i}=t.matches[e],a=t.router.looseRoutesById[i];if(s instanceof Promise)throw s;s.routerCode=n,t.firstBadMatchIndex??=e,at(t,t.router.getMatch(r),s);try{a.options.onError?.(s)}catch(o){s=o,at(t,t.router.getMatch(r),s)}t.updateMatch(r,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},Er=(t,e,s,n)=>{const r=t.router.getMatch(e),i=t.matches[s-1]?.id,a=i?t.router.getMatch(i):void 0;if(t.router.isShell()){r.ssr=n.id===Y;return}if(a?.ssr===!1){r.ssr=!1;return}const o=p=>p===!0&&a?.ssr==="data-only"?"data-only":p,c=t.router.options.defaultSsr??!0;if(n.options.ssr===void 0){r.ssr=o(c);return}if(typeof n.options.ssr!="function"){r.ssr=o(n.options.ssr);return}const{search:u,params:h}=r,l={search:qt(u,r.searchError),params:qt(h,r.paramsError),location:t.location,matches:t.matches.map(p=>({index:p.index,pathname:p.pathname,fullPath:p.fullPath,staticData:p.staticData,id:p.id,routeId:p.routeId,search:qt(p.search,p.searchError),params:qt(p.params,p.paramsError),ssr:p.ssr}))},f=n.options.ssr(l);if(ut(f))return f.then(p=>{r.ssr=o(p??c)});r.ssr=o(f??c)},tn=(t,e,s,n)=>{if(n._nonReactive.pendingTimeout!==void 0)return;const r=s.options.pendingMs??t.router.options.defaultPendingMs;if(!!(t.onReady&&!t.router.isServer&&!ce(t,e)&&(s.options.loader||s.options.beforeLoad||nn(s))&&typeof r=="number"&&r!==1/0&&(s.options.pendingComponent??t.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{Vt(t)},r);n._nonReactive.pendingTimeout=a}},Or=(t,e,s)=>{const n=t.router.getMatch(e);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;tn(t,e,s,n);const r=()=>{const i=t.router.getMatch(e);i.preload&&(i.status==="redirected"||i.status==="notFound")&&at(t,i,i.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(r):r()},Mr=(t,e,s,n)=>{const r=t.router.getMatch(e),i=r._nonReactive.loadPromise;r._nonReactive.loadPromise=Ct(()=>{i?.resolve()});const{paramsError:a,searchError:o}=r;a&&Ot(t,s,a,"PARSE_PARAMS"),o&&Ot(t,s,o,"VALIDATE_SEARCH"),tn(t,e,n,r);const c=new AbortController,u=t.matches[s-1]?.id,f={...(u?t.router.getMatch(u):void 0)?.context??t.router.options.context??void 0,...r.__routeContext};let p=!1;const g=()=>{p||(p=!0,t.updateMatch(e,b=>({...b,isFetching:"beforeLoad",fetchCount:b.fetchCount+1,abortController:c,context:f})))},y=()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,b=>({...b,isFetching:!1}))};if(!n.options.beforeLoad){kt(()=>{g(),y()});return}r._nonReactive.beforeLoadPromise=Ct();const{search:m,params:v,cause:R}=r,w=ce(t,e),E={search:m,abortController:c,params:v,preload:w,context:f,location:t.location,navigate:b=>t.router.navigate({...b,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:w?"preload":R,matches:t.matches,...t.router.options.additionalContext},C=b=>{if(b===void 0){kt(()=>{g(),y()});return}(nt(b)||tt(b))&&(g(),Ot(t,s,b,"BEFORE_LOAD")),kt(()=>{g(),t.updateMatch(e,_=>({..._,__beforeLoadContext:b,context:{..._.context,...b}})),y()})};let P;try{if(P=n.options.beforeLoad(E),ut(P))return g(),P.catch(b=>{Ot(t,s,b,"BEFORE_LOAD")}).then(C)}catch(b){g(),Ot(t,s,b,"BEFORE_LOAD")}C(P)},Lr=(t,e)=>{const{id:s,routeId:n}=t.matches[e],r=t.router.looseRoutesById[n],i=()=>{if(t.router.isServer){const c=Er(t,s,e,r);if(ut(c))return c.then(o)}return o()},a=()=>Mr(t,s,e,r),o=()=>{if(Zs(t,s))return;const c=Or(t,s,r);return ut(c)?c.then(a):a()};return i()},Ft=(t,e,s)=>{const n=t.router.getMatch(e);if(!n||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const r={matches:t.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([s.options.head?.(r),s.options.scripts?.(r),s.options.headers?.(r)]).then(([i,a,o])=>{const c=i?.meta,u=i?.links,h=i?.scripts,l=i?.styles;return{meta:c,links:u,headScripts:h,headers:o,scripts:a,styles:l}})},en=(t,e,s,n)=>{const r=t.matchPromises[s-1],{params:i,loaderDeps:a,abortController:o,cause:c}=t.router.getMatch(e);let u=t.router.options.context??{};for(let l=0;l<=s;l++){const f=t.matches[l];if(!f)continue;const p=t.router.getMatch(f.id);p&&(u={...u,...p.__routeContext??{},...p.__beforeLoadContext??{}})}const h=ce(t,e);return{params:i,deps:a,preload:!!h,parentMatchPromise:r,abortController:o,context:u,location:t.location,navigate:l=>t.router.navigate({...l,_fromLocation:t.location}),cause:h?"preload":c,route:n,...t.router.options.additionalContext}},Ps=async(t,e,s,n)=>{try{const r=t.router.getMatch(e);try{(!t.router.isServer||r.ssr===!0)&&sn(n);const i=n.options.loader?.(en(t,e,s,n)),a=n.options.loader&&ut(i);if(!!(a||n._lazyPromise||n._componentsPromise||n.options.head||n.options.scripts||n.options.headers||r._nonReactive.minPendingPromise)&&t.updateMatch(e,l=>({...l,isFetching:"loader"})),n.options.loader){const l=a?await i:i;at(t,t.router.getMatch(e),l),l!==void 0&&t.updateMatch(e,f=>({...f,loaderData:l}))}n._lazyPromise&&await n._lazyPromise;const c=Ft(t,e,n),u=c?await c:void 0,h=r._nonReactive.minPendingPromise;h&&await h,n._componentsPromise&&await n._componentsPromise,t.updateMatch(e,l=>({...l,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...u}))}catch(i){let a=i;const o=r._nonReactive.minPendingPromise;o&&await o,tt(i)&&await n.options.notFoundComponent?.preload?.(),at(t,t.router.getMatch(e),i);try{n.options.onError?.(i)}catch(h){a=h,at(t,t.router.getMatch(e),h)}const c=Ft(t,e,n),u=c?await c:void 0;t.updateMatch(e,h=>({...h,error:a,status:"error",isFetching:!1,...u}))}}catch(r){const i=t.router.getMatch(e);if(i){const a=Ft(t,e,n);if(a){const o=await a;t.updateMatch(e,c=>({...c,...o}))}i._nonReactive.loaderPromise=void 0}at(t,i,r)}},Tr=async(t,e)=>{const{id:s,routeId:n}=t.matches[e];let r=!1,i=!1;const a=t.router.looseRoutesById[n];if(Zs(t,s)){if(t.router.isServer){const u=Ft(t,s,a);if(u){const h=await u;t.updateMatch(s,l=>({...l,...h}))}return t.router.getMatch(s)}}else{const u=t.router.getMatch(s);if(u._nonReactive.loaderPromise){if(u.status==="success"&&!t.sync&&!u.preload)return u;await u._nonReactive.loaderPromise;const h=t.router.getMatch(s),l=h._nonReactive.error||h.error;l&&at(t,h,l)}else{const h=Date.now()-u.updatedAt,l=ce(t,s),f=l?a.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:a.options.staleTime??t.router.options.defaultStaleTime??0,p=a.options.shouldReload,g=typeof p=="function"?p(en(t,s,e,a)):p,y=!!l&&!t.router.state.matches.some(w=>w.id===s),m=t.router.getMatch(s);m._nonReactive.loaderPromise=Ct(),y!==m.preload&&t.updateMatch(s,w=>({...w,preload:y}));const{status:v,invalid:R}=m;if(r=v==="success"&&(R||(g??h>f)),!(l&&a.options.preload===!1))if(r&&!t.sync)i=!0,(async()=>{try{await Ps(t,s,e,a);const w=t.router.getMatch(s);w._nonReactive.loaderPromise?.resolve(),w._nonReactive.loadPromise?.resolve(),w._nonReactive.loaderPromise=void 0}catch(w){nt(w)&&await t.router.navigate(w.options)}})();else if(v!=="success"||r&&t.sync)await Ps(t,s,e,a);else{const w=Ft(t,s,a);if(w){const E=await w;t.updateMatch(s,C=>({...C,...E}))}}}}const o=t.router.getMatch(s);i||(o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loadPromise?.resolve()),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0,i||(o._nonReactive.loaderPromise=void 0),o._nonReactive.dehydrated=void 0;const c=i?o.isFetching:!1;return c!==o.isFetching||o.invalid!==!1?(t.updateMatch(s,u=>({...u,isFetching:c,invalid:!1})),t.router.getMatch(s)):o};async function Cs(t){const e=Object.assign(t,{matchPromises:[]});!e.router.isServer&&e.router.state.matches.some(s=>s._forcePending)&&Vt(e);try{for(let r=0;r<e.matches.length;r++){const i=Lr(e,r);ut(i)&&await i}const s=e.firstBadMatchIndex??e.matches.length;for(let r=0;r<s;r++)e.matchPromises.push(Tr(e,r));await Promise.all(e.matchPromises);const n=Vt(e);ut(n)&&await n}catch(s){if(tt(s)&&!e.preload){const n=Vt(e);throw ut(n)&&await n,s}if(nt(s))throw s}return e.matches}async function sn(t){if(!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(e=>{const{id:s,...n}=e.options;Object.assign(t.options,n),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0),!t._componentsLoaded&&t._componentsPromise===void 0){const e=()=>{const s=[];for(const n of rn){const r=t.options[n]?.preload;r&&s.push(r())}if(s.length)return Promise.all(s).then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0});t._componentsLoaded=!0,t._componentsPromise=void 0};t._componentsPromise=t._lazyPromise?t._lazyPromise.then(e):e()}return t._componentsPromise}function qt(t,e){return e?{status:"error",error:e}:{status:"success",value:t}}function nn(t){for(const e of rn)if(t.options[e]?.preload)return!0;return!1}const rn=["component","errorComponent","pendingComponent","notFoundComponent"];function Ir(t){return{input:({url:e})=>{for(const s of t)e=on(s,e);return e},output:({url:e})=>{for(let s=t.length-1;s>=0;s--)e=an(t[s],e);return e}}}function kr(t){const e=zt(t.basepath),s=`/${e}`,n=`${s}/`,r=t.caseSensitive?s:s.toLowerCase(),i=t.caseSensitive?n:n.toLowerCase();return{input:({url:a})=>{const o=t.caseSensitive?a.pathname:a.pathname.toLowerCase();return o===r?a.pathname="/":o.startsWith(i)&&(a.pathname=a.pathname.slice(s.length)),a},output:({url:a})=>(a.pathname=Wt(["/",e,a.pathname]),a)}}function on(t,e){const s=t?.input?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function an(t,e){const s=t?.output?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function gt(t){const e=t.resolvedLocation,s=t.location,n=e?.pathname!==s.pathname,r=e?.href!==s.href,i=e?.hash!==s.hash;return{fromLocation:e,toLocation:s,pathChanged:n,hrefChanged:r,hashChanged:i}}class Fr{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=s=>s(),this.update=s=>{s.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const n=this.options,r=this.basepath??n?.basepath??"/",i=this.basepath===void 0,a=n?.rewrite;this.options={...n,...s},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(f=>[encodeURIComponent(f),f])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=Vn())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new Wn(Dr(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(f=>!["redirected"].includes(f.status))}}}),vr(this));let o=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(i||r!==c||a!==u){this.basepath=c;const f=[];zt(c)!==""&&f.push(kr({basepath:c})),u&&f.push(u),this.rewrite=f.length===0?void 0:f.length===1?f[0]:Ir(f),this.history&&this.updateLatestLocation(),o=!0}o&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:s,routesByPath:n,processedTree:r}=or(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});this.options.routeMasks&&er(this.options.routeMasks,r),this.routesById=s,this.routesByPath=n,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(s,n)=>{const r={eventType:s,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=s=>{this.subscribers.forEach(n=>{n.eventType===s.type&&n.fn(s)})},this.parseLocation=(s,n)=>{const r=({href:c,state:u})=>{const h=new URL(c,this.origin),l=on(this.rewrite,h),f=this.options.parseSearch(l.search),p=this.options.stringifySearch(f);l.search=p;const g=l.href.replace(l.origin,""),{pathname:y,hash:m}=l;return{href:g,publicHref:c,url:l.href,pathname:ws(y),searchStr:p,search:X(n?.search,f),hash:m.split("#").reverse()[0]??"",state:X(n?.state,u)}},i=r(s),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=r(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathCache=Zt(1e3),this.resolvePathWithBase=(s,n)=>fr({base:s,to:Ke(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,n,r)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:n},r):this.matchRoutesInternal(s,n),this.getMatchedRoutes=s=>jr({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const n=this.getMatch(s);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const s=this.state.matches.filter(i=>i.status==="pending"),n=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...s,...n]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=s=>{const n=(i={})=>{const a=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutes(a,{_buildLocation:!0}),c=Jt(o);i.from;const u=i.unsafeRelative==="path"?a.pathname:i.from??c.fullPath,h=this.resolvePathWithBase(u,"."),l=c.search,f={...c.params},p=i.to?this.resolvePathWithBase(h,`${i.to}`):this.resolvePathWithBase(h,"."),g=i.params===!1||i.params===null?{}:(i.params??!0)===!0?f:Object.assign(f,pt(i.params,f)),y=we({path:p,params:g}).interpolatedPath,m=this.matchRoutes(y,void 0,{_buildLocation:!0}).map(F=>this.looseRoutesById[F.routeId]);if(Object.keys(g).length>0)for(const F of m){const A=F.options.params?.stringify??F.options.stringifyParams;A&&Object.assign(g,A(g))}const v=s.leaveParams?p:ws(we({path:p,params:g,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let R=l;if(s._includeValidateSearch&&this.options.search?.strict){const F={};m.forEach(A=>{if(A.options.validateSearch)try{Object.assign(F,Fe(A.options.validateSearch,{...F,...R}))}catch{}}),R=F}R=Ur({search:R,dest:i,destRoutes:m,_includeValidateSearch:s._includeValidateSearch}),R=X(l,R);const w=this.options.stringifySearch(R),E=i.hash===!0?a.hash:i.hash?pt(i.hash,a.hash):void 0,C=E?`#${E}`:"";let P=i.state===!0?a.state:i.state?pt(i.state,a.state):{};P=X(a.state,P);const b=`${v}${w}${C}`,_=new URL(b,this.origin),O=an(this.rewrite,_);return{publicHref:O.pathname+O.search+O.hash,href:b,url:O.href,pathname:v,search:R,searchStr:w,state:P,hash:E??"",unmaskOnReload:i.unmaskOnReload}},r=(i={},a)=>{const o=n(i);let c=a?n(a):void 0;if(!c){const u={};if(this.options.routeMasks){const h=sr(o.pathname,this.processedTree);if(h){Object.assign(u,h.params);const{from:l,...f}=h.route;a={from:s.from,...f,params:u},c=n(a)}}}return c&&(o.maskedLocation=c),o};return s.mask?r(s,{from:s.from,...s.mask}):r(s)},this.commitLocation=({viewTransition:s,ignoreBlocker:n,...r})=>{const i=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{r.state[h]=this.latestLocation.state[h]});const u=mt(r.state,this.latestLocation.state);return c.forEach(h=>{delete r.state[h]}),u},a=yt(this.latestLocation.href)===yt(r.href),o=this.commitLocationPromise;if(this.commitLocationPromise=Ct(()=>{o?.resolve()}),a&&i())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,...h}=r;c&&(h={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[r.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:n})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:n,hashScrollIntoView:r,viewTransition:i,ignoreBlocker:a,href:o,...c}={})=>{if(o){const l=this.history.location.state.__TSR_index,f=Yt(o,{__TSR_index:s?l:l+1});c.to=f.pathname,c.search=this.options.parseSearch(f.search),c.hash=f.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const h=this.commitLocation({...u,viewTransition:i,replace:s,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:s,reloadDocument:n,href:r,...i})=>{if(!n&&r)try{new URL(`${r}`),n=!0}catch{}if(n){if(r||(r=this.buildLocation({to:s,...i}).url),!i.ignoreBlocker){const o=this.history.getBlockers?.()??[];for(const c of o)if(c?.blockerFn&&await c.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(r):window.location.href=r,Promise.resolve()}return this.buildAndCommitLocation({...i,href:r,to:s,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const n=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),r=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(zt(r(this.latestLocation.href))!==zt(r(n.href))){let i=n.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),xr({href:i})}}const s=this.matchRoutes(this.latestLocation);this.__store.setState(n=>({...n,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:s,cachedMatches:n.cachedMatches.filter(r=>!s.some(i=>i.id===r.id))}))},this.load=async s=>{let n,r,i;for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,u=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...gt({resolvedLocation:u,location:c})}),this.emit({type:"onBeforeLoad",...gt({resolvedLocation:u,location:c})}),await Cs({router:this,sync:s?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let h=[],l=[],f=[];kt(()=>{this.__store.setState(p=>{const g=p.matches,y=p.pendingMatches||p.matches;return h=g.filter(m=>!y.some(v=>v.id===m.id)),l=y.filter(m=>!g.some(v=>v.id===m.id)),f=y.filter(m=>g.some(v=>v.id===m.id)),{...p,isLoading:!1,loadedAt:Date.now(),matches:y,pendingMatches:void 0,cachedMatches:[...p.cachedMatches,...h.filter(m=>m.status!=="error"&&m.status!=="notFound")]}}),this.clearExpiredCache()}),[[h,"onLeave"],[l,"onEnter"],[f,"onStay"]].forEach(([p,g])=>{p.forEach(y=>{this.looseRoutesById[y.routeId].options[g]?.(y)})})})})}})}catch(c){nt(c)?(n=c,this.isServer||this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):tt(c)&&(r=c),this.__store.setState(u=>({...u,statusCode:n?n.status:r?404:u.matches.some(h=>h.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(o=>o.status==="error")&&(a=500),a!==void 0&&this.__store.setState(o=>({...o,statusCode:a}))},this.startViewTransition=s=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,a=this.state.resolvedLocation,o=typeof n.types=="function"?n.types(gt({resolvedLocation:a,location:i})):n.types;if(o===!1){s();return}r={update:s,types:o}}else r=s;document.startViewTransition(r)}else s()},this.updateMatch=(s,n)=>{this.startTransition(()=>{const r=this.state.pendingMatches?.some(i=>i.id===s)?"pendingMatches":this.state.matches.some(i=>i.id===s)?"matches":this.state.cachedMatches.some(i=>i.id===s)?"cachedMatches":"";r&&this.__store.setState(i=>({...i,[r]:i[r]?.map(a=>a.id===s?n(a):a)}))})},this.getMatch=s=>{const n=r=>r.id===s;return this.state.cachedMatches.find(n)??this.state.pendingMatches?.find(n)??this.state.matches.find(n)},this.invalidate=s=>{const n=r=>s?.filter?.(r)??!0?{...r,invalid:!0,...s?.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r;return this.__store.setState(r=>({...r,matches:r.matches.map(n),cachedMatches:r.cachedMatches.map(n),pendingMatches:r.pendingMatches?.map(n)})),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.resolveRedirect=s=>{if(!s.options.href){const n=this.buildLocation(s.options);let r=n.url;this.origin&&r.startsWith(this.origin)&&(r=r.replace(this.origin,"")||"/"),s.options.href=n.href,s.headers.set("Location",r)}return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const n=s?.filter;n!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(i=>!n(i))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const s=n=>{const r=this.looseRoutesById[n.routeId];if(!r.options.loader)return!0;const i=(n.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return n.status==="error"?!0:Date.now()-n.updatedAt>=i};this.clearCache({filter:s})},this.loadRouteChunk=sn,this.preloadRoute=async s=>{const n=this.buildLocation(s);let r=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:s});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),a=new Set([...i,...this.state.cachedMatches.map(o=>o.id)]);kt(()=>{r.forEach(o=>{a.has(o.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,o]}))})});try{return r=await Cs({router:this,matches:r,location:n,preload:!0,updateMatch:(o,c)=>{i.has(o)?r=r.map(u=>u.id===o?c(u):u):this.updateMatch(o,c)}}),r}catch(o){if(nt(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:n});tt(o)||console.error(o);return}},this.matchRoute=(s,n)=>{const r={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},i=this.buildLocation(r);if(n?.pending&&this.state.status!=="pending")return!1;const o=(n?.pending===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=nr(i.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,o.pathname,this.processedTree);return!c||s.params&&!mt(c.params,s.params,{partial:!0})?!1:n?.includeSearch??!0?mt(o.search,i.search,{partial:!0})?c.params:!1:c.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(s=>s.status==="notFound"||s.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??wr,parseSearch:e.parseSearch??br}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(e,s){const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n;let{matchedRoutes:a}=n,o=!1;(r?r.path!=="/"&&i["**"]:yt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);const c=(()=>{if(o){if(this.options.notFoundMode!=="root")for(let l=a.length-1;l>=0;l--){const f=a[l];if(f.children)return f.id}return Y}})(),u=[],h=l=>l?.id?l.context??this.options.context??void 0:this.options.context??void 0;return a.forEach((l,f)=>{const p=u[f-1],[g,y,m]=(()=>{const H=p?.search??e.search,V=p?._strictSearch??void 0;try{const $=Fe(l.options.validateSearch,{...H})??void 0;return[{...H,...$},{...V,...$},void 0]}catch($){let et=$;if($ instanceof ne||(et=new ne($.message,{cause:$})),s?.throwOnError)throw et;return[H,{},et]}})(),v=l.options.loaderDeps?.({search:g})??"",R=v?JSON.stringify(v):"",{interpolatedPath:w,usedParams:E}=we({path:l.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),C=l.id+w+R,P=this.getMatch(C),b=this.state.matches.find(H=>H.routeId===l.id),_=P?._strictParams??E;let O;if(!P){const H=l.options.params?.parse??l.options.parseParams;if(H)try{Object.assign(_,H(_))}catch(V){if(tt(V)||nt(V)?O=V:O=new Ar(V.message,{cause:V}),s?.throwOnError)throw O}}Object.assign(i,_);const F=b?"stay":"enter";let A;if(P)A={...P,cause:F,params:b?X(b.params,i):i,_strictParams:_,search:X(b?b.search:P.search,g),_strictSearch:y};else{const H=l.options.loader||l.options.beforeLoad||l.lazyFn||nn(l)?"pending":"success";A={id:C,ssr:this.isServer?void 0:l.options.ssr,index:f,routeId:l.id,params:b?X(b.params,i):i,_strictParams:_,pathname:w,updatedAt:Date.now(),search:b?X(b.search,g):g,_strictSearch:y,searchError:void 0,status:H,isFetching:!1,error:void 0,paramsError:O,__routeContext:void 0,_nonReactive:{loadPromise:Ct()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:b?X(b.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:l.options.staticData||{},fullPath:l.fullPath}}s?.preload||(A.globalNotFound=c===l.id),A.searchError=m;const Q=h(p);A.context={...Q,...A.__routeContext,...A.__beforeLoadContext},u.push(A)}),u.forEach((l,f)=>{const p=this.looseRoutesById[l.routeId];if(!this.getMatch(l.id)&&s?._buildLocation!==!0){const y=u[f-1],m=h(y);if(p.options.context){const v={deps:l.loaderDeps,params:l.params,context:m??{},location:e,navigate:R=>this.navigate({...R,_fromLocation:e}),buildLocation:this.buildLocation,cause:l.cause,abortController:l.abortController,preload:!!l.preload,matches:u};l.__routeContext=p.options.context(v)??void 0}l.context={...m,...l.__routeContext,...l.__beforeLoadContext}}}),u}}class ne extends Error{}class Ar extends Error{}function Dr(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Fe(t,e){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(e);if(s instanceof Promise)throw new ne("Async validation not supported");if(s.issues)throw new ne(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function jr({pathname:t,routesById:e,processedTree:s}){const n={},r=yt(t);let i;const a=rr(r,s,!0);return a&&(i=a.route,Object.assign(n,a.params)),{matchedRoutes:a?.branch||[e[Y]],routeParams:n,foundRoute:i}}function Ur({search:t,dest:e,destRoutes:s,_includeValidateSearch:n}){const r=s.reduce((o,c)=>{const u=[];if("search"in c.options)c.options.search?.middlewares&&u.push(...c.options.search.middlewares);else if(c.options.preSearchFilters||c.options.postSearchFilters){const h=({search:l,next:f})=>{let p=l;"preSearchFilters"in c.options&&c.options.preSearchFilters&&(p=c.options.preSearchFilters.reduce((y,m)=>m(y),l));const g=f(p);return"postSearchFilters"in c.options&&c.options.postSearchFilters?c.options.postSearchFilters.reduce((y,m)=>m(y),g):g};u.push(h)}if(n&&c.options.validateSearch){const h=({search:l,next:f})=>{const p=f(l);try{return{...p,...Fe(c.options.validateSearch,p)??void 0}}catch{return p}};u.push(h)}return o.concat(u)},[])??[],i=({search:o})=>e.search?e.search===!0?o:pt(e.search,o):{};r.push(i);const a=(o,c)=>{if(o>=r.length)return c;const u=r[o];return u({search:c,next:l=>a(o+1,l)})};return a(0,t)}const Nr="Error preloading route! ☝️";class cn{constructor(e){if(this.init=s=>{this.originalIndex=s.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Y:this.parentRoute||it(!1);let i=r?Y:n?.path;i&&i!=="/"&&(i=Ys(i));const a=n?.id||i;let o=r?Y:Wt([this.parentRoute.id===Y?"":this.parentRoute.id,a]);i===Y&&(i="/"),o!==Y&&(o=Wt(["/",o]));const c=o===Y?"/":Wt([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=c,this._to=c},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class Br extends cn{constructor(e){super(e)}}function We(t){const e=t.errorComponent??ue;return M.jsx($r,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:s,reset:n})=>s?x.createElement(e,{error:s,reset:n}):t.children})}class $r extends x.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,s){s.error&&s.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,s){this.props.onCatch&&this.props.onCatch(e,s)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ue({error:t}){const[e,s]=x.useState(!1);return M.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[M.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[M.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),M.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(n=>!n),children:e?"Hide Error":"Show Error"})]}),M.jsx("div",{style:{height:".25rem"}}),e?M.jsx("div",{children:M.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?M.jsx("code",{children:t.message}):null})}):null]})}function Qr({children:t,fallback:e=null}){return qr()?M.jsx(Pt.Fragment,{children:t}):M.jsx(Pt.Fragment,{children:e})}function qr(){return Pt.useSyncExternalStore(Hr,()=>!0,()=>!1)}function Hr(){return()=>{}}var Ce={exports:{}},xe={},Ee={exports:{}},Oe={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* use-sync-external-store-shim.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var xs;function Kr(){if(xs)return Oe;xs=1;var t=oe();function e(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var s=typeof Object.is=="function"?Object.is:e,n=t.useState,r=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function o(l,f){var p=f(),g=n({inst:{value:p,getSnapshot:f}}),y=g[0].inst,m=g[1];return i(function(){y.value=p,y.getSnapshot=f,c(y)&&m({inst:y})},[l,p,f]),r(function(){return c(y)&&m({inst:y}),l(function(){c(y)&&m({inst:y})})},[l]),a(p),p}function c(l){var f=l.getSnapshot;l=l.value;try{var p=f();return!s(l,p)}catch{return!0}}function u(l,f){return f()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return Oe.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,Oe}var Es;function Wr(){return Es||(Es=1,Ee.exports=Kr()),Ee.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Os;function zr(){if(Os)return xe;Os=1;var t=oe(),e=Wr();function s(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:s,r=e.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,c=t.useDebugValue;return xe.useSyncExternalStoreWithSelector=function(u,h,l,f,p){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=o(function(){function v(P){if(!R){if(R=!0,w=P,P=f(P),p!==void 0&&y.hasValue){var b=y.value;if(p(b,P))return E=b}return E=P}if(b=E,n(w,P))return b;var _=f(P);return p!==void 0&&p(b,_)?(w=P,b):(w=P,E=_)}var R=!1,w,E,C=l===void 0?null:l;return[function(){return v(h())},C===null?void 0:function(){return v(C())}]},[h,l,f,p]);var m=r(u,g[0],g[1]);return a(function(){y.hasValue=!0,y.value=m},[m]),c(m),m},xe}var Ms;function Vr(){return Ms||(Ms=1,Ce.exports=zr()),Ce.exports}var Gr=Vr();function Yr(t,e=n=>n,s={}){const n=s.equal??Jr;return Gr.useSyncExternalStoreWithSelector(t.subscribe,()=>t.state,()=>t.state,e,n)}function Jr(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[n,r]of t)if(!e.has(n)||!Object.is(r,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();const s=Ls(t);if(s.length!==Ls(e).length)return!1;for(let n=0;n<s.length;n++)if(!Object.prototype.hasOwnProperty.call(e,s[n])||!Object.is(t[s[n]],e[s[n]]))return!1;return!0}function Ls(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}const Me=x.createContext(null);function un(){return typeof document>"u"?Me:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Me,Me)}function J(t){const e=x.useContext(un());return t?.warn,e}function z(t){const e=J({warn:t?.router===void 0}),s=t?.router||e,n=x.useRef(void 0);return Yr(s.__store,r=>{if(t?.select){if(t.structuralSharing??s.options.defaultStructuralSharing){const i=X(n.current,t.select(r));return n.current=i,i}return t.select(r)}return r})}const le=x.createContext(void 0),Xr=x.createContext(void 0);function rt(t){const e=x.useContext(t.from?Xr:le);return z({select:n=>{const r=n.matches.find(i=>t.from?t.from===i.routeId:i.id===e);if(it(!((t.shouldThrow??!0)&&!r),`Could not find ${t.from?`an active match from "${t.from}"`:"a nearest match!"}`),r!==void 0)return t.select?t.select(r):r},structuralSharing:t.structuralSharing})}function ze(t){return rt({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function Ve(t){const{select:e,...s}=t;return rt({...s,select:n=>e?e(n.loaderDeps):n.loaderDeps})}function Ge(t){return rt({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const s=t.strict===!1?e.params:e._strictParams;return t.select?t.select(s):s}})}function Ye(t){return rt({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}const Ht=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Le(t){const e=x.useRef({value:t,prev:null}),s=e.current.value;return t!==s&&(e.current={value:t,prev:s}),e.current.prev}function Zr(t,e,s={},n={}){x.useEffect(()=>{if(!t.current||n.disabled||typeof IntersectionObserver!="function")return;const r=new IntersectionObserver(([i])=>{e(i)},s);return r.observe(t.current),()=>{r.disconnect()}},[e,s,n.disabled,t])}function ti(t){const e=x.useRef(null);return x.useImperativeHandle(t,()=>e.current,[]),e}function Je(t){const e=J();return x.useCallback(s=>e.navigate({...s,from:s.from??t?.from}),[t?.from,e])}var ln=$n();const Gi=zs(ln);function ei(t,e){const s=J(),[n,r]=x.useState(!1),i=x.useRef(!1),a=ti(e),{activeProps:o,inactiveProps:c,activeOptions:u,to:h,preload:l,preloadDelay:f,hashScrollIntoView:p,replace:g,startTransition:y,resetScroll:m,viewTransition:v,children:R,target:w,disabled:E,style:C,className:P,onClick:b,onFocus:_,onMouseEnter:O,onMouseLeave:F,onTouchStart:A,ignoreBlocker:Q,params:H,search:V,hash:$,state:et,mask:he,reloadDocument:fe,unsafeRelative:is,from:d,_fromLocation:S,...L}=t,T=z({select:U=>U.location.search,structuralSharing:!0}),D=t.from,j=x.useMemo(()=>({...t,from:D}),[s,T,D,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),I=x.useMemo(()=>s.buildLocation({...j}),[s,j]),G=x.useMemo(()=>{if(E)return;let U=I.maskedLocation?I.maskedLocation.url:I.url,q=!1;return s.origin&&(U.startsWith(s.origin)?U=s.history.createHref(U.replace(s.origin,""))||"/":q=!0),{href:U,external:q}},[E,I.maskedLocation,I.url,s.origin,s.history]),N=x.useMemo(()=>{if(G?.external)return G.href;try{return new URL(h),h}catch{}},[h,G]),ot=t.reloadDocument||N?!1:l??s.options.defaultPreload,de=f??s.options.defaultPreloadDelay??0,pe=z({select:U=>{if(N)return!1;if(u?.exact){if(!hr(U.location.pathname,I.pathname,s.basepath))return!1}else{const q=te(U.location.pathname,s.basepath),st=te(I.pathname,s.basepath);if(!(q.startsWith(st)&&(q.length===st.length||q[st.length]==="/")))return!1}return(u?.includeSearch??!0)&&!mt(U.location.search,I.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?U.location.hash===I.hash:!0}}),ht=x.useCallback(()=>{s.preloadRoute({...j}).catch(U=>{console.warn(U),console.warn(Nr)})},[s,j]),Tn=x.useCallback(U=>{U?.isIntersecting&&ht()},[ht]);Zr(a,Tn,oi,{disabled:!!E||ot!=="viewport"}),x.useEffect(()=>{i.current||!E&&ot==="render"&&(ht(),i.current=!0)},[E,ht,ot]);const In=U=>{const q=U.currentTarget.getAttribute("target"),st=w!==void 0?w:q;if(!E&&!ai(U)&&!U.defaultPrevented&&(!st||st==="_self")&&U.button===0){U.preventDefault(),ln.flushSync(()=>{r(!0)});const us=s.subscribe("onResolved",()=>{us(),r(!1)});s.navigate({...j,replace:g,resetScroll:m,hashScrollIntoView:p,startTransition:y,viewTransition:v,ignoreBlocker:Q})}};if(N)return{...L,ref:a,href:N,...R&&{children:R},...w&&{target:w},...E&&{disabled:E},...C&&{style:C},...P&&{className:P},...b&&{onClick:b},..._&&{onFocus:_},...O&&{onMouseEnter:O},...F&&{onMouseLeave:F},...A&&{onTouchStart:A}};const os=U=>{E||ot&&ht()},kn=os,Fn=U=>{if(!(E||!ot))if(!de)ht();else{const q=U.target;if(Mt.has(q))return;const st=setTimeout(()=>{Mt.delete(q),ht()},de);Mt.set(q,st)}},An=U=>{if(E||!ot||!de)return;const q=U.target,st=Mt.get(q);st&&(clearTimeout(st),Mt.delete(q))},Nt=pe?pt(o,{})??si:Te,Bt=pe?Te:pt(c,{})??Te,as=[P,Nt.className,Bt.className].filter(Boolean).join(" "),cs=(C||Nt.style||Bt.style)&&{...C,...Nt.style,...Bt.style};return{...L,...Nt,...Bt,href:G?.href,ref:a,onClick:Lt([b,In]),onFocus:Lt([_,os]),onMouseEnter:Lt([O,Fn]),onMouseLeave:Lt([F,An]),onTouchStart:Lt([A,kn]),disabled:!!E,target:w,...cs&&{style:cs},...as&&{className:as},...E&&ni,...pe&&ri,...n&&ii}}const Te={},si={className:"active"},ni={role:"link","aria-disabled":!0},ri={"data-status":"active","aria-current":"page"},ii={"data-transitioning":"transitioning"},Mt=new WeakMap,oi={rootMargin:"100px"},Lt=t=>e=>{for(const s of t)if(s){if(e.defaultPrevented)return;s(e)}},hn=x.forwardRef((t,e)=>{const{_asChild:s,...n}=t,{type:r,ref:i,...a}=ei(n,e),o=typeof n.children=="function"?n.children({isActive:a["data-status"]==="active"}):n.children;return s===void 0&&delete a.disabled,x.createElement(s||"a",{...a,ref:i},o)});function ai(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}class ci extends cn{constructor(e){super(e),this.useMatch=s=>rt({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>rt({...s,from:this.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>Ye({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>Ge({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>Ve({...s,from:this.id}),this.useLoaderData=s=>ze({...s,from:this.id}),this.useNavigate=()=>Je({from:this.fullPath}),this.Link=Pt.forwardRef((s,n)=>M.jsx(hn,{ref:n,from:this.fullPath,...s})),this.$$typeof=Symbol.for("react.memo")}}function ui(t){return new ci(t)}class li extends Br{constructor(e){super(e),this.useMatch=s=>rt({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>rt({...s,from:this.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>Ye({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>Ge({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>Ve({...s,from:this.id}),this.useLoaderData=s=>ze({...s,from:this.id}),this.useNavigate=()=>Je({from:this.fullPath}),this.Link=Pt.forwardRef((s,n)=>M.jsx(hn,{ref:n,from:this.fullPath,...s})),this.$$typeof=Symbol.for("react.memo")}}function Yi(t){return new li(t)}function Ts(t){return typeof t=="object"?new Is(t,{silent:!0}).createRoute(t):new Is(t,{silent:!0}).createRoute}class Is{constructor(e,s){this.path=e,this.createRoute=n=>{this.silent;const r=ui(n);return r.isRoot=!1,r},this.silent=s?.silent}}class ks{constructor(e){this.useMatch=s=>rt({select:s?.select,from:this.options.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>rt({from:this.options.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>Ye({select:s?.select,structuralSharing:s?.structuralSharing,from:this.options.id}),this.useParams=s=>Ge({select:s?.select,structuralSharing:s?.structuralSharing,from:this.options.id}),this.useLoaderDeps=s=>Ve({...s,from:this.options.id}),this.useLoaderData=s=>ze({...s,from:this.options.id}),this.useNavigate=()=>{const s=J();return Je({from:s.routesById[this.options.id].fullPath})},this.options=e,this.$$typeof=Symbol.for("react.memo")}}function Fs(t){return typeof t=="object"?new ks(t):e=>new ks({id:t,...e})}function hi(){const t=J(),e=x.useRef({router:t,mounted:!1}),[s,n]=x.useState(!1),{hasPendingMatches:r,isLoading:i}=z({select:l=>({isLoading:l.isLoading,hasPendingMatches:l.matches.some(f=>f.status==="pending")}),structuralSharing:!0}),a=Le(i),o=i||s||r,c=Le(o),u=i||r,h=Le(u);return t.startTransition=l=>{n(!0),x.startTransition(()=>{l(),n(!1)})},x.useEffect(()=>{const l=t.history.subscribe(t.load),f=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return yt(t.latestLocation.href)!==yt(f.href)&&t.commitLocation({...f,replace:!0}),()=>{l()}},[t,t.history]),Ht(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(f){console.error(f)}})()},[t]),Ht(()=>{a&&!i&&t.emit({type:"onLoad",...gt(t.state)})},[a,t,i]),Ht(()=>{h&&!u&&t.emit({type:"onBeforeRouteMount",...gt(t.state)})},[u,h,t]),Ht(()=>{if(c&&!o){const l=gt(t.state);t.emit({type:"onResolved",...l}),t.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),l.hrefChanged&&Sr(t)}},[o,c,t]),null}function fi(t){const e=z({select:s=>`not-found-${s.location.pathname}-${s.status}`});return M.jsx(We,{getResetKey:()=>e,onCatch:(s,n)=>{if(tt(s))t.onCatch?.(s,n);else throw s},errorComponent:({error:s})=>{if(tt(s))return t.fallback?.(s);throw s},children:t.children})}function di(){return M.jsx("p",{children:"Not Found"})}function wt(t){return M.jsx(M.Fragment,{children:t.children})}function fn(t,e,s){return e.options.notFoundComponent?M.jsx(e.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?M.jsx(t.options.defaultNotFoundComponent,{...s}):M.jsx(di,{})}function pi({children:t}){const e=J();return e.isServer?M.jsx("script",{nonce:e.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:t+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function mi(){const t=J();if(!t.isScrollRestoring||!t.isServer||typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return null;const s=(t.options.getScrollRestorationKey||ke)(t.latestLocation),n=s!==ke(t.latestLocation)?s:void 0,r={storageKey:ee,shouldScrollRestoration:!0};return n&&(r.key=n),M.jsx(pi,{children:`(${Js.toString()})(${JSON.stringify(r)})`})}const dn=x.memo(function({matchId:e}){const s=J(),n=z({select:v=>{const R=v.matches.find(w=>w.id===e);return it(R),{routeId:R.routeId,ssr:R.ssr,_displayPending:R._displayPending}},structuralSharing:!0}),r=s.routesById[n.routeId],i=r.options.pendingComponent??s.options.defaultPendingComponent,a=i?M.jsx(i,{}):null,o=r.options.errorComponent??s.options.defaultErrorComponent,c=r.options.onCatch??s.options.defaultOnCatch,u=r.isRoot?r.options.notFoundComponent??s.options.notFoundRoute?.options.component:r.options.notFoundComponent,h=n.ssr===!1||n.ssr==="data-only",l=(!r.isRoot||r.options.wrapInSuspense||h)&&(r.options.wrapInSuspense??i??(r.options.errorComponent?.preload||h))?x.Suspense:wt,f=o?We:wt,p=u?fi:wt,g=z({select:v=>v.loadedAt}),y=z({select:v=>{const R=v.matches.findIndex(w=>w.id===e);return v.matches[R-1]?.routeId}}),m=r.isRoot?r.options.shellComponent??wt:wt;return M.jsxs(m,{children:[M.jsx(le.Provider,{value:e,children:M.jsx(l,{fallback:a,children:M.jsx(f,{getResetKey:()=>g,errorComponent:o||ue,onCatch:(v,R)=>{if(tt(v))throw v;c?.(v,R)},children:M.jsx(p,{fallback:v=>{if(!u||v.routeId&&v.routeId!==n.routeId||!v.routeId&&!r.isRoot)throw v;return x.createElement(u,v)},children:h||n._displayPending?M.jsx(Qr,{fallback:a,children:M.jsx(As,{matchId:e})}):M.jsx(As,{matchId:e})})})})}),y===Y&&s.options.scrollRestoration?M.jsxs(M.Fragment,{children:[M.jsx(yi,{}),M.jsx(mi,{})]}):null]})});function yi(){const t=J(),e=x.useRef(void 0);return M.jsx("script",{suppressHydrationWarning:!0,ref:s=>{s&&(e.current===void 0||e.current.href!==t.latestLocation.href)&&(t.emit({type:"onRendered",...gt(t.state)}),e.current=t.latestLocation)}},t.latestLocation.state.__TSR_key)}const As=x.memo(function({matchId:e}){const s=J(),{match:n,key:r,routeId:i}=z({select:c=>{const u=c.matches.find(g=>g.id===e),h=u.routeId,f=(s.routesById[h].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:h,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:f?JSON.stringify(f):void 0,routeId:h,match:{id:u.id,status:u.status,error:u.error,_forcePending:u._forcePending,_displayPending:u._displayPending}}},structuralSharing:!0}),a=s.routesById[i],o=x.useMemo(()=>{const c=a.options.component??s.options.defaultComponent;return c?M.jsx(c,{},r):M.jsx(gi,{})},[r,a.options.component,s.options.defaultComponent]);if(n._displayPending)throw s.getMatch(n.id)?._nonReactive.displayPendingPromise;if(n._forcePending)throw s.getMatch(n.id)?._nonReactive.minPendingPromise;if(n.status==="pending"){const c=a.options.pendingMinMs??s.options.defaultPendingMinMs;if(c){const u=s.getMatch(n.id);if(u&&!u._nonReactive.minPendingPromise&&!s.isServer){const h=Ct();u._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),u._nonReactive.minPendingPromise=void 0},c)}}throw s.getMatch(n.id)?._nonReactive.loadPromise}if(n.status==="notFound")return it(tt(n.error)),fn(s,a,n.error);if(n.status==="redirected")throw it(nt(n.error)),s.getMatch(n.id)?._nonReactive.loadPromise;if(n.status==="error"){if(s.isServer){const c=(a.options.errorComponent??s.options.defaultErrorComponent)||ue;return M.jsx(c,{error:n.error,reset:void 0,info:{componentStack:""}})}throw n.error}return o}),gi=x.memo(function(){const e=J(),s=x.useContext(le),n=z({select:u=>u.matches.find(h=>h.id===s)?.routeId}),r=e.routesById[n],i=z({select:u=>{const l=u.matches.find(f=>f.id===s);return it(l),l.globalNotFound}}),a=z({select:u=>{const h=u.matches,l=h.findIndex(f=>f.id===s);return h[l+1]?.id}}),o=e.options.defaultPendingComponent?M.jsx(e.options.defaultPendingComponent,{}):null;if(i)return fn(e,r,void 0);if(!a)return null;const c=M.jsx(dn,{matchId:a});return n===Y?M.jsx(x.Suspense,{fallback:o,children:c}):c});function vi(){const t=J(),s=t.routesById[Y].options.pendingComponent??t.options.defaultPendingComponent,n=s?M.jsx(s,{}):null,r=t.isServer||typeof document<"u"&&t.ssr?wt:x.Suspense,i=M.jsxs(r,{fallback:n,children:[!t.isServer&&M.jsx(hi,{}),M.jsx(Si,{})]});return t.options.InnerWrap?M.jsx(t.options.InnerWrap,{children:i}):i}function Si(){const t=J(),e=z({select:r=>r.matches[0]?.id}),s=z({select:r=>r.loadedAt}),n=e?M.jsx(dn,{matchId:e}):null;return M.jsx(le.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?n:M.jsx(We,{getResetKey:()=>s,errorComponent:ue,onCatch:r=>{r.message||r.toString()},children:n})})}const Ji=t=>new Ri(t);class Ri extends Fr{constructor(e){super(e)}}typeof globalThis<"u"?(globalThis.createFileRoute=Ts,globalThis.createLazyFileRoute=Fs):typeof window<"u"&&(window.createFileRoute=Ts,window.createLazyFileRoute=Fs);function _i({router:t,children:e,...s}){Object.keys(s).length>0&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const n=un(),r=M.jsx(n.Provider,{value:t,children:e});return t.options.Wrap?M.jsx(t.options.Wrap,{children:r}):r}function Xi({router:t,...e}){return M.jsx(_i,{router:t,...e,children:M.jsx(vi,{})})}var bt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},bi={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},wi=class{#e=bi;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},dt=new wi;function Pi(t){setTimeout(t,0)}var Rt=typeof window>"u"||"Deno"in globalThis;function W(){}function Ci(t,e){return typeof t=="function"?t(e):t}function Ae(t){return typeof t=="number"&&t>=0&&t!==1/0}function pn(t,e){return Math.max(t+(e||0)-Date.now(),0)}function lt(t,e){return typeof t=="function"?t(e):t}function Z(t,e){return typeof t=="function"?t(e):t}function Ds(t,e){const{type:s="all",exact:n,fetchStatus:r,predicate:i,queryKey:a,stale:o}=t;if(a){if(n){if(e.queryHash!==Xe(a,e.options))return!1}else if(!jt(e.queryKey,a))return!1}if(s!=="all"){const c=e.isActive();if(s==="active"&&!c||s==="inactive"&&c)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||r&&r!==e.state.fetchStatus||i&&!i(e))}function js(t,e){const{exact:s,status:n,predicate:r,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(s){if(_t(e.options.mutationKey)!==_t(i))return!1}else if(!jt(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||r&&!r(e))}function Xe(t,e){return(e?.queryKeyHashFn||_t)(t)}function _t(t){return JSON.stringify(t,(e,s)=>De(s)?Object.keys(s).sort().reduce((n,r)=>(n[r]=s[r],n),{}):s)}function jt(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>jt(t[s],e[s])):!1}var xi=Object.prototype.hasOwnProperty;function Ze(t,e){if(t===e)return t;const s=Us(t)&&Us(e);if(!s&&!(De(t)&&De(e)))return e;const r=(s?t:Object.keys(t)).length,i=s?e:Object.keys(e),a=i.length,o=s?new Array(a):{};let c=0;for(let u=0;u<a;u++){const h=s?u:i[u],l=t[h],f=e[h];if(l===f){o[h]=l,(s?u<r:xi.call(t,h))&&c++;continue}if(l===null||f===null||typeof l!="object"||typeof f!="object"){o[h]=f;continue}const p=Ze(l,f);o[h]=p,p===l&&c++}return r===a&&c===r?t:o}function Ut(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function Us(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function De(t){if(!Ns(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!Ns(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Ns(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ei(t){return new Promise(e=>{dt.setTimeout(e,t)})}function je(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?Ze(t,e):e}function Oi(t,e,s=0){const n=[...t,e];return s&&n.length>s?n.slice(1):n}function Mi(t,e,s=0){const n=[e,...t];return s&&n.length>s?n.slice(0,-1):n}var ts=Symbol();function mn(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===ts?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function yn(t,e){return typeof t=="function"?t(...e):!!t}var Li=class extends bt{#e;#t;#s;constructor(){super(),this.#s=t=>{if(!Rt&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},es=new Li;function Ue(){let t,e;const s=new Promise((r,i)=>{t=r,e=i});s.status="pending",s.catch(()=>{});function n(r){Object.assign(s,r),delete s.resolve,delete s.reject}return s.resolve=r=>{n({status:"fulfilled",value:r}),t(r)},s.reject=r=>{n({status:"rejected",reason:r}),e(r)},s}var Ti=Pi;function Ii(){let t=[],e=0,s=o=>{o()},n=o=>{o()},r=Ti;const i=o=>{e?t.push(o):r(()=>{s(o)})},a=()=>{const o=t;t=[],o.length&&r(()=>{n(()=>{o.forEach(c=>{s(c)})})})};return{batch:o=>{let c;e++;try{c=o()}finally{e--,e||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{r=o}}}var B=Ii(),ki=class extends bt{#e=!0;#t;#s;constructor(){super(),this.#s=t=>{if(!Rt&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#e}},re=new ki;function Fi(t){return Math.min(1e3*2**t,3e4)}function gn(t){return(t??"online")==="online"?re.isOnline():!0}var Ne=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function vn(t){let e=!1,s=0,n;const r=Ue(),i=()=>r.status!=="pending",a=y=>{if(!i()){const m=new Ne(y);f(m),t.onCancel?.(m)}},o=()=>{e=!0},c=()=>{e=!1},u=()=>es.isFocused()&&(t.networkMode==="always"||re.isOnline())&&t.canRun(),h=()=>gn(t.networkMode)&&t.canRun(),l=y=>{i()||(n?.(),r.resolve(y))},f=y=>{i()||(n?.(),r.reject(y))},p=()=>new Promise(y=>{n=m=>{(i()||u())&&y(m)},t.onPause?.()}).then(()=>{n=void 0,i()||t.onContinue?.()}),g=()=>{if(i())return;let y;const m=s===0?t.initialPromise:void 0;try{y=m??t.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(l).catch(v=>{if(i())return;const R=t.retry??(Rt?0:3),w=t.retryDelay??Fi,E=typeof w=="function"?w(s,v):w,C=R===!0||typeof R=="number"&&s<R||typeof R=="function"&&R(s,v);if(e||!C){f(v);return}s++,t.onFail?.(s,v),Ei(E).then(()=>u()?void 0:p()).then(()=>{e?f(v):g()})})};return{promise:r,status:()=>r.status,cancel:a,continue:()=>(n?.(),r),cancelRetry:o,continueRetry:c,canStart:h,start:()=>(h()?g():p().then(g),r)}}var Sn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ae(this.gcTime)&&(this.#e=dt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Rt?1/0:300*1e3))}clearGcTimeout(){this.#e&&(dt.clearTimeout(this.#e),this.#e=void 0)}},Ai=class extends Sn{#e;#t;#s;#r;#n;#i;#a;constructor(t){super(),this.#a=!1,this.#i=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#s=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=$s(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#i,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=$s(this.options);e.data!==void 0&&(this.setState(Bs(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(t,e){const s=je(this.state.data,t,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(W).catch(W):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>Z(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ts||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>lt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!pn(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#n&&(this.#a?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){const o=this.observers.find(c=>c.options.queryFn);o&&this.setOptions(o.options)}const s=new AbortController,n=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},r=()=>{const o=mn(this.options,e),u=(()=>{const h={client:this.#r,queryKey:this.queryKey,meta:this.meta};return n(h),h})();return this.#a=!1,this.options.persister?this.options.persister(o,u,this):o(u)},a=(()=>{const o={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:r};return n(o),o})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#o({type:"fetch",meta:a.fetchOptions?.meta}),this.#n=vn({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:o=>{o instanceof Ne&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(o,c)=>{this.#o({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const o=await this.#n.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#s.config.onSuccess?.(o,this),this.#s.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof Ne){if(o.silent)return this.#n.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#o({type:"error",error:o}),this.#s.config.onError?.(o,this),this.#s.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#o(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Rn(s.data,this.options),fetchMeta:t.meta??null};case"success":const n={...s,...Bs(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?n:void 0,n;case"error":const r=t.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),B.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function Rn(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gn(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Bs(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $s(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,n=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var ss=class extends bt{constructor(t,e){super(),this.options=e,this.#e=t,this.#o=null,this.#a=Ue(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#s=void 0;#r=void 0;#n;#i;#a;#o;#d;#h;#f;#u;#l;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Qs(this.#t,this.options)?this.#p():this.updateResult(),this.#S())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Be(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Be(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#_(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Z(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#t.setOptions(this.options),e._defaulted&&!Ut(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const n=this.hasListeners();n&&qs(this.#t,s,this.options,e)&&this.#p(),this.updateResult(),n&&(this.#t!==s||Z(this.options.enabled,this.#t)!==Z(e.enabled,this.#t)||lt(this.options.staleTime,this.#t)!==lt(e.staleTime,this.#t))&&this.#y();const r=this.#g();n&&(this.#t!==s||Z(this.options.enabled,this.#t)!==Z(e.enabled,this.#t)||r!==this.#c)&&this.#v(r)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(e,t);return ji(this,s)&&(this.#r=s,this.#i=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(s,n)=>(this.trackProp(n),e?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,n))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#p({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#p(t){this.#b();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(W)),e}#y(){this.#R();const t=lt(this.options.staleTime,this.#t);if(Rt||this.#r.isStale||!Ae(t))return;const s=pn(this.#r.dataUpdatedAt,t)+1;this.#u=dt.setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(t){this.#_(),this.#c=t,!(Rt||Z(this.options.enabled,this.#t)===!1||!Ae(this.#c)||this.#c===0)&&(this.#l=dt.setInterval(()=>{(this.options.refetchIntervalInBackground||es.isFocused())&&this.#p()},this.#c))}#S(){this.#y(),this.#v(this.#g())}#R(){this.#u&&(dt.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#l&&(dt.clearInterval(this.#l),this.#l=void 0)}createResult(t,e){const s=this.#t,n=this.options,r=this.#r,i=this.#n,a=this.#i,c=t!==s?t.state:this.#s,{state:u}=t;let h={...u},l=!1,f;if(e._optimisticResults){const _=this.hasListeners(),O=!_&&Qs(t,e),F=_&&qs(t,s,e,n);(O||F)&&(h={...h,...Rn(u.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:y}=h;f=h.data;let m=!1;if(e.placeholderData!==void 0&&f===void 0&&y==="pending"){let _;r?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(_=r.data,m=!0):_=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,_!==void 0&&(y="success",f=je(r?.data,_,e),l=!0)}if(e.select&&f!==void 0&&!m)if(r&&f===i?.data&&e.select===this.#d)f=this.#h;else try{this.#d=e.select,f=e.select(f),f=je(r?.data,f,e),this.#h=f,this.#o=null}catch(_){this.#o=_}this.#o&&(p=this.#o,f=this.#h,g=Date.now(),y="error");const v=h.fetchStatus==="fetching",R=y==="pending",w=y==="error",E=R&&v,C=f!==void 0,b={status:y,fetchStatus:h.fetchStatus,isPending:R,isSuccess:y==="success",isError:w,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!R,isLoadingError:w&&!C,isPaused:h.fetchStatus==="paused",isPlaceholderData:l,isRefetchError:w&&C,isStale:ns(t,e),refetch:this.refetch,promise:this.#a,isEnabled:Z(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const _=A=>{b.status==="error"?A.reject(b.error):b.data!==void 0&&A.resolve(b.data)},O=()=>{const A=this.#a=b.promise=Ue();_(A)},F=this.#a;switch(F.status){case"pending":t.queryHash===s.queryHash&&_(F);break;case"fulfilled":(b.status==="error"||b.data!==F.value)&&O();break;case"rejected":(b.status!=="error"||b.error!==F.reason)&&O();break}}return b}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#i=this.options,this.#n.data!==void 0&&(this.#f=this.#t),Ut(e,t))return;this.#r=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,r=typeof n=="function"?n():n;if(r==="all"||!r&&!this.#m.size)return!0;const i=new Set(r??this.#m);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(a=>{const o=a;return this.#r[o]!==t[o]&&i.has(o)})};this.#w({listeners:s()})}#b(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#S()}#w(t){B.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Di(t,e){return Z(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Qs(t,e){return Di(t,e)||t.state.data!==void 0&&Be(t,e,e.refetchOnMount)}function Be(t,e,s){if(Z(e.enabled,t)!==!1&<(e.staleTime,t)!=="static"){const n=typeof s=="function"?s(t):s;return n==="always"||n!==!1&&ns(t,e)}return!1}function qs(t,e,s,n){return(t!==e||Z(n.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&ns(t,s)}function ns(t,e){return Z(e.enabled,t)!==!1&&t.isStaleByTime(lt(e.staleTime,t))}function ji(t,e){return!Ut(t.getCurrentResult(),e)}function Hs(t){return{onFetch:(e,s)=>{const n=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,i=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const l=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(e.signal.aborted?h=!0:e.signal.addEventListener("abort",()=>{h=!0}),e.signal)})},f=mn(e.options,e.fetchOptions),p=async(g,y,m)=>{if(h)return Promise.reject();if(y==null&&g.pages.length)return Promise.resolve(g);const R=(()=>{const P={client:e.client,queryKey:e.queryKey,pageParam:y,direction:m?"backward":"forward",meta:e.options.meta};return l(P),P})(),w=await f(R),{maxPages:E}=e.options,C=m?Mi:Oi;return{pages:C(g.pages,w,E),pageParams:C(g.pageParams,y,E)}};if(r&&i.length){const g=r==="backward",y=g?Ui:Ks,m={pages:i,pageParams:a},v=y(n,m);o=await p(m,v,g)}else{const g=t??i.length;do{const y=c===0?a[0]??n.initialPageParam:Ks(n,o);if(c>0&&y==null)break;o=await p(o,y),c++}while(c<g)}return o};e.options.persister?e.fetchFn=()=>e.options.persister?.(u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=u}}}function Ks(t,{pages:e,pageParams:s}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,s[n],s):void 0}function Ui(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}var Ni=class extends Sn{#e;#t;#s;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#t=[],this.state=t.state||_n(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#n({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=vn({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(i,a)=>{this.#n({type:"failed",failureCount:i,error:a})},onPause:()=>{this.#n({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const n=this.state.status==="pending",r=!this.#r.canStart();try{if(n)e();else{this.#n({type:"pending",variables:t,isPaused:r}),await this.#s.config.onMutate?.(t,this,s);const a=await this.options.onMutate?.(t,s);a!==this.state.context&&this.#n({type:"pending",context:a,variables:t,isPaused:r})}const i=await this.#r.start();return await this.#s.config.onSuccess?.(i,t,this.state.context,this,s),await this.options.onSuccess?.(i,t,this.state.context,s),await this.#s.config.onSettled?.(i,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(i,null,t,this.state.context,s),this.#n({type:"success",data:i}),i}catch(i){try{throw await this.#s.config.onError?.(i,t,this.state.context,this,s),await this.options.onError?.(i,t,this.state.context,s),await this.#s.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(void 0,i,t,this.state.context,s),i}finally{this.#n({type:"error",error:i})}}finally{this.#s.runNext(this)}}#n(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),B.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function _n(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bi=class extends bt{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#s=0}#e;#t;#s;build(t,e,s){const n=new Ni({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(n),n}add(t){this.#e.add(t);const e=Kt(t);if(typeof e=="string"){const s=this.#t.get(e);s?s.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Kt(t);if(typeof e=="string"){const s=this.#t.get(e);if(s)if(s.length>1){const n=s.indexOf(t);n!==-1&&s.splice(n,1)}else s[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Kt(t);if(typeof e=="string"){const n=this.#t.get(e)?.find(r=>r.state.status==="pending");return!n||n===t}else return!0}runNext(t){const e=Kt(t);return typeof e=="string"?this.#t.get(e)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){B.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>js(e,s))}findAll(t={}){return this.getAll().filter(e=>js(t,e))}notify(t){B.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return B.batch(()=>Promise.all(t.map(e=>e.continue().catch(W))))}};function Kt(t){return t.options.scope?.id}var $i=class extends bt{#e;#t=void 0;#s;#r;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#e.defaultMutationOptions(t),Ut(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&_t(e.mutationKey)!==_t(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#n(),this.#i(t)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#n(),this.#i()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(t)}#n(){const t=this.#s?.state??_n();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#i(t){B.batch(()=>{if(this.#r&&this.hasListeners()){const e=this.#t.variables,s=this.#t.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#r.onSuccess?.(t.data,e,s,n),this.#r.onSettled?.(t.data,null,e,s,n)):t?.type==="error"&&(this.#r.onError?.(t.error,e,s,n),this.#r.onSettled?.(void 0,t.error,e,s,n))}this.listeners.forEach(e=>{e(this.#t)})})}};function Ws(t,e){const s=new Set(e);return t.filter(n=>!s.has(n))}function Qi(t,e,s){const n=t.slice(0);return n[e]=s,n}var qi=class extends bt{#e;#t;#s;#r;#n;#i;#a;#o;#d=[];constructor(t,e,s){super(),this.#e=t,this.#r=s,this.#s=[],this.#n=[],this.#t=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#n.forEach(t=>{t.subscribe(e=>{this.#l(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#n.forEach(t=>{t.destroy()})}setQueries(t,e){this.#s=t,this.#r=e,B.batch(()=>{const s=this.#n,n=this.#u(this.#s);this.#d=n,n.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const r=n.map(h=>h.observer),i=r.map(h=>h.getCurrentResult()),a=s.length!==r.length,o=r.some((h,l)=>h!==s[l]),c=a||o,u=c?!0:i.some((h,l)=>{const f=this.#t[l];return!f||!Ut(h,f)});!c&&!u||(c&&(this.#n=r),this.#t=i,this.hasListeners()&&(c&&(Ws(s,r).forEach(h=>{h.destroy()}),Ws(r,s).forEach(h=>{h.subscribe(l=>{this.#l(h,l)})})),this.#c()))})}getCurrentResult(){return this.#t}getQueries(){return this.#n.map(t=>t.getCurrentQuery())}getObservers(){return this.#n}getOptimisticResult(t,e){const s=this.#u(t),n=s.map(r=>r.observer.getOptimisticResult(r.defaultedQueryOptions));return[n,r=>this.#f(r??n,e),()=>this.#h(n,s)]}#h(t,e){return e.map((s,n)=>{const r=t[n];return s.defaultedQueryOptions.notifyOnChangeProps?r:s.observer.trackResult(r,i=>{e.forEach(a=>{a.observer.trackProp(i)})})})}#f(t,e){return e?((!this.#i||this.#t!==this.#o||e!==this.#a)&&(this.#a=e,this.#o=this.#t,this.#i=Ze(this.#i,e(t))),this.#i):t}#u(t){const e=new Map(this.#n.map(n=>[n.options.queryHash,n])),s=[];return t.forEach(n=>{const r=this.#e.defaultQueryOptions(n),i=e.get(r.queryHash);i?s.push({defaultedQueryOptions:r,observer:i}):s.push({defaultedQueryOptions:r,observer:new ss(this.#e,r)})}),s}#l(t,e){const s=this.#n.indexOf(t);s!==-1&&(this.#t=Qi(this.#t,s,e),this.#c())}#c(){if(this.hasListeners()){const t=this.#i,e=this.#h(this.#t,this.#d),s=this.#f(e,this.#r?.combine);t!==s&&B.batch(()=>{this.listeners.forEach(n=>{n(this.#t)})})}}},Hi=class extends bt{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,s){const n=e.queryKey,r=e.queryHash??Xe(n,e);let i=this.get(r);return i||(i=new Ai({client:t,queryKey:n,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(n)}),this.add(i)),i}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){B.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>Ds(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>Ds(t,s)):e}notify(t){B.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){B.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){B.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Zi=class{#e;#t;#s;#r;#n;#i;#a;#o;constructor(t={}){this.#e=t.queryCache||new Hi,this.#t=t.mutationCache||new Bi,this.#s=t.defaultOptions||{},this.#r=new Map,this.#n=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=es.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=re.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#e.build(this,e),n=s.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(lt(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:s})=>{const n=s.data;return[e,n]})}setQueryData(t,e,s){const n=this.defaultQueryOptions({queryKey:t}),i=this.#e.get(n.queryHash)?.state.data,a=Ci(e,i);if(a!==void 0)return this.#e.build(this,n).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return B.batch(()=>this.#e.findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;B.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#e;return B.batch(()=>(s.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},n=B.batch(()=>this.#e.findAll(t).map(r=>r.cancel(s)));return Promise.all(n).then(W).catch(W)}invalidateQueries(t,e={}){return B.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},n=B.batch(()=>this.#e.findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,s);return s.throwOnError||(i=i.catch(W)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(W)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#e.build(this,e);return s.isStaleByTime(lt(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(W).catch(W)}fetchInfiniteQuery(t){return t.behavior=Hs(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(W).catch(W)}ensureInfiniteQueryData(t){return t.behavior=Hs(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return re.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#r.set(_t(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(n=>{jt(t,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(t,e){this.#n.set(_t(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#n.values()],s={};return e.forEach(n=>{jt(t,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Xe(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ts&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},bn=x.createContext(void 0),rs=t=>{const e=x.useContext(bn);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},to=({client:t,children:e})=>(x.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),M.jsx(bn.Provider,{value:t,children:e})),wn=x.createContext(!1),Pn=()=>x.useContext(wn);wn.Provider;function Ki(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Wi=x.createContext(Ki()),Cn=()=>x.useContext(Wi),xn=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},En=t=>{x.useEffect(()=>{t.clearReset()},[t])},On=({result:t,errorResetBoundary:e,throwOnError:s,query:n,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(r&&t.data===void 0||yn(s,[t.error,n])),Mn=t=>{if(t.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...r)=>s(n(...r)):s(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Ln=(t,e)=>t.isLoading&&t.isFetching&&!e,$e=(t,e)=>t?.suspense&&e.isPending,ie=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function eo({queries:t,...e},s){const n=rs(),r=Pn(),i=Cn(),a=x.useMemo(()=>t.map(y=>{const m=n.defaultQueryOptions(y);return m._optimisticResults=r?"isRestoring":"optimistic",m}),[t,n,r]);a.forEach(y=>{Mn(y),xn(y,i)}),En(i);const[o]=x.useState(()=>new qi(n,a,e)),[c,u,h]=o.getOptimisticResult(a,e.combine),l=!r&&e.subscribed!==!1;x.useSyncExternalStore(x.useCallback(y=>l?o.subscribe(B.batchCalls(y)):W,[o,l]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),x.useEffect(()=>{o.setQueries(a,e)},[a,e,o]);const p=c.some((y,m)=>$e(a[m],y))?c.flatMap((y,m)=>{const v=a[m];if(v){const R=new ss(n,v);if($e(v,y))return ie(v,R,i);Ln(y,r)&&ie(v,R,i)}return[]}):[];if(p.length>0)throw Promise.all(p);const g=c.find((y,m)=>{const v=a[m];return v&&On({result:y,errorResetBoundary:i,throwOnError:v.throwOnError,query:n.getQueryCache().get(v.queryHash),suspense:v.suspense})});if(g?.error)throw g.error;return u(h())}function zi(t,e,s){const n=Pn(),r=Cn(),i=rs(),a=i.defaultQueryOptions(t);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=n?"isRestoring":"optimistic",Mn(a),xn(a,r),En(r);const o=!i.getQueryCache().get(a.queryHash),[c]=x.useState(()=>new e(i,a)),u=c.getOptimisticResult(a),h=!n&&t.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(l=>{const f=h?c.subscribe(B.batchCalls(l)):W;return c.updateResult(),f},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),x.useEffect(()=>{c.setOptions(a)},[a,c]),$e(a,u))throw ie(a,c,r);if(On({result:u,errorResetBoundary:r,throwOnError:a.throwOnError,query:i.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(a,u),a.experimental_prefetchInRender&&!Rt&&Ln(u,n)&&(o?ie(a,c,r):i.getQueryCache().get(a.queryHash)?.promise)?.catch(W).finally(()=>{c.updateResult()}),a.notifyOnChangeProps?u:c.trackResult(u)}function so(t,e){return zi(t,ss)}function no(t,e){const s=rs(),[n]=x.useState(()=>new $i(s,t));x.useEffect(()=>{n.setOptions(t)},[n,t]);const r=x.useSyncExternalStore(x.useCallback(a=>n.subscribe(B.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=x.useCallback((a,o)=>{n.mutate(a,o).catch(W)},[n]);if(r.error&&yn(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}export{hn as L,gi as O,Zi as Q,Pt as R,$n as a,x as b,to as c,so as d,no as e,Je as f,zs as g,ln as h,Vi as i,M as j,Gi as k,eo as l,Ge as m,Yi as n,ui as o,Ji as p,Xi as q,oe as r,rs as u};
|
package/dist/webui/index.html
CHANGED
|
@@ -18,10 +18,9 @@
|
|
|
18
18
|
if (theme === 'dark') document.documentElement.classList.add('dark');
|
|
19
19
|
})();
|
|
20
20
|
</script>
|
|
21
|
-
<script type="module" crossorigin src="/assets/index-
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
23
|
-
<link rel="
|
|
24
|
-
<link rel="stylesheet" crossorigin href="/assets/index-BPlk2Wbt.css">
|
|
21
|
+
<script type="module" crossorigin src="/assets/index-d6c-yJNn.js"></script>
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/tanstack-BjCuxfF-.js">
|
|
23
|
+
<link rel="stylesheet" crossorigin href="/assets/index-yKdFLN1k.css">
|
|
25
24
|
</head>
|
|
26
25
|
<body>
|
|
27
26
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dexto",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dexto": "./dist/index.js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@clack/prompts": "^0.10.1",
|
|
10
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
10
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
11
11
|
"@opentelemetry/instrumentation-http": "^0.210.0",
|
|
12
12
|
"@opentelemetry/instrumentation-undici": "^0.20.0",
|
|
13
13
|
"@opentelemetry/core": "^1.28.0",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"ws": "^8.18.1",
|
|
33
33
|
"yaml": "^2.7.1",
|
|
34
34
|
"zod": "^3.25.0",
|
|
35
|
-
"@dexto/agent-config": "1.6.
|
|
36
|
-
"@dexto/agent-management": "1.6.
|
|
37
|
-
"@dexto/analytics": "1.6.
|
|
38
|
-
"@dexto/core": "1.6.
|
|
39
|
-
"@dexto/image-local": "1.6.
|
|
40
|
-
"@dexto/image-logger-agent": "1.6.
|
|
41
|
-
"@dexto/registry": "1.6.
|
|
42
|
-
"@dexto/server": "1.6.
|
|
43
|
-
"@dexto/storage": "1.6.
|
|
44
|
-
"@dexto/tui": "1.6.
|
|
35
|
+
"@dexto/agent-config": "1.6.3",
|
|
36
|
+
"@dexto/agent-management": "1.6.3",
|
|
37
|
+
"@dexto/analytics": "1.6.3",
|
|
38
|
+
"@dexto/core": "1.6.3",
|
|
39
|
+
"@dexto/image-local": "1.6.3",
|
|
40
|
+
"@dexto/image-logger-agent": "1.6.3",
|
|
41
|
+
"@dexto/registry": "1.6.3",
|
|
42
|
+
"@dexto/server": "1.6.3",
|
|
43
|
+
"@dexto/storage": "1.6.3",
|
|
44
|
+
"@dexto/tui": "1.6.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/ws": "^8.5.11",
|