1import{r as i}from"./react-vendor-rXq2pXLR.js";var pe="popstate";function me(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function He(e={}){function t(n,a){let o=a.state?.masked,{pathname:l,search:s,hash:u}=o||n.location;return ee("",{pathname:l,search:s,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,a){return typeof a=="string"?a:U(a)}return ze(t,r,null,e)}function E(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function b(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function je(){return Math.random().toString(36).substring(2,10)}function ye(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ee(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?N(t):t,state:r,key:t&&t.key||n||je(),unstable_mask:a}}function U({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function N(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ze(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,s="POP",u=null,c=d();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function d(){return(l.state||{idx:null}).idx}function f(){s="POP";let h=d(),v=h==null?null:h-c;c=h,u&&u({action:s,location:m.location,delta:v})}function p(h,v){s="PUSH";let R=me(h)?h:ee(m.location,h,v);c=d()+1;let w=ye(R,c),S=m.createHref(R.unstable_mask||R);try{l.pushState(w,"",S)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;a.location.assign(S)}o&&u&&u({action:s,location:m.location,delta:1})}function g(h,v){s="REPLACE";let R=me(h)?h:ee(m.location,h,v);c=d();let w=ye(R,c),S=m.createHref(R.unstable_mask||R);l.replaceState(w,"",S),o&&u&&u({action:s,location:m.location,delta:0})}function y(h){return Ve(h)}let m={get action(){return s},get location(){return e(a,l)},listen(h){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(pe,f),u=h,()=>{a.removeEventListener(pe,f),u=null}},createHref(h){return t(a,h)},createURL:y,encodeLocation(h){let v=y(h);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:g,go(h){return l.go(h)}};return m}function Ve(e,t=!1){let r="http://localhost";
1typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),E(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:U(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function Ee(e,t,r="/"){return Je(e,t,r,!1)}function Je(e,t,r,n){let a=typeof t=="string"?N(t):t,o=$(a.pathname||"/",r);if(o==null)return null;let l=xe(e);Ke(l);let s=null;for(let u=0;s==null&&u<l.length;++u){let c=at(o);s=rt(l[u],c,n)}return s}function xe(e,t=[],r=[],n="",a=!1){let o=(l,s,u=a,c)=>{let d={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&u)return;E(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let f=P([n,d.relativePath]),p=r.concat(d);l.children&&l.children.length>0&&(E(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),xe(l.children,t,p,f,u)),!(l.path==null&&!l.index)&&t.push({path:f,score:et(f,l.index),routesMeta:p})};return e.forEach((l,s)=>{if(l.path===""||!l.path?.includes("?"))o(l,s);else for(let u of Se(l.path))o(l,s,!0,u)}),t}function Se(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let l=Se(n.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 Ke(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:tt(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Ye=/^:[\w-]+$/,qe=3,Ge=2,Xe=1,Qe=10,Ze=-2,ge=e=>e==="*";function et(e,t){let r=e.split("/"),n=r.length;return r.some(ge)&&(n+=Ze),t&&(n+=Ge),r.filter(a=>!ge(a)).reduce((a,o)=>a+(Ye.test(o)?qe:o===""?Xe:Qe),n)}function tt(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function rt(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let s=0;s<n.length;++s){let u=n[s],c=s===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=V({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),p=u.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=V({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;
1Object.assign(a,f.params),l.push({params:a,pathname:P([o,f.pathname]),pathnameBase:st(P([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=P([o,f.pathnameBase]))}return l}function V(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=nt(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((c,{paramName:d,isOptional:f},p)=>{if(d==="*"){let y=s[p]||"";l=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const g=s[p];return f&&!g?c[d]=void 0:c[d]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:l,pattern:e}}function nt(e,t=!1,r=!0){b(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,s,u,c,d)=>{if(n.push({paramName:s,isOptional:u!=null}),u){let f=d.charAt(c+l.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function at(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return b(!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 $(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var ot=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function lt(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?N(e):e,o;return r?(r=Ce(r),r.startsWith("/")?o=ve(r.substring(1),"/"):o=ve(r,t)):o=t,{pathname:o,search:ut(n),hash:ct(a)}}function ve(e,t){let r=J(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function X(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function it(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ne(e){let t=it(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function K(e,t,r,n=!1){let a;typeof e=="string"?a=N(e):(a={...e},E(!a.pathname||!a.pathname.includes("?"),X("?","pathname","search",a)),E(!a.pathname||!a.pathname.includes("#"),X("#","pathname","hash",a)),E(!a.search||!a.search.includes("#"),X("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,s;if(l==null)s=r;else{let f=t.length-1;if(!n&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}s=f>=0?t[f]:"/"}let u=lt(a,s),c=l&&l!=="/"&&l.endsWith("/"),d=(o||l===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var Ce=e=>e.replace(/\/\/+/g,"/"),P=e=>Ce(e.join("/")),J=e=>e.replace(/\/+$/,""),st=e=>J(e).replace(/^\/*/,"/"),ut=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ct=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ft=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function dt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ht(e){let t=e.map(r=>r.route.path).filter(Boolean);return P(t)||"/"}var be=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Pe(e,t){let r=e;if(typeof r!="string"||!ot.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(be)try{let o=new URL(window.location.href),l=r.startsWith("//")?new URL(o.protocol+r):new URL(r),s=$(l.pathname,t);l.origin===o.origin&&s!=null?r=s+l.search+l.hash:a=!0}catch{b(!1,`<Link to="${r}">
1 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Le=["POST","PUT","PATCH","DELETE"];new Set(Le);var pt=["GET",...Le];new Set(pt);var I=i.createContext(null);I.displayName="DataRouter";var Y=i.createContext(null);Y.displayName="DataRouterState";var ke=i.createContext(!1);function mt(){return i.useContext(ke)}var $e=i.createContext({isTransitioning:!1});$e.displayName="ViewTransition";var yt=i.createContext(new Map);yt.displayName="Fetchers";var gt=i.createContext(null);gt.displayName="Await";var C=i.createContext(null);C.displayName="Navigation";var B=i.createContext(null);B.displayName="Location";var L=i.createContext({outlet:null,matches:[],isDataRoute:!1});L.displayName="Route";var ae=i.createContext(null);ae.displayName="RouteError";var Te="REACT_ROUTER_ERROR",vt="REDIRECT",Rt="ROUTE_ERROR_RESPONSE";function wt(e){if(e.startsWith(`${Te}:${vt}:{`))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 Et(e){if(e.startsWith(`${Te}:${Rt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ft(t.status,t.statusText,t.data)}catch{}}function xt(e,{relative:t}={}){E(_(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=i.useContext(C),{hash:a,pathname:o,search:l}=W(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:P([r,o])),n.createHref({pathname:s,search:l,hash:a})}function _(){return i.useContext(B)!=null}function k(){return E(_(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(B).location}var Fe="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function De(e){i.useContext(C).static||i.useLayoutEffect(e)}function oe(){let{isDataRoute:e}=i.useContext(L);return e?At():St()}function St(){E(_(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(I),{basename:t,navigator:r}=i.useContext(C),{matches:n}=i.useContext(L),{pathname:a}=k(),o=JSON.stringify(ne(n)),l=i.useRef(!1);return De(()=>{l.current=!0}),i.useCallback((u,c={})=>{if(b(l.current,Fe),!l.current)return;if(typeof u=="number"){r.go(u);return}let d=K(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:P([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,o,a,e])}var Ct=i.createContext(null);function bt(e){let t=i.useContext(L).outlet;return i.useMemo(()=>t&&i.createElement(Ct.Provider,{value:e},t),[t,e])}function W(e,{relative:t}={}){let{matches:r}=i.useContext(L),{pathname:n}=k(),a=JSON.stringify(ne(r));return i.useMemo(()=>K(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Pt(e,t){return Oe(e,t)}function Oe(e,t,r){E(_(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=i.useContext(C),{matches:a}=i.useContext(L),o=a[a.length-1],l=o?o.params:{},s=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let h=c&&c.path||"";Ie(s,!c||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${h}">) 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. 2 3Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let d=k(),f;if(t){let h=typeof t=="string"?N(t):t;E(u==="/"||h.pathname?.startsWith(u),`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 "${u}" but pathname "${h.pathname}" was given in the \`location\` prop.`),f=h}else f=d;let p=f.pathname||"/",g=p;if(u!=="/"){let h=u.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(h.length).join("/")}let y=Ee(e,{pathname:g});b(c||y!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),b(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let m=Ft(y&&y.map(h=>Object.assign({},h,{params:Object.assign({},l,h.params),pathname:P([u,n.encodeLocation?n.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?u:P([u,n.encodeLocation?n.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),a,r);return t&&m?i.createElement(B.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...f},navigationType:"POP"}},m):m}function Lt(){let e=_t(),t=dt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},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
3Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var kt=i.createElement(Lt,null),Ne=class extends i.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||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.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"){const r=Et(e.digest);r&&(e=r)}let t=e!==void 0?i.createElement(L.Provider,{value:this.props.routeContext},i.createElement(ae.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement($t,{error:e},t):t}};Ne.contextType=ke;var Q=new WeakMap;function $t({children:e,error:t}){let{basename:r}=i.useContext(C);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=wt(t.digest);if(n){let a=Q.get(t);if(a)throw a;let o=Pe(n.location,r);if(be&&!Q.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw Q.set(t,l),l}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Tt({routeContext:e,match:t,children:r}){let n=i.useContext(I);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(L.Provider,{value:e},r)}function Ft(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let d=a.findIndex(f=>f.route.id&&o?.[f.route.id]!==void 0);E(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,s=-1;if(r&&n){l=n.renderFallback;for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(s=d),f.route.id){let{loaderData:p,errors:g}=n,y=f.route.loader&&!p.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||y){r.isStatic&&(l=!0),s>=0?a=a.slice(0,s+1):a=[a[0]];break}}}}let u=r?.onError,c=n&&u?(d,f)=>{u(d,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:ht(n.matches),errorInfo:f})}:void 0;return a.reduceRight((d,f,p)=>{let g,y=!1,m=null,h=null;n&&(g=o&&f.route.id?o[f.route.id]:void 0,m=f.route.errorElement||kt,l&&(s<0&&p===0?(Ie("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,h=null):s===p&&(y=!0,h=f.route.hydrateFallbackElement||null)));let v=t.concat(a.slice(0,p+1)),R=()=>{let w;return g?w=m:y?w=h:f.route.Component?w=i.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,i.createElement(Tt,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?i.createElement(Ne,{location:n.location,revalidation:n.revalidation,component:m,error:g,children:R(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:c}):R()},null)}function le(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dt(e){let t=i.useContext(I);return E(t,le(e)),t}function Ot(e){let t=i.useContext(Y);return E(t,le(e)),t}function Nt(e){let t=i.useContext(L);return E(t,le(e)),t}function ie(e){let t=Nt(e),r=t.matches[t.matches.length-1];return E(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function It(){return ie("useRouteId")}function _t(){let e=i.useContext(ae),t=Ot("useRouteError"),r=ie("useRouteError");return e!==void 0?e:t.errors?.[r]}function At(){let{router:e}=Dt("useNavigate"),t=ie("useNavigate"),r=i.useRef(!1);return De(()=>{r.current=!0}),i.useCallback(async(a,o={})=>{b(r.current,Fe),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Re={};function Ie(e,t,r){!t&&!Re[e]&&(Re[e]=!0,b(!1,r))}i.memo(Mt);function Mt({routes:e,future:t,state:r,isStatic:n,onError:a}){return Oe(e,void 0,{state:r,isStatic:n,onError:a})}function Er({to:e,replace:t,state:r,relative:n}){E(_(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=i.useContext(C);b(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=i.useContext(L),{pathname:l}=k(),s=oe(),u=K(e,ne(o),l,n==="path"),c=JSON.stringify(u);return i.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})},[s,c,n,t,r]),null}function xr(e){return bt(e.context)}function Ut(e){E(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Bt({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:l}){E(!_(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=i.useMemo(()=>({basename:s,navigator:a,static:o,unstable_useTransitions:l,future:{}}),[s,a,o,l]);typeof r=="string"&&(r=N(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:g="default",unstable_mask:y}=r,m=i.useMemo(()=>{let h=$(c,s);return h==null?null:{location:{pathname:h,search:d,hash:f,state:p,key:g,unstable_mask:y},navigationType:n}},[s,c,d,f,p,g,n,y]);
3return b(m!=null,`<Router basename="${s}"> is not able to match the URL "${c}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:i.createElement(C.Provider,{value:u},i.createElement(B.Provider,{children:t,value:m}))}function Sr({children:e,location:t}){return Pt(te(e),t)}function te(e,t=[]){let r=[];return i.Children.forEach(e,(n,a)=>{if(!i.isValidElement(n))return;let o=[...t,a];if(n.type===i.Fragment){r.push.apply(r,te(n.props.children,o));return}E(n.type===Ut,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||o.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&&(l.children=te(n.props.children,o)),r.push(l)}),r}var j="get",z="application/x-www-form-urlencoded";function q(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Wt(e){return q(e)&&e.tagName.toLowerCase()==="button"}function Ht(e){return q(e)&&e.tagName.toLowerCase()==="form"}function jt(e){return q(e)&&e.tagName.toLowerCase()==="input"}function zt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vt(e,t){return e.button===0&&(!t||t==="_self")&&!zt(e)}function re(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Jt(e,t){let r=re(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var H=null;function Kt(){if(H===null)try{new FormData(document.createElement("form"),0),H=!1}catch{H=!0}return H}var Yt=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Z(e){return e!=null&&!Yt.has(e)?(b(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${z}"`),null):e}function qt(e,t){let r,n,a,o,l;if(Ht(e)){let s=e.getAttribute("action");n=s?$(s,t):null,r=e.getAttribute("method")||j,a=Z(e.getAttribute("enctype"))||z,o=new FormData(e)}else if(Wt(e)||jt(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||s.getAttribute("action");if(n=u?$(u,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||j,a=Z(e.getAttribute("formenctype"))||Z(s.getAttribute("enctype"))||z,o=new FormData(s,e),!Kt()){let{name:c,type:d,value:f}=e;if(d==="image"){let p=c?`${c}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else c&&o.append(c,f)}}else{if(q(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=j,n=null,a=z,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _e(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&$(a.pathname,t)==="/"?a.pathname=`${J(t)}/_root.${n}`:a.pathname=`${J(a.pathname)}.${n}`,a}async function Gt(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.
3isSpaMode,window.location.reload(),new Promise(()=>{})}}function Xt(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Qt(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await Gt(o,r);return l.links?l.links():[]}return[]}));return rr(n.flat(1).filter(Xt).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function we(e,t,r,n,a,o){let l=(u,c)=>r[c]?u.route.id!==r[c].route.id:!0,s=(u,c)=>r[c].pathname!==u.pathname||r[c].route.path?.endsWith("*")&&r[c].params["*"]!==u.params["*"];return o==="assets"?t.filter((u,c)=>l(u,c)||s(u,c)):o==="data"?t.filter((u,c)=>{let d=n.routes[u.route.id];if(!d||!d.hasLoader)return!1;if(l(u,c)||s(u,c))return!0;if(u.route.shouldRevalidate){let f=u.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Zt(e,t,{includeHydrateFallback:r}={}){return er(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function er(e){return[...new Set(e)]}function tr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function rr(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(tr(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function ue(){let e=i.useContext(I);return se(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function nr(){let e=i.useContext(Y);return se(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ce=i.createContext(void 0);ce.displayName="FrameworkContext";function fe(){let e=i.useContext(ce);return se(e,"You must render this element inside a <HydratedRouter> element"),e}function ar(e,t){let r=i.useContext(ce),[n,a]=i.useState(!1),[o,l]=i.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:f}=t,p=i.useRef(null);i.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let m=v=>{v.forEach(R=>{l(R.isIntersecting)})},h=new IntersectionObserver(m,{threshold:.5});return p.current&&h.observe(p.current),()=>{h.disconnect()}}},[e]),i.useEffect(()=>{if(n){let m=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(m)}}},[n]);let g=()=>{a(!0)},y=()=>{a(!1),l(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:M(s,g),onBlur:M(u,y),onMouseEnter:M(c,g),onMouseLeave:M(d,y),onTouchStart:M(f,g)}]:[!1,p,{}]}function M(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function or({page:e,...t}){let r=mt(),{router:n}=ue(),a=i.useMemo(()=>Ee(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?r?i.createElement(ir,{page:e,matches:a,...t}):i.createElement(sr,{page:e,matches:a,...t}):null}function lr(e){let{manifest:t,routeModules:r}=fe(),[n,a]=i.useState([]);return i.useEffect(()=>{let o=!1;return Qt(e,t,r).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,r]),n}function ir({page:e,matches:t,...r}){let n=k(),{future:a}=fe(),{basename:o}=ue(),l=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let s=_e(e,o,a.unstable_trailingSlashAwareDataRequests,"rsc"),u=!1,c=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?u=!0:c.push(d.route.id);return u&&c.length>0&&s.searchParams.set("_routes",c.join(",")),[s.pathname+s.search]},[o,a.unstable_trailingSlashAwareDataRequests,e,n,t]);return i.createElement(i.Fragment,null,l.map(s=>i.createElement("link",{key:s,rel:"prefetch",as:"fetch",href:s,...r})))}function sr({page:e,matches:t,...r}){let n=k(),{future:a,manifest:o,routeModules:l}=fe(),{basename:s}=ue(),{loaderData:u,matches:c}=nr(),d=i.useMemo(()=>we(e,t,c,o,n,"data"),[e,t,c,o,n]),f=i.useMemo(()=>we(e,t,c,o,n,"assets"),[e,t,c,o,n]),p=i.useMemo(()=>
3{if(e===n.pathname+n.search+n.hash)return[];let m=new Set,h=!1;if(t.forEach(R=>{let w=o.routes[R.route.id];!w||!w.hasLoader||(!d.some(S=>S.route.id===R.route.id)&&R.route.id in u&&l[R.route.id]?.shouldRevalidate||w.hasClientLoader?h=!0:m.add(R.route.id))}),m.size===0)return[];let v=_e(e,s,a.unstable_trailingSlashAwareDataRequests,"data");return h&&m.size>0&&v.searchParams.set("_routes",t.filter(R=>m.has(R.route.id)).map(R=>R.route.id).join(",")),[v.pathname+v.search]},[s,a.unstable_trailingSlashAwareDataRequests,u,n,o,d,t,e,l]),g=i.useMemo(()=>Zt(f,o),[f,o]),y=lr(f);return i.createElement(i.Fragment,null,p.map(m=>i.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...r})),g.map(m=>i.createElement("link",{key:m,rel:"modulepreload",href:m,...r})),y.map(({key:m,link:h})=>i.createElement("link",{key:m,nonce:r.nonce,...h,crossOrigin:h.crossOrigin??r.crossOrigin})))}function ur(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var cr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cr&&(window.__reactRouterVersion="7.14.1")}catch{}function Cr({basename:e,children:t,unstable_useTransitions:r,window:n}){let a=i.useRef();a.current==null&&(a.current=He({window:n,v5Compat:!0}));let o=a.current,[l,s]=i.useState({action:o.action,location:o.location}),u=i.useCallback(c=>{r===!1?s(c):i.startTransition(()=>s(c))},[r]);return i.useLayoutEffect(()=>o.listen(u),[o,u]),i.createElement(Bt,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:r})}var Ae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Me=i.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:l,unstable_mask:s,state:u,target:c,to:d,preventScrollReset:f,viewTransition:p,unstable_defaultShouldRevalidate:g,...y},m){let{basename:h,navigator:v,unstable_useTransitions:R}=i.useContext(C),w=typeof d=="string"&&Ae.test(d),S=Pe(d,h);d=S.to;let x=xt(d,{relative:a}),T=k(),F=null;if(s){let D=K(s,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);h!=="/"&&(D.pathname=D.pathname==="/"?h:P([h,D.pathname])),F=v.createHref(D)}let[O,A,G]=ar(n,y),Be=pr(d,{replace:l,unstable_mask:s,state:u,target:c,preventScrollReset:f,relative:a,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:R});function We(D){t&&t(D),D.defaultPrevented||Be(D)}let de=!(S.isExternal||o),he=i.createElement("a",{...y,...G,href:(de?F:void 0)||S.absoluteURL||x,onClick:de?We:t,ref:ur(m,A),target:c,"data-discover":!w&&r==="render"?"true":void 0});return O&&!w?i.createElement(i.Fragment,null,he,i.createElement(or,{page:x})):he});Me.displayName="Link";var fr=i.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:l,viewTransition:s,children:u,...c},d){let f=W(l,{relative:c.relative}),p=k(),g=i.useContext(Y),{navigator:y,basename:m}=i.useContext(C),h=g!=null&&Rr(f)&&s===!0,v=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,R=p.pathname,w=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(R=R.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&m&&(w=$(w,m)||w);const S=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let x=R===v||!a&&R.startsWith(v)&&R.charAt(S)==="/",T=w!=null&&(w===v||!a&&w.startsWith(v)&&w.charAt(v.length)==="/"),F={isActive:x,isPending:T,isTransitioning:h},O=x?t:void 0,A;typeof n=="function"?A=n(F):A=[n,x?"active":null,T?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let G=typeof o=="function"?o(F):o;return i.createElement(Me,{...c,"aria-current":O,className:A,ref:d,style:G,to:l,viewTransition:s},typeof u=="function"?u(F):u)});fr.displayName="NavLink";var dr=i.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:l=j,action:s,onSubmit:u,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...g},y)=>{let{unstable_useTransitions:m}=i.useContext(C),h=gr(),v=vr(s,{relative:c}
3),R=l.toLowerCase()==="get"?"get":"post",w=typeof s=="string"&&Ae.test(s),S=x=>{if(u&&u(x),x.defaultPrevented)return;x.preventDefault();let T=x.nativeEvent.submitter,F=T?.getAttribute("formmethod")||l,O=()=>h(T||x.currentTarget,{fetcherKey:t,method:F,navigate:r,replace:a,state:o,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p});m&&r!==!1?i.startTransition(()=>O()):O()};return i.createElement("form",{ref:y,method:R,action:v,onSubmit:n?u:S,...g,"data-discover":!w&&e==="render"?"true":void 0})});dr.displayName="Form";function hr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ue(e){let t=i.useContext(I);return E(t,hr(e)),t}function pr(e,{target:t,replace:r,unstable_mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:s,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let d=oe(),f=k(),p=W(e,{relative:l});return i.useCallback(g=>{if(Vt(g,t)){g.preventDefault();let y=r!==void 0?r:U(f)===U(p),m=()=>d(e,{replace:y,unstable_mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:s,unstable_defaultShouldRevalidate:u});c?i.startTransition(()=>m()):m()}},[f,d,p,r,n,a,t,e,o,l,s,u,c])}function br(e){b(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(re(e)),r=i.useRef(!1),n=k(),a=i.useMemo(()=>Jt(n.search,r.current?null:t.current),[n.search]),o=oe(),l=i.useCallback((s,u)=>{const c=re(typeof s=="function"?s(new URLSearchParams(a)):s);r.current=!0,o("?"+c,u)},[o,a]);return[a,l]}var mr=0,yr=()=>`__${String(++mr)}__`;function gr(){let{router:e}=Ue("useSubmit"),{basename:t}=i.useContext(C),r=It(),n=e.fetch,a=e.navigate;return i.useCallback(async(o,l={})=>{let{action:s,method:u,encType:c,formData:d,body:f}=qt(o,t);if(l.navigate===!1){let p=l.fetcherKey||yr();await n(p,r,l.action||s,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:d,body:f,formMethod:l.method||u,formEncType:l.encType||c,flushSync:l.flushSync})}else await a(l.action||s,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:d,body:f,formMethod:l.method||u,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[n,a,t,r])}function vr(e,{relative:t}={}){let{basename:r}=i.useContext(C),n=i.useContext(L);E(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...W(e||".",{relative:t})},l=k();if(e==null){o.search=l.search;let s=new URLSearchParams(o.search),u=s.getAll("index");if(u.some(d=>d==="")){s.delete("index"),u.filter(f=>f).forEach(f=>s.append("index",f));let d=s.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:P([r,o.pathname])),U(o)}function Rr(e,{relative:t}={}){let r=i.useContext($e);E(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Ue("useViewTransitionState"),a=W(e,{relative:t});if(!r.isTransitioning)return!1;let o=$(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=$(r.nextLocation.pathname,n)||r.nextLocation.pathname;return V(a.pathname,l)!=null||V(a.pathname,o)!=null}export{Cr as B,Me as L,fr as N,xr as O,Sr as R,oe as a,br as b,Ut as c,Er as d,k as u};
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.