PageSourceSearch

https://rankpine.com/assets/components-DVvmw17K.js

js rankpine.com collected 2026-10-02 05:16:55 UTC 83,946 bytes, 1 lines download raw bytes

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