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