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