vendor: 8,049 bytes, lines 1-10
1import{r}from"./react-Afnsq4RA.js";import{i as g,g as O,r as U,j as y,A,p as T,s as w,m as S,a as z}from"./@remix-run-EmyHsWjj.js";/** 2 * React Router v6.30.2 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 */function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},N.apply(this,arguments)}const B=r.createContext(null),W=r.createContext(null),E=r.createContext(null),I=r.createContext(null),p=r.createContext({outlet:null,matches:[],isDataRoute:!1}),D=r.createContext(null);function ue(e,t){let{relative:n}=t===void 0?{}:t;P()||g(!1);let{basename:a,navigator:i}=r.useContext(E),{hash:u,pathname:o,search:d}=K(e,{relative:n}),c=o;return a!=="/"&&(c=o==="/"?a:y([a,o])),i.createHref({pathname:c,search:d,hash:u})}function P(){return r.useContext(I)!=null}function R(){return P()||g(!1),r.useContext(I).location}function _(e){r.useContext(E).static||r.useLayoutEffect(e)}function $(){let{isDataRoute:e}=r.useContext(p);return e?le():V()}function V(){P()||g(!1);let e=r.useContext(B),{basename:t,future:n,navigator:a}=r.useContext(E),{matches:i}=r.useContext(p),{pathname:u}=R(),o=JSON.stringify(O(i,n.v7_relativeSplatPath)),d=r.useRef(!1);return _(()=>{d.current=!0}),r.useCallback(function(f,s){if(s===void 0&&(s={}),!d.current)return;if(typeof f=="number"){a.go(f);return}let l=U(f,JSON.parse(o),u,s.relative==="path");e==null&&t!=="/"&&(l.pathname=l.pathname==="/"?t:y([t,l.pathname])),(s.replace?a.replace:a.push)(l,s.state,s)},[t,a,o,u,e])}const q=r.createContext(null);function G(e){let t=r.useContext(p).outlet;return t&&r.createElement(q.Provider,{value:e},t)}function ce(){let{matches:e}=r.useContext(p),t=e[e.length-1];return t?t.params:{}}function K(e,t){let{relative:n}=t===void 0?{}:t,{future:a}=r.useContext(E),{matches:i}=r.useContext(p),{pathname:u}=R(),o=JSON.stringify(O(i,a.v7_relativeSplatPath));return r.useMemo(()=>U(e,JSON.parse(o),u,n==="path"),[e,o,u,n])}function de(e,t){return Q(e)}function Q(e,t,n,a){P()||g(!1);let{navigator:i}=r.useContext(E),{matches:u}=r.useContext(p),o=u[u.length-1],d=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let f=R(),s;s=f;let l=s.pathname||"/",m=l;if(c!=="/"){let v=c.replace(/^\//,"").split("/");m="/"+l.replace(/^\//,"").split("/").slice(v.length).join("/")}let h=S(e,{pathname:m});return ee(h&&h.map(v=>Object.assign({},v,{params:Object.assign({},d,v.params),pathname:y([c,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:y([c,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),u,n,a)}function X(){let e=ae(),t=z(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:i},n):null,null)}const Y=r.createElement(X,null);class Z extends r.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?r.createElement(p.Provider,{value:this.props.routeContext},r.createElement(D.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function H(e){let{routeContext:t,match:n,children:a}=e,i=r.useContext(B);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(p.Provider,{value:t},a)}function ee(e,t,n,a){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),a===void 0&&(a=null),e==null){var u;if(!n)return null;if(n.errors)e=n.matches;else if((u=a)!=null&&u.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,d=(i=n)==null?void 0:i.errors;if(d!=null){let s=o.findIndex(l=>l.route.id&&d?.[l.route.id]!==void 0);s>=0||g(!1),o=o.slice(0,Math.min(o.length,s+1))}let c=!1,f=-1;if(n&&a&&a.v7_partialHydration)for(let s=0;s<o.length;s++){let l=o[s];if((l.route.HydrateFallback||l.route.hydrateFallbackElement)&&(f=s),l.route.id){let{loaderData:m,errors:h}=n,C=l.route.loader&&m[l.route.id]===void 0&&(!h||h[l.route.id]===void 0);if(l.route.lazy||C){c=!0,f>=0?o=o.slice(0,f+1):o=[o[0]];break}}}return o.reduceRight((s,l,m)=>{let h,C=!1,v=null,x=null;n&&(h=d&&l.route.id?d[l.route.id]:void 0,v=l.route.errorElement||Y,c&&(f<0&&m===0?(oe("route-fallback"),C=!0,x=null):f===m&&(C=!0,x=l.route.hydrateFallbackElement||null)));let L=t.concat(o.slice(0,m+1)),M=()=>{let b;return h?b=v:C?b=x:l.route.Component?b=r.createElement(l.route.Component,null):l.route.element?b=l.route.element:b=s,r.createElement(H,{match:l,routeContext:{outlet:s,matches:L,isDataRoute:n!=null},children:b})};return n&&(l.route.ErrorBoundary||l.route.errorElement||m===0)?r.createElement(Z,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:M(),routeContext:{outlet:null,matches:L,isDataRoute:!0}}):M()},null)}var k=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(k||{}),J=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(J||{});function te(e){let t=r.useContext(B);return t||g(!1),t}function ne(e){let t=r.useContext(W);return t||g(!1),t}function re(e){let t=r.useContext(p);return t||g(!1),t}function F(e){let t=re(),n=t.matches[t.matches.length-1];return n.route.id||g(!1),n.route.id}function ae(){var e;let t=r.useContext(D),n=ne(),a=F();return t!==void 0?t:(e=n.errors)==null?void 0:e[a]}function le(){let{router:e}=te(k.UseNavigateStable),t=F(J.UseNavigateStable),n=r.useRef(!1);return _(()=>{n.current=!0}),r.useCallback(function(i,u){u===void 0&&(u={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,N({fromRouteId:t},u)))},[e,t])}const j={};function oe(e,t,n){j[e]||(j[e]=!0)}function fe(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath}function ve(e){let{to:t,replace:n,state:a,relative:i}=e;P()||g(!1);let{future:u,static:o}=r.useContext(E),{matches:d}=r.useContext(p),{pathname:c}=R(),f=$(),s=U(t,O(d,u.v7_relativeSplatPath),c,i==="path"),l=JSON.stringify(s);return r.useEffect(()=>f(JSON.parse(l),{replace:n,state:a,relative:i}),[f,l,i,n,a]),null}function me(e){return G(e.context)}function he(e){let{basename:t="/",children:n=null,location:a,navigationType:i=A.Pop,navigator:u,static:o=!1,future:d}=e;P()&&g(!1);let c=t.replace(/^\/*/,"/"),f=r.useMemo(()=>({basename:c,navigator:u,static:o,future:N({v7_relativeSplatPath:!1},d)}),[c,d,u,o]);typeof a=="string"&&(a=T(a));let{pathname:s="/",search:l="",hash:m="",state:h=null,key:C="default"}=a,v=r.useMemo(()=>{let x=w(s,c);return x==null?null:{location:{pathname:x,search:l,hash:m,state:h,key:C},navigationType:i}},[c,s,l,m,h,C,i]);return v==null?null:r.createElement(E.Provider,{value:f},r.createElement(I.Provider,{children:n,value:v}))}new Promise(()=>{});export{W as D,E as N,me as O,he as R,R as a,ue as b,B as c,$ as d,ve as e,ce as f,de as g,fe as l,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.