1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`3dcc281a8e79fff17adf3e75579634b27b7debb6`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`f0c7440e-33b8-41fa-9626-0a17cb105dce`,e._sentryDebugIdIdentifier=`sentry-dbid-f0c7440e-33b8-41fa-9626-0a17cb105dce`)})()}catch{}import{i as e,s as t,t as n}from"./rolldown-runtime-Dm_dodAQ.js";var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function jsxProd(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=jsxProd,e.jsxs=jsxProd})),i=n(((e,t)=>{t.exports=r()})),a=n((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 getIteratorFn(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function Component(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}Component.prototype.isReactComponent={},Component.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`)},Component.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function ComponentDummy(){}ComponentDummy.prototype=Component.prototype;function PureComponent(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var _=PureComponent.prototype=new ComponentDummy;_.constructor=PureComponent,h(_,Component.prototype),_.isPureReactComponent=!0;var v=Array.isArray;function noop(){}var y={H:null,A:null,T:null,S:null},b=Object.prototype.hasOwnProperty;function ReactElement(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function cloneAndReplaceKey(e,t){return ReactElement(e.type,t,e.props)}function isValidElement(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function escape(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var x=/\/+/g;function getElementKey(e,t){return typeof e==`object`&&e&&e.key!=null?escape(``+e.key):t.toString(36)}function resolveThenable(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(noop,noop):(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 mapIntoArray(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,mapIntoArray(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+getElementKey(e,0):a,v(o)?(i=``,c!=null&&(i=c.replace(x,`$&/`)+`/`),mapIntoArray(o,r,i,``,function(e){return e})):o!=null&&(isValidElement(o)&&(o=cloneAndReplaceKey(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(x,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(v(e))for(var u=0;u<e.length;u++)a=e[u],s=l+getElementKey(a,u),c+=mapIntoArray(a,r,i,s,o);else if(u=getIteratorFn(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+getElementKey(a,u++),c+=mapIntoArray(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return mapIntoArray(resolveThenable(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}
vendor: 4,332 bytes, line 1
1function mapChildren(e,t,n){if(e==null)return e;var r=[],i=0;return mapIntoArray(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function lazyInitializer(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 S=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)},C={map:mapChildren,forEach:function(e,t,n){mapChildren(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return mapChildren(e,function(){t++}),t},toArray:function(e){return mapChildren(e,function(e){return e})||[]},only:function(e){if(!isValidElement(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=C,e.Component=Component,e.Fragment=r,e.Profiler=a,e.PureComponent=PureComponent,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=y,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return y.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=h({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!b.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 ReactElement(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)b.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 ReactElement(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=isValidElement,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:lazyInitializer}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=y.T,n={};y.T=n;try{var r=e(),i=y.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(noop,S)}catch(e){S(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),y.T=t}},e.unstable_useCacheRefresh=function(){return y.H.useCacheRefresh()},e.use=function(e){return y.H.use(e)},e.useActionState=function(e,t,n){return y.H.useActionState(e,t,n)},e.useCallback=function(e,t){return y.H.useCallback(e,t)},e.useContext=function(e){return y.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return y.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return y.H.useEffect(e,t)},e.useEffectEvent=function(e){return y.H.useEffectEvent(e)},e.useId=function(){return y.H.useId()},e.useImperativeHandle=function(e,t,n){return y.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return y.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return y.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return y.H.useMemo(e,t)},e.useOptimistic=function(e,t){return y.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return y.H.useReducer(e,t,n)},e.useRef=function(e){return y.H.useRef(e)},e.useState=function(e){return y.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return y.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return y.H.useTransition()}
1,e.version=`19.2.4`})),o=n(((e,t)=>{t.exports=a()})),s=t(o());function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends$1.apply(this,arguments)}e(_extends$1,`_extends`);var c;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(c||={});var l=`popstate`;function createBrowserHistory(e){e===void 0&&(e={});function createBrowserLocation(e,t){let{pathname:n,search:r,hash:i}=e.location;return createLocation(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function createBrowserHref(e,t){return typeof t==`string`?t:createPath(t)}return getUrlBasedHistory(createBrowserLocation,createBrowserHref,null,e)}function invariant(e,t){if(e===!1||e==null)throw Error(t)}function warning(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function createKey(){return Math.random().toString(36).substr(2,8)}function getHistoryState(e,t){return{usr:e.state,key:e.key,idx:t}}function createLocation(e,t,n,r){return n===void 0&&(n=null),_extends$1({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?parsePath(t):t,{state:n,key:t&&t.key||r||createKey()})}function createPath(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function parsePath(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function getUrlBasedHistory(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=c.Pop,u=null,d=getIndex();d??(d=0,o.replaceState(_extends$1({},o.state,{idx:d}),``));function getIndex(){return(o.state||{idx:null}).idx}function handlePop(){s=c.Pop;let e=getIndex(),t=e==null?null:e-d;d=e,u&&u({action:s,location:f.location,delta:t})}function push(e,t){s=c.Push;let r=createLocation(f.location,e,t);n&&n(r,e),d=getIndex()+1;let l=getHistoryState(r,d),p=f.createHref(r);try{o.pushState(l,``,p)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(p)}a&&u&&u({action:s,location:f.location,delta:1})}function replace(e,t){s=c.Replace;let r=createLocation(f.location,e,t);n&&n(r,e),d=getIndex();let i=getHistoryState(r,d),l=f.createHref(r);o.replaceState(i,``,l),a&&u&&u({action:s,location:f.location,delta:0})}function createURL(e){let t=i.location.origin===`null`?i.location.href:i.location.origin,n=typeof e==`string`?e:createPath(e);return n=n.replace(/ $/,`%20`),invariant(t,`No window.location.(origin|href) available to create URL for href: `+n),new URL(n,t)}let f={get action(){return s},get location(){return e(i,o)},listen(e){if(u)throw Error(`A history only accepts one active listener`);return i.addEventListener(l,handlePop),u=e,()=>{i.removeEventListener(l,handlePop),u=null}},createHref(e){return t(i,e)},createURL,encodeLocation(e){let t=createURL(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push,replace,go(e){return o.go(e)}};return f}var u;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(u||={});var d=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function isIndexRoute(e){return e.index===!0}function convertRoutesToDataRoutes(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((e,i)=>{let a=[...n,String(i)],o=typeof e.id==`string`?e.id:a.join(`-`);if(invariant(e.index!==!0||!e.children,`Cannot specify children on an index route`),invariant(!r[o],`Found a route id collision on i
1d "`+o+`". Route id's must be globally unique within Data Router usages`),isIndexRoute(e)){let n=_extends$1({},e,t(e),{id:o});return r[o]=n,n}{let n=_extends$1({},e,t(e),{id:o,children:void 0});return r[o]=n,e.children&&(n.children=convertRoutesToDataRoutes(e.children,t,a,r)),n}})}function matchRoutes(e,t,n){return n===void 0&&(n=`/`),matchRoutesImpl(e,t,n,!1)}function matchRoutesImpl(e,t,n,r){let i=stripBasename((typeof t==`string`?parsePath(t):t).pathname||`/`,n);if(i==null)return null;let a=flattenRoutes(e);rankRouteBranches(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=decodePath(i);o=matchRouteBranch(a[e],t,r)}return o}function convertRouteMatchToUiMatch(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function flattenRoutes(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let flattenRoute=(e,i,a)=>{let o={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};o.relativePath.startsWith(`/`)&&(invariant(o.relativePath.startsWith(r),`Absolute route path "`+o.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let s=joinPaths([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(invariant(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+s+`".`)),flattenRoutes(e.children,t,c,s)),!(e.path==null&&!e.index)&&t.push({path:s,score:computeScore(s,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))flattenRoute(e,t);else for(let n of explodeOptionalSegments(e.path))flattenRoute(e,t,n)}),t}function explodeOptionalSegments(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=explodeOptionalSegments(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 rankRouteBranches(e){e.sort((e,t)=>e.score===t.score?compareIndexes(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var f=/^:[\w-]+$/,p=3,m=2,h=1,g=10,_=-2,isSplat=e=>e===`*`;function computeScore(e,t){let n=e.split(`/`),r=n.length;return n.some(isSplat)&&(r+=_),t&&(r+=m),n.filter(e=>!isSplat(e)).reduce((e,t)=>e+(f.test(t)?p:t===``?h:g),r)}function compareIndexes(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 matchRouteBranch(e,t,n){n===void 0&&(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=matchPath({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=matchPath({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
1Object.assign(i,u.params),o.push({params:i,pathname:joinPaths([a,u.pathname]),pathnameBase:normalizePathname(joinPaths([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=joinPaths([a,u.pathnameBase]))}return o}function generatePath(e,t){t===void 0&&(t={});let n=e;n.endsWith(`*`)&&n!==`*`&&!n.endsWith(`/*`)&&(warning(!1,`Route path "`+n+`" will be treated as if it were `+(`"`+n.replace(/\*$/,`/*`)+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+(`please change the route path to "`+n.replace(/\*$/,`/*`)+`".`)),n=n.replace(/\*$/,`/*`));let r=n.startsWith(`/`)?`/`:``,stringify=e=>e==null?``:typeof e==`string`?e:String(e);return r+n.split(/\/+/).map((e,n,r)=>{if(n===r.length-1&&e===`*`)return stringify(t[`*`]);let i=e.match(/^:([\w-]+)(\??)$/);if(i){let[,e,n]=i,r=t[e];return invariant(n===`?`||r!=null,`Missing ":`+e+`" param`),stringify(r)}return e.replace(/\?$/g,``)}).filter(e=>!!e).join(`/`)}function matchPath(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=compilePath(e.path,e.caseSensitive,e.end),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,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return e[r]=i&&!c?void 0:(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function compilePath(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),warning(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)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function decodePath(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return warning(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function stripBasename(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)||`/`}var v=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,isAbsoluteUrl=e=>v.test(e);function resolvePath(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?parsePath(e):e,a;if(n){if(isAbsoluteUrl(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),warning(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?resolvePathname(n.substring(1),`/`):resolvePathname(n,t)}}else a=t;return{pathname:a,search:normalizeSearch(r),hash:normalizeHash(i)}}function resolvePathname(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function getInvalidPathError(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 getPathContributingMatches(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function getResolveToMatches(e,t){let n=getPathContributingMatches(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function resolveTo(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==`string`?i=parsePath(e):(i=_extends$1({},e),invariant(!i.pathname||!i.pathname.includes(`?`),getInvalidPathError(`?`,`pathname`,`search`,i)),invariant(!i.pathname||!i.pathname.includes(`#`),getInvalidPathError(`#`,`pathname`,`hash`,i)),invariant(!i.search||!i.search.includes(`#`),getInvalidPathError(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;
1if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=resolvePath(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var joinPaths=e=>e.join(`/`).replace(/\/\/+/g,`/`),normalizePathname=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),normalizeSearch=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,normalizeHash=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,y=function redirect(e,t){t===void 0&&(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,_extends$1({},n,{headers:r}))},ErrorResponseImpl=class{constructor(e,t,n,r){r===void 0&&(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 isRouteErrorResponse(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var b=[`post`,`put`,`patch`,`delete`],x=new Set(b),S=[`get`,...b],C=new Set(S),w=new Set([301,302,303,307,308]),T=new Set([307,308]),E={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},D={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},O={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},k=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,defaultMapRouteProperties=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),A=`remix-router-transitions`;function createRouter(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,r=!n;invariant(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let mapRouteProperties;if(e.mapRouteProperties)mapRouteProperties=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;mapRouteProperties=e=>({hasErrorBoundary:t(e)})}else mapRouteProperties=defaultMapRouteProperties;let i={},a=convertRoutesToDataRoutes(e.routes,mapRouteProperties,void 0,i),o,s=e.basename||`/`,l=e.dataStrategy||defaultDataStrategy,d=e.patchRoutesOnNavigation,f=_extends$1({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,m=new Set,h=null,g=null,_=null,v=e.hydrationData!=null,y=matchRoutes(a,e.history.location,s),b=!1,x=null;if(y==null&&!d){let t=getInternalRouterError(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=getShortCircuitMatches(a);y=n,x={[r.id]:t}}y&&!e.hydrationData&&checkFogOfWar(y,a,e.history.location.pathname).active&&(y=null);let S;if(!y){if(S=!1,y=[],f.v7_partialHydration){let t=checkFogOfWar(null,a,e.history.location.pathname);t.active&&t.matches&&(b=!0,y=t.matches)}}else if(y.some(e=>e.route.lazy))S=!1;else if(!y.some(e=>e.route.loader))S=!0;else if(f.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=y.findIndex(e=>n[e.route.id]!==void 0);S=y.slice(0,e+1).every(e=>!shouldLoadRouteOnHydration(e.route,t,n))}else S=y.every(e=>!shouldLoadRouteOnHydration(e.route,t,n))}else S=e.hydrationData!=null;let C,w={historyAction:e.history.action,location:e.history.location,matches:y,initialized:S,navigation:E,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||x,fetchers:new Map,blockers:new Map},A=c.Pop,j=!1,M,N=!1,P=new Map,removePageHideEventListener=null,F=!1,I=!1,L=[],R=new Set,z=new Map,B=0,V=-1,H=new Map,U=new Set,W=new Map,G=new Map,K=new Set,q=new Map,J=new Map,Y;function initialize(){if(p=e.history.listen(t=>{let{action:n,location:r,delta:i}=t;if(Y){Y(),Y=void 0;return}warning(J.size===0||i!=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 a=shouldBlockNavigation({currentLocation:w.location,nextLocation:r,historyAction:n});if(a&&i!=null){let t=new Promise(e=>{Y=e});e.history.go(i*-1),updateBlocker(a,{state:`blocked`,location:r,proceed(){updateBlocker(a,{state:`proceeding`,proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(i))},reset(){let e=new Map(w.blockers);e.set(a,O),updateState({blockers:e})}});return}return startNavigation(n,r)}),n){restoreAppliedTransitions(t,P);let _saveAppliedTransitions=()=>persistAppliedTransitions(t,P);t.addEventListener(`pagehide`,_saveAppliedTransitions),removePageHideEventListener=()=>t.removeEventListener(`pagehide`,_saveAppliedTransitions)}return w.initialized||startNavigation(c.Pop,w.location,{initialHydration:!0}),C}function dispose(){p&&p(),removePageHideEventListener&&removePageHideEventListener(),m.clear(),M&&M.abort(),w.fetchers.forEac
1h((e,t)=>deleteFetcher(t)),w.blockers.forEach((e,t)=>deleteBlocker(t))}function subscribe(e){return m.add(e),()=>m.delete(e)}function updateState(e,t){t===void 0&&(t={}),w=_extends$1({},w,e);let n=[],r=[];f.v7_fetcherPersist&&w.fetchers.forEach((e,t)=>{e.state===`idle`&&(K.has(t)?r.push(t):n.push(t))}),K.forEach(e=>{!w.fetchers.has(e)&&!z.has(e)&&r.push(e)}),[...m].forEach(e=>e(w,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),f.v7_fetcherPersist?(n.forEach(e=>w.fetchers.delete(e)),r.forEach(e=>deleteFetcher(e))):r.forEach(e=>K.delete(e))}function completeNavigation(t,n,r){let{flushSync:i}=r===void 0?{}:r,s=w.actionData!=null&&w.navigation.formMethod!=null&&isMutationMethod(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,l;l=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:s?w.actionData:null;let u=n.loaderData?mergeLoaderData(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,d=w.blockers;d.size>0&&(d=new Map(d),d.forEach((e,t)=>d.set(t,O)));let f=j===!0||w.navigation.formMethod!=null&&isMutationMethod(w.navigation.formMethod)&&t.state?._isRedirect!==!0;o&&=(a=o,void 0),F||A===c.Pop||(A===c.Push?e.history.push(t,t.state):A===c.Replace&&e.history.replace(t,t.state));let p;if(A===c.Pop){let e=P.get(w.location.pathname);e&&e.has(t.pathname)?p={currentLocation:w.location,nextLocation:t}:P.has(t.pathname)&&(p={currentLocation:t,nextLocation:w.location})}else if(N){let e=P.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),P.set(w.location.pathname,e)),p={currentLocation:w.location,nextLocation:t}}updateState(_extends$1({},n,{actionData:l,loaderData:u,historyAction:A,location:t,initialized:!0,navigation:E,revalidation:`idle`,restoreScrollPosition:getSavedScrollPosition(t,n.matches||w.matches),preventScrollReset:f,blockers:d}),{viewTransitionOpts:p,flushSync:i===!0}),A=c.Pop,j=!1,N=!1,F=!1,I=!1,L=[]}async function navigate(t,n){if(typeof t==`number`){e.history.go(t);return}let r=normalizeTo(w.location,w.matches,s,f.v7_prependBasename,t,f.v7_relativeSplatPath,n?.fromRouteId,n?.relative),{path:i,submission:a,error:o}=normalizeNavigateOptions(f.v7_normalizeFormMethod,!1,r,n),l=w.location,u=createLocation(w.location,i,n&&n.state);u=_extends$1({},u,e.history.encodeLocation(u));let d=n&&n.replace!=null?n.replace:void 0,p=c.Push;d===!0?p=c.Replace:d===!1||a!=null&&isMutationMethod(a.formMethod)&&a.formAction===w.location.pathname+w.location.search&&(p=c.Replace);let m=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,h=(n&&n.flushSync)===!0,g=shouldBlockNavigation({currentLocation:l,nextLocation:u,historyAction:p});if(g){updateBlocker(g,{state:`blocked`,location:u,proceed(){updateBlocker(g,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),navigate(t,n)},reset(){let e=new Map(w.blockers);e.set(g,O),updateState({blockers:e})}});return}return await startNavigation(p,u,{submission:a,pendingError:o,preventScrollReset:m,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:h})}function revalidate(){if(interruptActiveLoads(),updateState({revalidation:`loading`}),w.navigation.state!==`submitting`){if(w.navigation.state===`idle`){startNavigation(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}startNavigation(A||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:N===!0})}}async function startNavigation(t,n,r){M&&M.abort(),M=null,A=t,F=(r&&r.startUninterruptedRevalidation)===!0,saveScrollPosition(w.location,w.matches),j=(r&&r.preventScrollReset)===!0,N=(r&&r.enableViewTransition)===!0;let i=o||a,c=r&&r.overrideNavigation,l=r!=null&&r.initialHydration&&w.matches&&w.matches.length>0&&!b?w.matches:matchRoutes(i,n,s),d=(r&&r.flushSync)===!0;if(l&&w.initialized&&!I&&isHashChangeOnly(w.location,n)&&!(r&&r.submission&&isMutationMethod(r.submission.formMethod))){completeNavigation(n,{matches:l},{flushSync:d});return}let f=checkFogOfWar(l,i,n.pathname);if(f.active&&f.matches&&(l=f.matches),!l){let{error:e,notFoundMatches:t,route:r}=handleNavigational404(n.pathname);completeNavigation(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:d});return}M=new AbortController;
1let p=createClientSideRequest(e.history,n,M.signal,r&&r.submission),m;if(r&&r.pendingError)m=[findNearestBoundary(l).route.id,{type:u.error,error:r.pendingError}];else if(r&&r.submission&&isMutationMethod(r.submission.formMethod)){let t=await handleAction(p,n,r.submission,l,f.active,{replace:r.replace,flushSync:d});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(isErrorResult(r)&&isRouteErrorResponse(r.error)&&r.error.status===404){M=null,completeNavigation(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}l=t.matches||l,m=t.pendingActionResult,c=getLoadingNavigation(n,r.submission),d=!1,f.active=!1,p=createClientSideRequest(e.history,p.url,p.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await handleLoaders(p,n,l,f.active,c,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,d,m);h||(M=null,completeNavigation(n,_extends$1({matches:g||l},getActionDataForCommit(m),{loaderData:_,errors:v})))}async function handleAction(t,n,r,i,a,o){if(o===void 0&&(o={}),interruptActiveLoads(),updateState({navigation:getSubmittingNavigation(n,r)},{flushSync:o.flushSync===!0}),a){let e=await discoverRoutes(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=findNearestBoundary(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:u.error,error:e.error}]}}if(e.matches)i=e.matches;else{let{notFoundMatches:e,error:t,route:r}=handleNavigational404(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:u.error,error:t}]}}}let l,d=getTargetMatch(i,n);if(!d.route.action&&!d.route.lazy)l={type:u.error,error:getInternalRouterError(405,{method:t.method,pathname:n.pathname,routeId:d.route.id})};else if(l=(await callDataStrategy(`action`,w,t,[d],i,null))[d.route.id],t.signal.aborted)return{shortCircuited:!0};if(isRedirectResult(l)){let n;return n=o&&o.replace!=null?o.replace:normalizeRedirectLocation(l.response.headers.get(`Location`),new URL(t.url),s,e.history)===w.location.pathname+w.location.search,await startRedirectNavigation(t,l,!0,{submission:r,replace:n}),{shortCircuited:!0}}if(isDeferredResult(l))throw getInternalRouterError(400,{type:`defer-action`});if(isErrorResult(l)){let e=findNearestBoundary(i,d.route.id);return(o&&o.replace)!==!0&&(A=c.Push),{matches:i,pendingActionResult:[e.route.id,l]}}return{matches:i,pendingActionResult:[d.route.id,l]}}async function handleLoaders(t,n,r,i,c,l,u,d,p,m,h){let g=c||getLoadingNavigation(n,l),_=l||u||getSubmissionFromNavigation(g),v=!F&&(!f.v7_partialHydration||!p);if(i){if(v){let e=getUpdatedActionData(h);updateState(_extends$1({navigation:g},e===void 0?{}:{actionData:e}),{flushSync:m})}let e=await discoverRoutes(r,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=findNearestBoundary(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)r=e.matches;else{let{error:e,notFoundMatches:t,route:r}=handleNavigational404(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let y=o||a,[b,x]=getMatchesToLoad(e.history,w,r,_,n,f.v7_partialHydration&&p===!0,f.v7_skipActionErrorRevalidation,I,L,R,K,W,U,y,s,h);if(cancelActiveDeferreds(e=>!(r&&r.some(t=>t.route.id===e))||b&&b.some(t=>t.route.id===e)),V=++B,b.length===0&&x.length===0){let e=markFetchRedirectsDone();return completeNavigation(n,_extends$1({matches:r,loaderData:{},errors:h&&isErrorResult(h[1])?{[h[0]]:h[1].error}:null},getActionDataForCommit(h),e?{fetchers:new Map(w.fetchers)}:{}),{flushSync:m}),{shortCircuited:!0}}if(v){let e={};if(!i){e.navigation=g;let t=getUpdatedActionData(h);t!==void 0&&(e.actionData=t)}x.length>0&&(e.fetchers=getUpdatedRevalidatingFetchers(x)),updateState(e,{flushSync:m})}x.forEach(e=>{abortFetcher(e.key),e.controller&&z.set(e.key,e.controller)});let abortPendingFetchRevalidations=()=>x.forEach(e=>abortFetcher(e.key));M&&M.signal.addEventListener(`abort`,abortPendingFetchRevalidations);let{loaderResults:S,fetcherResults:C}=await callLoadersAndMaybeResolveData(w,r,b,x,t);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener(`abort`,abortPendingFetchRevalidations),x.forEach(e
1=>z.delete(e.key));let T=findRedirect(S);if(T)return await startRedirectNavigation(t,T.result,!0,{replace:d}),{shortCircuited:!0};if(T=findRedirect(C),T)return U.add(T.key),await startRedirectNavigation(t,T.result,!0,{replace:d}),{shortCircuited:!0};let{loaderData:E,errors:D}=processLoaderData(w,r,S,h,x,C,q);q.forEach((e,t)=>{e.subscribe(n=>{(n||e.done)&&q.delete(t)})}),f.v7_partialHydration&&p&&w.errors&&(D=_extends$1({},w.errors,D));let O=markFetchRedirectsDone(),k=abortStaleFetchLoads(V),A=O||k||x.length>0;return _extends$1({matches:r,loaderData:E,errors:D},A?{fetchers:new Map(w.fetchers)}:{})}function getUpdatedActionData(e){if(e&&!isErrorResult(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function getUpdatedRevalidatingFetchers(e){return e.forEach(e=>{let t=w.fetchers.get(e.key),n=getLoadingFetcher(void 0,t?t.data:void 0);w.fetchers.set(e.key,n)}),new Map(w.fetchers)}function fetch(e,t,n,i){if(r)throw Error(`router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.`);abortFetcher(e);let c=(i&&i.flushSync)===!0,l=o||a,u=normalizeTo(w.location,w.matches,s,f.v7_prependBasename,n,f.v7_relativeSplatPath,t,i?.relative),d=matchRoutes(l,u,s),p=checkFogOfWar(d,l,u);if(p.active&&p.matches&&(d=p.matches),!d){setFetcherError(e,t,getInternalRouterError(404,{pathname:u}),{flushSync:c});return}let{path:m,submission:h,error:g}=normalizeNavigateOptions(f.v7_normalizeFormMethod,!0,u,i);if(g){setFetcherError(e,t,g,{flushSync:c});return}let _=getTargetMatch(d,m),v=(i&&i.preventScrollReset)===!0;if(h&&isMutationMethod(h.formMethod)){handleFetcherAction(e,t,m,_,d,p.active,c,v,h);return}W.set(e,{routeId:t,path:m}),handleFetcherLoader(e,t,m,_,d,p.active,c,v,h)}async function handleFetcherAction(t,n,r,i,c,l,u,d,p){interruptActiveLoads(),W.delete(t);function detectAndHandle405Error(e){return!e.route.action&&!e.route.lazy&&(setFetcherError(t,n,getInternalRouterError(405,{method:p.formMethod,pathname:r,routeId:n}),{flushSync:u}),!0)}if(!l&&detectAndHandle405Error(i))return;updateFetcherState(t,getSubmittingFetcher(p,w.fetchers.get(t)),{flushSync:u});let m=new AbortController,h=createClientSideRequest(e.history,r,m.signal,p);if(l){let e=await discoverRoutes(c,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){setFetcherError(t,n,e.error,{flushSync:u});return}if(!e.matches){setFetcherError(t,n,getInternalRouterError(404,{pathname:r}),{flushSync:u});return}if(c=e.matches,i=getTargetMatch(c,r),detectAndHandle405Error(i))return}z.set(t,m);let g=B,_=(await callDataStrategy(`action`,w,h,[i],c,t))[i.route.id];if(h.signal.aborted){z.get(t)===m&&z.delete(t);return}if(f.v7_fetcherPersist&&K.has(t)){if(isRedirectResult(_)||isErrorResult(_)){updateFetcherState(t,getDoneFetcher(void 0));return}}else{if(isRedirectResult(_)){if(z.delete(t),V>g){updateFetcherState(t,getDoneFetcher(void 0));return}return U.add(t),updateFetcherState(t,getLoadingFetcher(p)),startRedirectNavigation(h,_,!1,{fetcherSubmission:p,preventScrollReset:d})}if(isErrorResult(_)){setFetcherError(t,n,_.error);return}}if(isDeferredResult(_))throw getInternalRouterError(400,{type:`defer-action`});let v=w.navigation.location||w.location,y=createClientSideRequest(e.history,v,m.signal),b=o||a,x=w.navigation.state===`idle`?w.matches:matchRoutes(b,w.navigation.location,s);invariant(x,`Didn't find any matches after fetcher action`);let S=++B;H.set(t,S);let C=getLoadingFetcher(p,_.data);w.fetchers.set(t,C);let[T,E]=getMatchesToLoad(e.history,w,x,p,v,!1,f.v7_skipActionErrorRevalidation,I,L,R,K,W,U,b,s,[i.route.id,_]);E.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=w.fetchers.get(t),r=getLoadingFetcher(void 0,n?n.data:void 0);w.fetchers.set(t,r),abortFetcher(t),e.controller&&z.set(t,e.controller)}),updateState({fetchers:new Map(w.fetchers)});let abortPendingFetchRevalidations=()=>E.forEach(e=>abortFetcher(e.key));m.signal.addEventListener(`abort`,abortPendingFetchRevalidations);let{loaderResults:D,fetcherResults:O}=await callLoadersAndMaybeResolveData(w,x,T,E,y);if(m.signal.aborted)return;m.signal.removeEventListener(`abort`,abortPendingFetchRevalidations),H.delete(t),z.delete(t),E.forEac
1h(e=>z.delete(e.key));let k=findRedirect(D);if(k)return startRedirectNavigation(y,k.result,!1,{preventScrollReset:d});if(k=findRedirect(O),k)return U.add(k.key),startRedirectNavigation(y,k.result,!1,{preventScrollReset:d});let{loaderData:j,errors:N}=processLoaderData(w,x,D,void 0,E,O,q);if(w.fetchers.has(t)){let e=getDoneFetcher(_.data);w.fetchers.set(t,e)}abortStaleFetchLoads(S),w.navigation.state===`loading`&&S>V?(invariant(A,`Expected pending action`),M&&M.abort(),completeNavigation(w.navigation.location,{matches:x,loaderData:j,errors:N,fetchers:new Map(w.fetchers)})):(updateState({errors:N,loaderData:mergeLoaderData(w.loaderData,j,x,N),fetchers:new Map(w.fetchers)}),I=!1)}async function handleFetcherLoader(t,n,r,i,a,o,s,c,l){let u=w.fetchers.get(t);updateFetcherState(t,getLoadingFetcher(l,u?u.data:void 0),{flushSync:s});let d=new AbortController,f=createClientSideRequest(e.history,r,d.signal);if(o){let e=await discoverRoutes(a,new URL(f.url).pathname,f.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){setFetcherError(t,n,e.error,{flushSync:s});return}if(e.matches)a=e.matches,i=getTargetMatch(a,r);else{setFetcherError(t,n,getInternalRouterError(404,{pathname:r}),{flushSync:s});return}}z.set(t,d);let p=B,m=(await callDataStrategy(`loader`,w,f,[i],a,t))[i.route.id];if(isDeferredResult(m)&&(m=await resolveDeferredData(m,f.signal,!0)||m),z.get(t)===d&&z.delete(t),!f.signal.aborted){if(K.has(t)){updateFetcherState(t,getDoneFetcher(void 0));return}if(isRedirectResult(m)){if(V>p){updateFetcherState(t,getDoneFetcher(void 0));return}U.add(t),await startRedirectNavigation(f,m,!1,{preventScrollReset:c});return}if(isErrorResult(m)){setFetcherError(t,n,m.error);return}invariant(!isDeferredResult(m),`Unhandled fetcher deferred data`),updateFetcherState(t,getDoneFetcher(m.data))}}async function startRedirectNavigation(r,i,a,o){let{submission:l,fetcherSubmission:u,preventScrollReset:d,replace:f}=o===void 0?{}:o;i.response.headers.has(`X-Remix-Revalidate`)&&(I=!0);let p=i.response.headers.get(`Location`);invariant(p,`Expected a Location header on the redirect Response`),p=normalizeRedirectLocation(p,new URL(r.url),s,e.history);let m=createLocation(w.location,p,{_isRedirect:!0});if(n){let n=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))n=!0;else if(k.test(p)){let r=e.history.createURL(p);n=r.origin!==t.location.origin||stripBasename(r.pathname,s)==null}if(n){f?t.location.replace(p):t.location.assign(p);return}}M=null;let h=f===!0||i.response.headers.has(`X-Remix-Replace`)?c.Replace:c.Push,{formMethod:g,formAction:_,formEncType:v}=w.navigation;!l&&!u&&g&&_&&v&&(l=getSubmissionFromNavigation(w.navigation));let y=l||u;T.has(i.response.status)&&y&&isMutationMethod(y.formMethod)?await startNavigation(h,m,{submission:_extends$1({},y,{formAction:p}),preventScrollReset:d||j,enableViewTransition:a?N:void 0}):await startNavigation(h,m,{overrideNavigation:getLoadingNavigation(m,l),fetcherSubmission:u,preventScrollReset:d||j,enableViewTransition:a?N:void 0})}async function callDataStrategy(e,t,n,r,a,o){let c,d={};try{c=await callDataStrategyImpl(l,e,t,n,r,a,o,i,mapRouteProperties)}catch(e){return r.forEach(t=>{d[t.route.id]={type:u.error,error:e}}),d}for(let[e,t]of Object.entries(c))if(isRedirectDataStrategyResultResult(t)){let r=t.result;d[e]={type:u.redirect,response:normalizeRelativeRoutingRedirectResponse(r,n,e,a,s,f.v7_relativeSplatPath)}}else d[e]=await convertDataStrategyResultToDataResult(t);return d}async function callLoadersAndMaybeResolveData(t,n,r,i,a){let o=t.matches,s=callDataStrategy(`loader`,t,a,r,n,null),c=Promise.all(i.map(async n=>{if(n.matches&&n.match&&n.controller){let r=(await callDataStrategy(`loader`,t,createClientSideRequest(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}return Promise.resolve({[n.key]:{type:u.error,error:getInternalRouterError(404,{pathname:n.path})}})})),l=await s,d=(await c).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([resolveNavigationDeferredResults(n,l,a.signal,o,t.loaderData),resolveFetcherDeferredResults(n,d,i)]),{loaderResults:l,fetcherResults:d}}function interruptActiveLoads(){I=!0,L.push(...cancelActiveDeferreds()),W.forEach((e,t)=>{z.has(t)&&R.add(t),abortFetcher(t)})}function updateFetcherState(e,t,n){n===void 0&&(n={}),w.fetchers.set(e,t),updateState({fetchers:new Map(w.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function setFetcherError(e,t,n,r){r===void 0&&(r={});let i=findNearestBoundary(w.matches,t);deleteFetcher(e),updateState({errors:{[i.route.id]:n},fetchers:new Map(w.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function getFetcher(e){return G.set(e,(G.get(e)||0)+1),K.has(e)&&K.delete(e),w.fetchers.get(e)||D}function deleteFetcher(e){let t=w.fetchers.get(e);z.has(e)&&!(t&&t.state===`loading`&&H.has(e))&&abortFetcher(e),W.delete(e),H.delete(e),U.delete(e),f.v7_fetcherPersist&&K.delete(e),R.delete(e),w.fetchers.delete(e)}function deleteFetcherAndUpdateState(e){let t=(G.get(e)||0)-1;t<=0?(G.delete(e),K.add(e),f.v7_fetcherPersist||deleteFetcher(e)):G.set(e,t),updateState({fetchers:new Map(w.fetchers)})}function abortFetcher(e){let t=z.get(e);t&&(t.abort(),z.delete(e))}function markFetchersDone(e){for(let t of e){let e=getDoneFetcher(getFetcher(t).data);w.fetchers.set(t,e)}}function markFetchRedirectsDone(){let e=[],t=!1;for(let n of U){let r=w.fetchers.get(n);invariant(r,`Expected fetcher: `+n),r.state===`loading`&&(U.delete(n),e.push(n),t=!0)}return markFetchersDone(e),t}function abortStaleFetchLoads(e){let t=[];for(let[n,r]of H)if(r<e){let e=w.fetchers.get(n);invariant(e,`Expected fetcher: `+n),e.state===`loading`&&(abortFetcher(n),H.delete(n),t.push(n))}return markFetchersDone(t),t.length>0}function getBlocker(e,t){let n=w.blockers.get(e)||O;return J.get(e)!==t&&J.set(e,t),n}function deleteBlocker(e){w.blockers.delete(e),J.delete(e)}function updateBlocker(e,t){let n=w.blockers.get(e)||O;invariant(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(w.blockers);r.set(e,t),updateState({blockers:r})}function shouldBlockNavigation(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(J.size===0)return;J.size>1&&warning(!1,`A router only supports one blocker at a time`);let i=Array.from(J.entries()),[a,o]=i[i.length-1],s=w.blockers.get(a);if(!(s&&s.state===`proceeding`)&&o({currentLocation:t,nextLocation:n,historyAction:r}))return a}function handleNavigational404(e){let t=getInternalRouterError(404,{pathname:e}),{matches:n,route:r}=getShortCircuitMatches(o||a);return cancelActiveDeferreds(),{notFoundMatches:n,route:r,error:t}}function cancelActiveDeferreds(e){let t=[];return q.forEach((n,r)=>{(!e||e(r))&&(n.cancel(),t.push(r),q.delete(r))}),t}function enableScrollRestoration(e,t,n){if(h=e,_=t,g=n||null,!v&&w.navigation===E){v=!0;let e=getSavedScrollPosition(w.location,w.matches);e!=null&&updateState({restoreScrollPosition:e})}return()=>{h=null,_=null,g=null}}function getScrollKey(e,t){return g&&g(e,t.map(e=>convertRouteMatchToUiMatch(e,w.loaderData)))||e.key}function saveScrollPosition(e,t){if(h&&_){let n=getScrollKey(e,t);h[n]=_()}}function getSavedScrollPosition(e,t){if(h){let n=getScrollKey(e,t),r=h[n];if(typeof r==`number`)return r}return null}function checkFogOfWar(e,t,n){if(d){if(!e)return{active:!0,matches:matchRoutesImpl(t,n,s,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:matchRoutesImpl(t,n,s,!0)}}return{active:!1,matches:null}}async function discoverRoutes(e,t,n,r){if(!d)return{type:`success`,matches:e};let c=e;for(;;){let e=o==null,l=o||a,u=i;try{await d({signal:n,path:t,matches:c,fetcherKey:r,patch:(e,t)=>{n.aborted||patchRoutesImpl(e,t,l,u,mapRouteProperties)}})}catch(e){return{type:`error`,error:e,partialMatches:c}}finally{e&&!n.aborted&&(a=[...a])}if(n.aborted)return{type:`aborted`};let f=matchRoutes(l,t,s);if(f)return{type:`success`,matches:f};let p=matchRoutesImpl(l,t,s,!0);if(!p||c.length===p.length&&c.every((e,t)=>e.route.id===p[t].route.id))return{type:`success`,matches:null};c=p}}function _internalSetRoutes(e){i={},o=convertRoutesToDataRoutes(e,mapRouteProperties,void 0,i)}function patchRoutes(e,t){let n=o==null;patchRoutesImpl(e,t,o||a,i,mapRouteProperties),n&&(a=[...a],updateState({}))}return C={get basename(){return s},get future(){return f},get state(){return w},get routes(){return a},get window(){return t},initialize,subscribe,enableScrollRestoration,navigate,fetch,revalidate,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher,deleteFetcher:deleteFetcherAndUpdateState,dispose,getBlocker,deleteBlocker,patchRoutes,_internalFetchControllers:z,_internalActiveDeferreds:q,_internalSetRoutes},C}function isSubmissionNavigation(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`
1in e&&e.body!==void 0)}function normalizeTo(e,t,n,r,i,a,o,s){let c,l;if(o){c=[];for(let e of t)if(c.push(e),e.route.id===o){l=e;break}}else c=t,l=t[t.length-1];let u=resolveTo(i||`.`,getResolveToMatches(c,a),stripBasename(e.pathname,n)||e.pathname,s===`path`);if(i??(u.search=e.search,u.hash=e.hash),(i==null||i===``||i===`.`)&&l){let e=hasNakedIndexQuery(u.search);if(l.route.index&&!e)u.search=u.search?u.search.replace(/^\?/,`?index&`):`?index`;else if(!l.route.index&&e){let e=new URLSearchParams(u.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();u.search=n?`?`+n:``}}return r&&n!==`/`&&(u.pathname=u.pathname===`/`?n:joinPaths([n,u.pathname])),createPath(u)}function normalizeNavigateOptions(e,t,n,r){if(!r||!isSubmissionNavigation(r))return{path:n};if(r.formMethod&&!isValidMethod(r.formMethod))return{path:n,error:getInternalRouterError(405,{method:r.formMethod})};let getInvalidBodyError=()=>({path:n,error:getInternalRouterError(400,{type:`invalid-body`})}),i=r.formMethod||`get`,a=e?i.toUpperCase():i.toLowerCase(),o=stripHashFromPath(n);if(r.body!==void 0){if(r.formEncType===`text/plain`){if(!isMutationMethod(a))return getInvalidBodyError();let e=typeof r.body==`string`?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,t)=>{let[n,r]=t;return``+e+n+`=`+r+` 2`},``):String(r.body);return{path:n,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if(r.formEncType===`application/json`){if(!isMutationMethod(a))return getInvalidBodyError();try{let e=typeof r.body==`string`?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch{return getInvalidBodyError()}}}invariant(typeof FormData==`function`,`FormData is not available in this environment`);let s,c;if(r.formData)s=convertFormDataToSearchParams(r.formData),c=r.formData;else if(r.body instanceof FormData)s=convertFormDataToSearchParams(r.body),c=r.body;else if(r.body instanceof URLSearchParams)s=r.body,c=convertSearchParamsToFormData(s);else if(r.body==null)s=new URLSearchParams,c=new FormData;else try{s=new URLSearchParams(r.body),c=convertSearchParamsToFormData(s)}catch{return getInvalidBodyError()}let l={formMethod:a,formAction:o,formEncType:r&&r.formEncType||`application/x-www-form-urlencoded`,formData:c,json:void 0,text:void 0};if(isMutationMethod(l.formMethod))return{path:n,submission:l};let u=parsePath(n);return t&&u.search&&hasNakedIndexQuery(u.search)&&s.append(`index`,``),u.search=`?`+s,{path:createPath(u),submission:l}}function getLoaderMatchesUntilBoundary(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(e=>e.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function getMatchesToLoad(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=h?isErrorResult(h[1])?h[1].error:h[1].data:void 0,_=e.createURL(t.location),v=e.createURL(i),y=n;a&&t.errors?y=getLoaderMatchesUntilBoundary(n,Object.keys(t.errors)[0],!0):h&&isErrorResult(h[1])&&(y=getLoaderMatchesUntilBoundary(n,h[0]));let b=h?h[1].statusCode:void 0,x=o&&b&&b>=400,S=y.filter((e,n)=>{let{route:i}=e;if(i.lazy)return!0;if(i.loader==null)return!1;if(a)return shouldLoadRouteOnHydration(i,t.loaderData,t.errors);if(isNewLoader(t.loaderData,t.matches[n],e)||c.some(t=>t===e.route.id))return!0;let o=t.matches[n],l=e;return shouldRevalidateLoader(e,_extends$1({currentUrl:_,currentParams:o.params,nextUrl:v,nextParams:l.params},r,{actionResult:g,actionStatus:b,defaultShouldRevalidate:x?!1:s||_.pathname+_.search===v.pathname+v.search||_.search!==v.search||isNewRouteInstance(o,l)}))}),C=[];return d.forEach((e,i)=>{if(a||!n.some(t=>t.route.id===e.routeId)||u.has(i))return;let o=matchRoutes(p,e.path,m);if(!o){C.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}let c=t.fetchers.get(i),d=getTargetMatch(o,e.path),h=!1;f.has(i)?h=!1:l.has(i)?(l.delete(i),h=!0):h=c&&c.state!==`idle`&&c.data===void 0?s:shouldRevalidateLoader(d,_extends$1({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:g,actionStatus:b,defaultShouldRevalidate:!x&&s})),h&&C.push({key:i,routeId:e.routeId,path:e.path,matches:o,match:d,controller:new AbortController})}),[S,C]}function shouldLoadRouteOnHydration(e,t,n){if(e.lazy)return!0;
2if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0||!r&&!i}function isNewLoader(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function isNewRouteInstance(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function shouldRevalidateLoader(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function patchRoutesImpl(e,t,n,r,i){let a;if(e){let t=r[e];invariant(t,`No route found to patch children into: routeId = `+e),t.children||=[],a=t.children}else a=n;let o=convertRoutesToDataRoutes(t.filter(e=>!a.some(t=>isSameRoute(e,t))),i,[e||`_`,`patch`,String(a?.length||`0`)],r);a.push(...o)}function isSameRoute(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)||e.children.every((e,n)=>t.children?.some(t=>isSameRoute(e,t)))}async function loadLazyRouteModule(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];invariant(i,`No route found in manifest`);let a={};for(let e in r){let t=i[e]!==void 0&&e!==`hasErrorBoundary`;warning(!t,`Route "`+i.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.`)),!t&&!d.has(e)&&(a[e]=r[e])}Object.assign(i,a),Object.assign(i,_extends$1({},t(i),{lazy:void 0}))}async function defaultDataStrategy(e){let{matches:t}=e,n=t.filter(e=>e.shouldLoad);return(await Promise.all(n.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[n[r].route.id]:t}),{})}async function callDataStrategyImpl(e,t,n,r,i,a,o,s,c,l){let d=a.map(e=>e.route.lazy?loadLazyRouteModule(e.route,c,s):void 0),f=await e({matches:a.map((e,n)=>{let a=d[n],o=i.some(t=>t.route.id===e.route.id),resolve=async n=>(n&&r.method===`GET`&&(e.route.lazy||e.route.loader)&&(o=!0),o?callLoaderOrAction(t,r,e,a,n,l):Promise.resolve({type:u.data,result:void 0}));return _extends$1({},e,{shouldLoad:o,resolve})}),request:r,params:a[0].params,fetcherKey:o,context:l});try{await Promise.all(d)}catch{}return f}async function callLoaderOrAction(e,t,n,r,i,a){let o,onReject,runHandler=r=>{let o,s=new Promise((e,t)=>o=t);onReject=()=>o(),t.signal.addEventListener(`abort`,onReject);let actualHandler=i=>typeof r==`function`?r({request:t,params:n.params,context:a},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean `+(`"`+e+`" [routeId: `+n.route.id+`]`))),c=(async()=>{try{return{type:`data`,result:await(i?i(e=>actualHandler(e)):actualHandler())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([c,s])};try{let i=n.route[e];if(r){if(i){let e,[t]=await Promise.all([runHandler(i).catch(t=>{e=t}),r]);if(e!==void 0)throw e;o=t}else if(await r,i=n.route[e],i)o=await runHandler(i);else if(e===`action`){let e=new URL(t.url),r=e.pathname+e.search;throw getInternalRouterError(405,{method:t.method,pathname:r,routeId:n.route.id})}else return{type:u.data,result:void 0}}else if(i)o=await runHandler(i);else{let e=new URL(t.url);throw getInternalRouterError(404,{pathname:e.pathname+e.search})}invariant(o.result!==void 0,`You defined `+(e===`action`?`an action`:`a loader`)+` for route `+(`"`+n.route.id+`" but didn't return anything from your \``+e+"` ")+"function. Please return a value or `null`.")}catch(e){return{type:u.error,result:e}}finally{onReject&&t.signal.removeEventListener(`abort`,onReject)}return o}async function convertDataStrategyResultToDataResult(e){let{result:t,type:n}=e;if(isResponse(t)){let e;try{let n=t.headers.get(`Content-Type`);e=n&&/\bapplication\/json\b/.test(n)?t.body==null?null:await t.json():await t.text()}catch(e){return{type:u.error,error:e}}return n===u.error?{type:u.error,error:new ErrorResponseImpl(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:u.data,data:e,statusCode:t.status,headers:t.headers}}if(n===u.error){if(isDataWithResponseInit(t)){var r;if(t.data instanceof Error){var i;return{type:u.error,error:t.data,statusCode:t.init?.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:u.error,error:new ErrorResponseImpl(t.init?.status||500,void 0,t.data),statusCode:isRouteErrorResponse(t)?t.status:void 0,headers:(r=t.init)!=null&&r.headers?new Headers(t.init.headers):void 0}}return{type:u.error,error:t,statusCode:isRouteErrorResponse(t)?t.status:void 0}}if(isDeferredData(t))return{type:u.deferred,deferredData:t,statusCode:t.init?.status,headers:t.init?.headers&&new Headers(t.init.headers)};if(isDataWithResponseInit(t)){var a;return{type:u.data,data:t.data,statusCode:t.init?.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:u.data,data:t}}function normalizeRelativeRoutingRedirectResponse(e,t,n,r,i,a){let o=e.headers.get(`Location`);if(invariant(o,`Redirects returned/thrown from loaders/actions must have a Location header`),!k.test(o)){let s=r.slice(0,r.findIndex(e=>e.route.id===n)+1);o=normalizeTo(new URL(t.url),s,i,!0,o,a),e.headers.set(`Location`,o)}return e}function normalizeRedirectLocation(e,t,n,r){let i=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];if(k.test(e)){let r=e,a=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(i.includes(a.protocol))throw Error(`Invalid redirect location`);let o=stripBasename(a.pathname,n)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}
2function createClientSideRequest(e,t,n,r){let i=e.createURL(stripHashFromPath(t)).toString(),a={signal:n};if(r&&isMutationMethod(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?convertFormDataToSearchParams(r.formData):r.formData}return new Request(i,a)}function convertFormDataToSearchParams(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function convertSearchParamsToFormData(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function processRouteLoaderData(e,t,n,r,i){let a={},o=null,s,c=!1,l={},u=n&&isErrorResult(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(invariant(!isRedirectResult(f),`Cannot handle redirect results in processLoaderData`),isErrorResult(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=findNearestBoundary(e,d);o[n.route.id]??(o[n.route.id]=t)}a[d]=void 0,c||(c=!0,s=isRouteErrorResponse(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else isDeferredResult(f)?(r.set(d,f.deferredData),a[d]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)):(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},a[n[0]]=void 0),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function processLoaderData(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=processRouteLoaderData(t,n,r,o,!1);return i.forEach(t=>{let{key:n,match:r,controller:i}=t,o=a[n];if(invariant(o,`Did not find corresponding fetcher result`),!(i&&i.signal.aborted)){if(isErrorResult(o)){let t=findNearestBoundary(e.matches,r?.route.id);c&&c[t.route.id]||(c=_extends$1({},c,{[t.route.id]:o.error})),e.fetchers.delete(n)}else if(isRedirectResult(o))invariant(!1,`Unhandled fetcher revalidation redirect`);else if(isDeferredResult(o))invariant(!1,`Unhandled fetcher deferred data`);else{let t=getDoneFetcher(o.data);e.fetchers.set(n,t)}}}),{loaderData:s,errors:c}}function mergeLoaderData(e,t,n,r){let i=_extends$1({},t);for(let a of n){let n=a.route.id;if(t.hasOwnProperty(n)?t[n]!==void 0&&(i[n]=t[n]):e[n]!==void 0&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function getActionDataForCommit(e){return e?isErrorResult(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function findNearestBoundary(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function getShortCircuitMatches(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 getInternalRouterError(e,t){let{pathname:n,routeId:r,method:i,type:a,message:o}=t===void 0?{}:t,s=`Unknown Server Error`,c=`Unknown @remix-run/router error`;return e===400?(s=`Bad Request`,i&&n&&r?c=`You made a `+i+` request to "`+n+`" but `+('did not provide a `loader` for route "'+r+`", `)+`so there is no way to handle the request.`:a===`defer-action`?c=`defer() is not supported in actions`:a===`invalid-body`&&(c=`Unable to encode submission body`)):e===403?(s=`Forbidden`,c=`Route "`+r+`" does not match URL "`+n+`"`):e===404?(s=`Not Found`,c=`No route matches URL "`+n+`"`):e===405&&(s=`Method Not Allowed`,i&&n&&r?c=`You made a `+i.toUpperCase()+` request to "`+n+`" but `+('did not provide an `action` for route "'+r+`", `)+`so there is no way to handle the request.`:i&&(c=`Invalid request method "`+i.toUpperCase()+`"`)),new ErrorResponseImpl(e||500,s,Error(c),!0)}function findRedirect(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(isRedirectResult(r))return{key:n,result:r}}}function stripHashFromPath(e){let t=typeof e==`string`?parsePath(e):e;return createPath(_extends$1({},t,{hash:``}))}function isHashChangeOnly(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function isRedirectDataStrategyResultResult(e){return isResponse(e.result)&&w.has(e.result.status)}function isDeferredResult(e){return e.type===u.deferred}function isErrorResult(e){return e.type===u.error}function isRedirectResult(e){return(e&&e.type)===u.redirect}function isDataWithResponseInit(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function isDeferredData(e){let t=e;return t&&typeof t==`object`&&typeof t.data==`object`&&typeof t.subscribe==`function`&&typeof t.cancel==`function`&&typeof t.resolveData==`function`}function isResponse(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function isValidMethod(e){return C.has(e.toLowerCase())}function isMutationMethod(e){return x.has(e.toLowerCase())}async function resolveNavigationDeferredResults(e,t,n,r,i){let a=Object.entries(t);for(let o=0;o<a.length;o++){let[s,c]=a[o],l=e.find(e=>e?.route.id===s);if(!l)continue;let u=r.find(e=>e.route.id===l.route.id),d=u!=null&&!isNewRouteInstance(u,l)&&(i&&i[l.route.id])!==void 0;isDeferredResult(c)&&d&&await resolveDeferredData(c,n,!1).then(e=>{e&&(t[s]=e)})}}async function resolveFetcherDeferredResults(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:a,controller:o}=n[r],s=t[i];e.find(e=>e?.route.id===a)&&isDeferredResult(s)&&(invariant(o,`Expected an AbortController for revalidating fetcher deferred result`),await resolveDeferredData(s,o.signal,!0).then(e=>{e&&(t[i]=e)}))}}async function resolveDeferredData(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:u.data,data:e.deferredData.unwrappedData}
2}catch(e){return{type:u.error,error:e}}return{type:u.data,data:e.deferredData.data}}}function hasNakedIndexQuery(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function getTargetMatch(e,t){let n=typeof t==`string`?parsePath(t).search:t.search;if(e[e.length-1].route.index&&hasNakedIndexQuery(n||``))return e[e.length-1];let r=getPathContributingMatches(e);return r[r.length-1]}function getSubmissionFromNavigation(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 getLoadingNavigation(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 getSubmittingNavigation(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 getLoadingFetcher(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 getSubmittingFetcher(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 getDoneFetcher(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 restoreAppliedTransitions(e,t){try{let n=e.sessionStorage.getItem(A);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 persistAppliedTransitions(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(A,JSON.stringify(n))}catch(e){warning(!1,`Failed to save applied view transitions in sessionStorage (`+e+`).`)}}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}var j=s.createContext(null),M=s.createContext(null),N=s.createContext(null),P=s.createContext(null),F=s.createContext({outlet:null,matches:[],isDataRoute:!1}),I=s.createContext(null);function useHref(e,t){let{relative:n}=t===void 0?{}:t;!useInRouterContext()&&invariant(!1);let{basename:r,navigator:i}=s.useContext(N),{hash:a,pathname:o,search:c}=useResolvedPath(e,{relative:n}),l=o;return r!==`/`&&(l=o===`/`?r:joinPaths([r,o])),i.createHref({pathname:l,search:c,hash:a})}function useInRouterContext(){return s.useContext(P)!=null}function useLocation(){return!useInRouterContext()&&invariant(!1),s.useContext(P).location}function useMatch(e){!useInRouterContext()&&invariant(!1);let{pathname:t}=useLocation();return s.useMemo(()=>matchPath(e,decodePath(t)),[t,e])}function useIsomorphicLayoutEffect(e){s.useContext(N).static||s.useLayoutEffect(e)}function useNavigate(){let{isDataRoute:e}=s.useContext(F);return e?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){!useInRouterContext()&&invariant(!1);let e=s.useContext(j),{basename:t,future:n,navigator:r}=s.useContext(N),{matches:i}=s.useContext(F),{pathname:a}=useLocation(),o=JSON.stringify(getResolveToMatches(i,n.v7_relativeSplatPath)),c=s.useRef(!1);return useIsomorphicLayoutEffect(()=>{c.current=!0}),s.useCallback(function(n,i){if(i===void 0&&(i={}),!c.current)return;if(typeof n==`number`){r.go(n);return}let s=resolveTo(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(s.pathname=s.pathname===`/`?t:joinPaths([t,s.pathname])),(i.replace?r.replace:r.push)(s,i.state,i)},[t,r,o,a,e])}var L=s.createContext(null);function useOutlet(e){let t=s.useContext(F).outlet;return t&&s.createElement(L.Provider,{value:e},t)}function useParams(){let{matches:e}=s.useContext(F),t=e[e.length-1];return t?t.params:{}}function useResolvedPath(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=s.useContext(N),{matches:i}=s.useContext(F),{pathname:a}=useLocation(),o=JSON.stringify(getResolveToMatches(i,r.v7_relativeSplatPath));return s.useMemo(()=>resolveTo(e,JSON.parse(o),a,n===`path`),[e,o,a,n])}function useRoutes(e,t){return useRoutesImpl(e,t)}function useRoutesImpl(e,t,n,r){!useInRouterContext()&&invariant(!1);let{navigator:i}=s.useContext(N),{matches:a}=s.useContext(F),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:`/`;o&&o.route;let d=useLocation(),f;if(t){var p;let e=typeof t==`string`?parsePath(t):t;!(u===`/`||(p=e.pathname)!=null&&p.startsWith(u))&&invariant(!1),f=e}else f=d;let m=f.pathname||`/`,h=m;if(u!==`/`){let e=u.replace(/^\//,``).split(`/`);h=`/`+m.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=matchRoutes(e,{pathname:h}),_=_renderMatches(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:joinPaths([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?u:joinPaths([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r);return t&&_?s.createElement(P.Provider,{value:{location:_extends({pathname:`/`,search:``,hash:``,state:null,key:`default`},f),navigationType:c.Pop}},_):_}function DefaultErrorComponent(){let e=useRouteError(),t=isRouteErrorResponse(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return s.createElement(s.Fragment,null,s.createElement(`h2`,null,`Unexpected Application
2Error!`),s.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?s.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var R=s.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends s.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?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error(`React Router caught the following error during render`,e,t)}render(){return this.state.error===void 0?this.props.children:s.createElement(F.Provider,{value:this.props.routeContext},s.createElement(I.Provider,{value:this.state.error,children:this.props.component}))}};function RenderedRoute(e){let{routeContext:t,match:n,children:r}=e,i=s.useContext(j);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),s.createElement(F.Provider,{value:t},r)}function _renderMatches(e,t,n,r){if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);!(e>=0)&&invariant(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let u,d=!1,f=null,p=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||R,c&&(l<0&&i===0?(warningOnce(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):l===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,i+1)),getChildren=()=>{let t;return t=u?f:d?p:r.route.Component?s.createElement(r.route.Component,null):r.route.element?r.route.element:e,s.createElement(RenderedRoute,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?s.createElement(RenderErrorBoundary,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:getChildren(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):getChildren()},null)}var z=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(z||{}),B=function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e}(B||{});function useDataRouterContext(e){let t=s.useContext(j);return!t&&invariant(!1),t}function useDataRouterState(e){let t=s.useContext(M);return!t&&invariant(!1),t}function useRouteContext(e){let t=s.useContext(F);return!t&&invariant(!1),t}function useCurrentRouteId(e){let t=useRouteContext(e),n=t.matches[t.matches.length-1];return!n.route.id&&invariant(!1),n.route.id}function useRouteError(){let e=s.useContext(I),t=useDataRouterState(B.UseRouteError),n=useCurrentRouteId(B.UseRouteError);return e===void 0?t.errors?.[n]:e}function useNavigateStable(){let{router:e}=useDataRouterContext(z.UseNavigateStable),t=useCurrentRouteId(B.UseNavigateStable),n=s.useRef(!1);return useIsomorphicLayoutEffect(()=>{n.current=!0}),s.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,_extends({fromRouteId:t},i)))},[e,t])}var V={};function warningOnce(e,t,n){!t&&!V[e]&&(V[e]=!0)}var logDeprecation=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0);function logV6DeprecationWarnings(e,t){e?.v7_startTransition===void 0&&logDeprecation(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&logDeprecation(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&logDeprecation(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&logDeprecation(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&logDeprecation(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&logDeprecation(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}function Navigate(e){let{to:t,replace:n,state:r,relative:i}=e;!useInRouterContext()&&invariant(!1);let{future:a,static:o}=s.useContext(N),{matches:c}=s.useContext(F),{pathname:l}=useLocation(),u=useNavigate(),d=resolveTo(t,getResolveToMatches(c,a.v7_relativeSplatPath),l,i===`path`),f=JSON.stringify(d);return s.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:i}),[u,f,i,n,r]),null}function Outlet(e){return useOutlet(e.context)}function Router(e){let{basename:t=`/`,children:n=null,location:r,navigationType:i=c.Pop,navigator:a,static:o=!1,future:l}=e;useInRouterContext()&&invariant(!1);let u=t.replace(/^\/*/,`/`),d=s.useMemo(()=>({basename:u,navigator:a,static:o,future:_extends({v7_relativeSplatPath:!1},l)}),[u,l,a,o]);typeof r==`string`&&(r=parsePath(r));let{pathname:f=`/`,search:p=``,hash:m=``,state:h=null,key:g=`default`}=r,_=s.useMemo(()=>{let e=stripBasename(f,u);return e==null?null:{location:{pathname:e,search:p,hash:m,state:h,key:g},navigationType:i}},[u,f,p,m,h,g,i]);return _==null?null:s.createElement(N.Provider,{value:d},s.createElement(P.Provider,{children:n,value:_}))}
2var H=function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}(H||{});new Promise(()=>{}),s.Component;function mapRouteProperties(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:s.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:s.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:s.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}var U=i(),W=/<([a-zA-Z0-9]+)>([\s\S]*?)<\/\1>|<([a-zA-Z0-9]+)\/>/,G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0};function formatElements(e,t={}){let n=e.split(W);if(n.length===1)return e;let r=makeCounter(0,`$lingui$`),i=[],a=n.shift();a&&i.push(a);for(let[e,a,o]of getElements(n)){let n=e===void 0?void 0:t[e];(!n||G[n.type]&&a)&&(console.error(n?`${n.type} is a void element tag therefore it must have no children`:`Can't use element at index '${e}' as it is not declared in the original translation`),n=(0,U.jsx)(U.Fragment,{})),Array.isArray(n)&&(n=(0,U.jsx)(U.Fragment,{children:n})),i.push((0,s.cloneElement)(n,{key:r()},a?formatElements(a,t):n.props.children)),o&&i.push(o)}return i.length===1?i[0]:i}function getElements(e){if(!e.length)return[];let[t,n,r,i]=e.slice(0,4);return[[t||r,n||``,i]].concat(getElements(e.slice(4,e.length)))}var makeCounter=(e=0,t=``)=>()=>`${t}_${e++}`;function TransNoContext(e){let{render:t,component:n,id:r,message:i,formats:a,lingui:{i18n:o,defaultComponent:s}}=e,{values:c,components:l}=getInterpolationValuesAndComponents(e),u=o&&typeof o._==`function`?o._(r,c,{message:i,formats:a}):r,d=u?formatElements(u,l):null;if(t===null||n===null)return d;let f=s||RenderChildren,p={id:r,message:i,translation:d,children:d};if(t&&n)console.error("You can't use both `component` and `render` prop at the same time. `component` is ignored.");else if(t&&typeof t!=`function`)console.error(`Invalid value supplied to prop \`render\`. It must be a function, provided ${t}`);else if(n&&typeof n!=`function`)return console.error(`Invalid value supplied to prop \`component\`. It must be a React component, provided ${n}`),(0,U.jsx)(f,{...p,children:d});return typeof t==`function`?t(p):(0,U.jsx)(n||f,{...p,children:d})}var RenderChildren=({children:e})=>e,getInterpolationValuesAndComponents=e=>{if(!e.values)return{values:void 0,components:e.components};let t={...e.values},n={...e.components};return Object.entries(e.values).forEach(([e,r])=>{if(typeof r==`string`||typeof r==`number`)return;let i=Object.keys(n).length;n[i]=(0,U.jsx)(U.Fragment,{children:r}),t[e]=`<${i}/>`}),{values:t,components:n}},K=(0,s.createContext)(null),useLinguiInternal=e=>(0,s.useContext)(K);function useLingui(){return useLinguiInternal()}var I18nProvider=({i18n:e,defaultComponent:t,children:n})=>{let r=(0,s.useRef)(e.locale),i=(0,s.useCallback)(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[a,o]=(0,s.useState)(i());return(0,s.useEffect)(()=>{let updateContext=()=>{r.current=e.locale,o(i())},t=e.on(`change`,updateContext);return r.current!==e.locale&&updateContext(),t},[e,i]),r.current?(0,U.jsx)(K.Provider,{value:a,children:n}):null};function Trans(e){let t=useLinguiInternal(void 0);return(0,U.jsx)(TransNoContext,{...e,lingui:t})}export{i as A,createPath as C,y as D,matchPath as E,stripBasename as O,createBrowserHistory as S,generatePath as T,useResolvedPath as _,M as a,useRoutesImpl as b,Outlet as c,mapRouteProperties as d,useHref as f,useParams as g,useNavigate as h,j as i,o as k,Router as l,useMatch as m,Trans as n,Navigate as o,useLocation as p,useLingui as r,N as s,I18nProvider as t,logV6DeprecationWarnings as u,useRouteError as v,createRouter as w,ErrorResponseImpl as x,useRoutes as y};
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.