PageSourceSearch

https://sheryians.com/assets/router-DL7lRc6X.js

js sheryians.com collected 2026-10-03 23:18:01 UTC 31,976 bytes, 12 lines download raw bytes

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