1"use strict";(self.webpackChunk_cardissuer_activation_org_card_activation_mfe_app=self.webpackChunk_cardissuer_activation_org_card_activation_mfe_app||[]).push([[648],{92648(e,t,r){r.r(t),r.d(t,{AbortedDeferredError:()=>q,Await:()=>ar,BrowserRouter:()=>Ir,Form:()=>Jr,HashRouter:()=>zr,Link:()=>$r,MemoryRouter:()=>Qt,NavLink:()=>Vr,Navigate:()=>Zt,NavigationType:()=>n,Outlet:()=>er,Route:()=>tr,Router:()=>rr,RouterProvider:()=>Fr,Routes:()=>nr,ScrollRestoration:()=>qr,UNSAFE_DataRouterContext:()=>it,UNSAFE_DataRouterStateContext:()=>st,UNSAFE_ErrorResponseImpl:()=>te,UNSAFE_FetchersContext:()=>Tr,UNSAFE_LocationContext:()=>ct,UNSAFE_NavigationContext:()=>ut,UNSAFE_RouteContext:()=>dt,UNSAFE_ViewTransitionContext:()=>_r,UNSAFE_useRouteId:()=>Ft,UNSAFE_useScrollRestoration:()=>cn,createBrowserRouter:()=>Cr,createHashRouter:()=>Lr,createMemoryRouter:()=>hr,createPath:()=>y,createRoutesFromChildren:()=>ur,createRoutesFromElements:()=>ur,createSearchParams:()=>gr,defer:()=>G,generatePath:()=>A,isRouteErrorResponse:()=>re,json:()=>J,matchPath:()=>U,matchRoutes:()=>R,parsePath:()=>g,redirect:()=>Q,redirectDocument:()=>Z,renderMatches:()=>cr,replace:()=>ee,resolvePath:()=>F,unstable_HistoryRouter:()=>Hr,unstable_usePrompt:()=>hn,useActionData:()=>Wt,useAsyncError:()=>Vt,useAsyncValue:()=>$t,useBeforeUnload:()=>dn,useBlocker:()=>qt,useFetcher:()=>on,useFetchers:()=>sn,useFormAction:()=>an,useHref:()=>ft,useInRouterContext:()=>pt,useLinkClickHandler:()=>Zr,useLoaderData:()=>zt,useLocation:()=>mt,useMatch:()=>yt,useMatches:()=>It,useNavigate:()=>bt,useNavigation:()=>Nt,useNavigationType:()=>vt,useOutlet:()=>St,useOutletContext:()=>Et,useParams:()=>Rt,useResolvedPath:()=>xt,useRevalidator:()=>Bt,useRouteError:()=>Kt,useRouteLoaderData:()=>Ht,useRoutes:()=>Dt,useSearchParams:()=>en,useSubmit:()=>nn,useViewTransitionState:()=>fn});var n,a=r(44914),o=r.t(a,2),i=r(86672),s=r.t(i,2);function l(){return l=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},l.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));const u="popstate";function c(e){void 0===e&&(e={});let t,{initialEntries:r=["/"],initialIndex:a,v5Compat:o=!1}=e;t=r.map(((e,t)=>d(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=u(null==a?t.length-1:a),s=n.Pop,l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[i]}function d(e,r,n){void 0===r&&(r=null);let a=v(t?c().pathname:"/",e,r,n);return p("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function h(e){return"string"==typeof e?e:y(e)}return{get index(){return i},get action(){return s},get location(){return c()},createHref:h,createURL:e=>new URL(h(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?g(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){s=n.Push;let a=d(e,r);i+=1,t.splice(i,t.length,a),o&&l&&l({action:s,location:a,delta:1})},replace(e,r){s=n.Replace;let a=d(e,r);t[i]=a,o&&l&&l({action:s,location:a,delta:0})},go(e){s=n.Pop;let r=u(i+e),a=t[r];i=r,l&&l({action:s,location:a,delta:e})},listen:e=>(l=e,()=>{l=null})}}function d(e){return void 0===e&&(e={}),b((function(e,t){let{pathname:r,search:n,hash:a}=e.location;return v("",{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:y(t)}),null,e)}function h(e){return void 0===e&&(e={}),b((function(e,t){let{pathname:r="/",search:n="",hash:a=""}=g(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),v("",{pathname:r,search:n,hash:a},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:y(t))}),(function(e,t){p("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+J
1SON.stringify(t)+")")}),e)}function f(e,t){if(!1===e||null==e)throw new Error(t)}function p(e,t){if(!e)try{throw new Error(t)}catch(e){}}function m(e,t){return{usr:e.state,key:e.key,idx:t}}function v(e,t,r,n){return void 0===r&&(r=null),l({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?g(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function y(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 g(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 b(e,t,r,a){void 0===a&&(a={});let{window:o=document.defaultView,v5Compat:i=!1}=a,s=o.history,c=n.Pop,d=null,h=p();function p(){return(s.state||{idx:null}).idx}function g(){c=n.Pop;let e=p(),t=null==e?null:e-h;h=e,d&&d({action:c,location:w.location,delta:t})}function b(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:y(e);return r=r.replace(/ $/,"%20"),f(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==h&&(h=0,s.replaceState(l({},s.state,{idx:h}),""));let w={get action(){return c},get location(){return e(o,s)},listen(e){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(u,g),d=e,()=>{o.removeEventListener(u,g),d=null}},createHref:e=>t(o,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=n.Push;let a=v(w.location,e,t);r&&r(a,e),h=p()+1;let l=m(a,h),u=w.createHref(a);try{s.pushState(l,"",u)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(u)}i&&d&&d({action:c,location:w.location,delta:1})},replace:function(e,t){c=n.Replace;let a=v(w.location,e,t);r&&r(a,e),h=p();let o=m(a,h),l=w.createHref(a);s.replaceState(o,"",l),i&&d&&d({action:c,location:w.location,delta:0})},go:e=>s.go(e)};return w}var w;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(w||(w={}));const E=new Set(["lazy","caseSensitive","path","id","index","children"]);function S(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map(((e,a)=>{let o=[...r,String(a)],i="string"==typeof e.id?e.id:o.join("-");if(f(!0!==e.index||!e.children,"Cannot specify children on an index route"),f(!n[i],'Found a route id collision on i
1d "'+i+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let r=l({},e,t(e),{id:i});return n[i]=r,r}{let r=l({},e,t(e),{id:i,children:void 0});return n[i]=r,e.children&&(r.children=S(e.children,t,o,n)),r}}))}function R(e,t,r){return void 0===r&&(r="/"),x(e,t,r,!1)}function x(e,t,r,n){let a=j(("string"==typeof t?g(t):t).pathname||"/",r);if(null==a)return null;let o=C(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 i=null;for(let e=0;null==i&&e<o.length;++e){let t=M(a);i=T(o[e],t,n)}return i}function D(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function C(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");let a=(e,a,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(f(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 s=W([n,i.relativePath]),l=r.concat(i);e.children&&e.children.length>0&&(f(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),C(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:_(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of L(e.path))
1a(e,t,r);else a(e,t)})),t}function L(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=L(n.join("/")),s=[];return s.push(...i.map((e=>""===e?o:[o,e].join("/")))),a&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const P=/^:[\w-]+$/,k=e=>"*"===e;function _(e,t){let r=e.split("/"),n=r.length;return r.some(k)&&(n+=-2),t&&(n+=2),r.filter((e=>!k(e))).reduce(((e,t)=>e+(P.test(t)?3:""===t?1:10)),n)}function T(e,t,r){void 0===r&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let e=0;e<n.length;++e){let s=n[e],l=e===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=U({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},u),d=s.route;if(!c&&l&&r&&!n[n.length-1].route.index&&(c=U({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:W([o,c.pathname]),pathnameBase:K(W([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=W([o,c.pathnameBase]))}return i}function A(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(p(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map(((e,r,n)=>{if(r===n.length-1&&"*"===e){return a(t["*"])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,r]=o;let n=t[e];return f("?"===r||null!=n,'Missing ":'+e+'" param'),a(n)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function U(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);p("*"===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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let o=new RegExp(a,t?void 0:"i");return[o,n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce(((e,t,r)=>{let{paramName:n,isOptional:a}=t;if("*"===n){let e=s[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[r];return e[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function M(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return p(!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)||"/"}const O=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function F(e,t){void 0===t&&(t="/");let r,{pathname:n,search:a="",hash:o=""}="string"==typeof e?g(e):e;if(n)if(i=n,O.test(i))r=n;else{if(n.includes("//")){let e=n;n=n.replace(/\/\/+/g,"/"),p(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+n)}r=n.startsWith("/")?N(n.substring(1),"/"):N(n,t)}else r=t;var i;return{pathname:r,search:$(a),hash:V(o)}}function N(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("/"):"/"}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 I(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function z(e,t){let r=I(e);return t?r.map(((e,t)=>t===r.length-1?e.pathname:e.pathnameBase)):r.map((e=>e.pathnameBase))}function H(e,t,r,n){let a;void 0===n&&(n=!1),"string"==typeof e?a=g(e):(a=l({},e),f(!a.pathname||!a.pathname.includes("?"),B("?","pathname","search",a)),f(!a.pathname||!a.pathname.includes("#"),B("#","pathname","hash",a)),f(!a.search||!a.search.includes("#"),B("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=F(a,o),c=s&&"/"!==s&&s.endsWith("/"),d=(i||"."===s)&&r.endsWith("/");
1return u.pathname.endsWith("/")||!c&&!d||(u.pathname+="/"),u}const W=e=>e.join("/").replace(/\/\/+/g,"/"),K=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",V=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",J=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),l({},r,{headers:n}))};class q extends Error{}class Y{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],f(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 q("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,void 0,t)),(t=>this.onSettle(r,e,t)));return r.catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,n){if(this.controller.signal.aborted&&r instanceof q)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===n){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===n?(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 f(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]:X(n)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function X(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const G=function(e,t){return void 0===t&&(t={}),new Y(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,l({},r,{headers:n}))},Z=(e,t)=>{let r=Q(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},ee=(e,t)=>{let r=Q(e,t);return r.headers.set("X-Remix-Replace","true"),r};class te{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 re(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const ne=["post","put","patch","delete"],ae=new Set(ne),oe=["get",...ne],ie=new Set(oe),se=new Set([301,302,303,307,308]),le=new Set([307,308]),ue={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ce={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},de={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},he=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),pe="remix-router-transitions";function me(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,a=!r;let o;if(f(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else o=fe;let i,s,u,c={},d=S(e.routes,o,void 0,c),h=e.basename||"/",m=e.dataStrategy||De,y=e.patchRoutesOnNavigation,g=l({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prepe
1ndBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),b=null,E=new Set,C=null,L=null,P=null,k=null!=e.hydrationData,_=R(d,e.history.location,h),T=!1,A=null;if(null==_&&!y){let t=Be(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=Ne(d);_=r,A={[n.id]:t}}if(_&&!e.hydrationData){ct(_,d,e.history.location.pathname).active&&(_=null)}if(_)if(_.some((e=>e.route.lazy)))s=!1;else if(_.some((e=>e.route.loader)))if(g.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=_.findIndex((e=>void 0!==r[e.route.id]));s=_.slice(0,e+1).every((e=>!we(e.route,t,r)))}else s=_.every((e=>!we(e.route,t,r)))}else s=null!=e.hydrationData;else s=!0;else if(s=!1,_=[],g.v7_partialHydration){let t=ct(null,d,e.history.location.pathname);t.active&&t.matches&&(T=!0,_=t.matches)}let U,M,O={historyAction:e.history.action,location:e.history.location,matches:_,initialized:s,navigation:ue,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||A,fetchers:new Map,blockers:new Map},F=n.Pop,N=!1,B=!1,I=new Map,z=null,H=!1,W=!1,K=[],$=new Set,V=new Map,J=0,q=-1,Y=new Map,X=new Set,G=new Map,Q=new Map,Z=new Set,ee=new Map,te=new Map;function ne(e,t){void 0===t&&(t={}),O=l({},O,e);let r=[],n=[];g.v7_fetcherPersist&&O.fetchers.forEach(((e,t)=>{"idle"===e.state&&(Z.has(t)?n.push(t):r.push(t))})),Z.forEach((e=>{O.fetchers.has(e)||V.has(e)||n.push(e)})),[...E].forEach((e=>e(O,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),g.v7_fetcherPersist?(r.forEach((e=>O.fetchers.delete(e))),n.forEach((e=>Ae(e)))):n.forEach((e=>Z.delete(e)))}function ae(t,r,a){var o,s;let u,{flushSync:c}=void 0===a?{}:a,h=null!=O.actionData&&null!=O.navigation.formMethod&&Ye(O.navigation.formMethod)&&"loading"===O.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);u=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:h?O.actionData:null;let f=r.loaderData?je(O.loaderData,r.loaderData,r.matches||[],r.errors):O.loaderData,p=O.blockers;p.size>0&&(p=new Map(p),p.forEach(((e,t)=>p.set(t,de))));let m,v=!0===N||null!=O.navigation.formMethod&&Ye(O.navigation.formMethod)&&!0!==(null==(s=t.state)?void 0:s._isRedirect);if(i&&(d=i,i=void 0),H||F===n.Pop||(F===n.Push?e.history.push(t,t.state):F===n.Replace&&e.history.replace(t,t.state)),F===n.Pop){let e=I.get(O.location.pathname);e&&e.has(t.pathname)?m={currentLocation:O.location,nextLocation:t}:I.has(t.pathname)&&(m={currentLocation:t,nextLocation:O.location})}else if(B){let e=I.get(O.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),I.set(O.location.pathname,e)),m={currentLocation:O.location,nextLocation:t}}ne(l({},r,{actionData:u,loaderData:f,historyAction:F,location:t,initialized:!0,navigation:ue,revalidation:"idle",restoreScrollPosition:ut(t,r.matches||O.matches),preventScrollReset:v,blockers:p}),{viewTransitionOpts:m,flushSync:!0===c}),F=n.Pop,N=!1,B=!1,H=!1,W=!1,K=[]}async function oe(t,r,a){U&&U.abort(),U=null,F=t,H=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(C&&P){let r=lt(e,t);C[r]=P()}}(O.location,O.matches),N=!0===(a&&a.preventScrollReset),B=!0===(a&&a.enableViewTransition);let o=i||d,s=a&&a.overrideNavigation,u=null!=a&&a.initialHydration&&O.matches&&O.matches.length>0&&!T?O.matches:R(o,r,h),c=!0===(a&&a.flushSync);if(u&&O.initialized&&!W&&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}(O.location,r)&&!(a&&a.submission&&Ye(a.submission.formMethod)))return void ae(r,{matches:u},{flushSync:c});let f=ct(u,o,r.pathname);if(f.active&&f.matches&&(u=f.matches),!u){let{error:e,notFoundMatches:t,route:n}=it(r.pathname);return void ae(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:c})}U=new AbortController;let p,m=_e(e.history,r,U.signal,a&&a.submission);if(a&&a.pendingError)p=[Fe(u).route.id,{type:w.error,error:a.pendingError}];else if(a&&a.submission&&Ye(a.submission.formMethod)){let t=await async function(t,r,a,o,i,s){void 0===s&&(s={});Ee();let l,u=function(e,t){let r={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}(r,a);if(ne({navigation:u},{flushSync:!0===s.flushSync}),i){let e=await dt(o,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Fe(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:w.error,error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:n}=it(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:w.error,error:t}]}}o=e.matches}let c=et(o,r);
1if(c.route.action||c.route.lazy){if(l=(await me("action",O,t,[c],o,null))[c.route.id],t.signal.aborted)return{shortCircuited:!0}}else l={type:w.error,error:Be(405,{method:t.method,pathname:r.pathname,routeId:c.route.id})};if($e(l)){let r;if(s&&null!=s.replace)r=s.replace;else{r=ke(l.response.headers.get("Location"),new URL(t.url),h,e.history)===O.location.pathname+O.location.search}return await se(t,l,!0,{submission:a,replace:r}),{shortCircuited:!0}}if(We(l))throw Be(400,{type:"defer-action"});if(Ke(l)){let e=Fe(o,c.route.id);return!0!==(s&&s.replace)&&(F=n.Push),{matches:o,pendingActionResult:[e.route.id,l]}}return{matches:o,pendingActionResult:[c.route.id,l]}}(m,r,a.submission,u,f.active,{replace:a.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,n]=t.pendingActionResult;if(Ke(n)&&re(n.error)&&404===n.error.status)return U=null,void ae(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}})}u=t.matches||u,p=t.pendingActionResult,s=rt(r,a.submission),c=!1,f.active=!1,m=_e(e.history,m.url,m.signal)}let{shortCircuited:v,matches:y,loaderData:b,errors:E}=await async function(t,r,n,a,o,s,u,c,f,p,m){let v=o||rt(r,s),y=s||u||tt(v),b=!(H||g.v7_partialHydration&&f);if(a){if(b){let e=ie(m);ne(l({navigation:v},void 0!==e?{actionData:e}:{}),{flushSync:p})}let e=await dt(n,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Fe(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=it(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}n=e.matches}let w=i||d,[E,S]=be(e.history,O,n,y,r,g.v7_partialHydration&&!0===f,g.v7_skipActionErrorRevalidation,W,K,$,Z,G,X,w,h,m);if(st((e=>!(n&&n.some((t=>t.route.id===e)))||E&&E.some((t=>t.route.id===e)))),q=++J,0===E.length&&0===S.length){let e=Ve();return ae(r,l({matches:n,loaderData:{},errors:m&&Ke(m[1])?{[m[0]]:m[1].error}:null},Oe(m),e?{fetchers:new Map(O.fetchers)}:{}),{flushSync:p}),{shortCircuited:!0}}if(b){let e={};if(!a){e.navigation=v;let t=ie(m);void 0!==t&&(e.actionData=t)}S.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=O.fetchers.get(e.key),r=nt(void 0,t?t.data:void 0);O.fetchers.set(e.key,r)})),new Map(O.fetchers)}(S)),ne(e,{flushSync:p})}S.forEach((e=>{Ue(e.key),e.controller&&V.set(e.key,e.controller)}));let R=()=>S.forEach((e=>Ue(e.key)));U&&U.signal.addEventListener("abort",R);let{loaderResults:x,fetcherResults:D}=await ge(O,n,E,S,t);if(t.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",R);S.forEach((e=>V.delete(e.key)));let C=Ie(x);if(C)return await se(t,C.result,!0,{replace:c}),{shortCircuited:!0};if(C=Ie(D),C)return X.add(C.key),await se(t,C.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:L,errors:P}=Me(O,n,x,m,S,D,ee);ee.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&ee.delete(t)}))})),g.v7_partialHydration&&f&&O.errors&&(P=l({},O.errors,P));let k=Ve(),_=Je(q),T=k||_||S.length>0;return l({matches:n,loaderData:L,errors:P},T?{fetchers:new Map(O.fetchers)}:{})}(m,r,u,f.active,s,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,c,p);v||(U=null,ae(r,l({matches:y||u},Oe(p),{loaderData:b,errors:E})))}function ie(e){return e&&!Ke(e[1])?{[e[0]]:e[1].data}:O.actionData?0===Object.keys(O.actionData).length?null:O.actionData:void 0}async function se(a,o,i,s){let{submission:u,fetcherSubmission:c,preventScrollReset:d,replace:p}=void 0===s?{}:s;o.response.headers.has("X-Remix-Revalidate")&&(W=!0);let m=o.response.headers.get("Location");f(m,"Expected a Location header on the redirect Response"),m=ke(m,new URL(a.url),h,e.history);let y=v(O.location,m,{_isRedirect:!0});if(r){let r=!1;if(o.response.headers.has("X-Remix-Reload-Document"))r=!0;else if(he.test(m)){const n=e.history.createURL(m);r=n.origin!==t.location.origin||null==j(n.pathname,h)}if(r)return void(p?t.location.replace(m):t.location.assign(m))}U=null;let g=!0===p||o.response.headers.has("X-Remix-Replace")?n.Replace:n.Push,{formMethod:b,formAction:w,formEncType:E}=O.navigation;!u&&!c&&b&&w&&E&&(u=tt(O.navigation));let S=u||c;if(le.has(o.response.status)&&S&&Ye(S.formMethod))await oe(g,y,{submission:l({},S,{formAction:m}),preventScrollReset:d||N,enableViewTransition:i?B:void 0});else{let e=rt(y,u);await oe(g,y,{overrideNavigation:e,fetcherSubmission:c,preventScrollReset:d||N,enableViewTransition:i?B:void 0})}}async function me(e,t,r,n,a,i){let s,l={};try{s=await Ce(m,e,t,r,n,a,i,c,o)}
1catch(e){return n.forEach((t=>{l[t.route.id]={type:w.error,error:e}})),l}for(let[e,t]of Object.entries(s))if(He(t)){let n=t.result;l[e]={type:w.redirect,response:Pe(n,r,e,a,h,g.v7_relativeSplatPath)}}else l[e]=await Le(t);return l}async function ge(t,r,n,a,o){let i=t.matches,s=me("loader",t,o,n,r,null),l=Promise.all(a.map((async r=>{if(r.matches&&r.match&&r.controller){let n=(await me("loader",t,_e(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:n}}return Promise.resolve({[r.key]:{type:w.error,error:Be(404,{pathname:r.path})}})}))),u=await s,c=(await l).reduce(((e,t)=>Object.assign(e,t)),{});return await Promise.all([Xe(r,u,o.signal,i,t.loaderData),Ge(r,c,a)]),{loaderResults:u,fetcherResults:c}}function Ee(){W=!0,K.push(...st()),G.forEach(((e,t)=>{V.has(t)&&$.add(t),Ue(t)}))}function Se(e,t,r){void 0===r&&(r={}),O.fetchers.set(e,t),ne({fetchers:new Map(O.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function xe(e,t,r,n){void 0===n&&(n={});let a=Fe(O.matches,t);Ae(e),ne({errors:{[a.route.id]:r},fetchers:new Map(O.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Te(e){return Q.set(e,(Q.get(e)||0)+1),Z.has(e)&&Z.delete(e),O.fetchers.get(e)||ce}function Ae(e){let t=O.fetchers.get(e);!V.has(e)||t&&"loading"===t.state&&Y.has(e)||Ue(e),G.delete(e),Y.delete(e),X.delete(e),g.v7_fetcherPersist&&Z.delete(e),$.delete(e),O.fetchers.delete(e)}function Ue(e){let t=V.get(e);t&&(t.abort(),V.delete(e))}function ze(e){for(let t of e){let e=at(Te(t).data);O.fetchers.set(t,e)}}function Ve(){let e=[],t=!1;for(let r of X){let n=O.fetchers.get(r);f(n,"Expected fetcher: "+r),"loading"===n.state&&(X.delete(r),e.push(r),t=!0)}return ze(e),t}function Je(e){let t=[];for(let[r,n]of Y)if(n<e){let e=O.fetchers.get(r);f(e,"Expected fetcher: "+r),"loading"===e.state&&(Ue(r),Y.delete(r),t.push(r))}return ze(t),t.length>0}function qe(e){O.blockers.delete(e),te.delete(e)}function Ze(e,t){let r=O.blockers.get(e)||de;f("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(O.blockers);n.set(e,t),ne({blockers:n})}function ot(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===te.size)return;te.size>1&&p(!1,"A router only supports one blocker at a time");let a=Array.from(te.entries()),[o,i]=a[a.length-1],s=O.blockers.get(o);return s&&"proceeding"===s.state?void 0:i({currentLocation:t,nextLocation:r,historyAction:n})?o:void 0}function it(e){let t=Be(404,{pathname:e}),r=i||d,{matches:n,route:a}=Ne(r);return st(),{notFoundMatches:n,route:a,error:t}}function st(e){let t=[];return ee.forEach(((r,n)=>{e&&!e(n)||(r.cancel(),t.push(n),ee.delete(n))})),t}function lt(e,t){if(L){return L(e,t.map((e=>D(e,O.loaderData))))||e.key}return e.key}function ut(e,t){if(C){let r=lt(e,t),n=C[r];if("number"==typeof n)return n}return null}function ct(e,t,r){if(y){if(!e){return{active:!0,matches:x(t,r,h,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:x(t,r,h,!0)}}}return{active:!1,matches:null}}async function dt(e,t,r,n){if(!y)return{type:"success",matches:e};let a=e;for(;;){let e=null==i,s=i||d,l=c;try{await y({signal:r,path:t,matches:a,fetcherKey:n,patch:(e,t)=>{r.aborted||Re(e,t,s,l,o)}})}catch(e){return{type:"error",error:e,partialMatches:a}}finally{e&&!r.aborted&&(d=[...d])}if(r.aborted)return{type:"aborted"};let u=R(s,t,h);if(u)return{type:"success",matches:u};let f=x(s,t,h,!0);if(!f||a.length===f.length&&a.every(((e,t)=>e.route.id===f[t].route.id)))return{type:"success",matches:null};a=f}}return u={get basename(){return h},get future(){return g},get state(){return O},get routes(){return d},get window(){return t},initialize:function(){if(b=e.history.listen((t=>{let{action:r,location:n,delta:a}=t;if(M)return M(),void(M=void 0);p(0===te.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=ot({currentLocation:O.location,nextLocation:n,historyAction:r});if(o&&null!=a){let t=new Promise((e=>{M=e}));return e.history.go(-1*a),void Ze(o,{state:"blocked",location:n,proceed(){Ze(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(a)))},reset(){let e=new Map(O.blockers);e.set(o,de),ne({blockers:e})}})}return oe(r,n)})),r){!function(e,t){try{let r=e.sessionStorage.getItem(pe);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(e){}}(t,I);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(pe,JSON.stringify(r))}catch(e){p(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,I);t.addEventListener("pagehide",e),z=()=>t.removeEventListener("pagehide",e)}return O.initialized||oe(n.Pop,O.location,{initialHydration:!0}),u},subscribe:function(e){return E.add(e),()=>E.delete(e)},enableScrollRestoration:function(e,t,r){if(C=e,P=t,L=r||null,!k&&O.navigation===ue){k=!0;let e=ut(O.location,O.matches);null!=e&&ne({restoreScrollPosition:e})}return()=>{C=null,P=null,L=null}},navigate:async function t(r,a){if("number"==typeof r)return void e.history.go(r);
vendor: 5,289 bytes, line 1
1let o=ve(O.location,O.matches,h,g.v7_prependBasename,r,g.v7_relativeSplatPath,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),{path:i,submission:s,error:u}=ye(g.v7_normalizeFormMethod,!1,o,a),c=O.location,d=v(O.location,i,a&&a.state);d=l({},d,e.history.encodeLocation(d));let f=a&&null!=a.replace?a.replace:void 0,p=n.Push;!0===f?p=n.Replace:!1===f||null!=s&&Ye(s.formMethod)&&s.formAction===O.location.pathname+O.location.search&&(p=n.Replace);let m=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,y=!0===(a&&a.flushSync),b=ot({currentLocation:c,nextLocation:d,historyAction:p});if(!b)return await oe(p,d,{submission:s,pendingError:u,preventScrollReset:m,replace:a&&a.replace,enableViewTransition:a&&a.viewTransition,flushSync:y});Ze(b,{state:"blocked",location:d,proceed(){Ze(b,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(r,a)},reset(){let e=new Map(O.blockers);e.set(b,de),ne({blockers:e})}})},fetch:function(t,r,n,o){if(a)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.");Ue(t);let s=!0===(o&&o.flushSync),l=i||d,u=ve(O.location,O.matches,h,g.v7_prependBasename,n,g.v7_relativeSplatPath,r,null==o?void 0:o.relative),c=R(l,u,h),p=ct(c,l,u);if(p.active&&p.matches&&(c=p.matches),!c)return void xe(t,r,Be(404,{pathname:u}),{flushSync:s});let{path:m,submission:v,error:y}=ye(g.v7_normalizeFormMethod,!0,u,o);if(y)return void xe(t,r,y,{flushSync:s});let b=et(c,m),w=!0===(o&&o.preventScrollReset);v&&Ye(v.formMethod)?async function(t,r,n,a,o,s,l,u,c){function p(e){if(!e.route.action&&!e.route.lazy){let e=Be(405,{method:c.formMethod,pathname:n,routeId:r});return xe(t,r,e,{flushSync:l}),!0}return!1}if(Ee(),G.delete(t),!s&&p(a))return;let m=O.fetchers.get(t);Se(t,function(e,t){let r={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};return r}(c,m),{flushSync:l});let v=new AbortController,y=_e(e.history,n,v.signal,c);if(s){let e=await dt(o,new URL(y.url).pathname,y.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void xe(t,r,e.error,{flushSync:l});if(!e.matches)return void xe(t,r,Be(404,{pathname:n}),{flushSync:l});if(p(a=et(o=e.matches,n)))return}V.set(t,v);let b=J,w=await me("action",O,y,[a],o,t),E=w[a.route.id];if(y.signal.aborted)return void(V.get(t)===v&&V.delete(t));if(g.v7_fetcherPersist&&Z.has(t)){if($e(E)||Ke(E))return void Se(t,at(void 0))}else{if($e(E))return V.delete(t),q>b?void Se(t,at(void 0)):(X.add(t),Se(t,nt(c)),se(y,E,!1,{fetcherSubmission:c,preventScrollReset:u}));if(Ke(E))return void xe(t,r,E.error)}if(We(E))throw Be(400,{type:"defer-action"});let S=O.navigation.location||O.location,x=_e(e.history,S,v.signal),D=i||d,C="idle"!==O.navigation.state?R(D,O.navigation.location,h):O.matches;f(C,"Didn't find any matches after fetcher action");let L=++J;Y.set(t,L);let P=nt(c,E.data);O.fetchers.set(t,P);let[k,_]=be(e.history,O,C,c,S,!1,g.v7_skipActionErrorRevalidation,W,K,$,Z,G,X,D,h,[a.route.id,E]);_.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=O.fetchers.get(t),n=nt(void 0,r?r.data:void 0);O.fetchers.set(t,n),Ue(t),e.controller&&V.set(t,e.controller)})),ne({fetchers:new Map(O.fetchers)});let T=()=>_.forEach((e=>Ue(e.key)));v.signal.addEventListener("abort",T);let{loaderResults:A,fetcherResults:M}=await ge(O,C,k,_,x);if(v.signal.aborted)return;v.signal.removeEventListener("abort",T),Y.delete(t),V.delete(t),_.forEach((e=>V.delete(e.key)));let j=Ie(A);if(j)return se(x,j.result,!1,{preventScrollReset:u});if(j=Ie(M),j)return X.add(j.key),se(x,j.result,!1,{preventScrollReset:u});let{loaderData:N,errors:B}=Me(O,C,A,void 0,_,M,ee);if(O.fetchers.has(t)){let e=at(E.data);O.fetchers.set(t,e)}Je(L),"loading"===O.navigation.state&&L>q?(f(F,"Expected pending action"),U&&U.abort(),ae(O.navigation.location,{matches:C,loaderData:N,errors:B,fetchers:new Map(O.fetchers)})):(ne({errors:B,loaderData:je(O.loaderData,N,C,B),fetchers:new Map(O.fetchers)}),W=!1)}(t,r,m,b,c,p.active,s,w,v):(G.set(t,{routeId:r,path:m}),async function(t,r,n,a,o,i,s,l,u){let c=O.fetchers.get(t);Se(t,nt(u,c?c.data:void 0),{flushSync:s});let d=new AbortController,h=_e(e.history,n,d.signal);if(i){let e=await dt(o,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void xe(t,r,e.error,{flushSync:s});if(!e.matches)return void xe(t,r,Be(404,{pathname:n}),{flushSync:s});a=et(o=e.matches,n)}V.set(t,d);let p=J,m=await me("loader",O,h,[a],o,t),v=m[a.route.id];We(v)&&(v=await Qe(v,h.signal,!0)||v);V.get(t)===d&&V.delete(t);if(h.signal.aborted)return;if(Z.has(t))return void Se(t,at(void 0));if($e(v))return q>p?void Se(t,at(void 0)):(X.add(t),void await se(h,v,!1,{preventScrollReset:l}));if(Ke(v))return void xe(t,r,v.error);f(!We(v),"Unhandled fetcher deferred data"),Se(t,at(v.data))}(t,r,m,b,c,p.active,s,w,v))},revalidate:function(){Ee(),ne({revalidation:"loading"}),"submitting"!==O.navigation.state&&("idle"!==O.navigation.state?oe(F||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:!0===B}):oe(O.historyAction,O.location,{startUninterruptedRevalidation:!0}
1))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Te,deleteFetcher:function(e){let t=(Q.get(e)||0)-1;t<=0?(Q.delete(e),Z.add(e),g.v7_fetcherPersist||Ae(e)):Q.set(e,t),ne({fetchers:new Map(O.fetchers)})},dispose:function(){b&&b(),z&&z(),E.clear(),U&&U.abort(),O.fetchers.forEach(((e,t)=>Ae(t))),O.blockers.forEach(((e,t)=>qe(t)))},getBlocker:function(e,t){let r=O.blockers.get(e)||de;return te.get(e)!==t&&te.set(e,t),r},deleteBlocker:qe,patchRoutes:function(e,t){let r=null==i;Re(e,t,i||d,c,o),r&&(d=[...d],ne({}))},_internalFetchControllers:V,_internalActiveDeferreds:ee,_internalSetRoutes:function(e){c={},i=S(e,o,void 0,c)}},u}Symbol("deferred");function ve(e,t,r,n,a,o,i,s){let l,u;if(i){l=[];for(let e of t)if(l.push(e),e.route.id===i){u=e;break}}else l=t,u=t[t.length-1];let c=H(a||".",z(l,o),j(e.pathname,r)||e.pathname,"path"===s);if(null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&u){let e=Ze(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();c.search=r?"?"+r:""}}return n&&"/"!==r&&(c.pathname="/"===c.pathname?r:W([r,c.pathname])),y(c)}function ye(e,t,r,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:r};if(n.formMethod&&!qe(n.formMethod))return{path:r,error:Be(405,{method:n.formMethod})};let a,o,i=()=>({path:r,error:Be(400,{type:"invalid-body"})}),s=n.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),u=ze(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!Ye(l))return i();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"}),""):String(n.body);return{path:r,submission:{formMethod:l,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!Ye(l))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:l,formAction:u,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(f("function"==typeof FormData,"FormData is not available in this environment"),n.formData)a=Te(n.formData),o=n.formData;else if(n.body instanceof FormData)a=Te(n.body),o=n.body;else if(n.body instanceof URLSearchParams)a=n.body,o=Ae(a);else if(null==n.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(n.body),o=Ae(a)}catch(e){return i()}let c={formMethod:l,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Ye(c.formMethod))return{path:r,submission:c};let d=g(r);return t&&d.search&&Ze(d.search)&&a.append("index",""),d.search="?"+a,{path:y(d),submission:c}}function ge(e,t,r){void 0===r&&(r=!1);let n=e.findIndex((e=>e.route.id===t));return n>=0?e.slice(0,r?n+1:n):e}function be(e,t,r,n,a,o,i,s,u,c,d,h,f,p,m,v){let y=v?Ke(v[1])?v[1].error:v[1].data:void 0,g=e.createURL(t.location),b=e.createURL(a),w=r;o&&t.errors?w=ge(r,Object.keys(t.errors)[0],!0):v&&Ke(v[1])&&(w=ge(r,v[0]));let E=v?v[1].statusCode:void 0,S=i&&E&&E>=400,x=w.filter(((e,r)=>{let{route:a}=e;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return we(a,t.loaderData,t.errors);if(function(e,t,r){let n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}(t.loaderData,t.matches[r],e)||u.some((t=>t===e.route.id)))return!0;let i=t.matches[r],c=e;return Se(e,l({currentUrl:g,currentParams:i.params,nextUrl:b,nextParams:c.params},n,{actionResult:y,actionStatus:E,defaultShouldRevalidate:!S&&(s||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||Ee(i,c))}))})),D=[];return h.forEach(((e,a)=>{if(o||!r.some((t=>t.route.id===e.routeId))||d.has(a))return;let i=R(p,e.path,m);if(!i)return void D.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(a),h=et(i,e.path),v=!1;f.has(a)?v=!1:c.has(a)?(c.delete(a),v=!0):v=u&&"idle"!==u.state&&void 0===u.data?s:Se(h,l({currentUrl:g,currentParam
1s:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:y,actionStatus:E,defaultShouldRevalidate:!S&&s})),v&&D.push({key:a,routeId:e.routeId,path:e.path,matches:i,match:h,controller:new AbortController})})),[x,D]}function we(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return!(!n&&a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function Ee(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Se(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function Re(e,t,r,n,a){var o;let i;if(e){let t=n[e];f(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),i=t.children}else i=r;let s=S(t.filter((e=>!i.some((t=>xe(e,t))))),a,[e||"_","patch",String((null==(o=i)?void 0:o.length)||"0")],n);i.push(...s)}function xe(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,r)=>{var n;return null==(n=t.children)?void 0:n.some((t=>xe(e,t)))})))}async function De(e){let{matches:t}=e,r=t.filter((e=>e.shouldLoad));return(await Promise.all(r.map((e=>e.resolve())))).reduce(((e,t,n)=>Object.assign(e,{[r[n].route.id]:t})),{})}async function Ce(e,t,r,n,a,o,i,s,u,c){let d=o.map((e=>e.route.lazy?async function(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];f(a,"No route found in manifest");let o={};for(let e in n){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;p(!t,'Route "'+a.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||E.has(e)||(o[e]=n[e])}Object.assign(a,o),Object.assign(a,l({},t(a),{lazy:void 0}))}(e.route,u,s):void 0)),h=o.map(((e,r)=>{let o=d[r],i=a.some((t=>t.route.id===e.route.id));return l({},e,{shouldLoad:i,resolve:async r=>(r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(i=!0),i?async function(e,t,r,n,a,o){let i,s,l=n=>{let i,l=new Promise(((e,t)=>i=t));s=()=>i(),t.signal.addEventListener("abort",s);let u=a=>"function"!=typeof n?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+r.route.id+"]")):n({request:t,params:r.params,context:o},...void 0!==a?[a]:[]),c=(async()=>{try{return{type:"data",result:await(a?a((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let a=r.route[e];if(n)if(a){let e,[t]=await Promise.all([l(a).catch((t=>{e=t})),n]);if(void 0!==e)throw e;i=t}else{if(await n,a=r.route[e],!a){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw Be(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:w.data,result:void 0}}i=await l(a)}else{if(!a){let e=new URL(t.url);throw Be(404,{pathname:e.pathname+e.search})}i=await l(a)}f(void 0!==i.result,"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){return{type:w.error,result:e}}finally{s&&t.signal.removeEventListener("abort",s)}return i}(t,n,e,o,r,c):Promise.resolve({type:w.data,result:void 0}))})})),m=await e({matches:h,request:n,params:o[0].params,fetcherKey:i,context:c});try{await Promise.all(d)}catch(e){}return m}async function Le(e){let{result:t,type:r}=e;if(Je(t)){let e;try{let r=t.headers.get("Content-Type");e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:w.error,error:e}}return r===w.error?{type:w.error,error:new te(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:w.data,data:e,statusCode:t.status,headers:t.headers}}var n,a,o,i,s,l,u,c;return r===w.error?Ve(t)?t.data instanceof Error?{type:w.error,error:t.data,statusCode:null==(o=t.init)?void 0:o.status,headers:null!=(i=t.init)&&i.headers?new Headers(t.init.headers):void 0}:{type:w.error,error:new te((null==(n=t.init)?void 0:n.status)||500,void 0,t.data),statusCode:re(t)?t.status:void 0,headers:null!=(a=t.init)&&a.headers?new Headers(t.init.headers):void 0}:{type:w.error,error:t,statusCode:re(t)?t.status:void 0}: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}(t)?{type:w.deferred,deferredData:t,statusCode:null==(s=t.init)?void 0:s.status,headers:(null==(l=t.init)?void 0:l.headers)&&new Headers(t.init.headers)}:Ve(t)?{type:w.data,data:t.data,statusCode:null==(u=t.init)?void 0:u.status,headers:null!=(c=t.init)&&c.headers?new Headers(t.init.headers):void 0}:{type:w.data,data:t}}function Pe(e,t,r,n,a,o){let i=e.headers.get("Location");if(f(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!he.test(i)){let s=n.slice(0,n.findIndex((e=>e.route.id===r))+1);
1i=ve(new URL(t.url),s,a,!0,i,o),e.headers.set("Location",i)}return e}function ke(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(he.test(e)){let n=e,o=n.startsWith("//")?new URL(t.protocol+n):new URL(n);if(a.includes(o.protocol))throw new Error("Invalid redirect location");let i=null!=j(o.pathname,r);if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}try{let t=n.createURL(e);if(a.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function _e(e,t,r,n){let a=e.createURL(ze(t)).toString(),o={signal:r};if(n&&Ye(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=Te(n.formData):o.body=n.formData}return new Request(a,o)}function Te(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function Ae(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ue(e,t,r,n,a){let o,i={},s=null,l=!1,u={},c=r&&Ke(r[1])?r[1].error:void 0;return e.forEach((r=>{if(!(r.route.id in t))return;let d=r.route.id,h=t[d];if(f(!$e(h),"Cannot handle redirect results in processLoaderData"),Ke(h)){let t=h.error;if(void 0!==c&&(t=c,c=void 0),s=s||{},a)s[d]=t;else{let r=Fe(e,d);null==s[r.route.id]&&(s[r.route.id]=t)}i[d]=void 0,l||(l=!0,o=re(h.error)?h.error.status:500),h.headers&&(u[d]=h.headers)}else We(h)?(n.set(d,h.deferredData),i[d]=h.deferredData.data,null==h.statusCode||200===h.statusCode||l||(o=h.statusCode),h.headers&&(u[d]=h.headers)):(i[d]=h.data,h.statusCode&&200!==h.statusCode&&!l&&(o=h.statusCode),h.headers&&(u[d]=h.headers))})),void 0!==c&&r&&(s={[r[0]]:c},i[r[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:u}}function Me(e,t,r,n,a,o,i){let{loaderData:s,errors:u}=Ue(t,r,n,i,!1);return a.forEach((t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(f(i,"Did not find corresponding fetcher result"),!a||!a.signal.aborted)if(Ke(i)){let t=Fe(e.matches,null==n?void 0:n.route.id);u&&u[t.route.id]||(u=l({},u,{[t.route.id]:i.error})),e.fetchers.delete(r)}else if($e(i))f(!1,"Unhandled fetcher revalidation redirect");else if(We(i))f(!1,"Unhandled fetcher deferred data");else{let t=at(i.data);e.fetchers.set(r,t)}})),{loaderData:s,errors:u}}function je(e,t,r,n){let a=l({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function Oe(e){return e?Ke(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fe(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 Ne(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Be(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",a&&r&&n?l="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?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(s="Not Found",l='No route matches URL "'+r+'"'):405===e&&(s="Method Not Allowed",a&&r&&n?l="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&&(l='Invalid request method "'+a.toUpperCase()+'"')),new te(e||500,s,new Error(l),!0)}function Ie(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if($e(n))return{key:r,result:n}}}function ze(e){return y(l({},"string"==typeof e?g(e):e,{hash:""}))}function He(e){return Je(e.result)&&se.has(e.result.status)}function We(e){return e.type===w.deferred}function Ke(e){return e.type===w.error}function $e(e){return(e&&e.type)===w.redirect}function Ve(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Je(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function qe(e){return ie.has(e.toLowerCase())}function Ye(e){return ae.has(e.toLowerCase())}async function Xe(e,t,r,n,a){let o=Object.entries(t);for(let i=0;i<o.length;i++){let[s,l]=o[i],u=e.find((e=>(null==e?void 0:e.route.id)===s));if(!u)continue;let c=n.find((e=>e.route.id===u.route.id)),d=null!=c&&!Ee(c,u)&&void 0!==(a&&a[u.route.id]);We(l)&&d&&await Qe(l,r,!1).then((e=>{e&&(t[s]=e)}))}}async function Ge(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:o,controller:i}=r[n],s=t[a];e.find((e=>(null==e?void 0:e.route.id)===o))&&(We(s)&&(f(i,"Expected an AbortController for revalidating fetcher deferred result"),await Qe(s,i.signal,!0).then((e=>{e&&(t[a]=e)}))))}}async function Qe(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:w.data,data:e.deferredData.unwrappedData}
1}catch(e){return{type:w.error,error:e}}return{type:w.data,data:e.deferredData.data}}}function Ze(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function et(e,t){let r="string"==typeof t?g(t).search:t.search;if(e[e.length-1].route.index&&Ze(r||""))return e[e.length-1];let n=I(e);return n[n.length-1]}function tt(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function rt(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nt(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function at(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ot(){return ot=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},ot.apply(this,arguments)}const it=a.createContext(null);const st=a.createContext(null);const lt=a.createContext(null);const ut=a.createContext(null);const ct=a.createContext(null);const dt=a.createContext({outlet:null,matches:[],isDataRoute:!1});const ht=a.createContext(null);function ft(e,t){let{relative:r}=void 0===t?{}:t;pt()||f(!1);let{basename:n,navigator:o}=a.useContext(ut),{hash:i,pathname:s,search:l}=xt(e,{relative:r}),u=s;return"/"!==n&&(u="/"===s?n:W([n,s])),o.createHref({pathname:u,search:l,hash:i})}function pt(){return null!=a.useContext(ct)}function mt(){return pt()||f(!1),a.useContext(ct).location}function vt(){return a.useContext(ct).navigationType}function yt(e){pt()||f(!1);let{pathname:t}=mt();return a.useMemo((()=>U(e,M(t))),[t,e])}function gt(e){a.useContext(ut).static||a.useLayoutEffect(e)}function bt(){let{isDataRoute:e}=a.useContext(dt);return e?function(){let{router:e}=Mt(At.UseNavigateStable),t=Ot(Ut.UseNavigateStable),r=a.useRef(!1);return gt((()=>{r.current=!0})),a.useCallback((function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,ot({fromRouteId:t},a)))}),[e,t])}():function(){pt()||f(!1);let e=a.useContext(it),{basename:t,future:r,navigator:n}=a.useContext(ut),{matches:o}=a.useContext(dt),{pathname:i}=mt(),s=JSON.stringify(z(o,r.v7_relativeSplatPath)),l=a.useRef(!1);return gt((()=>{l.current=!0})),a.useCallback((function(r,a){if(void 0===a&&(a={}),!l.current)return;if("number"==typeof r)return void n.go(r);let o=H(r,JSON.parse(s),i,"path"===a.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:W([t,o.pathname])),(a.replace?n.replace:n.push)(o,a.state,a)}),[t,n,s,i,e])}()}const wt=a.createContext(null);function Et(){return a.useContext(wt)}function St(e){let t=a.useContext(dt).outlet;return t?a.createElement(wt.Provider,{value:e},t):t}function Rt(){let{matches:e}=a.useContext(dt),t=e[e.length-1];return t?t.params:{}}function xt(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=a.useContext(ut),{matches:o}=a.useContext(dt),{pathname:i}=mt(),s=JSON.stringify(z(o,n.v7_relativeSplatPath));return a.useMemo((()=>H(e,JSON.parse(s),i,"path"===r)),[e,s,i,r])}function Dt(e,t){return Ct(e,t)}function Ct(e,t,r,o){pt()||f(!1);let{navigator:i}=a.useContext(ut),{matches:s}=a.useContext(dt),l=s[s.length-1],u=l?l.params:{},c=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let d,h=mt();if(t){var p;let e="string"==typeof t?g(t):t;"/"===c||(null==(p=e.pathname)?void 0:p.startsWith(c))||f(!1),d=e}else d=h;let m=d.pathname||"/",v=m;if("/"!==c){let e=c.replace(/^\//,"").split("/");v="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let y=R(e,{pathname:v});let b=Tt(y&&y.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:W([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:W([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,r,o);return t&&b?a.createElement(ct.Provider,{value:{location:ot({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:n.Pop}},b):b}function Lt(){let e=Kt(),t=re(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)",o={padding:"0.5rem",backgroundColor:n};return a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application
1Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),r?a.createElement("pre",{style:o},r):null,null)}const Pt=a.createElement(Lt,null);class kt extends a.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:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?a.createElement(dt.Provider,{value:this.props.routeContext},a.createElement(ht.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _t(e){let{routeContext:t,match:r,children:n}=e,o=a.useContext(it);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),a.createElement(dt.Provider,{value:t},n)}function Tt(e,t,r,n){var o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=n)&&i.v7_partialHydration&&0===t.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let s=e,l=null==(o=r)?void 0:o.errors;if(null!=l){let e=s.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||f(!1),s=s.slice(0,Math.min(s.length,e+1))}let u=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let e=0;e<s.length;e++){let t=s[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:n}=r,a=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){u=!0,s=c>=0?s.slice(0,c+1):[s[0]];break}}}return s.reduceRight(((e,n,o)=>{let i,d=!1,h=null,f=null;var p;r&&(i=l&&n.route.id?l[n.route.id]:void 0,h=n.route.errorElement||Pt,u&&(c<0&&0===o?(p="route-fallback",!1||Yt[p]||(Yt[p]=!0),d=!0,f=null):c===o&&(d=!0,f=n.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,o+1)),v=()=>{let t;return t=i?h:d?f:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(_t,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===o)?a.createElement(kt,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()}),null)}var At=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(At||{}),Ut=function(e){return 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",e}(Ut||{});function Mt(e){let t=a.useContext(it);return t||f(!1),t}function jt(e){let t=a.useContext(st);return t||f(!1),t}function Ot(e){let t=function(){let e=a.useContext(dt);return e||f(!1),e}(),r=t.matches[t.matches.length-1];return r.route.id||f(!1),r.route.id}function Ft(){return Ot(Ut.UseRouteId)}function Nt(){return jt(Ut.UseNavigation).navigation}function Bt(){let e=Mt(At.UseRevalidator),t=jt(Ut.UseRevalidator);return a.useMemo((()=>({revalidate:e.router.revalidate,state:t.revalidation})),[e.router.revalidate,t.revalidation])}function It(){let{matches:e,loaderData:t}=jt(Ut.UseMatches);return a.useMemo((()=>e.map((e=>D(e,t)))),[e,t])}function zt(){let e=jt(Ut.UseLoaderData),t=Ot(Ut.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t]}function Ht(e){return jt(Ut.UseRouteLoaderData).loaderData[e]}function Wt(){let e=jt(Ut.UseActionData),t=Ot(Ut.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Kt(){var e;let t=a.useContext(ht),r=jt(Ut.UseRouteError),n=Ot(Ut.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function $t(){let e=a.useContext(lt);return null==e?void 0:e._data}function Vt(){let e=a.useContext(lt);return null==e?void 0:e._error}let Jt=0;function qt(e){let{router:t,basename:r}=Mt(At.UseBlocker),n=jt(Ut.UseBlocker),[o,i]=a.useState(""),s=a.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:ot({},n,{pathname:j(n.pathname,r)||n.pathname}),nextLocation:ot({},a,{pathname:j(a.pathname,r)||a.pathname}),historyAction:o})}),[r,e]);return a.useEffect((()=>{let e=String(++Jt);return i(e),()=>t.deleteBlocker(e)}),[t]),a.useEffect((()=>{""!==o&&t.getBlocker(o,s)}),[t,o,s]),o&&n.blockers.has(o)?n.blockers.get(o):de}const Yt={};function Xt(e,t){null==e||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}const Gt=o.startTransition;function Qt(e){let{basename:t,children:r,initialEntries:n,initialIndex:o,future:i}=e,s=a.useRef();null==s.current&&(s.current=c({initialEntries:n,initialIndex:o,v5Compat:!0}));
1let l=s.current,[u,d]=a.useState({action:l.action,location:l.location}),{v7_startTransition:h}=i||{},f=a.useCallback((e=>{h&&Gt?Gt((()=>d(e))):d(e)}),[d,h]);return a.useLayoutEffect((()=>l.listen(f)),[l,f]),a.useEffect((()=>Xt(i)),[i]),a.createElement(rr,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:l,future:i})}function Zt(e){let{to:t,replace:r,state:n,relative:o}=e;pt()||f(!1);let{future:i,static:s}=a.useContext(ut),{matches:l}=a.useContext(dt),{pathname:u}=mt(),c=bt(),d=H(t,z(l,i.v7_relativeSplatPath),u,"path"===o),h=JSON.stringify(d);return a.useEffect((()=>c(JSON.parse(h),{replace:r,state:n,relative:o})),[c,h,o,r,n]),null}function er(e){return St(e.context)}function tr(e){f(!1)}function rr(e){let{basename:t="/",children:r=null,location:o,navigationType:i=n.Pop,navigator:s,static:l=!1,future:u}=e;pt()&&f(!1);let c=t.replace(/^\/*/,"/"),d=a.useMemo((()=>({basename:c,navigator:s,static:l,future:ot({v7_relativeSplatPath:!1},u)})),[c,u,s,l]);"string"==typeof o&&(o=g(o));let{pathname:h="/",search:p="",hash:m="",state:v=null,key:y="default"}=o,b=a.useMemo((()=>{let e=j(h,c);return null==e?null:{location:{pathname:e,search:p,hash:m,state:v,key:y},navigationType:i}}),[c,h,p,m,v,y,i]);return null==b?null:a.createElement(ut.Provider,{value:d},a.createElement(ct.Provider,{children:r,value:b}))}function nr(e){let{children:t,location:r}=e;return Dt(ur(t),r)}function ar(e){let{children:t,errorElement:r,resolve:n}=e;return a.createElement(sr,{resolve:n,errorElement:r},a.createElement(lr,null,t))}var or=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(or||{});const ir=new Promise((()=>{}));class sr extends a.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,o=or.pending;if(r instanceof Promise)if(this.state.error){o=or.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,o="_error"in n?or.error:"_data"in n?or.success:or.pending):(o=or.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 o=or.success,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(o===or.error&&n._error instanceof q)throw ir;if(o===or.error&&!t)throw n._error;if(o===or.error)return a.createElement(lt.Provider,{value:n,children:t});if(o===or.success)return a.createElement(lt.Provider,{value:n,children:e});throw n}}function lr(e){let{children:t}=e,r=$t(),n="function"==typeof t?t(r):t;return a.createElement(a.Fragment,null,n)}function ur(e,t){void 0===t&&(t=[]);let r=[];return a.Children.forEach(e,((e,n)=>{if(!a.isValidElement(e))return;let o=[...t,n];if(e.type===a.Fragment)return void r.push.apply(r,ur(e.props.children,o));e.type!==tr&&f(!1),e.props.index&&e.props.children&&f(!1);let i={id:e.props.id||o.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=ur(e.props.children,o)),r.push(i)})),r}function cr(e){return Tt(e)}function dr(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:a.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function hr(e,t){return me({basename:null==t?void 0:t.basename,future:ot({}
1,null==t?void 0:t.future,{v7_prependBasename:!0}),history:c({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:dr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation}).initialize()}function fr(){return fr=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},fr.apply(this,arguments)}function pr(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}const mr="get",vr="application/x-www-form-urlencoded";function yr(e){return null!=e&&"string"==typeof e.tagName}function gr(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]])}),[]))}let br=null;const wr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Er(e){return null==e||wr.has(e)?e:null}function Sr(e,t){let r,n,a,o,i;if(yr(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?j(i,t):null,r=e.getAttribute("method")||mr,a=Er(e.getAttribute("enctype"))||vr,o=new FormData(e)}else if(function(e){return yr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return yr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(n=s?j(s,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||mr,a=Er(e.getAttribute("formenctype"))||Er(i.getAttribute("enctype"))||vr,o=new FormData(i,e),!function(){if(null===br)try{new FormData(document.createElement("form"),0),br=!1}catch(e){br=!0}return br}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,n)}}else{if(yr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=mr,n=null,a=vr,i=e}var s;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}const Rr=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],xr=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Dr=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function Cr(e,t){return me({basename:null==t?void 0:t.basename,future:fr({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:d({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||Pr(),routes:e,mapRouteProperties:dr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function Lr(e,t){return me({basename:null==t?void 0:t.basename,future:fr({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:h({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||Pr(),routes:e,mapRouteProperties:dr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function Pr(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=fr({},t,{errors:kr(t.errors)})),t}function kr(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new te(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let a=new t(n.message);a.stack="",r[e]=a}catch(e){}}if(null==r[e]){let t=new Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}const _r=a.createContext({isTransitioning:!1});const Tr=a.createContext(new Map);const Ar=o.startTransition,Ur=s.flushSync,Mr=o.useId;function jr(e){Ur?Ur(e):e()}class Or{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>
1{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function Fr(e){let{fallbackElement:t,router:r,future:n}=e,[o,i]=a.useState(r.state),[s,l]=a.useState(),[u,c]=a.useState({isTransitioning:!1}),[d,h]=a.useState(),[f,p]=a.useState(),[m,v]=a.useState(),y=a.useRef(new Map),{v7_startTransition:g}=n||{},b=a.useCallback((e=>{g?function(e){Ar?Ar(e):e()}(e):e()}),[g]),w=a.useCallback(((e,t)=>{let{deletedFetchers:n,flushSync:a,viewTransitionOpts:o}=t;e.fetchers.forEach(((e,t)=>{void 0!==e.data&&y.current.set(t,e.data)})),n.forEach((e=>y.current.delete(e)));let s=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(o&&!s){if(a){jr((()=>{f&&(d&&d.resolve(),f.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})}));let t=r.window.document.startViewTransition((()=>{jr((()=>i(e)))}));return t.finished.finally((()=>{jr((()=>{h(void 0),p(void 0),l(void 0),c({isTransitioning:!1})}
1))})),void jr((()=>p(t)))}f?(d&&d.resolve(),f.skipTransition(),v({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(l(e),c({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))}else a?jr((()=>i(e))):b((()=>i(e)))}),[r.window,f,d,y,b]);a.useLayoutEffect((()=>r.subscribe(w)),[r,w]),a.useEffect((()=>{u.isTransitioning&&!u.flushSync&&h(new Or)}),[u]),a.useEffect((()=>{if(d&&s&&r.window){let e=s,t=d.promise,n=r.window.document.startViewTransition((async()=>{b((()=>i(e))),await t}));n.finished.finally((()=>{h(void 0),p(void 0),l(void 0),c({isTransitioning:!1})})),p(n)}}),[b,s,d,r.window]),a.useEffect((()=>{d&&s&&o.location.key===s.location.key&&d.resolve()}),[d,f,o.location,s]),a.useEffect((()=>{!u.isTransitioning&&m&&(l(m.state),c({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))}),[u.isTransitioning,m]),a.useEffect((()=>{}),[]);let E=a.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]),S=r.basename||"/",R=a.useMemo((()=>({router:r,navigator:E,static:!1,basename:S})),[r,E,S]),x=a.useMemo((()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath})),[r.future.v7_relativeSplatPath]);return a.useEffect((()=>Xt(n,r.future)),[n,r.future]),a.createElement(a.Fragment,null,a.createElement(it.Provider,{value:R},a.createElement(st.Provider,{value:o},a.createElement(Tr.Provider,{value:y.current},a.createElement(_r.Provider,{value:u},a.createElement(rr,{basename:S,location:o.location,navigationType:o.historyAction,navigator:E,future:x},o.initialized||r.future.v7_partialHydration?a.createElement(Nr,{routes:r.routes,future:r.future,state:o}):t))))),null)}const Nr=a.memo(Br);function Br(e){let{routes:t,future:r,state:n}=e;return Ct(t,void 0,n,r)}function Ir(e){let{basename:t,children:r,future:n,window:o}=e,i=a.useRef();null==i.current&&(i.current=d({window:o,v5Compat:!0}));let s=i.current,[l,u]=a.useState({action:s.action,location:s.location}),{v7_startTransition:c}=n||{},h=a.useCallback((e=>{c&&Ar?Ar((()=>u(e))):u(e)}),[u,c]);return a.useLayoutEffect((()=>s.listen(h)),[s,h]),a.useEffect((()=>Xt(n)),[n]),a.createElement(rr,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:n})}function zr(e){let{basename:t,children:r,future:n,window:o}=e,i=a.useRef();null==i.current&&(i.current=h({window:o,v5Compat:!0}));let s=i.current,[l,u]=a.useState({action:s.action,location:s.location}),{v7_startTransition:c}=n||{},d=a.useCallback((e=>{c&&Ar?Ar((()=>u(e))):u(e)}),[u,c]);return a.useLayoutEffect((()=>s.listen(d)),[s,d]),a.useEffect((()=>Xt(n)),[n]),a.createElement(rr,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:n})}function Hr(e){let{basename:t,children:r,future:n,history:o}=e,[i,s]=a.useState({action:o.action,location:o.location}),{v7_startTransition:l}=n||{},u=a.useCallback((e=>{l&&Ar?Ar((()=>s(e))):s(e)}),[s,l]);return a.useLayoutEffect((()=>o.listen(u)),[o,u]),a.useEffect((()=>Xt(n)),[n]),a.createElement(rr,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o,future:n})}const Wr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Kr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$r=a.forwardRef((function(e,t){let r,{onClick:n,relative:o,reloadDocument:i,replace:s,state:l,target:u,to:c,preventScrollReset:d,viewTransition:h}=e,f=pr(e,Rr),{basename:p}=a.useContext(ut),m=!1;if("string"==typeof c&&Kr.test(c)&&(r=c,Wr))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=j(t.pathname,p);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:m=!0}catch(e){}let v=ft(c,{relative:o}),y=Zr(c,{replace:s,state:l,target:u,preventScrollReset:d,relative:o,viewTransition:h});return a.createElement("a",fr({},f,{href:r||v,onClick:m||i?n:function(e){n&&n(e),e.defaultPrevented||y(e)},ref:t,target:u}))}));const Vr=a.forwardRef((function(e,t){let{"aria-current":r="page",caseSensitive:n=!1,className:o="",end:i=!1,style:s,to:l,viewTransition:u,children:c}=e,d=pr(e,xr),h=xt(l,{relative:d.relative}),f=mt(),p=a.useContext(st),{navigator:m,basename:v}=a.useContext(ut),y=null!=p&&fn(h)&&!0===u,g=m.encodeLocation?m.encodeLocation(h).pathname:h.pathname,b=f.pathname,w=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(b=b.toLowerCase(),w=w?w.toLowerCase():null,g=g.toLowerCase()),w&&v&&(w=j(w,v)||w);const E="/"!==g&&g.endsWith("/")?g.length-1:g.length;let S,R=b===g||!i&&b.startsWith(g)&&"/"===b.charAt(E),x=null!=w&&(w===g||!i&&w.startsWith(g)&&"/"===w.charAt(g.length)),D={isActive:R,isPending:x,isTransitioning:y},C=R?r:void 0;S="function"==typeof o?o(D):[o,R?"active":null,x?"pending":null,y?"transitioning":null].filter(
1Boolean).join(" ");let L="function"==typeof s?s(D):s;return a.createElement($r,fr({},d,{"aria-current":C,className:S,ref:t,style:L,to:l,viewTransition:u}),"function"==typeof c?c(D):c)}));const Jr=a.forwardRef(((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:o,replace:i,state:s,method:l=mr,action:u,onSubmit:c,relative:d,preventScrollReset:h,viewTransition:f}=e,p=pr(e,Dr),m=nn(),v=an(u,{relative:d}),y="get"===l.toLowerCase()?"get":"post";return a.createElement("form",fr({ref:t,method:y,action:v,onSubmit:o?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||l;m(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:i,state:s,relative:d,preventScrollReset:h,viewTransition:f})}},p))}));function qr(e){let{getKey:t,storageKey:r}=e;return cn({getKey:t,storageKey:r}),null}var Yr,Xr;function Gr(e){let t=a.useContext(it);return t||f(!1),t}function Qr(e){let t=a.useContext(st);return t||f(!1),t}function Zr(e,t){let{target:r,replace:n,state:o,preventScrollReset:i,relative:s,viewTransition:l}=void 0===t?{}:t,u=bt(),c=mt(),d=xt(e,{relative:s});return a.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:y(c)===y(d);u(e,{replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l})}}),[c,u,d,n,o,r,e,i,s,l])}function en(e){let t=a.useRef(gr(e)),r=a.useRef(!1),n=mt(),o=a.useMemo((()=>function(e,t){let r=gr(e);return t&&t.forEach(((e,n)=>{r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}))})),r}(n.search,r.current?null:t.current)),[n.search]),i=bt(),s=a.useCallback(((e,t)=>{const n=gr("function"==typeof e?e(o):e);r.current=!0,i("?"+n,t)}),[i,o]);return[o,s]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Yr||(Yr={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Xr||(Xr={}));let tn=0,rn=()=>"__"+String(++tn)+"__";function nn(){let{router:e}
1=Gr(Yr.UseSubmit),{basename:t}=a.useContext(ut),r=Ft();return a.useCallback((function(n,a){void 0===a&&(a={}),function(){if("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:o,method:i,encType:s,formData:l,body:u}=Sr(n,t);if(!1===a.navigate){let t=a.fetcherKey||rn();e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,flushSync:a.flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})}),[e,t,r])}function an(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=a.useContext(ut),o=a.useContext(dt);o||f(!1);let[i]=o.matches.slice(-1),s=fr({},xt(e||".",{relative:r})),l=mt();if(null==e){s.search=l.search;let e=new URLSearchParams(s.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();s.search=r?"?"+r:""}}return e&&"."!==e||!i.route.index||(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(s.pathname="/"===s.pathname?n:W([n,s.pathname])),y(s)}function on(e){var t;let{key:r}=void 0===e?{}:e,{router:n}=Gr(Yr.UseFetcher),o=Qr(Xr.UseFetcher),i=a.useContext(Tr),s=a.useContext(dt),l=null==(t=s.matches[s.matches.length-1])?void 0:t.route.id;i||f(!1),s||f(!1),null==l&&f(!1);let u=Mr?Mr():"",[c,d]=a.useState(r||u);r&&r!==c?d(r):c||d(rn()),a.useEffect((()=>(n.getFetcher(c),()=>{n.deleteFetcher(c)})),[n,c]);let h=a.useCallback(((e,t)=>{l||f(!1),n.fetch(c,l,e,t)}),[c,l,n]),p=nn(),m=a.useCallback(((e,t)=>{p(e,fr({},t,{navigate:!1,fetcherKey:c}))}),[c,p]),v=a.useMemo((()=>a.forwardRef(((e,t)=>a.createElement(Jr,fr({},e,{navigate:!1,fetcherKey:c,ref:t}))))),[c]),y=o.fetchers.get(c)||ce,g=i.get(c);return a.useMemo((()=>fr({Form:v,submit:m,load:h},y,{data:g})),[v,m,h,y,g])}function sn(){let e=Qr(Xr.UseFetchers);return Array.from(e.fetchers.entries()).map((e=>{let[t,r]=e;return fr({},r,{key:t})}))}const ln="react-router-scroll-positions";let un={};function cn(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=Gr(Yr.UseScrollRestoration),{restoreScrollPosition:o,preventScrollReset:i}=Qr(Xr.UseScrollRestoration),{basename:s}=a.useContext(ut),l=mt(),u=It(),c=Nt();a.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:r}=t||{};a.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,r])}(a.useCallback((()=>{if("idle"===c.state){let e=(t?t(l,u):null)||l.key;un[e]=window.scrollY}try{sessionStorage.setItem(r||ln,JSON.stringify(un))}catch(e){}window.history.scrollRestoration="auto"}),[r,t,c.state,l,u])),"undefined"!=typeof document&&(a.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||ln);e&&(un=JSON.parse(e))}catch(e){}}),[r]),a.useLayoutEffect((()=>{let e=t&&"/"!==s?(e,r)=>t(fr({},e,{pathname:j(e.pathname,s)||e.pathname}),r):t,r=null==n?void 0:n.enableScrollRestoration(un,(()=>window.scrollY),e);return()=>r&&r()}),[n,s,t]),a.useLayoutEffect((()=>{if(!1!==o)if("number"!=typeof o){if(l.hash){let e=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==i&&window.scrollTo(0,0)}else window.scrollTo(0,o)}),[l,o,i]))}function dn(e,t){let{capture:r}=t||{};a.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}}),[e,r])}function hn(e){let{when:t,message:r}=e,n=qt(t);a.useEffect((()=>{if("blocked"===n.state){window.confirm(r)?setTimeout(n.proceed,0):n.reset()}}),[n,r]),a.useEffect((()=>{"blocked"!==n.state||t||n.reset()}),[n,t])}function fn(e,t){void 0===t&&(t={});let r=a.useContext(_r);null==r&&f(!1);let{basename:n}=Gr(Yr.useViewTransitionState),o=xt(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=j(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=j(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=U(o.pathname,s)||null!=U(o.pathname,i)}}}]);
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.