1import{a as ze}from"/build/_shared/chunk-CKGZT7DU.js";import{b as vr,d as to,e as $e}from"/build/_shared/chunk-E5ZSF32D.js";function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$.apply(this,arguments)}function Nr(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((R,v)=>c(R,typeof R=="string"?null:R.state,v===0?"default":void 0));let o=s(r??a.length-1),i=B.Pop,l=null;function s(R){return Math.min(Math.max(R,0),a.length-1)}function u(){return a[o]}function c(R,v,w){v===void 0&&(v=null);let b=Je(a?u().pathname:"/",R,v,w);return xe(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(R)),b}function d(R){return typeof R=="string"?R:re(R)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL(R){return new URL(d(R),"http://localhost")},encodeLocation(R){let v=typeof R=="string"?Z(R):R;return{pathname:v.pathname||"",search:v.search||"",hash:v.hash||""}},push(R,v){i=B.Push;let w=c(R,v);o+=1,a.splice(o,a.length,w),n&&l&&l({action:i,location:w,delta:1})},replace(R,v){i=B.Replace;let w=c(R,v);a[o]=w,n&&l&&l({action:i,location:w,delta:0})},go(R){i=B.Pop;let v=s(o+R),w=a[v];o=v,l&&l({action:i,location:w,delta:R})},listen(R){return l=R,()=>{l=null}}}}function Dr(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:i,hash:l}=n.location;return Je("",{pathname:o,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:re(a)}return An(t,r,null,e)}function Cr(e){e===void 0&&(e={});function t(a,o){let{pathname:i="/",search:l="",hash:s=""}=Z(a.location.hash.substr(1));return Je("",{pathname:i,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(a,o){let i=a.document.querySelector("base"),l="";if(i&&i.getAttribute("href")){let s=a.location.href,u=s.indexOf("#");l=u===-1?s:s.slice(0,u)}return l+"#"+(typeof o=="string"?o:re(o))}function n(a,o){xe(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return An(t,r,n,e)}function D(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ro(){return Math.random().toString(36).substr(2,8)}function vn(e,t){return{usr:e.state,key:e.key,idx:t}}function Je(e,t,r,n){return r===void 0&&(r=null),$({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Z(t):t,{state:r,key:t&&t.key||n||ro()})}function re(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 Z(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 An(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l=B.Pop,s=null,u=c();u==null&&(u=0,i.replaceState($({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function d(){l=B.Pop;let b=c(),_=b==null?null:b-u;u=b,s&&s({action:l,location:w.location,delta:_})}function y(b,_){l=B.Push;let U=Je(w.location,b,_);r&&r(U,b),u=c()+1;let L=vn(U,u),f=w.createHref(U);try{i.pushState(L,"",f)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;a.location.assign(f)}o&&s&&s({action:l,location:w.location,delta:1})}function R(b,_){l=B.Replace;let U=Je(w.location,b,_);r&&r(U,b),u=c();let L=vn(U,u),f=w.createHref(U);i.replaceState(L,"",f),o&&s&&s({action:l,location:w.location,delta:0})}function v(b){let _=a.location.origin!=="null"?a.location.origin:a.location.href,U=typeof b=="string"?b:re(b);return D(_,"No window.location.(origin|href) available to create URL for href: "+U),new URL(U,_)}let w={get action(){return l},get location(){return e(a,i)},listen(b){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(gn,d),s=b,()=>{a.removeEventListener(gn,d),s=null}},createHref(b){return t(a,b)},createURL:v,encodeLocation(b){let _=v(b);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:y,replace:R,go(b){return i.go(b)}};return w}function ao(e){return e.index===!0}function br(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,o],l=typeof a.id=="string"?a.id:i.join("-");if(D(a.index!==!0||!a.children,"Cannot specify children on an index route"),D(!n[l],'Found a route id collision on i
1d "'+l+`". Route id's must be globally unique within Data Router usages`),ao(a)){let s=$({},a,t(a),{id:l});return n[l]=s,s}else{let s=$({},a,t(a),{id:l,children:void 0});return n[l]=s,a.children&&(s.children=br(a.children,t,i,n)),s}})}function ae(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Z(t):t,a=le(n.pathname||"/",r);if(a==null)return null;let o=Fn(e);oo(o);let i=null;for(let l=0;i==null&&l<o.length;++l)i=po(o[l],Ro(a));return i}function Fn(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,l)=>{let s={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};s.relativePath.startsWith("/")&&(D(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let u=he([n,s.relativePath]),c=r.concat(s);o.children&&o.children.length>0&&(D(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Fn(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:ho(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,i);else for(let s of On(o.path))a(o,i,s)}),t}function On(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=On(n.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function oo(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:mo(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}function ho(e,t){let r=e.split("/"),n=r.length;return r.some(En)&&(n+=fo),t&&(n+=so),r.filter(a=>!En(a)).reduce((a,o)=>a+(io.test(o)?lo:o===""?uo:co),n)}function mo(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 po(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let i=0;i<r.length;++i){let l=r[i],s=i===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",c=Ke({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u);if(!c)return null;
1Object.assign(n,c.params);let d=l.route;o.push({params:n,pathname:he([a,c.pathname]),pathnameBase:Eo(he([a,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(a=he([a,c.pathnameBase]))}return o}function kt(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(xe(!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,l,s)=>{if(l===s.length-1&&i==="*")return a(t["*"]);let c=i.match(/^:(\w+)(\??)$/);if(c){let[,d,y]=c,R=t[d];return D(y==="?"||R!=null,'Missing ":'+d+'" param'),a(R)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+o.join("/")}function Ke(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=yo(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,c,d)=>{if(c==="*"){let y=l[d]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}return u[c]=go(l[d]||"",c),u},{}),pathname:o,pathnameBase:i,pattern:e}}function yo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),xe(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,l)=>(n.push(l),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Ro(e){try{return decodeURI(e)}catch(t){return xe(!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 go(e,t){try{return decodeURIComponent(e)}catch(r){return xe(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function le(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 Et(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Z(e):e;return{pathname:r?r.startsWith("/")?r:vo(r,t):t,search:wo(n),hash:bo(a)}}function vo(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 Er(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 rt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function wt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Z(e):(a=$({},e),D(!a.pathname||!a.pathname.includes("?"),Er("?","pathname","search",a)),D(!a.pathname||!a.pathname.includes("#"),Er("#","pathname","hash",a)),D(!a.search||!a.search.includes("#"),Er("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(n||i==null)l=r;else{let d=t.length-1;if(i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),d-=1;a.pathname=y.join("/")}l=d>=0?t[d]:"/"}let s=Et(a,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}function xo(e){return e instanceof Promise&&e._tracked===!0}function So(e){if(!xo(e))return e;if(e._error)throw e._error;return e._data}function Re(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function xt(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;D(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 h=e.detectErrorBoundary;a=m=>({hasErrorBoundary:h(m)})}else a=Mo;let o={},i=br(e.routes,a,void 0,o),l,s=e.basename||"/",u=$({v7_normalizeFormMethod:!1,v7_prepe
1ndBasename:!1},e.future),c=null,d=new Set,y=null,R=null,v=null,w=e.hydrationData!=null,b=ae(i,e.history.location,s),_=null;if(b==null){let h=fe(404,{pathname:e.history.location.pathname}),{matches:m,route:g}=Cn(i);b=m,_={[g.id]:h}}let U=!b.some(h=>h.route.lazy)&&(!b.some(h=>h.route.loader)||e.hydrationData!=null),L,f={historyAction:e.history.action,location:e.history.location,matches:b,initialized:U,navigation:wr,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||_,fetchers:new Map,blockers:new Map},P=B.Pop,k=!1,O,J=!1,ne=!1,de=[],te=[],z=new Map,At=0,ct=-1,Qe=new Map,Ee=new Set,Ze=new Map,Ie=new Map,je=new Map,cr=!1;function Ha(){return c=e.history.listen(h=>{let{action:m,location:g,delta:S}=h;if(cr){cr=!1;return}xe(je.size===0||S!=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=mn({currentLocation:f.location,nextLocation:g,historyAction:m});if(F&&S!=null){cr=!0,e.history.go(S*-1),Ot(F,{state:"blocked",location:g,proceed(){Ot(F,{state:"proceeding",proceed:void 0,reset:void 0,location:g}),e.history.go(S)},reset(){let M=new Map(f.blockers);M.set(F,Ve),G({blockers:M})}});return}return Ne(m,g)}),f.initialized||Ne(B.Pop,f.location),L}function $a(){c&&c(),d.clear(),O&&O.abort(),f.fetchers.forEach((h,m)=>fr(m)),f.blockers.forEach((h,m)=>hn(m))}function za(h){return d.add(h),()=>d.delete(h)}function G(h){f=$({},f,h),d.forEach(m=>m(f))}function dt(h,m){var g,S;let F=f.actionData!=null&&f.navigation.formMethod!=null&&pe(f.navigation.formMethod)&&f.navigation.state==="loading"&&((g=h.state)==null?void 0:g._isRedirect)!==!0,M;m.actionData?Object.keys(m.actionData).length>0?M=m.actionData:M=null:F?M=f.actionData:M=null;let A=m.loaderData?Dn(f.loaderData,m.loaderData,m.matches||[],m.errors):f.loaderData,C=f.blockers;C.size>0&&(C=new Map(C),C.forEach((H,q)=>C.set(q,Ve)));let N=k===!0||f.navigation.formMethod!=null&&pe(f.navigation.formMethod)&&((S=h.state)==null?void 0:S._isRedirect)!==!0;l&&(i=l,l=void 0),J||P===B.Pop||(P===B.Push?e.history.push(h,h.state):P===B.Replace&&e.history.replace(h,h.state)),G($({},m,{actionData:M,loaderData:A,historyAction:P,location:h,initialized:!0,navigation:wr,revalidation:"idle",restoreScrollPosition:yn(h,m.matches||f.matches),preventScrollReset:N,blockers:C})),P=B.Pop,k=!1,J=!1,ne=!1,de=[],te=[]}async function ln(h,m){if(typeof h=="number"){e.history.go(h);return}let g=xr(f.location,f.matches,s,u.v7_prependBasename,h,m?.fromRouteId,m?.relative),{path:S,submission:F,error:M}=wn(u.v7_normalizeFormMethod,!1,g,m),A=f.location,C=Je(f.location,S,m&&m.state);C=$({},C,e.history.encodeLocation(C));let N=m&&m.replace!=null?m.replace:void 0,H=B.Push;N===!0?H=B.Replace:N===!1||F!=null&&pe(F.formMethod)&&F.formAction===f.location.pathname+f.location.search&&(H=B.Replace);let q=m&&"preventScrollReset"in m?m.preventScrollReset===!0:void 0,I=mn({currentLocation:A,nextLocation:C,historyAction:H});if(I){Ot(I,{state:"blocked",location:C,proceed(){Ot(I,{state:"proceeding",proceed:void 0,reset:void 0,location:C}),ln(h,m)},reset(){let W=new Map(f.blockers);W.set(I,Ve),G({blockers:W})}});return}return await Ne(H,C,{submission:F,pendingError:M,preventScrollReset:q,replace:m&&m.replace})}function Va(){if(dr(),G({revalidation:"loading"}),f.navigation.state!=="submitting"){if(f.navigation.state==="idle"){Ne(f.historyAction,f.location,{startUninterruptedRevalidation:!0});return}Ne(P||f.historyAction,f.navigation.location,{overrideNavigation:f.navigation})}}async function Ne(h,m,g){O&&O.abort(),O=null,P=h,J=(g&&g.startUninterruptedRevalidation)===!0,Za(f.location,f.matches),k=(g&&g.preventScrollReset)===!0;let S=l||i,F=g&&g.overrideNavigation,M=ae(S,m,s);if(!M){let W=fe(404,{pathname:m.pathname}),{matches:Q,route:Be}=Cn(S);hr(),dt(m,{matches:Q,loaderData:{},errors:{[Be.id]:W}});return}if(f.initialized&&!ne&&To(f.location,m)&&!(g&&g.submission&&pe(g.submission.formMethod))){dt(m,{matches:M});return}O=new AbortController;let A=yt(e.history,m,O.signal,g&&g.submission),C,N;if(g&&g.pendingError)N={[et(M).route.id]:g.pendingError};else if(g&&g.submission&&pe(g.submission.formMethod)){let W=await Wa(A,m,g.submission,M,{replace:g.replace});if(W.shortCircuited)return;C=W.pendingActionData,N=W.pendingActionError,F=Tt(m,g.submission),A=new Request
1(A.url,{signal:A.signal})}let{shortCircuited:H,loaderData:q,errors:I}=await Ja(A,m,M,F,g&&g.submission,g&&g.fetcherSubmission,g&&g.replace,C,N);H||(O=null,dt(m,$({matches:M},C?{actionData:C}:{},{loaderData:q,errors:I})))}async function Wa(h,m,g,S,F){F===void 0&&(F={}),dr();let M=Ho(m,g);G({navigation:M});let A,C=_r(S,m);if(!C.route.action&&!C.route.lazy)A={type:Y.error,error:fe(405,{method:h.method,pathname:m.pathname,routeId:C.route.id})};else if(A=await pt("action",h,C,S,o,a,s),h.signal.aborted)return{shortCircuited:!0};if(tt(A)){let N;return F&&F.replace!=null?N=F.replace:N=A.location===f.location.pathname+f.location.search,await ft(f,A,{submission:g,replace:N}),{shortCircuited:!0}}if(gt(A)){let N=et(S,C.route.id);return(F&&F.replace)!==!0&&(P=B.Push),{pendingActionData:{},pendingActionError:{[N.route.id]:A.error}}}if(We(A))throw fe(400,{type:"defer-action"});return{pendingActionData:{[C.route.id]:A.data}}}async function Ja(h,m,g,S,F,M,A,C,N){let H=S||Tt(m,F),q=F||M||Mn(H),I=l||i,[W,Q]=bn(e.history,f,g,q,m,ne,de,te,Ze,Ee,I,s,C,N);if(hr(j=>!(g&&g.some(me=>me.route.id===j))||W&&W.some(me=>me.route.id===j)),ct=++At,W.length===0&&Q.length===0){let j=dn();return dt(m,$({matches:g,loaderData:{},errors:N||null},C?{actionData:C}:{},j?{fetchers:new Map(f.fetchers)}:{})),{shortCircuited:!0}}if(!J){Q.forEach(me=>{let Ce=f.fetchers.get(me.key),gr=Rt(void 0,Ce?Ce.data:void 0);f.fetchers.set(me.key,gr)});let j=C||f.actionData;G($({navigation:H},j?Object.keys(j).length===0?{actionData:null}:{actionData:j}:{},Q.length>0?{fetchers:new Map(f.fetchers)}:{}))}Q.forEach(j=>{z.has(j.key)&&De(j.key),j.controller&&z.set(j.key,j.controller)});let Be=()=>Q.forEach(j=>De(j.key));O&&O.signal.addEventListener("abort",Be);let{results:He,loaderResults:ht,fetcherResults:mr}=await un(f.matches,g,W,Q,h);if(h.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Be),Q.forEach(j=>z.delete(j.key));let we=Ln(He);if(we){if(we.idx>=W.length){let j=Q[we.idx-W.length].key;Ee.add(j)}return await ft(f,we.result,{replace:A}),{shortCircuited:!0}}let{loaderData:be,errors:Ut}=Nn(f,g,W,ht,N,Q,mr,Ie);Ie.forEach((j,me)=>{j.subscribe(Ce=>{(Ce||j.done)&&Ie.delete(me)})});let pr=dn(),yr=fn(ct),Rr=pr||yr||Q.length>0;return $({loaderData:be,errors:Ut},Rr?{fetchers:new Map(f.fetchers)}:{})}function sn(h){return f.fetchers.get(h)||Po}function Ka(h,m,g,S){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.");z.has(h)&&De(h);let F=l||i,M=xr(f.location,f.matches,s,u.v7_prependBasename,g,m,S?.relative),A=ae(F,M,s);if(!A){Ft(h,m,fe(404,{pathname:M}));return}let{path:C,submission:N,error:H}=wn(u.v7_normalizeFormMethod,!0,M,S);if(H){Ft(h,m,H);return}let q=_r(A,C);if(k=(S&&S.preventScrollReset)===!0,N&&pe(N.formMethod)){Xa(h,m,C,q,A,N);return}Ze.set(h,{routeId:m,path:C}),Ya(h,m,C,q,A,N)}async function Xa(h,m,g,S,F,M){if(dr(),Ze.delete(h),!S.route.action&&!S.route.lazy){let X=fe(405,{method:M.formMethod,pathname:g,routeId:m});Ft(h,m,X);return}let A=f.fetchers.get(h),C=$o(M,A);f.fetchers.set(h,C),G({fetchers:new Map(f.fetchers)});let N=new AbortController,H=yt(e.history,g,N.signal,M);z.set(h,N);let q=At,I=await pt("action",H,S,F,o,a,s);if(H.signal.aborted){z.get(h)===N&&z.delete(h);return}if(tt(I))if(z.delete(h),ct>q){let X=qe(void 0);f.fetchers.set(h,X),G({fetchers:new Map(f.fetchers)});return}else{Ee.add(h);let X=Rt(M);return f.fetchers.set(h,X),G({fetchers:new Map(f.fetchers)}),ft(f,I,{submission:M,isFetchActionRedirect:!0})}if(gt(I)){Ft(h,m,I.error);return}if(We(I))throw fe(400,{type:"defer-action"});let W=f.navigation.location||f.location,Q=yt(e.history,W,N.signal),Be=l||i,He=f.navigation.state!=="idle"?ae(Be,f.navigation.location,s):f.matches;D(He,"Didn't find any matches after fetcher action");let ht=++At;Qe.set(h,ht);let mr=Rt(M,I.data);f.fetchers.set(h,mr);let[we,be]=bn(e.history,f,He,M,W,ne,de,te,Ze,Ee,Be,s,{[S.route.id]:I.data},void 0);be.filter(X=>X.key!==h).forEach(X=>{let mt=X.key,Rn=f.fetchers.get(mt),eo=Rt(void 0,Rn?Rn.data:void 0);f.fetchers.set(mt,eo),z.has(mt)&&De(mt),X.controller&&z.set(mt,X.controller)}),G({fetchers:new Map(f.fetchers)});let Ut=()=>be.forEach(X=>De(X.key));N.signal.addEventListener("abort",Ut);let{results:pr,loaderResults:yr,fetcherResults:Rr}=await un(f.matches,He,we,be,Q);if(N.signal.aborted)return;N.signal.removeEventListener("abort",Ut),Qe.delete(h),z.delete(h),be.forEach(X=>z.delete(X.key));let j=Ln(pr);if(j){if(j.idx>=we.length){let X=be[j.idx-we.length].key;Ee.add(X)}return ft(f,j.result)}let{loaderData:me,errors:Ce}=Nn(f,f.matches,we,yr,void 0,be,Rr,Ie);if(f.fetchers.has(h)){let X=qe(I.data);f.fetchers.set(h,X)}let gr=fn(ht);f.navigation.state==="loading"&&ht>ct?(D(P,"Expected pending action"),O&&O.abort(),dt(f.navigation.location,{matches:He,loaderData:me,errors:Ce,fetchers:new Map(f.fetchers)})):(G($({errors:Ce,loaderData:Dn(f.loaderData,me,He,Ce)},gr||be.length>0?{fetchers:new Map(f.fetchers)}:{})),ne=!1)}async function Ya(h,m,g,S,F,M){let A=f.fetchers.get(h),C=Rt(M,A?A.data:void 0);f.fetchers.set(h,C),G({fetchers:new Map(f.fetchers)});let N=new AbortController,H=yt(e.history,g,N.signal);z.set(h,N);let q=At,I=await pt("loader",H,S,F,o,a,s);if(We(I)&&(I=await jn(I,H.signal,!0)||I),z.get(h)===N&&z.delete(h),H.signal.aborted)return;if(tt(I))if(ct>q){let Q=qe(void 0);f.fetchers.set(h,Q),G({fetchers:new Map(f.fetchers)});return}else{Ee.add(h),await ft(f,I);return}if(gt(I)){let Q=et(f.matches,m);f.fetchers.delete(h),G({fetchers:new Map(f.fetchers),errors:{[Q.route.id]:I.error}});return}D(!We(I),"Unhandled fetcher deferred data");let W=qe(I.data);f.fetchers.set(h,W),G({fetchers:new Map(f.fetchers)})}async function ft(h,m,g){let{submission:S,replace:F,isFetchActionRedirect:M}=g===void 0?{}:g;m.revalidate&&(ne=!0);let A=Je(h.location,m.location,$({_isRedirect:!0},M?{_isFetchActionRedirect:!0}:{}));if(D(A,"Expected a location on the redirect navigation"),Tn.test(m.location)&&r){let H=e.history.createURL(m.location),q=le(H.pathname,s)==null;if(t.location.origin!==H.origin||q){F?t.location.replace(m.location):t.location.assign(m.location);return}}O=null;let C=F===!0?B.Replace:B.Push,N=S||Mn(h.navigation);if(Lo.has(m.status)&&N&&pe(N.formMethod))await Ne(C,A,{submission:$({},N,{formAction:m.location}),preventScrollReset:k});else if(M)await Ne(C,A,{overrideNavigation:Tt(A),fetcherSubmission:N,preventScrollReset:k});else{let H=Tt(A,N);await Ne(C,A,{overrideNavigation:H,preventScrollReset:k})}}async function un(h,m,g,S,F){let M=await Promise.all([...g.map(N=>pt("loader",F,N,m,o,a,s)),...S.map(N=>N.matches&&N.match&&N.controller?pt("loader",yt(e.history,N.path,N.controller.signal),N.match,N.matches,o,a,s):{type:Y.error,error:fe(404,{pathname:N.path})})]),A=M.slice(0,g.length),C=M.slice(g.length);return await Promise.all([Pn(h,g,A,A.map(()=>F.signal),!1,f.loaderData),Pn(h,S.map(N=>N.match),C,S.map(N=>N.controller?N.controller.signal:null),!0)]),{results:M,loaderResults:A,fetcherResults:C}}function dr(){ne=!0,de.push(...hr()),Ze.forEach((h,m)=>{z.has(m)&&(te.push(m),De(m))})}function Ft(h,m,g){let S=et(f.matches,m);fr(h),G({errors:{[S.route.id]:g},fetchers:new Map(f.fetchers)})}function fr(h){let m=f.fetchers.get(h);z.has(h)&&!(m&&m.state==="loading"&&Qe.has(h))&&De(h),Ze.delete(h),Qe.delete(h),Ee.delete(h),f.fetchers.delete(h)}function De(h){let m=z.get(h);D(m,"Expected fetch controller: "+h),m.abort(),z.delete(h)}function cn(h){for(let m of h){let g=sn(m),S=qe(g.data);f.fetchers.set(m,S)}}function dn(){let h=[],m=!1;for(let g of Ee){let S=f.fetchers.get(g);D(S,"Expected fetcher: "+g),S.state==="loading"&&(Ee.delete(g),h.push(g),m=!0)}
1return cn(h),m}function fn(h){let m=[];for(let[g,S]of Qe)if(S<h){let F=f.fetchers.get(g);D(F,"Expected fetcher: "+g),F.state==="loading"&&(De(g),Qe.delete(g),m.push(g))}return cn(m),m.length>0}function Ga(h,m){let g=f.blockers.get(h)||Ve;return je.get(h)!==m&&je.set(h,m),g}function hn(h){f.blockers.delete(h),je.delete(h)}function Ot(h,m){let g=f.blockers.get(h)||Ve;D(g.state==="unblocked"&&m.state==="blocked"||g.state==="blocked"&&m.state==="blocked"||g.state==="blocked"&&m.state==="proceeding"||g.state==="blocked"&&m.state==="unblocked"||g.state==="proceeding"&&m.state==="unblocked","Invalid blocker state transition: "+g.state+" -> "+m.state);let S=new Map(f.blockers);S.set(h,m),G({blockers:S})}function mn(h){let{currentLocation:m,nextLocation:g,historyAction:S}=h;if(je.size===0)return;je.size>1&&xe(!1,"A router only supports one blocker at a time");let F=Array.from(je.entries()),[M,A]=F[F.length-1],C=f.blockers.get(M);if(!(C&&C.state==="proceeding")&&A({currentLocation:m,nextLocation:g,historyAction:S}))return M}function hr(h){let m=[];return Ie.forEach((g,S)=>{(!h||h(S))&&(g.cancel(),m.push(S),Ie.delete(S))}),m}function Qa(h,m,g){if(y=h,v=m,R=g||null,!w&&f.navigation===wr){w=!0;let S=yn(f.location,f.matches);S!=null&&G({restoreScrollPosition:S})}return()=>{y=null,v=null,R=null}}function pn(h,m){return R&&R(h,m.map(S=>Bo(S,f.loaderData)))||h.key}function Za(h,m){if(y&&v){let g=pn(h,m);y[g]=v()}}function yn(h,m){if(y){let g=pn(h,m),S=y[g];if(typeof S=="number")return S}return null}function qa(h){o={},l=br(h,a,void 0,o)}return L={get basename(){return s},get state(){return f},get routes(){return i},initialize:Ha,subscribe:za,enableScrollRestoration:Qa,navigate:ln,fetch:Ka,revalidate:Va,createHref:h=>e.history.createHref(h),encodeLocation:h=>e.history.encodeLocation(h),getFetcher:sn,deleteFetcher:fr,dispose:$a,getBlocker:Ga,deleteBlocker:hn,_internalFetchControllers:z,_internalActiveDeferreds:Ie,_internalSetRoutes:qa},L}function Ao(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function xr(e,t,r,n,a,o,i){let l,s;if(o!=null&&i!=="path"){l=[];for(let c of t)if(l.push(c),c.route.id===o){s=c;break}}else l=t,s=t[t.length-1];let u=wt(a||".",rt(l).map(c=>c.pathnameBase),le(e.pathname,r)||e.pathname,i==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&s&&s.route.index&&!Mr(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:he([r,u.pathname])),re(u)}function wn(e,t,r,n){if(!n||!Ao(n))return{path:r};if(n.formMethod&&!jo(n.formMethod))return{path:r,error:fe(405,{method:n.formMethod})};let a=()=>({path:r,error:fe(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),l=In(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!pe(i))return a();let y=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((R,v)=>{let[w,b]=v;return""+R+w+"="+b+` 2`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:y}}}else if(n.formEncType==="application/json"){if(!pe(i))return a();try{let y=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}D(typeof FormData=="function","FormData is not available in this environment");let s,u;if(n.formData)s=Sr(n.formData),u=n.formData;else if(n.body instanceof FormData)s=Sr(n.body),u=n.body;else if(n.body instanceof URLSearchParams)s=n.body,u=_n(s);else if(n.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(n.body),u=_n(s)}catch{return a()}let c={formMethod:i,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(pe(c.formMethod))return{path:r,submission:c};let d=Z(r);return t&&d.search&&Mr(d.search)&&s.append("index",""),d.search="?"+s,{path:re(d),submission:c}}function Fo(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function bn(e,t,r,n,a,o,i,l,s,u,c,d,y,R){let v=R?Object.values(R)[0]:y?Object.values(y)[0]:void 0,w=e.createURL(t.location),b=e.createURL(a),_=R?Object.keys(R)[0]:void 0,L=Fo(r,_).filter((P,k)=>{if(P.route.lazy)return!0;
2if(P.route.loader==null)return!1;if(Oo(t.loaderData,t.matches[k],P)||i.some(ne=>ne===P.route.id))return!0;let O=t.matches[k],J=P;return xn(P,$({currentUrl:w,currentParams:O.params,nextUrl:b,nextParams:J.params},n,{actionResult:v,defaultShouldRevalidate:o||w.pathname+w.search===b.pathname+b.search||w.search!==b.search||kn(O,J)}))}),f=[];return s.forEach((P,k)=>{if(!r.some(te=>te.route.id===P.routeId))return;let O=ae(c,P.path,d);if(!O){f.push({key:k,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let J=t.fetchers.get(k),ne=_r(O,P.path),de=!1;u.has(k)?de=!1:l.includes(k)?de=!0:J&&J.state!=="idle"&&J.data===void 0?de=o:de=xn(ne,$({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:v,defaultShouldRevalidate:o})),de&&f.push({key:k,routeId:P.routeId,path:P.path,matches:O,match:ne,controller:new AbortController})}),[L,f]}function Oo(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function kn(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function xn(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function Sn(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];D(a,"No route found in manifest");let o={};for(let i in n){let s=a[i]!==void 0&&i!=="hasErrorBoundary";xe(!s,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!s&&!no.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,$({},t(a),{lazy:void 0}))}async function pt(e,t,r,n,a,o,i,l){l===void 0&&(l={});let s,u,c,d=v=>{let w,b=new Promise((_,U)=>w=U);return c=()=>w(),t.signal.addEventListener("abort",c),Promise.race([v({request:t,params:r.params,context:l.requestContext}),b])};try{let v=r.route[e];if(r.route.lazy)if(v)u=(await Promise.all([d(v),Sn(r.route,o,a)]))[0];else if(await Sn(r.route,o,a),v=r.route[e],v)u=await d(v);else if(e==="action"){let w=new URL(t.url),b=w.pathname+w.search;throw fe(405,{method:t.method,pathname:b,routeId:r.route.id})}else return{type:Y.data,data:void 0};else if(v)u=await d(v);else{let w=new URL(t.url),b=w.pathname+w.search;throw fe(404,{pathname:b})}D(u!==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(v){s=Y.error,u=v}finally{c&&t.signal.removeEventListener("abort",c)}if(Io(u)){let v=u.status;if(Co.has(v)){let _=u.headers.get("Location");if(D(_,"Redirects returned/thrown from loaders/actions must have a Location header"),!Tn.test(_))_=xr(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,_);else if(!l.isStaticRequest){let U=new URL(t.url),L=_.startsWith("//")?new URL(U.protocol+_):new URL(_),f=le(L.pathname,i)!=null;L.origin===U.origin&&f&&(_=L.pathname+L.search+L.hash)}if(l.isStaticRequest)throw u.headers.set("Location",_),u;return{type:Y.redirect,status:v,location:_,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(l.isRouteRequest)throw{type:s||Y.data,response:u};let w,b=u.headers.get("Content-Type");return b&&/\bapplication\/json\b/.test(b)?w=await u.json():w=await u.text(),s===Y.error?{type:s,error:new Le(v,u.statusText,w),headers:u.headers}:{type:Y.data,data:w,statusCode:u.status,headers:u.headers}}if(s===Y.error)return{type:s,error:u};if(ko(u)){var y,R;return{type:Y.deferred,deferredData:u,statusCode:(y=u.init)==null?void 0:y.status,headers:((R=u.init)==null?void 0:R.headers)&&new Headers(u.init.headers)}}return{type:Y.data,data:u}}function yt(e,t,r,n){let a=e.createURL(In(t)).toString(),o={signal:r};if(n&&pe(n.formMethod)){let{formMethod:i,formEncType:l}=n;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(n.json)):l==="text/plain"?o.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?o.body=Sr(n.formData):o.body=n.formData}
2return new Request(a,o)}function Sr(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function _n(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Uo(e,t,r,n,a){let o={},i=null,l,s=!1,u={};return r.forEach((c,d)=>{let y=t[d].route.id;if(D(!tt(c),"Cannot handle redirect results in processLoaderData"),gt(c)){let R=et(e,y),v=c.error;n&&(v=Object.values(n)[0],n=void 0),i=i||{},i[R.route.id]==null&&(i[R.route.id]=v),o[y]=void 0,s||(s=!0,l=Re(c.error)?c.error.status:500),c.headers&&(u[y]=c.headers)}else We(c)?(a.set(y,c.deferredData),o[y]=c.deferredData.data):o[y]=c.data,c.statusCode!=null&&c.statusCode!==200&&!s&&(l=c.statusCode),c.headers&&(u[y]=c.headers)}),n&&(i=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function Nn(e,t,r,n,a,o,i,l){let{loaderData:s,errors:u}=Uo(t,r,n,a,l);for(let c=0;c<o.length;c++){let{key:d,match:y,controller:R}=o[c];D(i!==void 0&&i[c]!==void 0,"Did not find corresponding fetcher result");let v=i[c];if(!(R&&R.signal.aborted))if(gt(v)){let w=et(e.matches,y?.route.id);u&&u[w.route.id]||(u=$({},u,{[w.route.id]:v.error})),e.fetchers.delete(d)}else if(tt(v))D(!1,"Unhandled fetcher revalidation redirect");else if(We(v))D(!1,"Unhandled fetcher deferred data");else{let w=qe(v.data);e.fetchers.set(d,w)}}return{loaderData:s,errors:u}}function Dn(e,t,r,n){let a=$({},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 et(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 Cn(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function fe(e,t){let{pathname:r,routeId:n,method:a,type:o}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="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?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",l='No route matches URL "'+r+'"'):e===405&&(i="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 Le(e||500,i,new Error(l),!0)}function Ln(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(tt(r))return{result:r,idx:t}}}function In(e){let t=typeof e=="string"?Z(e):e;return re($({},t,{hash:""}))}function To(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function We(e){return e.type===Y.deferred}function gt(e){return e.type===Y.error}function tt(e){return(e&&e.type)===Y.redirect}function ko(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 Io(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function jo(e){return Do.has(e.toLowerCase())}function pe(e){return _o.has(e.toLowerCase())}async function Pn(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let l=r[i],s=t[i];if(!s)continue;let u=e.find(d=>d.route.id===s.route.id),c=u!=null&&!kn(u,s)&&(o&&o[s.route.id])!==void 0;if(We(l)&&(a||c)){let d=n[i];D(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await jn(l,d,a).then(y=>{y&&(r[i]=y||r[i])})}}}async function jn(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Y.data,data:e.deferredData.unwrappedData}}catch(a){return{type:Y.error,error:a}}return{type:Y.data,data:e.deferredData.data}}}function Mr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Bo(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 _r(e,t){let r=typeof t=="string"?Z(t).search:t.search;if(e[e.length-1].route.index&&Mr(r||""))return e[e.length-1];let n=rt(e);return n[n.length-1]}function Mn(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;
2if(!(!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 Tt(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 Ho(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 Rt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function $o(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}function qe(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}var B,gn,Y,no,io,lo,so,uo,co,fo,En,he,Eo,wo,bo,Lr,ye,vt,Pr,bt,Le,Un,_o,No,Do,Co,Lo,wr,Po,Ve,Tn,Mo,cl,nt=vr(()=>{(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(B||(B={}));gn="popstate";(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Y||(Y={}));no=new Set(["lazy","caseSensitive","path","id","index","children"]);io=/^:\w+$/,lo=3,so=2,uo=1,co=10,fo=-2,En=e=>e==="*";he=e=>e.join("/").replace(/\/\/+/g,"/"),Eo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bo=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Lr=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),$({},n,{headers:a}))},ye=class extends Error{},vt=class{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],D(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 ye("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[l,s]=i;return Object.assign(o,{[l]:this.trackPromise(l,s)})},{}),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 ye)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)=>
2this.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 D(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]:So(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}};Pr=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new vt(t,n)},bt=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,$({},n,{headers:a}))},Le=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}};Un=["post","put","patch","delete"],_o=new Set(Un),No=["get",...Un],Do=new Set(No),Co=new Set([301,302,303,307,308]),Lo=new Set([307,308]),wr={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Po={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ve={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Tn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mo=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});cl=Symbol("deferred")});function Xe(){return Xe=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},Xe.apply(this,arguments)}function Pe(e,t){let{relative:r}=t===void 0?{}:t;_e()||D(!1);let{basename:n,navigator:a}=p.useContext(ie),{hash:o,pathname:i,search:l}=Me(e,{relative:r}),s=i;return n!=="/"&&(s=i==="/"?n:he([n,i])),a.createHref({pathname:s,search:l,hash:o})}function _e(){return p.useContext(Ye)!=null}function K(){return _e()||D(!1),p.useContext(Ye).location}function Or(){return p.useContext(Ye).navigationType}function Ur(e){_e()||D(!1);let{pathname:t}=K();return p.useMemo(()=>Ke(e,t),[t,e])}function Hn(e){p.useContext(ie).static||p.useLayoutEffect(e)}function Ge(){let{isDataRoute:e}=p.useContext(ee);return e?Yo():zo()}function zo(){_e()||D(!1);let e=p.useContext(ge),{basename:t,navigator:r}=p.useContext(ie),{matches:n}=p.useContext(ee),{pathname:a}=K(),o=JSON.stringify(rt(n).map(s=>s.pathnameBase)),i=p.useRef(!1);return Hn(()=>{i.current=!0}),p.useCallback(function(s,u){if(u===void 0&&(u={}),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=wt(s,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:he([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,a,e])}function Tr(){return p.useContext($n)}function Bt(e){let t=p.useContext(ee).outlet;return t&&p.createElement($n.Provider,{value:e},t)}function kr(){let{matches:e}=p.useContext(ee),t=e[e.length-1];return t?t.params:{}}function Me(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=p.useContext(ee),{pathname:a}=K(),o=JSON.stringify(rt(n).map(i=>i.pathnameBase));return p.useMemo(()=>wt(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function Ir(e,t){return zn(e,t)}function zn(e,t,r){_e()||D(!1);let{navigator:n}=p.useContext(ie),{matches:a}=p.useContext(ee),o=a[a.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route,c=K(),d;if(t){var y;let _=typeof t=="string"?Z(t):t;s==="/"||(y=_.pathname)!=null&&y.startsWith(s)||D(!1),d=_}else d=c;let R=d.pathname||"/",v=s==="/"?R:R.slice(s.length)||"/",w=ae(e,{pathname:v}),b=Vn(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},i,_.params),pathname:he([s,n.encodeLocation?n.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?s:he([s,n.encodeLocation?n.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),a,r);return t&&b?p.createElement(Ye.Provider,{value:{location:Xe({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:B.Pop}},b):b}function Vo(){let e=Oe(),t=Re(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application
2Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:a},r):null,null)}function Jo(e){let{routeContext:t,match:r,children:n}=e,a=p.useContext(ge);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(ee.Provider,{value:t},n)}function Vn(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var a;if((a=r)!=null&&a.errors)e=r.matches;else return null}let o=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let l=o.findIndex(s=>s.route.id&&i?.[s.route.id]);l>=0||D(!1),o=o.slice(0,Math.min(o.length,l+1))}return o.reduceRight((l,s,u)=>{let c=s.route.id?i?.[s.route.id]:null,d=null;r&&(d=s.route.errorElement||Wo);let y=t.concat(o.slice(0,u+1)),R=()=>{let v;return c?v=d:s.route.Component?v=p.createElement(s.route.Component,null):s.route.element?v=s.route.element:v=l,p.createElement(Jo,{match:s,routeContext:{outlet:l,matches:y,isDataRoute:r!=null},children:v})};return r&&(s.route.ErrorBoundary||s.route.errorElement||u===0)?p.createElement(Ar,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:R(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):R()},null)}function jr(e){let t=p.useContext(ge);return t||D(!1),t}function Ae(e){let t=p.useContext(Se);return t||D(!1),t}function Ko(e){let t=p.useContext(ee);return t||D(!1),t}function Ht(e){let t=Ko(e),r=t.matches[t.matches.length-1];return r.route.id||D(!1),r.route.id}function $t(){return Ht(oe.UseRouteId)}function Fe(){return Ae(oe.UseNavigation).navigation}function Br(){let e=jr(St.UseRevalidator),t=Ae(oe.UseRevalidator);return{revalidate:e.router.revalidate,state:t.revalidation}}function ot(){let{matches:e,loaderData:t}=Ae(oe.UseMatches);return p.useMemo(()=>e.map(r=>{let{pathname:n,params:a}=r;return{id:r.route.id,pathname:n,params:a,data:t[r.route.id],handle:r.route.handle}}),[e,t])}function zt(){let e=Ae(oe.UseLoaderData),t=Ht(oe.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function Vt(e){return Ae(oe.UseRouteLoaderData).loaderData[e]}function Wt(){let e=Ae(oe.UseActionData);return p.useContext(ee)||D(!1),Object.values(e?.actionData||{})[0]}function Oe(){var e;
2let t=p.useContext(Bn),r=Ae(oe.UseRouteError),n=Ht(oe.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Jt(){let e=p.useContext(It);return e?._data}function _t(){let e=p.useContext(It);return e?._error}function Nt(e){let{router:t,basename:r}=jr(St.UseBlocker),n=Ae(oe.UseBlocker),[a,o]=p.useState(""),i=p.useCallback(l=>{if(typeof e!="function")return!!e;if(r==="/")return e(l);let{currentLocation:s,nextLocation:u,historyAction:c}=l;return e({currentLocation:Xe({},s,{pathname:le(s.pathname,r)||s.pathname}),nextLocation:Xe({},u,{pathname:le(u.pathname,r)||u.pathname}),historyAction:c})},[r,e]);return p.useEffect(()=>{let l=String(++Xo);return o(l),()=>t.deleteBlocker(l)},[t]),p.useEffect(()=>{a!==""&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):Ve}function Yo(){let{router:e}=jr(St.UseNavigateStable),t=Ht(oe.UseNavigateStable),r=p.useRef(!1);return Hn(()=>{r.current=!0}),p.useCallback(function(a,o){o===void 0&&(o={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Xe({fromRouteId:t},o)))},[e,t])}function Kt(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=p.useState(r.state),{v7_startTransition:i}=n||{},l=p.useCallback(d=>{i&&jt?jt(()=>o(d)):o(d)},[o,i]);p.useLayoutEffect(()=>r.subscribe(l),[r,l]);let s=p.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:d=>r.navigate(d),push:(d,y,R)=>r.navigate(d,{state:y,preventScrollReset:R?.preventScrollReset}),replace:(d,y,R)=>r.navigate(d,{replace:!0,state:y,preventScrollReset:R?.preventScrollReset})}),[r]),u=r.basename||"/",c=p.useMemo(()=>({router:r,navigator:s,static:!1,basename:u}),[r,s,u]);return p.createElement(p.Fragment,null,p.createElement(ge.Provider,{value:c},p.createElement(Se.Provider,{value:a},p.createElement(Ue,{basename:u,location:a.location,navigationType:a.historyAction,navigator:s},a.initialized?p.createElement(Qo,{routes:r.routes,state:a}):t))),null)}function Qo(e){let{routes:t,state:r}=e;return zn(t,void 0,r)}function Wn(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,i=p.useRef();i.current==null&&(i.current=Nr({initialEntries:n,initialIndex:a,v5Compat:!0}));let l=i.current,[s,u]=p.useState({action:l.action,location:l.location}),{v7_startTransition:c}=o||{},d=p.useCallback(y=>{c&&jt?jt(()=>u(y)):u(y)},[u,c]);return p.useLayoutEffect(()=>l.listen(d),[l,d]),p.createElement(Ue,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:l})}function Jn(e){let{to:t,replace:r,state:n,relative:a}=e;_e()||D(!1);let{matches:o}=p.useContext(ee),{pathname:i}=K(),l=Ge(),s=wt(t,rt(o).map(c=>c.pathnameBase),i,a==="path"),u=JSON.stringify(s);return p.useEffect(()=>l(JSON.parse(u),{replace:r,state:n,relative:a}),[l,u,a,r,n]),null}function Dt(e){return Bt(e.context)}function Hr(e){D(!1)}function Ue(e){let{basename:t="/",children:r=null,location:n,navigationType:a=B.Pop,navigator:o,static:i=!1}=e;_e()&&D(!1);let l=t.replace(/^\/*/,"/"),s=p.useMemo(()=>({basename:l,navigator:o,static:i}),[l,o,i]);typeof n=="string"&&(n=Z(n));let{pathname:u="/",search:c="",hash:d="",state:y=null,key:R="default"}=n,v=p.useMemo(()=>{let w=le(u,l);return w==null?null:{location:{pathname:w,search:c,hash:d,state:y,key:R},navigationType:a}},[l,u,c,d,y,R,a]);return v==null?null:p.createElement(ie.Provider,{value:s},p.createElement(Ye.Provider,{children:r,value:v}))}function Kn(e){let{children:t,location:r}=e;return Ir(at(t),r)}function Xt(e){let{children:t,errorElement:r,resolve:n}=e;return p.createElement(Fr,{resolve:n,errorElement:r},p.createElement(qo,null,t))}function qo(e){let{children:t}=e,r=Jt(),n=typeof t=="function"?t(r):t;return p.createElement(p.Fragment,null,n)}function at(e,t){t===void 0&&(t=[]);let r=[];return p.Children.forEach(e,(n,a)=>{if(!p.isValidElement(n))return;let o=[...t,a];if(n.type===p.Fragment){r.push.apply(r,at(n.props.children,o));return}n.type!==Hr&&D(!1),!n.props.index||!n.props.children||D(!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,
2shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=at(n.props.children,o)),r.push(i)}),r}function Xn(e){return Vn(e)}function Yt(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Yn(e,t){return xt({basename:t?.basename,future:Xe({},t?.future,{v7_prependBasename:!0}),history:Nr({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:Yt}).initialize()}var p,ge,Se,It,ie,Ye,ee,Bn,$n,Wo,Ar,St,oe,Xo,Go,jt,se,Zo,Fr,$r=vr(()=>{p=$e(ze());nt();nt();ge=p.createContext(null),Se=p.createContext(null),It=p.createContext(null),ie=p.createContext(null),Ye=p.createContext(null),ee=p.createContext({outlet:null,matches:[],isDataRoute:!1}),Bn=p.createContext(null);$n=p.createContext(null);Wo=p.createElement(Vo,null),Ar=class extends p.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||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?p.createElement(ee.Provider,{value:this.props.routeContext},p.createElement(Bn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(St||(St={}));(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(oe||(oe={}));Xo=0;Go="startTransition",jt=p[Go];(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(se||(se={}));Zo=new Promise(()=>{}),Fr=class extends p.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=se.pending;if(!(n instanceof Promise))o=se.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=se.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=a._error!==void 0?se.error:a._data!==void 0?se.success:se.pending):(o=se.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===se.error&&a._error instanceof ye)throw Zo;if(o===se.error&&!r)throw a._error;if(o===se.error)return p.createElement(It.Provider,{value:a,children:r});if(o===se.success)return p.createElement(It.Provider,{value:a,children:t});throw a}}});var xi={};to(xi,{AbortedDeferredError:()=>ye,Await:()=>Xt,BrowserRouter:()=>mi,Form:()=>qn,HashRouter:()=>pi,Link:()=>rr,MemoryRouter:()=>Wn,NavLink:()=>Kr,Navigate:()=>Jn,NavigationType:()=>B,Outlet:()=>Dt,Route:()=>Hr,Router:()=>Ue,RouterProvider:()=>Kt,Routes:()=>Kn,ScrollRestoration:()=>vi,UNSAFE_DataRouterContext:()=>ge,UNSAFE_DataRouterStateContext:()=>Se,UNSAFE_LocationContext:()=>Ye,UNSAFE_NavigationContext:()=>ie,UNSAFE_RouteContext:()=>ee,UNSAFE_useRouteId:()=>$t,UNSAFE_useScrollRestoration:()=>ar,createBrowserRouter:()=>Jr,createHashRouter:()=>di,createMemoryRouter:()=>Yn,createPath:()=>re,createRoutesFromChildren:()=>at,createRoutesFromElements:()=>at,createSearchParams:()=>qt,defer:()=>Pr,generatePath:()=>kt,isRouteErrorResponse:()=>Re,json:()=>Lr,matchPath:()=>Ke,matchRoutes:()=>ae,parsePath:()=>Z,redirect:()=>bt,renderMatches:()=>Xn,resolvePath:()=>Et,unstable_HistoryRouter:()=>yi,unstable_useBlocker:()=>Nt,unstable_usePrompt:()=>sa,useActionData:()=>Wt,useAsyncError:()=>_t,useAsyncValue:()=>Jt,useBeforeUnload:()=>la,useFetcher:()=>Gr,useFetchers:()=>ia,useFormAction:()=>Yr,useHref:()=>Pe,useInRouterContext:()=>_e,useLinkClickHandler:()=>ra,useLoaderData:()=>zt,useLocation:()=>K,useMatch:()=>Ur,useMatches:()=>ot,useNavigate:()=>Ge,useNavigation:()=>Fe,useNavigationType:()=>Or,useOutlet:()=>Bt,useOutletContext:()=>Tr,useParams:()=>kr,useResolvedPath:()=>Me,useRevalidator:()=>Br,useRouteError:()=>Oe,useRouteLoaderData:()=>Vt,useRoutes:()=>Ir,useSearchParams:()=>na,useSubmit:()=>Xr});function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
2for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ue.apply(this,arguments)}function Wr(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function tr(e){return e!=null&&typeof e.tagName=="string"}function ei(e){return tr(e)&&e.tagName.toLowerCase()==="button"}function ti(e){return tr(e)&&e.tagName.toLowerCase()==="form"}function ri(e){return tr(e)&&e.tagName.toLowerCase()==="input"}function ni(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ai(e,t){return e.button===0&&(!t||t==="_self")&&!ni(e)}function qt(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 oi(e,t){let r=qt(e);if(t)for(let n of t.keys())r.has(n)||t.getAll(n).forEach(a=>{r.append(n,a)});return r}function ii(){if(Gt===null)try{new FormData(document.createElement("form"),0),Gt=!1}catch{Gt=!0}return Gt}function Vr(e){return e!=null&&!li.has(e)?null:e}function Qn(e,t){let r,n,a,o,i;if(ti(e)){let l=e.getAttribute("action");n=l?le(l,t):null,r=e.getAttribute("method")||Zt,a=Vr(e.getAttribute("enctype"))||zr,o=new FormData(e)}else if(ei(e)||ri(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(n=s?le(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Zt,a=Vr(e.getAttribute("formenctype"))||Vr(l.getAttribute("enctype"))||zr,o=new FormData(l,e),!ii()){let{name:u,type:c,value:d}=e;
2if(c==="image"){let y=u?u+".":"";o.append(y+"x","0"),o.append(y+"y","0")}else u&&o.append(u,d)}}else{if(tr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Zt,n=null,a=zr,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}function Jr(e,t){return xt({basename:t?.basename,future:ue({},t?.future,{v7_prependBasename:!0}),history:Dr({window:t?.window}),hydrationData:t?.hydrationData||Zn(),routes:e,mapRouteProperties:Yt}).initialize()}function di(e,t){return xt({basename:t?.basename,future:ue({},t?.future,{v7_prependBasename:!0}),history:Cr({window:t?.window}),hydrationData:t?.hydrationData||Zn(),routes:e,mapRouteProperties:Yt}).initialize()}function Zn(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ue({},t,{errors:fi(t.errors)})),t}function fi(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 Le(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 mi(e){let{basename:t,children:r,future:n,window:a}=e,o=x.useRef();o.current==null&&(o.current=Dr({window:a,v5Compat:!0}));let i=o.current,[l,s]=x.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=x.useCallback(d=>{u&&it?it(()=>s(d)):s(d)},[s,u]);return x.useLayoutEffect(()=>i.listen(c),[i,c]),x.createElement(Ue,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i})}function pi(e){let{basename:t,children:r,future:n,window:a}=e,o=x.useRef();o.current==null&&(o.current=Cr({window:a,v5Compat:!0}));let i=o.current,[l,s]=x.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=x.useCallback(d=>{u&&it?it(()=>s(d)):s(d)},[s,u]);return x.useLayoutEffect(()=>i.listen(c),[i,c]),x.createElement(Ue,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i})}function yi(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=x.useState({action:a.action,location:a.location}),{v7_startTransition:l}=n||{},s=x.useCallback(u=>{l&&it?it(()=>i(u)):i(u)},[i,l]);return x.useLayoutEffect(()=>a.listen(s),[a,s]),x.createElement(Ue,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a})}function vi(e){let{getKey:t,storageKey:r}=e;return ar({getKey:t,storageKey:r}),null}function nr(e){let t=x.useContext(ge);return t||D(!1),t}function ta(e){let t=x.useContext(Se);return t||D(!1),t}function ra(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i}=t===void 0?{}:t,l=Ge(),s=K(),u=Me(e,{relative:i});return x.useCallback(c=>{if(ai(c,r)){c.preventDefault();let d=n!==void 0?n:re(s)===re(u);l(e,{replace:d,state:a,preventScrollReset:o,relative:i})}},[s,l,u,n,a,r,e,o,i])}function na(e){let t=x.useRef(qt(e)),r=x.useRef(!1),n=K(),a=x.useMemo(()=>oi(n.search,r.current?null:t.current),[n.search]),o=Ge(),i=x.useCallback((l,s)=>{let u=qt(typeof l=="function"?l(a):l);r.current=!0,o("?"+u,s)},[o,a]);return[a,i]}function aa(){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 Xr(){let{router:e}
2=nr(lt.UseSubmit),{basename:t}=x.useContext(ie),r=$t();return x.useCallback(function(n,a){a===void 0&&(a={}),aa();let{action:o,method:i,encType:l,formData:s,body:u}=Qn(n,t);e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r})},[e,t,r])}function oa(e,t){let{router:r}=nr(lt.UseSubmitFetcher),{basename:n}=x.useContext(ie);return x.useCallback(function(a,o){o===void 0&&(o={}),aa();let{action:i,method:l,encType:s,formData:u,body:c}=Qn(a,n);t==null&&D(!1),r.fetch(e,t,o.action||i,{preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s})},[r,n,e,t])}function Yr(e,t){let{relative:r}=t===void 0?{}:t,{basename:n}=x.useContext(ie),a=x.useContext(ee);a||D(!1);let[o]=a.matches.slice(-1),i=ue({},Me(e||".",{relative:r})),l=K();if(e==null&&(i.search=l.search,i.hash=l.hash,o.route.index)){let s=new URLSearchParams(i.search);s.delete("index"),i.search=s.toString()?"?"+s.toString():""}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:he([n,i.pathname])),re(i)}function Ei(e,t){return x.forwardRef((n,a)=>{let o=oa(e,t);return x.createElement(ea,ue({},n,{ref:a,submit:o}))})}function Gr(){var e;let{router:t}=nr(lt.UseFetcher),r=x.useContext(ee);r||D(!1);let n=(e=r.matches[r.matches.length-1])==null?void 0:e.route.id;n==null&&D(!1);let[a]=x.useState(()=>String(++wi)),[o]=x.useState(()=>(n||D(!1),Ei(a,n))),[i]=x.useState(()=>c=>{t||D(!1),n||D(!1),t.fetch(a,n,c)}),l=oa(a,n),s=t.getFetcher(a),u=x.useMemo(()=>ue({Form:o,submit:l,load:i},s),[s,o,l,i]);return x.useEffect(()=>()=>{if(!t){console.warn("No router available to clean up from useFetcher()");return}t.deleteFetcher(a)},[t,a]),u}function ia(){return[...ta(er.UseFetchers).fetchers.values()]}function ar(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=nr(lt.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=ta(er.UseScrollRestoration),{basename:i}=x.useContext(ie),l=K(),s=ot(),u=Fe();x.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),bi(x.useCallback(()=>{if(u.state==="idle"){let c=(t?t(l,s):null)||l.key;Qt[c]=window.scrollY}sessionStorage.setItem(r||Gn,JSON.stringify(Qt)),window.history.scrollRestoration="auto"},[r,t,u.state,l,s])),typeof document<"u"&&(x.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(r||Gn);c&&(Qt=JSON.parse(c))}catch{}},[r]),x.useLayoutEffect(()=>{let c=t&&i!=="/"?(y,R)=>t(ue({},y,{pathname:le(y.pathname,i)||y.pathname}),R):t,d=n?.enableScrollRestoration(Qt,()=>window.scrollY,c);return()=>d&&d()},[n,i,t]),x.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(l.hash){let c=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(c){c.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[l,a,o]))}function la(e,t){let{capture:r}=t||{};x.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}},[e,r])}function bi(e,t){let{capture:r}=t||{};x.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function sa(e){let{when:t,message:r}=e,n=Nt(t);x.useEffect(()=>{n.state==="blocked"&&!t&&n.reset()},[n,t]),x.useEffect(()=>{n.state==="blocked"&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r])}var x,Zt,zr,Gt,li,si,ui,ci,hi,it,Ri,gi,rr,Kr,qn,ea,lt,er,wi,Gn,Qt,Te=vr(()=>{x=$e(ze());$r();$r();nt();Zt="get",zr="application/x-www-form-urlencoded";Gt=null;li=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);si=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],ui=["aria-current","caseSensitive","className","end","style","to","children"],ci=["reloadDocument","replace","state","method","action","onSubmit","submit","relative","preventScrollReset"];hi="startTransition",it=x[hi];Ri=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gi=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rr=x.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:l,target:s,to:u,preventScrollReset:c}=t,d=Wr(t,si),{basename:y}=x.useContext(ie),R,v=!1;if(typeof u=="string"&&gi.test(u)&&(R=u,Ri))try{let U=new URL(window.location.href),L=u.startsWith("//")?new URL(U.protocol+u):new URL(u),f=le(L.pathname,y);L.origin===U.origin&&f!=null?u=f+L.search+L.hash:v=!0}catch{}let w=Pe(u,{relative:a}),b=ra(u,{replace:i,state:l,target:s,preventScrollReset:c,relative:a});function _(U){n&&n(U),U.defaultPrevented||b(U)}return x.createElement("a",ue({},d,{href:R||w,onClick:v||o?n:_,ref:r,target:s}))}),Kr=x.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:s,children:u}=t,c=Wr(t,ui),d=Me(s,{relative:c.relative}),y=K(),R=x.useContext(Se),{navigator:v}=x.useContext(ie),w=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,b=y.pathname,_=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;a||(b=b.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase());let U=b===w||!i&&b.startsWith(w)&&b.charAt(w.length)==="/",L=_!=null&&(_===w||!i&&_.startsWith(w)&&_.charAt(w.length)==="/"),f=U?n:void 0,P;typeof o=="function"?P=o({isActive:U,isPending:L}
2):P=[o,U?"active":null,L?"pending":null].filter(Boolean).join(" ");let k=typeof l=="function"?l({isActive:U,isPending:L}):l;return x.createElement(rr,ue({},c,{"aria-current":f,className:P,ref:r,style:k,to:s}),typeof u=="function"?u({isActive:U,isPending:L}):u)}),qn=x.forwardRef((e,t)=>{let r=Xr();return x.createElement(ea,ue({},e,{submit:r,ref:t}))}),ea=x.forwardRef((e,t)=>{let{reloadDocument:r,replace:n,state:a,method:o=Zt,action:i,onSubmit:l,submit:s,relative:u,preventScrollReset:c}=e,d=Wr(e,ci),y=o.toLowerCase()==="get"?"get":"post",R=Yr(i,{relative:u});return x.createElement("form",ue({ref:t,method:y,action:R,onSubmit:r?l:w=>{if(l&&l(w),w.defaultPrevented)return;w.preventDefault();let b=w.nativeEvent.submitter,_=b?.getAttribute("formmethod")||o;s(b||w.currentTarget,{method:_,replace:n,state:a,relative:u,preventScrollReset:c})}},d))});(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(lt||(lt={}));(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(er||(er={}));wi=0;Gn="react-router-scroll-positions",Qt={}});function V(){return V=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},V.apply(this,arguments)}var E=$e(ze());Te();var T=$e(ze());Te();var or=class extends T.default.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?T.default.createElement(this.props.component,{error:this.state.error}):this.props.children}};function st({error:e}){return T.default.useEffect(()=>{console.error(e)},[e]),T.default.createElement("html",{lang:"en"},T.default.createElement("head",null,T.default.createElement("meta",{charSet:"utf-8"}),T.default.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1, viewport-fit=cover"}),T.default.createElement("title",null,"Application Error!")),T.default.createElement("body",null,T.default.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},T.default.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),e.stack?T.default.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},e.stack):null),T.default.createElement("script",{dangerouslySetInnerHTML:{__html:` 3 console.log( 4 "\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." 5 ); 6 `}})))}function ua(){let e=Oe();if(Re(e))return T.default.createElement(ma,{caught:e});if(e instanceof Error)return T.default.createElement(st,{error:e});{let t=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);return T.default.createElement(st,{error:new Error(t)})}}var ca=T.default.createContext(void 0);function da(){return(0,T.useContext)(ca)}function fa({catch:e,component:t,children:r}){return e?T.default.createElement(ca.Provider,{value:e},T.default.createElement(t,null)):T.default.createElement(T.default.Fragment,null,r)}function ha(){let e=da();return T.default.createElement(ma,{caught:e})}function ma({caught:e}){return T.default.createElement("html",{lang:"en"},T.default.createElement("head",null,T.default.createElement("meta",{charSet:"utf-8"}),T.default.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1, viewport-fit=cover"}),T.default.createElement("title",null,"Unhandled Thrown Response!")),T.default.createElement("body",null,T.default.createElement("h1",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},e.status," ",e.statusText),T.default.createElement("script",{dangerouslySetInnerHTML:{__html:` 7 console.log( 8 "\u{1F4BF} Hey developer\u{1F44B}. You can provide a way better UX than this when your app throws 404s (and other responses). Check out https://remix.run/guides/not-found for more information." 9 ); 10 `}})))}function ce(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}Te();async function ir(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{return window.location.reload(),new Promise(()=>{})}}function pa(e,t,r){let n=e.map(o=>{var i;let l=t[o.route.id];return((i=l.links)===null||i===void 0?void 0:i.call(l))||[]}).flat(1),a=Ni(e,r);return Di(n,a)}async function ya(e){if(!e.links)return;let t=e.links();if(!t)return;let r=[];for(let a of t)!lr(a)&&a.rel==="stylesheet"&&r.push({...a,rel:"preload",as:"style"});let n=r.filter(a=>(!a.media||window.matchMedia(a.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${a.href}"]`));await Promise.all(n.map(Si))}async function Si(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 lr(e){return e!=null&&typeof e.page=="string"}function _i(e){return e==null?!1:e.href==null?e.rel==="preload"&&(typeof e.imageSrcSet=="string"||typeof e.imagesrcset=="string")&&(typeof e.imageSizes=="string"||typeof e.imagesizes=="string"):typeof e.rel=="string"&&typeof e.href=="string"}async function Ra(e,t,r){return(await Promise.all(e.map(async a=>{let o=await ir(t.routes[a.route.id],r);return o.links?o.links():[]}))).flat(1).filter(_i).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="preload"?{...a,rel:"prefetch"}:{...a,rel:"prefetch",as:"style"})}function Qr(e,t,r,n,a,o){let i=Ea(e),l=(c,d)=>r[d]?c.route.id!==r[d].route.id:!0,s=(c,d)=>{var y;return r[d].pathname!==c.pathname||((y=r[d].route.path)===null||y===void 0?void 0:y.endsWith("*"))&&r[d].params["*"]!==c.params["*"]};return o==="data"&&a.search!==i.search?t.filter((c,d)=>
10{if(!n.routes[c.route.id].hasLoader)return!1;if(l(c,d)||s(c,d))return!0;if(c.route.shouldRevalidate){var R;let v=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((R=r[0])===null||R===void 0?void 0:R.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):t.filter((c,d)=>{let y=n.routes[c.route.id];return(o==="assets"||y.hasLoader)&&(l(c,d)||s(c,d))})}function ga(e,t,r){let n=Ea(e);return Zr(t.filter(a=>r.routes[a.route.id].hasLoader).map(a=>{let{pathname:o,search:i}=n,l=new URLSearchParams(i);return l.set("_data",a.route.id),`${o}?${l}`}))}function va(e,t){return Zr(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 Ni(e,t){return Zr(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 Zr(e){return[...new Set(e)]}function Di(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(!lr(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let l=JSON.stringify(o);return r.has(l)||(r.add(l),a.push(o)),a},[])}function Ea(e){let t=Z(e);return t.search===void 0&&(t.search=""),t}var Ci={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Li=/[&><\u2028\u2029]/g;function Ct(e){return e.replace(Li,t=>Ci[t])}function qr(e){return{__html:e}}var wa={state:"idle",submission:void 0,location:void 0,type:"idle"},ba={state:"idle",type:"init",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,submission:void 0};function Sa(){let e=E.useContext(ge);return ce(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Pt(){let e=E.useContext(Se);return ce(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mt=E.createContext(void 0);Mt.displayName="Remix";function ve(){let e=E.useContext(Mt);return ce(e,"You must render this element inside a <Remix> element"),e}function _a({id:e}){let{routeModules:t,future:r}=ve();ce(t,`Cannot initialize 'routeModules'. This normally occurs when you have server code in your client modules. 11Check this link for more details: 12https://remix.run/pages/gotchas#server-code-in-client-bundles`);let{default:n,ErrorBoundary:a,CatchBoundary:o}=t[e];return!n&&(a||!r.v2_errorBoundary&&o)&&(n=Dt),ce(n,`Route "${e}" has no component! Please go add a \`default\` export in the route module file. 13If you were trying to navigate or submit to a resource route, use \`<a>\` instead of \`<Link>\` or \`<Form reloadDocument>\`.`),E.createElement(n,null)}function Na({id:e}){let{future:t,routeModules:r}=ve();ce(r,`Cannot initialize 'routeModules'. This normally occurs when you have server code in your client modules. 14Check this link for more details: 15https://remix.run/pages/gotchas#server-code-in-client-bundles`);
15let n=Oe(),{CatchBoundary:a,ErrorBoundary:o}=r[e];if(t.v2_errorBoundary){if(e==="root"&&(o||(o=ua)),o)return E.createElement(o,null);throw n}if(e==="root"&&(a||(a=ha),o||(o=st)),Re(n)){let i=n;if(i!=null&&i.error&&i.status!==404&&o)return E.createElement(o,{error:i.error});if(a)return E.createElement(fa,{catch:n,component:a})}if(n instanceof Error&&o)return E.createElement(o,{error:n});throw n}function Da(e,t){let[r,n]=E.useState(!1),[a,o]=E.useState(!1),{onFocus:i,onBlur:l,onMouseEnter:s,onMouseLeave:u,onTouchStart:c}=t,d=E.useRef(null);E.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let v=b=>{b.forEach(_=>{o(_.isIntersecting)})},w=new IntersectionObserver(v,{threshold:.5});return d.current&&w.observe(d.current),()=>{w.disconnect()}}},[e]);let y=()=>{e==="intent"&&n(!0)},R=()=>{e==="intent"&&(n(!1),o(!1))};return E.useEffect(()=>{if(r){let v=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(v)}}},[r]),[a,d,{onFocus:Lt(i,y),onBlur:Lt(l,R),onMouseEnter:Lt(s,y),onMouseLeave:Lt(u,R),onTouchStart:Lt(c,y)}]}var Ca=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,La=E.forwardRef(({to:e,prefetch:t="none",...r},n)=>{let a=typeof e=="string"&&Ca.test(e),o=Pe(e),[i,l,s]=Da(t,r);return E.createElement(E.Fragment,null,E.createElement(Kr,V({},r,s,{ref:Aa(n,l),to:e})),i&&!a?E.createElement(sr,{page:o}):null)});La.displayName="NavLink";var Pa=E.forwardRef(({to:e,prefetch:t="none",...r},n)=>{let a=typeof e=="string"&&Ca.test(e),o=Pe(e),[i,l,s]=Da(t,r);return E.createElement(E.Fragment,null,E.createElement(rr,V({},r,s,{ref:Aa(n,l),to:e})),i&&!a?E.createElement(sr,{page:o}):null)});Pa.displayName="Link";function Lt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}var Pi="\u26A0\uFE0F REMIX FUTURE CHANGE: The behavior of links `imagesizes` and `imagesrcset` will be changing in v2. Only the React camel case versions will be valid. Please change to `imageSizes` and `imageSrcSet`. For instructions on making this change see https://remix.run/docs/en/v1.15.0/pages/v2#links-imagesizes-and-imagesrcset",Mi="\u26A0\uFE0F REMIX FUTURE CHANGE: `useTransition` will be removed in v2 in favor of `useNavigation`. You can prepare for this change at your convenience by updating to `useNavigation`. For instructions on making this change see https://remix.run/docs/en/v1.15.0/pages/v2#usetransition",Ai="\u26A0\uFE0F REMIX FUTURE CHANGE: `fetcher.type` will be removed in v2. Please use `fetcher.state`, `fetcher.formData`, and `fetcher.data` to achieve the same UX. For instructions on making this change see https://remix.run/docs/en/v1.15.0/pages/v2#usefetcher",Fi="\u26A0\uFE0F REMIX FUTURE CHANGE : `fetcher.submission` will be removed in v2. The submission fields are now part of the fetcher object itself (`fetcher.formData`). For instructions on making this change see https://remix.run/docs/en/v1.15.0/pages/v2#usefetcher";function Oi(){let{manifest:e,routeModules:t}=ve(),{errors:r,matches:n}=Pt(),a=r?n.slice(0,n.findIndex(i=>r[i.route.id])+1):n,o=E.useMemo(()=>pa(a,t,e),[a,t,e]);return E.useEffect(()=>{o.some(i=>"imagesizes"in i||"imagesrcset"in i)&&void 0},[o]),E.createElement(E.Fragment,null,o.map(i=>{if(lr(i))return E.createElement(sr,V({key:i.page},i));let l=null;return"useId"in E?(i.imagesrcset&&(i.imageSrcSet=l=i.imagesrcset,delete i.imagesrcset),i.imagesizes&&(i.imageSizes=i.imagesizes,delete i.imagesizes)):(i.imageSrcSet&&(i.imagesrcset=l=i.imageSrcSet,delete i.imageSrcSet),i.imageSizes&&(i.imagesizes=i.imageSizes,delete i.imageSizes)),E.createElement("link",V({key:i.rel+(i.href||"")+(l||"")},i))}))}function sr({page:e,...t}){let{router:r}=Sa(),n=E.useMemo(()=>ae(r.routes,e),[r.routes,e]);return n?E.createElement(Ti,V({page:e,matches:n},t)):(console.warn(`Tried to prefetch ${e} but no routes matched.`),null)}function Ui(e){let{manifest:t,routeModules:r}=ve(),[n,a]=E.useState([]);return E.useEffect(()=>{let o=!1;return Ra(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function Ti({page:e,matches:t,...r}){let n=K(),{manifest:a}=ve(),{matches:o}=Pt(),i=E.useMemo(()=>Qr(e,t,o,a,n,"data"),[e,t,o,a,n]),l=E.useMemo(()=>Qr(e,t,o,a,n,"assets"),[e,t,o,a,n]),s=E.useMemo(()=>ga(e,i,a),[i,e,a]),u=E.useMemo(()=>va(l,a),[l,a]),c=Ui(l);return E.createElement(E.Fragment,null,s.map(d=>E.createElement("link",V({key:d,rel:"prefetch",as:"fetch",href:d},r))),u.map(d=>E.createElement("link",V({key:d,rel:"modulepreload",href:d},r))),c.map(d=>E.createElement("link",V({key:d.href},d))))}function ki(){let{routeModules:e}=ve(),{errors:t,matches:r,loaderData:n}=Pt(),a=K(),o=t?r.slice(0,r.findIndex(s=>t[s.route.id])+1):r,i={},l={};for(let s of o){let u=s.route.id,c=n[u],d=s.params,y=e[u];if(y.meta){let R=typeof y.meta=="function"?y.meta({data:c,parentsData:l,params:d,location:a}):y.meta;
15if(R&&Array.isArray(R))throw new Error("The route at "+s.route.path+" returns an array. This is only supported with the `v2_meta` future flag in the Remix config. Either set the flag to `true` or update the route's meta function to return an object.\n\nTo reference the v1 meta function API, see https://remix.run/route/meta");Object.assign(i,R)}l[u]=c}return E.createElement(E.Fragment,null,Object.entries(i).map(([s,u])=>{if(!u)return null;if(["charset","charSet"].includes(s))return E.createElement("meta",{key:"charSet",charSet:u});if(s==="title")return E.createElement("title",{key:"title"},String(u));let c=/^(og|music|video|article|book|profile|fb):.+$/.test(s);return[u].flat().map(d=>c?E.createElement("meta",{property:s,content:d,key:s+d}):typeof d=="string"?E.createElement("meta",{name:s,content:d,key:s+d}):E.createElement("meta",V({key:s+JSON.stringify(d)},d)))}))}function Ii(){let{routeModules:e}=ve(),{errors:t,matches:r,loaderData:n}=Pt(),a=K(),o=t?r.slice(0,r.findIndex(u=>t[u.route.id])+1):r,i=[],l=null,s=[];for(let u=0;u<o.length;u++){let c=o[u],d=c.route.id,y=n[d],R=c.params,v=e[d],w=[],b={id:d,data:y,meta:[],params:c.params,pathname:c.pathname,handle:c.route.handle,get route(){return console.warn("The meta function in "+c.route.path+" accesses the `route` property on `matches`. This is deprecated and will be removed in Remix version 2. See"),c.route}};if(s[u]=b,v!=null&&v.meta?w=typeof v.meta=="function"?v.meta({data:y,params:R,location:a,matches:s}):Array.isArray(v.meta)?[...v.meta]:v.meta:l&&(w=[...l]),w=w||[],!Array.isArray(w))throw new Error("The `v2_meta` API is enabled in the Remix config, but the route at "+c.route.path+` returns an invalid value. In v2, all route meta functions must return an array of meta objects. 16 17To reference the v1 meta function API, see https://remix.run/route/meta`);b.meta=w,s[u]=b,i=[...w],l=i}return E.createElement(E.Fragment,null,i.flat().map(u=>{if(!u)return null;if("tagName"in u){let c=u.tagName;return delete u.tagName,ji(c)?E.createElement(c,V({key:JSON.stringify(u)},u)):(console.warn(`A meta object uses an invalid tagName: ${c}. Expected either 'link' or 'meta'`),null)}if("title"in u)return E.createElement("title",{key:"title"},String(u.title));if("charset"in u&&(u.charSet??(u.charSet=u.charset),delete u.charset),"charSet"in u&&u.charSet!=null)return typeof u.charSet=="string"?E.createElement("meta",{key:"charSet",charSet:u.charSet}):null;if("script:ld+json"in u){let c=null;try{c=JSON.stringify(u["script:ld+json"])}catch{}return c!=null&&E.createElement("script",{key:"script:ld+json",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(u["script:ld+json"])}})}return E.createElement("meta",V({key:JSON.stringify(u)},u))}))}function ji(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}function Bi(){let{future:e}=ve();return e!=null&&e.v2_meta?E.createElement(Ii,null):E.createElement(ki,null)}function Ma(e){return E.createElement(Xt,e)}var en=!1;function Hi(e){let{manifest:t,serverHandoffString:r,abortDelay:n,serializeError:a}=ve(),{router:o,static:i,staticContext:l}=Sa(),{matches:s}=Pt(),u=Fe();E.useEffect(()=>{en=!0},[]);let c=(L,f)=>{let P;return a&&f instanceof Error?P=a(f):P=f,`${JSON.stringify(L)}:__remixContext.p(!1, ${Ct(JSON.stringify(P))})`},d=(L,f,P)=>{let k;try{k=JSON.stringify(P)}catch(O){return c(f,O)}return`${JSON.stringify(f)}:__remixContext.p(${Ct(k)})`},y=(L,f,P)=>{let k;return a&&P instanceof Error?k=a(P):k=P,`__remixContext.r(${JSON.stringify(L)}, ${JSON.stringify(f)}, !1, ${Ct(JSON.stringify(k))})`},R=(L,f,P)=>{let k;try{k=JSON.stringify(P)}catch(O){return y(L,f,O)}return`__remixContext.r(${JSON.stringify(L)}, ${JSON.stringify(f)}, ${Ct(k)})`},v=[],w=E.useMemo(()=>{var L;let f=l?`window.__remixContext = ${r};`:" ",P=l?.activeDeferreds;f+=P?["__remixContext.p = function(v,e,p,x) {"," if (typeof e !== 'undefined') {",` x=new Error("Unexpected Server Error"); 18 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"); 19 x.stack=undefined;`," p.e(x);"," } else {"," p.r(v);"," }","};"].join(` 20`)+Object.entries(P).map(([O,J])=>{let ne=new Set(J.pendingKeys),de=J.deferredKeys.map(te=>{if(ne.has(te))return v.push(E.createElement(xa,{key:`${O} | ${te}`,deferredData:J,routeId:O,dataKey:te,scriptProps:e,serializeData:R,serializeError:y})),`${JSON.stringify(te)}:__remixContext.n(${JSON.stringify(O)}, ${JSON.stringify(te)})`;{let z=J.data[te];return typeof z._error<"u"?c(te,z._error):d(O,te,z._data)}}).join(`, 21`);return`Object.assign(__remixContext.state.loaderData[${JSON.stringify(O)}], {${de}});`}).join(` 22`)+(v.length>0?`__remixContext.a=${v.length};`:""):"";let k=i?`${(L=t.hmr)!==null&&L!==void 0&&L.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}import ${JSON.stringify(t.url)}; 23${s.map((O,J)=>`import * as route${J} from ${JSON.stringify(t.routes[O.route.id].module)};`).join(` 24`)} 25window.__remixRouteModules = {${s.map((O,J)=>`${JSON.stringify(O.route.id)}:route${J}`).join(",")}}; 26 27import(${JSON.stringify(t.entry.module)});`:" ";return E.createElement(E.Fragment,null,E.createElement("script",V({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:qr(f),type:void 0})),E.createElement("script",V({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:qr(k),type:"module",async:!0})))},[]);if(!i&&typeof __remixContext=="object"&&__remixContext.a)for(let L=0;L<__remixContext.a;
27L++)v.push(E.createElement(xa,{key:L,scriptProps:e,serializeData:R,serializeError:y}));let b=E.useMemo(()=>{if(u.location){let L=ae(o.routes,u.location);return ce(L,`No routes match path "${u.location.pathname}"`),L}return[]},[u.location,o.routes]),_=s.concat(b).map(L=>{let f=t.routes[L.route.id];return(f.imports||[]).concat([f.module])}).flat(1),U=en?[]:t.entry.imports.concat(_);return en?null:E.createElement(E.Fragment,null,E.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin}),zi(U).map(L=>E.createElement("link",{key:L,rel:"modulepreload",href:L,crossOrigin:e.crossOrigin})),w,v)}function xa({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.`),E.createElement(E.Suspense,{fallback:typeof document>"u"&&t&&e&&r?null:E.createElement("script",V({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}}))},typeof document>"u"&&t&&e&&r?E.createElement(Ma,{resolve:t.data[e],errorElement:E.createElement($i,{dataKey:e,routeId:r,scriptProps:n,serializeError:o}),children:i=>E.createElement("script",V({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a(r,e,i)}}))}):E.createElement("script",V({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}})))}function $i({dataKey:e,routeId:t,scriptProps:r,serializeError:n}){let a=_t();return E.createElement("script",V({},r,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n(t,e,a)}}))}function zi(e){return[...new Set(e)]}function tn(){let{routeModules:e}=ve(),t=ot();return E.useMemo(()=>t.map(r=>({id:r.id,pathname:r.pathname,params:r.params,data:r.data,handle:e[r.id].handle})),[t,e])}function Vi(){return zt()}function Wi(e){return Vt(e)}function Ji(){return Wt()}function Ki(){let e=Fe();return E.useEffect(()=>{},[]),E.useMemo(()=>Xi(e),[e])}function Xi(e){let{location:t,state:r,formMethod:n,formAction:a,formEncType:o,formData:i}=e;if(!t)return wa;let l=n!=null&&["POST","PUT","PATCH","DELETE"].includes(n.toUpperCase());if(r==="submitting"&&n&&a&&o&&i){if(l)return{location:t,state:r,submission:{method:n.toUpperCase(),action:a,encType:o,formData:i,key:""},type:"actionSubmission"};ce(!1,"Encountered an unexpected navigation scenario in useTransition()")}if(r==="loading"){let{_isRedirect:u,_isFetchActionRedirect:c}=t.state||{};if(n&&a&&o&&i){if(u)return l?{location:t,state:r,submission:{method:n.toUpperCase(),action:a,encType:o,formData:i,key:""},type:"actionRedirect"}:{location:t,state:r,submission:{method:n.toUpperCase(),action:a,encType:o,formData:i,key:""},type:"loaderSubmissionRedirect"};if(l)return{location:t,state:r,submission:{method:n.toUpperCase(),action:a,encType:o,formData:i,key:""},type:"actionReload"};{let d=new URL(a,window.location.origin);return d.search=new URLSearchParams(i.entries()).toString(),{location:t,state:"submitting",submission:{method:n.toUpperCase(),action:d.pathname+d.search,encType:o,formData:i,key:""},type:"loaderSubmission"}}}else if(u)return c?{location:t,state:r,submission:void 0,type:"fetchActionRedirect"}:{location:t,state:r,submission:void 0,type:"normalRedirect"}}return{location:t,state:"loading",submission:void 0,type:"normalLoad"}}function Yi(){let e=Gr();return E.useMemo(()=>{let r={...Qi({state:e.state,data:e.data,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text," _hasFetcherDoneAnything ":e[" _hasFetcherDoneAnything "]}),load:e.load,submit:e.submit,Form:e.Form};return Gi(r),r},[e])}function Gi(e){let t=e.type;Object.defineProperty(e,"type",{get(){return t},set(n){t=n},configurable:!0,enumerable:!0});let r=e.submission;Object.defineProperty(e,"submission",{get(){return r},set(n){r=n},configurable:!0,enumerable:!0})}function Qi(e){let{state:t,formMethod:r,formAction:n,formEncType:a,formData:o,json:i,text:l,data:s}=e,u=r!=null&&["POST","PUT","PATCH","DELETE"].includes(r.toUpperCase());if(t==="idle")return e[" _hasFetcherDoneAnything "]===!0?{state:"idle",type:"done",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,submission:void 0,data:s}:ba;if(t==="submitting"&&r&&n&&a&&(o||i!==void 0||l!==void 0)){if(u)return{state:t,type:"actionSubmission",formMethod:r.toUpperCase(),formAction:n,formEncType:a,formData:o,json:i,text:l,submission:{method:r.toUpperCase(),action:n,encType:a,formData:o,json:i,text:l,key:""},data:s};ce(!1,"Encountered an unexpected fetcher scenario in useFetcher()")}if(t==="loading"&&r&&n&&a){if(u)return s?{state:t,type:"actionReload",formMethod:r.toUpperCase(),formAction:n,formEncType:a,formData:o,json:i,text:l,submission:{method:r.toUpperCase(),action:n,encType:a,formData:o,json:i,text:l,key:""},data:s}:{state:t,type:"actionRedirect",formMethod:r.toUpperCase(),formAction:n,formEncType:a,formData:o,json:i,text:l,submission:{method:r.toUpperCase(),action:n,encType:a,formData:o,json:i,text:l,key:""},data:void 0};{let d=new URL(n,window.location.origin);return o&&(d.search=new URLSearchParams(o.entries()).toString()),{state:"submitting",type:"loaderSubmission",formMethod:r.toUpperCase(),formAction:n,formEncType:a,formData:o,json:i,text:l,submission:{method:r.toUpperCase(),action:d.pathname+d.search,encType:a,formData:o,json:i,text:l,key:""},data:s}}}return{state:"loading",type:"normalLoad",formMethod:void 0,formAction:void 0,formData:void 0,json:void 0,text:void 0,formEncType:void 0,submission:void 0,data:s}}var Zi=()=>null;function Aa(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var ke=$e(ze());Te();nt();function Fa(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 Le(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 nn=$e(ze());Te();nt();function Ua(e){return e.headers.get("X-Remix-Catch")!=null}function qi(e){return e.headers.get("X-Remix-Error")!=null}function el(e){return tl(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 Ta(e){return e.headers.get("X-Remix-Redirect")!=null}function ka(e){var t;return!!((t=e.headers.get("Content-Type"))!==null&&t!==void 0&&t.match(/text\/remix-deferred/))}function tl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}async function rn(e,t,r=0){let n=new URL(e.url);n.searchParams.set("_data",t);let a={signal:e.signal};if(e.method!=="GET"){a.method=e.method;let l=e.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?(a.headers={"Content-Type":l},a.body=JSON.stringify(await e.json())):l&&/\btext\/plain\b/.test(l)?(a.headers={"Content-Type":l},a.body=await e.text()):l&&/\bapplication\/x-www-form-urlencoded\b/.test(l)?a.body=new URLSearchParams(await e.text()):a.body=await e.formData()}r>0&&await new Promise(l=>setTimeout(l,5**r*10));let o=window.__remixRevalidation,i=await fetch(n.href,a).catch(l=>{if(typeof o=="number"&&o===window.__remixRevalidation&&l?.name==="TypeError"&&r<3)return rn(e,t,r+1);throw l});if(qi(i)){let l=await i.json(),s=new Error(l.message);return s.stack=l.stack,s}if(el(i)){let l=await i.text(),s=new Error(l);return s.stack=void 0,s}return i}var rl="__deferred_promise:";async function Ia(e){if(!e)throw new Error("parseDeferredReadableStream requires stream argument");let t,r={};try{let n=nl(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[l,s]of Object.entries(i))typeof s!="str
27ing"||!s.startsWith(rl)||(t=t||{},t[l]=new Promise((u,c)=>{r[l]={resolve:d=>{u(d),delete r[l]},reject:d=>{c(d),delete r[l]}}}));return(async()=>{try{for await(let l of n){let[s,...u]=l.split(":"),c=u.join(":"),d=JSON.parse(c);if(s==="data")for(let[y,R]of Object.entries(d))r[y]&&r[y].resolve(R);else if(s==="error")for(let[y,R]of Object.entries(d)){let v=new Error(R.message);v.stack=R.stack,r[y]&&r[y].reject(v)}}for(let[l,s]of Object.entries(r))s.reject(new ye(`Deferred ${l} will never be resolved`))}catch(l){for(let s of Object.values(r))s.reject(l)}})(),new vt({...i,...t})}catch(n){for(let a of Object.values(r))a.reject(n);throw n}}async function*nl(e){let t=e.getReader(),r=[],n=[],a=!1,o=new TextEncoder,i=new TextDecoder,l=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 d=i.decode(Oa(...r)).split(` 28 29`);if(d.length>=2&&(n.push(...d.slice(0,-1)),r=[o.encode(d.slice(-1).join(` 30 31`))]),n.length>0)break}catch{continue}}return n.length>0||r.length>0&&(n=i.decode(Oa(...r)).split(` 32 33`).filter(c=>c),r=[]),n.shift()},s=await l();for(;s;)yield s,s=await l()}function Oa(...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 al(e){let t={};return Object.values(e).forEach(r=>{let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}),t}function an(e,t,r,n="",a=al(e),o){return(a[n]||[]).map(i=>{let l=r.v2_errorBoundary===!0?i.id==="root"||i.hasErrorBoundary:i.id==="root"||i.hasCatchBoundary||i.hasErrorBoundary,s={caseSensitive:i.caseSensitive,element:nn.createElement(_a,{id:i.id}),errorElement:l?nn.createElement(Na,{id:i.id}):void 0,id:i.id,index:i.index,path:i.path,handle:void 0,loader:ja(i,t,!1),action:ja(i,t,!0),shouldRevalidate:ol(i,t,o)},u=an(e,t,r,i.id,a,o);return u.length>0&&(s.children=u),s})}function ol(e,t,r){let n=!1;return function(a){let o=t[e.id];return ce(o,`Expected route module to be loaded for ${e.id}`),r!==void 0&&!n?(n=!0,r.has(e.id)):o.shouldRevalidate?o.shouldRevalidate(a):a.defaultShouldRevalidate}}async function il(e,t){let r=await ir(e,t);return await ya(r),r}function ja(e,t,r){return async({request:n})=>{let a=il(e,t);try{if(r&&!e.hasAction){let i=`Route "${e.id}" does not have an action, but you are trying to submit to it. To fix this, please add an \`action\` function to the route`;throw console.error(i),new Error(i)}else if(!r&&!e.hasLoader)return null;let o=await rn(n,e.id);if(o instanceof Error)throw o;if(Ta(o))throw ll(o);if(Ua(o))throw o;return ka(o)&&o.body?await Ia(o.body):o}finally{await a}}}function ll(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");return a&&(n["X-Remix-Revalidate"]=a),bt(r,{status:t,headers:n})}var ut;var on,ts=new Promise(e=>{on=e}).catch(()=>{});function sl(e){if(!ut){let n=an(window.__remixManifest.routes,window.__remixRouteModules,window.__remixContext.future),a=window.__remixContext.state;a&&a.errors&&(a={...a,errors:Fa(a.errors)}),ut=Jr(n,{hydrationData:a,future:{v7_normalizeFormMethod:window.__remixContext.future.v2_normalizeFormMethod}});let o=window.__remixContext.url,i=window.location.pathname;if(o!==i){let l=`Initial URL (${o}) does not match URL at time of hydration (${i}), reloading page...`;console.error(l),window.location.reload()}on&&on(ut)}let[t,r]=ke.useState(ut.state.location);return ke.useLayoutEffect(()=>ut.subscribe(n=>{n.location!==t&&r(n.location)}),[t]),ke.createElement(Mt.Provider,{value:{manifest:window.__remixManifest,routeModules:window.__remixRouteModules,future:window.__remixContext.future}},ke.createElement(or,{location:t,component:st},ke.createElement(Kt,{router:ut,fallbackElement:null,future:{v7_startTransition:!0}})))}Te();var ur=$e(ze());Te();var Ba="positions";function ul({getKey:e,...t}){let r=K(),n=tn();ar({getKey:e,storageKey:Ba});let a=ur.useMemo(()=>{if(!e)return null;let i=e(r,n);return i!==r.key?i:null},[]),o=((i,l)=>{if(!window.history.state||!window.history.state.key){let s=Math.random().toString(32).slice(2);window.history.replaceState({key:s},"")}try{let u=JSON.parse(sessionStorage.getItem(i)||"{}")[l||window.history.state.key];typeof u=="number"&&window.scrollTo(0,u)}catch(s){console.error(s),sessionStorage.removeItem(i)}}).toString();return ur.createElement("script",V({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${o})(${JSON.stringify(Ba)}, ${JSON.stringify(a)})`}}))}export{K as a,Ur as b,Tr as c,Dt as d,qn as e,na as f,xi as g,Te as h,da as i,La as j,Pa as k,Oi as l,Bi as m,Hi as n,tn as o,Vi as p,Wi as q,Ji as r,Ki as s,Yi as t,Zi as u,sl as v,ul as w}; 34/*! Bundled license information: 35 36@remix-run/router/dist/router.js: 37 (** 38 * @remix-run/router v1.7.2 39 * 40 * Copyright (c) Remix Software Inc. 41 * 42 * This source code is licensed under the MIT license found in the 43 * LICENSE.md file in the root directory of this source tree. 44 * 45 * @license MIT 46 *) 47 48react-router/dist/index.js: 49 (** 50 * React Router v6.14.2 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 *) 59 60react-router-dom/dist/index.js: 61 (** 62 * React Router DOM v6.14.2 63 * 64 * Copyright (c) Remix Software Inc. 65 * 66 * This source code is licensed under the MIT license found in the 67 * LICENSE.md file in the root directory of this source tree. 68 * 69 * @license MIT 70 *) 71 72@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js: 73 (** 74 * @remix-run/react v1.19.3 75 * 76 * Copyright (c) Remix Software Inc. 77 * 78 * This source code is licensed under the MIT license found in the 79 * LICENSE.md file in the root directory of this source tree. 80 * 81 * @license MIT 82 *) 83 84@remix-run/react/dist/esm/errorBoundaries.js: 85 (** 86 * @remix-run/react v1.19.3 87 * 88 * Copyright (c) Remix Software Inc. 89 * 90 * This source code is licensed under the MIT license found in the 91 * LICENSE.md file in the root directory of this source tree. 92 * 93 * @license MIT 94 *) 95 96@remix-run/react/dist/esm/invariant.js: 97 (** 98 * @remix-run/react v1.19.3 99 * 100 * Copyright (c) Remix Software Inc. 101 * 102 * This source code is licensed under the MIT license found in the 103 * LICENSE.md file in the root directory of this source tree. 104 * 105 * @license MIT 106 *) 107 108@remix-run/react/dist/esm/routeModules.js: 109 (** 110 * @remix-run/react v1.19.3 111 * 112 * Copyright (c) Remix Software Inc. 113 * 114 * This source code is licensed under the MIT license found in the 115 * LICENSE.md file in the root directory of this source tree. 116 * 117 * @license MIT 118 *) 119 120@remix-run/react/dist/esm/links.js: 121 (** 122 * @remix-run/react v1.19.3 123 * 124 * Copyright (c) Remix Software Inc. 125 * 126 * This source code is licensed under the MIT license found in the 127 * LICENSE.md file in the root directory of this source tree. 128 * 129 * @license MIT 130 *) 131 132@remix-run/react/dist/esm/markup.js: 133 (** 134 * @remix-run/react v1.19.3 135 * 136 * Copyright (c) Remix Software Inc. 137 * 138 * This source code is licensed under the MIT license found in the 139 * LICENSE.md file in the root directory of this source tree. 140 * 141 * @license MIT 142 *) 143 144@remix-run/react/dist/esm/transition.js: 145 (** 146 * @remix-run/react v1.19.3 147 * 148 * Copyright (c) Remix Software Inc. 149 * 150 * This source code is licensed under the MIT license found in the 151 * LICENSE.md file in the root directory of this source tree. 152 * 153 * @license MIT 154 *) 155 156@remix-run/react/dist/esm/components.js: 157 (** 158 * @remix-run/react v1.19.3 159 * 160 * Copyright (c) Remix Software Inc. 161 * 162 * This source code is licensed under the MIT license found in the 163 * LICENSE.md file in the root directory of this source tree. 164 * 165 * @license MIT 166 *) 167 168@remix-run/react/dist/esm/errors.js: 169 (** 170 * @remix-run/react v1.19.3 171 * 172 * Copyright (c) Remix Software Inc. 173 * 174 * This source code is licensed under the MIT license found in the 175 * LICENSE.md file in the root directory of this source tree. 176 * 177 * @license MIT 178 *) 179 180@remix-run/react/dist/esm/data.js: 181 (** 182 * @remix-run/react v1.19.3 183 * 184 * Copyright (c) Remix Software Inc. 185 * 186 * This source code is licensed under the MIT license found in the 187 * LICENSE.md file in the root directory of this source tree. 188 * 189 * @license MIT 190 *) 191 192@remix-run/react/dist/esm/routes.js: 193 (** 194 * @remix-run/react v1.19.3 195 * 196 * Copyright (c) Remix Software Inc. 197 * 198 * This source code is licensed under the MIT license found in the 199 * LICENSE.md file in the root directory of this source tree. 200 * 201 * @license MIT 202 *) 203 204@remix-run/react/dist/esm/browser.js: 205 (** 206 * @remix-run/react v1.19.3 207 * 208 * Copyright (c) Remix Software Inc. 209 * 210 * This source code is licensed under the MIT license found in the 211 * LICENSE.md file in the root directory of this source tree. 212 * 213 * @license MIT 214 *) 215 216@remix-run/react/dist/esm/scroll-restoration.js: 217 (** 218 * @remix-run/react v1.19.3 219 * 220 * Copyright (c) Remix Software Inc. 221 * 222 * This source code is licensed under the MIT license found in the 223 * LICENSE.md file in the root directory of this source tree. 224 * 225 * @license MIT 226 *) 227 228@remix-run/react/dist/esm/index.js: 229 (** 230 * @remix-run/react v1.19.3 231 * 232 * Copyright (c) Remix Software Inc. 233 * 234 * This source code is licensed under the MIT license found in the 235 * LICENSE.md file in the root directory of this source tree. 236 * 237 * @license MIT 238 *) 239*/
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.