1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dc05c5a6-fa9c-5caf-871a-4cbd8f3d2b97")}catch(e){}}(); 3(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`25c8561407dd244f755cdf86f82d232b3ffe81b9`}}catch{}})();import{r as e}from"./rolldown-runtime-DS5tZbRp.js";import{n as t}from"./jsx-runtime-mW4NJb5c.js";var n=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,r=/^[\\/]{2}/;function i(e,t){return t+e.replace(/\\/g,`/`)}var a=`popstate`;function o(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function s(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return f(``,{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:p(t)}return h(t,n,null,e)}function c(e,t){if(e===!1||e==null)throw Error(t)}function l(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function u(){return Math.random().toString(36).substring(2,10)}function d(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 f(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?m(t):t,state:n,key:t&&t.key||r||u(),mask:i}}function p({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 m(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 h(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,c=i.history,l=`POP`,u=null,p=m();p??(p=0,c.replaceState({...c.state,idx:p},``));function m(){return(c.state||{idx:null}).idx}function h(){l=`POP`;let e=m(),t=e==null?null:e-p;p=e,u&&u({action:l,location:b.location,delta:t})}function _(e,t){l=`PUSH`;let r=o(e)?e:f(b.location,e,t);n&&n(r,e),p=m()+1;let a=d(r,p),h=b.createHref(r.mask||r);try{c.pushState(a,``,h)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(h)}s&&u&&u({action:l,location:b.location,delta:1})}function v(e,t){l=`REPLACE`;let r=o(e)?e:f(b.location,e,t);n&&n(r,e),p=m();let i=d(r,p),a=b.createHref(r.mask||r);c.replaceState(i,``,a),s&&u&&u({action:l,location:b.location,delta:0})}function y(e){return g(i,e)}let b={get action(){return l},get location(){return e(i,c)},listen(e){if(u)throw Error(`A history only accepts one active listener`);return i.addEventListener(a,h),u=e,()=>{i.removeEventListener(a,h),u=null}},createHref(e){return t(i,e)},createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:_,replace:v,go(e){return c.go(e)}};return b}function g(e,t,n=!1){let i=`http://localhost`;e&&(i=e.location.origin===`null`?e.location.href:e.location.origin),c(i,`No window.location.(origin|href) available to create URL`);let a=typeof t==`string`?t:p(t);return a=a.replace(/ $/,`%20`),!n&&r.test(a)&&(a=i+a),new URL(a,i)}var _=e(t(),1),v=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)}},y=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function b(e){return y.has(e)}var x=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function S(e){return x.has(e)}function C(e){return e.index===!0}function w(e){let t={};return e.Component&&Object.assign(t,{element:_.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:_.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:_.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function T(e,t=w,n=[],r={},i=!1){return e.map((e,a)=>
3{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(c(e.index!==!0||!e.children,`Cannot specify children on an index route`),c(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),C(e)){let n={...e,id:s};return r[s]=E(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=E(n,t(n)),e.children&&(n.children=T(e.children,t,o,r,i)),n}})}function E(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function D(e,t,n=`/`){return O(e,t,n,!1)}function O(e,t,n,r,i){let a=z((typeof t==`string`?m(t):t).pathname||`/`,n);if(a==null)return null;let o=i??A(e),s=null,c=ue(a);for(let e=0;s==null&&e<o.length;++e)s=se(o[e],c,r);return s}function k(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 A(e){let t=j(e);return N(t),t}function j(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let l={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(l.relativePath.startsWith(`/`)){if(!l.relativePath.startsWith(r)&&o)return;c(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let u=U([r,l.relativePath]),d=n.concat(l);e.children&&e.children.length>0&&(c(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),j(e.children,t,d,u,o)),!(e.path==null&&!e.index)&&t.push({path:u,score:oe(u,e.index),routesMeta:d.map((e,t)=>{let[n,r]=R(e.relativePath,e.caseSensitive,t===d.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 M(e.path))a(e,t,!0,n)}),t}function M(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=M(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 N(e){e.sort((e,t)=>e.score===t.score?L(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var P=/^:[\w-]+$/,F=/^:[\w-]+/,ee=3.5,I=3,te=2,ne=1,re=10,ie=-2,ae=e=>e===`*`;function oe(e,t){let n=e.split(`/`),r=n.length;return n.some(ae)&&(r+=ie),t&&(r+=te),n.filter(e=>!ae(e)).reduce((e,t)=>e+(P.test(t)?I:F.test(t)?ee:t===``?ne:re),r)}function L(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 se(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?le(u,l,s.matcher,s.compiledParams):ce(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=ce({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
3Object.assign(i,d.params),o.push({params:i,pathname:U([a,d.pathname]),pathnameBase:ve(U([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=U([a,d.pathnameBase]))}return o}function ce(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=R(e.path,e.caseSensitive,e.end);return le(e,t,n,r)}function le(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 n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function R(e,t=!1,n=!0){l(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 ue(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return l(!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 z(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 B({basename:e,pathname:t}){return t===`/`?e:U([e,t])}var de=e=>n.test(e);function V(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?m(e):e,a;return n?(n=ge(n),a=n.startsWith(`/`)?H(n.substring(1),`/`):H(n,t)):a=t,{pathname:a,search:ye(r),hash:be(i)}}function H(e,t){let n=_e(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function fe(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 pe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function me(e){let t=pe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function he(e,t,n,r=!1){let i;typeof e==`string`?i=m(e):(i={...e},c(!i.pathname||!i.pathname.includes(`?`),fe(`?`,`pathname`,`search`,i)),c(!i.pathname||!i.pathname.includes(`#`),fe(`#`,`pathname`,`hash`,i)),c(!i.search||!i.search.includes(`#`),fe(`#`,`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 l=V(i,s),u=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!l.pathname.endsWith(`/`)&&(u||d)&&(l.pathname+=`/`),l}var ge=e=>e.replace(/[\\/]{2,}/g,`/`),U=e=>ge(e.join(`/`)),_e=e=>e.replace(/\/+$/,``),ve=e=>_e(e).replace(/^\/*/,`/`),ye=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,be=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,xe=class{type=`DataWithResponseInit`;data;init;constructor(e,t){this.data=e,this.init=t||null}};function Se(e,t){return new xe(e,typeof t==`number`?{status:t}:t)}var Ce=(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})},we=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Te=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 Ee(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function De(e){return U(e.map(e=>
3e.route.path).filter(Boolean))||`/`}function Oe(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?m(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 ke=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ae(e,t){let a=e;if(typeof a!=`string`||!n.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let o=a,s=!1;if(ke)try{let e=new URL(window.location.href),n=r.test(a)?new URL(i(a,e.protocol)):new URL(a),o=z(n.pathname,t);n.origin===e.origin&&o!=null?a=o+n.search+n.hash:s=!0}catch{l(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:s,to:a}}var je=Symbol(`Uninstrumented`),Me=new WeakMap;function Ne(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)=>K(await q(n.lazy,void 0,()=>e(...t),J))}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)=>K(await q(n[`lazy.middleware`],void 0,()=>t(...e),J))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>K(await q(n[`lazy.loader`],void 0,()=>t(...e),J))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>K(await q(n[`lazy.action`],void 0,()=>t(...e),J))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=W(t.loader),i=async(...t)=>K(await q(n.loader,Y(t[0]),()=>e(...t),J));e.hydrate===!0&&(i.hydrate=!0),G(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=W(t.action),i=async(...t)=>K(await q(n.action,Y(t[0]),()=>e(...t),J));G(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=W(e),r=async(...e)=>K(await q(n.middleware,Y(e[0]),()=>t(...e),J));return G(r,t),r})),r}function Pe(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=W(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?p(i):`.`,...Le(e,a??{})};return K(await q(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=Fe(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...J(e),meta:o})))};G(r,t),e.navigate=r}if(n.fetch.length>0){let t=W(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return K(await q(n.fetch,{href:o??`.`,fetcherKey:i,...Le(e,s??{})},async()=>{let n=Fe(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...J(e),meta:c})))};G(r,t),e.fetch=r}return e}function W(e){return e[je]??e}function G(e,t){e[je]=t}function Fe(e,t){return Me.set(e,t),()=>{Me.get(e)===t&&Me.delete(e)}}function Ie(e){let t=Me.get(e);return Me.delete(e),t}function K(e){if(e.type===`error`)throw e.value;return e.value}async function q(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,l=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=q(e,t,n,r,i,a-1),await s,c(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(l,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await l(),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 J(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function Y(e){let{request:t,context:n,params:r}=e;return{...e,request:Re(t),params:{...r},context:ze(n)}}function Le(e,t){return{currentUrl:p(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 Re(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function ze(e){return{get:t=>e.get(t)}}var Be=[`POST`,`PUT`,`PATCH`,`DELETE`],Ve=new Set(Be),He=[`GET`,...Be],Ue=new Set(He),We=new Set([301,302,303,307,308]),Ge=new Set([307,308]),Ke={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},qe={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Je={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Ye=`remix-router-transitions`,Xe=Symbol(`ResetLoaderData`),Ze=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=A(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=A(e)}setHmrRoutes(e){this.#n=e,this.#r=A(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function Qe(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;c(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),...Ne(t.map(e=>
3e.route).filter(Boolean),e)})}let o={},s=new Ze(T(e.routes,a,void 0,o)),u=e.basename||`/`;u.startsWith(`/`)||(u=`/${u}`);let d=e.dataStrategy||ht,p={...e.future},h=null,_=new Set,y=null,b=null,x=null,S=null,C=e.hydrationData!=null,w=O(s.activeRoutes,e.history.location,u,!1,s.branches),E=!1,D=null,A,j;if(w==null&&!e.patchRoutesOnNavigation){let t=X(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Rt(s.activeRoutes);A=!0,j=!A,w=n,D={[r.id]:t}}else if(w&&!e.hydrationData&&at(w,s.activeRoutes,e.history.location.pathname).active&&(w=null),!w){A=!1,j=!A,w=[];let t=at(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(E=!0,w=t.matches)}else if(w.some(e=>e.route.lazy))A=!1,j=!A;else if(!w.some(e=>rt(e.route)))A=!0,j=!A;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=w;if(n){let e=w.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}j=!1,A=!0,r.forEach(e=>{let r=it(e.route,t,n);j||=r.renderFallback,A&&=!r.shouldLoad})}let M,N={historyAction:e.history.action,location:e.history.location,matches:w,initialized:A,renderFallback:j,navigation:Ke,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||D,fetchers:new Map,blockers:new Map},P=`POP`,F=null,ee=!1,I,te=!1,ne=new Map,re=null,ie=!1,ae=!1,oe=new Set,L=new Map,se=0,ce=-1,le=new Map,R=new Set,ue=new Map,B=new Map,V=new Set,H=new Map,fe,pe=null;function me(){if(h=e.history.listen(({action:t,location:n,delta:r})=>{if(fe){fe(),fe=void 0;return}l(H.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=Ue({currentLocation:N.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{fe=e});e.history.go(r*-1),He(i,{state:`blocked`,location:n,proceed(){He(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(N.blockers);e.set(i,Je),U({blockers:e})}}),F?.resolve(),F=null;return}return be(t,n)}),n){cn(t,ne);let e=()=>ln(t,ne);t.addEventListener(`pagehide`,e),re=()=>t.removeEventListener(`pagehide`,e)}return N.initialized||be(`POP`,N.location,{initialHydration:!0}),M}function he(){h&&h(),re&&re(),_.clear(),I&&I.abort(),N.fetchers.forEach((e,t)=>q(N.fetchers,t)),N.blockers.forEach((e,t)=>Ve(t))}function ge(e){if(_.add(e),y){let{newErrors:t}=y;y=null,e(N,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>_.delete(e)}function U(e,t={}){e.matches&&=e.matches.map(e=>{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}),N={...N,...e};let n=[],r=[];N.fetchers.forEach((e,t)=>{e.state===`idle`&&(V.has(t)?n.push(t):r.push(t))}),V.forEach(e=>{!N.fetchers.has(e)&&!L.has(e)&&n.push(e)}),_.size===0&&(y={newErrors:e.errors??null}),[..._].forEach(r=>r(N,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>q(N.fetchers,e)),r.forEach(e=>N.fetchers.delete(e))}function _e(t,n,{flushSync:r}={}){let i=N.actionData!=null&&N.navigation.formMethod!=null&&Q(N.navigation.formMethod)&&N.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?N.actionData:null;let o=n.loaderData?Ft(N.loaderData,n.loaderData,n.matches||[],n.errors):N.loaderData,c=N.blockers;c.size>0&&!ie&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Je)));let l=ie?!1:$e(t,n.matches||N.matches),u=ee===!0||N.navigation.formMethod!=null&&Q(N.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ie||P===`POP`||(P===`PUSH`?e.history.push(t,t.state):P===`REPLACE`&&e.history.replace(t,t.state));let d;if(P===`POP`){let e=ne.get(N.location.pathname);e&&e.has(t.pathname)?d={currentLocation:N.location,nextLocation:t}:ne.has(t.pathname)&&(d={currentLocation:t,nextLocation:N.location})}else if(te){let e=ne.get(N.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ne.set(N.location.pathname,e)),d={currentLocation:N.location,nextLocation:t}}U({...n,actionData:a,loaderData:o,historyAction:P,location:t,initialized:!0,renderFallback:!1,navigation:Ke,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),P=`POP`,ee=!1,te=!1,ie=!1,ae=!1,F?.resolve(),F=null,pe?.resolve(),pe=null}async function ve(t,n){if(F?.resolve(),F=null,typeof t==`number`){F||=un();let n=F.promise;return e.history.go(t),n}let r=Ie(M),{path:i,submission:a,error:o}=tt(!1,et(N.location,N.matches,u,t,n?.fromRouteId,n?.relative),n),s;n?.mask&&(s={pathname:``,search:``,hash:``,...typeof n.mask==`string`?m(n.mask):{...N.location.mask,...n.mask}});let c=N.location,l=f(c,i,n&&n.state,void 0,s);l={...l,...e.history.encodeLocation(l)};let d=n&&n.replace!=null?n.replace:void 0,p=`PUSH`;d===!0?p=`REPLACE`:d===!1||a!=null&&Q(a.formMethod)&&a.formAction===N.location.pathname+N.location.search&&(p=`REPLACE`);let h=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,g=(n&&n.flushSync)===!0,_=Ue({currentLocation:c,nextLocation:l,historyAction:p});if(_){He(_,{state:`blocked`,location:l,proceed(){He(_,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),ve(t,n)},reset(){let e=new Map(N.blockers);e.set(_,Je),U({blockers:e})}});return}await be(p,l,{submission:a,pendingError:o,preventScrollReset:h,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:g,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function ye(){pe||=un(),Me(),U({revalidation:`loading`});let e=pe.promise;return N.navigation.state===`submitting`?e:N.navigation.state===`idle`?(be(N.historyAction,N.location,{startUninterruptedRevalidation:!0}
3),e):(be(P||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:te===!0}),e)}async function be(t,n,r){I&&I.abort(),I=null,P=t,ie=(r&&r.startUninterruptedRevalidation)===!0,Qe(N.location,N.matches),ee=(r&&r.preventScrollReset)===!0,te=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&N.matches&&N.matches.length>0&&!E?N.matches:O(i,n,u,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&N.initialized&&!ae&&Vt(N.location,n)&&!(r&&r.submission&&Q(r.submission.formMethod))){_e(n,{matches:a},{flushSync:o});return}let c=at(a,i,n.pathname);if(c.active&&c.matches&&(a=c.matches),r?.instrumentationNavigateMetaReceiver){let t=en(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);_e(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let l=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;I=new AbortController;let d=At(e.history,n,I.signal,r&&r.submission),f=e.getContext?await e.getContext():new v,p;if(r&&r.pendingError)p=[Lt(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Q(r.submission.formMethod)){let i=await xe(d,n,r.submission,a,t,f,c.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)&&Ee(t.error)&&t.error.status===404){I=null,_e(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,l=nn(n,a,t,r.submission),o=!1,c.active=!1,d=At(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:y}=await Se(d,n,a,t,f,c.active,l,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(I=null,_e(n,{matches:h||a,...It(p),loaderData:g,errors:_,...y?{fetchers:y}:{}}))}async function xe(t,n,i,c,l,d,f,p,m={}){if(Me(),U({navigation:rn(n,c,l,i)},{flushSync:m.flushSync===!0}),f){let e=await ot(c,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}=Rt(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Lt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)c=e.matches;else{let{notFoundMatches:e,error:t,route:r}=We(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=$t(c,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 Ae(t,n,xt(a,o,t,n,c,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of c)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Kt(h)){let n;return n=m&&m.replace!=null?m.replace:kt(h.response.headers.get(`Location`),new URL(t.url),u,e.history)===N.location.pathname+N.location.search,await ke(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Z(h)){let e=Lt(c,g.route.id);return(m&&m.replace)!==!0&&(P=`PUSH`),{matches:c,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:c,pendingActionResult:[g.route.id,h]}}async function Se(t,n,i,c,l,d,f,p,m,h,g,_,v,y){let b=f||nn(n,i,c,p),x=p||m||tn(b),S=!ie&&!g;if(d){if(S){let e=Ce(v);U({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ot(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}=Rt(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Lt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=nt(t,l,a,o,e.history,N,i,x,n,g?[]:r,g===!0,ae,oe,V,ue,R,C,u,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ce=++se,!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(N.fetchers),t=Re(e);return _e(n,{matches:i,loaderData:{},errors:v&&Z(v[1])?{[v[0]]:v[1].error}:null,...It(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ce(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=we(T)),U(e,{flushSync:_})}
3T.forEach(e=>{Y(e.key),e.controller&&L.set(e.key,e.controller)});let E=()=>T.forEach(e=>Y(e.key));I&&I.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:O}=await je(w,T,t,n,l);if(t.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener(`abort`,E),T.forEach(e=>L.delete(e.key));let k=zt(D);if(k)return await ke(t,k.result,!0,{replace:h}),{shortCircuited:!0};if(k=zt(O),k)return R.add(k.key),await ke(t,k.result,!0,{replace:h}),{shortCircuited:!0};let A=new Map(N.fetchers),{loaderData:j,errors:M}=Pt(N,i,D,v,T,O,A);g&&N.errors&&(M={...N.errors,...M});let P=Re(A),F=ze(ce,A),ee=P||F||T.length>0;return{matches:i,loaderData:j,errors:M,...ee?{workingFetchers:A}:{}}}function Ce(e){if(e&&!Z(e[1]))return{[e[0]]:e[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function we(e){let t=new Map(N.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=an(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Te(t,n,r,i){Y(t);let a=(i&&i.flushSync)===!0,o=Ie(M),c=s.activeRoutes,l=et(N.location,N.matches,u,r,n,i?.relative),d=O(c,l,u,!1,s.branches),f=at(d,c,l);if(f.active&&f.matches&&(d=f.matches),o&&o(en(e.history,l,d)),!d){G(t,n,X(404,{pathname:l}),{flushSync:a});return}let{path:p,submission:m,error:h}=tt(!0,l,i);if(h){G(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new v,_=(i&&i.preventScrollReset)===!0;if(m&&Q(m.formMethod)){await De(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}ue.set(t,{routeId:n,path:p}),await Oe(t,n,p,d,g,f.active,a,_,m)}async function De(t,n,i,l,d,f,p,m,h,g){Me(),ue.delete(t),W(t,on(h,N.fetchers.get(t)),{flushSync:p});let _=new AbortController,v=At(e.history,i,_.signal,h);if(f){let e=await ot(l,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){G(t,n,e.error,{flushSync:p});return}else if(e.matches)l=e.matches;else{G(t,n,X(404,{pathname:i}),{flushSync:p});return}}let y=$t(l,i);if(!y.route.action&&!y.route.lazy){G(t,n,X(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}L.set(t,_);let b=se,x=xt(a,o,v,i,l,y,r,d),S=await Ae(v,i,x,d,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){L.get(t)===_&&L.delete(t);return}if(V.has(t)){if(Kt(C)||Z(C)){W(t,sn(void 0));return}}else{if(Kt(C))if(L.delete(t),ce>b){W(t,sn(void 0));return}else return R.add(t),W(t,an(h)),ke(v,C,!1,{fetcherSubmission:h,preventScrollReset:m});if(Z(C)){G(t,n,C.error);return}}let w=N.navigation.location||N.location,T=At(e.history,w,_.signal),E=s.activeRoutes,D=N.navigation.state===`idle`?N.matches:O(E,N.navigation.location,u,!1,s.branches);c(D,`Didn't find any matches after fetcher action`);let k=++se;le.set(t,k);let{dsMatches:A,revalidatingFetchers:j}=nt(T,d,a,o,e.history,N,D,h,w,r,!1,ae,oe,V,ue,R,E,u,e.patchRoutesOnNavigation!=null,s.branches,[y.route.id,C],g),M=an(h,C.data),F=new Map(N.fetchers);F.set(t,M),j.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=F.get(t),r=an(void 0,n?n.data:void 0);F.set(t,r),Y(t),e.controller&&L.set(t,e.controller)}),U({fetchers:F});let ee=()=>j.forEach(e=>Y(e.key));_.signal.addEventListener(`abort`,ee);let{loaderResults:te,fetcherResults:ne}=await je(A,j,T,w,d);if(_.signal.aborted)return;_.signal.removeEventListener(`abort`,ee),le.delete(t),L.delete(t),j.forEach(e=>L.delete(e.key));let re=N.fetchers.has(t),ie=e=>{if(!re)return e;let n=new Map(e.fetchers);return n.set(t,sn(C.data)),{...e,fetchers:n}},z=zt(te);if(z)return N=ie(N),ke(T,z.result,!1,{preventScrollReset:m});if(z=zt(ne),z)return R.add(z.key),N=ie(N),ke(T,z.result,!1,{preventScrollReset:m});let B=new Map(N.fetchers);re&&B.set(t,sn(C.data));let{loaderData:de,errors:H}=Pt(N,D,te,void 0,j,ne,B);ze(k,B),N.navigation.state===`loading`&&k>ce?(c(P,`Expected pending action`),I&&I.abort(),_e(N.navigation.location,{matches:D,loaderData:de,errors:H,fetchers:B})):(U({errors:H,loaderData:Ft(N.loaderData,de,D,H),fetchers:B}),ae=!1)}async function Oe(t,n,i,s,c,l,u,d,f){let p=N.fetchers.get(t);W(t,an(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=At(e.history,i,m.signal);if(l){let e=await ot(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){G(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{G(t,n,X(404,{pathname:i}),{flushSync:u});return}}let g=$t(s,i);L.set(t,m);let _=se,v=await Ae(h,i,xt(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(L.get(t)===m&&L.delete(t),!h.signal.aborted){if(V.has(t)){W(t,sn(void 0));return}if(Kt(y))if(ce>_){W(t,sn(void 0));return}else{R.add(t),await ke(h,y,!1,{preventScrollReset:d});return}if(Z(y)){G(t,n,y.error);return}W(t,sn(y.data))}}async function ke(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:d}={}){a||(F?.resolve(),F=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ae=!0);let p=i.response.headers.get(`Location`);c(p,`Expected a Location header on the redirect Response`),p=kt(p,new URL(r.url),u,e.history);let m=f(N.location,p,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(de(p)){let n=g(t,p,!0);e=n.origin!==t.location.origin||z(n.pathname,u)==null}if(e){d?t.location.replace(p):t.location.assign(p);return}}I=null;let h=d===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:_,formAction:v,formEncType:y}=N.navigation;!o&&!s&&_&&v&&y&&(o=tn(N.navigation));let b=o||s;Ge.has(i.response.status)&&b&&Q(b.formMethod)?await be(h,m,{submission:{...b,formAction:p},preventScrollReset:l||ee,enableViewTransition:a?te:void 0}):await be(h,m,{overrideNavigation:nn(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||ee,enableViewTransition:a?te:void 0})}async function Ae(e,t,n,r,i){let a,o={};try{a=await St(d,e,t,n,i,r,!1)}catch(e){return n.filter(e=>
3e.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)&&!N.loaderData.hasOwnProperty(e.route.id)&&(!N.errors||!N.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(Gt(r)){let i=r.result;o[t]={type:`redirect`,response:Et(i,e,t,n,u)}}else o[t]=await Tt(r);return o}async function je(e,t,n,r,i){let a=Ae(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ae(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else 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 Me(){ae=!0,ue.forEach((e,t)=>{L.has(t)&&oe.add(t),Y(t)})}function W(e,t,n={}){let r=new Map(N.fetchers);r.set(e,t),U({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function G(e,t,n,r={}){let i=Lt(N.matches,t),a=new Map(N.fetchers);q(a,e),U({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Fe(e){return B.set(e,(B.get(e)||0)+1),V.has(e)&&V.delete(e),N.fetchers.get(e)||qe}function K(e,t){Y(e,t?.reason),W(e,sn(null))}function q(e,t){let n=N.fetchers.get(t);L.has(t)&&!(n&&n.state===`loading`&&le.has(t))&&Y(t),ue.delete(t),le.delete(t),R.delete(t),V.delete(t),oe.delete(t),e.delete(t)}function J(e){let t=(B.get(e)||0)-1;t<=0?(B.delete(e),V.add(e)):B.set(e,t),U({fetchers:new Map(N.fetchers)})}function Y(e,t){let n=L.get(e);n&&(n.abort(t),L.delete(e))}function Le(e,t){for(let n of e){let e=t.get(n);c(e,`Expected fetcher: ${n}`);let r=sn(e.data);t.set(n,r)}}function Re(e){let t=[],n=!1;for(let r of R){let i=e.get(r);c(i,`Expected fetcher: ${r}`),i.state===`loading`&&(R.delete(r),t.push(r),n=!0)}return Le(t,e),n}function ze(e,t){let n=[];for(let[r,i]of le)if(i<e){let e=t.get(r);c(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Y(r),le.delete(r),n.push(r))}return Le(n,t),n.length>0}function Be(e,t){let n=N.blockers.get(e)||Je;return H.get(e)!==t&&H.set(e,t),n}function Ve(e){N.blockers.delete(e),H.delete(e)}function He(e,t){let n=N.blockers.get(e)||Je;c(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(N.blockers);r.set(e,t),U({blockers:r})}function Ue({currentLocation:e,nextLocation:t,historyAction:n}){if(H.size===0)return;H.size>1&&l(!1,`A router only supports one blocker at a time`);let r=Array.from(H.entries()),[i,a]=r[r.length-1],o=N.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function We(e){let t=X(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Rt(n);return{notFoundMatches:r,route:i,error:t}}function Ye(e,t,n){if(b=e,S=t,x=n||null,!C&&N.navigation===Ke){C=!0;let e=$e(N.location,N.matches);e!=null&&U({restoreScrollPosition:e})}return()=>{b=null,S=null,x=null}}function Xe(e,t){return x&&x(e,t.map(e=>k(e,N.loaderData)))||e.key}function Qe(e,t){if(b&&S){let n=Xe(e,t);b[n]=S()}}function $e(e,t){if(b){let n=Xe(e,t),r=b[n];if(typeof r==`number`)return r}return null}function at(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:O(n,r,u,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:O(n,r,u,!0,e)}}return{active:!1,matches:null}}async function ot(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let c=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:c,fetcherKey:i,patch:(e,n)=>{r.aborted||ct(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:c}}if(r.aborted)return{type:`aborted`};let l=s.branches,d=O(s.activeRoutes,n,u,!1,l),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=O(s.activeRoutes,n,u,!0,l),!(f&&c.length<f.length&&st(c,f.slice(0,c.length))))))return{type:`success`,matches:d};if(f||=O(s.activeRoutes,n,u,!0,l),!f||st(c,f))return{type:`success`,matches:null};c=f}}function st(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function lt(e){o={},s.setHmrRoutes(T(e,a,void 0,o))}function ut(e,t,n=!1){ct(e,t,s,o,a,n),s.hasHMRRoutes||U({})}return M={get basename(){return u},get future(){return p},get state(){return N},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:me,subscribe:ge,enableScrollRestoration:Ye,navigate:ve,fetch:Te,revalidate:ye,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Fe,resetFetcher:K,deleteFetcher:J,dispose:he,getBlocker:Be,deleteBlocker:Ve,patchRoutes:ut,_internalFetchControllers:L,_internalSetRoutes:lt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){U(e)}},e.instrumentations&&(M=Pe(M,e.instrumentations.map(e=>
3e.router).filter(Boolean))),M}function $e(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function et(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=he(r||`.`,me(o),z(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Qt(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=B({basename:n,pathname:c.pathname})),p(c)}function tt(e,t,n){if(!n||!$e(n))return{path:t};if(n.formMethod&&!Zt(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=Bt(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}}}else 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()}}}c(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=jt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=jt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Mt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Mt(o)}catch{return r()}let l={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Q(l.formMethod))return{path:t,submission:l};let u=m(t);return e&&u.search&&Qt(u.search)&&o.append(`index`,``),u.search=`?${o}`,{path:p(u),submission:l}}function nt(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,k={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},A=De(o),j=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(!rt(s))f=!1;else if(u){let{shouldLoad:e}=it(s,a.loaderData,a.errors);f=e}else at(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return bt(n,r,e,c,A,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?ot(a.matches[o],i)&&(p=!0):p=!0;let m={...k,defaultShouldRevalidate:p};return bt(n,r,e,c,A,i,l,t,st(i,m),m,x)}),M=[];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=O(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;M.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=$t(b,e.path),C=new AbortController,w=At(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=xt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=xt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:D?!1:d;let a={...k,defaultShouldRevalidate:i};st(S,a)&&(T=xt(n,r,w,e.path,b,S,l,t,a))}T&&M.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:j,revalidatingFetchers:M}}function rt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function it(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!rt(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 at(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function ot(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function st(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function ct(e,t,n,r,i,a){let o;if(e){let t=r[e];c(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],l=[];
3if(t.forEach(e=>{let t=o.find(t=>lt(e,t));t?l.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=T(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&l.length>0)for(let e=0;e<l.length;e++){let{existingRoute:t,newRoute:n}=l[e],r=t,[a]=T([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 lt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>lt(e,t)))??!1:!1}var ut=new WeakMap,dt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(c(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=ut.get(i);o||(o={},ut.set(i,o));let s=o[e];if(s)return s;let u=(async()=>{let t=b(e),n=i[e]!==void 0;if(t)l(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)l(!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]=u,u},ft=new WeakMap;function pt(e,t,n,r,i){let a=n[e.id];if(c(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=ft.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{c(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=S(e),o=a[e]!==void 0;i?l(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?l(!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 ft.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],u;for(let a of o){if(i&&i.includes(a))continue;let o=dt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(u=o))}let d=s.length>0?Promise.all(s).then(()=>{}):void 0;return d?.catch(()=>{}),u?.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:u}}async function mt(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 ht(e){return e.matches.some(e=>e.route.middleware)?gt(e,()=>mt(e)):mt(e)}function gt(e,t){return _t(e,t,e=>{if(Xt(e))throw e;return e},Ut,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{[Lt(r,a).route.id]:{type:`error`,result:t}}}}}async function _t(e,t,n,r,i){let{matches:a,...o}=e;return await vt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function vt(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 vt(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 yt(e,t,n,r,i){let a=dt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=pt(r.route,Q(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function bt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=yt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?st(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?st(a,{...l,defaultShouldRevalidate:e}):st(a,l):c}
3,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)?Ct({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 xt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?bt(e,t,n,r,De(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:yt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function St(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:Oe(t,n),pattern:De(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 gt(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 Ct({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:Oe(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 wt(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 Tt(e){let{result:t,type:n}=e;if(Jt(t)){let e;try{e=await wt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Te(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?qt(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:Ht(t),statusCode:Ee(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ee(t)?t.status:void 0}:qt(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 Et(e,t,n,r,i){let a=e.headers.get(`Location`);if(c(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!de(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=et(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Dt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ot(e){try{return Dt.includes(new URL(e).protocol)}catch{return!1}}function kt(e,t,n,a){if(de(e)){let a=e,o=r.test(a)?new URL(i(a,t.protocol)):new URL(a);if(Ot(o.toString()))throw Error(`Invalid redirect location`);let s=z(o.pathname,n)!=null;if(o.origin===t.origin&&s)return ge(o.pathname)+o.search+o.hash}try{if(Ot(a.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function At(e,t,n,r){let i=e.createURL(Bt(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)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=jt(r.formData):a.body=r.formData}
3return new Request(i,a)}function jt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Mt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Nt(e,t,n,r=!1,i=!1){let a={},o=null,s,l=!1,u={},d=n&&Z(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let f=n.route.id,p=t[f];if(c(!Kt(p),`Cannot handle redirect results in processLoaderData`),Z(p)){let t=p.error;if(d!==void 0&&(t=d,d=void 0),o||={},i)o[f]=t;else{let n=Lt(e,f);o[n.route.id]??(o[n.route.id]=t)}r||(a[f]=Xe),l||(l=!0,s=Ee(p.error)?p.error.status:500),p.headers&&(u[f]=p.headers)}else a[f]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(s=p.statusCode),p.headers&&(u[f]=p.headers)}),d!==void 0&&n&&(o={[n[0]]:d},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:u}}function Pt(e,t,n,r,i,a,o){let{loaderData:s,errors:l}=Nt(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(c(s,`Did not find corresponding fetcher result`),Z(s)){let t=Lt(e.matches,r?.route.id);l&&l[t.route.id]||(l={...l,[t.route.id]:s.error}),o.delete(n)}else if(Kt(s))c(!1,`Unhandled fetcher revalidation redirect`);else{let e=sn(s.data);o.set(n,e)}}),{loaderData:s,errors:l}}function Ft(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Xe).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 It(e){return e?Z(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Lt(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 Rt(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 Te(e||500,o,Error(s),!0)}function zt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Kt(r))return{key:n,result:r}}}function Bt(e){return p({...typeof e==`string`?m(e):e,hash:``})}function Vt(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Ht(e){return new Te(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Ut(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Wt(t))}function Wt(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Gt(e){return Jt(e.result)&&We.has(e.result.status)}function Z(e){return e.type===`error`}function Kt(e){return(e&&e.type)===`redirect`}function qt(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Jt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Yt(e){return We.has(e)}function Xt(e){return Jt(e)&&Yt(e.status)&&e.headers.has(`Location`)}function Zt(e){return Ue.has(e.toUpperCase())}function Q(e){return Ve.has(e.toUpperCase())}function Qt(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function $t(e,t){let n=typeof t==`string`?m(t).search:t.search;if(e[e.length-1].route.index&&Qt(n||``))return e[e.length-1];let r=pe(e);return r[r.length-1]}
3function en(e,t,n){return{url:Oe(e.createURL(t),t),pattern:n?De(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function tn(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 nn(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 rn(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 an(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 on(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 sn(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 cn(e,t){try{let n=e.sessionStorage.getItem(Ye);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 ln(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ye,JSON.stringify(n))}catch(e){l(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function un(){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 dn=_.createContext(null);dn.displayName=`DataRouter`;var fn=_.createContext(null);fn.displayName=`DataRouterState`;var pn=_.createContext(!1);function mn(){return _.useContext(pn)}var hn=_.createContext({isTransitioning:!1});hn.displayName=`ViewTransition`;var gn=_.createContext(new Map);gn.displayName=`Fetchers`;var _n=_.createContext(null);_n.displayName=`Await`;var vn=_.createContext(null);vn.displayName=`Navigation`;var yn=_.createContext(null);yn.displayName=`Location`;var $=_.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName=`Route`;var bn=_.createContext(null);bn.displayName=`RouteError`;var xn=`REACT_ROUTER_ERROR`,Sn=`REDIRECT`,Cn=`ROUTE_ERROR_RESPONSE`;function wn(e){if(e.startsWith(`${xn}:${Sn}:{`))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 Tn(e){if(e.startsWith(`${xn}:${Cn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Te(t.status,t.statusText,t.data)}catch{}}function En(e,{relative:t}={}){c(Dn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(vn),{hash:i,pathname:a,search:o}=In(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:U([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Dn(){return _.useContext(yn)!=null}function On(){return c(Dn(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(yn).location}function kn(e){c(Dn(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=On();return _.useMemo(()=>ce(e,ue(t)),[t,e])}var An=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function jn(){let{isDataRoute:e}=_.useContext($);return e?ar():Mn()}function Mn(){c(Dn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(dn),{basename:t,navigator:n}
3=_.useContext(vn),{matches:r}=_.useContext($),{pathname:i}=On(),a=JSON.stringify(me(r)),o=_.useRef(!1);return _.useLayoutEffect(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(l(o.current,An),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=he(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:U([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Nn=_.createContext(null);function Pn(e){let t=_.useContext($).outlet;return _.useMemo(()=>t&&_.createElement(Nn.Provider,{value:e},t),[t,e])}function Fn(){let{matches:e}=_.useContext($);return e[e.length-1]?.params??{}}function In(e,{relative:t}={}){let{matches:n}=_.useContext($),{pathname:r}=On(),i=JSON.stringify(me(n));return _.useMemo(()=>he(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Ln(e,t,n){c(Dn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(vn),{matches:i}=_.useContext($),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let l=On(),u;if(t){let e=typeof t==`string`?m(t):t;c(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.`),u=e}else u=l;let d=u.pathname||`/`,f=d;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):D(e,{pathname:f}),h=Wn(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:U([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:U([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(yn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...u},navigationType:`POP`}},h):h}function Rn(){let e=rr(),t=Ee(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return _.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var zn=_.createElement(Rn,null),Bn=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=pn;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=Tn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement($.Provider,{value:this.props.routeContext},_.createElement(bn.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(Hn,{error:e},t):t}},Vn=new WeakMap;function Hn({children:e,error:t}){let{basename:n}=_.useContext(vn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=wn(t.digest);if(e){let r=Vn.get(t);if(r)throw r;let i=Ae(e.location,n),a=i.absoluteURL||i.to;if(Ot(a))throw Error(`Invalid redirect location`);if(ke&&!Vn.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 Vn.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Un({routeContext:e,match:t,children:n}){let r=_.useContext(dn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement($.Provider,{value:e},n)}function Wn(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);c(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}
3=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 l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:De(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let l,d=!1,f=null,p=null;r&&(l=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||zn,o&&(s<0&&c===0?(sr(`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=l?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(Un,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(Bn,{location:r.location,revalidation:r.revalidation,component:f,error:l,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):h()},null)}function Gn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kn(e){let t=_.useContext(dn);return c(t,Gn(e)),t}function qn(e){let t=_.useContext(fn);return c(t,Gn(e)),t}function Jn(e){let t=_.useContext($);return c(t,Gn(e)),t}function Yn(e){let t=Jn(e),n=t.matches[t.matches.length-1];return c(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Xn(){return Yn(`useRouteId`)}function Zn(){let e=qn(`useNavigation`);return _.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Qn(){let e=Kn(`useRevalidator`),t=qn(`useRevalidator`),n=_.useCallback(async()=>{await e.router.revalidate()},[e.router]);return _.useMemo(()=>({revalidate:n,state:t.revalidation}),[n,t.revalidation])}function $n(){let{matches:e,loaderData:t}=qn(`useMatches`);return _.useMemo(()=>e.map(e=>k(e,t)),[e,t])}function er(){let e=qn(`useLoaderData`),t=Yn(`useLoaderData`);return e.loaderData[t]}function tr(e){return qn(`useRouteLoaderData`).loaderData[e]}function nr(){let e=qn(`useActionData`),t=Yn(`useLoaderData`);return e.actionData?e.actionData[t]:void 0}function rr(){let e=_.useContext(bn),t=qn(`useRouteError`),n=Yn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ir(){return _.useContext(_n)?._data}function ar(){let{router:e}=Kn(`useNavigate`),t=Yn(`useNavigate`),n=_.useRef(!1);return _.useLayoutEffect(()=>{n.current=!0}),_.useCallback(async(r,i={})=>
3{l(n.current,An),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var or={};function sr(e,t,n){!t&&!or[e]&&(or[e]=!0,l(!1,n))}var cr={};function lr(e,t){!e&&!cr[t]&&(cr[t]=!0,console.warn(t))}var ur=[`HydrateFallback`,`hydrateFallbackElement`],dr=class{status=`pending`;promise;resolve;reject;constructor(){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 fr({router:e,flushSync:t,onError:n,useTransitions:r}){r=mn()||r;let[i,a]=_.useState(e.state),[o,s]=(0,_.useOptimistic)(i),[c,l]=_.useState(),[u,d]=_.useState({isTransitioning:!1}),[f,p]=_.useState(),[m,h]=_.useState(),[g,v]=_.useState(),y=_.useRef(new Map),b=_.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:De(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),lr(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 b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(lr(g==null||b,"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||!b){t&&u?t(()=>a(i)):r===!1?a(i):_.startTransition(()=>{r===!0&&s(e=>pr(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(),v({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]);_.useLayoutEffect(()=>e.subscribe(b),[e,b]),_.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new dr)},[u]),_.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):_.startTransition(()=>{r===!0&&s(e=>pr(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]),_.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),_.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),v(void 0))},[u.isTransitioning,g]);let x=_.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]),S=e.basename||`/`,C=_.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return _.createElement(_.Fragment,null,_.createElement(dn.Provider,{value:C},_.createElement(fn.Provider,{value:o},_.createElement(gn.Provider,{value:y.current},_.createElement(hn.Provider,{value:u},_.createElement(_r,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,useTransitions:r},_.createElement(mr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function pr(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 mr=_.memo(hr);function hr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ln(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function gr(e){return Pn(e.context)}function _r({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){c(!Dn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),u=_.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=m(n));let{pathname:d=`/`,search:f=``,hash:p=``,state:h=null,key:g=`default`,mask:v}=n,y=_.useMemo(()=>{let e=z(d,s);return e==null?null:{location:{pathname:e,search:f,hash:p,state:h,key:g,mask:v},navigationType:r}},[s,d,f,p,h,g,r,v]);
3return l(y!=null,`<Router basename="${s}"> is not able to match the URL "${d}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:_.createElement(vn.Provider,{value:u},_.createElement(yn.Provider,{children:t,value:y}))}function vr({children:e,errorElement:t,resolve:n}){let r=_.useContext(dn),i=_.useContext(fn),a=_.useCallback((e,t)=>{r&&r.onError&&i&&r.onError(e,{location:i.location,params:i.matches[0]?.params||{},pattern:De(i.matches),errorInfo:t})},[r,i]);return _.createElement(yr,{resolve:n,errorElement:t,onError:a},_.createElement(br,null,e))}var yr=class extends _.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`<Await> caught the following error during render`,e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,i=0;if(!(n instanceof Promise))i=1,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});else if(this.state.error){i=2;let e=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?(r=n,i=`_error`in r?2:+(`_data`in r)):(i=0,Object.defineProperty(n,"_tracked",{get:()=>!0}),r=n.then(e=>Object.defineProperty(n,"_data",{get:()=>e}),e=>{this.props.onError?.(e),Object.defineProperty(n,"_error",{get:()=>e})}));if(i===2&&!t)throw r._error;if(i===2)return _.createElement(_n.Provider,{value:r,children:t});if(i===1)return _.createElement(_n.Provider,{value:r,children:e});throw r}};function br({children:e}){let t=ir(),n=typeof e==`function`?e(t):e;return _.createElement(_.Fragment,null,n)}function xr(){return{params:Fn(),loaderData:er(),actionData:nr(),matches:$n()}}function Sr(e){return function(){let t=xr();return _.createElement(e,t)}}function Cr(){return{params:Fn(),loaderData:er(),actionData:nr(),error:rr()}}function wr(e){return function(){let t=Cr();return _.createElement(e,t)}}export{qe as A,U as B,dn as C,$ as D,vn as E,we as F,Ce as G,D as H,R as I,s as J,he as K,Se as L,qt as M,Jt as N,hn as O,Te as P,n as Q,w as R,tr as S,gn as T,O as U,ce as V,Ae as W,c as X,p as Y,l as Z,Fn as _,ur as a,rr as b,lr as c,er as d,On as f,Zn as g,jn as h,fr as i,Qe as j,mn as k,nr as l,$n as m,gr as n,Sr as o,kn as p,z as q,_r as r,wr as s,vr as t,En as u,In as v,fn as w,Xn as x,Qn as y,Ee as z}; 4//# debugId=dc05c5a6-fa9c-5caf-871a-4cbd8f3d2b97
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.