vendor: 4,311 bytes, lines 1-17
1function fo(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ho(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hr={exports:{}},yt={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var mn;function mo(){if(mn)return yt;mn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var l in a)l!=="key"&&(o[l]=a[l])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:o}}return yt.Fragment=t,yt.jsx=r,yt.jsxs=r,yt}var pn;function po(){return pn||(pn=1,hr.exports=mo()),hr.exports}var As=po(),mr={exports:{}},B={};/** 10 * @license React 11 * react.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var yn;function yo(){if(yn)return B;yn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),m=Symbol.for("react.view_transition"),g=Symbol.iterator;function R(v){return v===null||typeof v!="object"?null:(v=g&&v[g]||v["@@iterator"],typeof v=="function"?v:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function C(v,L,M){this.props=v,this.context=L,this.refs=T,this.updater=M||b}C.prototype.isReactComponent={},C.prototype.setState=function(v,L){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,L,"setState")},C.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function N(){}N.prototype=C.prototype;function I(v,L,M){this.props=v,this.context=L,this.refs=T,this.updater=M||b}var P=I.prototype=new N;P.constructor=I,w(P,C.prototype),P.isPureReactComponent=!0;var D=Array.isArray;function k(){}var y={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function U(v,L,M){var A=M.ref;return{$$typeof:e,type:v,key:L,ref:A!==void 0?A:null,props:M}}function le(v,L){return U(v.type,L,v.props)}function V(v){return typeof v=="object"&&v!==null&&v.$$typeof===e}function se(v){var L={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(M){return L[M]})}var Z=/\/+/g;function q(v,L){return typeof v=="object"&&v!==null&&v.key!=null?se(""+v.key):L.toString(36)}function Re(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(k,k):(v.status="pending",v.then(function(L){v.status==="pending"&&(v.status="fulfilled",v.value=L)},function(L){v.status==="pending"&&(v.status="rejected",v.reason=L)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function J(v,L,M,A,X){var K=typeof v;(K==="undefined"||K==="boolean")&&(v=null);var oe=!1;if(v===null)oe=!0;else switch(K){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(v.$$typeof){case e:case t:oe=!0;break;case f:return oe=v._init,J(oe(v._payload),L,M,A,X)}}if(oe)return X=X(v),oe=A===""?"."+q(v,0):A,D(X)?(M="",oe!=null&&(M=oe.replace(Z,"$&/")+"/"),J(X,L,M,"",function(pe){return pe})):X!=null&&(V(X)&&(X=le(X,M+(X.key==null||v&&v.key===X.key?"":(""+X.key).replace(Z,"$&/")+"/")+oe)),L.push(X)),1;oe=0;var Me=A===""?".":A+":";if(D(v))for(var ve=0;ve<v.length;
17ve++)A=v[ve],K=Me+q(A,ve),oe+=J(A,L,M,K,X);else if(ve=R(v),typeof ve=="function")for(v=ve.call(v),ve=0;!(A=v.next()).done;)A=A.value,K=Me+q(A,ve++),oe+=J(A,L,M,K,X);else if(K==="object"){if(typeof v.then=="function")return J(Re(v),L,M,A,X);throw L=String(v),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return oe}function te(v,L,M){if(v==null)return v;var A=[],X=0;return J(v,A,"","",function(K){return L.call(M,K,X++)}),A}function ae(v){if(v._status===-1){var L=v._result,M=L();M.then(function(A){(v._status===0||v._status===-1)&&(v._status=1,v._result=A,M.status===void 0&&(M.status="fulfilled",M.value=A))},function(A){(v._status===0||v._status===-1)&&(v._status=2,v._result=A,M.status===void 0&&(M.status="rejected",M.reason=A))}),v._status===-1&&(v._status=0,v._result=M)}if(v._status===1)return v._result.default;throw v._result}var he=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)};function ce(v){var L=y.T,M={};M.types=L!==null?L.types:null,y.T=M;try{var A=v(),X=y.S;X!==null&&X(M,A),typeof A=="object"&&A!==null&&typeof A.then=="function"&&A.then(k,he)}catch(K){he(K)}finally{L!==null&&M.types!==null&&(L.types=M.types),y.T=L}}function me(v){var L=y.T;if(L!==null){var M=L.types;M===null?L.types=[v]:M.indexOf(v)===-1&&M.push(v)}else ce(me.bind(null,v))}var ye={map:te,forEach:function(v,L,M){te(v,function(){L.apply(this,arguments)},M)},count:function(v){var L=0;return te(v,function(){L++}),L},toArray:function(v){return te(v,function(L){return L})||[]},only:function(v){if(!V(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return B.Activity=c,B.Children=ye,B.Component=C,B.Fragment=r,B.Profiler=a,B.PureComponent=I,B.StrictMode=n,B.Suspense=s,B.ViewTransition=m,B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=y,B.__COMPILER_RUNTIME={__proto__:null,c:function(v){return y.H.useMemoCache(v)}},B.addTransitionType=me,B.cache=function(v){return function(){return v.apply(null,arguments)}},B.cacheSignal=function(){return null},B.cloneElement=function(v,L,M){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var A=w({},v.props),X=v.key;if(L!=null)for(K in L.key!==void 0&&(X=""+L.key),L)!Y.call(L,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&L.ref===void 0||(A[K]=L[K]);var K=arguments.length-2;if(K===1)A.children=M;else if(1<K){for(var oe=Array(K),Me=0;Me<K;Me++)oe[Me]=arguments[Me+2];A.children=oe}return U(v.type,X,A)},B.createContext=function(v){return v={$$typeof:i,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:o,_context:v},v},B.createElement=function(v,L,M){var A,X={},K=null;if(L!=null)for(A in L.key!==void 0&&(K=""+L.key),L)Y.call(L,A)&&A!=="key"&&A!=="__self"&&A!=="__source"&&(X[A]=L[A]);var oe=arguments.length-2;if(oe===1)X.children=M;else if(1<oe){for(var Me=Array(oe),ve=0;ve<oe;ve++)Me[ve]=arguments[ve+2];X.children=Me}if(v&&v.defaultProps)for(A in oe=v.defaultProps,oe)X[A]===void 0&&(X[A]=oe[A]);return U(v,K,X)},B.createRef=function(){return{current:null}},B.forwardRef=function(v){return{$$typeof:l,render:v}},B.isValidElement=V,B.lazy=function(v){return{$$typeof:f,_payload:{_status:-1,_result:v},_init:ae}},B.memo=function(v,L){return{$$typeof:u,type:v,compare:L===void 0?null:L}},B.startTransition=ce,B.unstable_useCacheRefresh=function(){return y.H.useCacheRefresh()},B.use=function(v){return y.H.use(v)},B.useActionState=function(v,L,M){return y.H.useActionState(v,L,M)},B.useCallback=function(v,L){return y.H.useCallback(v,L)},B.useContext=function(v){return y.H.useContext(v)},B.useDebugValue=function(){},B.useDeferredValue=function(v,L){return y.H.useDeferredValue(v,L)},B.useEffect=function(v,L){return y.H.useEffect(v,L)},B.useEffectEvent=function(v){return y.H.useEffectEvent(v)},B.useId=function(){return y.H.useId()},B.useImperativeHandle=function(v,L,M){return y.H.useImperativeHandle(v,L,M)},B.useInsertionEffect=function(v,L){return y.H.useInsertionEffect(v,L)},B.useLayoutEffect=function(v,L){return y.H.useLayoutEffect(v,L)},B.useMemo=function(v,L){return y.H.useMemo(v,L)},B.useOptimistic=function(v,L){return y.H.useOptimistic(v,L)},B.useReducer=function(v,L,M){return y.H.useReducer(v,L,M)},B.useRef=function(v){return y.H.useRef(v)},B.useState=function(v){return y.H.useState(v)},B.useSyncExternalStore=function(v,L,M){return y.H.useSyncExternalStore(v,L,M)},B.useTransition=function(){return y.H.useTransition()},B.version="19.3.0",B}var vn;function vo(){return vn||(vn=1,mr.exports=yo()),mr.exports}var h=vo();const go=ho(h),wo=fo({__proto__:null,default:go},[h]);/** 18 * react-router v7.18.3 19 * 20 * Copyright (c) Remix Software Inc. 21 * 22 * This source code is licensed under the MIT license found in the 23 * LICENSE.md file in the root directory of this source tree. 24 * 25 * @license MIT 26 */var Kn=e=>{throw TypeError(e)},qn=(e,t,r)=>t.has(e)||Kn("Cannot "+r),_e=(e,t,r)=>(qn(e,t,"read from private field"),r?r.call(e):t.get(e)),Et=(e,t,r)=>t.has(e)?Kn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Fe=(e,t,r,n)=>(qn(e,t,"write to private field"),t.set(e,r),r),Zt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,er=/^[\\/]{2}/;function Qn(e,t){return t+e.replace(/\\/g,"/")}var gn="popstate";function wn(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ns(e={}){function t(n,a){var u;let o=(u=a.state)==null?void 0:u.masked,{pathname:i,search:l,hash:s}=o||n.location;return Lt("",{pathname:i,search:l,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}
26function r(n,a){return typeof a=="string"?a:Ee(a)}return Ro(t,r,null,e)}function G(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function de(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Eo(){return Math.random().toString(36).substring(2,10)}function En(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Lt(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?je(t):t,state:r,key:t&&t.key||n||Eo(),mask:a}}function Ee({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function je(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Ro(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l="POP",s=null,u=f();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function f(){return(i.state||{idx:null}).idx}function c(){l="POP";let w=f(),T=w==null?null:w-u;u=w,s&&s({action:l,location:b.location,delta:T})}function m(w,T){l="PUSH";let C=wn(w)?w:Lt(b.location,w,T);u=f()+1;let N=En(C,u),I=b.createHref(C.mask||C);try{i.pushState(N,"",I)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;a.location.assign(I)}o&&s&&s({action:l,location:b.location,delta:1})}function g(w,T){l="REPLACE";let C=wn(w)?w:Lt(b.location,w,T);u=f();let N=En(C,u),I=b.createHref(C.mask||C);i.replaceState(N,"",I),o&&s&&s({action:l,location:b.location,delta:0})}function R(w){return Zn(a,w)}let b={get action(){return l},get location(){return e(a,i)},listen(w){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(gn,c),s=w,()=>{a.removeEventListener(gn,c),s=null}},createHref(w){return t(a,w)},createURL:R,encodeLocation(w){let T=R(w);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:m,replace:g,go(w){return i.go(w)}};return b}function Zn(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),G(n,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ee(t);return a=a.replace(/ $/,"%20"),!r&&er.test(a)&&(a=n+a),new URL(a,n)}var Rt,Rn=class{constructor(e){if(Et(this,Rt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(_e(this,Rt).has(e))return _e(this,Rt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){_e(this,Rt).set(e,t)}};Rt=new WeakMap;var bo=new Set(["lazy","caseSensitive","path","id","index","children"]);function So(e){return bo.has(e)}var Lo=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function xo(e){return Lo.has(e)}function Co(e){return e.index===!0}function xt(e,t,r=[],n={},a=!1){return e.map((o,i)=>{let l=[...r,String(i)],s=typeof o.id=="string"?o.id:l.join("-");if(G(o.index!==!0||!o.children,"Cannot specify children on an index route"),G(a||!n[s],`Found a route id collision on i
26d "${s}". Route id's must be globally unique within Data Router usages`),Co(o)){let u={...o,id:s};return n[s]=bn(u,t(u)),u}else{let u={...o,id:s,children:void 0};return n[s]=bn(u,t(u)),o.children&&(u.children=xt(o.children,t,l,n,a)),u}})}function bn(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ea(e,t,r="/"){return De(e,t,r,!1)}function De(e,t,r,n,a){let o=typeof t=="string"?je(t):t,i=Te(o.pathname||"/",r);if(i==null)return null;let l=a??Yt(e),s=null,u=Fo(i);for(let f=0;s==null&&f<l.length;++f)s=No(l[f],u,n);return s}function ta(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Yt(e){let t=ra(e);return Po(t),t}function ra(e,t=[],r=[],n="",a=!1){let o=(i,l,s=a,u)=>{let f={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&s)return;G(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let c=Pe([n,f.relativePath]),m=r.concat(f);i.children&&i.children.length>0&&(G(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),ra(i.children,t,m,c,s)),!(i.path==null&&!i.index)&&t.push({path:c,score:Io(c,i.index),routesMeta:m.map((g,R)=>{let[b,w]=Ar(g.relativePath,g.caseSensitive,R===m.length-1);return{...g,matcher:b,compiledParams:w}})})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let u of na(i.path))o(i,l,!0,u)}),t}function na(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=na(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 Po(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ao(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var To=/^:[\w-]+$/,Mo=3,_o=2,Do=1,Oo=10,ko=-2,Sn=e=>e==="*";function Io(e,t){let r=e.split("/"),n=r.length;return r.some(Sn)&&(n+=ko),t&&(n+=_o),r.filter(a=>!Sn(a)).reduce((a,o)=>a+(To.test(o)?Mo:o===""?Do:Oo),n)}function Ao(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 No(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let l=0;l<n.length;++l){let s=n[l],u=l===n.length-1,f=o==="/"?t:t.slice(o.length)||"/",c={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},m=s.matcher&&s.compiledParams?aa(c,f,s.matcher,s.compiledParams):Kt(c,f),g=s.route;if(!m&&u&&r&&!n[n.length-1].route.index&&(m=Kt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},f)),!m)return null;
26Object.assign(a,m.params),i.push({params:a,pathname:Pe([o,m.pathname]),pathnameBase:Uo(Pe([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=Pe([o,m.pathnameBase]))}return i}function Kt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ar(e.path,e.caseSensitive,e.end);return aa(e,t,r,n)}function aa(e,t,r,n){let a=t.match(r);if(!a)return null;let o=a[0],i=ft(o,1),l=a.slice(1);return{params:n.reduce((u,{paramName:f,isOptional:c},m)=>{if(f==="*"){let R=l[m]||"";i=ft(o.slice(0,o.length-R.length),1)}const g=l[m];return c&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Ar(e,t=!1,r=!0){de(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,s,u,f)=>{if(n.push({paramName:l,isOptional:s!=null}),s){let c=f.charAt(u+i.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Fo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return de(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Te(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 $o({basename:e,pathname:t}){return t==="/"?e:Pe([e,t])}var Nr=e=>Zt.test(e);function jo(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?je(e):e,o;return r?(r=$r(r),r.startsWith("/")||r.startsWith("\\")?o=Ln(r.substring(1),"/"):o=Ln(r,t)):o=t,{pathname:o,search:Ho(n),hash:zo(a)}}function Ln(e,t){let r=ft(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function pr(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 oa(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Fr(e){let t=oa(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function tr(e,t,r,n=!1){let a;typeof e=="string"?a=je(e):(a={...e},G(!a.pathname||!a.pathname.includes("?"),pr("?","pathname","search",a)),G(!a.pathname||!a.pathname.includes("#"),pr("#","pathname","hash",a)),G(!a.search||!a.search.includes("#"),pr("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(i==null)l=r;else{let c=t.length-1;if(!n&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),c-=1;a.pathname=m.join("/")}l=c>=0?t[c]:"/"}let s=jo(a,l),u=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||f)&&(s.pathname+="/"),s}var $r=e=>e.replace(/[\\/]{2,}/g,"/"),Pe=e=>$r(e.join("/"));function ft(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var Uo=e=>ft(e).replace(/^\/*/,"/"),Ho=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zo=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Bo=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Wo(e,t){return new Bo(e,typeof t=="number"?{status:t}:t)}var Yo=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},ia=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],qe=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function nt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Pt(e){let t=e.map(r=>
26r.route.path).filter(Boolean);return Pe(t)||"/"}var la=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sa(e,t){let r=e;if(typeof r!="string"||!Zt.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(la)try{let o=new URL(window.location.href),i=er.test(r)?new URL(Qn(r,o.protocol)):new URL(r),l=Te(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:a=!0}catch{de(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var Ke=Symbol("Uninstrumented");function Vo(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let l of i)o[l]&&r[l].push(o[l])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=ct(r.lazy,t.lazy,()=>{});a&&(n.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(o=>{let i=a[o],l=r[`lazy.${o}`];if(typeof i=="function"&&l.length>0){let s=ct(l,i,()=>{});s&&(n.lazy=Object.assign(n.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(a=>{let o=t[a];if(typeof o=="function"&&r[a].length>0){let i=o[Ke]??o,l=ct(r[a],i,(...s)=>xn(s[0]));l&&(a==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[Ke]=i,n[a]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let o=a[Ke]??a,i=ct(r.middleware,o,(...l)=>xn(l[0]));return i?(i[Ke]=o,i):a})),n}function Jo(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){let o=Object.keys(a);for(let i of o)a[i]&&r[i].push(a[i])}})),r.navigate.length>0){let n=e.navigate[Ke]??e.navigate,a=ct(r.navigate,n,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Ee(i):".",...Cn(e,l??{})}});a&&(a[Ke]=n,e.navigate=a)}if(r.fetch.length>0){let n=e.fetch[Ke]??e.fetch,a=ct(r.fetch,n,(...o)=>{let[i,,l,s]=o;return{href:l??".",fetcherKey:i,...Cn(e,s??{})}});a&&(a[Ke]=n,e.fetch=a)}return e}function ct(e,t,r){return e.length===0?null:async(...n)=>{let a=await ua(e,r(...n),()=>t(...n),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function ua(e,t,r,n){let a=e[n],o;if(a){let i,l=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=ua(e,t,r,n-1),o=await i,G(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await a(l,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await l(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function xn(e){let{request:t,context:r,params:n,pattern:a}=e;return{request:Go(t),params:{...n},pattern:a,context:Xo(r)}}function Cn(e,t){return{currentUrl:Ee(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Go(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Xo(e){if(qo(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Ko=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qo(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Ko}var Pn=new URL("http://localhost");function ca(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Pn)}catch{return Pn}}function yr(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function Qo(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function bt(e,t,r,n){let a=null;try{a=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),i=a!=null&&!yr(a,r),l=!yr(o,r);if(n==="reject"){if(i||l)throw new Error("External navigation is not allowed")}
26else if(l&&(a==null||!Qo(e,a)||!yr(a,o)))throw new Error("External navigation is not allowed")}var da=["POST","PUT","PATCH","DELETE"],Zo=new Set(da),ei=["GET",...da],ti=new Set(ei),fa=new Set([301,302,303,307,308]),ri=new Set([307,308]),vr={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ni={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ai=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ha="remix-router-transitions",ma=Symbol("ResetLoaderData"),tt,lt,Ge,st,oi=class{constructor(e){Et(this,tt),Et(this,lt),Et(this,Ge),Et(this,st),Fe(this,tt,e),Fe(this,lt,Yt(e))}get stableRoutes(){return _e(this,tt)}get activeRoutes(){return _e(this,Ge)??_e(this,tt)}get branches(){return _e(this,st)??_e(this,lt)}get hasHMRRoutes(){return _e(this,Ge)!=null}setRoutes(e){Fe(this,tt,e),Fe(this,lt,Yt(e))}setHmrRoutes(e){Fe(this,Ge,e),Fe(this,st,Yt(e))}commitHmrRoutes(){_e(this,Ge)&&(Fe(this,tt,_e(this,Ge)),Fe(this,lt,_e(this,st)),Fe(this,Ge,void 0),Fe(this,st,void 0))}};tt=new WeakMap;lt=new WeakMap;Ge=new WeakMap;st=new WeakMap;function Fs(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";G(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||ai,o=a;if(e.instrumentations){let d=e.instrumentations;o=p=>({...a(p),...Vo(d.map(E=>E.route).filter(Boolean),p)})}let i={},l=new oi(xt(e.routes,o,void 0,i)),s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let u=e.dataStrategy||ci,f={...e.future},c=null,m=new Set,g=null,R=null,b=null,w=null,T=e.hydrationData!=null,C=De(l.activeRoutes,e.history.location,s,!1,l.branches),N=!1,I=null,P,D;if(C==null&&!e.patchRoutesOnNavigation){let d=Oe(404,{pathname:e.history.location.pathname}),{matches:p,route:E}=$t(l.activeRoutes);P=!0,D=!P,C=p,I={[E.id]:d}}else if(C&&!e.hydrationData&&kt(C,l.activeRoutes,e.history.location.pathname).active&&(C=null),C)if(C.some(d=>d.route.lazy))P=!1,D=!P;else if(!C.some(d=>jr(d.route)))P=!0,D=!P;else{let d=e.hydrationData?e.hydrationData.loaderData:null,p=e.hydrationData?e.hydrationData.errors:null,E=C;if(p){let S=C.findIndex(x=>p[x.route.id]!==void 0);E=E.slice(0,S+1)}D=!1,P=!0,E.forEach(S=>{let x=pa(S.route,d,p);D=D||x.renderFallback,P=P&&!x.shouldLoad})}else{P=!1,D=!P,C=[];let d=kt(null,l.activeRoutes,e.history.location.pathname);d.active&&d.matches&&(N=!0,C=d.matches)}let k,y={historyAction:e.history.action,location:e.history.location,matches:C,initialized:P,renderFallback:D,navigation:vr,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||I,fetchers:new Map,blockers:new Map},Y="POP",U=null,le=!1,V,se=!1,Z=new Map,q=null,Re=!1,J=!1,te=new Set,ae=new Map,he=0,ce=-1,me=new Map,ye=new Set,v=new Map,L=new Map,M=new Set,A=new Map,X,K=null;function oe(){if(c=e.history.listen(({action:d,location:p,delta:E})=>{if(X){X(),X=void 0;return}de(A.size===0||E!=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 S=sn({currentLocation:y.location,nextLocation:p,historyAction:d});if(S&&E!=null){let x=new Promise(F=>{X=F});e.history.go(E*-1),Ot(S,{state:"blocked",location:p,proceed(){Ot(S,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),x.then(()=>e.history.go(E))},reset(){let F=new Map(y.blockers);F.set(S,vt),pe({blockers:F})}}),U==null||U.resolve(),U=null;return}return Qe(d,p)}),r){Mi(t,Z);let d=()=>_i(t,Z);t.addEventListener("pagehide",d),q=()=>t.removeEventListener("pagehide",d)}return y.initialized||Qe("POP",y.location,{initialHydration:!0}),k}function Me(){c&&c(),q&&q(),m.clear(),V&&V.abort(),y.fetchers.forEac
26h((d,p)=>ur(y.fetchers,p)),y.blockers.forEach((d,p)=>ln(p))}function ve(d){if(m.add(d),g){let{newErrors:p}=g;g=null,d(y,{deletedFetchers:[],newErrors:p,viewTransitionOpts:void 0,flushSync:!1})}return()=>m.delete(d)}function pe(d,p={}){d.matches&&(d.matches=d.matches.map(x=>{let F=i[x.route.id],O=x.route;return O.element!==F.element||O.errorElement!==F.errorElement||O.hydrateFallbackElement!==F.hydrateFallbackElement?{...x,route:F}:x})),y={...y,...d};let E=[],S=[];y.fetchers.forEach((x,F)=>{x.state==="idle"&&(M.has(F)?E.push(F):S.push(F))}),M.forEach(x=>{!y.fetchers.has(x)&&!ae.has(x)&&E.push(x)}),m.size===0&&(g={newErrors:d.errors??null}),[...m].forEach(x=>x(y,{deletedFetchers:E,newErrors:d.errors??null,viewTransitionOpts:p.viewTransitionOpts,flushSync:p.flushSync===!0})),E.forEach(x=>ur(y.fetchers,x)),S.forEach(x=>y.fetchers.delete(x))}function ot(d,p,{flushSync:E}={}){var H,W;let S=y.actionData!=null&&y.navigation.formMethod!=null&&ge(y.navigation.formMethod)&&y.navigation.state==="loading"&&((H=d.state)==null?void 0:H._isRedirect)!==!0,x;p.actionData?Object.keys(p.actionData).length>0?x=p.actionData:x=null:S?x=y.actionData:x=null;let F=p.loaderData?Fn(y.loaderData,p.loaderData,p.matches||[],p.errors):y.loaderData,O=y.blockers;O.size>0&&(O=new Map(O),O.forEach((j,ee)=>O.set(ee,vt)));let z=Re?!1:cn(d,p.matches||y.matches),_=le===!0||y.navigation.formMethod!=null&&ge(y.navigation.formMethod)&&((W=d.state)==null?void 0:W._isRedirect)!==!0;l.commitHmrRoutes(),Re||Y==="POP"||(Y==="PUSH"?e.history.push(d,d.state):Y==="REPLACE"&&e.history.replace(d,d.state));let $;if(Y==="POP"){let j=Z.get(y.location.pathname);j&&j.has(d.pathname)?$={currentLocation:y.location,nextLocation:d}:Z.has(d.pathname)&&($={currentLocation:d,nextLocation:y.location})}else if(se){let j=Z.get(y.location.pathname);j?j.add(d.pathname):(j=new Set([d.pathname]),Z.set(y.location.pathname,j)),$={currentLocation:y.location,nextLocation:d}}pe({...p,actionData:x,loaderData:F,historyAction:Y,location:d,initialized:!0,renderFallback:!1,navigation:vr,revalidation:"idle",restoreScrollPosition:z,preventScrollReset:_,blockers:O},{viewTransitionOpts:$,flushSync:E===!0}),Y="POP",le=!1,se=!1,Re=!1,J=!1,U==null||U.resolve(),U=null,K==null||K.resolve(),K=null}async function en(d,p){if(U==null||U.resolve(),U=null,typeof d=="number"){U||(U=Un());let ie=U.promise;return e.history.go(d),ie}let E=Sr(y.location,y.matches,s,d,p==null?void 0:p.fromRouteId,p==null?void 0:p.relative),{path:S,submission:x,error:F}=Tn(!1,E,p),O;if(p!=null&&p.mask){let ie=typeof p.mask=="string"?je(p.mask):{...y.location.mask,...p.mask};if(O={pathname:ie.pathname??"",search:ie.search??"",hash:ie.hash??""},er.test(O.pathname))throw new Error("External navigation is not allowed");O.pathname.startsWith("\\")&&(O.pathname=O.pathname.replace(/^\\+/,"/")),bt(typeof p.mask=="string"?p.mask:Ee(p.mask),Ee(O),e.history.createURL("/"),"reject")}let z=y.location,_=Lt(z,S,p&&p.state,void 0,O);_={..._,...e.history.encodeLocation(_)},bt(d==null?e.history.createHref(y.location):typeof d=="string"?d:Ee(d),e.history.createHref(_.mask||_),e.history.createURL("/"),"reject");let $=p&&p.replace!=null?p.replace:void 0,H="PUSH";$===!0?H="REPLACE":$===!1||x!=null&&ge(x.formMethod)&&x.formAction===y.location.pathname+y.location.search&&(H="REPLACE");let W=p&&"preventScrollReset"in p?p.preventScrollReset===!0:void 0,j=(p&&p.flushSync)===!0,ee=sn({currentLocation:z,nextLocation:_,historyAction:H});if(ee){Ot(ee,{state:"blocked",location:_,proceed(){Ot(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),en(d,p)},reset(){let ie=new Map(y.blockers);ie.set(ee,vt),pe({blockers:ie})}});return}await Qe(H,_,{submission:x,pendingError:F,preventScrollReset:W,replace:p&&p.replace,enableViewTransition:p&&p.viewTransition,flushSync:j,callSiteDefaultShouldRevalidate:p&&p.defaultShouldRevalidate})}function Xa(){K||(K=Un()),sr(),pe({revalidation:"loading"});let d=K.promise;return y.navigation.state==="submitting"?d:y.navigation.state==="idle"?(Qe(y.historyAction,y.location,{startUninterruptedRevalidation:!0}),d):(Qe(Y||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:se===!0}),d)}async function Qe(d,p,E){V&&V.abort(),V=null,Y=d,Re=(E&&E.startUninterruptedRevalidation)===!0,lo(y.location,y.matches),le=(E&&E.preventScrollReset)===!0,se=(E&&E.enableViewTransition)===!0;let S=l.activeRoutes,x=E!=null&&E.initialHydration&&y.matches&&y.matches.length>0&&!N?y.matches:De(S,p,s,!1,l.branches),F=(E&&E.flushSync)===!0;if(x&&y.initialized&&!J&&wi(y.location,p)&&!(E&&E.submission&&ge(E.submission.formMethod))){ot(p,{matches:x},{flushSync:F});return}let O=kt(x,S,p.pathname);if(O.active&&O.matches&&(x=O.matches),!x){let{error:ne,notFoundMatches:re,route:be}=cr(p.pathname);ot(p,{matches:re,loaderData:{}
26,errors:{[be.id]:ne}},{flushSync:F});return}let z=E&&E.overrideNavigation?{...E.overrideNavigation,matches:x,historyAction:d}:void 0;V=new AbortController;let _=ut(e.history,p,V.signal,E&&E.submission),$=e.getContext?await e.getContext():new Rn,H;if(E&&E.pendingError)H=[Xe(x).route.id,{type:"error",error:E.pendingError}];else if(E&&E.submission&&ge(E.submission.formMethod)){let ne=await Ka(_,p,E.submission,x,d,$,O.active,E&&E.initialHydration===!0,{replace:E.replace,flushSync:F});if(ne.shortCircuited)return;if(ne.pendingActionResult){let[re,be]=ne.pendingActionResult;if(Ce(be)&&nt(be.error)&&be.error.status===404){V=null,ot(p,{matches:ne.matches,loaderData:{},errors:{[re]:be.error}});return}}x=ne.matches||x,H=ne.pendingActionResult,z=gr(p,x,d,E.submission),F=!1,O.active=!1,_=ut(e.history,_.url,_.signal)}let{shortCircuited:W,matches:j,loaderData:ee,errors:ie,workingFetchers:fe}=await qa(_,p,x,d,$,O.active,z,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,F,H,E&&E.callSiteDefaultShouldRevalidate);W||(V=null,ot(p,{matches:j||x,...$n(H),loaderData:ee,errors:ie,...fe?{fetchers:fe}:{}}))}async function Ka(d,p,E,S,x,F,O,z,_={}){sr();let $=Pi(p,S,x,E);if(pe({navigation:$},{flushSync:_.flushSync===!0}),O){let j=await It(S,p.pathname,d.signal);if(j.type==="aborted")return{shortCircuited:!0};if(j.type==="error"){if(j.partialMatches.length===0){let{matches:ie,route:fe}=$t(l.activeRoutes);return{matches:ie,pendingActionResult:[fe.id,{type:"error",error:j.error}]}}let ee=Xe(j.partialMatches).route.id;return{matches:j.partialMatches,pendingActionResult:[ee,{type:"error",error:j.error}]}}else if(j.matches)S=j.matches;else{let{notFoundMatches:ee,error:ie,route:fe}=cr(p.pathname);return{matches:ee,pendingActionResult:[fe.id,{type:"error",error:ie}]}}}let H,W=Vt(S,p);if(!W.route.action&&!W.route.lazy)H={type:"error",error:Oe(405,{method:d.method,pathname:p.pathname,routeId:W.route.id})};else{let j=dt(o,i,d,p,S,W,z?[]:n,F),ee=await mt(d,p,j,F,null);if(H=ee[W.route.id],!H){for(let ie of S)if(ee[ie.route.id]){H=ee[ie.route.id];break}}if(d.signal.aborted)return{shortCircuited:!0}}if(rt(H)){let j;return _&&_.replace!=null?j=_.replace:j=In(H.response.headers.get("Location"),new URL(d.url),s,e.history)===y.location.pathname+y.location.search,await Ze(d,H,!0,{submission:E,replace:j}),{shortCircuited:!0}}if(Ce(H)){let j=Xe(S,W.route.id);return(_&&_.replace)!==!0&&(Y="PUSH"),{matches:S,pendingActionResult:[j.route.id,H,W.route.id]}}return{matches:S,pendingActionResult:[W.route.id,H]}}async function qa(d,p,E,S,x,F,O,z,_,$,H,W,j,ee){let ie=O||gr(p,E,S,z),fe=z||_||jn(ie),ne=!Re&&!H;if(F){if(ne){let Le=tn(j);pe({navigation:ie,...Le!==void 0?{actionData:Le}:{}},{flushSync:W})}let Q=await It(E,p.pathname,d.signal);if(Q.type==="aborted")return{shortCircuited:!0};if(Q.type==="error"){if(Q.partialMatches.length===0){let{matches:Ne,route:We}=$t(l.activeRoutes);return{matches:Ne,loaderData:{},errors:{[We.id]:Q.error}}}let Le=Xe(Q.partialMatches).route.id;return{matches:Q.partialMatches,loaderData:{},errors:{[Le]:Q.error}}}else if(Q.matches)E=Q.matches;else{let{error:Le,notFoundMatches:Ne,route:We}=cr(p.pathname);return{matches:Ne,loaderData:{},errors:{[We.id]:Le}}}}let re=l.activeRoutes,{dsMatches:be,revalidatingFetchers:Se}=Mn(d,x,o,i,e.history,y,E,fe,p,H?[]:n,H===!0,J,te,M,v,ye,re,s,e.patchRoutesOnNavigation!=null,l.branches,j,ee);if(ce=++he,!e.dataStrategy&&!be.some(Q=>Q.shouldLoad)&&!be.some(Q=>Q.route.middleware&&Q.route.middleware.length>0)&&Se.length===0){let Q=new Map(y.fetchers),Le=an(Q);return ot(p,{matches:E,loaderData:{},errors:j&&Ce(j[1])?{[j[0]]:j[1].error}:null,...$n(j),...Le?{fetchers:Q}:{}},{flushSync:W}),{shortCircuited:!0}}if(ne){let Q={};if(!F){Q.navigation=ie;let Le=tn(j);Le!==void 0&&(Q.actionData=Le)}Se.length>0&&(Q.fetchers=Qa(Se)),pe(Q,{flushSync:W})}Se.forEach(Q=>{Be(Q.key),Q.controller&&ae.set(Q.key,Q.controller)});let pt=()=>Se.forEach(Q=>Be(Q.key));V&&V.signal.addEventListener("abort",pt);let{loaderResults:Ye,fetcherResults:it}=await rn(be,Se,d,p,x);if(d.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",pt),Se.forEach(Q=>ae.delete(Q.key));let Ve=jt(Ye);if(Ve)return await Ze(d,Ve.result,!0,{replace:$}),{shortCircuited:!0};if(Ve=jt(it),Ve)return ye.add(Ve.key),await Ze(d,Ve.result,!0,{replace:$}),{shortCircuited:!0};let Ae=new Map(y.fetchers),{loaderData:dr,errors:Je}=Nn(y,E,Ye,j,Se,it,Ae);H&&y.errors&&(Je={...y.errors,...Je});let At=an(Ae),Nt=on(ce,Ae),Ft=At||Nt||Se.length>0;return{matches:E,loaderData:dr,errors:Je,...Ft?{workingFetchers:Ae}:{}}}function tn(d){if(d&&!Ce(d[1]))return{[d[0]]:d[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function Qa(d){let p=new Map(y.fetchers);return d.forEach(E=>{let S=p.get(E.key),x=gt(void 0,S?S.data:void 0);p.set(E.key,x)}),p}async function Za(d,p,E,S){Be(d);let x=(S&&S.flushSync)===!0,F=l.activeRoutes,O=Sr(y.location,y.matches,s,E,p,S==null?void 0:S.relative),z=De(F,O,s,!1,l.branches),_=kt(z,F,O);if(_.active&&_.matches&&(z=_.matches),!z){ze(d,p,Oe(404,{pathname:O}),{flushSync:x});return}let{path:$,submission:H,error:W}=Tn(!0,O,S);if(W){ze(d,p,W,{flushSync:x});return}let j=e.getContext?await e.getContext():new Rn,ee=(S&&S.preventScrollReset)===!0;if(H&&ge(H.formMethod)){await eo(d,p,$,z,j,_.active,x,ee,H,S&&S.defaultShouldRevalidate);return}v.set(d,{routeId:p,path:$}),await to(d,p,$,z,j,_.active,x,ee,H)}async function eo(d,p,E,S,x,F,O,z,_,$){sr(),v.delete(d);let H=y.fetchers.get(d);He(d,Ti(_,H),{flushSync:O});let W=new AbortController,j=ut(e.history,E,W.signal,_);if(F){let ue=await It(S,new URL(j.url).pathname,j.signal,d);if(ue.type==="aborted")return;if(ue.type==="error"){ze(d,p,ue.error,{flushSync:O});return}else if(ue.matches)S=ue.matches;else{ze(d,p,Oe(404,{pathname:E}),{flushSync:O});return}}let ee=Vt(S,E);if(!ee.route.action&&!ee.route.lazy){let ue=Oe(405,{method:_.formMethod,pathname:E,routeId:p});ze(d,p,ue,{flushSync:O});return}ae.set(d,W);let ie=he,fe=dt(o,i,j,E,S,ee,n,x),ne=await mt(j,E,fe,x,d),re=ne[ee.route.id];if(!re){for(let ue of fe)if(ne[ue.route.id]){re=ne[ue.route.id];break}}if(j.signal.aborted){ae.get(d)===W&&ae.delete(d);return}if(M.has(d)){if(rt(re)||Ce(re)){He(d,$e(void 0));return}}else{if(rt(re))if(ae.delete(d),ce>ie){He(d,$e(void 0));return}else return ye.add(d),He(d,gt(_)),Ze(j,re,!1,{fetcherSubmission:_,preventScrollReset:z});if(Ce(re)){ze(d,p,re.error);return}}let be=y.navigation.location||y.location,Se=ut(e.history,be,W.signal),pt=l.activeRoutes,Ye=y.navigation.state!=="idle"?De(pt,y.navigation.location,s,!1,l.branches):y.matches;G(Ye,"Didn't find any matches after fetcher action");let it=++he;me.set(d,it);let{dsMatches:Ve,revalidatingFetchers:Ae}=Mn(Se,x,o,i,e.history,y,Ye,_,be,n,!1,J,te,M,v,ye,pt,s,e.patchRoutesOnNavigation!=null,l.branches,[ee.route.id,re],$),dr=gt(_,re.data),Je=new Map(y.fetchers);Je.set(d,dr),Ae.filter(ue=>
26ue.key!==d).forEach(ue=>{let et=ue.key,hn=Je.get(et),co=gt(void 0,hn?hn.data:void 0);Je.set(et,co),Be(et),ue.controller&&ae.set(et,ue.controller)}),pe({fetchers:Je});let At=()=>Ae.forEach(ue=>Be(ue.key));W.signal.addEventListener("abort",At);let{loaderResults:Nt,fetcherResults:Ft}=await rn(Ve,Ae,Se,be,x);if(W.signal.aborted)return;W.signal.removeEventListener("abort",At),me.delete(d),ae.delete(d),Ae.forEach(ue=>ae.delete(ue.key));let Q=y.fetchers.has(d),Le=ue=>{if(!Q)return ue;let et=new Map(ue.fetchers);return et.set(d,$e(re.data)),{...ue,fetchers:et}},Ne=jt(Nt);if(Ne)return y=Le(y),Ze(Se,Ne.result,!1,{preventScrollReset:z});if(Ne=jt(Ft),Ne)return ye.add(Ne.key),y=Le(y),Ze(Se,Ne.result,!1,{preventScrollReset:z});let We=new Map(y.fetchers);Q&&We.set(d,$e(re.data));let{loaderData:fn,errors:fr}=Nn(y,Ye,Nt,void 0,Ae,Ft,We);on(it,We),y.navigation.state==="loading"&&it>ce?(G(Y,"Expected pending action"),V&&V.abort(),ot(y.navigation.location,{matches:Ye,loaderData:fn,errors:fr,fetchers:We})):(pe({errors:fr,loaderData:Fn(y.loaderData,fn,Ye,fr),fetchers:We}),J=!1)}async function to(d,p,E,S,x,F,O,z,_){let $=y.fetchers.get(d);He(d,gt(_,$?$.data:void 0),{flushSync:O});let H=new AbortController,W=ut(e.history,E,H.signal);if(F){let re=await It(S,new URL(W.url).pathname,W.signal,d);if(re.type==="aborted")return;if(re.type==="error"){ze(d,p,re.error,{flushSync:O});return}else if(re.matches)S=re.matches;else{ze(d,p,Oe(404,{pathname:E}),{flushSync:O});return}}let j=Vt(S,E);ae.set(d,H);let ee=he,ie=dt(o,i,W,E,S,j,n,x),fe=await mt(W,E,ie,x,d),ne=fe[j.route.id];if(!ne){for(let re of S)if(fe[re.route.id]){ne=fe[re.route.id];break}}if(ae.get(d)===H&&ae.delete(d),!W.signal.aborted){if(M.has(d)){He(d,$e(void 0));return}if(rt(ne))if(ce>ee){He(d,$e(void 0));return}else{ye.add(d),await Ze(W,ne,!1,{preventScrollReset:z});return}if(Ce(ne)){ze(d,p,ne.error);return}He(d,$e(ne.data))}}async function Ze(d,p,E,{submission:S,fetcherSubmission:x,preventScrollReset:F,replace:O}={}){E||(U==null||U.resolve(),U=null),p.response.headers.has("X-Remix-Revalidate")&&(J=!0);let z=p.response.headers.get("Location");G(z,"Expected a Location header on the redirect Response");let _=z,$=new URL(d.url);z=In(z,$,s,e.history),bt(_,z,$,"allow-explicit");let H=Lt(y.location,z,{_isRedirect:!0});if(r){let ne=!1;if(p.response.headers.has("X-Remix-Reload-Document"))ne=!0;else if(Nr(z)){const re=Zn(t,z,!0);ne=re.origin!==t.location.origin||Te(re.pathname,s)==null}if(ne){O?t.location.replace(z):t.location.assign(z);return}}V=null;let W=O===!0||p.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:j,formAction:ee,formEncType:ie}=y.navigation;!S&&!x&&j&&ee&&ie&&(S=jn(y.navigation));let fe=S||x;if(ri.has(p.response.status)&&fe&&ge(fe.formMethod))await Qe(W,H,{submission:{...fe,formAction:z},preventScrollReset:F||le,enableViewTransition:E?se:void 0});else{let ne=gr(H,[],W,S);await Qe(W,H,{overrideNavigation:ne,fetcherSubmission:x,preventScrollReset:F||le,enableViewTransition:E?se:void 0})}}async function mt(d,p,E,S,x){var z;let F,O={};try{F=await fi(u,d,p,E,x,S,!1)}catch(_){return E.filter($=>$.shouldLoad).forEach($=>{O[$.route.id]={type:"error",error:_}}),O}if(d.signal.aborted)return O;if(!ge(d.method))for(let _ of E){if(((z=F[_.route.id])==null?void 0:z.type)==="error")break;!F.hasOwnProperty(_.route.id)&&!y.loaderData.hasOwnProperty(_.route.id)&&(!y.errors||!y.errors.hasOwnProperty(_.route.id))&&_.shouldCallHandler()&&(F[_.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${_.route.id}`)})}for(let[_,$]of Object.entries(F))if(Si($)){let H=$.result;O[_]={type:"redirect",response:yi(H,d,_,E,s)}}else O[_]=await pi($);return O}async function rn(d,p,E,S,x){let F=mt(E,S,d,x,null),O=Promise.all(p.map(async $=>{if($.matches&&$.match&&$.request&&$.controller){let W=(await mt($.request,$.path,$.matches,x,$.key))[$.match.route.id];return{[$.key]:W}}else return Promise.resolve({[$.key]:{type:"error",error:Oe(404,{pathname:$.path})}})})),z=await F,_=(await O).reduce(($,H)=>Object.assign($,H),{});return{loaderResults:z,fetcherResults:_}}function sr(){J=!0,v.forEach((d,p)=>{ae.has(p)&&te.add(p),Be(p)})}function He(d,p,E={}){let S=new Map(y.fetchers);S.set(d,p),pe({fetchers:S},{flushSync:(E&&E.flushSync)===!0})}function ze(d,p,E,S={}){let x=Xe(y.matches,p),F=new Map(y.fetchers);ur(F,d),pe({errors:{[x.route.id]:E},fetchers:F},{flushSync:(S&&S.flushSync)===!0})}function ro(d){return L.set(d,(L.get(d)||0)+1),M.has(d)&&M.delete(
26d),y.fetchers.get(d)||ni}function no(d,p){Be(d,p==null?void 0:p.reason),He(d,$e(null))}function ur(d,p){let E=y.fetchers.get(p);ae.has(p)&&!(E&&E.state==="loading"&&me.has(p))&&Be(p),v.delete(p),me.delete(p),ye.delete(p),M.delete(p),te.delete(p),d.delete(p)}function ao(d){let p=(L.get(d)||0)-1;p<=0?(L.delete(d),M.add(d)):L.set(d,p),pe({fetchers:new Map(y.fetchers)})}function Be(d,p){let E=ae.get(d);E&&(E.abort(p),ae.delete(d))}function nn(d,p){for(let E of d){let S=p.get(E);G(S,`Expected fetcher: ${E}`);let x=$e(S.data);p.set(E,x)}}function an(d){let p=[],E=!1;for(let S of ye){let x=d.get(S);G(x,`Expected fetcher: ${S}`),x.state==="loading"&&(ye.delete(S),p.push(S),E=!0)}return nn(p,d),E}function on(d,p){let E=[];for(let[S,x]of me)if(x<d){let F=p.get(S);G(F,`Expected fetcher: ${S}`),F.state==="loading"&&(Be(S),me.delete(S),E.push(S))}return nn(E,p),E.length>0}function oo(d,p){let E=y.blockers.get(d)||vt;return A.get(d)!==p&&A.set(d,p),E}function ln(d){y.blockers.delete(d),A.delete(d)}function Ot(d,p){let E=y.blockers.get(d)||vt;G(E.state==="unblocked"&&p.state==="blocked"||E.state==="blocked"&&p.state==="blocked"||E.state==="blocked"&&p.state==="proceeding"||E.state==="blocked"&&p.state==="unblocked"||E.state==="proceeding"&&p.state==="unblocked",`Invalid blocker state transition: ${E.state} -> ${p.state}`);let S=new Map(y.blockers);S.set(d,p),pe({blockers:S})}function sn({currentLocation:d,nextLocation:p,historyAction:E}){if(A.size===0)return;A.size>1&&de(!1,"A router only supports one blocker at a time");let S=Array.from(A.entries()),[x,F]=S[S.length-1],O=y.blockers.get(x);if(!(O&&O.state==="proceeding")&&F({currentLocation:d,nextLocation:p,historyAction:E}))return x}function cr(d){let p=Oe(404,{pathname:d}),E=l.activeRoutes,{matches:S,route:x}=$t(E);return{notFoundMatches:S,route:x,error:p}}function io(d,p,E){if(R=d,w=p,b=E||null,!T&&y.navigation===vr){T=!0;let S=cn(y.location,y.matches);S!=null&&pe({restoreScrollPosition:S})}return()=>{R=null,w=null,b=null}}function un(d,p){return b&&b(d,p.map(S=>ta(S,y.loaderData)))||d.key}function lo(d,p){if(R&&w){let E=un(d,p);R[E]=w()}}function cn(d,p){if(R){let E=un(d,p),S=R[E];if(typeof S=="number")return S}return null}function kt(d,p,E){if(e.patchRoutesOnNavigation){let S=l.branches;if(d){if(Object.keys(d[0].params).length>0)return{active:!0,matches:De(p,E,s,!0,S)}}else return{active:!0,matches:De(p,E,s,!0,S)||[]}}return{active:!1,matches:null}}async function It(d,p,E,S){if(!e.patchRoutesOnNavigation)return{type:"success",matches:d};let x=d;for(;;){let F=i;try{await e.patchRoutesOnNavigation({signal:E,path:p,matches:x,fetcherKey:S,patch:($,H)=>{E.aborted||_n($,H,l,F,o,!1)}})}catch($){return{type:"error",error:$,partialMatches:x}}if(E.aborted)return{type:"aborted"};let O=l.branches,z=De(l.activeRoutes,p,s,!1,O),_=null;if(z){if(Object.keys(z[0].params).length===0)return{type:"success",matches:z};if(_=De(l.activeRoutes,p,s,!0,O),!(_&&x.length<_.length&&dn(x,_.slice(0,x.length))))return{type:"success",matches:z}}if(_||(_=De(l.activeRoutes,p,s,!0,O)),!_||dn(x,_))return{type:"success",matches:null};x=_}}function dn(d,p){return d.length===p.length&&d.every((E,S)=>E.route.id===p[S].route.id)}function so(d){i={},l.setHmrRoutes(xt(d,o,void 0,i))}function uo(d,p,E=!1){_n(d,p,l,i,o,E),l.hasHMRRoutes||pe({})}return k={get basename(){return s},get future(){return f},get state(){return y},get routes(){return l.stableRoutes},get branches(){return l.branches},get manifest(){return i},get window(){return t},initialize:oe,subscribe:ve,enableScrollRestoration:io,navigate:en,fetch:Za,revalidate:Xa,createHref:d=>e.history.createHref(d),createURL:d=>e.history.createURL(d),encodeLocation:d=>e.history.encodeLocation(d),getFetcher:ro,resetFetcher:no,deleteFetcher:ao,dispose:Me,getBlocker:oo,deleteBlocker:ln,patchRoutes:uo,_internalFetchControllers:ae,_internalSetRoutes:so,_internalSetStateDoNotUseOrYouWillBreakYourApp(d){pe(d)}},e.instrumentations&&(k=Jo(k,e.instrumentations.map(d=>d.router).filter(Boolean))),k}function ii(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Sr(e,t,r,n,a,o){let i,l;if(a){i=[];for(let u of t)if(i.push(u),u.route.id===a){l=u;break}}else i=t,l=t[t.length-1];let s=tr(n||".",Fr(i),Te(e.pathname,r)||e.pathname,o==="path");if(n==null&&(s.search=e.search,s.hash=e.hash),(n==null||n===""||n===".")&&l){let u=Ur(s.search);if(l.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let f=new URLSearchParams(s.search),c=f.getAll("index");f.delete("index"),c.filter(g=>g).forEach(g=>f.append("index",g));let m=f.toString();s.search=m?`?${m}`:""}}return r!=="/"&&(s.pathname=$o({basename:r,pathname:s.pathname})),Ee(s)}function Tn(e,t,r){if(!r||!ii(r))return{path:t};if(r.formMethod&&!Ci(r.formMethod))return{path:t,error:Oe(405,{method:r.formMethod})};let n=()=>({path:t,error:Oe(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=ba(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ge(o))return n();
26let c=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,[g,R])=>`${m}${g}=${R} 27`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:c}}}else if(r.formEncType==="application/json"){if(!ge(o))return n();try{let c=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:c,text:void 0}}}catch{return n()}}}G(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=Cr(r.formData),s=r.formData;else if(r.body instanceof FormData)l=Cr(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=An(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=An(l)}catch{return n()}let u={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ge(u.formMethod))return{path:t,submission:u};let f=je(t);return e&&f.search&&Ur(f.search)&&l.append("index",""),f.search=`?${l}`,{path:Ee(f),submission:u}}function Mn(e,t,r,n,a,o,i,l,s,u,f,c,m,g,R,b,w,T,C,N,I,P){var Re;let D=I?Ce(I[1])?I[1].error:I[1].data:void 0,k=a.createURL(o.location),y=a.createURL(s),Y;if(f&&o.errors){let J=Object.keys(o.errors)[0];Y=i.findIndex(te=>te.route.id===J)}else if(I&&Ce(I[1])){let J=I[0];Y=i.findIndex(te=>te.route.id===J)-1}let U=I?I[1].statusCode:void 0,le=U&&U>=400,V={currentUrl:k,currentParams:((Re=o.matches[0])==null?void 0:Re.params)||{},nextUrl:y,nextParams:i[0].params,...l,actionResult:D,actionStatus:U},se=Pt(i),Z=i.map((J,te)=>{let{route:ae}=J,he=null;if(Y!=null&&te>Y)he=!1;else if(ae.lazy)he=!0;else if(!jr(ae))he=!1;else if(f){let{shouldLoad:v}=pa(ae,o.loaderData,o.errors);he=v}else li(o.loaderData,o.matches[te],J)&&(he=!0);if(he!==null)return Lr(r,n,e,s,se,J,u,t,he);let ce=!1;typeof P=="boolean"?ce=P:le?ce=!1:(c||k.pathname+k.search===y.pathname+y.search||k.search!==y.search||si(o.matches[te],J))&&(ce=!0);let me={...V,defaultShouldRevalidate:ce},ye=St(J,me);return Lr(r,n,e,s,se,J,u,t,ye,me,P)}),q=[];return R.forEach((J,te)=>{if(f||!i.some(M=>M.route.id===J.routeId)||g.has(te))return;let ae=o.fetchers.get(te),he=ae&&ae.state!=="idle"&&ae.data===void 0,ce=De(w,J.path,T??"/",!1,N);if(!ce){if(C&&he)return;q.push({key:te,routeId:J.routeId,path:J.path,matches:null,match:null,request:null,controller:null});return}if(b.has(te))return;let me=Vt(ce,J.path),ye=new AbortController,v=ut(a,J.path,ye.signal),L=null;if(m.has(te))m.delete(te),L=dt(r,n,v,J.path,ce,me,u,t);else if(he)c&&(L=dt(r,n,v,J.path,ce,me,u,t));else{let M;typeof P=="boolean"?M=P:le?M=!1:M=c;let A={...V,defaultShouldRevalidate:M};St(me,A)&&(L=dt(r,n,v,J.path,ce,me,u,t,A))}L&&q.push({key:te,routeId:J.routeId,path:J.path,matches:L,match:me,request:v,controller:ye})}),{dsMatches:Z,revalidatingFetchers:q}}function jr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function pa(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!jr(e))return{shouldLoad:!1,renderFallback:!1};let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!n};let o=!n&&!a;return{shouldLoad:o,renderFallback:o}}function li(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function si(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function St(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function _n(e,t,r,n,a,o){let i;if(e){let u=n[e];G(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r.activeRoutes;let l=[],s=[];if(t.forEach(u=>{let f=i.find(c=>ya(u,c));f?s.push({existingRoute:f,newRoute:u}):l.push(u)}),l.length>0){let u=xt(l,a,[e||"_","patch",String((i==null?void 0:i.length)||"0")],n);i.push(...u)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:f,newRoute:c}=s[u],m=f,[g]=xt([c],a,[],{},!0);Object.assign(m,{element:g.element?g.element:m.element,errorElement:g.errorElement?g.errorElement:m.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:m.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function ya(e,t){var r;return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:((r=e.children)==null?void 0:r.every((n,a)=>{var o;return(o=t.children)==null?void 0:o.some(i=>ya(n,i))}))??!1:!1}var Dn=new WeakMap,va=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(G(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=Dn.get(a);i||(i={},Dn.set(a,i));let l=i[e];if(l)return l;let s=(async()=>{let u=So(e),c=a[e]!==void 0&&e!=="hasErrorBoundary";if(u)de(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(c)de(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let m=await o();m!=null&&(Object.assign(a,{[e]:m}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(m=>m===void 0)&&(a.lazy=void 0))})();return i[e]=s,s},On=new WeakMap;function ui(e,t,r,n,a){let o=r[e.id];if(G(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let f=On.get(o);if(f)return{lazyRoutePromise:f,lazyHandlerPromise:f};let c=(async()=>{G(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),g={};for(let R in m){let b=m[R];if(b===void 0)continue;let w=xo(R),C=o[R]!==void 0&&R!=="hasErrorBoundary";w?de(!w,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):C?de(!C,`Route "${o.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):g[R]=b}Object.assign(o,g),Object.assign(o,{...n(o),lazy:void 0})})();return On.set(o,c),c.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:c}}let i=Object.keys(e.lazy),l=[],s;for(let f of i){if(a&&a.includes(f))continue;let c=va({key:f,route:e,manifest:r,mapRouteProperties:n});c&&(l.push(c),f===t&&(s=c))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u==null||u.catch(()=>{}),s==null||s.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function kn(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>
27a.resolve()))).forEach((a,o)=>{r[t[o].route.id]=a}),r}async function ci(e){return e.matches.some(t=>t.route.middleware)?ga(e,()=>kn(e)):kn(e)}function ga(e,t){return di(e,t,n=>{if(xi(n))throw n;return n},Ri,r);function r(n,a,o){if(o)return Promise.resolve(Object.assign(o.value,{[a]:{type:"error",result:n}}));{let{matches:i}=e,l=Math.min(Math.max(i.findIndex(u=>u.route.id===a),0),Math.max(i.findIndex(u=>u.shouldCallHandler()),0)),s=Xe(i,i[l].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:n}})}}}async function di(e,t,r,n,a){let{matches:o,...i}=e,l=o.flatMap(u=>u.route.middleware?u.route.middleware.map(f=>[u.route.id,f]):[]);return await wa(i,l,t,r,n,a)}async function wa(e,t,r,n,a,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s)return await r();let[u,f]=s,c,m=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{return c={value:await wa(e,t,r,n,a,o,i+1)},c.value}catch(g){return c={value:await o(g,u,c)},c.value}};try{let g=await f(e,m),R=g!=null?n(g):void 0;return a(R)?R:c?R??c.value:(c={value:await m()},c.value)}catch(g){return await o(g,u,c)}}function Ea(e,t,r,n,a){let o=va({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=ui(n.route,ge(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function Lr(e,t,r,n,a,o,i,l,s,u=null,f){let c=!1,m=Ea(e,t,r,o,i);return{...o,_lazyPromises:m,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler(g){return c=!0,u?typeof f=="boolean"?St(o,{...u,defaultShouldRevalidate:f}):typeof g=="boolean"?St(o,{...u,defaultShouldRevalidate:g}):St(o,u):s},resolve(g){let{lazy:R,loader:b,middleware:w}=o.route,T=c||s||g&&!ge(r.method)&&(R||b),C=w&&w.length>0&&!b&&!R;return T&&(ge(r.method)||!C)?hi({request:r,path:n,pattern:a,match:o,lazyHandlerPromise:m==null?void 0:m.handler,lazyRoutePromise:m==null?void 0:m.route,handlerOverride:g,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function dt(e,t,r,n,a,o,i,l,s=null){return a.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ea(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Lr(e,t,r,n,Pt(a),u,i,l,!0,s))}async function fi(e,t,r,n,a,o,i){n.some(f=>{var c;return(c=f._lazyPromises)==null?void 0:c.middleware})&&await Promise.all(n.map(f=>{var c;return(c=f._lazyPromises)==null?void 0:c.middleware}));let l={request:t,url:Ra(t,r),pattern:Pt(n),params:n[0].params,context:o,matches:n},u=await e({...l,fetcherKey:a,runClientMiddleware:f=>{let c=l;return ga(c,()=>f({...c,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(f=>{var c,m;return[(c=f._lazyPromises)==null?void 0:c.handler,(m=f._lazyPromises)==null?void 0:m.route]}))}catch{}return u}async function hi({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:l}){let s,u,f=ge(e.method),c=f?"action":"loader",m=g=>{let R,b=new Promise((C,N)=>R=N);u=()=>R(),e.signal.addEventListener("abort",u);let w=C=>typeof g!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${n.route.id}]`)):g({request:e,url:Ra(e,t),pattern:r,params:n.params,context:l},...C!==void 0?[C]:[]),T=(async()=>{try{return{type:"data",result:await(i?i(N=>w(N)):w())}}catch(C){return{type:"error",result:C}}})();return Promise.race([T,b])};try{let g=f?n.route.action:n.route.loader;if(a||o)if(g){let R,[b]=await Promise.all([m(g).catch(w=>{R=w}),a,o]);if(R!==void 0)throw R;s=b}else{await a;let R=f?n.route.action:n.route.loader;if(R)[s]=await Promise.all([m(R),o]);else if(c==="action"){let b=new URL(e.url),w=b.pathname+b.search;throw Oe(405,{method:e.method,pathname:w,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(g)s=await m(g);else{let R=new URL(e.url),b=R.pathname+R.search;throw Oe(404,{pathname:b})}}catch(g){return{type:"error",result:g}}finally{u&&e.signal.removeEventListener("abort",u)}return s}async function mi(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function pi(e){var n,a,o,i,l;let{result:t,type:r}=e;if(rr(t)){let s;try{s=await mi(t)}catch(u){return{type:"error",error:u}}return r==="error"?{type:"error",error:new qe(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:"data",data:s,statusCode:t.status,headers:t.headers}}return r==="error"?Pr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(n=t.init)==null?void 0:n.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Ei(t),statusCode:nt(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:nt(t)?t.status:void 0}:Pr(t)?{type:"data",data:t.data,statusCode:(i=t.init)==null?void 0:i.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function yi(e,t,r,n,a){let o=e.headers.get("Location");if(G(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Nr(o)){let i=n.slice(0,n.findIndex(l=>l.route.id===r)+1);
27o=Sr(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}var vi=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function xr(e){try{return vi.includes(new URL(e).protocol)}catch{return!1}}function In(e,t,r,n){if(Nr(e)){let a=e,o=er.test(a)?new URL(Qn(a,t.protocol)):new URL(a);if(xr(o.toString()))throw new Error("Invalid redirect location");let i=Te(o.pathname,r)!=null;if(o.origin===t.origin&&i)return $r(o.pathname)+o.search+o.hash}try{let a=n.createURL(e);if(xr(a.toString()))throw new Error("Invalid redirect location")}catch{}return e}function ut(e,t,r,n){let a=e.createURL(ba(t)).toString(),o={signal:r};if(n&&ge(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=Cr(n.formData):o.body=n.formData}return new Request(a,o)}function Ra(e,t){let r=new URL(e.url),n=typeof t=="string"?je(t):t;if(r.pathname=n.pathname||"/",n.search){let a=new URLSearchParams(n.search),o=a.getAll("index");a.delete("index");for(let i of o.filter(Boolean))a.append("index",i);r.search=a.size?`?${a.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function Cr(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function An(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function gi(e,t,r,n=!1,a=!1){let o={},i=null,l,s=!1,u={},f=r&&Ce(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let m=c.route.id,g=t[m];if(G(!rt(g),"Cannot handle redirect results in processLoaderData"),Ce(g)){let R=g.error;if(f!==void 0&&(R=f,f=void 0),i=i||{},a)i[m]=R;else{let b=Xe(e,m);i[b.route.id]==null&&(i[b.route.id]=R)}n||(o[m]=ma),s||(s=!0,l=nt(g.error)?g.error.status:500),g.headers&&(u[m]=g.headers)}else o[m]=g.data,g.statusCode&&g.statusCode!==200&&!s&&(l=g.statusCode),g.headers&&(u[m]=g.headers)}),f!==void 0&&r&&(i={[r[0]]:f},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function Nn(e,t,r,n,a,o,i){let{loaderData:l,errors:s}=gi(t,r,n);return a.filter(u=>!u.matches||u.matches.some(f=>f.shouldLoad)).forEach(u=>{let{key:f,match:c,controller:m}=u;if(m&&m.signal.aborted)return;let g=o[f];if(G(g,"Did not find corresponding fetcher result"),Ce(g)){let R=Xe(e.matches,c==null?void 0:c.route.id);s&&s[R.route.id]||(s={...s,[R.route.id]:g.error}),i.delete(f)}else if(rt(g))G(!1,"Unhandled fetcher revalidation redirect");else{let R=$e(g.data);i.set(f,R)}}),{loaderData:l,errors:s}}function Fn(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==ma).reduce((o,[i,l])=>(o[i]=l,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function $n(e){return e?Ce(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Xe(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 $t(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Oe(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?l=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",l=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?l=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(l=`Invalid request method "${n.toUpperCase()}"`)),new qe(e||500,i,new Error(l),!0)}function jt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(rt(a))return{key:n,result:a}}}function ba(e){let t=typeof e=="string"?je(e):e;return Ee({...t,hash:""})}function wi(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ei(e){var t,r;return new qe(((t=e.init)==null?void 0:t.status)??500,((r=e.init)==null?void 0:r.statusText)??"Internal Server Error",e.data)}function Ri(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&bi(r))}function bi(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Si(e){return rr(e.result)&&fa.has(e.result.status)}function Ce(e){return e.type==="error"}function rt(e){return(e&&e.type)==="redirect"}function Pr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function rr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Li(e){return fa.has(e)}function xi(e){return rr(e)&&Li(e.status)&&e.headers.has("Location")}function Ci(e){return ti.has(e.toUpperCase())}function ge(e){return Zo.has(e.toUpperCase())}function Ur(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Vt(e,t){let r=typeof t=="string"?je(t).search:t.search;if(e[e.length-1].route.index&&Ur(r||""))return e[e.length-1];let n=oa(e);return n[n.length-1]}function jn(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;
27if(!(!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 gr(e,t,r,n){return n?{state:"loading",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Pi(e,t,r,n){return{state:"submitting",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function gt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ti(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function $e(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Mi(e,t){try{let r=e.sessionStorage.getItem(ha);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function _i(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(ha,JSON.stringify(r))}catch(n){de(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function Un(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var at=h.createContext(null);at.displayName="DataRouter";var ht=h.createContext(null);ht.displayName="DataRouterState";var Sa=h.createContext(!1);function Hr(){return h.useContext(Sa)}var zr=h.createContext({isTransitioning:!1});zr.displayName="ViewTransition";var La=h.createContext(new Map);La.displayName="Fetchers";var Di=h.createContext(null);Di.displayName="Await";var xe=h.createContext(null);xe.displayName="Navigation";var nr=h.createContext(null);nr.displayName="Location";var Ie=h.createContext({outlet:null,matches:[],isDataRoute:!1});Ie.displayName="Route";var Br=h.createContext(null);Br.displayName="RouteError";var xa="REACT_ROUTER_ERROR",Oi="REDIRECT",ki="ROUTE_ERROR_RESPONSE";function Ii(e){if(e.startsWith(`${xa}:${Oi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Ai(e){if(e.startsWith(`${xa}:${ki}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new qe(t.status,t.statusText,t.data)}catch{}}function Ni(e,{relative:t}={}){G(Tt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=h.useContext(xe),{hash:a,pathname:o,search:i}=Mt(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:Pe([r,o])),n.createHref({pathname:l,search:i,hash:a})}function Tt(){return h.useContext(nr)!=null}function ke(){return G(Tt(),"useLocation() may be used only in the context of a <Router> component."),h.useContext(nr).location}var Ca="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pa(e){h.useContext(xe).static||h.useLayoutEffect(e)}function Fi(){let{isDataRoute:e}=h.useContext(Ie);return e?qi():$i()}function $i(){G(Tt(),"useNavigate() may be used only in the context of a <Router> component.");let e=h.useContext(at),{basename:t,navigator:r}=h.useContext(xe),{matches:n}=h.useContext(Ie),{pathname:a}=ke(),o=JSON.stringify(Fr(n)),i=h.useRef(!1);return Pa(()=>{i.current=!0}),h.useCallback((s,u={})=>
27{if(de(i.current,Ca),!i.current)return;if(typeof s=="number"){r.go(s);return}let f=tr(s,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Pe([t,f.pathname])),bt(typeof s=="string"?s:Ee(s),r.createHref(f),ca(r),"reject"),(u.replace?r.replace:r.push)(f,u.state,u)},[t,r,o,a,e])}var ji=h.createContext(null);function Ui(e){let t=h.useContext(Ie).outlet;return h.useMemo(()=>t&&h.createElement(ji.Provider,{value:e},t),[t,e])}function Ta(){let{matches:e}=h.useContext(Ie),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Mt(e,{relative:t}={}){let{matches:r}=h.useContext(Ie),{pathname:n}=ke(),a=JSON.stringify(Fr(r));return h.useMemo(()=>tr(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Hi(e,t,r){G(Tt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=h.useContext(xe),{matches:a}=h.useContext(Ie),o=a[a.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;{let w=u&&u.path||"";Oa(l,!u||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 28 29Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let f=ke(),c;c=f;let m=c.pathname||"/",g=m;if(s!=="/"){let w=s.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(w.length).join("/")}let R=r&&r.state.matches.length?r.state.matches.map(w=>Object.assign(w,{route:r.manifest[w.route.id]||w.route})):ea(e,{pathname:g});return de(u||R!=null,`No routes matched location "${c.pathname}${c.search}${c.hash}" `),de(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Vi(R&&R.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:Pe([s,n.encodeLocation?n.encodeLocation(w.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?s:Pe([s,n.encodeLocation?n.encodeLocation(w.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),a,r)}function zi(){let e=Vr(),t=nt(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},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=h.createElement(h.Fragment,null,h.createElement("p",null,"ð¿ Hey developer ð"),h.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",h.createElement("code",{style:o},"ErrorBoundary")," or"," ",h.createElement("code",{style:o},"errorElement")," prop on your route.")),h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),r?h.createElement("pre",{style:a},r):null,i)}var Bi=h.createElement(zi,null),Ma=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Ai(e.digest);r&&(e=r)}let t=e!==void 0?h.createElement(Ie.Provider,{value:this.props.routeContext},h.createElement(Br.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?h.createElement(Wi,{error:e},t):t}};Ma.contextType=Sa;var wr=new WeakMap;function Wi({children:e,error:t}){let{basename:r,navigator:n}=h.useContext(xe);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=Ii(t.digest);if(a){let o=wr.get(t);if(o)throw o;let i=sa(a.location,r),l=i.absoluteURL||i.to;
29if(bt(a.location,l,ca(n),"allow-explicit"),xr(l))throw new Error("Invalid redirect location");if(la&&!wr.get(t))if(i.isExternal||a.reloadDocument)window.location.href=l;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:a.replace}));throw wr.set(t,s),s}return h.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Yi({routeContext:e,match:t,children:r}){let n=h.useContext(at);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(Ie.Provider,{value:e},r)}function Vi(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let f=a.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);G(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let i=!1,l=-1;if(r&&n){i=n.renderFallback;for(let f=0;f<a.length;f++){let c=a[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(l=f),c.route.id){let{loaderData:m,errors:g}=n,R=c.route.loader&&!m.hasOwnProperty(c.route.id)&&(!g||g[c.route.id]===void 0);if(c.route.lazy||R){r.isStatic&&(i=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let s=r==null?void 0:r.onError,u=n&&s?(f,c)=>{var m,g;s(f,{location:n.location,params:((g=(m=n.matches)==null?void 0:m[0])==null?void 0:g.params)??{},pattern:Pt(n.matches),errorInfo:c})}:void 0;return a.reduceRight((f,c,m)=>{let g,R=!1,b=null,w=null;n&&(g=o&&c.route.id?o[c.route.id]:void 0,b=c.route.errorElement||Bi,i&&(l<0&&m===0?(Oa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,w=null):l===m&&(R=!0,w=c.route.hydrateFallbackElement||null)));let T=t.concat(a.slice(0,m+1)),C=()=>{let N;return g?N=b:R?N=w:c.route.Component?N=h.createElement(c.route.Component,null):c.route.element?N=c.route.element:N=f,h.createElement(Yi,{match:c,routeContext:{outlet:f,matches:T,isDataRoute:n!=null},children:N})};return n&&(c.route.ErrorBoundary||c.route.errorElement||m===0)?h.createElement(Ma,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:C(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:u}):C()},null)}function Wr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ji(e){let t=h.useContext(at);return G(t,Wr(e)),t}function _t(e){let t=h.useContext(ht);return G(t,Wr(e)),t}function Gi(e){let t=h.useContext(Ie);return G(t,Wr(e)),t}function Dt(e){let t=Gi(e),r=t.matches[t.matches.length-1];return G(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Xi(){return Dt("useRouteId")}function Ki(){let e=_t("useNavigation");return h.useMemo(()=>{let{matches:t,historyAction:r,...n}=e.navigation;return n},[e.navigation])}function Yr(){let{matches:e,loaderData:t}=_t("useMatches");return h.useMemo(()=>e.map(r=>ta(r,t)),[e,t])}function _a(){let e=_t("useLoaderData"),t=Dt("useLoaderData");return e.loaderData[t]}function Da(){let e=_t("useActionData"),t=Dt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Vr(){var n;let e=h.useContext(Br),t=_t("useRouteError"),r=Dt("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function qi(){let{router:e}=Ji("useNavigate"),t=Dt("useNavigate"),r=h.useRef(!1);return Pa(()=>{r.current=!0}),h.useCallback(async(a,o={})=>{de(r.current,Ca),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Hn={};function Oa(e,t,r){!t&&!Hn[e]&&(Hn[e]=!0,de(!1,r))}var zn={};function Tr(e,t){!e&&!zn[t]&&(zn[t]=!0,console.warn(t))}var Qi="useOptimistic",Bn=wo[Qi],Zi=()=>{};function el(e){return Bn?Bn(e):[e,Zi]}function $s(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&de(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:h.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&de(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&de(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:h.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var js=["HydrateFallback","hydrateFallbackElement"],tl=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>
29{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function Us({router:e,flushSync:t,onError:r,useTransitions:n}){n=Hr()||n;let[o,i]=h.useState(e.state),[l,s]=el(o),[u,f]=h.useState(),[c,m]=h.useState({isTransitioning:!1}),[g,R]=h.useState(),[b,w]=h.useState(),[T,C]=h.useState(),N=h.useRef(new Map),I=h.useCallback((y,{deletedFetchers:Y,newErrors:U,flushSync:le,viewTransitionOpts:V})=>{U&&r&&Object.values(U).forEach(Z=>{var q;return r(Z,{location:y.location,params:((q=y.matches[0])==null?void 0:q.params)??{},pattern:Pt(y.matches)})}),y.fetchers.forEach((Z,q)=>{Z.data!==void 0&&N.current.set(q,Z.data)}),Y.forEach(Z=>N.current.delete(Z)),Tr(le===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let se=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Tr(V==null||se,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!V||!se){t&&le?t(()=>i(y)):n===!1?i(y):h.startTransition(()=>{n===!0&&s(Z=>Wn(Z,y)),i(y)});return}if(t&&le){t(()=>{b&&(g==null||g.resolve(),b.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let Z=e.window.document.startViewTransition(()=>{t(()=>i(y))});Z.finished.finally(()=>{t(()=>{R(void 0),w(void 0),f(void 0),m({isTransitioning:!1})})}),t(()=>w(Z));return}b?(g==null||g.resolve(),b.skipTransition(),C({state:y,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(f(y),m({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[e.window,t,b,g,n,s,r]);h.useLayoutEffect(()=>e.subscribe(I),[e,I]),h.useEffect(()=>{c.isTransitioning&&!c.flushSync&&R(new tl)},[c]),h.useEffect(()=>{if(g&&u&&e.window){let y=u,Y=g.promise,U=e.window.document.startViewTransition(async()=>{n===!1?i(y):h.startTransition(()=>{n===!0&&s(le=>Wn(le,y)),i(y)}),await Y});U.finished.finally(()=>{R(void 0),w(void 0),f(void 0),m({isTransitioning:!1})}),w(U)}},[u,g,e.window,n,s]),h.useEffect(()=>{g&&u&&l.location.key===u.location.key&&g.resolve()},[g,b,l.location,u]),h.useEffect(()=>{!c.isTransitioning&&T&&(f(T.state),m({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),C(void 0))},[c.isTransitioning,T]);let P=h.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:y=>e.navigate(y),push:(y,Y,U)=>e.navigate(y,{state:Y,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(y,Y,U)=>e.navigate(y,{replace:!0,state:Y,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[e]),D=e.basename||"/",k=h.useMemo(()=>({router:e,navigator:P,static:!1,basename:D,onError:r}),[e,P,D,r]);return h.createElement(h.Fragment,null,h.createElement(at.Provider,{value:k},h.createElement(ht.Provider,{value:l},h.createElement(La.Provider,{value:N.current},h.createElement(zr.Provider,{value:c},h.createElement(al,{basename:D,location:l.location,navigationType:l.historyAction,navigator:P,useTransitions:n},h.createElement(rl,{routes:e.routes,manifest:e.manifest,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Wn(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var rl=h.memo(nl);function nl({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return Hi(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})}function Hs(e){return Ui(e.context)}function al({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:i}){G(!Tt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=h.useMemo(()=>({basename:l,navigator:a,static:o,useTransitions:i,future:{}}),[l,a,o,i]);typeof r=="string"&&(r=je(r));
29let{pathname:u="/",search:f="",hash:c="",state:m=null,key:g="default",mask:R}=r,b=h.useMemo(()=>{let w=Te(u,l);return w==null?null:{location:{pathname:w,search:f,hash:c,state:m,key:g,mask:R},navigationType:n}},[l,u,f,c,m,g,n,R]);return de(b!=null,`<Router basename="${l}"> is not able to match the URL "${u}${f}${c}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:h.createElement(xe.Provider,{value:s},h.createElement(nr.Provider,{children:t,value:b}))}function ol(){return{params:Ta(),loaderData:_a(),actionData:Da(),matches:Yr()}}function zs(e){return function(){const r=ol();return h.createElement(e,r)}}function il(){return{params:Ta(),loaderData:_a(),actionData:Da(),error:Vr()}}function Bs(e){return function(){const r=il();return h.createElement(e,r)}}var Jt="get",Gt="application/x-www-form-urlencoded";function ar(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ll(e){return ar(e)&&e.tagName.toLowerCase()==="button"}function sl(e){return ar(e)&&e.tagName.toLowerCase()==="form"}function ul(e){return ar(e)&&e.tagName.toLowerCase()==="input"}function cl(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function dl(e,t){return e.button===0&&(!t||t==="_self")&&!cl(e)}var Ut=null;function fl(){if(Ut===null)try{new FormData(document.createElement("form"),0),Ut=!1}catch{Ut=!0}return Ut}var hl=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Er(e){return e!=null&&!hl.has(e)?(de(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gt}"`),null):e}function ml(e,t){let r,n,a,o,i;if(sl(e)){let l=e.getAttribute("action");n=l?Te(l,t):null,r=e.getAttribute("method")||Jt,a=Er(e.getAttribute("enctype"))||Gt,o=new FormData(e)}else if(ll(e)||ul(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?Te(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Jt,a=Er(e.getAttribute("formenctype"))||Er(l.getAttribute("enctype"))||Gt,o=new FormData(l,e),!fl()){let{name:u,type:f,value:c}=e;if(f==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,c)}}else{if(ar(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Jt,n=null,a=Gt,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}var pl=-1,yl=-2,vl=-3,gl=-4,wl=-5,El=-6,Rl=-7,bl="B",Sl="D",ka="E",Ll="M",xl="N",Ia="P",Cl="R",Pl="S",Tl="Y",Ml="U",_l="Z",Aa=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Dl(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,n){const a=e.decode(r,{stream:!0}),o=(t+a).split(` 30`);t=o.pop()||"";for(const i of o)n.enqueue(i)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ht=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function Mr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return Yn.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const n=r.length;for(const a of e)r.push(a);return t.length=r.length,Yn.call(this,n)}function Yn(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const i=[[e,s=>{o=s}]];let l=[];for(;i.length>0;){const[s,u]=i.pop();switch(s){case Rl:u(void 0);continue;case wl:u(null);continue;case yl:u(NaN);continue;case El:u(1/0);continue;case vl:u(-1/0);continue;case gl:u(-0);continue}if(t[s]){u(t[s]);continue}const f=r[s];if(!f||typeof f!="object"){t[s]=f,u(f);continue}if(Array.isArray(f))if(typeof f[0]=="string"){const[c,m,g]=f;switch(c){case Sl:u(t[s]=new Date(m));continue;case Ml:u(t[s]=new URL(m));continue;case bl:u(t[s]=BigInt(m));continue;case Cl:u(t[s]=new RegExp(m,g));continue;case Tl:u(t[s]=Symbol.for(m));continue;case Pl:const R=new Set;t[s]=R;for(let I=f.length-1;I>0;I--)i.push([f[I],P=>{R.add(P)}]);u(R);continue;case Ll:const b=new Map;t[s]=b;for(let I=f.length-2;I>0;I-=2){const P=[];i.push([f[I+1],D=>{P[1]=D}]),i.push([f[I],D=>{P[0]=D}]),l.push(()=>{b.set(P[0],P[1])})}u(b);continue;case xl:const w=Object.create(null);t[s]=w;for(const I of Object.keys(m).reverse()){const P=[];i.push([m[I],D=>{P[1]=D}]),i.push([Number(I.slice(1)),D=>{P[0]=D}]),l.push(()=>{w[P[0]]=P[1]})}u(w);continue;case Ia:if(t[m])u(t[s]=t[m]);else{const I=new Aa;n[m]=I,u(t[s]=I.promise)}continue;case ka:const[,T,C]=f;let N=C&&Ht&&ia.includes(C)&&C in Ht&&typeof Ht[C]=="function"?new Ht[C](T):new Error(T);t[s]=N,u(N);continue;case _l:u(t[s]=t[m]);continue;default:if(Array.isArray(a)){const I=[],P=f.slice(1);for(let D=0;D<P.length;D++){const k=P[D];i.push([k,y=>{I[D]=y}])}l.push(()=>{for(const D of a){const k=D(f[0],...I);if(k){u(t[s]=k.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const c=[];t[s]=c;for(let m=0;m<f.length;m++){const g=f[m];g!==pl&&i.push([g,R=>{c[m]=R}])}u(c);continue}else{const c={};t[s]=c;for(const m of Object.keys(f).reverse()){const g=[];i.push([f[m],R=>{g[1]=R}]),i.push([Number(m.slice(1)),R=>{g[0]=R}]),l.push(()=>{c[g[0]]=g[1]})}u(c);continue}}for(;l.length>0;)l.pop()();return o}async function Ol(e,t){const{plugins:r}=t??{},n=new Aa,a=e.pipeThrough(Dl()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await kl.call(o,a);let l=n.promise;
30return i.done?n.resolve():l=Il.call(o,a).then(n.resolve).catch(s=>{for(const u of Object.values(o.deferred))u.reject(s);n.reject(s)}),{done:l.then(()=>a.closed),value:i.value}}async function kl(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:Mr.call(this,r)}}async function Il(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case Ia:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=Mr.call(this,l);o.resolve(s);break}case ka:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=Mr.call(this,l);o.reject(s);break}default:throw new SyntaxError}t=await e.read()}}async function Al(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var Nl={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Fl=/[&><\u2028\u2029]/g;function _r(e){return e.replace(Fl,t=>Nl[t])}function we(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Dr=Symbol("SingleFetchRedirect"),Na=class extends Error{},$l=202,jl=new Set([100,101,204,205]);function Ws(e,t,r,n,a,o){let i=Ul(e,l=>{let s=t.routes[l.route.id];return we(s,"Route not found in manifest"),{hasLoader:s.hasLoader,hasClientLoader:s.hasClientLoader}},Jl,n,a,o);return async l=>l.runClientMiddleware(i)}function Ul(e,t,r,n,a,o,i=()=>!0){return async l=>{let{request:s,matches:u,fetcherKey:f}=l,c=e();if(s.method!=="GET")return Hl(l,r,a,o);let m=u.some(g=>{let{hasLoader:R,hasClientLoader:b}=t(g);return g.shouldCallHandler()&&R&&!b});return!n&&!m?zl(l,t,r,a,o):f?Yl(l,r,a,o):Bl(l,c,t,r,n,a,o,i)}}async function Hl(e,t,r,n){let a=e.matches.find(l=>l.shouldCallHandler());we(a,"No action match found");let o,i=await a.resolve(async l=>await l(async()=>{let{data:u,status:f}=await t(e,r,n,[a.route.id]);return o=f,Ct(u,a.route.id)}));return rr(i.result)||nt(i.result)||Pr(i.result)?{[a.route.id]:i}:{[a.route.id]:{type:i.type,result:Wo(i.result,o)}}}async function zl(e,t,r,n,a){let o=e.matches.filter(l=>l.shouldCallHandler()),i={};return await Promise.all(o.map(l=>l.resolve(async s=>{try{let{hasClientLoader:u}=t(l),f=l.route.id,c=u?await s(async()=>{let{data:m}=await r(e,n,a,[f]);return Ct(m,f)}):await s();i[l.route.id]={type:"data",result:c}}catch(u){i[l.route.id]={type:"error",result:u}}}))),i}async function Bl(e,t,r,n,a,o,i,l=()=>!0){let s=new Set,u=!1,f=e.matches.map(()=>Vn()),c=Vn(),m={},g=Promise.all(e.matches.map(async(b,w)=>b.resolve(async T=>{f[w].resolve();let C=b.route.id,{hasLoader:N,hasClientLoader:I}=r(b),P=!b.shouldRevalidateArgs||b.shouldRevalidateArgs.actionStatus==null||b.shouldRevalidateArgs.actionStatus<400;if(!b.shouldCallHandler(P)){u||(u=b.shouldRevalidateArgs!=null&&N);return}if(l(b)&&I){N&&(u=!0);try{let k=await T(async()=>{let{data:y}=await n(e,o,i,[C]);return Ct(y,C)});m[C]={type:"data",result:k}}catch(k){m[C]={type:"error",result:k}}return}N&&s.add(C);try{let k=await T(async()=>{let y=await c.promise;return Ct(y,C)});m[C]={type:"data",result:k}}catch(k){m[C]={type:"error",result:k}}})));if(await Promise.all(f.map(b=>b.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||s.size===0)&&!window.__reactRouterHdrActive)c.resolve({routes:{}});else{let b=a&&u&&s.size>0?[...s.keys()]:void 0;try{let w=await n(e,o,i,b);c.resolve(w.data)}catch(w){c.reject(w)}}return await g,await Wl(c.promise,e.matches,s,m),m}async function Wl(e,t,r,n){var a;try{let o,i=await e;
30if("routes"in i){for(let l of t)if(l.route.id in i.routes){let s=i.routes[l.route.id];if("error"in s){o=s.error,((a=n[l.route.id])==null?void 0:a.result)==null&&(n[l.route.id]={type:"error",result:o});break}}}o!==void 0&&Array.from(r.values()).forEach(l=>{n[l].result instanceof Na&&(n[l].result=o)})}catch{}}async function Yl(e,t,r,n){let a=e.matches.find(l=>l.shouldCallHandler());we(a,"No fetcher match found");let o=a.route.id,i=await a.resolve(async l=>l(async()=>{let{data:s}=await t(e,r,n,[o]);return Ct(s,o)}));return{[a.route.id]:i}}function Vl(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function Jr(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&Te(a.pathname,t)==="/"?a.pathname=`${ft(t)}/_root.${n}`:a.pathname=`${ft(a.pathname)}.${n}`,a}async function Jl(e,t,r,n){let{request:a}=e,o=Jr(a.url,t,r,"data");a.method==="GET"&&(o=Vl(o),n&&o.searchParams.set("_routes",n.join(",")));let i=await fetch(o,await Al(a));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new qe(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has("X-Remix-Redirect"))return{status:$l,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:i.headers.get("X-Remix-Revalidate")==="true",reload:i.headers.get("X-Remix-Reload-Document")==="true",replace:i.headers.get("X-Remix-Replace")==="true"}}};if(jl.has(i.status)){let l={};return n&&a.method!=="GET"&&(l[n[0]]={data:void 0}),{status:i.status,data:{routes:l}}}we(i.body,"No response body to decode");try{let l=await Gl(i.body,window),s;if(a.method==="GET"){let u=l.value;Dr in u?s={redirect:u[Dr]}:s={routes:u}}else{let u=l.value,f=n==null?void 0:n[0];we(f,"No routeId found for single fetch call decoding"),"redirect"in u?s={redirect:u}:s={routes:{[f]:u}}}return{status:i.status,data:s}}catch{throw new Error("Unable to decode turbo-stream response")}}function Gl(e,t){return Ol(e,{plugins:[(r,...n)=>{if(r==="SanitizedError"){let[a,o,i]=n,l=Error;a&&ia.includes(a)&&a in t&&typeof t[a]=="function"&&(l=t[a]);let s=new l(o);return s.stack=i,{value:s}}if(r==="ErrorResponse"){let[a,o,i]=n;return{value:new qe(o,i,a)}}if(r==="SingleFetchRedirect")return{value:{[Dr]:n[0]}};if(r==="SingleFetchClassInstance")return{value:n[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function Ct(e,t){if("redirect"in e){let{redirect:n,revalidate:a,reload:o,replace:i,status:l}=e.redirect;throw Yo(n,{status:l,headers:{...a?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...i?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new Na(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function Vn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function Fa(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Xl(e,t,r){let n=e.map(o=>{var s;let i=t[o.route.id],l=r.routes[o.route.id];return[l&&l.css?l.css.map(u=>({rel:"stylesheet",href:u})):[],((s=i==null?void 0:i.links)==null?void 0:s.call(i))||[]]}).flat(2),a=Xr(e,r);return Ha(n,a)}function $a(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Kl(e){if(!e.css)return;let t=$a(e);await Promise.all(t.map(Ua))}async function ja(e,t){if(!e.css&&!t.links||!ts())return;let r=[];if(e.css&&r.push(...$a(e)),t.links&&r.push(...t.links()),r.length===0)return;let n=[];for(let a of r)!Gr(a)&&a.rel==="stylesheet"&&n.push({...a,rel:"preload",as:"style"});
30await Promise.all(n.map(Ua))}async function Ua(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return 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 Gr(e){return e!=null&&typeof e.page=="string"}function ql(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ql(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let i=await Fa(o,r);return i.links?i.links():[]}return[]}));return Ha(n.flat(1).filter(ql).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Jn(e,t,r,n,a,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>{var f;return r[u].pathname!==s.pathname||((f=r[u].route.path)==null?void 0:f.endsWith("*"))&&r[u].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{var c;let f=n.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;
30if(s.route.shouldRevalidate){let m=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((c=r[0])==null?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function Xr(e,t,{includeHydrateFallback:r}={}){return Zl(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function Zl(e){return[...new Set(e)]}function es(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Ha(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(t&&!Gr(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let l=JSON.stringify(es(o));return r.has(l)||(r.add(l),a.push({key:l,link:o})),a},[])}var zt;function ts(){if(zt!==void 0)return zt;let e=document.createElement("link");return zt=e.relList.supports("preload"),e=null,zt}function rs(){let{nonce:e}=Ue();return h.createElement(Or,{title:"Loading...",renderScripts:!0},h.createElement("script",{nonce:e,dangerouslySetInnerHTML:{__html:` 31 console.log( 32 "ð¿ Hey developer ð. You can provide a way better UX than this " + 33 "when your app is loading JS modules and/or running \`clientLoader\` " + 34 "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " + 35 "for more information." 36 ); 37 `}}))}function za(e){let t={};return Object.values(e).forEach(r=>{if(r){let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}}),t}function ns(e,t,r){let n=Ba(t),a=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?rs:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>h.createElement(Va,{error:Vr()}):void 0;return e.id==="root"&&t.Layout?{...n?{element:h.createElement(t.Layout,null,h.createElement(n,null))}:{Component:n},...o?{errorElement:h.createElement(t.Layout,null,h.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:h.createElement(t.Layout,null,h.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function Ys(e,t,r,n,a,o){return Kr(t,r,n,a,o,"",za(t),e)}function Bt(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let n=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new qe(400,"Bad Request",new Error(n),!0)}}function Rr(e,t){let r=e==="clientAction"?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new qe(405,"Method Not Allowed",new Error(n),!0)}function Kr(e,t,r,n,a,o="",i=za(e),l){return(i[o]||[]).map(s=>{var C,N,I;let u=t[s.id];function f(P){return we(typeof P=="function","No single fetch function available for route handler"),P()}function c(P){return s.hasLoader?f(P):Promise.resolve(null)}function m(P){if(!s.hasAction)throw Rr("action",s.id);return f(P)}function g(P){import(P)}function R(P){P.clientActionModule&&g(P.clientActionModule),P.clientLoaderModule&&g(P.clientLoaderModule)}async function b(P){let D=t[s.id],k=D?ja(s,D):Promise.resolve();try{return P()}finally{await k}}let w={id:s.id,index:s.index,path:s.path};if(u){Object.assign(w,{...w,...ns(s,u,a),middleware:u.clientMiddleware,handle:u.handle,shouldRevalidate:Gn(w.path,u,s,n,l)});let P=r&&r.loaderData&&s.id in r.loaderData,D=P?(C=r==null?void 0:r.loaderData)==null?void 0:C[s.id]:void 0,k=r&&r.errors&&s.id in r.errors,y=k?(N=r==null?void 0:r.errors)==null?void 0:N[s.id]:void 0,Y=l==null&&(((I=u.clientLoader)==null?void 0:I.hydrate)===!0||!s.hasLoader);w.loader=async({request:U,params:le,context:V,pattern:se,url:Z},q)=>{let Re=Y;return Y=!1,await b(async()=>(we(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:U,params:le,context:V,pattern:se,url:Z,async serverLoader(){if
37(Bt("loader",s),Re){if(P)return D;if(k)throw y}return c(q)}}):c(q)))},w.loader.hydrate=is(s.id,u.clientLoader,s.hasLoader,a),w.action=({request:U,params:le,context:V,pattern:se,url:Z},q)=>b(async()=>{if(we(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(a)throw Rr("clientAction",s.id);return m(q)}return u.clientAction({request:U,params:le,context:V,pattern:se,url:Z,async serverAction(){return Bt("action",s),m(q)}})})}else{s.hasClientLoader||(w.loader=(k,y)=>b(()=>c(y))),s.hasClientAction||(w.action=(k,y)=>b(()=>{if(a)throw Rr("clientAction",s.id);return m(y)}));let P;async function D(){return P?await P:(P=(async()=>{(s.clientLoaderModule||s.clientActionModule)&&await new Promise(y=>setTimeout(y,0));let k=os(s,t);return R(s),await k})(),await P)}w.lazy={loader:s.hasClientLoader?async()=>{let{clientLoader:k}=s.clientLoaderModule?await import(s.clientLoaderModule):await D();return we(k,"No `clientLoader` export found"),(y,Y)=>k({...y,async serverLoader(){return Bt("loader",s),c(Y)}})}:void 0,action:s.hasClientAction?async()=>{let k=s.clientActionModule?import(s.clientActionModule):D();R(s);let{clientAction:y}=await k;return we(y,"No `clientAction` export found"),(Y,U)=>y({...Y,async serverAction(){return Bt("action",s),m(U)}})}:void 0,middleware:s.hasClientMiddleware?async()=>{let{clientMiddleware:k}=s.clientMiddlewareModule?await import(s.clientMiddlewareModule):await D();return we(k,"No `clientMiddleware` export found"),k}:void 0,shouldRevalidate:async()=>{let k=await D();return Gn(w.path,k,s,n,l)},handle:async()=>(await D()).handle,Component:async()=>(await D()).Component,ErrorBoundary:s.hasErrorBoundary?async()=>(await D()).ErrorBoundary:void 0}}let T=Kr(e,t,r,n,a,s.id,i,l);return T.length>0&&(w.children=T),w})}function Gn(e,t,r,n,a){if(a)return as(r.id,t.shouldRevalidate,a);if(!n&&r.hasLoader&&!r.hasClientLoader){let o=e?Ar(e)[1].map(l=>l.paramName):[];const i=l=>o.some(s=>l.currentParams[s]!==l.nextParams[s]);if(t.shouldRevalidate){let l=t.shouldRevalidate;return s=>l({...s,defaultShouldRevalidate:i(s)})}else return l=>i(l)}return t.shouldRevalidate}function as(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function os(e,t){let r=Fa(e,t),n=Kl(e),a=await r;return await Promise.all([n,ja(e,a)]),{Component:Ba(a),ErrorBoundary:a.ErrorBoundary,clientMiddleware:a.clientMiddleware,clientAction:a.clientAction,clientLoader:a.clientLoader,handle:a.handle,links:a.links,meta:a.meta,shouldRevalidate:a.shouldRevalidate}}function Ba(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function is(e,t,r,n){return n&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var Xt=new Set,ls=1e3,qt=new Set,ss=7680;function us(e){let t=new Set;return e.forEach(r=>{r.startsWith("/")||(r=`/${r}`);for(let n=1;n<r.length;n++)r[n]==="/"&&t.add(r.slice(0,n));t.add(r)}),Array.from(t)}function qr(e,t){return e.mode==="lazy"&&t===!0}function cs({sri:e,...t},r){let n=new Set(r.state.matches.map(l=>l.route.id)),a=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(a.pop();a.length>0;)o.push(`/${a.join("/")}`),a.pop();o.forEach(l=>{let s=De(r.routes,l,r.basename||"/",!1,r.branches);s&&s.forEach(u=>n.add(u.route.id))});let i=[...n].reduce((l,s)=>Object.assign(l,{[s]:t.routes[s]}),{});return{...t,routes:i,sri:e?!0:void 0}}function Vs(e,t,r,n,a,o,i){if(qr(a,n))return async({path:l,patch:s,signal:u,fetcherKey:f})=>{if(qt.has(l))return;let{state:c}=e();await Wa([l],f?window.location.href:Ee(c.navigation.location||c.location),t,r,n,o,i,a.manifestPath,s,u)}}function Js(e,t,r,n,a,o){h.useEffect(()=>{var f,c;if(!qr(a,n)||((c=(f=window.navigator)==null?void 0:f.connection)==null?void 0:c.saveData)===!0)return;function i(m){let g=m.tagName==="FORM"?m.getAttribute("action"):m.getAttribute("href");if(!g)return;let R=m.tagName==="A"?m.pathname:new URL(g,window.location.origin).pathname;qt.has(R)||Xt.add(R)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let m=Array.from(Xt.keys()).filter(g=>qt.has(g)?(Xt.delete(g),!1):!0);if(m.length!==0)try{await Wa(m,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(g){console.error("Failed to fetch manifest patches",g)}}let s=hs(l,100);l();let u=new MutationObserver(()=>s());return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[n,o,t,r,e,a])}function ds(e,t){let r=e||"/__manifest";return t==null?r:Pe([t,r])}var br="react-router-manifest-version";async function Wa(e,t,r,n,a,o,i,l,s,u){e=us(e);const f=new URLSearchParams;f.set("paths",e.sort().join(",")),f.set("version",r.version);let c=new URL(ds(l,i),window.location.origin);if(c.search=f.toString(),c.toString().length>ss){Xt.clear();return}let m;try{let w=await fetch(c,{signal:u});if(w.ok){if(w.status===204&&w.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a
37new document navigation to sync up with the latest manifest.");return}try{if(sessionStorage.getItem(br)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(br,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(w.status>=400)throw new Error(await w.text())}else throw new Error(`${w.status} ${w.statusText}`);try{sessionStorage.removeItem(br)}catch{}m=await w.json()}catch(w){if(u!=null&&u.aborted)return;throw w}let g=new Set(Object.keys(r.routes)),R=Object.values(m).reduce((w,T)=>(T&&!g.has(T.id)&&(w[T.id]=T),w),{});Object.assign(r.routes,R),e.forEach(w=>fs(w,qt));let b=new Set;Object.values(R).forEach(w=>{w&&(!w.parentId||!R[w.parentId])&&b.add(w.parentId)}),b.forEach(w=>s(w||null,Kr(R,n,null,a,o,w)))}function fs(e,t){if(t.size>=ls){let r=t.values().next().value;t.delete(r)}t.add(e)}function hs(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function or(){let e=h.useContext(at);return we(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ir(){let e=h.useContext(ht);return we(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var lr=h.createContext(void 0);lr.displayName="FrameworkContext";function Ue(){let e=h.useContext(lr);return we(e,"You must render this element inside a <HydratedRouter> element"),e}function ms(e,t){let r=h.useContext(lr),[n,a]=h.useState(!1),[o,i]=h.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:f,onTouchStart:c}=t,m=h.useRef(null);h.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=T=>{T.forEach(C=>{i(C.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return m.current&&w.observe(m.current),()=>{w.disconnect()}}},[e]),h.useEffect(()=>{if(n){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[n]);let g=()=>{a(!0)},R=()=>{a(!1),i(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:wt(l,g),onBlur:wt(s,R),onMouseEnter:wt(u,g),onMouseLeave:wt(f,R),onTouchStart:wt(c,g)}]:[!1,m,{}]}function wt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Qr(e,t,r){if(r&&!Qt)return[e[0]];if(t){let n=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,n+1)}return e}var Xn="data-react-router-critical-css";function Gs({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:n,routeModules:a,criticalCss:o,nonce:i}=Ue(),{errors:l,matches:s}=ir(),u=Qr(s,l,r),f=h.useMemo(()=>Xl(u,a,n),[u,a,n]);return e==null&&i&&(e=i),h.createElement(h.Fragment,null,typeof o=="string"?h.createElement("style",{[Xn]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?h.createElement("link",{[Xn]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,f.map(({key:c,link:m})=>Gr(m)?h.createElement(Ya,{key:c,nonce:e,...m,crossOrigin:m.crossOrigin??t}):h.createElement("link",{key:c,nonce:e,...m,crossOrigin:m.crossOrigin??t})))}function Ya({page:e,...t}){let r=Hr(),{nonce:n}=Ue(),{router:a}=or(),o=h.useMemo(()=>ea(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&n&&(t={...t,nonce:n}),r?h.createElement(ys,{page:e,matches:o,...t}):h.createElement(vs,{page:e,matches:o,...t})):null}function ps(e){let{manifest:t,routeModules:r}=Ue(),[n,a]=h.useState([]);return h.useEffect(()=>{let o=!1;return Ql(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function ys({page:e,matches:t,...r}){let n=ke(),{future:a}=Ue(),{basename:o}=or(),i=h.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let l=Jr(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?s=!0:u.push(f.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,a.v8_trailingSlashAwareDataRequests,e,n,t]);return h.createElement(h.Fragment,null,i.map(l=>h.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function vs({page:e,matches:t,...r}){let n=ke(),{future:a,manifest:o,routeModules:i}=Ue(),{basename:l}=or(),{loaderData:s,matches:u}=ir(),f=h.useMemo(()=>Jn(e,t,u,o,n,"data"),[e,t,u,o,n]),c=h.useMemo(()=>Jn(e,t,u,o,n,"assets"),[e,t,u,o,n]),m=h.useMemo(()=>
37{if(e===n.pathname+n.search+n.hash)return[];let b=new Set,w=!1;if(t.forEach(C=>{var I;let N=o.routes[C.route.id];!N||!N.hasLoader||(!f.some(P=>P.route.id===C.route.id)&&C.route.id in s&&((I=i[C.route.id])!=null&&I.shouldRevalidate)||N.hasClientLoader?w=!0:b.add(C.route.id))}),b.size===0)return[];let T=Jr(e,l,a.v8_trailingSlashAwareDataRequests,"data");return w&&b.size>0&&T.searchParams.set("_routes",t.filter(C=>b.has(C.route.id)).map(C=>C.route.id).join(",")),[T.pathname+T.search]},[l,a.v8_trailingSlashAwareDataRequests,s,n,o,f,t,e,i]),g=h.useMemo(()=>Xr(c,o),[c,o]),R=ps(c);return h.createElement(h.Fragment,null,m.map(b=>h.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),g.map(b=>h.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),R.map(({key:b,link:w})=>h.createElement("link",{key:b,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function Xs(){let{isSpaMode:e,routeModules:t}=Ue(),{errors:r,matches:n,loaderData:a}=ir(),o=ke(),i=Qr(n,r,e),l=null;r&&(l=r[i[i.length-1].route.id]);let s=[],u=null,f=[];for(let c=0;c<i.length;c++){let m=i[c],g=m.route.id,R=a[g],b=m.params,w=t[g],T=[],C={id:g,data:R,loaderData:R,meta:[],params:m.params,pathname:m.pathname,handle:m.route.handle,error:l};if(f[c]=C,w!=null&&w.meta?T=typeof w.meta=="function"?w.meta({data:R,loaderData:R,params:b,location:o,matches:f,error:l}):Array.isArray(w.meta)?[...w.meta]:w.meta:u&&(T=[...u]),T=T||[],!Array.isArray(T))throw new Error("The route at "+m.route.path+` returns an invalid value. All route meta functions must return an array of meta objects. 38 39To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);C.meta=T,f[c]=C,s=[...T],u=s}return h.createElement(h.Fragment,null,s.flat().map(c=>{if(!c)return null;if("tagName"in c){let{tagName:m,...g}=c;if(!gs(m))return console.warn(`A meta object uses an invalid tagName: ${m}. Expected either 'link' or 'meta'`),null;let R=m;return h.createElement(R,{key:JSON.stringify(g),...g})}if("title"in c)return h.createElement("title",{key:"title"},String(c.title));if("charset"in c&&(c.charSet??(c.charSet=c.charset),delete c.charset),"charSet"in c&&c.charSet!=null)return typeof c.charSet=="string"?h.createElement("meta",{key:"charSet",charSet:c.charSet}):null;if("script:ld+json"in c)try{let m=JSON.stringify(c["script:ld+json"]);return h.createElement("script",{key:`script:ld+json:${m}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:_r(m)}})}catch{return null}return h.createElement("meta",{key:JSON.stringify(c),...c})}))}function gs(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Qt=!1;function ws(){Qt=!0}function Es(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:i,nonce:l}=Ue(),{router:s,static:u,staticContext:f}=or(),{matches:c}=ir(),m=Hr(),g=qr(o,i);e.nonce==null&&l&&(e={...e,nonce:l}),a&&(a.didRenderScripts=!0);let R=Qr(c,null,n);h.useEffect(()=>{ws()},[]);let b=h.useMemo(()=>{var P;if(m)return null;let N=f?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",I=u?`${(P=t.hmr)!=null&&P.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${g?"":`import ${JSON.stringify(t.url)}`}; 40${R.map((D,k)=>{let y=`route${k}`,Y=t.routes[D.route.id];we(Y,`Route ${D.route.id} not found in manifest`);let{clientActionModule:U,clientLoaderModule:le,clientMiddlewareModule:V,hydrateFallbackModule:se,module:Z}=Y,q=[...U?[{module:U,varName:`${y}_clientAction`}]:[],...le?[{module:le,varName:`${y}_clientLoader`}]:[],...V?[{module:V,varName:`${y}_clientMiddleware`}]:[],...se?[{module:se,varName:`${y}_HydrateFallback`}]:[],{module:Z,varName:`${y}_main`}];if(q.length===1)return`import * as ${y} from ${JSON.stringify(Z)};`;let Re=q.map(te=>`import * as ${te.varName} from "${te.module}";`).join(` 41`),J=`const ${y} = {${q.map(te=>`...${te.varName}`).join(",")}};`;return[Re,J].join(` 42`)}).join(` 43`)} 44 ${g?`window.__reactRouterManifest = ${JSON.stringify(cs(t,s),null,2)};`:""} 45 window.__reactRouterRouteModules = {${R.map((D,k)=>`${JSON.stringify(D.route.id)}:route${k}`).join(",")}}; 46 47import(${JSON.stringify(t.entry.module)});`:" ";return h.createElement(h.Fragment,null,h.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:N},type:void 0}),h.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:I},type:"module",async:!0}))},[]),w=Qt||m?[]:[...new Set(t.entry.imports.concat(Xr(R,t,{includeHydrateFallback:!0})))],T=typeof t.sri=="object"?t.sri:{};return Tr(!m,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Qt||m?null:h.createElement(h.Fragment,null,typeof t.sri=="object"?h.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:T})}}):null,g?null:h.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:T[t.url],nonce:e.nonce,suppressHydrationWarning:!0}),h.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:T[t.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),w.map(C=>h.createElement("link",{key:C,rel:"modulepreload",href:C,crossOrigin:e.crossOrigin,integrity:T[C],nonce:e.nonce,suppressHydrationWarning:!0})),b)}function Rs(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ks=class extends h.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?h.createElement(Va,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Va({error:e,isOutsideRemixApp:t}){let{nonce:r}=Ue();console.error(e);let n=h.createElement("script",{nonce:r,dangerouslySetInnerHTML:{__html:` 48 console.log( 49 "ð¿ Hey developer ð. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information." 50 ); 51 `}});if(nt(e))return h.createElement(Or,{title:"Unhandled Thrown Response!"},h.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);let a;if(e instanceof Error)a=e;else{let o=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(o)}
51return h.createElement(Or,{title:"Application Error!",isOutsideRemixApp:t},h.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),h.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),n)}function Or({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){var o;let{routeModules:a}=Ue();return(o=a.root)!=null&&o.Layout&&!r?n:h.createElement("html",{lang:"en"},h.createElement("head",null,h.createElement("meta",{charSet:"utf-8"}),h.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),h.createElement("title",null,e)),h.createElement("body",null,h.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?h.createElement(Es,null):null)))}var bs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{bs&&(window.__reactRouterVersion="7.18.3")}catch{}var Ja=h.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:f,preventScrollReset:c,viewTransition:m,defaultShouldRevalidate:g,...R},b){let{basename:w,navigator:T,useTransitions:C}=h.useContext(xe),N=typeof f=="string"&&Zt.test(f),I=sa(f,w);f=I.to;let P=Ni(f,{relative:a}),D=ke(),k=null;if(l){let q=tr(l,[],D.mask?D.mask.pathname:"/",!0);w!=="/"&&(q.pathname=q.pathname==="/"?w:Pe([w,q.pathname])),k=T.createHref(q)}let[y,Y,U]=ms(n,R),le=Ps(f,{replace:i,mask:l,state:s,target:u,preventScrollReset:c,relative:a,viewTransition:m,defaultShouldRevalidate:g,useTransitions:C});function V(q){t&&t(q),q.defaultPrevented||le(q)}let se=!(I.isExternal||o),Z=h.createElement("a",{...R,...U,href:(se?k:void 0)||I.absoluteURL||P,onClick:se?V:t,ref:Rs(b,Y),target:u,"data-discover":!N&&r==="render"?"true":void 0});return y&&!N?h.createElement(h.Fragment,null,Z,h.createElement(Ya,{page:P})):Z});Ja.displayName="Link";var Ss=h.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:l,children:s,...u},f){let c=Mt(i,{relative:u.relative}),m=ke(),g=h.useContext(ht),{navigator:R,basename:b}=h.useContext(xe),w=g!=null&&Is(c)&&l===!0,T=R.encodeLocation?R.encodeLocation(c).pathname:c.pathname,C=m.pathname,N=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(C=C.toLowerCase(),N=N?N.toLowerCase():null,T=T.toLowerCase()),N&&b&&(N=Te(N,b)||N);const I=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let P=C===T||!a&&C.startsWith(T)&&C.charAt(I)==="/",D=N!=null&&(N===T||!a&&N.startsWith(T)&&N.charAt(T.length)==="/"),k={isActive:P,isPending:D,isTransitioning:w},y=P?t:void 0,Y;typeof n=="function"?Y=n(k):Y=[n,P?"active":null,D?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(k):o;return h.createElement(Ja,{...u,"aria-current":y,className:Y,ref:f,style:U,to:i,viewTransition:l},typeof s=="function"?s(k):s)});Ss.displayName="NavLink";var Ls=h.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=Jt,action:l,onSubmit:s,relative:u,preventScrollReset:f,viewTransition:c,defaultShouldRevalidate:m,...g},R)=>{let{useTransitions:b}=h.useContext(xe),w=_s(),T=Ds(l,{relative:u}),C=i.toLowerCase()==="get"?"get":"post",N=typeof l=="string"&&Zt.test(l),I=P=>{if(s&&s(P),P.defaultPrevented)return;P.preventDefault();let D=P.nativeEvent.submitter,k=(D==null?void 0:D.getAttribute("formmethod"))||i,y=()=>w(D||P.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:a,state:o,relative:u,preventScrollReset:f,viewTransition:c,defaultShouldRevalidate:m});b&&r!==!1?h.startTransition(()=>y()):y()};return h.createElement("form",{ref:R,method:C,action:T,onSubmit:n?s:I,...g,"data-discover":!N&&e==="render"?"true":void 0})});Ls.displayName="Form";function xs({getKey:e,storageKey:t,...r}){let n=h.useContext(lr),{basename:a}=h.useContext(xe),o=ke(),i=Yr();Os({getKey:e,storageKey:t});let l=h.useMemo(()=>{if(!n||!e)return null;let u=Ir(o,i,a,e);return u!==o.key?u:null},[]);if(!n||n.isSpaMode)return null;let s=((u,f)=>{if(!window.history.state||!window.history.state.key){let c=Math.random().toString(32).slice(2);window.history.replaceState({key:c},"")}try{let m=JSON.parse(sessionStorage.getItem(u)||"{}")[f||window.history.state.key];typeof m=="number"&&window.scrollTo(0,m)}catch(c){console.error(c),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&(n!=null&&n.nonce)&&(r.nonce=n.nonce),h.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${_r(JSON.stringify(t||kr))}, ${_r(JSON.stringify(l))})`}})}xs.displayName="ScrollRestoration";function Ga(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zr(e){let t=h.useContext(at);return G(t,Ga(e)),t}function Cs(e){let t=h.useContext(ht);return G(t,Ga(e)),t}function Ps(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}
51){let f=Fi(),c=ke(),m=Mt(e,{relative:i});return h.useCallback(g=>{if(dl(g,t)){g.preventDefault();let R=r!==void 0?r:Ee(c)===Ee(m),b=()=>f(e,{replace:R,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?h.startTransition(()=>b()):b()}},[c,f,m,r,n,a,t,e,o,i,l,s,u])}var Ts=0,Ms=()=>`__${String(++Ts)}__`;function _s(){let{router:e}=Zr("useSubmit"),{basename:t}=h.useContext(xe),r=Xi(),n=e.fetch,a=e.navigate;return h.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:f,body:c}=ml(o,t);if(i.navigate===!1){let m=i.fetcherKey||Ms();await n(m,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:f,body:c,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await a(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:f,body:c,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,a,t,r])}function Ds(e,{relative:t}={}){let{basename:r}=h.useContext(xe),n=h.useContext(Ie);G(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...Mt(e||".",{relative:t})},i=ke();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(f=>f==="")){l.delete("index"),s.filter(c=>c).forEach(c=>l.append("index",c));let f=l.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Pe([r,o.pathname])),Ee(o)}var kr="react-router-scroll-positions",Wt={};function Ir(e,t,r,n){let a=null;return n&&(r!=="/"?a=n({...e,pathname:Te(e.pathname,r)||e.pathname},t):a=n(e,t)),a==null&&(a=e.key),a}function Os({getKey:e,storageKey:t}={}){let{router:r}=Zr("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:a}=Cs("useScrollRestoration"),{basename:o}=h.useContext(xe),i=ke(),l=Yr(),s=Ki();h.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ks(h.useCallback(()=>{if(s.state==="idle"){let u=Ir(i,l,o,e);Wt[u]=window.scrollY}try{sessionStorage.setItem(t||kr,JSON.stringify(Wt))}catch(u){de(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(h.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||kr);u&&(Wt=JSON.parse(u))}catch{}},[t]),h.useLayoutEffect(()=>{let u=r==null?void 0:r.enableScrollRestoration(Wt,()=>window.scrollY,e?(f,c)=>Ir(f,c,o,e):void 0);return()=>u&&u()},[r,o,e]),h.useLayoutEffect(()=>{if(n!==!1){if(typeof n=="number"){window.scrollTo(0,n);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{de(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,n,a]))}function ks(e,t){let{capture:r}={};h.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function Is(e,{relative:t}={}){let r=h.useContext(zr);G(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Zr("useViewTransitionState"),a=Mt(e,{relative:t});if(!r.isTransitioning)return!1;let o=Te(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Te(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Kt(a.pathname,i)!=null||Kt(a.pathname,o)!=null}export{Fi as A,_a as B,lr as F,Ja as L,Xs as M,jl as N,Hs as O,go as R,xs as S,h as a,G as b,Ks as c,Us as d,Gl as e,Kr as f,Fs as g,Vs as h,nt as i,Ws as j,Ns as k,Ys as l,ea as m,$s as n,js as o,As as p,ke as q,vo as r,is as s,Yr as t,Js as u,Bs as v,zs as w,Gs as x,Es as y,Vr as z};
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.