Socket
Socket
Sign inDemoInstall

@tanstack/react-router

Package Overview
Dependencies
3
Maintainers
1
Versions
497
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1-alpha.5 to 0.0.1-alpha.6

24

build/cjs/react-router/src/index.js

@@ -220,2 +220,3 @@ /**

}
function useRouter() {

@@ -227,14 +228,16 @@ const value = React__namespace.useContext(routerContext);

}
function useMatches() {
return React__namespace.useContext(matchesContext);
}
function useParentMatches() {
const router = useRouter();
} // function useParentMatches(): RouteMatch[] {
// const router = useRouter()
// const match = useMatch()
// const matches = router.state.matches
// return matches.slice(
// 0,
// matches.findIndex((d) => d.matchId === match.matchId) - 1,
// )
// }
const match = _useMatch();
const matches = router.state.matches;
return matches.slice(0, matches.findIndex(d => d.matchId === match.matchId) - 1);
}
function _useMatch() {

@@ -245,2 +248,3 @@ var _useMatches;

}
function Outlet() {

@@ -405,6 +409,2 @@ var _ref3, _childMatch$options$c;

exports.createReactRouter = createReactRouter;
exports.useMatch = _useMatch;
exports.useMatches = useMatches;
exports.useParentMatches = useParentMatches;
exports.useRouter = useRouter;
//# sourceMappingURL=index.js.map

@@ -10,3 +10,3 @@ {

{
"uid": "138f-33",
"uid": "19e6-33",
"name": "\u0000rollupPluginBabelHelpers.js"

@@ -19,7 +19,7 @@ },

"name": "router-core/build/esm/index.js",
"uid": "138f-35"
"uid": "19e6-35"
},
{
"name": "react-router/src/index.tsx",
"uid": "138f-37"
"uid": "19e6-37"
}

@@ -34,26 +34,26 @@ ]

"nodeParts": {
"138f-33": {
"19e6-33": {
"renderedLength": 798,
"gzipLength": 366,
"brotliLength": 0,
"mainUid": "138f-32"
"mainUid": "19e6-32"
},
"138f-35": {
"renderedLength": 69909,
"gzipLength": 14557,
"19e6-35": {
"renderedLength": 69986,
"gzipLength": 14566,
"brotliLength": 0,
"mainUid": "138f-34"
"mainUid": "19e6-34"
},
"138f-37": {
"renderedLength": 11456,
"gzipLength": 2963,
"19e6-37": {
"renderedLength": 11513,
"gzipLength": 2992,
"brotliLength": 0,
"mainUid": "138f-36"
"mainUid": "19e6-36"
}
},
"nodeMetas": {
"138f-32": {
"19e6-32": {
"id": "\u0000rollupPluginBabelHelpers.js",
"moduleParts": {
"index.production.js": "138f-33"
"index.production.js": "19e6-33"
},

@@ -63,10 +63,10 @@ "imported": [],

{
"uid": "138f-36"
"uid": "19e6-36"
}
]
},
"138f-34": {
"19e6-34": {
"id": "/packages/router-core/build/esm/index.js",
"moduleParts": {
"index.production.js": "138f-35"
"index.production.js": "19e6-35"
},

@@ -76,23 +76,23 @@ "imported": [],

{
"uid": "138f-36"
"uid": "19e6-36"
}
]
},
"138f-36": {
"19e6-36": {
"id": "/packages/react-router/src/index.tsx",
"moduleParts": {
"index.production.js": "138f-37"
"index.production.js": "19e6-37"
},
"imported": [
{
"uid": "138f-32"
"uid": "19e6-32"
},
{
"uid": "138f-38"
"uid": "19e6-38"
},
{
"uid": "138f-39"
"uid": "19e6-39"
},
{
"uid": "138f-34"
"uid": "19e6-34"
}

@@ -103,3 +103,3 @@ ],

},
"138f-38": {
"19e6-38": {
"id": "react",

@@ -110,3 +110,3 @@ "moduleParts": {},

{
"uid": "138f-36"
"uid": "19e6-36"
}

@@ -116,3 +116,3 @@ ],

},
"138f-39": {
"19e6-39": {
"id": "use-sync-external-store/shim",

@@ -123,3 +123,3 @@ "moduleParts": {},

{
"uid": "138f-36"
"uid": "19e6-36"
}

@@ -126,0 +126,0 @@ ],

@@ -68,6 +68,2 @@ /**

declare function RouterProvider<TRouteConfig extends AnyRouteConfig = RouteConfig, TAllRouteInfo extends AnyAllRouteInfo = DefaultAllRouteInfo>({ children, router, ...rest }: RouterProps<TRouteConfig, TAllRouteInfo>): JSX.Element;
declare function useRouter(): Router;
declare function useMatches(): RouteMatch[];
declare function useParentMatches(): RouteMatch[];
declare function useMatch<T>(): RouteMatch;
declare function Outlet(): JSX.Element | null;

@@ -78,2 +74,2 @@ declare function DefaultCatchBoundary({ error }: {

export { DefaultCatchBoundary, MatchesProvider, MatchesProviderProps, Outlet, PromptProps, RouterProps, RouterProvider, createReactRouter, useMatch, useMatches, useParentMatches, useRouter };
export { DefaultCatchBoundary, MatchesProvider, MatchesProviderProps, Outlet, PromptProps, RouterProps, RouterProvider, createReactRouter };

@@ -21,3 +21,3 @@ /**

* @license MIT
*/function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(this,arguments)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));var u="beforeunload",h="popstate";function d(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,a=n.history;function o(){var e=n.location,t=e.pathname,r=e.search,o=e.hash,i=a.state||{};return[i.idx,{pathname:t,search:r,hash:o,state:i.usr||null,key:i.key||"default"}]}var i=null;n.addEventListener(h,(function(){if(i)P.call(i),i=null;else{var e=r.Pop,t=o(),n=t[0],a=t[1];if(P.length){if(null!=n){var s=d-n;s&&(i={action:e,location:a,retry:function(){I(-1*s)}},I(s))}}else S(e)}}));var s=r.Pop,l=o(),d=l[0],f=l[1],p=v(),P=v();function b(e){return"string"==typeof e?e:y(e)}function E(e,t){return void 0===t&&(t=null),c({pathname:f.pathname,hash:"",search:""},"string"==typeof e?_(e):e,{state:t,key:g()})}function w(e,t){return[{usr:e.state,key:e.key,idx:t},b(e)]}function R(e,t,n){return!P.length||(P.call({action:e,location:t,retry:n}),!1)}function S(e){s=e;var t=o();d=t[0],f=t[1],p.call({action:s,location:f})}function I(e){a.go(e)}null==d&&(d=0,a.replaceState(c({},a.state,{idx:d}),""));var x={get action(){return s},get location(){return f},createHref:b,push:function e(t,o){var i=r.Push,s=E(t,o);if(R(i,s,(function(){e(t,o)}))){var l=w(s,d+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(e){n.location.assign(u)}S(i)}},replace:function e(t,n){var o=r.Replace,i=E(t,n);if(R(o,i,(function(){e(t,n)}))){var s=w(i,d),l=s[0],c=s[1];a.replaceState(l,"",c),S(o)}},go:I,back:function(){I(-1)},forward:function(){I(1)},listen:function(e){return p.push(e)},block:function(e){var t=P.push(e);return 1===P.length&&n.addEventListener(u,m),function(){t(),P.length||n.removeEventListener(u,m)}}};return x}function f(e){void 0===e&&(e={});var t=e,n=t.initialEntries,a=void 0===n?["/"]:n,o=t.initialIndex,i=a.map((function(e){return c({pathname:"/",search:"",hash:"",state:null,key:g()},"string"==typeof e?_(e):e)})),s=p(null==o?i.length-1:o,0,i.length-1),l=r.Pop,u=i[s],h=v(),d=v();function f(e,t){return void 0===t&&(t=null),c({pathname:u.pathname,search:"",hash:""},"string"==typeof e?_(e):e,{state:t,key:g()})}function m(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function P(e,t){l=e,u=t,h.call({action:l,location:u})}function b(e){var t=p(s+e,0,i.length-1),n=r.Pop,a=i[t];m(n,a,(function(){b(e)}))&&(s=t,P(n,a))}var E={get index(){return s},get action(){return l},get location(){return u},createHref:function(e){return"string"==typeof e?e:y(e)},push:function e(t,n){var a=r.Push,o=f(t,n);m(a,o,(function(){e(t,n)}))&&(s+=1,i.splice(s,i.length,o),P(a,o))},replace:function e(t,n){var a=r.Replace,o=f(t,n);m(a,o,(function(){e(t,n)}))&&(i[s]=o,P(a,o))},go:b,back:function(){b(-1)},forward:function(){b(1)},listen:function(e){return h.push(e)},block:function(e){return d.push(e)}};return E}function p(e,t,n){return Math.min(Math.max(e,t),n)}function m(e){e.preventDefault(),e.returnValue=""}function v(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function g(){return Math.random().toString(36).substr(2,8)}function y(e){var t=e.pathname,n=void 0===t?"/":t,a=e.search,r=void 0===a?"":a,o=e.hash,i=void 0===o?"":o;return r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),i&&"#"!==i&&(n+="#"===i.charAt(0)?i:"#"+i),n}function _(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function P(e,t){if(!e)throw new Error("Invariant failed")}function b(e){if(!e)return"";var t=decodeURIComponent(e);return"false"!==t&&("true"===t||(0*+t==0?+t:t))}const E="__root__",w=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function R(e){var t,n;const a=(null==e?void 0:e.history)||(w?d():f());let r={options:l({},e,{stringifySearch:null!=(t=null==e?void 0:e.stringifySearch)?t:U,parseSearch:null!=(n=null==e?void 0:e.parseSearch)?n:H}),listeners:[],removeActionQueue:[],basepath:"",routeTree:void 0,routesById:{},location:void 0,allRouteInfo:void 0,navigationPromise:Promise.resolve(),resolveNavigation:()=>{},preloadCache:{},state:{status:"idle",location:null,matches:[],actions:{},loaderData:{},lastUpdated:Date.now()},startedLoadingAt:Date.now(),subscribe:e=>(r.listeners.push(e),()=>{r.listeners=r.listeners.filter((t=>t!==e))}),getRoute:e=>r.routesById[e],notify:()=>{r.state=l({},r.state),r.listeners.forEach((e=>e()))},mount:()=>{const e=r.buildLocation({to:".",search:!0,hash:!0});return e.href!==r.location.href?r.commitLocation(e,!0):r.loadLocation()},update:e=>{Object.assign(r.options,e);const{basepath:t,routeConfig:n}=r.options;return r.basepath=O("/"+(null!=t?t:"")),n&&(r.routesById={},r.routeTree=r.buildRouteTree(n)),r},destroy:a.listen((e=>{r.loadLocation(r.parseLocation(e.location,r.location))})),buildRouteTree:e=>{const t=(e,n)=>e.map((e=>{const a=S(e,e.options,n,r);if(r.routesById[a.routeId])throw new Error;r.routesById[a.routeId]=a;const o=e.children;return a.childRoutes=null!=o&&o.length?t(o,a):void 0,a}));return t([e])[0]},parseLocation:(e,t)=>{var n;const a=r.options.parseSearch(e.search);return{pathname:e.pathname,searchStr:e.search,search:N(null==t?void 0:t.search,a),hash:null!=(n=e.hash.split("#").reverse()[0])?n:"",href:""+e.pathname+e.search+e.hash,state:e.state,key:e.key}},buildLocation:function(e){var t,n,a,o,i,s,c,u,h;void 0===e&&(e={});const d=e.fromCurrent?r.location.pathname:null!=(t=e.from)?t:r.location.pathname;let f=D(null!=(n=r.basepath)?n:"/",d,""+(null!=(a=e.to)?a:"."));const p=r.matchRoutes(r.location.pathname,{strictParseParams:!0}),m=r.matchRoutes(f),v=l({},null==(o=q(p))?void 0:o.params);let g=!0===(null==(i=e.params)||i)?v:k(e.params,v);g&&m.map((e=>e.options.stringifyParams)).filter(Boolean).forEach((e=>{Object.assign({},g,e(g))})),f=L(f,null!=g?g:{});const y=null!=(s=e.__preSearchFilters)&&s.length?e.__preSearchFilters.reduce(((e,t)=>t(e)),r.location.search):r.location.search,_=!0===e.search?y:e.search?null!=(c=k(e.search,y))?c:{}:null!=(u=e.__preSearchFilters)&&u.length?y:{},P=null!=(h=e.__postSearchFilters)&&h.length?e.__postSearchFilters.reduce(((e,t)=>t(e)),_):_,b=N(r.location.search,P),E=r.options.stringifySearch(b);let w=!0===e.hash?r.location.hash:k(e.hash,r.location.hash);return w=w?"#"+w:"",{pathname:f,search:b,searchStr:E,state:r.location.state,hash:w,href:""+f+E+w,key:e.key}},commitLocation:(e,t)=>{const n=""+Date.now()+Math.random();r.navigateTimeout&&clearTimeout(r.navigateTimeout);let o="replace";t||(o="push");return r.parseLocation(a.location).href===e.href&&!e.key&&(o="replace"),"replace"===o?a.replace({pathname:e.pathname,hash:e.hash,search:e.searchStr},{id:n}):a.push({pathname:e.pathname,hash:e.hash,search:e.searchStr},{id:n}),r.navigationPromise=new Promise((e=>{const t=r.resolveNavigation;r.resolveNavigation=()=>{t(),e()}})),r.navigationPromise},buildNext:e=>{const t=r.buildLocation(e),n=r.matchRoutes(t.pathname),a=n.map((e=>{var t;return null!=(t=e.options.preSearchFilters)?t:[]})).flat().filter(Boolean),o=n.map((e=>{var t;return null!=(t=e.options.postSearchFilters)?t:[]})).flat().filter(Boolean);return r.buildLocation(l({},e,{__preSearchFilters:a,__postSearchFilters:o}))},cancelMatches:()=>{var e,t;[...r.state.matches,...null!=(e=null==(t=r.state.pending)?void 0:t.matches)?e:[]].forEach((e=>{e.cancel()}))},loadLocation:async e=>{const t=Math.random();r.startedLoadingAt=t,e&&(r.location=e),r.removeActionQueue.forEach((e=>{let{action:t,actionState:n}=e;r.state.currentAction===n&&(r.state.currentAction=void 0),t.current===n&&(t.current=void 0)})),r.removeActionQueue=[],r.cancelMatches();const n=r.matchRoutes(location.pathname,{strictParseParams:!0});r.state=l({},r.state,{pending:{matches:n,location:r.location}}),r.notify();const a=await r.loadMatches(n,{withPending:!0});if(r.startedLoadingAt!==t)return r.navigationPromise;const o=r.state.matches;o.filter((e=>!a.find((t=>t.matchId===e.matchId)))).forEach((e=>{null==e.__.onExit||e.__.onExit({params:e.params,search:e.routeSearch})})),o.filter((e=>a.find((t=>t.matchId===e.matchId)))).forEach((e=>{null==e.options.onTransition||e.options.onTransition({params:e.params,search:e.routeSearch})})),a.filter((e=>!o.find((t=>t.matchId===e.matchId)))).forEach((e=>{e.__.onExit=null==e.options.onMatch?void 0:e.options.onMatch({params:e.params,search:e.search})})),r.state=l({},r.state,{location:r.location,matches:a,pending:void 0}),a.some((e=>"loading"===e.status))&&(r.notify(),await Promise.all(a.map((e=>e.__.loaderPromise||Promise.resolve())))),r.startedLoadingAt===t&&(r.notify(),r.resolveNavigation())},cleanPreloadCache:()=>{const e=Date.now();Object.keys(r.preloadCache).forEach((t=>{const n=r.preloadCache[t];"loading"!==n.match.status&&(n.match.updatedAt&&n.match.updatedAt+n.maxAge>e||delete r.preloadCache[t])}))},loadRoute:async function(e,t){void 0===e&&(e=r.location);const n=r.buildNext(e),a=r.matchRoutes(n.pathname,{strictParseParams:!0});return await r.loadMatches(a,{preload:!0,maxAge:t.maxAge}),a},matchRoutes:(e,t)=>{var n,a;r.cleanPreloadCache();const o=[];if(!r.routeTree)return o;const i=[...r.state.matches,...null!=(n=null==(a=r.state.pending)?void 0:a.matches)?n:[]],s=async n=>{var a,c,u;const h=q(o);let d=null!=(a=null==h?void 0:h.params)?a:{};const f=null!=(c=null==r.options.filterRoutes?void 0:r.options.filterRoutes(n))?c:n;let p=[];const m=(n,a)=>(a.some((a=>{var o,i,s;if(!a.routePath&&null!=(o=a.childRoutes)&&o.length)return m([...p,a],a.childRoutes);const c=!!("/"!==a.routePath||null!=(i=a.childRoutes)&&i.length),u=x(e,{to:a.fullPath,fuzzy:c,caseSensitive:null!=(s=a.options.caseSensitive)?s:r.options.caseSensitive});if(u){let e;try{var h;e=null!=(h=null==a.options.parseParams?void 0:a.options.parseParams(u))?h:u}catch(e){if(null!=t&&t.strictParseParams)throw e}d=l({},d,e)}return u&&(p=[...n,a]),!!p.length})),!!p.length);if(m([],f),!p.length)return;p.forEach((t=>{var n;const a=L(t.routePath,d),s=L(t.routeId,d,!0),l=i.find((e=>e.matchId===s))||(null==(n=r.preloadCache[s])?void 0:n.match)||I(r,t,{matchId:s,params:d,pathname:A([e,a])});o.push(l)}));const v=q(p);null!=(u=v.childRoutes)&&u.length&&s(v.childRoutes)};return s([r.routeTree]),function(e){e.forEach(((t,n)=>{const a=e[n-1];a&&(t.loaderData=N(t.loaderData,l({},a.loaderData,t.routeLoaderData)))}))}(o),o},loadMatches:async(e,t)=>{const n=e.map((async e=>{e.__.validate(),null!=t&&t.preload&&(r.preloadCache[e.matchId]={maxAge:null==t?void 0:t.maxAge,match:e}),("success"===e.status&&e.isInvalid||"error"===e.status||"idle"===e.status)&&e.load(),null!=t&&t.withPending&&e.__.startPending(),await e.__.loadPromise}));return r.notify(),await Promise.all(n),e},invalidateRoute:e=>{var t,n;const a=r.buildNext(e),o=r.matchRoutes(a.pathname).map((e=>e.matchId));[...r.state.matches,...null!=(t=null==(n=r.state.pending)?void 0:n.matches)?t:[]].forEach((e=>{o.includes(e.matchId)&&(e.isInvalid=!0)}))},reload:()=>r._navigate({fromCurrent:!0,replace:!0,search:!0}),resolvePath:(e,t)=>D(r.basepath,e,O(t)),matchRoute:(e,t)=>{var n;e=l({},e,{to:e.to?r.resolvePath(null!=(n=e.from)?n:"",e.to):void 0});const a=r.buildNext(e);var o;return null!=t&&t.pending?!(null==(o=r.state.pending)||!o.location)&&!!x(r.state.pending.location.pathname,l({},t,{to:a.pathname})):!!x(r.state.location.pathname,l({},t,{to:a.pathname}))},_navigate:e=>{const t=r.buildNext(e);return r.commitLocation(t,e.replace)},navigate:async e=>{let{from:t,to:n=".",search:a,hash:o,replace:i}=e;const s=String(n),l=String(t);let c;try{new URL(""+s),c=!0}catch(e){}return P(!c),r._navigate({from:l,to:s,search:a,hash:o})},buildLink:e=>{var t,n,a;let{from:o,to:i=".",search:s,params:l,hash:c,target:u,replace:h,activeOptions:d,preload:f,preloadMaxAge:p,preloadDelay:m,disabled:v}=e;try{return new URL(""+i),{type:"external",href:i}}catch(e){}const g={from:o,to:i,search:s,params:l,hash:c,replace:h},y=r.buildNext(g);f=null!=(t=f)?t:r.options.defaultLinkPreload;const _=null!=(n=null!=p?p:r.options.defaultLinkPreloadMaxAge)?n:2e3,P=null!=(a=null!=m?m:r.options.defaultLinkPreloadDelay)?a:50,b=r.state.location.pathname===y.pathname,E=r.state.location.pathname.split("/"),w=y.pathname.split("/").every(((e,t)=>e===E[t])),R=r.state.location.hash===y.hash,S=null!=d&&d.exact?b:w,I=null==d||!d.includeHash||R;return{type:"internal",next:y,handleFocus:e=>{f&&_>0&&r.loadRoute(g,{maxAge:_})},handleClick:e=>{v||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||e.defaultPrevented||u&&"_self"!==u||0!==e.button||(e.preventDefault(),!b||s||c||r.invalidateRoute(g),r._navigate(g))},handleEnter:e=>{const t=e.target||{};if(f&&_>0){if(t.preloadTimeout)return;t.preloadTimeout=setTimeout((()=>{t.preloadTimeout=null,r.loadRoute(g,{maxAge:_})}),P)}},handleLeave:e=>{const t=e.target||{};t.preloadTimeout&&(clearTimeout(t.preloadTimeout),t.preloadTimeout=null)},isActive:S&&I,disabled:v}},__experimental__createSnapshot:()=>l({},r.state,{matches:r.state.matches.map((e=>{let{routeLoaderData:t,matchId:n}=e;return{matchId:n,loaderData:t}}))})};return r.location=r.parseLocation(a.location),r.state.location=r.location,r.update(e),null==r.options.createRouter||r.options.createRouter(r),r}function S(e,t,n,a){const{id:r,routeId:o,path:i,fullPath:s}=e,c=a.state.actions[r]||(a.state.actions[r]={pending:[],submit:async(e,t)=>{var n;if(!u)return;const r=null==(n=null==t?void 0:t.invalidate)||n,o={submittedAt:Date.now(),status:"pending",submission:e};c.current=o,c.latest=o,c.pending.push(o),a.state=l({},a.state,{currentAction:o,latestAction:o}),a.notify();try{const t=await(null==u.options.action?void 0:u.options.action(e));return o.data=t,r&&(a.invalidateRoute({to:".",fromCurrent:!0}),await a.reload()),o.status="success",t}catch(e){console.error(e),o.error=e,o.status="error"}finally{c.pending=c.pending.filter((e=>e!==o)),a.removeActionQueue.push({action:c,actionState:o}),a.notify()}}},a.state.actions[r]);let u={routeId:r,routeRouteId:o,routePath:i,fullPath:s,options:t,router:a,childRoutes:void 0,parentRoute:n,action:c,buildLink:e=>a.buildLink(l({},e,{from:s})),navigate:e=>a.navigate(l({},e,{from:s})),matchRoute:(e,t)=>a.matchRoute(l({},e,{from:s}),t)};return null==a.options.createRoute||a.options.createRoute({router:a,route:u}),u}function I(e,t,n){const a=l({},t,n,{router:e,routeSearch:{},search:{},childMatches:[],status:"idle",routeLoaderData:{},loaderData:{},isPending:!1,isFetching:!1,isInvalid:!1,__:{abortController:new AbortController,latestId:"",resolve:()=>{},notify:()=>{a.__.resolve(),a.router.notify()},startPending:()=>{var t,n;const r=null!=(t=a.options.pendingMs)?t:e.options.defaultPendingMs,o=null!=(n=a.options.pendingMinMs)?n:e.options.defaultPendingMinMs;a.__.pendingTimeout||"loading"!==a.status||void 0===r||(a.__.pendingTimeout=setTimeout((()=>{a.isPending=!0,a.__.resolve(),void 0!==o&&(a.__.pendingMinPromise=new Promise((e=>a.__.pendingMinTimeout=setTimeout(e,o))))}),r))},cancelPending:()=>{a.isPending=!1,clearTimeout(a.__.pendingTimeout),clearTimeout(a.__.pendingMinTimeout),delete a.__.pendingMinPromise},validate:()=>{var t,n;const r=null!=(t=null==(n=a.parentMatch)?void 0:n.search)?t:e.location.search;try{const e=a.routeSearch;let t=N(e,null==a.options.validateSearch?void 0:a.options.validateSearch(r));e!==t&&(a.isInvalid=!0),a.routeSearch=t,a.search=N(r,l({},r,t))}catch(e){console.error(e);const t=new Error("Invalid search params found",{cause:e});return t.code="INVALID_SEARCH_PARAMS",a.status="error",void(a.error=t)}}},cancel:()=>{var e;null==(e=a.__.abortController)||e.abort(),a.__.cancelPending()},load:async()=>{const e=""+Date.now()+Math.random();return a.__.latestId=e,"error"!==a.status&&"idle"!==a.status||(a.status="loading"),a.isInvalid=!1,a.__.loadPromise=new Promise((async t=>{a.isFetching=!0,a.__.resolve=t;const n=(async()=>{const t=a.options.import;t&&(a.__.importPromise=t({params:a.params}).then((e=>{a.__=l({},a.__,e)}))),await a.__.importPromise,a.__.elementsPromise=(async()=>{await Promise.all(["element","errorElement","catchElement","pendingElement"].map((async e=>{const t=a.options[e];if(!a.__[e])if("function"==typeof t){const n=await t(a);a.__[e]=n}else a.__[e]=a.options[e]})))})(),a.__.dataPromise=Promise.resolve().then((async()=>{try{const t=await(null==a.options.loader?void 0:a.options.loader({params:a.params,search:a.routeSearch,signal:a.__.abortController.signal}));if(e!==a.__.latestId)return a.__.loaderPromise;a.routeLoaderData=N(a.routeLoaderData,t),a.error=void 0,a.status="success",a.updatedAt=Date.now()}catch(t){if(e!==a.__.latestId)return a.__.loaderPromise;a.error=t,a.status="error",a.updatedAt=Date.now()}}));try{if(await Promise.all([a.__.elementsPromise,a.__.dataPromise]),e!==a.__.latestId)return a.__.loaderPromise;a.__.pendingMinPromise&&(await a.__.pendingMinPromise,delete a.__.pendingMinPromise)}finally{if(e!==a.__.latestId)return a.__.loaderPromise;a.__.cancelPending(),a.isPending=!1,a.isFetching=!1,a.__.notify()}})();if(a.__.loaderPromise=n,await n,e!==a.__.latestId)return a.__.loaderPromise;delete a.__.loaderPromise})),await a.__.loadPromise}});return a}function x(e,t){const n=T(e,t);if(!t.to||n)return null!=n?n:{}}function L(e,t,n){return A(j(e).map((e=>{return"*"!==e.value||n?"param"===e.type?null!=(a=t[e.value.substring(1)])?a:"":e.value:"";var a})))}function M(e,t){if(e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}return!0}function k(e,t){return"function"==typeof e?e(t):e}function A(e){return O(e.filter(Boolean).join("/"))}function O(e){return e.replace(/\/{2,}/g,"/")}function C(e){return"/"===e?e:e.replace(/\/{1,}$/,"")}function T(e,t){var n;const a=j(e),r=j(""+(null!=(n=t.to)?n:"*")),o={};return(()=>{for(let e=0;e<Math.max(a.length,r.length);e++){const n=a[e],i=r[e],s=e===r.length-1,l=e===a.length-1;if(i){if("wildcard"===i.type)return!(null==n||!n.value)&&(o["*"]=A(a.slice(e).map((e=>e.value))),!0);if("pathname"===i.type){if("/"===i.value&&(null==n||!n.value))return!0;if(n)if(t.caseSensitive){if(i.value!==n.value)return!1}else if(i.value.toLowerCase()!==n.value.toLowerCase())return!1}if(!n)return!1;if("param"===i.type){if("/"===(null==n?void 0:n.value))return!1;n.value.startsWith(":")||(o[i.value.substring(1)]=n.value)}}if(s&&!l)return!!t.fuzzy}return!0})()?o:void 0}function j(e){if(!e)return[];const t=[];if("/"===(e=O(e)).slice(0,1)&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map((e=>e.startsWith("*")?{type:"wildcard",value:e}:":"===e.charAt(0)?{type:"param",value:e}:{type:"pathname",value:e}))),"/"===e.slice(-1)&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function D(e,t,n){t=t.replace(new RegExp("^"+e),"/"),n=n.replace(new RegExp("^"+e),"/");let a=j(t);const r=j(n);r.forEach(((e,t)=>{if("/"===e.value)t?t===r.length-1&&a.push(e):a=[e];else if(".."===e.value){var n;a.length>1&&"/"===(null==(n=q(a))?void 0:n.value)&&a.pop(),a.pop()}else{if("."===e.value)return;a.push(e)}}));return O(A([e,...a.map((e=>e.value))]))}function N(e,t){if(e===t)return e;const n=Array.isArray(e)&&Array.isArray(t);if(n||B(e)&&B(t)){const a=n?e.length:Object.keys(e).length,r=n?t:Object.keys(t),o=r.length,i=n?[]:{};let s=0;for(let a=0;a<o;a++){const o=n?a:r[a];i[o]=N(e[o],t[o]),i[o]===e[o]&&s++}return a===o&&s===a?e:i}return t}function B(e){if(!F(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!F(n)&&!!n.hasOwnProperty("isPrototypeOf")}function F(e){return"[object Object]"===Object.prototype.toString.call(e)}const H=z(JSON.parse),U=W(JSON.stringify);function z(e){return t=>{"?"===t.substring(0,1)&&(t=t.substring(1));let n=function(e){for(var t,n,a={},r=e.split("&");t=r.shift();)void 0!==a[n=(t=t.split("=")).shift()]?a[n]=[].concat(a[n],b(t.shift())):a[n]=b(t.shift());return a}(t);for(let t in n){const a=n[t];if("string"==typeof a)try{n[t]=e(a)}catch(e){}}return n}}function W(e){return t=>{(t=l({},t))&&Object.keys(t).forEach((n=>{const a=t[n];if(void 0===a||void 0===a)delete t[n];else if(a&&"object"==typeof a&&null!==a)try{t[n]=e(a)}catch(e){}}));const n=function(e,t){var n,a,r,o="";for(n in e)if(void 0!==(r=e[n]))if(Array.isArray(r))for(a=0;a<r.length;a++)o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r[a]);else o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r);return(t||"")+o}(t).toString();return n?"?"+n:""}}function q(e){return e[e.length-1]}const K=["type","children","target","activeProps","inactiveProps","activeOptions","disabled","hash","search","params","to","preload","preloadDelay","preloadMaxAge","replace","style","className","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd"],Q=["pending","caseSensitive","children"],V=["children","router"],J=o.createContext(null),Y=o.createContext(null),$=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)?o.useLayoutEffect:o.useEffect;function G(e){return o.createElement(J.Provider,e)}const X=e=>{n.useSyncExternalStore((t=>e.subscribe((()=>t()))),(()=>e.state))};function Z(){const e=o.useContext(Y);return M(!e,"useRouter must be used inside a <Router> component!"),X(e.router),e.router}function ee(){return o.useContext(J)}function te(){var e;return null==(e=ee())?void 0:e[0]}function ne(){var e,t;const n=Z(),[,...a]=ee(),r=a[0];if(!r)return null;const i=null!=(e=(()=>{var e,t;if(!r)return null;const a=null!=(e=r.__.errorElement)?e:n.options.defaultErrorElement;if("error"===r.status){if(a)return a;if(r.options.useErrorBoundary||n.options.useErrorBoundary)throw r.error;return o.createElement(re,{error:r.error})}if("loading"===r.status||"idle"===r.status){if(r.isPending){var i;const e=null!=(i=r.__.pendingElement)?i:n.options.defaultPendingElement;var s;if(r.options.pendingMs||e)return null!=(s=e)?s:null}return null}return null!=(t=r.__.element)?t:n.options.defaultElement})())?e:o.createElement(ne,null),s=null!=(t=null==r?void 0:r.options.catchElement)?t:n.options.defaultCatchElement;return o.createElement(G,{value:a,key:r.matchId},o.createElement(ae,{catchElement:s},i))}class ae extends o.Component{constructor(){super(...arguments),this.state={error:!1},this.reset=()=>{this.setState({error:!1,info:!1})}}componentDidCatch(e,t){console.error(e),this.setState({error:e,info:t})}render(){var e;const t=null!=(e=this.props.catchElement)?e:re;return this.state.error?"function"==typeof t?t(this.state):t:this.props.children}}function re(e){let{error:t}=e;return o.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},o.createElement("strong",{style:{fontSize:"1.2rem"}},"Something went wrong!"),o.createElement("div",{style:{height:".5rem"}}),o.createElement("div",null,o.createElement("pre",null,t.message?o.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},t.message):null)),o.createElement("div",{style:{height:"1rem"}}),o.createElement("div",{style:{fontSize:".8em",borderLeft:"3px solid rgba(127, 127, 127, 1)",paddingLeft:".5rem",opacity:.5}},"If you are the owner of this website, it's highly recommended that you configure your own custom Catch/Error boundaries for the router. You can optionally configure a boundary for each route."))}e.DefaultCatchBoundary=re,e.MatchesProvider=G,e.Outlet=ne,e.RouterProvider=function(e){let{children:t,router:a}=e,r=s(e,V);return a.update(r),n.useSyncExternalStore((e=>a.subscribe((()=>e()))),(()=>a.state)),$((()=>{a.mount()}),[]),o.createElement(Y.Provider,{value:{router:a}},o.createElement(G,{value:a.state.matches},null!=t?t:o.createElement(ne,null)))},e.createBrowserHistory=d,e.createHashHistory=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,a=n.history;function o(){var e=_(n.location.hash.substr(1)),t=e.pathname,r=void 0===t?"/":t,o=e.search,i=void 0===o?"":o,s=e.hash,l=void 0===s?"":s,c=a.state||{};return[c.idx,{pathname:r,search:i,hash:l,state:c.usr||null,key:c.key||"default"}]}var i=null;function s(){if(i)b.call(i),i=null;else{var e=r.Pop,t=o(),n=t[0],a=t[1];if(b.length){if(null!=n){var s=f-n;s&&(i={action:e,location:a,retry:function(){x(-1*s)}},x(s))}}else I(e)}}n.addEventListener(h,s),n.addEventListener("hashchange",(function(){y(o()[1])!==y(p)&&s()}));var l=r.Pop,d=o(),f=d[0],p=d[1],P=v(),b=v();function E(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var a=n.location.href,r=a.indexOf("#");t=-1===r?a:a.slice(0,r)}return t}()+"#"+("string"==typeof e?e:y(e))}function w(e,t){return void 0===t&&(t=null),c({pathname:p.pathname,hash:"",search:""},"string"==typeof e?_(e):e,{state:t,key:g()})}function R(e,t){return[{usr:e.state,key:e.key,idx:t},E(e)]}function S(e,t,n){return!b.length||(b.call({action:e,location:t,retry:n}),!1)}function I(e){l=e;var t=o();f=t[0],p=t[1],P.call({action:l,location:p})}function x(e){a.go(e)}null==f&&(f=0,a.replaceState(c({},a.state,{idx:f}),""));var L={get action(){return l},get location(){return p},createHref:E,push:function e(t,o){var i=r.Push,s=w(t,o);if(S(i,s,(function(){e(t,o)}))){var l=R(s,f+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(e){n.location.assign(u)}I(i)}},replace:function e(t,n){var o=r.Replace,i=w(t,n);if(S(o,i,(function(){e(t,n)}))){var s=R(i,f),l=s[0],c=s[1];a.replaceState(l,"",c),I(o)}},go:x,back:function(){x(-1)},forward:function(){x(1)},listen:function(e){return P.push(e)},block:function(e){var t=b.push(e);return 1===b.length&&n.addEventListener(u,m),function(){t(),b.length||n.removeEventListener(u,m)}}};return L},e.createMemoryHistory=f,e.createReactRouter=function(e){const t=(e,t)=>({linkProps:t=>{var n,a;const{target:r,activeProps:o=(()=>({className:"active"})),inactiveProps:l=(()=>({})),disabled:c,style:u,className:h,onClick:d,onFocus:f,onMouseEnter:p,onMouseLeave:m}=t,v=s(t,K),g=e.buildLink(t);if("external"===g.type){const{href:e}=g;return{href:e}}const{handleClick:y,handleFocus:_,handleEnter:P,handleLeave:b,isActive:E,next:w}=g,R=e=>t=>{t.persist(),e.forEach((e=>{e&&e(t)}))},S=E&&null!=(n=k(o))?n:{},I=E?{}:null!=(a=k(l))?a:{};return i({},S,I,v,{href:c?void 0:w.href,onClick:R([y,d]),onFocus:R([_,f]),onMouseEnter:R([P,p]),onMouseLeave:R([b,m]),target:r,style:i({},u,S.style,I.style),className:[h,S.className,I.className].filter(Boolean).join(" ")||void 0},c?{role:"link","aria-disabled":!0}:void 0,{"data-status":E?"active":void 0})},Link:o.forwardRef(((n,a)=>{const r=e.linkProps(n);return X(t),o.createElement("a",i({ref:a},r,{children:"function"==typeof n.children?n.children({isActive:"active"===r["data-status"]}):n.children}))})),MatchRoute:t=>{const{pending:n,caseSensitive:a}=t,r=s(t,Q),o=e.matchRoute(r,{pending:n,caseSensitive:a});return o?"function"==typeof t.children?t.children(o):t.children:null}});return R(i({},e,{createRouter:e=>{const n={useRoute:t=>{const n=e.getRoute(t);return X(e),P(n),n},useMatch:t=>{P(t!==E);const n=te(),a=e.state.matches.find((e=>e.routeId===t));return P(a),P(n.routeId==(null==a?void 0:a.routeId),(null==a||a.routeId,n.routeId,null==a||a.routeId)),X(e),a||P("Match not found!"),a}},a=t(e.getRoute("/"),e);Object.assign(e,n,a)},createRoute:e=>{let{router:n,route:a}=e;const r=t(a,n);Object.assign(a,r)}}))},e.createRoute=S,e.createRouteConfig=function e(t,n,a,r,o){void 0===t&&(t={}),void 0===a&&(a=!0),a&&(t.path=E),r===E&&(r="");let i=a?E:t.path;i&&"/"!==i&&(i=function(e){return C(function(e){return"/"===e?e:e.replace(/^\/{1,}/,"")}(e))}(i));const s=i||t.id;let l=A([r,s]);i===E&&(i="/"),l!==E&&(l=A(["/",l]));const c=l===E?"/":C(A([o,i]));return{id:l,routeId:s,path:i,fullPath:c,options:t,children:n,addChildren:n=>e(t,n((t=>e(t,void 0,!1,l,c))),!1,r,o)}},e.createRouteMatch=I,e.createRouter=R,e.defaultParseSearch=H,e.defaultStringifySearch=U,e.functionalUpdate=k,e.invariant=P,e.last=q,e.matchByPath=T,e.matchPathname=x,e.parsePathname=j,e.parseSearchWith=z,e.replaceEqualDeep=N,e.resolvePath=D,e.rootRouteId=E,e.stringifySearchWith=W,e.useMatch=te,e.useMatches=ee,e.useParentMatches=function(){const e=Z(),t=te(),n=e.state.matches;return n.slice(0,n.findIndex((e=>e.matchId===t.matchId))-1)},e.useRouter=Z,e.warning=M,Object.defineProperty(e,"__esModule",{value:!0})}));
*/function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(this,arguments)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));var u="beforeunload",h="popstate";function d(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,a=n.history;function o(){var e=n.location,t=e.pathname,r=e.search,o=e.hash,i=a.state||{};return[i.idx,{pathname:t,search:r,hash:o,state:i.usr||null,key:i.key||"default"}]}var i=null;n.addEventListener(h,(function(){if(i)P.call(i),i=null;else{var e=r.Pop,t=o(),n=t[0],a=t[1];if(P.length){if(null!=n){var s=d-n;s&&(i={action:e,location:a,retry:function(){I(-1*s)}},I(s))}}else S(e)}}));var s=r.Pop,l=o(),d=l[0],f=l[1],p=v(),P=v();function b(e){return"string"==typeof e?e:y(e)}function E(e,t){return void 0===t&&(t=null),c({pathname:f.pathname,hash:"",search:""},"string"==typeof e?_(e):e,{state:t,key:g()})}function w(e,t){return[{usr:e.state,key:e.key,idx:t},b(e)]}function R(e,t,n){return!P.length||(P.call({action:e,location:t,retry:n}),!1)}function S(e){s=e;var t=o();d=t[0],f=t[1],p.call({action:s,location:f})}function I(e){a.go(e)}null==d&&(d=0,a.replaceState(c({},a.state,{idx:d}),""));var x={get action(){return s},get location(){return f},createHref:b,push:function e(t,o){var i=r.Push,s=E(t,o);if(R(i,s,(function(){e(t,o)}))){var l=w(s,d+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(e){n.location.assign(u)}S(i)}},replace:function e(t,n){var o=r.Replace,i=E(t,n);if(R(o,i,(function(){e(t,n)}))){var s=w(i,d),l=s[0],c=s[1];a.replaceState(l,"",c),S(o)}},go:I,back:function(){I(-1)},forward:function(){I(1)},listen:function(e){return p.push(e)},block:function(e){var t=P.push(e);return 1===P.length&&n.addEventListener(u,m),function(){t(),P.length||n.removeEventListener(u,m)}}};return x}function f(e){void 0===e&&(e={});var t=e,n=t.initialEntries,a=void 0===n?["/"]:n,o=t.initialIndex,i=a.map((function(e){return c({pathname:"/",search:"",hash:"",state:null,key:g()},"string"==typeof e?_(e):e)})),s=p(null==o?i.length-1:o,0,i.length-1),l=r.Pop,u=i[s],h=v(),d=v();function f(e,t){return void 0===t&&(t=null),c({pathname:u.pathname,search:"",hash:""},"string"==typeof e?_(e):e,{state:t,key:g()})}function m(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function P(e,t){l=e,u=t,h.call({action:l,location:u})}function b(e){var t=p(s+e,0,i.length-1),n=r.Pop,a=i[t];m(n,a,(function(){b(e)}))&&(s=t,P(n,a))}var E={get index(){return s},get action(){return l},get location(){return u},createHref:function(e){return"string"==typeof e?e:y(e)},push:function e(t,n){var a=r.Push,o=f(t,n);m(a,o,(function(){e(t,n)}))&&(s+=1,i.splice(s,i.length,o),P(a,o))},replace:function e(t,n){var a=r.Replace,o=f(t,n);m(a,o,(function(){e(t,n)}))&&(i[s]=o,P(a,o))},go:b,back:function(){b(-1)},forward:function(){b(1)},listen:function(e){return h.push(e)},block:function(e){return d.push(e)}};return E}function p(e,t,n){return Math.min(Math.max(e,t),n)}function m(e){e.preventDefault(),e.returnValue=""}function v(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function g(){return Math.random().toString(36).substr(2,8)}function y(e){var t=e.pathname,n=void 0===t?"/":t,a=e.search,r=void 0===a?"":a,o=e.hash,i=void 0===o?"":o;return r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),i&&"#"!==i&&(n+="#"===i.charAt(0)?i:"#"+i),n}function _(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function P(e,t){if(!e)throw new Error("Invariant failed")}function b(e){if(!e)return"";var t=decodeURIComponent(e);return"false"!==t&&("true"===t||(0*+t==0?+t:t))}const E="__root__",w=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function R(e){var t,n;const a=(null==e?void 0:e.history)||(w?d():f());let r={options:l({},e,{stringifySearch:null!=(t=null==e?void 0:e.stringifySearch)?t:U,parseSearch:null!=(n=null==e?void 0:e.parseSearch)?n:H}),listeners:[],removeActionQueue:[],basepath:"",routeTree:void 0,routesById:{},location:void 0,allRouteInfo:void 0,navigationPromise:Promise.resolve(),resolveNavigation:()=>{},preloadCache:{},state:{status:"idle",location:null,matches:[],actions:{},loaderData:{},lastUpdated:Date.now()},startedLoadingAt:Date.now(),subscribe:e=>(r.listeners.push(e),()=>{r.listeners=r.listeners.filter((t=>t!==e))}),getRoute:e=>r.routesById[e],notify:()=>{r.state=l({},r.state),r.listeners.forEach((e=>e()))},mount:()=>{const e=r.buildLocation({to:".",search:!0,hash:!0});return e.href!==r.location.href?r.commitLocation(e,!0):r.loadLocation()},update:e=>{Object.assign(r.options,e);const{basepath:t,routeConfig:n}=r.options;return r.basepath=O("/"+(null!=t?t:"")),n&&(r.routesById={},r.routeTree=r.buildRouteTree(n)),r},destroy:a.listen((e=>{r.loadLocation(r.parseLocation(e.location,r.location))})),buildRouteTree:e=>{const t=(e,n)=>e.map((e=>{const a=S(e,e.options,n,r);if(r.routesById[a.routeId])throw new Error;r.routesById[a.routeId]=a;const o=e.children;return a.childRoutes=null!=o&&o.length?t(o,a):void 0,a}));return t([e])[0]},parseLocation:(e,t)=>{var n;const a=r.options.parseSearch(e.search);return{pathname:e.pathname,searchStr:e.search,search:N(null==t?void 0:t.search,a),hash:null!=(n=e.hash.split("#").reverse()[0])?n:"",href:""+e.pathname+e.search+e.hash,state:e.state,key:e.key}},buildLocation:function(e){var t,n,a,o,i,s,c,u,h;void 0===e&&(e={});const d=e.fromCurrent?r.location.pathname:null!=(t=e.from)?t:r.location.pathname;let f=D(null!=(n=r.basepath)?n:"/",d,""+(null!=(a=e.to)?a:"."));const p=r.matchRoutes(r.location.pathname,{strictParseParams:!0}),m=r.matchRoutes(f),v=l({},null==(o=q(p))?void 0:o.params);let g=!0===(null==(i=e.params)||i)?v:k(e.params,v);g&&m.map((e=>e.options.stringifyParams)).filter(Boolean).forEach((e=>{Object.assign({},g,e(g))})),f=L(f,null!=g?g:{});const y=null!=(s=e.__preSearchFilters)&&s.length?e.__preSearchFilters.reduce(((e,t)=>t(e)),r.location.search):r.location.search,_=!0===e.search?y:e.search?null!=(c=k(e.search,y))?c:{}:null!=(u=e.__preSearchFilters)&&u.length?y:{},P=null!=(h=e.__postSearchFilters)&&h.length?e.__postSearchFilters.reduce(((e,t)=>t(e)),_):_,b=N(r.location.search,P),E=r.options.stringifySearch(b);let w=!0===e.hash?r.location.hash:k(e.hash,r.location.hash);return w=w?"#"+w:"",{pathname:f,search:b,searchStr:E,state:r.location.state,hash:w,href:""+f+E+w,key:e.key}},commitLocation:(e,t)=>{const n=""+Date.now()+Math.random();r.navigateTimeout&&clearTimeout(r.navigateTimeout);let o="replace";t||(o="push");return r.parseLocation(a.location).href===e.href&&!e.key&&(o="replace"),"replace"===o?a.replace({pathname:e.pathname,hash:e.hash,search:e.searchStr},{id:n}):a.push({pathname:e.pathname,hash:e.hash,search:e.searchStr},{id:n}),r.navigationPromise=new Promise((e=>{const t=r.resolveNavigation;r.resolveNavigation=()=>{t(),e()}})),r.navigationPromise},buildNext:e=>{const t=r.buildLocation(e),n=r.matchRoutes(t.pathname),a=n.map((e=>{var t;return null!=(t=e.options.preSearchFilters)?t:[]})).flat().filter(Boolean),o=n.map((e=>{var t;return null!=(t=e.options.postSearchFilters)?t:[]})).flat().filter(Boolean);return r.buildLocation(l({},e,{__preSearchFilters:a,__postSearchFilters:o}))},cancelMatches:()=>{var e,t;[...r.state.matches,...null!=(e=null==(t=r.state.pending)?void 0:t.matches)?e:[]].forEach((e=>{e.cancel()}))},loadLocation:async e=>{const t=Math.random();r.startedLoadingAt=t,e&&(r.location=e),r.removeActionQueue.forEach((e=>{let{action:t,actionState:n}=e;r.state.currentAction===n&&(r.state.currentAction=void 0),t.current===n&&(t.current=void 0)})),r.removeActionQueue=[],r.cancelMatches();const n=r.matchRoutes(location.pathname,{strictParseParams:!0});r.state=l({},r.state,{pending:{matches:n,location:r.location}}),r.notify();const a=await r.loadMatches(n,{withPending:!0});if(r.startedLoadingAt!==t)return r.navigationPromise;const o=r.state.matches;o.filter((e=>!a.find((t=>t.matchId===e.matchId)))).forEach((e=>{null==e.__.onExit||e.__.onExit({params:e.params,search:e.routeSearch})})),o.filter((e=>a.find((t=>t.matchId===e.matchId)))).forEach((e=>{null==e.options.onTransition||e.options.onTransition({params:e.params,search:e.routeSearch})})),a.filter((e=>!o.find((t=>t.matchId===e.matchId)))).forEach((e=>{e.__.onExit=null==e.options.onMatch?void 0:e.options.onMatch({params:e.params,search:e.search})})),r.state=l({},r.state,{location:r.location,matches:a,pending:void 0}),a.some((e=>"loading"===e.status))&&(r.notify(),await Promise.all(a.map((e=>e.__.loaderPromise||Promise.resolve())))),r.startedLoadingAt===t&&(r.notify(),r.resolveNavigation())},cleanPreloadCache:()=>{const e=Date.now();Object.keys(r.preloadCache).forEach((t=>{const n=r.preloadCache[t];"loading"!==n.match.status&&(n.match.updatedAt&&n.match.updatedAt+n.maxAge>e||delete r.preloadCache[t])}))},loadRoute:async function(e,t){void 0===e&&(e=r.location);const n=r.buildNext(e),a=r.matchRoutes(n.pathname,{strictParseParams:!0});return await r.loadMatches(a,{preload:!0,maxAge:t.maxAge}),a},matchRoutes:(e,t)=>{var n,a;r.cleanPreloadCache();const o=[];if(!r.routeTree)return o;const i=[...r.state.matches,...null!=(n=null==(a=r.state.pending)?void 0:a.matches)?n:[]],s=async n=>{var a,c,u;const h=q(o);let d=null!=(a=null==h?void 0:h.params)?a:{};const f=null!=(c=null==r.options.filterRoutes?void 0:r.options.filterRoutes(n))?c:n;let p=[];const m=(n,a)=>(a.some((a=>{var o,i,s;if(!a.routePath&&null!=(o=a.childRoutes)&&o.length)return m([...p,a],a.childRoutes);const c=!!("/"!==a.routePath||null!=(i=a.childRoutes)&&i.length),u=x(e,{to:a.fullPath,fuzzy:c,caseSensitive:null!=(s=a.options.caseSensitive)?s:r.options.caseSensitive});if(u){let e;try{var h;e=null!=(h=null==a.options.parseParams?void 0:a.options.parseParams(u))?h:u}catch(e){if(null!=t&&t.strictParseParams)throw e}d=l({},d,e)}return u&&(p=[...n,a]),!!p.length})),!!p.length);if(m([],f),!p.length)return;p.forEach((t=>{var n;const a=L(t.routePath,d),s=L(t.routeId,d,!0),l=i.find((e=>e.matchId===s))||(null==(n=r.preloadCache[s])?void 0:n.match)||I(r,t,{matchId:s,params:d,pathname:A([e,a])});o.push(l)}));const v=q(p);null!=(u=v.childRoutes)&&u.length&&s(v.childRoutes)};return s([r.routeTree]),function(e){e.forEach(((t,n)=>{const a=e[n-1];a&&(t.loaderData=N(t.loaderData,l({},a.loaderData,t.routeLoaderData)))}))}(o),o},loadMatches:async(e,t)=>{const n=e.map((async e=>{e.__.validate(),null!=t&&t.preload&&(r.preloadCache[e.matchId]={maxAge:null==t?void 0:t.maxAge,match:e}),("success"===e.status&&e.isInvalid||"error"===e.status||"idle"===e.status)&&e.load(),null!=t&&t.withPending&&e.__.startPending(),await e.__.loadPromise}));return r.notify(),await Promise.all(n),e},invalidateRoute:e=>{var t,n;const a=r.buildNext(e),o=r.matchRoutes(a.pathname).map((e=>e.matchId));[...r.state.matches,...null!=(t=null==(n=r.state.pending)?void 0:n.matches)?t:[]].forEach((e=>{o.includes(e.matchId)&&e.invalidate()}))},reload:()=>r._navigate({fromCurrent:!0,replace:!0,search:!0}),resolvePath:(e,t)=>D(r.basepath,e,O(t)),matchRoute:(e,t)=>{var n;e=l({},e,{to:e.to?r.resolvePath(null!=(n=e.from)?n:"",e.to):void 0});const a=r.buildNext(e);var o;return null!=t&&t.pending?!(null==(o=r.state.pending)||!o.location)&&!!x(r.state.pending.location.pathname,l({},t,{to:a.pathname})):!!x(r.state.location.pathname,l({},t,{to:a.pathname}))},_navigate:e=>{const t=r.buildNext(e);return r.commitLocation(t,e.replace)},navigate:async e=>{let{from:t,to:n=".",search:a,hash:o,replace:i,params:s}=e;const l=String(n),c=String(t);let u;try{new URL(""+l),u=!0}catch(e){}return P(!u),r._navigate({from:c,to:l,search:a,hash:o,replace:i,params:s})},buildLink:e=>{var t,n,a;let{from:o,to:i=".",search:s,params:l,hash:c,target:u,replace:h,activeOptions:d,preload:f,preloadMaxAge:p,preloadDelay:m,disabled:v}=e;try{return new URL(""+i),{type:"external",href:i}}catch(e){}const g={from:o,to:i,search:s,params:l,hash:c,replace:h},y=r.buildNext(g);f=null!=(t=f)?t:r.options.defaultLinkPreload;const _=null!=(n=null!=p?p:r.options.defaultLinkPreloadMaxAge)?n:2e3,P=null!=(a=null!=m?m:r.options.defaultLinkPreloadDelay)?a:50,b=r.state.location.pathname===y.pathname,E=r.state.location.pathname.split("/"),w=y.pathname.split("/").every(((e,t)=>e===E[t])),R=r.state.location.hash===y.hash,S=null!=d&&d.exact?b:w,I=null==d||!d.includeHash||R;return{type:"internal",next:y,handleFocus:e=>{f&&_>0&&r.loadRoute(g,{maxAge:_})},handleClick:e=>{v||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||e.defaultPrevented||u&&"_self"!==u||0!==e.button||(e.preventDefault(),!b||s||c||r.invalidateRoute(g),r._navigate(g))},handleEnter:e=>{const t=e.target||{};if(f&&_>0){if(t.preloadTimeout)return;t.preloadTimeout=setTimeout((()=>{t.preloadTimeout=null,r.loadRoute(g,{maxAge:_})}),P)}},handleLeave:e=>{const t=e.target||{};t.preloadTimeout&&(clearTimeout(t.preloadTimeout),t.preloadTimeout=null)},isActive:S&&I,disabled:v}},__experimental__createSnapshot:()=>l({},r.state,{matches:r.state.matches.map((e=>{let{routeLoaderData:t,matchId:n}=e;return{matchId:n,loaderData:t}}))})};return r.location=r.parseLocation(a.location),r.state.location=r.location,r.update(e),null==r.options.createRouter||r.options.createRouter(r),r}function S(e,t,n,a){const{id:r,routeId:o,path:i,fullPath:s}=e,c=a.state.actions[r]||(a.state.actions[r]={pending:[],submit:async(e,t)=>{var n;if(!u)return;const r=null==(n=null==t?void 0:t.invalidate)||n,o={submittedAt:Date.now(),status:"pending",submission:e};c.current=o,c.latest=o,c.pending.push(o),a.state=l({},a.state,{currentAction:o,latestAction:o}),a.notify();try{const t=await(null==u.options.action?void 0:u.options.action(e));return o.data=t,r&&(a.invalidateRoute({to:".",fromCurrent:!0}),await a.reload()),o.status="success",t}catch(e){console.error(e),o.error=e,o.status="error"}finally{c.pending=c.pending.filter((e=>e!==o)),a.removeActionQueue.push({action:c,actionState:o}),a.notify()}}},a.state.actions[r]);let u={routeId:r,routeRouteId:o,routePath:i,fullPath:s,options:t,router:a,childRoutes:void 0,parentRoute:n,action:c,buildLink:e=>a.buildLink(l({},e,{from:s})),navigate:e=>a.navigate(l({},e,{from:s})),matchRoute:(e,t)=>a.matchRoute(l({},e,{from:s}),t)};return null==a.options.createRoute||a.options.createRoute({router:a,route:u}),u}function I(e,t,n){const a=l({},t,n,{router:e,routeSearch:{},search:{},childMatches:[],status:"idle",routeLoaderData:{},loaderData:{},isPending:!1,isFetching:!1,isInvalid:!1,__:{abortController:new AbortController,latestId:"",resolve:()=>{},notify:()=>{a.__.resolve(),a.router.notify()},startPending:()=>{var t,n;const r=null!=(t=a.options.pendingMs)?t:e.options.defaultPendingMs,o=null!=(n=a.options.pendingMinMs)?n:e.options.defaultPendingMinMs;a.__.pendingTimeout||"loading"!==a.status||void 0===r||(a.__.pendingTimeout=setTimeout((()=>{a.isPending=!0,a.__.resolve(),void 0!==o&&(a.__.pendingMinPromise=new Promise((e=>a.__.pendingMinTimeout=setTimeout(e,o))))}),r))},cancelPending:()=>{a.isPending=!1,clearTimeout(a.__.pendingTimeout),clearTimeout(a.__.pendingMinTimeout),delete a.__.pendingMinPromise},validate:()=>{var t,n;const r=null!=(t=null==(n=a.parentMatch)?void 0:n.search)?t:e.location.search;try{const e=a.routeSearch;let t=N(e,null==a.options.validateSearch?void 0:a.options.validateSearch(r));e!==t&&(a.isInvalid=!0),a.routeSearch=t,a.search=N(r,l({},r,t))}catch(e){console.error(e);const t=new Error("Invalid search params found",{cause:e});return t.code="INVALID_SEARCH_PARAMS",a.status="error",void(a.error=t)}}},cancel:()=>{var e;null==(e=a.__.abortController)||e.abort(),a.__.cancelPending()},invalidate:()=>{a.isInvalid=!0},load:async()=>{const e=""+Date.now()+Math.random();return a.__.latestId=e,"error"!==a.status&&"idle"!==a.status||(a.status="loading"),a.isInvalid=!1,a.__.loadPromise=new Promise((async t=>{a.isFetching=!0,a.__.resolve=t;const n=(async()=>{const t=a.options.import;t&&(a.__.importPromise=t({params:a.params}).then((e=>{a.__=l({},a.__,e)}))),await a.__.importPromise,a.__.elementsPromise=(async()=>{await Promise.all(["element","errorElement","catchElement","pendingElement"].map((async e=>{const t=a.options[e];if(!a.__[e])if("function"==typeof t){const n=await t(a);a.__[e]=n}else a.__[e]=a.options[e]})))})(),a.__.dataPromise=Promise.resolve().then((async()=>{try{const t=await(null==a.options.loader?void 0:a.options.loader({params:a.params,search:a.routeSearch,signal:a.__.abortController.signal}));if(e!==a.__.latestId)return a.__.loaderPromise;a.routeLoaderData=N(a.routeLoaderData,t),a.error=void 0,a.status="success",a.updatedAt=Date.now()}catch(t){if(e!==a.__.latestId)return a.__.loaderPromise;a.error=t,a.status="error",a.updatedAt=Date.now()}}));try{if(await Promise.all([a.__.elementsPromise,a.__.dataPromise]),e!==a.__.latestId)return a.__.loaderPromise;a.__.pendingMinPromise&&(await a.__.pendingMinPromise,delete a.__.pendingMinPromise)}finally{if(e!==a.__.latestId)return a.__.loaderPromise;a.__.cancelPending(),a.isPending=!1,a.isFetching=!1,a.__.notify()}})();if(a.__.loaderPromise=n,await n,e!==a.__.latestId)return a.__.loaderPromise;delete a.__.loaderPromise})),await a.__.loadPromise}});return a}function x(e,t){const n=T(e,t);if(!t.to||n)return null!=n?n:{}}function L(e,t,n){return A(j(e).map((e=>{return"*"!==e.value||n?"param"===e.type?null!=(a=t[e.value.substring(1)])?a:"":e.value:"";var a})))}function M(e,t){if(e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}return!0}function k(e,t){return"function"==typeof e?e(t):e}function A(e){return O(e.filter(Boolean).join("/"))}function O(e){return e.replace(/\/{2,}/g,"/")}function C(e){return"/"===e?e:e.replace(/\/{1,}$/,"")}function T(e,t){var n;const a=j(e),r=j(""+(null!=(n=t.to)?n:"*")),o={};return(()=>{for(let e=0;e<Math.max(a.length,r.length);e++){const n=a[e],i=r[e],s=e===r.length-1,l=e===a.length-1;if(i){if("wildcard"===i.type)return!(null==n||!n.value)&&(o["*"]=A(a.slice(e).map((e=>e.value))),!0);if("pathname"===i.type){if("/"===i.value&&(null==n||!n.value))return!0;if(n)if(t.caseSensitive){if(i.value!==n.value)return!1}else if(i.value.toLowerCase()!==n.value.toLowerCase())return!1}if(!n)return!1;if("param"===i.type){if("/"===(null==n?void 0:n.value))return!1;n.value.startsWith(":")||(o[i.value.substring(1)]=n.value)}}if(s&&!l)return!!t.fuzzy}return!0})()?o:void 0}function j(e){if(!e)return[];const t=[];if("/"===(e=O(e)).slice(0,1)&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map((e=>e.startsWith("*")?{type:"wildcard",value:e}:":"===e.charAt(0)?{type:"param",value:e}:{type:"pathname",value:e}))),"/"===e.slice(-1)&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function D(e,t,n){t=t.replace(new RegExp("^"+e),"/"),n=n.replace(new RegExp("^"+e),"/");let a=j(t);const r=j(n);r.forEach(((e,t)=>{if("/"===e.value)t?t===r.length-1&&a.push(e):a=[e];else if(".."===e.value){var n;a.length>1&&"/"===(null==(n=q(a))?void 0:n.value)&&a.pop(),a.pop()}else{if("."===e.value)return;a.push(e)}}));return O(A([e,...a.map((e=>e.value))]))}function N(e,t){if(e===t)return e;const n=Array.isArray(e)&&Array.isArray(t);if(n||B(e)&&B(t)){const a=n?e.length:Object.keys(e).length,r=n?t:Object.keys(t),o=r.length,i=n?[]:{};let s=0;for(let a=0;a<o;a++){const o=n?a:r[a];i[o]=N(e[o],t[o]),i[o]===e[o]&&s++}return a===o&&s===a?e:i}return t}function B(e){if(!F(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!F(n)&&!!n.hasOwnProperty("isPrototypeOf")}function F(e){return"[object Object]"===Object.prototype.toString.call(e)}const H=z(JSON.parse),U=W(JSON.stringify);function z(e){return t=>{"?"===t.substring(0,1)&&(t=t.substring(1));let n=function(e){for(var t,n,a={},r=e.split("&");t=r.shift();)void 0!==a[n=(t=t.split("=")).shift()]?a[n]=[].concat(a[n],b(t.shift())):a[n]=b(t.shift());return a}(t);for(let t in n){const a=n[t];if("string"==typeof a)try{n[t]=e(a)}catch(e){}}return n}}function W(e){return t=>{(t=l({},t))&&Object.keys(t).forEach((n=>{const a=t[n];if(void 0===a||void 0===a)delete t[n];else if(a&&"object"==typeof a&&null!==a)try{t[n]=e(a)}catch(e){}}));const n=function(e,t){var n,a,r,o="";for(n in e)if(void 0!==(r=e[n]))if(Array.isArray(r))for(a=0;a<r.length;a++)o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r[a]);else o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r);return(t||"")+o}(t).toString();return n?"?"+n:""}}function q(e){return e[e.length-1]}const K=["type","children","target","activeProps","inactiveProps","activeOptions","disabled","hash","search","params","to","preload","preloadDelay","preloadMaxAge","replace","style","className","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd"],Q=["pending","caseSensitive","children"],V=["children","router"],J=o.createContext(null),Y=o.createContext(null),$=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)?o.useLayoutEffect:o.useEffect;function G(e){return o.createElement(J.Provider,e)}const X=e=>{n.useSyncExternalStore((t=>e.subscribe((()=>t()))),(()=>e.state))};function Z(){return o.useContext(J)}function ee(){var e,t;const n=function(){const e=o.useContext(Y);return M(!e,"useRouter must be used inside a <Router> component!"),X(e.router),e.router}(),[,...a]=Z(),r=a[0];if(!r)return null;const i=null!=(e=(()=>{var e,t;if(!r)return null;const a=null!=(e=r.__.errorElement)?e:n.options.defaultErrorElement;if("error"===r.status){if(a)return a;if(r.options.useErrorBoundary||n.options.useErrorBoundary)throw r.error;return o.createElement(ne,{error:r.error})}if("loading"===r.status||"idle"===r.status){if(r.isPending){var i;const e=null!=(i=r.__.pendingElement)?i:n.options.defaultPendingElement;var s;if(r.options.pendingMs||e)return null!=(s=e)?s:null}return null}return null!=(t=r.__.element)?t:n.options.defaultElement})())?e:o.createElement(ee,null),s=null!=(t=null==r?void 0:r.options.catchElement)?t:n.options.defaultCatchElement;return o.createElement(G,{value:a,key:r.matchId},o.createElement(te,{catchElement:s},i))}class te extends o.Component{constructor(){super(...arguments),this.state={error:!1},this.reset=()=>{this.setState({error:!1,info:!1})}}componentDidCatch(e,t){console.error(e),this.setState({error:e,info:t})}render(){var e;const t=null!=(e=this.props.catchElement)?e:ne;return this.state.error?"function"==typeof t?t(this.state):t:this.props.children}}function ne(e){let{error:t}=e;return o.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},o.createElement("strong",{style:{fontSize:"1.2rem"}},"Something went wrong!"),o.createElement("div",{style:{height:".5rem"}}),o.createElement("div",null,o.createElement("pre",null,t.message?o.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},t.message):null)),o.createElement("div",{style:{height:"1rem"}}),o.createElement("div",{style:{fontSize:".8em",borderLeft:"3px solid rgba(127, 127, 127, 1)",paddingLeft:".5rem",opacity:.5}},"If you are the owner of this website, it's highly recommended that you configure your own custom Catch/Error boundaries for the router. You can optionally configure a boundary for each route."))}e.DefaultCatchBoundary=ne,e.MatchesProvider=G,e.Outlet=ee,e.RouterProvider=function(e){let{children:t,router:a}=e,r=s(e,V);return a.update(r),n.useSyncExternalStore((e=>a.subscribe((()=>e()))),(()=>a.state)),$((()=>{a.mount()}),[]),o.createElement(Y.Provider,{value:{router:a}},o.createElement(G,{value:a.state.matches},null!=t?t:o.createElement(ee,null)))},e.createBrowserHistory=d,e.createHashHistory=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,a=n.history;function o(){var e=_(n.location.hash.substr(1)),t=e.pathname,r=void 0===t?"/":t,o=e.search,i=void 0===o?"":o,s=e.hash,l=void 0===s?"":s,c=a.state||{};return[c.idx,{pathname:r,search:i,hash:l,state:c.usr||null,key:c.key||"default"}]}var i=null;function s(){if(i)b.call(i),i=null;else{var e=r.Pop,t=o(),n=t[0],a=t[1];if(b.length){if(null!=n){var s=f-n;s&&(i={action:e,location:a,retry:function(){x(-1*s)}},x(s))}}else I(e)}}n.addEventListener(h,s),n.addEventListener("hashchange",(function(){y(o()[1])!==y(p)&&s()}));var l=r.Pop,d=o(),f=d[0],p=d[1],P=v(),b=v();function E(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var a=n.location.href,r=a.indexOf("#");t=-1===r?a:a.slice(0,r)}return t}()+"#"+("string"==typeof e?e:y(e))}function w(e,t){return void 0===t&&(t=null),c({pathname:p.pathname,hash:"",search:""},"string"==typeof e?_(e):e,{state:t,key:g()})}function R(e,t){return[{usr:e.state,key:e.key,idx:t},E(e)]}function S(e,t,n){return!b.length||(b.call({action:e,location:t,retry:n}),!1)}function I(e){l=e;var t=o();f=t[0],p=t[1],P.call({action:l,location:p})}function x(e){a.go(e)}null==f&&(f=0,a.replaceState(c({},a.state,{idx:f}),""));var L={get action(){return l},get location(){return p},createHref:E,push:function e(t,o){var i=r.Push,s=w(t,o);if(S(i,s,(function(){e(t,o)}))){var l=R(s,f+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(e){n.location.assign(u)}I(i)}},replace:function e(t,n){var o=r.Replace,i=w(t,n);if(S(o,i,(function(){e(t,n)}))){var s=R(i,f),l=s[0],c=s[1];a.replaceState(l,"",c),I(o)}},go:x,back:function(){x(-1)},forward:function(){x(1)},listen:function(e){return P.push(e)},block:function(e){var t=b.push(e);return 1===b.length&&n.addEventListener(u,m),function(){t(),b.length||n.removeEventListener(u,m)}}};return L},e.createMemoryHistory=f,e.createReactRouter=function(e){const t=(e,t)=>({linkProps:t=>{var n,a;const{target:r,activeProps:o=(()=>({className:"active"})),inactiveProps:l=(()=>({})),disabled:c,style:u,className:h,onClick:d,onFocus:f,onMouseEnter:p,onMouseLeave:m}=t,v=s(t,K),g=e.buildLink(t);if("external"===g.type){const{href:e}=g;return{href:e}}const{handleClick:y,handleFocus:_,handleEnter:P,handleLeave:b,isActive:E,next:w}=g,R=e=>t=>{t.persist(),e.forEach((e=>{e&&e(t)}))},S=E&&null!=(n=k(o))?n:{},I=E?{}:null!=(a=k(l))?a:{};return i({},S,I,v,{href:c?void 0:w.href,onClick:R([y,d]),onFocus:R([_,f]),onMouseEnter:R([P,p]),onMouseLeave:R([b,m]),target:r,style:i({},u,S.style,I.style),className:[h,S.className,I.className].filter(Boolean).join(" ")||void 0},c?{role:"link","aria-disabled":!0}:void 0,{"data-status":E?"active":void 0})},Link:o.forwardRef(((n,a)=>{const r=e.linkProps(n);return X(t),o.createElement("a",i({ref:a},r,{children:"function"==typeof n.children?n.children({isActive:"active"===r["data-status"]}):n.children}))})),MatchRoute:t=>{const{pending:n,caseSensitive:a}=t,r=s(t,Q),o=e.matchRoute(r,{pending:n,caseSensitive:a});return o?"function"==typeof t.children?t.children(o):t.children:null}});return R(i({},e,{createRouter:e=>{const n={useRoute:t=>{const n=e.getRoute(t);return X(e),P(n),n},useMatch:t=>{P(t!==E);const n=null==(a=Z())?void 0:a[0];var a;const r=e.state.matches.find((e=>e.routeId===t));return P(r),P(n.routeId==(null==r?void 0:r.routeId),(null==r||r.routeId,n.routeId,null==r||r.routeId)),X(e),r||P("Match not found!"),r}},a=t(e.getRoute("/"),e);Object.assign(e,n,a)},createRoute:e=>{let{router:n,route:a}=e;const r=t(a,n);Object.assign(a,r)}}))},e.createRoute=S,e.createRouteConfig=function e(t,n,a,r,o){void 0===t&&(t={}),void 0===a&&(a=!0),a&&(t.path=E),r===E&&(r="");let i=a?E:t.path;i&&"/"!==i&&(i=function(e){return C(function(e){return"/"===e?e:e.replace(/^\/{1,}/,"")}(e))}(i));const s=i||t.id;let l=A([r,s]);i===E&&(i="/"),l!==E&&(l=A(["/",l]));const c=l===E?"/":C(A([o,i]));return{id:l,routeId:s,path:i,fullPath:c,options:t,children:n,addChildren:n=>e(t,n((t=>e(t,void 0,!1,l,c))),!1,r,o)}},e.createRouteMatch=I,e.createRouter=R,e.defaultParseSearch=H,e.defaultStringifySearch=U,e.functionalUpdate=k,e.invariant=P,e.last=q,e.matchByPath=T,e.matchPathname=x,e.parsePathname=j,e.parseSearchWith=z,e.replaceEqualDeep=N,e.resolvePath=D,e.rootRouteId=E,e.stringifySearchWith=W,e.warning=M,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@tanstack/react-router",
"author": "Tanner Linsley",
"version": "0.0.1-alpha.5",
"version": "0.0.1-alpha.6",
"license": "MIT",

@@ -43,3 +43,3 @@ "repository": "tanstack/router",

"@babel/runtime": "^7.16.7",
"@tanstack/router-core": "0.0.1-alpha.5",
"@tanstack/router-core": "0.0.1-alpha.6",
"use-sync-external-store": "^1.2.0"

@@ -46,0 +46,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc