PageSourceSearch

https://www.spinandwin.com/build/_shared/chunk-RBFCHJWR.js

js spinandwin.com collected 2026-09-26 06:47:48 UTC 187,820 bytes, 600 lines download raw bytes

1import{a as Su}from"/build/_shared/chunk-GZJBGZQO.js";import{a as je}from"/build/_shared/chunk-JUM7J4TY.js";import{b as K,c as Qo,d as qn,e as xe}from"/build/_shared/chunk-ADMCF34Z.js";var dc={};qn(dc,{AbortedDeferredError:()=>ke,Action:()=>Q,IDLE_BLOCKER:()=>it,IDLE_FETCHER:()=>nn,IDLE_NAVIGATION:()=>Qr,UNSAFE_DEFERRED_SYMBOL:()=>Kt,UNSAFE_DeferredData:()=>Ht,UNSAFE_ErrorResponseImpl:()=>ae,UNSAFE_convertRouteMatchToUiMatch:()=>tn,UNSAFE_convertRoutesToDataRoutes:()=>jt,UNSAFE_decodePath:()=>rn,UNSAFE_getResolveToMatches:()=>Bt,UNSAFE_invariant:()=>U,UNSAFE_warning:()=>He,createBrowserHistory:()=>$t,createHashHistory:()=>en,createMemoryHistory:()=>qr,createPath:()=>fe,createRouter:()=>ct,createStaticHandler:()=>da,data:()=>Er,defer:()=>Wt,generatePath:()=>Rr,getStaticContextFromError:()=>fa,getToPathname:()=>Vu,isDataWithResponseInit:()=>sa,isDeferredData:()=>Oi,isRouteErrorResponse:()=>Z,joinPaths:()=>De,json:()=>Qe,matchPath:()=>Ae,matchRoutes:()=>te,normalizePathname:()=>yi,parsePath:()=>le,redirect:()=>Te,redirectDocument:()=>Jt,replace:()=>Yt,resolvePath:()=>Vt,resolveTo:()=>zt,stripBasename:()=>ie});function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(null,arguments)}function qr(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((m,h)=>d(m,typeof m=="string"?null:m.state,h===0?"default":void 0));let o=l(r??a.length-1),i=Q.Pop,s=null;function l(m){return Math.min(Math.max(m,0),a.length-1)}function u(){return a[o]}function d(m,h,p){h===void 0&&(h=null);let w=Ge(a?u().pathname:"/",m,h,p);return He(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(m)),w}function c(m){return typeof m=="string"?m:fe(m)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:c,createURL(m){return new URL(c(m),"http://localhost")},encodeLocation(m){let h=typeof m=="string"?le(m):m;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(m,h){i=Q.Push;let p=d(m,h);o+=1,a.splice(o,a.length,p),n&&s&&s({action:i,location:p,delta:1})},replace(m,h){i=Q.Replace;let p=d(m,h);a[o]=p,n&&s&&s({action:i,location:p,delta:0})},go(m){i=Q.Pop;let h=l(o+m),p=a[h];o=h,s&&s({action:i,location:p,delta:m})},listen(m){return s=m,()=>{s=null}}}}function $t(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:i,hash:s}=n.location;return Ge("",{pathname:o,search:i,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:fe(a)}return hi(t,r,null,e)}function en(e){e===void 0&&(e={});function t(a,o){let{pathname:i="/",search:s="",hash:l=""}=le(a.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),Ge("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(a,o){let i=a.document.querySelector("base"),s="";if(i&&i.getAttribute("href")){let l=a.location.href,u=l.indexOf("#");s=u===-1?l:l.slice(0,u)}return s+"#"+(typeof o=="string"?o:fe(o))}function n(a,o){He(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return hi(t,r,n,e)}function U(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function He(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Nu(){return Math.random().toString(36).substr(2,8)}function qo(e,t){return{usr:e.state,key:e.key,idx:t}}function Ge(e,t,r,n){return r===void 0&&(r=null),J({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?le(t):t,{state:r,key:t&&t.key||n||Nu()})}function fe(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 le(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 hi(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s=Q.Pop,l=null,u=d();u==null&&(u=0,i.replaceState(J({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function c(){s=Q.Pop;let w=d(),x=w==null?null:w-u;u=w,l&&l({action:s,location:p.location,delta:x})}function f(w,x){s=Q.Push;let R=Ge(p.location,w,x);r&&r(R,w),u=d()+1;let b=qo(R,u),E=p.createHref(R);try{i.pushState(b,"",E)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;a.location.assign(E)}o&&l&&l({action:s,location:p.location,delta:1})}function m(w,x){s=Q.Replace;let R=Ge(p.location,w,x);r&&r(R,w),u=d();let b=qo(R,u),E=p.createHref(R);i.replaceState(b,"",E),o&&l&&l({action:s,location:p.location,delta:0})}function h(w){let x=a.location.origin!=="null"?a.location.origin:a.location.href,R=typeof w=="string"?w:fe(w);return R=R.replace(/ $/,"%20"),U(x,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,x)}let p={get action(){return s},get location(){return e(a,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Zo,c),l=w,()=>{a.removeEventListener(Zo,c),l=null}},createHref(w){return t(a,w)},createURL:h,encodeLocation(w){let x=h(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:m,go(w){return i.go(w)}};return p}function Du(e){return e.index===!0}function jt(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,String(o)],s=typeof a.id=="string"?a.id:i.join("-");if(U(a.index!==!0||!a.children,"Cannot specify children on an index route"),U(!n[s],'Found a route id collision on i
1d "'+s+`".  Route id's must be globally unique within Data Router usages`),Du(a)){let l=J({},a,t(a),{id:s});return n[s]=l,l}else{let l=J({},a,t(a),{id:s,children:void 0});return n[s]=l,a.children&&(l.children=jt(a.children,t,i,n)),l}})}function te(e,t,r){return r===void 0&&(r="/"),Gr(e,t,r,!1)}function Gr(e,t,r,n){let a=typeof t=="string"?le(t):t,o=ie(a.pathname||"/",r);if(o==null)return null;let i=mi(e);Pu(i);let s=null,l=rn(o);for(let u=0;s==null&&u<i.length;++u)s=Iu(i[u],l,n);return s}function tn(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 mi(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(U(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=De([n,l.relativePath]),d=r.concat(l);o.children&&o.children.length>0&&(U(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),mi(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Uu(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))a(o,i);else for(let l of pi(o.path))a(o,i,l)}),t}function pi(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=pi(n.join("/")),s=[];return s.push(...i.map(l=>l===""?o:[o,l].join("/"))),a&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Pu(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Mu(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}function Uu(e,t){let r=e.split("/"),n=r.length;return r.some(ei)&&(n+=Tu),t&&(n+=Fu),r.filter(a=>!ei(a)).reduce((a,o)=>a+(Ou.test(o)?Lu:o===""?Au:ku),n)}function Mu(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 Iu(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let s=0;s<n.length;++s){let l=n[s],u=s===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",c=Ae({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!c&&u&&r&&!n[n.length-1].route.index&&(c=Ae({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!c)return null;
1Object.assign(a,c.params),i.push({params:a,pathname:De([o,c.pathname]),pathnameBase:yi(De([o,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(o=De([o,c.pathnameBase]))}return i}function Rr(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(He(!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(/\*$/,"/*"));let n=r.startsWith("/")?"/":"",a=i=>i==null?"":typeof i=="string"?i:String(i),o=r.split(/\/+/).map((i,s,l)=>{if(s===l.length-1&&i==="*")return a(t["*"]);let d=i.match(/^:([\w-]+)(\??)$/);if(d){let[,c,f]=d,m=t[c];return U(f==="?"||m!=null,'Missing ":'+c+'" param'),a(m)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+o.join("/")}function Ae(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ju(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((u,d,c)=>{let{paramName:f,isOptional:m}=d;if(f==="*"){let p=s[c]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}let h=s[c];return m&&!h?u[f]=void 0:u[f]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function ju(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),He(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,(i,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function rn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return He(!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 ie(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 Vt(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?le(e):e,o;if(r)if($u(r))o=r;else{if(r.includes("//")){let i=r;r=ua(r),He(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+r))}r.startsWith("/")?o=ti(r.substring(1),"/"):o=ti(r,t)}else o=t;return{pathname:o,search:Bu(n),hash:zu(a)}}function ti(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 ea(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 vi(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Bt(e,t){let r=vi(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function zt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=le(e):(a=J({},e),U(!a.pathname||!a.pathname.includes("?"),ea("?","pathname","search",a)),U(!a.pathname||!a.pathname.includes("#"),ea("#","pathname","hash",a)),U(!a.search||!a.search.includes("#"),ea("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,s;if(i==null)s=r;else{let c=t.length-1;if(!n&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),c-=1;a.pathname=f.join("/")}s=c>=0?t[c]:"/"}let l=Vt(a,s),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}function Vu(e){return e===""||e.pathname===""?"/":typeof e=="string"?le(e).pathname:e.pathname}function Er(e,t){return new ra(e,typeof t=="number"?{status:t}:t)}function Wu(e){return e instanceof Promise&&e._tracked===!0}function Ju(e){if(!Wu(e))return e;if(e._error)throw e._error;return e._data}function Z(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ct(e){let 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;U(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 v=e.detectErrorBoundary;a=g=>({hasErrorBoundary:v(g)})}else a=Ri;let o={},i=jt(e.routes,a,void 0,o),s,l=e.basename||"/",u=e.dataStrategy||bi,d=e.patchRoutesOnNavigation,c=J({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prepe
vendor: 21,542 bytes, line 1
1ndBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,m=new Set,h=null,p=null,w=null,x=e.hydrationData!=null,R=te(i,e.history.location,l),b=!1,E=null;if(R==null&&!d){let v=ee(404,{pathname:e.history.location.pathname}),{matches:g,route:_}=Zr(i);R=g,E={[_.id]:v}}R&&!e.hydrationData&&Wr(R,i,e.history.location.pathname).active&&(R=null);let L;if(R)if(R.some(v=>v.route.lazy))L=!1;else if(!R.some(v=>v.route.loader))L=!0;else if(c.v7_partialHydration){let v=e.hydrationData?e.hydrationData.loaderData:null,g=e.hydrationData?e.hydrationData.errors:null;if(g){let _=R.findIndex(N=>g[N.route.id]!==void 0);L=R.slice(0,_+1).every(N=>!oa(N.route,v,g))}else L=R.every(_=>!oa(_.route,v,g))}else L=e.hydrationData!=null;else if(L=!1,R=[],c.v7_partialHydration){let v=Wr(null,i,e.history.location.pathname);v.active&&v.matches&&(b=!0,R=v.matches)}let D,y={historyAction:e.history.action,location:e.history.location,matches:R,initialized:L,navigation:Qr,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||E,fetchers:new Map,blockers:new Map},P=Q.Pop,H=!1,j,B=!1,X=new Map,Re=null,ye=!1,ce=!1,rt=[],Hr=new Set,de=new Map,$r=0,fr=-1,Ft=new Map,Je=new Set,At=new Map,hr=new Map,Ie=new Set,wt=new Map,_t=new Map,Vr;function lu(){if(f=e.history.listen(v=>{let{action:g,location:_,delta:N}=v;if(Vr){Vr(),Vr=void 0;return}He(_t.size===0||N!=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 F=Yo({currentLocation:y.location,nextLocation:_,historyAction:g});if(F&&N!=null){let I=new Promise($=>{Vr=$});e.history.go(N*-1),zr(F,{state:"blocked",location:_,proceed(){zr(F,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),I.then(()=>e.history.go(N))},reset(){let $=new Map(y.blockers);$.set(F,it),Ee({blockers:$})}});return}return bt(g,_)}),r){uc(t,X);let v=()=>cc(t,X);t.addEventListener("pagehide",v),Re=()=>t.removeEventListener("pagehide",v)}return y.initialized||bt(Q.Pop,y.location,{initialHydration:!0}),D}function uu(){f&&f(),Re&&Re(),m.clear(),j&&j.abort(),y.fetchers.forEach((v,g)=>Br(g)),y.blockers.forEach((v,g)=>Jo(g))}function cu(v){return m.add(v),()=>m.delete(v)}function Ee(v,g){g===void 0&&(g={}),y=J({},y,v);let _=[],N=[];c.v7_fetcherPersist&&y.fetchers.forEach((F,I)=>{F.state==="idle"&&(Ie.has(I)?N.push(I):_.push(I))}),Ie.forEach(F=>{!y.fetchers.has(F)&&!de.has(F)&&N.push(F)}),[...m].forEach(F=>F(y,{deletedFetchers:N,viewTransitionOpts:g.viewTransitionOpts,flushSync:g.flushSync===!0})),c.v7_fetcherPersist?(_.forEach(F=>y.fetchers.delete(F)),N.forEach(F=>Br(F))):N.forEach(F=>Ie.delete(F))}function kt(v,g,_){var N,F;let{flushSync:I}=_===void 0?{}:_,$=y.actionData!=null&&y.navigation.formMethod!=null&&Fe(y.navigation.formMethod)&&y.navigation.state==="loading"&&((N=v.state)==null?void 0:N._isRedirect)!==!0,k;g.actionData?Object.keys(g.actionData).length>0?k=g.actionData:k=null:$?k=y.actionData:k=null;let T=g.loaderData?ci(y.loaderData,g.loaderData,g.matches||[],g.errors):y.loaderData,A=y.blockers;A.size>0&&(A=new Map(A),A.forEach((z,me)=>A.set(me,it)));let M=H===!0||y.navigation.formMethod!=null&&Fe(y.navigation.formMethod)&&((F=v.state)==null?void 0:F._isRedirect)!==!0;s&&(i=s,s=void 0),ye||P===Q.Pop||(P===Q.Push?e.history.push(v,v.state):P===Q.Replace&&e.history.replace(v,v.state));let V;if(P===Q.Pop){let z=X.get(y.location.pathname);z&&z.has(v.pathname)?V={currentLocation:y.location,nextLocation:v}:X.has(v.pathname)&&(V={currentLocation:v,nextLocation:y.location})}else if(B){let z=X.get(y.location.pathname);z?z.add(v.pathname):(z=new Set([v.pathname]),X.set(y.location.pathname,z)),V={currentLocation:y.location,nextLocation:v}}Ee(J({},g,{actionData:k,loaderData:T,historyAction:P,location:v,initialized:!0,navigation:Qr,revalidation:"idle",restoreScrollPosition:Xo(v,g.matches||y.matches),preventScrollReset:M,blockers:A}),{viewTransitionOpts:V,flushSync:I===!0}),P=Q.Pop,H=!1,B=!1,ye=!1,ce=!1,rt=[]}async function jo(v,g){if(typeof v=="number"){e.history.go(v);return}let _=na(y.location,y.matches,l,c.v7_prependBasename,v,c.v7_relativeSplatPath,g?.fromRouteId,g?.relative),{path:N,submission:F,error:I}=ni(c.v7_normalizeFormMethod,!1,_,g),$=y.location,k=Ge(y.location,N,g&&g.state);k=J({},k,e.history.encodeLocation(k));let T=g&&g.replace!=null?g.replace:void 0,A=Q.Push;T===!0?A=Q.Replace:T===!1||F!=null&&Fe(F.formMethod)&&F.formAction===y.location.pathname+y.location.search&&(A=Q.Replace);let M=g&&"preventScrollReset"in g?g.preventScrollReset===!0:void 0,V=(g&&g.flushSync)===!0,z=Yo({currentLocation:$,nextLocation:k,historyAction:A});if(z){zr(z,{state:"blocked",location:k,proceed(){zr(z,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),jo(v,g)},reset(){let me=new Map(y.blockers);me.set(z,it),Ee({blockers:me})}});return}return await bt(A,k,{submission:F,pendingError:I,preventScrollReset:M,replace:g&&g.replace,enableViewTransition:g&&g.viewTransition,flushSync:V})}function du(){if(Xn(),Ee({revalidation:"loading"}),y.navigation.state!=="submitting"){if(y.navigation.state==="idle"){bt(y.historyAction,y.location,{startUninterruptedRevalidation:!0});return}bt(P||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:B===!0})}}async function bt(v,g,_){j&&j.abort(),j=null,P=v,ye=(_&&_.startUninterruptedRevalidation)===!0,wu(y.location,y.matches),H=(_&&_.preventScrollReset)===!0,B=(_&&_.enableViewTransition)===!0;let N=s||i,F=_&&_.overrideNavigation,I=_!=null&&_.initialHydration&&y.matches&&y.matches.length>0&&!b?y.matches:te(N,g,l),$=(_&&_.flushSync)===!0;if(I&&y.initialized&&!ce&&rc(y.location,g)&&!(_&&_.submission&&Fe(_.submission.formMethod))){kt(g,{matches:I},{flushSync:$});return}let k=Wr(I,N,g.pathname);if(k.active&&k.matches&&(I=k.matches),!I){let{error:q,notFoundMatches:G,route:re}=Gn(g.pathname);kt(g,{matches:G,loaderData:{},errors:{[re.id]:q}},{flushSync:$});return}j=new AbortController;let T=It(e.history,g,j.signal,_&&_.submission),A;if(_&&_.pendingError)A=[st(I).route.id,{type:W.error,error:_.pendingError}];else if(_&&_.submission&&Fe(_.submission.formMethod)){let q=await fu(T,g,_.submission,I,k.active,{replace:_.replace,flushSync:$});if(q.shortCircuited)return;if(q.pendingActionResult){let[G,re]=q.pendingActionResult;if(pe(re)&&Z(re.error)&&re.error.status===404){j=null,kt(g,{matches:q.matches,loaderData:{},errors:{[G]:re.error}});return}}I=q.matches||I,A=q.pendingActionResult,F=ta(g,_.submission),$=!1,k.active=!1,T=It(e.history,T.url,T.signal)}let{shortCircuited:M,matches:V,loaderData:z,errors:me}=await hu(T,g,I,k.active,F,_&&_.submission,_&&_.fetcherSubmission,_&&_.replace,_&&_.initialHydration===!0,$,A);M||(j=null,kt(g,J({matches:V||I},di(A),{loaderData:z,errors:me})))}async function fu(v,g,_,N,F,I){I===void 0&&(I={}),Xn();let $=sc(g,_);if(Ee({navigation:$},{flushSync:I.flushSync===!0}),F){let A=await Jr(N,g.pathname,v.signal);if(A.type==="aborted")return{shortCircuited:!0};if(A.type==="error"){let M=st(A.partialMatches).route.id;return{matches:A.partialMatches,pendingActionResult:[M,{type:W.error,error:A.error}]}}else if(A.matches)N=A.matches;else{let{notFoundMatches:M,error:V,route:z}=Gn(g.pathname);return{matches:M,pendingActionResult:[z.id,{type:W.error,error:V}]}}}let k,T=Nt(N,g);if(!T.route.action&&!T.route.lazy)k={type:W.error,error:ee(405,{method:v.method,pathname:g.pathname,routeId:T.route.id})};else if(k=(await mr("action",y,v,[T],N,null))[T.route.id],v.signal.aborted)return{shortCircuited:!0};if(ut(k)){let A;return I&&I.replace!=null?A=I.replace:A=si(k.response.headers.get("Location"),new URL(v.url),l,e.history)===y.location.pathname+y.location.search,await xt(v,k,!0,{submission:_,replace:A}),{shortCircuited:!0}}if(Xe(k))throw ee(400,{type:"defer-action"});if(pe(k)){let A=st(N,T.route.id);return(I&&I.replace)!==!0&&(P=Q.Push),{matches:N,pendingActionResult:[A.route.id,k]}}return{matches:N,pendingActionResult:[T.route.id,k]}}async function hu(v,g,_,N,F,I,$,k,T,A,M){let V=F||ta(g,I),z=I||$||fi(V),me=!ye&&(!c.v7_partialHydration||!T);if(N){if(me){let ne=Ho(M);Ee(J({navigation:V},ne!==void 0?{actionData:ne}:{}),{flushSync:A})}let Y=await Jr(_,g.pathname,v.signal);if(Y.type==="aborted")return{shortCircuited:!0};if(Y.type==="error"){let ne=st(Y.partialMatches).route.id;return{matches:Y.partialMatches,loaderData:{},errors:{[ne]:Y.error}}}else if(Y.matches)_=Y.matches;else{let{error:ne,notFoundMatches:Ut,route:yr}=Gn(g.pathname);return{matches:Ut,loaderData:{},errors:{[yr.id]:ne}}}}let q=s||i,[G,re]=ai(e.history,y,_,z,g,c.v7_partialHydration&&T===!0,c.v7_skipActionErrorRevalidation,ce,rt,Hr,Ie,At,Je,q,l,M);if(Qn(Y=>!(_&&_.some(ne=>ne.route.id===Y))||G&&G.some(ne=>ne.route.id===Y)),fr=++$r,G.length===0&&re.length===0){let Y=zo();return kt(g,J({matches:_,loaderData:{},errors:M&&pe(M[1])?{[M[0]]:M[1].error}:null},di(M),Y?{fetchers:new Map(y.fetchers)}:{}),{flushSync:A}),{shortCircuited:!0}}if(me){let Y={};if(!N){Y.navigation=V;let ne=Ho(M);ne!==void 0&&(Y.actionData=ne)}re.length>0&&(Y.fetchers=mu(re)),Ee(Y,{flushSync:A})}re.forEach(Y=>{at(Y.key),Y.controller&&de.set(Y.key,Y.controller)});let Tt=()=>re.forEach(Y=>at(Y.key));j&&j.signal.addEventListener("abort",Tt);let{loaderResults:pr,fetcherResults:Ke}=await $o(y,_,G,re,v);if(v.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",Tt),re.forEach(Y=>de.delete(Y.key));let Ve=Xr(pr);if(Ve)return await xt(v,Ve.result,!0,{replace:k}),{shortCircuited:!0};if(Ve=Xr(Ke),Ve)return Je.add(Ve.key),await xt(v,Ve.result,!0,{replace:k}),{shortCircuited:!0};let{loaderData:Zn,errors:vr}=ui(y,_,pr,M,re,Ke,wt);wt.forEach((Y,ne)=>{Y.subscribe(Ut=>{(Ut||Y.done)&&wt.delete(ne)})}),c.v7_partialHydration&&T&&y.errors&&(vr=J({},y.errors,vr));let St=zo(),Yr=Wo(fr),Kr=St||Yr||re.length>0;return J({matches:_,loaderData:Zn,errors:vr},Kr?{fetchers:new Map(y.fetchers)}:{})}function Ho(v){if(v&&!pe(v[1]))return{[v[0]]:v[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function mu(v){return v.forEach(g=>{let _=y.fetchers.get(g.key),N=gr(void 0,_?_.data:void 0);y.fetchers.set(g.key,N)}),new Map(y.fetchers)}function pu(v,g,_,N){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.");at(v);let F=(N&&N.flushSync)===!0,I=s||i,$=na(y.location,y.matches,l,c.v7_prependBasename,_,c.v7_relativeSplatPath,g,N?.relative),k=te(I,$,l),T=Wr(k,I,$);if(T.active&&T.matches&&(k=T.matches),!k){Ye(v,g,ee(404,{pathname:$}),{flushSync:F});return}let{path:A,submission:M,error:V}=ni(c.v7_normalizeFormMethod,!0,$,N);if(V){Ye(v,g,V,{flushSync:F});return}let z=Nt(k,A),me=(N&&N.preventScrollReset)===!0;if(M&&Fe(M.formMethod)){vu(v,g,A,z,k,T.active,F,me,M);return}At.set(v,{routeId:g,path:A}),yu(v,g,A,z,k,T.active,F,me,M)}async function vu(v,g,_,N,F,I,$,k,T){Xn(),At.delete(v);function A(se){if(!se.route.action&&!se.route.lazy){let Mt=ee(405,{method:T.formMethod,pathname:_,routeId:g});return Ye(v,g,Mt,{flushSync:$}),!0}return!1}if(!I&&A(N))return;let M=y.fetchers.get(v);nt(v,lc(T,M),{flushSync:$});let V=new AbortController,z=It(e.history,_,V.signal,T);if(I){let se=await Jr(F,new URL(z.url).pathname,z.signal,v);if(se.type==="aborted")return;if(se.type==="error"){Ye(v,g,se.error,{flushSync:$});return}else if(se.matches){if(F=se.matches,N=Nt(F,_),A(N))return}else{Ye(v,g,ee(404,{pathname:_}),{flushSync:$});return}}de.set(v,V);let me=$r,G=(await mr("action",y,z,[N],F,v))[N.route.id];if(z.signal.aborted){de.get(v)===V&&de.delete(v);return}if(c.v7_fetcherPersist&&Ie.has(v)){if(ut(G)||pe(G)){nt(v,ot(void 0));return}}else{if(ut(G))if(de.delete(v),fr>me){nt(v,ot(void 0));return}else return Je.add(v),nt(v,gr(T)),xt(z,G,!1,{fetcherSubmission:T,preventScrollReset:k});if(pe(G)){Ye(v,g,G.error);return}}if(Xe(G))throw ee(400,{type:"defer-action"});let re=y.navigation.location||y.location,Tt=It(e.history,re,V.signal),pr=s||i,Ke=y.navigation.state!=="idle"?te(pr,y.navigation.location,l):y.matches;U(Ke,"Didn't find any matches after fetcher action");let Ve=++$r;Ft.set(v,Ve);let Zn=gr(T,G.data);y.fetchers.set(v,Zn);let[vr,St]=ai(e.history,y,Ke,T,re,!1,c.v7_skipActionErrorRevalidation,ce,rt,Hr,Ie,At,Je,pr,l,[N.route.id,G]);St.filter(se=>se.key!==v).forEach(se=>{let Mt=se.key,Go=y.fetchers.get(Mt),xu=gr(void 0,Go?Go.data:void 0);y.fetchers.set(Mt,xu),at(Mt),se.controller&&de.set(Mt,se.controller)}),Ee({fetchers:new Map(y.fetchers)});let Yr=()=>St.forEach(se=>at(se.key));V.signal.addEventListener("abort",Yr);let{loaderResults:Kr,fetcherResults:Y}=await $o(y,Ke,vr,St,Tt);if(V.signal.aborted)return;V.signal.removeEventListener("abort",Yr),Ft.delete(v),de.delete(v),St.forEach(se=>de.delete(se.key));let ne=Xr(Kr);if(ne)return xt(Tt,ne.result,!1,{preventScrollReset:k});if(ne=Xr(Y),ne)return Je.add(ne.key),xt(Tt,ne.result,!1,{preventScrollReset:k});let{loaderData:Ut,errors:yr}=ui(y,Ke,Kr,void 0,St,Y,wt);if(y.fetchers.has(v)){let se=ot(G.data);y.fetchers.set(v,se)}Wo(Ve),y.navigation.state==="loading"&&Ve>fr?(U(P,"Expected pending action"),j&&j.abort(),kt(y.navigation.location,{matches:Ke,loaderData:Ut,errors:yr,fetchers:new Map(y.fetchers)})):(Ee({errors:yr,loaderData:ci(y.loaderData,Ut,Ke,yr),fetchers:new Map(y.fetchers)}),ce=!1)}async function yu(v,g,_,N,F,I,$,k,T){let A=y.fetchers.get(v);nt(v,gr(T,A?A.data:void 0),{flushSync:$});let M=new AbortController,V=It(e.history,_,M.signal);if(I){let G=await Jr(F,new URL(V.url).pathname,V.signal,v);if(G.type==="aborted")return;if(G.type==="error"){Ye(v,g,G.error,{flushSync:$});return}else if(G.matches)F=G.matches,N=Nt(F,_);else{Ye(v,g,ee(404,{pathname:_}),{flushSync:$});return}}de.set(v,M);let z=$r,q=(await mr("loader",y,V,[N],F,v))[N.route.id];if(Xe(q)&&(q=await ha(q,V.signal,!0)||q),de.get(v)===M&&de.delete(v),!V.signal.aborted){if(Ie.has(v)){nt(v,ot(void 0));return}if(ut(q))if(fr>z){nt(v,ot(void 0));return}else{Je.add(v),await xt(V,q,!1,{preventScrollReset:k});return}if(pe(q)){Ye(v,g,q.error);return}U(!Xe(q),"Unhandled fetcher deferred data"),nt(v,ot(q.data))}}async function xt(v,g,_,N){let{submission:F,fetcherSubmission:I,preventScrollReset:$,replace:k}=N===void 0?{}:N;g.response.headers.has("X-Remix-Revalidate")&&(ce=!0);let T=g.response.headers.get("Location");U(T,"Expected a Location header on the redirect Response"),T=si(T,new URL(v.url),l,e.history);let A=Ge(y.location,T,{_isRedirect:!0});if(r){let G=!1;if(g.response.headers.has("X-Remix-Reload-Document"))G=!0;else if(ca.test(T)){let re=e.history.createURL(T);G=re.origin!==t.location.origin||ie(re.pathname,l)==null}if(G){k?t.location.replace(T):t.location.assign(T);return}}j=null;let M=k===!0||g.response.headers.has("X-Remix-Replace")?Q.Replace:Q.Push,{formMethod:V,formAction:z,formEncType:me}=y.navigation;!F&&!I&&V&&z&&me&&(F=fi(y.navigation));let q=F||I;if(Qu.has(g.response.status)&&q&&Fe(q.formMethod))await bt(M,A,{submission:J({},q,{formAction:T}),preventScrollReset:$||H,enableViewTransition:_?B:void 0});else{let G=ta(A,F);await bt(M,A,{overrideNavigation:G,fetcherSubmission:I,preventScrollReset:$||H,enableViewTransition:_?B:void 0})}}async function mr(v,g,_,N,F,I){let $,k={};try{$=await xi(u,v,g,_,N,F,I,o,a)}catch(T){return N.forEach(A=>{k[A.route.id]={type:W.error,error:T}}),k}for(let[T,A]of Object.entries($))if(Pi(A)){let M=A.result;k[T]={type:W.redirect,response:Ni(M,_,T,F,l,c.v7_relativeSplatPath)}}else k[T]=await Si(A);return k}async function $o(v,g,_,N,F){let I=v.matches,$=mr("loader",v,F,_,g,null),k=Promise.all(N.map(async M=>{if(M.matches&&M.match&&M.controller){let z=(await mr("loader",v,It(e.history,M.path,M.controller.signal),[M.match],M.matches,M.key))[M.match.route.id];return{[M.key]:z}}else return Promise.resolve({[M.key]:{type:W.error,error:ee(404,{pathname:M.path})}})})),T=await $,A=(await k).reduce((M,V)=>Object.assign(M,V),{});return await Promise.all([oc(g,T,F.signal,I,v.loaderData),ic(g,A,N)]),{loaderResults:T,fetcherResults:A}}function Xn(){ce=!0,rt.push(...Qn()),At.forEach((v,g)=>{de.has(g)&&Hr.add(g),at(g)})}function nt(v,g,_){_===void 0&&(_={}),y.fetchers.set(v,g),Ee({fetchers:new Map(y.fetchers)},{flushSync:(_&&_.flushSync)===!0})}function Ye(v,g,_,N){N===void 0&&(N={});let F=st(y.matches,g);Br(v),Ee({errors:{[F.route.id]:_},fetchers:new Map(y.fetchers)},{flushSync:(N&&N.flushSync)===!0})}function Vo(v){return hr.set(v,(hr.get(v)||0)+1),Ie.has(v)&&Ie.delete(v),y.fetchers.get(v)||nn}function Br(v){let g=y.fetchers.get(v);de.has(v)&&!(g&&g.state==="loading"&&Ft.has(v))&&at(v),At.delete(v),Ft.delete(v),Je.delete(v),c.v7_fetcherPersist&&Ie.delete(v),Hr.delete(v),y.fetchers.delete(v)}function gu(v){let g=(hr.get(v)||0)-1;g<=0?(hr.delete(v),Ie.add(v),c.v7_fetcherPersist||Br(v)):hr.set(v,g),Ee({fetchers:new Map(y.fetchers)})}function at(v){let g=de.get(v);g&&(g.abort(),de.delete(v))}function Bo(v){for(let g of v){let _=Vo(g),N=ot(_.data);y.fetchers.set(g,N)}}function zo(){let v=[],g=!1;for(let _ of Je){let N=y.fetchers.get(_);U(N,"Expected fetcher: "+_),N.state==="loading"&&(Je.delete(_),v.push(_),g=!0)}return Bo(v),g}function Wo(v){let g=[];for(let[_,N]of Ft)if(N<v){let F=y.fetchers.get(_);U(F,"Expected fetcher: "+_),F.state==="loading"&&(at(_),Ft.delete(_),g.push(_))}return Bo(g),g.length>0}function Ru(v,g){let _=y.blockers.get(v)||it;return _t.get(v)!==g&&_t.set(v,g),_}function Jo(v){y.blockers.delete(v),_t.delete(v)}function zr(v,g){let _=y.blockers.get(v)||it;U(_.state==="unblocked"&&g.state==="blocked"||_.state==="blocked"&&g.state==="blocked"||_.state==="blocked"&&g.state==="proceeding"||_.state==="blocked"&&g.state==="unblocked"||_.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+_.state+" -> "+g.state);let N=new Map(y.blockers);N.set(v,g),Ee({blockers:N})}function Yo(v){let{currentLocation:g,nextLocation:_,historyAction:N}=v;if(_t.size===0)return;_t.size>1&&He(!1,"A router only supports one blocker at a time");let F=Array.from(_t.entries()),[I,$]=F[F.length-1],k=y.blockers.get(I);if(!(k&&k.state==="proceeding")&&$({currentLocation:g,nextLocation:_,historyAction:N}))return I}function Gn(v){let g=ee(404,{pathname:v}),_=s||i,{matches:N,route:F}=Zr(_);return Qn(),{notFoundMatches:N,route:F,error:g}}function Qn(v){let g=[];return wt.forEach((_,N)=>{(!v||v(N))&&(_.cancel(),g.push(N),wt.delete(N))}),g}function Eu(v,g,_){if(h=v,w=g,p=_||null,!x&&y.navigation===Qr){x=!0;let N=Xo(y.location,y.matches);N!=null&&Ee({restoreScrollPosition:N})}return()=>{h=null,w=null,p=null}}function Ko(v,g){return p&&p(v,g.map(N=>tn(N,y.loaderData)))||v.key}function wu(v,g){if(h&&w){let _=Ko(v,g);h[_]=w()}}function Xo(v,g){if(h){let _=Ko(v,g),N=h[_];if(typeof N=="number")return N}return null}function Wr(v,g,_){if(d)if(v){if(Object.keys(v[0].params).length>0)return{active:!0,matches:Gr(g,_,l,!0)}}else return{active:!0,matches:Gr(g,_,l,!0)||[]};return{active:!1,matches:null}}async function Jr(v,g,_,N){if(!d)return{type:"success",matches:v};let F=v;for(;;){let I=s==null,$=s||i,k=o;try{await d({signal:_,path:g,matches:F,fetcherKey:N,patch:(M,V)=>{_.aborted||ii(M,V,$,k,a)}})}catch(M){return{type:"error",error:M,partialMatches:F}}finally{I&&!_.aborted&&(i=[...i])}if(_.aborted)return{type:"aborted"};let T=te($,g,l);if(T)return{type:"success",matches:T};let A=Gr($,g,l,!0);if(!A||F.length===A.length&&F.every((M,V)=>M.route.id===A[V].route.id))return{type:"success",matches:null};F=A}}function _u(v){o={},s=jt(v,a,void 0,o)}function bu(v,g){let _=s==null;ii(v,g,s||i,o,a),_&&(i=[...i],Ee({}))}return D={get basename(){return l},get future(){return c},get state(){return y},get routes(){return i},get window(){return t},initialize:lu,subscribe:cu,enableScrollRestoration:Eu,navigate:jo,fetch:pu,revalidate:du,createHref:v=>e.history.createHref(v),encodeLocation:v=>e.history.encodeLocation(v),getFetcher:Vo,deleteFetcher:gu,dispose:uu,getBlocker:Ru,deleteBlocker:Jo,patchRoutes:bu,_internalFetchControllers:de,_internalActiveDeferreds:wt,_internalSetRoutes:_u},D}function da(e,t){U(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a;if(t!=null&&t.mapRouteProperties)a=t.mapRouteProperties;else if(t!=null&&t.detectErrorBoundary){let m=t.detectErrorBoundary;a=h=>({hasErrorBoundary:m(h)})}else a=Ri;let o=J({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),i=jt(e,a,void 0,r);async function s(m,h){let{requestContext:p,skipLoaderErrorBubbling:w,dataStrategy:x}=h===void 0?{}:h,R=new URL(m.url),b=m.method,E=Ge("",fe(R),null,"default"),L=te(i,E,n);if(!la(b)&&b!=="HEAD"){let y=ee(405,{method:b}),{matches:P,route:H}=Zr(i);return{basename:n,location:E,matches:P,loaderData:{},actionData:null,errors:{[H.id]:y},statusCode:y.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!L){let y=ee(404,{pathname:E.pathname}),{matches:P,route:H}=Zr(i);return{basename:n,location:E,matches:P,loaderData:{},actionData:null,errors:{[H.id]:y},statusCode:y.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let D=await u(m,E,L,p,x||null,w===!0,null);
1return lt(D)?D:J({location:E,basename:n},D)}async function l(m,h){let{routeId:p,requestContext:w,dataStrategy:x}=h===void 0?{}:h,R=new URL(m.url),b=m.method,E=Ge("",fe(R),null,"default"),L=te(i,E,n);if(!la(b)&&b!=="HEAD"&&b!=="OPTIONS")throw ee(405,{method:b});if(!L)throw ee(404,{pathname:E.pathname});let D=p?L.find(j=>j.route.id===p):Nt(L,E);if(p&&!D)throw ee(403,{pathname:E.pathname,routeId:p});if(!D)throw ee(404,{pathname:E.pathname});let y=await u(m,E,L,w,x||null,!1,D);if(lt(y))return y;let P=y.errors?Object.values(y.errors)[0]:void 0;if(P!==void 0)throw P;if(y.actionData)return Object.values(y.actionData)[0];if(y.loaderData){var H;let j=Object.values(y.loaderData)[0];return(H=y.activeDeferreds)!=null&&H[D.route.id]&&(j[Kt]=y.activeDeferreds[D.route.id]),j}}async function u(m,h,p,w,x,R,b){U(m.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(Fe(m.method.toLowerCase()))return await d(m,p,b||Nt(p,h),w,x,R,b!=null);let E=await c(m,p,w,x,R,b);return lt(E)?E:J({},E,{actionData:null,actionHeaders:{}})}catch(E){if(nc(E)&&lt(E.result)){if(E.type===W.error)throw E.result;return E.result}if(ac(E))return E;throw E}}async function d(m,h,p,w,x,R,b){let E;if(!p.route.action&&!p.route.lazy){let y=ee(405,{method:m.method,pathname:new URL(m.url).pathname,routeId:p.route.id});if(b)throw y;E={type:W.error,error:y}}else E=(await f("action",m,[p],h,b,w,x))[p.route.id],m.signal.aborted&&ri(m,b,o);if(ut(E))throw new Response(null,{status:E.response.status,headers:{Location:E.response.headers.get("Location")}});if(Xe(E)){let y=ee(400,{type:"defer-action"});if(b)throw y;E={type:W.error,error:y}}if(b){if(pe(E))throw E.error;return{matches:[p],loaderData:{},actionData:{[p.route.id]:E.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let L=new Request(m.url,{headers:m.headers,redirect:m.redirect,signal:m.signal});if(pe(E)){let y=R?p:st(h,p.route.id),P=await c(L,h,w,x,R,null,[y.route.id,E]);return J({},P,{statusCode:Z(E.error)?E.error.status:E.statusCode!=null?E.statusCode:500,actionData:null,actionHeaders:J({},E.headers?{[p.route.id]:E.headers}:{})})}let D=await c(L,h,w,x,R,null);return J({},D,{actionData:{[p.route.id]:E.data}},E.statusCode?{statusCode:E.statusCode}:{},{actionHeaders:E.headers?{[p.route.id]:E.headers}:{}})}async function c(m,h,p,w,x,R,b){let E=R!=null;if(E&&!(R!=null&&R.route.loader)&&!(R!=null&&R.route.lazy))throw ee(400,{method:m.method,pathname:new URL(m.url).pathname,routeId:R?.route.id});let D=(R?[R]:b&&pe(b[1])?aa(h,b[0]):h).filter(B=>B.route.loader||B.route.lazy);if(D.length===0)return{matches:h,loaderData:h.reduce((B,X)=>Object.assign(B,{[X.route.id]:null}),{}),errors:b&&pe(b[1])?{[b[0]]:b[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let y=await f("loader",m,D,h,E,p,w);m.signal.aborted&&ri(m,E,o);let P=new Map,H=Ci(h,y,b,P,x),j=new Set(D.map(B=>B.route.id));return h.forEach(B=>{j.has(B.route.id)||(H.loaderData[B.route.id]=null)}),J({},H,{matches:h,activeDeferreds:P.size>0?Object.fromEntries(P.entries()):null})}async function f(m,h,p,w,x,R,b){let E=await xi(b||bi,m,null,h,p,w,null,r,a,R),L={};return await Promise.all(w.map(async D=>{if(!(D.route.id in E))return;let y=E[D.route.id];if(Pi(y)){let P=y.result;throw Ni(P,h,D.route.id,w,n,o.v7_relativeSplatPath)}if(lt(y.result)&&x)throw y;L[D.route.id]=await Si(y)})),L}return{dataRoutes:i,query:s,queryRoute:l}}function fa(e,t,r){return J({},t,{statusCode:Z(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function ri(e,t,r){if(r.v7_throwAbortReason&&e.signal.reason!==void 0)throw e.signal.reason;let n=t?"queryRoute":"query";throw new Error(n+"() call aborted: "+e.method+" "+e.url)}function Zu(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function na(e,t,r,n,a,o,i,s){let l,u;if(i){l=[];for(let c of t)if(l.push(c),c.route.id===i){u=c;break}}else l=t,u=t[t.length-1];let d=zt(a||".",Bt(l,o),ie(e.pathname,r)||e.pathname,s==="path");if(a==null&&(d.search=e.search,d.hash=e.hash),(a==null||a===""||a===".")&&u){let c=ma(d.search);if(u.route.index&&!c)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&c){let f=new URLSearchParams(d.search),m=f.getAll("index");f.delete("index"),m.filter(p=>
vendor: 16,360 bytes, lines 1-2
1p).forEach(p=>f.append("index",p));let h=f.toString();d.search=h?"?"+h:""}}return n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:De([r,d.pathname])),fe(d)}function ni(e,t,r,n){if(!n||!Zu(n))return{path:r};if(n.formMethod&&!la(n.formMethod))return{path:r,error:ee(405,{method:n.formMethod})};let a=()=>({path:r,error:ee(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),s=Di(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Fe(i))return a();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((m,h)=>{let[p,w]=h;return""+m+p+"="+w+`
2`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!Fe(i))return a();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return a()}}}U(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=ia(n.formData),u=n.formData;else if(n.body instanceof FormData)l=ia(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=li(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=li(l)}catch{return a()}let d={formMethod:i,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Fe(d.formMethod))return{path:r,submission:d};let c=le(r);return t&&c.search&&ma(c.search)&&l.append("index",""),c.search="?"+l,{path:fe(c),submission:d}}function aa(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 ai(e,t,r,n,a,o,i,s,l,u,d,c,f,m,h,p){let w=p?pe(p[1])?p[1].error:p[1].data:void 0,x=e.createURL(t.location),R=e.createURL(a),b=r;o&&t.errors?b=aa(r,Object.keys(t.errors)[0],!0):p&&pe(p[1])&&(b=aa(r,p[0]));let E=p?p[1].statusCode:void 0,L=i&&E&&E>=400,D=b.filter((P,H)=>{let{route:j}=P;if(j.lazy)return!0;if(j.loader==null)return!1;if(o)return oa(j,t.loaderData,t.errors);if(qu(t.loaderData,t.matches[H],P)||l.some(Re=>Re===P.route.id))return!0;let B=t.matches[H],X=P;return oi(P,J({currentUrl:x,currentParams:B.params,nextUrl:R,nextParams:X.params},n,{actionResult:w,actionStatus:E,defaultShouldRevalidate:L?!1:s||x.pathname+x.search===R.pathname+R.search||x.search!==R.search||wi(B,X)}))}),y=[];return c.forEach((P,H)=>{if(o||!r.some(ye=>ye.route.id===P.routeId)||d.has(H))return;let j=te(m,P.path,h);if(!j){y.push({key:H,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let B=t.fetchers.get(H),X=Nt(j,P.path),Re=!1;f.has(H)?Re=!1:u.has(H)?(u.delete(H),Re=!0):B&&B.state!=="idle"&&B.data===void 0?Re=s:Re=oi(X,J({currentUrl:x,currentParams:t.matches[t.matches.length-1].params,nextUrl:R,nextParams:r[r.length-1].params},n,{actionResult:w,actionStatus:E,defaultShouldRevalidate:L?!1:s})),Re&&y.push({key:H,routeId:P.routeId,path:P.path,matches:j,match:X,controller:new AbortController})}),[D,y]}function oa(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 qu(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function wi(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function oi(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function ii(e,t,r,n,a){var o;let i;if(e){let u=n[e];U(u,"No route found to patch children into: routeId = "+e),u.children||(u.children=[]),i=u.children}else i=r;let s=t.filter(u=>!i.some(d=>_i(u,d))),l=jt(s,a,[e||"_","patch",String(((o=i)==null?void 0:o.length)||"0")],n);i.push(...l)}function _i(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(o=>_i(r,o))}):!1}async function ec(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];U(a,"No route found in manifest");let o={};for(let i in n){let l=a[i]!==void 0&&i!=="hasErrorBoundary";He(!l,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!Cu.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,J({},t(a),{lazy:void 0}))}async function bi(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,o,i)=>Object.assign(a,{[r[i].route.id]:o}),{})}async function xi(e,t,r,n,a,o,i,s,l,u){let d=o.map(m=>m.route.lazy?ec(m.route,l,s):void 0),c=o.map((m,h)=>{let p=d[h],w=a.some(R=>R.route.id===m.route.id);return J({},m,{shouldLoad:w,resolve:async R=>(R&&n.method==="GET"&&(m.route.lazy||m.route.loader)&&(w=!0),w?tc(t,n,m,p,R,u):Promise.resolve({type:W.data,result:void 0}))})}),f=await e({matches:c,request:n,params:o[0].params,fetcherKey:i,context:u});try{await Promise.all(d)}catch{}return f}async function tc(e,t,r,n,a,o){let i,s,l=u=>{let d,c=new Promise((h,p)=>d=p);s=()=>d(),t.signal.addEventListener("abort",s);let f=h=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):u({request:t,params:r.params,context:o},...h!==void 0?[h]:[]),m=(async()=>{try{return{type:"data",result:await(a?a(p=>f(p)):f())}}catch(h){return{type:"error",result:h}}})();return Promise.race([m,c])};try{let u=r.route[e];if(n)if(u){let d,[c]=await Promise.all([l(u).catch(f=>{d=f}),n]);if(d!==void 0)throw d;i=c}else if(await n,u=r.route[e],u)i=await l(u);else if(e==="action"){let d=new URL(t.url),c=d.pathname+d.search;throw ee(405,{method:t.method,pathname:c,routeId:r.route.id})}else return{type:W.data,result:void 0};else if(u)i=await l(u);else{let d=new URL(t.url),c=d.pathname+d.search;throw ee(404,{pathname:c})}U(i.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(u){return{type:W.error,result:u}}finally{s&&t.signal.removeEventListener("abort",s)}return i}async function Si(e){let{result:t,type:r}=e;if(lt(t)){let c;try{let f=t.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?t.body==null?c=null:c=await t.json():c=await t.text()}catch(f){return{type:W.error,error:f}}return r===W.error?{type:W.error,error:new ae(t.status,t.statusText,c),statusCode:t.status,headers:t.headers}:{type:W.data,data:c,statusCode:t.status,headers:t.headers}}if(r===W.error){if(sa(t)){var n,a;if(t.data instanceof Error){var o,i;return{type:W.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:W.error,error:new ae(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:Z(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:W.error,error:t,statusCode:Z(t)?t.status:void 0}}if(Oi(t)){var s,l;return{type:W.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(sa(t)){var u,d;return{type:W.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(d=t.init)!=null&&d.headers?new Headers(t.init.headers):void 0}}return{type:W.data,data:t}}function Ni(e,t,r,n,a,o){let i=e.headers.get("Location");if(U(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ca.test(i)){let s=n.slice(0,n.findIndex(l=>l.route.id===r)+1);i=na(new URL(t.url),s,a,!0,i,o),e.headers.set("Location",i)}return e}function si(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ca.test(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(a.includes(i.protocol))throw new Error("Invalid redirect location");let s=ie(i.pathname,r)!=null;if(i.origin===t.origin&&s)return ua(i.pathname)+i.search+i.hash}try{let o=n.createURL(e);if(a.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function It(e,t,r,n){let a=e.createURL(Di(t)).toString(),o={signal:r};if(n&&Fe(n.formMethod)){let{formMethod:i,formEncType:s}=n;o.method=i.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=ia(n.formData):o.body=n.formData}return new Request(a,o)}function ia(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function li(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ci(e,t,r,n,a){let o={},i=null,s,l=!1,u={},d=r&&pe(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let f=c.route.id,m=t[f];if(U(!ut(m),"Cannot handle redirect results in processLoaderData"),pe(m)){let h=m.error;if(d!==void 0&&(h=d,d=void 0),i=i||{},a)i[f]=h;else{let p=st(e,f);i[p.route.id]==null&&(i[p.route.id]=h)}o[f]=void 0,l||(l=!0,s=Z(m.error)?m.error.status:500),m.headers&&(u[f]=m.headers)}else Xe(m)?(n.set(f,m.deferredData),o[f]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!l&&(s=m.statusCode),m.headers&&(u[f]=m.headers)):(o[f]=m.data,m.statusCode&&m.statusCode!==200&&!l&&(s=m.statusCode),m.headers&&(u[f]=m.headers))}),d!==void 0&&r&&(i={[r[0]]:d},o[r[0]]=void 0),{loaderData:o,errors:i,statusCode:s||200,loaderHeaders:u}}function ui(e,t,r,n,a,o,i){let{loaderData:s,errors:l}=Ci(t,r,n,i,!1);return a.forEach(u=>{let{key:d,match:c,controller:f}=u,m=o[d];if(U(m,"Did not find corresponding fetcher result"),!(f&&f.signal.aborted))if(pe(m)){let h=st(e.matches,c?.route.id);l&&l[h.route.id]||(l=J({},l,{[h.route.id]:m.error})),e.fetchers.delete(d)}else if(ut(m))U(!1,"Unhandled fetcher revalidation redirect");else if(Xe(m))U(!1,"Unhandled fetcher deferred data");else{let h=ot(m.data);e.fetchers.set(d,h)}}),{loaderData:s,errors:l}}function ci(e,t,r,n){let a=J({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function di(e){return e?pe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function st(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 Zr(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 ee(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=t===void 0?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(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.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(s="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(s="Not Found",l='No route matches URL "'+r+'"'):e===405&&(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 ae(e||500,s,new Error(l),!0)}function Xr(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(ut(a))return{key:n,result:a}}}function Di(e){let t=typeof e=="string"?le(e):e;return fe(J({},t,{hash:""}))}function rc(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function nc(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type===W.data||e.type===W.error)}function Pi(e){return lt(e.result)&&Gu.has(e.result.status)}function Xe(e){return e.type===W.deferred}function pe(e){return e.type===W.error}function ut(e){return(e&&e.type)===W.redirect}function sa(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Oi(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 lt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ac(e){if(!lt(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function la(e){return Xu.has(e.toLowerCase())}function Fe(e){return Yu.has(e.toLowerCase())}async function oc(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(f=>f?.route.id===s);if(!u)continue;let d=n.find(f=>f.route.id===u.route.id),c=d!=null&&!wi(d,u)&&(a&&a[u.route.id])!==void 0;Xe(l)&&c&&await ha(l,r,!1).then(f=>{f&&(t[s]=f)})}}async function ic(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(u=>u?.route.id===o)&&Xe(s)&&(U(i,"Expected an AbortController for revalidating fetcher deferred result"),await ha(s,i.signal,!0).then(u=>{u&&(t[a]=u)}))}}async function ha(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:W.data,data:e.deferredData.unwrappedData}}catch(a){return{type:W.error,error:a}}return{type:W.data,data:e.deferredData.data}}}function ma(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Nt(e,t){let r=typeof t=="string"?le(t).search:t.search;if(e[e.length-1].route.index&&ma(r||""))return e[e.length-1];let n=vi(e);return n[n.length-1]}function fi(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function ta(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 sc(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 gr(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 lc(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 ot(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 uc(e,t){try{let r=e.sessionStorage.getItem(Ei);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function cc(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Ei,JSON.stringify(r))}catch(n){He(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}var Q,Zo,W,Cu,Ou,Lu,Fu,Au,ku,Tu,ei,Hu,$u,ua,De,yi,Bu,zu,Qe,ra,ke,Ht,Wt,Te,Jt,Yt,ae,gi,Yu,Ku,Xu,Gu,Qu,Qr,nn,it,ca,Ri,Ei,Kt,ge=K(()=>{(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Q||(Q={}));Zo="popstate";(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(W||(W={}));
2Cu=new Set(["lazy","caseSensitive","path","id","index","children"]);Ou=/^:[\w-]+$/,Lu=3,Fu=2,Au=1,ku=10,Tu=-2,ei=e=>e==="*";Hu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$u=e=>Hu.test(e);ua=e=>e.replace(/\/\/+/g,"/"),De=e=>ua(e.join("/")),yi=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bu=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zu=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Qe=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),J({},n,{headers:a}))},ra=class{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}};ke=class extends Error{},Ht=class{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],U(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((o,i)=>n=i),this.controller=new AbortController;let a=()=>n(new ke("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((o,i)=>{let[s,l]=i;return Object.assign(o,{[s]:this.trackPromise(s,l)})},{}),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 ke)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 o=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:()=>o}),this.emit(!1,r),Promise.reject(o)}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(o=>{t.removeEventListener("abort",n),(o||this.done)&&a(o)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return U(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]:Ju(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}};Wt=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new Ht(t,n)},Te=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,J({},n,{headers:a}))},Jt=(e,t)=>{let r=Te(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},Yt=(e,t)=>{let r=Te(e,t);return r.headers.set("X-Remix-Replace","true"),r},ae=class{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}};gi=["post","put","patch","delete"],Yu=new Set(gi),Ku=["get",...gi],Xu=new Set(Ku),Gu=new Set([301,302,303,307,308]),Qu=new Set([307,308]),Qr={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},nn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},it={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ca=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ri=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ei="remix-router-transitions";Kt=Symbol("deferred")});function dt(){return dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
2).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dt.apply(null,arguments)}function ht(e,t){let{relative:r}=t===void 0?{}:t;ze()||U(!1);let{basename:n,navigator:a}=C.useContext(we),{hash:o,pathname:i,search:s}=qe(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:De([n,i])),a.createHref({pathname:l,search:s,hash:o})}function ze(){return C.useContext(Ct)!=null}function ue(){return ze()||U(!1),C.useContext(Ct).location}function ya(){return C.useContext(Ct).navigationType}function ga(e){ze()||U(!1);let{pathname:t}=ue();return C.useMemo(()=>Ae(e,rn(t)),[t,e])}function ki(e){C.useContext(we).static||C.useLayoutEffect(e)}function Dt(){let{isDataRoute:e}=C.useContext(_e);return e?gc():fc()}function fc(){ze()||U(!1);let e=C.useContext(Be),{basename:t,future:r,navigator:n}=C.useContext(we),{matches:a}=C.useContext(_e),{pathname:o}=ue(),i=JSON.stringify(Bt(a,r.v7_relativeSplatPath)),s=C.useRef(!1);return ki(()=>{s.current=!0}),C.useCallback(function(u,d){if(d===void 0&&(d={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let c=zt(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:De([t,c.pathname])),(d.replace?n.replace:n.push)(c,d.state,d)},[t,n,i,o,e])}function Ra(){return C.useContext(Ti)}function on(e){let t=C.useContext(_e).outlet;return t&&C.createElement(Ti.Provider,{value:e},t)}function Ea(){let{matches:e}=C.useContext(_e),t=e[e.length-1];return t?t.params:{}}function qe(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=C.useContext(we),{matches:a}=C.useContext(_e),{pathname:o}=ue(),i=JSON.stringify(Bt(a,n.v7_relativeSplatPath));return C.useMemo(()=>zt(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function sn(e,t){return wa(e,t)}function wa(e,t,r,n){ze()||U(!1);let{navigator:a}=C.useContext(we),{matches:o}=C.useContext(_e),i=o[o.length-1],s=i?i.params:{},l=i?i.pathname:"/",u=i?i.pathnameBase:"/",d=i&&i.route,c=ue(),f;if(t){var m;let R=typeof t=="string"?le(t):t;u==="/"||(m=R.pathname)!=null&&m.startsWith(u)||U(!1),f=R}else f=c;let h=f.pathname||"/",p=h;if(u!=="/"){let R=u.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(R.length).join("/")}let w=te(e,{pathname:p}),x=Ui(w&&w.map(R=>Object.assign({},R,{params:Object.assign({},s,R.params),pathname:De([u,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?u:De([u,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),o,r,n);return t&&x?C.createElement(Ct.Provider,{value:{location:dt({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Q.Pop}},x):x}function hc(){let e=Gt(),t=Z(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),r?C.createElement("pre",{style:a},r):null,null)}function pc(e){let{routeContext:t,match:r,children:n}=e,a=C.useContext(Be);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),C.createElement(_e.Provider,{value:t},n)}function Ui(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,s=(a=r)==null?void 0:a.errors;if(s!=null){let d=i.findIndex(c=>c.route.id&&s?.[c.route.id]!==void 0);d>=0||U(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<i.length;d++){let c=i[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:f,errors:m}=r,h=c.route.loader&&f[c.route.id]===void 0&&(!m||m[c.route.id]===void 0);if(c.route.lazy||h){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,c,f)=>{let m,h=!1,p=null,w=null;r&&(m=s&&c.route.id?s[c.route.id]:void 0,p=c.route.errorElement||mc,l&&(u<0&&f===0?(Rc("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,w=null):u===f&&(h=!0,w=c.route.hydrateFallbackElement||null)));let x=t.concat(i.slice(0,f+1)),R=()=>{let b;
2return m?b=p:h?b=w:c.route.Component?b=C.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=d,C.createElement(pc,{match:c,routeContext:{outlet:d,matches:x,isDataRoute:r!=null},children:b})};return r&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?C.createElement(pa,{location:r.location,revalidation:r.revalidation,component:p,error:m,children:R(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):R()},null)}function _a(e){let t=C.useContext(Be);return t||U(!1),t}function mt(e){let t=C.useContext(Ze);return t||U(!1),t}function vc(e){let t=C.useContext(_e);return t||U(!1),t}function wr(e){let t=vc(e),r=t.matches[t.matches.length-1];return r.route.id||U(!1),r.route.id}function un(){return wr(Se.UseRouteId)}function _r(){return mt(Se.UseNavigation).navigation}function ba(){let e=_a(ln.UseRevalidator),t=mt(Se.UseRevalidator);return C.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function Pt(){let{matches:e,loaderData:t}=mt(Se.UseMatches);return C.useMemo(()=>e.map(r=>tn(r,t)),[e,t])}function cn(){let e=mt(Se.UseLoaderData),t=wr(Se.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function dn(e){return mt(Se.UseRouteLoaderData).loaderData[e]}function xa(){let e=mt(Se.UseActionData),t=wr(Se.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Gt(){var e;let t=C.useContext(Ai),r=mt(Se.UseRouteError),n=wr(Se.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function fn(){let e=C.useContext(an);return e?._data}function br(){let e=C.useContext(an);return e?._error}function xr(e){let{router:t,basename:r}=_a(ln.UseBlocker),n=mt(Se.UseBlocker),[a,o]=C.useState(""),i=C.useCallback(s=>{if(typeof e!="function")return!!e;if(r==="/")return e(s);let{currentLocation:l,nextLocation:u,historyAction:d}=s;return e({currentLocation:dt({},l,{pathname:ie(l.pathname,r)||l.pathname}),nextLocation:dt({},u,{pathname:ie(u.pathname,r)||u.pathname}),historyAction:d})},[r,e]);return C.useEffect(()=>{let s=String(++yc);return o(s),()=>t.deleteBlocker(s)},[t]),C.useEffect(()=>{a!==""&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):it}function gc(){let{router:e}=_a(ln.UseNavigateStable),t=wr(Se.UseNavigateStable),r=C.useRef(!1);return ki(()=>{r.current=!0}),C.useCallback(function(a,o){o===void 0&&(o={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,dt({fromRouteId:t},o)))},[e,t])}function Rc(e,t,r){!t&&!Li[e]&&(Li[e]=!0)}function Qt(e,t){e?.v7_startTransition===void 0&&Xt("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&Xt("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&Xt("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&Xt("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&Xt("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&Xt("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function Mi(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,i=C.useRef();i.current==null&&(i.current=qr({initialEntries:n,initialIndex:a,v5Compat:!0}));let s=i.current,[l,u]=C.useState({action:s.action,location:s.location}),{v7_startTransition:d}=o||{},c=C.useCallback(f=>{d&&Fi?Fi(()=>u(f)):u(f)},[u,d]);return C.useLayoutEffect(()=>s.listen(c),[s,c]),C.useEffect(()=>Qt(o),[o]),C.createElement(pt,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:o})}function Sa(e){let{to:t,replace:r,state:n,relative:a}=e;ze()||U(!1);let{future:o,static:i}=C.useContext(we),{matches:s}=C.useContext(_e),{pathname:l}=ue(),u=Dt(),d=zt(t,Bt(s,o.v7_relativeSplatPath),l,a==="path"),c=JSON.stringify(d);return C.useEffect(()=>u(JSON.parse(c),{replace:r,state:n,relative:a}),[u,c,a,r,n]),null}function Na(e){return on(e.context)}function hn(e){U(!1)}function pt(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Q.Pop,navigator:o,static:i=!1,future:s}=e;ze()&&U(!1);let l=t.replace(/^\/*/,"/"),u=C.useMemo(()=>({basename:l,navigator:o,static:i,future:dt({v7_relativeSplatPath:!1},s)}),[l,s,o,i]);typeof n=="string"&&(n=le(n));let{pathname:d="/",search:c="",hash:f="",state:m=null,key:h="default"}=n,p=C.useMemo(()=>{let w=ie(d,l);return w==null?null:{location:{pathname:w,search:c,hash:f,state:m,ke
2y:h},navigationType:a}},[l,d,c,f,m,h,a]);return p==null?null:C.createElement(we.Provider,{value:u},C.createElement(Ct.Provider,{children:r,value:p}))}function Ca(e){let{children:t,location:r}=e;return sn(ft(t),r)}function mn(e){let{children:t,errorElement:r,resolve:n}=e;return C.createElement(va,{resolve:n,errorElement:r},C.createElement(_c,null,t))}function _c(e){let{children:t}=e,r=fn(),n=typeof t=="function"?t(r):t;return C.createElement(C.Fragment,null,n)}function ft(e,t){t===void 0&&(t=[]);let r=[];return C.Children.forEach(e,(n,a)=>{if(!C.isValidElement(n))return;let o=[...t,a];if(n.type===C.Fragment){r.push.apply(r,ft(n.props.children,o));return}n.type!==hn&&U(!1),!n.props.index||!n.props.children||U(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=ft(n.props.children,o)),r.push(i)}),r}function Da(e){return Ui(e)}function pn(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Ii(e,t){return ct({basename:t?.basename,future:dt({},t?.future,{v7_prependBasename:!0}),history:qr({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:pn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation}).initialize()}var C,Be,Ze,an,we,Ct,_e,Ai,Ti,mc,pa,ln,Se,yc,Li,Xt,Ec,Fi,Ue,wc,va,Pa=K(()=>{C=xe(je());ge();ge();Be=C.createContext(null),Ze=C.createContext(null),an=C.createContext(null),we=C.createContext(null),Ct=C.createContext(null),_e=C.createContext({outlet:null,matches:[],isDataRoute:!1}),Ai=C.createContext(null);Ti=C.createContext(null);mc=C.createElement(hc,null),pa=class extends C.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?C.createElement(_e.Provider,{value:this.props.routeContext},C.createElement(Ai.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};ln=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ln||{}),Se=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}(Se||{});yc=0;Li={};Xt=(e,t,r)=>(""+t+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+r+"."),void 0);Ec="startTransition",Fi=C[Ec];Ue=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Ue||{}),wc=new Promise(()=>{}),va=class extends C.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,o=Ue.pending;
2if(!(n instanceof Promise))o=Ue.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=Ue.error;let i=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>i})}else n._tracked?(a=n,o="_error"in a?Ue.error:"_data"in a?Ue.success:Ue.pending):(o=Ue.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(i=>Object.defineProperty(n,"_data",{get:()=>i}),i=>Object.defineProperty(n,"_error",{get:()=>i})));if(o===Ue.error&&a._error instanceof ke)throw wc;if(o===Ue.error&&!r)throw a._error;if(o===Ue.error)return C.createElement(an.Provider,{value:a,children:r});if(o===Ue.success)return C.createElement(an.Provider,{value:a,children:t});throw a}}});var td={};qn(td,{AbortedDeferredError:()=>ke,Await:()=>mn,BrowserRouter:()=>Jc,Form:()=>wn,HashRouter:()=>Yc,Link:()=>En,MemoryRouter:()=>Mi,NavLink:()=>Ma,Navigate:()=>Sa,NavigationType:()=>Q,Outlet:()=>Na,Route:()=>hn,Router:()=>pt,RouterProvider:()=>Ua,Routes:()=>Ca,ScrollRestoration:()=>Qc,UNSAFE_DataRouterContext:()=>Be,UNSAFE_DataRouterStateContext:()=>Ze,UNSAFE_ErrorResponseImpl:()=>ae,UNSAFE_FetchersContext:()=>Ta,UNSAFE_LocationContext:()=>Ct,UNSAFE_NavigationContext:()=>we,UNSAFE_RouteContext:()=>_e,UNSAFE_ViewTransitionContext:()=>ka,UNSAFE_useRouteId:()=>un,UNSAFE_useScrollRestoration:()=>xn,createBrowserRouter:()=>Mc,createHashRouter:()=>Ic,createMemoryRouter:()=>Ii,createPath:()=>fe,createRoutesFromChildren:()=>ft,createRoutesFromElements:()=>ft,createSearchParams:()=>Nr,defer:()=>Wt,generatePath:()=>Rr,isRouteErrorResponse:()=>Z,json:()=>Qe,matchPath:()=>Ae,matchRoutes:()=>te,parsePath:()=>le,redirect:()=>Te,redirectDocument:()=>Jt,renderMatches:()=>Da,replace:()=>Yt,resolvePath:()=>Vt,unstable_HistoryRouter:()=>Kc,unstable_usePrompt:()=>Yi,useActionData:()=>xa,useAsyncError:()=>br,useAsyncValue:()=>fn,useBeforeUnload:()=>Ji,useBlocker:()=>xr,useFetcher:()=>$a,useFetchers:()=>Wi,useFormAction:()=>Ha,useHref:()=>ht,useInRouterContext:()=>ze,useLinkClickHandler:()=>ja,useLoaderData:()=>cn,useLocation:()=>ue,useMatch:()=>ga,useMatches:()=>Pt,useNavigate:()=>Dt,useNavigation:()=>_r,useNavigationType:()=>ya,useOutlet:()=>on,useOutletContext:()=>Ra,useParams:()=>Ea,useResolvedPath:()=>qe,useRevalidator:()=>ba,useRouteError:()=>Gt,useRouteLoaderData:()=>dn,useRoutes:()=>sn,useSearchParams:()=>Bi,useSubmit:()=>bn,useViewTransitionState:()=>Va});function Ne(){return Ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ne.apply(null,arguments)}function Aa(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Rn(e){return e!=null&&typeof e.tagName=="string"}function xc(e){return Rn(e)&&e.tagName.toLowerCase()==="button"}function Sc(e){return Rn(e)&&e.tagName.toLowerCase()==="form"}function Nc(e){return Rn(e)&&e.tagName.toLowerCase()==="input"}function Cc(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Dc(e,t){return e.button===0&&(!t||t==="_self")&&!Cc(e)}function Nr(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||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(a=>[r,a]):[[r,n]])},[]))}function Pc(e,t){let r=Nr(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}function Oc(){if(vn===null)try{new FormData(document.createElement("form"),0),vn=!1}catch{vn=!0}return vn}function La(e){return e!=null&&!Lc.has(e)?null:e}function Fc(e,t){let r,n,a,o,i;if(Sc(e)){let s=e.getAttribute("action");n=s?ie(s,t):null,r=e.getAttribute("method")||gn,a=La(e.getAttribute("enctype"))||Oa,o=new FormData(e)}else if(xc(e)||Nc(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(n=l?ie(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||gn,a=La(e.getAttribute("formenctype"))||La(s.getAttribute("enctype"))||Oa,o=new FormData(s,e),!Oc()){let{name:u,type:d,value:c}=e;if(d==="image"){let f=u?u+".":"";o.append(f+"x","0"),o.append(f+"y","0")}else u&&o.append(u,c)}}else{if(Rn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=gn,n=null,a=Oa,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}function Mc(e,t){return ct({basename:t?.basename,future:Ne({}
2,t?.future,{v7_prependBasename:!0}),history:$t({window:t?.window}),hydrationData:t?.hydrationData||Vi(),routes:e,mapRouteProperties:pn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function Ic(e,t){return ct({basename:t?.basename,future:Ne({},t?.future,{v7_prependBasename:!0}),history:en({window:t?.window}),hydrationData:t?.hydrationData||Vi(),routes:e,mapRouteProperties:pn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function Vi(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ne({},t,{errors:jc(t.errors)})),t}function jc(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new ae(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack="",r[n]=o}}else r[n]=a;return r}function Bc(e){vt?vt(e):e()}function Sr(e){ji?ji(e):e()}function Ua(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=S.useState(r.state),[i,s]=S.useState(),[l,u]=S.useState({isTransitioning:!1}),[d,c]=S.useState(),[f,m]=S.useState(),[h,p]=S.useState(),w=S.useRef(new Map),{v7_startTransition:x}=n||{},R=S.useCallback(P=>{x?Bc(P):P()},[x]),b=S.useCallback((P,H)=>{let{deletedFetchers:j,flushSync:B,viewTransitionOpts:X}=H;P.fetchers.forEach((ye,ce)=>{ye.data!==void 0&&w.current.set(ce,ye.data)}),j.forEach(ye=>w.current.delete(ye));let Re=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!X||Re){B?Sr(()=>o(P)):R(()=>o(P));return}if(B){Sr(()=>{f&&(d&&d.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let ye=r.window.document.startViewTransition(()=>{Sr(()=>o(P))});ye.finished.finally(()=>{Sr(()=>{c(void 0),m(void 0),s(void 0),u({isTransitioning:!1})})}),Sr(()=>m(ye));return}f?(d&&d.resolve(),f.skipTransition(),p({state:P,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(s(P),u({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[r.window,f,d,w,R]);S.useLayoutEffect(()=>r.subscribe(b),[r,b]),S.useEffect(()=>{l.isTransitioning&&!l.flushSync&&c(new Fa)},[l]),S.useEffect(()=>{if(d&&i&&r.window){let P=i,H=d.promise,j=r.window.document.startViewTransition(async()=>{R(()=>o(P)),await H});j.finished.finally(()=>{c(void 0),m(void 0),s(void 0),u({isTransitioning:!1})}),m(j)}},[R,i,d,r.window]),S.useEffect(()=>{d&&i&&a.location.key===i.location.key&&d.resolve()},[d,f,a.location,i]),S.useEffect(()=>{!l.isTransitioning&&h&&(s(h.state),u({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),p(void 0))},[l.isTransitioning,h]),S.useEffect(()=>{},[]);let E=S.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:P=>r.navigate(P),push:(P,H,j)=>r.navigate(P,{state:H,preventScrollReset:j?.preventScrollReset}),replace:(P,H,j)=>r.navigate(P,{replace:!0,state:H,preventScrollReset:j?.preventScrollReset})}),[r]),L=r.basename||"/",D=S.useMemo(()=>({router:r,navigator:E,static:!1,basename:L}),[r,E,L]),y=S.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return S.useEffect(()=>Qt(n,r.future),[n,r.future]),S.createElement(S.Fragment,null,S.createElement(Be.Provider,{value:D},S.createElement(Ze.Provider,{value:a},S.createElement(Ta.Provider,{value:w.current},S.createElement(ka.Provider,{value:l},S.createElement(pt,{basename:L,location:a.location,navigationType:a.historyAction,navigator:E,future:y},a.initialized||r.future.v7_partialHydration?S.createElement(zc,{routes:r.routes,future:r.future,state:a}):t))))),null)}function Wc(e){let{routes:t,future:r,state:n}=e;return wa(t,void 0,n,r)}function Jc(e){let{basename:t,children:r,future:n,window:a}=e,o=S.useRef();o.current==null&&(o.current=$t({window:a,v5Compat:!0}));let i=o.current,[s,l]=S.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},d=S.useCallback(c=>{u&&vt?vt(()=>l(c)):l(c)},[l,u]);return S.useLayoutEffect(()=>
2i.listen(d),[i,d]),S.useEffect(()=>Qt(n),[n]),S.createElement(pt,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function Yc(e){let{basename:t,children:r,future:n,window:a}=e,o=S.useRef();o.current==null&&(o.current=en({window:a,v5Compat:!0}));let i=o.current,[s,l]=S.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},d=S.useCallback(c=>{u&&vt?vt(()=>l(c)):l(c)},[l,u]);return S.useLayoutEffect(()=>i.listen(d),[i,d]),S.useEffect(()=>Qt(n),[n]),S.createElement(pt,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function Kc(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=S.useState({action:a.action,location:a.location}),{v7_startTransition:s}=n||{},l=S.useCallback(u=>{s&&vt?vt(()=>i(u)):i(u)},[i,s]);return S.useLayoutEffect(()=>a.listen(l),[a,l]),S.useEffect(()=>Qt(n),[n]),S.createElement(pt,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}function Qc(e){let{getKey:t,storageKey:r}=e;return xn({getKey:t,storageKey:r}),null}function _n(e){let t=S.useContext(Be);return t||U(!1),t}function Ia(e){let t=S.useContext(Ze);return t||U(!1),t}function ja(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,viewTransition:s}=t===void 0?{}:t,l=Dt(),u=ue(),d=qe(e,{relative:i});return S.useCallback(c=>{if(Dc(c,r)){c.preventDefault();let f=n!==void 0?n:fe(u)===fe(d);l(e,{replace:f,state:a,preventScrollReset:o,relative:i,viewTransition:s})}},[u,l,d,n,a,r,e,o,i,s])}function Bi(e){let t=S.useRef(Nr(e)),r=S.useRef(!1),n=ue(),a=S.useMemo(()=>Pc(n.search,r.current?null:t.current),[n.search]),o=Dt(),i=S.useCallback((s,l)=>{let u=Nr(typeof s=="function"?s(a):s);r.current=!0,o("?"+u,l)},[o,a]);return[a,i]}function Zc(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function bn(){let{router:e}
2=_n(Zt.UseSubmit),{basename:t}=S.useContext(we),r=un();return S.useCallback(function(n,a){a===void 0&&(a={}),Zc();let{action:o,method:i,encType:s,formData:l,body:u}=Fc(n,t);if(a.navigate===!1){let d=a.fetcherKey||zi();e.fetch(d,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 Ha(e,t){let{relative:r}=t===void 0?{}:t,{basename:n}=S.useContext(we),a=S.useContext(_e);a||U(!1);let[o]=a.matches.slice(-1),i=Ne({},qe(e||".",{relative:r})),s=ue();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),u=l.getAll("index");if(u.some(c=>c==="")){l.delete("index"),u.filter(f=>f).forEach(f=>l.append("index",f));let c=l.toString();i.search=c?"?"+c:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:De([n,i.pathname])),fe(i)}function $a(e){var t;let{key:r}=e===void 0?{}:e,{router:n}=_n(Zt.UseFetcher),a=Ia(Cr.UseFetcher),o=S.useContext(Ta),i=S.useContext(_e),s=(t=i.matches[i.matches.length-1])==null?void 0:t.route.id;o||U(!1),i||U(!1),s==null&&U(!1);let l=Hi?Hi():"",[u,d]=S.useState(r||l);r&&r!==u?d(r):u||d(zi()),S.useEffect(()=>(n.getFetcher(u),()=>{n.deleteFetcher(u)}),[n,u]);let c=S.useCallback((R,b)=>{s||U(!1),n.fetch(u,s,R,b)},[u,s,n]),f=bn(),m=S.useCallback((R,b)=>{f(R,Ne({},b,{navigate:!1,fetcherKey:u}))},[u,f]),h=S.useMemo(()=>S.forwardRef((b,E)=>S.createElement(wn,Ne({},b,{navigate:!1,fetcherKey:u,ref:E}))),[u]),p=a.fetchers.get(u)||nn,w=o.get(u);return S.useMemo(()=>Ne({Form:h,submit:m,load:c},p,{data:w}),[h,m,c,p,w])}function Wi(){let e=Ia(Cr.UseFetchers);return Array.from(e.fetchers.entries()).map(t=>{let[r,n]=t;return Ne({},n,{key:r})})}function xn(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=_n(Zt.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=Ia(Cr.UseScrollRestoration),{basename:i}=S.useContext(we),s=ue(),l=Pt(),u=_r();S.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ed(S.useCallback(()=>{if(u.state==="idle"){let d=(t?t(s,l):null)||s.key;yn[d]=window.scrollY}try{sessionStorage.setItem(r||$i,JSON.stringify(yn))}catch{}window.history.scrollRestoration="auto"},[r,t,u.state,s,l])),typeof document<"u"&&(S.useLayoutEffect(()=>{try{let d=sessionStorage.getItem(r||$i);d&&(yn=JSON.parse(d))}catch{}},[r]),S.useLayoutEffect(()=>{let d=t&&i!=="/"?(f,m)=>t(Ne({},f,{pathname:ie(f.pathname,i)||f.pathname}),m):t,c=n?.enableScrollRestoration(yn,()=>window.scrollY,d);return()=>c&&c()},[n,i,t]),S.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(s.hash){let d=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(d){d.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[s,a,o]))}function Ji(e,t){let{capture:r}=t||{};S.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}},[e,r])}function ed(e,t){let{capture:r}=t||{};S.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function Yi(e){let{when:t,message:r}=e,n=xr(t);S.useEffect(()=>{n.state==="blocked"&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),S.useEffect(()=>{n.state==="blocked"&&!t&&n.reset()},[n,t])}function Va(e,t){t===void 0&&(t={});let r=S.useContext(ka);r==null&&U(!1);let{basename:n}=_n(Zt.useViewTransitionState),a=qe(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=ie(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ie(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Ae(a.pathname,i)!=null||Ae(a.pathname,o)!=null}var S,bc,gn,Oa,vn,Lc,Ac,kc,Tc,Uc,ka,Ta,Hc,vt,$c,ji,Vc,Hi,Fa,zc,Xc,Gc,En,Ma,wn,Zt,Cr,qc,zi,$i,yn,yt=K(()=>{S=xe(je()),bc=xe(Su());Pa();Pa();ge();ge();gn="get",Oa="application/x-www-form-urlencoded";vn=null;Lc=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);Ac=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],kc=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Tc=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],Uc="6";try{window.__reactRouterVersion=Uc}catch{}ka=S.createContext({isTransitioning:!1}),Ta=S.createContext(new Map),Hc="startTransition",vt=S[Hc],$c="flushSync",ji=bc[$c],Vc="useId",Hi=S[Vc];Fa=class{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}};zc=S.memo(Wc);Xc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gc=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,En=S.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:s,target:l,to:u,preventScrollReset:d,viewTransition:c}=t,f=Aa(t,Ac),{basename:m}=S.useContext(we),h,p=!1;if(typeof u=="string"&&Gc.test(u)&&(h=u,Xc))try{let b=new URL(window.location.href),E=u.startsWith("//")?new URL(b.protocol+u):new URL(u),L=ie(E.pathname,m);E.origin===b.origin&&L!=null?u=L+E.search+E.hash:p=!0}catch{}let w=ht(u,{relative:a}),x=ja(u,{replace:i,state:s,target:l,preventScrollReset:d,relative:a,viewTransition:c});function R(b){n&&n(b),b.defaultPrevented||x(b)}return S.createElement("a",Ne({},f,{href:h||w,onClick:p||o?n:R,ref:r,target:l}))}),Ma=S.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:s,to:l,viewTransition:u,children:d}=t,c=Aa(t,kc),f=qe(l,{relative:c.relative}),m=ue(),h=S.useContext(Ze),{navigator:p,basename:w}=S.useContext(we),x=h!=null&&Va(f)&&u===!0,R=p.encodeLocation?p.encodeLocation(f).pathname:f.pathname,b=m.pathname,E=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;a||(b=b.toLowerCase(),E=E?E.toLowerCase():null,R=R.toLowerCase()),E&&w&&(E=ie(E,w)||E);let L=R!=="/"&&R.endsWith("/")?R.length-1:R.length,D=b===R||!i&&b.startsWith(R)&&b.charAt(L)==="/",y=E!=null&&(E===R||!i&&E.startsWith(R)&&E.charAt(R.length)==="/"),P={isActive:D,isPending:y,isTransitioning:x},H=D?n:void 0,j;typeof o=="function"?j=o(P):j=[o,D?"active":null,y?"pending":null,x?"transitioning":null].filter(
2Boolean).join(" ");let B=typeof s=="function"?s(P):s;return S.createElement(En,Ne({},c,{"aria-current":H,className:j,ref:r,style:B,to:l,viewTransition:u}),typeof d=="function"?d(P):d)}),wn=S.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:s=gn,action:l,onSubmit:u,relative:d,preventScrollReset:c,viewTransition:f}=e,m=Aa(e,Tc),h=bn(),p=Ha(l,{relative:d}),w=s.toLowerCase()==="get"?"get":"post";return S.createElement("form",Ne({ref:t,method:w,action:p,onSubmit:a?u:R=>{if(u&&u(R),R.defaultPrevented)return;R.preventDefault();let b=R.nativeEvent.submitter,E=b?.getAttribute("formmethod")||s;h(b||R.currentTarget,{fetcherKey:r,method:E,navigate:n,replace:o,state:i,relative:d,preventScrollReset:c,viewTransition:f})}},m))});(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Zt||(Zt={}));(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Cr||(Cr={}));qc=0,zi=()=>"__"+String(++qc)+"__";$i="react-router-scroll-positions",yn={}});var rs=Qo(Ya=>{"use strict";Ya.parse=pd;Ya.serialize=vd;var ud=Object.prototype.toString,cd=Object.prototype.hasOwnProperty,dd=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,fd=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,hd=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,md=/^[\u0020-\u003A\u003D-\u007E]*$/;function pd(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var a=t&&t.decode||yd,o=0,i=0,s=0;do{if(i=e.indexOf("=",o),i===-1)break;if(s=e.indexOf(";",o),s===-1)s=n;else if(i>s){o=e.lastIndexOf(";",i-1)+1;continue}var l=es(e,o,i),u=ts(e,i,l),d=e.slice(l,u);if(!cd.call(r,d)){var c=es(e,i+1,s),f=ts(e,s,c);e.charCodeAt(c)===34&&e.charCodeAt(f-1)===34&&(c++,f--);var m=e.slice(c,f);r[d]=Rd(m,a)}o=s+1}while(o<n);return r}function es(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function ts(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function vd(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!dd.test(e))throw new TypeError("argument name is invalid");var a=n(t);if(!fd.test(a))throw new TypeError("argument val is invalid");var o=e+"="+a;if(!r)return o;if(r.maxAge!=null){var i=Math.floor(r.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+i}if(r.domain){if(!hd.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain="+r.domain}if(r.path){if(!md.test(r.path))throw new TypeError("option path is invalid");o+="; Path="+r.path}if(r.expires){var s=r.expires;if(!gd(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invali
2d");o+="; Expires="+s.toUTCString()}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.partitioned&&(o+="; Partitioned"),r.priority){var l=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(l){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var u=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(u){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function yd(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function gd(e){return ud.call(e)==="[object Date]"}function Rd(e,t){try{return t(e)}catch{return e}}});function Dn(e,t){!e&&!ns[t]&&(ns[t]=!0,console.warn(t))}var ns,Ka=K(()=>{ns={}});async function Ed(e,t,r){let n=_d(t);return r.length>0&&(n=await e(n,r[0])),n}async function wd(e,t,r){if(r.length>0){for(let n of r){let a=await e(t,n);if(a!==!1)return as(a)}return null}return as(t)}function _d(e){return btoa(xd(encodeURIComponent(JSON.stringify(e))))}function as(e){try{return JSON.parse(decodeURIComponent(bd(atob(e))))}catch{return{}}}function bd(e){let t=e.toString(),r="",n=0,a,o;for(;n<t.length;)a=t.charAt(n++),/[\w*+\-./@]/.exec(a)?r+=a:(o=a.charCodeAt(0),o<256?r+="%"+os(o,2):r+="%u"+os(o,4).toUpperCase());return r}function os(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}function xd(e){let t=e.toString(),r="",n=0,a,o;for(;n<t.length;){if(a=t.charAt(n++),a==="%"){if(t.charAt(n)==="u"){if(o=t.slice(n+1,n+5),/^[\da-f]{4}$/i.exec(o)){r+=String.fromCharCode(parseInt(o,16)),n+=5;continue}}else if(o=t.slice(n,n+2),/^[\da-f]{2}$/i.exec(o)){r+=String.fromCharCode(parseInt(o,16)),n+=2;continue}}r+=a}return r}function Sd(e,t){Dn(!t,`The "${e}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`)}var Pn,is,qt,On=K(()=>{Pn=xe(rs());Ka();is=({sign:e,unsign:t})=>(r,n={})=>{let{secrets:a=[],...o}={path:"/",sameSite:"lax",...n};return Sd(r,o.expires),{get name(){return r},get isSigned(){return a.length>0},get expires(){return typeof o.maxAge<"u"?new Date(Date.now()+o.maxAge*1e3):o.expires},async parse(i,s){if(!i)return null;let l=(0,Pn.parse)(i,{...o,...s});return r in l?l[r]===""?"":await wd(t,l[r],a):null},async serialize(i,s){return(0,Pn.serialize)(r,i===""?"":await Ed(e,i,a),{...o,...s})}}},qt=e=>e!=null&&typeof e.name=="string"&&typeof e.isSigned=="boolean"&&typeof e.parse=="function"&&typeof e.serialize=="function"});function er(e){let t=unescape(encodeURIComponent(e));return Uint8Array.from(t,(r,n)=>t.charCodeAt(n))}function Xa(e){let t=String.fromCharCode.apply(null,e);return decodeURIComponent(escape(t))}function tr(...e){let t=new Uint8Array(e.reduce((n,a)=>n+a.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function ss(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var Ga=K(()=>{});function ls(e){return e instanceof Uint8Array?t=>e[t]:e}function Qa(e,t,r,n,a){let o=ls(e),i=ls(r);for(let s=0;s<a;++s)if(o(t+s)!==i(n+s))return!1;return!0}function Nd(e){let t=new Array(256).fill(e.length);if(e.length>1)for(let r=0;r<e.length-1;r++)t[e[r]]=e.length-1-r;return t}var We,Ot,Ln,us,cs,ds=K(()=>{Ga();We=Symbol("Match"),Ot=class{constructor(t){this._lookbehind=new Uint8Array,typeof t=="string"?this._needle=t=er(t):this._needle=t,this._lastChar=t[t.length-1],this._occ=Nd(t)}feed(t){let r=0,n,a=[];for(;r!==t.length;)[r,...n]=this._feed(t,r),a.push(...n);return a}end(){let t=this._lookbehind;return this._lookbehind=new Uint8Array,t}_feed(t,r){let n=[],a=-this._lookbehind.length;if(a<0){for(;a<0&&a<=t.length-this._needle.length;){let o=this._charAt(t,a+this._needle.length-1);if(o===this._lastChar&&this._memcmp(t,a,this._needle.length-1))return a>-this._lookbehind.length&&n.push(this._lookbehind.slice(0,this._lookbehind.length+a)),n.push(We),this._lookbehind=new Uint8Array,[a+this._needle.length,...n];a+=this._occ[o]}if(a<0)for(;a<0&&!this._memcmp(t,a,t.length-a);)a++;if(a>=0)n.push(this._lookbehind),this._lookbehind=new Uint8Array;else{let o=this._lookbehind.length+a;return o>0&&(n.push(this._lookbehind.slice(0,o)),this._lookbehind=this._lookbehind.slice(o)),this._lookbehind=Uint8Array.from(new Array(this._lookbehind.length+t.length),(i,s)=>this._charAt(t,s-this._lookbehind.length)),[t.length,...n]}}for(a+=r;a<=t.length-this._needle.length;){let o=t[a+this._needle.length-1];if(o===this._lastChar&&t[a]===this._needle[0]&&Qa(this._needle,0,t,a,this._needle.length-1))return a>r&&n.push(t.slice(r,a)),n.push(We),[a+this._needle.length,...n];a+=this._occ[o]}if(a<t.length){for(;a<t.length&&(t[a]!==this._needle[0]||!Qa(t,a,this._needle,0,t.length-a));)++a;a<t.length&&(this._lookbehind=t.slice(a))}return a>0&&n.push(t.slice(r,a<t.length?a:t.length)),[t.length,...n]}_charAt(t,r){return r<0?this._lookbehind[this._lookbehind.length+r]:t[r]}_memcmp(t,r,n){return Qa(this._charAt.bind(this,t),r,this._needle,0,n)}},Ln=class{constructor(t,r){this._readableStream=r,this._search=new Ot(t)}async*[Symbol.asyncIterator](){let t=this._readableStream.getReader();try{for(;;){let n=await t.read();if(n.done)break;yield*this._search.feed(n.value)}let r=this._search.end();r.length&&(yield r)}finally{t.releaseLock()}}},us=Symbol("End of Queue"),cs=class{constructor(t){this._chunksQueue=[],this._closed=!1,this._search=new Ot(t)}push(...t){if(this._closed)throw new Error("cannot call push after close");this._chunksQueue.push(...t),this._notify&&this._notify()}close(){if(this._closed)throw new Error("close was already called");this._closed=!0,this._chunksQueue.push(us),this._notify&&this._notify()}async*[Symbol.asyncIterator](){for(;;){let r;for(;!(r=this._chunksQueue.shift());)await new Promise(n=>this._notify=n),this._notify=void 0;if(r===us)break;yield*this._search.feed(r)}let t=this._search.end();t.length&&(yield t)}}});function Dd(e){let t=e.split(";").map(n=>n.trim());if(t.shift()!=="form-data")throw new Error('malformed content-disposition header: missing "form-data" in `'+JSON.stringify(t)+"`");let r={};for(let n of t){let a=n.split("=",2);if(a.length!==2)throw new Error("malformed content-disposition header: key-value pair not found - "+n+" in `"+e+"`");let[o,i]=a;if(i[0]==='"'&&i[i.length-1]==='"')r[o]=i.slice(1,-1).replace(/\\"/g,'"');else if(i[0]!=='"'&&i[i.length-1]!=='"')r[o]=i;else if(i[0]==='"'&&i[i.length-1]!=='"'||i[0]!=='"'&&i[i.length-1]==='"')throw new Error("malformed content-disposition header: mismatched quotations in `"+e+"`")}if(!r.name)throw new Error("malformed content-disposition header: missing field name in `"+e+"`");return r}function Pd(e){let t=[],r=!1,n;for(;typeof(n=e.shift())<"u";){let a=n.indexOf(":");if(a===-1)throw new Error("malformed multipart-form header: missing colon");let o=n.slice(0,a).trim().toLowerCase(),i=n.slice(a+1).trim();switch(o){case"content-disposition":r=!0,t.push(...Object.entries(Dd(i)));break;case"content-type":t.push(["contentType",i])}}if(!r)throw new Error("malformed multipart-form header: missing content-disposition");return Object.fromEntries(t)}async function Od(e,t){let r=!0,n=!1,a=[[]],o=new Ot(Dr);for(;;){let i=await e.next();if(i.done)throw new Error("malformed multipart-form data: unexpected end of stream");if(r&&i.value!==We&&ss(i.value.slice(0,2),fs))return[void 0,new Uint8Array];let s;if(i.value!==We)s=i.value;else if(!n)s=t;else throw new Error("malformed multipart-form data: unexpected boundary");if(!s.length)continue;r&&(r=!1);let l=o.feed(s);for(let[u,d]of l.entries()){let c=d===We;if(!(!c&&!d.length)){if(n&&c)return l.push(o.end()),[a.filter(f=>f.length).map(Cd).map(Xa),tr(...l.slice(u+1).map(f=>f===We?Dr:f))];(n=c)?a.push([]):a[a.length-1].push(d)}}}}async function*hs(e,t){let r=tr(fs,er(t)),n=new Ln(r,e)[Symbol.asyncIterator]();for(;;){let o=await n.next();if(o.done)return;if(o.value===We)break}let a=new Ot(Dr);for(;;){let u=function(m){let h=[];for(let p of a.feed(m))l&&h.push(Dr),(l=p===We)||h.push(p);return tr(...h)},[o,i]=await Od(n,r);if(!o)return;async function s(){let m=await n.next();if(m.done)throw new Error("malformed multipart-form data: unexpected end of stream");return m}let l=!1,d=!1;async function c(){let m=await s(),h;if(m.value!==We)h=m.value;else if(!l)h=Dr;else return d=!0,{value:a.end()};return{value:u(h)}}let f=[{value:u(i)}];for(yield{...Pd(o),data:{[Symbol.asyncIterator](){return this},async next(){for(;;){let m=f.shift();if(!m)break;if(m.value.length>0)return m}for(;;){if(d)return{done:d,value:void 0};let m=await c();if(m.value.length>0)return m}}}};!d;)f.push(await c())}}var Cd,fs,Dr,ms=K(()=>{ds();Ga();Cd=Function.prototype.apply.bind(tr,void 0),fs=er("--"),Dr=er(`\r
3`)});function ps(...e){return async t=>{for(let r of e){let n=await r(t);if(typeof n<"u"&&n!==null)return n}}}async function vs(e,t){let r=e.headers.get("Content-Type")||"",[n,a]=r.split(/\s*;\s*boundary=/);if(!e.body||!a||n!=="multipart/form-data")throw new TypeError("Could not parse content as FormData.");let o=new FormData,i=hs(e.body,a);for await(let s of i){if(s.done)break;typeof s.filename=="string"&&(s.filename=s.filename.split(/[/\\]/).pop());let l=await t(s);typeof l<"u"&&l!==null&&o.append(s.name,l)}return o}var ys=K(()=>{ms();});function gs(e){return e===Pe.Development||e===Pe.Production||e===Pe.Test}var Pe,Fn=K(()=>{Pe=function(e){return e.Development="development",e.Production="production",e.Test="test",e}({})});function Pr(e,t){if(e instanceof Error&&t!==Pe.Development){let r=new Error("Unexpected Server Error");return r.stack=void 0,r}return e}function rr(e,t){return Object.entries(e).reduce((r,[n,a])=>Object.assign(r,{[n]:Pr(a,t)}),{})}function nr(e,t){let r=Pr(e,t);return{message:r.message,stack:r.stack}}function Za(e,t){if(!e)return null;let r=Object.entries(e),n={};for(let[a,o]of r)if(Z(o))n[a]={...o,__type:"RouteErrorResponse"};else if(o instanceof Error){let i=Pr(o,t);n[a]={message:i.message,stack:i.stack,__type:"Error",...i.name!=="Error"?{__subType:i.name}:{}}}else n[a]=o;return n}var An=K(()=>{ge();Fn();});function bs(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 Oe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ar(e){return Ld.has(e)}function Tn(e){return ar(e.status)}function Fd(e){return e!=null&&typeof e.then=="function"&&e._tracked===!0}function xs(e,t,r){let n=new TextEncoder;return new ReadableStream({async start(o){let i={},s=[];for(let[u,d]of Object.entries(e.data))Fd(d)?(i[u]=`${Ad}${u}`,(typeof d._data<"u"||typeof d._error<"u")&&s.push(u)):i[u]=d;o.enqueue(n.encode(JSON.stringify(i)+`
4
5`));for(let u of s)Rs(o,n,u,e.data[u],r);let l=e.subscribe((u,d)=>{d&&Rs(o,n,d,e.data[d],r)});
5await e.resolveData(t),l(),o.close()}})}function Rs(e,t,r,n,a){"_error"in n?e.enqueue(t.encode("error:"+JSON.stringify({[r]:n._error instanceof Error?nr(n._error,a):n._error})+`
6
7`)):e.enqueue(t.encode("data:"+JSON.stringify({[r]:n._data??null})+`
8
9`))}var gt,Es,kn,ws,_s,Ld,Ad,Or=K(()=>{ge();An();gt=(e,t={})=>Qe(e,t),Es=(e,t={})=>Wt(e,t),kn=(e,t=302)=>Te(e,t),ws=(e,t=302)=>Yt(e,t),_s=(e,t=302)=>Jt(e,t);Ld=new Set([301,302,303,307,308]);Ad="__deferred_promise:"});function kd(){let e=new TextDecoder,t="";return new TransformStream({transform(r,n){let a=e.decode(r,{stream:!0}),o=(t+a).split(`
10`);t=o.pop()||"";for(let i of o)n.enqueue(i)},flush(r){t&&r.enqueue(t)}})}function Me(e){let{indices:t}=this,r=t.get(e);if(r)return[r];if(e===void 0)return Ls;if(e===null)return ao;if(Number.isNaN(e))return Cs;if(e===Number.POSITIVE_INFINITY)return Os;if(e===Number.NEGATIVE_INFINITY)return Ds;if(e===0&&1/e<0)return Ps;let n=this.index++;return t.set(e,n),Td.call(this,e,n),n}function Td(e,t){let{deferred:r,plugins:n,postPlugins:a}=this,o=this.stringified,i=[[e,t]];for(;i.length>0;){let[s,l]=i.pop(),u=c=>Object.keys(c).map(f=>`"_${Me.call(this,f)}":${Me.call(this,c[f])}`).join(","),d=null;switch(typeof s){case"boolean":case"number":case"string":o[l]=JSON.stringify(s);break;case"bigint":o[l]=`["${Fs}","${s}"]`;break;case"symbol":{let c=Symbol.keyFor(s);c?o[l]=`["${Us}",${JSON.stringify(c)}]`:d=new Error("Cannot encode symbol unless created with Symbol.for()");break}case"object":{if(!s){o[l]=`${ao}`;break}let c=Array.isArray(s),f=!1;if(!c&&n)for(let m of n){let h=m(s);if(Array.isArray(h)){f=!0;let[p,...w]=h;o[l]=`[${JSON.stringify(p)}`,w.length>0&&(o[l]+=`,${w.map(x=>Me.call(this,x)).join(",")}`),o[l]+="]";break}}if(!f){let m=c?"[":"{";if(c){for(let h=0;h<s.length;h++)m+=(h?",":"")+(h in s?Me.call(this,s[h]):Ns);o[l]=`${m}]`}else s instanceof Date?o[l]=`["${As}",${s.getTime()}]`:s instanceof URL?o[l]=`["${Ms}",${JSON.stringify(s.href)}]`:s instanceof RegExp?o[l]=`["${Ts}",${JSON.stringify(s.source)},${JSON.stringify(s.flags)}]`:s instanceof Set?s.size>0?o[l]=`["${to}",${[...s].map(h=>Me.call(this,h)).join(",")}]`:o[l]=`["${to}"]`:s instanceof Map?s.size>0?o[l]=`["${eo}",${[...s].flatMap(([h,p])=>[Me.call(this,h),Me.call(this,p)]).join(",")}]`:o[l]=`["${eo}"]`:s instanceof Promise?(o[l]=`["${ir}",${l}]`,r[l]=s):s instanceof Error?(o[l]=`["${or}",${JSON.stringify(s.message)}`,s.name!=="Error"&&(o[l]+=`,${JSON.stringify(s.name)}`),o[l]+="]"):Object.getPrototypeOf(s)===null?o[l]=`["${ks}",{${u(s)}}]`:Md(s)?o[l]=`{${u(s)}}`:d=new Error("Cannot encode object with prototype")}break}default:{let c=Array.isArray(s),f=!1;if(!c&&n)for(let m of n){let h=m(s);if(Array.isArray(h)){f=!0;let[p,...w]=h;o[l]=`[${JSON.stringify(p)}`,w.length>0&&(o[l]+=`,${w.map(x=>Me.call(this,x)).join(",")}`),o[l]+="]";break}}f||(d=new Error("Cannot encode function or unexpected type"))}}if(d){let c=!1;if(a)for(let f of a){let m=f(s);if(Array.isArray(m)){c=!0;let[h,...p]=m;o[l]=`[${JSON.stringify(h)}`,p.length>0&&(o[l]+=`,${p.map(w=>Me.call(this,w)).join(",")}`),o[l]+="]";break}}if(!c)throw d}}}function Md(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Ud}function no(e){let{hydrated:t,values:r}=this;if(typeof e=="number")return Ss.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;let n=r.length;for(let a of e)r.push(a);return t.length=r.length,Ss.call(this,n)}function Ss(e){let{hydrated:t,values:r,deferred:n,plugins:a}=this,o,i=[[e,l=>{o=l}]],s=[];for(;i.length>0;){let[l,u]=i.pop();switch(l){case Ls:u(void 0);continue;case ao:u(null);continue;case Cs:u(NaN);continue;case Os:u(1/0);continue;case Ds:u(-1/0);continue;case Ps:u(-0);continue}if(t[l]){u(t[l]);continue}let d=r[l];if(!d||typeof d!="object"){t[l]=d,u(d);continue}if(Array.isArray(d))if(typeof d[0]=="string"){let[c,f,m]=d;switch(c){case As:u(t[l]=new Date(f));continue;case Ms:u(t[l]=new URL(f));continue;case Fs:u(t[l]=BigInt(f));continue;case Ts:u(t[l]=new RegExp(f,m));continue;case Us:u(t[l]=Symbol.for(f));continue;case to:let h=new Set;t[l]=h;for(let E=1;E<d.length;E++)i.push([d[E],L=>{h.add(L)}]);u(h);continue;case eo:let p=new Map;t[l]=p;for(let E=1;E<d.length;E+=2){let L=[];i.push([d[E+1],D=>{L[1]=D}]),i.push([d[E],D=>
10{L[0]=D}]),s.push(()=>{p.set(L[0],L[1])})}u(p);continue;case ks:let w=Object.create(null);t[l]=w;for(let E of Object.keys(f).reverse()){let L=[];i.push([f[E],D=>{L[1]=D}]),i.push([Number(E.slice(1)),D=>{L[0]=D}]),s.push(()=>{w[L[0]]=L[1]})}u(w);continue;case ir:if(t[f])u(t[l]=t[f]);else{let E=new Is;n[f]=E,u(t[l]=E.promise)}continue;case or:let[,x,R]=d,b=R&&qa&&qa[R]?new qa[R](x):new Error(x);t[l]=b,u(b);continue;case ro:u(t[l]=t[f]);continue;default:if(Array.isArray(a)){let E=[],L=d.slice(1);for(let D=0;D<L.length;D++){let y=L[D];i.push([y,P=>{E[D]=P}])}s.push(()=>{for(let D of a){let y=D(d[0],...E);if(y){u(t[l]=y.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{let c=[];t[l]=c;for(let f=0;f<d.length;f++){let m=d[f];m!==Ns&&i.push([m,h=>{c[f]=h}])}u(c);continue}else{let c={};t[l]=c;for(let f of Object.keys(d).reverse()){let m=[];i.push([d[f],h=>{m[1]=h}]),i.push([Number(f.slice(1)),h=>{m[0]=h}]),s.push(()=>{c[m[0]]=m[1]})}u(c);continue}}for(;s.length>0;)s.pop()();return o}async function js(e,t){let{plugins:r}=t??{},n=new Is,a=e.pipeThrough(kd()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await Id.call(o,a),s=n.promise;return i.done?n.resolve():s=jd.call(o,a).then(n.resolve).catch(l=>{for(let u of Object.values(o.deferred))u.reject(l);n.reject(l)}),{done:s.then(()=>a.closed),value:i.value}}async function Id(e){let t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:no.call(this,r)}}async function jd(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let r=t.value;switch(r[0]){case ir:{let n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);let i=r.slice(n+1),s;try{s=JSON.parse(i)}catch{throw new SyntaxError}let l=no.call(this,s);o.resolve(l);break}case or:{let n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);let i=r.slice(n+1),s;try{s=JSON.parse(i)}catch{throw new SyntaxError}let l=no.call(this,s);o.reject(l);break}default:throw new SyntaxError}t=await e.read()}}function Hs(e,t){let{plugins:r,postPlugins:n,signal:a}=t??{},o={deferred:{},index:0,indices:new Map,stringified:[],plugins:r,postPlugins:n,signal:a},i=new TextEncoder,s=0;return new ReadableStream({async start(u){let d=Me.call(o,e);if(Array.isArray(d))throw new Error("This should never happen");d<0?u.enqueue(i.encode(`${d}
11`)):(u.enqueue(i.encode(`[${o.stringified.join(",")}]
12`)),s=o.stringified.length-1);let c=new WeakSet;if(Object.keys(o.deferred).length){let f,m=new Promise((h,p)=>{if(f=h,a){let w=()=>p(a.reason||new Error("Signal was aborted."));a.aborted?w():a.addEventListener("abort",x=>{w()})}});for(;Object.keys(o.deferred).length>0;){for(let[h,p]of Object.entries(o.deferred))c.has(p)||c.add(o.deferred[Number(h)]=Promise.race([m,p]).then(w=>{let x=Me.call(o,w);if(Array.isArray(x))u.enqueue(i.encode(`${ir}${h}:[["${ro}",${x[0]}]]
13`)),o.index++,s++;else if(x<0)u.enqueue(i.encode(`${ir}${h}:${x}
14`));else{let R=o.stringified.slice(s+1).join(",");u.enqueue(i.encode(`${ir}${h}:[${R}]
15`)),s=o.stringified.length-1}},w=>{(!w||typeof w!="object"||!(w instanceof Error))&&(w=new Error("An unknown error occurred"));let x=Me.call(o,w);if(Array.isArray(x))u.enqueue(i.encode(`${or}${h}:[["${ro}",${x[0]}]]
16`)),o.index++,s++;else if(x<0)u.enqueue(i.encode(`${or}${h}:${x}
17`));else{let R=o.stringified.slice(s+1).join(",");u.enqueue(i.encode(`${or}${h}:[${R}]
18`)),s=o.stringified.length-1}}).finally(()=>{delete o.deferred[Number(h)]}));await Promise.race(Object.values(o.deferred))}f()}await Promise.all(Object.values(o.deferred)),u.close()}})}var Ns,Cs,Ds,Ps,ao,Os,Ls,Fs,As,or,eo,ks,ir,Ts,to,Us,Ms,ro,Is,Ud,qa,oo=K(()=>{Ns=-1,Cs=-2,Ds=-3,Ps=-4,ao=-5,Os=-6,Ls=-7,Fs="B",As="D",or="E",eo="M",ks="N",ir="P",Ts="R",to="S",Us="Y",Ms="U",ro="Z",Is=class{promise;resolve;reject;
18constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};Ud=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");qa=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0});var Vs=Qo((hh,Lr)=>{"use strict";var sr={decodeValues:!0,map:!1,silent:!1};function io(e){return typeof e=="string"&&!!e.trim()}function so(e,t){var r=e.split(";").filter(io),n=r.shift(),a=Hd(n),o=a.name,i=a.value;t=t?Object.assign({},sr,t):sr;try{i=t.decodeValues?decodeURIComponent(i):i}catch(l){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",l)}var s={name:o,value:i};return r.forEach(function(l){var u=l.split("="),d=u.shift().trimLeft().toLowerCase(),c=u.join("=");d==="expires"?s.expires=new Date(c):d==="max-age"?s.maxAge=parseInt(c,10):d==="secure"?s.secure=!0:d==="httponly"?s.httpOnly=!0:d==="samesite"?s.sameSite=c:s[d]=c}),s}function Hd(e){var t="",r="",n=e.split("=");return n.length>1?(t=n.shift(),r=n.join("=")):r=e,{name:t,value:r}}function $s(e,t){if(t=t?Object.assign({},sr,t):sr,!e)return t.map?{}:[];if(e.headers)if(typeof e.headers.getSetCookie=="function")e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var r=e.headers[Object.keys(e.headers).find(function(a){return a.toLowerCase()==="set-cookie"})];!r&&e.headers.cookie&&!t.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),t=t?Object.assign({},sr,t):sr,t.map){var n={};return e.filter(io).reduce(function(a,o){var i=so(o,t);return a[i.name]=i,a},n)}else return e.filter(io).map(function(a){return so(a,t)})}function $d(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var t=[],r=0,n,a,o,i,s;function l(){for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length}function u(){return a=e.charAt(r),a!=="="&&a!==";"&&a!==","}for(;r<e.length;){for(n=r,s=!1;l();)if(a=e.charAt(r),a===","){for(o=r,r+=1,l(),i=r;r<e.length&&u();)r+=1;r<e.length&&e.charAt(r)==="="?(s=!0,r=i,t.push(e.substring(n,o)),n=r):r=o+1}else r+=1;(!s||r>=e.length)&&t.push(e.substring(n,e.length))}return t}Lr.exports=$s;Lr.exports.parse=$s;Lr.exports.parseString=so;Lr.exports.splitCookiesString=$d});function Fr(e,t){let r=t.errors?t.matches.findIndex(o=>t.errors[o.route.id]):-1,n=r>=0?t.matches.slice(0,r+1):t.matches,a;if(r>=0){let{actionHeaders:o,actionData:i,loaderHeaders:s,loaderData:l}=t;t.matches.slice(r).some(u=>{let d=u.route.id;return o[d]&&(!i||i[d]===void 0)?a=o[d]:s[d]&&l[d]===void 0&&(a=s[d]),a!=null})}return n.reduce((o,i,s)=>{let{id:l}=i.route,u=e.routes[l].module,d=t.loaderHeaders[l]||new Headers,c=t.actionHeaders[l]||new Headers,f=a!=null&&s===n.length-1,m=f&&a!==d&&a!==c;if(u.headers==null){let p=new Headers(o);return m&&Lt(a,p),Lt(c,p),Lt(d,p),p}let h=new Headers(u.headers?typeof u.headers=="function"?u.headers({loaderHeaders:d,parentHeaders:o,actionHeaders:c,errorHeaders:f?a:void 0}):u.headers:void 0);return m&&Lt(a,h),Lt(c,h),Lt(d,h),Lt(o,h),h},new Headers)}function Lt(e,t){let r=e.get("Set-Cookie");if(r){var n;let a=(0,Bs.splitCookiesString)(r),o=new Set((n=t.getSetCookie)===null||n===void 0?void 0:n.call(t));a.forEach(i=>{o.has(i)||t.append("Set-Cookie",i)})}}var Bs,lo=K(()=>{Bs=xe(Vs());});function Un(e){let t=e.get("origin"),r=typeof t=="string"&&t!=="null"?new URL(t).host:t,n=Vd(e);if(r&&(!n||r!==n.value))throw n?new Error(`${n.type} header does not match \`origin\` header from a forwarded action request. Aborting the action.`):new Error("`x-forwarded-host` or `host` headers are not provided. One of these is needed to compare the `origin` header from a forwarded action request. Aborting the action.")}function Vd(e){var t;let r=e.get("x-forwarded-host"),n=r==null||(t=r.split(",")[0])===null||t===void 0?void 0:t.trim(),a=e.get("host");return n?{type:"x-forwarded-host",value:n}:a?{type:"host",value:a}:void 0}var uo=K(()=>{});function zs({isActionDataRequest:e,loadRouteIds:t}={}){return async({request:r,matches:n})=>{if(e&&r.method==="GET")return{};let a=t?n.filter(i=>t.includes(i.route.id)):n;return(await Promise.all(a.map(i=>i.resolve()))).reduce((i,s,l)=>Object.assign(i,{[a[l].route.id]:s}),{})}}async function Ws(e,t,r,n,a,o,i){try{Un(n.headers);
18let s=new Request(a,{method:n.method,body:n.body,headers:n.headers,signal:n.signal,...n.body?{duplex:"half"}:void 0}),l=await r.query(s,{requestContext:o,skipLoaderErrorBubbling:!0,dataStrategy:zs({isActionDataRequest:!0})});if(Oe(l))return{result:ur(l.status,l.headers,e.basename),headers:l.headers,status:lr};let u=l,d=Fr(e,u);if(ar(u.statusCode)&&d.has("Location"))return{result:ur(u.statusCode,d,e.basename),headers:d,status:lr};u.errors&&(Object.values(u.errors).forEach(f=>{(!Z(f)||f.error)&&i(f)}),u.errors=rr(u.errors,t));let c;return u.errors?c={error:Object.values(u.errors)[0]}:c={data:Object.values(u.actionData||{})[0]},{result:c,headers:d,status:u.statusCode}}catch(s){return i(s),{result:{error:s},headers:new Headers,status:500}}}async function Js(e,t,r,n,a,o,i){try{var s;let l=new Request(a,{headers:n.headers,signal:n.signal}),u=((s=new URL(n.url).searchParams.get("_routes"))===null||s===void 0?void 0:s.split(","))||void 0,d=await r.query(l,{requestContext:o,skipLoaderErrorBubbling:!0,dataStrategy:zs({loadRouteIds:u})});if(Oe(d))return{result:{[$e]:ur(d.status,d.headers,e.basename)},headers:d.headers,status:lr};let c=d,f=Fr(e,c);if(ar(c.statusCode)&&f.has("Location"))return{result:{[$e]:ur(c.statusCode,f,e.basename)},headers:f,status:lr};c.errors&&(Object.values(c.errors).forEach(p=>{(!Z(p)||p.error)&&i(p)}),c.errors=rr(c.errors,t));let m={};return(u?c.matches.filter(p=>p.route.loader&&u.includes(p.route.id)):c.matches).forEach(p=>{var w,x;let R=(w=c.loaderData)===null||w===void 0?void 0:w[p.route.id],b=(x=c.errors)===null||x===void 0?void 0:x[p.route.id];b!==void 0?m[p.route.id]={error:b}:R!==void 0&&(m[p.route.id]={data:R})}),{result:m,headers:f,status:c.statusCode}}catch(l){return i(l),{result:{root:{error:l}},headers:new Headers,status:500}}}function ur(e,t,r){let n=t.get("Location");return r&&(n=ie(n,r)||n),{redirect:n,status:e,revalidate:t.has("X-Remix-Revalidate")||t.has("Set-Cookie"),reload:t.has("X-Remix-Reload-Document"),replace:t.has("X-Remix-Replace")}}function Ar(e,t,r,n){let a=new AbortController,o=setTimeout(()=>a.abort(new Error("Server Timeout")),typeof r=="number"?r:4950);return t.addEventListener("abort",()=>clearTimeout(o)),Hs(e,{signal:a.signal,plugins:[i=>{if(i instanceof Error){let{name:s,message:l,stack:u}=n===Pe.Production?Pr(i,n):i;return["SanitizedError",s,l,u]}if(i instanceof ae){let{data:s,status:l,statusText:u}=i;return["ErrorResponse",s,l,u]}if(i&&typeof i=="object"&&$e in i)return["SingleFetchRedirect",i[$e]]}],postPlugins:[i=>{if(i&&typeof i=="object")return["SingleFetchClassInstance",Object.fromEntries(Object.entries(i))]},()=>["SingleFetchFallback"]]})}function Ys(e,t){return Er(e,t)}var $e,lr,co=K(()=>{ge();oo();An();lo();Fn();Or();uo();$e=Symbol("SingleFetchRedirect"),lr=202});function Ks(e){return Object.keys(e).reduce((t,r)=>(t[r]=e[r].module,t),{})}var Xs=K(()=>{});function fo(e,t){if(e===!1||e===null||typeof e>"u")throw console.error("The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new"),new Error(t)}var Gs=K(()=>{});function Mn(e,t,r){let n=te(e,t,r);return n?n.map(a=>({params:a.params,pathname:a.pathname,route:a.route})):null}var Qs=K(()=>{ge();});async function Zs({loadContext:e,action:t,params:r,request:n,routeId:a,singleFetch:o}){let i=await t({request:o?tl(In(n)):el(In(n)),context:e,params:r});if(i===void 0)throw new Error(`You defined an action for route "${a}" but didn't return anything from your \`action\` function. Please return a value or \`null\`.`);return o||Oe(i)?i:gt(i)}async function qs({loadContext:e,loader:t,params:r,request:n,routeId:a,singleFetch:o}){let i=await t({request:o?tl(In(n)):el(In(n)),context:e,params:r});if(i===void 0)throw new Error(`You defined a loader for route "${a}" but didn't return anything from your \`loader\` function. Please return a value or \`null\`.`);return bs(i)?i.init&&ar(i.init.status||200)?kn(new Headers(i.init.headers).get("Location"),i.init):i:o||Oe(i)?i:gt(i)}function In(e){let t=new URL(e.url),r=t.searchParams.getAll("index");t.searchParams.delete("index");let n=[];for(let o of r)o&&n.push(o);for(let o of n)t.searchParams.append("index",o);let a={method:e.method,body:e.body,headers:e.headers,signal:e.signal};
18return a.body&&(a.duplex="half"),new Request(t.href,a)}function el(e){let t=new URL(e.url);t.searchParams.delete("_data");let r={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return r.body&&(r.duplex="half"),new Request(t.href,r)}function tl(e){let t=new URL(e.url);t.searchParams.delete("_routes");let r={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return r.body&&(r.duplex="half"),new Request(t.href,r)}var rl=K(()=>{Or();});function nl(e){let t={};return Object.values(e).forEach(r=>{let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}),t}function ho(e,t="",r=nl(e)){return(r[t]||[]).map(n=>({...n,children:ho(e,n.id,r)}))}function mo(e,t,r="",n=nl(e)){return(n[r]||[]).map(a=>{let o={hasErrorBoundary:a.id==="root"||a.module.ErrorBoundary!=null,id:a.id,path:a.path,loader:a.module.loader?(i,s)=>qs({request:i.request,params:i.params,loadContext:i.context,loader:a.module.loader,routeId:a.id,singleFetch:t.v3_singleFetch===!0}):void 0,action:a.module.action?(i,s)=>Zs({request:i.request,params:i.params,loadContext:i.context,action:a.module.action,routeId:a.id,singleFetch:t.v3_singleFetch===!0}):void 0,handle:a.module.handle};return a.index?{index:!0,...o}:{caseSensitive:a.caseSensitive,children:mo(e,t,a.id,n),...o}})}var al=K(()=>{rl();});function ol(e){return e.replace(zd,t=>Bd[t])}var Bd,zd,il=K(()=>{Bd={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},zd=/[&><\u2028\u2029]/g});function po(e){return ol(JSON.stringify(e))}var sl=K(()=>{il();});async function ll(e,t){if(t??="",!t)throw Error("Dev server origin not set");let r=new URL(t);r.pathname="ping";let n=await fetch(r.href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({buildHash:e.assets.version})}).catch(a=>{throw console.error(`Could not reach Remix dev server at ${r}`),a});if(!n.ok)throw console.error(`Could not reach Remix dev server at ${r} (${n.status})`),Error(await n.text())}function ul(e){console.log(`[REMIX DEV] ${e.assets.version} ready`)}function dl(e){globalThis[cl]=e}function vo(){return globalThis[cl]}var cl,yo=K(()=>{cl="__remix_devServerHooks"});function fl(e,t){return`\u26A0\uFE0F REMIX FUTURE CHANGE: Externally-accessed resource routes will no longer be able to return raw JavaScript objects or \`null\` in React Router v7 when Single Fetch becomes the default. You can prepare for this change at your convenience by wrapping the data returned from your \`${e}\` function in the \`${t}\` route with \`json()\`.  For instructions on making this change, see https://remix.run/docs/en/v2.13.1/guides/single-fetch#resource-routes`}var hl=K(()=>{});function ml(e,t){var r,n;let a=ho(e.routes),o=mo(e.routes,e.future),i=gs(t)?t:Pe.Production,s=da(o,{basename:e.basename,future:{v7_relativeSplatPath:((r=e.future)===null||r===void 0?void 0:r.v3_relativeSplatPath)===!0,v7_throwAbortReason:((n=e.future)===null||n===void 0?void 0:n.v3_throwAbortReason)===!0}}),l=e.entry.module.handleError||((u,{request:d})=>{i!==Pe.Test&&!d.signal.aborted&&console.error(Z(u)&&u.error?u.error:u)});return{routes:a,dataRoutes:o,serverMode:i,staticHandler:s,errorHandler:l}}async function Wd(e,t,r){if(e.assets.version!==r.searchParams.get("version"))return new Response(null,{status:204,headers:{"X-Remix-Reload-Document":"true"}});let n=7680;if(r.toString().length>n)return new Response(null,{statusText:"Bad Request",status:400});let a={};if(r.searchParams.has("p")){let o=new Set;r.searchParams.getAll("p").forEach(i=>{i.startsWith("/")||(i=`/${i}`);let s=i.split("/").slice(1);s.forEach((l,u)=>{let d=s.slice(0,u+1).join("/");o.add(`/${d}`)})});for(let i of o){let s=Mn(t,i,e.basename);if(s)for(let l of s){let u=l.route.id;a[u]=e.assets.routes[u]}}return gt(a,{headers:{"Cache-Control":"public, max-age=31536000, immutable"}})}return new Response("Invalid Request",{status:400})}async function Jd(e,t,r,n,a,o,i){try{let s=await r.queryRoute(a,{routeId:n,requestContext:o});if(Tn(s))return Rl(s,t.basename);if(Kt in s){let l=s[Kt],u=xs(l,a.signal,e),d=l.init||{},c=new Headers(d.headers);return c.set("Content-Type","text/remix-deferred"),c.set("X-Remix-Response","yes"),d.headers=c,new Response(u,d)}return s=go(s,"X-Remix-Response","yes"),s}catch(s){if(Oe(s))return go(s,"X-Remix-Catch","yes");if(Z(s))return i(s),yl(s,e);let l=s instanceof Error||s instanceof DOMException?s:new Error("Unexpected Server Error");return i(l),Qe(nr(l,e),{status:500,headers:{"X-Remix-Error":"yes"}})}}async function Yd(e,t,r,n,a,o,i){let{result:s,headers:l,status:u}=n.method!=="GET"?await Ws(t,e,r,n,a,o,i):await Js(t,e,r,n,a,o,i),d=new Headers(l);return d.set("X-Remix-Response","yes"),pl.has(u)?new Response(null,{status:u,headers:d}):(d.set("Content-Type","text/x-script"),new Response(Ar(s,n.signal,t.entry.module.streamTimeout,e),{status:u||200,headers:d}))}async function Kd(e,t,r,n,a,o,i){let s;try{["POST","PUT","PATCH","DELETE"].includes(n.method)&&Un(n.headers),s=await r.query(n,{requestContext:a})}catch(f){return o(f),new Response(null,{status:500})}if(Oe(s))return s;let l=Fr(t,s);if(pl.has(s.statusCode))return new Response(null,{status:s.statusCode,headers:l});
18s.errors&&(Object.values(s.errors).forEach(f=>{(!Z(f)||f.error)&&o(f)}),s.errors=rr(s.errors,e));let u={loaderData:s.loaderData,actionData:s.actionData,errors:Za(s.errors,e)},d={manifest:t.assets,routeModules:Ks(t.routes),staticHandlerContext:s,criticalCss:i,serverHandoffString:po({basename:t.basename,criticalCss:i,future:t.future,isSpaMode:t.isSpaMode,...t.future.v3_singleFetch?null:{state:u}}),...t.future.v3_singleFetch?{serverHandoffStream:Ar(u,n.signal,t.entry.module.streamTimeout,e),renderMeta:{}}:null,future:t.future,isSpaMode:t.isSpaMode,serializeError:f=>nr(f,e)},c=t.entry.module.default;try{return await c(n,s.statusCode,l,d,a)}catch(f){o(f);let m=f;if(Oe(f))try{let p=await Gd(f);m=new ae(f.status,f.statusText,p)}catch{}s=fa(r.dataRoutes,s,m),s.errors&&(s.errors=rr(s.errors,e));let h={loaderData:s.loaderData,actionData:s.actionData,errors:Za(s.errors,e)};d={...d,staticHandlerContext:s,serverHandoffString:po({basename:t.basename,future:t.future,isSpaMode:t.isSpaMode,...t.future.v3_singleFetch?null:{state:h}}),...t.future.v3_singleFetch?{serverHandoffStream:Ar(h,n.signal,t.entry.module.streamTimeout,e),renderMeta:{}}:null};try{return await c(n,s.statusCode,l,d,a)}catch(p){return o(p),gl(p,e)}}}async function Xd(e,t,r,n,a,o,i){try{let s=await r.queryRoute(a,{routeId:n,requestContext:o});return typeof s=="object"&&s!==null&&fo(!(Kt in s),`You cannot return a \`defer()\` response from a Resource Route.  Did you forget to export a default UI component from the "${n}" route?`),t.future.v3_singleFetch&&!Oe(s)&&(console.warn(fl(a.method==="GET"?"loader":"action",n)),s=gt(s)),fo(Oe(s),"Expected a Response to be returned from queryRoute"),s}catch(s){return Oe(s)?go(s,"X-Remix-Catch","yes"):Z(s)?(s&&i(s),yl(s,e)):(i(s),gl(s,e))}}function yl(e,t){return Qe(nr(e.error||new Error("Unexpected Server Error"),t),{status:e.status,statusText:e.statusText,headers:{"X-Remix-Error":"yes"}})}function gl(e,t){let r="Unexpected Server Error";return t!==Pe.Production&&(r+=`
19
20${String(e)}`),new Response(r,{status:500,headers:{"Content-Type":"text/plain"}})}function Gd(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}function Rl(e,t){let r=new Headers(e.headers),n=r.get("Location");return r.set("X-Remix-Redirect",t&&ie(n,t)||n),r.set("X-Remix-Status",String(e.status)),r.delete("Location"),e.headers.get("Set-Cookie")!==null&&r.set("X-Remix-Revalidate","yes"),new Response(null,{status:204,headers:r})}function go(e,t,r){let n=new Headers(e.headers);return n.set(t,r),new Response(e.body,{status:e.status,statusText:e.statusText,headers:n,duplex:e.body?"half":void 0})}var pl,vl,El=K(()=>{ge();Xs();An();lo();Gs();Fn();Qs();al();Or();sl();yo();co();hl();uo();pl=new Set([100,101,204,205,304]);vl=(e,t)=>{let r,n,a,o,i;return async function(l,u={}){if(r=typeof e=="function"?await e():e,t??=r.mode,typeof e=="function"){let R=ml(r,t);n=R.routes,a=R.serverMode,o=R.staticHandler,i=R.errorHandler}else if(!n||!a||!o||!i){let R=ml(r,t);n=R.routes,a=R.serverMode,o=R.staticHandler,i=R.errorHandler}let d=new URL(l.url),c={},f=R=>{if(t===Pe.Development){var b,E;(b=vo())===null||b===void 0||(E=b.processRequestError)===null||E===void 0||E.call(b,R)}i(R,{context:u,params:c,request:l})},m=`${r.basename??"/"}/__manifest`.replace(/\/+/g,"/");if(d.pathname===m&&r.future.v3_lazyRouteDiscovery)try{return await Wd(r,n,d)}catch(R){return f(R),new Response("Unknown Server Error",{status:500})}let h=Mn(n,d.pathname,r.basename);h&&h.length>0&&Object.assign(c,h[0].params);let p;if(d.searchParams.has("_data")){r.future.v3_singleFetch&&f(new Error("Warning: Single fetch-enabled apps should not be making ?_data requests, this is likely to break in the future"));let R=d.searchParams.get("_data");p=await Jd(a,r,o,R,l,u,f),r.entry.module.handleDataRequest&&(p=await r.entry.module.handleDataRequest(p,{context:u,params:c,request:l}),Tn(p)&&(p=Rl(p,r.basename)))}else if(r.future.v3_singleFetch&&d.pathname.endsWith(".data")){let R=new URL(l.url);R.pathname=R.pathname.replace(/\.data$/,"").replace(/^\/_root$/,"/");let b=Mn(n,R.pathname,r.basename);if(p=await Yd(a,r,o,l,R,u,f),r.entry.module.handleDataRequest&&(p=await r.entry.module.handleDataRequest(p,{context:u,params:b?b[0].params:{},request:l}),Tn(p))){let E=ur(p.status,p.headers,r.basename);l.method==="GET"&&(E={[$e]:E});let L=new Headers(p.headers);return L.set("Content-Type","text/x-script"),new Response(Ar(E,l.signal,r.entry.module.streamTimeout,a),{status:lr,headers:L})}}else if(h&&h[h.length-1].route.module.default==null&&h[h.length-1].route.module.ErrorBoundary==null)p=await Xd(a,r,o,h.slice(-1)[0].route.id,l,u,f);else{var w,x;let R=t===Pe.Development?await((w=vo())===null||w===void 0||(x=w.getCriticalCss)===null||x===void 0?void 0:x.call(w,r,d.pathname)):void 0;p=await Kd(a,r,o,l,u,f,R)}return l.method==="HEAD"?new Response(null,{headers:p.headers,status:p.status,statusText:p.statusText}):p}}});function Ro(e){return`__flash_${e}__`}function Eo(e){Dn(e.isSigned,`The "${e.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://remix.run/utils/cookie
20s#signing-cookies for more information.`)}var kr,wl,_l,wo=K(()=>{On();Ka();kr=(e={},t="")=>{let r=new Map(Object.entries(e));return{get id(){return t},get data(){return Object.fromEntries(r)},has(n){return r.has(n)||r.has(Ro(n))},get(n){if(r.has(n))return r.get(n);let a=Ro(n);if(r.has(a)){let o=r.get(a);return r.delete(a),o}},set(n,a){r.set(n,a)},flash(n,a){r.set(Ro(n),a)},unset(n){r.delete(n)}}},wl=e=>e!=null&&typeof e.id=="string"&&typeof e.data<"u"&&typeof e.has=="function"&&typeof e.get=="function"&&typeof e.set=="function"&&typeof e.flash=="function"&&typeof e.unset=="function",_l=e=>({cookie:t,createData:r,readData:n,updateData:a,deleteData:o})=>{let i=qt(t)?t:e(t?.name||"__session",t);return Eo(i),{async getSession(s,l){let u=s&&await i.parse(s,l),d=u&&await n(u);return kr(d||{},u||"")},async commitSession(s,l){let{id:u,data:d}=s,c=l?.maxAge!=null?new Date(Date.now()+l.maxAge*1e3):l?.expires!=null?l.expires:i.expires;return u?await a(u,d,c):u=await r(d,c),i.serialize(u,l)},async destroySession(s,l){return await o(s.id),i.serialize("",{...l,maxAge:void 0,expires:new Date(0)})}}}});var bl,xl=K(()=>{On();wo();bl=e=>({cookie:t}={})=>{let r=qt(t)?t:e(t?.name||"__session",t);return Eo(r),{async getSession(n,a){return kr(n&&await r.parse(n,a)||{})},async commitSession(n,a){let o=await r.serialize(n.data,a);if(o.length>4096)throw new Error("Cookie length will exceed browser maximum. Length: "+o.length);return o},async destroySession(n,a){return r.serialize("",{...a,maxAge:void 0,expires:new Date(0)})}}}});var Sl,Nl=K(()=>{Sl=e=>({cookie:t}={})=>{let r=new Map;return e({cookie:t,async createData(n,a){let o=Math.random().toString(36).substring(2,10);return r.set(o,{data:n,expires:a}),o},async readData(n){if(r.has(n)){let{data:a,expires:o}=r.get(n);if(!o||o>new Date)return a;o&&r.delete(n)}return null},async updateData(n,a,o){r.set(n,{data:a,expires:o})},async deleteData(n){r.delete(n)}})}});var cr,_o=K(()=>{cr=class extends Error{constructor(t,r){super(`Field "${t}" exceeded upload size of ${r} bytes.`),this.field=t,this.maxBytes=r}}});function Cl({filter:e,maxPartSize:t=3e6}={}){return async({filename:r,contentType:n,name:a,data:o})=>{if(e&&!await e({filename:r,contentType:n,name:a}))return;let i=0,s=[];for await(let l of o){if(i+=l.byteLength,i>t)throw new cr(a,t);s.push(l)}return typeof r=="string"?new File(s,r,{type:n}):await new Blob(s,{type:n}).text()}}var Dl=K(()=>{_o();});var Qd={};qn(Qd,{MaxPartSizeExceededError:()=>cr,UNSAFE_SingleFetchRedirectSymbol:()=>$e,broadcastDevReady:()=>ll,createCookieFactory:()=>is,createCookieSessionStorageFactory:()=>bl,createMemorySessionStorageFactory:()=>Sl,createRequestHandler:()=>vl,createSession:()=>kr,createSessionStorageFactory:()=>_l,data:()=>Ys,defer:()=>Es,isCookie:()=>qt,isSession:()=>wl,json:()=>gt,logDevReady:()=>ul,redirect:()=>kn,redirectDocument:()=>_s,replace:()=>ws,unstable_composeUploadHandlers:()=>ps,unstable_createMemoryUploadHandler:()=>Cl,unstable_parseMultipartFormData:()=>vs,unstable_setDevServerHooks:()=>dl});var Pl=K(()=>{On();ys();Or();co();El();wo();xl();Nl();Dl();_o();yo();});function oe(){return oe=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},oe.apply(this,arguments)}var O=xe(je());yt();function Ce(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}yt();async function Sn(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__remixContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ki(e,t,r){let n=e.map(o=>{var i;let s=t[o.route.id],l=r.routes[o.route.id];return[l.css?l.css.map(u=>({rel:"stylesheet",href:u})):[],(s==null||(i=s.links)===null||i===void 0?void 0:i.call(s))||[]]}).flat(2),a=ad(e,r);return Zi(n,a)}async function Ba(e,t){var r,n;if(!e.css&&!t.links||!id())return;let a=[((r=e.css)===null||r===void 0?void 0:r.map(s=>({rel:"stylesheet",href:s})))??[],((n=t.links)===null||n===void 0?void 0:n.call(t))??[]].flat(1);if(a.length===0)return;let o=[];for(let s of a)!Cn(s)&&s.rel==="stylesheet"&&o.push({...s,rel:"preload",as:"style"});let i=o.filter(s=>(!s.media||window.matchMedia(s.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${s.href}"]`));await Promise.all(i.map(rd))}async function rd(e){return new Promise(t=>{let r=document.createElement("link");Object.assign(r,e);function n(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function Cn(e){return e!=null&&typeof e.page=="string"}
20function nd(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Xi(e,t,r){let n=await Promise.all(e.map(async a=>{let o=await Sn(t.routes[a.route.id],r);return o.links?o.links():[]}));return Zi(n.flat(1).filter(nd).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function za(e,t,r,n,a,o,i){let s=qi(e),l=(c,f)=>r[f]?c.route.id!==r[f].route.id:!0,u=(c,f)=>{var m;return r[f].pathname!==c.pathname||((m=r[f].route.path)===null||m===void 0?void 0:m.endsWith("*"))&&r[f].params["*"]!==c.params["*"]};return i==="data"&&(o.v3_singleFetch||a.search!==s.search)?t.filter((c,f)=>{if(!n.routes[c.route.id].hasLoader)return!1;if(l(c,f)||u(c,f))return!0;let h=o.v3_singleFetch||a.search!==s.search;if(c.route.shouldRevalidate){var p;let w=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((p=r[0])===null||p===void 0?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:h});if(typeof w=="boolean")return w}return h}):t.filter((c,f)=>{let m=n.routes[c.route.id];return(i==="assets"||m.hasLoader)&&(l(c,f)||u(c,f))})}function Gi(e,t,r){let n=qi(e);return Wa(t.filter(a=>r.routes[a.route.id].hasLoader&&!r.routes[a.route.id].hasClientLoader).map(a=>{let{pathname:o,search:i}=n,s=new URLSearchParams(i);return s.set("_data",a.route.id),`${o}?${s}`}))}function Qi(e,t){return Wa(e.map(r=>{let n=t.routes[r.route.id],a=[n.module];return n.imports&&(a=a.concat(n.imports)),a}).flat(1))}function ad(e,t){return Wa(e.map(r=>{let n=t.routes[r.route.id],a=[n.module];return n.imports&&(a=a.concat(n.imports)),a}).flat(1))}function Wa(e){return[...new Set(e)]}function od(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Zi(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(t&&!Cn(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let s=JSON.stringify(od(o));return r.has(s)||(r.add(s),a.push({key:s,link:o})),a},[])}function qi(e){let t=le(e);return t.search===void 0&&(t.search=""),t}var Nn;function id(){if(Nn!==void 0)return Nn;let e=document.createElement("link");return Nn=e.relList.supports("preload"),e=null,Nn}var sd={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},ld=/[&><\u2028\u2029]/g;function et(e){return e.replace(ld,t=>sd[t])}function Ja(e){return{__html:e}}var So=xe(je());ge();Pl();oo();ge();function Ll(e){return e.headers.get("X-Remix-Catch")!=null}function Zd(e){return e.headers.get("X-Remix-Error")!=null}function qd(e){return Tr(e)&&e.status>=400&&e.headers.get("X-Remix-Error")==null&&e.headers.get("X-Remix-Catch")==null&&e.headers.get("X-Remix-Response")==null}function Fl(e){return e.headers.get("X-Remix-Redirect")!=null}function Al(e){var t;return!!((t=e.headers.get("Content-Type"))!==null&&t!==void 0&&t.match(/text\/remix-deferred/))}function Tr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function kl(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"}async function bo(e,t,r=0){let n=new URL(e.url);n.searchParams.set("_data",t),r>0&&await new Promise(s=>setTimeout(s,5**r*10));let a=await Ur(e),o=window.__remixRevalidation,i=await fetch(n.href,a).catch(s=>{if(typeof o=="number"&&o===window.__remixRevalidation&&s?.name==="TypeError"&&r<3)return bo(e,t,r+1);throw s});if(Zd(i)){let s=await i.json(),l=new Error(s.message);return l.stack=s.stack,l}if(qd(i)){let s=await i.text(),l=new Error(s);return l.stack=void 0,l}return i}async function Ur(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var ef="__deferred_promise:";async function Tl(e){if(!e)throw new Error("parseDeferredReadableStream requires stream argument");let t,r={};try{let n=tf(e),o=(await n.next()).value;if(!o)throw new Error("no critical data");let i=JSON.parse(o);if(typeof i=="object"&&i!==null)for(let[s,l]of Object.entries(i))typeof l!="string"||!l.startsWith(ef)||(t=t||{},t[s]=new Promise((u,d)=>{r[s]={resolve:c=>{u(c),delete r[s]},reject:c=>{d(c),delete r[s]}}}));return(async()=>{try{for await(let s of n){let[l,...u]=s.split(":"),d=u.join(":"),c=JSON.parse(d);if(l==="data")for(let[f,m]of Object.entries(c))r[f]&&r[f].resolve(m);else if(l==="error")for(let[f,m]of Object.entries(c)){let h=new Error(m.message);h.stack=m.stack,r[f]&&r[f].reject(h)}}for(let[s,l]of Object.entries(r))l.reject(new ke(`Deferred ${s} will never be resolved`))}catch(s){for(let l of Object.values(r))l.reject(s)}})(),new Ht({...i,...t})}catch(n){for(let a of Object.values(r))a.reject(n);throw n}}
20async function*tf(e){let t=e.getReader(),r=[],n=[],a=!1,o=new TextEncoder,i=new TextDecoder,s=async()=>{if(n.length>0)return n.shift();for(;!a&&n.length===0;){let u=await t.read();if(u.done){a=!0;break}r.push(u.value);try{let c=i.decode(Ol(...r)).split(`
21
22`);if(c.length>=2&&(n.push(...c.slice(0,-1)),r=[o.encode(c.slice(-1).join(`
23
24`))]),n.length>0)break}catch{continue}}return n.length>0||r.length>0&&(n=i.decode(Ol(...r)).split(`
25
26`).filter(d=>d),r=[]),n.shift()},l=await s();for(;l;)yield l,l=await s()}function Ol(...e){let t=new Uint8Array(e.reduce((n,a)=>n+a.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function Ml(e,t,r){return async({request:n,matches:a,fetcherKey:o})=>["POST","PUT","PATCH","DELETE"].includes(n.method)?rf(n,a):o?af(n,a):nf(e,t,r(),n,a)}async function rf(e,t){let r=t.find(o=>o.shouldLoad);Ce(r,"No action match found");let n,a=await r.resolve(async o=>await o(async()=>{let s=Mr(e.url),l=await Ur(e),{data:u,status:d}=await No(s,l);return n=d,xo(u,r.route.id)}));return Tr(a.result)||Z(a.result)?{[r.route.id]:a}:{[r.route.id]:{type:a.type,result:Er(a.result,n)}}}async function nf(e,t,r,n,a){let o=new Set,i=!1,s=a.map(()=>Ul()),l=Promise.all(s.map(h=>h.promise)),u=Ul(),d=jl(Mr(n.url)),c=await Ur(n),f={},m=Promise.all(a.map(async(h,p)=>h.resolve(async w=>{if(s[p].resolve(),!h.shouldLoad){var x;if(!r.state.initialized)return;if(h.route.id in r.state.loaderData&&e.routes[h.route.id]&&(x=t[h.route.id])!==null&&x!==void 0&&x.shouldRevalidate){e.routes[h.route.id].hasLoader&&(i=!0);return}}if(e.routes[h.route.id].hasClientLoader){e.routes[h.route.id].hasLoader&&(i=!0);try{let R=await Il(w,d,c,h.route.id);f[h.route.id]={type:"data",result:R}}catch(R){f[h.route.id]={type:"error",result:R}}return}e.routes[h.route.id].hasLoader&&o.add(h.route.id);try{let R=await w(async()=>{let b=await u.promise;return Hl(b,h.route.id)});f[h.route.id]={type:"data",result:R}}catch(R){f[h.route.id]={type:"error",result:R}}})));if(await l,(!r.state.initialized||o.size===0)&&!window.__remixHdrActive)u.resolve({});else try{i&&o.size>0&&d.searchParams.set("_routes",a.filter(p=>o.has(p.route.id)).map(p=>p.route.id).join(","));let h=await No(d,c);u.resolve(h.data)}catch(h){u.reject(h)}return await m,f}async function af(e,t){let r=t.find(a=>a.shouldLoad);Ce(r,"No fetcher match found");let n=await r.resolve(async a=>{let o=jl(Mr(e.url)),i=await Ur(e);return Il(a,o,i,r.route.id)});return{[r.route.id]:n}}function Il(e,t,r,n){return e(async()=>{let a=new URL(t);a.searchParams.set("_routes",n);let{data:o}=await No(a,r);return Hl(o,n)})}function jl(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function Mr(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}async function No(e,t){let r=await fetch(e,t);if(new Set([100,101,204,205]).has(r.status))return!t.method||t.method==="GET"?{status:r.status,data:{}}:{status:r.status,data:{data:null}};Ce(r.body,"No response body to decode");try{let a=await Co(r.body,window);return{status:r.status,data:a.value}}catch(a){throw console.error(a),new Error(`Unable to decode turbo-stream response from URL: ${e.toString()}`)}}function Co(e,t){return js(e,{plugins:[(r,...n)=>{if(r==="SanitizedError"){let[a,o,i]=n,s=Error;a&&a in t&&typeof t[a]=="function"&&(s=t[a]);let l=new s(o);return l.stack=i,{value:l}}if(r==="ErrorResponse"){let[a,o,i]=n;return{value:new ae(o,i,a)}}if(r==="SingleFetchRedirect")return{value:{[$e]:n[0]}}},(r,n)=>{if(r==="SingleFetchFallback")return{value:void 0};if(r==="SingleFetchClassInstance")return{value:n}}]})}function Hl(e,t){let r=e[$e];return r?xo(r,t):e[t]!==void 0?xo(e[t],t):null}function xo(e,t){if("error"in e)throw e.error;if("redirect"in e){let r={};throw e.revalidate&&(r["X-Remix-Revalidate"]="yes"),e.reload&&(r["X-Remix-Reload-Document"]="yes"),e.replace&&(r["X-Remix-Replace"]="yes"),Te(e.redirect,{status:e.status,headers:r})}else{if("data"in e)return e.data;throw new Error(`No response found for routeId "${t}"`)}}function Ul(){let e,t,r=new Promise((n,a)=>{e=async o=>
26{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}ge();var Jl=xe(je());var Rt=xe(je());ge();yt();var he=xe(je());yt();var jn=class extends he.Component{constructor(t){super(t),this.state={error:t.error||null,location:t.location}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error||null,location:t.location}:{error:t.error||r.error,location:r.location}}render(){return this.state.error?he.createElement(Do,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Do({error:e,isOutsideRemixApp:t}){console.error(e);let r=he.createElement("script",{dangerouslySetInnerHTML:{__html:`
27        console.log(
28          "\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."
29        );
30      `}});if(Z(e))return he.createElement(Hn,{title:"Unhandled Thrown Response!"},he.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let n;if(e instanceof Error)n=e;else{let a=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);n=new Error(a)}return he.createElement(Hn,{title:"Application Error!",isOutsideRemixApp:t},he.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),he.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function Hn({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){var a;let{routeModules:o}=tt();return(a=o.root)!==null&&a!==void 0&&a.Layout&&!r?n:he.createElement("html",{lang:"en"},he.createElement("head",null,he.createElement("meta",{charSet:"utf-8"}),he.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),he.createElement("title",null,e)),he.createElement("body",null,he.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?he.createElement(Po,null):null)))}var Oo=xe(je());function $l(){return Oo.createElement(Hn,{title:"Loading...",renderScripts:!0},Oo.createElement("script",{dangerouslySetInnerHTML:{__html:`
31              console.log(
32                "\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this " +
33                "when your app is loading JS modules and/or running \`clientLoader\` " +
34                "functions. Check out https://remix.run/route/hydrate-fallback " +
35                "for more information."
36              );
37            `}}))}function Bl(e){let t={};return Object.values(e).forEach(r=>{let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}),t}function of(e,t,r){let n=Wl(t),a=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?$l:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>Rt.createElement(Do,{error:Gt()}):void 0;return e.id==="root"&&t.Layout?{...n?{element:Rt.createElement(t.Layout,null,Rt.createElement(n,null))}:{Component:n},...o?{errorElement:Rt.createElement(t.Layout,null,Rt.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:Rt.createElement(t.Layout,null,Rt.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function zl(e,t,r,n,a,o){return dr(t,r,n,a,o,"",Bl(t),e)}function $n(e,t,r){if(r){let i=`You cannot call ${e==="action"?"serverAction()":"serverLoader()"} in SPA Mode (routeId: "${t.id}")`;throw console.error(i),new ae(400,"Bad Request",new Error(i),!0)}let a=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction)throw console.error(a),new ae(400,"Bad Request",new Error(a),!0)}function Lo(e,t){let r=e==="clientAction"?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new ae(405,"Method Not Allowed",new Error(n),!0)}
37function dr(e,t,r,n,a,o="",i=Bl(e),s){return(i[o]||[]).map(l=>{let u=t[l.id];async function d(b,E,L){if(typeof L=="function")return await L();let D=await uf(b,l);return E?cf(D):D}function c(b,E,L){return l.hasLoader?d(b,E,L):Promise.resolve(null)}function f(b,E,L){if(!l.hasAction)throw Lo("action",l.id);return d(b,E,L)}async function m(b){let E=t[l.id],L=E?Ba(l,E):Promise.resolve();try{return b()}finally{await L}}let h={id:l.id,index:l.index,path:l.path};if(u){var p,w,x;Object.assign(h,{...h,...of(l,u,a),handle:u.handle,shouldRevalidate:Vl(n,u,l.id,s)});let b=r==null||(p=r.loaderData)===null||p===void 0?void 0:p[l.id],E=r==null||(w=r.errors)===null||w===void 0?void 0:w[l.id],L=s==null&&(((x=u.clientLoader)===null||x===void 0?void 0:x.hydrate)===!0||!l.hasLoader);h.loader=async({request:D,params:y},P)=>{try{return await m(async()=>(Ce(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:D,params:y,async serverLoader(){if($n("loader",l,a),L){if(b!==void 0)return b;if(E!==void 0)throw E;return null}return c(D,!0,P)}}):a?null:c(D,!1,P)))}finally{L=!1}},h.loader.hydrate=Fo(l,u,a),h.action=({request:D,params:y},P)=>m(async()=>{if(Ce(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(a)throw Lo("clientAction",l.id);return f(D,!1,P)}return u.clientAction({request:D,params:y,async serverAction(){return $n("action",l,a),f(D,!0,P)}})})}else l.hasClientLoader||(h.loader=({request:b},E)=>m(()=>a?Promise.resolve(null):c(b,!1,E))),l.hasClientAction||(h.action=({request:b},E)=>m(()=>{if(a)throw Lo("clientAction",l.id);return f(b,!1,E)})),h.lazy=async()=>{let b=await lf(l,t),E={...b};if(b.clientLoader){let L=b.clientLoader;E.loader=(D,y)=>L({...D,async serverLoader(){return $n("loader",l,a),c(D.request,!0,y)}})}if(b.clientAction){let L=b.clientAction;E.action=(D,y)=>L({...D,async serverAction(){return $n("action",l,a),f(D.request,!0,y)}})}return{...E.loader?{loader:E.loader}:{},...E.action?{action:E.action}:{},hasErrorBoundary:E.hasErrorBoundary,shouldRevalidate:Vl(n,E,l.id,s),handle:E.handle,Component:E.Component,ErrorBoundary:E.ErrorBoundary}};let R=dr(e,t,r,n,a,l.id,i,s);return R.length>0&&(h.children=R),h})}function Vl(e,t,r,n){if(n)return sf(r,t.shouldRevalidate,n);if(e.v3_singleFetch&&t.shouldRevalidate){let a=t.shouldRevalidate;return o=>a({...o,defaultShouldRevalidate:!0})}return t.shouldRevalidate}function sf(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function lf(e,t){let r=await Sn(e,t);return await Ba(e,r),{Component:Wl(r),ErrorBoundary:r.ErrorBoundary,clientAction:r.clientAction,clientLoader:r.clientLoader,handle:r.handle,links:r.links,meta:r.meta,shouldRevalidate:r.shouldRevalidate}}async function uf(e,t){let r=await bo(e,t.id);if(r instanceof Error)throw r;if(Fl(r))throw df(r);if(Ll(r))throw r;return Al(r)&&r.body?await Tl(r.body):r}function cf(e){if(kl(e))return e.data;if(Tr(e)){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.json():e.text()}return e}function df(e){let t=parseInt(e.headers.get("X-Remix-Status"),10)||302,r=e.headers.get("X-Remix-Redirect"),n={},a=e.headers.get("X-Remix-Revalidate");a&&(n["X-Remix-Revalidate"]=a);let o=e.headers.get("X-Remix-Reload-Document");o&&(n["X-Remix-Reload-Document"]=o);let i=e.headers.get("X-Remix-Replace");return i&&(n["X-Remix-Replace"]=i),Te(r,{status:t,headers:n})}function Wl(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function Fo(e,t,r){return r&&e.id!=="root"||t.clientLoader!=null&&(t.clientLoader.hydrate===!0||e.hasLoader!==!0)}var Vn=new Set,ff=1e3,Bn=new Set,hf=7680;function zn(e,t){return e.v3_lazyRouteDiscovery===!0&&!t}function Yl(e,t){let r=new Set(t.state.matches.map(i=>i.route.id)),n=t.state.location.pathname.split("/").filter(Boolean),a=["/"];for(n.pop();n.length>0;)a.push(`/${n.join("/")}`),n.pop();a.forEach(i=>{let s=te(t.routes,i,t.basename);s&&s.forEach(l=>r.add(l.route.id))});let o=[...r].reduce((i,s)=>Object.assign(i,{[s]:e.routes[s]}),{});return{...e,routes:o}}function Kl(e,t,r,n,a){if(zn(r,n))return async({path:o,patch:i,signal:s,fetcherKey:l})=>{Bn.has(o)||await Gl([o],l?window.location.href:o,e,t,r,n,a,i,s)}}function Xl(e,t,r,n,a){Jl.useEffect(()=>{var o;if(!zn(n,a)||((o=navigator.connection)===null||o===void 0?void 0:o.saveData)===!0)return;function i(c){let f=c.tagName==="FORM"?c.getAttribute("action"):c.getAttribute("href");if(!f)return;let m=new URL(f,window.location.origin);Bn.has(m.pathname)||Vn.add(m.pathname)}async function s(){let c=Array.from(Vn.keys()).filter(f=>Bn.has(f)?(Vn.delete(f),!1):!0);if(c.length!==0)try{await Gl(c,null,t,r,n,a,e.basename,e.patchRoutes)}catch(f){console.error("Failed to fetch manifest patches",f)}}
37document.body.querySelectorAll("a[data-discover], form[data-discover]").forEach(c=>i(c)),s();let l=pf(s,100);function u(c){return c.nodeType===Node.ELEMENT_NODE}let d=new MutationObserver(c=>{let f=new Set;c.forEach(m=>{[m.target,...m.addedNodes].forEach(h=>{u(h)&&((h.tagName==="A"&&h.getAttribute("data-discover")||h.tagName==="FORM"&&h.getAttribute("data-discover"))&&f.add(h),h.tagName!=="A"&&h.querySelectorAll("a[data-discover], form[data-discover]").forEach(p=>f.add(p)))})}),f.forEach(m=>i(m)),l()});return d.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>d.disconnect()},[n,a,t,r,e])}var Ao="remix-manifest-version";async function Gl(e,t,r,n,a,o,i,s,l){let u=`${i??"/"}/__manifest`.replace(/\/+/g,"/"),d=new URL(u,window.location.origin);if(e.sort().forEach(p=>d.searchParams.append("p",p)),d.searchParams.set("version",r.version),d.toString().length>hf){Vn.clear();return}let c;try{let p=await fetch(d,{signal:l});if(p.ok){if(p.status===204&&p.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.");return}if(sessionStorage.getItem(Ao)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}throw sessionStorage.setItem(Ao,r.version),window.location.href=t,new Error("Detected manifest version mismatch, reloading...")}else if(p.status>=400)throw new Error(await p.text())}else throw new Error(`${p.status} ${p.statusText}`);sessionStorage.removeItem(Ao),c=await p.json()}catch(p){if(l!=null&&l.aborted)return;throw p}let f=new Set(Object.keys(r.routes)),m=Object.values(c).reduce((p,w)=>f.has(w.id)?p:Object.assign(p,{[w.id]:w}),{});Object.assign(r.routes,m),e.forEach(p=>mf(p,Bn));let h=new Set;Object.values(m).forEach(p=>{(!p.parentId||!m[p.parentId])&&h.add(p.parentId)}),h.forEach(p=>s(p||null,dr(m,n,null,a,o,p)))}function mf(e,t){if(t.size>=ff){let r=t.values().next().value;typeof r=="string"&&t.delete(r)}t.add(e)}function pf(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function Zl(){let e=O.useContext(Be);return Ce(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Jn(){let e=O.useContext(Ze);return Ce(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jr=O.createContext(void 0);jr.displayName="Remix";function tt(){let e=O.useContext(jr);return Ce(e,"You must render this element inside a <Remix> element"),e}function ql(e,t){let[r,n]=O.useState(!1),[a,o]=O.useState(!1),{onFocus:i,onBlur:s,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,c=O.useRef(null);O.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let h=w=>{w.forEach(x=>{o(x.isIntersecting)})},p=new IntersectionObserver(h,{threshold:.5});return c.current&&p.observe(c.current),()=>{p.disconnect()}}},[e]);let f=()=>{e==="intent"&&n(!0)},m=()=>{e==="intent"&&(n(!1),o(!1))};return O.useEffect(()=>{if(r){let h=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(h)}}},[r]),[a,c,{onFocus:Ir(i,f),onBlur:Ir(s,m),onMouseEnter:Ir(l,f),onMouseLeave:Ir(u,m),onTouchStart:Ir(d,f)}]}var ko=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function To(e,t,r){return e==="render"&&!t&&!r?"true":void 0}var eu=O.forwardRef(({to:e,prefetch:t="none",discover:r="render",...n},a)=>{let o=typeof e=="string"&&ko.test(e),i=ht(e),[s,l,u]=ql(t,n);return O.createElement(O.Fragment,null,O.createElement(Ma,oe({},n,u,{ref:au(a,l),to:e,"data-discover":To(r,o,n.reloadDocument)})),s&&!o?O.createElement(Yn,{page:i}):null)});eu.displayName="NavLink";var tu=O.forwardRef(({to:e,prefetch:t="none",discover:r="render",...n},a)=>{let o=typeof e=="string"&&ko.test(e),i=ht(e),[s,l,u]=ql(t,n);return O.createElement(O.Fragment,null,O.createElement(En,oe({},n,u,{ref:au(a,l),to:e,"data-discover":To(r,o,n.reloadDocument)})),s&&!o?O.createElement(Yn,{page:i}):null)});tu.displayName="Link";var ru=O.forwardRef(({discover:e="render",...t},r)=>
37{let n=typeof t.action=="string"&&ko.test(t.action);return O.createElement(wn,oe({},t,{ref:r,"data-discover":To(e,n,t.reloadDocument)}))});ru.displayName="Form";function Ir(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Uo(e,t,r){if(r&&!Wn)return[e[0]];if(t){let n=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,n+1)}return e}function vf(){let{isSpaMode:e,manifest:t,routeModules:r,criticalCss:n}=tt(),{errors:a,matches:o}=Jn(),i=Uo(o,a,e),s=O.useMemo(()=>Ki(i,r,t),[i,r,t]);return O.createElement(O.Fragment,null,n?O.createElement("style",{dangerouslySetInnerHTML:{__html:n}}):null,s.map(({key:l,link:u})=>Cn(u)?O.createElement(Yn,oe({key:l},u)):O.createElement("link",oe({key:l},u))))}function Yn({page:e,...t}){let{router:r}=Zl(),n=O.useMemo(()=>te(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?O.createElement(gf,oe({page:e,matches:n},t)):(console.warn(`Tried to prefetch ${e} but no routes matched.`),null)}function yf(e){let{manifest:t,routeModules:r}=tt(),[n,a]=O.useState([]);return O.useEffect(()=>{let o=!1;return Xi(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function gf({page:e,matches:t,...r}){let n=ue(),{future:a,manifest:o,routeModules:i}=tt(),{loaderData:s,matches:l}=Jn(),u=O.useMemo(()=>za(e,t,l,o,n,a,"data"),[e,t,l,o,n,a]),d=O.useMemo(()=>{if(!a.v3_singleFetch)return Gi(e,u,o);if(e===n.pathname+n.search+n.hash)return[];let h=new Set,p=!1;if(t.forEach(x=>{var R;o.routes[x.route.id].hasLoader&&(!u.some(b=>b.route.id===x.route.id)&&x.route.id in s&&(R=i[x.route.id])!==null&&R!==void 0&&R.shouldRevalidate||o.routes[x.route.id].hasClientLoader?p=!0:h.add(x.route.id))}),h.size===0)return[];let w=Mr(e);return p&&h.size>0&&w.searchParams.set("_routes",t.filter(x=>h.has(x.route.id)).map(x=>x.route.id).join(",")),[w.pathname+w.search]},[a.v3_singleFetch,s,n,o,u,t,e,i]),c=O.useMemo(()=>za(e,t,l,o,n,a,"assets"),[e,t,l,o,n,a]),f=O.useMemo(()=>Qi(c,o),[c,o]),m=yf(c);return O.createElement(O.Fragment,null,d.map(h=>O.createElement("link",oe({key:h,rel:"prefetch",as:"fetch",href:h},r))),f.map(h=>O.createElement("link",oe({key:h,rel:"modulepreload",href:h},r))),m.map(({key:h,link:p})=>O.createElement("link",oe({key:h},p))))}function Rf(){let{isSpaMode:e,routeModules:t}=tt(),{errors:r,matches:n,loaderData:a}=Jn(),o=ue(),i=Uo(n,r,e),s=null;r&&(s=r[i[i.length-1].route.id]);let l=[],u=null,d=[];for(let c=0;c<i.length;c++){let f=i[c],m=f.route.id,h=a[m],p=f.params,w=t[m],x=[],R={id:m,data:h,meta:[],params:f.params,pathname:f.pathname,handle:f.route.handle,error:s};if(d[c]=R,w!=null&&w.meta?x=typeof w.meta=="function"?w.meta({data:h,params:p,location:o,matches:d,error:s}):Array.isArray(w.meta)?[...w.meta]:w.meta:u&&(x=[...u]),x=x||[],!Array.isArray(x))throw new Error("The route at "+f.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
38
39To reference the meta function API, see https://remix.run/route/meta`);R.meta=x,d[c]=R,l=[...x],u=l}return O.createElement(O.Fragment,null,l.flat().map(c=>{if(!c)return null;if("tagName"in c){let{tagName:f,...m}=c;return Ef(f)?O.createElement(f,oe({key:JSON.stringify(m)},m)):(console.warn(`A meta object uses an invalid tagName: ${f}. Expected either 'link' or 'meta'`),null)}if("title"in c)return O.createElement("title",{key:"title"},String(c.title));if("charset"in c&&(c.charSet??=c.charset,delete c.charset),"charSet"in c&&c.charSet!=null)return typeof c.charSet=="string"?O.createElement("meta",{key:"charSet",charSet:c.charSet}):null;if("script:ld+json"in c)try{let f=JSON.stringify(c["script:ld+json"]);return O.createElement("script",{key:`script:ld+json:${f}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:et(f)}})}catch{return null}return O.createElement("meta",oe({key:JSON.stringify(c)},c))}))}function Ef(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}function nu(e){return O.createElement(mn,e)}var Wn=!1;function Po(e){let{manifest:t,serverHandoffString:r,abortDelay:n,serializeError:a,isSpaMode:o,future:i,renderMeta:s}=tt(),{router:l,static:u,staticContext:d}=Zl(),{matches:c}=Jn(),f=zn(i,o);s&&(s.didRenderScripts=!0);let m=Uo(c,null,o);O.useEffect(()=>{Wn=!0},[]);let h=(D,y)=>{let P;return a&&y instanceof Error?P=a(y):P=y,`${JSON.stringify(D)}:__remixContext.p(!1, ${et(JSON.stringify(P))})`},p=(D,y,P)=>{let H;try{H=JSON.stringify(P)}catch(j){return h(y,j)}return`${JSON.stringify(y)}:__remixContext.p(${et(H)})`},w=(D,y,P)=>{let H;return a&&P instanceof Error?H=a(P):H=P,`__remixContext.r(${JSON.stringify(D)}, ${JSON.stringify(y)}, !1, ${et(JSON.stringify(H))})`},x=(D,y,P)=>{let H;try{H=JSON.stringify(P)}catch(j){return w(D,y,j)}return`__remixContext.r(${JSON.stringify(D)}, ${JSON.stringify(y)}, ${et(H)})`},R=[],b=O.useMemo(()=>{var D;let y=i.v3_singleFetch?"window.__remixContext.stream = new ReadableStream({start(controller){window.__remixContext.streamController = controller;}}
39).pipeThrough(new TextEncoderStream());":"",P=d?`window.__remixContext = ${r};${y}`:" ",H=i.v3_singleFetch?void 0:d?.activeDeferreds;P+=H?["__remixContext.p = function(v,e,p,x) {","  if (typeof e !== 'undefined') {",`    x=new Error("Unexpected Server Error");
40    x.stack=undefined;`,"    p=Promise.reject(x);","  } else {","    p=Promise.resolve(v);","  }","  return p;","};","__remixContext.n = function(i,k) {","  __remixContext.t = __remixContext.t || {};","  __remixContext.t[i] = __remixContext.t[i] || {};","  let p = new Promise((r, e) => {__remixContext.t[i][k] = {r:(v)=>{r(v);},e:(v)=>{e(v);}};});",typeof n=="number"?`setTimeout(() => {if(typeof p._error !== "undefined" || typeof p._data !== "undefined"){return;} __remixContext.t[i][k].e(new Error("Server timeout."))}, ${n});`:"","  return p;","};","__remixContext.r = function(i,k,v,e,p,x) {","  p = __remixContext.t[i][k];","  if (typeof e !== 'undefined') {",`    x=new Error("Unexpected Server Error");
41    x.stack=undefined;`,"    p.e(x);","  } else {","    p.r(v);","  }","};"].join(`
42`)+Object.entries(H).map(([B,X])=>{let Re=new Set(X.pendingKeys),ye=X.deferredKeys.map(ce=>{if(Re.has(ce))return R.push(O.createElement(Ql,{key:`${B} | ${ce}`,deferredData:X,routeId:B,dataKey:ce,scriptProps:e,serializeData:x,serializeError:w})),`${JSON.stringify(ce)}:__remixContext.n(${JSON.stringify(B)}, ${JSON.stringify(ce)})`;{let rt=X.data[ce];return typeof rt._error<"u"?h(ce,rt._error):p(B,ce,rt._data)}}).join(`,
43`);return`Object.assign(__remixContext.state.loaderData[${JSON.stringify(B)}], {${ye}});`}).join(`
44`)+(R.length>0?`__remixContext.a=${R.length};`:""):"";let j=u?`${(D=t.hmr)!==null&&D!==void 0&&D.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${f?"":`import ${JSON.stringify(t.url)}`};
45${m.map((B,X)=>`import * as route${X} from ${JSON.stringify(t.routes[B.route.id].module)};`).join(`
46`)}
47${f?`window.__remixManifest = ${JSON.stringify(Yl(t,l),null,2)};`:""}
48window.__remixRouteModules = {${m.map((B,X)=>`${JSON.stringify(B.route.id)}:route${X}`).join(",")}};
49
50import(${JSON.stringify(t.entry.module)});`:" ";return O.createElement(O.Fragment,null,O.createElement("script",oe({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:Ja(P),type:void 0})),O.createElement("script",oe({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:Ja(j),type:"module",async:!0})))},[]);if(!u&&typeof __remixContext=="object"&&__remixContext.a)for(let D=0;D<__remixContext.a;D++)R.push(O.createElement(Ql,{key:D,scriptProps:e,serializeData:x,serializeError:w}));let E=m.map(D=>{let y=t.routes[D.route.id];return(y.imports||[]).concat([y.module])}).flat(1),L=Wn?[]:t.entry.imports.concat(E);return Wn?null:O.createElement(O.Fragment,null,f?null:O.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin}),O.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin}),_f(L).map(D=>O.createElement("link",{key:D,rel:"modulepreload",href:D,crossOrigin:e.crossOrigin})),b,R)}function Ql({dataKey:e,deferredData:t,routeId:r,scriptProps:n,serializeData:a,serializeError:o}){return typeof document>"u"&&t&&e&&r&&Ce(t.pendingKeys.includes(e),`Deferred data for route ${r} with key ${e} was not pending but tried to render a script for it.`),O.createElement(O.Suspense,{fallback:typeof document>"u"&&t&&e&&r?null:O.createElement("script",oe({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}}))},typeof document>"u"&&t&&e&&r?O.createElement(nu,{resolve:t.data[e],errorElement:O.createElement(wf,{dataKey:e,routeId:r,scriptProps:n,serializeError:o}),children:i=>O.createElement("script",oe({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a(r,e,i)}}))}):O.createElement("script",oe({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}})))}function wf({dataKey:e,routeId:t,scriptProps:r,serializeError:n}){let a=br();return O.createElement("script",oe({},r,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n(t,e,a)}}))}function _f(e){return[...new Set(e)]}function bf(){return cn()}function xf(e){return dn(e)}function Sf(e={}){return $a(e)}var Nf=()=>null;function au(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}ge();var be=xe(je());var ve=xe(je());var Cf="startTransition",Zm=ve[Cf];var qm=new Promise(()=>{});function ou(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:ve.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:ve.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:ve.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}yt();ge();function iu(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new ae(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack=a.stack,r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack=a.stack,r[n]=o}}else r[n]=a;return r}var Et,Le,Mo=!1;var Io,hp=new Promise(e=>{Io=e}).catch(()=>{});function Df(e){if(!Le){if(window.__remixContext.future.v3_singleFetch){if(!Et){let s=window.__remixContext.stream;
50Ce(s,"No stream found for single fetch decoding"),window.__remixContext.stream=void 0,Et=Co(s,window).then(l=>{window.__remixContext.state=l.value,Et.value=!0}).catch(l=>{Et.error=l})}if(Et.error)throw Et.error;if(!Et.value)throw Et}let o=dr(window.__remixManifest.routes,window.__remixRouteModules,window.__remixContext.state,window.__remixContext.future,window.__remixContext.isSpaMode),i;if(!window.__remixContext.isSpaMode){i={...window.__remixContext.state,loaderData:{...window.__remixContext.state.loaderData}};let s=te(o,window.location,window.__remixContext.basename);if(s)for(let l of s){let u=l.route.id,d=window.__remixRouteModules[u],c=window.__remixManifest.routes[u];d&&Fo(c,d,window.__remixContext.isSpaMode)&&(d.HydrateFallback||!c.hasLoader)?i.loaderData[u]=void 0:c&&!c.hasLoader&&(i.loaderData[u]=null)}i&&i.errors&&(i.errors=iu(i.errors))}Le=ct({routes:o,history:$t(),basename:window.__remixContext.basename,future:{v7_normalizeFormMethod:!0,v7_fetcherPersist:window.__remixContext.future.v3_fetcherPersist,v7_partialHydration:!0,v7_prependBasename:!0,v7_relativeSplatPath:window.__remixContext.future.v3_relativeSplatPath,v7_skipActionErrorRevalidation:window.__remixContext.future.v3_singleFetch===!0},hydrationData:i,mapRouteProperties:ou,dataStrategy:window.__remixContext.future.v3_singleFetch&&!window.__remixContext.isSpaMode?Ml(window.__remixManifest,window.__remixRouteModules,()=>Le):void 0,patchRoutesOnNavigation:Kl(window.__remixManifest,window.__remixRouteModules,window.__remixContext.future,window.__remixContext.isSpaMode,window.__remixContext.basename)}),Le.state.initialized&&(Mo=!0,Le.initialize()),Le.createRoutesForHMR=zl,window.__remixRouter=Le,Io&&Io(Le)}let[t,r]=be.useState(void 0),[n,a]=be.useState(Le.state.location);return be.useLayoutEffect(()=>{Mo||(Mo=!0,Le.initialize())},[]),be.useLayoutEffect(()=>Le.subscribe(o=>{o.location!==n&&a(o.location)}),[n]),Xl(Le,window.__remixManifest,window.__remixRouteModules,window.__remixContext.future,window.__remixContext.isSpaMode),be.createElement(be.Fragment,null,be.createElement(jr.Provider,{value:{manifest:window.__remixManifest,routeModules:window.__remixRouteModules,future:window.__remixContext.future,criticalCss:t,isSpaMode:window.__remixContext.isSpaMode}},be.createElement(jn,{location:n},be.createElement(Ua,{router:Le,fallbackElement:null,future:{v7_startTransition:!0}}))),window.__remixContext.future.v3_singleFetch?be.createElement(be.Fragment,null):null)}yt();var Kn=xe(je());yt();var su="positions";function Pf({getKey:e,...t}){let{isSpaMode:r}=tt(),n=ue(),a=Pt();xn({getKey:e,storageKey:su});let o=Kn.useMemo(()=>{if(!e)return null;let s=e(n,a);return s!==n.key?s:null},[]);if(r)return null;let i=((s,l)=>{if(!window.history.state||!window.history.state.key){let u=Math.random().toString(32).slice(2);window.history.replaceState({key:u},"")}try{let d=JSON.parse(sessionStorage.getItem(s)||"{}")[l||window.history.state.key];typeof d=="number"&&window.scrollTo(0,d)}catch(u){console.error(u),sessionStorage.removeItem(s)}}).toString();return Kn.createElement("script",oe({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${i})(${et(JSON.stringify(su))}, ${et(JSON.stringify(o))})`}}))}export{Z as a,dc as b,ge as c,ue as d,Dt as e,Ra as f,_r as g,Gt as h,Na as i,Bi as j,Wi as k,td as l,yt as m,Qd as n,Pl as o,eu as p,tu as q,vf as r,Rf as s,Po as t,bf as u,xf as v,Sf as w,Nf as x,Df as y,Pf as z};
51/*! Bundled license information:
52
53@remix-run/router/dist/router.js:
54  (**
55   * @remix-run/router v1.23.3
56   *
57   * Copyright (c) Remix Software Inc.
58   *
59   * This source code is licensed under the MIT license found in the
60   * LICENSE.md file in the root directory of this source tree.
61   *
62   * @license MIT
63   *)
64
65react-router/dist/index.js:
66  (**
67   * React Router v6.30.4
68   *
69   * Copyright (c) Remix Software Inc.
70   *
71   * This source code is licensed under the MIT license found in the
72   * LICENSE.md file in the root directory of this source tree.
73   *
74   * @license MIT
75   *)
76
77react-router-dom/dist/index.js:
78  (**
79   * React Router DOM v6.30.4
80   *
81   * Copyright (c) Remix Software Inc.
82   *
83   * This source code is licensed under the MIT license found in the
84   * LICENSE.md file in the root directory of this source tree.
85   *
86   * @license MIT
87   *)
88
89cookie/index.js:
90  (*!
91   * cookie
92   * Copyright(c) 2012-2014 Roman Shtylman
93   * Copyright(c) 2015 Douglas Christopher Wilson
94   * MIT Licensed
95   *)
96
97@remix-run/server-runtime/dist/esm/warnings.js:
98  (**
99   * @remix-run/server-runtime v2.17.5
100   *
101   * Copyright (c) Remix Software Inc.
102   *
103   * This source code is licensed under the MIT license found in the
104   * LICENSE.md file in the root directory of this source tree.
105   *
106   * @license MIT
107   *)
108
109@remix-run/server-runtime/dist/esm/cookies.js:
110  (**
111   * @remix-run/server-runtime v2.17.5
112   *
113   * Copyright (c) Remix Software Inc.
114   *
115   * This source code is licensed under the MIT license found in the
116   * LICENSE.md file in the root directory of this source tree.
117   *
118   * @license MIT
119   *)
120
121@remix-run/server-runtime/dist/esm/formData.js:
122  (**
123   * @remix-run/server-runtime v2.17.5
124   *
125   * Copyright (c) Remix Software Inc.
126   *
127   * This source code is licensed under the MIT license found in the
128   * LICENSE.md file in the root directory of this source tree.
129   *
130   * @license MIT
131   *)
132
133@remix-run/server-runtime/dist/esm/mode.js:
134  (**
135   * @remix-run/server-runtime v2.17.5
136   *
137   * Copyright (c) Remix Software Inc.
138   *
139   * This source code is licensed under the MIT license found in the
140   * LICENSE.md file in the root directory of this source tree.
141   *
142   * @license MIT
143   *)
144
145@remix-run/server-runtime/dist/esm/errors.js:
146  (**
147   * @remix-run/server-runtime v2.17.5
148   *
149   * Copyright (c) Remix Software Inc.
150   *
151   * This source code is licensed under the MIT license found in the
152   * LICENSE.md file in the root directory of this source tree.
153   *
154   * @license MIT
155   *)
156
157@remix-run/server-runtime/dist/esm/responses.js:
158  (**
159   * @remix-run/server-runtime v2.17.5
160   *
161   * Copyright (c) Remix Software Inc.
162   *
163   * This source code is licensed under the MIT license found in the
164   * LICENSE.md file in the root directory of this source tree.
165   *
166   * @license MIT
167   *)
168
169@remix-run/server-runtime/dist/esm/headers.js:
170  (**
171   * @remix-run/server-runtime v2.17.5
172   *
173   * Copyright (c) Remix Software Inc.
174   *
175   * This source code is licensed under the MIT license found in the
176   * LICENSE.md file in the root directory of this source tree.
177   *
178   * @license MIT
179   *)
180
181@remix-run/server-runtime/dist/esm/actions.js:
182  (**
183   * @remix-run/server-runtime v2.17.5
184   *
185   * Copyright (c) Remix Software Inc.
186   *
187   * This source code is licensed under the MIT license found in the
188   * LICENSE.md file in the root directory of this source tree.
189   *
190   * @license MIT
191   *)
192
193@remix-run/server-runtime/dist/esm/single-fetch.js:
194  (**
195   * @remix-run/server-runtime v2.17.5
196   *
197   * Copyright (c) Remix Software Inc.
198   *
199   * This source code is licensed under the MIT license found in the
200   * LICENSE.md file in the root directory of this source tree.
201   *
202   * @license MIT
203   *)
204
205@remix-run/server-runtime/dist/esm/entry.js:
206  (**
207   * @remix-run/server-runtime v2.17.5
208   *
209   * Copyright (c) Remix Software Inc.
210   *
211   * This source code is licensed under the MIT license found in the
212   * LICENSE.md file in the root directory of this source tree.
213   *
214   * @license MIT
215   *)
216
217@remix-run/server-runtime/dist/esm/invariant.js:
218  (**
219   * @remix-run/server-runtime v2.17.5
220   *
221   * Copyright (c) Remix Software Inc.
222   *
223   * This source code is licensed under the MIT license found in the
224   * LICENSE.md file in the root directory of this source tree.
225   *
226   * @license MIT
227   *)
228
229@remix-run/server-runtime/dist/esm/routeMatching.js:
230  (**
231   * @remix-run/server-runtime v2.17.5
232   *
233   * Copyright (c) Remix Software Inc.
234   *
235   * This source code is licensed under the MIT license found in the
236   * LICENSE.md file in the root directory of this source tree.
237   *
238   * @license MIT
239   *)
240
241@remix-run/server-runtime/dist/esm/data.js:
242  (**
243   * @remix-run/server-runtime v2.17.5
244   *
245   * Copyright (c) Remix Software Inc.
246   *
247   * This source code is licensed under the MIT license found in the
248   * LICENSE.md file in the root directory of this source tree.
249   *
250   * @license MIT
251   *)
252
253@remix-run/server-runtime/dist/esm/routes.js:
254  (**
255   * @remix-run/server-runtime v2.17.5
256   *
257   * Copyright (c) Remix Software Inc.
258   *
259   * This source code is licensed under the MIT license found in the
260   * LICENSE.md file in the root directory of this source tree.
261   *
262   * @license MIT
263   *)
264
265@remix-run/server-runtime/dist/esm/markup.js:
266  (**
267   * @remix-run/server-runtime v2.17.5
268   *
269   * Copyright (c) Remix Software Inc.
270   *
271   * This source code is licensed under the MIT license found in the
272   * LICENSE.md file in the root directory of this source tree.
273   *
274   * @license MIT
275   *)
276
277@remix-run/server-runtime/dist/esm/serverHandoff.js:
278  (**
279   * @remix-run/server-runtime v2.17.5
280   *
281   * Copyright (c) Remix Software Inc.
282   *
283   * This source code is licensed under the MIT license found in the
284   * LICENSE.md file in the root directory of this source tree.
285   *
286   * @license MIT
287   *)
288
289@remix-run/server-runtime/dist/esm/dev.js:
290  (**
291   * @remix-run/server-runtime v2.17.5
292   *
293   * Copyright (c) Remix Software Inc.
294   *
295   * This source code is licensed under the MIT license found in the
296   * LICENSE.md file in the root directory of this source tree.
297   *
298   * @license MIT
299   *)
300
301@remix-run/server-runtime/dist/esm/deprecations.js:
302  (**
303   * @remix-run/server-runtime v2.17.5
304   *
305   * Copyright (c) Remix Software Inc.
306   *
307   * This source code is licensed under the MIT license found in the
308   * LICENSE.md file in the root directory of this source tree.
309   *
310   * @license MIT
311   *)
312
313@remix-run/server-runtime/dist/esm/server.js:
314  (**
315   * @remix-run/server-runtime v2.17.5
316   *
317   * Copyright (c) Remix Software Inc.
318   *
319   * This source code is licensed under the MIT license found in the
320   * LICENSE.md file in the root directory of this source tree.
321   *
322   * @license MIT
323   *)
324
325@remix-run/server-runtime/dist/esm/sessions.js:
326  (**
327   * @remix-run/server-runtime v2.17.5
328   *
329   * Copyright (c) Remix Software Inc.
330   *
331   * This source code is licensed under the MIT license found in the
332   * LICENSE.md file in the root directory of this source tree.
333   *
334   * @license MIT
335   *)
336
337@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js:
338  (**
339   * @remix-run/server-runtime v2.17.5
340   *
341   * Copyright (c) Remix Software Inc.
342   *
343   * This source code is licensed under the MIT license found in the
344   * LICENSE.md file in the root directory of this source tree.
345   *
346   * @license MIT
347   *)
348
349@remix-run/server-runtime/dist/esm/sessions/memoryStorage.js:
350  (**
351   * @remix-run/server-runtime v2.17.5
352   *
353   * Copyright (c) Remix Software Inc.
354   *
355   * This source code is licensed under the MIT license found in the
356   * LICENSE.md file in the root directory of this source tree.
357   *
358   * @license MIT
359   *)
360
361@remix-run/server-runtime/dist/esm/upload/errors.js:
362  (**
363   * @remix-run/server-runtime v2.17.5
364   *
365   * Copyright (c) Remix Software Inc.
366   *
367   * This source code is licensed under the MIT license found in the
368   * LICENSE.md file in the root directory of this source tree.
369   *
370   * @license MIT
371   *)
372
373@remix-run/server-runtime/dist/esm/upload/memoryUploadHandler.js:
374  (**
375   * @remix-run/server-runtime v2.17.5
376   *
377   * Copyright (c) Remix Software Inc.
378   *
379   * This source code is licensed under the MIT license found in the
380   * LICENSE.md file in the root directory of this source tree.
381   *
382   * @license MIT
383   *)
384
385@remix-run/server-runtime/dist/esm/index.js:
386  (**
387   * @remix-run/server-runtime v2.17.5
388   *
389   * Copyright (c) Remix Software Inc.
390   *
391   * This source code is licensed under the MIT license found in the
392   * LICENSE.md file in the root directory of this source tree.
393   *
394   * @license MIT
395   *)
396
397@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js:
398  (**
399   * @remix-run/react v2.17.5
400   *
401   * Copyright (c) Remix Software Inc.
402   *
403   * This source code is licensed under the MIT license found in the
404   * LICENSE.md file in the root directory of this source tree.
405   *
406   * @license MIT
407   *)
408
409@remix-run/react/dist/esm/invariant.js:
410  (**
411   * @remix-run/react v2.17.5
412   *
413   * Copyright (c) Remix Software Inc.
414   *
415   * This source code is licensed under the MIT license found in the
416   * LICENSE.md file in the root directory of this source tree.
417   *
418   * @license MIT
419   *)
420
421@remix-run/react/dist/esm/routeModules.js:
422  (**
423   * @remix-run/react v2.17.5
424   *
425   * Copyright (c) Remix Software Inc.
426   *
427   * This source code is licensed under the MIT license found in the
428   * LICENSE.md file in the root directory of this source tree.
429   *
430   * @license MIT
431   *)
432
433@remix-run/react/dist/esm/links.js:
434  (**
435   * @remix-run/react v2.17.5
436   *
437   * Copyright (c) Remix Software Inc.
438   *
439   * This source code is licensed under the MIT license found in the
440   * LICENSE.md file in the root directory of this source tree.
441   *
442   * @license MIT
443   *)
444
445@remix-run/react/dist/esm/markup.js:
446  (**
447   * @remix-run/react v2.17.5
448   *
449   * Copyright (c) Remix Software Inc.
450   *
451   * This source code is licensed under the MIT license found in the
452   * LICENSE.md file in the root directory of this source tree.
453   *
454   * @license MIT
455   *)
456
457@remix-run/react/dist/esm/data.js:
458  (**
459   * @remix-run/react v2.17.5
460   *
461   * Copyright (c) Remix Software Inc.
462   *
463   * This source code is licensed under the MIT license found in the
464   * LICENSE.md file in the root directory of this source tree.
465   *
466   * @license MIT
467   *)
468
469@remix-run/react/dist/esm/single-fetch.js:
470  (**
471   * @remix-run/react v2.17.5
472   *
473   * Copyright (c) Remix Software Inc.
474   *
475   * This source code is licensed under the MIT license found in the
476   * LICENSE.md file in the root directory of this source tree.
477   *
478   * @license MIT
479   *)
480
481@remix-run/react/dist/esm/errorBoundaries.js:
482  (**
483   * @remix-run/react v2.17.5
484   *
485   * Copyright (c) Remix Software Inc.
486   *
487   * This source code is licensed under the MIT license found in the
488   * LICENSE.md file in the root directory of this source tree.
489   *
490   * @license MIT
491   *)
492
493@remix-run/react/dist/esm/fallback.js:
494  (**
495   * @remix-run/react v2.17.5
496   *
497   * Copyright (c) Remix Software Inc.
498   *
499   * This source code is licensed under the MIT license found in the
500   * LICENSE.md file in the root directory of this source tree.
501   *
502   * @license MIT
503   *)
504
505@remix-run/react/dist/esm/routes.js:
506  (**
507   * @remix-run/react v2.17.5
508   *
509   * Copyright (c) Remix Software Inc.
510   *
511   * This source code is licensed under the MIT license found in the
512   * LICENSE.md file in the root directory of this source tree.
513   *
514   * @license MIT
515   *)
516
517@remix-run/react/dist/esm/fog-of-war.js:
518  (**
519   * @remix-run/react v2.17.5
520   *
521   * Copyright (c) Remix Software Inc.
522   *
523   * This source code is licensed under the MIT license found in the
524   * LICENSE.md file in the root directory of this source tree.
525   *
526   * @license MIT
527   *)
528
529@remix-run/react/dist/esm/components.js:
530  (**
531   * @remix-run/react v2.17.5
532   *
533   * Copyright (c) Remix Software Inc.
534   *
535   * This source code is licensed under the MIT license found in the
536   * LICENSE.md file in the root directory of this source tree.
537   *
538   * @license MIT
539   *)
540
541react-router/dist/index.js:
542  (**
543   * React Router v6.30.4
544   *
545   * Copyright (c) Remix Software Inc.
546   *
547   * This source code is licensed under the MIT license found in the
548   * LICENSE.md file in the root directory of this source tree.
549   *
550   * @license MIT
551   *)
552
553@remix-run/react/dist/esm/errors.js:
554  (**
555   * @remix-run/react v2.17.5
556   *
557   * Copyright (c) Remix Software Inc.
558   *
559   * This source code is licensed under the MIT license found in the
560   * LICENSE.md file in the root directory of this source tree.
561   *
562   * @license MIT
563   *)
564
565@remix-run/react/dist/esm/browser.js:
566  (**
567   * @remix-run/react v2.17.5
568   *
569   * Copyright (c) Remix Software Inc.
570   *
571   * This source code is licensed under the MIT license found in the
572   * LICENSE.md file in the root dir
572ectory of this source tree.
573   *
574   * @license MIT
575   *)
576
577@remix-run/react/dist/esm/scroll-restoration.js:
578  (**
579   * @remix-run/react v2.17.5
580   *
581   * Copyright (c) Remix Software Inc.
582   *
583   * This source code is licensed under the MIT license found in the
584   * LICENSE.md file in the root directory of this source tree.
585   *
586   * @license MIT
587   *)
588
589@remix-run/react/dist/esm/index.js:
590  (**
591   * @remix-run/react v2.17.5
592   *
593   * Copyright (c) Remix Software Inc.
594   *
595   * This source code is licensed under the MIT license found in the
596   * LICENSE.md file in the root directory of this source tree.
597   *
598   * @license MIT
599   *)
600*/

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.