import{n as pa,r as Rn}from"./rolldown-runtime-b3L32Ng1.js";import{n as kn,r as Pn,t as Tn}from"./ui-C3e4O--2.js";import{n as An,t as On}from"./vendor-V3bHl-VS.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function a(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=a(s);fetch(s.href,i)}})();var l=Rn(Pn(),1),Fn=An(),Ln="modulepreload",Dn=function(e){return"/"+e},Ir={},ha=function(r,a,n){let s=Promise.resolve();if(a&&a.length>0){let u=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const o=document.getElementsByTagName("link"),c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=u(a.map(p=>{if(p=Dn(p,n),p in Ir)return;Ir[p]=!0;const m=p.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(n)for(let v=o.length-1;v>=0;v--){const f=o[v];if(f.href===p&&(!m||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${b}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":Ln,m||(g.as="script"),g.crossOrigin="",g.href=p,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,f)=>{g.addEventListener("load",v),g.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${p}`)))})}))}function i(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return s.then(o=>{for(const c of o||[])c.status==="rejected"&&i(c.reason);return r().catch(i)})},$r="popstate";function Br(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function In(e={}){function r(n,s){let i=s.state?.masked,{pathname:o,search:c,hash:d}=i||n.location;return pr("",{pathname:o,search:c,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function a(n,s){return typeof s=="string"?s:pt(s)}return Bn(r,a,null,e)}function ee(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function Ne(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function $n(){return Math.random().toString(36).substring(2,10)}function Ur(e,r){return{usr:e.state,key:e.key,idx:r,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function pr(e,r,a=null,n,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof r=="string"?tt(r):r,state:a,key:r&&r.key||n||$n(),mask:s}}function pt({pathname:e="/",search:r="",hash:a=""}){return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function tt(e){let r={};if(e){let a=e.indexOf("#");a>=0&&(r.hash=e.substring(a),e=e.substring(0,a));let n=e.indexOf("?");n>=0&&(r.search=e.substring(n),e=e.substring(0,n)),e&&(r.pathname=e)}return r}function Bn(e,r,a,n={}){let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,c="POP",d=null,u=p();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function p(){return(o.state||{idx:null}).idx}function m(){c="POP";let h=p(),w=h==null?null:h-u;u=h,d&&d({action:c,location:f.location,delta:w})}function b(h,w){c="PUSH";let N=Br(h)?h:pr(f.location,h,w);a&&a(N,h),u=p()+1;let j=Ur(N,u),S=f.createHref(N.mask||N);try{o.pushState(j,"",S)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;s.location.assign(S)}i&&d&&d({action:c,location:f.location,delta:1})}function g(h,w){c="REPLACE";let N=Br(h)?h:pr(f.location,h,w);a&&a(N,h),u=p();let j=Ur(N,u),S=f.createHref(N.mask||N);o.replaceState(j,"",S),i&&d&&d({action:c,location:f.location,delta:0})}function v(h){return Un(h)}let f={get action(){return c},get location(){return e(s,o)},listen(h){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener($r,m),d=h,()=>{s.removeEventListener($r,m),d=null}},createHref(h){return r(s,h)},createURL:v,encodeLocation(h){let w=v(h);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:b,replace:g,go(h){return o.go(h)}};return f}function Un(e,r=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),ee(a,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:pt(e);return n=n.replace(/ $/,"%20"),!r&&n.startsWith("//")&&(n=a+n),new URL(n,a)}var Mn;Mn=new WeakMap;function fa(e,r,a="/"){return ga(e,r,a,!1)}function ga(e,r,a,n,s){let i=Le((typeof r=="string"?tt(r):r).pathname||"/",a);if(i==null)return null;let o=s??Hn(e),c=null,d=ts(i);for(let u=0;c==null&&u{let p={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&d)return;ee(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let m=ke([n,p.relativePath]),b=a.concat(p);o.children&&o.children.length>0&&(ee(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),ba(o.children,r,b,m,d)),!(o.path==null&&!o.index)&&r.push({path:m,score:Xn(m,o.index),routesMeta:b})};return e.forEach((o,c)=>{if(o.path===""||!o.path?.includes("?"))i(o,c);else for(let d of ya(o.path))i(o,c,!0,d)}),r}function ya(e){let r=e.split("/");if(r.length===0)return[];let[a,...n]=r,s=a.endsWith("?"),i=a.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=ya(n.join("/")),c=[];return c.push(...o.map(d=>d===""?i:[i,d].join("/"))),s&&c.push(...o),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function Wn(e){e.sort((r,a)=>r.score!==a.score?a.score-r.score:Qn(r.routesMeta.map(n=>n.childrenIndex),a.routesMeta.map(n=>n.childrenIndex)))}var zn=/^:[\w-]+$/,Gn=3,Vn=2,Jn=1,Kn=10,Yn=-2,Mr=e=>e==="*";function Xn(e,r){let a=e.split("/"),n=a.length;return a.some(Mr)&&(n+=Yn),r&&(n+=Vn),a.filter(s=>!Mr(s)).reduce((s,i)=>s+(zn.test(i)?Gn:i===""?Jn:Kn),n)}function Qn(e,r){return e.length===r.length&&e.slice(0,-1).every((a,n)=>a===r[n])?e[e.length-1]-r[r.length-1]:0}function Zn(e,r,a=!1){let{routesMeta:n}=e,s={},i="/",o=[];for(let c=0;c{if(u==="*"){let g=c[m]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const b=c[m];return p&&!b?d[u]=void 0:d[u]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:o,pattern:e}}function es(e,r=!1,a=!0){Ne(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 n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,o,c,d,u)=>{if(n.push({paramName:o,isOptional:c!=null}),c){let p=u.charAt(d+i.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,r?void 0:"i"),n]}function ts(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ne(!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 (${r}).`),e}}function Le(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let a=r.endsWith("/")?r.length-1:r.length,n=e.charAt(a);return n&&n!=="/"?null:e.slice(a)||"/"}var rs=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function as(e,r="/"){let{pathname:a,search:n="",hash:s=""}=typeof e=="string"?tt(e):e,i;return a?(a=xa(a),a.startsWith("/")?i=qr(a.substring(1),"/"):i=qr(a,r)):i=r,{pathname:i,search:is(n),hash:os(s)}}function qr(e,r){let a=It(r).split("/");return e.split("/").forEach(n=>{n===".."?a.length>1&&a.pop():n!=="."&&a.push(n)}),a.length>1?a.join("/"):"/"}function ar(e,r,a,n){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function ns(e){return e.filter((r,a)=>a===0||r.route.path&&r.route.path.length>0)}function Nr(e){let r=ns(e);return r.map((a,n)=>n===r.length-1?a.pathname:a.pathnameBase)}function Mt(e,r,a,n=!1){let s;typeof e=="string"?s=tt(e):(s={...e},ee(!s.pathname||!s.pathname.includes("?"),ar("?","pathname","search",s)),ee(!s.pathname||!s.pathname.includes("#"),ar("#","pathname","hash",s)),ee(!s.search||!s.search.includes("#"),ar("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,c;if(o==null)c=a;else{let m=r.length-1;if(!n&&o.startsWith("..")){let b=o.split("/");for(;b[0]==="..";)b.shift(),m-=1;s.pathname=b.join("/")}c=m>=0?r[m]:"/"}let d=as(s,c),u=o&&o!=="/"&&o.endsWith("/"),p=(i||o===".")&&a.endsWith("/");return!d.pathname.endsWith("/")&&(u||p)&&(d.pathname+="/"),d}var xa=e=>e.replace(/\/\/+/g,"/"),ke=e=>xa(e.join("/")),It=e=>e.replace(/\/+$/,""),ss=e=>It(e).replace(/^\/*/,"/"),is=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,os=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ls=class{constructor(e,r,a,n=!1){this.status=e,this.statusText=r||"",this.internal=n,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function va(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function cs(e){return ke(e.map(r=>r.route.path).filter(Boolean))||"/"}var wa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ja(e,r){let a=e;if(typeof a!="string"||!rs.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let n=a,s=!1;if(wa)try{let i=new URL(window.location.href),o=a.startsWith("//")?new URL(i.protocol+a):new URL(a),c=Le(o.pathname,r);o.origin===i.origin&&c!=null?a=c+o.search+o.hash:s=!0}catch{Ne(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:a}}var wc=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),_a=["POST","PUT","PATCH","DELETE"],jc=new Set(_a),ds=["GET",..._a],_c=new Set(ds),us,ms,ps,hs;us=new WeakMap;ms=new WeakMap;ps=new WeakMap;hs=new WeakMap;var rt=l.createContext(null);rt.displayName="DataRouter";var ht=l.createContext(null);ht.displayName="DataRouterState";var Na=l.createContext(!1);function Sa(){return l.useContext(Na)}var Ea=l.createContext({isTransitioning:!1});Ea.displayName="ViewTransition";var fs=l.createContext(new Map);fs.displayName="Fetchers";var hr=l.createContext(null);hr.displayName="Await";var xe=l.createContext(null);xe.displayName="Navigation";var ft=l.createContext(null);ft.displayName="Location";var Pe=l.createContext({outlet:null,matches:[],isDataRoute:!1});Pe.displayName="Route";var Sr=l.createContext(null);Sr.displayName="RouteError";var Ca="REACT_ROUTER_ERROR",gs="REDIRECT",bs="ROUTE_ERROR_RESPONSE";function ys(e){if(e.startsWith(`${Ca}:${gs}:{`))try{let r=JSON.parse(e.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function xs(e){if(e.startsWith(`${Ca}:${bs}:{`))try{let r=JSON.parse(e.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new ls(r.status,r.statusText,r.data)}catch{}}function vs(e,{relative:r}={}){ee(at(),"useHref() may be used only in the context of a component.");let{basename:a,navigator:n}=l.useContext(xe),{hash:s,pathname:i,search:o}=gt(e,{relative:r}),c=i;return a!=="/"&&(c=i==="/"?a:ke([a,i])),n.createHref({pathname:c,search:o,hash:s})}function at(){return l.useContext(ft)!=null}function ue(){return ee(at(),"useLocation() may be used only in the context of a component."),l.useContext(ft).location}var Ra="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ka(e){l.useContext(xe).static||l.useLayoutEffect(e)}function me(){let{isDataRoute:e}=l.useContext(Pe);return e?Os():ws()}function ws(){ee(at(),"useNavigate() may be used only in the context of a component.");let e=l.useContext(rt),{basename:r,navigator:a}=l.useContext(xe),{matches:n}=l.useContext(Pe),{pathname:s}=ue(),i=JSON.stringify(Nr(n)),o=l.useRef(!1);return ka(()=>{o.current=!0}),l.useCallback((c,d={})=>{if(Ne(o.current,Ra),!o.current)return;if(typeof c=="number"){a.go(c);return}let u=Mt(c,JSON.parse(i),s,d.relative==="path");e==null&&r!=="/"&&(u.pathname=u.pathname==="/"?r:ke([r,u.pathname])),(d.replace?a.replace:a.push)(u,d.state,d)},[r,a,i,s,e])}var Nc=l.createContext(null);function Er(){let{matches:e}=l.useContext(Pe);return e[e.length-1]?.params??{}}function gt(e,{relative:r}={}){let{matches:a}=l.useContext(Pe),{pathname:n}=ue(),s=JSON.stringify(Nr(a));return l.useMemo(()=>Mt(e,JSON.parse(s),n,r==="path"),[e,s,n,r])}function js(e,r){return Pa(e,r)}function Pa(e,r,a){ee(at(),"useRoutes() may be used only in the context of a component.");let{navigator:n}=l.useContext(xe),{matches:s}=l.useContext(Pe),i=s[s.length-1],o=i?i.params:{},c=i?i.pathname:"/",d=i?i.pathnameBase:"/",u=i&&i.route;{let h=u&&u.path||"";Oa(c,!u||h.endsWith("*")||h.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 p=ue(),m;if(r){let h=typeof r=="string"?tt(r):r;ee(d==="/"||h.pathname?.startsWith(d),`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 "${d}" but pathname "${h.pathname}" was given in the \`location\` prop.`),m=h}else m=p;let b=m.pathname||"/",g=b;if(d!=="/"){let h=d.replace(/^\//,"").split("/");g="/"+b.replace(/^\//,"").split("/").slice(h.length).join("/")}let v=a&&a.state.matches.length?a.state.matches.map(h=>Object.assign(h,{route:a.manifest[h.route.id]||h.route})):fa(e,{pathname:g});Ne(u||v!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),Ne(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.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 f=Cs(v&&v.map(h=>Object.assign({},h,{params:Object.assign({},o,h.params),pathname:ke([d,n.encodeLocation?n.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?d:ke([d,n.encodeLocation?n.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),s,a);return r&&f?l.createElement(ft.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...m},navigationType:"POP"}},f):f}function _s(){let e=As(),r=va(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=l.createElement(l.Fragment,null,l.createElement("p",null,"💿 Hey developer 👋"),l.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",l.createElement("code",{style:i},"ErrorBoundary")," or"," ",l.createElement("code",{style:i},"errorElement")," prop on your route.")),l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},r),a?l.createElement("pre",{style:s},a):null,o)}var Ns=l.createElement(_s,null),Ta=class extends l.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,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){this.props.onError?this.props.onError(e,r):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"){const a=xs(e.digest);a&&(e=a)}let r=e!==void 0?l.createElement(Pe.Provider,{value:this.props.routeContext},l.createElement(Sr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?l.createElement(Ss,{error:e},r):r}};Ta.contextType=Na;var nr=new WeakMap;function Ss({children:e,error:r}){let{basename:a}=l.useContext(xe);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let n=ys(r.digest);if(n){let s=nr.get(r);if(s)throw s;let i=ja(n.location,a);if(wa&&!nr.get(r))if(i.isExternal||n.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw nr.set(r,o),o}return l.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Es({routeContext:e,match:r,children:a}){let n=l.useContext(rt);return n&&n.static&&n.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=r.route.id),l.createElement(Pe.Provider,{value:e},a)}function Cs(e,r=[],a){let n=a?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(r.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,i=n?.errors;if(i!=null){let p=s.findIndex(m=>m.route.id&&i?.[m.route.id]!==void 0);ee(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let o=!1,c=-1;if(a&&n){o=n.renderFallback;for(let p=0;p=0?s=s.slice(0,c+1):s=[s[0]];break}}}}let d=a?.onError,u=n&&d?(p,m)=>{d(p,{location:n.location,params:n.matches?.[0]?.params??{},pattern:cs(n.matches),errorInfo:m})}:void 0;return s.reduceRight((p,m,b)=>{let g,v=!1,f=null,h=null;n&&(g=i&&m.route.id?i[m.route.id]:void 0,f=m.route.errorElement||Ns,o&&(c<0&&b===0?(Oa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,h=null):c===b&&(v=!0,h=m.route.hydrateFallbackElement||null)));let w=r.concat(s.slice(0,b+1)),N=()=>{let j;return g?j=f:v?j=h:m.route.Component?j=l.createElement(m.route.Component,null):m.route.element?j=m.route.element:j=p,l.createElement(Es,{match:m,routeContext:{outlet:p,matches:w,isDataRoute:n!=null},children:j})};return n&&(m.route.ErrorBoundary||m.route.errorElement||b===0)?l.createElement(Ta,{location:n.location,revalidation:n.revalidation,component:f,error:g,children:N(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:u}):N()},null)}function Cr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rs(e){let r=l.useContext(rt);return ee(r,Cr(e)),r}function Rr(e){let r=l.useContext(ht);return ee(r,Cr(e)),r}function ks(e){let r=l.useContext(Pe);return ee(r,Cr(e)),r}function kr(e){let r=ks(e),a=r.matches[r.matches.length-1];return ee(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function Ps(){return kr("useRouteId")}function Ts(){let e=Rr("useNavigation");return l.useMemo(()=>{let{matches:r,historyAction:a,...n}=e.navigation;return n},[e.navigation])}function Aa(){let{matches:e,loaderData:r}=Rr("useMatches");return l.useMemo(()=>e.map(a=>qn(a,r)),[e,r])}function As(){let e=l.useContext(Sr),r=Rr("useRouteError"),a=kr("useRouteError");return e!==void 0?e:r.errors?.[a]}function Os(){let{router:e}=Rs("useNavigate"),r=kr("useNavigate"),a=l.useRef(!1);return ka(()=>{a.current=!0}),l.useCallback(async(n,s={})=>{Ne(a.current,Ra),a.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:r,...s}))},[e,r])}var Hr={};function Oa(e,r,a){!r&&!Hr[e]&&(Hr[e]=!0,Ne(!1,a))}var Wr={};function Fs(e,r){!e&&!Wr[r]&&(Wr[r]=!0,console.warn(r))}var Sc=l.memo(Ls);function Ls({routes:e,manifest:r,future:a,state:n,isStatic:s,onError:i}){return Pa(e,void 0,{manifest:r,state:n,isStatic:s,onError:i,future:a})}function Ds({to:e,replace:r,state:a,relative:n}){ee(at()," may be used only in the context of a component.");let{static:s}=l.useContext(xe);Ne(!s," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=l.useContext(Pe),{pathname:o}=ue(),c=me(),d=Mt(e,Nr(i),o,n==="path"),u=JSON.stringify(d);return l.useEffect(()=>{c(JSON.parse(u),{replace:r,state:a,relative:n})},[c,u,n,r,a]),null}function oe(e){ee(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Fa({basename:e="/",children:r=null,location:a,navigationType:n="POP",navigator:s,static:i=!1,useTransitions:o}){ee(!at(),"You cannot render a inside another . You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),d=l.useMemo(()=>({basename:c,navigator:s,static:i,useTransitions:o,future:{}}),[c,s,i,o]);typeof a=="string"&&(a=tt(a));let{pathname:u="/",search:p="",hash:m="",state:b=null,key:g="default",mask:v}=a,f=l.useMemo(()=>{let h=Le(u,c);return h==null?null:{location:{pathname:h,search:p,hash:m,state:b,key:g,mask:v},navigationType:n}},[c,u,p,m,b,g,n,v]);return Ne(f!=null,` is not able to match the URL "${u}${p}${m}" because it does not start with the basename, so the won't render anything.`),f==null?null:l.createElement(xe.Provider,{value:d},l.createElement(ft.Provider,{children:r,value:f}))}function Is({children:e,location:r}){return js(fr(e),r)}var Ec=class extends l.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){this.props.onError?this.props.onError(e,r):console.error(" caught the following error during render",e,r)}render(){let{children:e,errorElement:r,resolve:a}=this.props,n=null,s=0;if(!(a instanceof Promise))s=1,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>a});else if(this.state.error){s=2;let i=this.state.error;n=Promise.reject().catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>i})}else a._tracked?(n=a,s="_error"in n?2:"_data"in n?1:0):(s=0,Object.defineProperty(a,"_tracked",{get:()=>!0}),n=a.then(i=>Object.defineProperty(a,"_data",{get:()=>i}),i=>{this.props.onError?.(i),Object.defineProperty(a,"_error",{get:()=>i})}));if(s===2&&!r)throw n._error;if(s===2)return l.createElement(hr.Provider,{value:n,children:r});if(s===1)return l.createElement(hr.Provider,{value:n,children:e});throw n}};function fr(e,r=[]){let a=[];return l.Children.forEach(e,(n,s)=>{if(!l.isValidElement(n))return;let i=[...r,s];if(n.type===l.Fragment){a.push.apply(a,fr(n.props.children,i));return}ee(n.type===oe,`[${typeof n.type=="string"?n.type:n.type.name}] is not a component. All component children of must be a or `),ee(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=fr(n.props.children,i)),a.push(o)}),a}var kt="get",Pt="application/x-www-form-urlencoded";function qt(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function $s(e){return qt(e)&&e.tagName.toLowerCase()==="button"}function Bs(e){return qt(e)&&e.tagName.toLowerCase()==="form"}function Us(e){return qt(e)&&e.tagName.toLowerCase()==="input"}function Ms(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qs(e,r){return e.button===0&&(!r||r==="_self")&&!Ms(e)}var Et=null;function Hs(){if(Et===null)try{new FormData(document.createElement("form"),0),Et=!1}catch{Et=!0}return Et}var Ws=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sr(e){return e!=null&&!Ws.has(e)?(Ne(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Pt}"`),null):e}function zs(e,r){let a,n,s,i,o;if(Bs(e)){let c=e.getAttribute("action");n=c?Le(c,r):null,a=e.getAttribute("method")||kt,s=sr(e.getAttribute("enctype"))||Pt,i=new FormData(e)}else if($s(e)||Us(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a