/*! For license information please see 1712.js.LICENSE.txt */ "use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[1712],{12599:(e,t,r)=>{function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;td,Gn:()=>x,J0:()=>l,LX:()=>A,RQ:()=>j,WK:()=>_,Zn:()=>k,Zq:()=>S,aU:()=>o,cP:()=>h,fp:()=>y,iQ:()=>O,lX:()=>i,p7:()=>K,pC:()=>P}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const a="popstate";function i(e){return void 0===e&&(e={}),f((function(e,t){let{pathname:r,search:n,hash:o}=e.location;return u("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:d(t)}),null,e)}function l(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function s(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,r,o){return void 0===r&&(r=null),n({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?h(t):t,{state:r,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function d(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 h(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 f(e,t,r,i){void 0===i&&(i={});let{window:s=document.defaultView,v5Compat:h=!1}=i,f=s.history,p=o.Pop,m=null,v=y();function y(){return(f.state||{idx:null}).idx}function g(){p=o.Pop;let e=y(),t=null==e?null:e-v;v=e,m&&m({action:p,location:w.location,delta:t})}function b(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,r="string"===typeof e?e:d(e);return l(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==v&&(v=0,f.replaceState(n({},f.state,{idx:v}),""));let w={get action(){return p},get location(){return e(s,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(a,g),m=e,()=>{s.removeEventListener(a,g),m=null}},createHref:e=>t(s,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=o.Push;let n=u(w.location,e,t);r&&r(n,e),v=y()+1;let a=c(n,v),i=w.createHref(n);try{f.pushState(a,"",i)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;s.location.assign(i)}h&&m&&m({action:p,location:w.location,delta:1})},replace:function(e,t){p=o.Replace;let n=u(w.location,e,t);r&&r(n,e),v=y();let a=c(n,v),i=w.createHref(n);f.replaceState(a,"",i),h&&m&&m({action:p,location:w.location,delta:0})},go:e=>f.go(e)};return w}var p;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(p||(p={}));const m=new Set(["lazy","caseSensitive","path","id","index","children"]);function v(e,t,r,o){return void 0===r&&(r=[]),void 0===o&&(o={}),e.map(((e,a)=>{let i=[...r,a],s="string"===typeof e.id?e.id:i.join("-");if(l(!0!==e.index||!e.children,"Cannot specify children on an index route"),l(!o[s],'Found a route id collision on id "'+s+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let r=n({},e,t(e),{id:s});return o[s]=r,r}{let r=n({},e,t(e),{id:s,children:void 0});return o[s]=r,e.children&&(r.children=v(e.children,t,i,o)),r}}))}function y(e,t,r){void 0===r&&(r="/");let n=k(("string"===typeof t?h(t):t).pathname||"/",r);if(null==n)return null;let o=g(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let a=null;for(let e=0;null==a&&e{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(l(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));let s=j([n,i.relativePath]),c=r.concat(i);e.children&&e.children.length>0&&(l(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),g(e.children,t,c,s)),(null!=e.path||e.index)&&t.push({path:s,score:E(s,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of b(e.path))o(e,t,r);else o(e,t)})),t}function b(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=b(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const w=/^:\w+$/,D=e=>"*"===e;function E(e,t){let r=e.split("/"),n=r.length;return r.some(D)&&(n+=-2),t&&(n+=2),r.filter((e=>!D(e))).reduce(((e,t)=>e+(w.test(t)?3:""===t?1:10)),n)}function R(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let e=0;enull==e?"":"string"===typeof e?e:String(e);return n+r.split(/\/+/).map(((e,r,n)=>{if(r===n.length-1&&"*"===e){return o(t["*"])}const a=e.match(/^:(\w+)(\??)$/);if(a){const[,e,r]=a;let n=t[e];return l("?"===r||null!=n,'Missing ":'+e+'" param'),o(n)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function A(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!0);s("*"===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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(n.push(t),"/([^\\/]+)")));e.endsWith("*")?(n.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");return[new RegExp(o,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,t,r)=>{if("*"===t){let e=l[r]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return s(!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}}(l[r]||"",t),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function M(e){try{return decodeURI(e)}catch(t){return s(!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 k(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 L(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 and the router will parse it for you.'}function S(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function P(e,t,r,o){let a;void 0===o&&(o=!1),"string"===typeof e?a=h(e):(a=n({},e),l(!a.pathname||!a.pathname.includes("?"),L("?","pathname","search",a)),l(!a.pathname||!a.pathname.includes("#"),L("#","pathname","hash",a)),l(!a.search||!a.search.includes("#"),L("#","search","hash",a)));let i,s=""===e||""===a.pathname,c=s?"/":a.pathname;if(o||null==c)i=r;else{let e=t.length-1;if(c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:o=""}="string"===typeof e?h(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:C(n),hash:T(o)}}(a,i),d=c&&"/"!==c&&c.endsWith("/"),f=(s||"."===c)&&r.endsWith("/");return u.pathname.endsWith("/")||!d&&!f||(u.pathname+="/"),u}const j=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),C=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",T=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class O{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function _(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const z=["post","put","patch","delete"],F=new Set(z),B=["get",...z],I=new Set(B),W=new Set([301,302,303,307,308]),$=new Set([307,308]),q={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},N={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},H={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Y=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,J=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});function K(e){const t=e.window?e.window:"undefined"!==typeof window?window:void 0,r="undefined"!==typeof t&&"undefined"!==typeof t.document&&"undefined"!==typeof t.document.createElement,a=!r;let i;if(l(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;i=e=>({hasErrorBoundary:t(e)})}else i=J;let c,d={},h=v(e.routes,i,void 0,d),f=e.basename||"/",m=n({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),g=null,b=new Set,w=null,D=null,E=null,R=null!=e.hydrationData,x=y(h,e.history.location,f),A=null;if(null==x){let t=de(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=ue(h);x=r,A={[n.id]:t}}let M,L,S=!x.some((e=>e.route.lazy))&&(!x.some((e=>e.route.loader))||null!=e.hydrationData),P={historyAction:e.history.action,location:e.history.location,matches:x,initialized:S,navigation:q,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||A,fetchers:new Map,blockers:new Map},j=o.Pop,U=!1,C=!1,T=!1,O=[],_=[],z=new Map,F=0,B=-1,I=new Map,W=new Set,K=new Map,Z=new Map,V=new Map,ee=!1;function te(e){P=n({},P,e),b.forEach((e=>e(P)))}function oe(t,r){var a,i;let l,s=null!=P.actionData&&null!=P.navigation.formMethod&&be(P.navigation.formMethod)&&"loading"===P.navigation.state&&!0!==(null==(a=t.state)?void 0:a._isRedirect);l=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:s?P.actionData:null;let u=r.loaderData?se(P.loaderData,r.loaderData,r.matches||[],r.errors):P.loaderData,d=P.blockers;d.size>0&&(d=new Map(d),d.forEach(((e,t)=>d.set(t,H))));let f=!0===U||null!=P.navigation.formMethod&&be(P.navigation.formMethod)&&!0!==(null==(i=t.state)?void 0:i._isRedirect);c&&(h=c,c=void 0),C||j===o.Pop||(j===o.Push?e.history.push(t,t.state):j===o.Replace&&e.history.replace(t,t.state)),te(n({},r,{actionData:l,loaderData:u,historyAction:j,location:t,initialized:!0,navigation:q,revalidation:"idle",restoreScrollPosition:Be(t,r.matches||P.matches),preventScrollReset:f,blockers:d})),j=o.Pop,U=!1,C=!1,T=!1,O=[],_=[]}async function ae(t,r,a){L&&L.abort(),L=null,j=t,C=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(w&&E){let r=Fe(e,t);w[r]=E()}}(P.location,P.matches),U=!0===(a&&a.preventScrollReset);let l=c||h,s=a&&a.overrideNavigation,u=y(l,r,f);if(!u){let e=de(404,{pathname:r.pathname}),{matches:t,route:n}=ue(l);return ze(),void oe(r,{matches:t,loaderData:{},errors:{[n.id]:e}})}if(P.initialized&&!T&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(P.location,r)&&!(a&&a.submission&&be(a.submission.formMethod)))return void oe(r,{matches:u});L=new AbortController;let m,v,g=ne(e.history,r,L.signal,a&&a.submission);if(a&&a.pendingError)v={[ce(u).route.id]:a.pendingError};else if(a&&a.submission&&be(a.submission.formMethod)){let e=await async function(e,t,r,n,a){void 0===a&&(a={});let l;ge(),te({navigation:Me(t,r)});let s=Re(n,t);if(s.route.action||s.route.lazy){if(l=await re("action",e,s,n,d,i,f),e.signal.aborted)return{shortCircuited:!0}}else l={type:p.error,error:de(405,{method:e.method,pathname:t.pathname,routeId:s.route.id})};if(ve(l)){let e;return e=a&&null!=a.replace?a.replace:l.location===P.location.pathname+P.location.search,await fe(P,l,{submission:r,replace:e}),{shortCircuited:!0}}if(me(l)){let e=ce(n,s.route.id);return!0!==(a&&a.replace)&&(j=o.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:l.error}}}if(pe(l))throw de(400,{type:"defer-action"});return{pendingActionData:{[s.route.id]:l.data}}}(g,r,a.submission,u,{replace:a.replace});if(e.shortCircuited)return;m=e.pendingActionData,v=e.pendingActionError,s=Ae(r,a.submission),g=new Request(g.url,{signal:g.signal})}let{shortCircuited:b,loaderData:D,errors:R}=await async function(t,r,o,a,i,l,s,u,d){let p=a||Ae(r,i),m=i||l||xe(p),v=c||h,[y,g]=G(e.history,P,o,m,r,T,O,_,K,W,v,f,u,d);if(ze((e=>!(o&&o.some((t=>t.route.id===e)))||y&&y.some((t=>t.route.id===e)))),B=++F,0===y.length&&0===g.length){let e=Ue();return oe(r,n({matches:o,loaderData:{},errors:d||null},u?{actionData:u}:{},e?{fetchers:new Map(P.fetchers)}:{})),{shortCircuited:!0}}if(!C){g.forEach((e=>{let t=P.fetchers.get(e.key),r=ke(void 0,t?t.data:void 0);P.fetchers.set(e.key,r)}));let e=u||P.actionData;te(n({navigation:p},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},g.length>0?{fetchers:new Map(P.fetchers)}:{}))}g.forEach((e=>{z.has(e.key)&&Pe(e.key),e.controller&&z.set(e.key,e.controller)}));let b=()=>g.forEach((e=>Pe(e.key)));L&&L.signal.addEventListener("abort",b);let{results:w,loaderResults:D,fetcherResults:E}=await ye(P.matches,o,y,g,t);if(t.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",b);g.forEach((e=>z.delete(e.key)));let R=he(w);if(R){if(R.idx>=y.length){let e=g[R.idx-y.length].key;W.add(e)}return await fe(P,R.result,{replace:s}),{shortCircuited:!0}}let{loaderData:x,errors:A}=le(P,o,y,D,d,g,E,Z);Z.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&Z.delete(t)}))}));let M=Ue(),k=Ce(B),S=M||k||g.length>0;return n({loaderData:x,errors:A},S?{fetchers:new Map(P.fetchers)}:{})}(g,r,u,s,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,m,v);b||(L=null,oe(r,n({matches:u},m?{actionData:m}:{},{loaderData:D,errors:R})))}function ie(e){return P.fetchers.get(e)||N}async function fe(a,i,s){let{submission:c,replace:d,isFetchActionRedirect:h}=void 0===s?{}:s;i.revalidate&&(T=!0);let p=u(a.location,i.location,n({_isRedirect:!0},h?{_isFetchActionRedirect:!0}:{}));if(l(p,"Expected a location on the redirect navigation"),Y.test(i.location)&&r){let r=e.history.createURL(i.location),n=null==k(r.pathname,f);if(t.location.origin!==r.origin||n)return void(d?t.location.replace(i.location):t.location.assign(i.location))}L=null;let m=!0===d?o.Replace:o.Push,v=c||xe(a.navigation);if($.has(i.status)&&v&&be(v.formMethod))await ae(m,p,{submission:n({},v,{formAction:i.location}),preventScrollReset:U});else if(h)await ae(m,p,{overrideNavigation:Ae(p),fetcherSubmission:v,preventScrollReset:U});else{let e=Ae(p,v);await ae(m,p,{overrideNavigation:e,preventScrollReset:U})}}async function ye(t,r,n,o,a){let l=await Promise.all([...n.map((e=>re("loader",a,e,r,d,i,f))),...o.map((t=>{if(t.matches&&t.match&&t.controller)return re("loader",ne(e.history,t.path,t.controller.signal),t.match,t.matches,d,i,f);return{type:p.error,error:de(404,{pathname:t.path})}}))]),s=l.slice(0,n.length),c=l.slice(n.length);return await Promise.all([we(t,n,s,s.map((()=>a.signal)),!1,P.loaderData),we(t,o.map((e=>e.match)),c,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:l,loaderResults:s,fetcherResults:c}}function ge(){T=!0,O.push(...ze()),K.forEach(((e,t)=>{z.has(t)&&(_.push(t),Pe(t))}))}function Ee(e,t,r){let n=ce(P.matches,t);Se(e),te({errors:{[n.route.id]:r},fetchers:new Map(P.fetchers)})}function Se(e){let t=P.fetchers.get(e);!z.has(e)||t&&"loading"===t.state&&I.has(e)||Pe(e),K.delete(e),I.delete(e),W.delete(e),P.fetchers.delete(e)}function Pe(e){let t=z.get(e);l(t,"Expected fetch controller: "+e),t.abort(),z.delete(e)}function je(e){for(let t of e){let e=Le(ie(t).data);P.fetchers.set(t,e)}}function Ue(){let e=[],t=!1;for(let r of W){let n=P.fetchers.get(r);l(n,"Expected fetcher: "+r),"loading"===n.state&&(W.delete(r),e.push(r),t=!0)}return je(e),t}function Ce(e){let t=[];for(let[r,n]of I)if(n0}function Te(e){P.blockers.delete(e),V.delete(e)}function Oe(e,t){let r=P.blockers.get(e)||H;l("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(P.blockers);n.set(e,t),te({blockers:n})}function _e(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===V.size)return;V.size>1&&s(!1,"A router only supports one blocker at a time");let o=Array.from(V.entries()),[a,i]=o[o.length-1],l=P.blockers.get(a);return l&&"proceeding"===l.state?void 0:i({currentLocation:t,nextLocation:r,historyAction:n})?a:void 0}function ze(e){let t=[];return Z.forEach(((r,n)=>{e&&!e(n)||(r.cancel(),t.push(n),Z.delete(n))})),t}function Fe(e,t){if(D){return D(e,t.map((e=>function(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}(e,P.loaderData))))||e.key}return e.key}function Be(e,t){if(w){let r=Fe(e,t),n=w[r];if("number"===typeof n)return n}return null}return M={get basename(){return f},get state(){return P},get routes(){return h},initialize:function(){return g=e.history.listen((t=>{let{action:r,location:n,delta:o}=t;if(ee)return void(ee=!1);s(0===V.size||null!=o,"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 a=_e({currentLocation:P.location,nextLocation:n,historyAction:r});return a&&null!=o?(ee=!0,e.history.go(-1*o),void Oe(a,{state:"blocked",location:n,proceed(){Oe(a,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(o)},reset(){let e=new Map(P.blockers);e.set(a,H),te({blockers:e})}})):ae(r,n)})),P.initialized||ae(o.Pop,P.location),M},subscribe:function(e){return b.add(e),()=>b.delete(e)},enableScrollRestoration:function(e,t,r){if(w=e,E=t,D=r||null,!R&&P.navigation===q){R=!0;let e=Be(P.location,P.matches);null!=e&&te({restoreScrollPosition:e})}return()=>{w=null,E=null,D=null}},navigate:async function t(r,a){if("number"===typeof r)return void e.history.go(r);let i=X(P.location,P.matches,f,m.v7_prependBasename,r,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),{path:l,submission:s,error:c}=Q(m.v7_normalizeFormMethod,!1,i,a),d=P.location,h=u(P.location,l,a&&a.state);h=n({},h,e.history.encodeLocation(h));let p=a&&null!=a.replace?a.replace:void 0,v=o.Push;!0===p?v=o.Replace:!1===p||null!=s&&be(s.formMethod)&&s.formAction===P.location.pathname+P.location.search&&(v=o.Replace);let y=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,g=_e({currentLocation:d,nextLocation:h,historyAction:v});if(!g)return await ae(v,h,{submission:s,pendingError:c,preventScrollReset:y,replace:a&&a.replace});Oe(g,{state:"blocked",location:h,proceed(){Oe(g,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),t(r,a)},reset(){let e=new Map(P.blockers);e.set(g,H),te({blockers:e})}})},fetch:function(t,r,o,s){if(a)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.");z.has(t)&&Pe(t);let u=c||h,p=X(P.location,P.matches,f,m.v7_prependBasename,o,r,null==s?void 0:s.relative),v=y(u,p,f);if(!v)return void Ee(t,r,de(404,{pathname:p}));let{path:g,submission:b,error:w}=Q(m.v7_normalizeFormMethod,!0,p,s);if(w)return void Ee(t,r,w);let D=Re(v,g);U=!0===(s&&s.preventScrollReset),b&&be(b.formMethod)?async function(t,r,o,a,s,u){if(ge(),K.delete(t),!a.route.action&&!a.route.lazy){let e=de(405,{method:u.formMethod,pathname:o,routeId:r});return void Ee(t,r,e)}let p=P.fetchers.get(t),m=function(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," _hasFetcherDoneAnything ":!0}}(u,p);P.fetchers.set(t,m),te({fetchers:new Map(P.fetchers)});let v=new AbortController,g=ne(e.history,o,v.signal,u);z.set(t,v);let b=F,w=await re("action",g,a,s,d,i,f);if(g.signal.aborted)return void(z.get(t)===v&&z.delete(t));if(ve(w)){if(z.delete(t),B>b){let e=Le(void 0);return P.fetchers.set(t,e),void te({fetchers:new Map(P.fetchers)})}{W.add(t);let e=ke(u);return P.fetchers.set(t,e),te({fetchers:new Map(P.fetchers)}),fe(P,w,{submission:u,isFetchActionRedirect:!0})}}if(me(w))return void Ee(t,r,w.error);if(pe(w))throw de(400,{type:"defer-action"});let D=P.navigation.location||P.location,E=ne(e.history,D,v.signal),R=c||h,x="idle"!==P.navigation.state?y(R,P.navigation.location,f):P.matches;l(x,"Didn't find any matches after fetcher action");let A=++F;I.set(t,A);let M=ke(u,w.data);P.fetchers.set(t,M);let[k,S]=G(e.history,P,x,u,D,T,O,_,K,W,R,f,{[a.route.id]:w.data},void 0);S.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=P.fetchers.get(t),n=ke(void 0,r?r.data:void 0);P.fetchers.set(t,n),z.has(t)&&Pe(t),e.controller&&z.set(t,e.controller)})),te({fetchers:new Map(P.fetchers)});let U=()=>S.forEach((e=>Pe(e.key)));v.signal.addEventListener("abort",U);let{results:C,loaderResults:$,fetcherResults:q}=await ye(P.matches,x,k,S,E);if(v.signal.aborted)return;v.signal.removeEventListener("abort",U),I.delete(t),z.delete(t),S.forEach((e=>z.delete(e.key)));let N=he(C);if(N){if(N.idx>=k.length){let e=S[N.idx-k.length].key;W.add(e)}return fe(P,N.result)}let{loaderData:H,errors:Y}=le(P,P.matches,k,$,void 0,S,q,Z);if(P.fetchers.has(t)){let e=Le(w.data);P.fetchers.set(t,e)}let J=Ce(A);"loading"===P.navigation.state&&A>B?(l(j,"Expected pending action"),L&&L.abort(),oe(P.navigation.location,{matches:x,loaderData:H,errors:Y,fetchers:new Map(P.fetchers)})):(te(n({errors:Y,loaderData:se(P.loaderData,H,x,Y)},J||S.length>0?{fetchers:new Map(P.fetchers)}:{})),T=!1)}(t,r,g,D,v,b):(K.set(t,{routeId:r,path:g}),async function(t,r,n,o,a,s){let c=P.fetchers.get(t),u=ke(s,c?c.data:void 0);P.fetchers.set(t,u),te({fetchers:new Map(P.fetchers)});let h=new AbortController,p=ne(e.history,n,h.signal);z.set(t,h);let m=F,v=await re("loader",p,o,a,d,i,f);pe(v)&&(v=await De(v,p.signal,!0)||v);z.get(t)===h&&z.delete(t);if(p.signal.aborted)return;if(ve(v)){if(B>m){let e=Le(void 0);return P.fetchers.set(t,e),void te({fetchers:new Map(P.fetchers)})}return W.add(t),void await fe(P,v)}if(me(v)){let e=ce(P.matches,r);return P.fetchers.delete(t),void te({fetchers:new Map(P.fetchers),errors:{[e.route.id]:v.error}})}l(!pe(v),"Unhandled fetcher deferred data");let y=Le(v.data);P.fetchers.set(t,y),te({fetchers:new Map(P.fetchers)})}(t,r,g,D,v,b))},revalidate:function(){ge(),te({revalidation:"loading"}),"submitting"!==P.navigation.state&&("idle"!==P.navigation.state?ae(j||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation}):ae(P.historyAction,P.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ie,deleteFetcher:Se,dispose:function(){g&&g(),b.clear(),L&&L.abort(),P.fetchers.forEach(((e,t)=>Se(t))),P.blockers.forEach(((e,t)=>Te(t)))},getBlocker:function(e,t){let r=P.blockers.get(e)||H;return V.get(e)!==t&&V.set(e,t),r},deleteBlocker:Te,_internalFetchControllers:z,_internalActiveDeferreds:Z,_internalSetRoutes:function(e){d={},c=v(e,i,void 0,d)}},M}Symbol("deferred");function X(e,t,r,n,o,a,i){let l,s;if(null!=a&&"path"!==i){l=[];for(let e of t)if(l.push(e),e.route.id===a){s=e;break}}else l=t,s=t[t.length-1];let c=P(o||".",S(l).map((e=>e.pathnameBase)),k(e.pathname,r)||e.pathname,"path"===i);return null==o&&(c.search=e.search,c.hash=e.hash),null!=o&&""!==o&&"."!==o||!s||!s.route.index||Ee(c.search)||(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(c.pathname="/"===c.pathname?r:j([r,c.pathname])),d(c)}function Q(e,t,r,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:r};if(n.formMethod&&!ge(n.formMethod))return{path:r,error:de(405,{method:n.formMethod})};let o,a,i=()=>({path:r,error:de(400,{type:"invalid-body"})}),s=n.formMethod||"get",c=e?s.toUpperCase():s.toLowerCase(),u=fe(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!be(c))return i();let e="string"===typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"}),""):String(n.body);return{path:r,submission:{formMethod:c,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!be(c))return i();try{let e="string"===typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:c,formAction:u,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(l("function"===typeof FormData,"FormData is not available in this environment"),n.formData)o=oe(n.formData),a=n.formData;else if(n.body instanceof FormData)o=oe(n.body),a=n.body;else if(n.body instanceof URLSearchParams)o=n.body,a=ae(o);else if(null==n.body)o=new URLSearchParams,a=new FormData;else try{o=new URLSearchParams(n.body),a=ae(o)}catch(e){return i()}let f={formMethod:c,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(be(f.formMethod))return{path:r,submission:f};let p=h(r);return t&&p.search&&Ee(p.search)&&o.append("index",""),p.search="?"+o,{path:d(p),submission:f}}function Z(e,t){let r=e;if(t){let n=e.findIndex((e=>e.route.id===t));n>=0&&(r=e.slice(0,n))}return r}function G(e,t,r,o,a,i,l,s,c,u,d,h,f,p){let m=p?Object.values(p)[0]:f?Object.values(f)[0]:void 0,v=e.createURL(t.location),g=e.createURL(a),b=p?Object.keys(p)[0]:void 0,w=Z(r,b).filter(((e,r)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,r){let n=!t||r.route.id!==t.route.id,o=void 0===e[r.route.id];return n||o}(t.loaderData,t.matches[r],e)||l.some((t=>t===e.route.id)))return!0;let a=t.matches[r],s=e;return ee(e,n({currentUrl:v,currentParams:a.params,nextUrl:g,nextParams:s.params},o,{actionResult:m,defaultShouldRevalidate:i||v.pathname+v.search===g.pathname+g.search||v.search!==g.search||V(a,s)}))})),D=[];return c.forEach(((e,a)=>{if(!r.some((t=>t.route.id===e.routeId)))return;let l=y(d,e.path,h);if(!l)return void D.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=t.fetchers.get(a),f=Re(l,e.path),p=!1;p=!u.has(a)&&(!!s.includes(a)||(c&&"idle"!==c.state&&void 0===c.data?i:ee(f,n({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:r[r.length-1].params},o,{actionResult:m,defaultShouldRevalidate:i})))),p&&D.push({key:a,routeId:e.routeId,path:e.path,matches:l,match:f,controller:new AbortController})})),[w,D]}function V(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ee(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"===typeof r)return r}return t.defaultShouldRevalidate}async function te(e,t,r){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let a=r[e.id];l(a,"No route found in manifest");let i={};for(let e in o){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;s(!t,'Route "'+a.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||m.has(e)||(i[e]=o[e])}Object.assign(a,i),Object.assign(a,n({},t(a),{lazy:void 0}))}async function re(e,t,r,n,o,a,i,s){let c,u,d;void 0===s&&(s={});let h=e=>{let n,o=new Promise(((e,t)=>n=t));return d=()=>n(),t.signal.addEventListener("abort",d),Promise.race([e({request:t,params:r.params,context:s.requestContext}),o])};try{let n=r.route[e];if(r.route.lazy)if(n){u=(await Promise.all([h(n),te(r.route,a,o)]))[0]}else{if(await te(r.route,a,o),n=r.route[e],!n){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw de(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:p.data,data:void 0}}u=await h(n)}else{if(!n){let e=new URL(t.url);throw de(404,{pathname:e.pathname+e.search})}u=await h(n)}l(void 0!==u,"You defined "+("action"===e?"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(e){c=p.error,u=e}finally{d&&t.signal.removeEventListener("abort",d)}if(ye(u)){let e,o=u.status;if(W.has(o)){let e=u.headers.get("Location");if(l(e,"Redirects returned/thrown from loaders/actions must have a Location header"),Y.test(e)){if(!s.isStaticRequest){let r=new URL(t.url),n=e.startsWith("//")?new URL(r.protocol+e):new URL(e),o=null!=k(n.pathname,i);n.origin===r.origin&&o&&(e=n.pathname+n.search+n.hash)}}else e=X(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,e);if(s.isStaticRequest)throw u.headers.set("Location",e),u;return{type:p.redirect,status:o,location:e,revalidate:null!==u.headers.get("X-Remix-Revalidate")}}if(s.isRouteRequest)throw{type:c||p.data,response:u};let a=u.headers.get("Content-Type");return e=a&&/\bapplication\/json\b/.test(a)?await u.json():await u.text(),c===p.error?{type:c,error:new O(o,u.statusText,e),headers:u.headers}:{type:p.data,data:e,statusCode:u.status,headers:u.headers}}return c===p.error?{type:c,error:u}:function(e){let t=e;return t&&"object"===typeof t&&"object"===typeof t.data&&"function"===typeof t.subscribe&&"function"===typeof t.cancel&&"function"===typeof t.resolveData}(u)?{type:p.deferred,deferredData:u,statusCode:null==(f=u.init)?void 0:f.status,headers:(null==(m=u.init)?void 0:m.headers)&&new Headers(u.init.headers)}:{type:p.data,data:u};var f,m}function ne(e,t,r,n){let o=e.createURL(fe(t)).toString(),a={signal:r};if(n&&be(n.formMethod)){let{formMethod:e,formEncType:t}=n;a.method=e.toUpperCase(),"application/json"===t?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(n.json)):"text/plain"===t?a.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?a.body=oe(n.formData):a.body=n.formData}return new Request(o,a)}function oe(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"===typeof n?n:n.name);return t}function ae(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ie(e,t,r,n,o){let a,i={},s=null,c=!1,u={};return r.forEach(((r,d)=>{let h=t[d].route.id;if(l(!ve(r),"Cannot handle redirect results in processLoaderData"),me(r)){let t=ce(e,h),o=r.error;n&&(o=Object.values(n)[0],n=void 0),s=s||{},null==s[t.route.id]&&(s[t.route.id]=o),i[h]=void 0,c||(c=!0,a=_(r.error)?r.error.status:500),r.headers&&(u[h]=r.headers)}else pe(r)?(o.set(h,r.deferredData),i[h]=r.deferredData.data):i[h]=r.data,null==r.statusCode||200===r.statusCode||c||(a=r.statusCode),r.headers&&(u[h]=r.headers)})),n&&(s=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:s,statusCode:a||200,loaderHeaders:u}}function le(e,t,r,o,a,i,s,c){let{loaderData:u,errors:d}=ie(t,r,o,a,c);for(let t=0;te.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function ue(e){let t=e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function de(e,t){let{pathname:r,routeId:n,method:o,type:a}=void 0===t?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",o&&r&&n?l="You made a "+o+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===a?l="defer() is not supported in actions":"invalid-body"===a&&(l="Unable to encode submission body")):403===e?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",l='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",o&&r&&n?l="You made a "+o.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new O(e||500,i,new Error(l),!0)}function he(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ve(r))return{result:r,idx:t}}}function fe(e){return d(n({},"string"===typeof e?h(e):e,{hash:""}))}function pe(e){return e.type===p.deferred}function me(e){return e.type===p.error}function ve(e){return(e&&e.type)===p.redirect}function ye(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function ge(e){return I.has(e.toLowerCase())}function be(e){return F.has(e.toLowerCase())}async function we(e,t,r,n,o,a){for(let i=0;ie.route.id===c.route.id)),d=null!=u&&!V(u,c)&&void 0!==(a&&a[c.route.id]);if(pe(s)&&(o||d)){let e=n[i];l(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await De(s,e,o).then((e=>{e&&(r[i]=e||r[i])}))}}}async function De(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:p.data,data:e.deferredData.unwrappedData}}catch(e){return{type:p.error,error:e}}return{type:p.data,data:e.deferredData.data}}}function Ee(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Re(e,t){let r="string"===typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&Ee(r||""))return e[e.length-1];let n=S(e);return n[n.length-1]}function xe(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:a,json:i}=e;if(t&&r&&n)return null!=o?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o}:null!=a?{formMethod:t,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function Ae(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Me(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 ke(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function Le(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}},20573:(e,t,r)=>{r.d(t,{P1:()=>s});var n="NOT_FOUND";var o=function(e,t){return e===t};function a(e,t){var r,a,i="object"===typeof t?t:{equalityCheck:t},l=i.equalityCheck,s=void 0===l?o:l,c=i.maxSize,u=void 0===c?1:c,d=i.resultEqualityCheck,h=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o-1){var a=r[o];return o>0&&(r.splice(o,1),r.unshift(a)),a.value}return n}return{get:o,put:function(t,a){o(t)===n&&(r.unshift({key:t,value:a}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(u,h);function p(){var t=f.get(arguments);if(t===n){if(t=e.apply(null,arguments),d){var r=f.getEntries(),o=r.find((function(e){return d(e.value,t)}));o&&(t=o.value)}f.put(arguments,t)}return t}return p.clearCache=function(){return f.clear()},p}function i(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"===typeof e}))){var r=t.map((function(e){return"function"===typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function l(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n