import{r as i}from"./react-vendor-BJPQViVD.js";function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function C(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ce(){return Math.random().toString(36).substr(2,8)}function J(e,t){return{usr:e.state,key:e.key,idx:t}}function M(e,t,n,r){return n===void 0&&(n=null),L({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?B(t):t,{state:n,key:t&&t.key||r||ce()})}function K(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function B(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function he(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,s=P.Pop,u=null,h=d();h==null&&(h=0,l.replaceState(L({},l.state,{idx:h}),""));function d(){return(l.state||{idx:null}).idx}function c(){s=P.Pop;let f=d(),y=f==null?null:f-h;h=f,u&&u({action:s,location:v.location,delta:y})}function p(f,y){s=P.Push;let m=M(v.location,f,y);h=d()+1;let E=J(m,h),W=v.createHref(m);try{l.pushState(E,"",W)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;a.location.assign(W)}o&&u&&u({action:s,location:v.location,delta:1})}function R(f,y){s=P.Replace;let m=M(v.location,f,y);h=d();let E=J(m,h),W=v.createHref(m);l.replaceState(E,"",W),o&&u&&u({action:s,location:v.location,delta:0})}function x(f){let y=a.location.origin!=="null"?a.location.origin:a.location.href,m=typeof f=="string"?f:K(f);return m=m.replace(/ $/,"%20"),g(y,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,y)}let v={get action(){return s},get location(){return e(a,l)},listen(f){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(A,c),u=f,()=>{a.removeEventListener(A,c),u=null}},createHref(f){return t(a,f)},createURL:x,encodeLocation(f){let y=x(f);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:R,go(f){return l.go(f)}};return v}var V;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(V||(V={}));function de(e,t,n){return n===void 0&&(n="/"),fe(e,t,n)}function fe(e,t,n,r){let a=typeof t=="string"?B(t):t,o=ee(a.pathname||"/",n);if(o==null)return null;let l=Q(e);pe(l);let s=null,u=Se(o);for(let h=0;s==null&&h{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};u.relativePath.startsWith("/")&&(g(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=w([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(g(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),Q(o.children,t,d,h)),!(o.path==null&&!o.index)&&t.push({path:h,score:Ee(h,o.index),routesMeta:d})};return e.forEach((o,l)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))a(o,l);else for(let u of Z(o.path))a(o,l,u)}),t}function Z(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=Z(r.join("/")),s=[];return s.push(...l.map(u=>u===""?o:[o,u].join("/"))),a&&s.push(...l),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function pe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ce(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const me=/^:[\w-]+$/,ve=3,ge=2,ye=1,xe=10,Re=-2,Y=e=>e==="*";function Ee(e,t){let n=e.split("/"),r=n.length;return n.some(Y)&&(r+=Re),t&&(r+=ge),n.filter(a=>!Y(a)).reduce((a,o)=>a+(me.test(o)?ve:o===""?ye:xe),r)}function Ce(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function be(e,t,n){let{routesMeta:r}=e,a={},o="/",l=[];for(let s=0;s{let{paramName:p,isOptional:R}=d;if(p==="*"){let v=s[c]||"";l=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const x=s[c];return R&&!x?h[p]=void 0:h[p]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function we(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),C(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Se(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return C(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ee(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)||"/"}const Be=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=e=>Be.test(e);function Ue(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?B(e):e,o;if(n)if(Le(n))o=n;else{if(n.includes("//")){let l=n;n=re(n),C(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?o=H(n.substring(1),"/"):o=H(n,t)}else o=t;return{pathname:o,search:Oe(r),hash:We(a)}}function H(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function k(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 and the router will parse it for you.'}function Ne(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function te(e,t){let n=Ne(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ne(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=B(e):(a=L({},e),g(!a.pathname||!a.pathname.includes("?"),k("?","pathname","search",a)),g(!a.pathname||!a.pathname.includes("#"),k("#","pathname","hash",a)),g(!a.search||!a.search.includes("#"),k("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,s;if(l==null)s=n;else{let c=t.length-1;if(!r&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),c-=1;a.pathname=p.join("/")}s=c>=0?t[c]:"/"}let u=Ue(a,s),h=l&&l!=="/"&&l.endsWith("/"),d=(o||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(h||d)&&(u.pathname+="/"),u}const re=e=>e.replace(/\/\/+/g,"/"),w=e=>re(e.join("/")),Ie=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Oe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,We=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $e(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ae=["post","put","patch","delete"];new Set(ae);const je=["get",...ae];new Set(je);function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t component.");let{basename:r,navigator:a}=i.useContext(S),{hash:o,pathname:l,search:s}=De(e,{relative:n}),u=l;return r!=="/"&&(u=l==="/"?r:w([r,l])),a.createHref({pathname:u,search:s,hash:o})}function O(){return i.useContext(I)!=null}function T(){return O()||g(!1,"useLocation() may be used only in the context of a component."),i.useContext(I).location}const le="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ie(e){i.useContext(S).static||i.useLayoutEffect(e)}function nt(){let{isDataRoute:e}=i.useContext(b);return e?Xe():Me()}function Me(){O()||g(!1,"useNavigate() may be used only in the context of a component.");let e=i.useContext($),{basename:t,future:n,navigator:r}=i.useContext(S),{matches:a}=i.useContext(b),{pathname:o}=T(),l=JSON.stringify(te(a,n.v7_relativeSplatPath)),s=i.useRef(!1);return ie(()=>{s.current=!0}),i.useCallback(function(h,d){if(d===void 0&&(d={}),C(s.current,le),!s.current)return;if(typeof h=="number"){r.go(h);return}let c=ne(h,JSON.parse(l),o,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:w([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,l,o,e])}function rt(){let{matches:e}=i.useContext(b),t=e[e.length-1];return t?t.params:{}}function De(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=i.useContext(S),{matches:a}=i.useContext(b),{pathname:o}=T(),l=JSON.stringify(te(a,r.v7_relativeSplatPath));return i.useMemo(()=>ne(e,JSON.parse(l),o,n==="path"),[e,l,o,n])}function Fe(e,t){return Te(e,t)}function Te(e,t,n,r){O()||g(!1,"useRoutes() may be used only in the context of a component.");let{navigator:a}=i.useContext(S),{matches:o}=i.useContext(b),l=o[o.length-1],s=l?l.params:{},u=l?l.pathname:"/",h=l?l.pathnameBase:"/",d=l&&l.route;{let m=d&&d.path||"";ue(u,!d||m.endsWith("*"),"You rendered descendant (or called `useRoutes()`) at "+('"'+u+'" (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 c=T(),p;if(t){var R;let m=typeof t=="string"?B(t):t;h==="/"||(R=m.pathname)!=null&&R.startsWith(h)||g(!1,"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 "'+h+'" ')+('but pathname "'+m.pathname+'" was given in the `location` prop.')),p=m}else p=c;let x=p.pathname||"/",v=x;if(h!=="/"){let m=h.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(m.length).join("/")}let f=de(e,{pathname:v});C(d||f!=null,'No routes matched location "'+p.pathname+p.search+p.hash+'" '),C(f==null||f[f.length-1].route.element!==void 0||f[f.length-1].route.Component!==void 0||f[f.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 y=Ve(f&&f.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:w([h,a.encodeLocation?a.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?h:w([h,a.encodeLocation?a.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,n,r);return t&&y?i.createElement(I.Provider,{value:{location:U({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:P.Pop}},y):y}function _e(){let e=Ge(),t=$e(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:a},n):null,l)}const ze=i.createElement(_e,null);class Ae extends i.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?i.createElement(b.Provider,{value:this.props.routeContext},i.createElement(F.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Je(e){let{routeContext:t,match:n,children:r}=e,a=i.useContext($);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),i.createElement(b.Provider,{value:t},r)}function Ve(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,s=(a=n)==null?void 0:a.errors;if(s!=null){let d=l.findIndex(c=>c.route.id&&s?.[c.route.id]!==void 0);d>=0||g(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(s).join(",")),l=l.slice(0,Math.min(l.length,d+1))}let u=!1,h=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?l=l.slice(0,h+1):l=[l[0]];break}}}return l.reduceRight((d,c,p)=>{let R,x=!1,v=null,f=null;n&&(R=s&&c.route.id?s[c.route.id]:void 0,v=c.route.errorElement||ze,u&&(h<0&&p===0?(ue("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,f=null):h===p&&(x=!0,f=c.route.hydrateFallbackElement||null)));let y=t.concat(l.slice(0,p+1)),m=()=>{let E;return R?E=v:x?E=f:c.route.Component?E=i.createElement(c.route.Component,null):c.route.element?E=c.route.element:E=d,i.createElement(Je,{match:c,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:E})};return n&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?i.createElement(Ae,{location:n.location,revalidation:n.revalidation,component:v,error:R,children:m(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):m()},null)}var se=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(se||{}),N=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(N||{});function _(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function Ye(e){let t=i.useContext($);return t||g(!1,_(e)),t}function He(e){let t=i.useContext(oe);return t||g(!1,_(e)),t}function qe(e){let t=i.useContext(b);return t||g(!1,_(e)),t}function z(e){let t=qe(e),n=t.matches[t.matches.length-1];return n.route.id||g(!1,e+' can only be used on routes that contain a unique "id"'),n.route.id}function at(){return z(N.UseRouteId)}function Ge(){var e;let t=i.useContext(F),n=He(N.UseRouteError),r=z(N.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Xe(){let{router:e}=Ye(se.UseNavigateStable),t=z(N.UseNavigateStable),n=i.useRef(!1);return ie(()=>{n.current=!0}),i.useCallback(function(a,o){o===void 0&&(o={}),C(n.current,le),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,U({fromRouteId:t},o)))},[e,t])}const q={};function ue(e,t,n){!t&&!q[e]&&(q[e]=!0,C(!1,n))}const G={};function Ke(e,t){G[t]||(G[t]=!0,console.warn(t))}const X=(e,t,n)=>Ke(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function ot(e,t){e?.v7_startTransition===void 0&&X("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&X("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function Qe(e){g(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function lt(e){let{basename:t="/",children:n=null,location:r,navigationType:a=P.Pop,navigator:o,static:l=!1,future:s}=e;O()&&g(!1,"You cannot render a inside another . You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),h=i.useMemo(()=>({basename:u,navigator:o,static:l,future:U({v7_relativeSplatPath:!1},s)}),[u,s,o,l]);typeof r=="string"&&(r=B(r));let{pathname:d="/",search:c="",hash:p="",state:R=null,key:x="default"}=r,v=i.useMemo(()=>{let f=ee(d,u);return f==null?null:{location:{pathname:f,search:c,hash:p,state:R,key:x},navigationType:a}},[u,d,c,p,R,x,a]);return C(v!=null,' is not able to match the URL '+('"'+d+c+p+'" because it does not start with the ')+"basename, so the won't render anything."),v==null?null:i.createElement(S.Provider,{value:h},i.createElement(I.Provider,{children:n,value:v}))}function it(e){let{children:t,location:n}=e;return Fe(D(t),n)}new Promise(()=>{});function D(e,t){t===void 0&&(t=[]);let n=[];return i.Children.forEach(e,(r,a)=>{if(!i.isValidElement(r))return;let o=[...t,a];if(r.type===i.Fragment){n.push.apply(n,D(r.props.children,o));return}r.type!==Qe&&g(!1,"["+(typeof r.type=="string"?r.type:r.type.name)+"] is not a component. All component children of must be a or "),!r.props.index||!r.props.children||g(!1,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=D(r.props.children,o)),n.push(l)}),n}export{oe as D,S as N,lt as R,T as a,nt as b,De as c,K as d,et as e,at as f,b as g,$ as h,g as i,w as j,it as k,ot as l,Pe as m,Qe as n,rt as o,ee as s,tt as u,C as w};