@remix-run/router 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/index.d.ts +1 -1
- package/dist/router.cjs.js +102 -43
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +42 -13
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +102 -43
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +2 -2
- package/dist/router.umd.min.js.map +1 -1
- package/dist/utils.d.ts +7 -0
- package/history.ts +11 -0
- package/index.ts +1 -0
- package/package.json +2 -2
- package/router.ts +23 -10
- package/utils.ts +12 -0
package/dist/router.umd.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v1.
|
|
2
|
+
* @remix-run/router v1.8.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).RemixRouter={})}(this,(function(e){"use strict";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},t.apply(this,arguments)}var r;e.Action=void 0,(r=e.Action||(e.Action={})).Pop="POP",r.Push="PUSH",r.Replace="REPLACE";const o="popstate";function a(e,t){if(!1===e||null==e)throw new Error(t)}function n(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function i(e,t){return{usr:e.state,key:e.key,idx:t}}function s(e,r,o,a){return void 0===o&&(o=null),t({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof r?c(r):r,{state:o,key:r&&r.key||a||Math.random().toString(36).substr(2,8)})}function l(e){let{pathname:t="/",search:r="",hash:o=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),o&&"#"!==o&&(t+="#"===o.charAt(0)?o:"#"+o),t}function c(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substr(o),e=e.substr(0,o)),e&&(t.pathname=e)}return t}function d(r,n,c,d){void 0===d&&(d={});let{window:u=document.defaultView,v5Compat:h=!1}=d,f=u.history,p=e.Action.Pop,m=null,y=v();function v(){return(f.state||{idx:null}).idx}function g(){p=e.Action.Pop;let t=v(),r=null==t?null:t-y;y=t,m&&m({action:p,location:w.location,delta:r})}function b(e){let t="null"!==u.location.origin?u.location.origin:u.location.href,r="string"==typeof e?e:l(e);return a(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==y&&(y=0,f.replaceState(t({},f.state,{idx:y}),""));let w={get action(){return p},get location(){return r(u,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return u.addEventListener(o,g),m=e,()=>{u.removeEventListener(o,g),m=null}},createHref:e=>n(u,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,r){p=e.Action.Push;let o=s(w.location,t,r);c&&c(o,t),y=v()+1;let a=i(o,y),n=w.createHref(o);try{f.pushState(a,"",n)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;u.location.assign(n)}h&&m&&m({action:p,location:w.location,delta:1})},replace:function(t,r){p=e.Action.Replace;let o=s(w.location,t,r);c&&c(o,t),y=v();let a=i(o,y),n=w.createHref(o);f.replaceState(a,"",n),h&&m&&m({action:p,location:w.location,delta:0})},go:e=>f.go(e)};return w}let u;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(u||(u={}));const h=new Set(["lazy","caseSensitive","path","id","index","children"]);function f(e,r,o,n){return void 0===o&&(o=[]),void 0===n&&(n={}),e.map(((e,i)=>{let s=[...o,i],l="string"==typeof e.id?e.id:s.join("-");if(a(!0!==e.index||!e.children,"Cannot specify children on an index route"),a(!n[l],'Found a route id collision on id "'+l+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let o=t({},e,r(e),{id:l});return n[l]=o,o}{let o=t({},e,r(e),{id:l,children:void 0});return n[l]=o,e.children&&(o.children=f(e.children,r,s,n)),o}}))}function p(e,t,r){void 0===r&&(r="/");let o=E(("string"==typeof t?c(t):t).pathname||"/",r);if(null==o)return null;let a=m(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let n=null;for(let e=0;null==n&&e<a.length;++e)n=w(a[e],R(o));return n}function m(e,t,r,o){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===o&&(o="");let n=(e,n,i)=>{let s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:n,route:e};s.relativePath.startsWith("/")&&(a(s.relativePath.startsWith(o),'Absolute route path "'+s.relativePath+'" nested under path "'+o+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(o.length));let l=M([o,s.relativePath]),c=r.concat(s);e.children&&e.children.length>0&&(a(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),m(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:b(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of y(e.path))n(e,t,r);else n(e,t)})),t}function y(e){let t=e.split("/");if(0===t.length)return[];let[r,...o]=t,a=r.endsWith("?"),n=r.replace(/\?$/,"");if(0===o.length)return a?[n,""]:[n];let i=y(o.join("/")),s=[];return s.push(...i.map((e=>""===e?n:[n,e].join("/")))),a&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const v=/^:\w+$/,g=e=>"*"===e;function b(e,t){let r=e.split("/"),o=r.length;return r.some(g)&&(o+=-2),t&&(o+=2),r.filter((e=>!g(e))).reduce(((e,t)=>e+(v.test(t)?3:""===t?1:10)),o)}function w(e,t){let{routesMeta:r}=e,o={},a="/",n=[];for(let e=0;e<r.length;++e){let i=r[e],s=e===r.length-1,l="/"===a?t:t.slice(a.length)||"/",c=D({path:i.relativePath,caseSensitive:i.caseSensitive,end:s},l);if(!c)return null;Object.assign(o,c.params);let d=i.route;n.push({params:o,pathname:M([a,c.pathname]),pathnameBase:L(M([a,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(a=M([a,c.pathnameBase]))}return n}function D(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!0);n("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let o=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(o.push(t),"/([^\\/]+)")));e.endsWith("*")?(o.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");return[new RegExp(a,t?void 0:"i"),o]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:o.reduce(((e,t,r)=>{if("*"===t){let e=l[r]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return n(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+r+")."),e}}(l[r]||"",t),e}),{}),pathname:i,pathnameBase:s,pattern:e}}function R(e){try{return decodeURI(e)}catch(t){return n(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function E(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,o=e.charAt(r);return o&&"/"!==o?null:e.slice(r)||"/"}function A(e,t){void 0===t&&(t="/");let{pathname:r,search:o="",hash:a=""}="string"==typeof e?c(e):e,n=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:n,search:j(o),hash:k(a)}}function x(e,t,r,o){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function S(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function P(e,r,o,n){let i;void 0===n&&(n=!1),"string"==typeof e?i=c(e):(i=t({},e),a(!i.pathname||!i.pathname.includes("?"),x("?","pathname","search",i)),a(!i.pathname||!i.pathname.includes("#"),x("#","pathname","hash",i)),a(!i.search||!i.search.includes("#"),x("#","search","hash",i)));let s,l=""===e||""===i.pathname,d=l?"/":i.pathname;if(n||null==d)s=o;else{let e=r.length-1;if(d.startsWith("..")){let t=d.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}s=e>=0?r[e]:"/"}let u=A(i,s),h=d&&"/"!==d&&d.endsWith("/"),f=(l||"."===d)&&o.endsWith("/");return u.pathname.endsWith("/")||!h&&!f||(u.pathname+="/"),u}const M=e=>e.join("/").replace(/\/\/+/g,"/"),L=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),j=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",k=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class C extends Error{}class U{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],a(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>r=t)),this.controller=new AbortController;let o=()=>r(new C("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",o),this.controller.signal.addEventListener("abort",o),this.data=Object.entries(e).reduce(((e,t)=>{let[r,o]=t;return Object.assign(e,{[r]:this.trackPromise(r,o)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(r,e,void 0,t)),(t=>this.onSettle(r,e,t)));return r.catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,o){if(this.controller.signal.aborted&&r instanceof C)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===o){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===o?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>o}),this.emit(!1,t),o)}emit(e,t){this.subscribers.forEach((r=>r(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise((t=>{this.subscribe((o=>{e.removeEventListener("abort",r),(o||this.done)&&t(o)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return a(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[r,o]=t;return Object.assign(e,{[r]:T(o)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function T(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}class O{constructor(e,t,r,o){void 0===o&&(o=!1),this.status=e,this.statusText=t||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function _(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const I=["post","put","patch","delete"],q=new Set(I),z=["get",...I],F=new Set(z),H=new Set([301,302,303,307,308]),B=new Set([307,308]),N={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},W={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},K=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Y=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});const J=Symbol("deferred");function V(e,t,r,o,a,n,i){let s,c;if(null!=n&&"path"!==i){s=[];for(let e of t)if(s.push(e),e.route.id===n){c=e;break}}else s=t,c=t[t.length-1];let d=P(a||".",S(s).map((e=>e.pathnameBase)),E(e.pathname,r)||e.pathname,"path"===i);return null==a&&(d.search=e.search,d.hash=e.hash),null!=a&&""!==a&&"."!==a||!c||!c.route.index||Ae(d.search)||(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),o&&"/"!==r&&(d.pathname="/"===d.pathname?r:M([r,d.pathname])),l(d)}function G(e,t,r,o){if(!o||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(o))return{path:r};if(o.formMethod&&!we(o.formMethod))return{path:r,error:ue(405,{method:o.formMethod})};let n,i,s=()=>({path:r,error:ue(400,{type:"invalid-body"})}),d=o.formMethod||"get",u=e?d.toUpperCase():d.toLowerCase(),h=fe(r);if(void 0!==o.body){if("text/plain"===o.formEncType){if(!De(u))return s();let e="string"==typeof o.body?o.body:o.body instanceof FormData||o.body instanceof URLSearchParams?Array.from(o.body.entries()).reduce(((e,t)=>{let[r,o]=t;return""+e+r+"="+o+"\n"}),""):String(o.body);return{path:r,submission:{formMethod:u,formAction:h,formEncType:o.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===o.formEncType){if(!De(u))return s();try{let e="string"==typeof o.body?JSON.parse(o.body):o.body;return{path:r,submission:{formMethod:u,formAction:h,formEncType:o.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(a("function"==typeof FormData,"FormData is not available in this environment"),o.formData)n=ae(o.formData),i=o.formData;else if(o.body instanceof FormData)n=ae(o.body),i=o.body;else if(o.body instanceof URLSearchParams)n=o.body,i=ne(n);else if(null==o.body)n=new URLSearchParams,i=new FormData;else try{n=new URLSearchParams(o.body),i=ne(n)}catch(e){return s()}let f={formMethod:u,formAction:h,formEncType:o&&o.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(De(f.formMethod))return{path:r,submission:f};let p=c(r);return t&&p.search&&Ae(p.search)&&n.append("index",""),p.search="?"+n,{path:l(p),submission:f}}function X(e,t){let r=e;if(t){let o=e.findIndex((e=>e.route.id===t));o>=0&&(r=e.slice(0,o))}return r}function Q(e,r,o,a,n,i,s,l,c,d,u,h,f,m){let y=m?Object.values(m)[0]:f?Object.values(f)[0]:void 0,v=e.createURL(r.location),g=e.createURL(n),b=m?Object.keys(m)[0]:void 0,w=X(o,b).filter(((e,o)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,r){let o=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return o||a}(r.loaderData,r.matches[o],e)||s.some((t=>t===e.route.id)))return!0;let n=r.matches[o],l=e;return ee(e,t({currentUrl:v,currentParams:n.params,nextUrl:g,nextParams:l.params},a,{actionResult:y,defaultShouldRevalidate:i||v.pathname+v.search===g.pathname+g.search||v.search!==g.search||Z(n,l)}))})),D=[];return c.forEach(((e,n)=>{if(!o.some((t=>t.route.id===e.routeId)))return;let s=p(u,e.path,h);if(!s)return void D.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=r.fetchers.get(n),f=xe(s,e.path),m=!1;m=!d.has(n)&&(!!l.includes(n)||(c&&"idle"!==c.state&&void 0===c.data?i:ee(f,t({currentUrl:v,currentParams:r.matches[r.matches.length-1].params,nextUrl:g,nextParams:o[o.length-1].params},a,{actionResult:y,defaultShouldRevalidate:i})))),m&&D.push({key:n,routeId:e.routeId,path:e.path,matches:s,match:f,controller:new AbortController})})),[w,D]}function Z(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ee(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function te(e,r,o){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let s=o[e.id];a(s,"No route found in manifest");let l={};for(let e in i){let t=void 0!==s[e]&&"hasErrorBoundary"!==e;n(!t,'Route "'+s.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||h.has(e)||(l[e]=i[e])}Object.assign(s,l),Object.assign(s,t({},r(s),{lazy:void 0}))}async function re(e,t,r,o,n,i,s,l){let c,d,h;void 0===l&&(l={});let f=e=>{let o,a=new Promise(((e,t)=>o=t));return h=()=>o(),t.signal.addEventListener("abort",h),Promise.race([e({request:t,params:r.params,context:l.requestContext}),a])};try{let o=r.route[e];if(r.route.lazy)if(o){d=(await Promise.all([f(o),te(r.route,i,n)]))[0]}else{if(await te(r.route,i,n),o=r.route[e],!o){if("action"===e){let e=new URL(t.url),o=e.pathname+e.search;throw ue(405,{method:t.method,pathname:o,routeId:r.route.id})}return{type:u.data,data:void 0}}d=await f(o)}else{if(!o){let e=new URL(t.url);throw ue(404,{pathname:e.pathname+e.search})}d=await f(o)}a(void 0!==d,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){c=u.error,d=e}finally{h&&t.signal.removeEventListener("abort",h)}if(ge(d)){let e,n=d.status;if(H.has(n)){let e=d.headers.get("Location");if(a(e,"Redirects returned/thrown from loaders/actions must have a Location header"),K.test(e)){if(!l.isStaticRequest){let r=new URL(t.url),o=e.startsWith("//")?new URL(r.protocol+e):new URL(e),a=null!=E(o.pathname,s);o.origin===r.origin&&a&&(e=o.pathname+o.search+o.hash)}}else e=V(new URL(t.url),o.slice(0,o.indexOf(r)+1),s,!0,e);if(l.isStaticRequest)throw d.headers.set("Location",e),d;return{type:u.redirect,status:n,location:e,revalidate:null!==d.headers.get("X-Remix-Revalidate")}}if(l.isRouteRequest)throw{type:c||u.data,response:d};let i=d.headers.get("Content-Type");return e=i&&/\bapplication\/json\b/.test(i)?await d.json():await d.text(),c===u.error?{type:c,error:new O(n,d.statusText,e),headers:d.headers}:{type:u.data,data:e,statusCode:d.status,headers:d.headers}}return c===u.error?{type:c,error:d}:ve(d)?{type:u.deferred,deferredData:d,statusCode:null==(p=d.init)?void 0:p.status,headers:(null==(m=d.init)?void 0:m.headers)&&new Headers(d.init.headers)}:{type:u.data,data:d};var p,m}function oe(e,t,r,o){let a=e.createURL(fe(t)).toString(),n={signal:r};if(o&&De(o.formMethod)){let{formMethod:e,formEncType:t}=o;n.method=e.toUpperCase(),"application/json"===t?(n.headers=new Headers({"Content-Type":t}),n.body=JSON.stringify(o.json)):"text/plain"===t?n.body=o.text:"application/x-www-form-urlencoded"===t&&o.formData?n.body=ae(o.formData):n.body=o.formData}return new Request(a,n)}function ae(e){let t=new URLSearchParams;for(let[r,o]of e.entries())t.append(r,"string"==typeof o?o:o.name);return t}function ne(e){let t=new FormData;for(let[r,o]of e.entries())t.append(r,o);return t}function ie(e,t,r,o,n){let i,s={},l=null,c=!1,d={};return r.forEach(((r,u)=>{let h=t[u].route.id;if(a(!ye(r),"Cannot handle redirect results in processLoaderData"),me(r)){let t=ce(e,h),a=r.error;o&&(a=Object.values(o)[0],o=void 0),l=l||{},null==l[t.route.id]&&(l[t.route.id]=a),s[h]=void 0,c||(c=!0,i=_(r.error)?r.error.status:500),r.headers&&(d[h]=r.headers)}else pe(r)?(n.set(h,r.deferredData),s[h]=r.deferredData.data):s[h]=r.data,null==r.statusCode||200===r.statusCode||c||(i=r.statusCode),r.headers&&(d[h]=r.headers)})),o&&(l=o,s[Object.keys(o)[0]]=void 0),{loaderData:s,errors:l,statusCode:i||200,loaderHeaders:d}}function se(e,r,o,n,i,s,l,c){let{loaderData:d,errors:u}=ie(r,o,n,i,c);for(let r=0;r<s.length;r++){let{key:o,match:n,controller:i}=s[r];a(void 0!==l&&void 0!==l[r],"Did not find corresponding fetcher result");let c=l[r];if(!i||!i.signal.aborted)if(me(c)){let r=ce(e.matches,null==n?void 0:n.route.id);u&&u[r.route.id]||(u=t({},u,{[r.route.id]:c.error})),e.fetchers.delete(o)}else if(ye(c))a(!1,"Unhandled fetcher revalidation redirect");else if(pe(c))a(!1,"Unhandled fetcher deferred data");else{let t=je(c.data);e.fetchers.set(o,t)}}return{loaderData:d,errors:u}}function le(e,r,o,a){let n=t({},r);for(let t of o){let o=t.route.id;if(r.hasOwnProperty(o)?void 0!==r[o]&&(n[o]=r[o]):void 0!==e[o]&&t.route.loader&&(n[o]=e[o]),a&&a.hasOwnProperty(o))break}return n}function ce(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function de(e){let t=e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ue(e,t){let{pathname:r,routeId:o,method:a,type:n}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",a&&r&&o?s="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+o+'", so there is no way to handle the request.':"defer-action"===n?s="defer() is not supported in actions":"invalid-body"===n&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s='Route "'+o+'" does not match URL "'+r+'"'):404===e?(i="Not Found",s='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",a&&r&&o?s="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+o+'", so there is no way to handle the request.':a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new O(e||500,i,new Error(s),!0)}function he(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ye(r))return{result:r,idx:t}}}function fe(e){return l(t({},"string"==typeof e?c(e):e,{hash:""}))}function pe(e){return e.type===u.deferred}function me(e){return e.type===u.error}function ye(e){return(e&&e.type)===u.redirect}function ve(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}function ge(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function be(e){if(!ge(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&null!=r}function we(e){return F.has(e.toLowerCase())}function De(e){return q.has(e.toLowerCase())}async function Re(e,t,r,o,n,i){for(let s=0;s<r.length;s++){let l=r[s],c=t[s];if(!c)continue;let d=e.find((e=>e.route.id===c.route.id)),u=null!=d&&!Z(d,c)&&void 0!==(i&&i[c.route.id]);if(pe(l)&&(n||u)){let e=o[s];a(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await Ee(l,e,n).then((e=>{e&&(r[s]=e||r[s])}))}}}async function Ee(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:u.data,data:e.deferredData.unwrappedData}}catch(e){return{type:u.error,error:e}}return{type:u.data,data:e.deferredData.data}}}function Ae(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function xe(e,t){let r="string"==typeof t?c(t).search:t.search;if(e[e.length-1].route.index&&Ae(r||""))return e[e.length-1];let o=S(e);return o[o.length-1]}function Se(e){let{formMethod:t,formAction:r,formEncType:o,text:a,formData:n,json:i}=e;if(t&&r&&o)return null!=a?{formMethod:t,formAction:r,formEncType:o,formData:void 0,json:void 0,text:a}:null!=n?{formMethod:t,formAction:r,formEncType:o,formData:n,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:o,formData:void 0,json:i,text:void 0}:void 0}function Pe(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Me(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Le(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function je(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}e.AbortedDeferredError=C,e.ErrorResponse=O,e.IDLE_BLOCKER=W,e.IDLE_FETCHER=$,e.IDLE_NAVIGATION=N,e.UNSAFE_DEFERRED_SYMBOL=J,e.UNSAFE_DeferredData=U,e.UNSAFE_convertRoutesToDataRoutes=f,e.UNSAFE_getPathContributingMatches=S,e.UNSAFE_invariant=a,e.UNSAFE_warning=n,e.createBrowserHistory=function(e){return void 0===e&&(e={}),d((function(e,t){let{pathname:r,search:o,hash:a}=e.location;return s("",{pathname:r,search:o,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:l(t)}),null,e)},e.createHashHistory=function(e){return void 0===e&&(e={}),d((function(e,t){let{pathname:r="/",search:o="",hash:a=""}=c(e.location.hash.substr(1));return s("",{pathname:r,search:o,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),o="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");o=-1===r?t:t.slice(0,r)}return o+"#"+("string"==typeof t?t:l(t))}),(function(e,t){n("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)},e.createMemoryHistory=function(t){void 0===t&&(t={});let r,{initialEntries:o=["/"],initialIndex:a,v5Compat:i=!1}=t;r=o.map(((e,t)=>m(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let d=f(null==a?r.length-1:a),u=e.Action.Pop,h=null;function f(e){return Math.min(Math.max(e,0),r.length-1)}function p(){return r[d]}function m(e,t,o){void 0===t&&(t=null);let a=s(r?p().pathname:"/",e,t,o);return n("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function y(e){return"string"==typeof e?e:l(e)}return{get index(){return d},get action(){return u},get location(){return p()},createHref:y,createURL:e=>new URL(y(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?c(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(t,o){u=e.Action.Push;let a=m(t,o);d+=1,r.splice(d,r.length,a),i&&h&&h({action:u,location:a,delta:1})},replace(t,o){u=e.Action.Replace;let a=m(t,o);r[d]=a,i&&h&&h({action:u,location:a,delta:0})},go(t){u=e.Action.Pop;let o=f(d+t),a=r[o];d=o,h&&h({action:u,location:a,delta:t})},listen:e=>(h=e,()=>{h=null})}},e.createPath=l,e.createRouter=function(r){const o=r.window?r.window:"undefined"!=typeof window?window:void 0,i=void 0!==o&&void 0!==o.document&&void 0!==o.document.createElement,l=!i;let c;if(a(r.routes.length>0,"You must provide a non-empty routes array to createRouter"),r.mapRouteProperties)c=r.mapRouteProperties;else if(r.detectErrorBoundary){let e=r.detectErrorBoundary;c=t=>({hasErrorBoundary:e(t)})}else c=Y;let d,h={},m=f(r.routes,c,void 0,h),y=r.basename||"/",v=t({v7_normalizeFormMethod:!1,v7_prependBasename:!1},r.future),g=null,b=new Set,w=null,D=null,R=null,A=null!=r.hydrationData,x=p(m,r.history.location,y),S=null;if(null==x){let e=ue(404,{pathname:r.history.location.pathname}),{matches:t,route:o}=de(m);x=t,S={[o.id]:e}}let P,M,L=!(x.some((e=>e.route.lazy))||x.some((e=>e.route.loader))&&null==r.hydrationData),j={historyAction:r.history.action,location:r.history.location,matches:x,initialized:L,navigation:N,restoreScrollPosition:null==r.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:r.hydrationData&&r.hydrationData.loaderData||{},actionData:r.hydrationData&&r.hydrationData.actionData||null,errors:r.hydrationData&&r.hydrationData.errors||S,fetchers:new Map,blockers:new Map},k=e.Action.Pop,C=!1,U=!1,T=!1,O=[],_=[],I=new Map,q=0,z=-1,F=new Map,H=new Set,J=new Map,X=new Map,Z=new Map,ee=!1;function te(e){j=t({},j,e),b.forEach((e=>e(j)))}function ae(o,a){var n,i;let s,l=null!=j.actionData&&null!=j.navigation.formMethod&&De(j.navigation.formMethod)&&"loading"===j.navigation.state&&!0!==(null==(n=o.state)?void 0:n._isRedirect);s=a.actionData?Object.keys(a.actionData).length>0?a.actionData:null:l?j.actionData:null;let c=a.loaderData?le(j.loaderData,a.loaderData,a.matches||[],a.errors):j.loaderData,u=j.blockers;u.size>0&&(u=new Map(u),u.forEach(((e,t)=>u.set(t,W))));let h=!0===C||null!=j.navigation.formMethod&&De(j.navigation.formMethod)&&!0!==(null==(i=o.state)?void 0:i._isRedirect);d&&(m=d,d=void 0),U||k===e.Action.Pop||(k===e.Action.Push?r.history.push(o,o.state):k===e.Action.Replace&&r.history.replace(o,o.state)),te(t({},a,{actionData:s,loaderData:c,historyAction:k,location:o,initialized:!0,navigation:N,revalidation:"idle",restoreScrollPosition:ze(o,a.matches||j.matches),preventScrollReset:h,blockers:u})),k=e.Action.Pop,C=!1,U=!1,T=!1,O=[],_=[]}async function ne(o,a,n){M&&M.abort(),M=null,k=o,U=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(w&&R){let r=qe(e,t);w[r]=R()}}(j.location,j.matches),C=!0===(n&&n.preventScrollReset);let i=d||m,s=n&&n.overrideNavigation,l=p(i,a,y);if(!l){let e=ue(404,{pathname:a.pathname}),{matches:t,route:r}=de(i);return Ie(),void ae(a,{matches:t,loaderData:{},errors:{[r.id]:e}})}if(j.initialized&&!T&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(j.location,a)&&!(n&&n.submission&&De(n.submission.formMethod)))return void ae(a,{matches:l});M=new AbortController;let f,v,g=oe(r.history,a,M.signal,n&&n.submission);if(n&&n.pendingError)v={[ce(l).route.id]:n.pendingError};else if(n&&n.submission&&De(n.submission.formMethod)){let t=await async function(t,r,o,a,n){void 0===n&&(n={});let i;ge(),te({navigation:Me(r,o)});let s=xe(a,r);if(s.route.action||s.route.lazy){if(i=await re("action",t,s,a,h,c,y),t.signal.aborted)return{shortCircuited:!0}}else i={type:u.error,error:ue(405,{method:t.method,pathname:r.pathname,routeId:s.route.id})};if(ye(i)){let e;return e=n&&null!=n.replace?n.replace:i.location===j.location.pathname+j.location.search,await fe(j,i,{submission:o,replace:e}),{shortCircuited:!0}}if(me(i)){let t=ce(a,s.route.id);return!0!==(n&&n.replace)&&(k=e.Action.Push),{pendingActionData:{},pendingActionError:{[t.route.id]:i.error}}}if(pe(i))throw ue(400,{type:"defer-action"});return{pendingActionData:{[s.route.id]:i.data}}}(g,a,n.submission,l,{replace:n.replace});if(t.shortCircuited)return;f=t.pendingActionData,v=t.pendingActionError,s=Pe(a,n.submission),g=new Request(g.url,{signal:g.signal})}let{shortCircuited:b,loaderData:D,errors:E}=await async function(e,o,a,n,i,s,l,c,u){let h=n||Pe(o,i),f=i||s||Se(h),p=d||m,[v,g]=Q(r.history,j,a,f,o,T,O,_,J,H,p,y,c,u);if(Ie((e=>!(a&&a.some((t=>t.route.id===e)))||v&&v.some((t=>t.route.id===e)))),z=++q,0===v.length&&0===g.length){let e=Ce();return ae(o,t({matches:a,loaderData:{},errors:u||null},c?{actionData:c}:{},e?{fetchers:new Map(j.fetchers)}:{})),{shortCircuited:!0}}if(!U){g.forEach((e=>{let t=j.fetchers.get(e.key),r=Le(void 0,t?t.data:void 0);j.fetchers.set(e.key,r)}));let e=c||j.actionData;te(t({navigation:h},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},g.length>0?{fetchers:new Map(j.fetchers)}:{}))}g.forEach((e=>{I.has(e.key)&&Ae(e.key),e.controller&&I.set(e.key,e.controller)}));let b=()=>g.forEach((e=>Ae(e.key)));M&&M.signal.addEventListener("abort",b);let{results:w,loaderResults:D,fetcherResults:R}=await ve(j.matches,a,v,g,e);if(e.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",b);g.forEach((e=>I.delete(e.key)));let E=he(w);if(E){if(E.idx>=v.length){let e=g[E.idx-v.length].key;H.add(e)}return await fe(j,E.result,{replace:l}),{shortCircuited:!0}}let{loaderData:A,errors:x}=se(j,a,v,D,u,g,R,X);X.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&X.delete(t)}))}));let S=Ce(),P=Ue(z),L=S||P||g.length>0;return t({loaderData:A,errors:x},L?{fetchers:new Map(j.fetchers)}:{})}(g,a,l,s,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,f,v);b||(M=null,ae(a,t({matches:l},f?{actionData:f}:{},{loaderData:D,errors:E})))}function ie(e){return j.fetchers.get(e)||$}async function fe(n,l,c){let{submission:d,replace:u,isFetchActionRedirect:h}=void 0===c?{}:c;l.revalidate&&(T=!0);let f=s(n.location,l.location,t({_isRedirect:!0},h?{_isFetchActionRedirect:!0}:{}));if(a(f,"Expected a location on the redirect navigation"),K.test(l.location)&&i){let e=r.history.createURL(l.location),t=null==E(e.pathname,y);if(o.location.origin!==e.origin||t)return void(u?o.location.replace(l.location):o.location.assign(l.location))}M=null;let p=!0===u?e.Action.Replace:e.Action.Push,m=d||Se(n.navigation);if(B.has(l.status)&&m&&De(m.formMethod))await ne(p,f,{submission:t({},m,{formAction:l.location}),preventScrollReset:C});else if(h)await ne(p,f,{overrideNavigation:Pe(f),fetcherSubmission:m,preventScrollReset:C});else{let e=Pe(f,m);await ne(p,f,{overrideNavigation:e,preventScrollReset:C})}}async function ve(e,t,o,a,n){let i=await Promise.all([...o.map((e=>re("loader",n,e,t,h,c,y))),...a.map((e=>{if(e.matches&&e.match&&e.controller)return re("loader",oe(r.history,e.path,e.controller.signal),e.match,e.matches,h,c,y);return{type:u.error,error:ue(404,{pathname:e.path})}}))]),s=i.slice(0,o.length),l=i.slice(o.length);return await Promise.all([Re(e,o,s,s.map((()=>n.signal)),!1,j.loaderData),Re(e,a.map((e=>e.match)),l,a.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:i,loaderResults:s,fetcherResults:l}}function ge(){T=!0,O.push(...Ie()),J.forEach(((e,t)=>{I.has(t)&&(_.push(t),Ae(t))}))}function be(e,t,r){let o=ce(j.matches,t);we(e),te({errors:{[o.route.id]:r},fetchers:new Map(j.fetchers)})}function we(e){let t=j.fetchers.get(e);!I.has(e)||t&&"loading"===t.state&&F.has(e)||Ae(e),J.delete(e),F.delete(e),H.delete(e),j.fetchers.delete(e)}function Ae(e){let t=I.get(e);a(t,"Expected fetch controller: "+e),t.abort(),I.delete(e)}function ke(e){for(let t of e){let e=je(ie(t).data);j.fetchers.set(t,e)}}function Ce(){let e=[],t=!1;for(let r of H){let o=j.fetchers.get(r);a(o,"Expected fetcher: "+r),"loading"===o.state&&(H.delete(r),e.push(r),t=!0)}return ke(e),t}function Ue(e){let t=[];for(let[r,o]of F)if(o<e){let e=j.fetchers.get(r);a(e,"Expected fetcher: "+r),"loading"===e.state&&(Ae(r),F.delete(r),t.push(r))}return ke(t),t.length>0}function Te(e){j.blockers.delete(e),Z.delete(e)}function Oe(e,t){let r=j.blockers.get(e)||W;a("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let o=new Map(j.blockers);o.set(e,t),te({blockers:o})}function _e(e){let{currentLocation:t,nextLocation:r,historyAction:o}=e;if(0===Z.size)return;Z.size>1&&n(!1,"A router only supports one blocker at a time");let a=Array.from(Z.entries()),[i,s]=a[a.length-1],l=j.blockers.get(i);return l&&"proceeding"===l.state?void 0:s({currentLocation:t,nextLocation:r,historyAction:o})?i:void 0}function Ie(e){let t=[];return X.forEach(((r,o)=>{e&&!e(o)||(r.cancel(),t.push(o),X.delete(o))})),t}function qe(e,t){if(D){return D(e,t.map((e=>function(e,t){let{route:r,pathname:o,params:a}=e;return{id:r.id,pathname:o,params:a,data:t[r.id],handle:r.handle}}(e,j.loaderData))))||e.key}return e.key}function ze(e,t){if(w){let r=qe(e,t),o=w[r];if("number"==typeof o)return o}return null}return P={get basename(){return y},get state(){return j},get routes(){return m},initialize:function(){return g=r.history.listen((e=>{let{action:t,location:o,delta:a}=e;if(ee)return void(ee=!1);n(0===Z.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=_e({currentLocation:j.location,nextLocation:o,historyAction:t});return i&&null!=a?(ee=!0,r.history.go(-1*a),void Oe(i,{state:"blocked",location:o,proceed(){Oe(i,{state:"proceeding",proceed:void 0,reset:void 0,location:o}),r.history.go(a)},reset(){let e=new Map(j.blockers);e.set(i,W),te({blockers:e})}})):ne(t,o)})),j.initialized||ne(e.Action.Pop,j.location),P},subscribe:function(e){return b.add(e),()=>b.delete(e)},enableScrollRestoration:function(e,t,r){if(w=e,R=t,D=r||null,!A&&j.navigation===N){A=!0;let e=ze(j.location,j.matches);null!=e&&te({restoreScrollPosition:e})}return()=>{w=null,R=null,D=null}},navigate:async function o(a,n){if("number"==typeof a)return void r.history.go(a);let i=V(j.location,j.matches,y,v.v7_prependBasename,a,null==n?void 0:n.fromRouteId,null==n?void 0:n.relative),{path:l,submission:c,error:d}=G(v.v7_normalizeFormMethod,!1,i,n),u=j.location,h=s(j.location,l,n&&n.state);h=t({},h,r.history.encodeLocation(h));let f=n&&null!=n.replace?n.replace:void 0,p=e.Action.Push;!0===f?p=e.Action.Replace:!1===f||null!=c&&De(c.formMethod)&&c.formAction===j.location.pathname+j.location.search&&(p=e.Action.Replace);let m=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,g=_e({currentLocation:u,nextLocation:h,historyAction:p});if(!g)return await ne(p,h,{submission:c,pendingError:d,preventScrollReset:m,replace:n&&n.replace});Oe(g,{state:"blocked",location:h,proceed(){Oe(g,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),o(a,n)},reset(){let e=new Map(j.blockers);e.set(g,W),te({blockers:e})}})},fetch:function(e,o,n,i){if(l)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");I.has(e)&&Ae(e);let s=d||m,u=V(j.location,j.matches,y,v.v7_prependBasename,n,o,null==i?void 0:i.relative),f=p(s,u,y);if(!f)return void be(e,o,ue(404,{pathname:u}));let{path:g,submission:b,error:w}=G(v.v7_normalizeFormMethod,!0,u,i);if(w)return void be(e,o,w);let D=xe(f,g);C=!0===(i&&i.preventScrollReset),b&&De(b.formMethod)?async function(e,o,n,i,s,l){if(ge(),J.delete(e),!i.route.action&&!i.route.lazy){let t=ue(405,{method:l.formMethod,pathname:n,routeId:o});return void be(e,o,t)}let u=j.fetchers.get(e),f=function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}(l,u);j.fetchers.set(e,f),te({fetchers:new Map(j.fetchers)});let v=new AbortController,g=oe(r.history,n,v.signal,l);I.set(e,v);let b=q,w=await re("action",g,i,s,h,c,y);if(g.signal.aborted)return void(I.get(e)===v&&I.delete(e));if(ye(w)){if(I.delete(e),z>b){let t=je(void 0);return j.fetchers.set(e,t),void te({fetchers:new Map(j.fetchers)})}{H.add(e);let t=Le(l);return j.fetchers.set(e,t),te({fetchers:new Map(j.fetchers)}),fe(j,w,{submission:l,isFetchActionRedirect:!0})}}if(me(w))return void be(e,o,w.error);if(pe(w))throw ue(400,{type:"defer-action"});let D=j.navigation.location||j.location,R=oe(r.history,D,v.signal),E=d||m,A="idle"!==j.navigation.state?p(E,j.navigation.location,y):j.matches;a(A,"Didn't find any matches after fetcher action");let x=++q;F.set(e,x);let S=Le(l,w.data);j.fetchers.set(e,S);let[P,L]=Q(r.history,j,A,l,D,T,O,_,J,H,E,y,{[i.route.id]:w.data},void 0);L.filter((t=>t.key!==e)).forEach((e=>{let t=e.key,r=j.fetchers.get(t),o=Le(void 0,r?r.data:void 0);j.fetchers.set(t,o),I.has(t)&&Ae(t),e.controller&&I.set(t,e.controller)})),te({fetchers:new Map(j.fetchers)});let C=()=>L.forEach((e=>Ae(e.key)));v.signal.addEventListener("abort",C);let{results:U,loaderResults:B,fetcherResults:N}=await ve(j.matches,A,P,L,R);if(v.signal.aborted)return;v.signal.removeEventListener("abort",C),F.delete(e),I.delete(e),L.forEach((e=>I.delete(e.key)));let $=he(U);if($){if($.idx>=P.length){let e=L[$.idx-P.length].key;H.add(e)}return fe(j,$.result)}let{loaderData:W,errors:K}=se(j,j.matches,P,B,void 0,L,N,X);if(j.fetchers.has(e)){let t=je(w.data);j.fetchers.set(e,t)}let Y=Ue(x);"loading"===j.navigation.state&&x>z?(a(k,"Expected pending action"),M&&M.abort(),ae(j.navigation.location,{matches:A,loaderData:W,errors:K,fetchers:new Map(j.fetchers)})):(te(t({errors:K,loaderData:le(j.loaderData,W,A,K)},Y||L.length>0?{fetchers:new Map(j.fetchers)}:{})),T=!1)}(e,o,g,D,f,b):(J.set(e,{routeId:o,path:g}),async function(e,t,o,n,i,s){let l=j.fetchers.get(e),d=Le(s,l?l.data:void 0);j.fetchers.set(e,d),te({fetchers:new Map(j.fetchers)});let u=new AbortController,f=oe(r.history,o,u.signal);I.set(e,u);let p=q,m=await re("loader",f,n,i,h,c,y);pe(m)&&(m=await Ee(m,f.signal,!0)||m);I.get(e)===u&&I.delete(e);if(f.signal.aborted)return;if(ye(m)){if(z>p){let t=je(void 0);return j.fetchers.set(e,t),void te({fetchers:new Map(j.fetchers)})}return H.add(e),void await fe(j,m)}if(me(m)){let r=ce(j.matches,t);return j.fetchers.delete(e),void te({fetchers:new Map(j.fetchers),errors:{[r.route.id]:m.error}})}a(!pe(m),"Unhandled fetcher deferred data");let v=je(m.data);j.fetchers.set(e,v),te({fetchers:new Map(j.fetchers)})}(e,o,g,D,f,b))},revalidate:function(){ge(),te({revalidation:"loading"}),"submitting"!==j.navigation.state&&("idle"!==j.navigation.state?ne(k||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation}):ne(j.historyAction,j.location,{startUninterruptedRevalidation:!0}))},createHref:e=>r.history.createHref(e),encodeLocation:e=>r.history.encodeLocation(e),getFetcher:ie,deleteFetcher:we,dispose:function(){g&&g(),b.clear(),M&&M.abort(),j.fetchers.forEach(((e,t)=>we(t))),j.blockers.forEach(((e,t)=>Te(t)))},getBlocker:function(e,t){let r=j.blockers.get(e)||W;return Z.get(e)!==t&&Z.set(e,t),r},deleteBlocker:Te,_internalFetchControllers:I,_internalActiveDeferreds:X,_internalSetRoutes:function(e){h={},d=f(e,c,void 0,h)}},P},e.createStaticHandler=function(e,r){a(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let o,n={},i=(r?r.basename:null)||"/";if(null!=r&&r.mapRouteProperties)o=r.mapRouteProperties;else if(null!=r&&r.detectErrorBoundary){let e=r.detectErrorBoundary;o=t=>({hasErrorBoundary:e(t)})}else o=Y;let c=f(e,o,void 0,n);async function d(e,r,s,l,c){a(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(De(e.method.toLowerCase())){let a=await async function(e,r,a,s,l){let c;if(a.route.action||a.route.lazy){if(c=await re("action",e,a,r,n,o,i,{isStaticRequest:!0,isRouteRequest:l,requestContext:s}),e.signal.aborted){throw new Error((l?"queryRoute":"query")+"() call aborted")}}else{let t=ue(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:a.route.id});if(l)throw t;c={type:u.error,error:t}}if(ye(c))throw new Response(null,{status:c.status,headers:{Location:c.location}});if(pe(c)){let e=ue(400,{type:"defer-action"});if(l)throw e;c={type:u.error,error:e}}if(l){if(me(c))throw c.error;return{matches:[a],loaderData:{},actionData:{[a.route.id]:c.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(me(c)){let o=ce(r,a.route.id);return t({},await h(e,r,s,void 0,{[o.route.id]:c.error}),{statusCode:_(c.error)?c.error.status:500,actionData:null,actionHeaders:t({},c.headers?{[a.route.id]:c.headers}:{})})}let d=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});return t({},await h(d,r,s),c.statusCode?{statusCode:c.statusCode}:{},{actionData:{[a.route.id]:c.data},actionHeaders:t({},c.headers?{[a.route.id]:c.headers}:{})})}(e,s,c||xe(s,r),l,null!=c);return a}let a=await h(e,s,l,c);return ge(a)?a:t({},a,{actionData:null,actionHeaders:{}})}catch(e){if((d=e)&&ge(d.response)&&(d.type===u.data||u.error)){if(e.type===u.error&&!be(e.response))throw e.response;return e.response}if(be(e))return e;throw e}var d}async function h(e,r,a,s,l){let c=null!=s;if(c&&(null==s||!s.route.loader)&&(null==s||!s.route.lazy))throw ue(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:null==s?void 0:s.route.id});let d=(s?[s]:X(r,Object.keys(l||{})[0])).filter((e=>e.route.loader||e.route.lazy));if(0===d.length)return{matches:r,loaderData:r.reduce(((e,t)=>Object.assign(e,{[t.route.id]:null})),{}),errors:l||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let u=await Promise.all([...d.map((t=>re("loader",e,t,r,n,o,i,{isStaticRequest:!0,isRouteRequest:c,requestContext:a})))]);if(e.signal.aborted){throw new Error((c?"queryRoute":"query")+"() call aborted")}let h=new Map,f=ie(r,d,u,l,h),p=new Set(d.map((e=>e.route.id)));return r.forEach((e=>{p.has(e.route.id)||(f.loaderData[e.route.id]=null)})),t({},f,{matches:r,activeDeferreds:h.size>0?Object.fromEntries(h.entries()):null})}return{dataRoutes:c,query:async function(e,r){let{requestContext:o}=void 0===r?{}:r,a=new URL(e.url),n=e.method,u=s("",l(a),null,"default"),h=p(c,u,i);if(!we(n)&&"HEAD"!==n){let e=ue(405,{method:n}),{matches:t,route:r}=de(c);return{basename:i,location:u,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(!h){let e=ue(404,{pathname:u.pathname}),{matches:t,route:r}=de(c);return{basename:i,location:u,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let f=await d(e,u,h,o);return ge(f)?f:t({location:u,basename:i},f)},queryRoute:async function(e,t){let{routeId:r,requestContext:o}=void 0===t?{}:t,a=new URL(e.url),n=e.method,u=s("",l(a),null,"default"),h=p(c,u,i);if(!we(n)&&"HEAD"!==n&&"OPTIONS"!==n)throw ue(405,{method:n});if(!h)throw ue(404,{pathname:u.pathname});let f=r?h.find((e=>e.route.id===r)):xe(h,u);if(r&&!f)throw ue(403,{pathname:u.pathname,routeId:r});if(!f)throw ue(404,{pathname:u.pathname});let m=await d(e,u,h,o,f);if(ge(m))return m;let y=m.errors?Object.values(m.errors)[0]:void 0;if(void 0!==y)throw y;if(m.actionData)return Object.values(m.actionData)[0];if(m.loaderData){var v;let e=Object.values(m.loaderData)[0];return null!=(v=m.activeDeferreds)&&v[f.route.id]&&(e[J]=m.activeDeferreds[f.route.id]),e}}}},e.defer=function(e,t){return void 0===t&&(t={}),new U(e,"number"==typeof t?{status:t}:t)},e.generatePath=function(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(n(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));const o=r.startsWith("/")?"/":"",i=e=>null==e?"":"string"==typeof e?e:String(e);return o+r.split(/\/+/).map(((e,r,o)=>{if(r===o.length-1&&"*"===e){return i(t["*"])}const n=e.match(/^:(\w+)(\??)$/);if(n){const[,e,r]=n;let o=t[e];return a("?"===r||null!=o,'Missing ":'+e+'" param'),i(o)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")},e.getStaticContextFromError=function(e,r,o){return t({},r,{statusCode:500,errors:{[r._deepestRenderedBoundaryId||e[0].id]:o}})},e.getToPathname=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?c(e).pathname:e.pathname},e.isDeferredData=ve,e.isRouteErrorResponse=_,e.joinPaths=M,e.json=function(e,r){void 0===r&&(r={});let o="number"==typeof r?{status:r}:r,a=new Headers(o.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),t({},o,{headers:a}))},e.matchPath=D,e.matchRoutes=p,e.normalizePathname=L,e.parsePath=c,e.redirect=function(e,r){void 0===r&&(r=302);let o=r;"number"==typeof o?o={status:o}:void 0===o.status&&(o.status=302);let a=new Headers(o.headers);return a.set("Location",e),new Response(null,t({},o,{headers:a}))},e.resolvePath=A,e.resolveTo=P,e.stripBasename=E,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
11
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).RemixRouter={})}(this,(function(e){"use strict";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},t.apply(this,arguments)}let r=function(e){return e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e}({});const a="popstate";function o(e,t){if(!1===e||null==e)throw new Error(t)}function n(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function i(e,t){return{usr:e.state,key:e.key,idx:t}}function s(e,r,a,o){return void 0===a&&(a=null),t({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof r?c(r):r,{state:a,key:r&&r.key||o||Math.random().toString(36).substr(2,8)})}function l(e){let{pathname:t="/",search:r="",hash:a=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function c(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function d(e,n,c,d){void 0===d&&(d={});let{window:u=document.defaultView,v5Compat:h=!1}=d,f=u.history,p=r.Pop,m=null,y=v();function v(){return(f.state||{idx:null}).idx}function g(){p=r.Pop;let e=v(),t=null==e?null:e-y;y=e,m&&m({action:p,location:w.location,delta:t})}function b(e){let t="null"!==u.location.origin?u.location.origin:u.location.href,r="string"==typeof e?e:l(e);return o(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==y&&(y=0,f.replaceState(t({},f.state,{idx:y}),""));let w={get action(){return p},get location(){return e(u,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return u.addEventListener(a,g),m=e,()=>{u.removeEventListener(a,g),m=null}},createHref:e=>n(u,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=r.Push;let a=s(w.location,e,t);c&&c(a,e),y=v()+1;let o=i(a,y),n=w.createHref(a);try{f.pushState(o,"",n)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;u.location.assign(n)}h&&m&&m({action:p,location:w.location,delta:1})},replace:function(e,t){p=r.Replace;let a=s(w.location,e,t);c&&c(a,e),y=v();let o=i(a,y),n=w.createHref(a);f.replaceState(o,"",n),h&&m&&m({action:p,location:w.location,delta:0})},go:e=>f.go(e)};return w}let u=function(e){return e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error",e}({});const h=new Set(["lazy","caseSensitive","path","id","index","children"]);function f(e,r,a,n){return void 0===a&&(a=[]),void 0===n&&(n={}),e.map(((e,i)=>{let s=[...a,i],l="string"==typeof e.id?e.id:s.join("-");if(o(!0!==e.index||!e.children,"Cannot specify children on an index route"),o(!n[l],'Found a route id collision on id "'+l+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let a=t({},e,r(e),{id:l});return n[l]=a,a}{let a=t({},e,r(e),{id:l,children:void 0});return n[l]=a,e.children&&(a.children=f(e.children,r,s,n)),a}}))}function p(e,t,r){void 0===r&&(r="/");let a=E(("string"==typeof t?c(t):t).pathname||"/",r);if(null==a)return null;let o=m(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let n=null;for(let e=0;null==n&&e<o.length;++e)n=w(o[e],R(a));return n}function m(e,t,r,a){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===a&&(a="");let n=(e,n,i)=>{let s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:n,route:e};s.relativePath.startsWith("/")&&(o(s.relativePath.startsWith(a),'Absolute route path "'+s.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(a.length));let l=M([a,s.relativePath]),c=r.concat(s);e.children&&e.children.length>0&&(o(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),m(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:b(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of y(e.path))n(e,t,r);else n(e,t)})),t}function y(e){let t=e.split("/");if(0===t.length)return[];let[r,...a]=t,o=r.endsWith("?"),n=r.replace(/\?$/,"");if(0===a.length)return o?[n,""]:[n];let i=y(a.join("/")),s=[];return s.push(...i.map((e=>""===e?n:[n,e].join("/")))),o&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const v=/^:\w+$/,g=e=>"*"===e;function b(e,t){let r=e.split("/"),a=r.length;return r.some(g)&&(a+=-2),t&&(a+=2),r.filter((e=>!g(e))).reduce(((e,t)=>e+(v.test(t)?3:""===t?1:10)),a)}function w(e,t){let{routesMeta:r}=e,a={},o="/",n=[];for(let e=0;e<r.length;++e){let i=r[e],s=e===r.length-1,l="/"===o?t:t.slice(o.length)||"/",c=D({path:i.relativePath,caseSensitive:i.caseSensitive,end:s},l);if(!c)return null;Object.assign(a,c.params);let d=i.route;n.push({params:a,pathname:M([o,c.pathname]),pathnameBase:L(M([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=M([o,c.pathnameBase]))}return n}function D(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!0);n("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(a.push(t),"/([^\\/]+)")));e.endsWith("*")?(a.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");return[new RegExp(o,t?void 0:"i"),a]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:a.reduce(((e,t,r)=>{if("*"===t){let e=l[r]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return n(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+r+")."),e}}(l[r]||"",t),e}),{}),pathname:i,pathnameBase:s,pattern:e}}function R(e){try{return decodeURI(e)}catch(t){return n(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function E(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&"/"!==a?null:e.slice(r)||"/"}function x(e,t){void 0===t&&(t="/");let{pathname:r,search:a="",hash:o=""}="string"==typeof e?c(e):e,n=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:n,search:j(a),hash:k(o)}}function S(e,t,r,a){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(a)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function P(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function A(e,r,a,n){let i;void 0===n&&(n=!1),"string"==typeof e?i=c(e):(i=t({},e),o(!i.pathname||!i.pathname.includes("?"),S("?","pathname","search",i)),o(!i.pathname||!i.pathname.includes("#"),S("#","pathname","hash",i)),o(!i.search||!i.search.includes("#"),S("#","search","hash",i)));let s,l=""===e||""===i.pathname,d=l?"/":i.pathname;if(n||null==d)s=a;else{let e=r.length-1;if(d.startsWith("..")){let t=d.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}s=e>=0?r[e]:"/"}let u=x(i,s),h=d&&"/"!==d&&d.endsWith("/"),f=(l||"."===d)&&a.endsWith("/");return u.pathname.endsWith("/")||!h&&!f||(u.pathname+="/"),u}const M=e=>e.join("/").replace(/\/\/+/g,"/"),L=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),j=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",k=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class C extends Error{}class U{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],o(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>r=t)),this.controller=new AbortController;let a=()=>r(new C("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(e).reduce(((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:this.trackPromise(r,a)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(r,e,void 0,t)),(t=>this.onSettle(r,e,t)));return r.catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,a){if(this.controller.signal.aborted&&r instanceof C)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===a){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===a?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>a}),this.emit(!1,t),a)}emit(e,t){this.subscribers.forEach((r=>r(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise((t=>{this.subscribe((a=>{e.removeEventListener("abort",r),(a||this.done)&&t(a)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return o(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[r,a]=t;return Object.assign(e,{[r]:T(a)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function T(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const O=function(e,r){void 0===r&&(r=302);let a=r;"number"==typeof a?a={status:a}:void 0===a.status&&(a.status=302);let o=new Headers(a.headers);return o.set("Location",e),new Response(null,t({},a,{headers:o}))};class _{constructor(e,t,r,a){void 0===a&&(a=!1),this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function I(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const q=["post","put","patch","delete"],z=new Set(q),F=["get",...q],H=new Set(F),B=new Set([301,302,303,307,308]),N=new Set([307,308]),W={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},K={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Y=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,J=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});const X=Symbol("deferred");function V(e,t,r,a,o,n,i){let s,c;if(null!=n&&"path"!==i){s=[];for(let e of t)if(s.push(e),e.route.id===n){c=e;break}}else s=t,c=t[t.length-1];let d=A(o||".",P(s).map((e=>e.pathnameBase)),E(e.pathname,r)||e.pathname,"path"===i);return null==o&&(d.search=e.search,d.hash=e.hash),null!=o&&""!==o&&"."!==o||!c||!c.route.index||xe(d.search)||(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),a&&"/"!==r&&(d.pathname="/"===d.pathname?r:M([r,d.pathname])),l(d)}function G(e,t,r,a){if(!a||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(a))return{path:r};if(a.formMethod&&!we(a.formMethod))return{path:r,error:he(405,{method:a.formMethod})};let n,i,s=()=>({path:r,error:he(400,{type:"invalid-body"})}),d=a.formMethod||"get",u=e?d.toUpperCase():d.toLowerCase(),h=pe(r);if(void 0!==a.body){if("text/plain"===a.formEncType){if(!De(u))return s();let e="string"==typeof a.body?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce(((e,t)=>{let[r,a]=t;return""+e+r+"="+a+"\n"}),""):String(a.body);return{path:r,submission:{formMethod:u,formAction:h,formEncType:a.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===a.formEncType){if(!De(u))return s();try{let e="string"==typeof a.body?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:u,formAction:h,formEncType:a.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(o("function"==typeof FormData,"FormData is not available in this environment"),a.formData)n=ne(a.formData),i=a.formData;else if(a.body instanceof FormData)n=ne(a.body),i=a.body;else if(a.body instanceof URLSearchParams)n=a.body,i=ie(n);else if(null==a.body)n=new URLSearchParams,i=new FormData;else try{n=new URLSearchParams(a.body),i=ie(n)}catch(e){return s()}let f={formMethod:u,formAction:h,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(De(f.formMethod))return{path:r,submission:f};let p=c(r);return t&&p.search&&xe(p.search)&&n.append("index",""),p.search="?"+n,{path:l(p),submission:f}}function Q(e,t){let r=e;if(t){let a=e.findIndex((e=>e.route.id===t));a>=0&&(r=e.slice(0,a))}return r}function Z(e,r,a,o,n,i,s,l,c,d,u,h,f,m){let y=m?Object.values(m)[0]:f?Object.values(f)[0]:void 0,v=e.createURL(r.location),g=e.createURL(n),b=m?Object.keys(m)[0]:void 0,w=Q(a,b).filter(((e,a)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,r){let a=!t||r.route.id!==t.route.id,o=void 0===e[r.route.id];return a||o}(r.loaderData,r.matches[a],e)||s.some((t=>t===e.route.id)))return!0;let n=r.matches[a],l=e;return te(e,t({currentUrl:v,currentParams:n.params,nextUrl:g,nextParams:l.params},o,{actionResult:y,defaultShouldRevalidate:i||v.pathname+v.search===g.pathname+g.search||v.search!==g.search||ee(n,l)}))})),D=[];return c.forEach(((e,n)=>{if(!a.some((t=>t.route.id===e.routeId)))return;let s=p(u,e.path,h);if(!s)return void D.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=r.fetchers.get(n),f=Se(s,e.path),m=!1;m=!d.has(n)&&(!!l.includes(n)||(c&&"idle"!==c.state&&void 0===c.data?i:te(f,t({currentUrl:v,currentParams:r.matches[r.matches.length-1].params,nextUrl:g,nextParams:a[a.length-1].params},o,{actionResult:y,defaultShouldRevalidate:i})))),m&&D.push({key:n,routeId:e.routeId,path:e.path,matches:s,match:f,controller:new AbortController})})),[w,D]}function ee(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function te(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function re(e,r,a){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let s=a[e.id];o(s,"No route found in manifest");let l={};for(let e in i){let t=void 0!==s[e]&&"hasErrorBoundary"!==e;n(!t,'Route "'+s.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||h.has(e)||(l[e]=i[e])}Object.assign(s,l),Object.assign(s,t({},r(s),{lazy:void 0}))}async function ae(e,t,r,a,n,i,s,l){let c,d,h;void 0===l&&(l={});let f=e=>{let a,o=new Promise(((e,t)=>a=t));return h=()=>a(),t.signal.addEventListener("abort",h),Promise.race([e({request:t,params:r.params,context:l.requestContext}),o])};try{let a=r.route[e];if(r.route.lazy)if(a){d=(await Promise.all([f(a),re(r.route,i,n)]))[0]}else{if(await re(r.route,i,n),a=r.route[e],!a){if("action"===e){let e=new URL(t.url),a=e.pathname+e.search;throw he(405,{method:t.method,pathname:a,routeId:r.route.id})}return{type:u.data,data:void 0}}d=await f(a)}else{if(!a){let e=new URL(t.url);throw he(404,{pathname:e.pathname+e.search})}d=await f(a)}o(void 0!==d,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){c=u.error,d=e}finally{h&&t.signal.removeEventListener("abort",h)}if(be(d)){let e,n=d.status;if(B.has(n)){let e=d.headers.get("Location");if(o(e,"Redirects returned/thrown from loaders/actions must have a Location header"),Y.test(e)){if(!l.isStaticRequest){let r=new URL(t.url),a=e.startsWith("//")?new URL(r.protocol+e):new URL(e),o=null!=E(a.pathname,s);a.origin===r.origin&&o&&(e=a.pathname+a.search+a.hash)}}else e=V(new URL(t.url),a.slice(0,a.indexOf(r)+1),s,!0,e);if(l.isStaticRequest)throw d.headers.set("Location",e),d;return{type:u.redirect,status:n,location:e,revalidate:null!==d.headers.get("X-Remix-Revalidate"),reloadDocument:null!==d.headers.get("X-Remix-Reload-Document")}}if(l.isRouteRequest){throw{type:c===u.error?u.error:u.data,response:d}}let i=d.headers.get("Content-Type");return e=i&&/\bapplication\/json\b/.test(i)?await d.json():await d.text(),c===u.error?{type:c,error:new _(n,d.statusText,e),headers:d.headers}:{type:u.data,data:e,statusCode:d.status,headers:d.headers}}return c===u.error?{type:c,error:d}:ge(d)?{type:u.deferred,deferredData:d,statusCode:null==(p=d.init)?void 0:p.status,headers:(null==(m=d.init)?void 0:m.headers)&&new Headers(d.init.headers)}:{type:u.data,data:d};var p,m}function oe(e,t,r,a){let o=e.createURL(pe(t)).toString(),n={signal:r};if(a&&De(a.formMethod)){let{formMethod:e,formEncType:t}=a;n.method=e.toUpperCase(),"application/json"===t?(n.headers=new Headers({"Content-Type":t}),n.body=JSON.stringify(a.json)):"text/plain"===t?n.body=a.text:"application/x-www-form-urlencoded"===t&&a.formData?n.body=ne(a.formData):n.body=a.formData}return new Request(o,n)}function ne(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,"string"==typeof a?a:a.name);return t}function ie(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function se(e,t,r,a,n){let i,s={},l=null,c=!1,d={};return r.forEach(((r,u)=>{let h=t[u].route.id;if(o(!ve(r),"Cannot handle redirect results in processLoaderData"),ye(r)){let t=de(e,h),o=r.error;a&&(o=Object.values(a)[0],a=void 0),l=l||{},null==l[t.route.id]&&(l[t.route.id]=o),s[h]=void 0,c||(c=!0,i=I(r.error)?r.error.status:500),r.headers&&(d[h]=r.headers)}else me(r)?(n.set(h,r.deferredData),s[h]=r.deferredData.data):s[h]=r.data,null==r.statusCode||200===r.statusCode||c||(i=r.statusCode),r.headers&&(d[h]=r.headers)})),a&&(l=a,s[Object.keys(a)[0]]=void 0),{loaderData:s,errors:l,statusCode:i||200,loaderHeaders:d}}function le(e,r,a,n,i,s,l,c){let{loaderData:d,errors:u}=se(r,a,n,i,c);for(let r=0;r<s.length;r++){let{key:a,match:n,controller:i}=s[r];o(void 0!==l&&void 0!==l[r],"Did not find corresponding fetcher result");let c=l[r];if(!i||!i.signal.aborted)if(ye(c)){let r=de(e.matches,null==n?void 0:n.route.id);u&&u[r.route.id]||(u=t({},u,{[r.route.id]:c.error})),e.fetchers.delete(a)}else if(ve(c))o(!1,"Unhandled fetcher revalidation redirect");else if(me(c))o(!1,"Unhandled fetcher deferred data");else{let t=je(c.data);e.fetchers.set(a,t)}}return{loaderData:d,errors:u}}function ce(e,r,a,o){let n=t({},r);for(let t of a){let a=t.route.id;if(r.hasOwnProperty(a)?void 0!==r[a]&&(n[a]=r[a]):void 0!==e[a]&&t.route.loader&&(n[a]=e[a]),o&&o.hasOwnProperty(a))break}return n}function de(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function ue(e){let t=e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function he(e,t){let{pathname:r,routeId:a,method:o,type:n}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",o&&r&&a?s="You made a "+o+' request to "'+r+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===n?s="defer() is not supported in actions":"invalid-body"===n&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s='Route "'+a+'" does not match URL "'+r+'"'):404===e?(i="Not Found",s='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",o&&r&&a?s="You made a "+o.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new _(e||500,i,new Error(s),!0)}function fe(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ve(r))return{result:r,idx:t}}}function pe(e){return l(t({},"string"==typeof e?c(e):e,{hash:""}))}function me(e){return e.type===u.deferred}function ye(e){return e.type===u.error}function ve(e){return(e&&e.type)===u.redirect}function ge(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}function be(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function we(e){return H.has(e.toLowerCase())}function De(e){return z.has(e.toLowerCase())}async function Re(e,t,r,a,n,i){for(let s=0;s<r.length;s++){let l=r[s],c=t[s];if(!c)continue;let d=e.find((e=>e.route.id===c.route.id)),u=null!=d&&!ee(d,c)&&void 0!==(i&&i[c.route.id]);if(me(l)&&(n||u)){let e=a[s];o(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await Ee(l,e,n).then((e=>{e&&(r[s]=e||r[s])}))}}}async function Ee(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:u.data,data:e.deferredData.unwrappedData}}catch(e){return{type:u.error,error:e}}return{type:u.data,data:e.deferredData.data}}}function xe(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Se(e,t){let r="string"==typeof t?c(t).search:t.search;if(e[e.length-1].route.index&&xe(r||""))return e[e.length-1];let a=P(e);return a[a.length-1]}function Pe(e){let{formMethod:t,formAction:r,formEncType:a,text:o,formData:n,json:i}=e;if(t&&r&&a)return null!=o?{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:o}:null!=n?{formMethod:t,formAction:r,formEncType:a,formData:n,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}:void 0}function Ae(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Me(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Le(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function je(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}e.AbortedDeferredError=C,e.Action=r,e.ErrorResponse=_,e.IDLE_BLOCKER=K,e.IDLE_FETCHER=$,e.IDLE_NAVIGATION=W,e.UNSAFE_DEFERRED_SYMBOL=X,e.UNSAFE_DeferredData=U,e.UNSAFE_convertRoutesToDataRoutes=f,e.UNSAFE_getPathContributingMatches=P,e.UNSAFE_invariant=o,e.UNSAFE_warning=n,e.createBrowserHistory=function(e){return void 0===e&&(e={}),d((function(e,t){let{pathname:r,search:a,hash:o}=e.location;return s("",{pathname:r,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:l(t)}),null,e)},e.createHashHistory=function(e){return void 0===e&&(e={}),d((function(e,t){let{pathname:r="/",search:a="",hash:o=""}=c(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),s("",{pathname:r,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),a="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");a=-1===r?t:t.slice(0,r)}return a+"#"+("string"==typeof t?t:l(t))}),(function(e,t){n("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)},e.createMemoryHistory=function(e){void 0===e&&(e={});let t,{initialEntries:a=["/"],initialIndex:o,v5Compat:i=!1}=e;t=a.map(((e,t)=>m(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let d=f(null==o?t.length-1:o),u=r.Pop,h=null;function f(e){return Math.min(Math.max(e,0),t.length-1)}function p(){return t[d]}function m(e,r,a){void 0===r&&(r=null);let o=s(t?p().pathname:"/",e,r,a);return n("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}function y(e){return"string"==typeof e?e:l(e)}return{get index(){return d},get action(){return u},get location(){return p()},createHref:y,createURL:e=>new URL(y(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?c(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,a){u=r.Push;let o=m(e,a);d+=1,t.splice(d,t.length,o),i&&h&&h({action:u,location:o,delta:1})},replace(e,a){u=r.Replace;let o=m(e,a);t[d]=o,i&&h&&h({action:u,location:o,delta:0})},go(e){u=r.Pop;let a=f(d+e),o=t[a];d=a,h&&h({action:u,location:o,delta:e})},listen:e=>(h=e,()=>{h=null})}},e.createPath=l,e.createRouter=function(e){const a=e.window?e.window:"undefined"!=typeof window?window:void 0,i=void 0!==a&&void 0!==a.document&&void 0!==a.document.createElement,l=!i;let c;if(o(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)c=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;c=e=>({hasErrorBoundary:t(e)})}else c=J;let d,h={},m=f(e.routes,c,void 0,h),y=e.basename||"/",v=t({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),g=null,b=new Set,w=null,D=null,R=null,x=null!=e.hydrationData,S=p(m,e.history.location,y),P=null;if(null==S){let t=he(404,{pathname:e.history.location.pathname}),{matches:r,route:a}=ue(m);S=r,P={[a.id]:t}}let A,M,L=!(S.some((e=>e.route.lazy))||S.some((e=>e.route.loader))&&null==e.hydrationData),j={historyAction:e.history.action,location:e.history.location,matches:S,initialized:L,navigation:W,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},k=r.Pop,C=!1,U=!1,T=!1,O=[],_=[],I=new Map,q=0,z=-1,F=new Map,H=new Set,B=new Map,X=new Map,Q=new Map,ee=!1;function te(e){j=t({},j,e),b.forEach((e=>e(j)))}function re(a,o){var n,i;let s,l=null!=j.actionData&&null!=j.navigation.formMethod&&De(j.navigation.formMethod)&&"loading"===j.navigation.state&&!0!==(null==(n=a.state)?void 0:n._isRedirect);s=o.actionData?Object.keys(o.actionData).length>0?o.actionData:null:l?j.actionData:null;let c=o.loaderData?ce(j.loaderData,o.loaderData,o.matches||[],o.errors):j.loaderData,u=j.blockers;u.size>0&&(u=new Map(u),u.forEach(((e,t)=>u.set(t,K))));let h=!0===C||null!=j.navigation.formMethod&&De(j.navigation.formMethod)&&!0!==(null==(i=a.state)?void 0:i._isRedirect);d&&(m=d,d=void 0),U||k===r.Pop||(k===r.Push?e.history.push(a,a.state):k===r.Replace&&e.history.replace(a,a.state)),te(t({},o,{actionData:s,loaderData:c,historyAction:k,location:a,initialized:!0,navigation:W,revalidation:"idle",restoreScrollPosition:ze(a,o.matches||j.matches),preventScrollReset:h,blockers:u})),k=r.Pop,C=!1,U=!1,T=!1,O=[],_=[]}async function ne(a,o,n){M&&M.abort(),M=null,k=a,U=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(w&&R){let r=qe(e,t);w[r]=R()}}(j.location,j.matches),C=!0===(n&&n.preventScrollReset);let i=d||m,s=n&&n.overrideNavigation,l=p(i,o,y);if(!l){let e=he(404,{pathname:o.pathname}),{matches:t,route:r}=ue(i);return Ie(),void re(o,{matches:t,loaderData:{},errors:{[r.id]:e}})}if(j.initialized&&!T&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(j.location,o)&&!(n&&n.submission&&De(n.submission.formMethod)))return void re(o,{matches:l});M=new AbortController;let f,v,g=oe(e.history,o,M.signal,n&&n.submission);if(n&&n.pendingError)v={[de(l).route.id]:n.pendingError};else if(n&&n.submission&&De(n.submission.formMethod)){let e=await async function(e,t,a,o,n){void 0===n&&(n={});let i;ge(),te({navigation:Me(t,a)});let s=Se(o,t);if(s.route.action||s.route.lazy){if(i=await ae("action",e,s,o,h,c,y),e.signal.aborted)return{shortCircuited:!0}}else i={type:u.error,error:he(405,{method:e.method,pathname:t.pathname,routeId:s.route.id})};if(ve(i)){let e;return e=n&&null!=n.replace?n.replace:i.location===j.location.pathname+j.location.search,await se(j,i,{submission:a,replace:e}),{shortCircuited:!0}}if(ye(i)){let e=de(o,s.route.id);return!0!==(n&&n.replace)&&(k=r.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:i.error}}}if(me(i))throw he(400,{type:"defer-action"});return{pendingActionData:{[s.route.id]:i.data}}}(g,o,n.submission,l,{replace:n.replace});if(e.shortCircuited)return;f=e.pendingActionData,v=e.pendingActionError,s=Ae(o,n.submission),g=new Request(g.url,{signal:g.signal})}let{shortCircuited:b,loaderData:D,errors:E}=await async function(r,a,o,n,i,s,l,c,u){let h=n||Ae(a,i),f=i||s||Pe(h),p=d||m,[v,g]=Z(e.history,j,o,f,a,T,O,_,B,H,p,y,c,u);if(Ie((e=>!(o&&o.some((t=>t.route.id===e)))||v&&v.some((t=>t.route.id===e)))),z=++q,0===v.length&&0===g.length){let e=Ce();return re(a,t({matches:o,loaderData:{},errors:u||null},c?{actionData:c}:{},e?{fetchers:new Map(j.fetchers)}:{})),{shortCircuited:!0}}if(!U){g.forEach((e=>{let t=j.fetchers.get(e.key),r=Le(void 0,t?t.data:void 0);j.fetchers.set(e.key,r)}));let e=c||j.actionData;te(t({navigation:h},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},g.length>0?{fetchers:new Map(j.fetchers)}:{}))}g.forEach((e=>{I.has(e.key)&&xe(e.key),e.controller&&I.set(e.key,e.controller)}));let b=()=>g.forEach((e=>xe(e.key)));M&&M.signal.addEventListener("abort",b);let{results:w,loaderResults:D,fetcherResults:R}=await pe(j.matches,o,v,g,r);if(r.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",b);g.forEach((e=>I.delete(e.key)));let E=fe(w);if(E){if(E.idx>=v.length){let e=g[E.idx-v.length].key;H.add(e)}return await se(j,E.result,{replace:l}),{shortCircuited:!0}}let{loaderData:x,errors:S}=le(j,o,v,D,u,g,R,X);X.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&X.delete(t)}))}));let P=Ce(),A=Ue(z),L=P||A||g.length>0;return t({loaderData:x,errors:S},L?{fetchers:new Map(j.fetchers)}:{})}(g,o,l,s,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,f,v);b||(M=null,re(o,t({matches:l},f?{actionData:f}:{},{loaderData:D,errors:E})))}function ie(e){return j.fetchers.get(e)||$}async function se(n,l,c){let{submission:d,replace:u,isFetchActionRedirect:h}=void 0===c?{}:c;l.revalidate&&(T=!0);let f=s(n.location,l.location,t({_isRedirect:!0},h?{_isFetchActionRedirect:!0}:{}));if(o(f,"Expected a location on the redirect navigation"),i){let t=!1;if(l.reloadDocument)t=!0;else if(Y.test(l.location)){const r=e.history.createURL(l.location);t=r.origin!==a.location.origin||null==E(r.pathname,y)}if(t)return void(u?a.location.replace(l.location):a.location.assign(l.location))}M=null;let p=!0===u?r.Replace:r.Push,m=d||Pe(n.navigation);if(N.has(l.status)&&m&&De(m.formMethod))await ne(p,f,{submission:t({},m,{formAction:l.location}),preventScrollReset:C});else if(h)await ne(p,f,{overrideNavigation:Ae(f),fetcherSubmission:m,preventScrollReset:C});else{let e=Ae(f,m);await ne(p,f,{overrideNavigation:e,preventScrollReset:C})}}async function pe(t,r,a,o,n){let i=await Promise.all([...a.map((e=>ae("loader",n,e,r,h,c,y))),...o.map((t=>{if(t.matches&&t.match&&t.controller)return ae("loader",oe(e.history,t.path,t.controller.signal),t.match,t.matches,h,c,y);return{type:u.error,error:he(404,{pathname:t.path})}}))]),s=i.slice(0,a.length),l=i.slice(a.length);return await Promise.all([Re(t,a,s,s.map((()=>n.signal)),!1,j.loaderData),Re(t,o.map((e=>e.match)),l,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:i,loaderResults:s,fetcherResults:l}}function ge(){T=!0,O.push(...Ie()),B.forEach(((e,t)=>{I.has(t)&&(_.push(t),xe(t))}))}function be(e,t,r){let a=de(j.matches,t);we(e),te({errors:{[a.route.id]:r},fetchers:new Map(j.fetchers)})}function we(e){let t=j.fetchers.get(e);!I.has(e)||t&&"loading"===t.state&&F.has(e)||xe(e),B.delete(e),F.delete(e),H.delete(e),j.fetchers.delete(e)}function xe(e){let t=I.get(e);o(t,"Expected fetch controller: "+e),t.abort(),I.delete(e)}function ke(e){for(let t of e){let e=je(ie(t).data);j.fetchers.set(t,e)}}function Ce(){let e=[],t=!1;for(let r of H){let a=j.fetchers.get(r);o(a,"Expected fetcher: "+r),"loading"===a.state&&(H.delete(r),e.push(r),t=!0)}return ke(e),t}function Ue(e){let t=[];for(let[r,a]of F)if(a<e){let e=j.fetchers.get(r);o(e,"Expected fetcher: "+r),"loading"===e.state&&(xe(r),F.delete(r),t.push(r))}return ke(t),t.length>0}function Te(e){j.blockers.delete(e),Q.delete(e)}function Oe(e,t){let r=j.blockers.get(e)||K;o("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let a=new Map(j.blockers);a.set(e,t),te({blockers:a})}function _e(e){let{currentLocation:t,nextLocation:r,historyAction:a}=e;if(0===Q.size)return;Q.size>1&&n(!1,"A router only supports one blocker at a time");let o=Array.from(Q.entries()),[i,s]=o[o.length-1],l=j.blockers.get(i);return l&&"proceeding"===l.state?void 0:s({currentLocation:t,nextLocation:r,historyAction:a})?i:void 0}function Ie(e){let t=[];return X.forEach(((r,a)=>{e&&!e(a)||(r.cancel(),t.push(a),X.delete(a))})),t}function qe(e,t){if(D){return D(e,t.map((e=>function(e,t){let{route:r,pathname:a,params:o}=e;return{id:r.id,pathname:a,params:o,data:t[r.id],handle:r.handle}}(e,j.loaderData))))||e.key}return e.key}function ze(e,t){if(w){let r=qe(e,t),a=w[r];if("number"==typeof a)return a}return null}return A={get basename(){return y},get state(){return j},get routes(){return m},initialize:function(){return g=e.history.listen((t=>{let{action:r,location:a,delta:o}=t;if(ee)return void(ee=!1);n(0===Q.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=_e({currentLocation:j.location,nextLocation:a,historyAction:r});return i&&null!=o?(ee=!0,e.history.go(-1*o),void Oe(i,{state:"blocked",location:a,proceed(){Oe(i,{state:"proceeding",proceed:void 0,reset:void 0,location:a}),e.history.go(o)},reset(){let e=new Map(j.blockers);e.set(i,K),te({blockers:e})}})):ne(r,a)})),j.initialized||ne(r.Pop,j.location),A},subscribe:function(e){return b.add(e),()=>b.delete(e)},enableScrollRestoration:function(e,t,r){if(w=e,R=t,D=r||null,!x&&j.navigation===W){x=!0;let e=ze(j.location,j.matches);null!=e&&te({restoreScrollPosition:e})}return()=>{w=null,R=null,D=null}},navigate:async function a(o,n){if("number"==typeof o)return void e.history.go(o);let i=V(j.location,j.matches,y,v.v7_prependBasename,o,null==n?void 0:n.fromRouteId,null==n?void 0:n.relative),{path:l,submission:c,error:d}=G(v.v7_normalizeFormMethod,!1,i,n),u=j.location,h=s(j.location,l,n&&n.state);h=t({},h,e.history.encodeLocation(h));let f=n&&null!=n.replace?n.replace:void 0,p=r.Push;!0===f?p=r.Replace:!1===f||null!=c&&De(c.formMethod)&&c.formAction===j.location.pathname+j.location.search&&(p=r.Replace);let m=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,g=_e({currentLocation:u,nextLocation:h,historyAction:p});if(!g)return await ne(p,h,{submission:c,pendingError:d,preventScrollReset:m,replace:n&&n.replace});Oe(g,{state:"blocked",location:h,proceed(){Oe(g,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),a(o,n)},reset(){let e=new Map(j.blockers);e.set(g,K),te({blockers:e})}})},fetch:function(r,a,n,i){if(l)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");I.has(r)&&xe(r);let s=d||m,u=V(j.location,j.matches,y,v.v7_prependBasename,n,a,null==i?void 0:i.relative),f=p(s,u,y);if(!f)return void be(r,a,he(404,{pathname:u}));let{path:g,submission:b,error:w}=G(v.v7_normalizeFormMethod,!0,u,i);if(w)return void be(r,a,w);let D=Se(f,g);C=!0===(i&&i.preventScrollReset),b&&De(b.formMethod)?async function(r,a,n,i,s,l){if(ge(),B.delete(r),!i.route.action&&!i.route.lazy){let e=he(405,{method:l.formMethod,pathname:n,routeId:a});return void be(r,a,e)}let u=j.fetchers.get(r),f=function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}(l,u);j.fetchers.set(r,f),te({fetchers:new Map(j.fetchers)});let v=new AbortController,g=oe(e.history,n,v.signal,l);I.set(r,v);let b=q,w=await ae("action",g,i,s,h,c,y);if(g.signal.aborted)return void(I.get(r)===v&&I.delete(r));if(ve(w)){if(I.delete(r),z>b){let e=je(void 0);return j.fetchers.set(r,e),void te({fetchers:new Map(j.fetchers)})}{H.add(r);let e=Le(l);return j.fetchers.set(r,e),te({fetchers:new Map(j.fetchers)}),se(j,w,{submission:l,isFetchActionRedirect:!0})}}if(ye(w))return void be(r,a,w.error);if(me(w))throw he(400,{type:"defer-action"});let D=j.navigation.location||j.location,R=oe(e.history,D,v.signal),E=d||m,x="idle"!==j.navigation.state?p(E,j.navigation.location,y):j.matches;o(x,"Didn't find any matches after fetcher action");let S=++q;F.set(r,S);let P=Le(l,w.data);j.fetchers.set(r,P);let[A,L]=Z(e.history,j,x,l,D,T,O,_,B,H,E,y,{[i.route.id]:w.data},void 0);L.filter((e=>e.key!==r)).forEach((e=>{let t=e.key,r=j.fetchers.get(t),a=Le(void 0,r?r.data:void 0);j.fetchers.set(t,a),I.has(t)&&xe(t),e.controller&&I.set(t,e.controller)})),te({fetchers:new Map(j.fetchers)});let C=()=>L.forEach((e=>xe(e.key)));v.signal.addEventListener("abort",C);let{results:U,loaderResults:N,fetcherResults:W}=await pe(j.matches,x,A,L,R);if(v.signal.aborted)return;v.signal.removeEventListener("abort",C),F.delete(r),I.delete(r),L.forEach((e=>I.delete(e.key)));let $=fe(U);if($){if($.idx>=A.length){let e=L[$.idx-A.length].key;H.add(e)}return se(j,$.result)}let{loaderData:K,errors:Y}=le(j,j.matches,A,N,void 0,L,W,X);if(j.fetchers.has(r)){let e=je(w.data);j.fetchers.set(r,e)}let J=Ue(S);"loading"===j.navigation.state&&S>z?(o(k,"Expected pending action"),M&&M.abort(),re(j.navigation.location,{matches:x,loaderData:K,errors:Y,fetchers:new Map(j.fetchers)})):(te(t({errors:Y,loaderData:ce(j.loaderData,K,x,Y)},J||L.length>0?{fetchers:new Map(j.fetchers)}:{})),T=!1)}(r,a,g,D,f,b):(B.set(r,{routeId:a,path:g}),async function(t,r,a,n,i,s){let l=j.fetchers.get(t),d=Le(s,l?l.data:void 0);j.fetchers.set(t,d),te({fetchers:new Map(j.fetchers)});let u=new AbortController,f=oe(e.history,a,u.signal);I.set(t,u);let p=q,m=await ae("loader",f,n,i,h,c,y);me(m)&&(m=await Ee(m,f.signal,!0)||m);I.get(t)===u&&I.delete(t);if(f.signal.aborted)return;if(ve(m)){if(z>p){let e=je(void 0);return j.fetchers.set(t,e),void te({fetchers:new Map(j.fetchers)})}return H.add(t),void await se(j,m)}if(ye(m)){let e=de(j.matches,r);return j.fetchers.delete(t),void te({fetchers:new Map(j.fetchers),errors:{[e.route.id]:m.error}})}o(!me(m),"Unhandled fetcher deferred data");let v=je(m.data);j.fetchers.set(t,v),te({fetchers:new Map(j.fetchers)})}(r,a,g,D,f,b))},revalidate:function(){ge(),te({revalidation:"loading"}),"submitting"!==j.navigation.state&&("idle"!==j.navigation.state?ne(k||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation}):ne(j.historyAction,j.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ie,deleteFetcher:we,dispose:function(){g&&g(),b.clear(),M&&M.abort(),j.fetchers.forEach(((e,t)=>we(t))),j.blockers.forEach(((e,t)=>Te(t)))},getBlocker:function(e,t){let r=j.blockers.get(e)||K;return Q.get(e)!==t&&Q.set(e,t),r},deleteBlocker:Te,_internalFetchControllers:I,_internalActiveDeferreds:X,_internalSetRoutes:function(e){h={},d=f(e,c,void 0,h)}},A},e.createStaticHandler=function(e,r){o(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let a,n={},i=(r?r.basename:null)||"/";if(null!=r&&r.mapRouteProperties)a=r.mapRouteProperties;else if(null!=r&&r.detectErrorBoundary){let e=r.detectErrorBoundary;a=t=>({hasErrorBoundary:e(t)})}else a=J;let c=f(e,a,void 0,n);async function d(e,r,s,l,c){o(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(De(e.method.toLowerCase())){let o=await async function(e,r,o,s,l){let c;if(o.route.action||o.route.lazy){if(c=await ae("action",e,o,r,n,a,i,{isStaticRequest:!0,isRouteRequest:l,requestContext:s}),e.signal.aborted){throw new Error((l?"queryRoute":"query")+"() call aborted")}}else{let t=he(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:o.route.id});if(l)throw t;c={type:u.error,error:t}}if(ve(c))throw new Response(null,{status:c.status,headers:{Location:c.location}});if(me(c)){let e=he(400,{type:"defer-action"});if(l)throw e;c={type:u.error,error:e}}if(l){if(ye(c))throw c.error;return{matches:[o],loaderData:{},actionData:{[o.route.id]:c.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(ye(c)){let a=de(r,o.route.id);return t({},await h(e,r,s,void 0,{[a.route.id]:c.error}),{statusCode:I(c.error)?c.error.status:500,actionData:null,actionHeaders:t({},c.headers?{[o.route.id]:c.headers}:{})})}let d=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});return t({},await h(d,r,s),c.statusCode?{statusCode:c.statusCode}:{},{actionData:{[o.route.id]:c.data},actionHeaders:t({},c.headers?{[o.route.id]:c.headers}:{})})}(e,s,c||Se(s,r),l,null!=c);return o}let o=await h(e,s,l,c);return be(o)?o:t({},o,{actionData:null,actionHeaders:{}})}catch(e){if((d=e)&&be(d.response)&&(d.type===u.data||d.type===u.error)){if(e.type===u.error)throw e.response;return e.response}if(function(e){if(!be(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&null!=r}(e))return e;throw e}var d}async function h(e,r,o,s,l){let c=null!=s;if(c&&(null==s||!s.route.loader)&&(null==s||!s.route.lazy))throw he(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:null==s?void 0:s.route.id});let d=(s?[s]:Q(r,Object.keys(l||{})[0])).filter((e=>e.route.loader||e.route.lazy));if(0===d.length)return{matches:r,loaderData:r.reduce(((e,t)=>Object.assign(e,{[t.route.id]:null})),{}),errors:l||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let u=await Promise.all([...d.map((t=>ae("loader",e,t,r,n,a,i,{isStaticRequest:!0,isRouteRequest:c,requestContext:o})))]);if(e.signal.aborted){throw new Error((c?"queryRoute":"query")+"() call aborted")}let h=new Map,f=se(r,d,u,l,h),p=new Set(d.map((e=>e.route.id)));return r.forEach((e=>{p.has(e.route.id)||(f.loaderData[e.route.id]=null)})),t({},f,{matches:r,activeDeferreds:h.size>0?Object.fromEntries(h.entries()):null})}return{dataRoutes:c,query:async function(e,r){let{requestContext:a}=void 0===r?{}:r,o=new URL(e.url),n=e.method,u=s("",l(o),null,"default"),h=p(c,u,i);if(!we(n)&&"HEAD"!==n){let e=he(405,{method:n}),{matches:t,route:r}=ue(c);return{basename:i,location:u,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(!h){let e=he(404,{pathname:u.pathname}),{matches:t,route:r}=ue(c);return{basename:i,location:u,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let f=await d(e,u,h,a);return be(f)?f:t({location:u,basename:i},f)},queryRoute:async function(e,t){let{routeId:r,requestContext:a}=void 0===t?{}:t,o=new URL(e.url),n=e.method,u=s("",l(o),null,"default"),h=p(c,u,i);if(!we(n)&&"HEAD"!==n&&"OPTIONS"!==n)throw he(405,{method:n});if(!h)throw he(404,{pathname:u.pathname});let f=r?h.find((e=>e.route.id===r)):Se(h,u);if(r&&!f)throw he(403,{pathname:u.pathname,routeId:r});if(!f)throw he(404,{pathname:u.pathname});let m=await d(e,u,h,a,f);if(be(m))return m;let y=m.errors?Object.values(m.errors)[0]:void 0;if(void 0!==y)throw y;if(m.actionData)return Object.values(m.actionData)[0];if(m.loaderData){var v;let e=Object.values(m.loaderData)[0];return null!=(v=m.activeDeferreds)&&v[f.route.id]&&(e[X]=m.activeDeferreds[f.route.id]),e}}}},e.defer=function(e,t){return void 0===t&&(t={}),new U(e,"number"==typeof t?{status:t}:t)},e.generatePath=function(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(n(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));const a=r.startsWith("/")?"/":"",i=e=>null==e?"":"string"==typeof e?e:String(e);return a+r.split(/\/+/).map(((e,r,a)=>{if(r===a.length-1&&"*"===e){return i(t["*"])}const n=e.match(/^:(\w+)(\??)$/);if(n){const[,e,r]=n;let a=t[e];return o("?"===r||null!=a,'Missing ":'+e+'" param'),i(a)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")},e.getStaticContextFromError=function(e,r,a){return t({},r,{statusCode:500,errors:{[r._deepestRenderedBoundaryId||e[0].id]:a}})},e.getToPathname=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?c(e).pathname:e.pathname},e.isDeferredData=ge,e.isRouteErrorResponse=I,e.joinPaths=M,e.json=function(e,r){void 0===r&&(r={});let a="number"==typeof r?{status:r}:r,o=new Headers(a.headers);return o.has("Content-Type")||o.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),t({},a,{headers:o}))},e.matchPath=D,e.matchRoutes=p,e.normalizePathname=L,e.parsePath=c,e.redirect=O,e.redirectDocument=(e,t)=>{let r=O(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},e.resolvePath=x,e.resolveTo=A,e.stripBasename=E,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
12
12
|
//# sourceMappingURL=router.umd.min.js.map
|