tocco-widget-bundle 3.13.116 → 3.13.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,4 +52,4 @@ const{entries:r,setPrototypeOf:o,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescr
52
52
  * LICENSE.md file in the root directory of this source tree.
53
53
  *
54
54
  * @license MIT
55
- */function u(e={}){return g((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=h(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),f("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:m(t))}),(function(e,t){d("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function l(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function f(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?h(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function m({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function g(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",u=null,l=d();function d(){return(a.state||{idx:null}).idx}function m(){s="POP";let e=d(),t=null==e?null:e-l;l=e,u&&u({action:s,location:g.location,delta:t})}function h(e){return y(e)}null==l&&(l=0,a.replaceState({...a.state,idx:l},""));let g={get action(){return s},get location(){return e(o,a)},listen(e){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(c,m),u=e,()=>{o.removeEventListener(c,m),u=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=f(g.location,e,t);n&&n(r,e),l=d()+1;let c=p(r,l),m=g.createHref(r);try{a.pushState(c,"",m)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(m)}i&&u&&u({action:s,location:g.location,delta:1})},replace:function(e,t){s="REPLACE";let r=f(g.location,e,t);n&&n(r,e),l=d();let o=p(r,l),c=g.createHref(r);a.replaceState(o,"",c),i&&u&&u({action:s,location:g.location,delta:0})},go:e=>a.go(e)};return g}function y(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),l(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:m(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function v(e){return{defaultValue:e}}var b=class{constructor(e){var t,n,r;if(t=this,n=o,r=new Map,n.has(t)?a("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),e)for(let[t,n]of e)this.set(t,n)}get(e){if(s(this,o).has(e))return s(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){s(this,o).set(e,t)}};o=new WeakMap;var w=new Set(["lazy","caseSensitive","path","id","index","children"]);var x=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function O(e,t,n=[],r={},o=!1){return e.map(((e,i)=>{let a=[...n,String(i)],s="string"==typeof e.id?e.id:a.join("-");if(l(!0!==e.index||!e.children,"Cannot specify children on an index route"),l(o||!r[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 n={...e,id:s};return r[s]=A(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=A(n,t(n)),e.children&&(n.children=O(e.children,t,a,r,o)),n}}))}function A(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function k(e,t,n="/"){return S(e,t,n,!1)}function S(e,t,n,r){let o=B(("string"==typeof t?h(t):t).pathname||"/",n);if(null==o)return null;let i=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=W(o);a=L(i[e],t,r)}return a}function j(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function E(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,s)=>{let c={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&a)return;l(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let u=J([r,c.relativePath]),d=n.concat(c);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 "${u}".`),E(e.children,t,d,u,a)),(null!=e.path||e.index)&&t.push({path:u,score:N(u,e.index),routesMeta:d})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of P(e.path))i(e,t,!0,n);else i(e,t)})),t}function P(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=P(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var T=/^:[\w-]+$/,D=3,_=2,C=1,M=10,I=-2,R=e=>"*"===e;function N(e,t){let n=e.split("/"),r=n.length;return n.some(R)&&(r+=I),t&&(r+=_),n.filter((e=>!R(e))).reduce(((e,t)=>e+(T.test(t)?D:""===t?C:M)),r)}function L(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,u="/"===i?t:t.slice(i.length)||"/",l=F({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},u),d=s.route;if(!l&&c&&n&&!r[r.length-1].route.index&&(l=F({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},u)),!l)return null;Object.assign(o,l.params),a.push({params:o,pathname:J([i,l.pathname]),pathnameBase:K(J([i,l.pathnameBase])),route:d}),"/"!==l.pathnameBase&&(i=J([i,l.pathnameBase]))}return a}function F(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=H(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=s[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function H(e,t=!1,n=!0){d("*"===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 r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"))).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function W(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return d(!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}}function B(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var z=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Y=e=>z.test(e);function V(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function U(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function q(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function G(e){let t=q(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function $(e,t,n,r=!1){let o;"string"==typeof e?o=h(e):(o={...e},l(!o.pathname||!o.pathname.includes("?"),U("?","pathname","search",o)),l(!o.pathname||!o.pathname.includes("#"),U("#","pathname","hash",o)),l(!o.search||!o.search.includes("#"),U("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?h(e):e;if(r)if(Y(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),d(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?V(r.substring(1),"/"):V(r,t)}else n=t;return{pathname:n,search:Q(o),hash:X(i)}}(o,i),u=s&&"/"!==s&&s.endsWith("/"),p=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!p||(c.pathname+="/"),c}var J=e=>e.join("/").replace(/\/\/+/g,"/"),K=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",X=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Z=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ee(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function te(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ne="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function re(e,t){let n=e;if("string"!=typeof n||!z.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(ne)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=B(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}var oe=Symbol("Uninstrumented");function ie(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach((e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}})));let r={};if("function"==typeof t.lazy&&n.lazy.length>0){let e=ae(n.lazy,t.lazy,(()=>{}));e&&(r.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach((t=>{let o=e[t],i=n[`lazy.${t}`];if("function"==typeof o&&i.length>0){let e=ae(i,o,(()=>{}));e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}}))}return["loader","action"].forEach((e=>{let o=t[e];if("function"==typeof o&&n[e].length>0){let t=o[oe]??o,i=ae(n[e],t,((...e)=>ce(e[0])));i&&("loader"===e&&!0===t.hydrate&&(i.hydrate=!0),i[oe]=t,r[e]=i)}})),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map((e=>{let t=e[oe]??e,r=ae(n.middleware,t,((...e)=>ce(e[0])));return r?(r[oe]=t,r):e}))),r}function ae(e,t,n){return 0===e.length?null:async(...r)=>{let o=await se(e,n(...r),(()=>t(...r)),e.length-1);if("error"===o.type)throw o.value;return o.value}}async function se(e,t,n,r){let o,i=e[r];if(i){let a,s=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=se(e,t,n,r-1),o=await a,l(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await i(s,t)}catch(e){console.error("An instrumentation function threw an error:",e)}a||await s(),await a}else try{let e=await n();o={type:"success",value:e}}catch(e){o={type:"error",value:e}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ce(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:le(t),params:{...r},unstable_pattern:o,context:de(n)}}function ue(e,t){return{currentUrl:m(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function le(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function de(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===pe}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var pe=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fe=["POST","PUT","PATCH","DELETE"],me=new Set(fe),he=["GET",...fe],ge=new Set(he),ye=new Set([301,302,303,307,308]),ve=new Set([307,308]),be={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},we={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Oe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ae="remix-router-transitions",ke=Symbol("ResetLoaderData");function Se(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;l(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Oe,i=o;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;i=e=>({...o(e),...ie(t.map((e=>e.route)).filter(Boolean),e)})}let a,s={},c=O(e.routes,i,void 0,s),u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let p,h,g=e.dataStrategy||Fe,v={...e.future},w=null,x=new Set,A=null,E=null,P=null,T=null!=e.hydrationData,D=k(c,e.history.location,u),_=!1,C=null;if(null!=D||e.patchRoutesOnNavigation){if(D&&!e.hydrationData){Ye(D,c,e.history.location.pathname).active&&(D=null)}if(D)if(D.some((e=>e.route.lazy)))p=!1;else if(D.some((e=>Te(e.route)))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=D.findIndex((e=>void 0!==n[e.route.id]));p=D.slice(0,e+1).every((e=>!De(e.route,t,n)))}else p=D.every((e=>!De(e.route,t,n)))}else p=!0;else{p=!1,D=[];let t=Ye(null,c,e.history.location.pathname);t.active&&t.matches&&(_=!0,D=t.matches)}}else{let t=it(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=ot(c);p=!0,D=n,C={[r.id]:t}}let M,I,R={historyAction:e.history.action,location:e.history.location,matches:D,initialized:p,navigation:be,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||C,fetchers:new Map,blockers:new Map},N="POP",L=null,F=!1,H=!1,W=new Map,z=null,V=!1,U=!1,q=new Set,G=new Map,$=0,J=-1,K=new Map,Q=new Set,X=new Map,Z=new Map,te=new Set,ne=new Map,re=null;function se(e,t={}){e.matches&&(e.matches=e.matches.map((e=>{let t=s[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}))),R={...R,...e};let n=[],r=[];R.fetchers.forEach(((e,t)=>{"idle"===e.state&&(te.has(t)?n.push(t):r.push(t))})),te.forEach((e=>{R.fetchers.has(e)||G.has(e)||n.push(e)})),[...x].forEach((r=>r(R,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>Se(e))),r.forEach((e=>R.fetchers.delete(e)))}function ce(t,n,{flushSync:r}={}){let o,i=null!=R.actionData&&null!=R.navigation.formMethod&&vt(R.navigation.formMethod)&&"loading"===R.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?R.actionData:null;let s=n.loaderData?tt(R.loaderData,n.loaderData,n.matches||[],n.errors):R.loaderData,u=R.blockers;u.size>0&&(u=new Map(u),u.forEach(((e,t)=>u.set(t,xe))));let l,d=!V&&ze(t,n.matches||R.matches),p=!0===F||null!=R.navigation.formMethod&&vt(R.navigation.formMethod)&&!0!==t.state?._isRedirect;if(a&&(c=a,a=void 0),V||"POP"===N||("PUSH"===N?e.history.push(t,t.state):"REPLACE"===N&&e.history.replace(t,t.state)),"POP"===N){let e=W.get(R.location.pathname);e&&e.has(t.pathname)?l={currentLocation:R.location,nextLocation:t}:W.has(t.pathname)&&(l={currentLocation:t,nextLocation:R.location})}else if(H){let e=W.get(R.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),W.set(R.location.pathname,e)),l={currentLocation:R.location,nextLocation:t}}se({...n,actionData:o,loaderData:s,historyAction:N,location:t,initialized:!0,navigation:be,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:p,blockers:u},{viewTransitionOpts:l,flushSync:!0===r}),N="POP",F=!1,H=!1,V=!1,U=!1,L?.resolve(),L=null,re?.resolve(),re=null}async function le(t,n,o){M&&M.abort(),M=null,N=t,V=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(A&&P){let n=Be(e,t);A[n]=P()}}(R.location,R.matches),F=!0===(o&&o.preventScrollReset),H=!0===(o&&o.enableViewTransition);let l=a||c,d=o&&o.overrideNavigation,p=o?.initialHydration&&R.matches&&R.matches.length>0&&!_?R.matches:k(l,n,u),f=!0===(o&&o.flushSync);if(p&&R.initialized&&!U&&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}(R.location,n)&&!(o&&o.submission&&vt(o.submission.formMethod)))return void ce(n,{matches:p},{flushSync:f});let m=Ye(p,l,n.pathname);if(m.active&&m.matches&&(p=m.matches),!p){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return void ce(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}M=new AbortController;let h,g=Ke(e.history,n,M.signal,o&&o.submission),y=e.getContext?await e.getContext():new b;if(o&&o.pendingError)h=[rt(p).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&vt(o.submission.formMethod)){let t=await async function(t,n,o,a,l,d,p,f={}){he();let m,h=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,o);if(se({navigation:h},{flushSync:!0===f.flushSync}),d){let e=await qe(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=ot(c);return{matches:t,pendingActionResult:[n.id,{type:"error",error:e.error}]}}let t=rt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:r}=We(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:t}]}}a=e.matches}let g=wt(a,n);if(g.route.action||g.route.lazy){let e=Ve(i,s,t,a,g,p?[]:r,l),n=await fe(t,e,l,null);if(m=n[g.route.id],!m)for(let e of a)if(n[e.route.id]){m=n[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else m={type:"error",error:it(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};if(ft(m)){let n;if(f&&null!=f.replace)n=f.replace;else{n=Je(m.response.headers.get("Location"),new URL(t.url),u,e.history)===R.location.pathname+R.location.search}return await pe(t,m,!0,{submission:o,replace:n}),{shortCircuited:!0}}if(pt(m)){let e=rt(a,g.route.id);return!0!==(f&&f.replace)&&(N="PUSH"),{matches:a,pendingActionResult:[e.route.id,m,g.route.id]}}return{matches:a,pendingActionResult:[g.route.id,m]}}(g,n,o.submission,p,y,m.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(pt(r)&&ee(r.error)&&404===r.error.status)return M=null,void ce(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,h=t.pendingActionResult,d=Ot(n,o.submission),f=!1,m.active=!1,g=Ke(e.history,g.url,g.signal)}let{shortCircuited:v,matches:w,loaderData:x,errors:O}=await async function(t,n,o,l,d,p,f,m,h,g,y,v,b){let w=p||Ot(n,f),x=f||m||xt(w),O=!V&&!g;if(d){if(O){let e=de(v);se({navigation:w,...void 0!==e?{actionData:e}:{}},{flushSync:y})}let e=await qe(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=ot(c);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=rt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let A=a||c,{dsMatches:k,revalidatingFetchers:S}=Pe(t,l,i,s,e.history,R,o,x,n,g?[]:r,!0===g,U,q,te,X,Q,A,u,null!=e.patchRoutesOnNavigation,v,b);if(J=++$,!e.dataStrategy&&!k.some((e=>e.shouldLoad))&&!k.some((e=>e.route.middleware&&e.route.middleware.length>0))&&0===S.length){let e=Ie();return ce(n,{matches:o,loaderData:{},errors:v&&pt(v[1])?{[v[0]]:v[1].error}:null,...nt(v),...e?{fetchers:new Map(R.fetchers)}:{}},{flushSync:y}),{shortCircuited:!0}}if(O){let e={};if(!d){e.navigation=w;let t=de(v);void 0!==t&&(e.actionData=t)}S.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=R.fetchers.get(e.key),n=At(void 0,t?t.data:void 0);R.fetchers.set(e.key,n)})),new Map(R.fetchers)}(S)),se(e,{flushSync:y})}S.forEach((e=>{_e(e.key),e.controller&&G.set(e.key,e.controller)}));let j=()=>S.forEach((e=>_e(e.key)));M&&M.signal.addEventListener("abort",j);let{loaderResults:E,fetcherResults:P}=await me(k,S,t,l);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",j);S.forEach((e=>G.delete(e.key)));let T=at(E);if(T)return await pe(t,T.result,!0,{replace:h}),{shortCircuited:!0};if(T=at(P),T)return Q.add(T.key),await pe(t,T.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:D,errors:_}=et(R,o,E,v,S,P);g&&R.errors&&(_={...R.errors,..._});let C=Ie(),I=Re(J),N=C||I||S.length>0;return{matches:o,loaderData:D,errors:_,...N?{fetchers:new Map(R.fetchers)}:{}}}(g,n,p,y,m.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,f,h,o&&o.callSiteDefaultShouldRevalidate);v||(M=null,ce(n,{matches:w||p,...nt(h),loaderData:x,errors:O}))}function de(e){return e&&!pt(e[1])?{[e[0]]:e[1].data}:R.actionData?0===Object.keys(R.actionData).length?null:R.actionData:void 0}async function pe(r,o,i,{submission:a,fetcherSubmission:s,preventScrollReset:c,replace:d}={}){i||(L?.resolve(),L=null),o.response.headers.has("X-Remix-Revalidate")&&(U=!0);let p=o.response.headers.get("Location");l(p,"Expected a Location header on the redirect Response"),p=Je(p,new URL(r.url),u,e.history);let m=f(R.location,p,{_isRedirect:!0});if(n){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(Y(p)){const n=y(p,!0);e=n.origin!==t.location.origin||null==B(n.pathname,u)}if(e)return void(d?t.location.replace(p):t.location.assign(p))}M=null;let h=!0===d||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:g,formAction:v,formEncType:b}=R.navigation;!a&&!s&&g&&v&&b&&(a=xt(R.navigation));let w=a||s;if(ve.has(o.response.status)&&w&&vt(w.formMethod))await le(h,m,{submission:{...w,formAction:p},preventScrollReset:c||F,enableViewTransition:i?H:void 0});else{let e=Ot(m,a);await le(h,m,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:c||F,enableViewTransition:i?H:void 0})}}async function fe(e,t,n,r){let o,i={};try{o=await Ue(g,e,t,r,n,!1)}catch(e){return t.filter((e=>e.shouldLoad)).forEach((t=>{i[t.route.id]={type:"error",error:e}})),i}if(e.signal.aborted)return i;if(!vt(e.method))for(let e of t){if("error"===o[e.route.id]?.type)break;o.hasOwnProperty(e.route.id)||R.loaderData.hasOwnProperty(e.route.id)||R.errors&&R.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(o[e.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(o))if(dt(r)){let o=r.result;i[n]={type:"redirect",response:$e(o,e,n,t,u)}}else i[n]=await Ge(r);return i}async function me(e,t,n,r){let o=fe(n,e,r,null),i=Promise.all(t.map((async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await fe(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:it(404,{pathname:e.path})}})})));return{loaderResults:await o,fetcherResults:(await i).reduce(((e,t)=>Object.assign(e,t)),{})}}function he(){U=!0,X.forEach(((e,t)=>{G.has(t)&&q.add(t),_e(t)}))}function ge(e,t,n={}){R.fetchers.set(e,t),se({fetchers:new Map(R.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ye(e,t,n,r={}){let o=rt(R.matches,t);Se(e),se({errors:{[o.route.id]:n},fetchers:new Map(R.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function ke(e){return Z.set(e,(Z.get(e)||0)+1),te.has(e)&&te.delete(e),R.fetchers.get(e)||we}function Se(e){let t=R.fetchers.get(e);!G.has(e)||t&&"loading"===t.state&&K.has(e)||_e(e),X.delete(e),K.delete(e),Q.delete(e),te.delete(e),q.delete(e),R.fetchers.delete(e)}function _e(e,t){let n=G.get(e);n&&(n.abort(t),G.delete(e))}function Me(e){for(let t of e){let e=kt(ke(t).data);R.fetchers.set(t,e)}}function Ie(){let e=[],t=!1;for(let n of Q){let r=R.fetchers.get(n);l(r,`Expected fetcher: ${n}`),"loading"===r.state&&(Q.delete(n),e.push(n),t=!0)}return Me(e),t}function Re(e){let t=[];for(let[n,r]of K)if(r<e){let e=R.fetchers.get(n);l(e,`Expected fetcher: ${n}`),"loading"===e.state&&(_e(n),K.delete(n),t.push(n))}return Me(t),t.length>0}function Ne(e){R.blockers.delete(e),ne.delete(e)}function Le(e,t){let n=R.blockers.get(e)||xe;l("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(R.blockers);r.set(e,t),se({blockers:r})}function He({currentLocation:e,nextLocation:t,historyAction:n}){if(0===ne.size)return;ne.size>1&&d(!1,"A router only supports one blocker at a time");let r=Array.from(ne.entries()),[o,i]=r[r.length-1],a=R.blockers.get(o);return a&&"proceeding"===a.state?void 0:i({currentLocation:e,nextLocation:t,historyAction:n})?o:void 0}function We(e){let t=it(404,{pathname:e}),n=a||c,{matches:r,route:o}=ot(n);return{notFoundMatches:r,route:o,error:t}}function Be(e,t){if(E){return E(e,t.map((e=>j(e,R.loaderData))))||e.key}return e.key}function ze(e,t){if(A){let n=Be(e,t),r=A[n];if("number"==typeof r)return r}return null}function Ye(t,n,r){if(e.patchRoutesOnNavigation){if(!t){return{active:!0,matches:S(n,r,u,!0)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:S(n,r,u,!0)}}}return{active:!1,matches:null}}async function qe(t,n,r,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let l=t;for(;;){let t=null==a,d=a||c,p=s;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:o,patch:(e,t)=>{r.aborted||Ce(e,t,d,p,i,!1)}})}catch(e){return{type:"error",error:e,partialMatches:l}}finally{t&&!r.aborted&&(c=[...c])}if(r.aborted)return{type:"aborted"};let f=k(d,n,u),m=null;if(f){if(0===Object.keys(f[0].params).length)return{type:"success",matches:f};if(m=S(d,n,u,!0),!(m&&l.length<m.length&&Qe(l,m.slice(0,l.length))))return{type:"success",matches:f}}if(m||(m=S(d,n,u,!0)),!m||Qe(l,m))return{type:"success",matches:null};l=m}}function Qe(e,t){return e.length===t.length&&e.every(((e,n)=>e.route.id===t[n].route.id))}return h={get basename(){return u},get future(){return v},get state(){return R},get routes(){return c},get window(){return t},initialize:function(){if(w=e.history.listen((({action:t,location:n,delta:r})=>{if(I)return I(),void(I=void 0);d(0===ne.size||null!=r,"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 o=He({currentLocation:R.location,nextLocation:n,historyAction:t});if(o&&null!=r){let t=new Promise((e=>{I=e}));return e.history.go(-1*r),Le(o,{state:"blocked",location:n,proceed(){Le(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(r)))},reset(){let e=new Map(R.blockers);e.set(o,xe),se({blockers:e})}}),L?.resolve(),void(L=null)}return le(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(Ae);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,W);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ae,JSON.stringify(n))}catch(e){d(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,W);t.addEventListener("pagehide",e),z=()=>t.removeEventListener("pagehide",e)}return R.initialized||le("POP",R.location,{initialHydration:!0}),h},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,n){if(A=e,P=t,E=n||null,!T&&R.navigation===be){T=!0;let e=ze(R.location,R.matches);null!=e&&se({restoreScrollPosition:e})}return()=>{A=null,P=null,E=null}},navigate:async function t(n,r){if(L?.resolve(),L=null,"number"==typeof n){L||(L=St());let t=L.promise;return e.history.go(n),t}let o=je(R.location,R.matches,u,n,r?.fromRouteId,r?.relative),{path:i,submission:a,error:s}=Ee(!1,o,r),c=R.location,l=f(R.location,i,r&&r.state);l={...l,...e.history.encodeLocation(l)};let d=r&&null!=r.replace?r.replace:void 0,p="PUSH";!0===d?p="REPLACE":!1===d||null!=a&&vt(a.formMethod)&&a.formAction===R.location.pathname+R.location.search&&(p="REPLACE");let m=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),g=He({currentLocation:c,nextLocation:l,historyAction:p});g?Le(g,{state:"blocked",location:l,proceed(){Le(g,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),t(n,r)},reset(){let e=new Map(R.blockers);e.set(g,xe),se({blockers:e})}}):await le(p,l,{submission:a,pendingError:s,preventScrollReset:m,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:r&&r.unstable_defaultShouldRevalidate})},fetch:async function(t,n,o,d){_e(t);let p=!0===(d&&d.flushSync),f=a||c,m=je(R.location,R.matches,u,o,n,d?.relative),h=k(f,m,u),g=Ye(h,f,m);if(g.active&&g.matches&&(h=g.matches),!h)return void ye(t,n,it(404,{pathname:m}),{flushSync:p});let{path:y,submission:v,error:w}=Ee(!0,m,d);if(w)return void ye(t,n,w,{flushSync:p});let x=e.getContext?await e.getContext():new b,O=!0===(d&&d.preventScrollReset);v&&vt(v.formMethod)?await async function(t,n,o,d,p,f,m,h,g,y){he(),X.delete(t);let v=R.fetchers.get(t);ge(t,function(e,t){let n={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};return n}(g,v),{flushSync:m});let b=new AbortController,w=Ke(e.history,o,b.signal,g);if(f){let e=await qe(d,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ye(t,n,e.error,{flushSync:m});if(!e.matches)return void ye(t,n,it(404,{pathname:o}),{flushSync:m});d=e.matches}let x=wt(d,o);if(!x.route.action&&!x.route.lazy){let e=it(405,{method:g.formMethod,pathname:o,routeId:n});return void ye(t,n,e,{flushSync:m})}G.set(t,b);let O=$,A=Ve(i,s,w,d,x,r,p),S=await fe(w,A,p,t),j=S[x.route.id];if(!j)for(let e of A)if(S[e.route.id]){j=S[e.route.id];break}if(w.signal.aborted)return void(G.get(t)===b&&G.delete(t));if(te.has(t)){if(ft(j)||pt(j))return void ge(t,kt(void 0))}else{if(ft(j))return G.delete(t),J>O?void ge(t,kt(void 0)):(Q.add(t),ge(t,At(g)),pe(w,j,!1,{fetcherSubmission:g,preventScrollReset:h}));if(pt(j))return void ye(t,n,j.error)}let E=R.navigation.location||R.location,P=Ke(e.history,E,b.signal),T=a||c,D="idle"!==R.navigation.state?k(T,R.navigation.location,u):R.matches;l(D,"Didn't find any matches after fetcher action");let _=++$;K.set(t,_);let C=At(g,j.data);R.fetchers.set(t,C);let{dsMatches:I,revalidatingFetchers:L}=Pe(P,p,i,s,e.history,R,D,g,E,r,!1,U,q,te,X,Q,T,u,null!=e.patchRoutesOnNavigation,[x.route.id,j],y);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=R.fetchers.get(t),r=At(void 0,n?n.data:void 0);R.fetchers.set(t,r),_e(t),e.controller&&G.set(t,e.controller)})),se({fetchers:new Map(R.fetchers)});let F=()=>L.forEach((e=>_e(e.key)));b.signal.addEventListener("abort",F);let{loaderResults:H,fetcherResults:W}=await me(I,L,P,p);if(b.signal.aborted)return;if(b.signal.removeEventListener("abort",F),K.delete(t),G.delete(t),L.forEach((e=>G.delete(e.key))),R.fetchers.has(t)){let e=kt(j.data);R.fetchers.set(t,e)}let B=at(H);if(B)return pe(P,B.result,!1,{preventScrollReset:h});if(B=at(W),B)return Q.add(B.key),pe(P,B.result,!1,{preventScrollReset:h});let{loaderData:z,errors:Y}=et(R,D,H,void 0,L,W);Re(_),"loading"===R.navigation.state&&_>J?(l(N,"Expected pending action"),M&&M.abort(),ce(R.navigation.location,{matches:D,loaderData:z,errors:Y,fetchers:new Map(R.fetchers)})):(se({errors:Y,loaderData:tt(R.loaderData,z,D,Y),fetchers:new Map(R.fetchers)}),U=!1)}(t,n,y,h,x,g.active,p,O,v,d&&d.unstable_defaultShouldRevalidate):(X.set(t,{routeId:n,path:y}),await async function(t,n,o,a,c,u,l,d,p){let f=R.fetchers.get(t);ge(t,At(p,f?f.data:void 0),{flushSync:l});let m=new AbortController,h=Ke(e.history,o,m.signal);if(u){let e=await qe(a,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ye(t,n,e.error,{flushSync:l});if(!e.matches)return void ye(t,n,it(404,{pathname:o}),{flushSync:l});a=e.matches}let g=wt(a,o);G.set(t,m);let y=$,v=Ve(i,s,h,a,g,r,c),b=await fe(h,v,c,t),w=b[g.route.id];G.get(t)===m&&G.delete(t);if(h.signal.aborted)return;if(te.has(t))return void ge(t,kt(void 0));if(ft(w))return J>y?void ge(t,kt(void 0)):(Q.add(t),void await pe(h,w,!1,{preventScrollReset:d}));if(pt(w))return void ye(t,n,w.error);ge(t,kt(w.data))}(t,n,y,h,x,g.active,p,O,v))},revalidate:function(){re||(re=St()),he(),se({revalidation:"loading"});let e=re.promise;return"submitting"===R.navigation.state?e:"idle"===R.navigation.state?(le(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),e):(le(N||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:!0===H}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ke,resetFetcher:function(e,t){_e(e,t?.reason),ge(e,kt(null))},deleteFetcher:function(e){let t=(Z.get(e)||0)-1;t<=0?(Z.delete(e),te.add(e)):Z.set(e,t),se({fetchers:new Map(R.fetchers)})},dispose:function(){w&&w(),z&&z(),x.clear(),M&&M.abort(),R.fetchers.forEach(((e,t)=>Se(t))),R.blockers.forEach(((e,t)=>Ne(t)))},getBlocker:function(e,t){let n=R.blockers.get(e)||xe;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Ne,patchRoutes:function(e,t,n=!1){let r=null==a;Ce(e,t,a||c,s,i,n),r&&(c=[...c],se({}))},_internalFetchControllers:G,_internalSetRoutes:function(e){s={},a=O(e,i,void 0,s)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){se(e)}},e.unstable_instrumentations&&(h=function(e,t){let n={navigate:[],fetch:[]};if(t.forEach((e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}}))),n.navigate.length>0){let t=e.navigate[oe]??e.navigate,r=ae(n.navigate,t,((...t)=>{let[n,r]=t;return{to:"number"==typeof n||"string"==typeof n?n:n?m(n):".",...ue(e,r??{})}}));r&&(r[oe]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[oe]??e.fetch,r=ae(n.fetch,t,((...t)=>{let[n,,r,o]=t;return{href:r??".",fetcherKey:n,...ue(e,o??{})}}));r&&(r[oe]=t,e.fetch=r)}return e}(h,e.unstable_instrumentations.map((e=>e.router)).filter(Boolean))),h}function je(e,t,n,r,o,i){let a,s;if(o){a=[];for(let e of t)if(a.push(e),e.route.id===o){s=e;break}}else a=t,s=t[t.length-1];let c=$(r||".",G(a),B(e.pathname,n)||e.pathname,"path"===i);if(null==r&&(c.search=e.search,c.hash=e.hash),(null==r||""===r||"."===r)&&s){let e=bt(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();c.search=n?`?${n}`:""}}return"/"!==n&&(c.pathname=function({basename:e,pathname:t}){return"/"===t?e:J([e,t])}({basename:n,pathname:c.pathname})),m(c)}function Ee(e,t,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:t};if(n.formMethod&&!yt(n.formMethod))return{path:t,error:it(405,{method:n.formMethod})};let r,o,i=()=>({path:t,error:it(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),s=st(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!vt(a))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,n])=>`${e}${t}=${n}\n`),""):String(n.body);return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!vt(a))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:s,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)r=Qe(n.formData),o=n.formData;else if(n.body instanceof FormData)r=Qe(n.body),o=n.body;else if(n.body instanceof URLSearchParams)r=n.body,o=Xe(r);else if(null==n.body)r=new URLSearchParams,o=new FormData;else try{r=new URLSearchParams(n.body),o=Xe(r)}catch(e){return i()}let c={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(vt(c.formMethod))return{path:t,submission:c};let u=h(t);return e&&u.search&&bt(u.search)&&r.append("index",""),u.search=`?${r}`,{path:m(u),submission:c}}function Pe(e,t,n,r,o,i,a,s,c,u,l,d,p,f,m,h,g,y,v,b,w){let x,O=b?pt(b[1])?b[1].error:b[1].data:void 0,A=o.createURL(i.location),S=o.createURL(c);if(l&&i.errors){let e=Object.keys(i.errors)[0];x=a.findIndex((t=>t.route.id===e))}else if(b&&pt(b[1])){let e=b[0];x=a.findIndex((t=>t.route.id===e))-1}let j=b?b[1].statusCode:void 0,E=j&&j>=400,P={currentUrl:A,currentParams:i.matches[0]?.params||{},nextUrl:S,nextParams:a[0].params,...s,actionResult:O,actionStatus:j},T=te(a),D=a.map(((o,a)=>{let{route:s}=o,c=null;if(null!=x&&a>x?c=!1:s.lazy?c=!0:Te(s)?l?c=De(s,i.loaderData,i.errors):function(e,t,n){let r=!t||n.route.id!==t.route.id,o=!e.hasOwnProperty(n.route.id);return r||o}(i.loaderData,i.matches[a],o)&&(c=!0):c=!1,null!==c)return Ye(n,r,e,T,o,u,t,c);let p=!1;"boolean"==typeof w?p=w:E?p=!1:(d||A.pathname+A.search===S.pathname+S.search||A.search!==S.search||function(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}(i.matches[a],o))&&(p=!0);let f={...P,defaultShouldRevalidate:p},m=_e(o,f);return Ye(n,r,e,T,o,u,t,m,f,w)})),_=[];return m.forEach(((e,s)=>{if(l||!a.some((t=>t.route.id===e.routeId))||f.has(s))return;let c=i.fetchers.get(s),m=c&&"idle"!==c.state&&void 0===c.data,b=k(g,e.path,y);if(!b){if(v&&m)return;return void _.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(h.has(s))return;let x=wt(b,e.path),O=new AbortController,A=Ke(o,e.path,O.signal),S=null;if(p.has(s))p.delete(s),S=Ve(n,r,A,b,x,u,t);else if(m)d&&(S=Ve(n,r,A,b,x,u,t));else{let e;e="boolean"==typeof w?w:!E&&d;let o={...P,defaultShouldRevalidate:e};_e(x,o)&&(S=Ve(n,r,A,b,x,u,t,o))}S&&_.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:x,request:A,controller:O})})),{dsMatches:D,revalidatingFetchers:_}}function Te(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function De(e,t,n){if(e.lazy)return!0;if(!Te(e))return!1;let r=null!=t&&e.id in t,o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function _e(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Ce(e,t,n,r,o,i){let a;if(e){let t=r[e];l(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),a=t.children}else a=n;let s=[],c=[];if(t.forEach((e=>{let t=a.find((t=>Me(e,t)));t?c.push({existingRoute:t,newRoute:e}):s.push(e)})),s.length>0){let t=O(s,o,[e||"_","patch",String(a?.length||"0")],r);a.push(...t)}if(i&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[i]=O([n],o,[],{},!0);Object.assign(r,{element:i.element?i.element:r.element,errorElement:i.errorElement?i.errorElement:r.errorElement,hydrateFallbackElement:i.hydrateFallbackElement?i.hydrateFallbackElement:r.hydrateFallbackElement})}}function Me(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>t.children?.some((t=>Me(e,t))))))}var Ie=new WeakMap,Re=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(l(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let i=o.lazy[e];if(!i)return;let a=Ie.get(o);a||(a={},Ie.set(o,a));let s=a[e];if(s)return s;let c=(async()=>{let t=function(e){return w.has(e)}(e),n=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)d(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(n)d(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await i();null!=t&&(Object.assign(o,{[e]:t}),Object.assign(o,r(o)))}"object"==typeof o.lazy&&(o.lazy[e]=void 0,Object.values(o.lazy).every((e=>void 0===e))&&(o.lazy=void 0))})();return a[e]=c,c},Ne=new WeakMap;async function Le(e){let t=e.matches.filter((e=>e.shouldLoad)),n={};return(await Promise.all(t.map((e=>e.resolve())))).forEach(((e,r)=>{n[t[r].route.id]=e})),n}async function Fe(e){return e.matches.some((e=>e.route.middleware))?He(e,(()=>Le(e))):Le(e)}function He(e,t){return We(e,t,(e=>{if(gt(e))throw e;return e}),ut,(function(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:"error",result:t}}));{let{matches:r}=e,o=Math.min(Math.max(r.findIndex((e=>e.route.id===n)),0),Math.max(r.findIndex((e=>e.shouldCallHandler())),0)),i=rt(r,r[o].route.id).route.id;return Promise.resolve({[i]:{type:"error",result:t}})}}))}async function We(e,t,n,r,o){let{matches:i,request:a,params:s,context:c,unstable_pattern:u}=e,l=i.flatMap((e=>e.route.middleware?e.route.middleware.map((t=>[e.route.id,t])):[]));return await Be({request:a,params:s,context:c,unstable_pattern:u},l,t,n,r,o)}async function Be(e,t,n,r,o,i,a=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let c=t[a];if(!c){return await n()}let u,[l,d]=c,p=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let s=await Be(e,t,n,r,o,i,a+1);return u={value:s},u.value}catch(e){return u={value:await i(e,l,u)},u.value}};try{let t=await d(e,p),n=null!=t?r(t):void 0;return o(n)?n:u?n??u.value:(u={value:await p()},u.value)}catch(e){return await i(e,l,u)}}function ze(e,t,n,r,o){let i=Re({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=function(e,t,n,r,o){let i=n[e.id];if(l(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=Ne.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{l("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(void 0===r)continue;let a=(o=e,x.has(o)),s=void 0!==i[e]&&"hasErrorBoundary"!==e;a?d(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):s?d(!s,`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.`):n[e]=r}var o;Object.assign(i,n),Object.assign(i,{...r(i),lazy:void 0})})();return Ne.set(i,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let a,s=Object.keys(e.lazy),c=[];for(let i of s){if(o&&o.includes(i))continue;let s=Re({key:i,route:e,manifest:n,mapRouteProperties:r});s&&(c.push(s),i===t&&(a=s))}let u=c.length>0?Promise.all(c).then((()=>{})):void 0;return u?.catch((()=>{})),a?.catch((()=>{})),{lazyRoutePromise:u,lazyHandlerPromise:a}}(r.route,vt(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function Ye(e,t,n,r,o,i,a,s,c=null,u){let l=!1,d=ze(e,t,n,o,i);return{...o,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:c,shouldCallHandler:e=>(l=!0,c?_e(o,"boolean"==typeof u?{...c,defaultShouldRevalidate:u}:"boolean"==typeof e?{...c,defaultShouldRevalidate:e}:c):s),resolve(e){let{lazy:t,loader:i,middleware:c}=o.route,u=l||s||e&&!vt(n.method)&&(t||i),p=c&&c.length>0&&!i&&!t;return!u||!vt(n.method)&&p?Promise.resolve({type:"data",result:void 0}):async function({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let s,c,u=vt(e.method),l=u?"action":"loader",d=r=>{let o,s=new Promise(((e,t)=>o=t));c=()=>o(),e.signal.addEventListener("abort",c);let u=o=>"function"!=typeof r?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${l}" [routeId: ${n.route.id}]`)):r({request:e,unstable_pattern:t,params:n.params,context:a},...void 0!==o?[o]:[]),d=(async()=>{try{return{type:"data",result:await(i?i((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([d,s])};try{let t=u?n.route.action:n.route.loader;if(r||o)if(t){let e,[n]=await Promise.all([d(t).catch((t=>{e=t})),r,o]);if(void 0!==e)throw e;s=n}else{await r;let t=u?n.route.action:n.route.loader;if(!t){if("action"===l){let t=new URL(e.url),r=t.pathname+t.search;throw it(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[s]=await Promise.all([d(t),o])}else{if(!t){let t=new URL(e.url);throw it(404,{pathname:t.pathname+t.search})}s=await d(t)}}catch(e){return{type:"error",result:e}}finally{c&&e.signal.removeEventListener("abort",c)}return s}({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:a})}}}function Ve(e,t,n,r,o,i,a,s=null){return r.map((c=>c.route.id!==o.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:ze(e,t,n,c,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ye(e,t,n,te(r),c,i,a,!0,s)))}async function Ue(e,t,n,r,o,i){n.some((e=>e._lazyPromises?.middleware))&&await Promise.all(n.map((e=>e._lazyPromises?.middleware)));let a={request:t,unstable_pattern:te(n),params:n[0].params,context:o,matches:n},s=i?()=>{throw new Error("You cannot call `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=>{let t=a;return He(t,(()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},c=await e({...a,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return c}async function qe(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}async function Ge(e){let{result:t,type:n}=e;if(ht(t)){let e;try{e=await qe(t)}catch(e){return{type:"error",error:e}}return"error"===n?{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}}return"error"===n?mt(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:ct(t),statusCode:ee(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ee(t)?t.status:void 0}:mt(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 $e(e,t,n,r,o){let i=e.headers.get("Location");if(l(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Y(i)){let a=r.slice(0,r.findIndex((e=>e.route.id===n))+1);i=je(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function Je(e,t,n,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Y(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r);if(o.includes(i.protocol))throw new Error("Invalid redirect location");let a=null!=B(i.pathname,n);if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}try{let t=r.createURL(e);if(o.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function Ke(e,t,n,r){let o=e.createURL(st(t)).toString(),i={signal:n};if(r&&vt(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Qe(r.formData):i.body=r.formData}return new Request(o,i)}function Qe(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function Xe(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ze(e,t,n,r=!1,o=!1){let i,a={},s=null,c=!1,u={},d=n&&pt(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let p=n.route.id,f=t[p];if(l(!ft(f),"Cannot handle redirect results in processLoaderData"),pt(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},o)s[p]=t;else{let n=rt(e,p);null==s[n.route.id]&&(s[n.route.id]=t)}r||(a[p]=ke),c||(c=!0,i=ee(f.error)?f.error.status:500),f.headers&&(u[p]=f.headers)}else a[p]=f.data,f.statusCode&&200!==f.statusCode&&!c&&(i=f.statusCode),f.headers&&(u[p]=f.headers)})),void 0!==d&&n&&(s={[n[0]]:d},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:u}}function et(e,t,n,r,o,i){let{loaderData:a,errors:s}=Ze(t,n,r);return o.filter((e=>!e.matches||e.matches.some((e=>e.shouldLoad)))).forEach((t=>{let{key:n,match:r,controller:o}=t;if(o&&o.signal.aborted)return;let a=i[n];if(l(a,"Did not find corresponding fetcher result"),pt(a)){let t=rt(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:a.error}),e.fetchers.delete(n)}else if(ft(a))l(!1,"Unhandled fetcher revalidation redirect");else{let t=kt(a.data);e.fetchers.set(n,t)}})),{loaderData:a,errors:s}}function tt(e,t,n,r){let o=Object.entries(t).filter((([,e])=>e!==ke)).reduce(((e,[t,n])=>(e[t]=n,e)),{});for(let i of n){let n=i.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&i.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function nt(e){return e?pt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function rt(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 ot(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 it(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(a="Forbidden",s=`Route "${n}" does not match URL "${t}"`):404===e?(a="Not Found",s=`No route matches URL "${t}"`):405===e&&(a="Method Not Allowed",r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Z(e||500,a,new Error(s),!0)}function at(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(ft(r))return{key:n,result:r}}}function st(e){return m({..."string"==typeof e?h(e):e,hash:""})}function ct(e){return new Z(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ut(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&lt(t)))}function lt(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function dt(e){return ht(e.result)&&ye.has(e.result.status)}function pt(e){return"error"===e.type}function ft(e){return"redirect"===(e&&e.type)}function mt(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ht(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function gt(e){return ht(e)&&(t=e.status,ye.has(t))&&e.headers.has("Location");var t}function yt(e){return ge.has(e.toUpperCase())}function vt(e){return me.has(e.toUpperCase())}function bt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function wt(e,t){let n="string"==typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&bt(n||""))return e[e.length-1];let r=q(e);return r[r.length-1]}function xt(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function Ot(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 At(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}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function kt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function St(){let e,t,n=new Promise(((r,o)=>{e=async e=>{r(e);try{await n}catch(e){}},t=async e=>{o(e);try{await n}catch(e){}}}));return{promise:n,resolve:e,reject:t}}var jt=i.createContext(null);jt.displayName="DataRouter";var Et=i.createContext(null);Et.displayName="DataRouterState";var Pt=i.createContext(!1);function Tt(){return i.useContext(Pt)}var Dt=i.createContext({isTransitioning:!1});Dt.displayName="ViewTransition";var _t=i.createContext(new Map);_t.displayName="Fetchers";var Ct=i.createContext(null);Ct.displayName="Await";var Mt=i.createContext(null);Mt.displayName="Navigation";var It=i.createContext(null);It.displayName="Location";var Rt=i.createContext({outlet:null,matches:[],isDataRoute:!1});Rt.displayName="Route";var Nt=i.createContext(null);Nt.displayName="RouteError";var Lt=!0,Ft="REACT_ROUTER_ERROR",Ht="REDIRECT";function Wt(){return null!=i.useContext(It)}function Bt(){return l(Wt(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(It).location}var zt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yt(e){i.useContext(Mt).static||i.useLayoutEffect(e)}function Vt(){let{isDataRoute:e}=i.useContext(Rt);return e?function(){let{router:e}=nn("useNavigate"),t=on("useNavigate"),n=i.useRef(!1);return Yt((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{d(n.current,zt),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){l(Wt(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(jt),{basename:t,navigator:n}=i.useContext(Mt),{matches:r}=i.useContext(Rt),{pathname:o}=Bt(),a=JSON.stringify(G(r)),s=i.useRef(!1);return Yt((()=>{s.current=!0})),i.useCallback(((r,i={})=>{if(d(s.current,zt),!s.current)return;if("number"==typeof r)return void n.go(r);let c=$(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:J([t,c.pathname])),(i.replace?n.replace:n.push)(c,i.state,i)}),[t,n,a,o,e])}()}i.createContext(null);function Ut(){let{matches:e}=i.useContext(Rt),t=e[e.length-1];return t?t.params:{}}function qt(e,{relative:t}={}){let{matches:n}=i.useContext(Rt),{pathname:r}=Bt(),o=JSON.stringify(G(n));return i.useMemo((()=>$(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function Gt(e,t,n,r,o){l(Wt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(Mt),{matches:s}=i.useContext(Rt),c=s[s.length-1],u=c?c.params:{},p=c?c.pathname:"/",f=c?c.pathnameBase:"/",m=c&&c.route;if(Lt){let e=m&&m.path||"";ln(p,!m||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) 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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let g,y=Bt();if(t){let e="string"==typeof t?h(t):t;l("/"===f||e.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` 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 "${f}" but pathname "${e.pathname}" was given in the \`location\` prop.`),g=e}else g=y;let v=g.pathname||"/",b=v;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=k(e,{pathname:b});Lt&&(d(m||null!=w,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),d(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let x=en(w&&w.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:J([f,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:J([f,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])}))),s,n,r,o);return t&&x?i.createElement(It.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},x):x}function $t(){let e=an(),t=ee(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return Lt&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route."))),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,s)}var Jt=i.createElement($t,null),Kt=class extends i.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){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Ft}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new Z(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i.createElement(Rt.Provider,{value:this.props.routeContext},i.createElement(Nt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(Xt,{error:e},t):t}};Kt.contextType=Pt;var Qt=new WeakMap;function Xt({children:e,error:t}){let{basename:n}=i.useContext(Mt);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Ft}:${Ht}:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=Qt.get(t);if(r)throw r;let o=re(e.location,n);if(ne&&!Qt.get(t)){if(!o.isExternal&&!e.reloadDocument){const n=Promise.resolve().then((()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace})));throw Qt.set(t,n),n}window.location.href=o.absoluteURL||o.to}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Zt({routeContext:e,match:t,children:n}){let r=i.useContext(jt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(Rt.Provider,{value:e},n)}function en(e,t=[],n=null,r=null,o=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,s=n?.errors;if(null!=s){let e=a.findIndex((e=>e.route.id&&void 0!==s?.[e.route.id]));l(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){c=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}let d=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:te(n.matches),errorInfo:t})}:void 0;return a.reduceRight(((e,r,o)=>{let l,p=!1,f=null,m=null;n&&(l=s&&r.route.id?s[r.route.id]:void 0,f=r.route.errorElement||Jt,c&&(u<0&&0===o?(ln("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):u===o&&(p=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=l?f:p?m:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(Zt,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(Kt,{location:n.location,revalidation:n.revalidation,component:f,error:l,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()}),null)}function tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nn(e){let t=i.useContext(jt);return l(t,tn(e)),t}function rn(e){let t=i.useContext(Et);return l(t,tn(e)),t}function on(e){let t=function(e){let t=i.useContext(Rt);return l(t,tn(e)),t}(e),n=t.matches[t.matches.length-1];return l(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function an(){let e=i.useContext(Nt),t=rn("useRouteError"),n=on("useRouteError");return void 0!==e?e:t.errors?.[n]}var sn=0;function cn(e){let{router:t,basename:n}=nn("useBlocker"),r=rn("useBlocker"),[o,a]=i.useState(""),s=i.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:o,historyAction:i}=t;return e({currentLocation:{...r,pathname:B(r.pathname,n)||r.pathname},nextLocation:{...o,pathname:B(o.pathname,n)||o.pathname},historyAction:i})}),[n,e]);return i.useEffect((()=>{let e=String(++sn);return a(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,s)}),[t,o,s]),o&&r.blockers.has(o)?r.blockers.get(o):xe}var un={};function ln(e,t,n){t||un[e]||(un[e]=!0,d(!1,n))}var dn={};function pn(e,t){e||dn[t]||(dn[t]=!0,console.warn(t))}var fn=(r||(r=n.t(i,2))).useOptimistic,mn=()=>{};function hn(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(Lt&&e.element&&d(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:i.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(Lt&&e.hydrateFallbackElement&&d(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(Lt&&e.errorElement&&d(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var gn=["HydrateFallback","hydrateFallbackElement"];var yn=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 vn({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){let o=Tt();r=o||r;let[a,s]=i.useState(e.state),[c,u]=(l=a,fn?fn(l):[l,mn]);var l;let[d,p]=i.useState(),[f,m]=i.useState({isTransitioning:!1}),[h,g]=i.useState(),[y,v]=i.useState(),[b,w]=i.useState(),x=i.useRef(new Map),O=i.useCallback(((o,{deletedFetchers:a,newErrors:c,flushSync:l,viewTransitionOpts:d})=>{c&&n&&Object.values(c).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},unstable_pattern:te(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)})),a.forEach((e=>x.current.delete(e))),pn(!1===l||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` 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 f=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(pn(null==d||f,"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."),d&&f){if(t&&l){t((()=>{y&&(h?.resolve(),y.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>s(o)))}));return n.finished.finally((()=>{t((()=>{g(void 0),v(void 0),p(void 0),m({isTransitioning:!1})}))})),void t((()=>v(n)))}y?(h?.resolve(),y.skipTransition(),w({state:o,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(p(o),m({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&l?t((()=>s(o))):!1===r?s(o):i.startTransition((()=>{!0===r&&u((e=>bn(e,o))),s(o)}))}),[e.window,t,y,h,r,u,n]);i.useLayoutEffect((()=>e.subscribe(O)),[e,O]),i.useEffect((()=>{f.isTransitioning&&!f.flushSync&&g(new yn)}),[f]),i.useEffect((()=>{if(h&&d&&e.window){let t=d,n=h.promise,o=e.window.document.startViewTransition((async()=>{!1===r?s(t):i.startTransition((()=>{!0===r&&u((e=>bn(e,t))),s(t)})),await n}));o.finished.finally((()=>{g(void 0),v(void 0),p(void 0),m({isTransitioning:!1})})),v(o)}}),[d,h,e.window,r,u]),i.useEffect((()=>{h&&d&&c.location.key===d.location.key&&h.resolve()}),[h,y,c.location,d]),i.useEffect((()=>{!f.isTransitioning&&b&&(p(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))}),[f.isTransitioning,b]);let A=i.useMemo((()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})})),[e]),k=e.basename||"/",S=i.useMemo((()=>({router:e,navigator:A,static:!1,basename:k,onError:n})),[e,A,k,n]);return i.createElement(i.Fragment,null,i.createElement(jt.Provider,{value:S},i.createElement(Et.Provider,{value:c},i.createElement(_t.Provider,{value:x.current},i.createElement(Dt.Provider,{value:f},i.createElement(An,{basename:k,location:c.location,navigationType:c.historyAction,navigator:A,unstable_useTransitions:r},i.createElement(wn,{routes:e.routes,future:e.future,state:c,onError:n})))))),null)}function bn(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var wn=i.memo((function({routes:e,future:t,state:n,onError:r}){return Gt(e,void 0,n,r,t)}));function xn({to:e,replace:t,state:n,relative:r}){l(Wt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(Mt);d(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=i.useContext(Rt),{pathname:s}=Bt(),c=Vt(),u=$(e,G(a),s,"path"===r),p=JSON.stringify(u);return i.useEffect((()=>{c(JSON.parse(p),{replace:t,state:n,relative:r})}),[c,p,r,t,n]),null}function On(e){l(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function An({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:s}){l(!Wt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=i.useMemo((()=>({basename:c,navigator:o,static:a,unstable_useTransitions:s,future:{}})),[c,o,a,s]);"string"==typeof n&&(n=h(n));let{pathname:p="/",search:f="",hash:m="",state:g=null,key:y="default"}=n,v=i.useMemo((()=>{let e=B(p,c);return null==e?null:{location:{pathname:e,search:f,hash:m,state:g,key:y},navigationType:r}}),[c,p,f,m,g,y,r]);return d(null!=v,`<Router basename="${c}"> is not able to match the URL "${p}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),null==v?null:i.createElement(Mt.Provider,{value:u},i.createElement(It.Provider,{children:t,value:v}))}function kn({children:e,location:t}){return Gt(Sn(e),t)}i.Component;function Sn(e,t=[]){let n=[];return i.Children.forEach(e,((e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,Sn(e.props.children,o));l(e.type===On,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),l(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Sn(e.props.children,o)),n.push(a)})),n}var jn="get",En="application/x-www-form-urlencoded";function Pn(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Tn=null;var Dn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _n(e){return null==e||Dn.has(e)?e:(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${En}"`),null)}function Cn(e,t){let n,r,o,i,a;if(function(e){return Pn(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?B(a,t):null,n=e.getAttribute("method")||jn,o=_n(e.getAttribute("enctype"))||En,i=new FormData(e)}else if(function(e){return Pn(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Pn(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?B(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||jn,o=_n(e.getAttribute("formenctype"))||_n(a.getAttribute("enctype"))||En,i=new FormData(a,e),!function(){if(null===Tn)try{new FormData(document.createElement("form"),0),Tn=!1}catch(e){Tn=!0}return Tn}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(Pn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=jn,r=null,o=En,a=e}return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;function Mn(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function In(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===B(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function Rn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}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 Nn(e){return null!=e&&"string"==typeof e.page}function Ln(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)}function Fn(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function Hn(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function Wn(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Nn(o)&&"script"===o.as&&o.href&&r.has(o.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(i)||(n.add(i),e.push({key:i,link:o})),e}),[])}function Bn(e,t){return"lazy"===e.mode&&!0===t}function zn(){let e=i.useContext(jt);return Mn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Yn(){let e=i.useContext(Et);return Mn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Vn=i.createContext(void 0);function Un(){let e=i.useContext(Vn);return Mn(e,"You must render this element inside a <HydratedRouter> element"),e}function qn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Gn(e,t,n){if(n&&!Qn)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}Vn.displayName="FrameworkContext";function $n({page:e,...t}){let{router:n}=zn(),r=i.useMemo((()=>k(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(Kn,{page:e,matches:r,...t}):null}function Jn(e){let{manifest:t,routeModules:n}=Un(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return async function(e,t,n){return Wn((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await Rn(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Ln).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(e,t,n).then((e=>{r||o(e)})),()=>{r=!0}}),[e,t,n]),r}function Kn({page:e,matches:t,...n}){let r=Bt(),{future:o,manifest:a,routeModules:s}=Un(),{basename:c}=zn(),{loaderData:u,matches:l}=Yn(),d=i.useMemo((()=>Fn(e,t,l,a,r,"data")),[e,t,l,a,r]),p=i.useMemo((()=>Fn(e,t,l,a,r,"assets")),[e,t,l,a,r]),f=i.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach((e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some((t=>t.route.id===e.route.id))&&e.route.id in u&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let l=In(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return i&&n.size>0&&l.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[l.pathname+l.search]}),[c,o.unstable_trailingSlashAwareDataRequests,u,r,a,d,t,e,s]),m=i.useMemo((()=>Hn(p,a)),[p,a]),h=Jn(p);return i.createElement(i.Fragment,null,f.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),m.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),h.map((({key:e,link:t})=>i.createElement("link",{key:e,nonce:n.nonce,...t}))))}var Qn=!1;function Xn(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:a,ssr:s}=Un(),{router:c,static:u,staticContext:l}=zn(),{matches:d}=Yn(),p=Tt(),f=Bn(a,s);o&&(o.didRenderScripts=!0);let m=Gn(d,null,r);i.useEffect((()=>{!0}),[]);let h=i.useMemo((()=>{if(p)return null;let r=l?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=u?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${f?"":`import ${JSON.stringify(t.url)}`};\n${m.map(((e,n)=>{let r=`route${n}`,o=t.routes[e.route.id];Mn(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:s,hydrateFallbackModule:c,module:u}=o,l=[...i?[{module:i,varName:`${r}_clientAction`}]:[],...a?[{module:a,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:u,varName:`${r}_main`}];return 1===l.length?`import * as ${r} from ${JSON.stringify(u)};`:[l.map((e=>`import * as ${e.varName} from "${e.module}";`)).join("\n"),`const ${r} = {${l.map((e=>`...${e.varName}`)).join(",")}};`].join("\n")})).join("\n")}\n ${f?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},n){let r=new Set(n.state.matches.map((e=>e.route.id))),o=n.state.location.pathname.split("/").filter(Boolean),i=["/"];for(o.pop();o.length>0;)i.push(`/${o.join("/")}`),o.pop();i.forEach((e=>{let t=k(n.routes,e,n.basename);t&&t.forEach((e=>r.add(e.route.id)))}));let a=[...r].reduce(((e,n)=>Object.assign(e,{[n]:t.routes[n]})),{});return{...t,routes:a,sri:!!e||void 0}}(t,c),null,2)};`:""}\n window.__reactRouterRouteModules = {${m.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return i.createElement(i.Fragment,null,i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:"module",async:!0}))}),[]),g=Qn||p?[]:function(e){return[...new Set(e)]}(t.entry.imports.concat(Hn(m,t,{includeHydrateFallback:!0}))),y="object"==typeof t.sri?t.sri:{};return pn(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Qn||p?null:i.createElement(i.Fragment,null,"object"==typeof t.sri?i.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:y})}}):null,f?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:y[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:y[t.entry.module],suppressHydrationWarning:!0}),g.map((t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:y[t],suppressHydrationWarning:!0}))),h)}function Zn(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}i.Component;function er({error:e,isOutsideRemixApp:t}){console.error(e);let n,r=i.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(ee(e))return i.createElement(tr,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),Lt?r:null);if(e instanceof Error)e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);new Error(t)}return i.createElement(tr,{title:"Application Error!",isOutsideRemixApp:t},i.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),i.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function tr({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Un();return o.root?.Layout&&!n?r:i.createElement("html",{lang:"en"},i.createElement("head",null,i.createElement("meta",{charSet:"utf-8"}),i.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),i.createElement("title",null,e)),i.createElement("body",null,i.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?i.createElement(Xn,null):null)))}var nr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{nr&&(window.__reactRouterVersion="7.12.0")}catch(e){}function rr(e,t){return Se({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:u({window:t?.window}),hydrationData:t?.hydrationData||or(),routes:e,mapRouteProperties:hn,hydrationRouteProperties:gn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function or(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:ir(e.errors)}),e}function ir(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new Z(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let o=new t(r.message);o.stack="",n[e]=o}catch(e){}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}var ar=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sr=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:s,target:c,to:u,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:f,...h},g){let{basename:y,unstable_useTransitions:v}=i.useContext(Mt),b="string"==typeof u&&ar.test(u),w=re(u,y),x=function(e,{relative:t}={}){l(Wt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(Mt),{hash:o,pathname:a,search:s}=qt(e,{relative:t}),c=a;return"/"!==n&&(c="/"===a?n:J([n,a])),r.createHref({pathname:c,search:s,hash:o})}(u=w.to,{relative:r}),[O,A,k]=function(e,t){let n=i.useContext(Vn),[r,o]=i.useState(!1),[a,s]=i.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:l,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let m=()=>{o(!0)},h=()=>{o(!1),s(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:qn(c,m),onBlur:qn(u,h),onMouseEnter:qn(l,m),onMouseLeave:qn(d,h),onTouchStart:qn(p,m)}]:[!1,f,{}]}(n,h),S=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:u}={}){let l=Vt(),d=Bt(),p=qt(e,{relative:a});return i.useCallback((f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==n?n:m(d)===m(p),h=()=>l(e,{replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c});u?i.startTransition((()=>h())):h()}}),[d,l,p,n,r,t,e,o,a,s,c,u])}(u,{replace:a,state:s,target:c,preventScrollReset:d,relative:r,viewTransition:p,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});let j=i.createElement("a",{...h,...k,href:w.absoluteURL||x,onClick:w.isExternal||o?e:function(t){e&&e(t),t.defaultPrevented||S(t)},ref:Zn(g,A),target:c,"data-discover":b||"render"!==t?void 0:"true"});return O&&!b?i.createElement(i.Fragment,null,j,i.createElement($n,{page:x})):j}));sr.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:s,children:c,...u},d){let p=qt(a,{relative:u.relative}),f=Bt(),m=i.useContext(Et),{navigator:h,basename:g}=i.useContext(Mt),y=null!=m&&function(e,{relative:t}={}){let n=i.useContext(Dt);l(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=lr("useViewTransitionState"),o=qt(e,{relative:t});if(!n.isTransitioning)return!1;let a=B(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=B(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=F(o.pathname,s)||null!=F(o.pathname,a)}(p)&&!0===s,v=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&g&&(w=B(w,g)||w);const x="/"!==v&&v.endsWith("/")?v.length-1:v.length;let O,A=b===v||!r&&b.startsWith(v)&&"/"===b.charAt(x),k=null!=w&&(w===v||!r&&w.startsWith(v)&&"/"===w.charAt(v.length)),S={isActive:A,isPending:k,isTransitioning:y},j=A?e:void 0;O="function"==typeof n?n(S):[n,A?"active":null,k?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(S):o;return i.createElement(sr,{...u,"aria-current":j,className:O,ref:d,style:E,to:a,viewTransition:s},"function"==typeof c?c(S):c)})).displayName="NavLink";var cr=i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:s=jn,action:c,onSubmit:u,relative:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h,...g},y)=>{let{unstable_useTransitions:v}=i.useContext(Mt),b=fr(),w=function(e,{relative:t}={}){let{basename:n}=i.useContext(Mt),r=i.useContext(Rt);l(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...qt(e||".",{relative:t})},s=Bt();if(null==e){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:J([n,a.pathname]));return m(a)}(c,{relative:d}),x="get"===s.toLowerCase()?"get":"post",O="string"==typeof c&&ar.test(c);return i.createElement("form",{ref:y,method:x,action:w,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute("formmethod")||s,l=()=>b(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:o,state:a,relative:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h});v&&!1!==n?i.startTransition((()=>l())):l()},...g,"data-discover":O||"render"!==e?void 0:"true"})}));function ur(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lr(e){let t=i.useContext(jt);return l(t,ur(e)),t}cr.displayName="Form";var dr=0,pr=()=>`__${String(++dr)}__`;function fr(){let{router:e}=lr("useSubmit"),{basename:t}=i.useContext(Mt),n=on("useRouteId"),r=e.fetch,o=e.navigate;return i.useCallback((async(e,i={})=>{let{action:a,method:s,encType:c,formData:u,body:l}=Cn(e,t);if(!1===i.navigate){let e=i.fetcherKey||pr();await r(e,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||s,formEncType:i.encType||c,flushSync:i.flushSync})}else await o(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||s,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[r,o,t,n])}},52600:(e,t,n)=>{"use strict";n.d(t,{pg:()=>a});var r=n(3433),o=n(4883),i=n(81845);function a(e){return o.createElement(r.pg,{flushSync:i.flushSync,...e})}(0,r.q6)()},77987:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},6695:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},95065:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e){if(Array.isArray(e))return(0,r.A)(e)}},97991:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},24747:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},27887:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{A:()=>o})},6624:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(37444),o=n(89954),i=n(1560);function a(e){var t=(0,o.A)();return function(){var n,o=(0,r.A)(e);if(t){var a=(0,r.A)(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return(0,i.A)(this,n)}}},88097:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>r})},65166:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},37444:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:()=>r})},49523:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(15216);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},89954:(e,t,n)=>{"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{A:()=>r})},62439:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:()=>r})},21648:(e,t,n)=>{"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}n.d(t,{A:()=>r})},37820:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},77969:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},47029:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(88097);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},23715:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8609);function o(e,t){if(null==e)return{};var n,o,i=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},8609:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{A:()=>r})},1560:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65710),o=n(97991);function i(e,t){if(t&&("object"===(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.A)(e)}},15216:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},52167:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6695),o=n(21648),i=n(25134),a=n(37820);function s(e,t){return(0,r.A)(e)||(0,o.A)(e,t)||(0,i.A)(e,t)||(0,a.A)()}},47978:(e,t,n)=>{"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{A:()=>r})},78840:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(95065),o=n(62439),i=n(25134),a=n(77969);function s(e){return(0,r.A)(e)||(0,o.A)(e)||(0,i.A)(e)||(0,a.A)()}},65710:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},25134:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},72367:(e,t,n)=>{"use strict";n.d(t,{B1:()=>r});function r(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}Math.min,Math.max;const o=["top","right","bottom","left"];o.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[])},9725:(e,t,n)=>{"use strict";n.d(t,{ll:()=>w});n(72367);function r(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function o(e){if(null==e)return window;if(!r(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){return o(e).getComputedStyle(e)}function a(e){return r(e)?"":e?(e.nodeName||"").toLowerCase():""}function s(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function c(e){return e instanceof o(e).HTMLElement}function u(e){return e instanceof o(e).Element}function l(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}function d(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=i(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function p(){return!/^((?!chrome|android).)*safari/i.test(s())}function f(e){return["html","body","#document"].includes(a(e))}Math.min,Math.max;const m=Math.round;function h(e,t,n){var r,i,a,s;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let d=1,f=1;t&&c(e)&&(d=e.offsetWidth>0&&m(l.width)/e.offsetWidth||1,f=e.offsetHeight>0&&m(l.height)/e.offsetHeight||1);const h=u(e)?o(e):window,g=!p()&&n,y=(l.left+(g&&null!=(r=null==(i=h.visualViewport)?void 0:i.offsetLeft)?r:0))/d,v=(l.top+(g&&null!=(a=null==(s=h.visualViewport)?void 0:s.offsetTop)?a:0))/f,b=l.width/d,w=l.height/f;return{width:b,height:w,top:v,right:y+b,bottom:v+w,left:y,x:y,y:v}}function g(e){return(t=e,(t instanceof o(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function y(e){if("html"===a(e))return e;const t=e.assignedSlot||e.parentNode||(l(e)?e.host:null)||g(e);return l(t)?t.host:t}function v(e){const t=y(e);return f(t)?e.ownerDocument.body:c(t)&&d(t)?t:v(t)}function b(e,t){var n;void 0===t&&(t=[]);const r=v(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=o(r),s=i?[a].concat(a.visualViewport||[],d(r)?r:[]):r,c=t.concat(s);return i?c:c.concat(b(s))}function w(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,c=o&&!s,l=c||i?[...u(e)?b(e):e.contextElement?b(e.contextElement):[],...b(t)]:[];l.forEach((e=>{c&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let d,p=null;if(a){let r=!0;p=new ResizeObserver((()=>{r||n(),r=!1})),u(e)&&!s&&p.observe(e),u(e)||!e.contextElement||s||p.observe(e.contextElement),p.observe(t)}let f=s?h(e):null;return s&&function t(){const r=h(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{c&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(d)}}},92149:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(4883),o=n(81845),i=n(2418);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const s=["onUpdate","onRepositioned","renderElement","renderElementTag","renderElementTo","renderTarget","className","id","style"];class c extends r.Component{constructor(...e){super(...e),this._targetNode=r.createRef(),this._elementNode=r.createRef(),this._elementParentNode=null,this._tetherInstance=null}componentDidMount(){this._createContainer(),this.forceUpdate()}componentDidUpdate(e){if(e.renderElementTag===this.props.renderElementTag&&e.renderElementTo===this.props.renderElementTo||this._createContainer(),this._elementParentNode&&e.className!==this.props.className){const t=(e.className||"").split(" ").filter((e=>e.length>0)),n=(this.props.className||"").split(" ").filter((e=>e.length>0));this._elementParentNode.classList.remove(...t),this._elementParentNode.classList.add(...n)}this._update()}componentWillUnmount(){this._destroy()}getTetherInstance(){return this._tetherInstance}disable(){var e;null==(e=this._tetherInstance)||e.disable()}enable(){var e;null==(e=this._tetherInstance)||e.enable()}on(e,t,n){this._tetherInstance.on(e,t,n)}once(e,t,n){this._tetherInstance.once(e,t,n)}off(e,t){this._tetherInstance.off(e,t)}position(){var e;null==(e=this._tetherInstance)||e.position()}_runRenders(){let e="function"==typeof this.props.renderTarget?this.props.renderTarget(this._targetNode):null,t="function"==typeof this.props.renderElement?this.props.renderElement(this._elementNode):null;return(0,r.isValidElement)(e)||(e=null),(0,r.isValidElement)(t)||(t=null),{targetComponent:e,elementComponent:t}}_createTetherInstance(e){this._tetherInstance&&this._destroy(),this._tetherInstance=new i(e),this._registerEventListeners()}_destroyTetherInstance(){this._tetherInstance&&(this._tetherInstance.destroy(),this._tetherInstance=null)}_registerEventListeners(){this.on("update",((...e)=>this.props.onUpdate&&this.props.onUpdate.apply(this,e))),this.on("repositioned",((...e)=>this.props.onRepositioned&&this.props.onRepositioned.apply(this,e)))}get _renderNode(){const{renderElementTo:e}=this.props;return"string"==typeof e?document.querySelector(e):e||document.body}_destroy(){this._destroyTetherInstance(),this._removeContainer()}_createContainer(){this._removeContainer();const{renderElementTag:e="div",className:t}=this.props;this._elementParentNode=document.createElement(e),this._elementParentNode.className=t||""}_addContainerToDOM(){this._elementParentNode&&this._renderNode&&this._elementParentNode.parentNode!==this._renderNode&&this._renderNode.append(this._elementParentNode)}_removeContainer(){this._elementParentNode&&this._elementParentNode.parentNode&&this._elementParentNode.remove()}_update(){this._elementNode.current&&this._targetNode.current?this._updateTether():this._destroy()}_updateTether(){var e;const t=this.props,{id:n,style:r}=t,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(t,s),i=a({target:this._targetNode.current,element:this._elementParentNode},o),c=n||"";if(this._elementParentNode&&this._elementParentNode.id!==c&&(this._elementParentNode.id=c),this._elementParentNode&&r){const e=this._elementParentNode.style;for(const t in r)if(e[t]!==r[t]){let n=r[t];n&&(e[t]=n)}}this._addContainerToDOM(),this._tetherInstance?this._tetherInstance.setOptions(i):this._createTetherInstance(i),null==(e=this._tetherInstance)||e.position()}render(){const{targetComponent:e,elementComponent:t}=this._runRenders();return e?r.createElement(r.Fragment,null,e,t&&this._elementParentNode&&o.createPortal(t,this._elementParentNode)):null}}},27346:(e,t,n)=>{"use strict";function r(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}n.d(t,{P:()=>o,Y:()=>i});var o=r(),i=r},14644:(e,t,n)=>{"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{HY:()=>u,Qd:()=>s,Tw:()=>f,Zz:()=>p,ve:()=>m,y$:()=>c,zH:()=>d});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),i=()=>Math.random().toString(36).substring(7).split("").join("."),a={INIT:`@@redux/INIT${i()}`,REPLACE:`@@redux/REPLACE${i()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${i()}`};function s(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function c(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(c)(e,t)}let i=e,u=t,l=new Map,d=l,p=0,f=!1;function m(){d===l&&(d=new Map,l.forEach(((e,t)=>{d.set(t,e)})))}function h(){if(f)throw new Error(r(3));return u}function g(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;m();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,m(),d.delete(n),l=null}}}function y(e){if(!s(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(f)throw new Error(r(9));try{f=!0,u=i(u,e)}finally{f=!1}return(l=d).forEach((e=>{e()})),e}y({type:a.INIT});return{dispatch:y,subscribe:g,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,y({type:a.REPLACE})},[o]:function(){const e=g;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(h())}n();return{unsubscribe:e(n)}},[o](){return this}}}}}function u(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))}))}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1;const s={};for(let i=0;i<o.length;i++){const c=o[i],u=n[c],l=e[c],d=u(l,t);if(void 0===d){t&&t.type;throw new Error(r(14))}s[c]=d,a=a||d!==l}return a=a||o.length!==Object.keys(e).length,a?s:e}}function l(e,t){return function(...n){return t(e.apply(this,n))}}function d(e,t){if("function"==typeof e)return l(e,t);if("object"!=typeof e||null===e)throw new Error(r(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=l(o,t))}return n}function p(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function f(...e){return t=>(n,o)=>{const i=t(n,o);let a=()=>{throw new Error(r(15))};const s={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},c=e.map((e=>e(s)));return a=p(...c)(i.dispatch),{...i,dispatch:a}}}function m(e){return s(e)&&"type"in e&&"string"==typeof e.type}}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,c),n.loaded=!0,n.exports}c.m=a,c.amdD=function(){throw new Error("define cannot be used indirect")},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;"object"==typeof a&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,c.d(o,i),o},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,n)=>(c.f[n](e,t),t)),[])),c.u=e=>"chunk-"+({222:"vendor-libphonenumber-js",262:"html-editor",310:"vendor-fontawesome",556:"docs-actions",672:"phone-formatter",722:"code-editor",916:"vendor-icons"}[e]||e)+"."+{103:"76336c407894aed4f8ef",123:"d007be8cf7ecb64bc442",211:"3440a8cf06d93ddf2a22",222:"80540f07b74d90c7030f",262:"2a1be3529076794f6bbc",264:"d086e7b6f5e07f62a05d",310:"5a9ed8cbebd7b6c77c2c",389:"185e13c535962fcbc2f8",556:"b4fac584233336e71fd4",668:"778bea177c4568925c34",672:"0899eb884a0c573f03ce",722:"e630249c129a300afa42",916:"82f39f1e837cce57e8ad",987:"fc556865780dd6692aeb"}[e]+".js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i="tocco-widget-bundle:",c.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,s;if(void 0!==n)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),s&&document.head.appendChild(a)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.j=205,c.p="/",(()=>{var e={205:0};c.f.j=(t,n)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(n=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,s]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(s)s(c)}for(t&&t(n);u<i.length;u++)o=i[u],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=this.webpackChunktocco_widget_bundle=this.webpackChunktocco_widget_bundle||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),c.nc=void 0;var u={};return(()=>{"use strict";c.r(u),c.d(u,{app:()=>t.yA});var e=c(61402),t=c(16855);e.A.registerAppInRegistry(t.yA.name,t.yA.init)})(),u})()));
55
+ */function u(e={}){return g((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=h(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),f("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:m(t))}),(function(e,t){d("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function l(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function f(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?h(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function m({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function g(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",u=null,l=d();function d(){return(a.state||{idx:null}).idx}function m(){s="POP";let e=d(),t=null==e?null:e-l;l=e,u&&u({action:s,location:g.location,delta:t})}function h(e){return y(e)}null==l&&(l=0,a.replaceState({...a.state,idx:l},""));let g={get action(){return s},get location(){return e(o,a)},listen(e){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(c,m),u=e,()=>{o.removeEventListener(c,m),u=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=f(g.location,e,t);n&&n(r,e),l=d()+1;let c=p(r,l),m=g.createHref(r);try{a.pushState(c,"",m)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(m)}i&&u&&u({action:s,location:g.location,delta:1})},replace:function(e,t){s="REPLACE";let r=f(g.location,e,t);n&&n(r,e),l=d();let o=p(r,l),c=g.createHref(r);a.replaceState(o,"",c),i&&u&&u({action:s,location:g.location,delta:0})},go:e=>a.go(e)};return g}function y(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),l(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:m(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function v(e){return{defaultValue:e}}var b=class{constructor(e){var t,n,r;if(t=this,n=o,r=new Map,n.has(t)?a("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),e)for(let[t,n]of e)this.set(t,n)}get(e){if(s(this,o).has(e))return s(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){s(this,o).set(e,t)}};o=new WeakMap;var w=new Set(["lazy","caseSensitive","path","id","index","children"]);var x=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function O(e,t,n=[],r={},o=!1){return e.map(((e,i)=>{let a=[...n,String(i)],s="string"==typeof e.id?e.id:a.join("-");if(l(!0!==e.index||!e.children,"Cannot specify children on an index route"),l(o||!r[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 n={...e,id:s};return r[s]=A(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=A(n,t(n)),e.children&&(n.children=O(e.children,t,a,r,o)),n}}))}function A(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function k(e,t,n="/"){return S(e,t,n,!1)}function S(e,t,n,r){let o=B(("string"==typeof t?h(t):t).pathname||"/",n);if(null==o)return null;let i=E(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=W(o);a=L(i[e],t,r)}return a}function j(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function E(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,s)=>{let c={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&a)return;l(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let u=J([r,c.relativePath]),d=n.concat(c);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 "${u}".`),E(e.children,t,d,u,a)),(null!=e.path||e.index)&&t.push({path:u,score:N(u,e.index),routesMeta:d})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of P(e.path))i(e,t,!0,n);else i(e,t)})),t}function P(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=P(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var T=/^:[\w-]+$/,D=3,_=2,C=1,M=10,I=-2,R=e=>"*"===e;function N(e,t){let n=e.split("/"),r=n.length;return n.some(R)&&(r+=I),t&&(r+=_),n.filter((e=>!R(e))).reduce(((e,t)=>e+(T.test(t)?D:""===t?C:M)),r)}function L(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,u="/"===i?t:t.slice(i.length)||"/",l=F({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},u),d=s.route;if(!l&&c&&n&&!r[r.length-1].route.index&&(l=F({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},u)),!l)return null;Object.assign(o,l.params),a.push({params:o,pathname:J([i,l.pathname]),pathnameBase:K(J([i,l.pathnameBase])),route:d}),"/"!==l.pathnameBase&&(i=J([i,l.pathnameBase]))}return a}function F(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=H(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=s[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function H(e,t=!1,n=!0){d("*"===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 r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"))).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function W(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return d(!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}}function B(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var z=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Y=e=>z.test(e);function V(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function U(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function q(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function G(e){let t=q(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function $(e,t,n,r=!1){let o;"string"==typeof e?o=h(e):(o={...e},l(!o.pathname||!o.pathname.includes("?"),U("?","pathname","search",o)),l(!o.pathname||!o.pathname.includes("#"),U("#","pathname","hash",o)),l(!o.search||!o.search.includes("#"),U("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?h(e):e;if(r)if(Y(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),d(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?V(r.substring(1),"/"):V(r,t)}else n=t;return{pathname:n,search:Q(o),hash:X(i)}}(o,i),u=s&&"/"!==s&&s.endsWith("/"),p=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!p||(c.pathname+="/"),c}var J=e=>e.join("/").replace(/\/\/+/g,"/"),K=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",X=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Z=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ee(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function te(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ne="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function re(e,t){let n=e;if("string"!=typeof n||!z.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(ne)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=B(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}var oe=Symbol("Uninstrumented");function ie(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach((e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}})));let r={};if("function"==typeof t.lazy&&n.lazy.length>0){let e=ae(n.lazy,t.lazy,(()=>{}));e&&(r.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach((t=>{let o=e[t],i=n[`lazy.${t}`];if("function"==typeof o&&i.length>0){let e=ae(i,o,(()=>{}));e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}}))}return["loader","action"].forEach((e=>{let o=t[e];if("function"==typeof o&&n[e].length>0){let t=o[oe]??o,i=ae(n[e],t,((...e)=>ce(e[0])));i&&("loader"===e&&!0===t.hydrate&&(i.hydrate=!0),i[oe]=t,r[e]=i)}})),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map((e=>{let t=e[oe]??e,r=ae(n.middleware,t,((...e)=>ce(e[0])));return r?(r[oe]=t,r):e}))),r}function ae(e,t,n){return 0===e.length?null:async(...r)=>{let o=await se(e,n(...r),(()=>t(...r)),e.length-1);if("error"===o.type)throw o.value;return o.value}}async function se(e,t,n,r){let o,i=e[r];if(i){let a,s=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=se(e,t,n,r-1),o=await a,l(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await i(s,t)}catch(e){console.error("An instrumentation function threw an error:",e)}a||await s(),await a}else try{let e=await n();o={type:"success",value:e}}catch(e){o={type:"error",value:e}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ce(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:le(t),params:{...r},unstable_pattern:o,context:de(n)}}function ue(e,t){return{currentUrl:m(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function le(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function de(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===pe}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var pe=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fe=["POST","PUT","PATCH","DELETE"],me=new Set(fe),he=["GET",...fe],ge=new Set(he),ye=new Set([301,302,303,307,308]),ve=new Set([307,308]),be={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},we={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Oe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ae="remix-router-transitions",ke=Symbol("ResetLoaderData");function Se(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;l(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Oe,i=o;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;i=e=>({...o(e),...ie(t.map((e=>e.route)).filter(Boolean),e)})}let a,s={},c=O(e.routes,i,void 0,s),u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let p,h,g=e.dataStrategy||Fe,v={...e.future},w=null,x=new Set,A=null,E=null,P=null,T=null!=e.hydrationData,D=k(c,e.history.location,u),_=!1,C=null;if(null!=D||e.patchRoutesOnNavigation){if(D&&!e.hydrationData){Ye(D,c,e.history.location.pathname).active&&(D=null)}if(D)if(D.some((e=>e.route.lazy)))p=!1;else if(D.some((e=>Te(e.route)))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=D.findIndex((e=>void 0!==n[e.route.id]));p=D.slice(0,e+1).every((e=>!De(e.route,t,n)))}else p=D.every((e=>!De(e.route,t,n)))}else p=!0;else{p=!1,D=[];let t=Ye(null,c,e.history.location.pathname);t.active&&t.matches&&(_=!0,D=t.matches)}}else{let t=it(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=ot(c);p=!0,D=n,C={[r.id]:t}}let M,I,R={historyAction:e.history.action,location:e.history.location,matches:D,initialized:p,navigation:be,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||C,fetchers:new Map,blockers:new Map},N="POP",L=null,F=!1,H=!1,W=new Map,z=null,V=!1,U=!1,q=new Set,G=new Map,$=0,J=-1,K=new Map,Q=new Set,X=new Map,Z=new Map,te=new Set,ne=new Map,re=null;function se(e,t={}){e.matches&&(e.matches=e.matches.map((e=>{let t=s[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}))),R={...R,...e};let n=[],r=[];R.fetchers.forEach(((e,t)=>{"idle"===e.state&&(te.has(t)?n.push(t):r.push(t))})),te.forEach((e=>{R.fetchers.has(e)||G.has(e)||n.push(e)})),[...x].forEach((r=>r(R,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>Se(e))),r.forEach((e=>R.fetchers.delete(e)))}function ce(t,n,{flushSync:r}={}){let o,i=null!=R.actionData&&null!=R.navigation.formMethod&&vt(R.navigation.formMethod)&&"loading"===R.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?R.actionData:null;let s=n.loaderData?tt(R.loaderData,n.loaderData,n.matches||[],n.errors):R.loaderData,u=R.blockers;u.size>0&&(u=new Map(u),u.forEach(((e,t)=>u.set(t,xe))));let l,d=!V&&ze(t,n.matches||R.matches),p=!0===F||null!=R.navigation.formMethod&&vt(R.navigation.formMethod)&&!0!==t.state?._isRedirect;if(a&&(c=a,a=void 0),V||"POP"===N||("PUSH"===N?e.history.push(t,t.state):"REPLACE"===N&&e.history.replace(t,t.state)),"POP"===N){let e=W.get(R.location.pathname);e&&e.has(t.pathname)?l={currentLocation:R.location,nextLocation:t}:W.has(t.pathname)&&(l={currentLocation:t,nextLocation:R.location})}else if(H){let e=W.get(R.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),W.set(R.location.pathname,e)),l={currentLocation:R.location,nextLocation:t}}se({...n,actionData:o,loaderData:s,historyAction:N,location:t,initialized:!0,navigation:be,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:p,blockers:u},{viewTransitionOpts:l,flushSync:!0===r}),N="POP",F=!1,H=!1,V=!1,U=!1,L?.resolve(),L=null,re?.resolve(),re=null}async function le(t,n,o){M&&M.abort(),M=null,N=t,V=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(A&&P){let n=Be(e,t);A[n]=P()}}(R.location,R.matches),F=!0===(o&&o.preventScrollReset),H=!0===(o&&o.enableViewTransition);let l=a||c,d=o&&o.overrideNavigation,p=o?.initialHydration&&R.matches&&R.matches.length>0&&!_?R.matches:k(l,n,u),f=!0===(o&&o.flushSync);if(p&&R.initialized&&!U&&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}(R.location,n)&&!(o&&o.submission&&vt(o.submission.formMethod)))return void ce(n,{matches:p},{flushSync:f});let m=Ye(p,l,n.pathname);if(m.active&&m.matches&&(p=m.matches),!p){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return void ce(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}M=new AbortController;let h,g=Ke(e.history,n,M.signal,o&&o.submission),y=e.getContext?await e.getContext():new b;if(o&&o.pendingError)h=[rt(p).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&vt(o.submission.formMethod)){let t=await async function(t,n,o,a,l,d,p,f={}){he();let m,h=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,o);if(se({navigation:h},{flushSync:!0===f.flushSync}),d){let e=await qe(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=ot(c);return{matches:t,pendingActionResult:[n.id,{type:"error",error:e.error}]}}let t=rt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:r}=We(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:t}]}}a=e.matches}let g=wt(a,n);if(g.route.action||g.route.lazy){let e=Ve(i,s,t,a,g,p?[]:r,l),n=await fe(t,e,l,null);if(m=n[g.route.id],!m)for(let e of a)if(n[e.route.id]){m=n[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else m={type:"error",error:it(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};if(ft(m)){let n;if(f&&null!=f.replace)n=f.replace;else{n=Je(m.response.headers.get("Location"),new URL(t.url),u,e.history)===R.location.pathname+R.location.search}return await pe(t,m,!0,{submission:o,replace:n}),{shortCircuited:!0}}if(pt(m)){let e=rt(a,g.route.id);return!0!==(f&&f.replace)&&(N="PUSH"),{matches:a,pendingActionResult:[e.route.id,m,g.route.id]}}return{matches:a,pendingActionResult:[g.route.id,m]}}(g,n,o.submission,p,y,m.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(pt(r)&&ee(r.error)&&404===r.error.status)return M=null,void ce(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,h=t.pendingActionResult,d=Ot(n,o.submission),f=!1,m.active=!1,g=Ke(e.history,g.url,g.signal)}let{shortCircuited:v,matches:w,loaderData:x,errors:O}=await async function(t,n,o,l,d,p,f,m,h,g,y,v,b){let w=p||Ot(n,f),x=f||m||xt(w),O=!V&&!g;if(d){if(O){let e=de(v);se({navigation:w,...void 0!==e?{actionData:e}:{}},{flushSync:y})}let e=await qe(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:n}=ot(c);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=rt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let A=a||c,{dsMatches:k,revalidatingFetchers:S}=Pe(t,l,i,s,e.history,R,o,x,n,g?[]:r,!0===g,U,q,te,X,Q,A,u,null!=e.patchRoutesOnNavigation,v,b);if(J=++$,!e.dataStrategy&&!k.some((e=>e.shouldLoad))&&!k.some((e=>e.route.middleware&&e.route.middleware.length>0))&&0===S.length){let e=Ie();return ce(n,{matches:o,loaderData:{},errors:v&&pt(v[1])?{[v[0]]:v[1].error}:null,...nt(v),...e?{fetchers:new Map(R.fetchers)}:{}},{flushSync:y}),{shortCircuited:!0}}if(O){let e={};if(!d){e.navigation=w;let t=de(v);void 0!==t&&(e.actionData=t)}S.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=R.fetchers.get(e.key),n=At(void 0,t?t.data:void 0);R.fetchers.set(e.key,n)})),new Map(R.fetchers)}(S)),se(e,{flushSync:y})}S.forEach((e=>{_e(e.key),e.controller&&G.set(e.key,e.controller)}));let j=()=>S.forEach((e=>_e(e.key)));M&&M.signal.addEventListener("abort",j);let{loaderResults:E,fetcherResults:P}=await me(k,S,t,l);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",j);S.forEach((e=>G.delete(e.key)));let T=at(E);if(T)return await pe(t,T.result,!0,{replace:h}),{shortCircuited:!0};if(T=at(P),T)return Q.add(T.key),await pe(t,T.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:D,errors:_}=et(R,o,E,v,S,P);g&&R.errors&&(_={...R.errors,..._});let C=Ie(),I=Re(J),N=C||I||S.length>0;return{matches:o,loaderData:D,errors:_,...N?{fetchers:new Map(R.fetchers)}:{}}}(g,n,p,y,m.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,f,h,o&&o.callSiteDefaultShouldRevalidate);v||(M=null,ce(n,{matches:w||p,...nt(h),loaderData:x,errors:O}))}function de(e){return e&&!pt(e[1])?{[e[0]]:e[1].data}:R.actionData?0===Object.keys(R.actionData).length?null:R.actionData:void 0}async function pe(r,o,i,{submission:a,fetcherSubmission:s,preventScrollReset:c,replace:d}={}){i||(L?.resolve(),L=null),o.response.headers.has("X-Remix-Revalidate")&&(U=!0);let p=o.response.headers.get("Location");l(p,"Expected a Location header on the redirect Response"),p=Je(p,new URL(r.url),u,e.history);let m=f(R.location,p,{_isRedirect:!0});if(n){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(Y(p)){const n=y(p,!0);e=n.origin!==t.location.origin||null==B(n.pathname,u)}if(e)return void(d?t.location.replace(p):t.location.assign(p))}M=null;let h=!0===d||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:g,formAction:v,formEncType:b}=R.navigation;!a&&!s&&g&&v&&b&&(a=xt(R.navigation));let w=a||s;if(ve.has(o.response.status)&&w&&vt(w.formMethod))await le(h,m,{submission:{...w,formAction:p},preventScrollReset:c||F,enableViewTransition:i?H:void 0});else{let e=Ot(m,a);await le(h,m,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:c||F,enableViewTransition:i?H:void 0})}}async function fe(e,t,n,r){let o,i={};try{o=await Ue(g,e,t,r,n,!1)}catch(e){return t.filter((e=>e.shouldLoad)).forEach((t=>{i[t.route.id]={type:"error",error:e}})),i}if(e.signal.aborted)return i;if(!vt(e.method))for(let e of t){if("error"===o[e.route.id]?.type)break;o.hasOwnProperty(e.route.id)||R.loaderData.hasOwnProperty(e.route.id)||R.errors&&R.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(o[e.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(o))if(dt(r)){let o=r.result;i[n]={type:"redirect",response:$e(o,e,n,t,u)}}else i[n]=await Ge(r);return i}async function me(e,t,n,r){let o=fe(n,e,r,null),i=Promise.all(t.map((async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await fe(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:it(404,{pathname:e.path})}})})));return{loaderResults:await o,fetcherResults:(await i).reduce(((e,t)=>Object.assign(e,t)),{})}}function he(){U=!0,X.forEach(((e,t)=>{G.has(t)&&q.add(t),_e(t)}))}function ge(e,t,n={}){R.fetchers.set(e,t),se({fetchers:new Map(R.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ye(e,t,n,r={}){let o=rt(R.matches,t);Se(e),se({errors:{[o.route.id]:n},fetchers:new Map(R.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function ke(e){return Z.set(e,(Z.get(e)||0)+1),te.has(e)&&te.delete(e),R.fetchers.get(e)||we}function Se(e){let t=R.fetchers.get(e);!G.has(e)||t&&"loading"===t.state&&K.has(e)||_e(e),X.delete(e),K.delete(e),Q.delete(e),te.delete(e),q.delete(e),R.fetchers.delete(e)}function _e(e,t){let n=G.get(e);n&&(n.abort(t),G.delete(e))}function Me(e){for(let t of e){let e=kt(ke(t).data);R.fetchers.set(t,e)}}function Ie(){let e=[],t=!1;for(let n of Q){let r=R.fetchers.get(n);l(r,`Expected fetcher: ${n}`),"loading"===r.state&&(Q.delete(n),e.push(n),t=!0)}return Me(e),t}function Re(e){let t=[];for(let[n,r]of K)if(r<e){let e=R.fetchers.get(n);l(e,`Expected fetcher: ${n}`),"loading"===e.state&&(_e(n),K.delete(n),t.push(n))}return Me(t),t.length>0}function Ne(e){R.blockers.delete(e),ne.delete(e)}function Le(e,t){let n=R.blockers.get(e)||xe;l("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(R.blockers);r.set(e,t),se({blockers:r})}function He({currentLocation:e,nextLocation:t,historyAction:n}){if(0===ne.size)return;ne.size>1&&d(!1,"A router only supports one blocker at a time");let r=Array.from(ne.entries()),[o,i]=r[r.length-1],a=R.blockers.get(o);return a&&"proceeding"===a.state?void 0:i({currentLocation:e,nextLocation:t,historyAction:n})?o:void 0}function We(e){let t=it(404,{pathname:e}),n=a||c,{matches:r,route:o}=ot(n);return{notFoundMatches:r,route:o,error:t}}function Be(e,t){if(E){return E(e,t.map((e=>j(e,R.loaderData))))||e.key}return e.key}function ze(e,t){if(A){let n=Be(e,t),r=A[n];if("number"==typeof r)return r}return null}function Ye(t,n,r){if(e.patchRoutesOnNavigation){if(!t){return{active:!0,matches:S(n,r,u,!0)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:S(n,r,u,!0)}}}return{active:!1,matches:null}}async function qe(t,n,r,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let l=t;for(;;){let t=null==a,d=a||c,p=s;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:o,patch:(e,t)=>{r.aborted||Ce(e,t,d,p,i,!1)}})}catch(e){return{type:"error",error:e,partialMatches:l}}finally{t&&!r.aborted&&(c=[...c])}if(r.aborted)return{type:"aborted"};let f=k(d,n,u),m=null;if(f){if(0===Object.keys(f[0].params).length)return{type:"success",matches:f};if(m=S(d,n,u,!0),!(m&&l.length<m.length&&Qe(l,m.slice(0,l.length))))return{type:"success",matches:f}}if(m||(m=S(d,n,u,!0)),!m||Qe(l,m))return{type:"success",matches:null};l=m}}function Qe(e,t){return e.length===t.length&&e.every(((e,n)=>e.route.id===t[n].route.id))}return h={get basename(){return u},get future(){return v},get state(){return R},get routes(){return c},get window(){return t},initialize:function(){if(w=e.history.listen((({action:t,location:n,delta:r})=>{if(I)return I(),void(I=void 0);d(0===ne.size||null!=r,"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 o=He({currentLocation:R.location,nextLocation:n,historyAction:t});if(o&&null!=r){let t=new Promise((e=>{I=e}));return e.history.go(-1*r),Le(o,{state:"blocked",location:n,proceed(){Le(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then((()=>e.history.go(r)))},reset(){let e=new Map(R.blockers);e.set(o,xe),se({blockers:e})}}),L?.resolve(),void(L=null)}return le(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(Ae);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,W);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ae,JSON.stringify(n))}catch(e){d(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,W);t.addEventListener("pagehide",e),z=()=>t.removeEventListener("pagehide",e)}return R.initialized||le("POP",R.location,{initialHydration:!0}),h},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,n){if(A=e,P=t,E=n||null,!T&&R.navigation===be){T=!0;let e=ze(R.location,R.matches);null!=e&&se({restoreScrollPosition:e})}return()=>{A=null,P=null,E=null}},navigate:async function t(n,r){if(L?.resolve(),L=null,"number"==typeof n){L||(L=St());let t=L.promise;return e.history.go(n),t}let o=je(R.location,R.matches,u,n,r?.fromRouteId,r?.relative),{path:i,submission:a,error:s}=Ee(!1,o,r),c=R.location,l=f(R.location,i,r&&r.state);l={...l,...e.history.encodeLocation(l)};let d=r&&null!=r.replace?r.replace:void 0,p="PUSH";!0===d?p="REPLACE":!1===d||null!=a&&vt(a.formMethod)&&a.formAction===R.location.pathname+R.location.search&&(p="REPLACE");let m=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),g=He({currentLocation:c,nextLocation:l,historyAction:p});g?Le(g,{state:"blocked",location:l,proceed(){Le(g,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),t(n,r)},reset(){let e=new Map(R.blockers);e.set(g,xe),se({blockers:e})}}):await le(p,l,{submission:a,pendingError:s,preventScrollReset:m,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:r&&r.unstable_defaultShouldRevalidate})},fetch:async function(t,n,o,d){_e(t);let p=!0===(d&&d.flushSync),f=a||c,m=je(R.location,R.matches,u,o,n,d?.relative),h=k(f,m,u),g=Ye(h,f,m);if(g.active&&g.matches&&(h=g.matches),!h)return void ye(t,n,it(404,{pathname:m}),{flushSync:p});let{path:y,submission:v,error:w}=Ee(!0,m,d);if(w)return void ye(t,n,w,{flushSync:p});let x=e.getContext?await e.getContext():new b,O=!0===(d&&d.preventScrollReset);v&&vt(v.formMethod)?await async function(t,n,o,d,p,f,m,h,g,y){he(),X.delete(t);let v=R.fetchers.get(t);ge(t,function(e,t){let n={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};return n}(g,v),{flushSync:m});let b=new AbortController,w=Ke(e.history,o,b.signal,g);if(f){let e=await qe(d,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ye(t,n,e.error,{flushSync:m});if(!e.matches)return void ye(t,n,it(404,{pathname:o}),{flushSync:m});d=e.matches}let x=wt(d,o);if(!x.route.action&&!x.route.lazy){let e=it(405,{method:g.formMethod,pathname:o,routeId:n});return void ye(t,n,e,{flushSync:m})}G.set(t,b);let O=$,A=Ve(i,s,w,d,x,r,p),S=await fe(w,A,p,t),j=S[x.route.id];if(!j)for(let e of A)if(S[e.route.id]){j=S[e.route.id];break}if(w.signal.aborted)return void(G.get(t)===b&&G.delete(t));if(te.has(t)){if(ft(j)||pt(j))return void ge(t,kt(void 0))}else{if(ft(j))return G.delete(t),J>O?void ge(t,kt(void 0)):(Q.add(t),ge(t,At(g)),pe(w,j,!1,{fetcherSubmission:g,preventScrollReset:h}));if(pt(j))return void ye(t,n,j.error)}let E=R.navigation.location||R.location,P=Ke(e.history,E,b.signal),T=a||c,D="idle"!==R.navigation.state?k(T,R.navigation.location,u):R.matches;l(D,"Didn't find any matches after fetcher action");let _=++$;K.set(t,_);let C=At(g,j.data);R.fetchers.set(t,C);let{dsMatches:I,revalidatingFetchers:L}=Pe(P,p,i,s,e.history,R,D,g,E,r,!1,U,q,te,X,Q,T,u,null!=e.patchRoutesOnNavigation,[x.route.id,j],y);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=R.fetchers.get(t),r=At(void 0,n?n.data:void 0);R.fetchers.set(t,r),_e(t),e.controller&&G.set(t,e.controller)})),se({fetchers:new Map(R.fetchers)});let F=()=>L.forEach((e=>_e(e.key)));b.signal.addEventListener("abort",F);let{loaderResults:H,fetcherResults:W}=await me(I,L,P,p);if(b.signal.aborted)return;if(b.signal.removeEventListener("abort",F),K.delete(t),G.delete(t),L.forEach((e=>G.delete(e.key))),R.fetchers.has(t)){let e=kt(j.data);R.fetchers.set(t,e)}let B=at(H);if(B)return pe(P,B.result,!1,{preventScrollReset:h});if(B=at(W),B)return Q.add(B.key),pe(P,B.result,!1,{preventScrollReset:h});let{loaderData:z,errors:Y}=et(R,D,H,void 0,L,W);Re(_),"loading"===R.navigation.state&&_>J?(l(N,"Expected pending action"),M&&M.abort(),ce(R.navigation.location,{matches:D,loaderData:z,errors:Y,fetchers:new Map(R.fetchers)})):(se({errors:Y,loaderData:tt(R.loaderData,z,D,Y),fetchers:new Map(R.fetchers)}),U=!1)}(t,n,y,h,x,g.active,p,O,v,d&&d.unstable_defaultShouldRevalidate):(X.set(t,{routeId:n,path:y}),await async function(t,n,o,a,c,u,l,d,p){let f=R.fetchers.get(t);ge(t,At(p,f?f.data:void 0),{flushSync:l});let m=new AbortController,h=Ke(e.history,o,m.signal);if(u){let e=await qe(a,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ye(t,n,e.error,{flushSync:l});if(!e.matches)return void ye(t,n,it(404,{pathname:o}),{flushSync:l});a=e.matches}let g=wt(a,o);G.set(t,m);let y=$,v=Ve(i,s,h,a,g,r,c),b=await fe(h,v,c,t),w=b[g.route.id];G.get(t)===m&&G.delete(t);if(h.signal.aborted)return;if(te.has(t))return void ge(t,kt(void 0));if(ft(w))return J>y?void ge(t,kt(void 0)):(Q.add(t),void await pe(h,w,!1,{preventScrollReset:d}));if(pt(w))return void ye(t,n,w.error);ge(t,kt(w.data))}(t,n,y,h,x,g.active,p,O,v))},revalidate:function(){re||(re=St()),he(),se({revalidation:"loading"});let e=re.promise;return"submitting"===R.navigation.state?e:"idle"===R.navigation.state?(le(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),e):(le(N||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:!0===H}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ke,resetFetcher:function(e,t){_e(e,t?.reason),ge(e,kt(null))},deleteFetcher:function(e){let t=(Z.get(e)||0)-1;t<=0?(Z.delete(e),te.add(e)):Z.set(e,t),se({fetchers:new Map(R.fetchers)})},dispose:function(){w&&w(),z&&z(),x.clear(),M&&M.abort(),R.fetchers.forEach(((e,t)=>Se(t))),R.blockers.forEach(((e,t)=>Ne(t)))},getBlocker:function(e,t){let n=R.blockers.get(e)||xe;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Ne,patchRoutes:function(e,t,n=!1){let r=null==a;Ce(e,t,a||c,s,i,n),r&&(c=[...c],se({}))},_internalFetchControllers:G,_internalSetRoutes:function(e){s={},a=O(e,i,void 0,s)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){se(e)}},e.unstable_instrumentations&&(h=function(e,t){let n={navigate:[],fetch:[]};if(t.forEach((e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}}))),n.navigate.length>0){let t=e.navigate[oe]??e.navigate,r=ae(n.navigate,t,((...t)=>{let[n,r]=t;return{to:"number"==typeof n||"string"==typeof n?n:n?m(n):".",...ue(e,r??{})}}));r&&(r[oe]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[oe]??e.fetch,r=ae(n.fetch,t,((...t)=>{let[n,,r,o]=t;return{href:r??".",fetcherKey:n,...ue(e,o??{})}}));r&&(r[oe]=t,e.fetch=r)}return e}(h,e.unstable_instrumentations.map((e=>e.router)).filter(Boolean))),h}function je(e,t,n,r,o,i){let a,s;if(o){a=[];for(let e of t)if(a.push(e),e.route.id===o){s=e;break}}else a=t,s=t[t.length-1];let c=$(r||".",G(a),B(e.pathname,n)||e.pathname,"path"===i);if(null==r&&(c.search=e.search,c.hash=e.hash),(null==r||""===r||"."===r)&&s){let e=bt(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();c.search=n?`?${n}`:""}}return"/"!==n&&(c.pathname=function({basename:e,pathname:t}){return"/"===t?e:J([e,t])}({basename:n,pathname:c.pathname})),m(c)}function Ee(e,t,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:t};if(n.formMethod&&!yt(n.formMethod))return{path:t,error:it(405,{method:n.formMethod})};let r,o,i=()=>({path:t,error:it(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),s=st(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!vt(a))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,n])=>`${e}${t}=${n}\n`),""):String(n.body);return{path:t,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!vt(a))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:s,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)r=Qe(n.formData),o=n.formData;else if(n.body instanceof FormData)r=Qe(n.body),o=n.body;else if(n.body instanceof URLSearchParams)r=n.body,o=Xe(r);else if(null==n.body)r=new URLSearchParams,o=new FormData;else try{r=new URLSearchParams(n.body),o=Xe(r)}catch(e){return i()}let c={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(vt(c.formMethod))return{path:t,submission:c};let u=h(t);return e&&u.search&&bt(u.search)&&r.append("index",""),u.search=`?${r}`,{path:m(u),submission:c}}function Pe(e,t,n,r,o,i,a,s,c,u,l,d,p,f,m,h,g,y,v,b,w){let x,O=b?pt(b[1])?b[1].error:b[1].data:void 0,A=o.createURL(i.location),S=o.createURL(c);if(l&&i.errors){let e=Object.keys(i.errors)[0];x=a.findIndex((t=>t.route.id===e))}else if(b&&pt(b[1])){let e=b[0];x=a.findIndex((t=>t.route.id===e))-1}let j=b?b[1].statusCode:void 0,E=j&&j>=400,P={currentUrl:A,currentParams:i.matches[0]?.params||{},nextUrl:S,nextParams:a[0].params,...s,actionResult:O,actionStatus:j},T=te(a),D=a.map(((o,a)=>{let{route:s}=o,c=null;if(null!=x&&a>x?c=!1:s.lazy?c=!0:Te(s)?l?c=De(s,i.loaderData,i.errors):function(e,t,n){let r=!t||n.route.id!==t.route.id,o=!e.hasOwnProperty(n.route.id);return r||o}(i.loaderData,i.matches[a],o)&&(c=!0):c=!1,null!==c)return Ye(n,r,e,T,o,u,t,c);let p=!1;"boolean"==typeof w?p=w:E?p=!1:(d||A.pathname+A.search===S.pathname+S.search||A.search!==S.search||function(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}(i.matches[a],o))&&(p=!0);let f={...P,defaultShouldRevalidate:p},m=_e(o,f);return Ye(n,r,e,T,o,u,t,m,f,w)})),_=[];return m.forEach(((e,s)=>{if(l||!a.some((t=>t.route.id===e.routeId))||f.has(s))return;let c=i.fetchers.get(s),m=c&&"idle"!==c.state&&void 0===c.data,b=k(g,e.path,y);if(!b){if(v&&m)return;return void _.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(h.has(s))return;let x=wt(b,e.path),O=new AbortController,A=Ke(o,e.path,O.signal),S=null;if(p.has(s))p.delete(s),S=Ve(n,r,A,b,x,u,t);else if(m)d&&(S=Ve(n,r,A,b,x,u,t));else{let e;e="boolean"==typeof w?w:!E&&d;let o={...P,defaultShouldRevalidate:e};_e(x,o)&&(S=Ve(n,r,A,b,x,u,t,o))}S&&_.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:x,request:A,controller:O})})),{dsMatches:D,revalidatingFetchers:_}}function Te(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function De(e,t,n){if(e.lazy)return!0;if(!Te(e))return!1;let r=null!=t&&e.id in t,o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function _e(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Ce(e,t,n,r,o,i){let a;if(e){let t=r[e];l(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),a=t.children}else a=n;let s=[],c=[];if(t.forEach((e=>{let t=a.find((t=>Me(e,t)));t?c.push({existingRoute:t,newRoute:e}):s.push(e)})),s.length>0){let t=O(s,o,[e||"_","patch",String(a?.length||"0")],r);a.push(...t)}if(i&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[i]=O([n],o,[],{},!0);Object.assign(r,{element:i.element?i.element:r.element,errorElement:i.errorElement?i.errorElement:r.errorElement,hydrateFallbackElement:i.hydrateFallbackElement?i.hydrateFallbackElement:r.hydrateFallbackElement})}}function Me(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>t.children?.some((t=>Me(e,t))))))}var Ie=new WeakMap,Re=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(l(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let i=o.lazy[e];if(!i)return;let a=Ie.get(o);a||(a={},Ie.set(o,a));let s=a[e];if(s)return s;let c=(async()=>{let t=function(e){return w.has(e)}(e),n=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)d(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(n)d(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await i();null!=t&&(Object.assign(o,{[e]:t}),Object.assign(o,r(o)))}"object"==typeof o.lazy&&(o.lazy[e]=void 0,Object.values(o.lazy).every((e=>void 0===e))&&(o.lazy=void 0))})();return a[e]=c,c},Ne=new WeakMap;async function Le(e){let t=e.matches.filter((e=>e.shouldLoad)),n={};return(await Promise.all(t.map((e=>e.resolve())))).forEach(((e,r)=>{n[t[r].route.id]=e})),n}async function Fe(e){return e.matches.some((e=>e.route.middleware))?He(e,(()=>Le(e))):Le(e)}function He(e,t){return We(e,t,(e=>{if(gt(e))throw e;return e}),ut,(function(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:"error",result:t}}));{let{matches:r}=e,o=Math.min(Math.max(r.findIndex((e=>e.route.id===n)),0),Math.max(r.findIndex((e=>e.shouldCallHandler())),0)),i=rt(r,r[o].route.id).route.id;return Promise.resolve({[i]:{type:"error",result:t}})}}))}async function We(e,t,n,r,o){let{matches:i,request:a,params:s,context:c,unstable_pattern:u}=e,l=i.flatMap((e=>e.route.middleware?e.route.middleware.map((t=>[e.route.id,t])):[]));return await Be({request:a,params:s,context:c,unstable_pattern:u},l,t,n,r,o)}async function Be(e,t,n,r,o,i,a=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let c=t[a];if(!c){return await n()}let u,[l,d]=c,p=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let s=await Be(e,t,n,r,o,i,a+1);return u={value:s},u.value}catch(e){return u={value:await i(e,l,u)},u.value}};try{let t=await d(e,p),n=null!=t?r(t):void 0;return o(n)?n:u?n??u.value:(u={value:await p()},u.value)}catch(e){return await i(e,l,u)}}function ze(e,t,n,r,o){let i=Re({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=function(e,t,n,r,o){let i=n[e.id];if(l(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=Ne.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{l("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(void 0===r)continue;let a=(o=e,x.has(o)),s=void 0!==i[e]&&"hasErrorBoundary"!==e;a?d(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):s?d(!s,`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.`):n[e]=r}var o;Object.assign(i,n),Object.assign(i,{...r(i),lazy:void 0})})();return Ne.set(i,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let a,s=Object.keys(e.lazy),c=[];for(let i of s){if(o&&o.includes(i))continue;let s=Re({key:i,route:e,manifest:n,mapRouteProperties:r});s&&(c.push(s),i===t&&(a=s))}let u=c.length>0?Promise.all(c).then((()=>{})):void 0;return u?.catch((()=>{})),a?.catch((()=>{})),{lazyRoutePromise:u,lazyHandlerPromise:a}}(r.route,vt(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function Ye(e,t,n,r,o,i,a,s,c=null,u){let l=!1,d=ze(e,t,n,o,i);return{...o,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:c,shouldCallHandler:e=>(l=!0,c?_e(o,"boolean"==typeof u?{...c,defaultShouldRevalidate:u}:"boolean"==typeof e?{...c,defaultShouldRevalidate:e}:c):s),resolve(e){let{lazy:t,loader:i,middleware:c}=o.route,u=l||s||e&&!vt(n.method)&&(t||i),p=c&&c.length>0&&!i&&!t;return!u||!vt(n.method)&&p?Promise.resolve({type:"data",result:void 0}):async function({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let s,c,u=vt(e.method),l=u?"action":"loader",d=r=>{let o,s=new Promise(((e,t)=>o=t));c=()=>o(),e.signal.addEventListener("abort",c);let u=o=>"function"!=typeof r?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${l}" [routeId: ${n.route.id}]`)):r({request:e,unstable_pattern:t,params:n.params,context:a},...void 0!==o?[o]:[]),d=(async()=>{try{return{type:"data",result:await(i?i((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([d,s])};try{let t=u?n.route.action:n.route.loader;if(r||o)if(t){let e,[n]=await Promise.all([d(t).catch((t=>{e=t})),r,o]);if(void 0!==e)throw e;s=n}else{await r;let t=u?n.route.action:n.route.loader;if(!t){if("action"===l){let t=new URL(e.url),r=t.pathname+t.search;throw it(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[s]=await Promise.all([d(t),o])}else{if(!t){let t=new URL(e.url);throw it(404,{pathname:t.pathname+t.search})}s=await d(t)}}catch(e){return{type:"error",result:e}}finally{c&&e.signal.removeEventListener("abort",c)}return s}({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:a})}}}function Ve(e,t,n,r,o,i,a,s=null){return r.map((c=>c.route.id!==o.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:ze(e,t,n,c,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ye(e,t,n,te(r),c,i,a,!0,s)))}async function Ue(e,t,n,r,o,i){n.some((e=>e._lazyPromises?.middleware))&&await Promise.all(n.map((e=>e._lazyPromises?.middleware)));let a={request:t,unstable_pattern:te(n),params:n[0].params,context:o,matches:n},s=i?()=>{throw new Error("You cannot call `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=>{let t=a;return He(t,(()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},c=await e({...a,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return c}async function qe(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}async function Ge(e){let{result:t,type:n}=e;if(ht(t)){let e;try{e=await qe(t)}catch(e){return{type:"error",error:e}}return"error"===n?{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}}return"error"===n?mt(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:ct(t),statusCode:ee(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ee(t)?t.status:void 0}:mt(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 $e(e,t,n,r,o){let i=e.headers.get("Location");if(l(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Y(i)){let a=r.slice(0,r.findIndex((e=>e.route.id===n))+1);i=je(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function Je(e,t,n,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Y(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r);if(o.includes(i.protocol))throw new Error("Invalid redirect location");let a=null!=B(i.pathname,n);if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}try{let t=r.createURL(e);if(o.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function Ke(e,t,n,r){let o=e.createURL(st(t)).toString(),i={signal:n};if(r&&vt(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Qe(r.formData):i.body=r.formData}return new Request(o,i)}function Qe(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function Xe(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ze(e,t,n,r=!1,o=!1){let i,a={},s=null,c=!1,u={},d=n&&pt(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let p=n.route.id,f=t[p];if(l(!ft(f),"Cannot handle redirect results in processLoaderData"),pt(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},o)s[p]=t;else{let n=rt(e,p);null==s[n.route.id]&&(s[n.route.id]=t)}r||(a[p]=ke),c||(c=!0,i=ee(f.error)?f.error.status:500),f.headers&&(u[p]=f.headers)}else a[p]=f.data,f.statusCode&&200!==f.statusCode&&!c&&(i=f.statusCode),f.headers&&(u[p]=f.headers)})),void 0!==d&&n&&(s={[n[0]]:d},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:u}}function et(e,t,n,r,o,i){let{loaderData:a,errors:s}=Ze(t,n,r);return o.filter((e=>!e.matches||e.matches.some((e=>e.shouldLoad)))).forEach((t=>{let{key:n,match:r,controller:o}=t;if(o&&o.signal.aborted)return;let a=i[n];if(l(a,"Did not find corresponding fetcher result"),pt(a)){let t=rt(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:a.error}),e.fetchers.delete(n)}else if(ft(a))l(!1,"Unhandled fetcher revalidation redirect");else{let t=kt(a.data);e.fetchers.set(n,t)}})),{loaderData:a,errors:s}}function tt(e,t,n,r){let o=Object.entries(t).filter((([,e])=>e!==ke)).reduce(((e,[t,n])=>(e[t]=n,e)),{});for(let i of n){let n=i.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&i.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function nt(e){return e?pt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function rt(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 ot(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 it(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(a="Forbidden",s=`Route "${n}" does not match URL "${t}"`):404===e?(a="Not Found",s=`No route matches URL "${t}"`):405===e&&(a="Method Not Allowed",r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Z(e||500,a,new Error(s),!0)}function at(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(ft(r))return{key:n,result:r}}}function st(e){return m({..."string"==typeof e?h(e):e,hash:""})}function ct(e){return new Z(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ut(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&lt(t)))}function lt(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function dt(e){return ht(e.result)&&ye.has(e.result.status)}function pt(e){return"error"===e.type}function ft(e){return"redirect"===(e&&e.type)}function mt(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ht(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function gt(e){return ht(e)&&(t=e.status,ye.has(t))&&e.headers.has("Location");var t}function yt(e){return ge.has(e.toUpperCase())}function vt(e){return me.has(e.toUpperCase())}function bt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function wt(e,t){let n="string"==typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&bt(n||""))return e[e.length-1];let r=q(e);return r[r.length-1]}function xt(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function Ot(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 At(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}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function kt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function St(){let e,t,n=new Promise(((r,o)=>{e=async e=>{r(e);try{await n}catch(e){}},t=async e=>{o(e);try{await n}catch(e){}}}));return{promise:n,resolve:e,reject:t}}var jt=i.createContext(null);jt.displayName="DataRouter";var Et=i.createContext(null);Et.displayName="DataRouterState";var Pt=i.createContext(!1);function Tt(){return i.useContext(Pt)}var Dt=i.createContext({isTransitioning:!1});Dt.displayName="ViewTransition";var _t=i.createContext(new Map);_t.displayName="Fetchers";var Ct=i.createContext(null);Ct.displayName="Await";var Mt=i.createContext(null);Mt.displayName="Navigation";var It=i.createContext(null);It.displayName="Location";var Rt=i.createContext({outlet:null,matches:[],isDataRoute:!1});Rt.displayName="Route";var Nt=i.createContext(null);Nt.displayName="RouteError";var Lt=!0,Ft="REACT_ROUTER_ERROR",Ht="REDIRECT";function Wt(){return null!=i.useContext(It)}function Bt(){return l(Wt(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(It).location}var zt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yt(e){i.useContext(Mt).static||i.useLayoutEffect(e)}function Vt(){let{isDataRoute:e}=i.useContext(Rt);return e?function(){let{router:e}=nn("useNavigate"),t=on("useNavigate"),n=i.useRef(!1);return Yt((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{d(n.current,zt),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){l(Wt(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(jt),{basename:t,navigator:n}=i.useContext(Mt),{matches:r}=i.useContext(Rt),{pathname:o}=Bt(),a=JSON.stringify(G(r)),s=i.useRef(!1);return Yt((()=>{s.current=!0})),i.useCallback(((r,i={})=>{if(d(s.current,zt),!s.current)return;if("number"==typeof r)return void n.go(r);let c=$(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:J([t,c.pathname])),(i.replace?n.replace:n.push)(c,i.state,i)}),[t,n,a,o,e])}()}i.createContext(null);function Ut(){let{matches:e}=i.useContext(Rt),t=e[e.length-1];return t?t.params:{}}function qt(e,{relative:t}={}){let{matches:n}=i.useContext(Rt),{pathname:r}=Bt(),o=JSON.stringify(G(n));return i.useMemo((()=>$(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function Gt(e,t,n,r,o){l(Wt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(Mt),{matches:s}=i.useContext(Rt),c=s[s.length-1],u=c?c.params:{},p=c?c.pathname:"/",f=c?c.pathnameBase:"/",m=c&&c.route;if(Lt){let e=m&&m.path||"";ln(p,!m||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) 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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let g,y=Bt();if(t){let e="string"==typeof t?h(t):t;l("/"===f||e.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` 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 "${f}" but pathname "${e.pathname}" was given in the \`location\` prop.`),g=e}else g=y;let v=g.pathname||"/",b=v;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=k(e,{pathname:b});Lt&&(d(m||null!=w,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),d(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let x=en(w&&w.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:J([f,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:J([f,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])}))),s,n,r,o);return t&&x?i.createElement(It.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},x):x}function $t(){let e=an(),t=ee(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return Lt&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route."))),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,s)}var Jt=i.createElement($t,null),Kt=class extends i.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){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Ft}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new Z(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i.createElement(Rt.Provider,{value:this.props.routeContext},i.createElement(Nt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(Xt,{error:e},t):t}};Kt.contextType=Pt;var Qt=new WeakMap;function Xt({children:e,error:t}){let{basename:n}=i.useContext(Mt);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Ft}:${Ht}:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=Qt.get(t);if(r)throw r;let o=re(e.location,n);if(ne&&!Qt.get(t)){if(!o.isExternal&&!e.reloadDocument){const n=Promise.resolve().then((()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace})));throw Qt.set(t,n),n}window.location.href=o.absoluteURL||o.to}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Zt({routeContext:e,match:t,children:n}){let r=i.useContext(jt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(Rt.Provider,{value:e},n)}function en(e,t=[],n=null,r=null,o=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,s=n?.errors;if(null!=s){let e=a.findIndex((e=>e.route.id&&void 0!==s?.[e.route.id]));l(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){c=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}let d=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:te(n.matches),errorInfo:t})}:void 0;return a.reduceRight(((e,r,o)=>{let l,p=!1,f=null,m=null;n&&(l=s&&r.route.id?s[r.route.id]:void 0,f=r.route.errorElement||Jt,c&&(u<0&&0===o?(ln("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):u===o&&(p=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,o+1)),g=()=>{let t;return t=l?f:p?m:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(Zt,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(Kt,{location:n.location,revalidation:n.revalidation,component:f,error:l,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()}),null)}function tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nn(e){let t=i.useContext(jt);return l(t,tn(e)),t}function rn(e){let t=i.useContext(Et);return l(t,tn(e)),t}function on(e){let t=function(e){let t=i.useContext(Rt);return l(t,tn(e)),t}(e),n=t.matches[t.matches.length-1];return l(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function an(){let e=i.useContext(Nt),t=rn("useRouteError"),n=on("useRouteError");return void 0!==e?e:t.errors?.[n]}var sn=0;function cn(e){let{router:t,basename:n}=nn("useBlocker"),r=rn("useBlocker"),[o,a]=i.useState(""),s=i.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:o,historyAction:i}=t;return e({currentLocation:{...r,pathname:B(r.pathname,n)||r.pathname},nextLocation:{...o,pathname:B(o.pathname,n)||o.pathname},historyAction:i})}),[n,e]);return i.useEffect((()=>{let e=String(++sn);return a(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,s)}),[t,o,s]),o&&r.blockers.has(o)?r.blockers.get(o):xe}var un={};function ln(e,t,n){t||un[e]||(un[e]=!0,d(!1,n))}var dn={};function pn(e,t){e||dn[t]||(dn[t]=!0,console.warn(t))}var fn=(r||(r=n.t(i,2))).useOptimistic,mn=()=>{};function hn(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(Lt&&e.element&&d(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:i.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(Lt&&e.hydrateFallbackElement&&d(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(Lt&&e.errorElement&&d(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var gn=["HydrateFallback","hydrateFallbackElement"];var yn=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 vn({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){let o=Tt();r=o||r;let[a,s]=i.useState(e.state),[c,u]=(l=a,fn?fn(l):[l,mn]);var l;let[d,p]=i.useState(),[f,m]=i.useState({isTransitioning:!1}),[h,g]=i.useState(),[y,v]=i.useState(),[b,w]=i.useState(),x=i.useRef(new Map),O=i.useCallback(((o,{deletedFetchers:a,newErrors:c,flushSync:l,viewTransitionOpts:d})=>{c&&n&&Object.values(c).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},unstable_pattern:te(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)})),a.forEach((e=>x.current.delete(e))),pn(!1===l||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` 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 f=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(pn(null==d||f,"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."),d&&f){if(t&&l){t((()=>{y&&(h?.resolve(),y.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>s(o)))}));return n.finished.finally((()=>{t((()=>{g(void 0),v(void 0),p(void 0),m({isTransitioning:!1})}))})),void t((()=>v(n)))}y?(h?.resolve(),y.skipTransition(),w({state:o,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(p(o),m({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&l?t((()=>s(o))):!1===r?s(o):i.startTransition((()=>{!0===r&&u((e=>bn(e,o))),s(o)}))}),[e.window,t,y,h,r,u,n]);i.useLayoutEffect((()=>e.subscribe(O)),[e,O]),i.useEffect((()=>{f.isTransitioning&&!f.flushSync&&g(new yn)}),[f]),i.useEffect((()=>{if(h&&d&&e.window){let t=d,n=h.promise,o=e.window.document.startViewTransition((async()=>{!1===r?s(t):i.startTransition((()=>{!0===r&&u((e=>bn(e,t))),s(t)})),await n}));o.finished.finally((()=>{g(void 0),v(void 0),p(void 0),m({isTransitioning:!1})})),v(o)}}),[d,h,e.window,r,u]),i.useEffect((()=>{h&&d&&c.location.key===d.location.key&&h.resolve()}),[h,y,c.location,d]),i.useEffect((()=>{!f.isTransitioning&&b&&(p(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))}),[f.isTransitioning,b]);let A=i.useMemo((()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})})),[e]),k=e.basename||"/",S=i.useMemo((()=>({router:e,navigator:A,static:!1,basename:k,onError:n})),[e,A,k,n]);return i.createElement(i.Fragment,null,i.createElement(jt.Provider,{value:S},i.createElement(Et.Provider,{value:c},i.createElement(_t.Provider,{value:x.current},i.createElement(Dt.Provider,{value:f},i.createElement(An,{basename:k,location:c.location,navigationType:c.historyAction,navigator:A,unstable_useTransitions:r},i.createElement(wn,{routes:e.routes,future:e.future,state:c,onError:n})))))),null)}function bn(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var wn=i.memo((function({routes:e,future:t,state:n,onError:r}){return Gt(e,void 0,n,r,t)}));function xn({to:e,replace:t,state:n,relative:r}){l(Wt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(Mt);d(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=i.useContext(Rt),{pathname:s}=Bt(),c=Vt(),u=$(e,G(a),s,"path"===r),p=JSON.stringify(u);return i.useEffect((()=>{c(JSON.parse(p),{replace:t,state:n,relative:r})}),[c,p,r,t,n]),null}function On(e){l(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function An({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:s}){l(!Wt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=i.useMemo((()=>({basename:c,navigator:o,static:a,unstable_useTransitions:s,future:{}})),[c,o,a,s]);"string"==typeof n&&(n=h(n));let{pathname:p="/",search:f="",hash:m="",state:g=null,key:y="default"}=n,v=i.useMemo((()=>{let e=B(p,c);return null==e?null:{location:{pathname:e,search:f,hash:m,state:g,key:y},navigationType:r}}),[c,p,f,m,g,y,r]);return d(null!=v,`<Router basename="${c}"> is not able to match the URL "${p}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),null==v?null:i.createElement(Mt.Provider,{value:u},i.createElement(It.Provider,{children:t,value:v}))}function kn({children:e,location:t}){return Gt(Sn(e),t)}i.Component;function Sn(e,t=[]){let n=[];return i.Children.forEach(e,((e,r)=>{if(!i.isValidElement(e))return;let o=[...t,r];if(e.type===i.Fragment)return void n.push.apply(n,Sn(e.props.children,o));l(e.type===On,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),l(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Sn(e.props.children,o)),n.push(a)})),n}var jn="get",En="application/x-www-form-urlencoded";function Pn(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Tn=null;var Dn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _n(e){return null==e||Dn.has(e)?e:(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${En}"`),null)}function Cn(e,t){let n,r,o,i,a;if(function(e){return Pn(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?B(a,t):null,n=e.getAttribute("method")||jn,o=_n(e.getAttribute("enctype"))||En,i=new FormData(e)}else if(function(e){return Pn(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Pn(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?B(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||jn,o=_n(e.getAttribute("formenctype"))||_n(a.getAttribute("enctype"))||En,i=new FormData(a,e),!function(){if(null===Tn)try{new FormData(document.createElement("form"),0),Tn=!1}catch(e){Tn=!0}return Tn}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(Pn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=jn,r=null,o=En,a=e}return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;function Mn(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function In(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===B(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function Rn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}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 Nn(e){return null!=e&&"string"==typeof e.page}function Ln(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)}function Fn(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function Hn(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function Wn(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Nn(o)&&"script"===o.as&&o.href&&r.has(o.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(i)||(n.add(i),e.push({key:i,link:o})),e}),[])}function Bn(e,t){return"lazy"===e.mode&&!0===t}function zn(){let e=i.useContext(jt);return Mn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Yn(){let e=i.useContext(Et);return Mn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Vn=i.createContext(void 0);function Un(){let e=i.useContext(Vn);return Mn(e,"You must render this element inside a <HydratedRouter> element"),e}function qn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Gn(e,t,n){if(n&&!Qn)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}Vn.displayName="FrameworkContext";function $n({page:e,...t}){let{router:n}=zn(),r=i.useMemo((()=>k(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(Kn,{page:e,matches:r,...t}):null}function Jn(e){let{manifest:t,routeModules:n}=Un(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return async function(e,t,n){return Wn((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await Rn(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Ln).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(e,t,n).then((e=>{r||o(e)})),()=>{r=!0}}),[e,t,n]),r}function Kn({page:e,matches:t,...n}){let r=Bt(),{future:o,manifest:a,routeModules:s}=Un(),{basename:c}=zn(),{loaderData:u,matches:l}=Yn(),d=i.useMemo((()=>Fn(e,t,l,a,r,"data")),[e,t,l,a,r]),p=i.useMemo((()=>Fn(e,t,l,a,r,"assets")),[e,t,l,a,r]),f=i.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach((e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some((t=>t.route.id===e.route.id))&&e.route.id in u&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let l=In(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return i&&n.size>0&&l.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[l.pathname+l.search]}),[c,o.unstable_trailingSlashAwareDataRequests,u,r,a,d,t,e,s]),m=i.useMemo((()=>Hn(p,a)),[p,a]),h=Jn(p);return i.createElement(i.Fragment,null,f.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),m.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),h.map((({key:e,link:t})=>i.createElement("link",{key:e,nonce:n.nonce,...t}))))}var Qn=!1;function Xn(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:a,ssr:s}=Un(),{router:c,static:u,staticContext:l}=zn(),{matches:d}=Yn(),p=Tt(),f=Bn(a,s);o&&(o.didRenderScripts=!0);let m=Gn(d,null,r);i.useEffect((()=>{!0}),[]);let h=i.useMemo((()=>{if(p)return null;let r=l?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=u?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${f?"":`import ${JSON.stringify(t.url)}`};\n${m.map(((e,n)=>{let r=`route${n}`,o=t.routes[e.route.id];Mn(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:s,hydrateFallbackModule:c,module:u}=o,l=[...i?[{module:i,varName:`${r}_clientAction`}]:[],...a?[{module:a,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:u,varName:`${r}_main`}];return 1===l.length?`import * as ${r} from ${JSON.stringify(u)};`:[l.map((e=>`import * as ${e.varName} from "${e.module}";`)).join("\n"),`const ${r} = {${l.map((e=>`...${e.varName}`)).join(",")}};`].join("\n")})).join("\n")}\n ${f?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},n){let r=new Set(n.state.matches.map((e=>e.route.id))),o=n.state.location.pathname.split("/").filter(Boolean),i=["/"];for(o.pop();o.length>0;)i.push(`/${o.join("/")}`),o.pop();i.forEach((e=>{let t=k(n.routes,e,n.basename);t&&t.forEach((e=>r.add(e.route.id)))}));let a=[...r].reduce(((e,n)=>Object.assign(e,{[n]:t.routes[n]})),{});return{...t,routes:a,sri:!!e||void 0}}(t,c),null,2)};`:""}\n window.__reactRouterRouteModules = {${m.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return i.createElement(i.Fragment,null,i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),i.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:"module",async:!0}))}),[]),g=Qn||p?[]:function(e){return[...new Set(e)]}(t.entry.imports.concat(Hn(m,t,{includeHydrateFallback:!0}))),y="object"==typeof t.sri?t.sri:{};return pn(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Qn||p?null:i.createElement(i.Fragment,null,"object"==typeof t.sri?i.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:y})}}):null,f?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:y[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:y[t.entry.module],suppressHydrationWarning:!0}),g.map((t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:y[t],suppressHydrationWarning:!0}))),h)}function Zn(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}i.Component;function er({error:e,isOutsideRemixApp:t}){console.error(e);let n,r=i.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(ee(e))return i.createElement(tr,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),Lt?r:null);if(e instanceof Error)e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);new Error(t)}return i.createElement(tr,{title:"Application Error!",isOutsideRemixApp:t},i.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),i.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function tr({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Un();return o.root?.Layout&&!n?r:i.createElement("html",{lang:"en"},i.createElement("head",null,i.createElement("meta",{charSet:"utf-8"}),i.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),i.createElement("title",null,e)),i.createElement("body",null,i.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?i.createElement(Xn,null):null)))}var nr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{nr&&(window.__reactRouterVersion="7.12.0")}catch(e){}function rr(e,t){return Se({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:u({window:t?.window}),hydrationData:t?.hydrationData||or(),routes:e,mapRouteProperties:hn,hydrationRouteProperties:gn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function or(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:ir(e.errors)}),e}function ir(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new Z(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let o=new t(r.message);o.stack="",n[e]=o}catch(e){}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}var ar=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sr=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:s,target:c,to:u,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:f,...h},g){let{basename:y,unstable_useTransitions:v}=i.useContext(Mt),b="string"==typeof u&&ar.test(u),w=re(u,y),x=function(e,{relative:t}={}){l(Wt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(Mt),{hash:o,pathname:a,search:s}=qt(e,{relative:t}),c=a;return"/"!==n&&(c="/"===a?n:J([n,a])),r.createHref({pathname:c,search:s,hash:o})}(u=w.to,{relative:r}),[O,A,k]=function(e,t){let n=i.useContext(Vn),[r,o]=i.useState(!1),[a,s]=i.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:l,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let m=()=>{o(!0)},h=()=>{o(!1),s(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:qn(c,m),onBlur:qn(u,h),onMouseEnter:qn(l,m),onMouseLeave:qn(d,h),onTouchStart:qn(p,m)}]:[!1,f,{}]}(n,h),S=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:u}={}){let l=Vt(),d=Bt(),p=qt(e,{relative:a});return i.useCallback((f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==n?n:m(d)===m(p),h=()=>l(e,{replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c});u?i.startTransition((()=>h())):h()}}),[d,l,p,n,r,t,e,o,a,s,c,u])}(u,{replace:a,state:s,target:c,preventScrollReset:d,relative:r,viewTransition:p,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});let j=i.createElement("a",{...h,...k,href:w.absoluteURL||x,onClick:w.isExternal||o?e:function(t){e&&e(t),t.defaultPrevented||S(t)},ref:Zn(g,A),target:c,"data-discover":b||"render"!==t?void 0:"true"});return O&&!b?i.createElement(i.Fragment,null,j,i.createElement($n,{page:x})):j}));sr.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:s,children:c,...u},d){let p=qt(a,{relative:u.relative}),f=Bt(),m=i.useContext(Et),{navigator:h,basename:g}=i.useContext(Mt),y=null!=m&&function(e,{relative:t}={}){let n=i.useContext(Dt);l(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=lr("useViewTransitionState"),o=qt(e,{relative:t});if(!n.isTransitioning)return!1;let a=B(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=B(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=F(o.pathname,s)||null!=F(o.pathname,a)}(p)&&!0===s,v=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&g&&(w=B(w,g)||w);const x="/"!==v&&v.endsWith("/")?v.length-1:v.length;let O,A=b===v||!r&&b.startsWith(v)&&"/"===b.charAt(x),k=null!=w&&(w===v||!r&&w.startsWith(v)&&"/"===w.charAt(v.length)),S={isActive:A,isPending:k,isTransitioning:y},j=A?e:void 0;O="function"==typeof n?n(S):[n,A?"active":null,k?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let E="function"==typeof o?o(S):o;return i.createElement(sr,{...u,"aria-current":j,className:O,ref:d,style:E,to:a,viewTransition:s},"function"==typeof c?c(S):c)})).displayName="NavLink";var cr=i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:s=jn,action:c,onSubmit:u,relative:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h,...g},y)=>{let{unstable_useTransitions:v}=i.useContext(Mt),b=fr(),w=function(e,{relative:t}={}){let{basename:n}=i.useContext(Mt),r=i.useContext(Rt);l(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...qt(e||".",{relative:t})},s=Bt();if(null==e){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:J([n,a.pathname]));return m(a)}(c,{relative:d}),x="get"===s.toLowerCase()?"get":"post",O="string"==typeof c&&ar.test(c);return i.createElement("form",{ref:y,method:x,action:w,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute("formmethod")||s,l=()=>b(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:o,state:a,relative:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h});v&&!1!==n?i.startTransition((()=>l())):l()},...g,"data-discover":O||"render"!==e?void 0:"true"})}));function ur(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lr(e){let t=i.useContext(jt);return l(t,ur(e)),t}cr.displayName="Form";var dr=0,pr=()=>`__${String(++dr)}__`;function fr(){let{router:e}=lr("useSubmit"),{basename:t}=i.useContext(Mt),n=on("useRouteId"),r=e.fetch,o=e.navigate;return i.useCallback((async(e,i={})=>{let{action:a,method:s,encType:c,formData:u,body:l}=Cn(e,t);if(!1===i.navigate){let e=i.fetcherKey||pr();await r(e,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||s,formEncType:i.encType||c,flushSync:i.flushSync})}else await o(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||s,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[r,o,t,n])}},52600:(e,t,n)=>{"use strict";n.d(t,{pg:()=>a});var r=n(3433),o=n(4883),i=n(81845);function a(e){return o.createElement(r.pg,{flushSync:i.flushSync,...e})}(0,r.q6)()},77987:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},6695:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},95065:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e){if(Array.isArray(e))return(0,r.A)(e)}},97991:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},24747:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},27887:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{A:()=>o})},6624:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(37444),o=n(89954),i=n(1560);function a(e){var t=(0,o.A)();return function(){var n,o=(0,r.A)(e);if(t){var a=(0,r.A)(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return(0,i.A)(this,n)}}},88097:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>r})},65166:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},37444:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:()=>r})},49523:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(15216);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},89954:(e,t,n)=>{"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{A:()=>r})},62439:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:()=>r})},21648:(e,t,n)=>{"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}n.d(t,{A:()=>r})},37820:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},77969:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},47029:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(88097);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},23715:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8609);function o(e,t){if(null==e)return{};var n,o,i=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},8609:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{A:()=>r})},1560:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65710),o=n(97991);function i(e,t){if(t&&("object"===(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.A)(e)}},15216:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},52167:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6695),o=n(21648),i=n(25134),a=n(37820);function s(e,t){return(0,r.A)(e)||(0,o.A)(e,t)||(0,i.A)(e,t)||(0,a.A)()}},47978:(e,t,n)=>{"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{A:()=>r})},78840:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(95065),o=n(62439),i=n(25134),a=n(77969);function s(e){return(0,r.A)(e)||(0,o.A)(e)||(0,i.A)(e)||(0,a.A)()}},65710:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},25134:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77987);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},72367:(e,t,n)=>{"use strict";n.d(t,{B1:()=>r});function r(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}Math.min,Math.max;const o=["top","right","bottom","left"];o.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[])},9725:(e,t,n)=>{"use strict";n.d(t,{ll:()=>w});n(72367);function r(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function o(e){if(null==e)return window;if(!r(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){return o(e).getComputedStyle(e)}function a(e){return r(e)?"":e?(e.nodeName||"").toLowerCase():""}function s(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function c(e){return e instanceof o(e).HTMLElement}function u(e){return e instanceof o(e).Element}function l(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}function d(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=i(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function p(){return!/^((?!chrome|android).)*safari/i.test(s())}function f(e){return["html","body","#document"].includes(a(e))}Math.min,Math.max;const m=Math.round;function h(e,t,n){var r,i,a,s;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let d=1,f=1;t&&c(e)&&(d=e.offsetWidth>0&&m(l.width)/e.offsetWidth||1,f=e.offsetHeight>0&&m(l.height)/e.offsetHeight||1);const h=u(e)?o(e):window,g=!p()&&n,y=(l.left+(g&&null!=(r=null==(i=h.visualViewport)?void 0:i.offsetLeft)?r:0))/d,v=(l.top+(g&&null!=(a=null==(s=h.visualViewport)?void 0:s.offsetTop)?a:0))/f,b=l.width/d,w=l.height/f;return{width:b,height:w,top:v,right:y+b,bottom:v+w,left:y,x:y,y:v}}function g(e){return(t=e,(t instanceof o(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function y(e){if("html"===a(e))return e;const t=e.assignedSlot||e.parentNode||(l(e)?e.host:null)||g(e);return l(t)?t.host:t}function v(e){const t=y(e);return f(t)?e.ownerDocument.body:c(t)&&d(t)?t:v(t)}function b(e,t){var n;void 0===t&&(t=[]);const r=v(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=o(r),s=i?[a].concat(a.visualViewport||[],d(r)?r:[]):r,c=t.concat(s);return i?c:c.concat(b(s))}function w(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,c=o&&!s,l=c||i?[...u(e)?b(e):e.contextElement?b(e.contextElement):[],...b(t)]:[];l.forEach((e=>{c&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let d,p=null;if(a){let r=!0;p=new ResizeObserver((()=>{r||n(),r=!1})),u(e)&&!s&&p.observe(e),u(e)||!e.contextElement||s||p.observe(e.contextElement),p.observe(t)}let f=s?h(e):null;return s&&function t(){const r=h(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{c&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(d)}}},92149:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(4883),o=n(81845),i=n(2418);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const s=["onUpdate","onRepositioned","renderElement","renderElementTag","renderElementTo","renderTarget","className","id","style"];class c extends r.Component{constructor(...e){super(...e),this._targetNode=r.createRef(),this._elementNode=r.createRef(),this._elementParentNode=null,this._tetherInstance=null}componentDidMount(){this._createContainer(),this.forceUpdate()}componentDidUpdate(e){if(e.renderElementTag===this.props.renderElementTag&&e.renderElementTo===this.props.renderElementTo||this._createContainer(),this._elementParentNode&&e.className!==this.props.className){const t=(e.className||"").split(" ").filter((e=>e.length>0)),n=(this.props.className||"").split(" ").filter((e=>e.length>0));this._elementParentNode.classList.remove(...t),this._elementParentNode.classList.add(...n)}this._update()}componentWillUnmount(){this._destroy()}getTetherInstance(){return this._tetherInstance}disable(){var e;null==(e=this._tetherInstance)||e.disable()}enable(){var e;null==(e=this._tetherInstance)||e.enable()}on(e,t,n){this._tetherInstance.on(e,t,n)}once(e,t,n){this._tetherInstance.once(e,t,n)}off(e,t){this._tetherInstance.off(e,t)}position(){var e;null==(e=this._tetherInstance)||e.position()}_runRenders(){let e="function"==typeof this.props.renderTarget?this.props.renderTarget(this._targetNode):null,t="function"==typeof this.props.renderElement?this.props.renderElement(this._elementNode):null;return(0,r.isValidElement)(e)||(e=null),(0,r.isValidElement)(t)||(t=null),{targetComponent:e,elementComponent:t}}_createTetherInstance(e){this._tetherInstance&&this._destroy(),this._tetherInstance=new i(e),this._registerEventListeners()}_destroyTetherInstance(){this._tetherInstance&&(this._tetherInstance.destroy(),this._tetherInstance=null)}_registerEventListeners(){this.on("update",((...e)=>this.props.onUpdate&&this.props.onUpdate.apply(this,e))),this.on("repositioned",((...e)=>this.props.onRepositioned&&this.props.onRepositioned.apply(this,e)))}get _renderNode(){const{renderElementTo:e}=this.props;return"string"==typeof e?document.querySelector(e):e||document.body}_destroy(){this._destroyTetherInstance(),this._removeContainer()}_createContainer(){this._removeContainer();const{renderElementTag:e="div",className:t}=this.props;this._elementParentNode=document.createElement(e),this._elementParentNode.className=t||""}_addContainerToDOM(){this._elementParentNode&&this._renderNode&&this._elementParentNode.parentNode!==this._renderNode&&this._renderNode.append(this._elementParentNode)}_removeContainer(){this._elementParentNode&&this._elementParentNode.parentNode&&this._elementParentNode.remove()}_update(){this._elementNode.current&&this._targetNode.current?this._updateTether():this._destroy()}_updateTether(){var e;const t=this.props,{id:n,style:r}=t,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(t,s),i=a({target:this._targetNode.current,element:this._elementParentNode},o),c=n||"";if(this._elementParentNode&&this._elementParentNode.id!==c&&(this._elementParentNode.id=c),this._elementParentNode&&r){const e=this._elementParentNode.style;for(const t in r)if(e[t]!==r[t]){let n=r[t];n&&(e[t]=n)}}this._addContainerToDOM(),this._tetherInstance?this._tetherInstance.setOptions(i):this._createTetherInstance(i),null==(e=this._tetherInstance)||e.position()}render(){const{targetComponent:e,elementComponent:t}=this._runRenders();return e?r.createElement(r.Fragment,null,e,t&&this._elementParentNode&&o.createPortal(t,this._elementParentNode)):null}}},27346:(e,t,n)=>{"use strict";function r(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}n.d(t,{P:()=>o,Y:()=>i});var o=r(),i=r},14644:(e,t,n)=>{"use strict";function r(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}n.d(t,{HY:()=>u,Qd:()=>s,Tw:()=>f,Zz:()=>p,ve:()=>m,y$:()=>c,zH:()=>d});var o=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),i=()=>Math.random().toString(36).substring(7).split("").join("."),a={INIT:`@@redux/INIT${i()}`,REPLACE:`@@redux/REPLACE${i()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${i()}`};function s(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function c(e,t,n){if("function"!=typeof e)throw new Error(r(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(r(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(r(1));return n(c)(e,t)}let i=e,u=t,l=new Map,d=l,p=0,f=!1;function m(){d===l&&(d=new Map,l.forEach(((e,t)=>{d.set(t,e)})))}function h(){if(f)throw new Error(r(3));return u}function g(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;m();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,m(),d.delete(n),l=null}}}function y(e){if(!s(e))throw new Error(r(7));if(void 0===e.type)throw new Error(r(8));if("string"!=typeof e.type)throw new Error(r(17));if(f)throw new Error(r(9));try{f=!0,u=i(u,e)}finally{f=!1}return(l=d).forEach((e=>{e()})),e}y({type:a.INIT});return{dispatch:y,subscribe:g,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,y({type:a.REPLACE})},[o]:function(){const e=g;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(h())}n();return{unsubscribe:e(n)}},[o](){return this}}}}}function u(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}const o=Object.keys(n);let i;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error(r(12));if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error(r(13))}))}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1;const s={};for(let i=0;i<o.length;i++){const c=o[i],u=n[c],l=e[c],d=u(l,t);if(void 0===d){t&&t.type;throw new Error(r(14))}s[c]=d,a=a||d!==l}return a=a||o.length!==Object.keys(e).length,a?s:e}}function l(e,t){return function(...n){return t(e.apply(this,n))}}function d(e,t){if("function"==typeof e)return l(e,t);if("object"!=typeof e||null===e)throw new Error(r(16));const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=l(o,t))}return n}function p(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function f(...e){return t=>(n,o)=>{const i=t(n,o);let a=()=>{throw new Error(r(15))};const s={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},c=e.map((e=>e(s)));return a=p(...c)(i.dispatch),{...i,dispatch:a}}}function m(e){return s(e)&&"type"in e&&"string"==typeof e.type}}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,c),n.loaded=!0,n.exports}c.m=a,c.amdD=function(){throw new Error("define cannot be used indirect")},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;"object"==typeof a&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,c.d(o,i),o},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,n)=>(c.f[n](e,t),t)),[])),c.u=e=>"chunk-"+({222:"vendor-libphonenumber-js",262:"html-editor",310:"vendor-fontawesome",556:"docs-actions",672:"phone-formatter",722:"code-editor",916:"vendor-icons"}[e]||e)+"."+{103:"76336c407894aed4f8ef",123:"f7fbedae946e51eca0f8",211:"3440a8cf06d93ddf2a22",222:"80540f07b74d90c7030f",262:"2a1be3529076794f6bbc",264:"d086e7b6f5e07f62a05d",310:"5a9ed8cbebd7b6c77c2c",389:"185e13c535962fcbc2f8",556:"b4fac584233336e71fd4",668:"778bea177c4568925c34",672:"0899eb884a0c573f03ce",722:"e630249c129a300afa42",916:"82f39f1e837cce57e8ad",987:"fc556865780dd6692aeb"}[e]+".js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i="tocco-widget-bundle:",c.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,s;if(void 0!==n)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),s&&document.head.appendChild(a)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.j=205,c.p="/",(()=>{var e={205:0};c.f.j=(t,n)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(n=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,s]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(s)s(c)}for(t&&t(n);u<i.length;u++)o=i[u],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=this.webpackChunktocco_widget_bundle=this.webpackChunktocco_widget_bundle||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),c.nc=void 0;var u={};return(()=>{"use strict";c.r(u),c.d(u,{app:()=>t.yA});var e=c(61402),t=c(16855);e.A.registerAppInRegistry(t.yA.name,t.yA.init)})(),u})()));