PageSourceSearch

https://bienhoa-galaxy.vercel.app/assets/chunk-4WY6JWTD-QHv-84Z4.js

js bienhoa-galaxy.vercel.app collected 2026-10-03 06:25:34 UTC 119,600 bytes, 26 lines download raw bytes

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

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.