
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ca1c80bf-9de1-5ca5-a613-fea7471536d0")}catch(e){}}();
import{r as Wr}from"./index-yBjzXJbu.js";function Kr(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(n,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w=Wr();const $r=Vr(w),ua=Kr({__proto__:null,default:$r},[w]);/**
 * @remix-run/router v1.23.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function B(){return B=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},B.apply(this,arguments)}var V;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(V||(V={}));const Yt="popstate";function ca(e){e===void 0&&(e={});function t(n,a){let{pathname:s,search:o,hash:c}=n.location;return Ge("",{pathname:s,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Qe(a)}return Yr(t,r,null,e)}function T(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ae(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Jr(){return Math.random().toString(36).substr(2,8)}function Gt(e,t){return{usr:e.state,key:e.key,idx:t}}function Ge(e,t,r,n){return r===void 0&&(r=null),B({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ye(t):t,{state:r,key:t&&t.key||n||Jr()})}function Qe(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 ye(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 Yr(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,c=V.Pop,d=null,m=v();m==null&&(m=0,o.replaceState(B({},o.state,{idx:m}),""));function v(){return(o.state||{idx:null}).idx}function h(){c=V.Pop;let S=v(),I=S==null?null:S-m;m=S,d&&d({action:c,location:C.location,delta:I})}function y(S,I){c=V.Push;let O=Ge(C.location,S,I);m=v()+1;let J=Gt(O,m),te=C.createHref(O);try{o.pushState(J,"",te)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;a.location.assign(te)}s&&d&&d({action:c,location:C.location,delta:1})}function b(S,I){c=V.Replace;let O=Ge(C.location,S,I);m=v();let J=Gt(O,m),te=C.createHref(O);o.replaceState(J,"",te),s&&d&&d({action:c,location:C.location,delta:0})}function M(S){let I=a.location.origin!=="null"?a.location.origin:a.location.href,O=typeof S=="string"?S:Qe(S);return O=O.replace(/ $/,"%20"),T(I,"No window.location.(origin|href) available to create URL for href: "+O),new URL(O,I)}let C={get action(){return c},get location(){return e(a,o)},listen(S){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(Yt,h),d=S,()=>{a.removeEventListener(Yt,h),d=null}},createHref(S){return t(a,S)},createURL:M,encodeLocation(S){let I=M(S);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:y,replace:b,go(S){return o.go(S)}};return C}var A;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(A||(A={}));const Gr=new Set(["lazy","caseSensitive","path","id","index","children"]);function Xr(e){return e.index===!0}function ht(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,s)=>{let o=[...r,String(s)],c=typeof a.id=="string"?a.id:o.join("-");if(T(a.index!==!0||!a.children,"Cannot specify children on an index route"),T(!n[c],'Found a route id collision on id "'+c+`".  Route id's must be globally unique within Data Router usages`),Xr(a)){let d=B({},a,t(a),{id:c});return n[c]=d,d}else{let d=B({},a,t(a),{id:c,children:void 0});return n[c]=d,a.children&&(d.children=ht(a.children,t,o,n)),d}})}function xe(e,t,r){return r===void 0&&(r="/"),ft(e,t,r,!1)}function ft(e,t,r,n){let a=typeof t=="string"?ye(t):t,s=Ze(a.pathname||"/",r);if(s==null)return null;let o=hr(e);Qr(o);let c=null;for(let d=0;c==null&&d<o.length;++d){let m=dn(s);c=ln(o[d],m,n)}return c}function fr(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 hr(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(s,o,c)=>{let d={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};d.relativePath.startsWith("/")&&(T(d.relativePath.startsWith(n),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(n.length));let m=fe([n,d.relativePath]),v=r.concat(d);s.children&&s.children.length>0&&(T(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),hr(s.children,t,v,m)),!(s.path==null&&!s.index)&&t.push({path:m,score:an(m,s.index),routesMeta:v})};return e.forEach((s,o)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))a(s,o);else for(let d of mr(s.path))a(s,o,d)}),t}function mr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return a?[s,""]:[s];let o=mr(n.join("/")),c=[];return c.push(...o.map(d=>d===""?s:[s,d].join("/"))),a&&c.push(...o),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function Qr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:on(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Zr=/^:[\w-]+$/,qr=3,en=2,tn=1,rn=10,nn=-2,Xt=e=>e==="*";function an(e,t){let r=e.split("/"),n=r.length;return r.some(Xt)&&(n+=nn),t&&(n+=en),r.filter(a=>!Xt(a)).reduce((a,s)=>a+(Zr.test(s)?qr:s===""?tn:rn),n)}function on(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function ln(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},s="/",o=[];for(let c=0;c<n.length;++c){let d=n[c],m=c===n.length-1,v=s==="/"?t:t.slice(s.length)||"/",h=Qt({path:d.relativePath,caseSensitive:d.caseSensitive,end:m},v),y=d.route;if(!h&&m&&r&&!n[n.length-1].route.index&&(h=Qt({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},v)),!h)return null;Object.assign(a,h.params),o.push({params:a,pathname:fe([s,h.pathname]),pathnameBase:fn(fe([s,h.pathnameBase])),route:y}),h.pathnameBase!=="/"&&(s=fe([s,h.pathnameBase]))}return o}function Qt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=sn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((m,v,h)=>{let{paramName:y,isOptional:b}=v;if(y==="*"){let C=c[h]||"";o=s.slice(0,s.length-C.length).replace(/(.)\/+$/,"$1")}const M=c[h];return b&&!M?m[y]=void 0:m[y]=(M||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:o,pattern:e}}function sn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Ae(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,(o,c,d)=>(n.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function dn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ae(!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 Ze(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 un(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ye(e):e;return{pathname:r?r.startsWith("/")?r:cn(r,t):t,search:hn(n),hash:mn(a)}}function cn(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function wt(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 pr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ct(e,t){let r=pr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Lt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ye(e):(a=B({},e),T(!a.pathname||!a.pathname.includes("?"),wt("?","pathname","search",a)),T(!a.pathname||!a.pathname.includes("#"),wt("#","pathname","hash",a)),T(!a.search||!a.search.includes("#"),wt("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,c;if(o==null)c=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let y=o.split("/");for(;y[0]==="..";)y.shift(),h-=1;a.pathname=y.join("/")}c=h>=0?t[h]:"/"}let d=un(a,c),m=o&&o!=="/"&&o.endsWith("/"),v=(s||o===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(m||v)&&(d.pathname+="/"),d}const fe=e=>e.join("/").replace(/\/\/+/g,"/"),fn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class pn{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function fa(e,t){return new pn(e,typeof t=="number"?{status:t}:t)}class Pt extends Error{}class ha{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],T(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((s,o)=>n=o),this.controller=new AbortController;let a=()=>n(new Pt("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((s,o)=>{let[c,d]=o;return Object.assign(s,{[c]:this.trackPromise(c,d)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof Pt)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let s=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>s}),this.emit(!1,r),Promise.reject(s)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(s=>{t.removeEventListener("abort",n),(s||this.done)&&a(s)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return T(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:gn(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function vn(e){return e instanceof Promise&&e._tracked===!0}function gn(e){if(!vn(e))return e;if(e._error)throw e._error;return e._data}const ma=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,B({},n,{headers:a}))};class Dt{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Xe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const vr=["post","put","patch","delete"],yn=new Set(vr),bn=["get",...vr],wn=new Set(bn),En=new Set([301,302,303,307,308]),Rn=new Set([307,308]),Et={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$e={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),gr="remix-router-transitions";function pa(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;T(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=l=>({hasErrorBoundary:i(l)})}else a=Dn;let s={},o=ht(e.routes,a,void 0,s),c,d=e.basename||"/",m=e.dataStrategy||Cn,v=e.patchRoutesOnNavigation,h=B({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),y=null,b=new Set,M=null,C=null,S=null,I=e.hydrationData!=null,O=xe(o,e.history.location,d),J=!1,te=null;if(O==null&&!v){let i=Z(404,{pathname:e.history.location.pathname}),{matches:l,route:u}=sr(o);O=l,te={[u.id]:i}}O&&!e.hydrationData&&lt(O,o,e.history.location.pathname).active&&(O=null);let Q;if(O)if(O.some(i=>i.route.lazy))Q=!1;else if(!O.some(i=>i.route.loader))Q=!0;else if(h.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,l=e.hydrationData?e.hydrationData.errors:null;if(l){let u=O.findIndex(p=>l[p.route.id]!==void 0);Q=O.slice(0,u+1).every(p=>!St(p.route,i,l))}else Q=O.every(u=>!St(u.route,i,l))}else Q=e.hydrationData!=null;else if(Q=!1,O=[],h.v7_partialHydration){let i=lt(null,o,e.history.location.pathname);i.active&&i.matches&&(J=!0,O=i.matches)}let Be,f={historyAction:e.history.action,location:e.history.location,matches:O,initialized:Q,navigation:Et,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||te,fetchers:new Map,blockers:new Map},z=V.Pop,G=!1,k,q=!1,re=new Map,ie=null,Ce=!1,be=!1,tt=[],rt=new Set,$=new Map,nt=0,ze=-1,Le=new Map,de=new Set,je=new Map,ke=new Map,oe=new Set,we=new Map,Ee=new Map,at;function Sr(){if(y=e.history.listen(i=>{let{action:l,location:u,delta:p}=i;if(at){at(),at=void 0;return}Ae(Ee.size===0||p!=null,"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 g=Kt({currentLocation:f.location,nextLocation:u,historyAction:l});if(g&&p!=null){let x=new Promise(L=>{at=L});e.history.go(p*-1),ot(g,{state:"blocked",location:u,proceed(){ot(g,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),x.then(()=>e.history.go(p))},reset(){let L=new Map(f.blockers);L.set(g,$e),X({blockers:L})}});return}return Re(l,u)}),r){Hn(t,re);let i=()=>Wn(t,re);t.addEventListener("pagehide",i),ie=()=>t.removeEventListener("pagehide",i)}return f.initialized||Re(V.Pop,f.location,{initialHydration:!0}),Be}function Mr(){y&&y(),ie&&ie(),b.clear(),k&&k.abort(),f.fetchers.forEach((i,l)=>it(l)),f.blockers.forEach((i,l)=>Wt(l))}function Cr(i){return b.add(i),()=>b.delete(i)}function X(i,l){l===void 0&&(l={}),f=B({},f,i);let u=[],p=[];h.v7_fetcherPersist&&f.fetchers.forEach((g,x)=>{g.state==="idle"&&(oe.has(x)?p.push(x):u.push(x))}),oe.forEach(g=>{!f.fetchers.has(g)&&!$.has(g)&&p.push(g)}),[...b].forEach(g=>g(f,{deletedFetchers:p,viewTransitionOpts:l.viewTransitionOpts,flushSync:l.flushSync===!0})),h.v7_fetcherPersist?(u.forEach(g=>f.fetchers.delete(g)),p.forEach(g=>it(g))):p.forEach(g=>oe.delete(g))}function Oe(i,l,u){var p,g;let{flushSync:x}=u===void 0?{}:u,L=f.actionData!=null&&f.navigation.formMethod!=null&&le(f.navigation.formMethod)&&f.navigation.state==="loading"&&((p=i.state)==null?void 0:p._isRedirect)!==!0,R;l.actionData?Object.keys(l.actionData).length>0?R=l.actionData:R=null:L?R=f.actionData:R=null;let P=l.loaderData?or(f.loaderData,l.loaderData,l.matches||[],l.errors):f.loaderData,E=f.blockers;E.size>0&&(E=new Map(E),E.forEach((U,Y)=>E.set(Y,$e)));let D=G===!0||f.navigation.formMethod!=null&&le(f.navigation.formMethod)&&((g=i.state)==null?void 0:g._isRedirect)!==!0;c&&(o=c,c=void 0),Ce||z===V.Pop||(z===V.Push?e.history.push(i,i.state):z===V.Replace&&e.history.replace(i,i.state));let j;if(z===V.Pop){let U=re.get(f.location.pathname);U&&U.has(i.pathname)?j={currentLocation:f.location,nextLocation:i}:re.has(i.pathname)&&(j={currentLocation:i,nextLocation:f.location})}else if(q){let U=re.get(f.location.pathname);U?U.add(i.pathname):(U=new Set([i.pathname]),re.set(f.location.pathname,U)),j={currentLocation:f.location,nextLocation:i}}X(B({},l,{actionData:R,loaderData:P,historyAction:z,location:i,initialized:!0,navigation:Et,revalidation:"idle",restoreScrollPosition:$t(i,l.matches||f.matches),preventScrollReset:D,blockers:E}),{viewTransitionOpts:j,flushSync:x===!0}),z=V.Pop,G=!1,q=!1,Ce=!1,be=!1,tt=[]}async function At(i,l){if(typeof i=="number"){e.history.go(i);return}let u=xt(f.location,f.matches,d,h.v7_prependBasename,i,h.v7_relativeSplatPath,l?.fromRouteId,l?.relative),{path:p,submission:g,error:x}=Zt(h.v7_normalizeFormMethod,!1,u,l),L=f.location,R=Ge(f.location,p,l&&l.state);R=B({},R,e.history.encodeLocation(R));let P=l&&l.replace!=null?l.replace:void 0,E=V.Push;P===!0?E=V.Replace:P===!1||g!=null&&le(g.formMethod)&&g.formAction===f.location.pathname+f.location.search&&(E=V.Replace);let D=l&&"preventScrollReset"in l?l.preventScrollReset===!0:void 0,j=(l&&l.flushSync)===!0,U=Kt({currentLocation:L,nextLocation:R,historyAction:E});if(U){ot(U,{state:"blocked",location:R,proceed(){ot(U,{state:"proceeding",proceed:void 0,reset:void 0,location:R}),At(i,l)},reset(){let Y=new Map(f.blockers);Y.set(U,$e),X({blockers:Y})}});return}return await Re(E,R,{submission:g,pendingError:x,preventScrollReset:D,replace:l&&l.replace,enableViewTransition:l&&l.viewTransition,flushSync:j})}function Lr(){if(vt(),X({revalidation:"loading"}),f.navigation.state!=="submitting"){if(f.navigation.state==="idle"){Re(f.historyAction,f.location,{startUninterruptedRevalidation:!0});return}Re(z||f.historyAction,f.navigation.location,{overrideNavigation:f.navigation,enableViewTransition:q===!0})}}async function Re(i,l,u){k&&k.abort(),k=null,z=i,Ce=(u&&u.startUninterruptedRevalidation)===!0,Br(f.location,f.matches),G=(u&&u.preventScrollReset)===!0,q=(u&&u.enableViewTransition)===!0;let p=c||o,g=u&&u.overrideNavigation,x=u!=null&&u.initialHydration&&f.matches&&f.matches.length>0&&!J?f.matches:xe(p,l,d),L=(u&&u.flushSync)===!0;if(x&&f.initialized&&!be&&_n(f.location,l)&&!(u&&u.submission&&le(u.submission.formMethod))){Oe(l,{matches:x},{flushSync:L});return}let R=lt(x,p,l.pathname);if(R.active&&R.matches&&(x=R.matches),!x){let{error:N,notFoundMatches:F,route:H}=gt(l.pathname);Oe(l,{matches:F,loaderData:{},errors:{[H.id]:N}},{flushSync:L});return}k=new AbortController;let P=Fe(e.history,l,k.signal,u&&u.submission),E;if(u&&u.pendingError)E=[Se(x).route.id,{type:A.error,error:u.pendingError}];else if(u&&u.submission&&le(u.submission.formMethod)){let N=await jr(P,l,u.submission,x,R.active,{replace:u.replace,flushSync:L});if(N.shortCircuited)return;if(N.pendingActionResult){let[F,H]=N.pendingActionResult;if(ee(H)&&Xe(H.error)&&H.error.status===404){k=null,Oe(l,{matches:N.matches,loaderData:{},errors:{[F]:H.error}});return}}x=N.matches||x,E=N.pendingActionResult,g=Rt(l,u.submission),L=!1,R.active=!1,P=Fe(e.history,P.url,P.signal)}let{shortCircuited:D,matches:j,loaderData:U,errors:Y}=await Or(P,l,x,R.active,g,u&&u.submission,u&&u.fetcherSubmission,u&&u.replace,u&&u.initialHydration===!0,L,E);D||(k=null,Oe(l,B({matches:j||x},lr(E),{loaderData:U,errors:Y})))}async function jr(i,l,u,p,g,x){x===void 0&&(x={}),vt();let L=zn(l,u);if(X({navigation:L},{flushSync:x.flushSync===!0}),g){let E=await st(p,l.pathname,i.signal);if(E.type==="aborted")return{shortCircuited:!0};if(E.type==="error"){let D=Se(E.partialMatches).route.id;return{matches:E.partialMatches,pendingActionResult:[D,{type:A.error,error:E.error}]}}else if(E.matches)p=E.matches;else{let{notFoundMatches:D,error:j,route:U}=gt(l.pathname);return{matches:D,pendingActionResult:[U.id,{type:A.error,error:j}]}}}let R,P=Ye(p,l);if(!P.route.action&&!P.route.lazy)R={type:A.error,error:Z(405,{method:i.method,pathname:l.pathname,routeId:P.route.id})};else if(R=(await He("action",f,i,[P],p,null))[P.route.id],i.signal.aborted)return{shortCircuited:!0};if(Me(R)){let E;return x&&x.replace!=null?E=x.replace:E=nr(R.response.headers.get("Location"),new URL(i.url),d)===f.location.pathname+f.location.search,await Pe(i,R,!0,{submission:u,replace:E}),{shortCircuited:!0}}if(ge(R))throw Z(400,{type:"defer-action"});if(ee(R)){let E=Se(p,P.route.id);return(x&&x.replace)!==!0&&(z=V.Push),{matches:p,pendingActionResult:[E.route.id,R]}}return{matches:p,pendingActionResult:[P.route.id,R]}}async function Or(i,l,u,p,g,x,L,R,P,E,D){let j=g||Rt(l,x),U=x||L||ur(j),Y=!Ce&&(!h.v7_partialHydration||!P);if(p){if(Y){let W=It(D);X(B({navigation:j},W!==void 0?{actionData:W}:{}),{flushSync:E})}let _=await st(u,l.pathname,i.signal);if(_.type==="aborted")return{shortCircuited:!0};if(_.type==="error"){let W=Se(_.partialMatches).route.id;return{matches:_.partialMatches,loaderData:{},errors:{[W]:_.error}}}else if(_.matches)u=_.matches;else{let{error:W,notFoundMatches:Ue,route:Ve}=gt(l.pathname);return{matches:Ue,loaderData:{},errors:{[Ve.id]:W}}}}let N=c||o,[F,H]=er(e.history,f,u,U,l,h.v7_partialHydration&&P===!0,h.v7_skipActionErrorRevalidation,be,tt,rt,oe,je,de,N,d,D);if(yt(_=>!(u&&u.some(W=>W.route.id===_))||F&&F.some(W=>W.route.id===_)),ze=++nt,F.length===0&&H.length===0){let _=kt();return Oe(l,B({matches:u,loaderData:{},errors:D&&ee(D[1])?{[D[0]]:D[1].error}:null},lr(D),_?{fetchers:new Map(f.fetchers)}:{}),{flushSync:E}),{shortCircuited:!0}}if(Y){let _={};if(!p){_.navigation=j;let W=It(D);W!==void 0&&(_.actionData=W)}H.length>0&&(_.fetchers=Tr(H)),X(_,{flushSync:E})}H.forEach(_=>{pe(_.key),_.controller&&$.set(_.key,_.controller)});let Te=()=>H.forEach(_=>pe(_.key));k&&k.signal.addEventListener("abort",Te);let{loaderResults:We,fetcherResults:ce}=await Nt(f,u,F,H,i);if(i.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener("abort",Te),H.forEach(_=>$.delete(_.key));let se=ct(We);if(se)return await Pe(i,se.result,!0,{replace:R}),{shortCircuited:!0};if(se=ct(ce),se)return de.add(se.key),await Pe(i,se.result,!0,{replace:R}),{shortCircuited:!0};let{loaderData:bt,errors:Ke}=ir(f,u,We,D,H,ce,we);we.forEach((_,W)=>{_.subscribe(Ue=>{(Ue||_.done)&&we.delete(W)})}),h.v7_partialHydration&&P&&f.errors&&(Ke=B({},f.errors,Ke));let De=kt(),dt=Ht(ze),ut=De||dt||H.length>0;return B({matches:u,loaderData:bt,errors:Ke},ut?{fetchers:new Map(f.fetchers)}:{})}function It(i){if(i&&!ee(i[1]))return{[i[0]]:i[1].data};if(f.actionData)return Object.keys(f.actionData).length===0?null:f.actionData}function Tr(i){return i.forEach(l=>{let u=f.fetchers.get(l.key),p=Je(void 0,u?u.data:void 0);f.fetchers.set(l.key,p)}),new Map(f.fetchers)}function Ur(i,l,u,p){if(n)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.");pe(i);let g=(p&&p.flushSync)===!0,x=c||o,L=xt(f.location,f.matches,d,h.v7_prependBasename,u,h.v7_relativeSplatPath,l,p?.relative),R=xe(x,L,d),P=lt(R,x,L);if(P.active&&P.matches&&(R=P.matches),!R){ue(i,l,Z(404,{pathname:L}),{flushSync:g});return}let{path:E,submission:D,error:j}=Zt(h.v7_normalizeFormMethod,!0,L,p);if(j){ue(i,l,j,{flushSync:g});return}let U=Ye(R,E),Y=(p&&p.preventScrollReset)===!0;if(D&&le(D.formMethod)){_r(i,l,E,U,R,P.active,g,Y,D);return}je.set(i,{routeId:l,path:E}),Fr(i,l,E,U,R,P.active,g,Y,D)}async function _r(i,l,u,p,g,x,L,R,P){vt(),je.delete(i);function E(K){if(!K.route.action&&!K.route.lazy){let _e=Z(405,{method:P.formMethod,pathname:u,routeId:l});return ue(i,l,_e,{flushSync:L}),!0}return!1}if(!x&&E(p))return;let D=f.fetchers.get(i);me(i,kn(P,D),{flushSync:L});let j=new AbortController,U=Fe(e.history,u,j.signal,P);if(x){let K=await st(g,new URL(U.url).pathname,U.signal,i);if(K.type==="aborted")return;if(K.type==="error"){ue(i,l,K.error,{flushSync:L});return}else if(K.matches){if(g=K.matches,p=Ye(g,u),E(p))return}else{ue(i,l,Z(404,{pathname:u}),{flushSync:L});return}}$.set(i,j);let Y=nt,F=(await He("action",f,U,[p],g,i))[p.route.id];if(U.signal.aborted){$.get(i)===j&&$.delete(i);return}if(h.v7_fetcherPersist&&oe.has(i)){if(Me(F)||ee(F)){me(i,ve(void 0));return}}else{if(Me(F))if($.delete(i),ze>Y){me(i,ve(void 0));return}else return de.add(i),me(i,Je(P)),Pe(U,F,!1,{fetcherSubmission:P,preventScrollReset:R});if(ee(F)){ue(i,l,F.error);return}}if(ge(F))throw Z(400,{type:"defer-action"});let H=f.navigation.location||f.location,Te=Fe(e.history,H,j.signal),We=c||o,ce=f.navigation.state!=="idle"?xe(We,f.navigation.location,d):f.matches;T(ce,"Didn't find any matches after fetcher action");let se=++nt;Le.set(i,se);let bt=Je(P,F.data);f.fetchers.set(i,bt);let[Ke,De]=er(e.history,f,ce,P,H,!1,h.v7_skipActionErrorRevalidation,be,tt,rt,oe,je,de,We,d,[p.route.id,F]);De.filter(K=>K.key!==i).forEach(K=>{let _e=K.key,Jt=f.fetchers.get(_e),Hr=Je(void 0,Jt?Jt.data:void 0);f.fetchers.set(_e,Hr),pe(_e),K.controller&&$.set(_e,K.controller)}),X({fetchers:new Map(f.fetchers)});let dt=()=>De.forEach(K=>pe(K.key));j.signal.addEventListener("abort",dt);let{loaderResults:ut,fetcherResults:_}=await Nt(f,ce,Ke,De,Te);if(j.signal.aborted)return;j.signal.removeEventListener("abort",dt),Le.delete(i),$.delete(i),De.forEach(K=>$.delete(K.key));let W=ct(ut);if(W)return Pe(Te,W.result,!1,{preventScrollReset:R});if(W=ct(_),W)return de.add(W.key),Pe(Te,W.result,!1,{preventScrollReset:R});let{loaderData:Ue,errors:Ve}=ir(f,ce,ut,void 0,De,_,we);if(f.fetchers.has(i)){let K=ve(F.data);f.fetchers.set(i,K)}Ht(se),f.navigation.state==="loading"&&se>ze?(T(z,"Expected pending action"),k&&k.abort(),Oe(f.navigation.location,{matches:ce,loaderData:Ue,errors:Ve,fetchers:new Map(f.fetchers)})):(X({errors:Ve,loaderData:or(f.loaderData,Ue,ce,Ve),fetchers:new Map(f.fetchers)}),be=!1)}async function Fr(i,l,u,p,g,x,L,R,P){let E=f.fetchers.get(i);me(i,Je(P,E?E.data:void 0),{flushSync:L});let D=new AbortController,j=Fe(e.history,u,D.signal);if(x){let F=await st(g,new URL(j.url).pathname,j.signal,i);if(F.type==="aborted")return;if(F.type==="error"){ue(i,l,F.error,{flushSync:L});return}else if(F.matches)g=F.matches,p=Ye(g,u);else{ue(i,l,Z(404,{pathname:u}),{flushSync:L});return}}$.set(i,D);let U=nt,N=(await He("loader",f,j,[p],g,i))[p.route.id];if(ge(N)&&(N=await Ot(N,j.signal,!0)||N),$.get(i)===D&&$.delete(i),!j.signal.aborted){if(oe.has(i)){me(i,ve(void 0));return}if(Me(N))if(ze>U){me(i,ve(void 0));return}else{de.add(i),await Pe(j,N,!1,{preventScrollReset:R});return}if(ee(N)){ue(i,l,N.error);return}T(!ge(N),"Unhandled fetcher deferred data"),me(i,ve(N.data))}}async function Pe(i,l,u,p){let{submission:g,fetcherSubmission:x,preventScrollReset:L,replace:R}=p===void 0?{}:p;l.response.headers.has("X-Remix-Revalidate")&&(be=!0);let P=l.response.headers.get("Location");T(P,"Expected a Location header on the redirect Response"),P=nr(P,new URL(i.url),d);let E=Ge(f.location,P,{_isRedirect:!0});if(r){let F=!1;if(l.response.headers.has("X-Remix-Reload-Document"))F=!0;else if(jt.test(P)){const H=e.history.createURL(P);F=H.origin!==t.location.origin||Ze(H.pathname,d)==null}if(F){R?t.location.replace(P):t.location.assign(P);return}}k=null;let D=R===!0||l.response.headers.has("X-Remix-Replace")?V.Replace:V.Push,{formMethod:j,formAction:U,formEncType:Y}=f.navigation;!g&&!x&&j&&U&&Y&&(g=ur(f.navigation));let N=g||x;if(Rn.has(l.response.status)&&N&&le(N.formMethod))await Re(D,E,{submission:B({},N,{formAction:P}),preventScrollReset:L||G,enableViewTransition:u?q:void 0});else{let F=Rt(E,g);await Re(D,E,{overrideNavigation:F,fetcherSubmission:x,preventScrollReset:L||G,enableViewTransition:u?q:void 0})}}async function He(i,l,u,p,g,x){let L,R={};try{L=await Ln(m,i,l,u,p,g,x,s,a)}catch(P){return p.forEach(E=>{R[E.route.id]={type:A.error,error:P}}),R}for(let[P,E]of Object.entries(L))if(Fn(E)){let D=E.result;R[P]={type:A.redirect,response:Tn(D,u,P,g,d,h.v7_relativeSplatPath)}}else R[P]=await On(E);return R}async function Nt(i,l,u,p,g){let x=i.matches,L=He("loader",i,g,u,l,null),R=Promise.all(p.map(async D=>{if(D.matches&&D.match&&D.controller){let U=(await He("loader",i,Fe(e.history,D.path,D.controller.signal),[D.match],D.matches,D.key))[D.match.route.id];return{[D.key]:U}}else return Promise.resolve({[D.key]:{type:A.error,error:Z(404,{pathname:D.path})}})})),P=await L,E=(await R).reduce((D,j)=>Object.assign(D,j),{});return await Promise.all([Nn(l,P,g.signal,x,i.loaderData),Bn(l,E,p)]),{loaderResults:P,fetcherResults:E}}function vt(){be=!0,tt.push(...yt()),je.forEach((i,l)=>{$.has(l)&&rt.add(l),pe(l)})}function me(i,l,u){u===void 0&&(u={}),f.fetchers.set(i,l),X({fetchers:new Map(f.fetchers)},{flushSync:(u&&u.flushSync)===!0})}function ue(i,l,u,p){p===void 0&&(p={});let g=Se(f.matches,l);it(i),X({errors:{[g.route.id]:u},fetchers:new Map(f.fetchers)},{flushSync:(p&&p.flushSync)===!0})}function Bt(i){return ke.set(i,(ke.get(i)||0)+1),oe.has(i)&&oe.delete(i),f.fetchers.get(i)||Pn}function it(i){let l=f.fetchers.get(i);$.has(i)&&!(l&&l.state==="loading"&&Le.has(i))&&pe(i),je.delete(i),Le.delete(i),de.delete(i),h.v7_fetcherPersist&&oe.delete(i),rt.delete(i),f.fetchers.delete(i)}function Ar(i){let l=(ke.get(i)||0)-1;l<=0?(ke.delete(i),oe.add(i),h.v7_fetcherPersist||it(i)):ke.set(i,l),X({fetchers:new Map(f.fetchers)})}function pe(i){let l=$.get(i);l&&(l.abort(),$.delete(i))}function zt(i){for(let l of i){let u=Bt(l),p=ve(u.data);f.fetchers.set(l,p)}}function kt(){let i=[],l=!1;for(let u of de){let p=f.fetchers.get(u);T(p,"Expected fetcher: "+u),p.state==="loading"&&(de.delete(u),i.push(u),l=!0)}return zt(i),l}function Ht(i){let l=[];for(let[u,p]of Le)if(p<i){let g=f.fetchers.get(u);T(g,"Expected fetcher: "+u),g.state==="loading"&&(pe(u),Le.delete(u),l.push(u))}return zt(l),l.length>0}function Ir(i,l){let u=f.blockers.get(i)||$e;return Ee.get(i)!==l&&Ee.set(i,l),u}function Wt(i){f.blockers.delete(i),Ee.delete(i)}function ot(i,l){let u=f.blockers.get(i)||$e;T(u.state==="unblocked"&&l.state==="blocked"||u.state==="blocked"&&l.state==="blocked"||u.state==="blocked"&&l.state==="proceeding"||u.state==="blocked"&&l.state==="unblocked"||u.state==="proceeding"&&l.state==="unblocked","Invalid blocker state transition: "+u.state+" -> "+l.state);let p=new Map(f.blockers);p.set(i,l),X({blockers:p})}function Kt(i){let{currentLocation:l,nextLocation:u,historyAction:p}=i;if(Ee.size===0)return;Ee.size>1&&Ae(!1,"A router only supports one blocker at a time");let g=Array.from(Ee.entries()),[x,L]=g[g.length-1],R=f.blockers.get(x);if(!(R&&R.state==="proceeding")&&L({currentLocation:l,nextLocation:u,historyAction:p}))return x}function gt(i){let l=Z(404,{pathname:i}),u=c||o,{matches:p,route:g}=sr(u);return yt(),{notFoundMatches:p,route:g,error:l}}function yt(i){let l=[];return we.forEach((u,p)=>{(!i||i(p))&&(u.cancel(),l.push(p),we.delete(p))}),l}function Nr(i,l,u){if(M=i,S=l,C=u||null,!I&&f.navigation===Et){I=!0;let p=$t(f.location,f.matches);p!=null&&X({restoreScrollPosition:p})}return()=>{M=null,S=null,C=null}}function Vt(i,l){return C&&C(i,l.map(p=>fr(p,f.loaderData)))||i.key}function Br(i,l){if(M&&S){let u=Vt(i,l);M[u]=S()}}function $t(i,l){if(M){let u=Vt(i,l),p=M[u];if(typeof p=="number")return p}return null}function lt(i,l,u){if(v)if(i){if(Object.keys(i[0].params).length>0)return{active:!0,matches:ft(l,u,d,!0)}}else return{active:!0,matches:ft(l,u,d,!0)||[]};return{active:!1,matches:null}}async function st(i,l,u,p){if(!v)return{type:"success",matches:i};let g=i;for(;;){let x=c==null,L=c||o,R=s;try{await v({signal:u,path:l,matches:g,fetcherKey:p,patch:(D,j)=>{u.aborted||rr(D,j,L,R,a)}})}catch(D){return{type:"error",error:D,partialMatches:g}}finally{x&&!u.aborted&&(o=[...o])}if(u.aborted)return{type:"aborted"};let P=xe(L,l,d);if(P)return{type:"success",matches:P};let E=ft(L,l,d,!0);if(!E||g.length===E.length&&g.every((D,j)=>D.route.id===E[j].route.id))return{type:"success",matches:null};g=E}}function zr(i){s={},c=ht(i,a,void 0,s)}function kr(i,l){let u=c==null;rr(i,l,c||o,s,a),u&&(o=[...o],X({}))}return Be={get basename(){return d},get future(){return h},get state(){return f},get routes(){return o},get window(){return t},initialize:Sr,subscribe:Cr,enableScrollRestoration:Nr,navigate:At,fetch:Ur,revalidate:Lr,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Bt,deleteFetcher:Ar,dispose:Mr,getBlocker:Ir,deleteBlocker:Wt,patchRoutes:kr,_internalFetchControllers:$,_internalActiveDeferreds:we,_internalSetRoutes:zr},Be}function xn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function xt(e,t,r,n,a,s,o,c){let d,m;if(o){d=[];for(let h of t)if(d.push(h),h.route.id===o){m=h;break}}else d=t,m=t[t.length-1];let v=Lt(a||".",Ct(d,s),Ze(e.pathname,r)||e.pathname,c==="path");if(a==null&&(v.search=e.search,v.hash=e.hash),(a==null||a===""||a===".")&&m){let h=Tt(v.search);if(m.route.index&&!h)v.search=v.search?v.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&h){let y=new URLSearchParams(v.search),b=y.getAll("index");y.delete("index"),b.filter(C=>C).forEach(C=>y.append("index",C));let M=y.toString();v.search=M?"?"+M:""}}return n&&r!=="/"&&(v.pathname=v.pathname==="/"?r:fe([r,v.pathname])),Qe(v)}function Zt(e,t,r,n){if(!n||!xn(n))return{path:r};if(n.formMethod&&!In(n.formMethod))return{path:r,error:Z(405,{method:n.formMethod})};let a=()=>({path:r,error:Z(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=e?s.toUpperCase():s.toLowerCase(),c=wr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!le(o))return a();let y=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((b,M)=>{let[C,S]=M;return""+b+C+"="+S+`
`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:y}}}else if(n.formEncType==="application/json"){if(!le(o))return a();try{let y=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}T(typeof FormData=="function","FormData is not available in this environment");let d,m;if(n.formData)d=Mt(n.formData),m=n.formData;else if(n.body instanceof FormData)d=Mt(n.body),m=n.body;else if(n.body instanceof URLSearchParams)d=n.body,m=ar(d);else if(n.body==null)d=new URLSearchParams,m=new FormData;else try{d=new URLSearchParams(n.body),m=ar(d)}catch{return a()}let v={formMethod:o,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(le(v.formMethod))return{path:r,submission:v};let h=ye(r);return t&&h.search&&Tt(h.search)&&d.append("index",""),h.search="?"+d,{path:Qe(h),submission:v}}function qt(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function er(e,t,r,n,a,s,o,c,d,m,v,h,y,b,M,C){let S=C?ee(C[1])?C[1].error:C[1].data:void 0,I=e.createURL(t.location),O=e.createURL(a),J=r;s&&t.errors?J=qt(r,Object.keys(t.errors)[0],!0):C&&ee(C[1])&&(J=qt(r,C[0]));let te=C?C[1].statusCode:void 0,Q=o&&te&&te>=400,Be=J.filter((z,G)=>{let{route:k}=z;if(k.lazy)return!0;if(k.loader==null)return!1;if(s)return St(k,t.loaderData,t.errors);if(Sn(t.loaderData,t.matches[G],z)||d.some(ie=>ie===z.route.id))return!0;let q=t.matches[G],re=z;return tr(z,B({currentUrl:I,currentParams:q.params,nextUrl:O,nextParams:re.params},n,{actionResult:S,actionStatus:te,defaultShouldRevalidate:Q?!1:c||I.pathname+I.search===O.pathname+O.search||I.search!==O.search||yr(q,re)}))}),f=[];return h.forEach((z,G)=>{if(s||!r.some(Ce=>Ce.route.id===z.routeId)||v.has(G))return;let k=xe(b,z.path,M);if(!k){f.push({key:G,routeId:z.routeId,path:z.path,matches:null,match:null,controller:null});return}let q=t.fetchers.get(G),re=Ye(k,z.path),ie=!1;y.has(G)?ie=!1:m.has(G)?(m.delete(G),ie=!0):q&&q.state!=="idle"&&q.data===void 0?ie=c:ie=tr(re,B({currentUrl:I,currentParams:t.matches[t.matches.length-1].params,nextUrl:O,nextParams:r[r.length-1].params},n,{actionResult:S,actionStatus:te,defaultShouldRevalidate:Q?!1:c})),ie&&f.push({key:G,routeId:z.routeId,path:z.path,matches:k,match:re,controller:new AbortController})}),[Be,f]}function St(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function Sn(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function yr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function tr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function rr(e,t,r,n,a){var s;let o;if(e){let m=n[e];T(m,"No route found to patch children into: routeId = "+e),m.children||(m.children=[]),o=m.children}else o=r;let c=t.filter(m=>!o.some(v=>br(m,v))),d=ht(c,a,[e||"_","patch",String(((s=o)==null?void 0:s.length)||"0")],n);o.push(...d)}function br(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(s=>br(r,s))}):!1}async function Mn(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];T(a,"No route found in manifest");let s={};for(let o in n){let d=a[o]!==void 0&&o!=="hasErrorBoundary";Ae(!d,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!d&&!Gr.has(o)&&(s[o]=n[o])}Object.assign(a,s),Object.assign(a,B({},t(a),{lazy:void 0}))}async function Cn(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,s,o)=>Object.assign(a,{[r[o].route.id]:s}),{})}async function Ln(e,t,r,n,a,s,o,c,d,m){let v=s.map(b=>b.route.lazy?Mn(b.route,d,c):void 0),h=s.map((b,M)=>{let C=v[M],S=a.some(O=>O.route.id===b.route.id);return B({},b,{shouldLoad:S,resolve:async O=>(O&&n.method==="GET"&&(b.route.lazy||b.route.loader)&&(S=!0),S?jn(t,n,b,C,O,m):Promise.resolve({type:A.data,result:void 0}))})}),y=await e({matches:h,request:n,params:s[0].params,fetcherKey:o,context:m});try{await Promise.all(v)}catch{}return y}async function jn(e,t,r,n,a,s){let o,c,d=m=>{let v,h=new Promise((M,C)=>v=C);c=()=>v(),t.signal.addEventListener("abort",c);let y=M=>typeof m!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):m({request:t,params:r.params,context:s},...M!==void 0?[M]:[]),b=(async()=>{try{return{type:"data",result:await(a?a(C=>y(C)):y())}}catch(M){return{type:"error",result:M}}})();return Promise.race([b,h])};try{let m=r.route[e];if(n)if(m){let v,[h]=await Promise.all([d(m).catch(y=>{v=y}),n]);if(v!==void 0)throw v;o=h}else if(await n,m=r.route[e],m)o=await d(m);else if(e==="action"){let v=new URL(t.url),h=v.pathname+v.search;throw Z(405,{method:t.method,pathname:h,routeId:r.route.id})}else return{type:A.data,result:void 0};else if(m)o=await d(m);else{let v=new URL(t.url),h=v.pathname+v.search;throw Z(404,{pathname:h})}T(o.result!==void 0,"You defined "+(e==="action"?"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(m){return{type:A.error,result:m}}finally{c&&t.signal.removeEventListener("abort",c)}return o}async function On(e){let{result:t,type:r}=e;if(Er(t)){let h;try{let y=t.headers.get("Content-Type");y&&/\bapplication\/json\b/.test(y)?t.body==null?h=null:h=await t.json():h=await t.text()}catch(y){return{type:A.error,error:y}}return r===A.error?{type:A.error,error:new Dt(t.status,t.statusText,h),statusCode:t.status,headers:t.headers}:{type:A.data,data:h,statusCode:t.status,headers:t.headers}}if(r===A.error){if(dr(t)){var n,a;if(t.data instanceof Error){var s,o;return{type:A.error,error:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:A.error,error:new Dt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:Xe(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:A.error,error:t,statusCode:Xe(t)?t.status:void 0}}if(An(t)){var c,d;return{type:A.deferred,deferredData:t,statusCode:(c=t.init)==null?void 0:c.status,headers:((d=t.init)==null?void 0:d.headers)&&new Headers(t.init.headers)}}if(dr(t)){var m,v;return{type:A.data,data:t.data,statusCode:(m=t.init)==null?void 0:m.status,headers:(v=t.init)!=null&&v.headers?new Headers(t.init.headers):void 0}}return{type:A.data,data:t}}function Tn(e,t,r,n,a,s){let o=e.headers.get("Location");if(T(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!jt.test(o)){let c=n.slice(0,n.findIndex(d=>d.route.id===r)+1);o=xt(new URL(t.url),c,a,!0,o,s),e.headers.set("Location",o)}return e}function nr(e,t,r){if(jt.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),s=Ze(a.pathname,r)!=null;if(a.origin===t.origin&&s)return a.pathname+a.search+a.hash}return e}function Fe(e,t,r,n){let a=e.createURL(wr(t)).toString(),s={signal:r};if(n&&le(n.formMethod)){let{formMethod:o,formEncType:c}=n;s.method=o.toUpperCase(),c==="application/json"?(s.headers=new Headers({"Content-Type":c}),s.body=JSON.stringify(n.json)):c==="text/plain"?s.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?s.body=Mt(n.formData):s.body=n.formData}return new Request(a,s)}function Mt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function ar(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Un(e,t,r,n,a){let s={},o=null,c,d=!1,m={},v=r&&ee(r[1])?r[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let y=h.route.id,b=t[y];if(T(!Me(b),"Cannot handle redirect results in processLoaderData"),ee(b)){let M=b.error;v!==void 0&&(M=v,v=void 0),o=o||{};{let C=Se(e,y);o[C.route.id]==null&&(o[C.route.id]=M)}s[y]=void 0,d||(d=!0,c=Xe(b.error)?b.error.status:500),b.headers&&(m[y]=b.headers)}else ge(b)?(n.set(y,b.deferredData),s[y]=b.deferredData.data,b.statusCode!=null&&b.statusCode!==200&&!d&&(c=b.statusCode),b.headers&&(m[y]=b.headers)):(s[y]=b.data,b.statusCode&&b.statusCode!==200&&!d&&(c=b.statusCode),b.headers&&(m[y]=b.headers))}),v!==void 0&&r&&(o={[r[0]]:v},s[r[0]]=void 0),{loaderData:s,errors:o,statusCode:c||200,loaderHeaders:m}}function ir(e,t,r,n,a,s,o){let{loaderData:c,errors:d}=Un(t,r,n,o);return a.forEach(m=>{let{key:v,match:h,controller:y}=m,b=s[v];if(T(b,"Did not find corresponding fetcher result"),!(y&&y.signal.aborted))if(ee(b)){let M=Se(e.matches,h?.route.id);d&&d[M.route.id]||(d=B({},d,{[M.route.id]:b.error})),e.fetchers.delete(v)}else if(Me(b))T(!1,"Unhandled fetcher revalidation redirect");else if(ge(b))T(!1,"Unhandled fetcher deferred data");else{let M=ve(b.data);e.fetchers.set(v,M)}}),{loaderData:c,errors:d}}function or(e,t,r,n){let a=B({},t);for(let s of r){let o=s.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&s.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function lr(e){return e?ee(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Se(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function sr(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Z(e,t){let{pathname:r,routeId:n,method:a,type:s,message:o}=t===void 0?{}:t,c="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&r&&n?d="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.":s==="defer-action"?d="defer() is not supported in actions":s==="invalid-body"&&(d="Unable to encode submission body")):e===403?(c="Forbidden",d='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",d='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?d="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&&(d='Invalid request method "'+a.toUpperCase()+'"')),new Dt(e||500,c,new Error(d),!0)}function ct(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Me(a))return{key:n,result:a}}}function wr(e){let t=typeof e=="string"?ye(e):e;return Qe(B({},t,{hash:""}))}function _n(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Fn(e){return Er(e.result)&&En.has(e.result.status)}function ge(e){return e.type===A.deferred}function ee(e){return e.type===A.error}function Me(e){return(e&&e.type)===A.redirect}function dr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function An(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Er(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function In(e){return wn.has(e.toLowerCase())}function le(e){return yn.has(e.toLowerCase())}async function Nn(e,t,r,n,a){let s=Object.entries(t);for(let o=0;o<s.length;o++){let[c,d]=s[o],m=e.find(y=>y?.route.id===c);if(!m)continue;let v=n.find(y=>y.route.id===m.route.id),h=v!=null&&!yr(v,m)&&(a&&a[m.route.id])!==void 0;ge(d)&&h&&await Ot(d,r,!1).then(y=>{y&&(t[c]=y)})}}async function Bn(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:s,controller:o}=r[n],c=t[a];e.find(m=>m?.route.id===s)&&ge(c)&&(T(o,"Expected an AbortController for revalidating fetcher deferred result"),await Ot(c,o.signal,!0).then(m=>{m&&(t[a]=m)}))}}async function Ot(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:A.data,data:e.deferredData.unwrappedData}}catch(a){return{type:A.error,error:a}}return{type:A.data,data:e.deferredData.data}}}function Tt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ye(e,t){let r=typeof t=="string"?ye(t).search:t.search;if(e[e.length-1].route.index&&Tt(r||""))return e[e.length-1];let n=pr(e);return n[n.length-1]}function ur(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:s,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Rt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function zn(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Je(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function kn(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ve(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 Hn(e,t){try{let r=e.sessionStorage.getItem(gr);if(r){let n=JSON.parse(r);for(let[a,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(a,new Set(s||[]))}}catch{}}function Wn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(gr,JSON.stringify(r))}catch(n){Ae(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
 * React Router v6.30.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function mt(){return mt=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},mt.apply(this,arguments)}const Ut=w.createContext(null),Kn=w.createContext(null),pt=w.createContext(null),Ie=w.createContext(null),_t=w.createContext(null),he=w.createContext({outlet:null,matches:[],isDataRoute:!1}),Rr=w.createContext(null);function va(e,t){let{relative:r}=t===void 0?{}:t;qe()||T(!1);let{basename:n,navigator:a}=w.useContext(Ie),{hash:s,pathname:o,search:c}=Jn(e,{relative:r}),d=o;return n!=="/"&&(d=o==="/"?n:fe([n,o])),a.createHref({pathname:d,search:c,hash:s})}function qe(){return w.useContext(_t)!=null}function Ft(){return qe()||T(!1),w.useContext(_t).location}function Pr(e){w.useContext(Ie).static||w.useLayoutEffect(e)}function ga(){let{isDataRoute:e}=w.useContext(he);return e?na():Vn()}function Vn(){qe()||T(!1);let e=w.useContext(Ut),{basename:t,future:r,navigator:n}=w.useContext(Ie),{matches:a}=w.useContext(he),{pathname:s}=Ft(),o=JSON.stringify(Ct(a,r.v7_relativeSplatPath)),c=w.useRef(!1);return Pr(()=>{c.current=!0}),w.useCallback(function(m,v){if(v===void 0&&(v={}),!c.current)return;if(typeof m=="number"){n.go(m);return}let h=Lt(m,JSON.parse(o),s,v.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:fe([t,h.pathname])),(v.replace?n.replace:n.push)(h,v.state,v)},[t,n,o,s,e])}const Dr=w.createContext(null);function ya(){return w.useContext(Dr)}function $n(e){let t=w.useContext(he).outlet;return t&&w.createElement(Dr.Provider,{value:e},t)}function ba(){let{matches:e}=w.useContext(he),t=e[e.length-1];return t?t.params:{}}function Jn(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(Ie),{matches:a}=w.useContext(he),{pathname:s}=Ft(),o=JSON.stringify(Ct(a,n.v7_relativeSplatPath));return w.useMemo(()=>Lt(e,JSON.parse(o),s,r==="path"),[e,o,s,r])}function wa(e,t,r,n){qe()||T(!1);let{navigator:a,static:s}=w.useContext(Ie),{matches:o}=w.useContext(he),c=o[o.length-1],d=c?c.params:{};c&&c.pathname;let m=c?c.pathnameBase:"/";c&&c.route;let v=Ft(),h;h=v;let y=h.pathname||"/",b=y;if(m!=="/"){let S=m.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(S.length).join("/")}let M=!s&&r&&r.matches&&r.matches.length>0?r.matches:xe(e,{pathname:b});return Zn(M&&M.map(S=>Object.assign({},S,{params:Object.assign({},d,S.params),pathname:fe([m,a.encodeLocation?a.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?m:fe([m,a.encodeLocation?a.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,r,n)}function Yn(){let e=ta(),t=Xe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:a},r):null,null)}const Gn=w.createElement(Yn,null);class Xn extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?w.createElement(he.Provider,{value:this.props.routeContext},w.createElement(Rr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Qn(e){let{routeContext:t,match:r,children:n}=e,a=w.useContext(Ut);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(he.Provider,{value:t},n)}function Zn(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,c=(a=r)==null?void 0:a.errors;if(c!=null){let v=o.findIndex(h=>h.route.id&&c?.[h.route.id]!==void 0);v>=0||T(!1),o=o.slice(0,Math.min(o.length,v+1))}let d=!1,m=-1;if(r&&n&&n.v7_partialHydration)for(let v=0;v<o.length;v++){let h=o[v];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(m=v),h.route.id){let{loaderData:y,errors:b}=r,M=h.route.loader&&y[h.route.id]===void 0&&(!b||b[h.route.id]===void 0);if(h.route.lazy||M){d=!0,m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}return o.reduceRight((v,h,y)=>{let b,M=!1,C=null,S=null;r&&(b=c&&h.route.id?c[h.route.id]:void 0,C=h.route.errorElement||Gn,d&&(m<0&&y===0?(aa("route-fallback"),M=!0,S=null):m===y&&(M=!0,S=h.route.hydrateFallbackElement||null)));let I=t.concat(o.slice(0,y+1)),O=()=>{let J;return b?J=C:M?J=S:h.route.Component?J=w.createElement(h.route.Component,null):h.route.element?J=h.route.element:J=v,w.createElement(Qn,{match:h,routeContext:{outlet:v,matches:I,isDataRoute:r!=null},children:J})};return r&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?w.createElement(Xn,{location:r.location,revalidation:r.revalidation,component:C,error:b,children:O(),routeContext:{outlet:null,matches:I,isDataRoute:!0}}):O()},null)}var xr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xr||{}),ae=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}(ae||{});function qn(e){let t=w.useContext(Ut);return t||T(!1),t}function Ne(e){let t=w.useContext(Kn);return t||T(!1),t}function ea(e){let t=w.useContext(he);return t||T(!1),t}function et(e){let t=ea(),r=t.matches[t.matches.length-1];return r.route.id||T(!1),r.route.id}function Ea(){return et(ae.UseRouteId)}function Ra(){return Ne(ae.UseNavigation).navigation}function Pa(){let{matches:e,loaderData:t}=Ne(ae.UseMatches);return w.useMemo(()=>e.map(r=>fr(r,t)),[e,t])}function Da(){let e=Ne(ae.UseLoaderData),t=et(ae.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function xa(e){return Ne(ae.UseRouteLoaderData).loaderData[e]}function Sa(){let e=Ne(ae.UseActionData),t=et(ae.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function ta(){var e;let t=w.useContext(Rr),r=Ne(ae.UseRouteError),n=et(ae.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function ra(){let e=w.useContext(pt);return e?._data}function Ma(){let e=w.useContext(pt);return e?._error}function na(){let{router:e}=qn(xr.UseNavigateStable),t=et(ae.UseNavigateStable),r=w.useRef(!1);return Pr(()=>{r.current=!0}),w.useCallback(function(a,s){s===void 0&&(s={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,mt({fromRouteId:t},s)))},[e,t])}const cr={};function aa(e,t,r){cr[e]||(cr[e]=!0)}function Ca(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function La(e){return $n(e.context)}function ja(e){let{basename:t="/",children:r=null,location:n,navigationType:a=V.Pop,navigator:s,static:o=!1,future:c}=e;qe()&&T(!1);let d=t.replace(/^\/*/,"/"),m=w.useMemo(()=>({basename:d,navigator:s,static:o,future:mt({v7_relativeSplatPath:!1},c)}),[d,c,s,o]);typeof n=="string"&&(n=ye(n));let{pathname:v="/",search:h="",hash:y="",state:b=null,key:M="default"}=n,C=w.useMemo(()=>{let S=Ze(v,d);return S==null?null:{location:{pathname:S,search:h,hash:y,state:b,key:M},navigationType:a}},[d,v,h,y,b,M,a]);return C==null?null:w.createElement(Ie.Provider,{value:m},w.createElement(_t.Provider,{children:r,value:C}))}function Oa(e){let{children:t,errorElement:r,resolve:n}=e;return w.createElement(oa,{resolve:n,errorElement:r},w.createElement(la,null,t))}var ne=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(ne||{});const ia=new Promise(()=>{});class oa extends w.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("<Await> caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,s=ne.pending;if(!(n instanceof Promise))s=ne.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){s=ne.error;let o=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>o})}else n._tracked?(a=n,s="_error"in a?ne.error:"_data"in a?ne.success:ne.pending):(s=ne.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(o=>Object.defineProperty(n,"_data",{get:()=>o}),o=>Object.defineProperty(n,"_error",{get:()=>o})));if(s===ne.error&&a._error instanceof Pt)throw ia;if(s===ne.error&&!r)throw a._error;if(s===ne.error)return w.createElement(pt.Provider,{value:a,children:r});if(s===ne.success)return w.createElement(pt.Provider,{value:a,children:t});throw a}}function la(e){let{children:t}=e,r=ra(),n=typeof t=="function"?t(r):t;return w.createElement(w.Fragment,null,n)}function Ta(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:w.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:w.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:w.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}export{ua as $,Pt as A,ta as B,xe as C,Ut as D,Dt as E,Oa as F,Ma as G,xa as H,Pn as I,Da as J,Sa as K,da as L,pa as M,Ie as N,La as O,ca as P,Ta as Q,ja as R,Ft as a,ya as b,Ra as c,ba as d,$r as e,Kn as f,Vr as g,wa as h,he as i,T as j,Ea as k,Ca as l,va as m,Jn as n,Pa as o,Qe as p,Qt as q,w as r,Ze as s,fe as t,ga as u,ye as v,ha as w,Xe as x,fa as y,ma as z};
//# sourceMappingURL=index-CamrZNs0.js.map

//# debugId=ca1c80bf-9de1-5ca5-a613-fea7471536d0
