Socket
Socket
Sign inDemoInstall

@tanstack/react-router

Package Overview
Dependencies
Maintainers
1
Versions
581
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/react-router - npm Package Compare versions

Comparing version 0.0.1-beta.33 to 0.0.1-beta.34

96

build/stats-react.json

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

{
"uid": "5f6f-73",
"uid": "3832-73",
"name": "\u0000rollupPluginBabelHelpers.js"

@@ -19,11 +19,11 @@ },

"name": "@babel+runtime@7.20.6/node_modules/@babel/runtime/helpers/esm/extends.js",
"uid": "5f6f-75"
"uid": "3832-75"
},
{
"name": "history@5.3.0/node_modules/history/index.js",
"uid": "5f6f-77"
"uid": "3832-77"
},
{
"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
"uid": "5f6f-79"
"uid": "3832-79"
}

@@ -37,7 +37,7 @@ ]

"name": "router-core/build/esm/index.js",
"uid": "5f6f-81"
"uid": "3832-81"
},
{
"name": "react-router/src/index.tsx",
"uid": "5f6f-83"
"uid": "3832-83"
}

@@ -52,44 +52,44 @@ ]

"nodeParts": {
"5f6f-73": {
"3832-73": {
"renderedLength": 793,
"gzipLength": 363,
"brotliLength": 0,
"mainUid": "5f6f-72"
"mainUid": "3832-72"
},
"5f6f-75": {
"3832-75": {
"renderedLength": 435,
"gzipLength": 241,
"brotliLength": 0,
"mainUid": "5f6f-74"
"mainUid": "3832-74"
},
"5f6f-77": {
"3832-77": {
"renderedLength": 20630,
"gzipLength": 3800,
"brotliLength": 0,
"mainUid": "5f6f-76"
"mainUid": "3832-76"
},
"5f6f-79": {
"3832-79": {
"renderedLength": 181,
"gzipLength": 129,
"brotliLength": 0,
"mainUid": "5f6f-78"
"mainUid": "3832-78"
},
"5f6f-81": {
"renderedLength": 54818,
"gzipLength": 12329,
"3832-81": {
"renderedLength": 55134,
"gzipLength": 12415,
"brotliLength": 0,
"mainUid": "5f6f-80"
"mainUid": "3832-80"
},
"5f6f-83": {
"3832-83": {
"renderedLength": 14166,
"gzipLength": 3535,
"brotliLength": 0,
"mainUid": "5f6f-82"
"mainUid": "3832-82"
}
},
"nodeMetas": {
"5f6f-72": {
"3832-72": {
"id": "\u0000rollupPluginBabelHelpers.js",
"moduleParts": {
"index.production.js": "5f6f-73"
"index.production.js": "3832-73"
},

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

{
"uid": "5f6f-82"
"uid": "3832-82"
}
]
},
"5f6f-74": {
"3832-74": {
"id": "/node_modules/.pnpm/@babel+runtime@7.20.6/node_modules/@babel/runtime/helpers/esm/extends.js",
"moduleParts": {
"index.production.js": "5f6f-75"
"index.production.js": "3832-75"
},

@@ -112,14 +112,14 @@ "imported": [],

{
"uid": "5f6f-76"
"uid": "3832-76"
}
]
},
"5f6f-76": {
"3832-76": {
"id": "/node_modules/.pnpm/history@5.3.0/node_modules/history/index.js",
"moduleParts": {
"index.production.js": "5f6f-77"
"index.production.js": "3832-77"
},
"imported": [
{
"uid": "5f6f-74"
"uid": "3832-74"
}

@@ -129,10 +129,10 @@ ],

{
"uid": "5f6f-80"
"uid": "3832-80"
}
]
},
"5f6f-78": {
"3832-78": {
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
"moduleParts": {
"index.production.js": "5f6f-79"
"index.production.js": "3832-79"
},

@@ -142,17 +142,17 @@ "imported": [],

{
"uid": "5f6f-80"
"uid": "3832-80"
}
]
},
"5f6f-80": {
"3832-80": {
"id": "/packages/router-core/build/esm/index.js",
"moduleParts": {
"index.production.js": "5f6f-81"
"index.production.js": "3832-81"
},
"imported": [
{
"uid": "5f6f-76"
"uid": "3832-76"
},
{
"uid": "5f6f-78"
"uid": "3832-78"
}

@@ -162,23 +162,23 @@ ],

{
"uid": "5f6f-82"
"uid": "3832-82"
}
]
},
"5f6f-82": {
"3832-82": {
"id": "/packages/react-router/src/index.tsx",
"moduleParts": {
"index.production.js": "5f6f-83"
"index.production.js": "3832-83"
},
"imported": [
{
"uid": "5f6f-72"
"uid": "3832-72"
},
{
"uid": "5f6f-84"
"uid": "3832-84"
},
{
"uid": "5f6f-85"
"uid": "3832-85"
},
{
"uid": "5f6f-80"
"uid": "3832-80"
}

@@ -189,3 +189,3 @@ ],

},
"5f6f-84": {
"3832-84": {
"id": "react",

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

{
"uid": "5f6f-82"
"uid": "3832-82"
}

@@ -202,3 +202,3 @@ ],

},
"5f6f-85": {
"3832-85": {
"id": "use-sync-external-store/shim",

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

{
"uid": "5f6f-82"
"uid": "3832-82"
}

@@ -212,0 +212,0 @@ ],

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

* @license MIT
*/function b(t,e){if(t===e)return t;const n=Array.isArray(t)&&Array.isArray(e);if(n||P(t)&&P(e)){const a=n?t.length:Object.keys(t).length,o=n?e:Object.keys(e),r=o.length,i=n?[]:{};let s=0;for(let a=0;a<r;a++){const r=n?a:o[a];i[r]=b(t[r],e[r]),i[r]===t[r]&&s++}return a===r&&s===a?t:i}return e}function P(t){if(!w(t))return!1;const e=t.constructor;if(void 0===e)return!0;const n=e.prototype;return!!w(n)&&!!n.hasOwnProperty("isPrototypeOf")}function w(t){return"[object Object]"===Object.prototype.toString.call(t)}function E(t){return t[t.length-1]}function x(t,e){if(t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}return!0}function R(t,e){return"function"==typeof t?t(e):t}function S(t,e){return e.reduce(((e,n)=>(e[n]=t[n],e)),{})}function I(t){return M(t.filter(Boolean).join("/"))}function M(t){return t.replace(/\/{2,}/g,"/")}function A(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function L(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function C(t){return L(A(t))}function k(t,e,n){e=e.replace(new RegExp("^"+t),"/"),n=n.replace(new RegExp("^"+t),"/");let a=O(e);const o=O(n);o.forEach(((t,e)=>{if("/"===t.value)e?e===o.length-1&&a.push(t):a=[t];else if(".."===t.value){var n;a.length>1&&"/"===(null==(n=E(a))?void 0:n.value)&&a.pop(),a.pop()}else{if("."===t.value)return;a.push(t)}}));return M(I([t,...a.map((t=>t.value))]))}function O(t){if(!t)return[];const e=[];if("/"===(t=M(t)).slice(0,1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const n=t.split("/").filter(Boolean);return e.push(...n.map((t=>t.startsWith("*")?{type:"wildcard",value:t}:"$"===t.charAt(0)?{type:"param",value:t}:{type:"pathname",value:t}))),"/"===t.slice(-1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function D(t,e,n){return I(O(t).map((t=>{return"*"!==t.value||n?"param"===t.type?null!=(a=e[t.value.substring(1)])?a:"":t.value:"";var a})))}function j(t,e){const n=F(t,e);if(!e.to||n)return null!=n?n:{}}function F(t,e){var n;const a=O(t),o=O(""+(null!=(n=e.to)?n:"*")),r={};return(()=>{for(let t=0;t<Math.max(a.length,o.length);t++){const n=a[t],i=o[t],s=t===o.length-1,l=t===a.length-1;if(i){if("wildcard"===i.type)return!(null==n||!n.value)&&(r["*"]=I(a.slice(t).map((t=>t.value))),!0);if("pathname"===i.type){if("/"===i.value&&(null==n||!n.value))return!0;if(n)if(e.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.charAt(0)&&(r[i.value.substring(1)]=n.value)}}if(s&&!l)return!!e.fuzzy}return!0})()?r:void 0}function T(t,e){var n,a,o,r="";for(n in t)if(void 0!==(o=t[n]))if(Array.isArray(o))for(a=0;a<o.length;a++)r&&(r+="&"),r+=encodeURIComponent(n)+"="+encodeURIComponent(o[a]);else r&&(r+="&"),r+=encodeURIComponent(n)+"="+encodeURIComponent(o);return(e||"")+r}function N(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||("0"===e.charAt(0)?e:0*+e==0?+e:e))}function B(t){for(var e,n,a={},o=t.split("&");e=o.shift();)void 0!==a[n=(e=e.split("=")).shift()]?a[n]=[].concat(a[n],N(e.shift())):a[n]=N(e.shift());return a}function U(){return U=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},U.apply(this,arguments)}function H(t,e,n,a){const{id:o,routeId:r,path:i,fullPath:s}=t,l=a.state.actions[o]||(a.state.actions[o]={submissions:[],submit:async(t,e)=>{var n;if(!u)return;const o=null==(n=null==e?void 0:e.invalidate)||n;null!=e&&e.multi||(l.submissions=l.submissions.filter((t=>t.isMulti)));const r={submittedAt:Date.now(),status:"pending",submission:t,isMulti:!(null==e||!e.multi)};l.current=r,l.latest=r,l.submissions.push(r),a.notify();try{const e=await(null==u.options.action?void 0:u.options.action(t));return r.data=e,o&&(a.invalidateRoute({to:".",fromCurrent:!0}),await a.reload()),r.status="success",e}catch(t){console.log("tanner"),console.error(t),r.error=t,r.status="error"}finally{a.notify()}}},a.state.actions[o]),c=a.state.loaders[o]||(a.state.loaders[o]={pending:[],fetch:async t=>{if(!u)return;const e={loadedAt:Date.now(),loaderContext:t};c.current=e,c.latest=e,c.pending.push(e),a.notify();try{return await(null==u.options.loader?void 0:u.options.loader(t))}finally{c.pending=c.pending.filter((t=>t!==e)),a.notify()}}},a.state.loaders[o]);let u={routeInfo:void 0,routeId:o,routeRouteId:r,routePath:i,fullPath:s,options:e,router:a,childRoutes:void 0,parentRoute:n,action:l,loader:c,buildLink:t=>a.buildLink(U({},t,{from:s})),navigate:t=>a.navigate(U({},t,{from:s})),matchRoute:(t,e)=>a.matchRoute(U({},t,{from:s}),e)};return null==a.options.createRoute||a.options.createRoute({router:a,route:u}),u}const z="__root__",G=["component","errorComponent","pendingComponent"];function q(t,e,n){const a=U({},e,n,{router:t,routeSearch:{},search:{},childMatches:[],status:"idle",routeLoaderData:{},loaderData:{},isFetching:!1,isInvalid:!1,invalidAt:1/0,getIsInvalid:()=>{const t=Date.now();return a.isInvalid||a.invalidAt<t},__:{abortController:new AbortController,latestId:"",resolve:()=>{},notify:()=>{a.__.resolve(),a.router.notify()},validate:()=>{var e,n;const o=null!=(e=null==(n=a.parentMatch)?void 0:n.search)?e:t.__location.search;try{var r;const t=a.routeSearch,e="object"==typeof a.options.validateSearch?a.options.validateSearch.parse:a.options.validateSearch;let n=b(t,null!=(r=null==e?void 0:e(o))?r:{});t!==n&&(a.isInvalid=!0),a.routeSearch=n,a.search=b(o,U({},o,n)),G.map((async t=>{const e=a.options[t];"function"!=typeof a.__[t]&&(a.__[t]=e)}))}catch(t){console.error(t);const e=new Error("Invalid search params found",{cause:t});return e.code="INVALID_SEARCH_PARAMS",a.status="error",void(a.error=e)}}},cancel:()=>{var t;null==(t=a.__.abortController)||t.abort()},invalidate:()=>{a.isInvalid=!0},hasLoaders:()=>!(!e.options.loader&&!G.some((t=>{var n;return null==(n=e.options[t])?void 0:n.preload}))),load:async e=>{const n=Date.now(),o=null!=e&&e.preload?Math.max(null==e?void 0:e.maxAge,null==e?void 0:e.gcMaxAge):0;if(null!=e&&e.preload&&o>0){if(t.state.matches.find((t=>t.matchId===a.matchId)))return;t.matchCache[a.matchId]={gc:n+e.gcMaxAge,match:a}}if("success"===a.status&&a.getIsInvalid()||"error"===a.status||"idle"===a.status){const t=null!=e&&e.preload?null==e?void 0:e.maxAge:void 0;await a.fetch({maxAge:t})}},fetch:async e=>{const n=""+Date.now()+Math.random();a.__.latestId=n;const o=async()=>{if(n!==a.__.latestId)return new Promise((()=>{}))};"idle"===a.status&&(a.status="loading"),a.isInvalid=!1,a.__.loadPromise=new Promise((async n=>{a.isFetching=!0,a.__.resolve=n,a.__.componentsPromise=(async()=>{await Promise.all(G.map((async e=>{var n;const o=a.options[e];null!=(n=a.__[e])&&n.preload&&(a.__[e]=await t.options.loadComponent(o))})))})(),a.__.dataPromise=Promise.resolve().then((async()=>{try{var n,r,i;if(a.options.loader){const e=await t.loadMatchData(a);await o(),a.routeLoaderData=b(a.routeLoaderData,e)}return a.error=void 0,a.status="success",a.updatedAt=Date.now(),a.invalidAt=a.updatedAt+(null!=(n=null!=(r=null!=(i=null==e?void 0:e.maxAge)?i:a.options.loaderMaxAge)?r:t.options.defaultLoaderMaxAge)?n:0),a.routeLoaderData}catch(t){throw await o(),a.error=t,a.status="error",a.updatedAt=Date.now(),t}}));const r=async()=>{await o(),a.isFetching=!1,delete a.__.loadPromise,a.__.notify()};try{await Promise.all([a.__.componentsPromise,a.__.dataPromise.catch((()=>{}))]),r()}catch(t){r()}})),await a.__.loadPromise,await o()}});return a.hasLoaders()||(a.status="success"),a}const K=W(JSON.parse),V=$(JSON.stringify);function W(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let n=B(e);for(let e in n){const a=n[e];if("string"==typeof a)try{n[e]=t(a)}catch(t){}}return n}}function $(t){return e=>{(e=U({},e))&&Object.keys(e).forEach((n=>{const a=e[n];if(void 0===a||void 0===a)delete e[n];else if(a&&"object"==typeof a&&null!==a)try{e[n]=t(a)}catch(t){}}));const n=T(e).toString();return n?"?"+n:""}}var J;const X="undefined"==typeof window||!(null!=(J=window.document)&&J.createElement);function Q(){return{status:"idle",location:null,matches:[],actions:{},loaders:{},lastUpdated:Date.now(),isFetching:!1,isPreloading:!1}}function Y(t){var e,n;const a=(null==t?void 0:t.history)||(X?d():h()),o=U({defaultLoaderGcMaxAge:3e5,defaultLoaderMaxAge:0,defaultPreloadMaxAge:2e3,defaultPreloadDelay:50,context:void 0},t,{stringifySearch:null!=(e=null==t?void 0:t.stringifySearch)?e:V,parseSearch:null!=(n=null==t?void 0:t.parseSearch)?n:K});let r={types:void 0,history:a,options:o,listeners:[],basepath:"",routeTree:void 0,routesById:{},__location:void 0,resolveNavigation:()=>{},matchCache:{},state:Q(),reset:()=>{r.state=Q(),r.notify()},startedLoadingAt:Date.now(),subscribe:t=>(r.listeners.push(t),()=>{r.listeners=r.listeners.filter((e=>e!==t))}),getRoute:t=>r.routesById[t],notify:()=>{const t="loading"===r.state.status||r.state.matches.some((t=>t.isFetching)),e=Object.values(r.matchCache).some((t=>t.match.isFetching&&!r.state.matches.find((e=>e.matchId===t.match.matchId))));r.state.isFetching===t&&r.state.isPreloading===e||(r.state=U({},r.state,{isFetching:t,isPreloading:e})),Z(r.state.matches),r.listeners.forEach((t=>t(r)))},dehydrate:()=>({location:r.__location,state:U({},S(r.state,["status","location","lastUpdated","location"]),{matches:r.state.matches.map((t=>S(t,["matchId","status","routeLoaderData","loaderData","isInvalid","invalidAt"])))}),context:r.options.context}),hydrate:t=>{r.__location=t.location,r.options.context=t.context;const e=r.matchRoutes(r.__location.pathname,{strictParseParams:!0});e.forEach(((e,n)=>{const a=t.state.matches[n];_(a),Object.assign(e,a)})),e.forEach((t=>t.__.validate())),r.state=U({},r.state,t,{matches:e})},mount:()=>{const t=r.__.buildLocation({to:".",search:!0,hash:!0});t.href!==r.__location.href&&r.__.commitLocation(t,!0),r.state.matches.length||r.load();const e=r.history.listen((t=>{r.load(r.__.parseLocation(t.location,r.__location))}));return!X&&window.addEventListener&&(window.addEventListener("visibilitychange",r.onFocus,!1),window.addEventListener("focus",r.onFocus,!1)),()=>{e(),!X&&window.removeEventListener&&(window.removeEventListener("visibilitychange",r.onFocus),window.removeEventListener("focus",r.onFocus))}},onFocus:()=>{r.load()},update:t=>{const e=(null==t?void 0:t.history)!==r.history;r.__location&&!e||(null!=t&&t.history&&(r.history=t.history),r.__location=r.__.parseLocation(r.history.location),r.state.location=r.__location),Object.assign(r.options,t);const{basepath:n,routeConfig:a}=r.options;return r.basepath=M("/"+(null!=n?n:"")),a&&(r.routesById={},r.routeTree=r.__.buildRouteTree(a)),r},cancelMatches:()=>{var t,e;[...r.state.matches,...null!=(t=null==(e=r.state.pending)?void 0:e.matches)?t:[]].forEach((t=>{t.cancel()}))},load:async t=>{const e=Math.random();r.startedLoadingAt=e,t&&(r.__location=t),r.cancelMatches();const n=r.matchRoutes(r.__location.pathname,{strictParseParams:!0});"undefined"!=typeof document?r.state=U({},r.state,{pending:{matches:n,location:r.__location},status:"loading"}):r.state=U({},r.state,{matches:n,location:r.__location,status:"loading"});try{await Promise.all(n.map((t=>null==t.options.beforeLoad?void 0:t.options.beforeLoad({router:r,match:t}))))}catch(t){throw null!=t&&t.then&&await new Promise((()=>{})),t}if(r.notify(),await r.loadMatches(n),r.startedLoadingAt!==e)return r.navigationPromise;const a=r.state.matches,o=[],i=[];a.forEach((t=>{n.find((e=>e.matchId===t.matchId))?i.push(t):o.push(t)}));const s=n.filter((t=>!a.find((e=>e.matchId===t.matchId)))),l=Date.now();o.forEach((t=>{var e,n,a,o;null==t.__.onExit||t.__.onExit({params:t.params,search:t.routeSearch}),"error"!==t.status||t.isFetching||(t.status="idle",t.error=void 0);const i=Math.max(null!=(e=null!=(n=t.options.loaderGcMaxAge)?n:r.options.defaultLoaderGcMaxAge)?e:0,null!=(a=null!=(o=t.options.loaderMaxAge)?o:r.options.defaultLoaderMaxAge)?a:0);i>0&&(r.matchCache[t.matchId]={gc:i==1/0?Number.MAX_SAFE_INTEGER:l+i,match:t})})),i.forEach((t=>{null==t.options.onTransition||t.options.onTransition({params:t.params,search:t.routeSearch})})),s.forEach((t=>{t.__.onExit=null==t.options.onLoaded?void 0:t.options.onLoaded({params:t.params,search:t.search}),delete r.matchCache[t.matchId]})),r.startedLoadingAt===e&&(n.forEach((t=>{t.action&&(t.action.current=void 0,t.action.submissions=[])})),r.state=U({},r.state,{location:r.__location,matches:n,pending:void 0,status:"idle"}),r.notify(),r.resolveNavigation())},cleanMatchCache:()=>{const t=Date.now();Object.keys(r.matchCache).forEach((e=>{const n=r.matchCache[e];"loading"!==n.match.status&&(n.gc>0&&n.gc>t||delete r.matchCache[e])}))},loadRoute:async function(t){void 0===t&&(t=r.__location);const e=r.buildNext(t),n=r.matchRoutes(e.pathname,{strictParseParams:!0});return await r.loadMatches(n),n},preloadRoute:async function(t,e){var n,a,o,i,s,l;void 0===t&&(t=r.__location);const c=r.buildNext(t),u=r.matchRoutes(c.pathname,{strictParseParams:!0});return await r.loadMatches(u,{preload:!0,maxAge:null!=(n=null!=(a=null!=(o=e.maxAge)?o:r.options.defaultPreloadMaxAge)?a:r.options.defaultLoaderMaxAge)?n:0,gcMaxAge:null!=(i=null!=(s=null!=(l=e.gcMaxAge)?l:r.options.defaultPreloadGcMaxAge)?s:r.options.defaultLoaderGcMaxAge)?i:0}),u},matchRoutes:(t,e)=>{var n,a;r.cleanMatchCache();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,l,c;const u=E(o);let h=null!=(a=null==u?void 0:u.params)?a:{};const d=null!=(l=null==r.options.filterRoutes?void 0:r.options.filterRoutes(n))?l:n;let f=[];const p=(n,a)=>(a.some((a=>{var o,i,s;if(!a.routePath&&null!=(o=a.childRoutes)&&o.length)return p([...f,a],a.childRoutes);const l=!!("/"!==a.routePath||null!=(i=a.childRoutes)&&i.length),c=j(t,{to:a.fullPath,fuzzy:l,caseSensitive:null!=(s=a.options.caseSensitive)?s:r.options.caseSensitive});if(c){let t;try{var u;t=null!=(u=null==a.options.parseParams?void 0:a.options.parseParams(c))?u:c}catch(t){if(null!=e&&e.strictParseParams)throw t}h=U({},h,t)}return c&&(f=[...n,a]),!!f.length})),!!f.length);if(p([],d),!f.length)return;f.forEach((t=>{var e;const n=D(t.routePath,h),a=D(t.routeId,h,!0),s=i.find((t=>t.matchId===a))||(null==(e=r.matchCache[a])?void 0:e.match)||q(r,t,{parentMatch:u,matchId:a,params:h,pathname:I([r.basepath,n])});o.push(s)}));const m=E(f);null!=(c=m.childRoutes)&&c.length&&s(m.childRoutes)};return s([r.routeTree]),Z(o),o},loadMatches:async(t,e)=>{const n=t.map((async t=>{var n;t.__.validate();const a=t.search;null!=(n=a.__data)&&n.matchId&&a.__data.matchId!==t.matchId||(t.load(e),"success"!==t.status&&t.__.loadPromise&&await t.__.loadPromise)}));r.notify(),await Promise.all(n)},loadMatchData:async t=>{var e;if(X||!r.options.useServerData)return null!=(e=await(null==t.options.loader?void 0:t.options.loader({params:t.params,search:t.routeSearch,signal:t.__.abortController.signal})))?e:{};{const e=r.buildNext({to:".",search:e=>U({},null!=e?e:{},{__data:{matchId:t.matchId}})}),n=await fetch(e.href,{method:"GET"});if(n.ok)return n.json();throw new Error("Failed to fetch match data")}},invalidateRoute:t=>{var e,n;const a=r.buildNext(t),o=r.matchRoutes(a.pathname).map((t=>t.matchId));[...r.state.matches,...null!=(e=null==(n=r.state.pending)?void 0:n.matches)?e:[]].forEach((t=>{o.includes(t.matchId)&&t.invalidate()}))},reload:()=>r.__.navigate({fromCurrent:!0,replace:!0,search:!0}),resolvePath:(t,e)=>k(r.basepath,t,M(e)),matchRoute:(t,e)=>{var n;t=U({},t,{to:t.to?r.resolvePath(null!=(n=t.from)?n:"",t.to):void 0});const a=r.buildNext(t);var o;return null!=e&&e.pending?!(null==(o=r.state.pending)||!o.location)&&!!j(r.state.pending.location.pathname,U({},e,{to:a.pathname})):!!j(r.state.location.pathname,U({},e,{to:a.pathname}))},navigate:async t=>{let{from:e,to:n=".",search:a,hash:o,replace:i,params:s}=t;const l=String(n),c=String(e);let u;try{new URL(""+l),u=!0}catch(t){}return _(!u),r.__.navigate({from:c,to:l,search:a,hash:o,replace:i,params:s})},buildLink:t=>{var e,n;let{from:a,to:o=".",search:i,params:s,hash:l,target:c,replace:u,activeOptions:h,preload:d,preloadMaxAge:f,preloadGcMaxAge:p,preloadDelay:m,disabled:v}=t;try{return new URL(""+o),{type:"external",href:o}}catch(t){}const g={from:a,to:o,search:i,params:s,hash:l,replace:u},y=r.buildNext(g);d=null!=(e=d)?e:r.options.defaultPreload;const _=null!=(n=null!=m?m:r.options.defaultPreloadDelay)?n:0,b=r.state.location.pathname===y.pathname,P=r.state.location.pathname.split("/"),w=y.pathname.split("/").every(((t,e)=>t===P[e])),E=r.state.location.hash===y.hash,x=null!=h&&h.exact?b:w,R=null==h||!h.includeHash||E;return{type:"internal",next:y,handleFocus:t=>{d&&r.preloadRoute(g,{maxAge:f,gcMaxAge:p})},handleClick:t=>{v||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||c&&"_self"!==c||0!==t.button||(t.preventDefault(),!b||i||l||r.invalidateRoute(g),r.__.navigate(g))},handleEnter:t=>{const e=t.target||{};if(d){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,r.preloadRoute(g,{maxAge:f,gcMaxAge:p})}),_)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},isActive:x&&R,disabled:v}},buildNext:t=>{const e=r.__.buildLocation(t),n=r.matchRoutes(e.pathname),a=n.map((t=>{var e;return null!=(e=t.options.preSearchFilters)?e:[]})).flat().filter(Boolean),o=n.map((t=>{var e;return null!=(e=t.options.postSearchFilters)?e:[]})).flat().filter(Boolean);return r.__.buildLocation(U({},t,{__preSearchFilters:a,__postSearchFilters:o}))},__:{buildRouteTree:t=>{const e=(t,n)=>t.map((t=>{const a=H(t,t.options,n,r);if(r.routesById[a.routeId])throw new Error;r.routesById[a.routeId]=a;const o=t.children;return a.childRoutes=null!=o&&o.length?e(o,a):void 0,a}));return e([t])[0]},parseLocation:(t,e)=>{var n;const a=r.options.parseSearch(t.search);return{pathname:t.pathname,searchStr:t.search,search:b(null==e?void 0:e.search,a),hash:null!=(n=t.hash.split("#").reverse()[0])?n:"",href:""+t.pathname+t.search+t.hash,state:t.state,key:t.key}},navigate:t=>{const e=r.buildNext(t);return r.__.commitLocation(e,t.replace)},buildLocation:function(t){var e,n,a,o,i,s,l,c,u;void 0===t&&(t={});const h=t.fromCurrent?r.__location.pathname:null!=(e=t.from)?e:r.__location.pathname;let d=k(null!=(n=r.basepath)?n:"/",h,""+(null!=(a=t.to)?a:"."));const f=r.matchRoutes(r.__location.pathname,{strictParseParams:!0}),p=r.matchRoutes(d),m=U({},null==(o=E(f))?void 0:o.params);let v=!0===(null==(i=t.params)||i)?m:R(t.params,m);v&&p.map((t=>t.options.stringifyParams)).filter(Boolean).forEach((t=>{Object.assign({},v,t(v))})),d=D(d,null!=v?v:{});const g=null!=(s=t.__preSearchFilters)&&s.length?t.__preSearchFilters.reduce(((t,e)=>e(t)),r.__location.search):r.__location.search,y=!0===t.search?g:t.search?null!=(l=R(t.search,g))?l:{}:null!=(c=t.__preSearchFilters)&&c.length?g:{},_=null!=(u=t.__postSearchFilters)&&u.length?t.__postSearchFilters.reduce(((t,e)=>e(t)),y):y,P=b(r.__location.search,_),w=r.options.stringifySearch(P);let x=!0===t.hash?r.__location.hash:R(t.hash,r.__location.hash);return x=x?"#"+x:"",{pathname:d,search:P,searchStr:w,state:r.__location.state,hash:x,href:""+d+w+x,key:t.key}},commitLocation:(t,e)=>{const n=""+Date.now()+Math.random();r.navigateTimeout&&clearTimeout(r.navigateTimeout);let o="replace";e||(o="push");return r.__.parseLocation(a.location).href===t.href&&!t.key&&(o="replace"),"replace"===o?a.replace({pathname:t.pathname,hash:t.hash,search:t.searchStr},U({id:n},t.state)):a.push({pathname:t.pathname,hash:t.hash,search:t.searchStr},{id:n}),r.navigationPromise=new Promise((t=>{const e=r.resolveNavigation;r.resolveNavigation=()=>{e(),t(),delete r.navigationPromise}})),r.navigationPromise}}};return r.update(t),null==r.options.createRouter||r.options.createRouter(r),r}function Z(t){t.forEach(((e,n)=>{const a=t[n-1];a&&(e.loaderData=b(e.loaderData,U({},a.loaderData,e.routeLoaderData)))}))}const tt=["type","children","target","activeProps","inactiveProps","activeOptions","disabled","hash","search","params","to","preload","preloadDelay","preloadMaxAge","replace","style","className","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd"],et=["pending","caseSensitive","children"],nt=["router"];const at=r.createContext(null),ot=r.createContext(null);function rt(t){return r.createElement(at.Provider,t)}const it=t=>{n.useSyncExternalStore((e=>t.subscribe((()=>e()))),(()=>t.state),(()=>t.state))};function st(){const t=r.useContext(ot);return x(!t,"useRouter must be used inside a <Router> component!"),it(t.router),t.router}function lt(){return r.useContext(at)}function ct(){const t=lt()[0];return _(t),t}function ut(){var t,e,n;const a=st(),o=lt().slice(1),i=o[0],s=r.useCallback((()=>null),[]);if(!i)return null;const l=null!=(t=null!=(e=i.__.pendingComponent)?e:a.options.defaultPendingComponent)?t:s,c=null!=(n=i.__.errorComponent)?n:a.options.defaultErrorComponent;return r.createElement(rt,{value:o},r.createElement(r.Suspense,{fallback:r.createElement(l,null)},r.createElement(ht,{key:i.routeId,errorComponent:c,match:i},(()=>{if("error"===i.status)throw i.error;var t,e;if("success"===i.status)return r.createElement(null!=(t=null!=(e=i.__.component)?e:a.options.defaultComponent)?t:ut);throw i.__.loadPromise})())))}class ht extends r.Component{constructor(){super(...arguments),this.state={error:!1,info:void 0}}componentDidCatch(t,e){console.error("Error in route match: "+this.props.match.matchId),console.error(t),this.setState({error:t,info:e})}render(){return r.createElement(dt,i({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function dt(t){var e;const[n,a]=r.useState(t.errorState),o=st(),i=null!=(e=t.errorComponent)?e:ft;return r.useEffect((()=>{if(n){let t=o.state.location.key;return o.subscribe((()=>{o.state.location.key!==t&&(t=o.state.location.key,a({}))}))}}),[n]),r.useEffect((()=>{t.errorState.error&&a(t.errorState),t.reset()}),[t.errorState.error]),n.error?r.createElement(i,n):t.children}function ft(t){let{error:e}=t;return r.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},r.createElement("strong",{style:{fontSize:"1.2rem"}},"Something went wrong!"),r.createElement("div",{style:{height:".5rem"}}),r.createElement("div",null,r.createElement("pre",null,e.message?r.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},e.message):null)))}function pt(t,e){const n=st();r.useEffect((()=>{if(!e)return;let a=n.history.block((e=>{window.confirm(t)?(a(),e.retry()):n.state.location.pathname=window.location.pathname}));return a}),[e,location,t])}t.DefaultErrorBoundary=ft,t.Link=function(t){const e=st();return r.createElement(e.Link,t)},t.MatchRoute=function(t){const e=st();return r.createElement(e.MatchRoute,t)},t.MatchesProvider=rt,t.Outlet=ut,t.Prompt=function(t){let{message:e,when:n,children:a}=t;return pt(e,null==n||n),null!=a?a:null},t.RouterProvider=function(t){let{router:e}=t,n=s(t,nt);return e.update(n),it(e),r.useEffect((()=>e.mount()),[e]),r.createElement(r.Fragment,null,r.createElement(ot.Provider,{value:{router:e}},r.createElement(rt,{value:[void 0,...e.state.matches]},r.createElement(ut,null))))},t.cleanPath=M,t.createBrowserHistory=h,t.createHashHistory=function(t){void 0===t&&(t={});var e=t.window,n=void 0===e?document.defaultView:e,a=n.history;function r(){var t=y(n.location.hash.substr(1)),e=t.pathname,o=void 0===e?"/":e,r=t.search,i=void 0===r?"":r,s=t.hash,l=void 0===s?"":s,c=a.state||{};return[c.idx,{pathname:o,search:i,hash:l,state:c.usr||null,key:c.key||"default"}]}var i=null;function s(){if(i)P.call(i),i=null;else{var t=o.Pop,e=r(),n=e[0],a=e[1];if(P.length){if(null!=n){var s=f-n;s&&(i={action:t,location:a,retry:function(){I(-1*s)}},I(s))}}else S(t)}}n.addEventListener(u,s),n.addEventListener("hashchange",(function(){g(r()[1])!==g(_)&&s()}));var h=o.Pop,d=r(),f=d[0],_=d[1],b=m(),P=m();function w(t){return function(){var t=document.querySelector("base"),e="";if(t&&t.getAttribute("href")){var a=n.location.href,o=a.indexOf("#");e=-1===o?a:a.slice(0,o)}return e}()+"#"+("string"==typeof t?t:g(t))}function E(t,e){return void 0===e&&(e=null),l({pathname:_.pathname,hash:"",search:""},"string"==typeof t?y(t):t,{state:e,key:v()})}function x(t,e){return[{usr:t.state,key:t.key,idx:e},w(t)]}function R(t,e,n){return!P.length||(P.call({action:t,location:e,retry:n}),!1)}function S(t){h=t;var e=r();f=e[0],_=e[1],b.call({action:h,location:_})}function I(t){a.go(t)}null==f&&(f=0,a.replaceState(l({},a.state,{idx:f}),""));var M={get action(){return h},get location(){return _},createHref:w,push:function t(e,r){var i=o.Push,s=E(e,r);if(R(i,s,(function(){t(e,r)}))){var l=x(s,f+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(t){n.location.assign(u)}S(i)}},replace:function t(e,n){var r=o.Replace,i=E(e,n);if(R(r,i,(function(){t(e,n)}))){var s=x(i,f),l=s[0],c=s[1];a.replaceState(l,"",c),S(r)}},go:I,back:function(){I(-1)},forward:function(){I(1)},listen:function(t){return b.push(t)},block:function(t){var e=P.push(t);return 1===P.length&&n.addEventListener(c,p),function(){e(),P.length||n.removeEventListener(c,p)}}};return M},t.createMemoryHistory=d,t.createReactRouter=function(t){const e=(t,e)=>({useRoute:function(n){void 0===n&&(n=".");const a=e.resolvePath(t.routeId,n),o=e.getRoute(a);return it(e),_(o),o},linkProps:e=>{var n,a;const{target:o,activeProps:l=(()=>({className:"active"})),inactiveProps:c=(()=>({})),disabled:u,style:h,className:d,onClick:f,onFocus:p,onMouseEnter:m,onMouseLeave:v}=e,g=s(e,tt),y=t.buildLink(e);if("external"===y.type){const{href:t}=y;return{href:t}}const{handleClick:_,handleFocus:b,handleEnter:P,handleLeave:w,isActive:E,next:x}=y,S=t=>e=>{e.persist&&e.persist(),t.forEach((t=>{e.defaultPrevented||t&&t(e)}))},I=E&&null!=(n=R(l,{}))?n:{},M=E?{}:null!=(a=R(c,{}))?a:{};return i({},I,M,g,{href:u?void 0:x.href,onClick:S([t=>{r.startTransition?r.startTransition((()=>{_(t)})):_(t)},f]),onFocus:S([b,p]),onMouseEnter:S([P,m]),onMouseLeave:S([w,v]),target:o,style:i({},h,I.style,M.style),className:[d,I.className,M.className].filter(Boolean).join(" ")||void 0},u?{role:"link","aria-disabled":!0}:void 0,{"data-status":E?"active":void 0})},Link:r.forwardRef(((n,a)=>{const o=t.linkProps(n);return it(e),r.createElement("a",i({ref:a},o,{children:"function"==typeof n.children?n.children({isActive:"active"===o["data-status"]}):n.children}))})),MatchRoute:e=>{const{pending:n,caseSensitive:a}=e,o=s(e,et),r=t.matchRoute(o,{pending:n,caseSensitive:a});return r?"function"==typeof e.children?e.children(r):e.children:null}}),n=Y(i({},t,{createRouter:t=>{const n={useState:()=>(it(t),t.state),useMatch:(e,n)=>{var a;it(t),_(e!==z);const o=ct(),r=t.state.matches.find((t=>t.routeId===e));return(null==(a=null==n?void 0:n.strict)||a)&&(_(r),_(o.routeId==(null==r?void 0:r.routeId),(null==r||r.routeId,o.routeId,null==r||r.routeId,null==r||r.routeId))),r}},a=e(t.getRoute(z),t);Object.assign(t,n,a)},createRoute:t=>{let{router:n,route:a}=t;const o=e(a,n);Object.assign(a,o)},loadComponent:async t=>(t.preload&&"undefined"!=typeof document&&t.preload(),t)}));return n},t.createRoute=H,t.createRouteConfig=function t(e,n,a,o,r){void 0===e&&(e={}),void 0===a&&(a=!0),a&&(e.path=z),o===z&&(o="");let i=a?z:e.path;i&&"/"!==i&&(i=C(i));const s=i||e.id;let l=I([o,s]);i===z&&(i="/"),l!==z&&(l=I(["/",l]));const c=l===z?"/":L(I([r,i]));return{id:l,routeId:s,path:i,fullPath:c,options:e,children:n,addChildren:n=>t(e,n,!1,o,r),createRoute:e=>t(e,void 0,!1,l,c),generate:()=>{_(!1)}}},t.createRouteMatch=q,t.createRouter=Y,t.decode=B,t.defaultParseSearch=K,t.defaultStringifySearch=V,t.encode=T,t.functionalUpdate=R,t.interpolatePath=D,t.invariant=_,t.joinPaths=I,t.last=E,t.lazy=function(t){const e=r.lazy(t);let n,a;const o=r.forwardRef(((t,n)=>{const o=r.useRef(a||e);return r.createElement(o.current,i({},n?{ref:n}:{},t))}));return o.preload=()=>(n||(n=t().then((t=>(a=t.default,a)))),n),o},t.linkProps=function(t){return st().linkProps(t)},t.matchByPath=F,t.matchPathname=j,t.matchesContext=at,t.parsePathname=O,t.parseSearchWith=W,t.pick=S,t.replaceEqualDeep=b,t.resolvePath=k,t.rootRouteId=z,t.routerContext=ot,t.stringifySearchWith=$,t.trimPath=C,t.trimPathLeft=A,t.trimPathRight=L,t.useMatch=function(t,e){return st().useMatch(t,e)},t.useMatches=lt,t.useNearestMatch=ct,t.usePrompt=pt,t.useRoute=function(t){return st().useRoute(t)},t.useRouter=st,t.useSearch=function(t){return st().state.location.search},t.warning=x,Object.defineProperty(t,"__esModule",{value:!0})}));
*/function b(t,e){if(t===e)return t;const n=Array.isArray(t)&&Array.isArray(e);if(n||P(t)&&P(e)){const a=n?t.length:Object.keys(t).length,o=n?e:Object.keys(e),r=o.length,i=n?[]:{};let s=0;for(let a=0;a<r;a++){const r=n?a:o[a];i[r]=b(t[r],e[r]),i[r]===t[r]&&s++}return a===r&&s===a?t:i}return e}function P(t){if(!w(t))return!1;const e=t.constructor;if(void 0===e)return!0;const n=e.prototype;return!!w(n)&&!!n.hasOwnProperty("isPrototypeOf")}function w(t){return"[object Object]"===Object.prototype.toString.call(t)}function E(t){return t[t.length-1]}function x(t,e){if(t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}return!0}function R(t,e){return"function"==typeof t?t(e):t}function S(t,e){return e.reduce(((e,n)=>(e[n]=t[n],e)),{})}function I(t){return M(t.filter(Boolean).join("/"))}function M(t){return t.replace(/\/{2,}/g,"/")}function A(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function L(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function C(t){return L(A(t))}function k(t,e,n){e=e.replace(new RegExp("^"+t),"/"),n=n.replace(new RegExp("^"+t),"/");let a=O(e);const o=O(n);o.forEach(((t,e)=>{if("/"===t.value)e?e===o.length-1&&a.push(t):a=[t];else if(".."===t.value){var n;a.length>1&&"/"===(null==(n=E(a))?void 0:n.value)&&a.pop(),a.pop()}else{if("."===t.value)return;a.push(t)}}));return M(I([t,...a.map((t=>t.value))]))}function O(t){if(!t)return[];const e=[];if("/"===(t=M(t)).slice(0,1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const n=t.split("/").filter(Boolean);return e.push(...n.map((t=>t.startsWith("*")?{type:"wildcard",value:t}:"$"===t.charAt(0)?{type:"param",value:t}:{type:"pathname",value:t}))),"/"===t.slice(-1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function D(t,e,n){return I(O(t).map((t=>{return"*"!==t.value||n?"param"===t.type?null!=(a=e[t.value.substring(1)])?a:"":t.value:"";var a})))}function j(t,e,n){const a=F(t,e,n);if(!n.to||a)return null!=a?a:{}}function F(t,e,n){var a;if(t&&!e.startsWith(t))return;const o=O(e=e.startsWith(t)?e.substring(t.length):e),r=O(""+(null!=(a=n.to)?a:"*")),i={};return(()=>{for(let t=0;t<Math.max(o.length,r.length);t++){const e=o[t],a=r[t],s=t===r.length-1,l=t===o.length-1;if(a){if("wildcard"===a.type)return!(null==e||!e.value)&&(i["*"]=I(o.slice(t).map((t=>t.value))),!0);if("pathname"===a.type){if("/"===a.value&&(null==e||!e.value))return!0;if(e)if(n.caseSensitive){if(a.value!==e.value)return!1}else if(a.value.toLowerCase()!==e.value.toLowerCase())return!1}if(!e)return!1;if("param"===a.type){if("/"===(null==e?void 0:e.value))return!1;"$"!==e.value.charAt(0)&&(i[a.value.substring(1)]=e.value)}}if(s&&!l)return!!n.fuzzy}return!0})()?i:void 0}function T(t,e){var n,a,o,r="";for(n in t)if(void 0!==(o=t[n]))if(Array.isArray(o))for(a=0;a<o.length;a++)r&&(r+="&"),r+=encodeURIComponent(n)+"="+encodeURIComponent(o[a]);else r&&(r+="&"),r+=encodeURIComponent(n)+"="+encodeURIComponent(o);return(e||"")+r}function N(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||("0"===e.charAt(0)?e:0*+e==0?+e:e))}function B(t){for(var e,n,a={},o=t.split("&");e=o.shift();)void 0!==a[n=(e=e.split("=")).shift()]?a[n]=[].concat(a[n],N(e.shift())):a[n]=N(e.shift());return a}function U(){return U=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},U.apply(this,arguments)}function H(t,e,n,a){const{id:o,routeId:r,path:i,fullPath:s}=t,l=a.state.actions[o]||(a.state.actions[o]={submissions:[],submit:async(t,e)=>{var n;if(!u)return;const o=null==(n=null==e?void 0:e.invalidate)||n;null!=e&&e.multi||(l.submissions=l.submissions.filter((t=>t.isMulti)));const r={submittedAt:Date.now(),status:"pending",submission:t,isMulti:!(null==e||!e.multi)};l.current=r,l.latest=r,l.submissions.push(r),a.notify();try{const e=await(null==u.options.action?void 0:u.options.action(t));return r.data=e,o&&(a.invalidateRoute({to:".",fromCurrent:!0}),await a.reload()),r.status="success",e}catch(t){console.log("tanner"),console.error(t),r.error=t,r.status="error"}finally{a.notify()}}},a.state.actions[o]),c=a.state.loaders[o]||(a.state.loaders[o]={pending:[],fetch:async t=>{if(!u)return;const e={loadedAt:Date.now(),loaderContext:t};c.current=e,c.latest=e,c.pending.push(e),a.notify();try{return await(null==u.options.loader?void 0:u.options.loader(t))}finally{c.pending=c.pending.filter((t=>t!==e)),a.notify()}}},a.state.loaders[o]);let u={routeInfo:void 0,routeId:o,routeRouteId:r,routePath:i,fullPath:s,options:e,router:a,childRoutes:void 0,parentRoute:n,action:l,loader:c,buildLink:t=>a.buildLink(U({},t,{from:s})),navigate:t=>a.navigate(U({},t,{from:s})),matchRoute:(t,e)=>a.matchRoute(U({},t,{from:s}),e)};return null==a.options.createRoute||a.options.createRoute({router:a,route:u}),u}const z="__root__",G=["component","errorComponent","pendingComponent"];function W(t,e,n){const a=U({},e,n,{router:t,routeSearch:{},search:{},childMatches:[],status:"idle",routeLoaderData:{},loaderData:{},isFetching:!1,isInvalid:!1,invalidAt:1/0,getIsInvalid:()=>{const t=Date.now();return a.isInvalid||a.invalidAt<t},__:{abortController:new AbortController,latestId:"",resolve:()=>{},notify:()=>{a.__.resolve(),a.router.notify()},validate:()=>{var e,n;const o=null!=(e=null==(n=a.parentMatch)?void 0:n.search)?e:t.__location.search;try{var r;const t=a.routeSearch,e="object"==typeof a.options.validateSearch?a.options.validateSearch.parse:a.options.validateSearch;let n=b(t,null!=(r=null==e?void 0:e(o))?r:{});t!==n&&(a.isInvalid=!0),a.routeSearch=n,a.search=b(o,U({},o,n)),G.map((async t=>{const e=a.options[t];"function"!=typeof a.__[t]&&(a.__[t]=e)}))}catch(t){console.error(t);const e=new Error("Invalid search params found",{cause:t});return e.code="INVALID_SEARCH_PARAMS",a.status="error",void(a.error=e)}}},cancel:()=>{var t;null==(t=a.__.abortController)||t.abort()},invalidate:()=>{a.isInvalid=!0},hasLoaders:()=>!(!e.options.loader&&!G.some((t=>{var n;return null==(n=e.options[t])?void 0:n.preload}))),load:async e=>{const n=Date.now(),o=null!=e&&e.preload?Math.max(null==e?void 0:e.maxAge,null==e?void 0:e.gcMaxAge):0;if(null!=e&&e.preload&&o>0){if(t.state.matches.find((t=>t.matchId===a.matchId)))return;t.matchCache[a.matchId]={gc:n+e.gcMaxAge,match:a}}if("success"===a.status&&a.getIsInvalid()||"error"===a.status||"idle"===a.status){const t=null!=e&&e.preload?null==e?void 0:e.maxAge:void 0;await a.fetch({maxAge:t})}},fetch:async e=>{const n=""+Date.now()+Math.random();a.__.latestId=n;const o=async()=>{if(n!==a.__.latestId)return new Promise((()=>{}))};"idle"===a.status&&(a.status="loading"),a.isInvalid=!1,a.__.loadPromise=new Promise((async n=>{a.isFetching=!0,a.__.resolve=n,a.__.componentsPromise=(async()=>{await Promise.all(G.map((async e=>{var n;const o=a.options[e];null!=(n=a.__[e])&&n.preload&&(a.__[e]=await t.options.loadComponent(o))})))})(),a.__.dataPromise=Promise.resolve().then((async()=>{try{var n,r,i;if(a.options.loader){const e=await t.loadMatchData(a);await o(),a.routeLoaderData=b(a.routeLoaderData,e)}return a.error=void 0,a.status="success",a.updatedAt=Date.now(),a.invalidAt=a.updatedAt+(null!=(n=null!=(r=null!=(i=null==e?void 0:e.maxAge)?i:a.options.loaderMaxAge)?r:t.options.defaultLoaderMaxAge)?n:0),a.routeLoaderData}catch(t){throw await o(),a.error=t,a.status="error",a.updatedAt=Date.now(),t}}));const r=async()=>{await o(),a.isFetching=!1,delete a.__.loadPromise,a.__.notify()};try{await Promise.all([a.__.componentsPromise,a.__.dataPromise.catch((()=>{}))]),r()}catch(t){r()}})),await a.__.loadPromise,await o()}});return a.hasLoaders()||(a.status="success"),a}const q=V(JSON.parse),K=$(JSON.stringify);function V(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let n=B(e);for(let e in n){const a=n[e];if("string"==typeof a)try{n[e]=t(a)}catch(t){}}return n}}function $(t){return e=>{(e=U({},e))&&Object.keys(e).forEach((n=>{const a=e[n];if(void 0===a||void 0===a)delete e[n];else if(a&&"object"==typeof a&&null!==a)try{e[n]=t(a)}catch(t){}}));const n=T(e).toString();return n?"?"+n:""}}var J;const X="undefined"==typeof window||!(null!=(J=window.document)&&J.createElement);function Q(){return{status:"idle",location:null,matches:[],actions:{},loaders:{},lastUpdated:Date.now(),isFetching:!1,isPreloading:!1}}function Y(t){var e,n;const a=(null==t?void 0:t.history)||(X?d():h()),o=U({defaultLoaderGcMaxAge:3e5,defaultLoaderMaxAge:0,defaultPreloadMaxAge:2e3,defaultPreloadDelay:50,context:void 0},t,{stringifySearch:null!=(e=null==t?void 0:t.stringifySearch)?e:K,parseSearch:null!=(n=null==t?void 0:t.parseSearch)?n:q});let r={types:void 0,history:a,options:o,listeners:[],basepath:"",routeTree:void 0,routesById:{},__location:void 0,resolveNavigation:()=>{},matchCache:{},state:Q(),reset:()=>{r.state=Q(),r.notify()},startedLoadingAt:Date.now(),subscribe:t=>(r.listeners.push(t),()=>{r.listeners=r.listeners.filter((e=>e!==t))}),getRoute:t=>r.routesById[t],notify:()=>{const t="loading"===r.state.status||r.state.matches.some((t=>t.isFetching)),e=Object.values(r.matchCache).some((t=>t.match.isFetching&&!r.state.matches.find((e=>e.matchId===t.match.matchId))));r.state.isFetching===t&&r.state.isPreloading===e||(r.state=U({},r.state,{isFetching:t,isPreloading:e})),Z(r.state.matches),r.listeners.forEach((t=>t(r)))},dehydrate:()=>({location:r.__location,state:U({},S(r.state,["status","location","lastUpdated","location"]),{matches:r.state.matches.map((t=>S(t,["matchId","status","routeLoaderData","loaderData","isInvalid","invalidAt"])))}),context:r.options.context}),hydrate:t=>{r.__location=t.location,r.options.context=t.context;const e=r.matchRoutes(r.__location.pathname,{strictParseParams:!0});e.forEach(((e,n)=>{const a=t.state.matches[n];_(a),Object.assign(e,a)})),e.forEach((t=>t.__.validate())),r.state=U({},r.state,t,{matches:e})},mount:()=>{r.__.buildLocation({to:".",search:!0,hash:!0}),r.state.matches.length||r.load();const t=r.history.listen((t=>{r.load(r.__.parseLocation(t.location,r.__location))}));return!X&&window.addEventListener&&(window.addEventListener("visibilitychange",r.onFocus,!1),window.addEventListener("focus",r.onFocus,!1)),()=>{t(),!X&&window.removeEventListener&&(window.removeEventListener("visibilitychange",r.onFocus),window.removeEventListener("focus",r.onFocus))}},onFocus:()=>{r.load()},update:t=>{var e;const n=(null==t?void 0:t.history)!==r.history;r.__location&&!n||(null!=t&&t.history&&(r.history=t.history),r.__location=r.__.parseLocation(r.history.location),r.state.location=r.__location),Object.assign(r.options,t);const{basepath:a,routeConfig:o}=r.options;return r.basepath="/"+(null!=(e=C(null!=a?a:""))?e:""),o&&(r.routesById={},r.routeTree=r.__.buildRouteTree(o)),r},cancelMatches:()=>{var t,e;[...r.state.matches,...null!=(t=null==(e=r.state.pending)?void 0:e.matches)?t:[]].forEach((t=>{t.cancel()}))},load:async t=>{const e=Math.random();r.startedLoadingAt=e,t&&(r.__location=t),r.cancelMatches();const n=r.matchRoutes(r.__location.pathname,{strictParseParams:!0});"undefined"!=typeof document?r.state=U({},r.state,{pending:{matches:n,location:r.__location},status:"loading"}):r.state=U({},r.state,{matches:n,location:r.__location,status:"loading"});try{await Promise.all(n.map((t=>null==t.options.beforeLoad?void 0:t.options.beforeLoad({router:r,match:t}))))}catch(t){throw null!=t&&t.then&&await new Promise((()=>{})),t}if(r.notify(),await r.loadMatches(n),r.startedLoadingAt!==e)return r.navigationPromise;const a=r.state.matches,o=[],i=[];a.forEach((t=>{n.find((e=>e.matchId===t.matchId))?i.push(t):o.push(t)}));const s=n.filter((t=>!a.find((e=>e.matchId===t.matchId)))),l=Date.now();o.forEach((t=>{var e,n,a,o;null==t.__.onExit||t.__.onExit({params:t.params,search:t.routeSearch}),"error"!==t.status||t.isFetching||(t.status="idle",t.error=void 0);const i=Math.max(null!=(e=null!=(n=t.options.loaderGcMaxAge)?n:r.options.defaultLoaderGcMaxAge)?e:0,null!=(a=null!=(o=t.options.loaderMaxAge)?o:r.options.defaultLoaderMaxAge)?a:0);i>0&&(r.matchCache[t.matchId]={gc:i==1/0?Number.MAX_SAFE_INTEGER:l+i,match:t})})),i.forEach((t=>{null==t.options.onTransition||t.options.onTransition({params:t.params,search:t.routeSearch})})),s.forEach((t=>{t.__.onExit=null==t.options.onLoaded?void 0:t.options.onLoaded({params:t.params,search:t.search}),delete r.matchCache[t.matchId]})),r.startedLoadingAt===e&&(n.forEach((t=>{t.action&&(t.action.current=void 0,t.action.submissions=[])})),r.state=U({},r.state,{location:r.__location,matches:n,pending:void 0,status:"idle"}),r.notify(),r.resolveNavigation())},cleanMatchCache:()=>{const t=Date.now();Object.keys(r.matchCache).forEach((e=>{const n=r.matchCache[e];"loading"!==n.match.status&&(n.gc>0&&n.gc>t||delete r.matchCache[e])}))},loadRoute:async function(t){void 0===t&&(t=r.__location);const e=r.buildNext(t),n=r.matchRoutes(e.pathname,{strictParseParams:!0});return await r.loadMatches(n),n},preloadRoute:async function(t,e){var n,a,o,i,s,l;void 0===t&&(t=r.__location);const c=r.buildNext(t),u=r.matchRoutes(c.pathname,{strictParseParams:!0});return await r.loadMatches(u,{preload:!0,maxAge:null!=(n=null!=(a=null!=(o=e.maxAge)?o:r.options.defaultPreloadMaxAge)?a:r.options.defaultLoaderMaxAge)?n:0,gcMaxAge:null!=(i=null!=(s=null!=(l=e.gcMaxAge)?l:r.options.defaultPreloadGcMaxAge)?s:r.options.defaultLoaderGcMaxAge)?i:0}),u},matchRoutes:(t,e)=>{var n,a;r.cleanMatchCache();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,l,c;const u=E(o);let h=null!=(a=null==u?void 0:u.params)?a:{};const d=null!=(l=null==r.options.filterRoutes?void 0:r.options.filterRoutes(n))?l:n;let f=[];const p=(n,a)=>(a.some((a=>{var o,i,s;if(!a.routePath&&null!=(o=a.childRoutes)&&o.length)return p([...f,a],a.childRoutes);const l=!!("/"!==a.routePath||null!=(i=a.childRoutes)&&i.length),c=j(r.basepath,t,{to:a.fullPath,fuzzy:l,caseSensitive:null!=(s=a.options.caseSensitive)?s:r.options.caseSensitive});if(c){let t;try{var u;t=null!=(u=null==a.options.parseParams?void 0:a.options.parseParams(c))?u:c}catch(t){if(null!=e&&e.strictParseParams)throw t}h=U({},h,t)}return c&&(f=[...n,a]),!!f.length})),!!f.length);if(p([],d),!f.length)return;f.forEach((t=>{var e;const n=D(t.routePath,h),a=D(t.routeId,h,!0),s=i.find((t=>t.matchId===a))||(null==(e=r.matchCache[a])?void 0:e.match)||W(r,t,{parentMatch:u,matchId:a,params:h,pathname:I([r.basepath,n])});o.push(s)}));const m=E(f);null!=(c=m.childRoutes)&&c.length&&s(m.childRoutes)};return s([r.routeTree]),Z(o),o},loadMatches:async(t,e)=>{const n=t.map((async t=>{var n;t.__.validate();const a=t.search;null!=(n=a.__data)&&n.matchId&&a.__data.matchId!==t.matchId||(t.load(e),"success"!==t.status&&t.__.loadPromise&&await t.__.loadPromise)}));r.notify(),await Promise.all(n)},loadMatchData:async t=>{var e;if(X||!r.options.useServerData)return null!=(e=await(null==t.options.loader?void 0:t.options.loader({params:t.params,search:t.routeSearch,signal:t.__.abortController.signal})))?e:{};{const e=r.buildNext({to:".",search:e=>U({},null!=e?e:{},{__data:{matchId:t.matchId}})}),n=await fetch(e.href,{method:"GET"});if(n.ok)return n.json();throw new Error("Failed to fetch match data")}},invalidateRoute:t=>{var e,n;const a=r.buildNext(t),o=r.matchRoutes(a.pathname).map((t=>t.matchId));[...r.state.matches,...null!=(e=null==(n=r.state.pending)?void 0:n.matches)?e:[]].forEach((t=>{o.includes(t.matchId)&&t.invalidate()}))},reload:()=>r.__.navigate({fromCurrent:!0,replace:!0,search:!0}),resolvePath:(t,e)=>k(r.basepath,t,M(e)),matchRoute:(t,e)=>{var n;t=U({},t,{to:t.to?r.resolvePath(null!=(n=t.from)?n:"",t.to):void 0});const a=r.buildNext(t);var o;return null!=e&&e.pending?!(null==(o=r.state.pending)||!o.location)&&!!j(r.basepath,r.state.pending.location.pathname,U({},e,{to:a.pathname})):!!j(r.basepath,r.state.location.pathname,U({},e,{to:a.pathname}))},navigate:async t=>{let{from:e,to:n=".",search:a,hash:o,replace:i,params:s}=t;const l=String(n),c=String(e);let u;try{new URL(""+l),u=!0}catch(t){}return _(!u),r.__.navigate({from:c,to:l,search:a,hash:o,replace:i,params:s})},buildLink:t=>{var e,n;let{from:a,to:o=".",search:i,params:s,hash:l,target:c,replace:u,activeOptions:h,preload:d,preloadMaxAge:f,preloadGcMaxAge:p,preloadDelay:m,disabled:v}=t;try{return new URL(""+o),{type:"external",href:o}}catch(t){}const g={from:a,to:o,search:i,params:s,hash:l,replace:u},y=r.buildNext(g);d=null!=(e=d)?e:r.options.defaultPreload;const _=null!=(n=null!=m?m:r.options.defaultPreloadDelay)?n:0,b=r.state.location.pathname===y.pathname,P=r.state.location.pathname.split("/"),w=y.pathname.split("/").every(((t,e)=>t===P[e])),E=r.state.location.hash===y.hash,x=null!=h&&h.exact?b:w,R=null==h||!h.includeHash||E;return{type:"internal",next:y,handleFocus:t=>{d&&r.preloadRoute(g,{maxAge:f,gcMaxAge:p})},handleClick:t=>{v||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||c&&"_self"!==c||0!==t.button||(t.preventDefault(),!b||i||l||r.invalidateRoute(g),r.__.navigate(g))},handleEnter:t=>{const e=t.target||{};if(d){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,r.preloadRoute(g,{maxAge:f,gcMaxAge:p})}),_)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},isActive:x&&R,disabled:v}},buildNext:t=>{const e=r.__.buildLocation(t),n=r.matchRoutes(e.pathname),a=n.map((t=>{var e;return null!=(e=t.options.preSearchFilters)?e:[]})).flat().filter(Boolean),o=n.map((t=>{var e;return null!=(e=t.options.postSearchFilters)?e:[]})).flat().filter(Boolean);return r.__.buildLocation(U({},t,{__preSearchFilters:a,__postSearchFilters:o}))},__:{buildRouteTree:t=>{const e=(t,n)=>t.map((t=>{const a=H(t,t.options,n,r);if(r.routesById[a.routeId])throw new Error;r.routesById[a.routeId]=a;const o=t.children;return a.childRoutes=null!=o&&o.length?e(o,a):void 0,a}));return e([t])[0]},parseLocation:(t,e)=>{var n;const a=r.options.parseSearch(t.search);return{pathname:t.pathname,searchStr:t.search,search:b(null==e?void 0:e.search,a),hash:null!=(n=t.hash.split("#").reverse()[0])?n:"",href:""+t.pathname+t.search+t.hash,state:t.state,key:t.key}},navigate:t=>{const e=r.buildNext(t);return r.__.commitLocation(e,t.replace)},buildLocation:function(t){var e,n,a,o,i,s,l,c,u;void 0===t&&(t={});const h=t.fromCurrent?r.__location.pathname:null!=(e=t.from)?e:r.__location.pathname;let d=k(null!=(n=r.basepath)?n:"/",h,""+(null!=(a=t.to)?a:"."));const f=r.matchRoutes(r.__location.pathname,{strictParseParams:!0}),p=r.matchRoutes(d),m=U({},null==(o=E(f))?void 0:o.params);let v=!0===(null==(i=t.params)||i)?m:R(t.params,m);v&&p.map((t=>t.options.stringifyParams)).filter(Boolean).forEach((t=>{Object.assign({},v,t(v))})),d=D(d,null!=v?v:{});const g=null!=(s=t.__preSearchFilters)&&s.length?t.__preSearchFilters.reduce(((t,e)=>e(t)),r.__location.search):r.__location.search,y=!0===t.search?g:t.search?null!=(l=R(t.search,g))?l:{}:null!=(c=t.__preSearchFilters)&&c.length?g:{},_=null!=(u=t.__postSearchFilters)&&u.length?t.__postSearchFilters.reduce(((t,e)=>e(t)),y):y,P=b(r.__location.search,_),w=r.options.stringifySearch(P);let x=!0===t.hash?r.__location.hash:R(t.hash,r.__location.hash);return x=x?"#"+x:"",{pathname:d,search:P,searchStr:w,state:r.__location.state,hash:x,href:""+d+w+x,key:t.key}},commitLocation:(t,e)=>{const n=""+Date.now()+Math.random();r.navigateTimeout&&clearTimeout(r.navigateTimeout);let o="replace";e||(o="push");return r.__.parseLocation(a.location).href===t.href&&!t.key&&(o="replace"),"replace"===o?a.replace({pathname:t.pathname,hash:t.hash,search:t.searchStr},U({id:n},t.state)):a.push({pathname:t.pathname,hash:t.hash,search:t.searchStr},{id:n}),r.navigationPromise=new Promise((t=>{const e=r.resolveNavigation;r.resolveNavigation=()=>{e(),t(),delete r.navigationPromise}})),r.navigationPromise}}};return r.update(t),null==r.options.createRouter||r.options.createRouter(r),r}function Z(t){t.forEach(((e,n)=>{const a=t[n-1];a&&(e.loaderData=b(e.loaderData,U({},a.loaderData,e.routeLoaderData)))}))}const tt=["type","children","target","activeProps","inactiveProps","activeOptions","disabled","hash","search","params","to","preload","preloadDelay","preloadMaxAge","replace","style","className","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd"],et=["pending","caseSensitive","children"],nt=["router"];const at=r.createContext(null),ot=r.createContext(null);function rt(t){return r.createElement(at.Provider,t)}const it=t=>{n.useSyncExternalStore((e=>t.subscribe((()=>e()))),(()=>t.state),(()=>t.state))};function st(){const t=r.useContext(ot);return x(!t,"useRouter must be used inside a <Router> component!"),it(t.router),t.router}function lt(){return r.useContext(at)}function ct(){const t=lt()[0];return _(t),t}function ut(){var t,e,n;const a=st(),o=lt().slice(1),i=o[0],s=r.useCallback((()=>null),[]);if(!i)return null;const l=null!=(t=null!=(e=i.__.pendingComponent)?e:a.options.defaultPendingComponent)?t:s,c=null!=(n=i.__.errorComponent)?n:a.options.defaultErrorComponent;return r.createElement(rt,{value:o},r.createElement(r.Suspense,{fallback:r.createElement(l,null)},r.createElement(ht,{key:i.routeId,errorComponent:c,match:i},(()=>{if("error"===i.status)throw i.error;var t,e;if("success"===i.status)return r.createElement(null!=(t=null!=(e=i.__.component)?e:a.options.defaultComponent)?t:ut);throw i.__.loadPromise})())))}class ht extends r.Component{constructor(){super(...arguments),this.state={error:!1,info:void 0}}componentDidCatch(t,e){console.error("Error in route match: "+this.props.match.matchId),console.error(t),this.setState({error:t,info:e})}render(){return r.createElement(dt,i({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function dt(t){var e;const[n,a]=r.useState(t.errorState),o=st(),i=null!=(e=t.errorComponent)?e:ft;return r.useEffect((()=>{if(n){let t=o.state.location.key;return o.subscribe((()=>{o.state.location.key!==t&&(t=o.state.location.key,a({}))}))}}),[n]),r.useEffect((()=>{t.errorState.error&&a(t.errorState),t.reset()}),[t.errorState.error]),n.error?r.createElement(i,n):t.children}function ft(t){let{error:e}=t;return r.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},r.createElement("strong",{style:{fontSize:"1.2rem"}},"Something went wrong!"),r.createElement("div",{style:{height:".5rem"}}),r.createElement("div",null,r.createElement("pre",null,e.message?r.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},e.message):null)))}function pt(t,e){const n=st();r.useEffect((()=>{if(!e)return;let a=n.history.block((e=>{window.confirm(t)?(a(),e.retry()):n.state.location.pathname=window.location.pathname}));return a}),[e,location,t])}t.DefaultErrorBoundary=ft,t.Link=function(t){const e=st();return r.createElement(e.Link,t)},t.MatchRoute=function(t){const e=st();return r.createElement(e.MatchRoute,t)},t.MatchesProvider=rt,t.Outlet=ut,t.Prompt=function(t){let{message:e,when:n,children:a}=t;return pt(e,null==n||n),null!=a?a:null},t.RouterProvider=function(t){let{router:e}=t,n=s(t,nt);return e.update(n),it(e),r.useEffect((()=>e.mount()),[e]),r.createElement(r.Fragment,null,r.createElement(ot.Provider,{value:{router:e}},r.createElement(rt,{value:[void 0,...e.state.matches]},r.createElement(ut,null))))},t.cleanPath=M,t.createBrowserHistory=h,t.createHashHistory=function(t){void 0===t&&(t={});var e=t.window,n=void 0===e?document.defaultView:e,a=n.history;function r(){var t=y(n.location.hash.substr(1)),e=t.pathname,o=void 0===e?"/":e,r=t.search,i=void 0===r?"":r,s=t.hash,l=void 0===s?"":s,c=a.state||{};return[c.idx,{pathname:o,search:i,hash:l,state:c.usr||null,key:c.key||"default"}]}var i=null;function s(){if(i)P.call(i),i=null;else{var t=o.Pop,e=r(),n=e[0],a=e[1];if(P.length){if(null!=n){var s=f-n;s&&(i={action:t,location:a,retry:function(){I(-1*s)}},I(s))}}else S(t)}}n.addEventListener(u,s),n.addEventListener("hashchange",(function(){g(r()[1])!==g(_)&&s()}));var h=o.Pop,d=r(),f=d[0],_=d[1],b=m(),P=m();function w(t){return function(){var t=document.querySelector("base"),e="";if(t&&t.getAttribute("href")){var a=n.location.href,o=a.indexOf("#");e=-1===o?a:a.slice(0,o)}return e}()+"#"+("string"==typeof t?t:g(t))}function E(t,e){return void 0===e&&(e=null),l({pathname:_.pathname,hash:"",search:""},"string"==typeof t?y(t):t,{state:e,key:v()})}function x(t,e){return[{usr:t.state,key:t.key,idx:e},w(t)]}function R(t,e,n){return!P.length||(P.call({action:t,location:e,retry:n}),!1)}function S(t){h=t;var e=r();f=e[0],_=e[1],b.call({action:h,location:_})}function I(t){a.go(t)}null==f&&(f=0,a.replaceState(l({},a.state,{idx:f}),""));var M={get action(){return h},get location(){return _},createHref:w,push:function t(e,r){var i=o.Push,s=E(e,r);if(R(i,s,(function(){t(e,r)}))){var l=x(s,f+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(t){n.location.assign(u)}S(i)}},replace:function t(e,n){var r=o.Replace,i=E(e,n);if(R(r,i,(function(){t(e,n)}))){var s=x(i,f),l=s[0],c=s[1];a.replaceState(l,"",c),S(r)}},go:I,back:function(){I(-1)},forward:function(){I(1)},listen:function(t){return b.push(t)},block:function(t){var e=P.push(t);return 1===P.length&&n.addEventListener(c,p),function(){e(),P.length||n.removeEventListener(c,p)}}};return M},t.createMemoryHistory=d,t.createReactRouter=function(t){const e=(t,e)=>({useRoute:function(n){void 0===n&&(n=".");const a=e.resolvePath(t.routeId,n),o=e.getRoute(a);return it(e),_(o),o},linkProps:e=>{var n,a;const{target:o,activeProps:l=(()=>({className:"active"})),inactiveProps:c=(()=>({})),disabled:u,style:h,className:d,onClick:f,onFocus:p,onMouseEnter:m,onMouseLeave:v}=e,g=s(e,tt),y=t.buildLink(e);if("external"===y.type){const{href:t}=y;return{href:t}}const{handleClick:_,handleFocus:b,handleEnter:P,handleLeave:w,isActive:E,next:x}=y,S=t=>e=>{e.persist&&e.persist(),t.forEach((t=>{e.defaultPrevented||t&&t(e)}))},I=E&&null!=(n=R(l,{}))?n:{},M=E?{}:null!=(a=R(c,{}))?a:{};return i({},I,M,g,{href:u?void 0:x.href,onClick:S([t=>{r.startTransition?r.startTransition((()=>{_(t)})):_(t)},f]),onFocus:S([b,p]),onMouseEnter:S([P,m]),onMouseLeave:S([w,v]),target:o,style:i({},h,I.style,M.style),className:[d,I.className,M.className].filter(Boolean).join(" ")||void 0},u?{role:"link","aria-disabled":!0}:void 0,{"data-status":E?"active":void 0})},Link:r.forwardRef(((n,a)=>{const o=t.linkProps(n);return it(e),r.createElement("a",i({ref:a},o,{children:"function"==typeof n.children?n.children({isActive:"active"===o["data-status"]}):n.children}))})),MatchRoute:e=>{const{pending:n,caseSensitive:a}=e,o=s(e,et),r=t.matchRoute(o,{pending:n,caseSensitive:a});return r?"function"==typeof e.children?e.children(r):e.children:null}}),n=Y(i({},t,{createRouter:t=>{const n={useState:()=>(it(t),t.state),useMatch:(e,n)=>{var a;it(t),_(e!==z);const o=ct(),r=t.state.matches.find((t=>t.routeId===e));return(null==(a=null==n?void 0:n.strict)||a)&&(_(r),_(o.routeId==(null==r?void 0:r.routeId),(null==r||r.routeId,o.routeId,null==r||r.routeId,null==r||r.routeId))),r}},a=e(t.getRoute(z),t);Object.assign(t,n,a)},createRoute:t=>{let{router:n,route:a}=t;const o=e(a,n);Object.assign(a,o)},loadComponent:async t=>(t.preload&&"undefined"!=typeof document&&t.preload(),t)}));return n},t.createRoute=H,t.createRouteConfig=function t(e,n,a,o,r){void 0===e&&(e={}),void 0===a&&(a=!0),a&&(e.path=z),o===z&&(o="");let i=a?z:e.path;i&&"/"!==i&&(i=C(i));const s=i||e.id;let l=I([o,s]);i===z&&(i="/"),l!==z&&(l=I(["/",l]));const c=l===z?"/":L(I([r,i]));return{id:l,routeId:s,path:i,fullPath:c,options:e,children:n,addChildren:n=>t(e,n,!1,o,r),createRoute:e=>t(e,void 0,!1,l,c),generate:()=>{_(!1)}}},t.createRouteMatch=W,t.createRouter=Y,t.decode=B,t.defaultParseSearch=q,t.defaultStringifySearch=K,t.encode=T,t.functionalUpdate=R,t.interpolatePath=D,t.invariant=_,t.joinPaths=I,t.last=E,t.lazy=function(t){const e=r.lazy(t);let n,a;const o=r.forwardRef(((t,n)=>{const o=r.useRef(a||e);return r.createElement(o.current,i({},n?{ref:n}:{},t))}));return o.preload=()=>(n||(n=t().then((t=>(a=t.default,a)))),n),o},t.linkProps=function(t){return st().linkProps(t)},t.matchByPath=F,t.matchPathname=j,t.matchesContext=at,t.parsePathname=O,t.parseSearchWith=V,t.pick=S,t.replaceEqualDeep=b,t.resolvePath=k,t.rootRouteId=z,t.routerContext=ot,t.stringifySearchWith=$,t.trimPath=C,t.trimPathLeft=A,t.trimPathRight=L,t.useMatch=function(t,e){return st().useMatch(t,e)},t.useMatches=lt,t.useNearestMatch=ct,t.usePrompt=pt,t.useRoute=function(t){return st().useRoute(t)},t.useRouter=st,t.useSearch=function(t){return st().state.location.search},t.warning=x,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@tanstack/react-router",
"author": "Tanner Linsley",
"version": "0.0.1-beta.33",
"version": "0.0.1-beta.34",
"license": "MIT",

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

"@babel/runtime": "^7.16.7",
"@tanstack/router-core": "0.0.1-beta.33",
"@tanstack/router-core": "0.0.1-beta.34",
"use-sync-external-store": "^1.2.0"

@@ -47,0 +47,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 not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc