import{r as f,j as g,O as hs,R as T,D as ds,V as pe,Q as Mr,E as Pr,M as fs,m as ps,c as ms}from"./three-eMwtdKkp.js";import{g as gs,s as Lr,i as Ir,a as Cn,b as Tr,c as _s,d as ys,e as ws,f as vs,r as xs,h as bs,j as Fr,k as Es,l as Cs,m as Rs,o as Ss,S as Ms,H as Ps,F as be,n as Ls,p as jr,q as ut,t as Is,u as Rn,v as me,w as Nr,x as Ts,y as Fs,z as js,A as ht,B as Ot,C as Sn,D as Ns,E as zs,G as he,I as Ds,J as Os,K as ks,L as Mn,M as Bs,N as Vs,O as $s,P as As,Q as st,R as Hs,T as Us,U as zr,V as Ws,W as Gs}from"./motion-BIOHP8Ul.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Pn="popstate";function qs(t={}){function e(r,i){let{pathname:s,search:o,hash:a}=r.location;return kt("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Ue(i)}return Xs(e,n,null,t)}function B(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ue(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Ys(){return Math.random().toString(36).substring(2,10)}function Ln(t,e){return{usr:t.state,key:t.key,idx:e}}function kt(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?je(e):e,state:n,key:e&&e.key||r||Ys()}}function Ue({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function je(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function Xs(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,c=u();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function u(){return(o.state||{idx:null}).idx}function h(){a="POP";let _=u(),w=_==null?null:_-c;c=_,l&&l({action:a,location:y.location,delta:w})}function d(_,w){a="PUSH";let b=kt(y.location,_,w);c=u()+1;let x=Ln(b,c),E=y.createHref(b);try{o.pushState(x,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(E)}s&&l&&l({action:a,location:y.location,delta:1})}function p(_,w){a="REPLACE";let b=kt(y.location,_,w);c=u();let x=Ln(b,c),E=y.createHref(b);o.replaceState(x,"",E),s&&l&&l({action:a,location:y.location,delta:0})}function m(_){return Ks(_)}let y={get action(){return a},get location(){return t(i,o)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Pn,h),l=_,()=>{i.removeEventListener(Pn,h),l=null}},createHref(_){return e(i,_)},createURL:m,encodeLocation(_){let w=m(_);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:d,replace:p,go(_){return o.go(_)}};return y}function Ks(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),B(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Ue(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Dr(t,e,n="/"){return Qs(t,e,n,!1)}function Qs(t,e,n,r){let i=typeof e=="string"?je(e):e,s=ye(i.pathname||"/",n);if(s==null)return null;let o=Or(t);Zs(o);let a=null;for(let l=0;a==null&&l{let u={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&l)return;B(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let h=_e([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(B(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Or(o.children,e,d,h,l)),!(o.path==null&&!o.index)&&e.push({path:h,score:so(h,o.index),routesMeta:d})};return t.forEach((o,a)=>{if(o.path===""||!o.path?.includes("?"))s(o,a);else for(let l of kr(o.path))s(o,a,!0,l)}),e}function kr(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=kr(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Zs(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:oo(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Js=/^:[\w-]+$/,eo=3,to=2,no=1,ro=10,io=-2,In=t=>t==="*";function so(t,e){let n=t.split("/"),r=n.length;return n.some(In)&&(r+=io),e&&(r+=to),n.filter(i=>!In(i)).reduce((i,s)=>i+(Js.test(s)?eo:s===""?no:ro),r)}function oo(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function ao(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a{if(u==="*"){let m=a[d]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[d];return h&&!p?c[u]=void 0:c[u]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function lo(t,e=!1,n=!0){ue(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function co(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ue(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function ye(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}var Br=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uo=t=>Br.test(t);function ho(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?je(t):t,s;if(n)if(uo(n))s=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),ue(!1,`Pathnames cannot have embedded double slashes - normalizing ${o} -> ${n}`)}n.startsWith("/")?s=Tn(n.substring(1),"/"):s=Tn(n,e)}else s=e;return{pathname:s,search:mo(r),hash:go(i)}}function Tn(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function bt(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function fo(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Vr(t){let e=fo(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function $r(t,e,n,r=!1){let i;typeof t=="string"?i=je(t):(i={...t},B(!i.pathname||!i.pathname.includes("?"),bt("?","pathname","search",i)),B(!i.pathname||!i.pathname.includes("#"),bt("#","pathname","hash",i)),B(!i.search||!i.search.includes("#"),bt("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let h=e.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),h-=1;i.pathname=d.join("/")}a=h>=0?e[h]:"/"}let l=ho(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var _e=t=>t.join("/").replace(/\/\/+/g,"/"),po=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),mo=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,go=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,_o=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function yo(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function wo(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ar=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Hr(t,e){let n=t;if(typeof n!="string"||!Br.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ar)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),a=ye(o.pathname,e);o.origin===s.origin&&a!=null?n=a+o.search+o.hash:i=!0}catch{ue(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ur=["POST","PUT","PATCH","DELETE"];new Set(Ur);var vo=["GET",...Ur];new Set(vo);var Ne=f.createContext(null);Ne.displayName="DataRouter";var wt=f.createContext(null);wt.displayName="DataRouterState";var xo=f.createContext(!1),Wr=f.createContext({isTransitioning:!1});Wr.displayName="ViewTransition";var bo=f.createContext(new Map);bo.displayName="Fetchers";var Eo=f.createContext(null);Eo.displayName="Await";var ae=f.createContext(null);ae.displayName="Navigation";var qe=f.createContext(null);qe.displayName="Location";var we=f.createContext({outlet:null,matches:[],isDataRoute:!1});we.displayName="Route";var Qt=f.createContext(null);Qt.displayName="RouteError";var Gr="REACT_ROUTER_ERROR",Co="REDIRECT",Ro="ROUTE_ERROR_RESPONSE";function So(t){if(t.startsWith(`${Gr}:${Co}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function Mo(t){if(t.startsWith(`${Gr}:${Ro}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new _o(e.status,e.statusText,e.data)}catch{}}function Po(t,{relative:e}={}){B(Ye(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=f.useContext(ae),{hash:i,pathname:s,search:o}=Xe(t,{relative:e}),a=s;return n!=="/"&&(a=s==="/"?n:_e([n,s])),r.createHref({pathname:a,search:o,hash:i})}function Ye(){return f.useContext(qe)!=null}function Ee(){return B(Ye(),"useLocation() may be used only in the context of a component."),f.useContext(qe).location}var qr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yr(t){f.useContext(ae).static||f.useLayoutEffect(t)}function Lo(){let{isDataRoute:t}=f.useContext(we);return t?Ao():Io()}function Io(){B(Ye(),"useNavigate() may be used only in the context of a component.");let t=f.useContext(Ne),{basename:e,navigator:n}=f.useContext(ae),{matches:r}=f.useContext(we),{pathname:i}=Ee(),s=JSON.stringify(Vr(r)),o=f.useRef(!1);return Yr(()=>{o.current=!0}),f.useCallback((l,c={})=>{if(ue(o.current,qr),!o.current)return;if(typeof l=="number"){n.go(l);return}let u=$r(l,JSON.parse(s),i,c.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:_e([e,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[e,n,s,i,t])}f.createContext(null);function Xe(t,{relative:e}={}){let{matches:n}=f.useContext(we),{pathname:r}=Ee(),i=JSON.stringify(Vr(n));return f.useMemo(()=>$r(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function To(t,e){return Xr(t,e)}function Xr(t,e,n,r,i){B(Ye(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=f.useContext(ae),{matches:o}=f.useContext(we),a=o[o.length-1],l=a?a.params:{},c=a?a.pathname:"/",u=a?a.pathnameBase:"/",h=a&&a.route;{let b=h&&h.path||"";Qr(c,!h||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let d=Ee(),p;if(e){let b=typeof e=="string"?je(e):e;B(u==="/"||b.pathname?.startsWith(u),`When overriding the location using \`\` 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 "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),p=b}else p=d;let m=p.pathname||"/",y=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");y="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let _=Dr(t,{pathname:y});ue(h||_!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),ue(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let w=Do(_&&_.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:_e([u,s.encodeLocation?s.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:_e([u,s.encodeLocation?s.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),o,n,r,i);return e&&w?f.createElement(qe.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},w):w}function Fo(){let t=$o(),e=yo(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:s},"ErrorBoundary")," or"," ",f.createElement("code",{style:s},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},e),n?f.createElement("pre",{style:i},n):null,o)}var jo=f.createElement(Fo,null),Kr=class extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=Mo(t.digest);n&&(t=n)}let e=t!==void 0?f.createElement(we.Provider,{value:this.props.routeContext},f.createElement(Qt.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?f.createElement(No,{error:t},e):e}};Kr.contextType=xo;var Et=new WeakMap;function No({children:t,error:e}){let{basename:n}=f.useContext(ae);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=So(e.digest);if(r){let i=Et.get(e);if(i)throw i;let s=Hr(r.location,n);if(Ar&&!Et.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Et.set(e,o),o}return f.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function zo({routeContext:t,match:e,children:n}){let r=f.useContext(Ne);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),f.createElement(we.Provider,{value:t},n)}function Do(t,e=[],n=null,r=null,i=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,o=n?.errors;if(o!=null){let u=s.findIndex(h=>h.route.id&&o?.[h.route.id]!==void 0);B(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,u+1))}let a=!1,l=-1;if(n)for(let u=0;u=0?s=s.slice(0,l+1):s=[s[0]];break}}}let c=n&&r?(u,h)=>{r(u,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:wo(n.matches),errorInfo:h})}:void 0;return s.reduceRight((u,h,d)=>{let p,m=!1,y=null,_=null;n&&(p=o&&h.route.id?o[h.route.id]:void 0,y=h.route.errorElement||jo,a&&(l<0&&d===0?(Qr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,_=null):l===d&&(m=!0,_=h.route.hydrateFallbackElement||null)));let w=e.concat(s.slice(0,d+1)),b=()=>{let x;return p?x=y:m?x=_:h.route.Component?x=f.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=u,f.createElement(zo,{match:h,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:x})};return n&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?f.createElement(Kr,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:b(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:c}):b()},null)}function Zt(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Oo(t){let e=f.useContext(Ne);return B(e,Zt(t)),e}function ko(t){let e=f.useContext(wt);return B(e,Zt(t)),e}function Bo(t){let e=f.useContext(we);return B(e,Zt(t)),e}function Jt(t){let e=Bo(t),n=e.matches[e.matches.length-1];return B(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Vo(){return Jt("useRouteId")}function $o(){let t=f.useContext(Qt),e=ko("useRouteError"),n=Jt("useRouteError");return t!==void 0?t:e.errors?.[n]}function Ao(){let{router:t}=Oo("useNavigate"),e=Jt("useNavigate"),n=f.useRef(!1);return Yr(()=>{n.current=!0}),f.useCallback(async(i,s={})=>{ue(n.current,qr),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var Fn={};function Qr(t,e,n){!e&&!Fn[t]&&(Fn[t]=!0,ue(!1,n))}f.memo(Ho);function Ho({routes:t,future:e,state:n,onError:r}){return Xr(t,void 0,n,r,e)}function ot(t){B(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Uo({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){B(!Ye(),"You cannot render a inside another . You should never have more than one in your app.");let a=t.replace(/^\/*/,"/"),l=f.useMemo(()=>({basename:a,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[a,i,s,o]);typeof n=="string"&&(n=je(n));let{pathname:c="/",search:u="",hash:h="",state:d=null,key:p="default"}=n,m=f.useMemo(()=>{let y=ye(c,a);return y==null?null:{location:{pathname:y,search:u,hash:h,state:d,key:p},navigationType:r}},[a,c,u,h,d,p,r]);return ue(m!=null,` is not able to match the URL "${c}${u}${h}" because it does not start with the basename, so the won't render anything.`),m==null?null:f.createElement(ae.Provider,{value:l},f.createElement(qe.Provider,{children:e,value:m}))}function Wo({children:t,location:e}){return To(Bt(t),e)}function Bt(t,e=[]){let n=[];return f.Children.forEach(t,(r,i)=>{if(!f.isValidElement(r))return;let s=[...e,i];if(r.type===f.Fragment){n.push.apply(n,Bt(r.props.children,s));return}B(r.type===ot,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),B(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Bt(r.props.children,s)),n.push(o)}),n}var at="get",lt="application/x-www-form-urlencoded";function vt(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Go(t){return vt(t)&&t.tagName.toLowerCase()==="button"}function qo(t){return vt(t)&&t.tagName.toLowerCase()==="form"}function Yo(t){return vt(t)&&t.tagName.toLowerCase()==="input"}function Xo(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Ko(t,e){return t.button===0&&(!e||e==="_self")&&!Xo(t)}var Je=null;function Qo(){if(Je===null)try{new FormData(document.createElement("form"),0),Je=!1}catch{Je=!0}return Je}var Zo=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ct(t){return t!=null&&!Zo.has(t)?(ue(!1,`"${t}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${lt}"`),null):t}function Jo(t,e){let n,r,i,s,o;if(qo(t)){let a=t.getAttribute("action");r=a?ye(a,e):null,n=t.getAttribute("method")||at,i=Ct(t.getAttribute("enctype"))||lt,s=new FormData(t)}else if(Go(t)||Yo(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a