@modern-js/devtools-client 2.39.0 → 2.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html/main/index.html +2 -2
- package/dist/modern.config.json +1 -1
- package/dist/routes-manifest.json +3 -3
- package/dist/static/js/lib-router.58db29f2.js +1 -0
- package/dist/static/js/{lib-router.34126dbe.js.LICENSE.txt → lib-router.58db29f2.js.LICENSE.txt} +3 -3
- package/dist/static/js/lib-router.58db29f2.js.map +1 -0
- package/dist/static/js/main.8e5d477a.js +1 -0
- package/dist/static/js/main.8e5d477a.js.map +1 -0
- package/package.json +11 -11
- package/dist/static/js/lib-router.34126dbe.js +0 -1
- package/dist/static/js/lib-router.34126dbe.js.map +0 -1
- package/dist/static/js/main.8ca73d77.js +0 -1
- package/dist/static/js/main.8ca73d77.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_modern_js_devtools_client=self.webpackChunk_modern_js_devtools_client||[]).push([["lib-router"],{62425:function(e,t,r){"use strict";r.r(t),r.d(t,{Action:function(){return o},ErrorResponse:function(){return N},UNSAFE_getPathContributingMatches:function(){return C},UNSAFE_invariant:function(){return h},createBrowserHistory:function(){return c},createHashHistory:function(){return d},createPath:function(){return m},createRouter:function(){return Y},isRouteErrorResponse:function(){return j},joinPaths:function(){return A},matchPath:function(){return S},matchRoutes:function(){return w},parsePath:function(){return y},redirect:function(){return M},resolveTo:function(){return U},stripBasename:function(){return D}});var n,a,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 n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}(n=o||(o={})).Pop="POP",n.Push="PUSH",n.Replace="REPLACE";var l="popstate";function c(e){return void 0===e&&(e={}),g(function(e,t){var{pathname:r,search:n,hash:a}=e.location;return p("",{pathname:r,search:n,hash:a},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:n="",hash:a=""}=y(e.location.hash.substr(1));return!r.startsWith("/")&&!r.startsWith(".")&&(r="/"+r),p("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){var r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){var a=e.location.href,o=a.indexOf("#");n=-1===o?a:a.slice(0,o)}return n+"#"+("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 v(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,r,n){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||n||Math.random().toString(36).substr(2,8)})}function m(e){var{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),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 n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function g(e,t,r,n){void 0===n&&(n={});var{window:a=document.defaultView,v5Compat:i=!1}=n,s=a.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"!==a.location.origin?a.location.origin:a.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(a,s)},listen(e){if(d)throw Error("A history only accepts one active listener");return a.addEventListener(l,g),d=e,()=>{a.removeEventListener(l,g),d=null}},createHref:e=>t(a,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 n=p(E.location,e,t);r&&r(n,e);var u=v(n,f=y()+1),l=E.createHref(n);try{s.pushState(u,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(l)}i&&d&&d({action:c,location:E.location,delta:1})},replace:function(e,t){c=o.Replace;var n=p(E.location,e,t);r&&r(n,e);var a=v(n,f=y()),u=E.createHref(n);s.replaceState(a,"",u),i&&d&&d({action:c,location:E.location,delta:0})},go:e=>s.go(e)};return E}(a=i||(i={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";var b=new Set(["lazy","caseSensitive","path","id","index","children"]);function E(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map((e,a)=>{var o=[...r,a],i="string"==typeof e.id?e.id:o.join("-");if(h(!0!==e.index||!e.children,"Cannot specify children on an index route"),h(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){var s=u({},e,t(e),{id:i});return n[i]=s,s}var l=u({},e,t(e),{id:i,children:void 0});return n[i]=l,e.children&&(l.children=E(e.children,t,o,n)),l})}function w(e,t,r){void 0===r&&(r="/");var n=D(("string"==typeof t?y(t):t).pathname||"/",r);if(null==n)return null;var a=function e(t,r,n,a){void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===a&&(a="");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(a),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+a)+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(a.length));var u=A([a,s.relativePath]),l=n.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("/"),n=r.length;return r.some(x)&&(n+=-2),t&&(n+=2),r.filter(e=>!x(e)).reduce((e,t)=>e+(R.test(t)?3:""===t?1:10),n)}(u,t.index),routesMeta:l})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(var n of function e(t){var r=t.split("/");if(0===r.length)return[];var[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];var s=e(a.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,n);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)))})(a);for(var o=null,i=0;null==o&&i<a.length;++i)o=function(e,t){for(var{routesMeta:r}=e,n={},a="/",o=[],i=0;i<r.length;++i){var s=r[i],u=i===r.length-1,l="/"===a?t:t.slice(a.length)||"/",c=S({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);if(!c)return null;Object.assign(n,c.params);var d=s.route;o.push({params:n,pathname:A([a,c.pathname]),pathnameBase:_(A([a,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(a=A([a,c.pathnameBase]))}return o}(a[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}}(n));return o}var R=/^:\w+$/,x=e=>"*"===e;function S(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var[r,n]=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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(e,t)=>(n.push(t),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;var o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((e,t,r)=>{if("*"===t){var n=s[r]||"";i=o.slice(0,o.length-n.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}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function P(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n))+"]. 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 C(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function U(e,t,r,n){void 0===n&&(n=!1),"string"==typeof e?a=y(e):(h(!(a=u({},e)).pathname||!a.pathname.includes("?"),P("?","pathname","search",a)),h(!a.pathname||!a.pathname.includes("#"),P("#","pathname","hash",a)),h(!a.search||!a.search.includes("#"),P("#","search","hash",a)));var a,o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(n||null==s)o=r;else{var l=t.length-1;if(s.startsWith("..")){for(var c=s.split("/");".."===c[0];)c.shift(),l-=1;a.pathname=c.join("/")}o=l>=0?t[l]:"/"}var d=function(e,t){void 0===t&&(t="/");var{pathname:r,search:n="",hash:a=""}="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:L(n),hash:k(a)}}(a,o),f=s&&"/"!==s&&s.endsWith("/"),v=(i||"."===s)&&r.endsWith("/");return!d.pathname.endsWith("/")&&(f||v)&&(d.pathname+="/"),d}var A=e=>e.join("/").replace(/\/\/+/g,"/"),_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),L=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",k=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",M=function(e,t){void 0===t&&(t=302);var r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);var n=new Headers(r.headers);return n.set("Location",e),new Response(null,u({},r,{headers:n}))};class N{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function j(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"],B=new Set(F),O=["get",...F],T=new Set(O),z=new Set([301,302,303,307,308]),I=new Set([307,308]),H={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},W={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},q=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,J=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function Y(e){var t,r,n,a,l=e.window?e.window:"undefined"!=typeof window?window:void 0,c=void 0!==l&&void 0!==l.document&&void 0!==l.document.createElement,d=!c;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 v=e.detectErrorBoundary;t=e=>({hasErrorBoundary:v(e)})}else t=J;var m={},y=E(e.routes,t,void 0,m),g=e.basename||"/",b=u({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),R=null,x=new Set,S=null,P=null,C=null,U=null!=e.hydrationData,A=w(y,e.history.location,g),_=null;if(null==A){var L=ec(404,{pathname:e.history.location.pathname}),{matches:k,route:M}=el(y);A=k,_={[M.id]:L}}var N=!A.some(e=>e.route.lazy)&&(!A.some(e=>e.route.loader)||null!=e.hydrationData),j={historyAction:e.history.action,location:e.history.location,matches:A,initialized:N,navigation:H,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||_,fetchers:new Map,blockers:new Map},F=o.Pop,B=!1,O=!1,T=!1,z=[],Y=[],G=new Map,Q=0,Z=-1,ee=new Map,er=new Set,ea=new Map,eo=new Map,eh=new Map,eg=!1;function eE(e){j=u({},j,e),x.forEach(e=>e(j))}function ew(t,n){var a,i,s,l=null!=j.actionData&&null!=j.navigation.formMethod&&em(j.navigation.formMethod)&&"loading"===j.navigation.state&&(null==(a=t.state)?void 0:a._isRedirect)!==!0;s=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:l?j.actionData:null;var c=n.loaderData?es(j.loaderData,n.loaderData,n.matches||[],n.errors):j.loaderData,d=j.blockers;d.size>0&&(d=new Map(d)).forEach((e,t)=>d.set(t,$));var h=!0===B||null!=j.navigation.formMethod&&em(j.navigation.formMethod)&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;r&&(y=r,r=void 0),O||F===o.Pop||(F===o.Push?e.history.push(t,t.state):F===o.Replace&&e.history.replace(t,t.state)),eE(u({},n,{actionData:s,loaderData:c,historyAction:F,location:t,initialized:!0,navigation:H,revalidation:"idle",restoreScrollPosition:eQ(t,n.matches||j.matches),preventScrollReset:h,blockers:d})),F=o.Pop,B=!1,O=!1,T=!1,z=[],Y=[]}function eC(e,t){return eU.apply(this,arguments)}function eU(){return(eU=(0,s._)(function*(t,r){if("number"==typeof t){e.history.go(t);return}var n=K(j.location,j.matches,g,b.v7_prependBasename,t,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:a,submission:i,error:s}=V(b.v7_normalizeFormMethod,!1,n,r),l=j.location,c=p(j.location,a,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&&em(i.formMethod)&&i.formAction===j.location.pathname+j.location.search&&(h=o.Replace);var f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,v=eV({currentLocation:l,nextLocation:c,historyAction:h});if(v){eK(v,{state:"blocked",location:c,proceed(){eK(v,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),eC(t,r)},reset(){var e=new Map(j.blockers);e.set(v,$),eE({blockers:e})}});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 e_.apply(this,arguments)}function e_(){return(e_=(0,s._)(function*(t,n,o){a&&a.abort(),a=null,F=t,O=!0===(o&&o.startUninterruptedRevalidation),function(e,t){S&&C&&(S[eG(e,t)]=C())}(j.location,j.matches),B=!0===(o&&o.preventScrollReset);var i,s,l=r||y,c=o&&o.overrideNavigation,d=w(l,n,g);if(!d){var h=ec(404,{pathname:n.pathname}),{matches:f,route:v}=el(l);eX(),ew(n,{matches:f,loaderData:{},errors:{[v.id]:h}});return}if(j.initialized&&!T&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(j.location,n)&&!(o&&o.submission&&em(o.submission.formMethod))){ew(n,{matches:d});return}a=new AbortController;var p=en(e.history,n,a.signal,o&&o.submission);if(o&&o.pendingError)s={[eu(d).route.id]:o.pendingError};else if(o&&o.submission&&em(o.submission.formMethod)){var m=yield function(e,t,r,n,a){return eL.apply(this,arguments)}(p,n,o.submission,d,{replace:o.replace});if(m.shortCircuited)return;i=m.pendingActionData,s=m.pendingActionError,c=eS(n,o.submission),p=new Request(p.url,{signal:p.signal})}var{shortCircuited:b,loaderData:E,errors:R}=yield function(e,t,r,n,a,o,i,s,u){return ek.apply(this,arguments)}(p,n,d,c,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,i,s);!b&&(a=null,ew(n,u({matches:d},i?{actionData:i}:{},{loaderData:E,errors:R})))})).apply(this,arguments)}function eL(){return(eL=(0,s._)(function*(e,r,n,a,s){void 0===s&&(s={}),ez(),eE({navigation:function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(r,n)});var u,l,c=eR(a,r);if(c.route.action||c.route.lazy){if(u=yield et("action",e,c,a,m,t,g),e.signal.aborted)return{shortCircuited:!0}}else u={type:i.error,error:ec(405,{method:e.method,pathname:r.pathname,routeId:c.route.id})};if(ep(u))return l=s&&null!=s.replace?s.replace:u.location===j.location.pathname+j.location.search,yield eF(j,u,{submission:n,replace:l}),{shortCircuited:!0};if(ev(u)){var d=eu(a,c.route.id);return!0!==(s&&s.replace)&&(F=o.Push),{pendingActionData:{},pendingActionError:{[d.route.id]:u.error}}}if(ef(u))throw ec(400,{type:"defer-action"});return{pendingActionData:{[c.route.id]:u.data}}})).apply(this,arguments)}function ek(){return(ek=(0,s._)(function*(t,n,o,i,s,l,c,d,h){var f=i||eS(n,s),v=s||l||ex(f),p=r||y,[m,b]=X(e.history,j,o,v,n,T,z,Y,ea,er,p,g,d,h);if(eX(e=>!(o&&o.some(t=>t.route.id===e))||m&&m.some(t=>t.route.id===e)),Z=++Q,0===m.length&&0===b.length){var E=eq();return ew(n,u({matches:o,loaderData:{},errors:h||null},d?{actionData:d}:{},E?{fetchers:new Map(j.fetchers)}:{})),{shortCircuited:!0}}if(!O){b.forEach(e=>{var t=j.fetchers.get(e.key),r=eD(void 0,t?t.data:void 0);j.fetchers.set(e.key,r)});var w=d||j.actionData;eE(u({navigation:f},w?0===Object.keys(w).length?{actionData:null}:{actionData:w}:{},b.length>0?{fetchers:new Map(j.fetchers)}:{}))}b.forEach(e=>{G.has(e.key)&&eW(e.key),e.controller&&G.set(e.key,e.controller)});var R=()=>b.forEach(e=>eW(e.key));a&&a.signal.addEventListener("abort",R);var{results:x,loaderResults:S,fetcherResults:D}=yield eO(j.matches,o,m,b,t);if(t.signal.aborted)return{shortCircuited:!0};a&&a.signal.removeEventListener("abort",R),b.forEach(e=>G.delete(e.key));var P=ed(x);if(P){if(P.idx>=m.length){var C=b[P.idx-m.length].key;er.add(C)}return yield eF(j,P.result,{replace:c}),{shortCircuited:!0}}var{loaderData:U,errors:A}=ei(j,o,m,S,h,b,D,eo);eo.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&eo.delete(t)})});var _=eq(),L=eJ(Z),k=_||L||b.length>0;return u({loaderData:U,errors:A},k?{fetchers:new Map(j.fetchers)}:{})})).apply(this,arguments)}function eM(e){return j.fetchers.get(e)||W}function eN(){return(eN=(0,s._)(function*(n,o,i,s,l,c){if(ez(),ea.delete(n),!s.route.action&&!s.route.lazy){var d=ec(405,{method:c.formMethod,pathname:i,routeId:o});eI(n,o,d);return}var f=function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}(c,j.fetchers.get(n));j.fetchers.set(n,f),eE({fetchers:new Map(j.fetchers)});var v=new AbortController,p=en(e.history,i,v.signal,c);G.set(n,v);var b=Q,E=yield et("action",p,s,l,m,t,g);if(p.signal.aborted){G.get(n)===v&&G.delete(n);return}if(ep(E)){if(G.delete(n),Z>b){var R=eP(void 0);j.fetchers.set(n,R),eE({fetchers:new Map(j.fetchers)});return}er.add(n);var x=eD(c);return j.fetchers.set(n,x),eE({fetchers:new Map(j.fetchers)}),eF(j,E,{submission:c,isFetchActionRedirect:!0})}if(ev(E)){eI(n,o,E.error);return}if(ef(E))throw ec(400,{type:"defer-action"});var S=j.navigation.location||j.location,D=en(e.history,S,v.signal),P=r||y,C="idle"!==j.navigation.state?w(P,j.navigation.location,g):j.matches;h(C,"Didn't find any matches after fetcher action");var U=++Q;ee.set(n,U);var A=eD(c,E.data);j.fetchers.set(n,A);var[_,L]=X(e.history,j,C,c,S,T,z,Y,ea,er,P,g,{[s.route.id]:E.data},void 0);L.filter(e=>e.key!==n).forEach(e=>{var t=e.key,r=j.fetchers.get(t),n=eD(void 0,r?r.data:void 0);j.fetchers.set(t,n),G.has(t)&&eW(t),e.controller&&G.set(t,e.controller)}),eE({fetchers:new Map(j.fetchers)});var k=()=>L.forEach(e=>eW(e.key));v.signal.addEventListener("abort",k);var{results:M,loaderResults:N,fetcherResults:B}=yield eO(j.matches,C,_,L,D);if(!v.signal.aborted){v.signal.removeEventListener("abort",k),ee.delete(n),G.delete(n),L.forEach(e=>G.delete(e.key));var O=ed(M);if(O){if(O.idx>=_.length){var I=L[O.idx-_.length].key;er.add(I)}return eF(j,O.result)}var{loaderData:H,errors:W}=ei(j,j.matches,_,N,void 0,L,B,eo);if(j.fetchers.has(n)){var $=eP(E.data);j.fetchers.set(n,$)}var q=eJ(U);"loading"===j.navigation.state&&U>Z?(h(F,"Expected pending action"),a&&a.abort(),ew(j.navigation.location,{matches:C,loaderData:H,errors:W,fetchers:new Map(j.fetchers)})):(eE(u({errors:W,loaderData:es(j.loaderData,H,C,W)},q||L.length>0?{fetchers:new Map(j.fetchers)}:{})),T=!1)}})).apply(this,arguments)}function ej(){return(ej=(0,s._)(function*(r,n,a,o,i,s){var u=j.fetchers.get(r),l=eD(s,u?u.data:void 0);j.fetchers.set(r,l),eE({fetchers:new Map(j.fetchers)});var c=new AbortController,d=en(e.history,a,c.signal);G.set(r,c);var f=Q,v=yield et("loader",d,o,i,m,t,g);if(ef(v)&&(v=(yield eb(v,d.signal,!0))||v),G.get(r)===c&&G.delete(r),!d.signal.aborted){if(ep(v)){if(Z>f){var p=eP(void 0);j.fetchers.set(r,p),eE({fetchers:new Map(j.fetchers)});return}er.add(r),yield eF(j,v);return}if(ev(v)){var y=eu(j.matches,n);j.fetchers.delete(r),eE({fetchers:new Map(j.fetchers),errors:{[y.route.id]:v.error}});return}h(!ef(v),"Unhandled fetcher deferred data");var b=eP(v.data);j.fetchers.set(r,b),eE({fetchers:new Map(j.fetchers)})}})).apply(this,arguments)}function eF(e,t,r){return eB.apply(this,arguments)}function eB(){return(eB=(0,s._)(function*(t,r,n){var{submission:i,replace:s,isFetchActionRedirect:d}=void 0===n?{}:n;r.revalidate&&(T=!0);var f=p(t.location,r.location,u({_isRedirect:!0},d?{_isFetchActionRedirect:!0}:{}));if(h(f,"Expected a location on the redirect navigation"),c){var v=!1;if(r.reloadDocument)v=!0;else if(q.test(r.location)){var m=e.history.createURL(r.location);v=m.origin!==l.location.origin||null==D(m.pathname,g)}if(v){s?l.location.replace(r.location):l.location.assign(r.location);return}}a=null;var y=!0===s?o.Replace:o.Push,b=i||ex(t.navigation);if(I.has(r.status)&&b&&em(b.formMethod))yield eA(y,f,{submission:u({},b,{formAction:r.location}),preventScrollReset:B});else if(d)yield eA(y,f,{overrideNavigation:eS(f),fetcherSubmission:b,preventScrollReset:B});else{var E=eS(f,b);yield eA(y,f,{overrideNavigation:E,preventScrollReset:B})}})).apply(this,arguments)}function eO(e,t,r,n,a){return eT.apply(this,arguments)}function eT(){return(eT=(0,s._)(function*(r,n,a,o,s){var u=yield Promise.all([...a.map(e=>et("loader",s,e,n,m,t,g)),...o.map(r=>r.matches&&r.match&&r.controller?et("loader",en(e.history,r.path,r.controller.signal),r.match,r.matches,m,t,g):{type:i.error,error:ec(404,{pathname:r.path})})]),l=u.slice(0,a.length),c=u.slice(a.length);return yield Promise.all([ey(r,a,l,l.map(()=>s.signal),!1,j.loaderData),ey(r,o.map(e=>e.match),c,o.map(e=>e.controller?e.controller.signal:null),!0)]),{results:u,loaderResults:l,fetcherResults:c}})).apply(this,arguments)}function ez(){T=!0,z.push(...eX()),ea.forEach((e,t)=>{G.has(t)&&(Y.push(t),eW(t))})}function eI(e,t,r){var n=eu(j.matches,t);eH(e),eE({errors:{[n.route.id]:r},fetchers:new Map(j.fetchers)})}function eH(e){var t=j.fetchers.get(e);G.has(e)&&!(t&&"loading"===t.state&&ee.has(e))&&eW(e),ea.delete(e),ee.delete(e),er.delete(e),j.fetchers.delete(e)}function eW(e){var t=G.get(e);h(t,"Expected fetch controller: "+e),t.abort(),G.delete(e)}function e$(e){for(var t of e){var r=eP(eM(t).data);j.fetchers.set(t,r)}}function eq(){var e=[],t=!1;for(var r of er){var n=j.fetchers.get(r);h(n,"Expected fetcher: "+r),"loading"===n.state&&(er.delete(r),e.push(r),t=!0)}return e$(e),t}function eJ(e){var t=[];for(var[r,n]of ee)if(n<e){var a=j.fetchers.get(r);h(a,"Expected fetcher: "+r),"loading"===a.state&&(eW(r),ee.delete(r),t.push(r))}return e$(t),t.length>0}function eY(e){j.blockers.delete(e),eh.delete(e)}function eK(e,t){var r=j.blockers.get(e)||$;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);var n=new Map(j.blockers);n.set(e,t),eE({blockers:n})}function eV(e){var{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0!==eh.size){eh.size>1&&f(!1,"A router only supports one blocker at a time");var a=Array.from(eh.entries()),[o,i]=a[a.length-1],s=j.blockers.get(o);if((!s||"proceeding"!==s.state)&&i({currentLocation:t,nextLocation:r,historyAction:n}))return o}}function eX(e){var t=[];return eo.forEach((r,n)=>{(!e||e(n))&&(r.cancel(),t.push(n),eo.delete(n))}),t}function eG(e,t){return P&&P(e,t.map(e=>(function(e,t){var{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}})(e,j.loaderData)))||e.key}function eQ(e,t){if(S){var r=S[eG(e,t)];if("number"==typeof r)return r}return null}return n={get basename(){return g},get state(){return j},get routes(){return y},initialize:function(){return R=e.history.listen(t=>{var{action:r,location:n,delta:a}=t;if(eg){eg=!1;return}f(0===eh.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");var o=eV({currentLocation:j.location,nextLocation:n,historyAction:r});if(o&&null!=a){eg=!0,e.history.go(-1*a),eK(o,{state:"blocked",location:n,proceed(){eK(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(a)},reset(){var e=new Map(j.blockers);e.set(o,$),eE({blockers:e})}});return}return eA(r,n)}),!j.initialized&&eA(o.Pop,j.location),n},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,r){if(S=e,C=t,P=r||null,!U&&j.navigation===H){U=!0;var n=eQ(j.location,j.matches);null!=n&&eE({restoreScrollPosition:n})}return()=>{S=null,C=null,P=null}},navigate:eC,fetch:function(e,t,n,a){if(d)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.");G.has(e)&&eW(e);var o=r||y,i=K(j.location,j.matches,g,b.v7_prependBasename,n,t,null==a?void 0:a.relative),s=w(o,i,g);if(!s){eI(e,t,ec(404,{pathname:i}));return}var{path:u,submission:l,error:c}=V(b.v7_normalizeFormMethod,!0,i,a);if(c){eI(e,t,c);return}var h=eR(s,u);if(B=!0===(a&&a.preventScrollReset),l&&em(l.formMethod)){(function(e,t,r,n,a,o){eN.apply(this,arguments)})(e,t,u,h,s,l);return}ea.set(e,{routeId:t,path:u}),function(e,t,r,n,a,o){ej.apply(this,arguments)}(e,t,u,h,s,l)},revalidate:function(){if(ez(),eE({revalidation:"loading"}),"submitting"!==j.navigation.state){if("idle"===j.navigation.state){eA(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}eA(F||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eM,deleteFetcher:eH,dispose:function(){R&&R(),x.clear(),a&&a.abort(),j.fetchers.forEach((e,t)=>eH(t)),j.blockers.forEach((e,t)=>eY(t))},getBlocker:function(e,t){var r=j.blockers.get(e)||$;return eh.get(e)!==t&&eh.set(e,t),r},deleteBlocker:eY,_internalFetchControllers:G,_internalActiveDeferreds:eo,_internalSetRoutes:function(e){r=E(e,t,void 0,m={})}}}Symbol("deferred");function K(e,t,r,n,a,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=U(a||".",C(u).map(e=>e.pathnameBase),D(e.pathname,r)||e.pathname,"path"===i);return null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&l&&l.route.index&&!ew(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(c.pathname="/"===c.pathname?r:A([r,c.pathname])),m(c)}function V(e,t,r,n){if(!n||!(null!=(a=n)&&("formData"in a&&null!=a.formData||"body"in a&&void 0!==a.body)))return{path:r};if(n.formMethod&&!function(e){return T.has(e.toLowerCase())}(n.formMethod))return{path:r,error:ec(405,{method:n.formMethod})};var a,o,i,s=()=>({path:r,error:ec(400,{type:"invalid-body"})}),u=n.formMethod||"get",l=e?u.toUpperCase():u.toLowerCase(),c=eh(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!em(l))return s();var d="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,t)=>{var[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}if("application/json"===n.formEncType){if(!em(l))return s();try{var f="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch(e){return s()}}}if(h("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=ea(n.formData),i=n.formData;else if(n.body instanceof FormData)o=ea(n.body),i=n.body;else if(n.body instanceof URLSearchParams)i=eo(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(n.body),i=eo(o)}catch(e){return s()}var v={formMethod:l,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(em(v.formMethod))return{path:r,submission:v};var p=y(r);return t&&p.search&&ew(p.search)&&o.append("index",""),p.search="?"+o,{path:m(p),submission:v}}function X(e,t,r,n,a,o,i,s,l,c,d,h,f,v){var p=v?Object.values(v)[0]:f?Object.values(f)[0]:void 0,m=e.createURL(t.location),y=e.createURL(a),g=(function(e,t){var r=e;if(t){var n=e.findIndex(e=>e.route.id===t);n>=0&&(r=e.slice(0,n))}return r})(r,v?Object.keys(v)[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 n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}(t.loaderData,t.matches[r],e)||i.some(t=>t===e.route.id))return!0;var a=t.matches[r];return Q(e,u({currentUrl:m,currentParams:a.params,nextUrl:y,nextParams:e.params},n,{actionResult:p,defaultShouldRevalidate:o||m.pathname+m.search===y.pathname+y.search||m.search!==y.search||G(a,e)}))}),b=[];return l.forEach((e,a)=>{if(r.some(t=>t.route.id===e.routeId)){var i=w(d,e.path,h);if(!i){b.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}var l=t.fetchers.get(a),f=eR(i,e.path),v=!1;(v=!c.has(a)&&(!!s.includes(a)||(l&&"idle"!==l.state&&void 0===l.data?o:Q(f,u({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:p,defaultShouldRevalidate:o})))))&&b.push({key:a,routeId:e.routeId,path:e.path,matches:i,match:f,controller:new AbortController})}}),[g,b]}function G(e,t){var r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Q(e,t){if(e.route.shouldRevalidate){var r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function Z(e,t,r){return ee.apply(this,arguments)}function ee(){return(ee=(0,s._)(function*(e,t,r){if(!!e.lazy){var n=yield e.lazy();if(e.lazy){var a=r[e.id];h(a,"No route found in manifest");var o={};for(var i in n){var s=void 0!==a[i]&&"hasErrorBoundary"!==i;f(!s,'Route "'+a.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]=n[i])}Object.assign(a,o),Object.assign(a,u({},t(a),{lazy:void 0}))}}})).apply(this,arguments)}function et(e,t,r,n,a,o,i,s){return er.apply(this,arguments)}function er(){return(er=(0,s._)(function*(e,t,r,n,a,o,s,u){void 0===u&&(u={});var l,c,d=e=>{var n,a=new Promise((e,t)=>n=t);return E=()=>n(),t.signal.addEventListener("abort",E),Promise.race([e({request:t,params:r.params,context:u.requestContext}),a])};try{var f=r.route[e];if(r.route.lazy){if(f)b=(yield Promise.all([d(f),Z(r.route,o,a)]))[0];else if(yield Z(r.route,o,a),f=r.route[e])b=yield d(f);else{if("action"!==e)return{type:i.data,data:void 0};var v=new URL(t.url),p=v.pathname+v.search;throw ec(405,{method:t.method,pathname:p,routeId:r.route.id})}}else if(f)b=yield d(f);else{var m=new URL(t.url),y=m.pathname+m.search;throw ec(404,{pathname:y})}h(void 0!==b,"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){g=i.error,b=e}finally{E&&t.signal.removeEventListener("abort",E)}if(function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}(b)){var g,b,E,w,R=b.status;if(z.has(R)){var x=b.headers.get("Location");if(h(x,"Redirects returned/thrown from loaders/actions must have a Location header"),q.test(x)){if(!u.isStaticRequest){var S=new URL(t.url),P=new URL(x.startsWith("//")?S.protocol+x:x),C=null!=D(P.pathname,s);P.origin===S.origin&&C&&(x=P.pathname+P.search+P.hash)}}else x=K(new URL(t.url),n.slice(0,n.indexOf(r)+1),s,!0,x);if(u.isStaticRequest)throw b.headers.set("Location",x),b;return{type:i.redirect,status:R,location:x,revalidate:null!==b.headers.get("X-Remix-Revalidate"),reloadDocument:null!==b.headers.get("X-Remix-Reload-Document")}}if(u.isRouteRequest)throw{type:g===i.error?i.error:i.data,response:b};var U=b.headers.get("Content-Type");return(w=U&&/\bapplication\/json\b/.test(U)?yield b.json():yield b.text(),g===i.error)?{type:g,error:new N(R,b.statusText,w),headers:b.headers}:{type:i.data,data:w,statusCode:b.status,headers:b.headers}}return g===i.error?{type:g,error:b}:function(e){return e&&"object"==typeof e&&"object"==typeof e.data&&"function"==typeof e.subscribe&&"function"==typeof e.cancel&&"function"==typeof e.resolveData}(b)?{type:i.deferred,deferredData:b,statusCode:null==(l=b.init)?void 0:l.status,headers:(null==(c=b.init)?void 0:c.headers)&&new Headers(b.init.headers)}:{type:i.data,data:b}})).apply(this,arguments)}function en(e,t,r,n){var a=e.createURL(eh(t)).toString(),o={signal:r};if(n&&em(n.formMethod)){var{formMethod:i,formEncType:s}=n;o.method=i.toUpperCase(),"application/json"===s?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):"text/plain"===s?o.body=n.text:"application/x-www-form-urlencoded"===s&&n.formData?o.body=ea(n.formData):o.body=n.formData}return new Request(a,o)}function ea(e){var t=new URLSearchParams;for(var[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function eo(e){var t=new FormData;for(var[r,n]of e.entries())t.append(r,n);return t}function ei(e,t,r,n,a,o,i,s){for(var l,c,d,f,v,p,m,y,g,b,{loaderData:E,errors:w}=(l=t,c=r,d=n,f=a,v=s,m={},y=null,g=!1,b={},d.forEach((e,t)=>{var r=c[t].route.id;if(h(!ep(e),"Cannot handle redirect results in processLoaderData"),ev(e)){var n=eu(l,r),a=e.error;f&&(a=Object.values(f)[0],f=void 0),null==(y=y||{})[n.route.id]&&(y[n.route.id]=a),m[r]=void 0,!g&&(g=!0,p=j(e.error)?e.error.status:500),e.headers&&(b[r]=e.headers)}else ef(e)?(v.set(r,e.deferredData),m[r]=e.deferredData.data):m[r]=e.data,null!=e.statusCode&&200!==e.statusCode&&!g&&(p=e.statusCode),e.headers&&(b[r]=e.headers)}),f&&(y=f,m[Object.keys(f)[0]]=void 0),{loaderData:m,errors:y,statusCode:p||200,loaderHeaders:b}),R=0;R<o.length;R++){var{key:x,match:S,controller:D}=o[R];h(void 0!==i&&void 0!==i[R],"Did not find corresponding fetcher result");var P=i[R];if(!D||!D.signal.aborted)if(ev(P)){var C=eu(e.matches,null==S?void 0:S.route.id);!(w&&w[C.route.id])&&(w=u({},w,{[C.route.id]:P.error})),e.fetchers.delete(x)}else if(ep(P))h(!1,"Unhandled fetcher revalidation redirect");else if(ef(P))h(!1,"Unhandled fetcher deferred data");else{var U=eP(P.data);e.fetchers.set(x,U)}}return{loaderData:E,errors:w}}function es(e,t,r,n){var a=u({},t);for(var o of r){var i=o.route.id;if(t.hasOwnProperty(i)?void 0!==t[i]&&(a[i]=t[i]):void 0!==e[i]&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function eu(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 el(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 ec(e,t){var{pathname:r,routeId:n,method:a,type:o}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n)+'", so there is no way to handle the request.':"defer-action"===o?s="defer() is not supported in actions":"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",s='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n)+'", so there is no way to handle the request.':a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new N(e||500,i,Error(s),!0)}function ed(e){for(var t=e.length-1;t>=0;t--){var r=e[t];if(ep(r))return{result:r,idx:t}}}function eh(e){var t="string"==typeof e?y(e):e;return m(u({},t,{hash:""}))}function ef(e){return e.type===i.deferred}function ev(e){return e.type===i.error}function ep(e){return(e&&e.type)===i.redirect}function em(e){return B.has(e.toLowerCase())}function ey(e,t,r,n,a,o){return eg.apply(this,arguments)}function eg(){return(eg=(0,s._)(function*(e,t,r,n,a,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&&!G(l,u)&&(o&&o[u.route.id])!==void 0;if(ef(s)&&(a||c)){var d=n[i];h(d,"Expected an AbortSignal for revalidating fetcher deferred result"),yield eb(s,d,a).then(e=>{e&&(r[i]=e||r[i])})}},s=0;s<r.length;s++)yield*i(s)})).apply(this,arguments)}function eb(e,t,r){return eE.apply(this,arguments)}function eE(){return(eE=(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 ew(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eR(e,t){var r="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&ew(r||""))return e[e.length-1];var n=C(e);return n[n.length-1]}function ex(e){var{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};else if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function eS(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eD(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function eP(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}},60421: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},matchPath:function(){return u.matchPath},matchRoutes:function(){return u.matchRoutes},redirect:function(){return u.redirect},useHref:function(){return u.useHref},useLocation:function(){return u.useLocation},useMatches:function(){return u.useMatches},useNavigate:function(){return u.useNavigate},useParams:function(){return u.useParams},useResolvedPath:function(){return u.useResolvedPath},Link:function(){return D},NavLink:function(){return P},createBrowserRouter:function(){return E},createHashRouter:function(){return w}});var n,a,o,i,s=r("6171"),u=r("63962"),l=r("62425");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 n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var h="application/x-www-form-urlencoded";function f(e){return null!=e&&"string"==typeof e.tagName}var v=null,p=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function m(e){return null==e||p.has(e)?e:null}var y=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],g=["aria-current","caseSensitive","className","end","style","to","children"],b=["reloadDocument","replace","state","method","action","onSubmit","submit","relative","preventScrollReset"];function E(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)||R(),routes:e,mapRouteProperties:u.UNSAFE_mapRouteProperties}).initialize()}function w(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)||R(),routes:e,mapRouteProperties:u.UNSAFE_mapRouteProperties}).initialize()}function R(){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[n,a]of t)if(a&&"RouteErrorResponse"===a.__type)r[n]=new l.ErrorResponse(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if(a.__subType){var o=window[a.__subType];if("function"==typeof o)try{var i=new o(a.message);i.stack="",r[n]=i}catch(e){}}if(null==r[n]){var s=Error(a.message);s.stack="",r[n]=s}}else r[n]=a;return r}(t.errors)})),t}s.startTransition;var x="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,S=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,D=s.forwardRef(function(e,t){var r,{onClick:n,relative:a,reloadDocument:o,replace:i,state:h,target:f,to:v,preventScrollReset:p}=e,m=d(e,y),{basename:g}=s.useContext(u.UNSAFE_NavigationContext),b=!1;if("string"==typeof v&&S.test(v)&&(r=v,x))try{var E=new URL(window.location.href),w=new URL(v.startsWith("//")?E.protocol+v:v),R=(0,l.stripBasename)(w.pathname,g);w.origin===E.origin&&null!=R?v=R+w.search+w.hash:b=!0}catch(e){}var D=(0,u.useHref)(v,{relative:a}),P=function(e,t){var{target:r,replace:n,state:a,preventScrollReset:o,relative:i}=void 0===t?{}:t,l=(0,u.useNavigate)(),c=(0,u.useLocation)(),d=(0,u.useResolvedPath)(e,{relative:i});return s.useCallback(t=>{var s,h,f;if(s=t,h=r,0===s.button&&(!h||"_self"===h)&&!((f=s).metaKey||f.altKey||f.ctrlKey||f.shiftKey))t.preventDefault(),l(e,{replace:void 0!==n?n:(0,u.createPath)(c)===(0,u.createPath)(d),state:a,preventScrollReset:o,relative:i})},[c,l,d,n,a,r,e,o,i])}(v,{replace:i,state:h,target:f,preventScrollReset:p,relative:a});return s.createElement("a",c({},m,{href:r||D,onClick:b||o?n:function(e){n&&n(e),!e.defaultPrevented&&P(e)},ref:t,target:f}))}),P=s.forwardRef(function(e,t){var r,{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:h,children:f}=e,v=d(e,g),p=(0,u.useResolvedPath)(h,{relative:v.relative}),m=(0,u.useLocation)(),y=s.useContext(u.UNSAFE_DataRouterStateContext),{navigator:b}=s.useContext(u.UNSAFE_NavigationContext),E=b.encodeLocation?b.encodeLocation(p).pathname:p.pathname,w=m.pathname,R=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;!a&&(w=w.toLowerCase(),R=R?R.toLowerCase():null,E=E.toLowerCase());var x=w===E||!i&&w.startsWith(E)&&"/"===w.charAt(E.length),S=null!=R&&(R===E||!i&&R.startsWith(E)&&"/"===R.charAt(E.length)),P=x?n:void 0;r="function"==typeof o?o({isActive:x,isPending:S}):[o,x?"active":null,S?"pending":null].filter(Boolean).join(" ");var C="function"==typeof l?l({isActive:x,isPending:S}):l;return s.createElement(D,c({},v,{"aria-current":P,className:r,ref:t,style:C,to:h}),"function"==typeof f?f({isActive:x,isPending:S}):f)}),C=s.forwardRef((e,t)=>{var{reloadDocument:r,replace:n,state:a,method:o="get",action:i,onSubmit:h,submit:f,relative:v,preventScrollReset:p}=e,m=d(e,b),y="get"===o.toLowerCase()?"get":"post",g=function(e,t){var{relative:r}=void 0===t?{}:t,{basename:n}=s.useContext(u.UNSAFE_NavigationContext),a=s.useContext(u.UNSAFE_RouteContext);a||(0,l.UNSAFE_invariant)(!1);var[o]=a.matches.slice(-1),i=c({},(0,u.useResolvedPath)(e||".",{relative:r})),d=(0,u.useLocation)();if(null==e&&(i.search=d.search,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"),"/"!==n&&(i.pathname="/"===i.pathname?n:(0,l.joinPaths)([n,i.pathname])),(0,u.createPath)(i)}(i,{relative:v});return s.createElement("form",c({ref:t,method:y,action:g,onSubmit:r?h:e=>{if(h&&h(e),!e.defaultPrevented){e.preventDefault();var t=e.nativeEvent.submitter,r=(null==t?void 0:t.getAttribute("formmethod"))||o;f(t||e.currentTarget,{method:r,replace:n,state:a,relative:v,preventScrollReset:p})}}},m))});(n=o||(o={})).UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",(a=i||(i={})).UseFetchers="useFetchers",a.UseScrollRestoration="useScrollRestoration"},63962:function(e,t,r){"use strict";r.r(t),r.d(t,{createPath:function(){return s.createPath},matchPath:function(){return s.matchPath},matchRoutes:function(){return s.matchRoutes},redirect:function(){return s.redirect},Outlet:function(){return j},Route:function(){return F},RouterProvider:function(){return M},UNSAFE_DataRouterContext:function(){return l},UNSAFE_DataRouterStateContext:function(){return c},UNSAFE_NavigationContext:function(){return d},UNSAFE_RouteContext:function(){return f},UNSAFE_mapRouteProperties:function(){return T},UNSAFE_useRouteId:function(){return _},createRoutesFromElements:function(){return function e(t,r){void 0===r&&(r=[]);var n=[];return i.Children.forEach(t,(t,a)=>{if(i.isValidElement(t)){var o=[...r,a];if(t.type===i.Fragment){n.push.apply(n,e(t.props.children,o));return}t.type!==F&&(0,s.UNSAFE_invariant)(!1),!t.props.index||!t.props.children||(0,s.UNSAFE_invariant)(!1);var u={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&&(u.children=e(t.props.children,o)),n.push(u)}}),n}},useHref:function(){return p},useLocation:function(){return y},useMatches:function(){return L},useNavigate:function(){return b},useParams:function(){return w},useResolvedPath:function(){return R}});var n,a,o,i=r("6171"),s=r("62425");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 n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var l=i.createContext(null),c=i.createContext(null),d=i.createContext(null),h=i.createContext(null),f=i.createContext({outlet:null,matches:[],isDataRoute:!1}),v=i.createContext(null);function p(e,t){var{relative:r}=void 0===t?{}:t;m()||(0,s.UNSAFE_invariant)(!1);var{basename:n,navigator:a}=i.useContext(d),{hash:o,pathname:u,search:l}=R(e,{relative:r}),c=u;return"/"!==n&&(c="/"===u?n:(0,s.joinPaths)([n,u])),a.createHref({pathname:c,search:l,hash:o})}function m(){return null!=i.useContext(h)}function y(){return m()||(0,s.UNSAFE_invariant)(!1),i.useContext(h).location}function g(e){!i.useContext(d).static&&i.useLayoutEffect(e)}function b(){var{isDataRoute:e}=i.useContext(f);return e?function(){var e,t,{router:r}=(e=P.UseNavigateStable,(t=i.useContext(l))||(0,s.UNSAFE_invariant)(!1),t),n=A(C.UseNavigateStable),a=i.useRef(!1);return g(()=>{a.current=!0}),i.useCallback(function(e,t){void 0===t&&(t={}),a.current&&("number"==typeof e?r.navigate(e):r.navigate(e,u({fromRouteId:n},t)))},[r,n])}():function(){m()||(0,s.UNSAFE_invariant)(!1);var e=i.useContext(l),{basename:t,navigator:r}=i.useContext(d),{matches:n}=i.useContext(f),{pathname:a}=y(),o=JSON.stringify((0,s.UNSAFE_getPathContributingMatches)(n).map(e=>e.pathnameBase)),u=i.useRef(!1);return g(()=>{u.current=!0}),i.useCallback(function(n,i){if(void 0===i&&(i={}),u.current){if("number"==typeof n){r.go(n);return}var l=(0,s.resolveTo)(n,JSON.parse(o),a,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:(0,s.joinPaths)([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}},[t,r,o,a,e])}()}var E=i.createContext(null);function w(){var{matches:e}=i.useContext(f),t=e[e.length-1];return t?t.params:{}}function R(e,t){var{relative:r}=void 0===t?{}:t,{matches:n}=i.useContext(f),{pathname:a}=y(),o=JSON.stringify((0,s.UNSAFE_getPathContributingMatches)(n).map(e=>e.pathnameBase));return i.useMemo(()=>(0,s.resolveTo)(e,JSON.parse(o),a,"path"===r),[e,o,a,r])}var x=i.createElement(function(){var e=function(){var e,t=i.useContext(v),r=U(C.UseRouteError),n=A(C.UseRouteError);return t?t:null==(e=r.errors)?void 0:e[n]}(),t=(0,s.isRouteErrorResponse)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)},null);class S extends i.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?i.createElement(f.Provider,{value:this.props.routeContext},i.createElement(v.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 D(e){var{routeContext:t,match:r,children:n}=e,a=i.useContext(l);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),i.createElement(f.Provider,{value:t},n)}var P=((n=P||{}).UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n);var C=((a=C||{}).UseBlocker="useBlocker",a.UseLoaderData="useLoaderData",a.UseActionData="useActionData",a.UseRouteError="useRouteError",a.UseNavigation="useNavigation",a.UseRouteLoaderData="useRouteLoaderData",a.UseMatches="useMatches",a.UseRevalidator="useRevalidator",a.UseNavigateStable="useNavigate",a.UseRouteId="useRouteId",a);function U(e){var t=i.useContext(c);return t||(0,s.UNSAFE_invariant)(!1),t}function A(e){var t,r,n=(t=0,(r=i.useContext(f))||(0,s.UNSAFE_invariant)(!1),r),a=n.matches[n.matches.length-1];return a.route.id||(0,s.UNSAFE_invariant)(!1),a.route.id}function _(){return A(C.UseRouteId)}function L(){var{matches:e,loaderData:t}=U(C.UseMatches);return i.useMemo(()=>e.map(e=>{var{pathname:r,params:n}=e;return{id:e.route.id,pathname:r,params:n,data:t[e.route.id],handle:e.route.handle}}),[e,t])}var k=i.startTransition;function M(e){var{fallbackElement:t,router:r,future:n}=e,[a,o]=i.useState(r.state),{v7_startTransition:s}=n||{},u=i.useCallback(e=>{s&&k?k(()=>o(e)):o(e)},[o,s]);i.useLayoutEffect(()=>r.subscribe(u),[r,u]);var d=i.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}),[r]),h=r.basename||"/",f=i.useMemo(()=>({router:r,navigator:d,static:!1,basename:h}),[r,d,h]);return i.createElement(i.Fragment,null,i.createElement(l.Provider,{value:f},i.createElement(c.Provider,{value:a},i.createElement(B,{basename:h,location:a.location,navigationType:a.historyAction,navigator:d},a.initialized?i.createElement(N,{routes:r.routes,state:a}):t))),null)}function N(e){var{routes:t,state:r}=e;return function(e,t,r){m()||(0,s.UNSAFE_invariant)(!1);var{navigator:n}=i.useContext(d),{matches:a}=i.useContext(f),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;var c=o?o.pathnameBase:"/";o&&o.route;var v=y();if(t){var p,g,b="string"==typeof t?(0,s.parsePath)(t):t;"/"===c||(null==(g=b.pathname)?void 0:g.startsWith(c))||(0,s.UNSAFE_invariant)(!1),p=b}else p=v;var E=p.pathname||"/",w="/"===c?E:E.slice(c.length)||"/",R=(0,s.matchRoutes)(e,{pathname:w}),P=function(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=null),null==e){if(null==(a=r)||!a.errors)return null;e=r.matches}var n,a,o=e,u=null==(n=r)?void 0:n.errors;if(null!=u){var l=o.findIndex(e=>e.route.id&&(null==u?void 0:u[e.route.id]));l>=0||(0,s.UNSAFE_invariant)(!1),o=o.slice(0,Math.min(o.length,l+1))}return o.reduceRight((e,n,a)=>{var s=n.route.id?null==u?void 0:u[n.route.id]:null,l=null;r&&(l=n.route.errorElement||x);var c=t.concat(o.slice(0,a+1)),d=()=>{var t;return t=s?l:n.route.Component?i.createElement(n.route.Component,null):n.route.element?n.route.element:e,i.createElement(D,{match:n,routeContext:{outlet:e,matches:c,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?i.createElement(S,{location:r.location,revalidation:r.revalidation,component:l,error:s,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()},null)}(R&&R.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:(0,s.joinPaths)([c,n.encodeLocation?n.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:(0,s.joinPaths)([c,n.encodeLocation?n.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,r);return t&&P?i.createElement(h.Provider,{value:{location:u({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:s.Action.Pop}},P):P}(t,void 0,r)}function j(e){var t,r;return t=e.context,(r=i.useContext(f).outlet)?i.createElement(E.Provider,{value:t},r):r}function F(e){(0,s.UNSAFE_invariant)(!1)}function B(e){var{basename:t="/",children:r=null,location:n,navigationType:a=s.Action.Pop,navigator:o,static:u=!1}=e;m()&&(0,s.UNSAFE_invariant)(!1);var l=t.replace(/^\/*/,"/"),c=i.useMemo(()=>({basename:l,navigator:o,static:u}),[l,o,u]);"string"==typeof n&&(n=(0,s.parsePath)(n));var{pathname:f="/",search:v="",hash:p="",state:y=null,key:g="default"}=n,b=i.useMemo(()=>{var e=(0,s.stripBasename)(f,l);return null==e?null:{location:{pathname:e,search:v,hash:p,state:y,key:g},navigationType:a}},[l,f,v,p,y,g,a]);return null==b?null:i.createElement(d.Provider,{value:c},i.createElement(h.Provider,{children:r,value:b}))}var O=((o=O||{})[o.pending=0]="pending",o[o.success=1]="success",o[o.error=2]="error",o);new Promise(()=>{});function T(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:i.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}}}]);
|