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