@modern-js/devtools-client 2.32.2-alpha.1 → 2.33.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.
Files changed (17) hide show
  1. package/.turbo/turbo-build.log +12 -12
  2. package/CHANGELOG.md +6 -4
  3. package/dist/html/devtools/index.html +3 -3
  4. package/dist/modern.config.json +3 -0
  5. package/dist/routes-manifest.json +10 -10
  6. package/dist/static/js/async/devtools_page.8337a013.js +1 -0
  7. package/dist/static/js/async/{devtools_page.d308a574.js.map → devtools_page.8337a013.js.map} +1 -1
  8. package/dist/static/js/{devtools.16b77ad1.js → devtools.a0a7827e.js} +1 -1
  9. package/dist/static/js/{devtools.16b77ad1.js.map → devtools.a0a7827e.js.map} +1 -1
  10. package/dist/static/js/{lib-router.c5cb0f77.js → lib-router.13dbccac.js} +1 -1
  11. package/dist/static/js/{lib-router.c5cb0f77.js.LICENSE.txt → lib-router.13dbccac.js.LICENSE.txt} +2 -2
  12. package/dist/static/js/{lib-router.c5cb0f77.js.map → lib-router.13dbccac.js.map} +1 -1
  13. package/dist/static/js/{vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~c2b2cf.093533db.js → vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~74451d.b8bed90c.js} +1 -1
  14. package/dist/static/js/{vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~c2b2cf.093533db.js.map → vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~74451d.b8bed90c.js.map} +1 -1
  15. package/package.json +8 -8
  16. package/dist/static/js/async/devtools_page.d308a574.js +0 -1
  17. /package/dist/static/js/{vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~c2b2cf.093533db.js.LICENSE.txt → vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~74451d.b8bed90c.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_modern_js_devtools_client=self.webpackChunk_modern_js_devtools_client||[]).push([["lib-router"],{21921:function(e,t,r){"use strict";r.r(t),r.d(t,{Action:function(){return o},ErrorResponse:function(){return M},UNSAFE_getPathContributingMatches:function(){return D},UNSAFE_invariant:function(){return h},createBrowserHistory:function(){return c},createHashHistory:function(){return d},createPath:function(){return m},createRouter:function(){return J},isRouteErrorResponse:function(){return k},joinPaths:function(){return C},matchRoutes:function(){return E},parsePath:function(){return y},resolveTo:function(){return x},stripBasename:function(){return S}});var a,n,o,i,s=r("61078");function u(){return(u=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}).apply(this,arguments)}(a=o||(o={})).Pop="POP",a.Push="PUSH",a.Replace="REPLACE";var l="popstate";function c(e){return void 0===e&&(e={}),g(function(e,t){var{pathname:r,search:a,hash:n}=e.location;return v("",{pathname:r,search:a,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:m(t)},null,e)}function d(e){return void 0===e&&(e={}),g(function(e,t){var{pathname:r="/",search:a="",hash:n=""}=y(e.location.hash.substr(1));return v("",{pathname:r,search:a,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){var r=e.document.querySelector("base"),a="";if(r&&r.getAttribute("href")){var n=e.location.href,o=n.indexOf("#");a=-1===o?n:n.slice(0,o)}return a+"#"+("string"==typeof t?t:m(t))},function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function h(e,t){if(!1===e||null==e)throw Error(t)}function f(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function v(e,t,r,a){return void 0===r&&(r=null),u({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?y(t):t,{state:r,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function m(e){var{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 y(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function g(e,t,r,a){void 0===a&&(a={});var{window:n=document.defaultView,v5Compat:i=!1}=a,s=n.history,c=o.Pop,d=null,f=y();function y(){return(s.state||{idx:null}).idx}function g(){c=o.Pop;var e=y(),t=null==e?null:e-f;f=e,d&&d({action:c,location:E.location,delta:t})}null==f&&(f=0,s.replaceState(u({},s.state,{idx:f}),""));function b(e){var t="null"!==n.location.origin?n.location.origin:n.location.href,r="string"==typeof e?e:m(e);return h(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}var E={get action(){return c},get location(){return e(n,s)},listen(e){if(d)throw Error("A history only accepts one active listener");return n.addEventListener(l,g),d=e,()=>{n.removeEventListener(l,g),d=null}},createHref:e=>t(n,e),createURL:b,encodeLocation(e){var t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=o.Push;var a=v(E.location,e,t);r&&r(a,e);var u=p(a,f=y()+1),l=E.createHref(a);try{s.pushState(u,"",l)}catch(e){n.location.assign(l)}i&&d&&d({action:c,location:E.location,delta:1})},replace:function(e,t){c=o.Replace;var a=v(E.location,e,t);r&&r(a,e);var n=p(a,f=y()),u=E.createHref(a);s.replaceState(n,"",u),i&&d&&d({action:c,location:E.location,delta:0})},go:e=>s.go(e)};return E}(n=i||(i={})).data="data",n.deferred="deferred",n.redirect="redirect",n.error="error";var b=new Set(["lazy","caseSensitive","path","id","index","children"]);function E(e,t,r){void 0===r&&(r="/");var a=S(("string"==typeof t?y(t):t).pathname||"/",r);if(null==a)return null;var n=function e(t,r,a,n){void 0===r&&(r=[]),void 0===a&&(a=[]),void 0===n&&(n="");var o=(t,o,i)=>{var s={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};s.relativePath.startsWith("/")&&(h(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n)+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));var u=C([n,s.relativePath]),l=a.concat(s);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),e(t.children,r,l,u)),(null!=t.path||t.index)&&r.push({path:u,score:function(e,t){var r=e.split("/"),a=r.length;return r.some(R)&&(a+=-2),t&&(a+=2),r.filter(e=>!R(e)).reduce((e,t)=>e+(w.test(t)?3:""===t?1:10),a)}(u,t.index),routesMeta:l})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(var a of function e(t){var r=t.split("/");if(0===r.length)return[];var[a,...n]=r,o=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];var s=e(n.join("/")),u=[];return u.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&u.push(...s),u.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,a);else o(e,t)}),r}(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)))})(n);for(var o=null,i=0;null==o&&i<n.length;++i)o=function(e,t){for(var{routesMeta:r}=e,a={},n="/",o=[],i=0;i<r.length;++i){var s=r[i],u=i===r.length-1,l="/"===n?t:t.slice(n.length)||"/",c=function(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var[r,a]=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0),f("*"===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(/\*$/,"/*"))+'".');var a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(e,t)=>(a.push(t),"/([^\\/]+)"));return e.endsWith("*")?(a.push("*"),n+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":""!==e&&"/"!==e&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;var o=n[0],i=o.replace(/(.)\/+$/,"$1"),s=n.slice(1);return{params:a.reduce((e,t,r)=>{if("*"===t){var a=s[r]||"";i=o.slice(0,o.length-a.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return f(!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}}(s[r]||"",t),e},{}),pathname:o,pathnameBase:i,pattern:e}}({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);if(!c)return null;Object.assign(a,c.params);var d=s.route;o.push({params:a,pathname:C([n,c.pathname]),pathnameBase:U(C([n,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(n=C([n,c.pathnameBase]))}return o}(n[i],function(e){try{return decodeURI(e)}catch(t){return f(!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}}(a));return o}var w=/^:\w+$/,R=e=>"*"===e;function S(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&"/"!==a?null:e.slice(r)||"/"}function A(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 D(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function x(e,t,r,a){void 0===a&&(a=!1),"string"==typeof e?n=y(e):(h(!(n=u({},e)).pathname||!n.pathname.includes("?"),A("?","pathname","search",n)),h(!n.pathname||!n.pathname.includes("#"),A("#","pathname","hash",n)),h(!n.search||!n.search.includes("#"),A("#","search","hash",n)));var n,o,i=""===e||""===n.pathname,s=i?"/":n.pathname;if(a||null==s)o=r;else{var l=t.length-1;if(s.startsWith("..")){for(var c=s.split("/");".."===c[0];)c.shift(),l-=1;n.pathname=c.join("/")}o=l>=0?t[l]:"/"}var d=function(e,t){void 0===t&&(t="/");var{pathname:r,search:a="",hash:n=""}="string"==typeof e?y(e):e;return{pathname:r?r.startsWith("/")?r:function(e,t){var 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,search:P(a),hash:_(n)}}(n,o),f=s&&"/"!==s&&s.endsWith("/"),p=(i||"."===s)&&r.endsWith("/");return!d.pathname.endsWith("/")&&(f||p)&&(d.pathname+="/"),d}var C=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",_=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class M{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 k(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var F=["post","put","patch","delete"],L=new Set(F),N=["get",...F],B=new Set(N),O=new Set([301,302,303,307,308]),T=new Set([307,308]),j={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},I={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},z={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},H=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,W="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,$=!W,q=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function J(e){if(h(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){var t,r,a,n,l=e.detectErrorBoundary;t=e=>({hasErrorBoundary:l(e)})}else t=q;var c={},d=function e(t,r,a,n){return void 0===a&&(a=[]),void 0===n&&(n={}),t.map((t,o)=>{var i=[...a,o],s="string"==typeof t.id?t.id:i.join("-");if(h(!0!==t.index||!t.children,"Cannot specify children on an index route"),h(!n[s],'Found a route id collision on id "'+s+"\". Route id's must be globally unique within Data Router usages"),!0===t.index){var l=u({},t,r(t),{id:s});return n[s]=l,l}var c=u({},t,r(t),{id:s,children:void 0});return n[s]=c,t.children&&(c.children=e(t.children,r,i,n)),c})}(e.routes,t,void 0,c),p=e.basename||"/",m=u({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),y=null,g=new Set,b=null,w=null,R=null,A=null!=e.hydrationData,D=E(d,e.history.location,p),x=null;if(null==D){var C=eu(404,{pathname:e.history.location.pathname}),{matches:U,route:P}=es(d);D=U,x={[P.id]:C}}var _=!D.some(e=>e.route.lazy)&&(!D.some(e=>e.route.loader)||null!=e.hydrationData),M={historyAction:e.history.action,location:e.history.location,matches:D,initialized:_,navigation:j,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||x,fetchers:new Map,blockers:new Map},k=o.Pop,F=!1,L=!1,N=!1,B=[],O=[],J=new Map,X=0,G=-1,Q=new Map,Z=new Set,ee=new Map,ea=new Map,ec=new Map,em=!1;function eg(e){M=u({},M,e),g.forEach(e=>e(M))}function eb(t,a){var n,i,s,l=null!=M.actionData&&null!=M.navigation.formMethod&&ep(M.navigation.formMethod)&&"loading"===M.navigation.state&&(null==(n=t.state)?void 0:n._isRedirect)!==!0;s=a.actionData?Object.keys(a.actionData).length>0?a.actionData:null:l?M.actionData:null;var c=a.loaderData?eo(M.loaderData,a.loaderData,a.matches||[],a.errors):M.loaderData;for(var[h]of ec)eH(h);var f=!0===F||null!=M.navigation.formMethod&&ep(M.navigation.formMethod)&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;r&&(d=r,r=void 0),eg(u({},a,{actionData:s,loaderData:c,historyAction:k,location:t,initialized:!0,navigation:j,revalidation:"idle",restoreScrollPosition:eJ(t,a.matches||M.matches),preventScrollReset:f,blockers:new Map(M.blockers)})),L||k===o.Pop||(k===o.Push?e.history.push(t,t.state):k===o.Replace&&e.history.replace(t,t.state)),k=o.Pop,F=!1,L=!1,N=!1,B=[],O=[]}function eR(e,t){return eS.apply(this,arguments)}function eS(){return(eS=(0,s._)(function*(t,r){if("number"==typeof t){e.history.go(t);return}var a=Y(M.location,M.matches,p,m.v7_prependBasename,t,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:n,submission:i,error:s}=V(m.v7_normalizeFormMethod,!1,a,r),l=M.location,c=v(M.location,n,r&&r.state);c=u({},c,e.history.encodeLocation(c));var d=r&&null!=r.replace?r.replace:void 0,h=o.Push;!0===d?h=o.Replace:!1===d||null!=i&&ep(i.formMethod)&&i.formAction===M.location.pathname+M.location.search&&(h=o.Replace);var f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,y=e$({currentLocation:l,nextLocation:c,historyAction:h});if(y){eW(y,{state:"blocked",location:c,proceed(){eW(y,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),eR(t,r)},reset(){eH(y),eg({blockers:new Map(M.blockers)})}});return}return yield eA(h,c,{submission:i,pendingError:s,preventScrollReset:f,replace:r&&r.replace})})).apply(this,arguments)}function eA(e,t,r){return eD.apply(this,arguments)}function eD(){return(eD=(0,s._)(function*(t,a,o){n&&n.abort(),n=null,k=t,L=!0===(o&&o.startUninterruptedRevalidation),function(e,t){b&&w&&R&&(b[w(e,t.map(e=>eE(e,M.loaderData)))||e.key]=R())}(M.location,M.matches),F=!0===(o&&o.preventScrollReset);var i,s,l=r||d,c=o&&o.overrideNavigation,h=E(l,a,p);if(!h){var f=eu(404,{pathname:a.pathname}),{matches:v,route:m}=es(l);eq(),eb(a,{matches:v,loaderData:{},errors:{[m.id]:f}});return}if(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}(M.location,a)&&!(o&&o.submission&&ep(o.submission.formMethod))){eb(a,{matches:h});return}n=new AbortController;var y=er(e.history,a,n.signal,o&&o.submission);if(o&&o.pendingError)s={[ei(h).route.id]:o.pendingError};else if(o&&o.submission&&ep(o.submission.formMethod)){var g=yield function(e,t,r,a,n){return ex.apply(this,arguments)}(y,a,o.submission,h,{replace:o.replace});if(g.shortCircuited)return;i=g.pendingActionData,s=g.pendingActionError,c=u({state:"loading",location:a},o.submission),y=new Request(y.url,{signal:y.signal})}var{shortCircuited:S,loaderData:A,errors:D}=yield function(e,t,r,a,n,o,i,s,u){return eC.apply(this,arguments)}(y,a,h,c,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,i,s);!S&&(n=null,eb(a,u({matches:h},i?{actionData:i}:{},{loaderData:A,errors:D})))})).apply(this,arguments)}function ex(){return(ex=(0,s._)(function*(e,r,a,n,s){eN(),eg({navigation:u({state:"submitting",location:r},a)});var l,d,h=ew(n,r);if(h.route.action||h.route.lazy){if(l=yield function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}("action",e,h,n,c,t,p),e.signal.aborted)return{shortCircuited:!0}}else l={type:i.error,error:eu(405,{method:e.method,pathname:r.pathname,routeId:h.route.id})};if(ef(l))return d=s&&null!=s.replace?s.replace:l.location===M.location.pathname+M.location.search,yield eM(M,l,{submission:a,replace:d}),{shortCircuited:!0};if(eh(l)){var f=ei(n,h.route.id);return!0!==(s&&s.replace)&&(k=o.Push),{pendingActionData:{},pendingActionError:{[f.route.id]:l.error}}}if(ed(l))throw eu(400,{type:"defer-action"});return{pendingActionData:{[h.route.id]:l.data}}})).apply(this,arguments)}function eC(){return(eC=(0,s._)(function*(t,a,o,i,s,l,c,h,f){var v=i;!v&&(v=u({state:"loading",location:a,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},s));var m=s||l?s||l:v.formMethod&&v.formAction&&v.formData&&v.formEncType?{formMethod:v.formMethod,formAction:v.formAction,formData:v.formData,formEncType:v.formEncType}:void 0,y=r||d,[g,b]=K(e.history,M,o,m,a,N,B,O,ee,y,p,h,f);if(eq(e=>!(o&&o.some(t=>t.route.id===e))||g&&g.some(t=>t.route.id===e)),0===g.length&&0===b.length)return eb(a,u({matches:o,loaderData:{},errors:f||null},h?{actionData:h}:{},eI()?{fetchers:new Map(M.fetchers)}:{})),{shortCircuited:!0};if(!L){b.forEach(e=>{var t=M.fetchers.get(e.key),r={state:"loading",data:t&&t.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(e.key,r)});var E=h||M.actionData;eg(u({navigation:v},E?0===Object.keys(E).length?{actionData:null}:{actionData:E}:{},b.length>0?{fetchers:new Map(M.fetchers)}:{}))}G=++X,b.forEach(e=>{e.controller&&J.set(e.key,e.controller)});var w=()=>b.forEach(e=>eT(e.key));n&&n.signal.addEventListener("abort",w);var{results:R,loaderResults:S,fetcherResults:A}=yield eF(M.matches,o,g,b,t);if(t.signal.aborted)return{shortCircuited:!0};n&&n.signal.removeEventListener("abort",w),b.forEach(e=>J.delete(e.key));var D=el(R);if(D)return yield eM(M,D,{replace:c}),{shortCircuited:!0};var{loaderData:x,errors:C}=en(M,o,g,S,f,b,A,ea);ea.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&ea.delete(t)})});var U=eI(),P=ez(G);return u({loaderData:x,errors:C},U||P||b.length>0?{fetchers:new Map(M.fetchers)}:{})})).apply(this,arguments)}function eU(e){return M.fetchers.get(e)||I}function eP(){return(eP=(0,s._)(function*(a,o,i,s,l,f){if(eN(),ee.delete(a),!s.route.action&&!s.route.lazy){var v=eu(405,{method:f.formMethod,pathname:i,routeId:o});eB(a,o,v);return}var m=M.fetchers.get(a),y=u({state:"submitting"},f,{data:m&&m.data," _hasFetcherDoneAnything ":!0});M.fetchers.set(a,y),eg({fetchers:new Map(M.fetchers)});var g=new AbortController,b=er(e.history,i,g.signal,f);J.set(a,g);var w=yield function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}("action",b,s,l,c,t,p);if(b.signal.aborted){J.get(a)===g&&J.delete(a);return}if(ef(w)){J.delete(a),Z.add(a);var R=u({state:"loading"},f,{data:void 0," _hasFetcherDoneAnything ":!0});return M.fetchers.set(a,R),eg({fetchers:new Map(M.fetchers)}),eM(M,w,{submission:f,isFetchActionRedirect:!0})}if(eh(w)){eB(a,o,w.error);return}if(ed(w))throw eu(400,{type:"defer-action"});var S=M.navigation.location||M.location,A=er(e.history,S,g.signal),D=r||d,x="idle"!==M.navigation.state?E(D,M.navigation.location,p):M.matches;h(x,"Didn't find any matches after fetcher action");var C=++X;Q.set(a,C);var U=u({state:"loading",data:w.data},f,{" _hasFetcherDoneAnything ":!0});M.fetchers.set(a,U);var[P,_]=K(e.history,M,x,f,S,N,B,O,ee,D,p,{[s.route.id]:w.data},void 0);_.filter(e=>e.key!==a).forEach(e=>{var t=e.key,r=M.fetchers.get(t),a={state:"loading",data:r&&r.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(t,a),e.controller&&J.set(t,e.controller)}),eg({fetchers:new Map(M.fetchers)});var F=()=>_.forEach(e=>eT(e.key));g.signal.addEventListener("abort",F);var{results:L,loaderResults:T,fetcherResults:j}=yield eF(M.matches,x,P,_,A);if(!g.signal.aborted){g.signal.removeEventListener("abort",F),Q.delete(a),J.delete(a),_.forEach(e=>J.delete(e.key));var I=el(L);if(I)return eM(M,I);var{loaderData:z,errors:H}=en(M,M.matches,P,T,void 0,_,j,ea),W={state:"idle",data:w.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(a,W);var $=ez(C);"loading"===M.navigation.state&&C>G?(h(k,"Expected pending action"),n&&n.abort(),eb(M.navigation.location,{matches:x,loaderData:z,errors:H,fetchers:new Map(M.fetchers)})):(eg(u({errors:H,loaderData:eo(M.loaderData,z,x,H)},$?{fetchers:new Map(M.fetchers)}:{})),N=!1)}})).apply(this,arguments)}function e_(){return(e_=(0,s._)(function*(r,a,n,o,i,s){var l=M.fetchers.get(r),d=u({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},s,{data:l&&l.data," _hasFetcherDoneAnything ":!0});M.fetchers.set(r,d),eg({fetchers:new Map(M.fetchers)});var f=new AbortController,v=er(e.history,n,f.signal);J.set(r,f);var m=yield function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}("loader",v,o,i,c,t,p);if(ed(m)&&(m=(yield ey(m,v.signal,!0))||m),J.get(r)===f&&J.delete(r),!v.signal.aborted){if(ef(m)){Z.add(r),yield eM(M,m);return}if(eh(m)){var y=ei(M.matches,a);M.fetchers.delete(r),eg({fetchers:new Map(M.fetchers),errors:{[y.route.id]:m.error}});return}h(!ed(m),"Unhandled fetcher deferred data");var g={state:"idle",data:m.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(r,g),eg({fetchers:new Map(M.fetchers)})}})).apply(this,arguments)}function eM(e,t,r){return ek.apply(this,arguments)}function ek(){return(ek=(0,s._)(function*(t,r,a){var i,{submission:s,replace:l,isFetchActionRedirect:c}=void 0===a?{}:a;r.revalidate&&(N=!0);var d=v(t.location,r.location,u({_isRedirect:!0},c?{_isFetchActionRedirect:!0}:{}));if(h(d,"Expected a location on the redirect navigation"),H.test(r.location)&&W&&void 0!==(null==(i=window)?void 0:i.location)){var f=e.history.createURL(r.location),m=null==S(f.pathname,p);if(window.location.origin!==f.origin||m){l?window.location.replace(r.location):window.location.assign(r.location);return}}n=null;var y=!0===l?o.Replace:o.Push,{formMethod:g,formAction:b,formEncType:E,formData:w}=t.navigation;!s&&g&&b&&w&&E&&(s={formMethod:g,formAction:b,formEncType:E,formData:w}),T.has(r.status)&&s&&ep(s.formMethod)?yield eA(y,d,{submission:u({},s,{formAction:r.location}),preventScrollReset:F}):c?yield eA(y,d,{overrideNavigation:{state:"loading",location:d,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},fetcherSubmission:s,preventScrollReset:F}):yield eA(y,d,{overrideNavigation:{state:"loading",location:d,formMethod:s?s.formMethod:void 0,formAction:s?s.formAction:void 0,formEncType:s?s.formEncType:void 0,formData:s?s.formData:void 0},preventScrollReset:F})})).apply(this,arguments)}function eF(e,t,r,a,n){return eL.apply(this,arguments)}function eL(){return(eL=(0,s._)(function*(r,a,n,o,s){var u=yield Promise.all([...n.map(e=>(function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)})("loader",s,e,a,c,t,p)),...o.map(r=>r.matches&&r.match&&r.controller?function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}("loader",er(e.history,r.path,r.controller.signal),r.match,r.matches,c,t,p):{type:i.error,error:eu(404,{pathname:r.path})})]),l=u.slice(0,n.length),d=u.slice(n.length);return yield Promise.all([ev(r,n,l,l.map(()=>s.signal),!1,M.loaderData),ev(r,o.map(e=>e.match),d,o.map(e=>e.controller?e.controller.signal:null),!0)]),{results:u,loaderResults:l,fetcherResults:d}})).apply(this,arguments)}function eN(){N=!0,B.push(...eq()),ee.forEach((e,t)=>{J.has(t)&&(O.push(t),eT(t))})}function eB(e,t,r){var a=ei(M.matches,t);eO(e),eg({errors:{[a.route.id]:r},fetchers:new Map(M.fetchers)})}function eO(e){J.has(e)&&eT(e),ee.delete(e),Q.delete(e),Z.delete(e),M.fetchers.delete(e)}function eT(e){var t=J.get(e);h(t,"Expected fetch controller: "+e),t.abort(),J.delete(e)}function ej(e){for(var t of e){var r={state:"idle",data:eU(t).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(t,r)}}function eI(){var e=[],t=!1;for(var r of Z){var a=M.fetchers.get(r);h(a,"Expected fetcher: "+r),"loading"===a.state&&(Z.delete(r),e.push(r),t=!0)}return ej(e),t}function ez(e){var t=[];for(var[r,a]of Q)if(a<e){var n=M.fetchers.get(r);h(n,"Expected fetcher: "+r),"loading"===n.state&&(eT(r),Q.delete(r),t.push(r))}return ej(t),t.length>0}function eH(e){M.blockers.delete(e),ec.delete(e)}function eW(e,t){var r=M.blockers.get(e)||z;h("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),M.blockers.set(e,t),eg({blockers:new Map(M.blockers)})}function e$(e){var{currentLocation:t,nextLocation:r,historyAction:a}=e;if(0!==ec.size){ec.size>1&&f(!1,"A router only supports one blocker at a time");var n=Array.from(ec.entries()),[o,i]=n[n.length-1],s=M.blockers.get(o);if((!s||"proceeding"!==s.state)&&i({currentLocation:t,nextLocation:r,historyAction:a}))return o}}function eq(e){var t=[];return ea.forEach((r,a)=>{(!e||e(a))&&(r.cancel(),t.push(a),ea.delete(a))}),t}function eJ(e,t){if(b&&w&&R){var r=b[w(e,t.map(e=>eE(e,M.loaderData)))||e.key];if("number"==typeof r)return r}return null}return a={get basename(){return p},get state(){return M},get routes(){return d},initialize:function(){return y=e.history.listen(t=>{var{action:r,location:n,delta:o}=t;if(em){em=!1;return}f(0===ec.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.");var i=e$({currentLocation:M.location,nextLocation:n,historyAction:r});if(i&&null!=o){em=!0,e.history.go(-1*o),eW(i,{state:"blocked",location:n,proceed(){eW(i,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(o)},reset(){eH(i),eg({blockers:new Map(a.state.blockers)})}});return}return eA(r,n)}),!M.initialized&&eA(o.Pop,M.location),a},subscribe:function(e){return g.add(e),()=>g.delete(e)},enableScrollRestoration:function(e,t,r){if(b=e,R=t,w=r||(e=>e.key),!A&&M.navigation===j){A=!0;var a=eJ(M.location,M.matches);null!=a&&eg({restoreScrollPosition:a})}return()=>{b=null,R=null,w=null}},navigate:eR,fetch:function(e,t,a,n){if($)throw 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.");J.has(e)&&eT(e);var o=r||d,i=Y(M.location,M.matches,p,m.v7_prependBasename,a,t,null==n?void 0:n.relative),s=E(o,i,p);if(!s){eB(e,t,eu(404,{pathname:i}));return}var{path:u,submission:l}=V(m.v7_normalizeFormMethod,!0,i,n),c=ew(s,u);if(F=!0===(n&&n.preventScrollReset),l&&ep(l.formMethod)){(function(e,t,r,a,n,o){eP.apply(this,arguments)})(e,t,u,c,s,l);return}ee.set(e,{routeId:t,path:u}),function(e,t,r,a,n,o){e_.apply(this,arguments)}(e,t,u,c,s,l)},revalidate:function(){if(eN(),eg({revalidation:"loading"}),"submitting"!==M.navigation.state){if("idle"===M.navigation.state){eA(M.historyAction,M.location,{startUninterruptedRevalidation:!0});return}eA(k||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eU,deleteFetcher:eO,dispose:function(){y&&y(),g.clear(),n&&n.abort(),M.fetchers.forEach((e,t)=>eO(t)),M.blockers.forEach((e,t)=>eH(t))},getBlocker:function(e,t){var r=M.blockers.get(e)||z;return ec.get(e)!==t&&ec.set(e,t),r},deleteBlocker:eH,_internalFetchControllers:J,_internalActiveDeferreds:ea,_internalSetRoutes:function(e){r=e}}}Symbol("deferred");function Y(e,t,r,a,n,o,i){if(null!=o&&"path"!==i){for(var s of(u=[],t))if(u.push(s),s.route.id===o){l=s;break}}else u=t,l=t[t.length-1];var u,l,c=x(n||".",D(u).map(e=>e.pathnameBase),S(e.pathname,r)||e.pathname,"path"===i);return null==n&&(c.search=e.search,c.hash=e.hash),(null==n||""===n||"."===n)&&l&&l.route.index&&!eb(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a&&"/"!==r&&(c.pathname="/"===c.pathname?r:C([r,c.pathname])),m(c)}function V(e,t,r,a){if(!a||!(null!=(n=a)&&"formData"in n))return{path:r};if(a.formMethod&&!function(e){return B.has(e.toLowerCase())}(a.formMethod))return{path:r,error:eu(405,{method:a.formMethod})};if(a.formData){var n,o,i=a.formMethod||"get";if(ep((o={formMethod:e?i.toUpperCase():i.toLowerCase(),formAction:ec(r),formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:a.formData}).formMethod))return{path:r,submission:o}}var s=y(r),u=ea(a.formData);return t&&s.search&&eb(s.search)&&u.append("index",""),s.search="?"+u,{path:m(s),submission:o}}function K(e,t,r,a,n,o,i,s,l,c,d,h,f){var p=f?Object.values(f)[0]:h?Object.values(h)[0]:void 0,v=e.createURL(t.location),m=e.createURL(n),y=(function(e,t){var r=e;if(t){var a=e.findIndex(e=>e.route.id===t);a>=0&&(r=e.slice(0,a))}return r})(r,f?Object.keys(f)[0]:void 0).filter((e,r)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,r){var a=!t||r.route.id!==t.route.id,n=void 0===e[r.route.id];return a||n}(t.loaderData,t.matches[r],e)||i.some(t=>t===e.route.id))return!0;var n=t.matches[r];return G(e,u({currentUrl:v,currentParams:n.params,nextUrl:m,nextParams:e.params},a,{actionResult:p,defaultShouldRevalidate:o||v.pathname+v.search===m.pathname+m.search||v.search!==m.search||X(n,e)}))}),g=[];return l.forEach((e,n)=>{if(r.some(t=>t.route.id===e.routeId)){var i=E(c,e.path,d);if(!i){g.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}var l=ew(i,e.path);if(s.includes(n)){g.push({key:n,routeId:e.routeId,path:e.path,matches:i,match:l,controller:new AbortController});return}G(l,u({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:r[r.length-1].params},a,{actionResult:p,defaultShouldRevalidate:o}))&&g.push({key:n,routeId:e.routeId,path:e.path,matches:i,match:l,controller:new AbortController})}}),[y,g]}function X(e,t){var r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function G(e,t){if(e.route.shouldRevalidate){var r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function Q(e,t,r){return Z.apply(this,arguments)}function Z(){return(Z=(0,s._)(function*(e,t,r){if(!!e.lazy){var a=yield e.lazy();if(e.lazy){var n=r[e.id];h(n,"No route found in manifest");var o={};for(var i in a){var s=void 0!==n[i]&&"hasErrorBoundary"!==i;f(!s,'Route "'+n.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i)+'" will be ignored.'),!s&&!b.has(i)&&(o[i]=a[i])}Object.assign(n,o),Object.assign(n,u({},t(n),{lazy:void 0}))}}})).apply(this,arguments)}function ee(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}function et(){return(et=(0,s._)(function*(e,t,r,a,n,o,s,u,l,c){void 0===u&&(u=!1),void 0===l&&(l=!1);var d,f,p=e=>{var a,n=new Promise((e,t)=>a=t);return R=()=>a(),t.signal.addEventListener("abort",R),Promise.race([e({request:t,params:r.params,context:c}),n])};try{var v=r.route[e];if(r.route.lazy){if(v)w=(yield Promise.all([p(v),Q(r.route,o,n)]))[0];else if(yield Q(r.route,o,n),v=r.route[e])w=yield p(v);else{if("action"!==e)return{type:i.data,data:void 0};var m=new URL(t.url),y=m.pathname+m.search;throw eu(405,{method:t.method,pathname:y,routeId:r.route.id})}}else if(v)w=yield p(v);else{var g=new URL(t.url),b=g.pathname+g.search;throw eu(404,{pathname:b})}h(void 0!==w,"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){E=i.error,w=e}finally{R&&t.signal.removeEventListener("abort",R)}if(function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}(w)){var E,w,R,A,D=w.status;if(O.has(D)){var x=w.headers.get("Location");if(h(x,"Redirects returned/thrown from loaders/actions must have a Location header"),H.test(x)){if(!u){var C=new URL(t.url),U=new URL(x.startsWith("//")?C.protocol+x:x),P=null!=S(U.pathname,s);U.origin===C.origin&&P&&(x=U.pathname+U.search+U.hash)}}else x=Y(new URL(t.url),a.slice(0,a.indexOf(r)+1),s,!0,x);if(u)throw w.headers.set("Location",x),w;return{type:i.redirect,status:D,location:x,revalidate:null!==w.headers.get("X-Remix-Revalidate")}}if(l)throw{type:E||i.data,response:w};var _=w.headers.get("Content-Type");return(A=_&&/\bapplication\/json\b/.test(_)?yield w.json():yield w.text(),E===i.error)?{type:E,error:new M(D,w.statusText,A),headers:w.headers}:{type:i.data,data:A,statusCode:w.status,headers:w.headers}}return E===i.error?{type:E,error:w}:function(e){return e&&"object"==typeof e&&"object"==typeof e.data&&"function"==typeof e.subscribe&&"function"==typeof e.cancel&&"function"==typeof e.resolveData}(w)?{type:i.deferred,deferredData:w,statusCode:null==(d=w.init)?void 0:d.status,headers:(null==(f=w.init)?void 0:f.headers)&&new Headers(w.init.headers)}:{type:i.data,data:w}})).apply(this,arguments)}function er(e,t,r,a){var n=e.createURL(ec(t)).toString(),o={signal:r};if(a&&ep(a.formMethod)){var{formMethod:i,formEncType:s,formData:u}=a;o.method=i.toUpperCase(),o.body="application/x-www-form-urlencoded"===s?ea(u):u}return new Request(n,o)}function ea(e){var t=new URLSearchParams;for(var[r,a]of e.entries())t.append(r,a instanceof File?a.name:a);return t}function en(e,t,r,a,n,o,i,s){for(var l,c,d,f,p,v,m,y,g,b,{loaderData:E,errors:w}=(l=t,c=r,d=a,f=n,p=s,m={},y=null,g=!1,b={},d.forEach((e,t)=>{var r=c[t].route.id;if(h(!ef(e),"Cannot handle redirect results in processLoaderData"),eh(e)){var a=ei(l,r),n=e.error;f&&(n=Object.values(f)[0],f=void 0),null==(y=y||{})[a.route.id]&&(y[a.route.id]=n),m[r]=void 0,!g&&(g=!0,v=k(e.error)?e.error.status:500),e.headers&&(b[r]=e.headers)}else ed(e)?(p.set(r,e.deferredData),m[r]=e.deferredData.data):m[r]=e.data,null!=e.statusCode&&200!==e.statusCode&&!g&&(v=e.statusCode),e.headers&&(b[r]=e.headers)}),f&&(y=f,m[Object.keys(f)[0]]=void 0),{loaderData:m,errors:y,statusCode:v||200,loaderHeaders:b}),R=0;R<o.length;R++){var{key:S,match:A,controller:D}=o[R];h(void 0!==i&&void 0!==i[R],"Did not find corresponding fetcher result");var x=i[R];if(!D||!D.signal.aborted)if(eh(x)){var C=ei(e.matches,null==A?void 0:A.route.id);!(w&&w[C.route.id])&&(w=u({},w,{[C.route.id]:x.error})),e.fetchers.delete(S)}else if(ef(x))h(!1,"Unhandled fetcher revalidation redirect");else if(ed(x))h(!1,"Unhandled fetcher deferred data");else{var U={state:"idle",data:x.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};e.fetchers.set(S,U)}}return{loaderData:E,errors:w}}function eo(e,t,r,a){var n=u({},t);for(var o of r){var i=o.route.id;if(t.hasOwnProperty(i)?void 0!==t[i]&&(n[i]=t[i]):void 0!==e[i]&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function ei(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 es(e){var t=e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eu(e,t){var{pathname:r,routeId:a,method:n,type:o}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&r&&a?s="You made a "+n+' request to "'+r+'" but '+('did not provide a `loader` for route "'+a)+'", so there is no way to handle the request.':"defer-action"===o&&(s="defer() is not supported in actions")):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",n&&r&&a?s="You made a "+n.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+a)+'", so there is no way to handle the request.':n&&(s='Invalid request method "'+n.toUpperCase()+'"')),new M(e||500,i,Error(s),!0)}function el(e){for(var t=e.length-1;t>=0;t--){var r=e[t];if(ef(r))return r}}function ec(e){return m(u({},"string"==typeof e?y(e):e,{hash:""}))}function ed(e){return e.type===i.deferred}function eh(e){return e.type===i.error}function ef(e){return(e&&e.type)===i.redirect}function ep(e){return L.has(e.toLowerCase())}function ev(e,t,r,a,n,o){return em.apply(this,arguments)}function em(){return(em=(0,s._)(function*(e,t,r,a,n,o){for(var i=function*(i){var s=r[i],u=t[i];if(!u)return"continue";var l=e.find(e=>e.route.id===u.route.id),c=null!=l&&!X(l,u)&&(o&&o[u.route.id])!==void 0;if(ed(s)&&(n||c)){var d=a[i];h(d,"Expected an AbortSignal for revalidating fetcher deferred result"),yield ey(s,d,n).then(e=>{e&&(r[i]=e||r[i])})}},s=0;s<r.length;s++)yield*i(s)})).apply(this,arguments)}function ey(e,t,r){return eg.apply(this,arguments)}function eg(){return(eg=(0,s._)(function*(e,t,r){if(void 0===r&&(r=!1),!(yield e.deferredData.resolveData(t))){if(r)try{return{type:i.data,data:e.deferredData.unwrappedData}}catch(e){return{type:i.error,error:e}}return{type:i.data,data:e.deferredData.data}}})).apply(this,arguments)}function eb(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eE(e,t){var{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],handle:r.handle}}function ew(e,t){var r="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&eb(r||""))return e[e.length-1];var a=D(e);return a[a.length-1]}},42130:function(e,t,r){"use strict";r.r(t),r.d(t,{Outlet:function(){return u.Outlet},Route:function(){return u.Route},RouterProvider:function(){return u.RouterProvider},createRoutesFromElements:function(){return u.createRoutesFromElements},useLocation:function(){return u.useLocation},useMatches:function(){return u.useMatches}}),r.d(t,{createBrowserRouter:function(){return m},createHashRouter:function(){return y}});var a,n,o,i,s=r("6171"),u=(r("50387"),r("50387")),l=r("21921");function c(){return(c=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}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var h="application/x-www-form-urlencoded";function f(e){return null!=e&&"string"==typeof e.tagName}var p=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],v=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];function m(e,t){return(0,l.createRouter)({basename:null==t?void 0:t.basename,future:c({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.createBrowserHistory)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||g(),routes:e,mapRouteProperties:u.UNSAFE_mapRouteProperties}).initialize()}function y(e,t){return(0,l.createRouter)({basename:null==t?void 0:t.basename,future:c({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.createHashHistory)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||g(),routes:e,mapRouteProperties:u.UNSAFE_mapRouteProperties}).initialize()}function g(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=c({},t,{errors:function(e){if(!e)return null;var t=Object.entries(e),r={};for(var[a,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[a]=new l.ErrorResponse(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){var o=Error(n.message);o.stack="",r[a]=o}else r[a]=n;return r}(t.errors)})),t}var b="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,E=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;var w=s.forwardRef((e,t)=>{var{reloadDocument:r,replace:a,method:n="get",action:i,onSubmit:p,fetcherKey:m,routeId:y,relative:g,preventScrollReset:b}=e,E=d(e,v),w=function(e,t){var r,a,{router:n}=(r=o.UseSubmitImpl,a=s.useContext(u.UNSAFE_DataRouterContext),a||(0,l.UNSAFE_invariant)(!1),a),{basename:i}=s.useContext(u.UNSAFE_NavigationContext),d=(0,u.UNSAFE_useRouteId)();return s.useCallback(function(r,a){if(void 0===a&&(a={}),"undefined"==typeof document)throw Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");var{action:o,method:s,encType:u,formData:p}=function(e,t,r){var a,n,o,i=null;if(f(c=e)&&"form"===c.tagName.toLowerCase()){var s=t.submissionTrigger;if(t.action)i=t.action;else{var u=e.getAttribute("action");i=u?(0,l.stripBasename)(u,r):null}a=t.method||e.getAttribute("method")||"get",n=t.encType||e.getAttribute("enctype")||h,o=new FormData(e),s&&s.name&&o.append(s.name,s.value)}else{if(f(d=e)&&"button"===d.tagName.toLowerCase()||f(p=e)&&"input"===p.tagName.toLowerCase()&&("submit"===e.type||"image"===e.type)){var c,d,p,v=e.form;if(null==v)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');if(t.action)i=t.action;else{var m=e.getAttribute("formaction")||v.getAttribute("action");i=m?(0,l.stripBasename)(m,r):null}a=t.method||e.getAttribute("formmethod")||v.getAttribute("method")||"get",n=t.encType||e.getAttribute("formenctype")||v.getAttribute("enctype")||h,o=new FormData(v),e.name&&o.append(e.name,e.value)}else if(f(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else if(a=t.method||"get",i=t.action||null,n=t.encType||h,e instanceof FormData)o=e;else if(o=new FormData,e instanceof URLSearchParams)for(var[y,g]of e)o.append(y,g);else if(null!=e)for(var b of Object.keys(e))o.append(b,e[b])}return{action:i,method:a.toLowerCase(),encType:n,formData:o}}(r,a,i),v={preventScrollReset:a.preventScrollReset,formData:p,formMethod:s,formEncType:u};e?(null!=t||(0,l.UNSAFE_invariant)(!1),n.fetch(e,t,o,v)):n.navigate(o,c({},v,{replace:a.replace,fromRouteId:d}))},[n,i,e,t,d])}(m,y),R="get"===n.toLowerCase()?"get":"post",S=function(e,t){var{relative:r}=void 0===t?{}:t,{basename:a}=s.useContext(u.UNSAFE_NavigationContext),n=s.useContext(u.UNSAFE_RouteContext);n||(0,l.UNSAFE_invariant)(!1);var[o]=n.matches.slice(-1),i=c({},(0,u.useResolvedPath)(e||".",{relative:r})),d=(0,u.useLocation)();if(null==e&&(i.search=d.search,i.hash=d.hash,o.route.index)){var h=new URLSearchParams(i.search);h.delete("index"),i.search=h.toString()?"?"+h.toString():""}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==a&&(i.pathname="/"===i.pathname?a:(0,l.joinPaths)([a,i.pathname])),(0,u.createPath)(i)}(i,{relative:g});return s.createElement("form",c({ref:t,method:R,action:S,onSubmit:r?p:e=>{if(p&&p(e),!e.defaultPrevented){e.preventDefault();var t=e.nativeEvent.submitter,r=(null==t?void 0:t.getAttribute("formmethod"))||n;w(t||e.currentTarget,{method:r,replace:a,relative:g,preventScrollReset:b})}}},E))});(a=o||(o={})).UseScrollRestoration="useScrollRestoration",a.UseSubmitImpl="useSubmitImpl",a.UseFetcher="useFetcher",(n=i||(i={})).UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"},50387:function(e,t,r){"use strict";r.r(t),r.d(t,{createPath:function(){return c.createPath}}),r.d(t,{Outlet:function(){return L},Route:function(){return N},RouterProvider:function(){return k},UNSAFE_DataRouterContext:function(){return h},UNSAFE_DataRouterStateContext:function(){return f},UNSAFE_NavigationContext:function(){return p},UNSAFE_RouteContext:function(){return m},UNSAFE_mapRouteProperties:function(){return O},UNSAFE_useRouteId:function(){return _},createRoutesFromElements:function(){return function e(t,r){void 0===r&&(r=[]);var a=[];return l.Children.forEach(t,(t,n)=>{if(l.isValidElement(t)){var o=[...r,n];if(t.type===l.Fragment){a.push.apply(a,e(t.props.children,o));return}t.type!==N&&(0,c.UNSAFE_invariant)(!1),!t.props.index||!t.props.children||(0,c.UNSAFE_invariant)(!1);var i={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=e(t.props.children,o)),a.push(i)}}),a}},useHref:function(){return g},useLocation:function(){return E},useMatches:function(){return M},useNavigate:function(){return R},useResolvedPath:function(){return A}});var a,n,o,i,s,u,l=r("6171"),c=(r("21921"),r("21921"));function d(){return(d=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}).apply(this,arguments)}var h=l.createContext(null),f=l.createContext(null),p=l.createContext(null),v=l.createContext(null),m=l.createContext({outlet:null,matches:[],isDataRoute:!1}),y=l.createContext(null);function g(e,t){var{relative:r}=void 0===t?{}:t;b()||(0,c.UNSAFE_invariant)(!1);var{basename:a,navigator:n}=l.useContext(p),{hash:o,pathname:i,search:s}=A(e,{relative:r}),u=i;return"/"!==a&&(u="/"===i?a:(0,c.joinPaths)([a,i])),n.createHref({pathname:u,search:s,hash:o})}function b(){return null!=l.useContext(v)}function E(){return b()||(0,c.UNSAFE_invariant)(!1),l.useContext(v).location}function w(e){!l.useContext(p).static&&l.useLayoutEffect(e)}function R(){var{isDataRoute:e}=l.useContext(m);return e?function(){var e,t,{router:r}=(e=i.UseNavigateStable,t=l.useContext(h),t||(0,c.UNSAFE_invariant)(!1),t),a=P(s.UseNavigateStable),n=l.useRef(!1);return w(()=>{n.current=!0}),l.useCallback(function(e,t){void 0===t&&(t={}),n.current&&("number"==typeof e?r.navigate(e):r.navigate(e,d({fromRouteId:a},t)))},[r,a])}():function(){b()||(0,c.UNSAFE_invariant)(!1);var{basename:e,navigator:t}=l.useContext(p),{matches:r}=l.useContext(m),{pathname:a}=E(),n=JSON.stringify((0,c.UNSAFE_getPathContributingMatches)(r).map(e=>e.pathnameBase)),o=l.useRef(!1);return w(()=>{o.current=!0}),l.useCallback(function(r,i){if(void 0===i&&(i={}),o.current){if("number"==typeof r){t.go(r);return}var s=(0,c.resolveTo)(r,JSON.parse(n),a,"path"===i.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:(0,c.joinPaths)([e,s.pathname])),(i.replace?t.replace:t.push)(s,i.state,i)}},[e,t,n,a])}()}var S=l.createContext(null);function A(e,t){var{relative:r}=void 0===t?{}:t,{matches:a}=l.useContext(m),{pathname:n}=E(),o=JSON.stringify((0,c.UNSAFE_getPathContributingMatches)(a).map(e=>e.pathnameBase));return l.useMemo(()=>(0,c.resolveTo)(e,JSON.parse(o),n,"path"===r),[e,o,n,r])}var D=l.createElement(function(){var e=function(){var e,t=l.useContext(y),r=U(s.UseRouteError),a=P(s.UseRouteError);return t?t:null==(e=r.errors)?void 0:e[a]}(),t=(0,c.isRouteErrorResponse)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),r?l.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)},null);class x extends l.Component{static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?l.createElement(m.Provider,{value:this.props.routeContext},l.createElement(y.Provider,{value:this.state.error,children:this.props.component})):this.props.children}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}}function C(e){var{routeContext:t,match:r,children:a}=e,n=l.useContext(h);return n&&n.static&&n.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=r.route.id),l.createElement(m.Provider,{value:t},a)}(a=i||(i={})).UseBlocker="useBlocker",a.UseRevalidator="useRevalidator",a.UseNavigateStable="useNavigate",(n=s||(s={})).UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId";function U(e){var t=l.useContext(f);return t||(0,c.UNSAFE_invariant)(!1),t}function P(e){var t,r,a=(t=0,r=l.useContext(m),r||(0,c.UNSAFE_invariant)(!1),r),n=a.matches[a.matches.length-1];return n.route.id||(0,c.UNSAFE_invariant)(!1),n.route.id}function _(){return P(s.UseRouteId)}function M(){var{matches:e,loaderData:t}=U(s.UseMatches);return l.useMemo(()=>e.map(e=>{var{pathname:r,params:a}=e;return{id:e.route.id,pathname:r,params:a,data:t[e.route.id],handle:e.route.handle}}),[e,t])}function k(e){var{fallbackElement:t,router:r}=e,[a,n]=l.useState(r.state);l.useLayoutEffect(()=>r.subscribe(n),[r,n]);var o=l.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,a)=>r.navigate(e,{state:t,preventScrollReset:null==a?void 0:a.preventScrollReset}),replace:(e,t,a)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==a?void 0:a.preventScrollReset})}),[r]),i=r.basename||"/",s=l.useMemo(()=>({router:r,navigator:o,static:!1,basename:i}),[r,o,i]);return l.createElement(l.Fragment,null,l.createElement(h.Provider,{value:s},l.createElement(f.Provider,{value:a},l.createElement(B,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:o},r.state.initialized?l.createElement(F,{routes:r.routes,state:a}):t))),null)}function F(e){var{routes:t,state:r}=e;return function(e,t,r){b()||(0,c.UNSAFE_invariant)(!1);var{navigator:a}=l.useContext(p),{matches:n}=l.useContext(m),o=n[n.length-1],i=o?o.params:{};o&&o.pathname;var s=o?o.pathnameBase:"/";o&&o.route;var u=E();if(t){var h,f,y="string"==typeof t?(0,c.parsePath)(t):t;"/"===s||(null==(f=y.pathname)?void 0:f.startsWith(s))||(0,c.UNSAFE_invariant)(!1),h=y}else h=u;var g=h.pathname||"/",w="/"===s?g:g.slice(s.length)||"/",R=(0,c.matchRoutes)(e,{pathname:w}),S=function(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=null),null==e){if(null==(n=r)||!n.errors)return null;e=r.matches}var a,n,o=e,i=null==(a=r)?void 0:a.errors;if(null!=i){var s=o.findIndex(e=>e.route.id&&(null==i?void 0:i[e.route.id]));s>=0||(0,c.UNSAFE_invariant)(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((e,a,n)=>{var s=a.route.id?null==i?void 0:i[a.route.id]:null,u=null;r&&(u=a.route.errorElement||D);var c=t.concat(o.slice(0,n+1)),d=()=>{var t;return t=s?u:a.route.Component?l.createElement(a.route.Component,null):a.route.element?a.route.element:e,l.createElement(C,{match:a,routeContext:{outlet:e,matches:c,isDataRoute:null!=r},children:t})};return r&&(a.route.ErrorBoundary||a.route.errorElement||0===n)?l.createElement(x,{location:r.location,revalidation:r.revalidation,component:u,error:s,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()},null)}(R&&R.map(e=>Object.assign({},e,{params:Object.assign({},i,e.params),pathname:(0,c.joinPaths)([s,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?s:(0,c.joinPaths)([s,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),n,r);return t&&S?l.createElement(v.Provider,{value:{location:d({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:c.Action.Pop}},S):S}(t,void 0,r)}function L(e){var t,r;return t=e.context,r=l.useContext(m).outlet,r?l.createElement(S.Provider,{value:t},r):r}function N(e){(0,c.UNSAFE_invariant)(!1)}function B(e){var{basename:t="/",children:r=null,location:a,navigationType:n=c.Action.Pop,navigator:o,static:i=!1}=e;b()&&(0,c.UNSAFE_invariant)(!1);var s=t.replace(/^\/*/,"/"),u=l.useMemo(()=>({basename:s,navigator:o,static:i}),[s,o,i]);"string"==typeof a&&(a=(0,c.parsePath)(a));var{pathname:d="/",search:h="",hash:f="",state:m=null,key:y="default"}=a,g=l.useMemo(()=>{var e=(0,c.stripBasename)(d,s);return null==e?null:{location:{pathname:e,search:h,hash:f,state:m,key:y},navigationType:n}},[s,d,h,f,m,y,n]);return null==g?null:l.createElement(p.Provider,{value:u},l.createElement(v.Provider,{children:r,value:g}))}(o=u||(u={}))[o.pending=0]="pending",o[o.success=1]="success",o[o.error=2]="error",new Promise(()=>{});function O(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:l.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:l.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}}}]);
1
+ (self.webpackChunk_modern_js_devtools_client=self.webpackChunk_modern_js_devtools_client||[]).push([["lib-router"],{21921:function(e,t,r){"use strict";r.r(t),r.d(t,{Action:function(){return o},ErrorResponse:function(){return M},UNSAFE_getPathContributingMatches:function(){return D},UNSAFE_invariant:function(){return h},createBrowserHistory:function(){return c},createHashHistory:function(){return d},createPath:function(){return m},createRouter:function(){return J},isRouteErrorResponse:function(){return k},joinPaths:function(){return C},matchRoutes:function(){return E},parsePath:function(){return y},resolveTo:function(){return x},stripBasename:function(){return S}});var a,n,o,i,s=r("61078");function u(){return(u=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}).apply(this,arguments)}(a=o||(o={})).Pop="POP",a.Push="PUSH",a.Replace="REPLACE";var l="popstate";function c(e){return void 0===e&&(e={}),g(function(e,t){var{pathname:r,search:a,hash:n}=e.location;return v("",{pathname:r,search:a,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:m(t)},null,e)}function d(e){return void 0===e&&(e={}),g(function(e,t){var{pathname:r="/",search:a="",hash:n=""}=y(e.location.hash.substr(1));return v("",{pathname:r,search:a,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){var r=e.document.querySelector("base"),a="";if(r&&r.getAttribute("href")){var n=e.location.href,o=n.indexOf("#");a=-1===o?n:n.slice(0,o)}return a+"#"+("string"==typeof t?t:m(t))},function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function h(e,t){if(!1===e||null==e)throw Error(t)}function f(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function v(e,t,r,a){return void 0===r&&(r=null),u({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?y(t):t,{state:r,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function m(e){var{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 y(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function g(e,t,r,a){void 0===a&&(a={});var{window:n=document.defaultView,v5Compat:i=!1}=a,s=n.history,c=o.Pop,d=null,f=y();function y(){return(s.state||{idx:null}).idx}function g(){c=o.Pop;var e=y(),t=null==e?null:e-f;f=e,d&&d({action:c,location:E.location,delta:t})}null==f&&(f=0,s.replaceState(u({},s.state,{idx:f}),""));function b(e){var t="null"!==n.location.origin?n.location.origin:n.location.href,r="string"==typeof e?e:m(e);return h(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}var E={get action(){return c},get location(){return e(n,s)},listen(e){if(d)throw Error("A history only accepts one active listener");return n.addEventListener(l,g),d=e,()=>{n.removeEventListener(l,g),d=null}},createHref:e=>t(n,e),createURL:b,encodeLocation(e){var t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=o.Push;var a=v(E.location,e,t);r&&r(a,e);var u=p(a,f=y()+1),l=E.createHref(a);try{s.pushState(u,"",l)}catch(e){n.location.assign(l)}i&&d&&d({action:c,location:E.location,delta:1})},replace:function(e,t){c=o.Replace;var a=v(E.location,e,t);r&&r(a,e);var n=p(a,f=y()),u=E.createHref(a);s.replaceState(n,"",u),i&&d&&d({action:c,location:E.location,delta:0})},go:e=>s.go(e)};return E}(n=i||(i={})).data="data",n.deferred="deferred",n.redirect="redirect",n.error="error";var b=new Set(["lazy","caseSensitive","path","id","index","children"]);function E(e,t,r){void 0===r&&(r="/");var a=S(("string"==typeof t?y(t):t).pathname||"/",r);if(null==a)return null;var n=function e(t,r,a,n){void 0===r&&(r=[]),void 0===a&&(a=[]),void 0===n&&(n="");var o=(t,o,i)=>{var s={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};s.relativePath.startsWith("/")&&(h(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n)+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(n.length));var u=C([n,s.relativePath]),l=a.concat(s);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),e(t.children,r,l,u)),(null!=t.path||t.index)&&r.push({path:u,score:function(e,t){var r=e.split("/"),a=r.length;return r.some(R)&&(a+=-2),t&&(a+=2),r.filter(e=>!R(e)).reduce((e,t)=>e+(w.test(t)?3:""===t?1:10),a)}(u,t.index),routesMeta:l})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(var a of function e(t){var r=t.split("/");if(0===r.length)return[];var[a,...n]=r,o=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];var s=e(n.join("/")),u=[];return u.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&u.push(...s),u.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,a);else o(e,t)}),r}(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)))})(n);for(var o=null,i=0;null==o&&i<n.length;++i)o=function(e,t){for(var{routesMeta:r}=e,a={},n="/",o=[],i=0;i<r.length;++i){var s=r[i],u=i===r.length-1,l="/"===n?t:t.slice(n.length)||"/",c=function(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var[r,a]=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0),f("*"===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(/\*$/,"/*"))+'".');var a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(e,t)=>(a.push(t),"/([^\\/]+)"));return e.endsWith("*")?(a.push("*"),n+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":""!==e&&"/"!==e&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;var o=n[0],i=o.replace(/(.)\/+$/,"$1"),s=n.slice(1);return{params:a.reduce((e,t,r)=>{if("*"===t){var a=s[r]||"";i=o.slice(0,o.length-a.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return f(!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}}(s[r]||"",t),e},{}),pathname:o,pathnameBase:i,pattern:e}}({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);if(!c)return null;Object.assign(a,c.params);var d=s.route;o.push({params:a,pathname:C([n,c.pathname]),pathnameBase:U(C([n,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(n=C([n,c.pathnameBase]))}return o}(n[i],function(e){try{return decodeURI(e)}catch(t){return f(!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}}(a));return o}var w=/^:\w+$/,R=e=>"*"===e;function S(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&"/"!==a?null:e.slice(r)||"/"}function A(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 D(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function x(e,t,r,a){void 0===a&&(a=!1),"string"==typeof e?n=y(e):(h(!(n=u({},e)).pathname||!n.pathname.includes("?"),A("?","pathname","search",n)),h(!n.pathname||!n.pathname.includes("#"),A("#","pathname","hash",n)),h(!n.search||!n.search.includes("#"),A("#","search","hash",n)));var n,o,i=""===e||""===n.pathname,s=i?"/":n.pathname;if(a||null==s)o=r;else{var l=t.length-1;if(s.startsWith("..")){for(var c=s.split("/");".."===c[0];)c.shift(),l-=1;n.pathname=c.join("/")}o=l>=0?t[l]:"/"}var d=function(e,t){void 0===t&&(t="/");var{pathname:r,search:a="",hash:n=""}="string"==typeof e?y(e):e;return{pathname:r?r.startsWith("/")?r:function(e,t){var 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,search:P(a),hash:_(n)}}(n,o),f=s&&"/"!==s&&s.endsWith("/"),p=(i||"."===s)&&r.endsWith("/");return!d.pathname.endsWith("/")&&(f||p)&&(d.pathname+="/"),d}var C=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",_=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class M{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 k(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var F=["post","put","patch","delete"],L=new Set(F),N=["get",...F],B=new Set(N),O=new Set([301,302,303,307,308]),T=new Set([307,308]),j={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},I={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},z={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},H=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,W="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,$=!W,q=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function J(e){if(h(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){var t,r,a,n,l=e.detectErrorBoundary;t=e=>({hasErrorBoundary:l(e)})}else t=q;var c={},d=function e(t,r,a,n){return void 0===a&&(a=[]),void 0===n&&(n={}),t.map((t,o)=>{var i=[...a,o],s="string"==typeof t.id?t.id:i.join("-");if(h(!0!==t.index||!t.children,"Cannot specify children on an index route"),h(!n[s],'Found a route id collision on id "'+s+"\". Route id's must be globally unique within Data Router usages"),!0===t.index){var l=u({},t,r(t),{id:s});return n[s]=l,l}var c=u({},t,r(t),{id:s,children:void 0});return n[s]=c,t.children&&(c.children=e(t.children,r,i,n)),c})}(e.routes,t,void 0,c),p=e.basename||"/",m=u({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),y=null,g=new Set,b=null,w=null,R=null,A=null!=e.hydrationData,D=E(d,e.history.location,p),x=null;if(null==D){var C=eu(404,{pathname:e.history.location.pathname}),{matches:U,route:P}=es(d);D=U,x={[P.id]:C}}var _=!D.some(e=>e.route.lazy)&&(!D.some(e=>e.route.loader)||null!=e.hydrationData),M={historyAction:e.history.action,location:e.history.location,matches:D,initialized:_,navigation:j,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||x,fetchers:new Map,blockers:new Map},k=o.Pop,F=!1,L=!1,N=!1,B=[],O=[],J=new Map,X=0,G=-1,Q=new Map,Z=new Set,ee=new Map,ea=new Map,ec=new Map,em=!1;function eg(e){M=u({},M,e),g.forEach(e=>e(M))}function eb(t,a){var n,i,s,l=null!=M.actionData&&null!=M.navigation.formMethod&&ep(M.navigation.formMethod)&&"loading"===M.navigation.state&&(null==(n=t.state)?void 0:n._isRedirect)!==!0;s=a.actionData?Object.keys(a.actionData).length>0?a.actionData:null:l?M.actionData:null;var c=a.loaderData?eo(M.loaderData,a.loaderData,a.matches||[],a.errors):M.loaderData;for(var[h]of ec)eH(h);var f=!0===F||null!=M.navigation.formMethod&&ep(M.navigation.formMethod)&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;r&&(d=r,r=void 0),eg(u({},a,{actionData:s,loaderData:c,historyAction:k,location:t,initialized:!0,navigation:j,revalidation:"idle",restoreScrollPosition:eJ(t,a.matches||M.matches),preventScrollReset:f,blockers:new Map(M.blockers)})),L||k===o.Pop||(k===o.Push?e.history.push(t,t.state):k===o.Replace&&e.history.replace(t,t.state)),k=o.Pop,F=!1,L=!1,N=!1,B=[],O=[]}function eR(e,t){return eS.apply(this,arguments)}function eS(){return(eS=(0,s._)(function*(t,r){if("number"==typeof t){e.history.go(t);return}var a=Y(M.location,M.matches,p,m.v7_prependBasename,t,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:n,submission:i,error:s}=V(m.v7_normalizeFormMethod,!1,a,r),l=M.location,c=v(M.location,n,r&&r.state);c=u({},c,e.history.encodeLocation(c));var d=r&&null!=r.replace?r.replace:void 0,h=o.Push;!0===d?h=o.Replace:!1===d||null!=i&&ep(i.formMethod)&&i.formAction===M.location.pathname+M.location.search&&(h=o.Replace);var f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,y=e$({currentLocation:l,nextLocation:c,historyAction:h});if(y){eW(y,{state:"blocked",location:c,proceed(){eW(y,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),eR(t,r)},reset(){eH(y),eg({blockers:new Map(M.blockers)})}});return}return yield eA(h,c,{submission:i,pendingError:s,preventScrollReset:f,replace:r&&r.replace})})).apply(this,arguments)}function eA(e,t,r){return eD.apply(this,arguments)}function eD(){return(eD=(0,s._)(function*(t,a,o){n&&n.abort(),n=null,k=t,L=!0===(o&&o.startUninterruptedRevalidation),function(e,t){b&&w&&R&&(b[w(e,t.map(e=>eE(e,M.loaderData)))||e.key]=R())}(M.location,M.matches),F=!0===(o&&o.preventScrollReset);var i,s,l=r||d,c=o&&o.overrideNavigation,h=E(l,a,p);if(!h){var f=eu(404,{pathname:a.pathname}),{matches:v,route:m}=es(l);eq(),eb(a,{matches:v,loaderData:{},errors:{[m.id]:f}});return}if(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}(M.location,a)&&!(o&&o.submission&&ep(o.submission.formMethod))){eb(a,{matches:h});return}n=new AbortController;var y=er(e.history,a,n.signal,o&&o.submission);if(o&&o.pendingError)s={[ei(h).route.id]:o.pendingError};else if(o&&o.submission&&ep(o.submission.formMethod)){var g=yield function(e,t,r,a,n){return ex.apply(this,arguments)}(y,a,o.submission,h,{replace:o.replace});if(g.shortCircuited)return;i=g.pendingActionData,s=g.pendingActionError,c=u({state:"loading",location:a},o.submission),y=new Request(y.url,{signal:y.signal})}var{shortCircuited:S,loaderData:A,errors:D}=yield function(e,t,r,a,n,o,i,s,u){return eC.apply(this,arguments)}(y,a,h,c,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,i,s);!S&&(n=null,eb(a,u({matches:h},i?{actionData:i}:{},{loaderData:A,errors:D})))})).apply(this,arguments)}function ex(){return(ex=(0,s._)(function*(e,r,a,n,s){eN(),eg({navigation:u({state:"submitting",location:r},a)});var l,d,h=ew(n,r);if(h.route.action||h.route.lazy){if(l=yield function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}("action",e,h,n,c,t,p),e.signal.aborted)return{shortCircuited:!0}}else l={type:i.error,error:eu(405,{method:e.method,pathname:r.pathname,routeId:h.route.id})};if(ef(l))return d=s&&null!=s.replace?s.replace:l.location===M.location.pathname+M.location.search,yield eM(M,l,{submission:a,replace:d}),{shortCircuited:!0};if(eh(l)){var f=ei(n,h.route.id);return!0!==(s&&s.replace)&&(k=o.Push),{pendingActionData:{},pendingActionError:{[f.route.id]:l.error}}}if(ed(l))throw eu(400,{type:"defer-action"});return{pendingActionData:{[h.route.id]:l.data}}})).apply(this,arguments)}function eC(){return(eC=(0,s._)(function*(t,a,o,i,s,l,c,h,f){var v=i;!v&&(v=u({state:"loading",location:a,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},s));var m=s||l?s||l:v.formMethod&&v.formAction&&v.formData&&v.formEncType?{formMethod:v.formMethod,formAction:v.formAction,formData:v.formData,formEncType:v.formEncType}:void 0,y=r||d,[g,b]=K(e.history,M,o,m,a,N,B,O,ee,y,p,h,f);if(eq(e=>!(o&&o.some(t=>t.route.id===e))||g&&g.some(t=>t.route.id===e)),0===g.length&&0===b.length)return eb(a,u({matches:o,loaderData:{},errors:f||null},h?{actionData:h}:{},eI()?{fetchers:new Map(M.fetchers)}:{})),{shortCircuited:!0};if(!L){b.forEach(e=>{var t=M.fetchers.get(e.key),r={state:"loading",data:t&&t.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(e.key,r)});var E=h||M.actionData;eg(u({navigation:v},E?0===Object.keys(E).length?{actionData:null}:{actionData:E}:{},b.length>0?{fetchers:new Map(M.fetchers)}:{}))}G=++X,b.forEach(e=>{e.controller&&J.set(e.key,e.controller)});var w=()=>b.forEach(e=>eT(e.key));n&&n.signal.addEventListener("abort",w);var{results:R,loaderResults:S,fetcherResults:A}=yield eF(M.matches,o,g,b,t);if(t.signal.aborted)return{shortCircuited:!0};n&&n.signal.removeEventListener("abort",w),b.forEach(e=>J.delete(e.key));var D=el(R);if(D)return yield eM(M,D,{replace:c}),{shortCircuited:!0};var{loaderData:x,errors:C}=en(M,o,g,S,f,b,A,ea);ea.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&ea.delete(t)})});var U=eI(),P=ez(G);return u({loaderData:x,errors:C},U||P||b.length>0?{fetchers:new Map(M.fetchers)}:{})})).apply(this,arguments)}function eU(e){return M.fetchers.get(e)||I}function eP(){return(eP=(0,s._)(function*(a,o,i,s,l,f){if(eN(),ee.delete(a),!s.route.action&&!s.route.lazy){var v=eu(405,{method:f.formMethod,pathname:i,routeId:o});eB(a,o,v);return}var m=M.fetchers.get(a),y=u({state:"submitting"},f,{data:m&&m.data," _hasFetcherDoneAnything ":!0});M.fetchers.set(a,y),eg({fetchers:new Map(M.fetchers)});var g=new AbortController,b=er(e.history,i,g.signal,f);J.set(a,g);var w=yield function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}("action",b,s,l,c,t,p);if(b.signal.aborted){J.get(a)===g&&J.delete(a);return}if(ef(w)){J.delete(a),Z.add(a);var R=u({state:"loading"},f,{data:void 0," _hasFetcherDoneAnything ":!0});return M.fetchers.set(a,R),eg({fetchers:new Map(M.fetchers)}),eM(M,w,{submission:f,isFetchActionRedirect:!0})}if(eh(w)){eB(a,o,w.error);return}if(ed(w))throw eu(400,{type:"defer-action"});var S=M.navigation.location||M.location,A=er(e.history,S,g.signal),D=r||d,x="idle"!==M.navigation.state?E(D,M.navigation.location,p):M.matches;h(x,"Didn't find any matches after fetcher action");var C=++X;Q.set(a,C);var U=u({state:"loading",data:w.data},f,{" _hasFetcherDoneAnything ":!0});M.fetchers.set(a,U);var[P,_]=K(e.history,M,x,f,S,N,B,O,ee,D,p,{[s.route.id]:w.data},void 0);_.filter(e=>e.key!==a).forEach(e=>{var t=e.key,r=M.fetchers.get(t),a={state:"loading",data:r&&r.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(t,a),e.controller&&J.set(t,e.controller)}),eg({fetchers:new Map(M.fetchers)});var F=()=>_.forEach(e=>eT(e.key));g.signal.addEventListener("abort",F);var{results:L,loaderResults:T,fetcherResults:j}=yield eF(M.matches,x,P,_,A);if(!g.signal.aborted){g.signal.removeEventListener("abort",F),Q.delete(a),J.delete(a),_.forEach(e=>J.delete(e.key));var I=el(L);if(I)return eM(M,I);var{loaderData:z,errors:H}=en(M,M.matches,P,T,void 0,_,j,ea),W={state:"idle",data:w.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(a,W);var $=ez(C);"loading"===M.navigation.state&&C>G?(h(k,"Expected pending action"),n&&n.abort(),eb(M.navigation.location,{matches:x,loaderData:z,errors:H,fetchers:new Map(M.fetchers)})):(eg(u({errors:H,loaderData:eo(M.loaderData,z,x,H)},$?{fetchers:new Map(M.fetchers)}:{})),N=!1)}})).apply(this,arguments)}function e_(){return(e_=(0,s._)(function*(r,a,n,o,i,s){var l=M.fetchers.get(r),d=u({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},s,{data:l&&l.data," _hasFetcherDoneAnything ":!0});M.fetchers.set(r,d),eg({fetchers:new Map(M.fetchers)});var f=new AbortController,v=er(e.history,n,f.signal);J.set(r,f);var m=yield function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}("loader",v,o,i,c,t,p);if(ed(m)&&(m=(yield ey(m,v.signal,!0))||m),J.get(r)===f&&J.delete(r),!v.signal.aborted){if(ef(m)){Z.add(r),yield eM(M,m);return}if(eh(m)){var y=ei(M.matches,a);M.fetchers.delete(r),eg({fetchers:new Map(M.fetchers),errors:{[y.route.id]:m.error}});return}h(!ed(m),"Unhandled fetcher deferred data");var g={state:"idle",data:m.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(r,g),eg({fetchers:new Map(M.fetchers)})}})).apply(this,arguments)}function eM(e,t,r){return ek.apply(this,arguments)}function ek(){return(ek=(0,s._)(function*(t,r,a){var i,{submission:s,replace:l,isFetchActionRedirect:c}=void 0===a?{}:a;r.revalidate&&(N=!0);var d=v(t.location,r.location,u({_isRedirect:!0},c?{_isFetchActionRedirect:!0}:{}));if(h(d,"Expected a location on the redirect navigation"),H.test(r.location)&&W&&void 0!==(null==(i=window)?void 0:i.location)){var f=e.history.createURL(r.location),m=null==S(f.pathname,p);if(window.location.origin!==f.origin||m){l?window.location.replace(r.location):window.location.assign(r.location);return}}n=null;var y=!0===l?o.Replace:o.Push,{formMethod:g,formAction:b,formEncType:E,formData:w}=t.navigation;!s&&g&&b&&w&&E&&(s={formMethod:g,formAction:b,formEncType:E,formData:w}),T.has(r.status)&&s&&ep(s.formMethod)?yield eA(y,d,{submission:u({},s,{formAction:r.location}),preventScrollReset:F}):c?yield eA(y,d,{overrideNavigation:{state:"loading",location:d,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},fetcherSubmission:s,preventScrollReset:F}):yield eA(y,d,{overrideNavigation:{state:"loading",location:d,formMethod:s?s.formMethod:void 0,formAction:s?s.formAction:void 0,formEncType:s?s.formEncType:void 0,formData:s?s.formData:void 0},preventScrollReset:F})})).apply(this,arguments)}function eF(e,t,r,a,n){return eL.apply(this,arguments)}function eL(){return(eL=(0,s._)(function*(r,a,n,o,s){var u=yield Promise.all([...n.map(e=>(function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)})("loader",s,e,a,c,t,p)),...o.map(r=>r.matches&&r.match&&r.controller?function(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}("loader",er(e.history,r.path,r.controller.signal),r.match,r.matches,c,t,p):{type:i.error,error:eu(404,{pathname:r.path})})]),l=u.slice(0,n.length),d=u.slice(n.length);return yield Promise.all([ev(r,n,l,l.map(()=>s.signal),!1,M.loaderData),ev(r,o.map(e=>e.match),d,o.map(e=>e.controller?e.controller.signal:null),!0)]),{results:u,loaderResults:l,fetcherResults:d}})).apply(this,arguments)}function eN(){N=!0,B.push(...eq()),ee.forEach((e,t)=>{J.has(t)&&(O.push(t),eT(t))})}function eB(e,t,r){var a=ei(M.matches,t);eO(e),eg({errors:{[a.route.id]:r},fetchers:new Map(M.fetchers)})}function eO(e){J.has(e)&&eT(e),ee.delete(e),Q.delete(e),Z.delete(e),M.fetchers.delete(e)}function eT(e){var t=J.get(e);h(t,"Expected fetch controller: "+e),t.abort(),J.delete(e)}function ej(e){for(var t of e){var r={state:"idle",data:eU(t).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};M.fetchers.set(t,r)}}function eI(){var e=[],t=!1;for(var r of Z){var a=M.fetchers.get(r);h(a,"Expected fetcher: "+r),"loading"===a.state&&(Z.delete(r),e.push(r),t=!0)}return ej(e),t}function ez(e){var t=[];for(var[r,a]of Q)if(a<e){var n=M.fetchers.get(r);h(n,"Expected fetcher: "+r),"loading"===n.state&&(eT(r),Q.delete(r),t.push(r))}return ej(t),t.length>0}function eH(e){M.blockers.delete(e),ec.delete(e)}function eW(e,t){var r=M.blockers.get(e)||z;h("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),M.blockers.set(e,t),eg({blockers:new Map(M.blockers)})}function e$(e){var{currentLocation:t,nextLocation:r,historyAction:a}=e;if(0!==ec.size){ec.size>1&&f(!1,"A router only supports one blocker at a time");var n=Array.from(ec.entries()),[o,i]=n[n.length-1],s=M.blockers.get(o);if((!s||"proceeding"!==s.state)&&i({currentLocation:t,nextLocation:r,historyAction:a}))return o}}function eq(e){var t=[];return ea.forEach((r,a)=>{(!e||e(a))&&(r.cancel(),t.push(a),ea.delete(a))}),t}function eJ(e,t){if(b&&w&&R){var r=b[w(e,t.map(e=>eE(e,M.loaderData)))||e.key];if("number"==typeof r)return r}return null}return a={get basename(){return p},get state(){return M},get routes(){return d},initialize:function(){return y=e.history.listen(t=>{var{action:r,location:n,delta:o}=t;if(em){em=!1;return}f(0===ec.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.");var i=e$({currentLocation:M.location,nextLocation:n,historyAction:r});if(i&&null!=o){em=!0,e.history.go(-1*o),eW(i,{state:"blocked",location:n,proceed(){eW(i,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(o)},reset(){eH(i),eg({blockers:new Map(a.state.blockers)})}});return}return eA(r,n)}),!M.initialized&&eA(o.Pop,M.location),a},subscribe:function(e){return g.add(e),()=>g.delete(e)},enableScrollRestoration:function(e,t,r){if(b=e,R=t,w=r||(e=>e.key),!A&&M.navigation===j){A=!0;var a=eJ(M.location,M.matches);null!=a&&eg({restoreScrollPosition:a})}return()=>{b=null,R=null,w=null}},navigate:eR,fetch:function(e,t,a,n){if($)throw 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.");J.has(e)&&eT(e);var o=r||d,i=Y(M.location,M.matches,p,m.v7_prependBasename,a,t,null==n?void 0:n.relative),s=E(o,i,p);if(!s){eB(e,t,eu(404,{pathname:i}));return}var{path:u,submission:l}=V(m.v7_normalizeFormMethod,!0,i,n),c=ew(s,u);if(F=!0===(n&&n.preventScrollReset),l&&ep(l.formMethod)){(function(e,t,r,a,n,o){eP.apply(this,arguments)})(e,t,u,c,s,l);return}ee.set(e,{routeId:t,path:u}),function(e,t,r,a,n,o){e_.apply(this,arguments)}(e,t,u,c,s,l)},revalidate:function(){if(eN(),eg({revalidation:"loading"}),"submitting"!==M.navigation.state){if("idle"===M.navigation.state){eA(M.historyAction,M.location,{startUninterruptedRevalidation:!0});return}eA(k||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eU,deleteFetcher:eO,dispose:function(){y&&y(),g.clear(),n&&n.abort(),M.fetchers.forEach((e,t)=>eO(t)),M.blockers.forEach((e,t)=>eH(t))},getBlocker:function(e,t){var r=M.blockers.get(e)||z;return ec.get(e)!==t&&ec.set(e,t),r},deleteBlocker:eH,_internalFetchControllers:J,_internalActiveDeferreds:ea,_internalSetRoutes:function(e){r=e}}}Symbol("deferred");function Y(e,t,r,a,n,o,i){if(null!=o&&"path"!==i){for(var s of(u=[],t))if(u.push(s),s.route.id===o){l=s;break}}else u=t,l=t[t.length-1];var u,l,c=x(n||".",D(u).map(e=>e.pathnameBase),S(e.pathname,r)||e.pathname,"path"===i);return null==n&&(c.search=e.search,c.hash=e.hash),(null==n||""===n||"."===n)&&l&&l.route.index&&!eb(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a&&"/"!==r&&(c.pathname="/"===c.pathname?r:C([r,c.pathname])),m(c)}function V(e,t,r,a){if(!a||!(null!=(n=a)&&"formData"in n))return{path:r};if(a.formMethod&&!function(e){return B.has(e.toLowerCase())}(a.formMethod))return{path:r,error:eu(405,{method:a.formMethod})};if(a.formData){var n,o,i=a.formMethod||"get";if(ep((o={formMethod:e?i.toUpperCase():i.toLowerCase(),formAction:ec(r),formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:a.formData}).formMethod))return{path:r,submission:o}}var s=y(r),u=ea(a.formData);return t&&s.search&&eb(s.search)&&u.append("index",""),s.search="?"+u,{path:m(s),submission:o}}function K(e,t,r,a,n,o,i,s,l,c,d,h,f){var p=f?Object.values(f)[0]:h?Object.values(h)[0]:void 0,v=e.createURL(t.location),m=e.createURL(n),y=(function(e,t){var r=e;if(t){var a=e.findIndex(e=>e.route.id===t);a>=0&&(r=e.slice(0,a))}return r})(r,f?Object.keys(f)[0]:void 0).filter((e,r)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,r){var a=!t||r.route.id!==t.route.id,n=void 0===e[r.route.id];return a||n}(t.loaderData,t.matches[r],e)||i.some(t=>t===e.route.id))return!0;var n=t.matches[r];return G(e,u({currentUrl:v,currentParams:n.params,nextUrl:m,nextParams:e.params},a,{actionResult:p,defaultShouldRevalidate:o||v.pathname+v.search===m.pathname+m.search||v.search!==m.search||X(n,e)}))}),g=[];return l.forEach((e,n)=>{if(r.some(t=>t.route.id===e.routeId)){var i=E(c,e.path,d);if(!i){g.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}var l=ew(i,e.path);if(s.includes(n)){g.push({key:n,routeId:e.routeId,path:e.path,matches:i,match:l,controller:new AbortController});return}G(l,u({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:r[r.length-1].params},a,{actionResult:p,defaultShouldRevalidate:o}))&&g.push({key:n,routeId:e.routeId,path:e.path,matches:i,match:l,controller:new AbortController})}}),[y,g]}function X(e,t){var r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function G(e,t){if(e.route.shouldRevalidate){var r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function Q(e,t,r){return Z.apply(this,arguments)}function Z(){return(Z=(0,s._)(function*(e,t,r){if(!!e.lazy){var a=yield e.lazy();if(e.lazy){var n=r[e.id];h(n,"No route found in manifest");var o={};for(var i in a){var s=void 0!==n[i]&&"hasErrorBoundary"!==i;f(!s,'Route "'+n.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i)+'" will be ignored.'),!s&&!b.has(i)&&(o[i]=a[i])}Object.assign(n,o),Object.assign(n,u({},t(n),{lazy:void 0}))}}})).apply(this,arguments)}function ee(e,t,r,a,n,o,i,s,u,l){return et.apply(this,arguments)}function et(){return(et=(0,s._)(function*(e,t,r,a,n,o,s,u,l,c){void 0===u&&(u=!1),void 0===l&&(l=!1);var d,f,p=e=>{var a,n=new Promise((e,t)=>a=t);return R=()=>a(),t.signal.addEventListener("abort",R),Promise.race([e({request:t,params:r.params,context:c}),n])};try{var v=r.route[e];if(r.route.lazy){if(v)w=(yield Promise.all([p(v),Q(r.route,o,n)]))[0];else if(yield Q(r.route,o,n),v=r.route[e])w=yield p(v);else{if("action"!==e)return{type:i.data,data:void 0};var m=new URL(t.url),y=m.pathname+m.search;throw eu(405,{method:t.method,pathname:y,routeId:r.route.id})}}else if(v)w=yield p(v);else{var g=new URL(t.url),b=g.pathname+g.search;throw eu(404,{pathname:b})}h(void 0!==w,"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){E=i.error,w=e}finally{R&&t.signal.removeEventListener("abort",R)}if(function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}(w)){var E,w,R,A,D=w.status;if(O.has(D)){var x=w.headers.get("Location");if(h(x,"Redirects returned/thrown from loaders/actions must have a Location header"),H.test(x)){if(!u){var C=new URL(t.url),U=new URL(x.startsWith("//")?C.protocol+x:x),P=null!=S(U.pathname,s);U.origin===C.origin&&P&&(x=U.pathname+U.search+U.hash)}}else x=Y(new URL(t.url),a.slice(0,a.indexOf(r)+1),s,!0,x);if(u)throw w.headers.set("Location",x),w;return{type:i.redirect,status:D,location:x,revalidate:null!==w.headers.get("X-Remix-Revalidate")}}if(l)throw{type:E||i.data,response:w};var _=w.headers.get("Content-Type");return(A=_&&/\bapplication\/json\b/.test(_)?yield w.json():yield w.text(),E===i.error)?{type:E,error:new M(D,w.statusText,A),headers:w.headers}:{type:i.data,data:A,statusCode:w.status,headers:w.headers}}return E===i.error?{type:E,error:w}:function(e){return e&&"object"==typeof e&&"object"==typeof e.data&&"function"==typeof e.subscribe&&"function"==typeof e.cancel&&"function"==typeof e.resolveData}(w)?{type:i.deferred,deferredData:w,statusCode:null==(d=w.init)?void 0:d.status,headers:(null==(f=w.init)?void 0:f.headers)&&new Headers(w.init.headers)}:{type:i.data,data:w}})).apply(this,arguments)}function er(e,t,r,a){var n=e.createURL(ec(t)).toString(),o={signal:r};if(a&&ep(a.formMethod)){var{formMethod:i,formEncType:s,formData:u}=a;o.method=i.toUpperCase(),o.body="application/x-www-form-urlencoded"===s?ea(u):u}return new Request(n,o)}function ea(e){var t=new URLSearchParams;for(var[r,a]of e.entries())t.append(r,a instanceof File?a.name:a);return t}function en(e,t,r,a,n,o,i,s){for(var l,c,d,f,p,v,m,y,g,b,{loaderData:E,errors:w}=(l=t,c=r,d=a,f=n,p=s,m={},y=null,g=!1,b={},d.forEach((e,t)=>{var r=c[t].route.id;if(h(!ef(e),"Cannot handle redirect results in processLoaderData"),eh(e)){var a=ei(l,r),n=e.error;f&&(n=Object.values(f)[0],f=void 0),null==(y=y||{})[a.route.id]&&(y[a.route.id]=n),m[r]=void 0,!g&&(g=!0,v=k(e.error)?e.error.status:500),e.headers&&(b[r]=e.headers)}else ed(e)?(p.set(r,e.deferredData),m[r]=e.deferredData.data):m[r]=e.data,null!=e.statusCode&&200!==e.statusCode&&!g&&(v=e.statusCode),e.headers&&(b[r]=e.headers)}),f&&(y=f,m[Object.keys(f)[0]]=void 0),{loaderData:m,errors:y,statusCode:v||200,loaderHeaders:b}),R=0;R<o.length;R++){var{key:S,match:A,controller:D}=o[R];h(void 0!==i&&void 0!==i[R],"Did not find corresponding fetcher result");var x=i[R];if(!D||!D.signal.aborted)if(eh(x)){var C=ei(e.matches,null==A?void 0:A.route.id);!(w&&w[C.route.id])&&(w=u({},w,{[C.route.id]:x.error})),e.fetchers.delete(S)}else if(ef(x))h(!1,"Unhandled fetcher revalidation redirect");else if(ed(x))h(!1,"Unhandled fetcher deferred data");else{var U={state:"idle",data:x.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};e.fetchers.set(S,U)}}return{loaderData:E,errors:w}}function eo(e,t,r,a){var n=u({},t);for(var o of r){var i=o.route.id;if(t.hasOwnProperty(i)?void 0!==t[i]&&(n[i]=t[i]):void 0!==e[i]&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function ei(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 es(e){var t=e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eu(e,t){var{pathname:r,routeId:a,method:n,type:o}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&r&&a?s="You made a "+n+' request to "'+r+'" but '+('did not provide a `loader` for route "'+a)+'", so there is no way to handle the request.':"defer-action"===o&&(s="defer() is not supported in actions")):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",n&&r&&a?s="You made a "+n.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+a)+'", so there is no way to handle the request.':n&&(s='Invalid request method "'+n.toUpperCase()+'"')),new M(e||500,i,Error(s),!0)}function el(e){for(var t=e.length-1;t>=0;t--){var r=e[t];if(ef(r))return r}}function ec(e){return m(u({},"string"==typeof e?y(e):e,{hash:""}))}function ed(e){return e.type===i.deferred}function eh(e){return e.type===i.error}function ef(e){return(e&&e.type)===i.redirect}function ep(e){return L.has(e.toLowerCase())}function ev(e,t,r,a,n,o){return em.apply(this,arguments)}function em(){return(em=(0,s._)(function*(e,t,r,a,n,o){for(var i=function*(i){var s=r[i],u=t[i];if(!u)return"continue";var l=e.find(e=>e.route.id===u.route.id),c=null!=l&&!X(l,u)&&(o&&o[u.route.id])!==void 0;if(ed(s)&&(n||c)){var d=a[i];h(d,"Expected an AbortSignal for revalidating fetcher deferred result"),yield ey(s,d,n).then(e=>{e&&(r[i]=e||r[i])})}},s=0;s<r.length;s++)yield*i(s)})).apply(this,arguments)}function ey(e,t,r){return eg.apply(this,arguments)}function eg(){return(eg=(0,s._)(function*(e,t,r){if(void 0===r&&(r=!1),!(yield e.deferredData.resolveData(t))){if(r)try{return{type:i.data,data:e.deferredData.unwrappedData}}catch(e){return{type:i.error,error:e}}return{type:i.data,data:e.deferredData.data}}})).apply(this,arguments)}function eb(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eE(e,t){var{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],handle:r.handle}}function ew(e,t){var r="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&eb(r||""))return e[e.length-1];var a=D(e);return a[a.length-1]}},42130:function(e,t,r){"use strict";r.r(t),r.d(t,{Outlet:function(){return u.Outlet},Route:function(){return u.Route},RouterProvider:function(){return u.RouterProvider},createRoutesFromElements:function(){return u.createRoutesFromElements},useLocation:function(){return u.useLocation},useMatches:function(){return u.useMatches}}),r.d(t,{createBrowserRouter:function(){return m},createHashRouter:function(){return y}});var a,n,o,i,s=r("6171"),u=r("50387"),l=r("21921");function c(){return(c=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}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var h="application/x-www-form-urlencoded";function f(e){return null!=e&&"string"==typeof e.tagName}var p=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],v=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];function m(e,t){return(0,l.createRouter)({basename:null==t?void 0:t.basename,future:c({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.createBrowserHistory)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||g(),routes:e,mapRouteProperties:u.UNSAFE_mapRouteProperties}).initialize()}function y(e,t){return(0,l.createRouter)({basename:null==t?void 0:t.basename,future:c({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.createHashHistory)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||g(),routes:e,mapRouteProperties:u.UNSAFE_mapRouteProperties}).initialize()}function g(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=c({},t,{errors:function(e){if(!e)return null;var t=Object.entries(e),r={};for(var[a,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[a]=new l.ErrorResponse(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){var o=Error(n.message);o.stack="",r[a]=o}else r[a]=n;return r}(t.errors)})),t}var b="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,E=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;var w=s.forwardRef((e,t)=>{var{reloadDocument:r,replace:a,method:n="get",action:i,onSubmit:p,fetcherKey:m,routeId:y,relative:g,preventScrollReset:b}=e,E=d(e,v),w=function(e,t){var r,a,{router:n}=(r=o.UseSubmitImpl,a=s.useContext(u.UNSAFE_DataRouterContext),a||(0,l.UNSAFE_invariant)(!1),a),{basename:i}=s.useContext(u.UNSAFE_NavigationContext),d=(0,u.UNSAFE_useRouteId)();return s.useCallback(function(r,a){if(void 0===a&&(a={}),"undefined"==typeof document)throw Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");var{action:o,method:s,encType:u,formData:p}=function(e,t,r){var a,n,o,i=null;if(f(c=e)&&"form"===c.tagName.toLowerCase()){var s=t.submissionTrigger;if(t.action)i=t.action;else{var u=e.getAttribute("action");i=u?(0,l.stripBasename)(u,r):null}a=t.method||e.getAttribute("method")||"get",n=t.encType||e.getAttribute("enctype")||h,o=new FormData(e),s&&s.name&&o.append(s.name,s.value)}else{if(f(d=e)&&"button"===d.tagName.toLowerCase()||f(p=e)&&"input"===p.tagName.toLowerCase()&&("submit"===e.type||"image"===e.type)){var c,d,p,v=e.form;if(null==v)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');if(t.action)i=t.action;else{var m=e.getAttribute("formaction")||v.getAttribute("action");i=m?(0,l.stripBasename)(m,r):null}a=t.method||e.getAttribute("formmethod")||v.getAttribute("method")||"get",n=t.encType||e.getAttribute("formenctype")||v.getAttribute("enctype")||h,o=new FormData(v),e.name&&o.append(e.name,e.value)}else if(f(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else if(a=t.method||"get",i=t.action||null,n=t.encType||h,e instanceof FormData)o=e;else if(o=new FormData,e instanceof URLSearchParams)for(var[y,g]of e)o.append(y,g);else if(null!=e)for(var b of Object.keys(e))o.append(b,e[b])}return{action:i,method:a.toLowerCase(),encType:n,formData:o}}(r,a,i),v={preventScrollReset:a.preventScrollReset,formData:p,formMethod:s,formEncType:u};e?(null!=t||(0,l.UNSAFE_invariant)(!1),n.fetch(e,t,o,v)):n.navigate(o,c({},v,{replace:a.replace,fromRouteId:d}))},[n,i,e,t,d])}(m,y),R="get"===n.toLowerCase()?"get":"post",S=function(e,t){var{relative:r}=void 0===t?{}:t,{basename:a}=s.useContext(u.UNSAFE_NavigationContext),n=s.useContext(u.UNSAFE_RouteContext);n||(0,l.UNSAFE_invariant)(!1);var[o]=n.matches.slice(-1),i=c({},(0,u.useResolvedPath)(e||".",{relative:r})),d=(0,u.useLocation)();if(null==e&&(i.search=d.search,i.hash=d.hash,o.route.index)){var h=new URLSearchParams(i.search);h.delete("index"),i.search=h.toString()?"?"+h.toString():""}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==a&&(i.pathname="/"===i.pathname?a:(0,l.joinPaths)([a,i.pathname])),(0,u.createPath)(i)}(i,{relative:g});return s.createElement("form",c({ref:t,method:R,action:S,onSubmit:r?p:e=>{if(p&&p(e),!e.defaultPrevented){e.preventDefault();var t=e.nativeEvent.submitter,r=(null==t?void 0:t.getAttribute("formmethod"))||n;w(t||e.currentTarget,{method:r,replace:a,relative:g,preventScrollReset:b})}}},E))});(a=o||(o={})).UseScrollRestoration="useScrollRestoration",a.UseSubmitImpl="useSubmitImpl",a.UseFetcher="useFetcher",(n=i||(i={})).UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"},50387:function(e,t,r){"use strict";r.r(t),r.d(t,{createPath:function(){return c.createPath}}),r.d(t,{Outlet:function(){return L},Route:function(){return N},RouterProvider:function(){return k},UNSAFE_DataRouterContext:function(){return h},UNSAFE_DataRouterStateContext:function(){return f},UNSAFE_NavigationContext:function(){return p},UNSAFE_RouteContext:function(){return m},UNSAFE_mapRouteProperties:function(){return O},UNSAFE_useRouteId:function(){return _},createRoutesFromElements:function(){return function e(t,r){void 0===r&&(r=[]);var a=[];return l.Children.forEach(t,(t,n)=>{if(l.isValidElement(t)){var o=[...r,n];if(t.type===l.Fragment){a.push.apply(a,e(t.props.children,o));return}t.type!==N&&(0,c.UNSAFE_invariant)(!1),!t.props.index||!t.props.children||(0,c.UNSAFE_invariant)(!1);var i={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=e(t.props.children,o)),a.push(i)}}),a}},useHref:function(){return g},useLocation:function(){return E},useMatches:function(){return M},useNavigate:function(){return R},useResolvedPath:function(){return A}});var a,n,o,i,s,u,l=r("6171"),c=r("21921");function d(){return(d=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}).apply(this,arguments)}var h=l.createContext(null),f=l.createContext(null),p=l.createContext(null),v=l.createContext(null),m=l.createContext({outlet:null,matches:[],isDataRoute:!1}),y=l.createContext(null);function g(e,t){var{relative:r}=void 0===t?{}:t;b()||(0,c.UNSAFE_invariant)(!1);var{basename:a,navigator:n}=l.useContext(p),{hash:o,pathname:i,search:s}=A(e,{relative:r}),u=i;return"/"!==a&&(u="/"===i?a:(0,c.joinPaths)([a,i])),n.createHref({pathname:u,search:s,hash:o})}function b(){return null!=l.useContext(v)}function E(){return b()||(0,c.UNSAFE_invariant)(!1),l.useContext(v).location}function w(e){!l.useContext(p).static&&l.useLayoutEffect(e)}function R(){var{isDataRoute:e}=l.useContext(m);return e?function(){var e,t,{router:r}=(e=i.UseNavigateStable,t=l.useContext(h),t||(0,c.UNSAFE_invariant)(!1),t),a=P(s.UseNavigateStable),n=l.useRef(!1);return w(()=>{n.current=!0}),l.useCallback(function(e,t){void 0===t&&(t={}),n.current&&("number"==typeof e?r.navigate(e):r.navigate(e,d({fromRouteId:a},t)))},[r,a])}():function(){b()||(0,c.UNSAFE_invariant)(!1);var{basename:e,navigator:t}=l.useContext(p),{matches:r}=l.useContext(m),{pathname:a}=E(),n=JSON.stringify((0,c.UNSAFE_getPathContributingMatches)(r).map(e=>e.pathnameBase)),o=l.useRef(!1);return w(()=>{o.current=!0}),l.useCallback(function(r,i){if(void 0===i&&(i={}),o.current){if("number"==typeof r){t.go(r);return}var s=(0,c.resolveTo)(r,JSON.parse(n),a,"path"===i.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:(0,c.joinPaths)([e,s.pathname])),(i.replace?t.replace:t.push)(s,i.state,i)}},[e,t,n,a])}()}var S=l.createContext(null);function A(e,t){var{relative:r}=void 0===t?{}:t,{matches:a}=l.useContext(m),{pathname:n}=E(),o=JSON.stringify((0,c.UNSAFE_getPathContributingMatches)(a).map(e=>e.pathnameBase));return l.useMemo(()=>(0,c.resolveTo)(e,JSON.parse(o),n,"path"===r),[e,o,n,r])}var D=l.createElement(function(){var e=function(){var e,t=l.useContext(y),r=U(s.UseRouteError),a=P(s.UseRouteError);return t?t:null==(e=r.errors)?void 0:e[a]}(),t=(0,c.isRouteErrorResponse)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),r?l.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)},null);class x extends l.Component{static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?l.createElement(m.Provider,{value:this.props.routeContext},l.createElement(y.Provider,{value:this.state.error,children:this.props.component})):this.props.children}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}}function C(e){var{routeContext:t,match:r,children:a}=e,n=l.useContext(h);return n&&n.static&&n.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=r.route.id),l.createElement(m.Provider,{value:t},a)}(a=i||(i={})).UseBlocker="useBlocker",a.UseRevalidator="useRevalidator",a.UseNavigateStable="useNavigate",(n=s||(s={})).UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId";function U(e){var t=l.useContext(f);return t||(0,c.UNSAFE_invariant)(!1),t}function P(e){var t,r,a=(t=0,r=l.useContext(m),r||(0,c.UNSAFE_invariant)(!1),r),n=a.matches[a.matches.length-1];return n.route.id||(0,c.UNSAFE_invariant)(!1),n.route.id}function _(){return P(s.UseRouteId)}function M(){var{matches:e,loaderData:t}=U(s.UseMatches);return l.useMemo(()=>e.map(e=>{var{pathname:r,params:a}=e;return{id:e.route.id,pathname:r,params:a,data:t[e.route.id],handle:e.route.handle}}),[e,t])}function k(e){var{fallbackElement:t,router:r}=e,[a,n]=l.useState(r.state);l.useLayoutEffect(()=>r.subscribe(n),[r,n]);var o=l.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,a)=>r.navigate(e,{state:t,preventScrollReset:null==a?void 0:a.preventScrollReset}),replace:(e,t,a)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==a?void 0:a.preventScrollReset})}),[r]),i=r.basename||"/",s=l.useMemo(()=>({router:r,navigator:o,static:!1,basename:i}),[r,o,i]);return l.createElement(l.Fragment,null,l.createElement(h.Provider,{value:s},l.createElement(f.Provider,{value:a},l.createElement(B,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:o},r.state.initialized?l.createElement(F,{routes:r.routes,state:a}):t))),null)}function F(e){var{routes:t,state:r}=e;return function(e,t,r){b()||(0,c.UNSAFE_invariant)(!1);var{navigator:a}=l.useContext(p),{matches:n}=l.useContext(m),o=n[n.length-1],i=o?o.params:{};o&&o.pathname;var s=o?o.pathnameBase:"/";o&&o.route;var u=E();if(t){var h,f,y="string"==typeof t?(0,c.parsePath)(t):t;"/"===s||(null==(f=y.pathname)?void 0:f.startsWith(s))||(0,c.UNSAFE_invariant)(!1),h=y}else h=u;var g=h.pathname||"/",w="/"===s?g:g.slice(s.length)||"/",R=(0,c.matchRoutes)(e,{pathname:w}),S=function(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=null),null==e){if(null==(n=r)||!n.errors)return null;e=r.matches}var a,n,o=e,i=null==(a=r)?void 0:a.errors;if(null!=i){var s=o.findIndex(e=>e.route.id&&(null==i?void 0:i[e.route.id]));s>=0||(0,c.UNSAFE_invariant)(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((e,a,n)=>{var s=a.route.id?null==i?void 0:i[a.route.id]:null,u=null;r&&(u=a.route.errorElement||D);var c=t.concat(o.slice(0,n+1)),d=()=>{var t;return t=s?u:a.route.Component?l.createElement(a.route.Component,null):a.route.element?a.route.element:e,l.createElement(C,{match:a,routeContext:{outlet:e,matches:c,isDataRoute:null!=r},children:t})};return r&&(a.route.ErrorBoundary||a.route.errorElement||0===n)?l.createElement(x,{location:r.location,revalidation:r.revalidation,component:u,error:s,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()},null)}(R&&R.map(e=>Object.assign({},e,{params:Object.assign({},i,e.params),pathname:(0,c.joinPaths)([s,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?s:(0,c.joinPaths)([s,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),n,r);return t&&S?l.createElement(v.Provider,{value:{location:d({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:c.Action.Pop}},S):S}(t,void 0,r)}function L(e){var t,r;return t=e.context,r=l.useContext(m).outlet,r?l.createElement(S.Provider,{value:t},r):r}function N(e){(0,c.UNSAFE_invariant)(!1)}function B(e){var{basename:t="/",children:r=null,location:a,navigationType:n=c.Action.Pop,navigator:o,static:i=!1}=e;b()&&(0,c.UNSAFE_invariant)(!1);var s=t.replace(/^\/*/,"/"),u=l.useMemo(()=>({basename:s,navigator:o,static:i}),[s,o,i]);"string"==typeof a&&(a=(0,c.parsePath)(a));var{pathname:d="/",search:h="",hash:f="",state:m=null,key:y="default"}=a,g=l.useMemo(()=>{var e=(0,c.stripBasename)(d,s);return null==e?null:{location:{pathname:e,search:h,hash:f,state:m,key:y},navigationType:n}},[s,d,h,f,m,y,n]);return null==g?null:l.createElement(p.Provider,{value:u},l.createElement(v.Provider,{children:r,value:g}))}(o=u||(u={}))[o.pending=0]="pending",o[o.success=1]="success",o[o.error=2]="error",new Promise(()=>{});function O(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:l.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:l.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}}}]);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router DOM v6.11.1
2
+ * React Router v6.11.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -21,7 +21,7 @@
21
21
  */
22
22
 
23
23
  /**
24
- * React Router v6.11.1
24
+ * React Router DOM v6.11.1
25
25
  *
26
26
  * Copyright (c) Remix Software Inc.
27
27
  *