@techdocs/cli 1.8.5-next.0 → 1.8.5

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +19 -6
  2. package/dist/embedded-app/.config-schema.json +30 -521
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/124.0135c04a.chunk.js +5 -0
  5. package/dist/embedded-app/static/124.0135c04a.chunk.js.map +1 -0
  6. package/dist/embedded-app/static/2401.ef30400a.chunk.js +5 -0
  7. package/dist/embedded-app/static/2401.ef30400a.chunk.js.map +1 -0
  8. package/dist/embedded-app/static/2420.9681849a.chunk.js +5 -0
  9. package/dist/embedded-app/static/2420.9681849a.chunk.js.map +1 -0
  10. package/dist/embedded-app/static/2490.5e7810f2.chunk.js +3 -0
  11. package/dist/embedded-app/static/2490.5e7810f2.chunk.js.map +1 -0
  12. package/dist/embedded-app/static/287.06d3556f.chunk.js +5 -0
  13. package/dist/embedded-app/static/287.06d3556f.chunk.js.map +1 -0
  14. package/dist/embedded-app/static/3182.950641c7.chunk.js +6 -0
  15. package/dist/embedded-app/static/{3182.1f1ac12b.chunk.js.map → 3182.950641c7.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/3308.4f503c75.chunk.js +7 -0
  17. package/dist/embedded-app/static/3308.4f503c75.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/3632.09c5925e.chunk.js +5 -0
  19. package/dist/embedded-app/static/3632.09c5925e.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/6271.df98b248.chunk.js +5 -0
  21. package/dist/embedded-app/static/6271.df98b248.chunk.js.map +1 -0
  22. package/dist/embedded-app/static/8307.2c2ef2dd.chunk.js +8 -0
  23. package/dist/embedded-app/static/{8307.4878037e.chunk.js.map → 8307.2c2ef2dd.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/8384.516f6f61.chunk.js +5 -0
  25. package/dist/embedded-app/static/8384.516f6f61.chunk.js.map +1 -0
  26. package/dist/embedded-app/static/9652.a7eea251.chunk.js +5 -0
  27. package/dist/embedded-app/static/9652.a7eea251.chunk.js.map +1 -0
  28. package/dist/embedded-app/static/main.1f016c9f.js +495 -0
  29. package/dist/embedded-app/static/main.1f016c9f.js.map +1 -0
  30. package/dist/embedded-app/static/module-react-router-dom.b2a616ac.js +22 -0
  31. package/dist/embedded-app/static/module-react-router-dom.b2a616ac.js.map +1 -0
  32. package/dist/embedded-app/static/module-react-router.96a60fdb.js +22 -0
  33. package/dist/embedded-app/static/module-react-router.96a60fdb.js.map +1 -0
  34. package/dist/embedded-app/static/{runtime.76ed602b.js → runtime.1f016c9f.js} +2 -2
  35. package/dist/embedded-app/static/{runtime.76ed602b.js.map → runtime.1f016c9f.js.map} +1 -1
  36. package/dist/embedded-app/static/vendor.1f016c9f.js +160 -0
  37. package/dist/embedded-app/static/vendor.1f016c9f.js.map +1 -0
  38. package/dist/index.cjs.js +1 -1
  39. package/package.json +6 -6
  40. package/dist/embedded-app/static/124.b3c877f4.chunk.js +0 -5
  41. package/dist/embedded-app/static/124.b3c877f4.chunk.js.map +0 -1
  42. package/dist/embedded-app/static/1600.9d865b04.chunk.js +0 -3
  43. package/dist/embedded-app/static/1600.9d865b04.chunk.js.map +0 -1
  44. package/dist/embedded-app/static/2401.dc2fecde.chunk.js +0 -5
  45. package/dist/embedded-app/static/2401.dc2fecde.chunk.js.map +0 -1
  46. package/dist/embedded-app/static/2420.cd4a65c3.chunk.js +0 -5
  47. package/dist/embedded-app/static/2420.cd4a65c3.chunk.js.map +0 -1
  48. package/dist/embedded-app/static/287.4b32d161.chunk.js +0 -5
  49. package/dist/embedded-app/static/287.4b32d161.chunk.js.map +0 -1
  50. package/dist/embedded-app/static/3182.1f1ac12b.chunk.js +0 -6
  51. package/dist/embedded-app/static/3308.7a6908ef.chunk.js +0 -7
  52. package/dist/embedded-app/static/3308.7a6908ef.chunk.js.map +0 -1
  53. package/dist/embedded-app/static/3632.92f2c3f7.chunk.js +0 -5
  54. package/dist/embedded-app/static/3632.92f2c3f7.chunk.js.map +0 -1
  55. package/dist/embedded-app/static/6271.18498a88.chunk.js +0 -5
  56. package/dist/embedded-app/static/6271.18498a88.chunk.js.map +0 -1
  57. package/dist/embedded-app/static/8307.4878037e.chunk.js +0 -8
  58. package/dist/embedded-app/static/8384.69d4b96e.chunk.js +0 -5
  59. package/dist/embedded-app/static/8384.69d4b96e.chunk.js.map +0 -1
  60. package/dist/embedded-app/static/9652.80cea275.chunk.js +0 -5
  61. package/dist/embedded-app/static/9652.80cea275.chunk.js.map +0 -1
  62. package/dist/embedded-app/static/main.76ed602b.js +0 -497
  63. package/dist/embedded-app/static/main.76ed602b.js.map +0 -1
  64. package/dist/embedded-app/static/module-react-router-dom.3fde9fd7.js +0 -22
  65. package/dist/embedded-app/static/module-react-router-dom.3fde9fd7.js.map +0 -1
  66. package/dist/embedded-app/static/module-react-router.296c491a.js +0 -22
  67. package/dist/embedded-app/static/module-react-router.296c491a.js.map +0 -1
  68. package/dist/embedded-app/static/vendor.76ed602b.js +0 -160
  69. package/dist/embedded-app/static/vendor.76ed602b.js.map +0 -1
@@ -0,0 +1,22 @@
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2754],{18690:function(Wr,$t,et){var k;et.d($t,{$P:function(){return be},AV:function(){return Ye},BV:function(){return lr},C5:function(){return rt},Ix:function(){return vt},P1:function(){return Pt},Ri:function(){return ie},Ye:function(){return Ct},Zp:function(){return Pe},fS:function(){return Tt},g:function(){return Gt},jb:function(){return se},qh:function(){return jt},sv:function(){return At},x$:function(){return St},zy:function(){return Ue}});var y=et(14041),B=et(74808);/**
2
+ * React Router v6.22.0
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 Le(){return Le=Object.assign?Object.assign.bind():function(l){for(var s=1;s<arguments.length;s++){var v=arguments[s];for(var R in v)Object.prototype.hasOwnProperty.call(v,R)&&(l[R]=v[R])}return l},Le.apply(this,arguments)}const ct=y.createContext(null),Vt=y.createContext(null),H=y.createContext(null),se=y.createContext(null),$e=y.createContext(null),ve=y.createContext({outlet:null,matches:[],isDataRoute:!1}),ye=y.createContext(null);function be(l,s){let{relative:v}=s===void 0?{}:s;ie()||(0,B.Oi)(!1);let{basename:R,navigator:C}=y.useContext(se),{hash:U,pathname:M,search:K}=St(l,{relative:v}),Z=M;return R!=="/"&&(Z=M==="/"?R:(0,B.HS)([R,M])),C.createHref({pathname:Z,search:K,hash:U})}function ie(){return y.useContext($e)!=null}function Ue(){return ie()||(0,B.Oi)(!1),y.useContext($e).location}function Q(){return React.useContext($e).navigationType}function Rr(l){ie()||UNSAFE_invariant(!1);let{pathname:s}=Ue();return React.useMemo(()=>matchPath(l,s),[s,l])}const Er=null;function Ve(l){y.useContext(se).static||y.useLayoutEffect(l)}function Pe(){let{isDataRoute:l}=y.useContext(ve);return l?pt():Jt()}function Jt(){ie()||(0,B.Oi)(!1);let l=y.useContext(ct),{basename:s,future:v,navigator:R}=y.useContext(se),{matches:C}=y.useContext(ve),{pathname:U}=Ue(),M=JSON.stringify((0,B.yD)(C,v.v7_relativeSplatPath)),K=y.useRef(!1);return Ve(()=>{K.current=!0}),y.useCallback(function(z,$){if($===void 0&&($={}),!K.current)return;if(typeof z=="number"){R.go(z);return}let T=(0,B.Gh)(z,JSON.parse(M),U,$.relative==="path");l==null&&s!=="/"&&(T.pathname=T.pathname==="/"?s:(0,B.HS)([s,T.pathname])),($.replace?R.replace:R.push)(T,$.state,$)},[s,R,M,U,l])}const ft=y.createContext(null);function Yt(){return React.useContext(ft)}function Pt(l){let s=y.useContext(ve).outlet;return s&&y.createElement(ft.Provider,{value:l},s)}function Gt(){let{matches:l}=y.useContext(ve),s=l[l.length-1];return s?s.params:{}}function St(l,s){let{relative:v}=s===void 0?{}:s,{future:R}=y.useContext(se),{matches:C}=y.useContext(ve),{pathname:U}=Ue(),M=JSON.stringify((0,B.yD)(C,R.v7_relativeSplatPath));return y.useMemo(()=>(0,B.Gh)(l,JSON.parse(M),U,v==="path"),[l,M,U,v])}function Ct(l,s){return Lt(l,s)}function Lt(l,s,v,R){ie()||(0,B.Oi)(!1);let{navigator:C}=y.useContext(se),{matches:U}=y.useContext(ve),M=U[U.length-1],K=M?M.params:{},Z=M?M.pathname:"/",z=M?M.pathnameBase:"/",$=M&&M.route,T=Ue(),ne;if(s){var te;let pe=typeof s=="string"?(0,B.Rr)(s):s;z==="/"||(te=pe.pathname)!=null&&te.startsWith(z)||(0,B.Oi)(!1),ne=pe}else ne=T;let ce=ne.pathname||"/",Re=z==="/"?ce:ce.slice(z.length)||"/",Ee=(0,B.ue)(l,{pathname:Re}),Te=_t(Ee&&Ee.map(pe=>Object.assign({},pe,{params:Object.assign({},K,pe.params),pathname:(0,B.HS)([z,C.encodeLocation?C.encodeLocation(pe.pathname).pathname:pe.pathname]),pathnameBase:pe.pathnameBase==="/"?z:(0,B.HS)([z,C.encodeLocation?C.encodeLocation(pe.pathnameBase).pathname:pe.pathnameBase])})),U,v,R);return s&&Te?y.createElement($e.Provider,{value:{location:Le({pathname:"/",search:"",hash:"",state:null,key:"default"},ne),navigationType:B.rc.Pop}},Te):Te}function Xt(){let l=Ie(),s=(0,B.pX)(l)?l.status+" "+l.statusText:l instanceof Error?l.message:JSON.stringify(l),v=l instanceof Error?l.stack:null,R="rgba(200,200,200, 0.5)",C={padding:"0.5rem",backgroundColor:R},U={padding:"2px 4px",backgroundColor:R};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},s),v?y.createElement("pre",{style:C},v):null,null)}const Qt=y.createElement(Xt,null);class Mt extends y.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,v){return v.location!==s.location||v.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:v.error,location:v.location,revalidation:s.revalidation||v.revalidation}}componentDidCatch(s,v){console.error("React Router caught the following error during render",s,v)}render(){return this.state.error!==void 0?y.createElement(ve.Provider,{value:this.props.routeContext},y.createElement(ye.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zt(l){let{routeContext:s,match:v,children:R}=l,C=y.useContext(ct);return C&&C.static&&C.staticContext&&(v.route.errorElement||v.route.ErrorBoundary)&&(C.staticContext._deepestRenderedBoundaryId=v.route.id),y.createElement(ve.Provider,{value:s},R)}function _t(l,s,v,R){var C;if(s===void 0&&(s=[]),v===void 0&&(v=null),R===void 0&&(R=null),l==null){var U;if((U=v)!=null&&U.errors)l=v.matches;else return null}let M=l,K=(C=v)==null?void 0:C.errors;if(K!=null){let $=M.findIndex(T=>T.route.id&&(K==null?void 0:K[T.route.id]));$>=0||(0,B.Oi)(!1),M=M.slice(0,Math.min(M.length,$+1))}let Z=!1,z=-1;if(v&&R&&R.v7_partialHydration)for(let $=0;$<M.length;$++){let T=M[$];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(z=$),T.route.id){let{loaderData:ne,errors:te}=v,ce=T.route.loader&&ne[T.route.id]===void 0&&(!te||te[T.route.id]===void 0);if(T.route.lazy||ce){Z=!0,z>=0?M=M.slice(0,z+1):M=[M[0]];break}}}return M.reduceRight(($,T,ne)=>{let te,ce=!1,Re=null,Ee=null;v&&(te=K&&T.route.id?K[T.route.id]:void 0,Re=T.route.errorElement||Qt,Z&&(z<0&&ne===0?(ir("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),ce=!0,Ee=null):z===ne&&(ce=!0,Ee=T.route.hydrateFallbackElement||null)));let Te=s.concat(M.slice(0,ne+1)),pe=()=>{let Ae;return te?Ae=Re:ce?Ae=Ee:T.route.Component?Ae=y.createElement(T.route.Component,null):T.route.element?Ae=T.route.element:Ae=$,y.createElement(Zt,{match:T,routeContext:{outlet:$,matches:Te,isDataRoute:v!=null},children:Ae})};return v&&(T.route.ErrorBoundary||T.route.errorElement||ne===0)?y.createElement(Mt,{location:v.location,revalidation:v.revalidation,component:Re,error:te,children:pe(),routeContext:{outlet:null,matches:Te,isDataRoute:!0}}):pe()},null)}var tt=function(l){return l.UseBlocker="useBlocker",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l}(tt||{}),he=function(l){return l.UseBlocker="useBlocker",l.UseLoaderData="useLoaderData",l.UseActionData="useActionData",l.UseRouteError="useRouteError",l.UseNavigation="useNavigation",l.UseRouteLoaderData="useRouteLoaderData",l.UseMatches="useMatches",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l.UseRouteId="useRouteId",l}(he||{});function wr(l){return l+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ht(l){let s=y.useContext(ct);return s||(0,B.Oi)(!1),s}function Me(l){let s=y.useContext(Vt);return s||(0,B.Oi)(!1),s}function qt(l){let s=y.useContext(ve);return s||(0,B.Oi)(!1),s}function Se(l){let s=qt(l),v=s.matches[s.matches.length-1];return v.route.id||(0,B.Oi)(!1),v.route.id}function er(){return Se(he.UseRouteId)}function xr(){return Me(he.UseNavigation).navigation}function Ot(){let l=ht(tt.UseRevalidator),s=Me(he.UseRevalidator);return React.useMemo(()=>({revalidate:l.router.revalidate,state:s.revalidation}),[l.router.revalidate,s.revalidation])}function tr(){let{matches:l,loaderData:s}=Me(he.UseMatches);return React.useMemo(()=>l.map(v=>UNSAFE_convertRouteMatchToUiMatch(v,s)),[l,s])}function rr(){let l=Me(he.UseLoaderData),s=Se(he.UseLoaderData);if(l.errors&&l.errors[s]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+s+")");return}return l.loaderData[s]}function nr(l){return Me(he.UseRouteLoaderData).loaderData[l]}function $r(){let l=Me(he.UseActionData),s=Se(he.UseLoaderData);return l.actionData?l.actionData[s]:void 0}function Ie(){var l;let s=y.useContext(ye),v=Me(he.UseRouteError),R=Se(he.UseRouteError);return s!==void 0?s:(l=v.errors)==null?void 0:l[R]}function ar(){let l=React.useContext(H);return l==null?void 0:l._data}function Dr(){let l=React.useContext(H);return l==null?void 0:l._error}let or=0;function Vr(l){let{router:s,basename:v}=ht(tt.UseBlocker),R=Me(he.UseBlocker),[C,U]=React.useState(""),M=React.useCallback(K=>{if(typeof l!="function")return!!l;if(v==="/")return l(K);let{currentLocation:Z,nextLocation:z,historyAction:$}=K;return l({currentLocation:Le({},Z,{pathname:stripBasename(Z.pathname,v)||Z.pathname}),nextLocation:Le({},z,{pathname:stripBasename(z.pathname,v)||z.pathname}),historyAction:$})},[v,l]);return React.useEffect(()=>{let K=String(++or);return U(K),()=>s.deleteBlocker(K)},[s]),React.useEffect(()=>{C!==""&&s.getBlocker(C,M)},[s,C,M]),C&&R.blockers.has(C)?R.blockers.get(C):IDLE_BLOCKER}function pt(){let{router:l}=ht(tt.UseNavigateStable),s=Se(he.UseNavigateStable),v=y.useRef(!1);return Ve(()=>{v.current=!0}),y.useCallback(function(C,U){U===void 0&&(U={}),v.current&&(typeof C=="number"?l.navigate(C):l.navigate(C,Le({fromRouteId:s},U)))},[l,s])}const Ut={};function ir(l,s,v){!s&&!Ut[l]&&(Ut[l]=!0)}const mt=(k||(k=et.t(y,2)))["startTransition"];function Sr(l){let{fallbackElement:s,router:v,future:R}=l,[C,U]=React.useState(v.state),{v7_startTransition:M}=R||{},K=React.useCallback(T=>{M&&mt?mt(()=>U(T)):U(T)},[U,M]);React.useLayoutEffect(()=>v.subscribe(K),[v,K]),React.useEffect(()=>{},[]);let Z=React.useMemo(()=>({createHref:v.createHref,encodeLocation:v.encodeLocation,go:T=>v.navigate(T),push:(T,ne,te)=>v.navigate(T,{state:ne,preventScrollReset:te==null?void 0:te.preventScrollReset}),replace:(T,ne,te)=>v.navigate(T,{replace:!0,state:ne,preventScrollReset:te==null?void 0:te.preventScrollReset})}),[v]),z=v.basename||"/",$=React.useMemo(()=>({router:v,navigator:Z,static:!1,basename:z}),[v,Z,z]);return React.createElement(React.Fragment,null,React.createElement(ct.Provider,{value:$},React.createElement(Vt.Provider,{value:C},React.createElement(vt,{basename:z,location:C.location,navigationType:C.historyAction,navigator:Z,future:{v7_relativeSplatPath:v.future.v7_relativeSplatPath}},C.initialized||v.future.v7_partialHydration?React.createElement(Cr,{routes:v.routes,future:v.future,state:C}):s))),null)}function Cr(l){let{routes:s,future:v,state:R}=l;return Lt(s,void 0,R,v)}function Tt(l){let{basename:s,children:v,initialEntries:R,initialIndex:C,future:U}=l,M=y.useRef();M.current==null&&(M.current=(0,B.sC)({initialEntries:R,initialIndex:C,v5Compat:!0}));let K=M.current,[Z,z]=y.useState({action:K.action,location:K.location}),{v7_startTransition:$}=U||{},T=y.useCallback(ne=>{$&&mt?mt(()=>z(ne)):z(ne)},[z,$]);return y.useLayoutEffect(()=>K.listen(T),[K,T]),y.createElement(vt,{basename:s,children:v,location:Z.location,navigationType:Z.action,navigator:K,future:U})}function rt(l){let{to:s,replace:v,state:R,relative:C}=l;ie()||(0,B.Oi)(!1);let{future:U,static:M}=y.useContext(se),{matches:K}=y.useContext(ve),{pathname:Z}=Ue(),z=Pe(),$=(0,B.Gh)(s,(0,B.yD)(K,U.v7_relativeSplatPath),Z,C==="path"),T=JSON.stringify($);return y.useEffect(()=>z(JSON.parse(T),{replace:v,state:R,relative:C}),[z,T,C,v,R]),null}function At(l){return Pt(l.context)}function jt(l){(0,B.Oi)(!1)}function vt(l){let{basename:s="/",children:v=null,location:R,navigationType:C=B.rc.Pop,navigator:U,static:M=!1,future:K}=l;ie()&&(0,B.Oi)(!1);let Z=s.replace(/^\/*/,"/"),z=y.useMemo(()=>({basename:Z,navigator:U,static:M,future:Le({v7_relativeSplatPath:!1},K)}),[Z,K,U,M]);typeof R=="string"&&(R=(0,B.Rr)(R));let{pathname:$="/",search:T="",hash:ne="",state:te=null,key:ce="default"}=R,Re=y.useMemo(()=>{let Ee=(0,B.pb)($,Z);return Ee==null?null:{location:{pathname:Ee,search:T,hash:ne,state:te,key:ce},navigationType:C}},[Z,$,T,ne,te,ce,C]);return Re==null?null:y.createElement(se.Provider,{value:z},y.createElement($e.Provider,{children:v,value:Re}))}function lr(l){let{children:s,location:v}=l;return Ct(Ye(s),v)}function Lr(l){let{children:s,errorElement:v,resolve:R}=l;return React.createElement(sr,{resolve:R,errorElement:v},React.createElement(Je,null,s))}var me=function(l){return l[l.pending=0]="pending",l[l.success=1]="success",l[l.error=2]="error",l}(me||{});const gt=new Promise(()=>{});class sr extends y.Component{constructor(s){super(s),this.state={error:null}}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,v){console.error("<Await> caught the following error during render",s,v)}render(){let{children:s,errorElement:v,resolve:R}=this.props,C=null,U=me.pending;if(!(R instanceof Promise))U=me.success,C=Promise.resolve(),Object.defineProperty(C,"_tracked",{get:()=>!0}),Object.defineProperty(C,"_data",{get:()=>R});else if(this.state.error){U=me.error;let M=this.state.error;C=Promise.reject().catch(()=>{}),Object.defineProperty(C,"_tracked",{get:()=>!0}),Object.defineProperty(C,"_error",{get:()=>M})}else R._tracked?(C=R,U=C._error!==void 0?me.error:C._data!==void 0?me.success:me.pending):(U=me.pending,Object.defineProperty(R,"_tracked",{get:()=>!0}),C=R.then(M=>Object.defineProperty(R,"_data",{get:()=>M}),M=>Object.defineProperty(R,"_error",{get:()=>M})));if(U===me.error&&C._error instanceof B.tH)throw gt;if(U===me.error&&!v)throw C._error;if(U===me.error)return y.createElement(H.Provider,{value:C,children:v});if(U===me.success)return y.createElement(H.Provider,{value:C,children:s});throw C}}function Je(l){let{children:s}=l,v=ar(),R=typeof s=="function"?s(v):s;return React.createElement(React.Fragment,null,R)}function Ye(l,s){s===void 0&&(s=[]);let v=[];return y.Children.forEach(l,(R,C)=>{if(!y.isValidElement(R))return;let U=[...s,C];if(R.type===y.Fragment){v.push.apply(v,Ye(R.props.children,U));return}R.type!==jt&&(0,B.Oi)(!1),!R.props.index||!R.props.children||(0,B.Oi)(!1);let M={id:R.props.id||U.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&&(M.children=Ye(R.props.children,U)),v.push(M)}),v}function ur(l){return _t(l)}function Ft(l){let s={hasErrorBoundary:l.ErrorBoundary!=null||l.errorElement!=null};return l.Component&&Object.assign(s,{element:React.createElement(l.Component),Component:void 0}),l.HydrateFallback&&Object.assign(s,{hydrateFallbackElement:React.createElement(l.HydrateFallback),HydrateFallback:void 0}),l.ErrorBoundary&&Object.assign(s,{errorElement:React.createElement(l.ErrorBoundary),ErrorBoundary:void 0}),s}function Jr(l,s){return createRouter({basename:s==null?void 0:s.basename,future:Le({},s==null?void 0:s.future,{v7_prependBasename:!0}),history:createMemoryHistory({initialEntries:s==null?void 0:s.initialEntries,initialIndex:s==null?void 0:s.initialIndex}),hydrationData:s==null?void 0:s.hydrationData,routes:l,mapRouteProperties:Ft}).initialize()}},74808:function(Wr,$t,et){et.d($t,{AO:function(){return be},Gh:function(){return nr},HS:function(){return Ie},Oi:function(){return H},Rr:function(){return ie},o1:function(){return er},pX:function(){return rt},pb:function(){return Se},rc:function(){return y},sC:function(){return Le},tH:function(){return pt},tW:function(){return he},ue:function(){return Pe},yD:function(){return rr}});/**
11
+ * @remix-run/router v1.15.0
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 k(){return k=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},k.apply(this,arguments)}var y;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(y||(y={}));const B="popstate";function Le(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((x,S)=>m(x,typeof x=="string"?null:x.state,S===0?"default":void 0));let d=h(r==null?a.length-1:r),i=y.Pop,p=null;function h(x){return Math.min(Math.max(x,0),a.length-1)}function b(){return a[d]}function m(x,S,P){S===void 0&&(S=null);let w=ye(a?b().pathname:"/",x,S,P);return se(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(x)),w}function _(x){return typeof x=="string"?x:be(x)}return{get index(){return d},get action(){return i},get location(){return b()},createHref:_,createURL(x){return new URL(_(x),"http://localhost")},encodeLocation(x){let S=typeof x=="string"?ie(x):x;return{pathname:S.pathname||"",search:S.search||"",hash:S.hash||""}},push(x,S){i=y.Push;let P=m(x,S);d+=1,a.splice(d,a.length,P),n&&p&&p({action:i,location:P,delta:1})},replace(x,S){i=y.Replace;let P=m(x,S);a[d]=P,n&&p&&p({action:i,location:P,delta:0})},go(x){i=y.Pop;let S=h(d+x),P=a[S];d=S,p&&p({action:i,location:P,delta:x})},listen(x){return p=x,()=>{p=null}}}}function ct(e){e===void 0&&(e={});function t(n,a){let{pathname:d,search:i,hash:p}=n.location;return ye("",{pathname:d,search:i,hash:p},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:be(a)}return Ue(t,r,null,e)}function Vt(e){e===void 0&&(e={});function t(a,d){let{pathname:i="/",search:p="",hash:h=""}=ie(a.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),ye("",{pathname:i,search:p,hash:h},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(a,d){let i=a.document.querySelector("base"),p="";if(i&&i.getAttribute("href")){let h=a.location.href,b=h.indexOf("#");p=b===-1?h:h.slice(0,b)}return p+"#"+(typeof d=="string"?d:be(d))}function n(a,d){se(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(d)+")")}return Ue(t,r,n,e)}function H(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function se(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch{}}}function $e(){return Math.random().toString(36).substr(2,8)}function ve(e,t){return{usr:e.state,key:e.key,idx:t}}function ye(e,t,r,n){return r===void 0&&(r=null),k({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ie(t):t,{state:r,key:t&&t.key||n||$e()})}function be(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 ie(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 Ue(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:d=!1}=n,i=a.history,p=y.Pop,h=null,b=m();b==null&&(b=0,i.replaceState(k({},i.state,{idx:b}),""));function m(){return(i.state||{idx:null}).idx}function _(){p=y.Pop;let w=m(),g=w==null?null:w-b;b=w,h&&h({action:p,location:P.location,delta:g})}function E(w,g){p=y.Push;let F=ye(P.location,w,g);r&&r(F,w),b=m()+1;let J=ve(F,b),Y=P.createHref(F);try{i.pushState(J,"",Y)}catch(G){if(G instanceof DOMException&&G.name==="DataCloneError")throw G;a.location.assign(Y)}d&&h&&h({action:p,location:P.location,delta:1})}function x(w,g){p=y.Replace;let F=ye(P.location,w,g);r&&r(F,w),b=m();let J=ve(F,b),Y=P.createHref(F);i.replaceState(J,"",Y),d&&h&&h({action:p,location:P.location,delta:0})}function S(w){let g=a.location.origin!=="null"?a.location.origin:a.location.href,F=typeof w=="string"?w:be(w);return H(g,"No window.location.(origin|href) available to create URL for href: "+F),new URL(F,g)}let P={get action(){return p},get location(){return e(a,i)},listen(w){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(B,_),h=w,()=>{a.removeEventListener(B,_),h=null}},createHref(w){return t(a,w)},createURL:S,encodeLocation(w){let g=S(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:E,replace:x,go(w){return i.go(w)}};return P}var Q;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Q||(Q={}));const Rr=new Set(["lazy","caseSensitive","path","id","index","children"]);function Er(e){return e.index===!0}function Ve(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,d)=>{let i=[...r,d],p=typeof a.id=="string"?a.id:i.join("-");if(H(a.index!==!0||!a.children,"Cannot specify children on an index route"),H(!n[p],'Found a route id collision on id "'+p+`". Route id's must be globally unique within Data Router usages`),Er(a)){let h=k({},a,t(a),{id:p});return n[p]=h,h}else{let h=k({},a,t(a),{id:p,children:void 0});return n[p]=h,a.children&&(h.children=Ve(a.children,t,i,n)),h}})}function Pe(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?ie(t):t,a=Se(n.pathname||"/",r);if(a==null)return null;let d=ft(e);Pt(d);let i=null;for(let p=0;i==null&&p<d.length;++p)i=tt(d[p],Me(a));return i}function Jt(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 ft(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(d,i,p)=>{let h={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:i,route:d};h.relativePath.startsWith("/")&&(H(h.relativePath.startsWith(n),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(n.length));let b=Ie([n,h.relativePath]),m=r.concat(h);d.children&&d.children.length>0&&(H(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+b+'".')),ft(d.children,t,m,b)),!(d.path==null&&!d.index)&&t.push({path:b,score:Zt(b,d.index),routesMeta:m})};return e.forEach((d,i)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))a(d,i);else for(let h of Yt(d.path))a(d,i,h)}),t}function Yt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),d=r.replace(/\?$/,"");if(n.length===0)return a?[d,""]:[d];let i=Yt(n.join("/")),p=[];return p.push(...i.map(h=>h===""?d:[d,h].join("/"))),a&&p.push(...i),p.map(h=>e.startsWith("/")&&h===""?"/":h)}function Pt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:_t(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Gt=/^:[\w-]+$/,St=3,Ct=2,Lt=1,Xt=10,Qt=-2,Mt=e=>e==="*";function Zt(e,t){let r=e.split("/"),n=r.length;return r.some(Mt)&&(n+=Qt),t&&(n+=Ct),r.filter(a=>!Mt(a)).reduce((a,d)=>a+(Gt.test(d)?St:d===""?Lt:Xt),n)}function _t(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 tt(e,t){let{routesMeta:r}=e,n={},a="/",d=[];for(let i=0;i<r.length;++i){let p=r[i],h=i===r.length-1,b=a==="/"?t:t.slice(a.length)||"/",m=wr({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},b);if(!m)return null;Object.assign(n,m.params);let _=p.route;d.push({params:n,pathname:Ie([a,m.pathname]),pathnameBase:ar(Ie([a,m.pathnameBase])),route:_}),m.pathnameBase!=="/"&&(a=Ie([a,m.pathnameBase]))}return d}function he(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(se(!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=i=>i==null?"":typeof i=="string"?i:String(i),d=r.split(/\/+/).map((i,p,h)=>{if(p===h.length-1&&i==="*")return a(t["*"]);const m=i.match(/^:([\w-]+)(\??)$/);if(m){const[,_,E]=m;let x=t[_];return H(E==="?"||x!=null,'Missing ":'+_+'" param'),a(x)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+d.join("/")}function wr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ht(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let d=a[0],i=d.replace(/(.)\/+$/,"$1"),p=a.slice(1);return{params:n.reduce((b,m,_)=>{let{paramName:E,isOptional:x}=m;if(E==="*"){let P=p[_]||"";i=d.slice(0,d.length-P.length).replace(/(.)\/+$/,"$1")}const S=p[_];return x&&!S?b[E]=void 0:b[E]=qt(S||"",E),b},{}),pathname:d,pathnameBase:i,pattern:e}}function ht(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),se(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,(i,p,h)=>(n.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Me(e){try{return decodeURI(e)}catch(t){return se(!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 qt(e,t){try{return decodeURIComponent(e)}catch(r){return se(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function Se(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 er(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ie(e):e;return{pathname:r?r.startsWith("/")?r:xr(r,t):t,search:Dr(n),hash:or(a)}}function xr(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 Ot(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 tr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function rr(e,t){let r=tr(e);return t?r.map((n,a)=>a===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function nr(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ie(e):(a=k({},e),H(!a.pathname||!a.pathname.includes("?"),Ot("?","pathname","search",a)),H(!a.pathname||!a.pathname.includes("#"),Ot("#","pathname","hash",a)),H(!a.search||!a.search.includes("#"),Ot("#","search","hash",a)));let d=e===""||a.pathname==="",i=d?"/":a.pathname,p;if(i==null)p=r;else{let _=t.length-1;if(!n&&i.startsWith("..")){let E=i.split("/");for(;E[0]==="..";)E.shift(),_-=1;a.pathname=E.join("/")}p=_>=0?t[_]:"/"}let h=er(a,p),b=i&&i!=="/"&&i.endsWith("/"),m=(d||i===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(b||m)&&(h.pathname+="/"),h}function $r(e){return e===""||e.pathname===""?"/":typeof e=="string"?ie(e).pathname:e.pathname}const Ie=e=>e.join("/").replace(/\/\/+/g,"/"),ar=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Dr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,or=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Vr=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),k({},n,{headers:a}))};class pt extends Error{}class Ut{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],H(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((d,i)=>n=i),this.controller=new AbortController;let a=()=>n(new pt("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((d,i)=>{let[p,h]=i;return Object.assign(d,{[p]:this.trackPromise(p,h)})},{}),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 pt)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 d=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:()=>d}),this.emit(!1,r),Promise.reject(d)}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(d=>{t.removeEventListener("abort",n),(d||this.done)&&a(d)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return H(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]:Pr(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function ir(e){return e instanceof Promise&&e._tracked===!0}function Pr(e){if(!ir(e))return e;if(e._error)throw e._error;return e._data}const mt=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new Ut(t,n)},Sr=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status=="undefined"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,k({},n,{headers:a}))},Cr=(e,t)=>{let r=Sr(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class Tt{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 rt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const At=["post","put","patch","delete"],jt=new Set(At),vt=["get",...At],lr=new Set(vt),Lr=new Set([301,302,303,307,308]),me=new Set([307,308]),gt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},sr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Je={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ye=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ur=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ft="remix-router-transitions";function Jr(e){const t=e.window?e.window:typeof window!="undefined"?window:void 0,r=typeof t!="undefined"&&typeof t.document!="undefined"&&typeof t.document.createElement!="undefined",n=!r;H(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=u=>({hasErrorBoundary:o(u)})}else a=ur;let d={},i=Ve(e.routes,a,void 0,d),p,h=e.basename||"/",b=k({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),m=null,_=new Set,E=null,x=null,S=null,P=e.hydrationData!=null,w=Pe(i,e.history.location,h),g=null;if(w==null){let o=oe(404,{pathname:e.history.location.pathname}),{matches:u,route:f}=It(i);w=u,g={[f.id]:o}}let F,J=w.some(o=>o.route.lazy),Y=w.some(o=>o.route.loader);if(J)F=!1;else if(!Y)F=!0;else if(b.v7_partialHydration){let o=e.hydrationData?e.hydrationData.loaderData:null,u=e.hydrationData?e.hydrationData.errors:null;F=w.every(f=>f.route.loader&&f.route.loader.hydrate!==!0&&(o&&o[f.route.id]!==void 0||u&&u[f.route.id]!==void 0))}else F=e.hydrationData!=null;let G,c={historyAction:e.history.action,location:e.history.location,matches:w,initialized:F,navigation:gt,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||g,fetchers:new Map,blockers:new Map},X=y.Pop,V=!1,q,_e=!1,xe=new Map,Ce=null,ot=!1,Ge=!1,Nt=[],Bt=[],le=new Map,Ht=0,Rt=-1,it=new Map,je=new Set,lt=new Map,Et=new Map,Fe=new Set,Xe=new Map,Qe=new Map,hr=!1;function rn(){if(m=e.history.listen(o=>{let{action:u,location:f,delta:D}=o;if(hr){hr=!1;return}se(Qe.size===0||D!=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 L=kr({currentLocation:c.location,nextLocation:f,historyAction:u});if(L&&D!=null){hr=!0,e.history.go(D*-1),zt(L,{state:"blocked",location:f,proceed(){zt(L,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),e.history.go(D)},reset(){let N=new Map(c.blockers);N.set(L,Je),ge({blockers:N})}});return}return Ze(u,f)}),r){en(t,xe);let o=()=>tn(t,xe);t.addEventListener("pagehide",o),Ce=()=>t.removeEventListener("pagehide",o)}return c.initialized||Ze(y.Pop,c.location,{initialHydration:!0}),G}function nn(){m&&m(),Ce&&Ce(),_.clear(),q&&q.abort(),c.fetchers.forEach((o,u)=>kt(u)),c.blockers.forEach((o,u)=>Hr(u))}function an(o){return _.add(o),()=>_.delete(o)}function ge(o,u){u===void 0&&(u={}),c=k({},c,o);let f=[],D=[];b.v7_fetcherPersist&&c.fetchers.forEach((L,N)=>{L.state==="idle"&&(Fe.has(N)?D.push(N):f.push(N))}),[..._].forEach(L=>L(c,{deletedFetchers:D,unstable_viewTransitionOpts:u.viewTransitionOpts,unstable_flushSync:u.flushSync===!0})),b.v7_fetcherPersist&&(f.forEach(L=>c.fetchers.delete(L)),D.forEach(L=>kt(L)))}function wt(o,u,f){var D,L;let{flushSync:N}=f===void 0?{}:f,j=c.actionData!=null&&c.navigation.formMethod!=null&&we(c.navigation.formMethod)&&c.navigation.state==="loading"&&((D=o.state)==null?void 0:D._isRedirect)!==!0,A;u.actionData?Object.keys(u.actionData).length>0?A=u.actionData:A=null:j?A=c.actionData:A=null;let O=u.loaderData?Ae(c.loaderData,u.loaderData,u.matches||[],u.errors):c.loaderData,W=c.blockers;W.size>0&&(W=new Map(W),W.forEach((re,fe)=>W.set(fe,Je)));let ue=V===!0||c.navigation.formMethod!=null&&we(c.navigation.formMethod)&&((L=o.state)==null?void 0:L._isRedirect)!==!0;p&&(i=p,p=void 0),ot||X===y.Pop||(X===y.Push?e.history.push(o,o.state):X===y.Replace&&e.history.replace(o,o.state));let I;if(X===y.Pop){let re=xe.get(c.location.pathname);re&&re.has(o.pathname)?I={currentLocation:c.location,nextLocation:o}:xe.has(o.pathname)&&(I={currentLocation:o,nextLocation:c.location})}else if(_e){let re=xe.get(c.location.pathname);re?re.add(o.pathname):(re=new Set([o.pathname]),xe.set(c.location.pathname,re)),I={currentLocation:c.location,nextLocation:o}}ge(k({},u,{actionData:A,loaderData:O,historyAction:X,location:o,initialized:!0,navigation:gt,revalidation:"idle",restoreScrollPosition:Kr(o,u.matches||c.matches),preventScrollReset:ue,blockers:W}),{viewTransitionOpts:I,flushSync:N===!0}),X=y.Pop,V=!1,_e=!1,ot=!1,Ge=!1,Nt=[],Bt=[]}async function Ar(o,u){if(typeof o=="number"){e.history.go(o);return}let f=U(c.location,c.matches,h,b.v7_prependBasename,o,b.v7_relativeSplatPath,u==null?void 0:u.fromRouteId,u==null?void 0:u.relative),{path:D,submission:L,error:N}=M(b.v7_normalizeFormMethod,!1,f,u),j=c.location,A=ye(c.location,D,u&&u.state);A=k({},A,e.history.encodeLocation(A));let O=u&&u.replace!=null?u.replace:void 0,W=y.Push;O===!0?W=y.Replace:O===!1||L!=null&&we(L.formMethod)&&L.formAction===c.location.pathname+c.location.search&&(W=y.Replace);let ue=u&&"preventScrollReset"in u?u.preventScrollReset===!0:void 0,I=(u&&u.unstable_flushSync)===!0,re=kr({currentLocation:j,nextLocation:A,historyAction:W});if(re){zt(re,{state:"blocked",location:A,proceed(){zt(re,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),Ar(o,u)},reset(){let fe=new Map(c.blockers);fe.set(re,Je),ge({blockers:fe})}});return}return await Ze(W,A,{submission:L,pendingError:N,preventScrollReset:ue,replace:u&&u.replace,enableViewTransition:u&&u.unstable_viewTransition,flushSync:I})}function on(){if(pr(),ge({revalidation:"loading"}),c.navigation.state!=="submitting"){if(c.navigation.state==="idle"){Ze(c.historyAction,c.location,{startUninterruptedRevalidation:!0});return}Ze(X||c.historyAction,c.navigation.location,{overrideNavigation:c.navigation})}}async function Ze(o,u,f){q&&q.abort(),q=null,X=o,ot=(f&&f.startUninterruptedRevalidation)===!0,mn(c.location,c.matches),V=(f&&f.preventScrollReset)===!0,_e=(f&&f.enableViewTransition)===!0;let D=p||i,L=f&&f.overrideNavigation,N=Pe(D,u,h),j=(f&&f.flushSync)===!0;if(!N){let fe=oe(404,{pathname:u.pathname}),{matches:De,route:de}=It(D);mr(),wt(u,{matches:De,loaderData:{},errors:{[de.id]:fe}},{flushSync:j});return}if(c.initialized&&!Ge&&Yr(c.location,u)&&!(f&&f.submission&&we(f.submission.formMethod))){wt(u,{matches:N},{flushSync:j});return}q=new AbortController;let A=ce(e.history,u,q.signal,f&&f.submission),O,W;if(f&&f.pendingError)W={[nt(N).route.id]:f.pendingError};else if(f&&f.submission&&we(f.submission.formMethod)){let fe=await ln(A,u,f.submission,N,{replace:f.replace,flushSync:j});if(fe.shortCircuited)return;O=fe.pendingActionData,W=fe.pendingActionError,L=fr(u,f.submission),j=!1,A=new Request(A.url,{signal:A.signal})}let{shortCircuited:ue,loaderData:I,errors:re}=await sn(A,u,N,L,f&&f.submission,f&&f.fetcherSubmission,f&&f.replace,f&&f.initialHydration===!0,j,O,W);ue||(q=null,wt(u,k({matches:N},O?{actionData:O}:{},{loaderData:I,errors:re})))}async function ln(o,u,f,D,L){L===void 0&&(L={}),pr();let N=Zr(u,f);ge({navigation:N},{flushSync:L.flushSync===!0});let j,A=yt(D,u);if(!A.route.action&&!A.route.lazy)j={type:Q.error,error:oe(405,{method:o.method,pathname:u.pathname,routeId:A.route.id})};else if(j=await te("action",o,A,D,d,a,h,b.v7_relativeSplatPath),o.signal.aborted)return{shortCircuited:!0};if(He(j)){let O;return L&&L.replace!=null?O=L.replace:O=j.location===c.location.pathname+c.location.search,await xt(c,j,{submission:f,replace:O}),{shortCircuited:!0}}if(Be(j)){let O=nt(D,A.route.id);return(L&&L.replace)!==!0&&(X=y.Push),{pendingActionData:{},pendingActionError:{[O.route.id]:j.error}}}if(Ne(j))throw oe(400,{type:"defer-action"});return{pendingActionData:{[A.route.id]:j.data}}}async function sn(o,u,f,D,L,N,j,A,O,W,ue){let I=D||fr(u,L),re=L||N||Tr(I),fe=p||i,[De,de]=Z(e.history,c,f,re,u,b.v7_partialHydration&&A===!0,Ge,Nt,Bt,Fe,lt,je,fe,h,W,ue);if(mr(ee=>!(f&&f.some(ae=>ae.route.id===ee))||De&&De.some(ae=>ae.route.id===ee)),Rt=++Ht,De.length===0&&de.length===0){let ee=Nr();return wt(u,k({matches:f,loaderData:{},errors:ue||null},W?{actionData:W}:{},ee?{fetchers:new Map(c.fetchers)}:{}),{flushSync:O}),{shortCircuited:!0}}if(!ot&&(!b.v7_partialHydration||!A)){de.forEach(ae=>{let Oe=c.fetchers.get(ae.key),Wt=bt(void 0,Oe?Oe.data:void 0);c.fetchers.set(ae.key,Wt)});let ee=W||c.actionData;ge(k({navigation:I},ee?Object.keys(ee).length===0?{actionData:null}:{actionData:ee}:{},de.length>0?{fetchers:new Map(c.fetchers)}:{}),{flushSync:O})}de.forEach(ee=>{le.has(ee.key)&&Ke(ee.key),ee.controller&&le.set(ee.key,ee.controller)});let st=()=>de.forEach(ee=>Ke(ee.key));q&&q.signal.addEventListener("abort",st);let{results:vr,loaderResults:ut,fetcherResults:We}=await jr(c.matches,f,De,de,o);if(o.signal.aborted)return{shortCircuited:!0};q&&q.signal.removeEventListener("abort",st),de.forEach(ee=>le.delete(ee.key));let qe=Mr(vr);if(qe){if(qe.idx>=De.length){let ee=de[qe.idx-De.length].key;je.add(ee)}return await xt(c,qe.result,{replace:j}),{shortCircuited:!0}}let{loaderData:gr,errors:yr}=pe(c,f,De,ut,ue,de,We,Xe);Xe.forEach((ee,ae)=>{ee.subscribe(Oe=>{(Oe||ee.done)&&Xe.delete(ae)})});let br=Nr(),dt=Br(Rt),Kt=br||dt||de.length>0;return k({loaderData:gr,errors:yr},Kt?{fetchers:new Map(c.fetchers)}:{})}function un(o,u,f,D){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.");le.has(o)&&Ke(o);let L=(D&&D.unstable_flushSync)===!0,N=p||i,j=U(c.location,c.matches,h,b.v7_prependBasename,f,b.v7_relativeSplatPath,u,D==null?void 0:D.relative),A=Pe(N,j,h);if(!A){Dt(o,u,oe(404,{pathname:j}),{flushSync:L});return}let{path:O,submission:W,error:ue}=M(b.v7_normalizeFormMethod,!0,j,D);if(ue){Dt(o,u,ue,{flushSync:L});return}let I=yt(A,O);if(V=(D&&D.preventScrollReset)===!0,W&&we(W.formMethod)){dn(o,u,O,I,A,L,W);return}lt.set(o,{routeId:u,path:O}),cn(o,u,O,I,A,L,W)}async function dn(o,u,f,D,L,N,j){if(pr(),lt.delete(o),!D.route.action&&!D.route.lazy){let ae=oe(405,{method:j.formMethod,pathname:f,routeId:u});Dt(o,u,ae,{flushSync:N});return}let A=c.fetchers.get(o);ze(o,qr(j,A),{flushSync:N});let O=new AbortController,W=ce(e.history,f,O.signal,j);le.set(o,O);let ue=Ht,I=await te("action",W,D,L,d,a,h,b.v7_relativeSplatPath);if(W.signal.aborted){le.get(o)===O&&le.delete(o);return}if(b.v7_fetcherPersist&&Fe.has(o)){if(He(I)||Be(I)){ze(o,ke(void 0));return}}else{if(He(I))if(le.delete(o),Rt>ue){ze(o,ke(void 0));return}else return je.add(o),ze(o,bt(j)),xt(c,I,{fetcherSubmission:j});if(Be(I)){Dt(o,u,I.error);return}}if(Ne(I))throw oe(400,{type:"defer-action"});let re=c.navigation.location||c.location,fe=ce(e.history,re,O.signal),De=p||i,de=c.navigation.state!=="idle"?Pe(De,c.navigation.location,h):c.matches;H(de,"Didn't find any matches after fetcher action");let st=++Ht;it.set(o,st);let vr=bt(j,I.data);c.fetchers.set(o,vr);let[ut,We]=Z(e.history,c,de,j,re,!1,Ge,Nt,Bt,Fe,lt,je,De,h,{[D.route.id]:I.data},void 0);We.filter(ae=>ae.key!==o).forEach(ae=>{let Oe=ae.key,Wt=c.fetchers.get(Oe),gn=bt(void 0,Wt?Wt.data:void 0);c.fetchers.set(Oe,gn),le.has(Oe)&&Ke(Oe),ae.controller&&le.set(Oe,ae.controller)}),ge({fetchers:new Map(c.fetchers)});let qe=()=>We.forEach(ae=>Ke(ae.key));O.signal.addEventListener("abort",qe);let{results:gr,loaderResults:yr,fetcherResults:br}=await jr(c.matches,de,ut,We,fe);if(O.signal.aborted)return;O.signal.removeEventListener("abort",qe),it.delete(o),le.delete(o),We.forEach(ae=>le.delete(ae.key));let dt=Mr(gr);if(dt){if(dt.idx>=ut.length){let ae=We[dt.idx-ut.length].key;je.add(ae)}return xt(c,dt.result)}let{loaderData:Kt,errors:ee}=pe(c,c.matches,ut,yr,void 0,We,br,Xe);if(c.fetchers.has(o)){let ae=ke(I.data);c.fetchers.set(o,ae)}Br(st),c.navigation.state==="loading"&&st>Rt?(H(X,"Expected pending action"),q&&q.abort(),wt(c.navigation.location,{matches:de,loaderData:Kt,errors:ee,fetchers:new Map(c.fetchers)})):(ge({errors:ee,loaderData:Ae(c.loaderData,Kt,de,ee),fetchers:new Map(c.fetchers)}),Ge=!1)}async function cn(o,u,f,D,L,N,j){let A=c.fetchers.get(o);ze(o,bt(j,A?A.data:void 0),{flushSync:N});let O=new AbortController,W=ce(e.history,f,O.signal);le.set(o,O);let ue=Ht,I=await te("loader",W,D,L,d,a,h,b.v7_relativeSplatPath);if(Ne(I)&&(I=await Ur(I,W.signal,!0)||I),le.get(o)===O&&le.delete(o),!W.signal.aborted){if(Fe.has(o)){ze(o,ke(void 0));return}if(He(I))if(Rt>ue){ze(o,ke(void 0));return}else{je.add(o),await xt(c,I);return}if(Be(I)){Dt(o,u,I.error);return}H(!Ne(I),"Unhandled fetcher deferred data"),ze(o,ke(I.data))}}async function xt(o,u,f){let{submission:D,fetcherSubmission:L,replace:N}=f===void 0?{}:f;u.revalidate&&(Ge=!0);let j=ye(o.location,u.location,{_isRedirect:!0});if(H(j,"Expected a location on the redirect navigation"),r){let re=!1;if(u.reloadDocument)re=!0;else if(Ye.test(u.location)){const fe=e.history.createURL(u.location);re=fe.origin!==t.location.origin||Se(fe.pathname,h)==null}if(re){N?t.location.replace(u.location):t.location.assign(u.location);return}}q=null;let A=N===!0?y.Replace:y.Push,{formMethod:O,formAction:W,formEncType:ue}=o.navigation;!D&&!L&&O&&W&&ue&&(D=Tr(o.navigation));let I=D||L;if(me.has(u.status)&&I&&we(I.formMethod))await Ze(A,j,{submission:k({},I,{formAction:u.location}),preventScrollReset:V});else{let re=fr(j,D);await Ze(A,j,{overrideNavigation:re,fetcherSubmission:L,preventScrollReset:V})}}async function jr(o,u,f,D,L){let N=await Promise.all([...f.map(O=>te("loader",L,O,u,d,a,h,b.v7_relativeSplatPath)),...D.map(O=>O.matches&&O.match&&O.controller?te("loader",ce(e.history,O.path,O.controller.signal),O.match,O.matches,d,a,h,b.v7_relativeSplatPath):{type:Q.error,error:oe(404,{pathname:O.path})})]),j=N.slice(0,f.length),A=N.slice(f.length);return await Promise.all([Or(o,f,j,j.map(()=>L.signal),!1,c.loaderData),Or(o,D.map(O=>O.match),A,D.map(O=>O.controller?O.controller.signal:null),!0)]),{results:N,loaderResults:j,fetcherResults:A}}function pr(){Ge=!0,Nt.push(...mr()),lt.forEach((o,u)=>{le.has(u)&&(Bt.push(u),Ke(u))})}function ze(o,u,f){f===void 0&&(f={}),c.fetchers.set(o,u),ge({fetchers:new Map(c.fetchers)},{flushSync:(f&&f.flushSync)===!0})}function Dt(o,u,f,D){D===void 0&&(D={});let L=nt(c.matches,u);kt(o),ge({errors:{[L.route.id]:f},fetchers:new Map(c.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function Fr(o){return b.v7_fetcherPersist&&(Et.set(o,(Et.get(o)||0)+1),Fe.has(o)&&Fe.delete(o)),c.fetchers.get(o)||sr}function kt(o){let u=c.fetchers.get(o);le.has(o)&&!(u&&u.state==="loading"&&it.has(o))&&Ke(o),lt.delete(o),it.delete(o),je.delete(o),Fe.delete(o),c.fetchers.delete(o)}function fn(o){if(b.v7_fetcherPersist){let u=(Et.get(o)||0)-1;u<=0?(Et.delete(o),Fe.add(o)):Et.set(o,u)}else kt(o);ge({fetchers:new Map(c.fetchers)})}function Ke(o){let u=le.get(o);H(u,"Expected fetch controller: "+o),u.abort(),le.delete(o)}function Ir(o){for(let u of o){let f=Fr(u),D=ke(f.data);c.fetchers.set(u,D)}}function Nr(){let o=[],u=!1;for(let f of je){let D=c.fetchers.get(f);H(D,"Expected fetcher: "+f),D.state==="loading"&&(je.delete(f),o.push(f),u=!0)}return Ir(o),u}function Br(o){let u=[];for(let[f,D]of it)if(D<o){let L=c.fetchers.get(f);H(L,"Expected fetcher: "+f),L.state==="loading"&&(Ke(f),it.delete(f),u.push(f))}return Ir(u),u.length>0}function hn(o,u){let f=c.blockers.get(o)||Je;return Qe.get(o)!==u&&Qe.set(o,u),f}function Hr(o){c.blockers.delete(o),Qe.delete(o)}function zt(o,u){let f=c.blockers.get(o)||Je;H(f.state==="unblocked"&&u.state==="blocked"||f.state==="blocked"&&u.state==="blocked"||f.state==="blocked"&&u.state==="proceeding"||f.state==="blocked"&&u.state==="unblocked"||f.state==="proceeding"&&u.state==="unblocked","Invalid blocker state transition: "+f.state+" -> "+u.state);let D=new Map(c.blockers);D.set(o,u),ge({blockers:D})}function kr(o){let{currentLocation:u,nextLocation:f,historyAction:D}=o;if(Qe.size===0)return;Qe.size>1&&se(!1,"A router only supports one blocker at a time");let L=Array.from(Qe.entries()),[N,j]=L[L.length-1],A=c.blockers.get(N);if(!(A&&A.state==="proceeding")&&j({currentLocation:u,nextLocation:f,historyAction:D}))return N}function mr(o){let u=[];return Xe.forEach((f,D)=>{(!o||o(D))&&(f.cancel(),u.push(D),Xe.delete(D))}),u}function pn(o,u,f){if(E=o,S=u,x=f||null,!P&&c.navigation===gt){P=!0;let D=Kr(c.location,c.matches);D!=null&&ge({restoreScrollPosition:D})}return()=>{E=null,S=null,x=null}}function zr(o,u){return x&&x(o,u.map(D=>Jt(D,c.loaderData)))||o.key}function mn(o,u){if(E&&S){let f=zr(o,u);E[f]=S()}}function Kr(o,u){if(E){let f=zr(o,u),D=E[f];if(typeof D=="number")return D}return null}function vn(o){d={},p=Ve(o,a,void 0,d)}return G={get basename(){return h},get future(){return b},get state(){return c},get routes(){return i},get window(){return t},initialize:rn,subscribe:an,enableScrollRestoration:pn,navigate:Ar,fetch:un,revalidate:on,createHref:o=>e.history.createHref(o),encodeLocation:o=>e.history.encodeLocation(o),getFetcher:Fr,deleteFetcher:fn,dispose:nn,getBlocker:hn,deleteBlocker:Hr,_internalFetchControllers:le,_internalActiveDeferreds:Xe,_internalSetRoutes:vn},G}const l=Symbol("deferred");function s(e,t){H(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 E=t.detectErrorBoundary;a=x=>({hasErrorBoundary:E(x)})}else a=ur;let d=k({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),i=Ve(e,a,void 0,r);async function p(E,x){let{requestContext:S}=x===void 0?{}:x,P=new URL(E.url),w=E.method,g=ye("",be(P),null,"default"),F=Pe(i,g,n);if(!dr(w)&&w!=="HEAD"){let Y=oe(405,{method:w}),{matches:G,route:c}=It(i);return{basename:n,location:g,matches:G,loaderData:{},actionData:null,errors:{[c.id]:Y},statusCode:Y.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!F){let Y=oe(404,{pathname:g.pathname}),{matches:G,route:c}=It(i);return{basename:n,location:g,matches:G,loaderData:{},actionData:null,errors:{[c.id]:Y},statusCode:Y.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let J=await b(E,g,F,S);return at(J)?J:k({location:g,basename:n},J)}async function h(E,x){let{routeId:S,requestContext:P}=x===void 0?{}:x,w=new URL(E.url),g=E.method,F=ye("",be(w),null,"default"),J=Pe(i,F,n);if(!dr(g)&&g!=="HEAD"&&g!=="OPTIONS")throw oe(405,{method:g});if(!J)throw oe(404,{pathname:F.pathname});let Y=S?J.find(V=>V.route.id===S):yt(J,F);if(S&&!Y)throw oe(403,{pathname:F.pathname,routeId:S});if(!Y)throw oe(404,{pathname:F.pathname});let G=await b(E,F,J,P,Y);if(at(G))return G;let c=G.errors?Object.values(G.errors)[0]:void 0;if(c!==void 0)throw c;if(G.actionData)return Object.values(G.actionData)[0];if(G.loaderData){var X;let V=Object.values(G.loaderData)[0];return(X=G.activeDeferreds)!=null&&X[Y.route.id]&&(V[l]=G.activeDeferreds[Y.route.id]),V}}async function b(E,x,S,P,w){H(E.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(we(E.method.toLowerCase()))return await m(E,S,w||yt(S,x),P,w!=null);let g=await _(E,S,P,w);return at(g)?g:k({},g,{actionData:null,actionHeaders:{}})}catch(g){if(Qr(g)){if(g.type===Q.error)throw g.response;return g.response}if(Xr(g))return g;throw g}}async function m(E,x,S,P,w){let g;if(!S.route.action&&!S.route.lazy){let Y=oe(405,{method:E.method,pathname:new URL(E.url).pathname,routeId:S.route.id});if(w)throw Y;g={type:Q.error,error:Y}}else g=await te("action",E,S,x,r,a,n,d.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:w,requestContext:P}),E.signal.aborted&&R(E,w,d);if(He(g))throw new Response(null,{status:g.status,headers:{Location:g.location}});if(Ne(g)){let Y=oe(400,{type:"defer-action"});if(w)throw Y;g={type:Q.error,error:Y}}if(w){if(Be(g))throw g.error;return{matches:[S],loaderData:{},actionData:{[S.route.id]:g.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(Be(g)){let Y=nt(x,S.route.id),G=await _(E,x,P,void 0,{[Y.route.id]:g.error});return k({},G,{statusCode:rt(g.error)?g.error.status:500,actionData:null,actionHeaders:k({},g.headers?{[S.route.id]:g.headers}:{})})}let F=new Request(E.url,{headers:E.headers,redirect:E.redirect,signal:E.signal}),J=await _(F,x,P);return k({},J,g.statusCode?{statusCode:g.statusCode}:{},{actionData:{[S.route.id]:g.data},actionHeaders:k({},g.headers?{[S.route.id]:g.headers}:{})})}async function _(E,x,S,P,w){let g=P!=null;if(g&&!(P!=null&&P.route.loader)&&!(P!=null&&P.route.lazy))throw oe(400,{method:E.method,pathname:new URL(E.url).pathname,routeId:P==null?void 0:P.route.id});let J=(P?[P]:K(x,Object.keys(w||{})[0])).filter(V=>V.route.loader||V.route.lazy);if(J.length===0)return{matches:x,loaderData:x.reduce((V,q)=>Object.assign(V,{[q.route.id]:null}),{}),errors:w||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let Y=await Promise.all([...J.map(V=>te("loader",E,V,x,r,a,n,d.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:g,requestContext:S}))]);E.signal.aborted&&R(E,g,d);let G=new Map,c=Te(x,J,Y,w,G),X=new Set(J.map(V=>V.route.id));return x.forEach(V=>{X.has(V.route.id)||(c.loaderData[V.route.id]=null)}),k({},c,{matches:x,activeDeferreds:G.size>0?Object.fromEntries(G.entries()):null})}return{dataRoutes:i,query:p,queryRoute:h}}function v(e,t,r){return k({},t,{statusCode:rt(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function R(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 C(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function U(e,t,r,n,a,d,i,p){let h,b;if(i){h=[];for(let _ of t)if(h.push(_),_.route.id===i){b=_;break}}else h=t,b=t[t.length-1];let m=nr(a||".",rr(h,d),Se(e.pathname,r)||e.pathname,p==="path");return a==null&&(m.search=e.search,m.hash=e.hash),(a==null||a===""||a===".")&&b&&b.route.index&&!cr(m.search)&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(m.pathname=m.pathname==="/"?r:Ie([r,m.pathname])),be(m)}function M(e,t,r,n){if(!n||!C(n))return{path:r};if(n.formMethod&&!dr(n.formMethod))return{path:r,error:oe(405,{method:n.formMethod})};let a=()=>({path:r,error:oe(400,{type:"invalid-body"})}),d=n.formMethod||"get",i=e?d.toUpperCase():d.toLowerCase(),p=_r(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!we(i))return a();let E=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((x,S)=>{let[P,w]=S;return""+x+P+"="+w+`
20
+ `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:p,formEncType:n.formEncType,formData:void 0,json:void 0,text:E}}}else if(n.formEncType==="application/json"){if(!we(i))return a();try{let E=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:p,formEncType:n.formEncType,formData:void 0,json:E,text:void 0}}}catch{return a()}}}H(typeof FormData=="function","FormData is not available in this environment");let h,b;if(n.formData)h=Re(n.formData),b=n.formData;else if(n.body instanceof FormData)h=Re(n.body),b=n.body;else if(n.body instanceof URLSearchParams)h=n.body,b=Ee(h);else if(n.body==null)h=new URLSearchParams,b=new FormData;else try{h=new URLSearchParams(n.body),b=Ee(h)}catch{return a()}let m={formMethod:i,formAction:p,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:b,json:void 0,text:void 0};if(we(m.formMethod))return{path:r,submission:m};let _=ie(r);return t&&_.search&&cr(_.search)&&h.append("index",""),_.search="?"+h,{path:be(_),submission:m}}function K(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 Z(e,t,r,n,a,d,i,p,h,b,m,_,E,x,S,P){let w=P?Object.values(P)[0]:S?Object.values(S)[0]:void 0,g=e.createURL(t.location),F=e.createURL(a),J=P?Object.keys(P)[0]:void 0,G=K(r,J).filter((X,V)=>{let{route:q}=X;if(q.lazy)return!0;if(q.loader==null)return!1;if(d)return q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(z(t.loaderData,t.matches[V],X)||p.some(Ce=>Ce===X.route.id))return!0;let _e=t.matches[V],xe=X;return T(X,k({currentUrl:g,currentParams:_e.params,nextUrl:F,nextParams:xe.params},n,{actionResult:w,defaultShouldRevalidate:i||g.pathname+g.search===F.pathname+F.search||g.search!==F.search||$(_e,xe)}))}),c=[];return m.forEach((X,V)=>{if(d||!r.some(ot=>ot.route.id===X.routeId)||b.has(V))return;let q=Pe(E,X.path,x);if(!q){c.push({key:V,routeId:X.routeId,path:X.path,matches:null,match:null,controller:null});return}let _e=t.fetchers.get(V),xe=yt(q,X.path),Ce=!1;_.has(V)?Ce=!1:h.includes(V)?Ce=!0:_e&&_e.state!=="idle"&&_e.data===void 0?Ce=i:Ce=T(xe,k({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:F,nextParams:r[r.length-1].params},n,{actionResult:w,defaultShouldRevalidate:i})),Ce&&c.push({key:V,routeId:X.routeId,path:X.path,matches:q,match:xe,controller:new AbortController})}),[G,c]}function z(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function $(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function T(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function ne(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];H(a,"No route found in manifest");let d={};for(let i in n){let h=a[i]!==void 0&&i!=="hasErrorBoundary";se(!h,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!h&&!Rr.has(i)&&(d[i]=n[i])}Object.assign(a,d),Object.assign(a,k({},t(a),{lazy:void 0}))}async function te(e,t,r,n,a,d,i,p,h){h===void 0&&(h={});let b,m,_,E=P=>{let w,g=new Promise((F,J)=>w=J);return _=()=>w(),t.signal.addEventListener("abort",_),Promise.race([P({request:t,params:r.params,context:h.requestContext}),g])};try{let P=r.route[e];if(r.route.lazy)if(P){let w,g=await Promise.all([E(P).catch(F=>{w=F}),ne(r.route,d,a)]);if(w)throw w;m=g[0]}else if(await ne(r.route,d,a),P=r.route[e],P)m=await E(P);else if(e==="action"){let w=new URL(t.url),g=w.pathname+w.search;throw oe(405,{method:t.method,pathname:g,routeId:r.route.id})}else return{type:Q.data,data:void 0};else if(P)m=await E(P);else{let w=new URL(t.url),g=w.pathname+w.search;throw oe(404,{pathname:g})}H(m!==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(P){b=Q.error,m=P}finally{_&&t.signal.removeEventListener("abort",_)}if(at(m)){let P=m.status;if(Lr.has(P)){let g=m.headers.get("Location");if(H(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ye.test(g))g=U(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,g,p);else if(!h.isStaticRequest){let F=new URL(t.url),J=g.startsWith("//")?new URL(F.protocol+g):new URL(g),Y=Se(J.pathname,i)!=null;J.origin===F.origin&&Y&&(g=J.pathname+J.search+J.hash)}if(h.isStaticRequest)throw m.headers.set("Location",g),m;return{type:Q.redirect,status:P,location:g,revalidate:m.headers.get("X-Remix-Revalidate")!==null,reloadDocument:m.headers.get("X-Remix-Reload-Document")!==null}}if(h.isRouteRequest)throw{type:b===Q.error?Q.error:Q.data,response:m};let w;try{let g=m.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?m.body==null?w=null:w=await m.json():w=await m.text()}catch(g){return{type:Q.error,error:g}}return b===Q.error?{type:b,error:new Tt(P,m.statusText,w),headers:m.headers}:{type:Q.data,data:w,statusCode:m.status,headers:m.headers}}if(b===Q.error)return{type:b,error:m};if(Gr(m)){var x,S;return{type:Q.deferred,deferredData:m,statusCode:(x=m.init)==null?void 0:x.status,headers:((S=m.init)==null?void 0:S.headers)&&new Headers(m.init.headers)}}return{type:Q.data,data:m}}function ce(e,t,r,n){let a=e.createURL(_r(t)).toString(),d={signal:r};if(n&&we(n.formMethod)){let{formMethod:i,formEncType:p}=n;d.method=i.toUpperCase(),p==="application/json"?(d.headers=new Headers({"Content-Type":p}),d.body=JSON.stringify(n.json)):p==="text/plain"?d.body=n.text:p==="application/x-www-form-urlencoded"&&n.formData?d.body=Re(n.formData):d.body=n.formData}return new Request(a,d)}function Re(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Ee(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Te(e,t,r,n,a){let d={},i=null,p,h=!1,b={};return r.forEach((m,_)=>{let E=t[_].route.id;if(H(!He(m),"Cannot handle redirect results in processLoaderData"),Be(m)){let x=nt(e,E),S=m.error;n&&(S=Object.values(n)[0],n=void 0),i=i||{},i[x.route.id]==null&&(i[x.route.id]=S),d[E]=void 0,h||(h=!0,p=rt(m.error)?m.error.status:500),m.headers&&(b[E]=m.headers)}else Ne(m)?(a.set(E,m.deferredData),d[E]=m.deferredData.data):d[E]=m.data,m.statusCode!=null&&m.statusCode!==200&&!h&&(p=m.statusCode),m.headers&&(b[E]=m.headers)}),n&&(i=n,d[Object.keys(n)[0]]=void 0),{loaderData:d,errors:i,statusCode:p||200,loaderHeaders:b}}function pe(e,t,r,n,a,d,i,p){let{loaderData:h,errors:b}=Te(t,r,n,a,p);for(let m=0;m<d.length;m++){let{key:_,match:E,controller:x}=d[m];H(i!==void 0&&i[m]!==void 0,"Did not find corresponding fetcher result");let S=i[m];if(!(x&&x.signal.aborted))if(Be(S)){let P=nt(e.matches,E==null?void 0:E.route.id);b&&b[P.route.id]||(b=k({},b,{[P.route.id]:S.error})),e.fetchers.delete(_)}else if(He(S))H(!1,"Unhandled fetcher revalidation redirect");else if(Ne(S))H(!1,"Unhandled fetcher deferred data");else{let P=ke(S.data);e.fetchers.set(_,P)}}return{loaderData:h,errors:b}}function Ae(e,t,r,n){let a=k({},t);for(let d of r){let i=d.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&d.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function nt(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 It(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 oe(e,t){let{pathname:r,routeId:n,method:a,type:d}=t===void 0?{}:t,i="Unknown Server Error",p="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&r&&n?p="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.":d==="defer-action"?p="defer() is not supported in actions":d==="invalid-body"&&(p="Unable to encode submission body")):e===403?(i="Forbidden",p='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",p='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",a&&r&&n?p="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&&(p='Invalid request method "'+a.toUpperCase()+'"')),new Tt(e||500,i,new Error(p),!0)}function Mr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(He(r))return{result:r,idx:t}}}function _r(e){let t=typeof e=="string"?ie(e):e;return be(k({},t,{hash:""}))}function Yr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ne(e){return e.type===Q.deferred}function Be(e){return e.type===Q.error}function He(e){return(e&&e.type)===Q.redirect}function Gr(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 at(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body!="undefined"}function Xr(e){if(!at(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function Qr(e){return e&&at(e.response)&&(e.type===Q.data||e.type===Q.error)}function dr(e){return lr.has(e.toLowerCase())}function we(e){return jt.has(e.toLowerCase())}async function Or(e,t,r,n,a,d){for(let i=0;i<r.length;i++){let p=r[i],h=t[i];if(!h)continue;let b=e.find(_=>_.route.id===h.route.id),m=b!=null&&!$(b,h)&&(d&&d[h.route.id])!==void 0;if(Ne(p)&&(a||m)){let _=n[i];H(_,"Expected an AbortSignal for revalidating fetcher deferred result"),await Ur(p,_,a).then(E=>{E&&(r[i]=E||r[i])})}}}async function Ur(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Q.data,data:e.deferredData.unwrappedData}}catch(a){return{type:Q.error,error:a}}return{type:Q.data,data:e.deferredData.data}}}function cr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function yt(e,t){let r=typeof t=="string"?ie(t).search:t.search;if(e[e.length-1].route.index&&cr(r||""))return e[e.length-1];let n=tr(e);return n[n.length-1]}function Tr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:d,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(d!=null)return{formMethod:t,formAction:r,formEncType:n,formData:d,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function fr(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 Zr(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 bt(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 qr(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 ke(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 en(e,t){try{let r=e.sessionStorage.getItem(Ft);if(r){let n=JSON.parse(r);for(let[a,d]of Object.entries(n||{}))d&&Array.isArray(d)&&t.set(a,new Set(d||[]))}}catch{}}function tn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Ft,JSON.stringify(r))}catch(n){se(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}}}]);})();
21
+
22
+ //# sourceMappingURL=module-react-router.96a60fdb.js.map