1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="883bb4a7-7df1-5a63-851e-5065c1fc41fc")}catch(e){}}(); 3(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(n!=null)for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a])}return t})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:uoh-app":!0})}catch{}})();function Vn(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"}))}var No=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ao(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var jt={exports:{}},tt={};var mr;function Gn(){if(mr)return tt;mr=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 s in a)s!=="key"&&(o[s]=a[s])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:o}}return tt.Fragment=t,tt.jsx=r,tt.jsxs=r,tt}var yr;function Kn(){return yr||(yr=1,jt.exports=Gn()),jt.exports}var Io=Kn(),zt={exports:{}},$={};var vr;function qn(){if(vr)return $;vr=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"),s=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),E=Symbol.iterator;function b(u){return u===null||typeof u!="object"?null:(u=E&&u[E]||u["@@iterator"],typeof u=="function"?u:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,D={};function B(u,R,M){this.props=u,this.context=R,this.refs=D,this.updater=M||x}B.prototype.isReactComponent={},B.prototype.setState=function(u,R){if(typeof u!="object"&&typeof u!="function"&&u!=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,u,R,"setState")},B.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function N(){}N.prototype=B.prototype;function Z(u,R,M){this.props=u,this.context=R,this.refs=D,this.updater=M||x}var Q=Z.prototype=new N;Q.constructor=Z,z(Q,B.prototype),Q.isPureReactComponent=!0;var G=Array.isArray;function ce(){}var S={H:null,A:null,T:null,S:null},m=Object.prototype.hasOwnProperty;function K(u,R,M){var T=M.ref;return{$$typeof:e,type:u,key:R,ref:T!==void 0?T:null,props:M}}function re(u,R){return K(u.type,R,u.props)}function oe(u){return typeof u=="object"&&u!==null&&u.$$typeof===e}function ee(u){var R={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,function(M){return R[M]})}var te=/\/+/g;function me(u,R){return typeof u=="object"&&u!==null&&u.key!=null?ee(""+u.key):R.toString(36)}function Me(u){switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:switch(typeof u.status=="string"?u.then(ce,ce):(u.status="pending",u.then(function(R){u.status==="pending"&&(u.status="fulfilled",u.value=R)},function(R){u.status==="pending"&&(u.status="rejected",u.reason=R)})),u.status){case"fulfilled":return u.value;case"rejected":throw u.reason}}throw u}function I(u,R,M,T,F){var A=typeof u;(A==="undefined"||A==="boolean")&&(u=null);var V=!1;if(u===null)V=!0;else switch(A){case"bigint":case"string":case"number":V=!0;break;case"object":switch(u.$$typeof){case e:case t:V=!0;break;case p:return V=u._init,I(V(u._payload),R,M,T,F)}}if(V)return F=F(u),V=T===""?"."+me(u,0):T,G(F)?(M="",V!=null&&(M=V.replace(te,"$&/")+"/"),I(F,R,M,"",function(Mt){return Mt})):F!=null&&(oe(F)&&(F=re(F,M+(F.key==null||u&&u.key===F.key?"":(""+F.key).replace(te,"$&/")+"/")+V)),R.push(F)),1;V=0;var he=T===""?".":T+":";if(G(u))for(var le=0;le<u.length;le++)T=u[le],A=he+me(T,le),V+=I(T,R,M,A,F);else if(le=b(u),typeof le=="function")for(u=le.call(u),le=0;!(T=u.next()).done;)T=T.value,A=he+me(T,le++),V+=I(T,R,M,A,F);else if(A==="object"){if(typeof u.then=="function")return I(Me(u),R,M,T,F);throw R=String(u),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return V}function q(u,R,M){if(u==null)return u;var T=[],F=0;return I(u,T,"","",function(A){return R.call(M,A,F++)}),T}function ye(u){if(u._status===-1){var R=u._result;R=R(),R.then(function(M){(u._status===0||u._status===-1)&&(u._status=1,u._result=M)},function(M){(u._status===0||u._status===-1)&&(u._status=2,u._result=M)}),u._status===-1&&(u._status=0,u._result=R)}if(u._status===1)return u._result.default;throw u._result}var J=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},ie={map:q,forEach:function(u,R,M){q(u,function(){R.apply(this,arguments)},M)},count:function(u){var R=0;return q(u,function(){R++}),R},toArray:function(u){return q(u,function(R){return R})||[]},only:function(u){if(!oe(u))throw Error("React.Children.only expected to receive a single React element child.");return u}};return $.Activity=y,$.Children=ie,$.Component=B,$.Fragment=r,$.Profiler=a,$.PureComponent=Z,$.StrictMode=n,$.Suspense=
3d,$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,$.__COMPILER_RUNTIME={__proto__:null,c:function(u){return S.H.useMemoCache(u)}},$.cache=function(u){return function(){return u.apply(null,arguments)}},$.cacheSignal=function(){return null},$.cloneElement=function(u,R,M){if(u==null)throw Error("The argument must be a React element, but you passed "+u+".");var T=z({},u.props),F=u.key;if(R!=null)for(A in R.key!==void 0&&(F=""+R.key),R)!m.call(R,A)||A==="key"||A==="__self"||A==="__source"||A==="ref"&&R.ref===void 0||(T[A]=R[A]);var A=arguments.length-2;if(A===1)T.children=M;else if(1<A){for(var V=Array(A),he=0;he<A;he++)V[he]=arguments[he+2];T.children=V}return K(u.type,F,T)},$.createContext=function(u){return u={$$typeof:i,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null},u.Provider=u,u.Consumer={$$typeof:o,_context:u},u},$.createElement=function(u,R,M){var T,F={},A=null;if(R!=null)for(T in R.key!==void 0&&(A=""+R.key),R)m.call(R,T)&&T!=="key"&&T!=="__self"&&T!=="__source"&&(F[T]=R[T]);var V=arguments.length-2;if(V===1)F.children=M;else if(1<V){for(var he=Array(V),le=0;le<V;le++)he[le]=arguments[le+2];F.children=he}if(u&&u.defaultProps)for(T in V=u.defaultProps,V)F[T]===void 0&&(F[T]=V[T]);return K(u,A,F)},$.createRef=function(){return{current:null}},$.forwardRef=function(u){return{$$typeof:s,render:u}},$.isValidElement=oe,$.lazy=function(u){return{$$typeof:p,_payload:{_status:-1,_result:u},_init:ye}},$.memo=function(u,R){return{$$typeof:h,type:u,compare:R===void 0?null:R}},$.startTransition=function(u){var R=S.T,M={};S.T=M;try{var T=u(),F=S.S;F!==null&&F(M,T),typeof T=="object"&&T!==null&&typeof T.then=="function"&&T.then(ce,J)}catch(A){J(A)}finally{R!==null&&M.types!==null&&(R.types=M.types),S.T=R}},$.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},$.use=function(u){return S.H.use(u)},$.useActionState=function(u,R,M){return S.H.useActionState(u,R,M)},$.useCallback=function(u,R){return S.H.useCallback(u,R)},$.useContext=function(u){return S.H.useContext(u)},$.useDebugValue=function(){},$.useDeferredValue=function(u,R){return S.H.useDeferredValue(u,R)},$.useEffect=function(u,R){return S.H.useEffect(u,R)},$.useEffectEvent=function(u){return S.H.useEffectEvent(u)},$.useId=function(){return S.H.useId()},$.useImperativeHandle=function(u,R,M){return S.H.useImperativeHandle(u,R,M)},$.useInsertionEffect=function(u,R){return S.H.useInsertionEffect(u,R)},$.useLayoutEffect=function(u,R){return S.H.useLayoutEffect(u,R)},$.useMemo=function(u,R){return S.H.useMemo(u,R)},$.useOptimistic=function(u,R){return S.H.useOptimistic(u,R)},$.useReducer=function(u,R,M){return S.H.useReducer(u,R,M)},$.useRef=function(u){return S.H.useRef(u)},$.useState=function(u){return S.H.useState(u)},$.useSyncExternalStore=function(u,R,M){return S.H.useSyncExternalStore(u,R,M)},$.useTransition=function(){return S.H.useTransition()},$.version="19.2.8",$}var gr;function Xn(){return gr||(gr=1,zt.exports=qn()),zt.exports}var w=Xn();const Qn=Jn(w),ko=Vn({__proto__:null,default:Qn},[w]);const Kr=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Wt=/^[\\/]{2}/;function qr(e,t){return t+e.replace(/\\/g,"/")}const Rr="popstate";function wr(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ho(e={}){function t(n,a){let o=a.state?.masked,{pathname:i,search:s,hash:d}=o||n.location;return st("",{pathname:i,search:s,hash:d},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)}function r(n,a){return typeof a=="string"?a:He(a)}return ea(t,r,null,e)}function k(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ve(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Zn(){return Math.random().toString(36).substring(2,10)}function Er(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 st(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Se(t):t,state:r,key:t&&t.key||n||Zn(),mask:a}}function He({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 Se(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 ea(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s="POP",d=null,h=p();h==null&&(h=0,i.replaceState({...i.state,idx:h},""));function p(){return(i.state||{idx:null}).idx}function y(){s="POP";let D=p(),B=D==null?null:D-h;h=D,d&&d({action:s,location:z.location,delta:B})}function E(D,B){s="PUSH";let N=wr(D)?D:st(z.location,D,B);h=p()+1;let Z=Er(N,h),Q=z.createHref(N.mask||N);try{i.pushState(Z,"",Q)}catch(G){if(G instanceof DOMException&&G.name==="DataCloneError")throw G;a.location.assign(Q)}o&&d&&d({action:s,location:z.location,delta:1})}function b(D,B){s="REPLACE";let N=wr(D)?D:st(z.location,D,B);h=p();let Z=Er(N,h),Q=z.createHref(N.mask||N);i.replaceState(Z,"",Q),o&&d&&d({action:s,location:z.location,delta:0})}function x(D){return Xr(a,D)}let z={get action(){return s},get location(){return e(a,i)},listen(D){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(Rr,y),d=D,()=>{a.removeEventListener(Rr,y),d=null}}
3,createHref(D){return t(a,D)},createURL:x,encodeLocation(D){let B=x(D);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:E,replace:b,go(D){return i.go(D)}};return z}function Xr(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),k(n,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:He(t);return a=a.replace(/ $/,"%20"),!r&&Wt.test(a)&&(a=n+a),new URL(a,n)}var br=class{#e=new Map;constructor(e){if(e)for(let[t,r]of e)this.set(t,r)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){this.#e.set(e,t)}};const ta=new Set(["lazy","caseSensitive","path","id","index","children"]);function ra(e){return ta.has(e)}const na=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function aa(e){return na.has(e)}function oa(e){return e.index===!0}function ia(e){let t={};return e.Component&&Object.assign(t,{element:w.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:w.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:w.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function ut(e,t=ia,r=[],n={},a=!1){return e.map((o,i)=>{let s=[...r,String(i)],d=typeof o.id=="string"?o.id:s.join("-");if(k(o.index!==!0||!o.children,"Cannot specify children on an index route"),k(a||!n[d],`Found a route id collision on i
3d "${d}". Route id's must be globally unique within Data Router usages`),oa(o)){let h={...o,id:d};return n[d]=xr(h,t(h)),h}else{let h={...o,id:d,children:void 0};return n[d]=xr(h,t(h)),o.children&&(h.children=ut(o.children,t,s,n,a)),h}})}function xr(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function la(e,t,r="/"){return be(e,t,r,!1)}function be(e,t,r,n,a){let o=Xe((typeof t=="string"?Se(t):t).pathname||"/",r);if(o==null)return null;let i=a??Pt(e),s=null,d=wa(o);for(let h=0;s==null&&h<i.length;++h)s=Ra(i[h],d,n);return s}function Qr(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,loaderData:t[r.id],handle:r.handle}}function Pt(e){let t=Zr(e);return sa(t),t}function Zr(e,t=[],r=[],n="",a=!1){let o=(i,s,d=a,h)=>{let p={relativePath:h===void 0?i.path||"":h,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&d)return;k(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let y=Ce([n,p.relativePath]),E=r.concat(p);i.children&&i.children.length>0&&(k(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Zr(i.children,t,E,y,d)),!(i.path==null&&!i.index)&&t.push({path:y,score:va(y,i.index),routesMeta:E.map((b,x)=>{let[z,D]=rn(b.relativePath,b.caseSensitive,x===E.length-1);return{...b,matcher:z,compiledParams:D}})})};return e.forEach((i,s)=>{if(i.path===""||!i.path?.includes("?"))o(i,s);else for(let d of en(i.path))o(i,s,!0,d)}),t}function en(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=en(n.join("/")),s=[];return s.push(...i.map(d=>d===""?o:[o,d].join("/"))),a&&s.push(...i),s.map(d=>e.startsWith("/")&&d===""?"/":d)}function sa(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ga(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const ua=/^:[\w-]+$/,ca=/^:[\w-]+/,da=3.5,fa=3,ha=2,pa=1,ma=10,ya=-2,Pr=e=>e==="*";function va(e,t){let r=e.split("/"),n=r.length;return r.some(Pr)&&(n+=ya),t&&(n+=ha),r.filter(a=>!Pr(a)).reduce((a,o)=>a+(ua.test(o)?fa:ca.test(o)?da:o===""?pa:ma),n)}function ga(e,t){return e.length===t.length&&e.slice(0,-1).every((r,n)=>r===t[n])?e[e.length-1]-t[t.length-1]:0}function Ra(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let s=0;s<n.length;++s){let d=n[s],h=s===n.length-1,p=o==="/"?t:t.slice(o.length)||"/",y={path:d.relativePath,caseSensitive:d.caseSensitive,end:h},E=d.matcher&&d.compiledParams?tn(y,p,d.matcher,d.compiledParams):Cr(y,p),b=d.route;if(!E&&h&&r&&!n[n.length-1].route.index&&(E=Cr({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},p)),!E)return null;
3Object.assign(a,E.params),i.push({params:a,pathname:Ce([o,E.pathname]),pathnameBase:xa(Ce([o,E.pathnameBase])),route:b}),E.pathnameBase!=="/"&&(o=Ce([o,E.pathnameBase]))}return i}function Cr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=rn(e.path,e.caseSensitive,e.end);return tn(e,t,r,n)}function tn(e,t,r,n){let a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((d,{paramName:h,isOptional:p},y)=>{if(h==="*"){let b=s[y]||"";i=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const E=s[y];return p&&!E?d[h]=void 0:d[h]=(E||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:i,pattern:e}}function rn(e,t=!1,r=!0){ve(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,i,s,d,h)=>{if(n.push({paramName:i,isOptional:s!=null}),s){let p=h.charAt(d+o.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,"(?:/$1)?");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function wa(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ve(!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 Xe(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 Ea({basename:e,pathname:t}){return t==="/"?e:Ce([e,t])}const Yt=e=>Kr.test(e);function ba(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Se(e):e,o;return r?(r=Gt(r),r.startsWith("/")?o=Sr(r.substring(1),"/"):o=Sr(r,t)):o=t,{pathname:o,search:Pa(n),hash:Ca(a)}}function Sr(e,t){let r=an(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Ut(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 nn(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Vt(e){let t=nn(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Jt(e,t,r,n=!1){let a;typeof e=="string"?a=Se(e):(a={...e},k(!a.pathname||!a.pathname.includes("?"),Ut("?","pathname","search",a)),k(!a.pathname||!a.pathname.includes("#"),Ut("#","pathname","hash",a)),k(!a.search||!a.search.includes("#"),Ut("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,s;if(i==null)s=r;else{let y=t.length-1;if(!n&&i.startsWith("..")){let E=i.split("/");for(;E[0]==="..";)E.shift(),y-=1;a.pathname=E.join("/")}s=y>=0?t[y]:"/"}let d=ba(a,s),h=i&&i!=="/"&&i.endsWith("/"),p=(o||i===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(h||p)&&(d.pathname+="/"),d}const Gt=e=>e.replace(/[\\/]{2,}/g,"/"),Ce=e=>Gt(e.join("/")),an=e=>e.replace(/\/+$/,""),xa=e=>an(e).replace(/^\/*/,"/"),Pa=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ca=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Sa=class{type="DataWithResponseInit";data;init;constructor(e,t){this.data=e,this.init=t||null}};function Bo(e,t){return new Sa(e,typeof t=="number"?{status:t}:t)}const Wo=(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})},Yo=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"];var St=class{status;statusText;data;error;internal;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 ct(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Qe(e){return Ce(e.map(t=>
3t.route.path).filter(Boolean))||"/"}function Kt(e,t){let r=new URL(typeof e=="string"||e instanceof URL?e:e.url),n=typeof t=="string"?Se(t):t;if(r.pathname=n.pathname||"/",n.search){let a=new URLSearchParams(n.search),o=a.getAll("index");a.delete("index");for(let s of o.filter(Boolean))a.append("index",s);let i=a.toString();r.search=i?`?${i}`:""}else r.search="";return r.hash=n.hash||"",r}const on=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Da(e,t){let r=e;if(typeof r!="string"||!Kr.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(on)try{let o=new URL(window.location.href),i=Wt.test(r)?new URL(qr(r,o.protocol)):new URL(r),s=Xe(i.pathname,t);i.origin===o.origin&&s!=null?r=s+i.search+i.hash:a=!0}catch{ve(!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}}const ln=Symbol("Uninstrumented");let at=new WeakMap;function Ma(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){o.lazy!=null&&r.lazy.push(o.lazy),o["lazy.loader"]!=null&&r["lazy.loader"].push(o["lazy.loader"]),o["lazy.action"]!=null&&r["lazy.action"].push(o["lazy.action"]),o["lazy.middleware"]!=null&&r["lazy.middleware"].push(o["lazy.middleware"]),o.middleware!=null&&r.middleware.push(o.middleware),o.loader!=null&&r.loader.push(o.loader),o.action!=null&&r.action.push(o.action)}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=t.lazy;n.lazy=async(...o)=>ze(await Pe(r.lazy,void 0,()=>a(...o),Ue))}if(typeof t.lazy=="object"){let a=t.lazy;if(typeof a.middleware=="function"&&r["lazy.middleware"].length>0){let o=a.middleware;n.lazy=Object.assign(n.lazy||{},{middleware:async(...i)=>ze(await Pe(r["lazy.middleware"],void 0,()=>o(...i),Ue))})}if(typeof a.loader=="function"&&r["lazy.loader"].length>0){let o=a.loader;n.lazy=Object.assign(n.lazy||{},{loader:async(...i)=>ze(await Pe(r["lazy.loader"],void 0,()=>o(...i),Ue))})}if(typeof a.action=="function"&&r["lazy.action"].length>0){let o=a.action;n.lazy=Object.assign(n.lazy||{},{action:async(...i)=>ze(await Pe(r["lazy.action"],void 0,()=>o(...i),Ue))})}}if(typeof t.loader=="function"&&r.loader.length>0){let a=ot(t.loader),o=async(...i)=>ze(await Pe(r.loader,Ft(i[0]),()=>a(...i),Ue));a.hydrate===!0&&(o.hydrate=!0),it(o,a),n.loader=o}if(typeof t.action=="function"&&r.action.length>0){let a=ot(t.action),o=async(...i)=>ze(await Pe(r.action,Ft(i[0]),()=>a(...i),Ue));it(o,a),n.action=o}return t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let o=ot(a),i=async(...s)=>ze(await Pe(r.middleware,Ft(s[0]),()=>o(...s),Ue));return it(i,o),i})),n}function La(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){a.navigate!=null&&r.navigate.push(a.navigate),a.fetch!=null&&r.fetch.push(a.fetch)}})),r.navigate.length>0){let n=ot(e.navigate),a=async(...o)=>{let[i,s]=o,d,h={to:typeof i=="number"||typeof i=="string"?i:i?He(i):".",...Lr(e,s??{})};return ze(await Pe(r.navigate,h,async()=>{if(typeof i=="number")return await n(...o);let p=Dr(e,y=>{d=y});try{return await n(...o)}finally{p()}},p=>({...Ue(p),meta:d})))};it(a,n),e.navigate=a}if(r.fetch.length>0){let n=ot(e.fetch),a=async(...o)=>{let[i,s,d,h]=o,p;return ze(await Pe(r.fetch,{href:d??".",fetcherKey:i,...Lr(e,h??{})},async()=>{let y=Dr(e,E=>{p=E});try{return await n(...o)}finally{y()}},y=>({...Ue(y),meta:p})))};it(a,n),e.fetch=a}return e}function ot(e){return e[ln]??e}function it(e,t){e[ln]=t}function Dr(e,t){return at.set(e,t),()=>{at.get(e)===t&&at.delete(e)}}function Mr(e){let t=at.get(e);return at.delete(e),t}function ze(e){if(e.type==="error")throw e.value;return e.value}async function Pe(e,t,r,n,a={result:null,innerResult:null},o=e.length-1){let i=e[o];if(i){let s,d=async()=>(s?console.error("You cannot call instrumented handlers more than once"):s=Pe(e,t,r,n,a,o-1),await s,k(a.innerResult,"Expected an inner result"),a.innerResult);try{await i(d,t)}catch(h){console.error("An instrumentation function threw an error:",h)}s||await d(),await s}else{try{a.result={type:"success",value:await r()}}catch(s){a.result={type:"error",value:s}}a.innerResult=n(a.result,t)}return a.result||(a.result={type:"error",value:new Error("No result assigned in instrumentation chain.")},a.innerResult=n(a.result,t)),a.result}function Ue(e){return e.type==="error"&&e.value instanceof Error?{status:"error",error:e.value}:{status:"success",error:void 0}}function Ft(e){let{request:t,context:r,params:n}=e;return{...e,request:Ta(t),params:{...n},context:_a(r)}}function Lr(e,t){return{currentUrl:He(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 Ta(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function _a(e){return{get:t=>e.get(t)}}const sn=["POST","PUT","PATCH","DELETE"],Oa=new Set(sn),ja=["GET",...sn],za=new Set(ja),un=new Set([301,302,303,307,308]),Ua=new Set([307,308]),$t={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},Fa={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},rt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},cn="remix-router-transitions",dn=Symbol("ResetLoaderData");var $a=class{#e;#r;#t;#n;constructor(t){this.#e=t,this.#r=Pt(t)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#t??this.#e}get branches(){return this.#n??this.#r}get hasHMRRoutes(){return this.#t!=null}setRoutes(t){this.#e=t,this.#r=Pt(t)}setHmrRoutes(t){this.#t=t,this.#n=Pt(t)}commitHmrRoutes(){this.#t&&(this.#e=this.#t,this.#r=this.#n,this.#t=void 0,this.#n=void 0)}};function Jo(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";k(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties,o=a||(()=>({}));if(e.instrumentations){let l=e.instrumentations;o=c=>({...a?.(c),...Ma(l.map(f=>
3f.route).filter(Boolean),c)})}let i={},s=new $a(ut(e.routes,o,void 0,i)),d=e.basename||"/";d.startsWith("/")||(d=`/${d}`);let h=e.dataStrategy||Ha,p={...e.future},y=null,E=new Set,b=null,x=null,z=null,D=null,B=e.hydrationData!=null,N=be(s.activeRoutes,e.history.location,d,!1,s.branches),Z=!1,Q=null,G,ce;if(N==null&&!e.patchRoutesOnNavigation){let l=Ee(404,{pathname:e.history.location.pathname}),{matches:c,route:f}=bt(s.activeRoutes);G=!0,ce=!G,N=c,Q={[f.id]:l}}else if(N&&!e.hydrationData&&yt(N,s.activeRoutes,e.history.location.pathname).active&&(N=null),N)if(N.some(l=>l.route.lazy))G=!1,ce=!G;else if(!N.some(l=>qt(l.route)))G=!0,ce=!G;else{let l=e.hydrationData?e.hydrationData.loaderData:null,c=e.hydrationData?e.hydrationData.errors:null,f=N;if(c){let v=N.findIndex(g=>c[g.route.id]!==void 0);f=f.slice(0,v+1)}ce=!1,G=!0,f.forEach(v=>{let g=fn(v.route,l,c);ce=ce||g.renderFallback,G=G&&!g.shouldLoad})}else{G=!1,ce=!G,N=[];let l=yt(null,s.activeRoutes,e.history.location.pathname);l.active&&l.matches&&(Z=!0,N=l.matches)}let S,m={historyAction:e.history.action,location:e.history.location,matches:N,initialized:G,renderFallback:ce,navigation:$t,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||Q,fetchers:new Map,blockers:new Map},K="POP",re=null,oe=!1,ee,te=!1,me=new Map,Me=null,I=!1,q=!1,ye=new Set,J=new Map,ie=0,u=-1,R=new Map,M=new Set,T=new Map,F=new Map,A=new Set,V=new Map,he,le=null;function Mt(){if(y=e.history.listen(({action:l,location:c,delta:f})=>{if(he){he(),he=void 0;return}ve(V.size===0||f!=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 v=cr({currentLocation:m.location,nextLocation:c,historyAction:l});if(v&&f!=null){let g=new Promise(L=>{he=L});e.history.go(f*-1),mt(v,{state:"blocked",location:c,proceed(){mt(v,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),g.then(()=>e.history.go(f))},reset(){let L=new Map(m.blockers);L.set(v,rt),de({blockers:L})}}),re?.resolve(),re=null;return}return Ne(l,c)}),r){lo(t,me);let l=()=>so(t,me);t.addEventListener("pagehide",l),Me=()=>t.removeEventListener("pagehide",l)}return m.initialized||Ne("POP",m.location,{initialHydration:!0}),S}function Mn(){y&&y(),Me&&Me(),E.clear(),ee&&ee.abort(),m.fetchers.forEach((l,c)=>Tt(m.fetchers,c)),m.blockers.forEach((l,c)=>ur(c))}function Ln(l){if(E.add(l),b){let{newErrors:c}=b;b=null,l(m,{deletedFetchers:[],newErrors:c,viewTransitionOpts:void 0,flushSync:!1})}return()=>E.delete(l)}function de(l,c={}){l.matches&&(l.matches=l.matches.map(g=>{let L=i[g.route.id],_=g.route;return _.element!==L.element||_.errorElement!==L.errorElement||_.hydrateFallbackElement!==L.hydrateFallbackElement?{...g,route:L}:g})),m={...m,...l};let f=[],v=[];m.fetchers.forEach((g,L)=>{g.state==="idle"&&(A.has(L)?f.push(L):v.push(L))}),A.forEach(g=>{!m.fetchers.has(g)&&!J.has(g)&&f.push(g)}),E.size===0&&(b={newErrors:l.errors??null}),[...E].forEach(g=>g(m,{deletedFetchers:f,newErrors:l.errors??null,viewTransitionOpts:c.viewTransitionOpts,flushSync:c.flushSync===!0})),f.forEach(g=>Tt(m.fetchers,g)),v.forEach(g=>m.fetchers.delete(g))}function Be(l,c,{flushSync:f}={}){let v=m.actionData!=null&&m.navigation.formMethod!=null&&fe(m.navigation.formMethod)&&m.navigation.state==="loading"&&l.state?._isRedirect!==!0,g;c.actionData?Object.keys(c.actionData).length>0?g=c.actionData:g=null:v?g=m.actionData:g=null;let L=c.loaderData?Ar(m.loaderData,c.loaderData,c.matches||[],c.errors):m.loaderData,_=m.blockers;_.size>0&&!I&&(_=new Map(_),_.forEach((O,j)=>_.set(j,rt)));let P=I?!1:fr(l,c.matches||m.matches),C=oe===!0||m.navigation.formMethod!=null&&fe(m.navigation.formMethod)&&l.state?._isRedirect!==!0;s.commitHmrRoutes(),I||K==="POP"||(K==="PUSH"?e.history.push(l,l.state):K==="REPLACE"&&e.history.replace(l,l.state));let U;if(K==="POP"){let O=me.get(m.location.pathname);O&&O.has(l.pathname)?U={currentLocation:m.location,nextLocation:l}:me.has(l.pathname)&&(U={currentLocation:l,nextLocation:m.location})}else if(te){let O=me.get(m.location.pathname);O?O.add(l.pathname):(O=new Set([l.pathname]),me.set(m.location.pathname,O)),U={currentLocation:m.location,nextLocation:l}}de({...c,actionData:g,loaderData:L,historyAction:K,location:l,initialized:!0,renderFallback:!1,navigation:$t,revalidation:"idle",restoreScrollPosition:P,preventScrollReset:C,blockers:_},{viewTransitionOpts:U,flushSync:f===!0}),K="POP",oe=!1,te=!1,I=!1,q=!1,re?.resolve(),re=null,le?.resolve(),le=null}async function nr(l,c){if(re?.resolve(),re=null,typeof l=="number"){re||(re=Wr());let X=re.promise;return e.history.go(l),X}let f=Mr(S),{path:v,submission:g,error:L}=Tr(!1,It(m.location,m.matches,d,l,c?.fromRouteId,c?.relative),c),_;c?.mask&&(_={pathname:"",search:"",hash:"",...typeof c.mask=="str
3ing"?Se(c.mask):{...m.location.mask,...c.mask}});let P=m.location,C=st(P,v,c&&c.state,void 0,_);C={...C,...e.history.encodeLocation(C)};let U=c&&c.replace!=null?c.replace:void 0,O="PUSH";U===!0?O="REPLACE":U===!1||g!=null&&fe(g.formMethod)&&g.formAction===m.location.pathname+m.location.search&&(O="REPLACE");let j=c&&"preventScrollReset"in c?c.preventScrollReset===!0:void 0,W=(c&&c.flushSync)===!0,ne=cr({currentLocation:P,nextLocation:C,historyAction:O});if(ne){mt(ne,{state:"blocked",location:C,proceed(){mt(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:C}),nr(l,c)},reset(){let X=new Map(m.blockers);X.set(ne,rt),de({blockers:X})}});return}await Ne(O,C,{submission:g,pendingError:L,preventScrollReset:j,replace:c&&c.replace,enableViewTransition:c&&c.viewTransition,flushSync:W,callSiteDefaultShouldRevalidate:c&&c.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:f})}function Tn(){le||(le=Wr()),Lt(),de({revalidation:"loading"});let l=le.promise;return m.navigation.state==="submitting"?l:m.navigation.state==="idle"?(Ne(m.historyAction,m.location,{startUninterruptedRevalidation:!0}),l):(Ne(K||m.historyAction,m.navigation.location,{overrideNavigation:m.navigation,enableViewTransition:te===!0}),l)}async function Ne(l,c,f){ee&&ee.abort(),ee=null,K=l,I=(f&&f.startUninterruptedRevalidation)===!0,Hn(m.location,m.matches),oe=(f&&f.preventScrollReset)===!0,te=(f&&f.enableViewTransition)===!0;let v=s.activeRoutes,g=f?.initialHydration&&m.matches&&m.matches.length>0&&!Z?m.matches:be(v,c,d,!1,s.branches),L=(f&&f.flushSync)===!0;if(g&&m.initialized&&!q&&Xa(m.location,c)&&!(f&&f.submission&&fe(f.submission.formMethod))){Be(c,{matches:g},{flushSync:L});return}let _=yt(g,v,c.pathname);if(_.active&&_.matches&&(g=_.matches),f?.instrumentationNavigateMetaReceiver){let H=Hr(e.history,c,g);f.instrumentationNavigateMetaReceiver(H)}if(!g){let{error:H,notFoundMatches:Oe,route:pe}=_t(c.pathname);Be(c,{matches:Oe,loaderData:{},errors:{[pe.id]:H}},{flushSync:L});return}let P=f&&f.overrideNavigation?{...f.overrideNavigation,matches:g,historyAction:l}:void 0;ee=new AbortController;let C=Ke(e.history,c,ee.signal,f&&f.submission),U=e.getContext?await e.getContext():new br,O;if(f&&f.pendingError)O=[$e(g).route.id,{type:"error",error:f.pendingError}];else if(f&&f.submission&&fe(f.submission.formMethod)){let H=await _n(C,c,f.submission,g,l,U,_.active,f&&f.initialHydration===!0,{replace:f.replace,flushSync:L});if(H.shortCircuited)return;if(H.pendingActionResult){let[Oe,pe]=H.pendingActionResult;if(ge(pe)&&ct(pe.error)&&pe.error.status===404){ee=null,Be(c,{matches:H.matches,loaderData:{},errors:{[Oe]:pe.error}});return}}g=H.matches||g,O=H.pendingActionResult,P=Nt(c,g,l,f.submission),L=!1,_.active=!1,C=Ke(e.history,C.url,C.signal)}let{shortCircuited:j,matches:W,loaderData:ne,errors:X,workingFetchers:se}=await On(C,c,g,l,U,_.active,P,f&&f.submission,f&&f.fetcherSubmission,f&&f.replace,f&&f.initialHydration===!0,L,O,f&&f.callSiteDefaultShouldRevalidate);j||(ee=null,Be(c,{matches:W||g,...Ir(O),loaderData:ne,errors:X,...se?{fetchers:se}:{}}))}async function _n(l,c,f,v,g,L,_,P,C={}){if(Lt(),de({navigation:oo(c,v,g,f)},{flushSync:C.flushSync===!0}),_){let j=await vt(v,c.pathname,l.signal);if(j.type==="aborted")return{shortCircuited:!0};if(j.type==="error"){if(j.partialMatches.length===0){let{matches:ne,route:X}=bt(s.activeRoutes);return{matches:ne,pendingActionResult:[X.id,{type:"error",error:j.error}]}}let W=$e(j.partialMatches).route.id;return{matches:j.partialMatches,pendingActionResult:[W,{type:"error",error:j.error}]}}else if(j.matches)v=j.matches;else{let{notFoundMatches:W,error:ne,route:X}=_t(c.pathname);return{matches:W,pendingActionResult:[X.id,{type:"error",error:ne}]}}}let U,O=Ct(v,c);if(!O.route.action&&!O.route.lazy)U={type:"error",error:Ee(405,{method:l.method,pathname:c.pathname,routeId:O.route.id})};else{let j=await et(l,c,qe(o,i,l,c,v,O,P?[]:n,L),L,null);if(U=j[O.route.id],!U){for(let W of v)if(j[W.route.id]){U=j[W.route.id];break}}if(l.signal.aborted)return{shortCircuited:!0}}if(ke(U)){let j;return C&&C.replace!=null?j=C.replace:j=Fr(U.response.headers.get("Location"),new URL(l.url),d,e.history)===m.location.pathname+m.location.search,await Ae(l,U,!0,{submission:f,replace:j}),{shortCircuited:!0}}if(ge(U)){let j=$e(v,O.route.id);return(C&&C.replace)!==!0&&(K="PUSH"),{matches:v,pendingActionResult:[j.route.id,U,O.route.id]}}return{matches:v,pendingActionResult:[O.route.id,U]}}async function On(l,c,f,v,g,L,_,P,C,U,O,j,W,ne){let X=_||Nt(c,f,v,P),se=P||C||Br(X),H=!I&&!O;if(L){if(H){let ue=ar(W);de({navigation:X,...ue!==void 0?{actionData:ue}:{}},{flushSync:j})}
3let Y=await vt(f,c.pathname,l.signal);if(Y.type==="aborted")return{shortCircuited:!0};if(Y.type==="error"){if(Y.partialMatches.length===0){let{matches:je,route:Ge}=bt(s.activeRoutes);return{matches:je,loaderData:{},errors:{[Ge.id]:Y.error}}}let ue=$e(Y.partialMatches).route.id;return{matches:Y.partialMatches,loaderData:{},errors:{[ue]:Y.error}}}else if(Y.matches)f=Y.matches;else{let{error:ue,notFoundMatches:je,route:Ge}=_t(c.pathname);return{matches:je,loaderData:{},errors:{[Ge.id]:ue}}}}let Oe=s.activeRoutes,{dsMatches:pe,revalidatingFetchers:Re}=_r(l,g,o,i,e.history,m,f,se,c,O?[]:n,O===!0,q,ye,A,T,M,Oe,d,e.patchRoutesOnNavigation!=null,s.branches,W,ne);if(u=++ie,!e.dataStrategy&&!pe.some(Y=>Y.shouldLoad)&&!pe.some(Y=>Y.route.middleware&&Y.route.middleware.length>0)&&Re.length===0){let Y=new Map(m.fetchers),ue=lr(Y);return Be(c,{matches:f,loaderData:{},errors:W&&ge(W[1])?{[W[0]]:W[1].error}:null,...Ir(W),...ue?{fetchers:Y}:{}},{flushSync:j}),{shortCircuited:!0}}if(H){let Y={};if(!L){Y.navigation=X;let ue=ar(W);ue!==void 0&&(Y.actionData=ue)}Re.length>0&&(Y.fetchers=jn(Re)),de(Y,{flushSync:j})}Re.forEach(Y=>{_e(Y.key),Y.controller&&J.set(Y.key,Y.controller)});let Fe=()=>Re.forEach(Y=>_e(Y.key));ee&&ee.signal.addEventListener("abort",Fe);let{loaderResults:We,fetcherResults:gt}=await or(pe,Re,l,c,g);if(l.signal.aborted)return{shortCircuited:!0};ee&&ee.signal.removeEventListener("abort",Fe),Re.forEach(Y=>J.delete(Y.key));let we=xt(We);if(we)return await Ae(l,we.result,!0,{replace:U}),{shortCircuited:!0};if(we=xt(gt),we)return M.add(we.key),await Ae(l,we.result,!0,{replace:U}),{shortCircuited:!0};let Ye=new Map(m.fetchers),{loaderData:Ve,errors:Je}=Nr(m,f,We,W,Re,gt,Ye);O&&m.errors&&(Je={...m.errors,...Je});let Rt=lr(Ye),wt=sr(u,Ye),Et=Rt||wt||Re.length>0;return{matches:f,loaderData:Ve,errors:Je,...Et?{workingFetchers:Ye}:{}}}function ar(l){if(l&&!ge(l[1]))return{[l[0]]:l[1].data};if(m.actionData)return Object.keys(m.actionData).length===0?null:m.actionData}function jn(l){let c=new Map(m.fetchers);return l.forEach(f=>{let v=c.get(f.key),g=nt(void 0,v?v.data:void 0);c.set(f.key,g)}),c}async function zn(l,c,f,v){_e(l);let g=(v&&v.flushSync)===!0,L=Mr(S),_=s.activeRoutes,P=It(m.location,m.matches,d,f,c,v?.relative),C=be(_,P,d,!1,s.branches),U=yt(C,_,P);if(U.active&&U.matches&&(C=U.matches),L&&L(Hr(e.history,P,C)),!C){Te(l,c,Ee(404,{pathname:P}),{flushSync:g});return}let{path:O,submission:j,error:W}=Tr(!0,P,v);if(W){Te(l,c,W,{flushSync:g});return}let ne=e.getContext?await e.getContext():new br,X=(v&&v.preventScrollReset)===!0;if(j&&fe(j.formMethod)){await Un(l,c,O,C,ne,U.active,g,X,j,v&&v.defaultShouldRevalidate);return}T.set(l,{routeId:c,path:O}),await Fn(l,c,O,C,ne,U.active,g,X,j)}async function Un(l,c,f,v,g,L,_,P,C,U){Lt(),T.delete(l),Le(l,io(C,m.fetchers.get(l)),{flushSync:_});let O=new AbortController,j=Ke(e.history,f,O.signal,C);if(L){let ae=await vt(v,new URL(j.url).pathname,j.signal,l);if(ae.type==="aborted")return;if(ae.type==="error"){Te(l,c,ae.error,{flushSync:_});return}else if(ae.matches)v=ae.matches;else{Te(l,c,Ee(404,{pathname:f}),{flushSync:_});return}}let W=Ct(v,f);if(!W.route.action&&!W.route.lazy){Te(l,c,Ee(405,{method:C.formMethod,pathname:f,routeId:c}),{flushSync:_});return}J.set(l,O);let ne=ie,X=qe(o,i,j,f,v,W,n,g),se=await et(j,f,X,g,l),H=se[W.route.id];if(!H){for(let ae of X)if(se[ae.route.id]){H=se[ae.route.id];break}}if(j.signal.aborted){J.get(l)===O&&J.delete(l);return}if(A.has(l)){if(ke(H)||ge(H)){Le(l,xe(void 0));return}}else{if(ke(H))if(J.delete(l),u>ne){Le(l,xe(void 0));return}else return M.add(l),Le(l,nt(C)),Ae(j,H,!1,{fetcherSubmission:C,preventScrollReset:P});if(ge(H)){Te(l,c,H.error);return}}let Oe=m.navigation.location||m.location,pe=Ke(e.history,Oe,O.signal),Re=s.activeRoutes,Fe=m.navigation.state!=="idle"?be(Re,m.navigation.location,d,!1,s.branches):m.matches;k(Fe,"Didn't find any matches after fetcher action");let We=++ie;R.set(l,We);let{dsMatches:gt,revalidatingFetchers:we}=_r(pe,g,o,i,e.history,m,Fe,C,Oe,n,!1,q,ye,A,T,M,Re,d,e.patchRoutesOnNavigation!=null,s.branches,[W.route.id,H],U),Ye=nt(C,H.data),Ve=new Map(m.fetchers);Ve.set(l,Ye),we.filter(ae=>ae.key!==l).forEach(ae=>{let Ie=ae.key,pr=Ve.get(Ie),Yn=nt(void 0,pr?pr.data:void 0);Ve.set(Ie,Yn),_e(Ie),ae.controller&&J.set(Ie,ae.controller)}),de({fetchers:Ve});let Je=()=>we.forEach(ae=>_e(ae.key));O.signal.addEventListener("abort",Je);let{loaderResults:Rt,fetcherResults:wt}=await or(gt,we,pe,Oe,g);if(O.signal.aborted)return;O.signal.removeEventListener("abort",Je),R.delete(l),J.delete(l),we.forEach(ae=>J.delete(ae.key));let Et=m.fetchers.has(l),Y=ae=>{if(!Et)return ae;let Ie=new Map(ae.fetchers);return Ie.set(l,xe(H.data)),{...ae,fetchers:Ie}},ue=xt(Rt);if(ue)return m=Y(m),Ae(pe,ue.result,!1,{preventScrollReset:P});if(ue=xt(wt),ue)return M.add(ue.key),m=Y(m),Ae(pe,ue.result,!1,{preventScrollReset:P});let je=new Map(m.fetchers);Et&&je.set(l,xe(H.data));let{loaderData:Ge,errors:Ot}=Nr(m,Fe,Rt,void 0,we,wt,je);sr(We,je),m.navigation.state==="loading"&&We>u?(k(K,"Expected pending action"),ee&&ee.abort(),Be(m.navigation.location,{matches:Fe,loaderData:Ge,errors:Ot,fetchers:je})):(de({errors:Ot,loaderData:Ar(m.loaderData,Ge,Fe,Ot),fetchers:je}),q=!1)}async function Fn(l,c,f,v,g,L,_,P,C){let U=m.fetchers.get(l);Le(l,nt(C,U?U.data:void 0),{flushSync:_});let O=new AbortController,j=Ke(e.history,f,O.signal);if(L){let H=await vt(v,new URL(j.url).pathname,j.signal,l);if(H.type==="aborted")return;if(H.type==="error"){Te(l,c,H.error,{flushSync:_});return}else if(H.matches)v=H.matches;else{Te(l,c,Ee(404,{pathname:f}),{flushSync:_});return}}let W=Ct(v,f);J.set(l,O);let ne=ie,X=await et(j,f,qe(o,i,j,f,v,W,n,g),g,l),se=X[W.route.id];if(!se){for(let H of v)if(X[H.route.id]){se=X[H.route.id];break}}if(J.get(l)===O&&J.delete(l),!j.signal.aborted){if(A.has(l)){Le(l,xe(void 0));return}if(ke(se))if(u>ne){Le(l,xe(void 0));return}else{M.add(l),await Ae(j,se,!1,{preventScrollReset:P});return}if(ge(se)){Te(l,c,se.error);return}Le(l,xe(se.data))}}async function Ae(l,c,f,{submission:v,fetcherSubmission:g,preventScrollReset:L,replace:_}={}){f||(re?.resolve(),re=null),c.response.headers.has("X-Remix-Revalidate")&&(q=!0);let P=c.response.headers.get("Location");k(P,"Expected a Location header on the redirect Response"),P=Fr(P,new URL(l.url),d,e.history);let C=st(m.location,P,{_isRedirect:!0});if(r){let X=!1;if(c.response.headers.has("X-Remix-Reload-Document"))X=!0;else if(Yt(P)){const se=Xr(t,P,!0);X=se.origin!==t.location.origin||Xe(se.pathname,d)==null}if(X){_?t.location.replace(P):t.location.assign(P);return}}ee=null;let U=_===!0||c.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:O,formAction:j,formEncType:W}=m.navigation;
3!v&&!g&&O&&j&&W&&(v=Br(m.navigation));let ne=v||g;Ua.has(c.response.status)&&ne&&fe(ne.formMethod)?await Ne(U,C,{submission:{...ne,formAction:P},preventScrollReset:L||oe,enableViewTransition:f?te:void 0}):await Ne(U,C,{overrideNavigation:Nt(C,[],U,v),fetcherSubmission:g,preventScrollReset:L||oe,enableViewTransition:f?te:void 0})}async function et(l,c,f,v,g){let L,_={};try{L=await Wa(h,l,c,f,g,v,!1)}catch(P){return f.filter(C=>C.shouldLoad).forEach(C=>{_[C.route.id]={type:"error",error:P}}),_}if(l.signal.aborted)return _;if(!fe(l.method))for(let P of f){if(L[P.route.id]?.type==="error")break;!L.hasOwnProperty(P.route.id)&&!m.loaderData.hasOwnProperty(P.route.id)&&(!m.errors||!m.errors.hasOwnProperty(P.route.id))&&P.shouldCallHandler()&&(L[P.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${P.route.id}`)})}for(let[P,C]of Object.entries(L))if(to(C)){let U=C.result;_[P]={type:"redirect",response:Ga(U,l,P,f,d)}}else _[P]=await Ja(C);return _}async function or(l,c,f,v,g){let L=et(f,v,l,g,null),_=Promise.all(c.map(async P=>{if(P.matches&&P.match&&P.request&&P.controller){let C=(await et(P.request,P.path,P.matches,g,P.key))[P.match.route.id];return{[P.key]:C}}else return Promise.resolve({[P.key]:{type:"error",error:Ee(404,{pathname:P.path})}})}));return{loaderResults:await L,fetcherResults:(await _).reduce((P,C)=>Object.assign(P,C),{})}}function Lt(){q=!0,T.forEach((l,c)=>{J.has(c)&&ye.add(c),_e(c)})}function Le(l,c,f={}){let v=new Map(m.fetchers);v.set(l,c),de({fetchers:v},{flushSync:(f&&f.flushSync)===!0})}function Te(l,c,f,v={}){let g=$e(m.matches,c),L=new Map(m.fetchers);Tt(L,l),de({errors:{[g.route.id]:f},fetchers:L},{flushSync:(v&&v.flushSync)===!0})}function $n(l){return F.set(l,(F.get(l)||0)+1),A.has(l)&&A.delete(l),m.fetchers.get(l)||Fa}function Nn(l,c){_e(l,c?.reason),Le(l,xe(null))}function Tt(l,c){let f=m.fetchers.get(c);J.has(c)&&!(f&&f.state==="loading"&&R.has(c))&&_e(c),T.delete(c),R.delete(c),M.delete(c),A.delete(c),ye.delete(c),l.delete(c)}function An(l){let c=(F.get(l)||0)-1;c<=0?(F.delete(l),A.add(l)):F.set(l,c),de({fetchers:new Map(m.fetchers)})}function _e(l,c){let f=J.get(l);f&&(f.abort(c),J.delete(l))}function ir(l,c){for(let f of l){let v=c.get(f);k(v,`Expected fetcher: ${f}`);let g=xe(v.data);c.set(f,g)}}function lr(l){let c=[],f=!1;for(let v of M){let g=l.get(v);k(g,`Expected fetcher: ${v}`),g.state==="loading"&&(M.delete(v),c.push(v),f=!0)}return ir(c,l),f}function sr(l,c){let f=[];for(let[v,g]of R)if(g<l){let L=c.get(v);k(L,`Expected fetcher: ${v}`),L.state==="loading"&&(_e(v),R.delete(v),f.push(v))}return ir(f,c),f.length>0}function In(l,c){let f=m.blockers.get(l)||rt;return V.get(l)!==c&&V.set(l,c),f}function ur(l){m.blockers.delete(l),V.delete(l)}function mt(l,c){let f=m.blockers.get(l)||rt;k(f.state==="unblocked"&&c.state==="blocked"||f.state==="blocked"&&c.state==="blocked"||f.state==="blocked"&&c.state==="proceeding"||f.state==="blocked"&&c.state==="unblocked"||f.state==="proceeding"&&c.state==="unblocked",`Invalid blocker state transition: ${f.state} -> ${c.state}`);let v=new Map(m.blockers);v.set(l,c),de({blockers:v})}function cr({currentLocation:l,nextLocation:c,historyAction:f}){if(V.size===0)return;V.size>1&&ve(!1,"A router only supports one blocker at a time");let v=Array.from(V.entries()),[g,L]=v[v.length-1],_=m.blockers.get(g);if(!(_&&_.state==="proceeding")&&L({currentLocation:l,nextLocation:c,historyAction:f}))return g}function _t(l){let c=Ee(404,{pathname:l}),f=s.activeRoutes,{matches:v,route:g}=bt(f);return{notFoundMatches:v,route:g,error:c}}function kn(l,c,f){if(x=l,D=c,z=f||null,!B&&m.navigation===$t){B=!0;let v=fr(m.location,m.matches);v!=null&&de({restoreScrollPosition:v})}return()=>{x=null,D=null,z=null}}function dr(l,c){return z&&z(l,c.map(f=>Qr(f,m.loaderData)))||l.key}function Hn(l,c){if(x&&D){let f=dr(l,c);x[f]=D()}}function fr(l,c){if(x){let f=dr(l,c),v=x[f];if(typeof v=="number")return v}return null}function yt(l,c,f){if(e.patchRoutesOnNavigation){let v=s.branches;if(l){if(Object.keys(l[0].params).length>0)return{active:!0,matches:be(c,f,d,!0,v)}}else return{active:!0,matches:be(c,f,d,!0,v)||[]}}return{active:!1,matches:null}}async function vt(l,c,f,v){if(!e.patchRoutesOnNavigation)return{type:"success",matches:l};let g=l;for(;;){let L=i;try{await e.patchRoutesOnNavigation({signal:f,path:c,matches:g,fetcherKey:v,patch:(U,O)=>{f.aborted||Or(U,O,s,L,o,!1)}})}catch(U){return{type:"error",error:U,partialMatches:g}}if(f.aborted)return{type:"aborted"};let _=s.branches,P=be(s.activeRoutes,c,d,!1,_),C=null;if(P){if(Object.keys(P[0].params).length===0)return{type:"success",matches:P};
3if(C=be(s.activeRoutes,c,d,!0,_),!(C&&g.length<C.length&&hr(g,C.slice(0,g.length))))return{type:"success",matches:P}}if(C||(C=be(s.activeRoutes,c,d,!0,_)),!C||hr(g,C))return{type:"success",matches:null};g=C}}function hr(l,c){return l.length===c.length&&l.every((f,v)=>f.route.id===c[v].route.id)}function Bn(l){i={},s.setHmrRoutes(ut(l,o,void 0,i))}function Wn(l,c,f=!1){Or(l,c,s,i,o,f),s.hasHMRRoutes||de({})}return S={get basename(){return d},get future(){return p},get state(){return m},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return i},get window(){return t},initialize:Mt,subscribe:Ln,enableScrollRestoration:kn,navigate:nr,fetch:zn,revalidate:Tn,createHref:l=>e.history.createHref(l),encodeLocation:l=>e.history.encodeLocation(l),getFetcher:$n,resetFetcher:Nn,deleteFetcher:An,dispose:Mn,getBlocker:In,deleteBlocker:ur,patchRoutes:Wn,_internalFetchControllers:J,_internalSetRoutes:Bn,_internalSetStateDoNotUseOrYouWillBreakYourApp(l){de(l)}},e.instrumentations&&(S=La(S,e.instrumentations.map(l=>l.router).filter(Boolean))),S}function Na(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function It(e,t,r,n,a,o){let i,s;if(a){i=[];for(let h of t)if(i.push(h),h.route.id===a){s=h;break}}else i=t,s=t[t.length-1];let d=Jt(n||".",Vt(i),Xe(e.pathname,r)||e.pathname,o==="path");if(n==null&&(d.search=e.search,d.hash=e.hash),(n==null||n===""||n===".")&&s){let h=Qt(d.search);if(s.route.index&&!h)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&h){let p=new URLSearchParams(d.search),y=p.getAll("index");p.delete("index"),y.filter(b=>b).forEach(b=>p.append("index",b));let E=p.toString();d.search=E?`?${E}`:""}}return r!=="/"&&(d.pathname=Ea({basename:r,pathname:d.pathname})),He(d)}function Tr(e,t,r){if(!r||!Na(r))return{path:t};if(r.formMethod&&!ao(r.formMethod))return{path:t,error:Ee(405,{method:r.formMethod})};let n=()=>({path:t,error:Ee(400,{type:"invalid-body"})}),a=(r.formMethod||"get").toUpperCase(),o=gn(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!fe(a))return n();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,[E,b])=>`${y}${E}=${b} 4`,""):String(r.body);return{path:t,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!fe(a))return n();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return n()}}}k(typeof FormData=="function","FormData is not available in this environment");let i,s;if(r.formData)i=Bt(r.formData),s=r.formData;else if(r.body instanceof FormData)i=Bt(r.body),s=r.body;else if(r.body instanceof URLSearchParams)i=r.body,s=$r(i);else if(r.body==null)i=new URLSearchParams,s=new FormData;else try{i=new URLSearchParams(r.body),s=$r(i)}catch{return n()}let d={formMethod:a,formAction:o,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(fe(d.formMethod))return{path:t,submission:d};let h=Se(t);return e&&h.search&&Qt(h.search)&&i.append("index",""),h.search=`?${i}`,{path:He(h),submission:d}}function _r(e,t,r,n,a,o,i,s,d,h,p,y,E,b,x,z,D,B,N,Z,Q,G){let ce=Q?ge(Q[1])?Q[1].error:Q[1].data:void 0,S=a.createURL(o.location),m=a.createURL(d),K;if(p&&o.errors){let I=Object.keys(o.errors)[0];K=i.findIndex(q=>q.route.id===I)}else if(Q&&ge(Q[1])){let I=Q[0];K=i.findIndex(q=>q.route.id===I)-1}let re=Q?Q[1].statusCode:void 0,oe=re&&re>=400,ee={currentUrl:S,currentParams:o.matches[0]?.params||{},nextUrl:m,nextParams:i[0].params,...s,actionResult:ce,actionStatus:re},te=Qe(i),me=i.map((I,q)=>{let{route:ye}=I,J=null;if(K!=null&&q>K)J=!1;else if(ye.lazy)J=!0;else if(!qt(ye))J=!1;else if(p){let{shouldLoad:R}=fn(ye,o.loaderData,o.errors);J=R}else Aa(o.loaderData,o.matches[q],I)&&(J=!0);if(J!==null)return kt(r,n,e,d,te,I,h,t,J);let ie=!1;typeof G=="boolean"?ie=G:oe?ie=!1:(y||S.pathname+S.search===m.pathname+m.search||S.search!==m.search||Ia(o.matches[q],I))&&(ie=!0);let u={...ee,defaultShouldRevalidate:ie};return kt(r,n,e,d,te,I,h,t,lt(I,u),u,G)}),Me=[];return x.forEach((I,q)=>{if(p||!i.some(F=>F.route.id===I.routeId)||b.has(q))return;let ye=o.fetchers.get(q),J=ye&&ye.state!=="idle"&&ye.data===void 0,ie=be(D,I.path,B??"/",!1,Z);if(!ie){if(N&&J)return;Me.push({key:q,routeId:I.routeId,path:I.path,matches:null,match:null,request:null,controller:null});return}if(z.has(q))return;let u=Ct(ie,I.path),R=new AbortController,M=Ke(a,I.path,R.signal),T=null;if(E.has(q))E.delete(q),T=qe(r,n,M,I.path,ie,u,h,t);else if(J)y&&(T=qe(r,n,M,I.path,ie,u,h,t));else{let F;typeof G=="boolean"?F=G:oe?F=!1:F=y;let A={...ee,defaultShouldRevalidate:F};lt(u,A)&&(T=qe(r,n,M,I.path,ie,u,h,t,A))}T&&Me.push({key:q,routeId:I.routeId,path:I.path,matches:T,match:u,request:M,controller:R})}),{dsMatches:me,revalidatingFetchers:Me}}function qt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function fn(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!qt(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 Aa(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function Ia(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function lt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Or(e,t,r,n,a,o){let i;if(e){let h=n[e];k(h,`No route found to patch children into: routeId = ${e}`),h.children||(h.children=[]),i=h.children}else i=r.activeRoutes;let s=[],d=[];if(t.forEach(h=>{let p=i.find(y=>hn(h,y));p?d.push({existingRoute:p,newRoute:h}):s.push(h)}),s.length>0){let h=ut(s,a,[e||"_","patch",String(i?.length||"0")],n);i.push(...h)}if(o&&d.length>0)for(let h=0;h<d.length;h++){let{existingRoute:p,newRoute:y}=d[h],E=p,[b]=ut([y],a,[],{},!0);Object.assign(E,{element:b.element?b.element:E.element,errorElement:b.errorElement?b.errorElement:E.errorElement,hydrateFallbackElement:b.hydrateFallbackElement?b.hydrateFallbackElement:E.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function hn(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,n)=>t.children?.some(a=>hn(r,a)))??!1:!1}const jr=new WeakMap,pn=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(k(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=jr.get(a);i||(i={},jr.set(a,i));let s=i[e];if(s)return s;let d=(async()=>{let h=ra(e),p=a[e]!==void 0;if(h)ve(!h,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(p)ve(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await o();y!=null&&(Object.assign(a,{[e]:y}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(y=>y===void 0)&&(a.lazy=void 0))})();return i[e]=d,d},zr=new WeakMap;function ka(e,t,r,n,a){let o=r[e.id];if(k(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let p=zr.get(o);if(p)return{lazyRoutePromise:p,lazyHandlerPromise:p};let y=(async()=>{k(typeof e.lazy=="function","No lazy route function found");let E=await e.lazy(),b={};for(let x in E){let z=E[x];if(z===void 0)continue;let D=aa(x),B=o[x]!==void 0;D?ve(!D,"Route property "+x+" is not a supported property to be returned from a lazy route function. This property will be ignored."):B?ve(!B,`Route "${o.id}" has a static property "${x}" defined but its lazy function is also returning a value for this property. The lazy route property "${x}" will be ignored.`):b[x]=z}Object.assign(o,b),Object.assign(o,{...n(o),lazy:void 0})})();return zr.set(o,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let i=Object.keys(e.lazy),s=[],d;for(let p of i){if(a&&a.includes(p))continue;let y=pn({key:p,route:e,manifest:r,mapRouteProperties:n});y&&(s.push(y),p===t&&(d=y))}let h=s.length>0?Promise.all(s).then(()=>{}):void 0;return h?.catch(()=>{}),d?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:d}}async function Ur(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>
4n.resolve()))).forEach((n,a)=>{r[t[a].route.id]=n}),r}async function Ha(e){return e.matches.some(t=>t.route.middleware)?mn(e,()=>Ur(e)):Ur(e)}function mn(e,t){return Ba(e,t,n=>{if(no(n))throw n;return n},Za,r);async function r(n,a,o){if(o)return Object.assign(o.value,{[a]:{type:"error",result:n}});{let{matches:i}=e,s=Math.min(Math.max(i.findIndex(h=>h.route.id===a),0),Math.max(i.findIndex(h=>h.shouldCallHandler()),0)),d=i[s].route.id;for(let h of i.slice(0,s+1))try{await h._lazyPromises?.route}catch{d=h.route.id;break}return{[$e(i,d).route.id]:{type:"error",result:n}}}}}async function Ba(e,t,r,n,a){let{matches:o,...i}=e;return await yn(i,o.flatMap(s=>s.route.middleware?s.route.middleware.map(d=>[s.route.id,d]):[]),t,r,n,a)}async function yn(e,t,r,n,a,o,i=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let d=t[i];if(!d)return await r();let[h,p]=d,y,E=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await yn(e,t,r,n,a,o,i+1)},y.value}catch(b){return y={value:await o(b,h,y)},y.value}};try{let b=await p(e,E),x=b!=null?n(b):void 0;return a(x)?x:y?x??y.value:(y={value:await E()},y.value)}catch(b){return await o(b,h,y)}}function vn(e,t,r,n,a){let o=pn({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=ka(n.route,fe(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function kt(e,t,r,n,a,o,i,s,d,h=null,p){let y=!1,E=vn(e,t,r,o,i);return{...o,_lazyPromises:E,shouldLoad:d,shouldRevalidateArgs:h,shouldCallHandler(b){return y=!0,h?typeof p=="boolean"?lt(o,{...h,defaultShouldRevalidate:p}):typeof b=="boolean"?lt(o,{...h,defaultShouldRevalidate:b}):lt(o,h):d},resolve(b){let{lazy:x,loader:z,middleware:D}=o.route,B=y||d||b&&!fe(r.method)&&(x||z),N=D&&D.length>0&&!z&&!x;return B&&(fe(r.method)||!N)?Ya({request:r,path:n,pattern:a,match:o,lazyHandlerPromise:E?.handler,lazyRoutePromise:E?.route,handlerOverride:b,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function qe(e,t,r,n,a,o,i,s,d=null){return a.map(h=>h.route.id!==o.route.id?{...h,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:vn(e,t,r,h,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:kt(e,t,r,n,Qe(a),h,i,s,!0,d))}async function Wa(e,t,r,n,a,o,i){n.some(p=>p._lazyPromises?.middleware)&&await Promise.all(n.map(p=>p._lazyPromises?.middleware));let s={request:t,url:Kt(t,r),pattern:Qe(n),params:n[0].params,context:o,matches:n},h=await e({...s,fetcherKey:a,runClientMiddleware:p=>{let y=s;return mn(y,()=>p({...y,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(p=>[p._lazyPromises?.handler,p._lazyPromises?.route]))}catch{}return h}async function Ya({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:s}){let d,h,p=fe(e.method),y=p?"action":"loader",E=b=>{let x,z=new Promise((N,Z)=>x=Z);h=()=>x(),e.signal.addEventListener("abort",h);let D=N=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${n.route.id}]`)):b({request:e,url:Kt(e,t),pattern:r,params:n.params,context:s},...N!==void 0?[N]:[]),B=(async()=>{try{return{type:"data",result:await(i?i(N=>D(N)):D())}}catch(N){return{type:"error",result:N}}})();return Promise.race([B,z])};try{let b=p?n.route.action:n.route.loader;if(a||o)if(b){let x,[z]=await Promise.all([E(b).catch(D=>{x=D}),a,o]);if(x!==void 0)throw x;d=z}else{await a;let x=p?n.route.action:n.route.loader;if(x)[d]=await Promise.all([E(x),o]);else if(y==="action"){let z=new URL(e.url),D=z.pathname+z.search;throw Ee(405,{method:e.method,pathname:D,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(b)d=await E(b);else{let x=new URL(e.url);throw Ee(404,{pathname:x.pathname+x.search})}}catch(b){return{type:"error",result:b}}finally{h&&e.signal.removeEventListener("abort",h)}return d}async function Va(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 Ja(e){let{result:t,type:r}=e;if(Xt(t)){let n;try{n=await Va(t)}catch(a){return{type:"error",error:a}}return r==="error"?{type:"error",error:new St(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?kr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Qa(t),statusCode:ct(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ct(t)?t.status:void 0}:kr(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ga(e,t,r,n,a){let o=e.headers.get("Location");if(k(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Yt(o)){let i=n.slice(0,n.findIndex(s=>s.route.id===r)+1);
4o=It(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}const Ka=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ht(e){try{return Ka.includes(new URL(e).protocol)}catch{return!1}}function Fr(e,t,r,n){if(Yt(e)){let a=e,o=Wt.test(a)?new URL(qr(a,t.protocol)):new URL(a);if(Ht(o.toString()))throw new Error("Invalid redirect location");let i=Xe(o.pathname,r)!=null;if(o.origin===t.origin&&i)return Gt(o.pathname)+o.search+o.hash}try{if(Ht(n.createURL(e).toString()))throw new Error("Invalid redirect location")}catch{}return e}function Ke(e,t,r,n){let a=e.createURL(gn(t)).toString(),o={signal:r};if(n&&fe(n.formMethod)){let{formMethod:i,formEncType:s}=n;o.method=i.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=Bt(n.formData):o.body=n.formData}return new Request(a,o)}function Bt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function $r(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function qa(e,t,r,n=!1,a=!1){let o={},i=null,s,d=!1,h={},p=r&&ge(r[1])?r[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in t))return;let E=y.route.id,b=t[E];if(k(!ke(b),"Cannot handle redirect results in processLoaderData"),ge(b)){let x=b.error;if(p!==void 0&&(x=p,p=void 0),i=i||{},a)i[E]=x;else{let z=$e(e,E);i[z.route.id]==null&&(i[z.route.id]=x)}n||(o[E]=dn),d||(d=!0,s=ct(b.error)?b.error.status:500),b.headers&&(h[E]=b.headers)}else o[E]=b.data,b.statusCode&&b.statusCode!==200&&!d&&(s=b.statusCode),b.headers&&(h[E]=b.headers)}),p!==void 0&&r&&(i={[r[0]]:p},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:s||200,loaderHeaders:h}}function Nr(e,t,r,n,a,o,i){let{loaderData:s,errors:d}=qa(t,r,n);return a.filter(h=>!h.matches||h.matches.some(p=>p.shouldLoad)).forEach(h=>{let{key:p,match:y,controller:E}=h;if(E&&E.signal.aborted)return;let b=o[p];if(k(b,"Did not find corresponding fetcher result"),ge(b)){let x=$e(e.matches,y?.route.id);d&&d[x.route.id]||(d={...d,[x.route.id]:b.error}),i.delete(p)}else if(ke(b))k(!1,"Unhandled fetcher revalidation redirect");else{let x=xe(b.data);i.set(p,x)}}),{loaderData:s,errors:d}}function Ar(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==dn).reduce((o,[i,s])=>(o[i]=s,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 Ir(e){return e?ge(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function $e(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.ErrorBoundary!=null||r.route.errorElement!=null)||e[0]}function bt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ee(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?s=`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"&&(s="Unable to encode submission body")):e===403?(i="Forbidden",s=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",s=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?s=`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&&(s=`Invalid request method "${n.toUpperCase()}"`)),new St(e||500,i,new Error(s),!0)}function xt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];
4if(ke(a))return{key:n,result:a}}}function gn(e){return He({...typeof e=="string"?Se(e):e,hash:""})}function Xa(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Qa(e){return new St(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Za(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&eo(r))}function eo(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function to(e){return Xt(e.result)&&un.has(e.result.status)}function ge(e){return e.type==="error"}function ke(e){return(e&&e.type)==="redirect"}function kr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Xt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ro(e){return un.has(e)}function no(e){return Xt(e)&&ro(e.status)&&e.headers.has("Location")}function ao(e){return za.has(e.toUpperCase())}function fe(e){return Oa.has(e.toUpperCase())}function Qt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ct(e,t){let r=typeof t=="string"?Se(t).search:t.search;if(e[e.length-1].route.index&&Qt(r||""))return e[e.length-1];let n=nn(e);return n[n.length-1]}function Hr(e,t,r){return{url:Kt(e.createURL(t),t),pattern:r?Qe(r):"",params:r?.[0]?.params?{...r[0].params}:{}}}function Br(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function Nt(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 oo(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 nt(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 io(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 xe(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 lo(e,t){try{let r=e.sessionStorage.getItem(cn);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 so(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(cn,JSON.stringify(r))}catch(n){ve(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function Wr(){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}}const dt=w.createContext(null);dt.displayName="DataRouter";const Zt=w.createContext(null);Zt.displayName="DataRouterState";const Rn=w.createContext(!1);function uo(){return w.useContext(Rn)}const wn=w.createContext({isTransitioning:!1});wn.displayName="ViewTransition";const En=w.createContext(new Map);En.displayName="Fetchers";const co=w.createContext(null);co.displayName="Await";const Ze=w.createContext(null);Ze.displayName="Navigation";const Dt=w.createContext(null);Dt.displayName="Location";const De=w.createContext({outlet:null,matches:[],isDataRoute:!1});De.displayName="Route";const er=w.createContext(null);er.displayName="RouteError";const bn="REACT_ROUTER_ERROR",fo="REDIRECT",ho="ROUTE_ERROR_RESPONSE";function po(e){if(e.startsWith(`${bn}:${fo}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="str
4ing"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function mo(e){if(e.startsWith(`${bn}:${ho}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new St(t.status,t.statusText,t.data)}catch{}}function Go(e,{relative:t}={}){k(ft(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=w.useContext(Ze),{hash:a,pathname:o,search:i}=Ro(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:Ce([r,o])),n.createHref({pathname:s,search:i,hash:a})}function ft(){return w.useContext(Dt)!=null}function tr(){return k(ft(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Dt).location}const xn="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ko(){let{isDataRoute:e}=w.useContext(De);return e?To():yo()}function yo(){k(ft(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(dt),{basename:t,navigator:r}=w.useContext(Ze),{matches:n}=w.useContext(De),{pathname:a}=tr(),o=JSON.stringify(Vt(n)),i=w.useRef(!1);return w.useLayoutEffect(()=>{i.current=!0}),w.useCallback((s,d={})=>{if(ve(i.current,xn),!i.current)return;if(typeof s=="number"){r.go(s);return}let h=Jt(s,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Ce([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,a,e])}const vo=w.createContext(null);function go(e){let t=w.useContext(De).outlet;return w.useMemo(()=>t&&w.createElement(vo.Provider,{value:e},t),[t,e])}function Pn(){let{matches:e}=w.useContext(De);return e[e.length-1]?.params??{}}function Ro(e,{relative:t}={}){let{matches:r}=w.useContext(De),{pathname:n}=tr(),a=JSON.stringify(Vt(r));return w.useMemo(()=>Jt(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function wo(e,t,r){k(ft(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=w.useContext(Ze),{matches:a}=w.useContext(De),o=a[a.length-1],i=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let d=tr(),h;h=d;let p=h.pathname||"/",y=p;if(s!=="/"){let x=s.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let E=r&&r.state.matches.length?r.state.matches.map(x=>Object.assign(x,{route:r.manifest[x.route.id]||x.route})):la(e,{pathname:y});return So(E&&E.map(x=>Object.assign({},x,{params:Object.assign({},i,x.params),pathname:Ce([s,n.encodeLocation?n.encodeLocation(x.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?s:Ce([s,n.encodeLocation?n.encodeLocation(x.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),a,r)}function Eo(){let e=Dn(),t=ct(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)}const bo=w.createElement(Eo,null);var xo=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Rn;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=mo(e.digest);r&&(e=r)}let t=e!==void 0?w.createElement(De.Provider,{value:this.props.routeContext},w.createElement(er.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(Po,{error:e},t):t}};const At=new WeakMap;function Po({children:e,error:t}){let{basename:r}=w.useContext(Ze);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=po(t.digest);if(n){let a=At.get(t);if(a)throw a;let o=Da(n.location,r),i=o.absoluteURL||o.to;if(Ht(i))throw new Error("Invalid redirect location");if(on&&!At.get(t))if(o.isExternal||n.reloadDocument)window.location.href=i;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw At.set(t,s),s}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function Co({routeContext:e,match:t,children:r}){let n=w.useContext(dt);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(De.Provider,{value:e},r)}function So(e,t=[],r){let n=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?.errors;if(o!=null){let p=a.findIndex(y=>y.route.id&&o?.[y.route.id]!==void 0);k(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,p+1))}let i=!1,s=-1;if(r&&n){i=n.renderFallback;for(let p=0;p<a.length;p++){let y=a[p];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(s=p),y.route.id){let{loaderData:E,errors:b}
4=n,x=y.route.loader&&!E.hasOwnProperty(y.route.id)&&(!b||b[y.route.id]===void 0);if(y.route.lazy||x){r.isStatic&&(i=!0),s>=0?a=a.slice(0,s+1):a=[a[0]];break}}}}let d=r?.onError,h=n&&d?(p,y)=>{d(p,{location:n.location,params:n.matches?.[0]?.params??{},pattern:Qe(n.matches),errorInfo:y})}:void 0;return a.reduceRight((p,y,E)=>{let b,x=!1,z=null,D=null;n&&(b=o&&y.route.id?o[y.route.id]:void 0,z=y.route.errorElement||bo,i&&(s<0&&E===0?(_o("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,D=null):s===E&&(x=!0,D=y.route.hydrateFallbackElement||null)));let B=t.concat(a.slice(0,E+1)),N=()=>{let Z;return b?Z=z:x?Z=D:y.route.Component?Z=w.createElement(y.route.Component,null):y.route.element?Z=y.route.element:Z=p,w.createElement(Co,{match:y,routeContext:{outlet:p,matches:B,isDataRoute:n!=null},children:Z})};return n&&(y.route.ErrorBoundary||y.route.errorElement||E===0)?w.createElement(xo,{location:n.location,revalidation:n.revalidation,component:z,error:b,children:N(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:h}):N()},null)}function rr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Do(e){let t=w.useContext(dt);return k(t,rr(e)),t}function ht(e){let t=w.useContext(Zt);return k(t,rr(e)),t}function Mo(e){let t=w.useContext(De);return k(t,rr(e)),t}function pt(e){let t=Mo(e),r=t.matches[t.matches.length-1];return k(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function qo(){return pt("useRouteId")}function Xo(){let e=ht("useNavigation");return w.useMemo(()=>{let{matches:t,historyAction:r,...n}=e.navigation;return n},[e.navigation])}function Lo(){let{matches:e,loaderData:t}=ht("useMatches");return w.useMemo(()=>e.map(r=>Qr(r,t)),[e,t])}function Cn(){let e=ht("useLoaderData"),t=pt("useLoaderData");return e.loaderData[t]}function Sn(){let e=ht("useActionData"),t=pt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Dn(){let e=w.useContext(er),t=ht("useRouteError"),r=pt("useRouteError");return e!==void 0?e:t.errors?.[r]}function To(){let{router:e}=Do("useNavigate"),t=pt("useNavigate"),r=w.useRef(!1);return w.useLayoutEffect(()=>{r.current=!0}),w.useCallback(async(n,a={})=>{ve(r.current,xn),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t])}const Yr={};function _o(e,t,r){Yr[e]||(Yr[e]=!0,ve(!1,r))}const Vr={};function Jr(e,t){!e&&!Vr[t]&&(Vr[t]=!0,console.warn(t))}const Qo=["HydrateFallback","hydrateFallbackElement"];var Oo=class{status="pending";promise;resolve;reject;
4constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function Zo({router:e,flushSync:t,onError:r,useTransitions:n}){n=uo()||n;let[a,o]=w.useState(e.state),[i,s]=w.useOptimistic(a),[d,h]=w.useState(),[p,y]=w.useState({isTransitioning:!1}),[E,b]=w.useState(),[x,z]=w.useState(),[D,B]=w.useState(),N=w.useRef(new Map),Z=w.useCallback((S,{deletedFetchers:m,newErrors:K,flushSync:re,viewTransitionOpts:oe})=>{K&&r&&Object.values(K).forEach(te=>r(te,{location:S.location,params:S.matches[0]?.params??{},pattern:Qe(S.matches)})),S.fetchers.forEach((te,me)=>{te.data!==void 0&&N.current.set(me,te.data)}),m.forEach(te=>N.current.delete(te)),Jr(re===!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 ee=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Jr(oe==null||ee,"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."),!oe||!ee){t&&re?t(()=>o(S)):n===!1?o(S):w.startTransition(()=>{n===!0&&s(te=>Gr(te,S)),o(S)});return}if(t&&re){t(()=>{x&&(E?.resolve(),x.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation})});let te=e.window.document.startViewTransition(()=>{t(()=>o(S))});te.finished.finally(()=>{t(()=>{b(void 0),z(void 0),h(void 0),y({isTransitioning:!1})})}),t(()=>z(te));return}x?(E?.resolve(),x.skipTransition(),B({state:S,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation})):(h(S),y({isTransitioning:!0,flushSync:!1,currentLocation:oe.currentLocation,nextLocation:oe.nextLocation}))},[e.window,t,x,E,n,s,r]);w.useLayoutEffect(()=>e.subscribe(Z),[e,Z]),w.useEffect(()=>{p.isTransitioning&&!p.flushSync&&b(new Oo)},[p]),w.useEffect(()=>{if(E&&d&&e.window){let S=d,m=E.promise,K=e.window.document.startViewTransition(async()=>{n===!1?o(S):w.startTransition(()=>{n===!0&&s(re=>Gr(re,S)),o(S)}),await m});K.finished.finally(()=>{b(void 0),z(void 0),h(void 0),y({isTransitioning:!1})}),z(K)}},[d,E,e.window,n,s]),w.useEffect(()=>{E&&d&&i.location.key===d.location.key&&E.resolve()},[E,x,i.location,d]),w.useEffect(()=>{!p.isTransitioning&&D&&(h(D.state),y({isTransitioning:!0,flushSync:!1,currentLocation:D.currentLocation,nextLocation:D.nextLocation}),B(void 0))},[p.isTransitioning,D]);let Q=w.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:S=>e.navigate(S),push:(S,m,K)=>e.navigate(S,{state:m,preventScrollReset:K?.preventScrollReset}),replace:(S,m,K)=>e.navigate(S,{replace:!0,state:m,preventScrollReset:K?.preventScrollReset})}),[e]),G=e.basename||"/",ce=w.useMemo(()=>({router:e,navigator:Q,static:!1,basename:G,onError:r}),[e,Q,G,r]);return w.createElement(w.Fragment,null,w.createElement(dt.Provider,{value:ce},w.createElement(Zt.Provider,{value:i},w.createElement(En.Provider,{value:N.current},w.createElement(wn.Provider,{value:p},w.createElement(Uo,{basename:G,location:i.location,navigationType:i.historyAction,navigator:Q,useTransitions:n},w.createElement(jo,{routes:e.routes,manifest:e.manifest,future:e.future,state:i,isStatic:!1,onError:r})))))),null)}function Gr(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}}const jo=w.memo(zo);function zo({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return wo(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})}function ei(e){return go(e.context)}function Uo({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:i}){k(!ft(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),d=w.useMemo(()=>({basename:s,navigator:a,static:o,useTransitions:i,future:{}}),[s,a,o,i]);typeof r=="string"&&(r=Se(r));let{pathname:h="/",search:p="",hash:y="",state:E=null,key:b="default",mask:x}=r,z=w.useMemo(()=>{let D=Xe(h,s);return D==null?null:{location:{pathname:D,search:p,hash:y,state:E,key:b,mask:x},navigationType:n}},[s,h,p,y,E,b,n,x]);
4return ve(z!=null,`<Router basename="${s}"> is not able to match the URL "${h}${p}${y}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:w.createElement(Ze.Provider,{value:d},w.createElement(Dt.Provider,{children:t,value:z}))}function Fo(){return{params:Pn(),loaderData:Cn(),actionData:Sn(),matches:Lo()}}function ti(e){return function(){const r=Fo();return w.createElement(e,r)}}function $o(){return{params:Pn(),loaderData:Cn(),actionData:Sn(),error:Dn()}}function ri(e){return function(){const r=$o();return w.createElement(e,r)}}export{Kr as A,ct as B,Xt as C,Zt as D,kr as E,Bo as F,Wo as G,St as H,rn as I,Dn as J,be as K,uo as L,Jr as M,Ze as N,ei as O,la as P,Ao as Q,Qn as R,Yo as S,Zo as T,Jo as U,wn as V,Ho as W,Qo as X,ia as Y,tr as a,ve as b,Lo as c,Go as d,Jt as e,Ce as f,Xo as g,Ko as h,Ro as i,Io as j,He as k,dt as l,k as m,Cr as n,qo as o,Da as p,De as q,w as r,Xe as s,No as t,Cn as u,ko as v,ti as w,Xn as x,Jn as y,ri as z}; 5 6//# debugId=883bb4a7-7df1-5a63-851e-5065c1fc41fc
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.