with a null value by default resulting in an "empty" page.`));let E=function(e,t=[],n=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,o=n?.errors;if(null!=o){let e=a.findIndex((e=>e.route.id&&void 0!==o?.[e.route.id]));i(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,u=-1;if(n)for(let e=0;e=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight(((e,i,s)=>{let c,h=!1,p=null,d=null;n&&(c=o&&i.route.id?o[i.route.id]:void 0,p=i.route.errorElement||ee,l&&(u<0&&0===s?(ie("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,d=null):u===s&&(h=!0,d=i.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,s+1)),f=()=>{let t;return t=c?p:h?d:i.route.Component?r.createElement(i.route.Component,null):i.route.element?i.route.element:e,r.createElement(ne,{match:i,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===s)?r.createElement(te,{location:n.location,revalidation:n.revalidation,component:p,error:c,children:f(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):f()}),null)}(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:T([f,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:T([f,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,n,a);return t&&E?r.createElement(_.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},E):E}function Q(){let e=function(){let e=r.useContext(I),t=function(e){let t=r.useContext(W);return i(t,re(e)),t}("useRouteError"),n=ae("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=A(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},u=null;return z&&(console.error("Error handled by React Router default ErrorBoundary:",e),u=r.createElement(r.Fragment,null,r.createElement("p",null,"πΏ Hey developer π"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:l},"ErrorBoundary")," or"," ",r.createElement("code",{style:l},"errorElement")," prop on your route."))),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:o},n):null,u)}r.createContext(null);var ee=r.createElement(Q,null),te=class extends r.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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.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 void 0!==this.state.error?r.createElement(H.Provider,{value:this.props.routeContext},r.createElement(I.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ne({routeContext:e,match:t,children:n}){let a=r.useContext(O);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),r.createElement(H.Provider,{value:e},n)}function re(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ae(e){let t=function(e){let t=r.useContext(H);return i(t,re(e)),t}(e),n=t.matches[t.matches.length-1];return i(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var oe={};function ie(e,t,n){t||oe[e]||(oe[e]=!0,l(!1,n))}function le(e){i(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function ue({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:o,static:u=!1}){i(!K(),"You cannot render a inside another . You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),c=r.useMemo((()=>({basename:s,navigator:o,static:u,future:{}})),[s,o,u]);"string"==typeof n&&(n=h(n));let{pathname:p="/",search:d="",hash:m="",state:f=null,key:v="default"}=n,g=r.useMemo((()=>{let e=$(p,s);return null==e?null:{location:{pathname:e,search:d,hash:m,state:f,key:v},navigationType:a}}),[s,p,d,m,f,v,a]);return l(null!=g,` is not able to match the URL "${p}${d}${m}" because it does not start with the basename, so the won't render anything.`),null==g?null:r.createElement(j.Provider,{value:c},r.createElement(_.Provider,{children:t,value:g}))}function se({children:e,location:t}){return Z(ce(e),t)}function ce(e,t=[]){let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;let o=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,ce(e.props.children,o));i(e.type===le,`[${"string"==typeof e.type?e.type:e.type.name}] is not a component. All component children of must be a or `),i(!e.props.index||!e.props.children,"An index route cannot have child routes.");let l={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(l.children=ce(e.props.children,o)),n.push(l)})),n}r.memo((function({routes:e,future:t,state:n}){return Z(e,void 0,n,t)})),r.Component;var he="get",pe="application/x-www-form-urlencoded";function de(e){return null!=e&&"string"==typeof e.tagName}var me=null,fe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ve(e){return null==e||fe.has(e)?e:(l(!1,`"${e}" is not a valid \`encType\` for \`