PageSourceSearch

https://myaccount.sbs.com.au/assets/8910a0c/chunk-EPOLDU6W-Cy0pbNoL.js

js sbs.com.au collected 2026-10-01 08:32:34 UTC 124,194 bytes, 26 lines download raw bytes

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