티스토리 수익 글 보기

티스토리 수익 글 보기

“use strict”;(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([[“9535”],{16069:function(e,t){let r;Object.prototype.toString,(r=function(){}).prototype=Object.create(null)},73970:function(e,t,r){r.d(t,{C5:()=>tl,FE:()=>e7,N_:()=>tA,OA:()=>tN,V2:()=>N,Ys:()=>tT,Zp:()=>eG,g:()=>eQ,k2:()=>tj,ok:()=>t_,p:()=>j,pg:()=>to,sv:()=>ts,ue:()=>w,zy:()=>eV});var n,a=r(17402);r(16069),r(65606);/** * react-router v7.6.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */var o=e=>{throw TypeError(e)},i=(e,t,r)=>(t.has(e)||o(“Cannot read from private field”),r?r.call(e):t.get(e)),l=”popstate”;function s(e,t){if(!1===e||null==e)throw Error(t)}function u(e,t){if(!e){“undefined”!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function d(e,t,r=null,n){return{pathname:”string”==typeof e?e:e.pathname,search:””,hash:””,…”string”==typeof t?f(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function h({pathname:e=”/”,search:t=””,hash:r=””}){return t&&”?”!==t&&(e+=”?”===t.charAt(0)?t:”?”+t),r&&”#”!==r&&(e+=”#”===r.charAt(0)?r:”#”+r),e}function f(e){let t={};if(e){let r=e.indexOf(“#”);r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf(“?”);n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function p(e,t=!1){let r=”http://localhost”;”undefined”!=typeof window&&(r=”null”!==window.location.origin?window.location.origin:window.location.href),s(r,”No window.location.(origin|href) available to create URL”);let n=”string”==typeof e?e:h(e);return n=n.replace(/ $/,”%20″),!t&&n.startsWith(“//”)&&(n=r+n),new URL(n,r)}var m=class{constructor(e){if(((e,t,r)=>t.has(e)?o(“Cannot add the same private member more than once”):t instanceof WeakSet?t.add(e):t.set(e,r))(this,n,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(i(this,n).has(e))return i(this,n).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw Error(“No value found for context”)}set(e,t){i(this,n).set(e,t)}};n=new WeakMap;var y=new Set([“lazy”,”caseSensitive”,”path”,”id”,”index”,”children”]),v=new Set([“lazy”,”caseSensitive”,”path”,”id”,”index”,”unstable_middleware”,”children”]);function g(e,t,r=[],n={}){return e.map((e,a)=>{let o=[…r,String(a)],i=”string”==typeof e.id?e.id:o.join(“-“);if(s(!0!==e.index||!e.children,”Cannot specify children on an index route”),s(!n[i],`Found a route id collision on id “${i}”. Route id’s must be globally unique within Data Router usages`),!0===e.index){let r={…e,…t(e),id:i};return n[i]=r,r}{let r={…e,…t(e),id:i,children:void 0};return n[i]=r,e.children&&(r.children=g(e.children,t,o,n)),r}})}function w(e,t,r=”/”){return b(e,t,r,!1)}function b(e,t,r,n){let a=C((“string”==typeof t?f(t):t).pathname||”/”,r);if(null==a)return null;let o=function e(t,r=[],n=[],a=””){let o=(t,o,i)=>{var l,u;let c,d,h={relativePath:void 0===i?t.path||””:i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};h.relativePath.startsWith(“/”)&&(s(h.relativePath.startsWith(a),`Absolute route path “${h.relativePath}” nested under path “${a}” is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length));let f=M([a,h.relativePath]),p=n.concat(h);t.children&&t.children.length>0&&(s(!0!==t.index,`Index routes must not have child routes. Please remove all child routes from route path “${f}”.`),e(t.children,r,p,f)),(null!=t.path||t.index)&&r.push({path:f,score:(l=f,u=t.index,d=(c=l.split(“/”)).length,c.some(x)&&(d+=-2),u&&(d+=2),c.filter(e=>!x(e)).reduce((e,t)=>e+(R.test(t)?3:””===t?1:10),d)),routesMeta:p})};return t.forEach((e,t)=>{if(“”!==e.path&&e.path?.includes(“?”))for(let r of function e(t){let r=t.split(“/”);if(0===r.length)return[];let[n,…a]=r,o=n.endsWith(“?”),i=n.replace(/\?$/,””);if(0===a.length)return o?[i,””]:[i];let l=e(a.join(“/”)),s=[];return s.push(…l.map(e=>””===e?i:[i,e].join(“/”))),o&&s.push(…l),s.map(e=>t.startsWith(“/”)&&””===e?”/”:e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);o.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)});let i=null;for(let e=0;null==i&&edecodeURIComponent(e).replace(/\//g,”%2F”)).join(“/”)}catch(t){return u(!1,`The URL path “${e}” could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(a);i=function(e,t,r=!1){let{routesMeta:n}=e,a={},o=”/”,i=[];for(let e=0;e“*”===e;function S(e,t){“string”==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){u(“*”===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,(e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?”/?([^\\/]+)?”:”/([^\\/]+)”));return e.endsWith(“*”)?(n.push({paramName:”*”}),a+=”*”===e||”/*”===e?”(.*)$”:”(?:\\/(.+)|\\/*)$”):r?a+=”\\/*$”:””!==e&&”/”!==e&&(a+=”(?:(?=\\/|$))”),[new RegExp(a,t?void 0:”i”),n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,”$1″),l=a.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if(“*”===t){let e=l[n]||””;i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,”$1″)}let a=l[n];return r&&!a?e[t]=void 0:e[t]=(a||””).replace(/%2F/g,”/”),e},{}),pathname:o,pathnameBase:i,pattern:e}}function C(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 P(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function k(e){let t=P(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function D(e,t,r,n=!1){let a,o;”string”==typeof e?a=f(e):(s(!(a={…e}).pathname||!a.pathname.includes(“?”),L(“?”,”pathname”,”search”,a)),s(!a.pathname||!a.pathname.includes(“#”),L(“#”,”pathname”,”hash”,a)),s(!a.search||!a.search.includes(“#”),L(“#”,”search”,”hash”,a)));let i=””===e||””===a.pathname,l=i?”/”:a.pathname;if(null==l)o=r;else{let e=t.length-1;if(!n&&l.startsWith(“..”)){let t=l.split(“/”);for(;”..”===t[0];)t.shift(),e-=1;a.pathname=t.join(“/”)}o=e>=0?t[e]:”/”}let u=function(e,t=”/”){var r;let n,{pathname:a,search:o=””,hash:i=””}=”string”==typeof e?f(e):e;return{pathname:a?a.startsWith(“/”)?a:(r=a,n=t.replace(/\/+$/,””).split(“/”),r.split(“/”).forEach(e=>{“..”===e?n.length>1&&n.pop():”.”!==e&&n.push(e)}),n.length>1?n.join(“/”):”/”):t,search:T(o),hash:O(i)}}(a,o),c=l&&”/”!==l&&l.endsWith(“/”),d=(i||”.”===l)&&r.endsWith(“/”);return!u.pathname.endsWith(“/”)&&(c||d)&&(u.pathname+=”/”),u}var M=e=>e.join(“/”).replace(/\/\/+/g,”/”),$=e=>e.replace(/\/+$/,””).replace(/^\/*/,”/”),T=e=>e&&”?”!==e?e.startsWith(“?”)?e:”?”+e:””,O=e=>e&&”#”!==e?e.startsWith(“#”)?e:”#”+e:””,A=class{constructor(e,t){this.type=”DataWithResponseInit”,this.data=e,this.init=t||null}};function j(e,t){return new A(e,”number”==typeof t?{status:t}:t)}var N=(e,t=302)=>{let r=t;”number”==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set(“Location”,e),new Response(null,{…r,headers:n})},z=class{constructor(e,t,r,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 U(e){return null!=e&&”number”==typeof e.status&&”string”==typeof e.statusText&&”boolean”==typeof e.internal&&”data”in e}var _=[“POST”,”PUT”,”PATCH”,”DELETE”],F=new Set(_),I=new Set([“GET”,…_]),H=new Set([301,302,303,307,308]),W=new Set([307,308]),B=887==r.j?{state:”idle”,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}:null,Y=887==r.j?{state:”idle”,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}:null,q=887==r.j?{state:”unblocked”,proceed:void 0,reset:void 0,location:void 0}:null,J=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),K=”remix-router-transitions”,X=Symbol(“ResetLoaderData”);function G(e,t,r,n,a,o){let i,l;if(a){for(let e of(i=[],t))if(i.push(e),e.route.id===a){l=e;break}}else i=t,l=t[t.length-1];let s=D(n||”.”,k(i),C(e.pathname,r)||e.pathname,”path”===o);if(null==n&&(s.search=e.search,s.hash=e.hash),(null==n||””===n||”.”===n)&&l){let e=eO(s.search);if(l.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,”?index&”):”?index”;else if(!l.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll(“index”);e.delete(“index”),t.filter(e=>e).forEach(t=>e.append(“index”,t));let r=e.toString();s.search=r?`?${r}`:””}}return”/”!==r&&(s.pathname=”/”===s.pathname?r:M([r,s.pathname])),h(s)}function Z(e,t,r){var n;let a,o;if(!r||!(null!=r&&(“formData”in r&&null!=r.formData||”body”in r&&void 0!==r.body)))return{path:t};if(r.formMethod&&(n=r.formMethod,!I.has(n.toUpperCase())))return{path:t,error:eC(405,{method:r.formMethod})};let i=()=>({path:t,error:eC(400,{type:”invalid-body”})}),l=(r.formMethod||”get”).toUpperCase(),u=eP(t);if(void 0!==r.body){if(“text/plain”===r.formEncType){if(!eT(l))return i();let e=”string”==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r} `,””):String(r.body);return{path:t,submission:{formMethod:l,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}else if(“application/json”===r.formEncType){if(!eT(l))return i();try{let e=”string”==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:l,formAction:u,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(s(“function”==typeof FormData,”FormData is not available in this environment”),r.formData)a=eg(r.formData),o=r.formData;else if(r.body instanceof FormData)a=eg(r.body),o=r.body;else if(r.body instanceof URLSearchParams)o=ew(a=r.body);else if(null==r.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(r.body),o=ew(a)}catch(e){return i()}let c={formMethod:l,formAction:u,formEncType:r&&r.formEncType||”application/x-www-form-urlencoded”,formData:o,json:void 0,text:void 0};if(eT(c.formMethod))return{path:t,submission:c};let d=f(t);return e&&d.search&&eO(d.search)&&a.append(“index”,””),d.search=`?${a}`,{path:h(d),submission:c}}function Q(e,t,r,n,a,o,i,l,s,u,c,d,h,f,p,m,y,v,g,b){let E,R=b?ek(b[1])?b[1].error:b[1].data:void 0,x=a.createURL(o.location),S=a.createURL(s);if(c&&o.errors){let e=Object.keys(o.errors)[0];E=i.findIndex(t=>t.route.id===e)}else if(b&&ek(b[1])){let e=b[0];E=i.findIndex(t=>t.route.id===e)-1}let C=b?b[1].statusCode:void 0,L=C&&C>=400,P={currentUrl:x,currentParams:o.matches[0]?.params||{},nextUrl:S,nextParams:i[0].params,…l,actionResult:R,actionStatus:C},k=i.map((a,i)=>{var l,s,h,f,p;let m,y,v,{route:g}=a,w=null;if(null!=E&&i>E?w=!1:g.lazy?w=!0:null==g.loader?w=!1:c?w=ee(g,o.loaderData,o.errors):(l=o.loaderData,s=o.matches[i],h=a,m=!s||h.route.id!==s.route.id,y=!l.hasOwnProperty(h.route.id),(m||y)&&(w=!0)),null!==w)return ed(r,n,e,a,u,t,w);let b=!L&&(d||x.pathname+x.search===S.pathname+S.search||x.search!==S.search||(f=o.matches[i],p=a,v=f.route.path,f.pathname!==p.pathname||null!=v&&v.endsWith(“*”)&&f.params[“*”]!==p.params[“*”])),R={…P,defaultShouldRevalidate:b},C=et(a,R);return ed(r,n,e,a,u,t,C,R)}),D=[];return p.forEach((e,l)=>{if(c||!i.some(t=>t.route.id===e.routeId)||f.has(l))return;let s=o.fetchers.get(l),p=s&&”idle”!==s.state&&void 0===s.data,b=w(y,e.path,v);if(!b){if(g&&p)return;D.push({key:l,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(m.has(l))return;let E=eA(b,e.path),R=new AbortController,x=ev(a,e.path,R.signal),S=null;if(h.has(l))h.delete(l),S=eh(r,n,x,b,E,u,t);else if(p)d&&(S=eh(r,n,x,b,E,u,t));else{let e={…P,defaultShouldRevalidate:!L&&d};et(E,e)&&(S=eh(r,n,x,b,E,u,t,e))}S&&D.push({key:l,routeId:e.routeId,path:e.path,matches:S,match:E,request:x,controller:R})}),{dsMatches:k,revalidatingFetchers:D}}function ee(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&e.id in t,a=null!=r&&void 0!==r[e.id];return(!!n||!a)&&(“function”==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function et(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(“boolean”==typeof r)return r}return t.defaultShouldRevalidate}function er(e,t,r,n,a){let o;if(e){let t=n[e];s(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),o=t.children}else o=r;let i=g(t.filter(e=>!o.some(t=>(function e(t,r){return”id”in t&&”id”in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,n)=>r.children?.some(r=>e(t,r))))})(e,t))),a,[e||”_”,”patch”,String(o?.length||”0″)],n);o.push(…i)}var en=new WeakMap,ea=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(s(a,”No route found in manifest”),!a.lazy||”object”!=typeof a.lazy)return;let o=a.lazy[e];if(!o)return;let i=en.get(a);i||(i={},en.set(a,i));let l=i[e];if(l)return l;let c=(async()=>{let t=y.has(e),r=void 0!==a[e]&&”hasErrorBoundary”!==e;if(t)u(!t,”Route property “+e+” is not a supported lazy route property. This property will be ignored.”),i[e]=Promise.resolve();else if(r)u(!1,`Route “${a.id}” has a static property “${e}” defined. The lazy property will be ignored.`);else{let t=await o();null!=t&&(Object.assign(a,{[e]:t}),Object.assign(a,n(a)))}”object”==typeof a.lazy&&(a.lazy[e]=void 0,Object.values(a.lazy).every(e=>void 0===e)&&(a.lazy=void 0))})();return i[e]=c,c},eo=new WeakMap;async function ei(e){let t=e.matches.filter(e=>e.shouldLoad),r={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,n)=>{r[t[n].route.id]=e}),r}async function el(e){return e.matches.some(e=>e.route.unstable_middleware)?es(e,!1,()=>ei(e),(e,t)=>({[t]:{type:”error”,result:e}})):ei(e)}async function es(e,t,r,n){let{matches:a,request:o,params:i,context:l}=e,s={handlerResult:void 0};try{let e=a.flatMap(e=>e.route.unstable_middleware?e.route.unstable_middleware.map(t=>[e.route.id,t]):[]),n=await eu({request:o,params:i,context:l},e,t,s,r);return t?n:s.handlerResult}catch(r){if(!s.middlewareError)throw r;let e=await n(s.middlewareError.error,s.middlewareError.routeId);if(t||!s.handlerResult)return e;return Object.assign(s.handlerResult,e)}}async function eu(e,t,r,n,a,o=0){let i,{request:l}=e;if(l.signal.aborted){if(l.signal.reason)throw l.signal.reason;throw Error(`Request aborted without an \`AbortSignal.reason\`: ${l.method} ${l.url}`)}let s=t[o];if(!s)return n.handlerResult=await a(),n.handlerResult;let[u,c]=s,d=!1,h=async()=>{if(d)throw Error(“You may only call `next()` once per middleware”);d=!0;let l=await eu(e,t,r,n,a,o+1);if(r)return i=l};try{let t=await c({request:e.request,params:e.params,context:e.context},h);if(!d)return h();if(void 0===t)return i;return t}catch(e){throw n.middlewareError?n.middlewareError.error!==e&&(n.middlewareError={routeId:u,error:e}):n.middlewareError={routeId:u,error:e},e}}function ec(e,t,r,n,a){let o=ea({key:”unstable_middleware”,route:n.route,manifest:t,mapRouteProperties:e}),i=function(e,t,r,n,a){let o,i=r[e.id];if(s(i,”No route found in manifest”),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(“function”==typeof e.lazy){let t=eo.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let r=(async()=>{s(“function”==typeof e.lazy,”No lazy route function found”);let t=await e.lazy(),r={};for(let e in t){let n=t[e];if(void 0===n)continue;let a=v.has(e),o=void 0!==i[e]&&”hasErrorBoundary”!==e;a?u(!a,”Route property “+e+” is not a supported property to be returned from a lazy route function. This property will be ignored.”):o?u(!o,`Route “${i.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.`):r[e]=n}Object.assign(i,r),Object.assign(i,{…n(i),lazy:void 0})})();return eo.set(i,r),r.catch(()=>{}),{lazyRoutePromise:r,lazyHandlerPromise:r}}let l=Object.keys(e.lazy),c=[];for(let i of l){if(a&&a.includes(i))continue;let l=ea({key:i,route:e,manifest:r,mapRouteProperties:n});l&&(c.push(l),i===t&&(o=l))}let d=c.length>0?Promise.all(c).then(()=>{}):void 0;return d?.catch(()=>{}),o?.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:o}}(n.route,eT(r.method)?”action”:”loader”,t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function ed(e,t,r,n,a,o,i,l=null){let s=!1,u=ec(e,t,r,n,a);return{…n,_lazyPromises:u,shouldLoad:i,unstable_shouldRevalidateArgs:l,unstable_shouldCallHandler:e=>(s=!0,l)?”boolean”==typeof e?et(n,{…l,defaultShouldRevalidate:e}):et(n,l):i,resolve:e=>s||i||e&&”GET”===r.method&&(n.route.lazy||n.route.loader)?ep({request:r,match:n,lazyHandlerPromise:u?.handler,lazyRoutePromise:u?.route,handlerOverride:e,scopedContext:o}):Promise.resolve({type:”data”,result:void 0})}}function eh(e,t,r,n,a,o,i,l=null){return n.map(n=>n.route.id!==a.route.id?{…n,shouldLoad:!1,unstable_shouldRevalidateArgs:l,unstable_shouldCallHandler:()=>!1,_lazyPromises:ec(e,t,r,n,o),resolve:()=>Promise.resolve({type:”data”,result:void 0})}:ed(e,t,r,n,o,i,!0,l))}async function ef(e,t,r,n,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let i={request:t,params:r[0].params,context:a,matches:r},l=o?()=>{throw Error(“You cannot call `unstable_runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`”)}:e=>es(i,!1,()=>e({…i,fetcherKey:n,unstable_runClientMiddleware:()=>{throw Error(“Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler”)}}),(e,t)=>({[t]:{type:”error”,result:e}})),s=await e({…i,fetcherKey:n,unstable_runClientMiddleware:l});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch(e){}return s}async function ep({request:e,match:t,lazyHandlerPromise:r,lazyRoutePromise:n,handlerOverride:a,scopedContext:o}){let i,l,s=eT(e.method),u=s?”action”:”loader”,c=r=>{let n,i=new Promise((e,t)=>n=t);l=()=>n(),e.signal.addEventListener(“abort”,l);let s=n=>”function”!=typeof r?Promise.reject(Error(`You cannot call the handler for a route which defines a boolean “${u}” [routeId: ${t.route.id}]`)):r({request:e,params:t.params,context:o},…void 0!==n?[n]:[]);return Promise.race([(async()=>{try{let e=await (a?a(e=>s(e)):s());return{type:”data”,result:e}}catch(e){return{type:”error”,result:e}}})(),i])};try{let a=s?t.route.action:t.route.loader;if(r||n)if(a){let e,[t]=await Promise.all([c(a).catch(t=>{e=t}),r,n]);if(void 0!==e)throw e;i=t}else{await r;let a=s?t.route.action:t.route.loader;if(a)[i]=await Promise.all([c(a),n]);else{if(“action”!==u)return{type:”data”,result:void 0};let r=new URL(e.url),n=r.pathname+r.search;throw eC(405,{method:e.method,pathname:n,routeId:t.route.id})}}else if(a)i=await c(a);else{let t=new URL(e.url),r=t.pathname+t.search;throw eC(404,{pathname:r})}}catch(e){return{type:”error”,result:e}}finally{l&&e.signal.removeEventListener(“abort”,l)}return i}async function em(e){let{result:t,type:r}=e;if(e$(t)){let e;try{let r=t.headers.get(“Content-Type”);e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:”error”,error:e}}return”error”===r?{type:”error”,error:new z(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:”data”,data:e,statusCode:t.status,headers:t.headers}}if(“error”===r)return eM(t)?t.data instanceof Error?{type:”error”,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:”error”,error:new z(t.init?.status||500,void 0,t.data),statusCode:U(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:”error”,error:t,statusCode:U(t)?t.status:void 0};return eM(t)?{type:”data”,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:”data”,data:t}}function ey(e,t,r){if(J.test(e)){let n=new URL(e.startsWith(“//”)?t.protocol+e:e),a=null!=C(n.pathname,r);if(n.origin===t.origin&&a)return n.pathname+n.search+n.hash}return e}function ev(e,t,r,n){let a=e.createURL(eP(t)).toString(),o={signal:r};if(n&&eT(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),”application/json”===t?(o.headers=new Headers({“Content-Type”:t}),o.body=JSON.stringify(n.json)):”text/plain”===t?o.body=n.text:”application/x-www-form-urlencoded”===t&&n.formData?o.body=eg(n.formData):o.body=n.formData}return new Request(a,o)}function eg(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,”string”==typeof n?n:n.name);return t}function ew(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function eb(e,t,r,n,a,o){let{loaderData:i,errors:l}=function(e,t,r,n=!1,a=!1){let o,i={},l=null,u=!1,c={},d=r&&ek(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let h=r.route.id,f=t[h];if(s(!eD(f),”Cannot handle redirect results in processLoaderData”),ek(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),l=l||{},a)l[h]=t;else{let r=ex(e,h);null==l[r.route.id]&&(l[r.route.id]=t)}n||(i[h]=X),u||(u=!0,o=U(f.error)?f.error.status:500),f.headers&&(c[h]=f.headers)}else i[h]=f.data,f.statusCode&&200!==f.statusCode&&!u&&(o=f.statusCode),f.headers&&(c[h]=f.headers)}),void 0!==d&&r&&(l={[r[0]]:d},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:l,statusCode:o||200,loaderHeaders:c}}(t,r,n);return a.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(s(i,”Did not find corresponding fetcher result”),!a||!a.signal.aborted)if(ek(i)){let t=ex(e.matches,n?.route.id);l&&l[t.route.id]||(l={…l,[t.route.id]:i.error}),e.fetchers.delete(r)}else if(eD(i))s(!1,”Unhandled fetcher revalidation redirect”);else{let t=eU(i.data);e.fetchers.set(r,t)}}),{loaderData:i,errors:l}}function eE(e,t,r,n){let a=Object.entries(t).filter(([,e])=>e!==X).reduce((e,[t,r])=>(e[t]=r,e),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function eR(e){return e?ek(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ex(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[…e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function eS(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||”/”===e.path)||{id:”__shim-error-route__”};return{matches:[{params:{},pathname:””,pathnameBase:””,route:t}],route:t}}function eC(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i=”Unknown Server Error”,l=”Unknown @remix-run/router error”;return 400===e?(i=”Bad Request”,n&&t&&r?l=`You made a ${n} request to “${t}” but did not provide a \`loader\` for route “${r}”, so there is no way to handle the request.`:”invalid-body”===a&&(l=”Unable to encode submission body”)):403===e?(i=”Forbidden”,l=`Route “${r}” does not match URL “${t}”`):404===e?(i=”Not Found”,l=`No route matches URL “${t}”`):405===e&&(i=”Method Not Allowed”,n&&t&&r?l=`You made a ${n.toUpperCase()} request to “${t}” but did not provide an \`action\` for route “${r}”, so there is no way to handle the request.`:n&&(l=`Invalid request method “${n.toUpperCase()}”`)),new z(e||500,i,Error(l),!0)}function eL(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e–){let[r,n]=t[e];if(eD(n))return{key:r,result:n}}}function eP(e){return h({…”string”==typeof e?f(e):e,hash:””})}function ek(e){return”error”===e.type}function eD(e){return”redirect”===(e&&e.type)}function eM(e){return”object”==typeof e&&null!=e&&”type”in e&&”data”in e&&”init”in e&&”DataWithResponseInit”===e.type}function e$(e){return null!=e&&”number”==typeof e.status&&”string”==typeof e.statusText&&”object”==typeof e.headers&&void 0!==e.body}function eT(e){return F.has(e.toUpperCase())}function eO(e){return new URLSearchParams(e).getAll(“index”).some(e=>””===e)}function eA(e,t){let r=”string”==typeof t?f(t).search:t.search;if(e[e.length-1].route.index&&eO(r||””))return e[e.length-1];let n=P(e);return n[n.length-1]}function ej(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};else if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function eN(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 ez(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 eU(e){return{state:”idle”,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}var e_=a.createContext(null);e_.displayName=”DataRouter”;var eF=a.createContext(null);eF.displayName=”DataRouterState”;var eI=a.createContext({isTransitioning:!1});eI.displayName=”ViewTransition”;var eH=a.createContext(new Map);eH.displayName=”Fetchers”,a.createContext(null).displayName=”Await”;var eW=a.createContext(null);eW.displayName=”Navigation”;var eB=a.createContext(null);eB.displayName=”Location”;var eY=a.createContext({outlet:null,matches:[],isDataRoute:!1});eY.displayName=”Route”;var eq=a.createContext(null);function eJ(){return null!=a.useContext(eB)}function eV(){return s(eJ(),”useLocation() may be used only in the context of a component.”),a.useContext(eB).location}eq.displayName=”RouteError”;var eK=”You should call navigate() in a React.useEffect(), not when your component is first rendered.”;function eX(e){a.useContext(eW).static||a.useLayoutEffect(e)}function eG(){let{isDataRoute:e}=a.useContext(eY);return e?function(){let e,{router:t}=(s(e=a.useContext(e_),e3(“useNavigate”)),e),r=e8(“useNavigate”),n=a.useRef(!1);return eX(()=>{n.current=!0}),a.useCallback(async(e,a={})=>{u(n.current,eK),n.current&&(“number”==typeof e?t.navigate(e):await t.navigate(e,{fromRouteId:r,…a}))},[t,r])}():function(){s(eJ(),”useNavigate() may be used only in the context of a component.”);let e=a.useContext(e_),{basename:t,navigator:r}=a.useContext(eW),{matches:n}=a.useContext(eY),{pathname:o}=eV(),i=JSON.stringify(k(n)),l=a.useRef(!1);return eX(()=>{l.current=!0}),a.useCallback((n,a={})=>{if(u(l.current,eK),!l.current)return;if(“number”==typeof n)return void r.go(n);let s=D(n,JSON.parse(i),o,”path”===a.relative);null==e&&”/”!==t&&(s.pathname=”/”===s.pathname?t:M([t,s.pathname])),(a.replace?r.replace:r.push)(s,a.state,a)},[t,r,i,o,e])}()}var eZ=a.createContext(null);function eQ(){let{matches:e}=a.useContext(eY),t=e[e.length-1];return t?t.params:{}}function e0(e,{relative:t}={}){let{matches:r}=a.useContext(eY),{pathname:n}=eV(),o=JSON.stringify(k(r));return a.useMemo(()=>D(e,JSON.parse(o),n,”path”===t),[e,o,n,t])}var e1=a.createElement(function(){let e,t,r,n=(e=a.useContext(eq),t=e5(“useRouteError”),r=e8(“useRouteError”),void 0!==e?e:t.errors?.[r]),o=U(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,l=”rgba(200,200,200, 0.5)”,s={padding:”2px 4px”,backgroundColor:l},u=null;return console.error(“Error handled by React Router default ErrorBoundary:”,n),u=a.createElement(a.Fragment,null,a.createElement(“p”,null,”\uD83D\uDCBF Hey developer \uD83D\uDC4B”),a.createElement(“p”,null,”You can provide a way better UX than this when your app throws errors by providing your own “,a.createElement(“code”,{style:s},”ErrorBoundary”),” or”,” “,a.createElement(“code”,{style:s},”errorElement”),” prop on your route.”)),a.createElement(a.Fragment,null,a.createElement(“h2″,null,”Unexpected Application Error!”),a.createElement(“h3″,{style:{fontStyle:”italic”}},o),i?a.createElement(“pre”,{style:{padding:”0.5rem”,backgroundColor:l}},i):null,u)},null),e4=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||”idle”!==t.revalidation&&”idle”===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error(“React Router caught the following error during render”,e,t)}render(){return void 0!==this.state.error?a.createElement(eY.Provider,{value:this.props.routeContext},a.createElement(eq.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function e2({routeContext:e,match:t,children:r}){let n=a.useContext(e_);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(eY.Provider,{value:e},r)}function e3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function e5(e){let t=a.useContext(eF);return s(t,e3(e)),t}function e8(e){let t,r=(s(t=a.useContext(eY),e3(e)),t),n=r.matches[r.matches.length-1];return s(n.route.id,`${e} can only be used on routes that contain a unique “id”`),n.route.id}function e7(){let{matches:e,loaderData:t}=e5(“useMatches”);return a.useMemo(()=>e.map(e=>E(e,t)),[e,t])}var e6={};function e9(e,t,r){t||e6[e]||(e6[e]=!0,u(!1,r))}var te=887==r.j?{}:null;function tt(e,t){e||te[t]||(te[t]=!0,console.warn(t))}function tr(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&u(!1,”You should not include both `Component` and `element` on your route – `Component` will be used.”),Object.assign(t,{element:a.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&u(!1,”You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route – `HydrateFallback` will be used.”),Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&u(!1,”You should not include both `ErrorBoundary` and `errorElement` on your route – `ErrorBoundary` will be used.”),Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var tn=887==r.j?[“HydrateFallback”,”hydrateFallbackElement”]:null,ta=class{constructor(){this.status=”pending”,this.promise=new Promise((e,t)=>{this.resolve=t=>{“pending”===this.status&&(this.status=”resolved”,e(t))},this.reject=e=>{“pending”===this.status&&(this.status=”rejected”,t(e))}})}};function to({router:e,flushSync:t}){let[r,n]=a.useState(e.state),[o,i]=a.useState(),[l,s]=a.useState({isTransitioning:!1}),[u,c]=a.useState(),[d,h]=a.useState(),[f,p]=a.useState(),m=a.useRef(new Map),y=a.useCallback((r,{deletedFetchers:o,flushSync:l,viewTransitionOpts:f})=>{r.fetchers.forEach((e,t)=>{void 0!==e.data&&m.current.set(t,e.data)}),o.forEach(e=>m.current.delete(e)),tt(!1===l||null!=t,’You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from “react-router/dom”` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.’);let y=null!=e.window&&null!=e.window.document&&”function”==typeof e.window.document.startViewTransition;if(tt(null==f||y,”You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available.”),!f||!y)return void(t&&l?t(()=>n(r)):a.startTransition(()=>n(r)));if(t&&l){t(()=>{d&&(u&&u.resolve(),d.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:f.currentLocation,nextLocation:f.nextLocation})});let a=e.window.document.startViewTransition(()=>{t(()=>n(r))});a.finished.finally(()=>{t(()=>{c(void 0),h(void 0),i(void 0),s({isTransitioning:!1})})}),t(()=>h(a));return}d?(u&&u.resolve(),d.skipTransition(),p({state:r,currentLocation:f.currentLocation,nextLocation:f.nextLocation})):(i(r),s({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}))},[e.window,t,d,u]);a.useLayoutEffect(()=>e.subscribe(y),[e,y]),a.useEffect(()=>{l.isTransitioning&&!l.flushSync&&c(new ta)},[l]),a.useEffect(()=>{if(u&&o&&e.window){let t=u.promise,r=e.window.document.startViewTransition(async()=>{a.startTransition(()=>n(o)),await t});r.finished.finally(()=>{c(void 0),h(void 0),i(void 0),s({isTransitioning:!1})}),h(r)}},[o,u,e.window]),a.useEffect(()=>{u&&o&&r.location.key===o.location.key&&u.resolve()},[u,d,r.location,o]),a.useEffect(()=>{!l.isTransitioning&&f&&(i(f.state),s({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),p(void 0))},[l.isTransitioning,f]);let v=a.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,r,n)=>e.navigate(t,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(t,r,n)=>e.navigate(t,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})}),[e]),g=e.basename||”/”,w=a.useMemo(()=>({router:e,navigator:v,static:!1,basename:g}),[e,v,g]);return a.createElement(a.Fragment,null,a.createElement(e_.Provider,{value:w},a.createElement(eF.Provider,{value:r},a.createElement(eH.Provider,{value:m.current},a.createElement(eI.Provider,{value:l},a.createElement(tu,{basename:g,location:r.location,navigationType:r.historyAction,navigator:v},a.createElement(ti,{routes:e.routes,future:e.future,state:r})))))),null)}var ti=a.memo(function({routes:e,future:t,state:r}){return function(e,t,r,n){let o;s(eJ(),”useRoutes() may be used only in the context of a component.”);let{navigator:i}=a.useContext(eW),{matches:l}=a.useContext(eY),c=l[l.length-1],d=c?c.params:{},h=c?c.pathname:”/”,p=c?c.pathnameBase:”/”,m=c&&c.route;{let e=m&&m.path||””;e9(h,!m||e.endsWith(“*”)||e.endsWith(“*?”),`You rendered descendant (or called \`useRoutes()\`) at “${h}” (under ) but the parent route path has no trailing “*”. This means if you navigate deeper, the parent won’t match anymore and therefore the child routes will never render. Please change the parent to .`)}let y=eV();if(t){let e=”string”==typeof t?f(t):t;s(“/”===p||e.pathname?.startsWith(p),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is “${p}” but pathname “${e.pathname}” was given in the \`location\` prop.`),o=e}else o=y;let v=o.pathname||”/”,g=v;if(“/”!==p){let e=p.replace(/^\//,””).split(“/”);g=”/”+v.replace(/^\//,””).split(“/”).slice(e.length).join(“/”)}let b=w(e,{pathname:g});u(m||null!=b,`No routes matched location “${o.pathname}${o.search}${o.hash}” `),u(null==b||void 0!==b[b.length-1].route.element||void 0!==b[b.length-1].route.Component||void 0!==b[b.length-1].route.lazy,`Matched leaf route at location “${o.pathname}${o.search}${o.hash}” does not have an element or Component. This means it will render an with a null value by default resulting in an “empty” page.`);let E=function(e,t=[],r=null,n=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,i=r?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&i?.[e.route.id]!==void 0);s(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(“,”)}`),o=o.slice(0,Math.min(o.length,e+1))}let l=!1,u=-1;if(r)for(let e=0;e=0?o.slice(0,u+1):[o[0]];break}}}return o.reduceRight((e,n,s)=>{let c,d=!1,h=null,f=null;r&&(c=i&&n.route.id?i[n.route.id]:void 0,h=n.route.errorElement||e1,l&&(u<0&&0===s?(e9("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):u===s&&(d=!0,f=n.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,s+1)),m=()=>{let t;return t=c?h:d?f:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(e2,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===s)?a.createElement(e4,{location:r.location,revalidation:r.revalidation,component:h,error:c,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}(b&&b.map(e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:M([p,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:”/”===e.pathnameBase?p:M([p,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),l,r,n);return t&&E?a.createElement(eB.Provider,{value:{location:{pathname:”/”,search:””,hash:””,state:null,key:”default”,…o},navigationType:”POP”}},E):E}(e,void 0,r,t)});function tl({to:e,replace:t,state:r,relative:n}){s(eJ(),” may be used only in the context of a component.”);let{static:o}=a.useContext(eW);u(!o,” must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.”);let{matches:i}=a.useContext(eY),{pathname:l}=eV(),c=eG(),d=JSON.stringify(D(e,k(i),l,”path”===n));return a.useEffect(()=>{c(JSON.parse(d),{replace:t,state:r,relative:n})},[c,d,n,t,r]),null}function ts(e){var t;let r;return t=e.context,(r=a.useContext(eY).outlet)?a.createElement(eZ.Provider,{value:t},r):r}function tu({basename:e=”/”,children:t=null,location:r,navigationType:n=”POP”,navigator:o,static:i=!1}){s(!eJ(),”You cannot render a inside another . You should never have more than one in your app.”);let l=e.replace(/^\/*/,”/”),c=a.useMemo(()=>({basename:l,navigator:o,static:i,future:{}}),[l,o,i]);”string”==typeof r&&(r=f(r));let{pathname:d=”/”,search:h=””,hash:p=””,state:m=null,key:y=”default”}=r,v=a.useMemo(()=>{let e=C(d,l);return null==e?null:{location:{pathname:e,search:h,hash:p,state:m,key:y},navigationType:n}},[l,d,h,p,m,y,n]);return(u(null!=v,` is not able to match the URL “${d}${h}${p}” because it does not start with the basename, so the won’t render anything.`),null==v)?null:a.createElement(eW.Provider,{value:c},a.createElement(eB.Provider,{children:t,value:v}))}a.Component;var tc=”get”,td=”application/x-www-form-urlencoded”;function th(e){return null!=e&&”string”==typeof e.tagName}function tf(e=””){return new URLSearchParams(“string”==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}var tp=null,tm=new Set([“application/x-www-form-urlencoded”,”multipart/form-data”,”text/plain”]);function ty(e){return null==e||tm.has(e)?e:(u(!1,`”${e}” is not a valid \`encType\` for \`
\`/\`\` and will default to “${td}”`),null)}function tv(e,t){if(!1===e||null==e)throw Error(t)}async function tg(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page…`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tw(e){return null!=e&&(null==e.href?”preload”===e.rel&&”string”==typeof e.imageSrcSet&&”string”==typeof e.imageSizes:”string”==typeof e.rel&&”string”==typeof e.href)}async function tb(e,t,r){var n;let a,o;return n=(await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await tg(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(tw).filter(e=>”stylesheet”===e.rel||”preload”===e.rel).map(e=>”stylesheet”===e.rel?{…e,rel:”prefetch”,as:”style”}:{…e,rel:”prefetch”}),a=new Set,o=new Set(void 0),n.reduce((e,t)=>{!1;let r=JSON.stringify(function(e){let t={};for(let r of Object.keys(e).sort())t[r]=e[r];return t}(t));return a.has(r)||(a.add(r),e.push({key:r,link:t})),e},[])}function tE(e,t,r,n,a,o){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith(“*”)&&r[t].params[“*”]!==e.params[“*”];return”assets”===o?t.filter((e,t)=>i(e,t)||l(e,t)):”data”===o?t.filter((t,o)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(“boolean”==typeof n)return n}return!0}):[]}function tR(e,t,{includeHydrateFallback:r}={}){return[…new Set(e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let a=[n.module];return n.clientActionModule&&(a=a.concat(n.clientActionModule)),n.clientLoaderModule&&(a=a.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(a=a.concat(n.hydrateFallbackModule)),n.imports&&(a=a.concat(n.imports)),a}).flat(1))]}Object.getOwnPropertyNames(Object.prototype).sort().join(“\0″),”undefined”!=typeof window&&window,Symbol(“SingleFetchRedirect”);var tx=new Set([100,101,204,205]);function tS(){let e=a.useContext(e_);return tv(e,”You must render this element inside a element”),e}function tC(){let e=a.useContext(eF);return tv(e,”You must render this element inside a element”),e}a.Component;var tL=a.createContext(void 0);function tP(){let e=a.useContext(tL);return tv(e,”You must render this element inside a element”),e}function tk(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function tD({page:e,…t}){let{router:r}=tS(),n=a.useMemo(()=>w(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?a.createElement(tM,{page:e,matches:n,…t}):null}function tM({page:e,matches:t,…r}){let n=eV(),{manifest:o,routeModules:i}=tP(),{basename:l}=tS(),{loaderData:s,matches:u}=tC(),c=a.useMemo(()=>tE(e,t,u,o,n,”data”),[e,t,u,o,n]),d=a.useMemo(()=>tE(e,t,u,o,n,”assets”),[e,t,u,o,n]),h=a.useMemo(()=>{let r;if(e===n.pathname+n.search+n.hash)return[];let a=new Set,u=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?u=!0:a.add(e.route.id))}),0===a.size)return[];let d=(“/”===(r=”string”==typeof e?new URL(e,”undefined”==typeof window?”server://singlefetch/”:window.location.origin):e).pathname?r.pathname=”_root.data”:l&&”/”===C(r.pathname,l)?r.pathname=`${l.replace(/\/$/,””)}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,””)}.data`,r);return u&&a.size>0&&d.searchParams.set(“_routes”,t.filter(e=>a.has(e.route.id)).map(e=>e.route.id).join(“,”)),[d.pathname+d.search]},[l,s,n,o,c,t,e,i]),f=a.useMemo(()=>tR(d,o),[d,o]),p=function(e){let{manifest:t,routeModules:r}=tP(),[n,o]=a.useState([]);return a.useEffect(()=>{let n=!1;return tb(e,t,r).then(e=>{n||o(e)}),()=>{n=!0}},[e,t,r]),n}(d);return a.createElement(a.Fragment,null,h.map(e=>a.createElement(“link”,{key:e,rel:”prefetch”,as:”fetch”,href:e,…r})),f.map(e=>a.createElement(“link”,{key:e,rel:”modulepreload”,href:e,…r})),p.map(({key:e,link:t})=>a.createElement(“link”,{key:e,…t})))}tL.displayName=”FrameworkContext”;var t$=”undefined”!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{t$&&(window.__reactRouterVersion=”7.6.2″)}catch(e){}function tT(e,t){let r;return(function(e){let t,r,n,a,o,i=e.window?e.window:”undefined”!=typeof window?window:void 0,l=void 0!==i&&void 0!==i.document&&void 0!==i.document.createElement;s(e.routes.length>0,”You must provide a non-empty routes array to createRouter”);let c=e.hydrationRouteProperties||[],h=e.mapRouteProperties||V,f={},y=g(e.routes,h,void 0,f),v=e.basename||”/”,R=e.dataStrategy||el,x={unstable_middleware:!1,…e.future},S=null,L=new Set,P=null,k=null,D=null,M=null!=e.hydrationData,$=w(y,e.history.location,v),T=!1,O=null;if(null!=$||e.patchRoutesOnNavigation)if($&&!e.hydrationData&&e6($,y,e.history.location.pathname).active&&($=null),$)if($.some(e=>e.route.lazy))r=!1;else if($.some(e=>e.route.loader)){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=$.findIndex(e=>void 0!==n[e.route.id]);r=$.slice(0,e+1).every(e=>!ee(e.route,t,n))}else r=$.every(e=>!ee(e.route,t,n))}else r=!0;else{r=!1,$=[];let t=e6(null,y,e.history.location.pathname);t.active&&t.matches&&(T=!0,$=t.matches)}else{let t=eC(404,{pathname:e.history.location.pathname}),{matches:n,route:a}=eS(y);r=!0,$=n,O={[a.id]:t}}let A={historyAction:e.history.action,location:e.history.location,matches:$,initialized:r,navigation:B,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||O,fetchers:new Map,blockers:new Map},j=”POP”,N=!1,z=!1,_=new Map,F=null,I=!1,X=!1,et=new Set,en=new Map,ea=0,eo=-1,ei=new Map,es=new Set,eu=new Map,ec=new Map,ed=new Set,ep=new Map,eg=null;function ew(e,t={}){A={…A,…e};let r=[],n=[];A.fetchers.forEach((e,t)=>{“idle”===e.state&&(ed.has(t)?r.push(t):n.push(t))}),ed.forEach(e=>{A.fetchers.has(e)||en.has(e)||r.push(e)}),[…L].forEach(e=>e(A,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>eG(e)),n.forEach(e=>A.fetchers.delete(e))}function eP(r,n,{flushSync:a}={}){let o,i,l=null!=A.actionData&&null!=A.navigation.formMethod&&eT(A.navigation.formMethod)&&”loading”===A.navigation.state&&r.state?._isRedirect!==!0;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:l?A.actionData:null;let s=n.loaderData?eE(A.loaderData,n.loaderData,n.matches||[],n.errors):A.loaderData,u=A.blockers;u.size>0&&(u=new Map(u)).forEach((e,t)=>u.set(t,q));let c=!0===N||null!=A.navigation.formMethod&&eT(A.navigation.formMethod)&&r.state?._isRedirect!==!0;if(t&&(y=t,t=void 0),I||”POP”===j||(“PUSH”===j?e.history.push(r,r.state):”REPLACE”===j&&e.history.replace(r,r.state)),”POP”===j){let e=_.get(A.location.pathname);e&&e.has(r.pathname)?i={currentLocation:A.location,nextLocation:r}:_.has(r.pathname)&&(i={currentLocation:r,nextLocation:A.location})}else if(z){let e=_.get(A.location.pathname);e?e.add(r.pathname):(e=new Set([r.pathname]),_.set(A.location.pathname,e)),i={currentLocation:A.location,nextLocation:r}}ew({…n,actionData:o,loaderData:s,historyAction:j,location:r,initialized:!0,navigation:B,revalidation:”idle”,restoreScrollPosition:e7(r,n.matches||A.matches),preventScrollReset:c,blockers:u},{viewTransitionOpts:i,flushSync:!0===a}),j=”POP”,N=!1,z=!1,I=!1,X=!1,eg?.resolve(),eg=null}async function eM(t,r){if(“number”==typeof t)return void e.history.go(t);let{path:n,submission:a,error:o}=Z(!1,G(A.location,A.matches,v,t,r?.fromRouteId,r?.relative),r),i=A.location,l=d(A.location,n,r&&r.state);l={…l,…e.history.encodeLocation(l)};let s=r&&null!=r.replace?r.replace:void 0,u=”PUSH”;!0===s?u=”REPLACE”:!1===s||null!=a&&eT(a.formMethod)&&a.formAction===A.location.pathname+A.location.search&&(u=”REPLACE”);let c=r&&”preventScrollReset”in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),f=e3({currentLocation:i,nextLocation:l,historyAction:u});f?e2(f,{state:”blocked”,location:l,proceed(){e2(f,{state:”proceeding”,proceed:void 0,reset:void 0,location:l}),eM(t,r)},reset(){let e=new Map(A.blockers);e.set(f,q),ew({blockers:e})}}):await eO(u,l,{submission:a,pendingError:o,preventScrollReset:c,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h})}async function eO(r,n,o){var i,l,s,u;let c;a&&a.abort(),a=null,j=r,I=!0===(o&&o.startUninterruptedRevalidation),i=A.location,l=A.matches,P&&D&&(P[e8(i,l)]=D()),N=!0===(o&&o.preventScrollReset),z=!0===(o&&o.enableViewTransition);let d=t||y,h=o&&o.overrideNavigation,f=o?.initialHydration&&A.matches&&A.matches.length>0&&!T?A.matches:w(d,n,v),p=!0===(o&&o.flushSync);if(f&&A.initialized&&!X&&(s=A.location,u=n,s.pathname===u.pathname&&s.search===u.search&&(“”===s.hash?””!==u.hash:s.hash===u.hash||””!==u.hash||!1))&&!(o&&o.submission&&eT(o.submission.formMethod)))return void eP(n,{matches:f},{flushSync:p});let g=e6(f,d,n.pathname);if(g.active&&g.matches&&(f=g.matches),!f){let{error:e,notFoundMatches:t,route:r}=e5(n.pathname);eP(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:p});return}a=new AbortController;let b=ev(e.history,n,a.signal,o&&o.submission),E=new m(e.unstable_getContext?await e.unstable_getContext():void 0);if(o&&o.pendingError)c=[ex(f).route.id,{type:”error”,error:o.pendingError}];else if(o&&o.submission&&eT(o.submission.formMethod)){let t=await e_(b,n,o.submission,f,E,g.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:p});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ek(r)&&U(r.error)&&404===r.error.status){a=null,eP(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}f=t.matches||f,c=t.pendingActionResult,h=eN(n,o.submission),p=!1,g.active=!1,b=ev(e.history,b.url,b.signal)}let{shortCircuited:R,matches:x,loaderData:S,errors:C}=await eF(b,n,f,E,g.active,h,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,p,c);R||(a=null,eP(n,{matches:x||f,…eR(c),loaderData:S,errors:C}))}async function e_(e,t,r,n,a,o,i,l={}){var s;let u;if(eJ(),ew({navigation:{state:”submitting”,location:t,formMethod:(s=r).formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}},{flushSync:!0===l.flushSync}),o){let r=await e9(n,t.pathname,e.signal);if(“aborted”===r.type)return{shortCircuited:!0};if(“error”===r.type){let e=ex(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:”error”,error:r.error}]}}if(r.matches)n=r.matches;else{let{notFoundMatches:e,error:r,route:n}=e5(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:”error”,error:r}]}}}let d=eA(n,t);if(d.route.action||d.route.lazy){let t=eh(h,f,e,n,d,i?[]:c,a),r=await eY(e,t,a,null);if(!(u=r[d.route.id])){for(let e of n)if(r[e.route.id]){u=r[e.route.id];break}}if(e.signal.aborted)return{shortCircuited:!0}}else u={type:”error”,error:eC(405,{method:e.method,pathname:t.pathname,routeId:d.route.id})};if(eD(u)){let t;return t=l&&null!=l.replace?l.replace:ey(u.response.headers.get(“Location”),new URL(e.url),v)===A.location.pathname+A.location.search,await eB(e,u,!0,{submission:r,replace:t}),{shortCircuited:!0}}if(ek(u)){let e=ex(n,d.route.id);return!0!==(l&&l.replace)&&(j=”PUSH”),{matches:n,pendingActionResult:[e.route.id,u,d.route.id]}}return{matches:n,pendingActionResult:[d.route.id,u]}}async function eF(r,n,o,i,l,s,u,d,p,m,g,w){let b=s||eN(n,u),E=u||d||ej(b),R=!I&&!m;if(l){if(R){let e=eI(w);ew({navigation:b,…void 0!==e?{actionData:e}:{}},{flushSync:g})}let e=await e9(o,n.pathname,r.signal);if(“aborted”===e.type)return{shortCircuited:!0};if(“error”===e.type){let t=ex(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)o=e.matches;else{let{error:e,notFoundMatches:t,route:r}=e5(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let x=t||y,{dsMatches:S,revalidatingFetchers:C}=Q(r,i,h,f,e.history,A,o,E,n,m?[]:c,!0===m,X,et,ed,eu,es,x,v,null!=e.patchRoutesOnNavigation,w);if(eo=++ea,!e.dataStrategy&&!S.some(e=>e.shouldLoad)&&0===C.length){let e=e0();return eP(n,{matches:o,loaderData:{},errors:w&&ek(w[1])?{[w[0]]:w[1].error}:null,…eR(w),…e?{fetchers:new Map(A.fetchers)}:{}},{flushSync:g}),{shortCircuited:!0}}if(R){let e={};if(!l){e.navigation=b;let t=eI(w);void 0!==t&&(e.actionData=t)}C.length>0&&(C.forEach(e=>{let t=A.fetchers.get(e.key),r=ez(void 0,t?t.data:void 0);A.fetchers.set(e.key,r)}),e.fetchers=new Map(A.fetchers)),ew(e,{flushSync:g})}C.forEach(e=>{eZ(e.key),e.controller&&en.set(e.key,e.controller)});let L=()=>C.forEach(e=>eZ(e.key));a&&a.signal.addEventListener(“abort”,L);let{loaderResults:P,fetcherResults:k}=await eq(S,C,r,i);if(r.signal.aborted)return{shortCircuited:!0};a&&a.signal.removeEventListener(“abort”,L),C.forEach(e=>en.delete(e.key));let D=eL(P);if(D)return await eB(r,D.result,!0,{replace:p}),{shortCircuited:!0};if(D=eL(k))return es.add(D.key),await eB(r,D.result,!0,{replace:p}),{shortCircuited:!0};let{loaderData:M,errors:$}=eb(A,o,P,w,C,k);m&&A.errors&&($={…A.errors,…$});let T=e0(),O=e1(eo);return{matches:o,loaderData:M,errors:$,…T||O||C.length>0?{fetchers:new Map(A.fetchers)}:{}}}function eI(e){if(e&&!ek(e[1]))return{[e[0]]:e[1].data};if(A.actionData)if(0===Object.keys(A.actionData).length)return null;else return A.actionData}async function eH(r,n,o,i,l,u,d,p,m,g){var b,E;function R(e){if(!e.route.action&&!e.route.lazy){let e=eC(405,{method:g.formMethod,pathname:o,routeId:n});return eK(r,n,e,{flushSync:p}),!0}return!1}if(eJ(),eu.delete(r),!d&&R(i))return;let x=A.fetchers.get(r);eV(r,(b=g,E=x,{state:”submitting”,formMethod:b.formMethod,formAction:b.formAction,formEncType:b.formEncType,formData:b.formData,json:b.json,text:b.text,data:E?E.data:void 0}),{flushSync:p});let S=new AbortController,C=ev(e.history,o,S.signal,g);if(d){let e=await e9(l,o,C.signal,r);if(“aborted”===e.type)return;if(“error”===e.type)return void eK(r,n,e.error,{flushSync:p});if(!e.matches)return void eK(r,n,eC(404,{pathname:o}),{flushSync:p});if(R(i=eA(l=e.matches,o)))return}en.set(r,S);let L=ea,P=eh(h,f,C,l,i,c,u),k=(await eY(C,P,u,r))[i.route.id];if(C.signal.aborted){en.get(r)===S&&en.delete(r);return}if(ed.has(r)){if(eD(k)||ek(k))return void eV(r,eU(void 0))}else{if(eD(k))return(en.delete(r),eo>L)?void eV(r,eU(void 0)):(es.add(r),eV(r,ez(g)),eB(C,k,!1,{fetcherSubmission:g,preventScrollReset:m}));if(ek(k))return void eK(r,n,k.error)}let D=A.navigation.location||A.location,M=ev(e.history,D,S.signal),$=t||y,T=”idle”!==A.navigation.state?w($,A.navigation.location,v):A.matches;s(T,”Didn’t find any matches after fetcher action”);let O=++ea;ei.set(r,O);let N=ez(g,k.data);A.fetchers.set(r,N);let{dsMatches:z,revalidatingFetchers:U}=Q(M,u,h,f,e.history,A,T,g,D,c,!1,X,et,ed,eu,es,$,v,null!=e.patchRoutesOnNavigation,[i.route.id,k]);U.filter(e=>e.key!==r).forEach(e=>{let t=e.key,r=A.fetchers.get(t),n=ez(void 0,r?r.data:void 0);A.fetchers.set(t,n),eZ(t),e.controller&&en.set(t,e.controller)}),ew({fetchers:new Map(A.fetchers)});let _=()=>U.forEach(e=>eZ(e.key));S.signal.addEventListener(“abort”,_);let{loaderResults:F,fetcherResults:I}=await eq(z,U,M,u);if(S.signal.aborted)return;if(S.signal.removeEventListener(“abort”,_),ei.delete(r),en.delete(r),U.forEach(e=>en.delete(e.key)),A.fetchers.has(r)){let e=eU(k.data);A.fetchers.set(r,e)}let H=eL(F);if(H)return eB(M,H.result,!1,{preventScrollReset:m});if(H=eL(I))return es.add(H.key),eB(M,H.result,!1,{preventScrollReset:m});let{loaderData:W,errors:B}=eb(A,T,F,void 0,U,I);e1(O),”loading”===A.navigation.state&&O>eo?(s(j,”Expected pending action”),a&&a.abort(),eP(A.navigation.location,{matches:T,loaderData:W,errors:B,fetchers:new Map(A.fetchers)})):(ew({errors:B,loaderData:eE(A.loaderData,W,T,B),fetchers:new Map(A.fetchers)}),X=!1)}async function eW(t,r,n,a,o,i,l,s,u,d){let p=A.fetchers.get(t);eV(t,ez(d,p?p.data:void 0),{flushSync:s});let m=new AbortController,y=ev(e.history,n,m.signal);if(l){let e=await e9(o,n,y.signal,t);if(“aborted”===e.type)return;if(“error”===e.type)return void eK(t,r,e.error,{flushSync:s});if(!e.matches)return void eK(t,r,eC(404,{pathname:n}),{flushSync:s});a=eA(o=e.matches,n)}en.set(t,m);let v=ea,g=eh(h,f,y,o,a,c,i),w=(await eY(y,g,i,t))[a.route.id];if(en.get(t)===m&&en.delete(t),!y.signal.aborted){if(ed.has(t))return void eV(t,eU(void 0));if(eD(w))if(eo>v)return void eV(t,eU(void 0));else{es.add(t),await eB(y,w,!1,{preventScrollReset:u});return}if(ek(w))return void eK(t,r,w.error);eV(t,eU(w.data))}}async function eB(e,t,r,{submission:n,fetcherSubmission:o,preventScrollReset:u,replace:c}={}){t.response.headers.has(“X-Remix-Revalidate”)&&(X=!0);let h=t.response.headers.get(“Location”);s(h,”Expected a Location header on the redirect Response”),h=ey(h,new URL(e.url),v);let f=d(A.location,h,{_isRedirect:!0});if(l){let e=!1;if(t.response.headers.has(“X-Remix-Reload-Document”))e=!0;else if(J.test(h)){let t=p(h,!0);e=t.origin!==i.location.origin||null==C(t.pathname,v)}if(e)return void(c?i.location.replace(h):i.location.assign(h))}a=null;let m=!0===c||t.response.headers.has(“X-Remix-Replace”)?”REPLACE”:”PUSH”,{formMethod:y,formAction:g,formEncType:w}=A.navigation;!n&&!o&&y&&g&&w&&(n=ej(A.navigation));let b=n||o;if(W.has(t.response.status)&&b&&eT(b.formMethod))await eO(m,f,{submission:{…b,formAction:h},preventScrollReset:u||N,enableViewTransition:r?z:void 0});else{let e=eN(f,n);await eO(m,f,{overrideNavigation:e,fetcherSubmission:o,preventScrollReset:u||N,enableViewTransition:r?z:void 0})}}async function eY(e,t,r,n){let a,o={};try{a=await ef(R,e,t,n,r,!1)}catch(e){return t.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:”error”,error:e}}),o}if(e.signal.aborted)return o;for(let[r,n]of Object.entries(a)){var i;if(e$((i=n).result)&&H.has(i.result.status)){let a=n.result;o[r]={type:”redirect”,response:function(e,t,r,n,a){let o=e.headers.get(“Location”);if(s(o,”Redirects returned/thrown from loaders/actions must have a Location header”),!J.test(o)){let i=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=G(new URL(t.url),i,a,o),e.headers.set(“Location”,o)}return e}(a,e,r,t,v)}}else o[r]=await em(n)}return o}async function eq(e,t,r,n){let a=eY(r,e,n,null),o=Promise.all(t.map(async e=>{if(!e.matches||!e.match||!e.request||!e.controller)return Promise.resolve({[e.key]:{type:”error”,error:eC(404,{pathname:e.path})}});{let t=(await eY(e.request,e.matches,n,e.key))[e.match.route.id];return{[e.key]:t}}}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function eJ(){X=!0,eu.forEach((e,t)=>{en.has(t)&&et.add(t),eZ(t)})}function eV(e,t,r={}){A.fetchers.set(e,t),ew({fetchers:new Map(A.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function eK(e,t,r,n={}){let a=ex(A.matches,t);eG(e),ew({errors:{[a.route.id]:r},fetchers:new Map(A.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function eX(e){return ec.set(e,(ec.get(e)||0)+1),ed.has(e)&&ed.delete(e),A.fetchers.get(e)||Y}function eG(e){let t=A.fetchers.get(e);en.has(e)&&!(t&&”loading”===t.state&&ei.has(e))&&eZ(e),eu.delete(e),ei.delete(e),es.delete(e),ed.delete(e),et.delete(e),A.fetchers.delete(e)}function eZ(e){let t=en.get(e);t&&(t.abort(),en.delete(e))}function eQ(e){for(let t of e){let e=eU(eX(t).data);A.fetchers.set(t,e)}}function e0(){let e=[],t=!1;for(let r of es){let n=A.fetchers.get(r);s(n,`Expected fetcher: ${r}`),”loading”===n.state&&(es.delete(r),e.push(r),t=!0)}return eQ(e),t}function e1(e){let t=[];for(let[r,n]of ei)if(n0}function e4(e){A.blockers.delete(e),ep.delete(e)}function e2(e,t){let r=A.blockers.get(e)||q;s(“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(A.blockers);n.set(e,t),ew({blockers:n})}function e3({currentLocation:e,nextLocation:t,historyAction:r}){if(0===ep.size)return;ep.size>1&&u(!1,”A router only supports one blocker at a time”);let n=Array.from(ep.entries()),[a,o]=n[n.length-1],i=A.blockers.get(a);if((!i||”proceeding”!==i.state)&&o({currentLocation:e,nextLocation:t,historyAction:r}))return a}function e5(e){let r=eC(404,{pathname:e}),{matches:n,route:a}=eS(t||y);return{notFoundMatches:n,route:a,error:r}}function e8(e,t){return k&&k(e,t.map(e=>E(e,A.loaderData)))||e.key}function e7(e,t){if(P){let r=P[e8(e,t)];if(“number”==typeof r)return r}return null}function e6(t,r,n){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:b(r,n,v,!0)||[]};else if(Object.keys(t[0].params).length>0)return{active:!0,matches:b(r,n,v,!0)}}return{active:!1,matches:null}}async function e9(r,n,a,o){if(!e.patchRoutesOnNavigation)return{type:”success”,matches:r};let i=r;for(;;){let r=null==t,l=t||y,s=f;try{await e.patchRoutesOnNavigation({signal:a,path:n,matches:i,fetcherKey:o,patch:(e,t)=>{a.aborted||er(e,t,l,s,h)}})}catch(e){return{type:”error”,error:e,partialMatches:i}}finally{r&&!a.aborted&&(y=[…y])}if(a.aborted)return{type:”aborted”};let u=w(l,n,v);if(u)return{type:”success”,matches:u};let c=b(l,n,v,!0);if(!c||i.length===c.length&&i.every((e,t)=>e.route.id===c[t].route.id))return{type:”success”,matches:null};i=c}}return n={get basename(){return v},get future(){return x},get state(){return A},get routes(){return y},get window(){return i},initialize:function(){if(S=e.history.listen(({action:t,location:r,delta:n})=>{if(o){o(),o=void 0;return}u(0===ep.size||null!=n,”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=e3({currentLocation:A.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise(e=>{o=e});e.history.go(-1*n),e2(a,{state:”blocked”,location:r,proceed(){e2(a,{state:”proceeding”,proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(A.blockers);e.set(a,q),ew({blockers:e})}});return}return eO(t,r)}),l){var t=i,r=_;try{let e=t.sessionStorage.getItem(K);if(e){let t=JSON.parse(e);for(let[e,n]of Object.entries(t||{}))n&&Array.isArray(n)&&r.set(e,new Set(n||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[…n];try{e.sessionStorage.setItem(K,JSON.stringify(r))}catch(e){u(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}})(i,_);i.addEventListener(“pagehide”,e),F=()=>i.removeEventListener(“pagehide”,e)}return A.initialized||eO(“POP”,A.location,{initialHydration:!0}),n},subscribe:function(e){return L.add(e),()=>L.delete(e)},enableScrollRestoration:function(e,t,r){if(P=e,D=t,k=r||null,!M&&A.navigation===B){M=!0;let e=e7(A.location,A.matches);null!=e&&ew({restoreScrollPosition:e})}return()=>{P=null,D=null,k=null}},navigate:eM,fetch:async function r(r,n,a,o){eZ(r);let i=!0===(o&&o.flushSync),l=t||y,s=G(A.location,A.matches,v,a,n,o?.relative),u=w(l,s,v),c=e6(u,l,s);if(c.active&&c.matches&&(u=c.matches),!u)return void eK(r,n,eC(404,{pathname:s}),{flushSync:i});let{path:d,submission:h,error:f}=Z(!0,s,o);if(f)return void eK(r,n,f,{flushSync:i});let p=eA(u,d),g=new m(e.unstable_getContext?await e.unstable_getContext():void 0),b=!0===(o&&o.preventScrollReset);h&&eT(h.formMethod)?await eH(r,n,d,p,u,g,c.active,i,b,h):(eu.set(r,{routeId:n,path:d}),await eW(r,n,d,p,u,g,c.active,i,b,h))},revalidate:function(){let e,t,r;eg||(eg={promise:r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(e){}},t=async e=>{a(e);try{await r}catch(e){}}}),resolve:e,reject:t}),eJ(),ew({revalidation:”loading”});let n=eg.promise;return”submitting”===A.navigation.state||(“idle”===A.navigation.state?eO(A.historyAction,A.location,{startUninterruptedRevalidation:!0}):eO(j||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:!0===z})),n},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eX,deleteFetcher:function(e){let t=(ec.get(e)||0)-1;t<=0?(ec.delete(e),ed.add(e)):ec.set(e,t),ew({fetchers:new Map(A.fetchers)})},dispose:function(){S&&S(),F&&F(),L.clear(),a&&a.abort(),A.fetchers.forEach((e,t)=>eG(t)),A.blockers.forEach((e,t)=>e4(t))},getBlocker:function(e,t){let r=A.blockers.get(e)||q;return ep.get(e)!==t&&ep.set(e,t),r},deleteBlocker:e4,patchRoutes:function(e,r){let n=null==t;er(e,r,t||y,f,h),n&&(y=[…y],ew({}))},_internalFetchControllers:en,_internalSetRoutes:function(e){t=g(e,h,void 0,f={})}}})({basename:t?.basename,unstable_getContext:t?.unstable_getContext,future:t?.future,history:function(e={}){return function(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s=”POP”,u=null,h=f();function f(){return(i.state||{idx:null}).idx}function m(){s=”POP”;let e=f(),t=null==e?null:e-h;h=e,u&&u({action:s,location:y.location,delta:t})}null==h&&(h=0,i.replaceState({…i.state,idx:h},””));let y={get action(){return s},get location(){return e(a,i)},listen(e){if(u)throw Error(“A history only accepts one active listener”);return a.addEventListener(l,m),u=e,()=>{a.removeEventListener(l,m),u=null}},createHref:e=>t(a,e),createURL:function(e){return p(e)},encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=”PUSH”;let r=d(y.location,e,t);let n=c(r,h=f()+1),l=y.createHref(r);try{i.pushState(n,””,l)}catch(e){if(e instanceof DOMException&&”DataCloneError”===e.name)throw e;a.location.assign(l)}o&&u&&u({action:s,location:y.location,delta:1})},replace:function(e,t){s=”REPLACE”;let r=d(y.location,e,t);let n=c(r,h=f()),a=y.createHref(r);i.replaceState(n,””,a),o&&u&&u({action:s,location:y.location,delta:0})},go:e=>i.go(e)};return y}(function(e,t){let{pathname:r,search:n,hash:a}=e.location;return d(“”,{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||”default”)},function(e,t){return”string”==typeof t?t:h(t)},null,e)}({window:t?.window}),hydrationData:t?.hydrationData||((r=window?.__staticRouterHydrationData)&&r.errors&&(r={…r,errors:function(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&”RouteErrorResponse”===n.__type)r[e]=new z(n.status,n.statusText,n.data,!0===n.internal);else if(n&&”Error”===n.__type){if(n.__subType){let t=window[n.__subType];if(“function”==typeof t)try{let a=new t(n.message);a.stack=””,r[e]=a}catch(e){}}if(null==r[e]){let t=Error(n.message);t.stack=””,r[e]=t}}else r[e]=n;return r}(r.errors)}),r),routes:e,mapRouteProperties:tr,hydrationRouteProperties:tn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}var tO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tA=a.forwardRef(function({onClick:e,discover:t=”render”,prefetch:r=”none”,relative:n,reloadDocument:o,replace:i,state:l,target:c,to:d,preventScrollReset:f,viewTransition:p,…m},y){let v,{basename:g}=a.useContext(eW),w=”string”==typeof d&&tO.test(d),b=!1;if(“string”==typeof d&&w&&(v=d,t$))try{let e=new URL(window.location.href),t=new URL(d.startsWith(“//”)?e.protocol+d:d),r=C(t.pathname,g);t.origin===e.origin&&null!=r?d=r+t.search+t.hash:b=!0}catch(e){u(!1,` contains an invalid URL which will probably break when clicked – please update to a valid URL path.`)}let E=function(e,{relative:t}={}){s(eJ(),”useHref() may be used only in the context of a component.”);let{basename:r,navigator:n}=a.useContext(eW),{hash:o,pathname:i,search:l}=e0(e,{relative:t}),u=i;return”/”!==r&&(u=”/”===i?r:M([r,i])),n.createHref({pathname:u,search:l,hash:o})}(d,{relative:n}),[R,x,S]=function(e,t){let r=a.useContext(tL),[n,o]=a.useState(!1),[i,l]=a.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:h}=t,f=a.useRef(null);a.useEffect(()=>{if(“render”===e&&l(!0),”viewport”===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{l(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(n){let e=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(e)}}},[n]);let p=()=>{o(!0)},m=()=>{o(!1),l(!1)};return r?”intent”!==e?[i,f,{}]:[i,f,{onFocus:tk(s,p),onBlur:tk(u,m),onMouseEnter:tk(c,p),onMouseLeave:tk(d,m),onTouchStart:tk(h,p)}]:[!1,f,{}]}(r,m),L=function(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:l}={}){let s=eG(),u=eV(),c=e0(e,{relative:i});return a.useCallback(a=>{0!==a.button||t&&”_self”!==t||a.metaKey||a.altKey||a.ctrlKey||a.shiftKey||(a.preventDefault(),s(e,{replace:void 0!==r?r:h(u)===h(c),state:n,preventScrollReset:o,relative:i,viewTransition:l}))},[u,s,c,r,n,t,e,o,i,l])}(d,{replace:i,state:l,target:c,preventScrollReset:f,relative:n,viewTransition:p}),P=a.createElement(“a”,{…m,…S,href:v||E,onClick:b||o?e:function(t){e&&e(t),t.defaultPrevented||L(t)},ref:function(…e){return t=>{e.forEach(e=>{“function”==typeof e?e(t):null!=e&&(e.current=t)})}}(y,x),target:c,”data-discover”:w||”render”!==t?void 0:”true”});return R&&!w?a.createElement(a.Fragment,null,P,a.createElement(tD,{page:E})):P});tA.displayName=”Link”;var tj=a.forwardRef(function({“aria-current”:e=”page”,caseSensitive:t=!1,className:r=””,end:n=!1,style:o,to:i,viewTransition:l,children:u,…c},d){let h,f=e0(i,{relative:c.relative}),p=eV(),m=a.useContext(eF),{navigator:y,basename:v}=a.useContext(eW),g=null!=m&&function(e,t={}){let r=a.useContext(eI);s(null!=r,”`useViewTransitionState` must be used within `react-router-dom`’s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?”);let{basename:n}=tU(“useViewTransitionState”),o=e0(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=C(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=C(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=S(o.pathname,l)||null!=S(o.pathname,i)}(f)&&!0===l,w=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,b=p.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),E=E?E.toLowerCase():null,w=w.toLowerCase()),E&&v&&(E=C(E,v)||E);let R=”/”!==w&&w.endsWith(“/”)?w.length-1:w.length,x=b===w||!n&&b.startsWith(w)&&”/”===b.charAt(R),L=null!=E&&(E===w||!n&&E.startsWith(w)&&”/”===E.charAt(w.length)),P={isActive:x,isPending:L,isTransitioning:g},k=x?e:void 0;h=”function”==typeof r?r(P):[r,x?”active”:null,L?”pending”:null,g?”transitioning”:null].filter(Boolean).join(” “);let D=”function”==typeof o?o(P):o;return a.createElement(tA,{…c,”aria-current”:k,className:h,ref:d,style:D,to:i,viewTransition:l},”function”==typeof u?u(P):u)});function tN({getKey:e,storageKey:t,…r}){let n=a.useContext(tL),{basename:o}=a.useContext(eW),i=eV(),l=e7();!function({getKey:e,storageKey:t}={}){let r,{router:n}=tU(“useScrollRestoration”),{restoreScrollPosition:o,preventScrollReset:i}=(s(r=a.useContext(eF),tz(“useScrollRestoration”)),r),{basename:l}=a.useContext(eW),c=eV(),d=e7(),h=e5(“useNavigation”).navigation;a.useEffect(()=>(window.history.scrollRestoration=”manual”,()=>{window.history.scrollRestoration=”auto”}),[]),function(e,t){let{capture:r}={};a.useEffect(()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener(“pagehide”,e,t),()=>{window.removeEventListener(“pagehide”,e,t)}},[e,r])}(a.useCallback(()=>{“idle”===h.state&&(tH[tW(c,d,l,e)]=window.scrollY);try{sessionStorage.setItem(t||tI,JSON.stringify(tH))}catch(e){u(!1,`Failed to save scroll positions in sessionStorage, will not work properly (${e}).`)}window.history.scrollRestoration=”auto”},[h.state,e,l,c,d,t])),”undefined”!=typeof document&&(a.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||tI);e&&(tH=JSON.parse(e))}catch(e){}},[t]),a.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(tH,()=>window.scrollY,e?(t,r)=>tW(t,r,l,e):void 0);return()=>t&&t()},[n,l,e]),a.useLayoutEffect(()=>{if(!1!==o){if(“number”==typeof o)return void window.scrollTo(0,o);if(c.hash){let e=document.getElementById(decodeURIComponent(c.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==i&&window.scrollTo(0,0)}},[c,o,i]))}({getKey:e,storageKey:t});let c=a.useMemo(()=>{if(!n||!e)return null;let t=tW(i,l,o,e);return t!==i.key?t:null},[]);if(!n||n.isSpaMode)return null;let d=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},””)}try{let r=JSON.parse(sessionStorage.getItem(e)||”{}”)[t||window.history.state.key];”number”==typeof r&&window.scrollTo(0,r)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return a.createElement(“script”,{…r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${d})(${JSON.stringify(t||tI)}, ${JSON.stringify(c)})`}})}function tz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tU(e){let t=a.useContext(e_);return s(t,tz(e)),t}function t_(e){u(“undefined”!=typeof URLSearchParams,”You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.”);let t=a.useRef(tf(e)),r=a.useRef(!1),n=eV(),o=a.useMemo(()=>{var e,a;let o;return e=n.search,a=r.current?null:t.current,o=tf(e),a&&a.forEach((e,t)=>{o.has(t)||a.getAll(t).forEach(e=>{o.append(t,e)})}),o},[n.search]),i=eG(),l=a.useCallback((e,t)=>{let n=tf(“function”==typeof e?e(o):e);r.current=!0,i(“?”+n,t)},[i,o]);return[o,l]}tj.displayName=”NavLink”,a.forwardRef(({discover:e=”render”,fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:l=tc,action:u,onSubmit:c,relative:d,preventScrollReset:f,viewTransition:p,…m},y)=>{let v=function(){let{router:e}=tU(“useSubmit”),{basename:t}=a.useContext(eW),r=e8(“useRouteId”);return a.useCallback(async(n,a={})=>{let{action:o,method:i,encType:l,formData:s,body:u}=function(e,t){let r,n,a,o,i;if(th(e)&&”form”===e.tagName.toLowerCase()){let i=e.getAttribute(“action”);n=i?C(i,t):null,r=e.getAttribute(“method”)||tc,a=ty(e.getAttribute(“enctype”))||td,o=new FormData(e)}else if(th(e)&&”button”===e.tagName.toLowerCase()||th(e)&&”input”===e.tagName.toLowerCase()&&(“submit”===e.type||”image”===e.type)){let i=e.form;if(null==i)throw Error(‘Cannot submit a