@techdocs/cli 1.3.0-next.2 → 1.3.0
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 +16 -0
- package/dist/embedded-app/.config-schema.json +48 -48
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1032.8801032e.chunk.js → 1032.4eeed38c.chunk.js} +1 -1
- package/dist/embedded-app/static/{1032.8801032e.chunk.js.map → 1032.4eeed38c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1105.9f693bc4.chunk.js → 1105.ea587869.chunk.js} +1 -1
- package/dist/embedded-app/static/{1105.9f693bc4.chunk.js.map → 1105.ea587869.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{184.23738c38.chunk.js → 184.c0ade3a9.chunk.js} +1 -1
- package/dist/embedded-app/static/{184.23738c38.chunk.js.map → 184.c0ade3a9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2440.9c46cefb.chunk.js → 2440.82725a72.chunk.js} +1 -1
- package/dist/embedded-app/static/{2440.9c46cefb.chunk.js.map → 2440.82725a72.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5458.1bf7c942.chunk.js → 5458.ab22b201.chunk.js} +1 -1
- package/dist/embedded-app/static/{5458.1bf7c942.chunk.js.map → 5458.ab22b201.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5837.72318c15.chunk.js → 5837.9510a1b9.chunk.js} +1 -1
- package/dist/embedded-app/static/{5837.72318c15.chunk.js.map → 5837.9510a1b9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6051.716303b7.chunk.js +4 -0
- package/dist/embedded-app/static/6051.716303b7.chunk.js.map +1 -0
- package/dist/embedded-app/static/{732.dc9d791a.chunk.js → 732.d703f6a9.chunk.js} +1 -1
- package/dist/embedded-app/static/{732.dc9d791a.chunk.js.map → 732.d703f6a9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7560.4d06ceca.chunk.js → 7560.1af568e5.chunk.js} +1 -1
- package/dist/embedded-app/static/{7560.4d06ceca.chunk.js.map → 7560.1af568e5.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7750.0ea5fd01.chunk.js → 7750.1bdc8262.chunk.js} +1 -1
- package/dist/embedded-app/static/{7750.0ea5fd01.chunk.js.map → 7750.1bdc8262.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8951.12cb329f.chunk.js → 8951.3e2e38b8.chunk.js} +1 -1
- package/dist/embedded-app/static/{8951.12cb329f.chunk.js.map → 8951.3e2e38b8.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9545.6d4ef1f2.chunk.js → 9545.efced59f.chunk.js} +1 -1
- package/dist/embedded-app/static/{9545.6d4ef1f2.chunk.js.map → 9545.efced59f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9770.58bd6437.chunk.js → 9770.b9672083.chunk.js} +1 -1
- package/dist/embedded-app/static/{9770.58bd6437.chunk.js.map → 9770.b9672083.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.6fc07bc1.js +497 -0
- package/dist/embedded-app/static/main.6fc07bc1.js.map +1 -0
- package/dist/embedded-app/static/module-remix-run.b9acb514.js +12 -0
- package/dist/embedded-app/static/module-remix-run.b9acb514.js.map +1 -0
- package/dist/embedded-app/static/{runtime.c643eee1.js → runtime.6fc07bc1.js} +2 -2
- package/dist/embedded-app/static/{runtime.c643eee1.js.map → runtime.6fc07bc1.js.map} +1 -1
- package/dist/embedded-app/static/vendor.6fc07bc1.js +231 -0
- package/dist/embedded-app/static/vendor.6fc07bc1.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +6 -6
- package/dist/embedded-app/static/6051.0cb12f85.chunk.js +0 -4
- package/dist/embedded-app/static/6051.0cb12f85.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.c643eee1.js +0 -494
- package/dist/embedded-app/static/main.c643eee1.js.map +0 -1
- package/dist/embedded-app/static/module-remix-run.e15d5a2e.js +0 -12
- package/dist/embedded-app/static/module-remix-run.e15d5a2e.js.map +0 -1
- package/dist/embedded-app/static/vendor.c643eee1.js +0 -231
- package/dist/embedded-app/static/vendor.c643eee1.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5924],{16060:function(wr,wt,vt){vt.d(wt,{Ep:function(){return $},Gn:function(){return Ot},PP:function(){return bt},RQ:function(){return ie},WK:function(){return xe},Zn:function(){return ze},Zq:function(){return Ae},aU:function(){return T},cP:function(){return K},fp:function(){return k},i3:function(){return Ve},kG:function(){return L},lX:function(){return Dt},pC:function(){return Ye}});/**
|
|
2
|
+
* @remix-run/router v1.2.1
|
|
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 S(){return S=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},S.apply(this,arguments)}var T;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(T||(T={}));const He="popstate";function bt(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((i,h)=>p(i,typeof i=="string"?null:i.state,h===0?"default":void 0));let o=g(r==null?a.length-1:r),l=T.Pop,f=null;function g(i){return Math.min(Math.max(i,0),a.length-1)}function u(){return a[o]}function p(i,h,c){h===void 0&&(h=null);let b=Y(a?u().pathname:"/",i,h,c);return Ie(b.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(i)),b}return{get index(){return o},get action(){return l},get location(){return u()},createHref(i){return typeof i=="string"?i:$(i)},encodeLocation(i){let h=typeof i=="string"?K(i):i;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(i,h){l=T.Push;let c=p(i,h);o+=1,a.splice(o,a.length,c),n&&f&&f({action:l,location:c})},replace(i,h){l=T.Replace;let c=p(i,h);a[o]=c,n&&f&&f({action:l,location:c})},go(i){l=T.Pop,o=g(o+i),f&&f({action:l,location:u()})},listen(i){return f=i,()=>{f=null}}}}function Dt(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:l,hash:f}=n.location;return Y("",{pathname:o,search:l,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:$(a)}return $e(t,r,null,e)}function vr(e){e===void 0&&(e={});function t(a,o){let{pathname:l="/",search:f="",hash:g=""}=K(a.location.hash.substr(1));return Y("",{pathname:l,search:f,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(a,o){let l=a.document.querySelector("base"),f="";if(l&&l.getAttribute("href")){let g=a.location.href,u=g.indexOf("#");f=u===-1?g:g.slice(0,u)}return f+"#"+(typeof o=="string"?o:$(o))}function n(a,o){Ie(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return $e(t,r,n,e)}function L(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function Ie(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch{}}}function Rt(){return Math.random().toString(36).substr(2,8)}function Ne(e){return{usr:e.state,key:e.key}}function Y(e,t,r,n){return r===void 0&&(r=null),S({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?K(t):t,{state:r,key:t&&t.key||n||Rt()})}function $(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 K(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 de(e){let t=typeof window!="undefined"&&typeof window.location!="undefined"&&window.location.origin!=="null"?window.location.origin:window.location.href,r=typeof e=="string"?e:$(e);return L(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}function $e(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,f=T.Pop,g=null;function u(){f=T.Pop,g&&g({action:f,location:i.location})}function p(h,c){f=T.Push;let b=Y(i.location,h,c);r&&r(b,h);let R=Ne(b),E=i.createHref(b);try{l.pushState(R,"",E)}catch{a.location.assign(E)}o&&g&&g({action:f,location:i.location})}function w(h,c){f=T.Replace;let b=Y(i.location,h,c);r&&r(b,h);let R=Ne(b),E=i.createHref(b);l.replaceState(R,"",E),o&&g&&g({action:f,location:i.location})}let i={get action(){return f},get location(){return e(a,l)},listen(h){if(g)throw new Error("A history only accepts one active listener");return a.addEventListener(He,u),g=h,()=>{a.removeEventListener(He,u),g=null}},createHref(h){return t(a,h)},encodeLocation(h){let c=de(typeof h=="string"?h:$(h));return{pathname:c.pathname,search:c.search,hash:c.hash}},push:p,replace:w,go(h){return l.go(h)}};return i}var O;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(O||(O={}));function Pt(e){return e.index===!0}function Ee(e,t,r){return t===void 0&&(t=[]),r===void 0&&(r=new Set),e.map((n,a)=>{let o=[...t,a],l=typeof n.id=="string"?n.id:o.join("-");return L(n.index!==!0||!n.children,"Cannot specify children on an index route"),L(!r.has(l),'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),r.add(l),Pt(n)?S({},n,{id:l}):S({},n,{id:l,children:n.children?Ee(n.children,o,r):void 0})})}function k(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?K(t):t,a=ze(n.pathname||"/",r);if(a==null)return null;let o=Be(e);Et(o);let l=null;for(let f=0;l==null&&f<o.length;++f)l=Tt(o[f],Ht(a));return l}function Be(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,l,f)=>{let g={relativePath:f===void 0?o.path||"":f,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};g.relativePath.startsWith("/")&&(L(g.relativePath.startsWith(n),'Absolute route path "'+g.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),g.relativePath=g.relativePath.slice(n.length));let u=ie([n,g.relativePath]),p=r.concat(g);o.children&&o.children.length>0&&(L(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Be(o.children,t,p,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:_t(u,o.index),routesMeta:p})};return e.forEach((o,l)=>{var f;if(o.path===""||!((f=o.path)!=null&&f.includes("?")))a(o,l);else for(let g of We(o.path))a(o,l,g)}),t}function We(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let l=We(n.join("/")),f=[];return f.push(...l.map(g=>g===""?o:[o,g].join("/"))),a&&f.push(...l),f.map(g=>e.startsWith("/")&&g===""?"/":g)}function Et(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ft(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Mt=/^:\w+$/,At=3,St=2,xt=1,Ct=10,Lt=-2,Ke=e=>e==="*";function _t(e,t){let r=e.split("/"),n=r.length;return r.some(Ke)&&(n+=Lt),t&&(n+=St),r.filter(a=>!Ke(a)).reduce((a,o)=>a+(Mt.test(o)?At:o===""?xt:Ct),n)}function Ft(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="/",o=[];for(let l=0;l<r.length;++l){let f=r[l],g=l===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",p=jt({path:f.relativePath,caseSensitive:f.caseSensitive,end:g},u);if(!p)return null;Object.assign(n,p.params);let w=f.route;o.push({params:n,pathname:ie([a,p.pathname]),pathnameBase:$t(ie([a,p.pathnameBase])),route:w}),p.pathnameBase!=="/"&&(a=ie([a,p.pathnameBase]))}return o}function Ot(e,t){t===void 0&&(t={});let r=e;return r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(ye(!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(/\*$/,"/*")),r.replace(/^:(\w+)/g,(n,a)=>(L(t[a]!=null,'Missing ":'+a+'" param'),t[a])).replace(/\/:(\w+)/g,(n,a)=>(L(t[a]!=null,'Missing ":'+a+'" param'),"/"+t[a])).replace(/(\/?)\*/,(n,a,o,l)=>{const f="*";return t[f]==null?l==="/*"?"/":"":""+a+t[f]})}function jt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ut(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),f=a.slice(1);return{params:n.reduce((u,p,w)=>{if(p==="*"){let i=f[w]||"";l=o.slice(0,o.length-i.length).replace(/(.)\/+$/,"$1")}return u[p]=It(f[w]||"",p),u},{}),pathname:o,pathnameBase:l,pattern:e}}function Ut(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ye(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,f)=>(n.push(f),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Ht(e){try{return decodeURI(e)}catch(t){return ye(!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 It(e,t){try{return decodeURIComponent(e)}catch(r){return ye(!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 ze(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 ye(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ve(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?K(e):e;return{pathname:r?r.startsWith("/")?r:Nt(r,t):t,search:Bt(n),hash:Wt(a)}}function Nt(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 Me(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 Ae(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ye(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=K(e):(a=S({},e),L(!a.pathname||!a.pathname.includes("?"),Me("?","pathname","search",a)),L(!a.pathname||!a.pathname.includes("#"),Me("#","pathname","hash",a)),L(!a.search||!a.search.includes("#"),Me("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,f;if(n||l==null)f=r;else{let w=t.length-1;if(l.startsWith("..")){let i=l.split("/");for(;i[0]==="..";)i.shift(),w-=1;a.pathname=i.join("/")}f=w>=0?t[w]:"/"}let g=Ve(a,f),u=l&&l!=="/"&&l.endsWith("/"),p=(o||l===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(u||p)&&(g.pathname+="/"),g}function br(e){return e===""||e.pathname===""?"/":typeof e=="string"?K(e).pathname:e.pathname}const ie=e=>e.join("/").replace(/\/\/+/g,"/"),$t=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Dr=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),S({},n,{headers:a}))};class Ge extends Error{}class Je{constructor(t){this.pendingKeys=new Set,this.subscriber=void 0,L(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let r;this.abortPromise=new Promise((a,o)=>r=o),this.controller=new AbortController;let n=()=>r(new Ge("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(t).reduce((a,o)=>{let[l,f]=o;return Object.assign(a,{[l]:this.trackPromise(l,f)})},{})}trackPromise(t,r){if(!(r instanceof Promise))return r;this.pendingKeys.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,null,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 Ge)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);this.pendingKeys.delete(r),this.done&&this.unlistenAbortSignal();const o=this.subscriber;return n?(Object.defineProperty(t,"_error",{get:()=>n}),o&&o(!1),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),o&&o(!1),a)}subscribe(t){this.subscriber=t}cancel(){this.controller.abort(),this.pendingKeys.forEach((r,n)=>this.pendingKeys.delete(n));let t=this.subscriber;t&&t(!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(o=>{t.removeEventListener("abort",n),(o||this.done)&&a(o)})})}return r}get done(){return this.pendingKeys.size===0}get unwrappedData(){return L(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]:zt(a)})},{})}}function Kt(e){return e instanceof Promise&&e._tracked===!0}function zt(e){if(!Kt(e))return e;if(e._error)throw e._error;return e._data}function Rr(e){return new Je(e)}const Pr=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,S({},n,{headers:a}))};class Se{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 xe(e){return e instanceof Se}const Qe=["post","put","patch","delete"],Vt=new Set(Qe),Yt=["get",...Qe],Gt=new Set(Yt),Jt=new Set([301,302,303,307,308]),Qt=new Set([307,308]),Ce={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},kt={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Xt=!(typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined");function Mr(e){L(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t=Ee(e.routes),r=null,n=new Set,a=null,o=null,l=null,f=e.hydrationData!=null,g=k(t,e.history.location,e.basename),u=null;if(g==null){let s=I(404,{pathname:e.history.location.pathname}),{matches:d,route:m}=we(t);g=d,u={[m.id]:s}}let p=!g.some(s=>s.route.loader)||e.hydrationData!=null,w,i={historyAction:e.history.action,location:e.history.location,matches:g,initialized:p,navigation:Ce,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||u,fetchers:new Map},h=T.Pop,c=!1,b,R=!1,E=!1,_=[],j=[],P=new Map,N=0,_e=-1,ce=new Map,be=new Set,le=new Map,te=new Map;function rr(){return r=e.history.listen(s=>{let{action:d,location:m}=s;return re(d,m)}),i.initialized||re(T.Pop,i.location),w}function nr(){r&&r(),n.clear(),b&&b.abort(),i.fetchers.forEach((s,d)=>Oe(d))}function ar(s){return n.add(s),()=>n.delete(s)}function B(s){i=S({},i,s),n.forEach(d=>d(i))}function fe(s,d){var m;let v=i.actionData!=null&&i.navigation.formMethod!=null&&Q(i.navigation.formMethod)&&i.navigation.state==="loading"&&((m=s.state)==null?void 0:m._isRedirect)!==!0,y;d.actionData?Object.keys(d.actionData).length>0?y=d.actionData:y=null:v?y=i.actionData:y=null;let M=d.loaderData?at(i.loaderData,d.loaderData,d.matches||[],d.errors):i.loaderData;B(S({},d,{actionData:y,loaderData:M,historyAction:h,location:s,initialized:!0,navigation:Ce,revalidation:"idle",restoreScrollPosition:i.navigation.formData?!1:gt(s,d.matches||i.matches),preventScrollReset:c})),R||h===T.Pop||(h===T.Push?e.history.push(s,s.state):h===T.Replace&&e.history.replace(s,s.state)),h=T.Pop,c=!1,R=!1,E=!1,_=[],j=[]}async function ir(s,d){if(typeof s=="number"){e.history.go(s);return}let{path:m,submission:v,error:y}=ke(s,d),M=Y(i.location,m,d&&d.state);M=S({},M,e.history.encodeLocation(M));let A=d&&d.replace!=null?d.replace:void 0,x=T.Push;A===!0?x=T.Replace:A===!1||v!=null&&Q(v.formMethod)&&v.formAction===i.location.pathname+i.location.search&&(x=T.Replace);let D=d&&"preventScrollReset"in d?d.preventScrollReset===!0:void 0;return await re(x,M,{submission:v,pendingError:y,preventScrollReset:D,replace:d&&d.replace})}function or(){if(Fe(),B({revalidation:"loading"}),i.navigation.state!=="submitting"){if(i.navigation.state==="idle"){re(i.historyAction,i.location,{startUninterruptedRevalidation:!0});return}re(h||i.historyAction,i.navigation.location,{overrideNavigation:i.navigation})}}async function re(s,d,m){b&&b.abort(),b=null,h=s,R=(m&&m.startUninterruptedRevalidation)===!0,pr(i.location,i.matches),c=(m&&m.preventScrollReset)===!0;let v=m&&m.overrideNavigation,y=k(t,d,e.basename);if(!y){let F=I(404,{pathname:d.pathname}),{matches:z,route:V}=we(t);je(),fe(d,{matches:z,loaderData:{},errors:{[V.id]:F}});return}if(er(i.location,d)){fe(d,{matches:y});return}b=new AbortController;let M=ue(d,b.signal,m&&m.submission),A,x;if(m&&m.pendingError)x={[Z(y).route.id]:m.pendingError};else if(m&&m.submission&&Q(m.submission.formMethod)){let F=await lr(M,d,m.submission,y,{replace:m.replace});if(F.shortCircuited)return;A=F.pendingActionData,x=F.pendingActionError,v=S({state:"loading",location:d},m.submission),M=new Request(M.url,{signal:M.signal})}let{shortCircuited:D,loaderData:U,errors:C}=await sr(M,d,y,v,m&&m.submission,m&&m.replace,A,x);D||(b=null,fe(d,S({matches:y},A?{actionData:A}:{},{loaderData:U,errors:C})))}async function lr(s,d,m,v,y){Fe();let M=S({state:"submitting",location:d},m);B({navigation:M});let A,x=ve(v,d);if(!x.route.action)A={type:O.error,error:I(405,{method:s.method,pathname:d.pathname,routeId:x.route.id})};else if(A=await X("action",s,x,v,w.basename),s.signal.aborted)return{shortCircuited:!0};if(ee(A)){let D;return y&&y.replace!=null?D=y.replace:D=A.location===i.location.pathname+i.location.search,await he(i,A,{submission:m,replace:D}),{shortCircuited:!0}}if(q(A)){let D=Z(v,x.route.id);return(y&&y.replace)!==!0&&(h=T.Push),{pendingActionData:{},pendingActionError:{[D.route.id]:A.error}}}if(G(A))throw new Error("defer() is not supported in actions");return{pendingActionData:{[x.route.id]:A.data}}}async function sr(s,d,m,v,y,M,A,x){let D=v;D||(D=S({state:"loading",location:d,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},y));let U=y||(D.formMethod&&D.formAction&&D.formData&&D.formEncType?{formMethod:D.formMethod,formAction:D.formAction,formData:D.formData,formEncType:D.formEncType}:void 0),[C,F]=Ze(i,m,U,d,E,_,j,A,x,le);if(je(H=>!(m&&m.some(W=>W.route.id===H))||C&&C.some(W=>W.route.id===H)),C.length===0&&F.length===0)return fe(d,S({matches:m,loaderData:{},errors:x||null},A?{actionData:A}:{})),{shortCircuited:!0};if(!R){F.forEach(W=>{let[ne]=W,me=i.fetchers.get(ne),ge={state:"loading",data:me&&me.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};i.fetchers.set(ne,ge)});let H=A||i.actionData;B(S({navigation:D},H?Object.keys(H).length===0?{actionData:null}:{actionData:H}:{},F.length>0?{fetchers:new Map(i.fetchers)}:{}))}_e=++N,F.forEach(H=>{let[W]=H;return P.set(W,b)});let{results:z,loaderResults:V,fetcherResults:pe}=await ht(i.matches,m,C,F,s);if(s.signal.aborted)return{shortCircuited:!0};F.forEach(H=>{let[W]=H;return P.delete(W)});let Re=it(z);if(Re)return await he(i,Re,{replace:M}),{shortCircuited:!0};let{loaderData:Pe,errors:se}=nt(i,m,C,V,x,F,pe,te);te.forEach((H,W)=>{H.subscribe(ne=>{(ne||H.done)&&te.delete(W)})}),fr();let Ue=mt(_e);return S({loaderData:Pe,errors:se},Ue||F.length>0?{fetchers:new Map(i.fetchers)}:{})}function ft(s){return i.fetchers.get(s)||kt}function dr(s,d,m,v){if(Xt)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.");P.has(s)&&De(s);let y=k(t,m,e.basename);if(!y){Te(s,d,I(404,{pathname:m}));return}let{path:M,submission:A}=ke(m,v,!0),x=ve(y,M);if(A&&Q(A.formMethod)){ur(s,d,M,x,y,A);return}le.set(s,[M,x,y]),cr(s,d,M,x,y,A)}async function ur(s,d,m,v,y,M){if(Fe(),le.delete(s),!v.route.action){let J=I(405,{method:M.formMethod,pathname:m,routeId:d});Te(s,d,J);return}let A=i.fetchers.get(s),x=S({state:"submitting"},M,{data:A&&A.data," _hasFetcherDoneAnything ":!0});i.fetchers.set(s,x),B({fetchers:new Map(i.fetchers)});let D=new AbortController,U=ue(m,D.signal,M);P.set(s,D);let C=await X("action",U,v,y,w.basename);if(U.signal.aborted){P.get(s)===D&&P.delete(s);return}if(ee(C)){P.delete(s),be.add(s);let J=S({state:"loading"},M,{data:void 0," _hasFetcherDoneAnything ":!0});return i.fetchers.set(s,J),B({fetchers:new Map(i.fetchers)}),he(i,C,{isFetchActionRedirect:!0})}if(q(C)){Te(s,d,C.error);return}G(C)&&L(!1,"defer() is not supported in actions");let F=i.navigation.location||i.location,z=ue(F,D.signal),V=i.navigation.state!=="idle"?k(t,i.navigation.location,e.basename):i.matches;L(V,"Didn't find any matches after fetcher action");let pe=++N;ce.set(s,pe);let Re=S({state:"loading",data:C.data},M,{" _hasFetcherDoneAnything ":!0});i.fetchers.set(s,Re);let[Pe,se]=Ze(i,V,M,F,E,_,j,{[v.route.id]:C.data},void 0,le);se.filter(J=>{let[ae]=J;return ae!==s}).forEach(J=>{let[ae]=J,yt=i.fetchers.get(ae),yr={state:"loading",data:yt&&yt.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};i.fetchers.set(ae,yr),P.set(ae,D)}),B({fetchers:new Map(i.fetchers)});let{results:Ue,loaderResults:H,fetcherResults:W}=await ht(i.matches,V,Pe,se,z);if(D.signal.aborted)return;ce.delete(s),P.delete(s),se.forEach(J=>{let[ae]=J;return P.delete(ae)});let ne=it(Ue);if(ne)return he(i,ne);let{loaderData:me,errors:ge}=nt(i,i.matches,Pe,H,void 0,se,W,te),mr={state:"idle",data:C.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};i.fetchers.set(s,mr);let gr=mt(pe);i.navigation.state==="loading"&&pe>_e?(L(h,"Expected pending action"),b&&b.abort(),fe(i.navigation.location,{matches:V,loaderData:me,errors:ge,fetchers:new Map(i.fetchers)})):(B(S({errors:ge,loaderData:at(i.loaderData,me,V,ge)},gr?{fetchers:new Map(i.fetchers)}:{})),E=!1)}async function cr(s,d,m,v,y,M){let A=i.fetchers.get(s),x=S({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},M,{data:A&&A.data," _hasFetcherDoneAnything ":!0});i.fetchers.set(s,x),B({fetchers:new Map(i.fetchers)});let D=new AbortController,U=ue(m,D.signal);P.set(s,D);let C=await X("loader",U,v,y,w.basename);if(G(C)&&(C=await dt(C,U.signal,!0)||C),P.get(s)===D&&P.delete(s),U.signal.aborted)return;if(ee(C)){await he(i,C);return}if(q(C)){let z=Z(i.matches,d);i.fetchers.delete(s),B({fetchers:new Map(i.fetchers),errors:{[z.route.id]:C.error}});return}L(!G(C),"Unhandled fetcher deferred data");let F={state:"idle",data:C.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};i.fetchers.set(s,F),B({fetchers:new Map(i.fetchers)})}async function he(s,d,m){var v;let{submission:y,replace:M,isFetchActionRedirect:A}=m===void 0?{}:m;d.revalidate&&(E=!0);let x=Y(s.location,d.location,S({_isRedirect:!0},A?{_isFetchActionRedirect:!0}:{}));if(L(x,"Expected a location on the redirect navigation"),typeof((v=window)==null?void 0:v.location)!="undefined"){let V=de(d.location).origin;if(window.location.origin!==V){M?window.location.replace(d.location):window.location.assign(d.location);return}}b=null;let D=M===!0?T.Replace:T.Push,{formMethod:U,formAction:C,formEncType:F,formData:z}=s.navigation;!y&&U&&C&&z&&F&&(y={formMethod:U,formAction:C,formEncType:F,formData:z}),Qt.has(d.status)&&y&&Q(y.formMethod)?await re(D,x,{submission:S({},y,{formAction:d.location})}):await re(D,x,{overrideNavigation:{state:"loading",location:x,formMethod:y?y.formMethod:void 0,formAction:y?y.formAction:void 0,formEncType:y?y.formEncType:void 0,formData:y?y.formData:void 0}})}async function ht(s,d,m,v,y){let M=await Promise.all([...m.map(D=>X("loader",y,D,d,w.basename)),...v.map(D=>{let[,U,C,F]=D;return X("loader",ue(U,y.signal),C,F,w.basename)})]),A=M.slice(0,m.length),x=M.slice(m.length);return await Promise.all([st(s,m,A,y.signal,!1,i.loaderData),st(s,v.map(D=>{let[,,U]=D;return U}),x,y.signal,!0)]),{results:M,loaderResults:A,fetcherResults:x}}function Fe(){E=!0,_.push(...je()),le.forEach((s,d)=>{P.has(d)&&(j.push(d),De(d))})}function Te(s,d,m){let v=Z(i.matches,d);Oe(s),B({errors:{[v.route.id]:m},fetchers:new Map(i.fetchers)})}function Oe(s){P.has(s)&&De(s),le.delete(s),ce.delete(s),be.delete(s),i.fetchers.delete(s)}function De(s){let d=P.get(s);L(d,"Expected fetch controller: "+s),d.abort(),P.delete(s)}function pt(s){for(let d of s){let v={state:"idle",data:ft(d).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};i.fetchers.set(d,v)}}function fr(){let s=[];for(let d of be){let m=i.fetchers.get(d);L(m,"Expected fetcher: "+d),m.state==="loading"&&(be.delete(d),s.push(d))}pt(s)}function mt(s){let d=[];for(let[m,v]of ce)if(v<s){let y=i.fetchers.get(m);L(y,"Expected fetcher: "+m),y.state==="loading"&&(De(m),ce.delete(m),d.push(m))}return pt(d),d.length>0}function je(s){let d=[];return te.forEach((m,v)=>{(!s||s(v))&&(m.cancel(),d.push(v),te.delete(v))}),d}function hr(s,d,m){if(a=s,l=d,o=m||(v=>v.key),!f&&i.navigation===Ce){f=!0;let v=gt(i.location,i.matches);v!=null&&B({restoreScrollPosition:v})}return()=>{a=null,l=null,o=null}}function pr(s,d){if(a&&o&&l){let m=d.map(y=>ct(y,i.loaderData)),v=o(s,m)||s.key;a[v]=l()}}function gt(s,d){if(a&&o&&l){let m=d.map(M=>ct(M,i.loaderData)),v=o(s,m)||s.key,y=a[v];if(typeof y=="number")return y}return null}return w={get basename(){return e.basename},get state(){return i},get routes(){return t},initialize:rr,subscribe:ar,enableScrollRestoration:hr,navigate:ir,fetch:dr,revalidate:or,createHref:s=>e.history.createHref(s),encodeLocation:s=>e.history.encodeLocation(s),getFetcher:ft,deleteFetcher:Oe,dispose:nr,_internalFetchControllers:P,_internalActiveDeferreds:te},w}function Ar(e,t){L(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r=Ee(e),n=(t?t.basename:null)||"/";async function a(u,p){let{requestContext:w}=p===void 0?{}:p,i=new URL(u.url),h=u.method.toLowerCase(),c=Y("",$(i),null,"default"),b=k(r,c,n);if(!Le(h)&&h!=="head"){let E=I(405,{method:h}),{matches:_,route:j}=we(r);return{basename:n,location:c,matches:_,loaderData:{},actionData:null,errors:{[j.id]:E},statusCode:E.status,loaderHeaders:{},actionHeaders:{}}}else if(!b){let E=I(404,{pathname:c.pathname}),{matches:_,route:j}=we(r);return{basename:n,location:c,matches:_,loaderData:{},actionData:null,errors:{[j.id]:E},statusCode:E.status,loaderHeaders:{},actionHeaders:{}}}let R=await l(u,c,b,w);return oe(R)?R:S({location:c,basename:n},R)}async function o(u,p){let{routeId:w,requestContext:i}=p===void 0?{}:p,h=new URL(u.url),c=u.method.toLowerCase(),b=Y("",$(h),null,"default"),R=k(r,b,n);if(!Le(c)&&c!=="head")throw I(405,{method:c});if(!R)throw I(404,{pathname:b.pathname});let E=w?R.find(N=>N.route.id===w):ve(R,b);if(w&&!E)throw I(403,{pathname:b.pathname,routeId:w});if(!E)throw I(404,{pathname:b.pathname});let _=await l(u,b,R,i,E);if(oe(_))return _;let j=_.errors?Object.values(_.errors)[0]:void 0;if(j!==void 0)throw j;let P=[_.actionData,_.loaderData].find(N=>N);return Object.values(P||{})[0]}async function l(u,p,w,i,h){L(u.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(Q(u.method.toLowerCase()))return await f(u,w,h||ve(w,p),i,h!=null);let c=await g(u,w,i,h);return oe(c)?c:S({},c,{actionData:null,actionHeaders:{}})}catch(c){if(tr(c)){if(c.type===O.error&&!lt(c.response))throw c.response;return c.response}if(lt(c))return c;throw c}}async function f(u,p,w,i,h){let c;if(w.route.action){if(c=await X("action",u,w,p,n,!0,h,i),u.signal.aborted){let E=h?"queryRoute":"query";throw new Error(E+"() call aborted")}}else{let E=I(405,{method:u.method,pathname:new URL(u.url).pathname,routeId:w.route.id});if(h)throw E;c={type:O.error,error:E}}if(ee(c))throw new Response(null,{status:c.status,headers:{Location:c.location}});if(G(c))throw new Error("defer() is not supported in actions");if(h){if(q(c))throw c.error;return{matches:[w],loaderData:{},actionData:{[w.route.id]:c.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}if(q(c)){let E=Z(p,w.route.id),_=await g(u,p,i,void 0,{[E.route.id]:c.error});return S({},_,{statusCode:xe(c.error)?c.error.status:500,actionData:null,actionHeaders:S({},c.headers?{[w.route.id]:c.headers}:{})})}let b=new Request(u.url,{headers:u.headers,redirect:u.redirect,signal:u.signal}),R=await g(b,p,i);return S({},R,c.statusCode?{statusCode:c.statusCode}:{},{actionData:{[w.route.id]:c.data},actionHeaders:S({},c.headers?{[w.route.id]:c.headers}:{})})}async function g(u,p,w,i,h){let c=i!=null;if(c&&!(i!=null&&i.route.loader))throw I(400,{method:u.method,pathname:new URL(u.url).pathname,routeId:i==null?void 0:i.route.id});let R=(i?[i]:Xe(p,Object.keys(h||{})[0])).filter(P=>P.route.loader);if(R.length===0)return{matches:p,loaderData:p.reduce((P,N)=>Object.assign(P,{[N.route.id]:null}),{}),errors:h||null,statusCode:200,loaderHeaders:{}};let E=await Promise.all([...R.map(P=>X("loader",u,P,p,n,!0,c,w))]);if(u.signal.aborted){let P=c?"queryRoute":"query";throw new Error(P+"() call aborted")}let _=new Set;E.forEach((P,N)=>{_.add(R[N].route.id),G(P)&&P.deferredData.cancel()});let j=rt(p,R,E,h);return p.forEach(P=>{_.has(P.route.id)||(j.loaderData[P.route.id]=null)}),S({},j,{matches:p})}return{dataRoutes:r,query:a,queryRoute:o}}function Sr(e,t,r){return S({},t,{statusCode:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function Zt(e){return e!=null&&"formData"in e}function ke(e,t,r){r===void 0&&(r=!1);let n=typeof e=="string"?e:$(e);if(!t||!Zt(t))return{path:n};if(t.formMethod&&!Le(t.formMethod))return{path:n,error:I(405,{method:t.formMethod})};let a;if(t.formData&&(a={formMethod:t.formMethod||"get",formAction:ot(n),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData},Q(a.formMethod)))return{path:n,submission:a};let o=K(n);try{let l=tt(t.formData);r&&o.search&&ut(o.search)&&l.append("index",""),o.search="?"+l}catch{return{path:n,error:I(400)}}return{path:$(o),submission:a}}function Xe(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 Ze(e,t,r,n,a,o,l,f,g,u){let p=g?Object.values(g)[0]:f?Object.values(f)[0]:void 0,w=g?Object.keys(g)[0]:void 0,h=Xe(t,w).filter((b,R)=>b.route.loader!=null&&(qt(e.loaderData,e.matches[R],b)||o.some(E=>E===b.route.id)||et(e.location,e.matches[R],r,n,b,a,p))),c=[];return u&&u.forEach((b,R)=>{let[E,_,j]=b;l.includes(R)?c.push([R,E,_,j]):a&&et(E,_,r,E,_,a,p)&&c.push([R,E,_,j])}),[h,c]}function qt(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function qe(e,t){let r=e.route.path;return e.pathname!==t.pathname||r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function et(e,t,r,n,a,o,l){let f=de(e),g=t.params,u=de(n),p=a.params,w=qe(t,a)||f.toString()===u.toString()||f.search!==u.search||o;if(a.route.shouldRevalidate){let i=a.route.shouldRevalidate(S({currentUrl:f,currentParams:g,nextUrl:u,nextParams:p},r,{actionResult:l,defaultShouldRevalidate:w}));if(typeof i=="boolean")return i}return w}async function X(e,t,r,n,a,o,l,f){a===void 0&&(a="/"),o===void 0&&(o=!1),l===void 0&&(l=!1);let g,u,p,w=new Promise((h,c)=>p=c),i=()=>p();t.signal.addEventListener("abort",i);try{let h=r.route[e];L(h,"Could not find the "+e+' to run on the "'+r.route.id+'" route'),u=await Promise.race([h({request:t,params:r.params,context:f}),w]),L(u!==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(h){g=O.error,u=h}finally{t.signal.removeEventListener("abort",i)}if(oe(u)){let h=u.status;if(Jt.has(h)){let R=u.headers.get("Location");if(L(R,"Redirects returned/thrown from loaders/actions must have a Location header"),!(/^[a-z+]+:\/\//i.test(R)||R.startsWith("//"))){let _=n.slice(0,n.indexOf(r)+1),j=Ae(_).map(N=>N.pathnameBase),P=Ye(R,j,new URL(t.url).pathname);if(L($(P),"Unable to resolve redirect location: "+R),a){let N=P.pathname;P.pathname=N==="/"?a:ie([a,N])}R=$(P)}if(o)throw u.headers.set("Location",R),u;return{type:O.redirect,status:h,location:R,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(l)throw{type:g||O.data,response:u};let c,b=u.headers.get("Content-Type");return b&&/\bapplication\/json\b/.test(b)?c=await u.json():c=await u.text(),g===O.error?{type:g,error:new Se(h,u.statusText,c),headers:u.headers}:{type:O.data,data:c,statusCode:u.status,headers:u.headers}}return g===O.error?{type:g,error:u}:u instanceof Je?{type:O.deferred,deferredData:u}:{type:O.data,data:u}}function ue(e,t,r){let n=de(ot(e)).toString(),a={signal:t};if(r&&Q(r.formMethod)){let{formMethod:o,formEncType:l,formData:f}=r;a.method=o.toUpperCase(),a.body=l==="application/x-www-form-urlencoded"?tt(f):f}return new Request(n,a)}function tt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())L(typeof n=="string",'File inputs are not supported with encType "application/x-www-form-urlencoded", please use "multipart/form-data" instead.'),t.append(r,n);return t}function rt(e,t,r,n,a){let o={},l=null,f,g=!1,u={};return r.forEach((p,w)=>{let i=t[w].route.id;if(L(!ee(p),"Cannot handle redirect results in processLoaderData"),q(p)){let h=Z(e,i),c=p.error;n&&(c=Object.values(n)[0],n=void 0),l=l||{},l[h.route.id]==null&&(l[h.route.id]=c),o[i]=void 0,g||(g=!0,f=xe(p.error)?p.error.status:500),p.headers&&(u[i]=p.headers)}else G(p)?(a&&a.set(i,p.deferredData),o[i]=p.deferredData.data):(o[i]=p.data,p.statusCode!=null&&p.statusCode!==200&&!g&&(f=p.statusCode),p.headers&&(u[i]=p.headers))}),n&&(l=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:l,statusCode:f||200,loaderHeaders:u}}function nt(e,t,r,n,a,o,l,f){let{loaderData:g,errors:u}=rt(t,r,n,a,f);for(let p=0;p<o.length;p++){let[w,,i]=o[p];L(l!==void 0&&l[p]!==void 0,"Did not find corresponding fetcher result");let h=l[p];if(q(h)){let c=Z(e.matches,i.route.id);u&&u[c.route.id]||(u=S({},u,{[c.route.id]:h.error})),e.fetchers.delete(w)}else{if(ee(h))throw new Error("Unhandled fetcher revalidation redirect");if(G(h))throw new Error("Unhandled fetcher deferred data");{let c={state:"idle",data:h.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};e.fetchers.set(w,c)}}}return{loaderData:g,errors:u}}function at(e,t,r,n){let a=S({},t);for(let o of r){let l=o.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(a[l]=t[l]):e[l]!==void 0&&(a[l]=e[l]),n&&n.hasOwnProperty(l))break}return a}function Z(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 we(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function I(e,t){let{pathname:r,routeId:n,method:a}=t===void 0?{}:t,o="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&r&&n?l="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.":l="Cannot submit binary form data using GET"):e===403?(o="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",l='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",a&&r&&n?l="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&&(l='Invalid request method "'+a.toUpperCase()+'"')),new Se(e||500,o,new Error(l),!0)}function it(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ee(r))return r}}function ot(e){let t=typeof e=="string"?K(e):e;return $(S({},t,{hash:""}))}function er(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function G(e){return e.type===O.deferred}function q(e){return e.type===O.error}function ee(e){return(e&&e.type)===O.redirect}function oe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body!="undefined"}function lt(e){if(!oe(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function tr(e){return e&&oe(e.response)&&(e.type===O.data||O.error)}function Le(e){return Gt.has(e)}function Q(e){return Vt.has(e)}async function st(e,t,r,n,a,o){for(let l=0;l<r.length;l++){let f=r[l],g=t[l],u=e.find(w=>w.route.id===g.route.id),p=u!=null&&!qe(u,g)&&(o&&o[g.route.id])!==void 0;G(f)&&(a||p)&&await dt(f,n,a).then(w=>{w&&(r[l]=w||r[l])})}}async function dt(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:O.data,data:e.deferredData.unwrappedData}}catch(a){return{type:O.error,error:a}}return{type:O.data,data:e.deferredData.data}}}function ut(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ct(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 ve(e,t){let r=typeof t=="string"?K(t).search:t.search;if(e[e.length-1].route.index&&ut(r||""))return e[e.length-1];let n=Ae(e);return n[n.length-1]}}}]);})();
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=module-remix-run.b9acb514.js.map
|