@techdocs/cli 1.8.20-next.0 → 1.8.20-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/{cjs/generate-CHbYjdPP.cjs.js → commands/generate/generate.cjs.js} +4 -5
- package/dist/commands/generate/generate.cjs.js.map +1 -0
- package/dist/commands/index.cjs.js +231 -0
- package/dist/commands/index.cjs.js.map +1 -0
- package/dist/{cjs/migrate-Ddd_MQkE.cjs.js → commands/migrate/migrate.cjs.js} +5 -7
- package/dist/commands/migrate/migrate.cjs.js.map +1 -0
- package/dist/{cjs/publish-DH7Mbt7b.cjs.js → commands/publish/publish.cjs.js} +5 -7
- package/dist/commands/publish/publish.cjs.js.map +1 -0
- package/dist/{cjs/mkdocs-HM8xNBvh.cjs.js → commands/serve/mkdocs.cjs.js} +9 -10
- package/dist/commands/serve/mkdocs.cjs.js.map +1 -0
- package/dist/{cjs/serve-QoNUyZPw.cjs.js → commands/serve/serve.cjs.js} +12 -94
- package/dist/commands/serve/serve.cjs.js.map +1 -0
- package/dist/commands/serve/utils.cjs.js +24 -0
- package/dist/commands/serve/utils.cjs.js.map +1 -0
- package/dist/embedded-app/.config-schema.json +541 -141
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{2177.9af93c36.chunk.js → 2177.e1184707.chunk.js} +2 -2
- package/dist/embedded-app/static/{2177.9af93c36.chunk.js.map → 2177.e1184707.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4036.a109c6eb.chunk.js → 4036.c70fd6f0.chunk.js} +2 -2
- package/dist/embedded-app/static/{4036.a109c6eb.chunk.js.map → 4036.c70fd6f0.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9605.7441e12c.chunk.js → 9605.6d4a0d4f.chunk.js} +3 -3
- package/dist/embedded-app/static/{9605.7441e12c.chunk.js.map → 9605.6d4a0d4f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.4da17177.js +553 -0
- package/dist/embedded-app/static/main.4da17177.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.116dde6e.js → module-material-ui.05c1a36a.js} +4 -4
- package/dist/embedded-app/static/{module-material-ui.116dde6e.js.map → module-material-ui.05c1a36a.js.map} +1 -1
- package/dist/embedded-app/static/module-remix-run.e486ee73.js +14 -0
- package/dist/embedded-app/static/module-remix-run.e486ee73.js.map +1 -0
- package/dist/embedded-app/static/{runtime.500b1c12.js → runtime.4da17177.js} +2 -2
- package/dist/embedded-app/static/{runtime.500b1c12.js.map → runtime.4da17177.js.map} +1 -1
- package/dist/embedded-app/static/vendor.4da17177.js +169 -0
- package/dist/embedded-app/static/vendor.4da17177.js.map +1 -0
- package/dist/index.cjs.js +4 -230
- package/dist/index.cjs.js.map +1 -1
- package/dist/{cjs/PublisherConfig-Cn5i8vF5.cjs.js → lib/PublisherConfig.cjs.js} +1 -1
- package/dist/lib/PublisherConfig.cjs.js.map +1 -0
- package/dist/lib/httpServer.cjs.js +93 -0
- package/dist/lib/httpServer.cjs.js.map +1 -0
- package/dist/lib/mkdocsServer.cjs.js +58 -0
- package/dist/lib/mkdocsServer.cjs.js.map +1 -0
- package/dist/lib/run.cjs.js +58 -0
- package/dist/lib/run.cjs.js.map +1 -0
- package/dist/{cjs/utility-CsspJYjU.cjs.js → lib/utility.cjs.js} +1 -1
- package/dist/lib/utility.cjs.js.map +1 -0
- package/dist/package.json.cjs.js +6 -0
- package/dist/package.json.cjs.js.map +1 -0
- package/package.json +7 -7
- package/dist/cjs/PublisherConfig-Cn5i8vF5.cjs.js.map +0 -1
- package/dist/cjs/generate-CHbYjdPP.cjs.js.map +0 -1
- package/dist/cjs/migrate-Ddd_MQkE.cjs.js.map +0 -1
- package/dist/cjs/mkdocs-HM8xNBvh.cjs.js.map +0 -1
- package/dist/cjs/publish-DH7Mbt7b.cjs.js.map +0 -1
- package/dist/cjs/serve-QoNUyZPw.cjs.js.map +0 -1
- package/dist/cjs/utility-CsspJYjU.cjs.js.map +0 -1
- package/dist/cjs/utils-FcpnJ4zG.cjs.js +0 -129
- package/dist/cjs/utils-FcpnJ4zG.cjs.js.map +0 -1
- package/dist/embedded-app/static/main.500b1c12.js +0 -533
- package/dist/embedded-app/static/main.500b1c12.js.map +0 -1
- package/dist/embedded-app/static/module-react-router-dom.bf7ca63f.js +0 -23
- package/dist/embedded-app/static/module-react-router-dom.bf7ca63f.js.map +0 -1
- package/dist/embedded-app/static/module-react-router.fae32787.js +0 -23
- package/dist/embedded-app/static/module-react-router.fae32787.js.map +0 -1
- package/dist/embedded-app/static/vendor.500b1c12.js +0 -151
- package/dist/embedded-app/static/vendor.500b1c12.js.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2754],{18690:(pn,nr,ft)=>{var Y;ft.d(nr,{$P:()=>Ce,AV:()=>Ge,BV:()=>Ht,C5:()=>Ar,Ix:()=>Ne,P1:()=>Pt,Ri:()=>fe,Ye:()=>Ut,Zp:()=>Le,fS:()=>Bt,g:()=>ir,jb:()=>me,qh:()=>gt,sv:()=>Br,x$:()=>jt,zy:()=>Be});var b=ft(14041),V=ft(74808);/**
|
|
2
|
-
* React Router v6.26.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 Ie(){return Ie=Object.assign?Object.assign.bind():function(u){for(var d=1;d<arguments.length;d++){var y=arguments[d];for(var R in y)Object.prototype.hasOwnProperty.call(y,R)&&(u[R]=y[R])}return u},Ie.apply(this,arguments)}const xt=b.createContext(null),ar=b.createContext(null),K=b.createContext(null),me=b.createContext(null),nt=b.createContext(null),xe=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Se=b.createContext(null);function Ce(u,d){let{relative:y}=d===void 0?{}:d;fe()||(0,V.Oi)(!1);let{basename:R,navigator:L}=b.useContext(me),{hash:A,pathname:O,search:X}=jt(u,{relative:y}),re=O;return R!=="/"&&(re=O==="/"?R:(0,V.HS)([R,O])),L.createHref({pathname:re,search:X,hash:A})}function fe(){return b.useContext(nt)!=null}function Be(){return fe()||(0,V.Oi)(!1),b.useContext(nt).location}function G(){return React.useContext(nt).navigationType}function Or(u){fe()||UNSAFE_invariant(!1);let{pathname:d}=Be();return React.useMemo(()=>matchPath(u,UNSAFE_decodePath(d)),[d,u])}const _r=null;function He(u){b.useContext(me).static||b.useLayoutEffect(u)}function Le(){let{isDataRoute:u}=b.useContext(xe);return u?gr():ht()}function ht(){fe()||(0,V.Oi)(!1);let u=b.useContext(xt),{basename:d,future:y,navigator:R}=b.useContext(me),{matches:L}=b.useContext(xe),{pathname:A}=Be(),O=JSON.stringify((0,V.yD)(L,y.v7_relativeSplatPath)),X=b.useRef(!1);return He(()=>{X.current=!0}),b.useCallback(function($,Z){if(Z===void 0&&(Z={}),!X.current)return;if(typeof $=="number"){R.go($);return}let N=(0,V.Gh)($,JSON.parse(O),A,Z.relative==="path");u==null&&d!=="/"&&(N.pathname=N.pathname==="/"?d:(0,V.HS)([d,N.pathname])),(Z.replace?R.replace:R.push)(N,Z.state,Z)},[d,R,O,A,u])}const Tt=b.createContext(null);function or(){return React.useContext(Tt)}function Pt(u){let d=b.useContext(xe).outlet;return d&&b.createElement(Tt.Provider,{value:u},d)}function ir(){let{matches:u}=b.useContext(xe),d=u[u.length-1];return d?d.params:{}}function jt(u,d){let{relative:y}=d===void 0?{}:d,{future:R}=b.useContext(me),{matches:L}=b.useContext(xe),{pathname:A}=Be(),O=JSON.stringify((0,V.yD)(L,R.v7_relativeSplatPath));return b.useMemo(()=>(0,V.Gh)(u,JSON.parse(O),A,y==="path"),[u,O,A,y])}function Ut(u,d){return It(u,d)}function It(u,d,y,R){fe()||(0,V.Oi)(!1);let{navigator:L}=b.useContext(me),{matches:A}=b.useContext(xe),O=A[A.length-1],X=O?O.params:{},re=O?O.pathname:"/",$=O?O.pathnameBase:"/",Z=O&&O.route,N=Be(),se;if(d){var ce;let ve=typeof d=="string"?(0,V.Rr)(d):d;$==="/"||(ce=ve.pathname)!=null&&ce.startsWith($)||(0,V.Oi)(!1),se=ve}else se=N;let De=se.pathname||"/",je=De;if($!=="/"){let ve=$.replace(/^\//,"").split("/");je="/"+De.replace(/^\//,"").split("/").slice(ve.length).join("/")}let Me=(0,V.ue)(u,{pathname:je}),Xe=Nt(Me&&Me.map(ve=>Object.assign({},ve,{params:Object.assign({},X,ve.params),pathname:(0,V.HS)([$,L.encodeLocation?L.encodeLocation(ve.pathname).pathname:ve.pathname]),pathnameBase:ve.pathnameBase==="/"?$:(0,V.HS)([$,L.encodeLocation?L.encodeLocation(ve.pathnameBase).pathname:ve.pathnameBase])})),A,y,R);return d&&Xe?b.createElement(nt.Provider,{value:{location:Ie({pathname:"/",search:"",hash:"",state:null,key:"default"},se),navigationType:V.rc.Pop}},Xe):Xe}function lr(){let u=Ye(),d=(0,V.pX)(u)?u.status+" "+u.statusText:u instanceof Error?u.message:JSON.stringify(u),y=u instanceof Error?u.stack:null,R="rgba(200,200,200, 0.5)",L={padding:"0.5rem",backgroundColor:R},A={padding:"2px 4px",backgroundColor:R};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},d),y?b.createElement("pre",{style:L},y):null,null)}const sr=b.createElement(lr,null);class ur extends b.Component{constructor(d){super(d),this.state={location:d.location,revalidation:d.revalidation,error:d.error}}static getDerivedStateFromError(d){return{error:d}}static getDerivedStateFromProps(d,y){return y.location!==d.location||y.revalidation!=="idle"&&d.revalidation==="idle"?{error:d.error,location:d.location,revalidation:d.revalidation}:{error:d.error!==void 0?d.error:y.error,location:y.location,revalidation:d.revalidation||y.revalidation}}componentDidCatch(d,y){console.error("React Router caught the following error during render",d,y)}render(){return this.state.error!==void 0?b.createElement(xe.Provider,{value:this.props.routeContext},b.createElement(Se.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ft(u){let{routeContext:d,match:y,children:R}=u,L=b.useContext(xt);return L&&L.static&&L.staticContext&&(y.route.errorElement||y.route.ErrorBoundary)&&(L.staticContext._deepestRenderedBoundaryId=y.route.id),b.createElement(xe.Provider,{value:d},R)}function Nt(u,d,y,R){var L;if(d===void 0&&(d=[]),y===void 0&&(y=null),R===void 0&&(R=null),u==null){var A;if(!y)return null;if(y.errors)u=y.matches;else if((A=R)!=null&&A.v7_partialHydration&&d.length===0&&!y.initialized&&y.matches.length>0)u=y.matches;else return null}let O=u,X=(L=y)==null?void 0:L.errors;if(X!=null){let Z=O.findIndex(N=>N.route.id&&X?.[N.route.id]!==void 0);Z>=0||(0,V.Oi)(!1),O=O.slice(0,Math.min(O.length,Z+1))}let re=!1,$=-1;if(y&&R&&R.v7_partialHydration)for(let Z=0;Z<O.length;Z++){let N=O[Z];if((N.route.HydrateFallback||N.route.hydrateFallbackElement)&&($=Z),N.route.id){let{loaderData:se,errors:ce}=y,De=N.route.loader&&se[N.route.id]===void 0&&(!ce||ce[N.route.id]===void 0);if(N.route.lazy||De){re=!0,$>=0?O=O.slice(0,$+1):O=[O[0]];break}}}return O.reduceRight((Z,N,se)=>{let ce,De=!1,je=null,Me=null;y&&(ce=X&&N.route.id?X[N.route.id]:void 0,je=N.route.errorElement||sr,re&&($<0&&se===0?(St("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),De=!0,Me=null):$===se&&(De=!0,Me=N.route.hydrateFallbackElement||null)));let Xe=d.concat(O.slice(0,se+1)),ve=()=>{let Ae;return ce?Ae=je:De?Ae=Me:N.route.Component?Ae=b.createElement(N.route.Component,null):N.route.element?Ae=N.route.element:Ae=Z,b.createElement(Ft,{match:N,routeContext:{outlet:Z,matches:Xe,isDataRoute:y!=null},children:Ae})};return y&&(N.route.ErrorBoundary||N.route.errorElement||se===0)?b.createElement(ur,{location:y.location,revalidation:y.revalidation,component:je,error:ce,children:ve(),routeContext:{outlet:null,matches:Xe,isDataRoute:!0}}):ve()},null)}var pt=function(u){return u.UseBlocker="useBlocker",u.UseRevalidator="useRevalidator",u.UseNavigateStable="useNavigate",u}(pt||{}),be=function(u){return u.UseBlocker="useBlocker",u.UseLoaderData="useLoaderData",u.UseActionData="useActionData",u.UseRouteError="useRouteError",u.UseNavigation="useNavigation",u.UseRouteLoaderData="useRouteLoaderData",u.UseMatches="useMatches",u.UseRevalidator="useRevalidator",u.UseNavigateStable="useNavigate",u.UseRouteId="useRouteId",u}(be||{});function Tr(u){return u+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function mt(u){let d=b.useContext(xt);return d||(0,V.Oi)(!1),d}function Fe(u){let d=b.useContext(ar);return d||(0,V.Oi)(!1),d}function dr(u){let d=b.useContext(xe);return d||(0,V.Oi)(!1),d}function Te(u){let d=dr(u),y=d.matches[d.matches.length-1];return y.route.id||(0,V.Oi)(!1),y.route.id}function cr(){return Te(be.UseRouteId)}function jr(){return Fe(be.UseNavigation).navigation}function At(){let u=mt(pt.UseRevalidator),d=Fe(be.UseRevalidator);return React.useMemo(()=>({revalidate:u.router.revalidate,state:d.revalidation}),[u.router.revalidate,d.revalidation])}function fr(){let{matches:u,loaderData:d}=Fe(be.UseMatches);return React.useMemo(()=>u.map(y=>UNSAFE_convertRouteMatchToUiMatch(y,d)),[u,d])}function hr(){let u=Fe(be.UseLoaderData),d=Te(be.UseLoaderData);if(u.errors&&u.errors[d]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+d+")");return}return u.loaderData[d]}function pr(u){return Fe(be.UseRouteLoaderData).loaderData[u]}function mn(){let u=Fe(be.UseActionData),d=Te(be.UseLoaderData);return u.actionData?u.actionData[d]:void 0}function Ye(){var u;let d=b.useContext(Se),y=Fe(be.UseRouteError),R=Te(be.UseRouteError);return d!==void 0?d:(u=y.errors)==null?void 0:u[R]}function mr(){let u=React.useContext(K);return u?._data}function Ur(){let u=React.useContext(K);return u?._error}let vr=0;function vn(u){let{router:d,basename:y}=mt(pt.UseBlocker),R=Fe(be.UseBlocker),[L,A]=React.useState(""),O=React.useCallback(X=>{if(typeof u!="function")return!!u;if(y==="/")return u(X);let{currentLocation:re,nextLocation:$,historyAction:Z}=X;return u({currentLocation:Ie({},re,{pathname:stripBasename(re.pathname,y)||re.pathname}),nextLocation:Ie({},$,{pathname:stripBasename($.pathname,y)||$.pathname}),historyAction:Z})},[y,u]);return React.useEffect(()=>{let X=String(++vr);return A(X),()=>d.deleteBlocker(X)},[d]),React.useEffect(()=>{L!==""&&d.getBlocker(L,O)},[d,L,O]),L&&R.blockers.has(L)?R.blockers.get(L):IDLE_BLOCKER}function gr(){let{router:u}=mt(pt.UseNavigateStable),d=Te(be.UseNavigateStable),y=b.useRef(!1);return He(()=>{y.current=!0}),b.useCallback(function(L,A){A===void 0&&(A={}),y.current&&(typeof L=="number"?u.navigate(L):u.navigate(L,Ie({fromRouteId:d},A)))},[u,d])}const yr={};function St(u,d,y){!d&&!yr[u]&&(yr[u]=!0)}const vt=(Y||(Y=ft.t(b,2)))["startTransition"];function Fr(u){let{fallbackElement:d,router:y,future:R}=u,[L,A]=React.useState(y.state),{v7_startTransition:O}=R||{},X=React.useCallback(N=>{O&&vt?vt(()=>A(N)):A(N)},[A,O]);React.useLayoutEffect(()=>y.subscribe(X),[y,X]),React.useEffect(()=>{},[]);let re=React.useMemo(()=>({createHref:y.createHref,encodeLocation:y.encodeLocation,go:N=>y.navigate(N),push:(N,se,ce)=>y.navigate(N,{state:se,preventScrollReset:ce?.preventScrollReset}),replace:(N,se,ce)=>y.navigate(N,{replace:!0,state:se,preventScrollReset:ce?.preventScrollReset})}),[y]),$=y.basename||"/",Z=React.useMemo(()=>({router:y,navigator:re,static:!1,basename:$}),[y,re,$]);return React.createElement(React.Fragment,null,React.createElement(xt.Provider,{value:Z},React.createElement(ar.Provider,{value:L},React.createElement(Ne,{basename:$,location:L.location,navigationType:L.historyAction,navigator:re,future:{v7_relativeSplatPath:y.future.v7_relativeSplatPath}},L.initialized||y.future.v7_partialHydration?React.createElement(Nr,{routes:y.routes,future:y.future,state:L}):d))),null)}function Nr(u){let{routes:d,future:y,state:R}=u;return It(d,void 0,R,y)}function Bt(u){let{basename:d,children:y,initialEntries:R,initialIndex:L,future:A}=u,O=b.useRef();O.current==null&&(O.current=(0,V.sC)({initialEntries:R,initialIndex:L,v5Compat:!0}));let X=O.current,[re,$]=b.useState({action:X.action,location:X.location}),{v7_startTransition:Z}=A||{},N=b.useCallback(se=>{Z&&vt?vt(()=>$(se)):$(se)},[$,Z]);return b.useLayoutEffect(()=>X.listen(N),[X,N]),b.createElement(Ne,{basename:d,children:y,location:re.location,navigationType:re.action,navigator:X,future:A})}function Ar(u){let{to:d,replace:y,state:R,relative:L}=u;fe()||(0,V.Oi)(!1);let{future:A,static:O}=b.useContext(me),{matches:X}=b.useContext(xe),{pathname:re}=Be(),$=Le(),Z=(0,V.Gh)(d,(0,V.yD)(X,A.v7_relativeSplatPath),re,L==="path"),N=JSON.stringify(Z);return b.useEffect(()=>$(JSON.parse(N),{replace:y,state:R,relative:L}),[$,N,L,y,R]),null}function Br(u){return Pt(u.context)}function gt(u){(0,V.Oi)(!1)}function Ne(u){let{basename:d="/",children:y=null,location:R,navigationType:L=V.rc.Pop,navigator:A,static:O=!1,future:X}=u;fe()&&(0,V.Oi)(!1);let re=d.replace(/^\/*/,"/"),$=b.useMemo(()=>({basename:re,navigator:A,static:O,future:Ie({v7_relativeSplatPath:!1},X)}),[re,X,A,O]);typeof R=="string"&&(R=(0,V.Rr)(R));let{pathname:Z="/",search:N="",hash:se="",state:ce=null,key:De="default"}=R,je=b.useMemo(()=>{let Me=(0,V.pb)(Z,re);return Me==null?null:{location:{pathname:Me,search:N,hash:se,state:ce,key:De},navigationType:L}},[re,Z,N,se,ce,De,L]);return je==null?null:b.createElement(me.Provider,{value:$},b.createElement(nt.Provider,{children:y,value:je}))}function Ht(u){let{children:d,location:y}=u;return Ut(Ge(d),y)}function Hr(u){let{children:d,errorElement:y,resolve:R}=u;return React.createElement(Rr,{resolve:R,errorElement:y},React.createElement(wr,null,d))}var Ee=function(u){return u[u.pending=0]="pending",u[u.success=1]="success",u[u.error=2]="error",u}(Ee||{});const br=new Promise(()=>{});class Rr extends b.Component{constructor(d){super(d),this.state={error:null}}static getDerivedStateFromError(d){return{error:d}}componentDidCatch(d,y){console.error("<Await> caught the following error during render",d,y)}render(){let{children:d,errorElement:y,resolve:R}=this.props,L=null,A=Ee.pending;if(!(R instanceof Promise))A=Ee.success,L=Promise.resolve(),Object.defineProperty(L,"_tracked",{get:()=>!0}),Object.defineProperty(L,"_data",{get:()=>R});else if(this.state.error){A=Ee.error;let O=this.state.error;L=Promise.reject().catch(()=>{}),Object.defineProperty(L,"_tracked",{get:()=>!0}),Object.defineProperty(L,"_error",{get:()=>O})}else R._tracked?(L=R,A="_error"in L?Ee.error:"_data"in L?Ee.success:Ee.pending):(A=Ee.pending,Object.defineProperty(R,"_tracked",{get:()=>!0}),L=R.then(O=>Object.defineProperty(R,"_data",{get:()=>O}),O=>Object.defineProperty(R,"_error",{get:()=>O})));if(A===Ee.error&&L._error instanceof V.tH)throw br;if(A===Ee.error&&!y)throw L._error;if(A===Ee.error)return b.createElement(K.Provider,{value:L,children:y});if(A===Ee.success)return b.createElement(K.Provider,{value:L,children:d});throw L}}function wr(u){let{children:d}=u,y=mr(),R=typeof d=="function"?d(y):d;return React.createElement(React.Fragment,null,R)}function Ge(u,d){d===void 0&&(d=[]);let y=[];return b.Children.forEach(u,(R,L)=>{if(!b.isValidElement(R))return;let A=[...d,L];if(R.type===b.Fragment){y.push.apply(y,Ge(R.props.children,A));return}R.type!==gt&&(0,V.Oi)(!1),!R.props.index||!R.props.children||(0,V.Oi)(!1);let O={id:R.props.id||A.join("-"),caseSensitive:R.props.caseSensitive,element:R.props.element,Component:R.props.Component,index:R.props.index,path:R.props.path,loader:R.props.loader,action:R.props.action,errorElement:R.props.errorElement,ErrorBoundary:R.props.ErrorBoundary,hasErrorBoundary:R.props.ErrorBoundary!=null||R.props.errorElement!=null,shouldRevalidate:R.props.shouldRevalidate,handle:R.props.handle,lazy:R.props.lazy};R.props.children&&(O.children=Ge(R.props.children,A)),y.push(O)}),y}function zr(u){return Nt(u)}function at(u){let d={hasErrorBoundary:u.ErrorBoundary!=null||u.errorElement!=null};return u.Component&&Object.assign(d,{element:React.createElement(u.Component),Component:void 0}),u.HydrateFallback&&Object.assign(d,{hydrateFallbackElement:React.createElement(u.HydrateFallback),HydrateFallback:void 0}),u.ErrorBoundary&&Object.assign(d,{errorElement:React.createElement(u.ErrorBoundary),ErrorBoundary:void 0}),d}function zt(u,d){return createRouter({basename:d?.basename,future:Ie({},d?.future,{v7_prependBasename:!0}),history:createMemoryHistory({initialEntries:d?.initialEntries,initialIndex:d?.initialIndex}),hydrationData:d?.hydrationData,routes:u,mapRouteProperties:at,unstable_dataStrategy:d?.unstable_dataStrategy,unstable_patchRoutesOnNavigation:d?.unstable_patchRoutesOnNavigation}).initialize()}},74808:(pn,nr,ft)=>{ft.d(nr,{AO:()=>Ce,Gh:()=>pr,HS:()=>Ye,Oi:()=>K,Rr:()=>fe,o1:()=>cr,pX:()=>Ne,pb:()=>Te,rc:()=>b,sC:()=>Ie,tH:()=>St,tW:()=>Tr,ue:()=>Le,yD:()=>hr});/**
|
|
11
|
-
* @remix-run/router v1.19.2
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Remix Software Inc.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
17
|
-
*
|
|
18
|
-
* @license MIT
|
|
19
|
-
*/function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(this,arguments)}var b;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(b||(b={}));const V="popstate";function Ie(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((m,S)=>D(m,typeof m=="string"?null:m.state,S===0?"default":void 0));let s=f(r??a.length-1),l=b.Pop,h=null;function f(m){return Math.min(Math.max(m,0),a.length-1)}function v(){return a[s]}function D(m,S,x){S===void 0&&(S=null);let T=Se(a?v().pathname:"/",m,S,x);return me(T.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(m)),T}function w(m){return typeof m=="string"?m:Ce(m)}return{get index(){return s},get action(){return l},get location(){return v()},createHref:w,createURL(m){return new URL(w(m),"http://localhost")},encodeLocation(m){let S=typeof m=="string"?fe(m):m;return{pathname:S.pathname||"",search:S.search||"",hash:S.hash||""}},push(m,S){l=b.Push;let x=D(m,S);s+=1,a.splice(s,a.length,x),n&&h&&h({action:l,location:x,delta:1})},replace(m,S){l=b.Replace;let x=D(m,S);a[s]=x,n&&h&&h({action:l,location:x,delta:0})},go(m){l=b.Pop;let S=f(s+m),x=a[S];s=S,h&&h({action:l,location:x,delta:m})},listen(m){return h=m,()=>{h=null}}}}function xt(e){e===void 0&&(e={});function t(n,a){let{pathname:s,search:l,hash:h}=n.location;return Se("",{pathname:s,search:l,hash:h},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Ce(a)}return Be(t,r,null,e)}function ar(e){e===void 0&&(e={});function t(a,s){let{pathname:l="/",search:h="",hash:f=""}=fe(a.location.hash.substr(1));return!l.startsWith("/")&&!l.startsWith(".")&&(l="/"+l),Se("",{pathname:l,search:h,hash:f},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(a,s){let l=a.document.querySelector("base"),h="";if(l&&l.getAttribute("href")){let f=a.location.href,v=f.indexOf("#");h=v===-1?f:f.slice(0,v)}return h+"#"+(typeof s=="string"?s:Ce(s))}function n(a,s){me(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(s)+")")}return Be(t,r,n,e)}function K(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function me(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nt(){return Math.random().toString(36).substr(2,8)}function xe(e,t){return{usr:e.state,key:e.key,idx:t}}function Se(e,t,r,n){return r===void 0&&(r=null),Y({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?fe(t):t,{state:r,key:t&&t.key||n||nt()})}function Ce(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function fe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Be(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,l=a.history,h=b.Pop,f=null,v=D();v==null&&(v=0,l.replaceState(Y({},l.state,{idx:v}),""));function D(){return(l.state||{idx:null}).idx}function w(){h=b.Pop;let T=D(),z=T==null?null:T-v;v=T,f&&f({action:h,location:x.location,delta:z})}function _(T,z){h=b.Push;let I=Se(x.location,T,z);r&&r(I,T),v=D()+1;let k=xe(I,v),E=x.createHref(I);try{l.pushState(k,"",E)}catch(ae){if(ae instanceof DOMException&&ae.name==="DataCloneError")throw ae;a.location.assign(E)}s&&f&&f({action:h,location:x.location,delta:1})}function m(T,z){h=b.Replace;let I=Se(x.location,T,z);r&&r(I,T),v=D();let k=xe(I,v),E=x.createHref(I);l.replaceState(k,"",E),s&&f&&f({action:h,location:x.location,delta:0})}function S(T){let z=a.location.origin!=="null"?a.location.origin:a.location.href,I=typeof T=="string"?T:Ce(T);return I=I.replace(/ $/,"%20"),K(z,"No window.location.(origin|href) available to create URL for href: "+I),new URL(I,z)}let x={get action(){return h},get location(){return e(a,l)},listen(T){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(V,w),f=T,()=>{a.removeEventListener(V,w),f=null}},createHref(T){return t(a,T)},createURL:S,encodeLocation(T){let z=S(T);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:_,replace:m,go(T){return l.go(T)}};return x}var G;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(G||(G={}));const Or=new Set(["lazy","caseSensitive","path","id","index","children"]);function _r(e){return e.index===!0}function He(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,s)=>{let l=[...r,String(s)],h=typeof a.id=="string"?a.id:l.join("-");if(K(a.index!==!0||!a.children,"Cannot specify children on an index route"),K(!n[h],'Found a route id collision on id "'+h+`". Route id's must be globally unique within Data Router usages`),_r(a)){let f=Y({},a,t(a),{id:h});return n[h]=f,f}else{let f=Y({},a,t(a),{id:h,children:void 0});return n[h]=f,a.children&&(f.children=He(a.children,t,l,n)),f}})}function Le(e,t,r){return r===void 0&&(r="/"),ht(e,t,r,!1)}function ht(e,t,r,n){let a=typeof t=="string"?fe(t):t,s=Te(a.pathname||"/",r);if(s==null)return null;let l=or(e);ir(l);let h=null;for(let f=0;h==null&&f<l.length;++f){let v=dr(s);h=be(l[f],v,n)}return h}function Tt(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function or(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(s,l,h)=>{let f={relativePath:h===void 0?s.path||"":h,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};f.relativePath.startsWith("/")&&(K(f.relativePath.startsWith(n),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(n.length));let v=Ye([n,f.relativePath]),D=r.concat(f);s.children&&s.children.length>0&&(K(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+v+'".')),or(s.children,t,D,v)),!(s.path==null&&!s.index)&&t.push({path:v,score:Nt(v,s.index),routesMeta:D})};return e.forEach((s,l)=>{var h;if(s.path===""||!((h=s.path)!=null&&h.includes("?")))a(s,l);else for(let f of Pt(s.path))a(s,l,f)}),t}function Pt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return a?[s,""]:[s];let l=Pt(n.join("/")),h=[];return h.push(...l.map(f=>f===""?s:[s,f].join("/"))),a&&h.push(...l),h.map(f=>e.startsWith("/")&&f===""?"/":f)}function ir(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:pt(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const jt=/^:[\w-]+$/,Ut=3,It=2,lr=1,sr=10,ur=-2,Ft=e=>e==="*";function Nt(e,t){let r=e.split("/"),n=r.length;return r.some(Ft)&&(n+=ur),t&&(n+=It),r.filter(a=>!Ft(a)).reduce((a,s)=>a+(jt.test(s)?Ut:s===""?lr:sr),n)}function pt(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 be(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},s="/",l=[];for(let h=0;h<n.length;++h){let f=n[h],v=h===n.length-1,D=s==="/"?t:t.slice(s.length)||"/",w=mt({path:f.relativePath,caseSensitive:f.caseSensitive,end:v},D),_=f.route;if(!w&&v&&r&&!n[n.length-1].route.index&&(w=mt({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},D)),!w)return null;Object.assign(a,w.params),l.push({params:a,pathname:Ye([s,w.pathname]),pathnameBase:mr(Ye([s,w.pathnameBase])),route:_}),w.pathnameBase!=="/"&&(s=Ye([s,w.pathnameBase]))}return l}function Tr(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(me(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=l=>l==null?"":typeof l=="string"?l:String(l),s=r.split(/\/+/).map((l,h,f)=>{if(h===f.length-1&&l==="*")return a(t["*"]);const D=l.match(/^:([\w-]+)(\??)$/);if(D){const[,w,_]=D;let m=t[w];return K(_==="?"||m!=null,'Missing ":'+w+'" param'),a(m)}return l.replace(/\?$/g,"")}).filter(l=>!!l);return n+s.join("/")}function mt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Fe(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],l=s.replace(/(.)\/+$/,"$1"),h=a.slice(1);return{params:n.reduce((v,D,w)=>{let{paramName:_,isOptional:m}=D;if(_==="*"){let x=h[w]||"";l=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const S=h[w];return m&&!S?v[_]=void 0:v[_]=(S||"").replace(/%2F/g,"/"),v},{}),pathname:s,pathnameBase:l,pattern:e}}function Fe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),me(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,h,f)=>(n.push({paramName:h,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function dr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return me(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Te(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)||"/"}function cr(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?fe(e):e;return{pathname:r?r.startsWith("/")?r:jr(r,t):t,search:Ur(n),hash:vr(a)}}function jr(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function At(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 fr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function hr(e,t){let r=fr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function pr(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=fe(e):(a=Y({},e),K(!a.pathname||!a.pathname.includes("?"),At("?","pathname","search",a)),K(!a.pathname||!a.pathname.includes("#"),At("#","pathname","hash",a)),K(!a.search||!a.search.includes("#"),At("#","search","hash",a)));let s=e===""||a.pathname==="",l=s?"/":a.pathname,h;if(l==null)h=r;else{let w=t.length-1;if(!n&&l.startsWith("..")){let _=l.split("/");for(;_[0]==="..";)_.shift(),w-=1;a.pathname=_.join("/")}h=w>=0?t[w]:"/"}let f=cr(a,h),v=l&&l!=="/"&&l.endsWith("/"),D=(s||l===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(v||D)&&(f.pathname+="/"),f}function mn(e){return e===""||e.pathname===""?"/":typeof e=="string"?fe(e).pathname:e.pathname}const Ye=e=>e.join("/").replace(/\/\/+/g,"/"),mr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ur=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vn=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),Y({},n,{headers:a}))};class gr{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function yr(e,t){return new gr(e,typeof t=="number"?{status:t}:t)}class St extends Error{}class Ir{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],K(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((s,l)=>n=l),this.controller=new AbortController;let a=()=>n(new St("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((s,l)=>{let[h,f]=l;return Object.assign(s,{[h]:this.trackPromise(h,f)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof St)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let s=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>s}),this.emit(!1,r),Promise.reject(s)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(s=>{t.removeEventListener("abort",n),(s||this.done)&&a(s)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return K(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:Fr(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function vt(e){return e instanceof Promise&&e._tracked===!0}function Fr(e){if(!vt(e))return e;if(e._error)throw e._error;return e._data}const Nr=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new Ir(t,n)},Bt=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,Y({},n,{headers:a}))},Ar=(e,t)=>{let r=Bt(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},Br=(e,t)=>{let r=Bt(e,t);return r.headers.set("X-Remix-Replace","true"),r};class gt{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Ne(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ht=["post","put","patch","delete"],Hr=new Set(Ht),Ee=["get",...Ht],br=new Set(Ee),Rr=new Set([301,302,303,307,308]),wr=new Set([307,308]),Ge={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},zr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},at={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},zt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,u=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),d="remix-router-transitions";function y(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;K(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let o=e.detectErrorBoundary;a=i=>({hasErrorBoundary:o(i)})}else a=u;let s={},l=He(e.routes,a,void 0,s),h,f=e.basename||"/",v=e.unstable_dataStrategy||ve,D=e.unstable_patchRoutesOnNavigation,w=Y({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),_=null,m=new Set,S=1e3,x=new Set,T=null,z=null,I=null,k=e.hydrationData!=null,E=Le(l,e.history.location,f),ae=null;if(E==null&&!D){let o=ie(404,{pathname:e.history.location.pathname}),{matches:i,route:c}=kt(l);E=i,ae={[c.id]:o}}E&&!e.hydrationData&&Qt(E,l,e.history.location.pathname).active&&(E=null);let ee;if(E)if(E.some(o=>o.route.lazy))ee=!1;else if(!E.some(o=>o.route.loader))ee=!0;else if(w.v7_partialHydration){let o=e.hydrationData?e.hydrationData.loaderData:null,i=e.hydrationData?e.hydrationData.errors:null,c=g=>g.route.loader?typeof g.route.loader=="function"&&g.route.loader.hydrate===!0?!1:o&&o[g.route.id]!==void 0||i&&i[g.route.id]!==void 0:!0;if(i){let g=E.findIndex(C=>i[C.route.id]!==void 0);ee=E.slice(0,g+1).every(c)}else ee=E.every(c)}else ee=e.hydrationData!=null;else if(ee=!1,E=[],w.v7_partialHydration){let o=Qt(null,l,e.history.location.pathname);o.active&&o.matches&&(E=o.matches)}let W,p={historyAction:e.history.action,location:e.history.location,matches:E,initialized:ee,navigation:Ge,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||ae,fetchers:new Map,blockers:new Map},Q=b.Pop,le=!1,J,Re=!1,_e=new Map,Ue=null,bt=!1,lt=!1,Kt=[],Vt=new Set,he=new Map,$t=0,Lt=-1,Rt=new Map,ke=new Set,wt=new Map,Mt=new Map,We=new Set,st=new Map,ut=new Map,Mn=new Map,Jt;function On(){if(_=e.history.listen(o=>{let{action:i,location:c,delta:g}=o;if(Jt){Jt(),Jt=void 0;return}me(ut.size===0||g!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let C=un({currentLocation:p.location,nextLocation:c,historyAction:i});if(C&&g!=null){let U=new Promise(B=>{Jt=B});e.history.go(g*-1),Gt(C,{state:"blocked",location:c,proceed(){Gt(C,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),U.then(()=>e.history.go(g))},reset(){let B=new Map(p.blockers);B.set(C,at),we({blockers:B})}});return}return dt(i,c)}),r){Cn(t,_e);let o=()=>Ln(t,_e);t.addEventListener("pagehide",o),Ue=()=>t.removeEventListener("pagehide",o)}return p.initialized||dt(b.Pop,p.location,{initialHydration:!0}),W}function _n(){_&&_(),Ue&&Ue(),m.clear(),J&&J.abort(),p.fetchers.forEach((o,i)=>Yt(i)),p.blockers.forEach((o,i)=>sn(i))}function Tn(o){return m.add(o),()=>m.delete(o)}function we(o,i){i===void 0&&(i={}),p=Y({},p,o);let c=[],g=[];w.v7_fetcherPersist&&p.fetchers.forEach((C,U)=>{C.state==="idle"&&(We.has(U)?g.push(U):c.push(U))}),[...m].forEach(C=>C(p,{deletedFetchers:g,unstable_viewTransitionOpts:i.viewTransitionOpts,unstable_flushSync:i.flushSync===!0})),w.v7_fetcherPersist&&(c.forEach(C=>p.fetchers.delete(C)),g.forEach(C=>Yt(C)))}function Et(o,i,c){var g,C;let{flushSync:U}=c===void 0?{}:c,B=p.actionData!=null&&p.navigation.formMethod!=null&&Oe(p.navigation.formMethod)&&p.navigation.state==="loading"&&((g=o.state)==null?void 0:g._isRedirect)!==!0,P;i.actionData?Object.keys(i.actionData).length>0?P=i.actionData:P=null:B?P=p.actionData:P=null;let F=i.loaderData?Yr(p.loaderData,i.loaderData,i.matches||[],i.errors):p.loaderData,M=p.blockers;M.size>0&&(M=new Map(M),M.forEach((ne,oe)=>M.set(oe,at)));let j=le===!0||p.navigation.formMethod!=null&&Oe(p.navigation.formMethod)&&((C=o.state)==null?void 0:C._isRedirect)!==!0;h&&(l=h,h=void 0),bt||Q===b.Pop||(Q===b.Push?e.history.push(o,o.state):Q===b.Replace&&e.history.replace(o,o.state));let te;if(Q===b.Pop){let ne=_e.get(p.location.pathname);ne&&ne.has(o.pathname)?te={currentLocation:p.location,nextLocation:o}:_e.has(o.pathname)&&(te={currentLocation:o,nextLocation:p.location})}else if(Re){let ne=_e.get(p.location.pathname);ne?ne.add(o.pathname):(ne=new Set([o.pathname]),_e.set(p.location.pathname,ne)),te={currentLocation:p.location,nextLocation:o}}we(Y({},i,{actionData:P,loaderData:F,historyAction:Q,location:o,initialized:!0,navigation:Ge,revalidation:"idle",restoreScrollPosition:cn(o,i.matches||p.matches),preventScrollReset:j,blockers:M}),{viewTransitionOpts:te,flushSync:U===!0}),Q=b.Pop,le=!1,Re=!1,bt=!1,lt=!1,Kt=[]}async function en(o,i){if(typeof o=="number"){e.history.go(o);return}let c=re(p.location,p.matches,f,w.v7_prependBasename,o,w.v7_relativeSplatPath,i?.fromRouteId,i?.relative),{path:g,submission:C,error:U}=$(w.v7_normalizeFormMethod,!1,c,i),B=p.location,P=Se(p.location,g,i&&i.state);P=Y({},P,e.history.encodeLocation(P));let F=i&&i.replace!=null?i.replace:void 0,M=b.Push;F===!0?M=b.Replace:F===!1||C!=null&&Oe(C.formMethod)&&C.formAction===p.location.pathname+p.location.search&&(M=b.Replace);let j=i&&"preventScrollReset"in i?i.preventScrollReset===!0:void 0,te=(i&&i.unstable_flushSync)===!0,ne=un({currentLocation:B,nextLocation:P,historyAction:M});if(ne){Gt(ne,{state:"blocked",location:P,proceed(){Gt(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:P}),en(o,i)},reset(){let oe=new Map(p.blockers);oe.set(ne,at),we({blockers:oe})}});return}return await dt(M,P,{submission:C,pendingError:U,preventScrollReset:j,replace:i&&i.replace,enableViewTransition:i&&i.unstable_viewTransition,flushSync:te})}function jn(){if(Cr(),we({revalidation:"loading"}),p.navigation.state!=="submitting"){if(p.navigation.state==="idle"){dt(p.historyAction,p.location,{startUninterruptedRevalidation:!0});return}dt(Q||p.historyAction,p.navigation.location,{overrideNavigation:p.navigation,enableViewTransition:Re===!0})}}async function dt(o,i,c){J&&J.abort(),J=null,Q=o,bt=(c&&c.startUninterruptedRevalidation)===!0,Wn(p.location,p.matches),le=(c&&c.preventScrollReset)===!0,Re=(c&&c.enableViewTransition)===!0;let g=h||l,C=c&&c.overrideNavigation,U=Le(g,i,f),B=(c&&c.flushSync)===!0,P=Qt(U,g,i.pathname);if(P.active&&P.matches&&(U=P.matches),!U){let{error:q,notFoundMatches:ge,route:pe}=Lr(i.pathname);Et(i,{matches:ge,loaderData:{},errors:{[pe.id]:q}},{flushSync:B});return}if(p.initialized&&!lt&&yn(p.location,i)&&!(c&&c.submission&&Oe(c.submission.formMethod))){Et(i,{matches:U},{flushSync:B});return}J=new AbortController;let F=yt(e.history,i,J.signal,c&&c.submission),M;if(c&&c.pendingError)M=[ot(U).route.id,{type:G.error,error:c.pendingError}];else if(c&&c.submission&&Oe(c.submission.formMethod)){let q=await Un(F,i,c.submission,U,P.active,{replace:c.replace,flushSync:B});if(q.shortCircuited)return;if(q.pendingActionResult){let[ge,pe]=q.pendingActionResult;if(ye(pe)&&Ne(pe.error)&&pe.error.status===404){J=null,Et(i,{matches:q.matches,loaderData:{},errors:{[ge]:pe.error}});return}}U=q.matches||U,M=q.pendingActionResult,C=Sr(i,c.submission),B=!1,P.active=!1,F=yt(e.history,F.url,F.signal)}let{shortCircuited:j,matches:te,loaderData:ne,errors:oe}=await In(F,i,U,P.active,C,c&&c.submission,c&&c.fetcherSubmission,c&&c.replace,c&&c.initialHydration===!0,B,M);j||(J=null,Et(i,Y({matches:te||U},Gr(M),{loaderData:ne,errors:oe})))}async function Un(o,i,c,g,C,U){U===void 0&&(U={}),Cr();let B=Pn(i,c);if(we({navigation:B},{flushSync:U.flushSync===!0}),C){let M=await Zt(g,i.pathname,o.signal);if(M.type==="aborted")return{shortCircuited:!0};if(M.type==="error"){let{boundaryId:j,error:te}=Xt(i.pathname,M);return{matches:M.partialMatches,pendingActionResult:[j,{type:G.error,error:te}]}}else if(M.matches)g=M.matches;else{let{notFoundMatches:j,error:te,route:ne}=Lr(i.pathname);return{matches:j,pendingActionResult:[ne.id,{type:G.error,error:te}]}}}let P,F=it(g,i);if(!F.route.action&&!F.route.lazy)P={type:G.error,error:ie(405,{method:o.method,pathname:i.pathname,routeId:F.route.id})};else if(P=(await Ot("action",p,o,[F],g,null))[F.route.id],o.signal.aborted)return{shortCircuited:!0};if(Qe(P)){let M;return U&&U.replace!=null?M=U.replace:M=Kr(P.response.headers.get("Location"),new URL(o.url),f)===p.location.pathname+p.location.search,await ct(o,P,!0,{submission:c,replace:M}),{shortCircuited:!0}}if(ze(P))throw ie(400,{type:"defer-action"});if(ye(P)){let M=ot(g,F.route.id);return(U&&U.replace)!==!0&&(Q=b.Push),{matches:g,pendingActionResult:[M.route.id,P]}}return{matches:g,pendingActionResult:[F.route.id,P]}}async function In(o,i,c,g,C,U,B,P,F,M,j){let te=C||Sr(i,U),ne=U||B||qr(te),oe=!bt&&(!w.v7_partialHydration||!F);if(g){if(oe){let ue=tn(j);we(Y({navigation:te},ue!==void 0?{actionData:ue}:{}),{flushSync:M})}let H=await Zt(c,i.pathname,o.signal);if(H.type==="aborted")return{shortCircuited:!0};if(H.type==="error"){let{boundaryId:ue,error:Pe}=Xt(i.pathname,H);return{matches:H.partialMatches,loaderData:{},errors:{[ue]:Pe}}}else if(H.matches)c=H.matches;else{let{error:ue,notFoundMatches:Pe,route:de}=Lr(i.pathname);return{matches:Pe,loaderData:{},errors:{[de.id]:ue}}}}let q=h||l,[ge,pe]=N(e.history,p,c,ne,i,w.v7_partialHydration&&F===!0,w.v7_skipActionErrorRevalidation,lt,Kt,Vt,We,wt,ke,q,f,j);if(Mr(H=>!(c&&c.some(ue=>ue.route.id===H))||ge&&ge.some(ue=>ue.route.id===H)),Lt=++$t,ge.length===0&&pe.length===0){let H=on();return Et(i,Y({matches:c,loaderData:{},errors:j&&ye(j[1])?{[j[0]]:j[1].error}:null},Gr(j),H?{fetchers:new Map(p.fetchers)}:{}),{flushSync:M}),{shortCircuited:!0}}if(oe){let H={};if(!g){H.navigation=te;let ue=tn(j);ue!==void 0&&(H.actionData=ue)}pe.length>0&&(H.fetchers=Fn(pe)),we(H,{flushSync:M})}pe.forEach(H=>{he.has(H.key)&&tt(H.key),H.controller&&he.set(H.key,H.controller)});let _t=()=>pe.forEach(H=>tt(H.key));J&&J.signal.addEventListener("abort",_t);let{loaderResults:Ve,fetcherResults:Dt}=await rn(p,c,ge,pe,o);if(o.signal.aborted)return{shortCircuited:!0};J&&J.signal.removeEventListener("abort",_t),pe.forEach(H=>he.delete(H.key));let rt=Wt(Ve);if(rt)return await ct(o,rt.result,!0,{replace:P}),{shortCircuited:!0};if(rt=Wt(Dt),rt)return ke.add(rt.key),await ct(o,rt.result,!0,{replace:P}),{shortCircuited:!0};let{loaderData:qt,errors:$e}=Jr(p,c,ge,Ve,j,pe,Dt,st);st.forEach((H,ue)=>{H.subscribe(Pe=>{(Pe||H.done)&&st.delete(ue)})}),w.v7_partialHydration&&F&&p.errors&&Object.entries(p.errors).filter(H=>{let[ue]=H;return!ge.some(Pe=>Pe.route.id===ue)}).forEach(H=>{let[ue,Pe]=H;$e=Object.assign($e||{},{[ue]:Pe})});let er=on(),tr=ln(Lt),rr=er||tr||pe.length>0;return Y({matches:c,loaderData:qt,errors:$e},rr?{fetchers:new Map(p.fetchers)}:{})}function tn(o){if(o&&!ye(o[1]))return{[o[0]]:o[1].data};if(p.actionData)return Object.keys(p.actionData).length===0?null:p.actionData}function Fn(o){return o.forEach(i=>{let c=p.fetchers.get(i.key),g=Ct(void 0,c?c.data:void 0);p.fetchers.set(i.key,g)}),new Map(p.fetchers)}function Nn(o,i,c,g){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");he.has(o)&&tt(o);let C=(g&&g.unstable_flushSync)===!0,U=h||l,B=re(p.location,p.matches,f,w.v7_prependBasename,c,w.v7_relativeSplatPath,i,g?.relative),P=Le(U,B,f),F=Qt(P,U,B);if(F.active&&F.matches&&(P=F.matches),!P){Ke(o,i,ie(404,{pathname:B}),{flushSync:C});return}let{path:M,submission:j,error:te}=$(w.v7_normalizeFormMethod,!0,B,g);if(te){Ke(o,i,te,{flushSync:C});return}let ne=it(P,M);if(le=(g&&g.preventScrollReset)===!0,j&&Oe(j.formMethod)){An(o,i,M,ne,P,F.active,C,j);return}wt.set(o,{routeId:i,path:M}),Bn(o,i,M,ne,P,F.active,C,j)}async function An(o,i,c,g,C,U,B,P){Cr(),wt.delete(o);function F(de){if(!de.route.action&&!de.route.lazy){let Je=ie(405,{method:P.formMethod,pathname:c,routeId:i});return Ke(o,i,Je,{flushSync:B}),!0}return!1}if(!U&&F(g))return;let M=p.fetchers.get(o);et(o,Sn(P,M),{flushSync:B});let j=new AbortController,te=yt(e.history,c,j.signal,P);if(U){let de=await Zt(C,c,te.signal);if(de.type==="aborted")return;if(de.type==="error"){let{error:Je}=Xt(c,de);Ke(o,i,Je,{flushSync:B});return}else if(de.matches){if(C=de.matches,g=it(C,c),F(g))return}else{Ke(o,i,ie(404,{pathname:c}),{flushSync:B});return}}he.set(o,j);let ne=$t,q=(await Ot("action",p,te,[g],C,o))[g.route.id];if(te.signal.aborted){he.get(o)===j&&he.delete(o);return}if(w.v7_fetcherPersist&&We.has(o)){if(Qe(q)||ye(q)){et(o,qe(void 0));return}}else{if(Qe(q))if(he.delete(o),Lt>ne){et(o,qe(void 0));return}else return ke.add(o),et(o,Ct(P)),ct(te,q,!1,{fetcherSubmission:P});if(ye(q)){Ke(o,i,q.error);return}}if(ze(q))throw ie(400,{type:"defer-action"});let ge=p.navigation.location||p.location,pe=yt(e.history,ge,j.signal),_t=h||l,Ve=p.navigation.state!=="idle"?Le(_t,p.navigation.location,f):p.matches;K(Ve,"Didn't find any matches after fetcher action");let Dt=++$t;Rt.set(o,Dt);let rt=Ct(P,q.data);p.fetchers.set(o,rt);let[qt,$e]=N(e.history,p,Ve,P,ge,!1,w.v7_skipActionErrorRevalidation,lt,Kt,Vt,We,wt,ke,_t,f,[g.route.id,q]);$e.filter(de=>de.key!==o).forEach(de=>{let Je=de.key,hn=p.fetchers.get(Je),$n=Ct(void 0,hn?hn.data:void 0);p.fetchers.set(Je,$n),he.has(Je)&&tt(Je),de.controller&&he.set(Je,de.controller)}),we({fetchers:new Map(p.fetchers)});let er=()=>$e.forEach(de=>tt(de.key));j.signal.addEventListener("abort",er);let{loaderResults:tr,fetcherResults:rr}=await rn(p,Ve,qt,$e,pe);if(j.signal.aborted)return;j.signal.removeEventListener("abort",er),Rt.delete(o),he.delete(o),$e.forEach(de=>he.delete(de.key));let H=Wt(tr);if(H)return ct(pe,H.result,!1);if(H=Wt(rr),H)return ke.add(H.key),ct(pe,H.result,!1);let{loaderData:ue,errors:Pe}=Jr(p,Ve,qt,tr,void 0,$e,rr,st);if(p.fetchers.has(o)){let de=qe(q.data);p.fetchers.set(o,de)}ln(Dt),p.navigation.state==="loading"&&Dt>Lt?(K(Q,"Expected pending action"),J&&J.abort(),Et(p.navigation.location,{matches:Ve,loaderData:ue,errors:Pe,fetchers:new Map(p.fetchers)})):(we({errors:Pe,loaderData:Yr(p.loaderData,ue,Ve,Pe),fetchers:new Map(p.fetchers)}),lt=!1)}async function Bn(o,i,c,g,C,U,B,P){let F=p.fetchers.get(o);et(o,Ct(P,F?F.data:void 0),{flushSync:B});let M=new AbortController,j=yt(e.history,c,M.signal);if(U){let q=await Zt(C,c,j.signal);if(q.type==="aborted")return;if(q.type==="error"){let{error:ge}=Xt(c,q);Ke(o,i,ge,{flushSync:B});return}else if(q.matches)C=q.matches,g=it(C,c);else{Ke(o,i,ie(404,{pathname:c}),{flushSync:B});return}}he.set(o,M);let te=$t,oe=(await Ot("loader",p,j,[g],C,o))[g.route.id];if(ze(oe)&&(oe=await xr(oe,j.signal,!0)||oe),he.get(o)===M&&he.delete(o),!j.signal.aborted){if(We.has(o)){et(o,qe(void 0));return}if(Qe(oe))if(Lt>te){et(o,qe(void 0));return}else{ke.add(o),await ct(j,oe,!1);return}if(ye(oe)){Ke(o,i,oe.error);return}K(!ze(oe),"Unhandled fetcher deferred data"),et(o,qe(oe.data))}}async function ct(o,i,c,g){let{submission:C,fetcherSubmission:U,replace:B}=g===void 0?{}:g;i.response.headers.has("X-Remix-Revalidate")&&(lt=!0);let P=i.response.headers.get("Location");K(P,"Expected a Location header on the redirect Response"),P=Kr(P,new URL(o.url),f);let F=Se(p.location,P,{_isRedirect:!0});if(r){let q=!1;if(i.response.headers.has("X-Remix-Reload-Document"))q=!0;else if(zt.test(P)){const ge=e.history.createURL(P);q=ge.origin!==t.location.origin||Te(ge.pathname,f)==null}if(q){B?t.location.replace(P):t.location.assign(P);return}}J=null;let M=B===!0||i.response.headers.has("X-Remix-Replace")?b.Replace:b.Push,{formMethod:j,formAction:te,formEncType:ne}=p.navigation;!C&&!U&&j&&te&&ne&&(C=qr(p.navigation));let oe=C||U;if(wr.has(i.response.status)&&oe&&Oe(oe.formMethod))await dt(M,F,{submission:Y({},oe,{formAction:P}),preventScrollReset:le,enableViewTransition:c?Re:void 0});else{let q=Sr(F,C);await dt(M,F,{overrideNavigation:q,fetcherSubmission:U,preventScrollReset:le,enableViewTransition:c?Re:void 0})}}async function Ot(o,i,c,g,C,U){let B,P={};try{B=await Ae(v,o,i,c,g,C,U,s,a)}catch(F){return g.forEach(M=>{P[M.route.id]={type:G.error,error:F}}),P}for(let[F,M]of Object.entries(B))if(Qr(M)){let j=M.result;P[F]={type:G.redirect,response:Wr(j,c,F,C,f,w.v7_relativeSplatPath)}}else P[F]=await kr(M);return P}async function rn(o,i,c,g,C){let U=o.matches,B=Ot("loader",o,C,c,i,null),P=Promise.all(g.map(async j=>{if(j.matches&&j.match&&j.controller){let ne=(await Ot("loader",o,yt(e.history,j.path,j.controller.signal),[j.match],j.matches,j.key))[j.match.route.id];return{[j.key]:ne}}else return Promise.resolve({[j.key]:{type:G.error,error:ie(404,{pathname:j.path})}})})),F=await B,M=(await P).reduce((j,te)=>Object.assign(j,te),{});return await Promise.all([Dn(i,F,C.signal,U,o.loaderData),xn(i,M,g)]),{loaderResults:F,fetcherResults:M}}function Cr(){lt=!0,Kt.push(...Mr()),wt.forEach((o,i)=>{he.has(i)&&(Vt.add(i),tt(i))})}function et(o,i,c){c===void 0&&(c={}),p.fetchers.set(o,i),we({fetchers:new Map(p.fetchers)},{flushSync:(c&&c.flushSync)===!0})}function Ke(o,i,c,g){g===void 0&&(g={});let C=ot(p.matches,i);Yt(o),we({errors:{[C.route.id]:c},fetchers:new Map(p.fetchers)},{flushSync:(g&&g.flushSync)===!0})}function nn(o){return w.v7_fetcherPersist&&(Mt.set(o,(Mt.get(o)||0)+1),We.has(o)&&We.delete(o)),p.fetchers.get(o)||zr}function Yt(o){let i=p.fetchers.get(o);he.has(o)&&!(i&&i.state==="loading"&&Rt.has(o))&&tt(o),wt.delete(o),Rt.delete(o),ke.delete(o),We.delete(o),Vt.delete(o),p.fetchers.delete(o)}function Hn(o){if(w.v7_fetcherPersist){let i=(Mt.get(o)||0)-1;i<=0?(Mt.delete(o),We.add(o)):Mt.set(o,i)}else Yt(o);we({fetchers:new Map(p.fetchers)})}function tt(o){let i=he.get(o);K(i,"Expected fetch controller: "+o),i.abort(),he.delete(o)}function an(o){for(let i of o){let c=nn(i),g=qe(c.data);p.fetchers.set(i,g)}}function on(){let o=[],i=!1;for(let c of ke){let g=p.fetchers.get(c);K(g,"Expected fetcher: "+c),g.state==="loading"&&(ke.delete(c),o.push(c),i=!0)}return an(o),i}function ln(o){let i=[];for(let[c,g]of Rt)if(g<o){let C=p.fetchers.get(c);K(C,"Expected fetcher: "+c),C.state==="loading"&&(tt(c),Rt.delete(c),i.push(c))}return an(i),i.length>0}function zn(o,i){let c=p.blockers.get(o)||at;return ut.get(o)!==i&&ut.set(o,i),c}function sn(o){p.blockers.delete(o),ut.delete(o)}function Gt(o,i){let c=p.blockers.get(o)||at;K(c.state==="unblocked"&&i.state==="blocked"||c.state==="blocked"&&i.state==="blocked"||c.state==="blocked"&&i.state==="proceeding"||c.state==="blocked"&&i.state==="unblocked"||c.state==="proceeding"&&i.state==="unblocked","Invalid blocker state transition: "+c.state+" -> "+i.state);let g=new Map(p.blockers);g.set(o,i),we({blockers:g})}function un(o){let{currentLocation:i,nextLocation:c,historyAction:g}=o;if(ut.size===0)return;ut.size>1&&me(!1,"A router only supports one blocker at a time");let C=Array.from(ut.entries()),[U,B]=C[C.length-1],P=p.blockers.get(U);if(!(P&&P.state==="proceeding")&&B({currentLocation:i,nextLocation:c,historyAction:g}))return U}function Lr(o){let i=ie(404,{pathname:o}),c=h||l,{matches:g,route:C}=kt(c);return Mr(),{notFoundMatches:g,route:C,error:i}}function Xt(o,i){return{boundaryId:ot(i.partialMatches).route.id,error:ie(400,{type:"route-discovery",pathname:o,message:i.error!=null&&"message"in i.error?i.error:String(i.error)})}}function Mr(o){let i=[];return st.forEach((c,g)=>{(!o||o(g))&&(c.cancel(),i.push(g),st.delete(g))}),i}function kn(o,i,c){if(T=o,I=i,z=c||null,!k&&p.navigation===Ge){k=!0;let g=cn(p.location,p.matches);g!=null&&we({restoreScrollPosition:g})}return()=>{T=null,I=null,z=null}}function dn(o,i){return z&&z(o,i.map(g=>Tt(g,p.loaderData)))||o.key}function Wn(o,i){if(T&&I){let c=dn(o,i);T[c]=I()}}function cn(o,i){if(T){let c=dn(o,i),g=T[c];if(typeof g=="number")return g}return null}function Qt(o,i,c){if(D){if(x.has(c))return{active:!1,matches:o};if(o){if(Object.keys(o[0].params).length>0)return{active:!0,matches:ht(i,c,f,!0)}}else return{active:!0,matches:ht(i,c,f,!0)||[]}}return{active:!1,matches:null}}async function Zt(o,i,c){let g=o;for(;;){let C=h==null,U=h||l;try{await je(D,i,g,U,s,a,Mn,c)}catch(F){return{type:"error",error:F,partialMatches:g}}finally{C&&(l=[...l])}if(c.aborted)return{type:"aborted"};let B=Le(U,i,f);if(B)return fn(i,x),{type:"success",matches:B};let P=ht(U,i,f,!0);if(!P||g.length===P.length&&g.every((F,M)=>F.route.id===P[M].route.id))return fn(i,x),{type:"success",matches:null};g=P}}function fn(o,i){if(i.size>=S){let c=i.values().next().value;i.delete(c)}i.add(o)}function Kn(o){s={},h=He(o,a,void 0,s)}function Vn(o,i){let c=h==null;Me(o,i,h||l,s,a),c&&(l=[...l],we({}))}return W={get basename(){return f},get future(){return w},get state(){return p},get routes(){return l},get window(){return t},initialize:On,subscribe:Tn,enableScrollRestoration:kn,navigate:en,fetch:Nn,revalidate:jn,createHref:o=>e.history.createHref(o),encodeLocation:o=>e.history.encodeLocation(o),getFetcher:nn,deleteFetcher:Hn,dispose:_n,getBlocker:zn,deleteBlocker:sn,patchRoutes:Vn,_internalFetchControllers:he,_internalActiveDeferreds:st,_internalSetRoutes:Kn},W}const R=Symbol("deferred");function L(e,t){K(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a;if(t!=null&&t.mapRouteProperties)a=t.mapRouteProperties;else if(t!=null&&t.detectErrorBoundary){let m=t.detectErrorBoundary;a=S=>({hasErrorBoundary:m(S)})}else a=u;let s=Y({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),l=He(e,a,void 0,r);async function h(m,S){let{requestContext:x,skipLoaderErrorBubbling:T,unstable_dataStrategy:z}=S===void 0?{}:S,I=new URL(m.url),k=m.method,E=Se("",Ce(I),null,"default"),ae=Le(l,E,n);if(!Dr(k)&&k!=="HEAD"){let W=ie(405,{method:k}),{matches:p,route:Q}=kt(l);return{basename:n,location:E,matches:p,loaderData:{},actionData:null,errors:{[Q.id]:W},statusCode:W.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!ae){let W=ie(404,{pathname:E.pathname}),{matches:p,route:Q}=kt(l);return{basename:n,location:E,matches:p,loaderData:{},actionData:null,errors:{[Q.id]:W},statusCode:W.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let ee=await v(m,E,ae,x,z||null,T===!0,null);return Ze(ee)?ee:Y({location:E,basename:n},ee)}async function f(m,S){let{routeId:x,requestContext:T,unstable_dataStrategy:z}=S===void 0?{}:S,I=new URL(m.url),k=m.method,E=Se("",Ce(I),null,"default"),ae=Le(l,E,n);if(!Dr(k)&&k!=="HEAD"&&k!=="OPTIONS")throw ie(405,{method:k});if(!ae)throw ie(404,{pathname:E.pathname});let ee=x?ae.find(le=>le.route.id===x):it(ae,E);if(x&&!ee)throw ie(403,{pathname:E.pathname,routeId:x});if(!ee)throw ie(404,{pathname:E.pathname});let W=await v(m,E,ae,T,z||null,!1,ee);if(Ze(W))return W;let p=W.errors?Object.values(W.errors)[0]:void 0;if(p!==void 0)throw p;if(W.actionData)return Object.values(W.actionData)[0];if(W.loaderData){var Q;let le=Object.values(W.loaderData)[0];return(Q=W.activeDeferreds)!=null&&Q[ee.route.id]&&(le[R]=W.activeDeferreds[ee.route.id]),le}}async function v(m,S,x,T,z,I,k){K(m.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(Oe(m.method.toLowerCase()))return await D(m,x,k||it(x,S),T,z,I,k!=null);let E=await w(m,x,T,z,I,k);return Ze(E)?E:Y({},E,{actionData:null,actionHeaders:{}})}catch(E){if(Rn(E)&&Ze(E.result)){if(E.type===G.error)throw E.result;return E.result}if(En(E))return E;throw E}}async function D(m,S,x,T,z,I,k){let E;if(!x.route.action&&!x.route.lazy){let W=ie(405,{method:m.method,pathname:new URL(m.url).pathname,routeId:x.route.id});if(k)throw W;E={type:G.error,error:W}}else E=(await _("action",m,[x],S,k,T,z))[x.route.id],m.signal.aborted&&O(m,k,s);if(Qe(E))throw new Response(null,{status:E.response.status,headers:{Location:E.response.headers.get("Location")}});if(ze(E)){let W=ie(400,{type:"defer-action"});if(k)throw W;E={type:G.error,error:W}}if(k){if(ye(E))throw E.error;return{matches:[x],loaderData:{},actionData:{[x.route.id]:E.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let ae=new Request(m.url,{headers:m.headers,redirect:m.redirect,signal:m.signal});if(ye(E)){let W=I?x:ot(S,x.route.id),p=await w(ae,S,T,z,I,null,[W.route.id,E]);return Y({},p,{statusCode:Ne(E.error)?E.error.status:E.statusCode!=null?E.statusCode:500,actionData:null,actionHeaders:Y({},E.headers?{[x.route.id]:E.headers}:{})})}let ee=await w(ae,S,T,z,I,null);return Y({},ee,{actionData:{[x.route.id]:E.data}},E.statusCode?{statusCode:E.statusCode}:{},{actionHeaders:E.headers?{[x.route.id]:E.headers}:{}})}async function w(m,S,x,T,z,I,k){let E=I!=null;if(E&&!(I!=null&&I.route.loader)&&!(I!=null&&I.route.lazy))throw ie(400,{method:m.method,pathname:new URL(m.url).pathname,routeId:I?.route.id});let ee=(I?[I]:k&&ye(k[1])?Z(S,k[0]):S).filter(J=>J.route.loader||J.route.lazy);if(ee.length===0)return{matches:S,loaderData:S.reduce((J,Re)=>Object.assign(J,{[Re.route.id]:null}),{}),errors:k&&ye(k[1])?{[k[0]]:k[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let W=await _("loader",m,ee,S,E,x,T);m.signal.aborted&&O(m,E,s);let p=new Map,Q=$r(S,W,k,p,z),le=new Set(ee.map(J=>J.route.id));return S.forEach(J=>{le.has(J.route.id)||(Q.loaderData[J.route.id]=null)}),Y({},Q,{matches:S,activeDeferreds:p.size>0?Object.fromEntries(p.entries()):null})}async function _(m,S,x,T,z,I,k){let E=await Ae(k||ve,m,null,S,x,T,null,r,a,I),ae={};return await Promise.all(T.map(async ee=>{if(!(ee.route.id in E))return;let W=E[ee.route.id];if(Qr(W)){let p=W.result;throw Wr(p,S,ee.route.id,T,n,s.v7_relativeSplatPath)}if(Ze(W.result)&&z)throw W;ae[ee.route.id]=await kr(W)})),ae}return{dataRoutes:l,query:h,queryRoute:f}}function A(e,t,r){return Y({},t,{statusCode:Ne(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function O(e,t,r){if(r.v7_throwAbortReason&&e.signal.reason!==void 0)throw e.signal.reason;let n=t?"queryRoute":"query";throw new Error(n+"() call aborted: "+e.method+" "+e.url)}function X(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function re(e,t,r,n,a,s,l,h){let f,v;if(l){f=[];for(let w of t)if(f.push(w),w.route.id===l){v=w;break}}else f=t,v=t[t.length-1];let D=pr(a||".",hr(f,s),Te(e.pathname,r)||e.pathname,h==="path");return a==null&&(D.search=e.search,D.hash=e.hash),(a==null||a===""||a===".")&&v&&v.route.index&&!Pr(D.search)&&(D.search=D.search?D.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(D.pathname=D.pathname==="/"?r:Ye([r,D.pathname])),Ce(D)}function $(e,t,r,n){if(!n||!X(n))return{path:r};if(n.formMethod&&!Dr(n.formMethod))return{path:r,error:ie(405,{method:n.formMethod})};let a=()=>({path:r,error:ie(400,{type:"invalid-body"})}),s=n.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),h=Xr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Oe(l))return a();let _=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((m,S)=>{let[x,T]=S;return""+m+x+"="+T+`
|
|
20
|
-
`},""):String(n.body);return{path:r,submission:{formMethod:l,formAction:h,formEncType:n.formEncType,formData:void 0,json:void 0,text:_}}}else if(n.formEncType==="application/json"){if(!Oe(l))return a();try{let _=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:l,formAction:h,formEncType:n.formEncType,formData:void 0,json:_,text:void 0}}}catch{return a()}}}K(typeof FormData=="function","FormData is not available in this environment");let f,v;if(n.formData)f=Er(n.formData),v=n.formData;else if(n.body instanceof FormData)f=Er(n.body),v=n.body;else if(n.body instanceof URLSearchParams)f=n.body,v=Vr(f);else if(n.body==null)f=new URLSearchParams,v=new FormData;else try{f=new URLSearchParams(n.body),v=Vr(f)}catch{return a()}let D={formMethod:l,formAction:h,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:v,json:void 0,text:void 0};if(Oe(D.formMethod))return{path:r,submission:D};let w=fe(r);return t&&w.search&&Pr(w.search)&&f.append("index",""),w.search="?"+f,{path:Ce(w),submission:D}}function Z(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function N(e,t,r,n,a,s,l,h,f,v,D,w,_,m,S,x){let T=x?ye(x[1])?x[1].error:x[1].data:void 0,z=e.createURL(t.location),I=e.createURL(a),k=x&&ye(x[1])?x[0]:void 0,E=k?Z(r,k):r,ae=x?x[1].statusCode:void 0,ee=l&&ae&&ae>=400,W=E.filter((Q,le)=>{let{route:J}=Q;if(J.lazy)return!0;if(J.loader==null)return!1;if(s)return typeof J.loader!="function"||J.loader.hydrate?!0:t.loaderData[J.id]===void 0&&(!t.errors||t.errors[J.id]===void 0);if(se(t.loaderData,t.matches[le],Q)||f.some(Ue=>Ue===Q.route.id))return!0;let Re=t.matches[le],_e=Q;return De(Q,Y({currentUrl:z,currentParams:Re.params,nextUrl:I,nextParams:_e.params},n,{actionResult:T,actionStatus:ae,defaultShouldRevalidate:ee?!1:h||z.pathname+z.search===I.pathname+I.search||z.search!==I.search||ce(Re,_e)}))}),p=[];return w.forEach((Q,le)=>{if(s||!r.some(bt=>bt.route.id===Q.routeId)||D.has(le))return;let J=Le(m,Q.path,S);if(!J){p.push({key:le,routeId:Q.routeId,path:Q.path,matches:null,match:null,controller:null});return}let Re=t.fetchers.get(le),_e=it(J,Q.path),Ue=!1;_.has(le)?Ue=!1:v.has(le)?(v.delete(le),Ue=!0):Re&&Re.state!=="idle"&&Re.data===void 0?Ue=h:Ue=De(_e,Y({currentUrl:z,currentParams:t.matches[t.matches.length-1].params,nextUrl:I,nextParams:r[r.length-1].params},n,{actionResult:T,actionStatus:ae,defaultShouldRevalidate:ee?!1:h})),Ue&&p.push({key:le,routeId:Q.routeId,path:Q.path,matches:J,match:_e,controller:new AbortController})}),[W,p]}function se(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function ce(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function De(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function je(e,t,r,n,a,s,l,h){let f=[t,...r.map(v=>v.route.id)].join("-");try{let v=l.get(f);v||(v=e({path:t,matches:r,patch:(D,w)=>{h.aborted||Me(D,w,n,a,s)}}),l.set(f,v)),v&&bn(v)&&await v}finally{l.delete(f)}}function Me(e,t,r,n,a){if(e){var s;let l=n[e];K(l,"No route found to patch children into: routeId = "+e);let h=He(t,a,[e,"patch",String(((s=l.children)==null?void 0:s.length)||"0")],n);l.children?l.children.push(...h):l.children=h}else{let l=He(t,a,["patch",String(r.length||"0")],n);r.push(...l)}}async function Xe(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];K(a,"No route found in manifest");let s={};for(let l in n){let f=a[l]!==void 0&&l!=="hasErrorBoundary";me(!f,'Route "'+a.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!f&&!Or.has(l)&&(s[l]=n[l])}Object.assign(a,s),Object.assign(a,Y({},t(a),{lazy:void 0}))}async function ve(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,s,l)=>Object.assign(a,{[r[l].route.id]:s}),{})}async function Ae(e,t,r,n,a,s,l,h,f,v){let D=s.map(m=>m.route.lazy?Xe(m.route,f,h):void 0),w=s.map((m,S)=>{let x=D[S],T=a.some(I=>I.route.id===m.route.id);return Y({},m,{shouldLoad:T,resolve:async I=>(I&&n.method==="GET"&&(m.route.lazy||m.route.loader)&&(T=!0),T?gn(t,n,m,x,I,v):Promise.resolve({type:G.data,result:void 0}))})}),_=await e({matches:w,request:n,params:s[0].params,fetcherKey:l,context:v});try{await Promise.all(D)}catch{}return _}async function gn(e,t,r,n,a,s){let l,h,f=v=>{let D,w=new Promise((S,x)=>D=x);h=()=>D(),t.signal.addEventListener("abort",h);let _=S=>typeof v!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):v({request:t,params:r.params,context:s},...S!==void 0?[S]:[]),m=(async()=>{try{return{type:"data",result:await(a?a(x=>_(x)):_())}}catch(S){return{type:"error",result:S}}})();return Promise.race([m,w])};try{let v=r.route[e];if(n)if(v){let D,[w]=await Promise.all([f(v).catch(_=>{D=_}),n]);if(D!==void 0)throw D;l=w}else if(await n,v=r.route[e],v)l=await f(v);else if(e==="action"){let D=new URL(t.url),w=D.pathname+D.search;throw ie(405,{method:t.method,pathname:w,routeId:r.route.id})}else return{type:G.data,result:void 0};else if(v)l=await f(v);else{let D=new URL(t.url),w=D.pathname+D.search;throw ie(404,{pathname:w})}K(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(v){return{type:G.error,result:v}}finally{h&&t.signal.removeEventListener("abort",h)}return l}async function kr(e){let{result:t,type:r}=e;if(Ze(t)){let v;try{let D=t.headers.get("Content-Type");D&&/\bapplication\/json\b/.test(D)?t.body==null?v=null:v=await t.json():v=await t.text()}catch(D){return{type:G.error,error:D}}return r===G.error?{type:G.error,error:new gt(t.status,t.statusText,v),statusCode:t.status,headers:t.headers}:{type:G.data,data:v,statusCode:t.status,headers:t.headers}}if(r===G.error){if(Zr(t)){var n;if(t.data instanceof Error){var a;return{type:G.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status}}t=new gt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:G.error,error:t,statusCode:Ne(t)?t.status:void 0}}if(wn(t)){var s,l;return{type:G.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(Zr(t)){var h,f;return{type:G.data,data:t.data,statusCode:(h=t.init)==null?void 0:h.status,headers:(f=t.init)!=null&&f.headers?new Headers(t.init.headers):void 0}}return{type:G.data,data:t}}function Wr(e,t,r,n,a,s){let l=e.headers.get("Location");if(K(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!zt.test(l)){let h=n.slice(0,n.findIndex(f=>f.route.id===r)+1);l=re(new URL(t.url),h,a,!0,l,s),e.headers.set("Location",l)}return e}function Kr(e,t,r){if(zt.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),s=Te(a.pathname,r)!=null;if(a.origin===t.origin&&s)return a.pathname+a.search+a.hash}return e}function yt(e,t,r,n){let a=e.createURL(Xr(t)).toString(),s={signal:r};if(n&&Oe(n.formMethod)){let{formMethod:l,formEncType:h}=n;s.method=l.toUpperCase(),h==="application/json"?(s.headers=new Headers({"Content-Type":h}),s.body=JSON.stringify(n.json)):h==="text/plain"?s.body=n.text:h==="application/x-www-form-urlencoded"&&n.formData?s.body=Er(n.formData):s.body=n.formData}return new Request(a,s)}function Er(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Vr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function $r(e,t,r,n,a){let s={},l=null,h,f=!1,v={},D=r&&ye(r[1])?r[1].error:void 0;return e.forEach(w=>{if(!(w.route.id in t))return;let _=w.route.id,m=t[_];if(K(!Qe(m),"Cannot handle redirect results in processLoaderData"),ye(m)){let S=m.error;if(D!==void 0&&(S=D,D=void 0),l=l||{},a)l[_]=S;else{let x=ot(e,_);l[x.route.id]==null&&(l[x.route.id]=S)}s[_]=void 0,f||(f=!0,h=Ne(m.error)?m.error.status:500),m.headers&&(v[_]=m.headers)}else ze(m)?(n.set(_,m.deferredData),s[_]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!f&&(h=m.statusCode),m.headers&&(v[_]=m.headers)):(s[_]=m.data,m.statusCode&&m.statusCode!==200&&!f&&(h=m.statusCode),m.headers&&(v[_]=m.headers))}),D!==void 0&&r&&(l={[r[0]]:D},s[r[0]]=void 0),{loaderData:s,errors:l,statusCode:h||200,loaderHeaders:v}}function Jr(e,t,r,n,a,s,l,h){let{loaderData:f,errors:v}=$r(t,n,a,h,!1);return s.forEach(D=>{let{key:w,match:_,controller:m}=D,S=l[w];if(K(S,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(ye(S)){let x=ot(e.matches,_?.route.id);v&&v[x.route.id]||(v=Y({},v,{[x.route.id]:S.error})),e.fetchers.delete(w)}else if(Qe(S))K(!1,"Unhandled fetcher revalidation redirect");else if(ze(S))K(!1,"Unhandled fetcher deferred data");else{let x=qe(S.data);e.fetchers.set(w,x)}}),{loaderData:f,errors:v}}function Yr(e,t,r,n){let a=Y({},t);for(let s of r){let l=s.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(a[l]=t[l]):e[l]!==void 0&&s.route.loader&&(a[l]=e[l]),n&&n.hasOwnProperty(l))break}return a}function Gr(e){return e?ye(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ot(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function kt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ie(e,t){let{pathname:r,routeId:n,method:a,type:s,message:l}=t===void 0?{}:t,h="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(h="Bad Request",s==="route-discovery"?f='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
|
|
21
|
-
`+l):a&&r&&n?f="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"?f="defer() is not supported in actions":s==="invalid-body"&&(f="Unable to encode submission body")):e===403?(h="Forbidden",f='Route "'+n+'" does not match URL "'+r+'"'):e===404?(h="Not Found",f='No route matches URL "'+r+'"'):e===405&&(h="Method Not Allowed",a&&r&&n?f="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(f='Invalid request method "'+a.toUpperCase()+'"')),new gt(e||500,h,new Error(f),!0)}function Wt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Qe(a))return{key:n,result:a}}}function Xr(e){let t=typeof e=="string"?fe(e):e;return Ce(Y({},t,{hash:""}))}function yn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function bn(e){return typeof e=="object"&&e!=null&&"then"in e}function Rn(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type===G.data||e.type===G.error)}function Qr(e){return Ze(e.result)&&Rr.has(e.result.status)}function ze(e){return e.type===G.deferred}function ye(e){return e.type===G.error}function Qe(e){return(e&&e.type)===G.redirect}function Zr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function wn(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Ze(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function En(e){if(!Ze(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function Dr(e){return br.has(e.toLowerCase())}function Oe(e){return Hr.has(e.toLowerCase())}async function Dn(e,t,r,n,a){let s=Object.entries(t);for(let l=0;l<s.length;l++){let[h,f]=s[l],v=e.find(_=>_?.route.id===h);if(!v)continue;let D=n.find(_=>_.route.id===v.route.id),w=D!=null&&!ce(D,v)&&(a&&a[v.route.id])!==void 0;ze(f)&&w&&await xr(f,r,!1).then(_=>{_&&(t[h]=_)})}}async function xn(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:s,controller:l}=r[n],h=t[a];e.find(v=>v?.route.id===s)&&ze(h)&&(K(l,"Expected an AbortController for revalidating fetcher deferred result"),await xr(h,l.signal,!0).then(v=>{v&&(t[a]=v)}))}}async function xr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:G.data,data:e.deferredData.unwrappedData}}catch(a){return{type:G.error,error:a}}return{type:G.data,data:e.deferredData.data}}}function Pr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function it(e,t){let r=typeof t=="string"?fe(t).search:t.search;if(e[e.length-1].route.index&&Pr(r||""))return e[e.length-1];let n=fr(e);return n[n.length-1]}function qr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:s,json:l}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:l,text:void 0}}}function Sr(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Pn(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ct(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Sn(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function qe(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Cn(e,t){try{let r=e.sessionStorage.getItem(d);if(r){let n=JSON.parse(r);for(let[a,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(a,new Set(s||[]))}}catch{}}function Ln(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(d,JSON.stringify(r))}catch(n){me(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}}}]);})();
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=module-react-router.fae32787.js.map
|