1"use strict";(self.webpackChunkhost=self.webpackChunkhost||[]).push([[6591],{16591:(e,t,r)=>{r.r(t),r.d(t,{AbortedDeferredError:()=>AbortedDeferredError,Await:()=>jt,BrowserRouter:()=>nr,Form:()=>ur,HashRouter:()=>or,Link:()=>sr,MemoryRouter:()=>kt,NavLink:()=>cr,Navigate:()=>Lt,NavigationType:()=>n,Outlet:()=>Ut,Route:()=>Mt,Router:()=>Ot,RouterProvider:()=>At,Routes:()=>_t,ScrollRestoration:()=>hr,UNSAFE_DataRouterContext:()=>Ne,UNSAFE_DataRouterStateContext:()=>Ie,UNSAFE_LocationContext:()=>Ke,UNSAFE_NavigationContext:()=>We,UNSAFE_RouteContext:()=>$e,UNSAFE_useRouteId:()=>mt,UNSAFE_useScrollRestoration:()=>Ar,createBrowserRouter:()=>Zt,createHashRouter:()=>er,createMemoryRouter:()=>Wt,createPath:()=>p,createRoutesFromChildren:()=>Nt,createRoutesFromElements:()=>Nt,createSearchParams:()=>Yt,defer:()=>J,generatePath:()=>M,isRouteErrorResponse:()=>Y,json:()=>$,matchPath:()=>O,matchRoutes:()=>w,parsePath:()=>m,redirect:()=>q,renderMatches:()=>It,resolvePath:()=>T,unstable_HistoryRouter:()=>ar,unstable_useBlocker:()=>Ct,unstable_usePrompt:()=>kr,useActionData:()=>Et,useAsyncError:()=>St,useAsyncValue:()=>Dt,useBeforeUnload:()=>Pr,useFetcher:()=>Dr,useFetchers:()=>Sr,useFormAction:()=>Er,useHref:()=>Je,useInRouterContext:()=>qe,useLinkClickHandler:()=>gr,useLoaderData:()=>bt,useLocation:()=>Ye,useMatch:()=>Xe,useMatches:()=>yt,useNavigate:()=>Qe,useNavigation:()=>vt,useNavigationType:()=>Ve,useOutlet:()=>tt,useOutletContext:()=>et,useParams:()=>rt,useResolvedPath:()=>nt,useRevalidator:()=>gt,useRouteError:()=>Rt,useRouteLoaderData:()=>wt,useRoutes:()=>ot,useSearchParams:()=>yr,useSubmit:()=>br});var n,o=r(77285);function a(){return a=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},a.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));const i="popstate";function l(e){void 0===e&&(e={});let t,{initialEntries:r=["/"],initialIndex:o,v5Compat:a=!1}=e;t=r.map(((e,t)=>h(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=c(o??t.length-1),l=n.Pop,s=null;function c(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[i]}function h(e,r,n){void 0===r&&(r=null);let o=f(t?u().pathname:"/",e,r,n);return d("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}function v(e){return"string"==typeof e?e:p(e)}return{get index(){return i},get action(){return l},get location(){return u()},createHref:v,createURL:e=>new URL(v(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?m(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){l=n.Push;let o=h(e,r);i+=1,t.splice(i,t.length,o),a&&s&&s({action:l,location:o,delta:1})},replace(e,r){l=n.Replace;let o=h(e,r);t[i]=o,a&&s&&s({action:l,location:o,delta:0})},go(e){l=n.Pop;let r=c(i+e),o=t[r];i=r,s&&s({action:l,location:o,delta:e})},listen:e=>(s=e,()=>{s=null})}}function s(e){return void 0===e&&(e={}),v((function(e,t){let{pathname:r,search:n,hash:o}=e.location;return f("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:p(t)}),null,e)}function c(e){return void 0===e&&(e={}),v((function(e,t){let{pathname:r="/",search:n="",hash:o=""}=m(e.location.hash.substr(1));return f("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:p(t))}),(function(e,t){d("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function u(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(r){}}}function h(e,t){return{usr:e.state,key:e.key,idx:t}}function f(e,t,r,n){return void 0===r&&(r=null),a({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?m(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function p(e){let{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 m(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function v(e,t,r,o){void 0===o&&(o={});let{window:l=document.defaultView,v5Compat:s=!1}=o,c=l.history,d=n.Pop,m=null,v=g();function g(){return(c.state||{idx:null}).idx}function y(){d=n.Pop;let e=g(),t=null==e?null:e-v;v=e,m&&m({action:d,location:w.location,delta:t})}function b(e){let t="null"!==l.location.origin?l.location.origin:l.location.href,r="string"==typeof e?e:p(e);return u(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==v&&(v=0,c.replaceState(a({},c.state,{idx:v}),""));let w={get action(){return d},get location(){return e(l,c)},listen(e){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(i,y),m=e,()=>{l.removeEventListener(i,y),m=null}},createHref:e=>t(l,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){d=n.Push;let o=f(w.location,e,t);r&&r(o,e),v=g()+1;let a=h(o,v),i=w.createHref(o);try{c.pushState(a,"",i)}catch(u){l.location.assign(i)}s&&m&&m({action:d,location:w.location,delta:1})},replace:function(e,t){d=n.Replace;let o=f(w.location,e,t);r&&r(o,e),v=g();let a=h(o,v),i=w.createHref(o);c.replaceState(a,"",i),s&&m&&m({action:d,location:w.location,delta:0})},go:e=>c.go(e)};return w}var g;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={}));
1const y=new Set(["lazy","caseSensitive","path","id","index","children"]);function b(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map(((e,o)=>{let i=[...r,o],l="string"==typeof e.id?e.id:i.join("-");if(u(!0!==e.index||!e.children,"Cannot specify children on an index route"),u(!n[l],'Found a route id collision on id "'+l+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let r=a({},e,t(e),{id:l});return n[l]=r,r}{let r=a({},e,t(e),{id:l,children:void 0});return n[l]=r,e.children&&(r.children=b(e.children,t,i,n)),r}}))}function w(e,t,r){void 0===r&&(r="/");let n=j(("string"==typeof t?m(t):t).pathname||"/",r);if(null==n)return null;let o=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let a=null;for(let i=0;null==a&&i<o.length;++i)a=U(o[i],_(n));return a}function E(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(u(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));let l=I([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(u(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),E(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:L(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let n of R(e.path))o(e,t,n);else o(e,t)})),t}function R(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=R(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const D=/^:\w+$/,S=3,x=2,C=1,A=10,P=-2,k=e=>"*"===e;function L(e,t){let r=e.split("/"),n=r.length;return r.some(k)&&(n+=P),t&&(n+=x),r.filter((e=>!k(e))).reduce(((e,t)=>e+(D.test(t)?S:""===t?C:A)),n)}function U(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let i=0;i<r.length;++i){let e=r[i],l=i===r.length-1,s="/"===o?t:t.slice(o.length)||"/",c=O({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},s);if(!c)return null;
1Object.assign(n,c.params);let u=e.route;a.push({params:n,pathname:I([o,c.pathname]),pathnameBase:z(I([o,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(o=I([o,c.pathnameBase]))}return a}function M(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(d(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));return(r.startsWith("/")?"/":"")+r.split(/\/+/).map(((e,r,n)=>{if(r===n.length-1&&"*"===e){return t["*"]}const o=e.match(/^:(\w+)(\??)$/);if(o){const[,e,r]=o;let n=t[e];return"?"===r?n??"":(null==n&&u(!1,'Missing ":'+e+'" param'),n)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function O(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!0);d("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(n.push(t),"/([^\\/]+)")));e.endsWith("*")?(n.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,t,r)=>{if("*"===t){let e=l[r]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return d(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+r+")."),e}}(l[r]||"",t),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function _(e){try{return decodeURI(e)}catch(t){return d(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function j(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function T(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:o=""}="string"==typeof e?m(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:W(n),hash:K(o)}}function B(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 F(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function N(e,t,r,n){let o;void 0===n&&(n=!1),"string"==typeof e?o=m(e):(o=a({},e),u(!o.pathname||!o.pathname.includes("?"),B("?","pathname","search",o)),u(!o.pathname||!o.pathname.includes("#"),B("#","pathname","hash",o)),u(!o.search||!o.search.includes("#"),B("#","search","hash",o)));let i,l=""===e||""===o.pathname,s=l?"/":o.pathname;if(n||null==s)i=r;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=T(o,i),d=s&&"/"!==s&&s.endsWith("/"),h=(l||"."===s)&&r.endsWith("/");return c.pathname.endsWith("/")||!d&&!h||(c.pathname+="/"),c}const I=e=>e.join("/").replace(/\/\/+/g,"/"),z=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),W=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",K=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",$=function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),a({},r,{headers:n}))};
1class AbortedDeferredError extends Error{}class DeferredData{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],u(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>r=t)),this.controller=new AbortController;let n=()=>r(new AbortedDeferredError("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(r,e,null,t)),(t=>this.onSettle(r,e,t)));return r.catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,n){return this.controller.signal.aborted&&r instanceof AbortedDeferredError?(this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r)):(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),r?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>n}),this.emit(!1,t),n))}emit(e,t){this.subscribers.forEach((r=>r(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise((t=>{this.subscribe((n=>{e.removeEventListener("abort",r),(n||this.done)&&t(n)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return u(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:H(n)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function H(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const J=function(e,t){return void 0===t&&(t={}),new DeferredData(e,"number"==typeof t?{status:t}:t)},q=function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,a({},r,{headers:n}))};class ErrorResponse{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 Y(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const V=["post","put","patch","delete"],X=new Set(V),G=["get",...V],Q=new Set(G),Z=new Set([301,302,303,307,308]),ee=new Set([307,308]),te={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},re={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},ne={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},oe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ae="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ie=!ae,le=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});function se(e){let t;if(u(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let r=e.detectErrorBoundary;t=e=>({hasErrorBoundary:r(e)})}else t=le;let r,o={},i=b(e.routes,t,void 0,o),l=e.basename||"/",s=a({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,h=new Set,p=null,m=null,v=null,y=null!=e.hydrationData,E=w(i,e.history.location,l),R=null;if(null==E){let t=Se(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=De(i);E=r,R={[n.id]:t}}let D,S,x=!(E.some((e=>e.route.lazy))||E.some((e=>e.route.loader))&&null==e.hydrationData),C={historyAction:e.history.action,location:e.history.location,matches:E,initialized:x,navigation:te,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||R,fetchers:new Map,blockers:new Map},A=n.Pop,P=!1,k=!1,L=!1,U=[],M=[],O=new Map,_=0,T=-1,B=new Map,F=new Set,
1N=new Map,I=new Map,z=new Map,W=!1;function K(e){C=a({},C,e),h.forEach((e=>e(C)))}function $(t,o){var l,s;let c,u=null!=C.actionData&&null!=C.navigation.formMethod&&Me(C.navigation.formMethod)&&"loading"===C.navigation.state&&!0!==(null==(l=t.state)?void 0:l._isRedirect);c=o.actionData?Object.keys(o.actionData).length>0?o.actionData:null:u?C.actionData:null;let d=o.loaderData?Ee(C.loaderData,o.loaderData,o.matches||[],o.errors):C.loaderData;for(let[e]of z)fe(e);let h=!0===P||null!=C.navigation.formMethod&&Me(C.navigation.formMethod)&&!0!==(null==(s=t.state)?void 0:s._isRedirect);r&&(i=r,r=void 0),K(a({},o,{actionData:c,loaderData:d,historyAction:A,location:t,initialized:!0,navigation:te,revalidation:"idle",restoreScrollPosition:be(t,o.matches||C.matches),preventScrollReset:h,blockers:new Map(C.blockers)})),k||A===n.Pop||(A===n.Push?e.history.push(t,t.state):A===n.Replace&&e.history.replace(t,t.state)),A=n.Pop,P=!1,k=!1,L=!1,U=[],M=[]}async function H(s,c,u){S&&S.abort(),S=null,A=s,k=!0===(u&&u.startUninterruptedRevalidation),function(e,t){if(p&&m&&v){let r=t.map((e=>Te(e,C.loaderData))),n=m(e,r)||e.key;p[n]=v()}}(C.location,C.matches),P=!0===(u&&u.preventScrollReset);let d=r||i,h=u&&u.overrideNavigation,f=w(d,c,l);if(!f){let e=Se(404,{pathname:c.pathname}),{matches:t,route:r}=De(d);return ye(),void $(c,{matches:t,loaderData:{},errors:{[r.id]:e}})}if(C.initialized&&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}(C.location,c)&&!(u&&u.submission&&Me(u.submission.formMethod)))return void $(c,{matches:f});S=new AbortController;let y,b,E=ge(e.history,c,S.signal,u&&u.submission);if(u&&u.pendingError)b={[Re(f).route.id]:u.pendingError};else if(u&&u.submission&&Me(u.submission.formMethod)){let e=await async function(e,r,i,s,c){V();let u,d=a({state:"submitting",location:r},i);K({navigation:d});let h=Be(s,r);if(h.route.action||h.route.lazy){if(u=await ve("action",e,h,s,o,t,l),e.signal.aborted)return{shortCircuited:!0}}else u={type:g.error,error:Se(405,{method:e.method,pathname:r.pathname,routeId:h.route.id})};if(ke(u)){let e;return e=c&&null!=c.replace?c.replace:u.location===C.location.pathname+C.location.search,await q(C,u,{submission:i,replace:e}),{shortCircuited:!0}}if(Pe(u)){let e=Re(s,h.route.id);return!0!==(c&&c.replace)&&(A=n.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:u.error}}}if(Ae(u))throw Se(400,{type:"defer-action"});return{pendingActionData:{[h.route.id]:u.data}}}(E,c,u.submission,f,{replace:u.replace});if(e.shortCircuited)return;y=e.pendingActionData,b=e.pendingActionError,h=a({state:"loading",location:c},u.submission),E=new Request(E.url,{signal:E.signal})}let{shortCircuited:R,loaderData:D,errors:x}=await async function(t,n,o,s,c,u,d,h,f){let p=s;if(!p){p=a({state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},c)}let m=c||u?c||u:p.formMethod&&p.formAction&&p.formData&&p.formEncType?{formMethod:p.formMethod,formAction:p.formAction,formData:p.formData,formEncType:p.formEncType}:void 0,v=r||i,[g,y]=he(e.history,C,o,m,n,L,U,M,N,v,l,h,f);if(ye((e=>!(o&&o.some((t=>t.route.id===e)))||g&&g.some((t=>t.route.id===e)))),0===g.length&&0===y.length){let e=se();return $(n,a({matches:o,loaderData:{},errors:f||null},h?{actionData:h}:{},e?{fetchers:new Map(C.fetchers)}:{})),{shortCircuited:!0}}if(!k){y.forEach((e=>{let t=C.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};C.fetchers.set(e.key,r)}));let e=h||C.actionData;K(a({navigation:p},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},y.length>0?{fetchers:new Map(C.fetchers)}:{}))}T=++_,y.forEach((e=>{e.controller&&O.set(e.key,e.controller)}));let b=()=>y.forEach((e=>Q(e.key)));S&&S.signal.addEventListener("abort",b);let{results:w,loaderResults:E,fetcherResults:R}=await Y(C.matches,o,g,y,t);if(t.signal.aborted)return{shortCircuited:!0};S&&S.signal.removeEventListener("abort",b);
1y.forEach((e=>O.delete(e.key)));let D=xe(w);if(D)return await q(C,D,{replace:d}),{shortCircuited:!0};let{loaderData:x,errors:A}=we(C,o,g,E,f,y,R,I);I.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&I.delete(t)}))}));let P=se(),j=de(T),B=P||j||y.length>0;return a({loaderData:x,errors:A},B?{fetchers:new Map(C.fetchers)}:{})}(E,c,f,h,u&&u.submission,u&&u.fetcherSubmission,u&&u.replace,y,b);R||(S=null,$(c,a({matches:f},y?{actionData:y}:{},{loaderData:D,errors:x})))}function J(e){return C.fetchers.get(e)||re}async function q(t,r,o){var i;let{submission:s,replace:c,isFetchActionRedirect:d}=void 0===o?{}:o;r.revalidate&&(L=!0);let h=f(t.location,r.location,a({_isRedirect:!0},d?{_isFetchActionRedirect:!0}:{}));if(u(h,"Expected a location on the redirect navigation"),oe.test(r.location)&&ae&&void 0!==(null==(i=window)?void 0:i.location)){let t=e.history.createURL(r.location),n=null==j(t.pathname,l);if(window.location.origin!==t.origin||n)return void(c?window.location.replace(r.location):window.location.assign(r.location))}S=null;let p=!0===c?n.Replace:n.Push,{formMethod:m,formAction:v,formEncType:g,formData:y}=t.navigation;!s&&m&&v&&y&&g&&(s={formMethod:m,formAction:v,formEncType:g,formData:y}),ee.has(r.status)&&s&&Me(s.formMethod)?await H(p,h,{submission:a({},s,{formAction:r.location}),preventScrollReset:P}):d?await H(p,h,{overrideNavigation:{state:"loading",location:h,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},fetcherSubmission:s,preventScrollReset:P}):await H(p,h,{overrideNavigation:{state:"loading",location:h,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:P})}async function Y(r,n,a,i,s){let c=await Promise.all([...a.map((e=>ve("loader",s,e,n,o,t,l))),...i.map((r=>{if(r.matches&&r.match&&r.controller)return ve("loader",ge(e.history,r.path,r.controller.signal),r.match,r.matches,o,t,l);return{type:g.error,error:Se(404,{pathname:r.path})}}))]),u=c.slice(0,a.length),d=c.slice(a.length);return await Promise.all([Oe(r,a,u,u.map((()=>s.signal)),!1,C.loaderData),Oe(r,i.map((e=>e.match)),d,i.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:c,loaderResults:u,fetcherResults:d}}function V(){L=!0,U.push(...ye()),N.forEach(((e,t)=>{O.has(t)&&(M.push(t),Q(t))}))}function X(e,t,r){let n=Re(C.matches,t);G(e),K({errors:{[n.route.id]:r},fetchers:new Map(C.fetchers)})}function G(e){O.has(e)&&Q(e),N.delete(e),B.delete(e),F.delete(e),C.fetchers.delete(e)}function Q(e){let t=O.get(e);u(t,"Expected fetch controller: "+e),t.abort(),O.delete(e)}function Z(e){for(let t of e){let e={state:"idle",data:J(t).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};C.fetchers.set(t,e)}}function se(){let e=[],t=!1;for(let r of F){let n=C.fetchers.get(r);u(n,"Expected fetcher: "+r),"loading"===n.state&&(F.delete(r),e.push(r),t=!0)}return Z(e),t}function de(e){let t=[];for(let[r,n]of B)if(n<e){let e=C.fetchers.get(r);u(e,"Expected fetcher: "+r),"loading"===e.state&&(Q(r),B.delete(r),t.push(r))}return Z(t),t.length>0}function fe(e){C.blockers.delete(e),z.delete(e)}function pe(e,t){let r=C.blockers.get(e)||ne;u("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),C.blockers.set(e,t),K({blockers:new Map(C.blockers)})}function me(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===z.size)return;z.size>1&&d(!1,"A router only supports one blocker at a time");let o=Array.from(z.entries()),[a,i]=o[o.length-1],l=C.blockers.get(a);return l&&"proceeding"===l.state?void 0:i({currentLocation:t,nextLocation:r,historyAction:n})?a:void 0}function ye(e){let t=[];return I.forEach(((r,n)=>{e&&!e(n)||(r.cancel(),t.push(n),I.delete(n))})),t}function be(e,t){if(p&&m&&v){let r=t.map((e=>Te(e,C.loaderData))),n=m(e,r)||e.key,o=p[n];if("number"==typeof o)return o}return null}return D={get basename(){return l},get state(){return C},get routes(){return i},initialize:function(){return c=e.history.listen((t=>{let{action:r,location:n,delta:o}=t;if(W)return void(W=!1);d(0===z.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let a=me({currentLocation:C.location,nextLocation:n,historyAction:r});return a&&null!=o?(W=!0,e.history.go(-1*o),void pe(a,{state:"blocked",location:n,proceed(){pe(a,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(o)},reset(){fe(a),K({blockers:new Map(D.state.blockers)})}})):H(r,n)}
1)),C.initialized||H(n.Pop,C.location),D},subscribe:function(e){return h.add(e),()=>h.delete(e)},enableScrollRestoration:function(e,t,r){if(p=e,v=t,m=r||(e=>e.key),!y&&C.navigation===te){y=!0;let e=be(C.location,C.matches);null!=e&&K({restoreScrollPosition:e})}return()=>{p=null,v=null,m=null}},navigate:async function t(r,o){if("number"==typeof r)return void e.history.go(r);let i=ce(C.location,C.matches,l,s.v7_prependBasename,r,null==o?void 0:o.fromRouteId,null==o?void 0:o.relative),{path:c,submission:u,error:d}=ue(s.v7_normalizeFormMethod,!1,i,o),h=C.location,p=f(C.location,c,o&&o.state);p=a({},p,e.history.encodeLocation(p));let m=o&&null!=o.replace?o.replace:void 0,v=n.Push;!0===m?v=n.Replace:!1===m||null!=u&&Me(u.formMethod)&&u.formAction===C.location.pathname+C.location.search&&(v=n.Replace);let g=o&&"preventScrollReset"in o?!0===o.preventScrollReset:void 0,y=me({currentLocation:h,nextLocation:p,historyAction:v});if(!y)return await H(v,p,{submission:u,pendingError:d,preventScrollReset:g,replace:o&&o.replace});pe(y,{state:"blocked",location:p,proceed(){pe(y,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),t(r,o)},reset(){fe(y),K({blockers:new Map(C.blockers)})}})},fetch:function(n,c,d,h){if(ie)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");O.has(n)&&Q(n);let f=r||i,p=ce(C.location,C.matches,l,s.v7_prependBasename,d,c,null==h?void 0:h.relative),m=w(f,p,l);if(!m)return void X(n,c,Se(404,{pathname:p}));let{path:v,submission:g}=ue(s.v7_normalizeFormMethod,!0,p,h),y=Be(m,v);P=!0===(h&&h.preventScrollReset),g&&Me(g.formMethod)?async function(n,s,c,d,h,f){if(V(),N.delete(n),!d.route.action&&!d.route.lazy){let e=Se(405,{method:f.formMethod,pathname:c,routeId:s});return void X(n,s,e)}let p=C.fetchers.get(n),m=a({state:"submitting"},f,{data:p&&p.data," _hasFetcherDoneAnything ":!0});C.fetchers.set(n,m),K({fetchers:new Map(C.fetchers)});let v=new AbortController,g=ge(e.history,c,v.signal,f);O.set(n,v);let y=await ve("action",g,d,h,o,t,l);if(g.signal.aborted)return void(O.get(n)===v&&O.delete(n));if(ke(y)){O.delete(n),F.add(n);let e=a({state:"loading"},f,{data:void 0," _hasFetcherDoneAnything ":!0});return C.fetchers.set(n,e),K({fetchers:new Map(C.fetchers)}),q(C,y,{submission:f,isFetchActionRedirect:!0})}if(Pe(y))return void X(n,s,y.error);if(Ae(y))throw Se(400,{type:"defer-action"});let b=C.navigation.location||C.location,E=ge(e.history,b,v.signal),R=r||i,D="idle"!==C.navigation.state?w(R,C.navigation.location,l):C.matches;u(D,"Didn't find any matches after fetcher action");let x=++_;B.set(n,x);let P=a({state:"loading",data:y.data},f,{" _hasFetcherDoneAnything ":!0});C.fetchers.set(n,P);let[k,j]=he(e.history,C,D,f,b,L,U,M,N,R,l,{[d.route.id]:y.data},void 0);j.filter((e=>e.key!==n)).forEach((e=>{let t=e.key,r=C.fetchers.get(t),n={state:"loading",data:r&&r.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};C.fetchers.set(t,n),e.controller&&O.set(t,e.controller)})),K({fetchers:new Map(C.fetchers)});let z=()=>j.forEach((e=>Q(e.key)));v.signal.addEventListener("abort",z);let{results:W,loaderResults:H,fetcherResults:J}=await Y(C.matches,D,k,j,E);if(v.signal.aborted)return;v.signal.removeEventListener("abort",z),B.delete(n),O.delete(n),j.forEach((e=>O.delete(e.key)));let G=xe(W);if(G)return q(C,G);let{loaderData:Z,errors:ee}=we(C,C.matches,k,H,void 0,j,J,I),te={state:"idle",data:y.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};C.fetchers.set(n,te);let re=de(x);"loading"===C.navigation.state&&x>T?(u(A,"Expected pending action"),S&&S.abort(),$(C.navigation.location,{matches:D,loaderData:Z,errors:ee,fetchers:new Map(C.fetchers)})):(K(a({errors:ee,loaderData:Ee(C.loaderData,Z,D,ee)},re?{fetchers:new Map(C.fetchers)}:{})),L=!1)}(n,c,v,y,m,g):(N.set(n,{routeId:c,path:v}),async function(r,n,i,s,c,d){let h=C.fetchers.get(r),f=a({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},d,{data:h&&h.data," _hasFetcherDoneAnything ":!0});C.fetchers.set(r,f),K({fetchers:new Map(C.fetchers)});let p=new AbortController,m=ge(e.history,i,p.signal);O.set(r,p);let v=await ve("loader",m,s,c,o,t,l);Ae(v)&&(v=await _e(v,m.signal,!0)||v);O.get(r)===p&&O.delete(r);if(m.signal.aborted)return;if(ke(v))return F.add(r),void(await q(C,v));if(Pe(v)){let e=Re(C.matches,n);return C.fetchers.delete(r),void K({fetchers:new Map(C.fetchers),errors:{[e.route.id]:v.error}})}u(!Ae(v),"Unhandled fetcher deferred data");let g={state:"idle",data:v.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};C.fetchers.set(r,g),K({fetchers:new Map(C.fetchers)})}(n,c,v,y,m,g))},revalidate:function(){V(),K({revalidation:"loading"}),"submitting"!==C.navigation.state&&("idle"!==C.navigation.state?H(A||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation}):H(C.historyAction,C.location,{startUninterruptedRevalidation:!0}
1))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:J,deleteFetcher:G,dispose:function(){c&&c(),h.clear(),S&&S.abort(),C.fetchers.forEach(((e,t)=>G(t))),C.blockers.forEach(((e,t)=>fe(t)))},getBlocker:function(e,t){let r=C.blockers.get(e)||ne;return z.get(e)!==t&&z.set(e,t),r},deleteBlocker:fe,_internalFetchControllers:O,_internalActiveDeferreds:I,_internalSetRoutes:function(e){o={},r=b(e,t,void 0,o)}},D}Symbol("deferred");function ce(e,t,r,n,o,a,i){let l,s;if(null!=a&&"path"!==i){l=[];for(let e of t)if(l.push(e),e.route.id===a){s=e;break}}else l=t,s=t[t.length-1];let c=N(o||".",F(l).map((e=>e.pathnameBase)),j(e.pathname,r)||e.pathname,"path"===i);return null==o&&(c.search=e.search,c.hash=e.hash),null!=o&&""!==o&&"."!==o||!s||!s.route.index||je(c.search)||(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(c.pathname="/"===c.pathname?r:I([r,c.pathname])),p(c)}function ue(e,t,r,n){if(!n||!function(e){return null!=e&&"formData"in e}(n))return{path:r};if(n.formMethod&&!Ue(n.formMethod))return{path:r,error:Se(405,{method:n.formMethod})};let o;if(n.formData){let t=n.formMethod||"get";if(o={formMethod:e?t.toUpperCase():t.toLowerCase(),formAction:Ce(r),formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:n.formData},Me(o.formMethod))return{path:r,submission:o}}let a=m(r),i=ye(n.formData);return t&&a.search&&je(a.search)&&i.append("index",""),a.search="?"+i,{path:p(a),submission:o}}function de(e,t){let r=e;if(t){let n=e.findIndex((e=>e.route.id===t));n>=0&&(r=e.slice(0,n))}return r}function he(e,t,r,n,o,i,l,s,c,u,d,h,f){let p=f?Object.values(f)[0]:h?Object.values(h)[0]:void 0,m=e.createURL(t.location),v=e.createURL(o),g=f?Object.keys(f)[0]:void 0,y=de(r,g).filter(((e,r)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,r){let n=!t||r.route.id!==t.route.id,o=void 0===e[r.route.id];return n||o}(t.loaderData,t.matches[r],e)||l.some((t=>t===e.route.id)))return!0;let o=t.matches[r],s=e;return pe(e,a({currentUrl:m,currentParams:o.params,nextUrl:v,nextParams:s.params},n,{actionResult:p,defaultShouldRevalidate:i||m.pathname+m.search===v.pathname+v.search||m.search!==v.search||fe(o,s)}))})),b=[];return c.forEach(((e,o)=>{if(!r.some((t=>t.route.id===e.routeId)))return;let l=w(u,e.path,d);if(!l)return void b.push({key:o,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=Be(l,e.path);(s.includes(o)||pe(c,a({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:p,defaultShouldRevalidate:i})))&&b.push({key:o,routeId:e.routeId,path:e.path,matches:l,match:c,controller:new AbortController})})),[y,b]}function fe(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function pe(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function me(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let o=r[e.id];u(o,"No route found in manifest");let i={};for(let a in n){let e=void 0!==o[a]&&"hasErrorBoundary"!==a;d(!e,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+a+'" will be ignored.'),e||y.has(a)||(i[a]=n[a])}Object.assign(o,i),Object.assign(o,a({},t(o),{lazy:void 0}))}async function ve(e,t,r,n,o,a,i,l,s,c){let d,h,f;void 0===l&&(l=!1),void 0===s&&(s=!1);let p=e=>{let n,o=new Promise(((e,t)=>n=t));return f=()=>n(),t.signal.addEventListener("abort",f),Promise.race([e({request:t,params:r.params,context:c}),o])};try{let n=r.route[e];if(r.route.lazy)if(n){h=(await Promise.all([p(n),me(r.route,a,o)]))[0]}else{if(await me(r.route,a,o),n=r.route[e],!n){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw Se(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:g.data,data:void 0}}h=await p(n)}else{if(!n){let e=new URL(t.url);throw Se(404,{pathname:e.pathname+e.search})}h=await p(n)}u(void 0!==h,"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(y){d=g.error,h=y}finally{f&&t.signal.removeEventListener("abort",f)}
1if(Le(h)){let e,o=h.status;if(Z.has(o)){let e=h.headers.get("Location");if(u(e,"Redirects returned/thrown from loaders/actions must have a Location header"),oe.test(e)){if(!l){let r=new URL(t.url),n=e.startsWith("//")?new URL(r.protocol+e):new URL(e),o=null!=j(n.pathname,i);n.origin===r.origin&&o&&(e=n.pathname+n.search+n.hash)}}else e=ce(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,e);if(l)throw h.headers.set("Location",e),h;return{type:g.redirect,status:o,location:e,revalidate:null!==h.headers.get("X-Remix-Revalidate")}}if(s)throw{type:d||g.data,response:h};let a=h.headers.get("Content-Type");return e=a&&/\bapplication\/json\b/.test(a)?await h.json():await h.text(),d===g.error?{type:d,error:new ErrorResponse(o,h.statusText,e),headers:h.headers}:{type:g.data,data:e,statusCode:h.status,headers:h.headers}}return d===g.error?{type:d,error:h}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(h)?{type:g.deferred,deferredData:h,statusCode:null==(m=h.init)?void 0:m.status,headers:(null==(v=h.init)?void 0:v.headers)&&new Headers(h.init.headers)}:{type:g.data,data:h};var m,v}function ge(e,t,r,n){let o=e.createURL(Ce(t)).toString(),a={signal:r};if(n&&Me(n.formMethod)){let{formMethod:e,formEncType:t,formData:r}=n;a.method=e.toUpperCase(),a.body="application/x-www-form-urlencoded"===t?ye(r):r}return new Request(o,a)}function ye(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,n instanceof File?n.name:n);return t}function be(e,t,r,n,o){let a,i={},l=null,s=!1,c={};return r.forEach(((r,d)=>{let h=t[d].route.id;if(u(!ke(r),"Cannot handle redirect results in processLoaderData"),Pe(r)){let t=Re(e,h),o=r.error;n&&(o=Object.values(n)[0],n=void 0),l=l||{},null==l[t.route.id]&&(l[t.route.id]=o),i[h]=void 0,s||(s=!0,a=Y(r.error)?r.error.status:500),r.headers&&(c[h]=r.headers)}else Ae(r)?(o.set(h,r.deferredData),i[h]=r.deferredData.data):i[h]=r.data,null==r.statusCode||200===r.statusCode||s||(a=r.statusCode),r.headers&&(c[h]=r.headers)})),n&&(l=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:l,statusCode:a||200,loaderHeaders:c}}function we(e,t,r,n,o,i,l,s){let{loaderData:c,errors:d}=be(t,r,n,o,s);for(let h=0;h<i.length;h++){let{key:t,match:r,controller:n}=i[h];u(void 0!==l&&void 0!==l[h],"Did not find corresponding fetcher result");let o=l[h];if(!n||!n.signal.aborted)if(Pe(o)){let n=Re(e.matches,null==r?void 0:r.route.id);d&&d[n.route.id]||(d=a({},d,{[n.route.id]:o.error})),e.fetchers.delete(t)}else if(ke(o))u(!1,"Unhandled fetcher revalidation redirect");else if(Ae(o))u(!1,"Unhandled fetcher deferred data");else{let r={state:"idle",data:o.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};e.fetchers.set(t,r)}}return{loaderData:c,errors:d}}function Ee(e,t,r,n){let o=a({},t);for(let a of r){let r=a.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(o[r]=t[r]):void 0!==e[r]&&a.route.loader&&(o[r]=e[r]),n&&n.hasOwnProperty(r))break}return o}function Re(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function De(e){let t=e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Se(e,t){let{pathname:r,routeId:n,method:o,type:a}=void 0===t?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",o&&r&&n?l="You made a "+o+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===a&&(l="defer() is not supported in actions")):403===e?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",l='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",o&&r&&n?l="You made a "+o.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new ErrorResponse(e||500,i,new Error(l),!0)}function xe(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ke(r))return r}}function Ce(e){return p(a({},"string"==typeof e?m(e):e,{hash:""}))}function Ae(e){return e.type===g.deferred}function Pe(e){return e.type===g.error}function ke(e){return(e&&e.type)===g.redirect}function Le(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Ue(e){return Q.has(e.toLowerCase())}function Me(e){return X.has(e.toLowerCase())}async function Oe(e,t,r,n,o,a){for(let i=0;i<r.length;i++){let l=r[i],s=t[i];if(!s)continue;let c=e.find((e=>e.route.id===s.route.id)),d=null!=c&&!fe(c,s)&&void 0!==(a&&a[s.route.id]);if(Ae(l)&&(o||d)){let e=n[i];u(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await _e(l,e,o).then((e=>{e&&(r[i]=e||r[i])}))}}}async function _e(e,t,r){if(void 0===r&&(r=!1),!(await e.deferredData.resolveData(t))){if(r)try{return{type:g.data,data:e.deferredData.unwrappedData}
1}catch(n){return{type:g.error,error:n}}return{type:g.data,data:e.deferredData.data}}}function je(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Te(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}function Be(e,t){let r="string"==typeof t?m(t).search:t.search;if(e[e.length-1].route.index&&je(r||""))return e[e.length-1];let n=F(e);return n[n.length-1]}function Fe(){return Fe=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},Fe.apply(this,arguments)}const Ne=o.createContext(null);const Ie=o.createContext(null);const ze=o.createContext(null);const We=o.createContext(null);const Ke=o.createContext(null);const $e=o.createContext({outlet:null,matches:[],isDataRoute:!1});const He=o.createContext(null);function Je(e,t){let{relative:r}=void 0===t?{}:t;qe()||u(!1);let{basename:n,navigator:a}=o.useContext(We),{hash:i,pathname:l,search:s}=nt(e,{relative:r}),c=l;return"/"!==n&&(c="/"===l?n:I([n,l])),a.createHref({pathname:c,search:s,hash:i})}function qe(){return null!=o.useContext(Ke)}function Ye(){return qe()||u(!1),o.useContext(Ke).location}function Ve(){return o.useContext(Ke).navigationType}function Xe(e){qe()||u(!1);let{pathname:t}=Ye();return o.useMemo((()=>O(e,t)),[t,e])}function Ge(e){o.useContext(We).static||o.useLayoutEffect(e)}function Qe(){let{isDataRoute:e}=o.useContext($e);return e?function(){let{router:e}=ht(ut.UseNavigateStable),t=pt(dt.UseNavigateStable),r=o.useRef(!1);return Ge((()=>{r.current=!0})),o.useCallback((function(n,o){void 0===o&&(o={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,Fe({fromRouteId:t},o)))}),[e,t])}():function(){qe()||u(!1);let e=o.useContext(Ne),{basename:t,navigator:r}=o.useContext(We),{matches:n}=o.useContext($e),{pathname:a}=Ye(),i=JSON.stringify(F(n).map((e=>e.pathnameBase))),l=o.useRef(!1);return Ge((()=>{l.current=!0})),o.useCallback((function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof n)return void r.go(n);let s=N(n,JSON.parse(i),a,"path"===o.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:I([t,s.pathname])),(o.replace?r.replace:r.push)(s,o.state,o)}),[t,r,i,a,e])}()}const Ze=o.createContext(null);function et(){return o.useContext(Ze)}function tt(e){let t=o.useContext($e).outlet;return t?o.createElement(Ze.Provider,{value:e},t):t}function rt(){let{matches:e}=o.useContext($e),t=e[e.length-1];return t?t.params:{}}function nt(e,t){let{relative:r}=void 0===t?{}:t,{matches:n}=o.useContext($e),{pathname:a}=Ye(),i=JSON.stringify(F(n).map((e=>e.pathnameBase)));return o.useMemo((()=>N(e,JSON.parse(i),a,"path"===r)),[e,i,a,r])}function ot(e,t){return at(e,t)}function at(e,t,r){qe()||u(!1);let{navigator:a}=o.useContext(We),{matches:i}=o.useContext($e),l=i[i.length-1],s=l?l.params:{},c=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let d,h=Ye();if(t){var f;let e="string"==typeof t?m(t):t;"/"===c||(null==(f=e.pathname)?void 0:f.startsWith(c))||u(!1),d=e}else d=h;let p=d.pathname||"/",v=w(e,{pathname:"/"===c?p:p.slice(c.length)||"/"});let g=ct(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:I([c,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:I([c,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),i,r);return t&&g?o.createElement(Ke.Provider,{value:{location:Fe({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:n.Pop}},g):g}function it(){let e=Rt(),t=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n};return o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),r?o.createElement("pre",{style:a},r):null,null)}const lt=o.createElement(it,null);class RenderErrorBoundary extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}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?o.createElement($e.Provider,{value:this.props.routeContext},o.createElement(He.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}
1function st(e){let{routeContext:t,match:r,children:n}=e,a=o.useContext(Ne);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),o.createElement($e.Provider,{value:t},n)}function ct(e,t,r){var n;if(void 0===t&&(t=[]),void 0===r&&(r=null),null==e){var a;if(null==(a=r)||!a.errors)return null;e=r.matches}let i=e,l=null==(n=r)?void 0:n.errors;if(null!=l){let e=i.findIndex((e=>e.route.id&&(null==l?void 0:l[e.route.id])));e>=0||u(!1),i=i.slice(0,Math.min(i.length,e+1))}return i.reduceRight(((e,n,a)=>{let s=n.route.id?null==l?void 0:l[n.route.id]:null,c=null;r&&(c=n.route.errorElement||lt);let u=t.concat(i.slice(0,a+1)),d=()=>{let t;return t=s?c:n.route.Component?o.createElement(n.route.Component,null):n.route.element?n.route.element:e,o.createElement(st,{match:n,routeContext:{outlet:e,matches:u,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?o.createElement(RenderErrorBoundary,{location:r.location,revalidation:r.revalidation,component:c,error:s,children:d(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):d()}),null)}var ut,dt;function ht(e){let t=o.useContext(Ne);return t||u(!1),t}function ft(e){let t=o.useContext(Ie);return t||u(!1),t}function pt(e){let t=function(){let e=o.useContext($e);return e||u(!1),e}(),r=t.matches[t.matches.length-1];return r.route.id||u(!1),r.route.id}function mt(){return pt(dt.UseRouteId)}function vt(){return ft(dt.UseNavigation).navigation}
1function gt(){let e=ht(ut.UseRevalidator),t=ft(dt.UseRevalidator);return{revalidate:e.router.revalidate,state:t.revalidation}}function yt(){let{matches:e,loaderData:t}=ft(dt.UseMatches);return o.useMemo((()=>e.map((e=>{let{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])}function bt(){let e=ft(dt.UseLoaderData),t=pt(dt.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function wt(e){return ft(dt.UseRouteLoaderData).loaderData[e]}function Et(){let e=ft(dt.UseActionData);return o.useContext($e)||u(!1),Object.values((null==e?void 0:e.actionData)||{})[0]}function Rt(){var e;let t=o.useContext(He),r=ft(dt.UseRouteError),n=pt(dt.UseRouteError);return t||(null==(e=r.errors)?void 0:e[n])}function Dt(){let e=o.useContext(ze);return null==e?void 0:e._data}function St(){let e=o.useContext(ze);return null==e?void 0:e._error}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(ut||(ut={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(dt||(dt={}));let xt=0;function Ct(e){let{router:t}=ht(ut.UseBlocker),r=ft(dt.UseBlocker),[n]=o.useState((()=>String(++xt))),a=o.useCallback((t=>"function"==typeof e?!!e(t):!!e),[e]),i=t.getBlocker(n,a);return o.useEffect((()=>()=>t.deleteBlocker(n)),[t,n]),r.blockers.get(n)||i}function At(e){let{fallbackElement:t,router:r}=e,[n,a]=o.useState(r.state);o.useLayoutEffect((()=>r.subscribe(a)),[r,a]);let i=o.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]),l=r.basename||"/",s=o.useMemo((()=>({router:r,navigator:i,static:!1,basename:l})),[r,i,l]);return o.createElement(o.Fragment,null,o.createElement(Ne.Provider,{value:s},o.createElement(Ie.Provider,{value:n},o.createElement(Ot,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:i},r.state.initialized?o.createElement(Pt,{routes:r.routes,state:n}):t))),null)}function Pt(e){let{routes:t,state:r}=e;return at(t,void 0,r)}function kt(e){let{basename:t,children:r,initialEntries:n,initialIndex:a}=e,i=o.useRef();null==i.current&&(i.current=l({initialEntries:n,initialIndex:a,v5Compat:!0}));let s=i.current,[c,u]=o.useState({action:s.action,location:s.location});return o.useLayoutEffect((()=>s.listen(u)),[s]),o.createElement(Ot,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:s})}function Lt(e){let{to:t,replace:r,state:n,relative:a}=e;qe()||u(!1);let{matches:i}=o.useContext($e),{pathname:l}=Ye(),s=Qe(),c=N(t,F(i).map((e=>e.pathnameBase)),l,"path"===a),d=JSON.stringify(c);return o.useEffect((()=>s(JSON.parse(d),{replace:r,state:n,relative:a})),[s,d,a,r,n]),null}function Ut(e){return tt(e.context)}function Mt(e){u(!1)}function Ot(e){let{basename:t="/",children:r=null,location:a,navigationType:i=n.Pop,navigator:l,static:s=!1}=e;qe()&&u(!1);let c=t.replace(/^\/*/,"/"),d=o.useMemo((()=>({basename:c,navigator:l,static:s})),[c,l,s]);"string"==typeof a&&(a=m(a));let{pathname:h="/",search:f="",hash:p="",state:v=null,key:g="default"}=a,y=o.useMemo((()=>{let e=j(h,c);return null==e?null:{location:{pathname:e,search:f,hash:p,state:v,key:g},navigationType:i}}),[c,h,f,p,v,g,i]);return null==y?null:o.createElement(We.Provider,{value:d},o.createElement(Ke.Provider,{children:r,value:y}))}function _t(e){let{children:t,location:r}=e;return ot(Nt(t),r)}function jt(e){let{children:t,errorElement:r,resolve:n}=e;return o.createElement(AwaitErrorBoundary,{resolve:n,errorElement:r},o.createElement(Ft,null,t))}var Tt;
1!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Tt||(Tt={}));const Bt=new Promise((()=>{}));class AwaitErrorBoundary extends o.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=Tt.pending;if(r instanceof Promise)if(this.state.error){a=Tt.error;let e=this.state.error;n=Promise.reject().catch((()=>{})),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?(n=r,a=void 0!==n._error?Tt.error:void 0!==n._data?Tt.success:Tt.pending):(a=Tt.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then((e=>Object.defineProperty(r,"_data",{get:()=>e})),(e=>Object.defineProperty(r,"_error",{get:()=>e}))));else a=Tt.success,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===Tt.error&&n._error instanceof AbortedDeferredError)throw Bt;if(a===Tt.error&&!t)throw n._error;if(a===Tt.error)return o.createElement(ze.Provider,{value:n,children:t});if(a===Tt.success)return o.createElement(ze.Provider,{value:n,children:e});throw n}}function Ft(e){let{children:t}=e,r=Dt(),n="function"==typeof t?t(r):t;return o.createElement(o.Fragment,null,n)}function Nt(e,t){void 0===t&&(t=[]);let r=[];return o.Children.forEach(e,((e,n)=>{if(!o.isValidElement(e))return;let a=[...t,n];if(e.type===o.Fragment)return void r.push.apply(r,Nt(e.props.children,a));e.type!==Mt&&u(!1),e.props.index&&e.props.children&&u(!1);let i={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Nt(e.props.children,a)),r.push(i)})),r}function It(e){return ct(e)}function zt(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:o.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Wt(e,t){return se({basename:null==t?void 0:t.basename,future:Fe({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:l({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:zt}).initialize()}function Kt(){return Kt=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},Kt.apply(this,arguments)}function $t(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const Ht="get",Jt="application/x-www-form-urlencoded";function qt(e){return null!=e&&"string"==typeof e.tagName}function Yt(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}function Vt(e,t,r){let n,o,a,i=null;if(qt(l=e)&&"form"===l.tagName.toLowerCase()){let l=t.submissionTrigger;if(t.action)i=t.action;else{let t=e.getAttribute("action");i=t?j(t,r):null}n=t.method||e.getAttribute("method")||Ht,o=t.encType||e.getAttribute("enctype")||Jt,a=new FormData(e),l&&l.name&&a.append(l.name,l.value)}else if(function(e){return qt(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return qt(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let l=e.form;if(null==l)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');if(t.action)i=t.action;else{let t=e.getAttribute("formaction")||l.getAttribute("action");i=t?j(t,r):null}n=t.method||e.getAttribute("formmethod")||l.getAttribute("method")||Ht,o=t.encType||e.getAttribute("formenctype")||l.getAttribute("enctype")||Jt,a=new FormData(l),e.name&&a.append(e.name,e.value)}else{if(qt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
1if(n=t.method||Ht,i=t.action||null,o=t.encType||Jt,e instanceof FormData)a=e;else if(a=new FormData,e instanceof URLSearchParams)for(let[t,r]of e)a.append(t,r);else if(null!=e)for(let t of Object.keys(e))a.append(t,e[t])}var l;return{action:i,method:n.toLowerCase(),encType:o,formData:a}}const Xt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Gt=["aria-current","caseSensitive","className","end","style","to","children"],Qt=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];function Zt(e,t){return se({basename:null==t?void 0:t.basename,future:Kt({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:s({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||tr(),routes:e,mapRouteProperties:zt}).initialize()}function er(e,t){return se({basename:null==t?void 0:t.basename,future:Kt({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:c({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||tr(),routes:e,mapRouteProperties:zt}).initialize()}function tr(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Kt({},t,{errors:rr(t.errors)})),t}function rr(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&"RouteErrorResponse"===o.__type)r[n]=new ErrorResponse(o.status,o.statusText,o.data,!0===o.internal);else if(o&&"Error"===o.__type){let e=new Error(o.message);e.stack="",r[n]=e}else r[n]=o;return r}function nr(e){let{basename:t,children:r,window:n}=e,a=o.useRef();null==a.current&&(a.current=s({window:n,v5Compat:!0}));let i=a.current,[l,c]=o.useState({action:i.action,location:i.location});return o.useLayoutEffect((()=>i.listen(c)),[i]),o.createElement(Ot,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i})}function or(e){let{basename:t,children:r,window:n}=e,a=o.useRef();null==a.current&&(a.current=c({window:n,v5Compat:!0}));let i=a.current,[l,s]=o.useState({action:i.action,location:i.location});return o.useLayoutEffect((()=>i.listen(s)),[i]),o.createElement(Ot,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i})}function ar(e){let{basename:t,children:r,history:n}=e;const[a,i]=o.useState({action:n.action,location:n.location});return o.useLayoutEffect((()=>n.listen(i)),[n]),o.createElement(Ot,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:n})}const ir="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,lr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sr=o.forwardRef((function(e,t){let r,{onClick:n,relative:a,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d}
1=e,h=$t(e,Xt),{basename:f}=o.useContext(We),p=!1;if("string"==typeof u&&lr.test(u)&&(r=u,ir))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),r=j(t.pathname,f);t.origin===e.origin&&null!=r?u=r+t.search+t.hash:p=!0}catch(g){}let m=Je(u,{relative:a}),v=gr(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:a});return o.createElement("a",Kt({},h,{href:r||m,onClick:p||i?n:function(e){n&&n(e),e.defaultPrevented||v(e)},ref:t,target:c}))}));const cr=o.forwardRef((function(e,t){let{"aria-current":r="page",caseSensitive:n=!1,className:a="",end:i=!1,style:l,to:s,children:c}=e,u=$t(e,Gt),d=nt(s,{relative:u.relative}),h=Ye(),f=o.useContext(Ie),{navigator:p}=o.useContext(We),m=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,v=h.pathname,g=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(v=v.toLowerCase(),g=g?g.toLowerCase():null,m=m.toLowerCase());let y,b=v===m||!i&&v.startsWith(m)&&"/"===v.charAt(m.length),w=null!=g&&(g===m||!i&&g.startsWith(m)&&"/"===g.charAt(m.length)),E=b?r:void 0;y="function"==typeof a?a({isActive:b,isPending:w}):[a,b?"active":null,w?"pending":null].filter(Boolean).join(" ");let R="function"==typeof l?l({isActive:b,isPending:w}):l;return o.createElement(sr,Kt({},u,{"aria-current":E,className:y,ref:t,style:R,to:s}),"function"==typeof c?c({isActive:b,isPending:w}):c)}));const ur=o.forwardRef(((e,t)=>o.createElement(dr,Kt({},e,{ref:t}))));const dr=o.forwardRef(((e,t)=>{let{reloadDocument:r,replace:n,method:a=Ht,action:i,onSubmit:l,fetcherKey:s,routeId:c,relative:u,preventScrollReset:d}=e,h=$t(e,Qt),f=wr(s,c),p="get"===a.toLowerCase()?"get":"post",m=Er(i,{relative:u});return o.createElement("form",Kt({ref:t,method:p,action:m,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,r=(null==t?void 0:t.getAttribute("formmethod"))||a;f(t||e.currentTarget,{method:r,replace:n,relative:u,preventScrollReset:d})}},h))}));function hr(e){let{getKey:t,storageKey:r}=e;return Ar({getKey:t,storageKey:r}),null}var fr,pr;function mr(e){let t=o.useContext(Ne);return t||u(!1),t}function vr(e){let t=o.useContext(Ie);return t||u(!1),t}function gr(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:l}=void 0===t?{}:t,s=Qe(),c=Ye(),u=nt(e,{relative:l});return o.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,r)){t.preventDefault();let r=void 0!==n?n:p(c)===p(u);s(e,{replace:r,state:a,preventScrollReset:i,relative:l})}}),[c,s,u,n,a,r,e,i,l])}function yr(e){let t=o.useRef(Yt(e)),r=o.useRef(!1),n=Ye(),a=o.useMemo((()=>function(e,t){let r=Yt(e);if(t)for(let n of t.keys())r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}));return r}(n.search,r.current?null:t.current)),[n.search]),i=Qe(),l=o.useCallback(((e,t)=>{const n=Yt("function"==typeof e?e(a):e);r.current=!0,i("?"+n,t)}),[i,a]);return[a,l]}function br(){return wr()}function wr(e,t){let{router:r}=mr(fr.UseSubmitImpl),{basename:n}=o.useContext(We),a=mt();return o.useCallback((function(o,i){if(void 0===i&&(i={}),"undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{action:l,method:s,encType:c,formData:d}=Vt(o,i,n),h={preventScrollReset:i.preventScrollReset,formData:d,formMethod:s,formEncType:c};e?(null==t&&u(!1),r.fetch(e,t,l,h)):r.navigate(l,Kt({},h,{replace:i.replace,fromRouteId:a}))}),[r,n,e,t,a])}function Er(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=o.useContext(We),a=o.useContext($e);a||u(!1);let[i]=a.matches.slice(-1),l=Kt({},nt(e||".",{relative:r})),s=Ye();if(null==e&&(l.search=s.search,l.hash=s.hash,i.route.index)){let e=new URLSearchParams(l.search);e.delete("index"),l.search=e.toString()?"?"+e.toString():""}return e&&"."!==e||!i.route.index||(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(l.pathname="/"===l.pathname?n:I([n,l.pathname])),p(l)}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(fr||(fr={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(pr||(pr={}));let Rr=0;function Dr(){var e;let{router:t}=mr(fr.UseFetcher),r=o.useContext($e);r||u(!1);let n=null==(e=r.matches[r.matches.length-1])?void 0:e.route.id;null==n&&u(!1);
1let[a]=o.useState((()=>String(++Rr))),[i]=o.useState((()=>(n||u(!1),function(e,t){return o.forwardRef(((r,n)=>o.createElement(dr,Kt({},r,{ref:n,fetcherKey:e,routeId:t}))))}(a,n)))),[l]=o.useState((()=>e=>{t||u(!1),n||u(!1),t.fetch(a,n,e)})),s=wr(a,n),c=t.getFetcher(a),d=o.useMemo((()=>Kt({Form:i,submit:s,load:l},c)),[c,i,s,l]);return o.useEffect((()=>()=>{t?t.deleteFetcher(a):console.warn("No router available to clean up from useFetcher()")}),[t,a]),d}function Sr(){return[...vr(pr.UseFetchers).fetchers.values()]}const xr="react-router-scroll-positions";let Cr={};function Ar(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=mr(fr.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:i}=vr(pr.UseScrollRestoration),l=Ye(),s=yt(),c=vt();o.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:r}=t||{};o.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,r])}(o.useCallback((()=>{if("idle"===c.state){let e=(t?t(l,s):null)||l.key;Cr[e]=window.scrollY}sessionStorage.setItem(r||xr,JSON.stringify(Cr)),window.history.scrollRestoration="auto"}),[r,t,c.state,l,s])),"undefined"!=typeof document&&(o.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||xr);e&&(Cr=JSON.parse(e))}catch(e){}}),[r]),o.useLayoutEffect((()=>{let e=null==n?void 0:n.enableScrollRestoration(Cr,(()=>window.scrollY),t);return()=>e&&e()}),[n,t]),o.useLayoutEffect((()=>{if(!1!==a)if("number"!=typeof a){if(l.hash){let e=document.getElementById(l.hash.slice(1));if(e)return void e.scrollIntoView()}!0!==i&&window.scrollTo(0,0)}else window.scrollTo(0,a)}),[l,a,i]))}function Pr(e,t){let{capture:r}=t||{};o.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}}),[e,r])}function kr(e){let{when:t,message:r}=e,n=Ct(t);o.useEffect((()=>{"blocked"!==n.state||t||n.reset()}),[n,t]),o.useEffect((()=>{if("blocked"===n.state){window.confirm(r)?setTimeout(n.proceed,0):n.reset()}}),[n,r])}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.