tocco-widget-bundle 3.13.113 → 3.13.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +6 -0
- package/dist/{chunk-actions.e8dfd2d89d1535101300.js → chunk-actions.bc190594f35968573276.js} +1 -1
- package/dist/ckeditor4/ckeditor-new.js +1 -1
- package/dist/education-portfolio.js +1 -1
- package/dist/entity-browser.js +1 -1
- package/dist/evaluation-execution-participation.js +1 -1
- package/dist/event-registration.js +1 -1
- package/dist/function-mutation.js +1 -1
- package/dist/job-application.js +1 -1
- package/dist/mailing-list.js +1 -1
- package/dist/stint-auction.js +1 -1
- package/dist/user-availability.js +1 -1
- package/dist/user-grades.js +1 -1
- package/dist/wage-view.js +1 -1
- package/package.json +1 -1
package/dist/entity-browser.js
CHANGED
|
@@ -41,4 +41,4 @@ const{entries:r,setPrototypeOf:o,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescr
|
|
|
41
41
|
* LICENSE.md file in the root directory of this source tree.
|
|
42
42
|
*
|
|
43
43
|
* @license MIT
|
|
44
|
-
*/function u(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:o=!1}=e;t=n.map(((e,t)=>l(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=s(null==r?t.length-1:r),a="POP",c=null;function s(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[i]}function l(e,n=null,r){let o=h(t?u().pathname:"/",e,n,r);return p("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function d(e){return"string"==typeof e?e:m(e)}return{get index(){return i},get action(){return a},get location(){return u()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?v(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a="PUSH";let r=l(e,n);i+=1,t.splice(i,t.length,r),o&&c&&c({action:a,location:r,delta:1})},replace(e,n){a="REPLACE";let r=l(e,n);t[i]=r,o&&c&&c({action:a,location:r,delta:0})},go(e){a="POP";let n=s(i+e),r=t[n];i=n,c&&c({action:a,location:r,delta:e})},listen:e=>(c=e,()=>{c=null})}}function l(e={}){return g((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=v(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),h("",{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){p("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function d(e,t){if(!1===e||null==e)throw new Error(t)}function p(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?v(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 v(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,c="POP",u=null,l=d();function d(){return(a.state||{idx:null}).idx}function p(){c="POP";let e=d(),t=null==e?null:e-l;l=e,u&&u({action:c,location:v.location,delta:t})}function m(e){return y(e)}null==l&&(l=0,a.replaceState({...a.state,idx:l},""));let v={get action(){return c},get location(){return e(o,a)},listen(e){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(s,p),u=e,()=>{o.removeEventListener(s,p),u=null}},createHref:e=>t(o,e),createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c="PUSH";let r=h(v.location,e,t);n&&n(r,e),l=d()+1;let s=f(r,l),p=v.createHref(r);try{a.pushState(s,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(p)}i&&u&&u({action:c,location:v.location,delta:1})},replace:function(e,t){c="REPLACE";let r=h(v.location,e,t);n&&n(r,e),l=d();let o=f(r,l),s=v.createHref(r);a.replaceState(o,"",s),i&&u&&u({action:c,location:v.location,delta:0})},go:e=>a.go(e)};return v}function y(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),d(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 b(e){return{defaultValue:e}}var w=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(c(this,o).has(e))return c(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){c(this,o).set(e,t)}};o=new WeakMap;var x=new Set(["lazy","caseSensitive","path","id","index","children"]);var A=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)],c="string"==typeof e.id?e.id:a.join("-");if(d(!0!==e.index||!e.children,"Cannot specify children on an index route"),d(o||!r[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let n={...e,id:c};return r[c]=E(n,t(n)),n}{let n={...e,id:c,children:void 0};return r[c]=E(n,t(n)),e.children&&(n.children=O(e.children,t,a,r,o)),n}}))}function E(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=z(("string"==typeof t?v(t):t).pathname||"/",n);if(null==o)return null;let i=T(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=U(o);a=F(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 T(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,c)=>{let s={relativePath:void 0===c?e.path||"":c,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&a)return;d(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let u=J([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(d(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),T(e.children,t,l,u,a)),(null!=e.path||e.index)&&t.push({path:u,score:L(u,e.index),routesMeta:l})};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("/")),c=[];return c.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&c.push(...a),c.map((t=>e.startsWith("/")&&""===t?"/":t))}var C=/^:[\w-]+$/,_=3,R=2,N=1,D=10,M=-2,I=e=>"*"===e;function L(e,t){let n=e.split("/"),r=n.length;return n.some(I)&&(r+=M),t&&(r+=R),n.filter((e=>!I(e))).reduce(((e,t)=>e+(C.test(t)?_:""===t?N:D)),r)}function F(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let c=r[e],s=e===r.length-1,u="/"===i?t:t.slice(i.length)||"/",l=H({path:c.relativePath,caseSensitive:c.caseSensitive,end:s},u),d=c.route;if(!l&&s&&n&&!r[r.length-1].route.index&&(l=H({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},u)),!l)return null;Object.assign(o,l.params),a.push({params:o,pathname:J([i,l.pathname]),pathnameBase:X(J([i,l.pathnameBase])),route:d}),"/"!==l.pathnameBase&&(i=J([i,l.pathnameBase]))}return a}function H(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=B(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=c[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=c[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function B(e,t=!1,n=!0){p("*"===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 U(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return p(!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 z(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 W=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$=e=>W.test(e);function q(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 G(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 Y(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function V(e){let t=Y(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function K(e,t,n,r=!1){let o;"string"==typeof e?o=v(e):(o={...e},d(!o.pathname||!o.pathname.includes("?"),G("?","pathname","search",o)),d(!o.pathname||!o.pathname.includes("#"),G("#","pathname","hash",o)),d(!o.search||!o.search.includes("#"),G("#","search","hash",o)));let i,a=""===e||""===o.pathname,c=a?"/":o.pathname;if(null==c)i=n;else{let e=t.length-1;if(!r&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?v(e):e;if(r)if($(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),p(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?q(r.substring(1),"/"):q(r,t)}else n=t;return{pathname:n,search:Q(o),hash:Z(i)}}(o,i),u=c&&"/"!==c&&c.endsWith("/"),l=(a||"."===c)&&n.endsWith("/");return s.pathname.endsWith("/")||!u&&!l||(s.pathname+="/"),s}var J=e=>e.join("/").replace(/\/\/+/g,"/"),X=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var ee=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 te(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ne(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var re="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function oe(e,t){let n=e;if("string"!=typeof n||!W.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(re)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=z(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){p(!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 ie=Symbol("Uninstrumented");function ae(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=ce(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=ce(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[ie]??o,i=ce(n[e],t,((...e)=>ue(e[0])));i&&("loader"===e&&!0===t.hydrate&&(i.hydrate=!0),i[ie]=t,r[e]=i)}})),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map((e=>{let t=e[ie]??e,r=ce(n.middleware,t,((...e)=>ue(e[0])));return r?(r[ie]=t,r):e}))),r}function ce(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,c=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=se(e,t,n,r-1),o=await a,d(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await i(c,t)}catch(e){console.error("An instrumentation function threw an error:",e)}a||await c(),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 ue(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:de(t),params:{...r},unstable_pattern:o,context:pe(n)}}function le(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 de(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function pe(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")===fe}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var fe=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var he=["POST","PUT","PATCH","DELETE"],me=new Set(he),ve=["GET",...he],ge=new Set(ve),ye=new Set([301,302,303,307,308]),be=new Set([307,308]),we={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ae={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Oe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ee="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;d(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),...ae(t.map((e=>e.route)).filter(Boolean),e)})}let a,c={},s=O(e.routes,i,void 0,c),u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let l,f,v=e.dataStrategy||He,g={...e.future},b=null,x=new Set,A=null,E=null,T=null,P=null!=e.hydrationData,C=k(s,e.history.location,u),_=!1,R=null;if(null!=C||e.patchRoutesOnNavigation){if(C&&!e.hydrationData){We(C,s,e.history.location.pathname).active&&(C=null)}if(C)if(C.some((e=>e.route.lazy)))l=!1;else if(C.some((e=>Ce(e.route)))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=C.findIndex((e=>void 0!==n[e.route.id]));l=C.slice(0,e+1).every((e=>!_e(e.route,t,n)))}else l=C.every((e=>!_e(e.route,t,n)))}else l=!0;else{l=!1,C=[];let t=We(null,s,e.history.location.pathname);t.active&&t.matches&&(_=!0,C=t.matches)}}else{let t=at(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=it(s);l=!0,C=n,R={[r.id]:t}}let N,D,M={historyAction:e.history.action,location:e.history.location,matches:C,initialized:l,navigation:we,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||R,fetchers:new Map,blockers:new Map},I="POP",L=null,F=!1,H=!1,B=new Map,U=null,W=!1,q=!1,G=new Set,Y=new Map,V=0,K=-1,J=new Map,X=new Set,Q=new Map,Z=new Map,ee=new Set,ne=new Map,re=null;function oe(e,t={}){e.matches&&(e.matches=e.matches.map((e=>{let t=c[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}))),M={...M,...e};let n=[],r=[];M.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ee.has(t)?n.push(t):r.push(t))})),ee.forEach((e=>{M.fetchers.has(e)||Y.has(e)||n.push(e)})),[...x].forEach((r=>r(M,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>ke(e))),r.forEach((e=>M.fetchers.delete(e)))}function se(t,n,{flushSync:r}={}){let o,i=null!=M.actionData&&null!=M.navigation.formMethod&&bt(M.navigation.formMethod)&&"loading"===M.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?M.actionData:null;let c=n.loaderData?nt(M.loaderData,n.loaderData,n.matches||[],n.errors):M.loaderData,u=M.blockers;u.size>0&&(u=new Map(u),u.forEach(((e,t)=>u.set(t,Ae))));let l,d=!W&&ze(t,n.matches||M.matches),p=!0===F||null!=M.navigation.formMethod&&bt(M.navigation.formMethod)&&!0!==t.state?._isRedirect;if(a&&(s=a,a=void 0),W||"POP"===I||("PUSH"===I?e.history.push(t,t.state):"REPLACE"===I&&e.history.replace(t,t.state)),"POP"===I){let e=B.get(M.location.pathname);e&&e.has(t.pathname)?l={currentLocation:M.location,nextLocation:t}:B.has(t.pathname)&&(l={currentLocation:t,nextLocation:M.location})}else if(H){let e=B.get(M.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),B.set(M.location.pathname,e)),l={currentLocation:M.location,nextLocation:t}}oe({...n,actionData:o,loaderData:c,historyAction:I,location:t,initialized:!0,navigation:we,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:p,blockers:u},{viewTransitionOpts:l,flushSync:!0===r}),I="POP",F=!1,H=!1,W=!1,q=!1,L?.resolve(),L=null,re?.resolve(),re=null}async function ue(t,n,o){N&&N.abort(),N=null,I=t,W=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(A&&T){let n=Ue(e,t);A[n]=T()}}(M.location,M.matches),F=!0===(o&&o.preventScrollReset),H=!0===(o&&o.enableViewTransition);let l=a||s,d=o&&o.overrideNavigation,p=o?.initialHydration&&M.matches&&M.matches.length>0&&!_?M.matches:k(l,n,u),f=!0===(o&&o.flushSync);if(p&&M.initialized&&!q&&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}(M.location,n)&&!(o&&o.submission&&bt(o.submission.formMethod)))return void se(n,{matches:p},{flushSync:f});let h=We(p,l,n.pathname);if(h.active&&h.matches&&(p=h.matches),!p){let{error:e,notFoundMatches:t,route:r}=Be(n.pathname);return void se(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}N=new AbortController;let m,v=Xe(e.history,n,N.signal,o&&o.submission),g=e.getContext?await e.getContext():new w;if(o&&o.pendingError)m=[ot(p).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&bt(o.submission.formMethod)){let t=await async function(t,n,o,a,l,d,p,f={}){me();let h,m=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(oe({navigation:m},{flushSync:!0===f.flushSync}),d){let e=await $e(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}=it(s);return{matches:t,pendingActionResult:[n.id,{type:"error",error:e.error}]}}let t=ot(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}=Be(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:t}]}}a=e.matches}let v=xt(a,n);if(v.route.action||v.route.lazy){let e=qe(i,c,t,a,v,p?[]:r,l),n=await fe(t,e,l,null);if(h=n[v.route.id],!h)for(let e of a)if(n[e.route.id]){h=n[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else h={type:"error",error:at(405,{method:t.method,pathname:n.pathname,routeId:v.route.id})};if(ht(h)){let n;if(f&&null!=f.replace)n=f.replace;else{n=Je(h.response.headers.get("Location"),new URL(t.url),u,e.history)===M.location.pathname+M.location.search}return await pe(t,h,!0,{submission:o,replace:n}),{shortCircuited:!0}}if(ft(h)){let e=ot(a,v.route.id);return!0!==(f&&f.replace)&&(I="PUSH"),{matches:a,pendingActionResult:[e.route.id,h,v.route.id]}}return{matches:a,pendingActionResult:[v.route.id,h]}}(v,n,o.submission,p,g,h.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ft(r)&&te(r.error)&&404===r.error.status)return N=null,void se(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,m=t.pendingActionResult,d=Ot(n,o.submission),f=!1,h.active=!1,v=Xe(e.history,v.url,v.signal)}let{shortCircuited:y,matches:b,loaderData:x,errors:O}=await async function(t,n,o,l,d,p,f,h,m,v,g,y,b){let w=p||Ot(n,f),x=f||h||At(w),A=!W&&!v;if(d){if(A){let e=de(y);oe({navigation:w,...void 0!==e?{actionData:e}:{}},{flushSync:g})}let e=await $e(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}=it(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ot(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=Be(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let O=a||s,{dsMatches:E,revalidatingFetchers:k}=Pe(t,l,i,c,e.history,M,o,x,n,v?[]:r,!0===v,q,G,ee,Q,X,O,u,null!=e.patchRoutesOnNavigation,y,b);if(K=++V,!e.dataStrategy&&!E.some((e=>e.shouldLoad))&&!E.some((e=>e.route.middleware&&e.route.middleware.length>0))&&0===k.length){let e=De();return se(n,{matches:o,loaderData:{},errors:y&&ft(y[1])?{[y[0]]:y[1].error}:null,...rt(y),...e?{fetchers:new Map(M.fetchers)}:{}},{flushSync:g}),{shortCircuited:!0}}if(A){let e={};if(!d){e.navigation=w;let t=de(y);void 0!==t&&(e.actionData=t)}k.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=M.fetchers.get(e.key),n=Et(void 0,t?t.data:void 0);M.fetchers.set(e.key,n)})),new Map(M.fetchers)}(k)),oe(e,{flushSync:g})}k.forEach((e=>{Se(e.key),e.controller&&Y.set(e.key,e.controller)}));let S=()=>k.forEach((e=>Se(e.key)));N&&N.signal.addEventListener("abort",S);let{loaderResults:j,fetcherResults:T}=await he(E,k,t,l);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",S);k.forEach((e=>Y.delete(e.key)));let P=ct(j);if(P)return await pe(t,P.result,!0,{replace:m}),{shortCircuited:!0};if(P=ct(T),P)return X.add(P.key),await pe(t,P.result,!0,{replace:m}),{shortCircuited:!0};let{loaderData:C,errors:_}=tt(M,o,j,y,k,T);v&&M.errors&&(_={...M.errors,..._});let R=De(),D=Me(K),I=R||D||k.length>0;return{matches:o,loaderData:C,errors:_,...I?{fetchers:new Map(M.fetchers)}:{}}}(v,n,p,g,h.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,f,m,o&&o.callSiteDefaultShouldRevalidate);y||(N=null,se(n,{matches:b||p,...rt(m),loaderData:x,errors:O}))}function de(e){return e&&!ft(e[1])?{[e[0]]:e[1].data}:M.actionData?0===Object.keys(M.actionData).length?null:M.actionData:void 0}async function pe(r,o,i,{submission:a,fetcherSubmission:c,preventScrollReset:s,replace:l}={}){i||(L?.resolve(),L=null),o.response.headers.has("X-Remix-Revalidate")&&(q=!0);let p=o.response.headers.get("Location");d(p,"Expected a Location header on the redirect Response"),p=Je(p,new URL(r.url),u,e.history);let f=h(M.location,p,{_isRedirect:!0});if(n){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if($(p)){const n=y(p,!0);e=n.origin!==t.location.origin||null==z(n.pathname,u)}if(e)return void(l?t.location.replace(p):t.location.assign(p))}N=null;let m=!0===l||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:v,formAction:g,formEncType:b}=M.navigation;!a&&!c&&v&&g&&b&&(a=At(M.navigation));let w=a||c;if(be.has(o.response.status)&&w&&bt(w.formMethod))await ue(m,f,{submission:{...w,formAction:p},preventScrollReset:s||F,enableViewTransition:i?H:void 0});else{let e=Ot(f,a);await ue(m,f,{overrideNavigation:e,fetcherSubmission:c,preventScrollReset:s||F,enableViewTransition:i?H:void 0})}}async function fe(e,t,n,r){let o,i={};try{o=await Ge(v,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(!bt(e.method))for(let e of t){if("error"===o[e.route.id]?.type)break;o.hasOwnProperty(e.route.id)||M.loaderData.hasOwnProperty(e.route.id)||M.errors&&M.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(pt(r)){let o=r.result;i[n]={type:"redirect",response:Ke(o,e,n,t,u)}}else i[n]=await Ve(r);return i}async function he(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:at(404,{pathname:e.path})}})})));return{loaderResults:await o,fetcherResults:(await i).reduce(((e,t)=>Object.assign(e,t)),{})}}function me(){q=!0,Q.forEach(((e,t)=>{Y.has(t)&&G.add(t),Se(t)}))}function ve(e,t,n={}){M.fetchers.set(e,t),oe({fetchers:new Map(M.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ge(e,t,n,r={}){let o=ot(M.matches,t);ke(e),oe({errors:{[o.route.id]:n},fetchers:new Map(M.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function ye(e){return Z.set(e,(Z.get(e)||0)+1),ee.has(e)&&ee.delete(e),M.fetchers.get(e)||xe}function ke(e){let t=M.fetchers.get(e);!Y.has(e)||t&&"loading"===t.state&&J.has(e)||Se(e),Q.delete(e),J.delete(e),X.delete(e),ee.delete(e),G.delete(e),M.fetchers.delete(e)}function Se(e,t){let n=Y.get(e);n&&(n.abort(t),Y.delete(e))}function Re(e){for(let t of e){let e=kt(ye(t).data);M.fetchers.set(t,e)}}function De(){let e=[],t=!1;for(let n of X){let r=M.fetchers.get(n);d(r,`Expected fetcher: ${n}`),"loading"===r.state&&(X.delete(n),e.push(n),t=!0)}return Re(e),t}function Me(e){let t=[];for(let[n,r]of J)if(r<e){let e=M.fetchers.get(n);d(e,`Expected fetcher: ${n}`),"loading"===e.state&&(Se(n),J.delete(n),t.push(n))}return Re(t),t.length>0}function Ie(e){M.blockers.delete(e),ne.delete(e)}function Le(e,t){let n=M.blockers.get(e)||Ae;d("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(M.blockers);r.set(e,t),oe({blockers:r})}function Fe({currentLocation:e,nextLocation:t,historyAction:n}){if(0===ne.size)return;ne.size>1&&p(!1,"A router only supports one blocker at a time");let r=Array.from(ne.entries()),[o,i]=r[r.length-1],a=M.blockers.get(o);return a&&"proceeding"===a.state?void 0:i({currentLocation:e,nextLocation:t,historyAction:n})?o:void 0}function Be(e){let t=at(404,{pathname:e}),n=a||s,{matches:r,route:o}=it(n);return{notFoundMatches:r,route:o,error:t}}function Ue(e,t){if(E){return E(e,t.map((e=>j(e,M.loaderData))))||e.key}return e.key}function ze(e,t){if(A){let n=Ue(e,t),r=A[n];if("number"==typeof r)return r}return null}function We(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 $e(t,n,r,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let l=t;for(;;){let t=null==a,d=a||s,p=c;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:o,patch:(e,t)=>{r.aborted||Ne(e,t,d,p,i,!1)}})}catch(e){return{type:"error",error:e,partialMatches:l}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:"aborted"};let f=k(d,n,u),h=null;if(f){if(0===Object.keys(f[0].params).length)return{type:"success",matches:f};if(h=S(d,n,u,!0),!(h&&l.length<h.length&&Ye(l,h.slice(0,l.length))))return{type:"success",matches:f}}if(h||(h=S(d,n,u,!0)),!h||Ye(l,h))return{type:"success",matches:null};l=h}}function Ye(e,t){return e.length===t.length&&e.every(((e,n)=>e.route.id===t[n].route.id))}return f={get basename(){return u},get future(){return g},get state(){return M},get routes(){return s},get window(){return t},initialize:function(){if(b=e.history.listen((({action:t,location:n,delta:r})=>{if(D)return D(),void(D=void 0);p(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=Fe({currentLocation:M.location,nextLocation:n,historyAction:t});if(o&&null!=r){let t=new Promise((e=>{D=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(M.blockers);e.set(o,Ae),oe({blockers:e})}}),L?.resolve(),void(L=null)}return ue(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(Ee);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,B);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ee,JSON.stringify(n))}catch(e){p(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,B);t.addEventListener("pagehide",e),U=()=>t.removeEventListener("pagehide",e)}return M.initialized||ue("POP",M.location,{initialHydration:!0}),f},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,n){if(A=e,T=t,E=n||null,!P&&M.navigation===we){P=!0;let e=ze(M.location,M.matches);null!=e&&oe({restoreScrollPosition:e})}return()=>{A=null,T=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(M.location,M.matches,u,n,r?.fromRouteId,r?.relative),{path:i,submission:a,error:c}=Te(!1,o,r),s=M.location,l=h(M.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&&bt(a.formMethod)&&a.formAction===M.location.pathname+M.location.search&&(p="REPLACE");let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,m=!0===(r&&r.flushSync),v=Fe({currentLocation:s,nextLocation:l,historyAction:p});v?Le(v,{state:"blocked",location:l,proceed(){Le(v,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),t(n,r)},reset(){let e=new Map(M.blockers);e.set(v,Ae),oe({blockers:e})}}):await ue(p,l,{submission:a,pendingError:c,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:r&&r.unstable_defaultShouldRevalidate})},fetch:async function(t,n,o,l){Se(t);let p=!0===(l&&l.flushSync),f=a||s,h=je(M.location,M.matches,u,o,n,l?.relative),m=k(f,h,u),v=We(m,f,h);if(v.active&&v.matches&&(m=v.matches),!m)return void ge(t,n,at(404,{pathname:h}),{flushSync:p});let{path:g,submission:y,error:b}=Te(!0,h,l);if(b)return void ge(t,n,b,{flushSync:p});let x=e.getContext?await e.getContext():new w,A=!0===(l&&l.preventScrollReset);y&&bt(y.formMethod)?await async function(t,n,o,l,p,f,h,m,v,g){me(),Q.delete(t);let y=M.fetchers.get(t);ve(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}(v,y),{flushSync:h});let b=new AbortController,w=Xe(e.history,o,b.signal,v);if(f){let e=await $e(l,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ge(t,n,e.error,{flushSync:h});if(!e.matches)return void ge(t,n,at(404,{pathname:o}),{flushSync:h});l=e.matches}let x=xt(l,o);if(!x.route.action&&!x.route.lazy){let e=at(405,{method:v.formMethod,pathname:o,routeId:n});return void ge(t,n,e,{flushSync:h})}Y.set(t,b);let A=V,O=qe(i,c,w,l,x,r,p),E=await fe(w,O,p,t),S=E[x.route.id];if(!S)for(let e of O)if(E[e.route.id]){S=E[e.route.id];break}if(w.signal.aborted)return void(Y.get(t)===b&&Y.delete(t));if(ee.has(t)){if(ht(S)||ft(S))return void ve(t,kt(void 0))}else{if(ht(S))return Y.delete(t),K>A?void ve(t,kt(void 0)):(X.add(t),ve(t,Et(v)),pe(w,S,!1,{fetcherSubmission:v,preventScrollReset:m}));if(ft(S))return void ge(t,n,S.error)}let j=M.navigation.location||M.location,T=Xe(e.history,j,b.signal),P=a||s,C="idle"!==M.navigation.state?k(P,M.navigation.location,u):M.matches;d(C,"Didn't find any matches after fetcher action");let _=++V;J.set(t,_);let R=Et(v,S.data);M.fetchers.set(t,R);let{dsMatches:D,revalidatingFetchers:L}=Pe(T,p,i,c,e.history,M,C,v,j,r,!1,q,G,ee,Q,X,P,u,null!=e.patchRoutesOnNavigation,[x.route.id,S],g);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=M.fetchers.get(t),r=Et(void 0,n?n.data:void 0);M.fetchers.set(t,r),Se(t),e.controller&&Y.set(t,e.controller)})),oe({fetchers:new Map(M.fetchers)});let F=()=>L.forEach((e=>Se(e.key)));b.signal.addEventListener("abort",F);let{loaderResults:H,fetcherResults:B}=await he(D,L,T,p);if(b.signal.aborted)return;if(b.signal.removeEventListener("abort",F),J.delete(t),Y.delete(t),L.forEach((e=>Y.delete(e.key))),M.fetchers.has(t)){let e=kt(S.data);M.fetchers.set(t,e)}let U=ct(H);if(U)return pe(T,U.result,!1,{preventScrollReset:m});if(U=ct(B),U)return X.add(U.key),pe(T,U.result,!1,{preventScrollReset:m});let{loaderData:z,errors:W}=tt(M,C,H,void 0,L,B);Me(_),"loading"===M.navigation.state&&_>K?(d(I,"Expected pending action"),N&&N.abort(),se(M.navigation.location,{matches:C,loaderData:z,errors:W,fetchers:new Map(M.fetchers)})):(oe({errors:W,loaderData:nt(M.loaderData,z,C,W),fetchers:new Map(M.fetchers)}),q=!1)}(t,n,g,m,x,v.active,p,A,y,l&&l.unstable_defaultShouldRevalidate):(Q.set(t,{routeId:n,path:g}),await async function(t,n,o,a,s,u,l,d,p){let f=M.fetchers.get(t);ve(t,Et(p,f?f.data:void 0),{flushSync:l});let h=new AbortController,m=Xe(e.history,o,h.signal);if(u){let e=await $e(a,new URL(m.url).pathname,m.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ge(t,n,e.error,{flushSync:l});if(!e.matches)return void ge(t,n,at(404,{pathname:o}),{flushSync:l});a=e.matches}let v=xt(a,o);Y.set(t,h);let g=V,y=qe(i,c,m,a,v,r,s),b=await fe(m,y,s,t),w=b[v.route.id];Y.get(t)===h&&Y.delete(t);if(m.signal.aborted)return;if(ee.has(t))return void ve(t,kt(void 0));if(ht(w))return K>g?void ve(t,kt(void 0)):(X.add(t),void await pe(m,w,!1,{preventScrollReset:d}));if(ft(w))return void ge(t,n,w.error);ve(t,kt(w.data))}(t,n,g,m,x,v.active,p,A,y))},revalidate:function(){re||(re=St()),me(),oe({revalidation:"loading"});let e=re.promise;return"submitting"===M.navigation.state?e:"idle"===M.navigation.state?(ue(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),e):(ue(I||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:!0===H}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ye,resetFetcher:function(e,t){Se(e,t?.reason),ve(e,kt(null))},deleteFetcher:function(e){let t=(Z.get(e)||0)-1;t<=0?(Z.delete(e),ee.add(e)):Z.set(e,t),oe({fetchers:new Map(M.fetchers)})},dispose:function(){b&&b(),U&&U(),x.clear(),N&&N.abort(),M.fetchers.forEach(((e,t)=>ke(t))),M.blockers.forEach(((e,t)=>Ie(t)))},getBlocker:function(e,t){let n=M.blockers.get(e)||Ae;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Ie,patchRoutes:function(e,t,n=!1){let r=null==a;Ne(e,t,a||s,c,i,n),r&&(s=[...s],oe({}))},_internalFetchControllers:Y,_internalSetRoutes:function(e){c={},a=O(e,i,void 0,c)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){oe(e)}},e.unstable_instrumentations&&(f=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[ie]??e.navigate,r=ce(n.navigate,t,((...t)=>{let[n,r]=t;return{to:"number"==typeof n||"string"==typeof n?n:n?m(n):".",...le(e,r??{})}}));r&&(r[ie]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[ie]??e.fetch,r=ce(n.fetch,t,((...t)=>{let[n,,r,o]=t;return{href:r??".",fetcherKey:n,...le(e,o??{})}}));r&&(r[ie]=t,e.fetch=r)}return e}(f,e.unstable_instrumentations.map((e=>e.router)).filter(Boolean))),f}function je(e,t,n,r,o,i){let a,c;if(o){a=[];for(let e of t)if(a.push(e),e.route.id===o){c=e;break}}else a=t,c=t[t.length-1];let s=K(r||".",V(a),z(e.pathname,n)||e.pathname,"path"===i);if(null==r&&(s.search=e.search,s.hash=e.hash),(null==r||""===r||"."===r)&&c){let e=wt(s.search);if(c.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();s.search=n?`?${n}`:""}}return"/"!==n&&(s.pathname=function({basename:e,pathname:t}){return"/"===t?e:J([e,t])}({basename:n,pathname:s.pathname})),m(s)}function Te(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:at(405,{method:n.formMethod})};let r,o,i=()=>({path:t,error:at(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),c=st(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!bt(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:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!bt(a))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(d("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=Ze(r);else if(null==n.body)r=new URLSearchParams,o=new FormData;else try{r=new URLSearchParams(n.body),o=Ze(r)}catch(e){return i()}let s={formMethod:a,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(bt(s.formMethod))return{path:t,submission:s};let u=v(t);return e&&u.search&&wt(u.search)&&r.append("index",""),u.search=`?${r}`,{path:m(u),submission:s}}function Pe(e,t,n,r,o,i,a,c,s,u,l,d,p,f,h,m,v,g,y,b,w){let x,A=b?ft(b[1])?b[1].error:b[1].data:void 0,O=o.createURL(i.location),E=o.createURL(s);if(l&&i.errors){let e=Object.keys(i.errors)[0];x=a.findIndex((t=>t.route.id===e))}else if(b&&ft(b[1])){let e=b[0];x=a.findIndex((t=>t.route.id===e))-1}let S=b?b[1].statusCode:void 0,j=S&&S>=400,T={currentUrl:O,currentParams:i.matches[0]?.params||{},nextUrl:E,nextParams:a[0].params,...c,actionResult:A,actionStatus:S},P=ne(a),C=a.map(((o,a)=>{let{route:c}=o,s=null;if(null!=x&&a>x?s=!1:c.lazy?s=!0:Ce(c)?l?s=_e(c,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)&&(s=!0):s=!1,null!==s)return $e(n,r,e,P,o,u,t,s);let p=!1;"boolean"==typeof w?p=w:j?p=!1:(d||O.pathname+O.search===E.pathname+E.search||O.search!==E.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={...T,defaultShouldRevalidate:p},h=Re(o,f);return $e(n,r,e,P,o,u,t,h,f,w)})),_=[];return h.forEach(((e,c)=>{if(l||!a.some((t=>t.route.id===e.routeId))||f.has(c))return;let s=i.fetchers.get(c),h=s&&"idle"!==s.state&&void 0===s.data,b=k(v,e.path,g);if(!b){if(y&&h)return;return void _.push({key:c,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(m.has(c))return;let x=xt(b,e.path),A=new AbortController,O=Xe(o,e.path,A.signal),E=null;if(p.has(c))p.delete(c),E=qe(n,r,O,b,x,u,t);else if(h)d&&(E=qe(n,r,O,b,x,u,t));else{let e;e="boolean"==typeof w?w:!j&&d;let o={...T,defaultShouldRevalidate:e};Re(x,o)&&(E=qe(n,r,O,b,x,u,t,o))}E&&_.push({key:c,routeId:e.routeId,path:e.path,matches:E,match:x,request:O,controller:A})})),{dsMatches:C,revalidatingFetchers:_}}function Ce(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function _e(e,t,n){if(e.lazy)return!0;if(!Ce(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 Re(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Ne(e,t,n,r,o,i){let a;if(e){let t=r[e];d(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),a=t.children}else a=n;let c=[],s=[];if(t.forEach((e=>{let t=a.find((t=>De(e,t)));t?s.push({existingRoute:t,newRoute:e}):c.push(e)})),c.length>0){let t=O(c,o,[e||"_","patch",String(a?.length||"0")],r);a.push(...t)}if(i&&s.length>0)for(let e=0;e<s.length;e++){let{existingRoute:t,newRoute:n}=s[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 De(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=>De(e,t))))))}var Me=new WeakMap,Ie=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(d(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let i=o.lazy[e];if(!i)return;let a=Me.get(o);a||(a={},Me.set(o,a));let c=a[e];if(c)return c;let s=(async()=>{let t=function(e){return x.has(e)}(e),n=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)p(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(n)p(!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]=s,s},Le=new WeakMap;async function Fe(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 He(e){return e.matches.some((e=>e.route.middleware))?Be(e,(()=>Fe(e))):Fe(e)}function Be(e,t){return Ue(e,t,(e=>{if(gt(e))throw e;return e}),lt,(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=ot(r,r[o].route.id).route.id;return Promise.resolve({[i]:{type:"error",result:t}})}}))}async function Ue(e,t,n,r,o){let{matches:i,request:a,params:c,context:s,unstable_pattern:u}=e,l=i.flatMap((e=>e.route.middleware?e.route.middleware.map((t=>[e.route.id,t])):[]));return await ze({request:a,params:c,context:s,unstable_pattern:u},l,t,n,r,o)}async function ze(e,t,n,r,o,i,a=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let s=t[a];if(!s){return await n()}let u,[l,d]=s,p=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let c=await ze(e,t,n,r,o,i,a+1);return u={value:c},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 We(e,t,n,r,o){let i=Ie({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=function(e,t,n,r,o){let i=n[e.id];if(d(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=Le.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{d("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,A.has(o)),c=void 0!==i[e]&&"hasErrorBoundary"!==e;a?p(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):c?p(!c,`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 Le.set(i,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let a,c=Object.keys(e.lazy),s=[];for(let i of c){if(o&&o.includes(i))continue;let c=Ie({key:i,route:e,manifest:n,mapRouteProperties:r});c&&(s.push(c),i===t&&(a=c))}let u=s.length>0?Promise.all(s).then((()=>{})):void 0;return u?.catch((()=>{})),a?.catch((()=>{})),{lazyRoutePromise:u,lazyHandlerPromise:a}}(r.route,bt(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function $e(e,t,n,r,o,i,a,c,s=null,u){let l=!1,d=We(e,t,n,o,i);return{...o,_lazyPromises:d,shouldLoad:c,shouldRevalidateArgs:s,shouldCallHandler:e=>(l=!0,s?Re(o,"boolean"==typeof u?{...s,defaultShouldRevalidate:u}:"boolean"==typeof e?{...s,defaultShouldRevalidate:e}:s):c),resolve(e){let{lazy:t,loader:i,middleware:s}=o.route,u=l||c||e&&!bt(n.method)&&(t||i),p=s&&s.length>0&&!i&&!t;return!u||!bt(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 c,s,u=bt(e.method),l=u?"action":"loader",d=r=>{let o,c=new Promise(((e,t)=>o=t));s=()=>o(),e.signal.addEventListener("abort",s);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,c])};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;c=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 at(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[c]=await Promise.all([d(t),o])}else{if(!t){let t=new URL(e.url);throw at(404,{pathname:t.pathname+t.search})}c=await d(t)}}catch(e){return{type:"error",result:e}}finally{s&&e.signal.removeEventListener("abort",s)}return c}({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:a})}}}function qe(e,t,n,r,o,i,a,c=null){return r.map((s=>s.route.id!==o.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:We(e,t,n,s,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:$e(e,t,n,ne(r),s,i,a,!0,c)))}async function Ge(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:ne(n),params:n[0].params,context:o,matches:n},c=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 Be(t,(()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},s=await e({...a,fetcherKey:r,runClientMiddleware:c});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return s}async function Ye(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 Ve(e){let{result:t,type:n}=e;if(vt(t)){let e;try{e=await Ye(t)}catch(e){return{type:"error",error:e}}return"error"===n?{type:"error",error:new ee(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:ut(t),statusCode:te(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:te(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 Ke(e,t,n,r,o){let i=e.headers.get("Location");if(d(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!$(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($(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!=z(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 Xe(e,t,n,r){let o=e.createURL(st(t)).toString(),i={signal:n};if(r&&bt(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 Ze(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function et(e,t,n,r=!1,o=!1){let i,a={},c=null,s=!1,u={},l=n&&ft(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(d(!ht(f),"Cannot handle redirect results in processLoaderData"),ft(f)){let t=f.error;if(void 0!==l&&(t=l,l=void 0),c=c||{},o)c[p]=t;else{let n=ot(e,p);null==c[n.route.id]&&(c[n.route.id]=t)}r||(a[p]=ke),s||(s=!0,i=te(f.error)?f.error.status:500),f.headers&&(u[p]=f.headers)}else a[p]=f.data,f.statusCode&&200!==f.statusCode&&!s&&(i=f.statusCode),f.headers&&(u[p]=f.headers)})),void 0!==l&&n&&(c={[n[0]]:l},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:c,statusCode:i||200,loaderHeaders:u}}function tt(e,t,n,r,o,i){let{loaderData:a,errors:c}=et(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(d(a,"Did not find corresponding fetcher result"),ft(a)){let t=ot(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:a.error}),e.fetchers.delete(n)}else if(ht(a))d(!1,"Unhandled fetcher revalidation redirect");else{let t=kt(a.data);e.fetchers.set(n,t)}})),{loaderData:a,errors:c}}function nt(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 rt(e){return e?ft(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ot(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 it(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 at(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",c="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&t&&n?c=`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&&(c="Unable to encode submission body")):403===e?(a="Forbidden",c=`Route "${n}" does not match URL "${t}"`):404===e?(a="Not Found",c=`No route matches URL "${t}"`):405===e&&(a="Method Not Allowed",r&&t&&n?c=`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&&(c=`Invalid request method "${r.toUpperCase()}"`)),new ee(e||500,a,new Error(c),!0)}function ct(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(ht(r))return{key:n,result:r}}}function st(e){return m({..."string"==typeof e?v(e):e,hash:""})}function ut(e){return new ee(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function lt(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&dt(t)))}function dt(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function pt(e){return vt(e.result)&&ye.has(e.result.status)}function ft(e){return"error"===e.type}function ht(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 vt(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function gt(e){return vt(e)&&(t=e.status,ye.has(t))&&e.headers.has("Location");var t}function yt(e){return ge.has(e.toUpperCase())}function bt(e){return me.has(e.toUpperCase())}function wt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function xt(e,t){let n="string"==typeof t?v(t).search:t.search;if(e[e.length-1].route.index&&wt(n||""))return e[e.length-1];let r=Y(e);return r[r.length-1]}function At(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 Et(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 Tt=i.createContext(null);Tt.displayName="DataRouterState";var Pt=i.createContext(!1);function Ct(){return i.useContext(Pt)}var _t=i.createContext({isTransitioning:!1});_t.displayName="ViewTransition";var Rt=i.createContext(new Map);Rt.displayName="Fetchers";var Nt=i.createContext(null);Nt.displayName="Await";var Dt=i.createContext(null);Dt.displayName="Navigation";var Mt=i.createContext(null);Mt.displayName="Location";var It=i.createContext({outlet:null,matches:[],isDataRoute:!1});It.displayName="Route";var Lt=i.createContext(null);Lt.displayName="RouteError";var Ft=!0,Ht="REACT_ROUTER_ERROR",Bt="REDIRECT";function Ut(){return null!=i.useContext(Mt)}function zt(){return d(Ut(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(Mt).location}var Wt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $t(e){i.useContext(Dt).static||i.useLayoutEffect(e)}function qt(){let{isDataRoute:e}=i.useContext(It);return e?function(){let{router:e}=rn("useNavigate"),t=an("useNavigate"),n=i.useRef(!1);return $t((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{p(n.current,Wt),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){d(Ut(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(jt),{basename:t,navigator:n}=i.useContext(Dt),{matches:r}=i.useContext(It),{pathname:o}=zt(),a=JSON.stringify(V(r)),c=i.useRef(!1);return $t((()=>{c.current=!0})),i.useCallback(((r,i={})=>{if(p(c.current,Wt),!c.current)return;if("number"==typeof r)return void n.go(r);let s=K(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:J([t,s.pathname])),(i.replace?n.replace:n.push)(s,i.state,i)}),[t,n,a,o,e])}()}i.createContext(null);function Gt(){let{matches:e}=i.useContext(It),t=e[e.length-1];return t?t.params:{}}function Yt(e,{relative:t}={}){let{matches:n}=i.useContext(It),{pathname:r}=zt(),o=JSON.stringify(V(n));return i.useMemo((()=>K(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function Vt(e,t,n,r,o){d(Ut(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(Dt),{matches:c}=i.useContext(It),s=c[c.length-1],u=s?s.params:{},l=s?s.pathname:"/",f=s?s.pathnameBase:"/",h=s&&s.route;if(Ft){let e=h&&h.path||"";pn(l,!h||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (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 m,g=zt();if(t){let e="string"==typeof t?v(t):t;d("/"===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.`),m=e}else m=g;let y=m.pathname||"/",b=y;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=k(e,{pathname:b});Ft&&(p(h||null!=w,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),p(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 "${m.pathname}${m.search}${m.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=tn(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])}))),c,n,r,o);return t&&x?i.createElement(Mt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},x):x}function Kt(){let e=sn(),t=te(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},c=null;return Ft&&(console.error("Error handled by React Router default ErrorBoundary:",e),c=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,c)}var Jt=i.createElement(Kt,null),Xt=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(`${Ht}: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 ee(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i.createElement(It.Provider,{value:this.props.routeContext},i.createElement(Lt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(Zt,{error:e},t):t}};Xt.contextType=Pt;var Qt=new WeakMap;function Zt({children:e,error:t}){let{basename:n}=i.useContext(Dt);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Ht}:${Bt}:{`))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=oe(e.location,n);if(re&&!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 en({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(It.Provider,{value:e},n)}function tn(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,c=n?.errors;if(null!=c){let e=a.findIndex((e=>e.route.id&&void 0!==c?.[e.route.id]));d(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!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){s=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:ne(n.matches),errorInfo:t})}:void 0;return a.reduceRight(((e,r,o)=>{let d,p=!1,f=null,h=null;n&&(d=c&&r.route.id?c[r.route.id]:void 0,f=r.route.errorElement||Jt,s&&(u<0&&0===o?(pn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):u===o&&(p=!0,h=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,o+1)),v=()=>{let t;return t=d?f:p?h:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(en,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(Xt,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):v()}),null)}function nn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rn(e){let t=i.useContext(jt);return d(t,nn(e)),t}function on(e){let t=i.useContext(Tt);return d(t,nn(e)),t}function an(e){let t=function(e){let t=i.useContext(It);return d(t,nn(e)),t}(e),n=t.matches[t.matches.length-1];return d(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function cn(){let{matches:e,loaderData:t}=on("useMatches");return i.useMemo((()=>e.map((e=>j(e,t)))),[e,t])}function sn(){let e=i.useContext(Lt),t=on("useRouteError"),n=an("useRouteError");return void 0!==e?e:t.errors?.[n]}var un=0;function ln(e){let{router:t,basename:n}=rn("useBlocker"),r=on("useBlocker"),[o,a]=i.useState(""),c=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:z(r.pathname,n)||r.pathname},nextLocation:{...o,pathname:z(o.pathname,n)||o.pathname},historyAction:i})}),[n,e]);return i.useEffect((()=>{let e=String(++un);return a(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,c)}),[t,o,c]),o&&r.blockers.has(o)?r.blockers.get(o):Ae}var dn={};function pn(e,t,n){t||dn[e]||(dn[e]=!0,p(!1,n))}var fn={};function hn(e,t){e||fn[t]||(fn[t]=!0,console.warn(t))}var mn=(r||(r=n.t(i,2))).useOptimistic,vn=()=>{};function gn(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(Ft&&e.element&&p(!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&&(Ft&&e.hydrateFallbackElement&&p(!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&&(Ft&&e.errorElement&&p(!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 yn=["HydrateFallback","hydrateFallbackElement"];function bn(e,t){return Se({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:u({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,hydrationRouteProperties:yn,mapRouteProperties:gn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}var wn=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 xn({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){let o=Ct();r=o||r;let[a,c]=i.useState(e.state),[s,u]=(l=a,mn?mn(l):[l,vn]);var l;let[d,p]=i.useState(),[f,h]=i.useState({isTransitioning:!1}),[m,v]=i.useState(),[g,y]=i.useState(),[b,w]=i.useState(),x=i.useRef(new Map),A=i.useCallback(((o,{deletedFetchers:a,newErrors:s,flushSync:l,viewTransitionOpts:d})=>{s&&n&&Object.values(s).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},unstable_pattern:ne(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)})),a.forEach((e=>x.current.delete(e))),hn(!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(hn(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((()=>{g&&(m?.resolve(),g.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>c(o)))}));return n.finished.finally((()=>{t((()=>{v(void 0),y(void 0),p(void 0),h({isTransitioning:!1})}))})),void t((()=>y(n)))}g?(m?.resolve(),g.skipTransition(),w({state:o,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(p(o),h({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&l?t((()=>c(o))):!1===r?c(o):i.startTransition((()=>{!0===r&&u((e=>An(e,o))),c(o)}))}),[e.window,t,g,m,r,u,n]);i.useLayoutEffect((()=>e.subscribe(A)),[e,A]),i.useEffect((()=>{f.isTransitioning&&!f.flushSync&&v(new wn)}),[f]),i.useEffect((()=>{if(m&&d&&e.window){let t=d,n=m.promise,o=e.window.document.startViewTransition((async()=>{!1===r?c(t):i.startTransition((()=>{!0===r&&u((e=>An(e,t))),c(t)})),await n}));o.finished.finally((()=>{v(void 0),y(void 0),p(void 0),h({isTransitioning:!1})})),y(o)}}),[d,m,e.window,r,u]),i.useEffect((()=>{m&&d&&s.location.key===d.location.key&&m.resolve()}),[m,g,s.location,d]),i.useEffect((()=>{!f.isTransitioning&&b&&(p(b.state),h({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))}),[f.isTransitioning,b]);let O=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]),E=e.basename||"/",k=i.useMemo((()=>({router:e,navigator:O,static:!1,basename:E,onError:n})),[e,O,E,n]);return i.createElement(i.Fragment,null,i.createElement(jt.Provider,{value:k},i.createElement(Tt.Provider,{value:s},i.createElement(Rt.Provider,{value:x.current},i.createElement(_t.Provider,{value:f},i.createElement(Sn,{basename:E,location:s.location,navigationType:s.historyAction,navigator:O,unstable_useTransitions:r},i.createElement(On,{routes:e.routes,future:e.future,state:s,onError:n})))))),null)}function An(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 On=i.memo((function({routes:e,future:t,state:n,onError:r}){return Vt(e,void 0,n,r,t)}));function En({to:e,replace:t,state:n,relative:r}){d(Ut(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(Dt);p(!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(It),{pathname:c}=zt(),s=qt(),u=K(e,V(a),c,"path"===r),l=JSON.stringify(u);return i.useEffect((()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})}),[s,l,r,t,n]),null}function kn(e){d(!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 Sn({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:c}){d(!Ut(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=i.useMemo((()=>({basename:s,navigator:o,static:a,unstable_useTransitions:c,future:{}})),[s,o,a,c]);"string"==typeof n&&(n=v(n));let{pathname:l="/",search:f="",hash:h="",state:m=null,key:g="default"}=n,y=i.useMemo((()=>{let e=z(l,s);return null==e?null:{location:{pathname:e,search:f,hash:h,state:m,key:g},navigationType:r}}),[s,l,f,h,m,g,r]);return p(null!=y,`<Router basename="${s}"> is not able to match the URL "${l}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),null==y?null:i.createElement(Dt.Provider,{value:u},i.createElement(Mt.Provider,{children:t,value:y}))}function jn({children:e,location:t}){return Vt(Tn(e),t)}i.Component;function Tn(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,Tn(e.props.children,o));d(e.type===kn,`[${"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>`),d(!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=Tn(e.props.children,o)),n.push(a)})),n}var Pn="get",Cn="application/x-www-form-urlencoded";function _n(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Rn(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}var Nn=null;var Dn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mn(e){return null==e||Dn.has(e)?e:(p(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Cn}"`),null)}function In(e,t){let n,r,o,i,a;if(function(e){return _n(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?z(a,t):null,n=e.getAttribute("method")||Pn,o=Mn(e.getAttribute("enctype"))||Cn,i=new FormData(e)}else if(function(e){return _n(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return _n(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 c=e.getAttribute("formaction")||a.getAttribute("action");if(r=c?z(c,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Pn,o=Mn(e.getAttribute("formenctype"))||Mn(a.getAttribute("enctype"))||Cn,i=new FormData(a,e),!function(){if(null===Nn)try{new FormData(document.createElement("form"),0),Nn=!1}catch(e){Nn=!0}return Nn}()){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(_n(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Pn,r=null,o=Cn,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;var Ln={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Fn=/[&><\u2028\u2029]/g;function Hn(e){return e.replace(Fn,(e=>Ln[e]))}function Bn(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function Un(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&&"/"===z(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function zn(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 Wn(e){return null!=e&&"string"==typeof e.page}function $n(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 qn(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,c=(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)||c(e,t))):"data"===i?t.filter(((t,i)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(a(t,i)||c(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 Gn(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 Yn(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Wn(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 Vn(e,t){return"lazy"===e.mode&&!0===t}function Kn(){let e=i.useContext(jt);return Bn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Jn(){let e=i.useContext(Tt);return Bn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Xn=i.createContext(void 0);function Qn(){let e=i.useContext(Xn);return Bn(e,"You must render this element inside a <HydratedRouter> element"),e}function Zn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function er(e,t,n){if(n&&!or)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}Xn.displayName="FrameworkContext";function tr({page:e,...t}){let{router:n}=Kn(),r=i.useMemo((()=>k(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(rr,{page:e,matches:r,...t}):null}function nr(e){let{manifest:t,routeModules:n}=Qn(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return async function(e,t,n){return Yn((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await zn(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter($n).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 rr({page:e,matches:t,...n}){let r=zt(),{future:o,manifest:a,routeModules:c}=Qn(),{basename:s}=Kn(),{loaderData:u,matches:l}=Jn(),d=i.useMemo((()=>qn(e,t,l,a,r,"data")),[e,t,l,a,r]),p=i.useMemo((()=>qn(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&&c[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let l=Un(e,s,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]}),[s,o.unstable_trailingSlashAwareDataRequests,u,r,a,d,t,e,c]),h=i.useMemo((()=>Gn(p,a)),[p,a]),m=nr(p);return i.createElement(i.Fragment,null,f.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),h.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),m.map((({key:e,link:t})=>i.createElement("link",{key:e,nonce:n.nonce,...t}))))}var or=!1;function ir(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:a,ssr:c}=Qn(),{router:s,static:u,staticContext:l}=Kn(),{matches:d}=Jn(),p=Ct(),f=Vn(a,c);o&&(o.didRenderScripts=!0);let h=er(d,null,r);i.useEffect((()=>{!0}),[]);let m=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${h.map(((e,n)=>{let r=`route${n}`,o=t.routes[e.route.id];Bn(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:c,hydrateFallbackModule:s,module:u}=o,l=[...i?[{module:i,varName:`${r}_clientAction`}]:[],...a?[{module:a,varName:`${r}_clientLoader`}]:[],...c?[{module:c,varName:`${r}_clientMiddleware`}]:[],...s?[{module:s,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,s),null,2)};`:""}\n window.__reactRouterRouteModules = {${h.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}))}),[]),v=or||p?[]:function(e){return[...new Set(e)]}(t.entry.imports.concat(Gn(h,t,{includeHydrateFallback:!0}))),g="object"==typeof t.sri?t.sri:{};return hn(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),or||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:g})}}):null,f?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:g[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:g[t.entry.module],suppressHydrationWarning:!0}),v.map((t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:g[t],suppressHydrationWarning:!0}))),m)}function ar(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}i.Component;function cr({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(te(e))return i.createElement(sr,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),Ft?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(sr,{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 sr({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Qn();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(ir,null):null)))}var ur="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ur&&(window.__reactRouterVersion="7.12.0")}catch(e){}function lr(e,t){return Se({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:l({window:t?.window}),hydrationData:t?.hydrationData||dr(),routes:e,mapRouteProperties:gn,hydrationRouteProperties:yn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function dr(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:pr(e.errors)}),e}function pr(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 ee(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 fr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hr=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:c,target:s,to:u,preventScrollReset:l,viewTransition:p,unstable_defaultShouldRevalidate:f,...h},v){let{basename:g,unstable_useTransitions:y}=i.useContext(Dt),b="string"==typeof u&&fr.test(u),w=oe(u,g),x=function(e,{relative:t}={}){d(Ut(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(Dt),{hash:o,pathname:a,search:c}=Yt(e,{relative:t}),s=a;return"/"!==n&&(s="/"===a?n:J([n,a])),r.createHref({pathname:s,search:c,hash:o})}(u=w.to,{relative:r}),[A,O,E]=function(e,t){let n=i.useContext(Xn),[r,o]=i.useState(!1),[a,c]=i.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:l,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&c(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{c(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{c(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let h=()=>{o(!0)},m=()=>{o(!1),c(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:Zn(s,h),onBlur:Zn(u,m),onMouseEnter:Zn(l,h),onMouseLeave:Zn(d,m),onTouchStart:Zn(p,h)}]:[!1,f,{}]}(n,h),k=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:c,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let l=qt(),d=zt(),p=Yt(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:c,unstable_defaultShouldRevalidate:s});u?i.startTransition((()=>h())):h()}}),[d,l,p,n,r,t,e,o,a,c,s,u])}(u,{replace:a,state:c,target:s,preventScrollReset:l,relative:r,viewTransition:p,unstable_defaultShouldRevalidate:f,unstable_useTransitions:y});let S=i.createElement("a",{...h,...E,href:w.absoluteURL||x,onClick:w.isExternal||o?e:function(t){e&&e(t),t.defaultPrevented||k(t)},ref:ar(v,O),target:s,"data-discover":b||"render"!==t?void 0:"true"});return A&&!b?i.createElement(i.Fragment,null,S,i.createElement(tr,{page:x})):S}));hr.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:c,children:s,...u},l){let p=Yt(a,{relative:u.relative}),f=zt(),h=i.useContext(Tt),{navigator:m,basename:v}=i.useContext(Dt),g=null!=h&&function(e,{relative:t}={}){let n=i.useContext(_t);d(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=yr("useViewTransitionState"),o=Yt(e,{relative:t});if(!n.isTransitioning)return!1;let a=z(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=z(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=H(o.pathname,c)||null!=H(o.pathname,a)}(p)&&!0===c,y=m.encodeLocation?m.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&v&&(w=z(w,v)||w);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let A,O=b===y||!r&&b.startsWith(y)&&"/"===b.charAt(x),E=null!=w&&(w===y||!r&&w.startsWith(y)&&"/"===w.charAt(y.length)),k={isActive:O,isPending:E,isTransitioning:g},S=O?e:void 0;A="function"==typeof n?n(k):[n,O?"active":null,E?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let j="function"==typeof o?o(k):o;return i.createElement(hr,{...u,"aria-current":S,className:A,ref:l,style:j,to:a,viewTransition:c},"function"==typeof s?s(k):s)})).displayName="NavLink";var mr=i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:c=Pn,action:s,onSubmit:u,relative:l,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h,...v},g)=>{let{unstable_useTransitions:y}=i.useContext(Dt),b=Or(),w=function(e,{relative:t}={}){let{basename:n}=i.useContext(Dt),r=i.useContext(It);d(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Yt(e||".",{relative:t})},c=zt();if(null==e){a.search=c.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)}(s,{relative:l}),x="get"===c.toLowerCase()?"get":"post",A="string"==typeof s&&fr.test(s);return i.createElement("form",{ref:g,method:x,action:w,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute("formmethod")||c,d=()=>b(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:o,state:a,relative:l,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h});y&&!1!==n?i.startTransition((()=>d())):d()},...v,"data-discover":A||"render"!==e?void 0:"true"})}));function vr({getKey:e,storageKey:t,...n}){let r=i.useContext(Xn),{basename:o}=i.useContext(Dt),a=zt(),c=cn();!function({getKey:e,storageKey:t}={}){let{router:n}=yr("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:o}=br("useScrollRestoration"),{basename:a}=i.useContext(Dt),c=zt(),s=cn(),u=on("useNavigation").navigation;i.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:n}=t||{};i.useEffect((()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,n])}(i.useCallback((()=>{if("idle"===u.state){let t=Sr(c,s,a,e);kr[t]=window.scrollY}try{sessionStorage.setItem(t||Er,JSON.stringify(kr))}catch(e){p(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration="auto"}),[u.state,e,a,c,s,t])),"undefined"!=typeof document&&(i.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(t||Er);e&&(kr=JSON.parse(e))}catch(e){}}),[t]),i.useLayoutEffect((()=>{let t=n?.enableScrollRestoration(kr,(()=>window.scrollY),e?(t,n)=>Sr(t,n,a,e):void 0);return()=>t&&t()}),[n,a,e]),i.useLayoutEffect((()=>{if(!1!==r)if("number"!=typeof r){try{if(c.hash){let e=document.getElementById(decodeURIComponent(c.hash.slice(1)));if(e)return void e.scrollIntoView()}}catch{p(!1,`"${c.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}!0!==o&&window.scrollTo(0,0)}else window.scrollTo(0,r)}),[c,r,o]))}({getKey:e,storageKey:t});let s=i.useMemo((()=>{if(!r||!e)return null;let t=Sr(a,c,o,e);return t!==a.key?t:null}),[]);if(!r||r.isSpaMode)return null;let u=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},"")}try{let n=JSON.parse(sessionStorage.getItem(e)||"{}")[t||window.history.state.key];"number"==typeof n&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return i.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${u})(${Hn(JSON.stringify(t||Er))}, ${Hn(JSON.stringify(s))})`}})}function gr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yr(e){let t=i.useContext(jt);return d(t,gr(e)),t}function br(e){let t=i.useContext(Tt);return d(t,gr(e)),t}function wr(e){p("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(Rn(e)),n=i.useRef(!1),r=zt(),o=i.useMemo((()=>function(e,t){let n=Rn(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=qt(),c=i.useCallback(((e,t)=>{const r=Rn("function"==typeof e?e(new URLSearchParams(o)):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,c]}mr.displayName="Form",vr.displayName="ScrollRestoration";var xr=0,Ar=()=>`__${String(++xr)}__`;function Or(){let{router:e}=yr("useSubmit"),{basename:t}=i.useContext(Dt),n=an("useRouteId"),r=e.fetch,o=e.navigate;return i.useCallback((async(e,i={})=>{let{action:a,method:c,encType:s,formData:u,body:l}=In(e,t);if(!1===i.navigate){let e=i.fetcherKey||Ar();await r(e,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||c,formEncType:i.encType||s,flushSync:i.flushSync})}else await o(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||c,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[r,o,t,n])}var Er="react-router-scroll-positions",kr={};function Sr(e,t,n,r){let o=null;return r&&(o=r("/"!==n?{...e,pathname:z(e.pathname,n)||e.pathname}:e,t)),null==o&&(o=e.key),o}},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})},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})},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,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)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})},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})},52167:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6695),o=n(21648),i=n(25134),a=n(37820);function c(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})},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 c(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function s(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(c())}function f(e){return["html","body","#document"].includes(a(e))}Math.min,Math.max;const h=Math.round;function m(e,t,n){var r,i,a,c;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let d=1,f=1;t&&s(e)&&(d=e.offsetWidth>0&&h(l.width)/e.offsetWidth||1,f=e.offsetHeight>0&&h(l.height)/e.offsetHeight||1);const m=u(e)?o(e):window,v=!p()&&n,g=(l.left+(v&&null!=(r=null==(i=m.visualViewport)?void 0:i.offsetLeft)?r:0))/d,y=(l.top+(v&&null!=(a=null==(c=m.visualViewport)?void 0:c.offsetTop)?a:0))/f,b=l.width/d,w=l.height/f;return{width:b,height:w,top:y,right:g+b,bottom:y+w,left:g,x:g,y}}function v(e){return(t=e,(t instanceof o(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function g(e){if("html"===a(e))return e;const t=e.assignedSlot||e.parentNode||(l(e)?e.host:null)||v(e);return l(t)?t.host:t}function y(e){const t=g(e);return f(t)?e.ownerDocument.body:s(t)&&d(t)?t:y(t)}function b(e,t){var n;void 0===t&&(t=[]);const r=y(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=o(r),c=i?[a].concat(a.visualViewport||[],d(r)?r:[]):r,s=t.concat(c);return i?s:s.concat(b(c))}function w(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:c=!1}=r,s=o&&!c,l=s||i?[...u(e)?b(e):e.contextElement?b(e.contextElement):[],...b(t)]:[];l.forEach((e=>{s&&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)&&!c&&p.observe(e),u(e)||!e.contextElement||c||p.observe(e.contextElement),p.observe(t)}let f=c?m(e):null;return c&&function t(){const r=m(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=>{s&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(d)}}},92149:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});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 c=["onUpdate","onRepositioned","renderElement","renderElementTag","renderElementTo","renderTarget","className","id","style"];class s 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,c),i=a({target:this._targetNode.current,element:this._elementParentNode},o),s=n||"";if(this._elementParentNode&&this._elementParentNode.id!==s&&(this._elementParentNode.id=s),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:()=>c,Tw:()=>f,Zz:()=>p,ve:()=>h,y$:()=>s,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 c(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 s(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(s)(e,t)}let i=e,u=t,l=new Map,d=l,p=0,f=!1;function h(){d===l&&(d=new Map,l.forEach(((e,t)=>{d.set(t,e)})))}function m(){if(f)throw new Error(r(3));return u}function v(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;h();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,h(),d.delete(n),l=null}}}function g(e){if(!c(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}g({type:a.INIT});return{dispatch:g,subscribe:v,getState:m,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,g({type:a.REPLACE})},[o]:function(){const e=v;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(m())}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 c={};for(let i=0;i<o.length;i++){const s=o[i],u=n[s],l=e[s],d=u(l,t);if(void 0===d){t&&t.type;throw new Error(r(14))}c[s]=d,a=a||d!==l}return a=a||o.length!==Object.keys(e).length,a?c: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 c={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map((e=>e(c)));return a=p(...s)(i.dispatch),{...i,dispatch:a}}}function h(e){return c(e)&&"type"in e&&"string"==typeof e.type}}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=a,s.amdD=function(){throw new Error("define cannot be used indirect")},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.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);s.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,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"chunk-"+({222:"vendor-libphonenumber-js",236:"actions",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",236:"e8dfd2d89d1535101300",262:"2a1be3529076794f6bbc",264:"d086e7b6f5e07f62a05d",280:"1510eb8a8214f553a761",310:"5a9ed8cbebd7b6c77c2c",389:"185e13c535962fcbc2f8",556:"b4fac584233336e71fd4",651:"77319c414b403d20f608",668:"778bea177c4568925c34",672:"0899eb884a0c573f03ce",722:"e630249c129a300afa42",827:"d6342ceea1e020947fbc",916:"82f39f1e837cce57e8ad",987:"fc556865780dd6692aeb"}[e]+".js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.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),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i="tocco-widget-bundle:",s.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,c;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||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.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),c&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=101,s.p="/",(()=>{var e={101:0};s.f.j=(t,n)=>{var r=s.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=s.p+s.u(t),a=new Error;s.l(i,(n=>{if(s.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,c]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(c)c(s)}for(t&&t(n);u<i.length;u++)o=i[u],s.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))})(),s.nc=void 0;var u={};return(()=>{"use strict";s.r(u),s.d(u,{app:()=>qe});var e=s(61402),t=s(26396),n=s.n(t),r=s(62193),o=s.n(r),i=s(2404),a=s.n(i),c=s(71086),l=s.n(c),d=s(5556),p=s.n(d),f=s(4883),h=s.n(f),m=s(3433),v=s(52600),g=s(88951),y=s(13128),b=s(59042),w=s(28391),x=s(96450),A=s(72942),O=s(52334),E=s(82682),k=s(38159),S=s(33393),j=s(7311),T=s(66498),P=s(35301),C=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return T.A.getDispatchActions(e,_,t)},_=[{name:"entityName",action:P.Zl,mandatory:!0,argsFactory:function(e){return[e.entityName]}},{name:"entityName",action:P.uO,argsFactory:function(e){return[e.formBase||e.entityName]}},{name:"formBase",action:P.uO,argsFactory:function(e){return[e.formBase]}},{name:"scrollBehaviour",action:P.Zy,argsFactory:function(e){return[e.scrollBehaviour]}},{name:"id",action:P.RH,argsFactory:function(e){return[e.id||(new Date).valueOf()]}}],R=s(44467),N=s(92207),D=s.n(N),M=s(90167),I=s(29056),L=s(71635),F=n()(n()({},L.Bt,I.A.singleTransferReducer("formTouched")),L.wr,I.A.singleTransferReducer("detailParams")),H={detailParams:void 0,formTouched:!1};var B=s(15890),U=s.n(B),z=s(22056),W=s.n(z),$=s(32742),q=s(57327),G=s(27399);function Y(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 V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var K=function(e){var t={};return e.fields.forEach((function(e){t[e.fieldName]=V({},e)})),e.relations.forEach((function(e){t[e.relationName]=V({type:"relation"},e)})),t};function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K;return D().mark((function n(){var r;return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,M.T1)(q.A.requestSaga,"entities/".concat(e,"/model"));case 2:return r=n.sent,n.next=5,(0,M.T1)(t,r.body);case 5:return n.abrupt("return",n.sent);case 6:case"end":return n.stop()}}),n)}))()}var X={CREATE:"create",UPDATE:"update"};const Q={modes:X,getMode:function(e){return void 0===e?X.CREATE:X.UPDATE}};var Z=s(21259),ee=s.n(Z);const te=function(e){var t=e.split("/").filter((function(e){return!!e})),n=t[t.length-1],r=t.filter((function(e,t){return t>1&&t%2==0})).map((function(e){return e.split(".")})).reduce((function(e,t){return[].concat(ee()(e),ee()(t))}),[]);if(isNaN(n)){return{modelPaths:r,entityId:undefined,parentUrl:"/"+t.slice(0,-1).join("/")}}return{modelPaths:r,entityId:t[t.length-1],parentUrl:"/"+t.slice(0,-2).join("/")}};const ne=function(e,t){return 0!==t.length||(!e||isNaN(e))};var re=s(74848),oe=D().mark(ue),ie=D().mark(le),ae=D().mark(fe),ce=function(e){return e.entityBrowser},se=function(e){return e.input};function ue(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Q7)([(0,M.p8)(L.M4,de),(0,M.p8)(L.z3,le),(0,M.p8)(L.o7,he)]);case 2:case"end":return e.stop()}}),oe)}function le(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.yJ)(L.EJ(void 0));case 2:case"end":return e.stop()}}),ie)}function de(e){var t=e.payload;return D().mark((function e(){var n,r,o,i,a,c,s,u,l,d,p,f,h,m,v,g;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.T1)(te,t.url);case 2:return n=e.sent,r=n.modelPaths,o=n.entityId,i=n.parentUrl,e.next=8,(0,M.Lt)(ce);case 8:return a=e.sent,c=a.entityName,s=a.formBase,e.next=13,(0,M.T1)(Q.getMode,o);case 13:return u=e.sent,e.next=16,(0,M.T1)(pe,c,r,s);case 16:return l=e.sent,d=W()(l,2),p=d[0],f=d[1],e.next=22,(0,M.Lt)(se);case 22:return h=e.sent,m=h.initialKey,e.next=26,(0,M.T1)(ne,m,r);case 26:return v=e.sent,g={mode:u,entityId:o,entityName:p,formName:f,parentUrl:i,showBackButton:v},e.next=30,(0,M.yJ)(L.EJ(g));case 30:case"end":return e.stop()}}),e)}))()}function pe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return D().mark((function o(){var i,a,c,s,u,l,d;return D().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=U()(t),a=i[0],c=i.slice(1),a){o.next=3;break}return o.abrupt("return",[e,r]);case 3:return o.next=5,(0,M.T1)(J,e);case 5:if(s=o.sent,u=s[a]){o.next=16;break}return o.next=10,(0,M.T1)(q.A.fetchForm,"".concat(n,"_detail_").concat(a),"list");case 10:return l=o.sent,o.next=13,(0,M.T1)(pe,l.modelName,c,"".concat(n,"_").concat(a));case 13:case 19:return o.abrupt("return",o.sent);case 16:return d="".concat(n,"_").concat(u.targetEntity),o.next=19,(0,M.T1)(pe,u.targetEntity,c,n,d);case 20:case"end":return o.stop()}}),o)}))()}function fe(e){var t;return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,M.T1)($.Ix);case 2:return t=n.sent,n.next=5,(0,M.yJ)(A.A.modal("navigation-pending-changes","client.entity-browser.detail.confirmTouchedFormTitle",e,(function(e){var n=e.close;return(0,re.jsx)(G.A,{onYes:function(){n(),t.put("yes")},onNo:function(){n(),t.put("no")}})}),!0,(function(){return t.put("no")})));case 5:return n.next=7,(0,M.s)(t);case 7:return n.abrupt("return",n.sent);case 8:case"end":return n.stop()}}),ae)}function he(e){var t=e.payload;return D().mark((function e(){var n,r;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.message,r=t.confirmCallback,e.next=3,(0,M.T1)(fe,n);case 3:if("yes"!==e.sent){e.next=9;break}return e.next=7,(0,M.T1)(r,!0);case 7:e.next=11;break;case 9:return e.next=11,(0,M.T1)(r,!1);case 11:case"end":return e.stop()}}),e)}))()}var me=D().mark(ve);function ve(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Q7)([(0,M.Zy)(ue)]);case 2:case"end":return e.stop()}}),me)}const ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H,t=arguments.length>1?arguments[1]:void 0,n=F[t.type];return n?n(e,t):e};function ye(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 be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var we=n()(n()(n()(n()({},P.Rf,I.A.singleTransferReducer("entityName")),P.g0,(function(e,t){var n=t.payload.formBase;return n?be(be({},e),{},{formBase:n}):be({},e)})),P.J6,I.A.singleTransferReducer("scrollBehaviour")),P.PH,I.A.singleTransferReducer("appId")),xe={entityName:"",formBase:"",scrollBehaviour:"none",appId:""};var Ae=D().mark(ke),Oe=D().mark(Se),Ee=D().mark(je);function ke(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Q7)([(0,M.T1)(Se),(0,M.p8)(P.XA,je)]);case 2:case"end":return e.stop()}}),Ae)}function Se(){return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,M.s)(e.A.INPUT_INITIALIZED);case 2:return t.next=4,(0,M.yJ)(x.A.doSessionCheck());case 4:case"end":return t.stop()}}),Oe)}function je(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.yJ)(w.A.fireExternalEvent("onRouteChange"));case 2:case"end":return e.stop()}}),Ee)}var Te=D().mark(Pe);function Pe(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Q7)([(0,M.Zy)(ke)]);case 2:case"end":return e.stop()}}),Te)}const Ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xe,t=arguments.length>1?arguments[1]:void 0,n=we[t.type];return n?n(e,t):e},_e={detail:ge,form:R.A,entityBrowser:Ce};var Re,Ne,De=[Pe,ve];function Me(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 Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Le="entity-browser",Fe=["onVisibilityStatusChange","onRouteChange"],He=h().lazy((function(){return Promise.all([s.e(280),s.e(123),s.e(651)]).then(s.bind(s,19651))})),Be=function(){return Re||(Re=(0,re.jsx)(f.Suspense,{fallback:"",children:(0,re.jsx)(He,{})}))},Ue=function(e){var t=e.initialKey,n=e.initialAction,r=(0,m.Zp)(),o=(0,m.zy)().pathname;(0,f.useEffect)((function(){if(t&&!isNaN(t)){if(!o.match(/\/detail\/[0-9]*/)){var e="/detail/".concat(t);r(e)}}if(n&&n.name){var i="/action/".concat(n.name,"?").concat(S.A.toQueryString(n.properties));r(i)}}),[])},ze=function(e){var t=e.memoryRouter,n=e.initialKey,r=e.initialAction,o=(t?m.bg:m.Ge)([{path:"*",element:(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Ue,{initialKey:n,initialAction:r}),Ne||(Ne=(0,re.jsx)(Be,{}))]})}]);return(0,re.jsx)(v.pg,{router:o})},We=function(t,n,r,o){n=Ie(Ie({},n),{},{id:t}),k.A.setInputEnvs(n);var i=e.A.createStore(_e,De,n,Le);w.A.addToStore(i,(function(t){return e.A.getEvents(Fe,t.input)})),g.A.addToStore(i),y.A.dynamicActionsAddToStore(i),b.A.addToStore(i,!0,["console","remote","notification"]),A.A.addToStore(i,!0),x.A.addToStore(i);var a=(0,re.jsx)(ze,{memoryRouter:n.memoryHistory,initialKey:n.initialKey,initialAction:n.initialAction});return e.A.createApp(Le,a,i,{input:n,actions:C(n),publicPath:o,textResourceModules:["component","common","actions","entity-list","entity-detail"]})},$e=function(t){var n=e.A.useApp({initApp:We,props:t,packageName:Le}),r=n.component,i=n.store,c=j.A.usePrevious(t);return j.A.useDidUpdate((function(){var e=l()(t,(function(e,t){return!a()(e,c[t])}));o()(e)||C(e,!1).forEach((function(e){i.dispatch(e)}))}),[t]),(0,re.jsx)(re.Fragment,{children:r})};$e.propTypes=Ie({entityName:p().string.isRequired,searchFormType:O.X,formBase:p().string,limit:p().oneOfType([p().number,p().string]),preselectedSearchFields:p().array,searchFilters:p().arrayOf(p().string),simpleSearchFields:p().string,initialKey:p().string,initialAction:p().shape({name:p().string,properties:p().objectOf(p().object)}),businessUnit:p().string,memoryHistory:p().bool,backendUrl:p().string,scrollBehaviour:p().oneOf(["none","inline"]),appContext:E.A.propTypes,modifyFormDefinition:p().func,modifyEntityPaths:p().func,disableDetailView:p().bool,reportIds:p().arrayOf(p().string),customActionEventHandlers:p().objectOf(p().objectOf(p().func)),isHidden:p().bool},w.A.createPropTypes(Fe));var qe=e.A.createBundleableApp(Le,We,$e);e.A.registerAppInRegistry(qe.name,qe.init)})(),u})()));
|
|
44
|
+
*/function u(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:o=!1}=e;t=n.map(((e,t)=>l(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=s(null==r?t.length-1:r),a="POP",c=null;function s(e){return Math.min(Math.max(e,0),t.length-1)}function u(){return t[i]}function l(e,n=null,r){let o=h(t?u().pathname:"/",e,n,r);return p("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function d(e){return"string"==typeof e?e:m(e)}return{get index(){return i},get action(){return a},get location(){return u()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?v(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a="PUSH";let r=l(e,n);i+=1,t.splice(i,t.length,r),o&&c&&c({action:a,location:r,delta:1})},replace(e,n){a="REPLACE";let r=l(e,n);t[i]=r,o&&c&&c({action:a,location:r,delta:0})},go(e){a="POP";let n=s(i+e),r=t[n];i=n,c&&c({action:a,location:r,delta:e})},listen:e=>(c=e,()=>{c=null})}}function l(e={}){return g((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=v(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),h("",{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){p("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function d(e,t){if(!1===e||null==e)throw new Error(t)}function p(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?v(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 v(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,c="POP",u=null,l=d();function d(){return(a.state||{idx:null}).idx}function p(){c="POP";let e=d(),t=null==e?null:e-l;l=e,u&&u({action:c,location:v.location,delta:t})}function m(e){return y(e)}null==l&&(l=0,a.replaceState({...a.state,idx:l},""));let v={get action(){return c},get location(){return e(o,a)},listen(e){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(s,p),u=e,()=>{o.removeEventListener(s,p),u=null}},createHref:e=>t(o,e),createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c="PUSH";let r=h(v.location,e,t);n&&n(r,e),l=d()+1;let s=f(r,l),p=v.createHref(r);try{a.pushState(s,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(p)}i&&u&&u({action:c,location:v.location,delta:1})},replace:function(e,t){c="REPLACE";let r=h(v.location,e,t);n&&n(r,e),l=d();let o=f(r,l),s=v.createHref(r);a.replaceState(o,"",s),i&&u&&u({action:c,location:v.location,delta:0})},go:e=>a.go(e)};return v}function y(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),d(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 b(e){return{defaultValue:e}}var w=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(c(this,o).has(e))return c(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){c(this,o).set(e,t)}};o=new WeakMap;var x=new Set(["lazy","caseSensitive","path","id","index","children"]);var A=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)],c="string"==typeof e.id?e.id:a.join("-");if(d(!0!==e.index||!e.children,"Cannot specify children on an index route"),d(o||!r[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let n={...e,id:c};return r[c]=E(n,t(n)),n}{let n={...e,id:c,children:void 0};return r[c]=E(n,t(n)),e.children&&(n.children=O(e.children,t,a,r,o)),n}}))}function E(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=z(("string"==typeof t?v(t):t).pathname||"/",n);if(null==o)return null;let i=T(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=U(o);a=F(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 T(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,c)=>{let s={relativePath:void 0===c?e.path||"":c,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&a)return;d(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let u=J([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(d(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),T(e.children,t,l,u,a)),(null!=e.path||e.index)&&t.push({path:u,score:L(u,e.index),routesMeta:l})};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("/")),c=[];return c.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&c.push(...a),c.map((t=>e.startsWith("/")&&""===t?"/":t))}var C=/^:[\w-]+$/,_=3,R=2,N=1,D=10,M=-2,I=e=>"*"===e;function L(e,t){let n=e.split("/"),r=n.length;return n.some(I)&&(r+=M),t&&(r+=R),n.filter((e=>!I(e))).reduce(((e,t)=>e+(C.test(t)?_:""===t?N:D)),r)}function F(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let c=r[e],s=e===r.length-1,u="/"===i?t:t.slice(i.length)||"/",l=H({path:c.relativePath,caseSensitive:c.caseSensitive,end:s},u),d=c.route;if(!l&&s&&n&&!r[r.length-1].route.index&&(l=H({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},u)),!l)return null;Object.assign(o,l.params),a.push({params:o,pathname:J([i,l.pathname]),pathnameBase:X(J([i,l.pathnameBase])),route:d}),"/"!==l.pathnameBase&&(i=J([i,l.pathnameBase]))}return a}function H(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=B(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=c[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=c[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function B(e,t=!1,n=!0){p("*"===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 U(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return p(!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 z(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 W=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$=e=>W.test(e);function q(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 G(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 Y(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function V(e){let t=Y(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function K(e,t,n,r=!1){let o;"string"==typeof e?o=v(e):(o={...e},d(!o.pathname||!o.pathname.includes("?"),G("?","pathname","search",o)),d(!o.pathname||!o.pathname.includes("#"),G("#","pathname","hash",o)),d(!o.search||!o.search.includes("#"),G("#","search","hash",o)));let i,a=""===e||""===o.pathname,c=a?"/":o.pathname;if(null==c)i=n;else{let e=t.length-1;if(!r&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?v(e):e;if(r)if($(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),p(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?q(r.substring(1),"/"):q(r,t)}else n=t;return{pathname:n,search:Q(o),hash:Z(i)}}(o,i),u=c&&"/"!==c&&c.endsWith("/"),l=(a||"."===c)&&n.endsWith("/");return s.pathname.endsWith("/")||!u&&!l||(s.pathname+="/"),s}var J=e=>e.join("/").replace(/\/\/+/g,"/"),X=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var ee=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 te(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ne(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var re="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function oe(e,t){let n=e;if("string"!=typeof n||!W.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(re)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=z(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){p(!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 ie=Symbol("Uninstrumented");function ae(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=ce(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=ce(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[ie]??o,i=ce(n[e],t,((...e)=>ue(e[0])));i&&("loader"===e&&!0===t.hydrate&&(i.hydrate=!0),i[ie]=t,r[e]=i)}})),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map((e=>{let t=e[ie]??e,r=ce(n.middleware,t,((...e)=>ue(e[0])));return r?(r[ie]=t,r):e}))),r}function ce(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,c=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=se(e,t,n,r-1),o=await a,d(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await i(c,t)}catch(e){console.error("An instrumentation function threw an error:",e)}a||await c(),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 ue(e){let{request:t,context:n,params:r,unstable_pattern:o}=e;return{request:de(t),params:{...r},unstable_pattern:o,context:pe(n)}}function le(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 de(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function pe(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")===fe}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var fe=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var he=["POST","PUT","PATCH","DELETE"],me=new Set(he),ve=["GET",...he],ge=new Set(ve),ye=new Set([301,302,303,307,308]),be=new Set([307,308]),we={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ae={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Oe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ee="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;d(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),...ae(t.map((e=>e.route)).filter(Boolean),e)})}let a,c={},s=O(e.routes,i,void 0,c),u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let l,f,v=e.dataStrategy||He,g={...e.future},b=null,x=new Set,A=null,E=null,T=null,P=null!=e.hydrationData,C=k(s,e.history.location,u),_=!1,R=null;if(null!=C||e.patchRoutesOnNavigation){if(C&&!e.hydrationData){We(C,s,e.history.location.pathname).active&&(C=null)}if(C)if(C.some((e=>e.route.lazy)))l=!1;else if(C.some((e=>Ce(e.route)))){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=C.findIndex((e=>void 0!==n[e.route.id]));l=C.slice(0,e+1).every((e=>!_e(e.route,t,n)))}else l=C.every((e=>!_e(e.route,t,n)))}else l=!0;else{l=!1,C=[];let t=We(null,s,e.history.location.pathname);t.active&&t.matches&&(_=!0,C=t.matches)}}else{let t=at(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=it(s);l=!0,C=n,R={[r.id]:t}}let N,D,M={historyAction:e.history.action,location:e.history.location,matches:C,initialized:l,navigation:we,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||R,fetchers:new Map,blockers:new Map},I="POP",L=null,F=!1,H=!1,B=new Map,U=null,W=!1,q=!1,G=new Set,Y=new Map,V=0,K=-1,J=new Map,X=new Set,Q=new Map,Z=new Map,ee=new Set,ne=new Map,re=null;function oe(e,t={}){e.matches&&(e.matches=e.matches.map((e=>{let t=c[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}))),M={...M,...e};let n=[],r=[];M.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ee.has(t)?n.push(t):r.push(t))})),ee.forEach((e=>{M.fetchers.has(e)||Y.has(e)||n.push(e)})),[...x].forEach((r=>r(M,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),n.forEach((e=>ke(e))),r.forEach((e=>M.fetchers.delete(e)))}function se(t,n,{flushSync:r}={}){let o,i=null!=M.actionData&&null!=M.navigation.formMethod&&bt(M.navigation.formMethod)&&"loading"===M.navigation.state&&!0!==t.state?._isRedirect;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?M.actionData:null;let c=n.loaderData?nt(M.loaderData,n.loaderData,n.matches||[],n.errors):M.loaderData,u=M.blockers;u.size>0&&(u=new Map(u),u.forEach(((e,t)=>u.set(t,Ae))));let l,d=!W&&ze(t,n.matches||M.matches),p=!0===F||null!=M.navigation.formMethod&&bt(M.navigation.formMethod)&&!0!==t.state?._isRedirect;if(a&&(s=a,a=void 0),W||"POP"===I||("PUSH"===I?e.history.push(t,t.state):"REPLACE"===I&&e.history.replace(t,t.state)),"POP"===I){let e=B.get(M.location.pathname);e&&e.has(t.pathname)?l={currentLocation:M.location,nextLocation:t}:B.has(t.pathname)&&(l={currentLocation:t,nextLocation:M.location})}else if(H){let e=B.get(M.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),B.set(M.location.pathname,e)),l={currentLocation:M.location,nextLocation:t}}oe({...n,actionData:o,loaderData:c,historyAction:I,location:t,initialized:!0,navigation:we,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:p,blockers:u},{viewTransitionOpts:l,flushSync:!0===r}),I="POP",F=!1,H=!1,W=!1,q=!1,L?.resolve(),L=null,re?.resolve(),re=null}async function ue(t,n,o){N&&N.abort(),N=null,I=t,W=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(A&&T){let n=Ue(e,t);A[n]=T()}}(M.location,M.matches),F=!0===(o&&o.preventScrollReset),H=!0===(o&&o.enableViewTransition);let l=a||s,d=o&&o.overrideNavigation,p=o?.initialHydration&&M.matches&&M.matches.length>0&&!_?M.matches:k(l,n,u),f=!0===(o&&o.flushSync);if(p&&M.initialized&&!q&&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}(M.location,n)&&!(o&&o.submission&&bt(o.submission.formMethod)))return void se(n,{matches:p},{flushSync:f});let h=We(p,l,n.pathname);if(h.active&&h.matches&&(p=h.matches),!p){let{error:e,notFoundMatches:t,route:r}=Be(n.pathname);return void se(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:f})}N=new AbortController;let m,v=Xe(e.history,n,N.signal,o&&o.submission),g=e.getContext?await e.getContext():new w;if(o&&o.pendingError)m=[ot(p).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&bt(o.submission.formMethod)){let t=await async function(t,n,o,a,l,d,p,f={}){me();let h,m=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(oe({navigation:m},{flushSync:!0===f.flushSync}),d){let e=await $e(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}=it(s);return{matches:t,pendingActionResult:[n.id,{type:"error",error:e.error}]}}let t=ot(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}=Be(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:"error",error:t}]}}a=e.matches}let v=xt(a,n);if(v.route.action||v.route.lazy){let e=qe(i,c,t,a,v,p?[]:r,l),n=await fe(t,e,l,null);if(h=n[v.route.id],!h)for(let e of a)if(n[e.route.id]){h=n[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else h={type:"error",error:at(405,{method:t.method,pathname:n.pathname,routeId:v.route.id})};if(ht(h)){let n;if(f&&null!=f.replace)n=f.replace;else{n=Je(h.response.headers.get("Location"),new URL(t.url),u,e.history)===M.location.pathname+M.location.search}return await pe(t,h,!0,{submission:o,replace:n}),{shortCircuited:!0}}if(ft(h)){let e=ot(a,v.route.id);return!0!==(f&&f.replace)&&(I="PUSH"),{matches:a,pendingActionResult:[e.route.id,h,v.route.id]}}return{matches:a,pendingActionResult:[v.route.id,h]}}(v,n,o.submission,p,g,h.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ft(r)&&te(r.error)&&404===r.error.status)return N=null,void se(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}p=t.matches||p,m=t.pendingActionResult,d=Ot(n,o.submission),f=!1,h.active=!1,v=Xe(e.history,v.url,v.signal)}let{shortCircuited:y,matches:b,loaderData:x,errors:O}=await async function(t,n,o,l,d,p,f,h,m,v,g,y,b){let w=p||Ot(n,f),x=f||h||At(w),A=!W&&!v;if(d){if(A){let e=de(y);oe({navigation:w,...void 0!==e?{actionData:e}:{}},{flushSync:g})}let e=await $e(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}=it(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ot(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=Be(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let O=a||s,{dsMatches:E,revalidatingFetchers:k}=Pe(t,l,i,c,e.history,M,o,x,n,v?[]:r,!0===v,q,G,ee,Q,X,O,u,null!=e.patchRoutesOnNavigation,y,b);if(K=++V,!e.dataStrategy&&!E.some((e=>e.shouldLoad))&&!E.some((e=>e.route.middleware&&e.route.middleware.length>0))&&0===k.length){let e=De();return se(n,{matches:o,loaderData:{},errors:y&&ft(y[1])?{[y[0]]:y[1].error}:null,...rt(y),...e?{fetchers:new Map(M.fetchers)}:{}},{flushSync:g}),{shortCircuited:!0}}if(A){let e={};if(!d){e.navigation=w;let t=de(y);void 0!==t&&(e.actionData=t)}k.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=M.fetchers.get(e.key),n=Et(void 0,t?t.data:void 0);M.fetchers.set(e.key,n)})),new Map(M.fetchers)}(k)),oe(e,{flushSync:g})}k.forEach((e=>{Se(e.key),e.controller&&Y.set(e.key,e.controller)}));let S=()=>k.forEach((e=>Se(e.key)));N&&N.signal.addEventListener("abort",S);let{loaderResults:j,fetcherResults:T}=await he(E,k,t,l);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",S);k.forEach((e=>Y.delete(e.key)));let P=ct(j);if(P)return await pe(t,P.result,!0,{replace:m}),{shortCircuited:!0};if(P=ct(T),P)return X.add(P.key),await pe(t,P.result,!0,{replace:m}),{shortCircuited:!0};let{loaderData:C,errors:_}=tt(M,o,j,y,k,T);v&&M.errors&&(_={...M.errors,..._});let R=De(),D=Me(K),I=R||D||k.length>0;return{matches:o,loaderData:C,errors:_,...I?{fetchers:new Map(M.fetchers)}:{}}}(v,n,p,g,h.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,f,m,o&&o.callSiteDefaultShouldRevalidate);y||(N=null,se(n,{matches:b||p,...rt(m),loaderData:x,errors:O}))}function de(e){return e&&!ft(e[1])?{[e[0]]:e[1].data}:M.actionData?0===Object.keys(M.actionData).length?null:M.actionData:void 0}async function pe(r,o,i,{submission:a,fetcherSubmission:c,preventScrollReset:s,replace:l}={}){i||(L?.resolve(),L=null),o.response.headers.has("X-Remix-Revalidate")&&(q=!0);let p=o.response.headers.get("Location");d(p,"Expected a Location header on the redirect Response"),p=Je(p,new URL(r.url),u,e.history);let f=h(M.location,p,{_isRedirect:!0});if(n){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if($(p)){const n=y(p,!0);e=n.origin!==t.location.origin||null==z(n.pathname,u)}if(e)return void(l?t.location.replace(p):t.location.assign(p))}N=null;let m=!0===l||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:v,formAction:g,formEncType:b}=M.navigation;!a&&!c&&v&&g&&b&&(a=At(M.navigation));let w=a||c;if(be.has(o.response.status)&&w&&bt(w.formMethod))await ue(m,f,{submission:{...w,formAction:p},preventScrollReset:s||F,enableViewTransition:i?H:void 0});else{let e=Ot(f,a);await ue(m,f,{overrideNavigation:e,fetcherSubmission:c,preventScrollReset:s||F,enableViewTransition:i?H:void 0})}}async function fe(e,t,n,r){let o,i={};try{o=await Ge(v,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(!bt(e.method))for(let e of t){if("error"===o[e.route.id]?.type)break;o.hasOwnProperty(e.route.id)||M.loaderData.hasOwnProperty(e.route.id)||M.errors&&M.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(pt(r)){let o=r.result;i[n]={type:"redirect",response:Ke(o,e,n,t,u)}}else i[n]=await Ve(r);return i}async function he(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:at(404,{pathname:e.path})}})})));return{loaderResults:await o,fetcherResults:(await i).reduce(((e,t)=>Object.assign(e,t)),{})}}function me(){q=!0,Q.forEach(((e,t)=>{Y.has(t)&&G.add(t),Se(t)}))}function ve(e,t,n={}){M.fetchers.set(e,t),oe({fetchers:new Map(M.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ge(e,t,n,r={}){let o=ot(M.matches,t);ke(e),oe({errors:{[o.route.id]:n},fetchers:new Map(M.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function ye(e){return Z.set(e,(Z.get(e)||0)+1),ee.has(e)&&ee.delete(e),M.fetchers.get(e)||xe}function ke(e){let t=M.fetchers.get(e);!Y.has(e)||t&&"loading"===t.state&&J.has(e)||Se(e),Q.delete(e),J.delete(e),X.delete(e),ee.delete(e),G.delete(e),M.fetchers.delete(e)}function Se(e,t){let n=Y.get(e);n&&(n.abort(t),Y.delete(e))}function Re(e){for(let t of e){let e=kt(ye(t).data);M.fetchers.set(t,e)}}function De(){let e=[],t=!1;for(let n of X){let r=M.fetchers.get(n);d(r,`Expected fetcher: ${n}`),"loading"===r.state&&(X.delete(n),e.push(n),t=!0)}return Re(e),t}function Me(e){let t=[];for(let[n,r]of J)if(r<e){let e=M.fetchers.get(n);d(e,`Expected fetcher: ${n}`),"loading"===e.state&&(Se(n),J.delete(n),t.push(n))}return Re(t),t.length>0}function Ie(e){M.blockers.delete(e),ne.delete(e)}function Le(e,t){let n=M.blockers.get(e)||Ae;d("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(M.blockers);r.set(e,t),oe({blockers:r})}function Fe({currentLocation:e,nextLocation:t,historyAction:n}){if(0===ne.size)return;ne.size>1&&p(!1,"A router only supports one blocker at a time");let r=Array.from(ne.entries()),[o,i]=r[r.length-1],a=M.blockers.get(o);return a&&"proceeding"===a.state?void 0:i({currentLocation:e,nextLocation:t,historyAction:n})?o:void 0}function Be(e){let t=at(404,{pathname:e}),n=a||s,{matches:r,route:o}=it(n);return{notFoundMatches:r,route:o,error:t}}function Ue(e,t){if(E){return E(e,t.map((e=>j(e,M.loaderData))))||e.key}return e.key}function ze(e,t){if(A){let n=Ue(e,t),r=A[n];if("number"==typeof r)return r}return null}function We(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 $e(t,n,r,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let l=t;for(;;){let t=null==a,d=a||s,p=c;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:o,patch:(e,t)=>{r.aborted||Ne(e,t,d,p,i,!1)}})}catch(e){return{type:"error",error:e,partialMatches:l}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:"aborted"};let f=k(d,n,u),h=null;if(f){if(0===Object.keys(f[0].params).length)return{type:"success",matches:f};if(h=S(d,n,u,!0),!(h&&l.length<h.length&&Ye(l,h.slice(0,l.length))))return{type:"success",matches:f}}if(h||(h=S(d,n,u,!0)),!h||Ye(l,h))return{type:"success",matches:null};l=h}}function Ye(e,t){return e.length===t.length&&e.every(((e,n)=>e.route.id===t[n].route.id))}return f={get basename(){return u},get future(){return g},get state(){return M},get routes(){return s},get window(){return t},initialize:function(){if(b=e.history.listen((({action:t,location:n,delta:r})=>{if(D)return D(),void(D=void 0);p(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=Fe({currentLocation:M.location,nextLocation:n,historyAction:t});if(o&&null!=r){let t=new Promise((e=>{D=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(M.blockers);e.set(o,Ae),oe({blockers:e})}}),L?.resolve(),void(L=null)}return ue(t,n)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(Ee);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,B);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ee,JSON.stringify(n))}catch(e){p(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,B);t.addEventListener("pagehide",e),U=()=>t.removeEventListener("pagehide",e)}return M.initialized||ue("POP",M.location,{initialHydration:!0}),f},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,n){if(A=e,T=t,E=n||null,!P&&M.navigation===we){P=!0;let e=ze(M.location,M.matches);null!=e&&oe({restoreScrollPosition:e})}return()=>{A=null,T=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(M.location,M.matches,u,n,r?.fromRouteId,r?.relative),{path:i,submission:a,error:c}=Te(!1,o,r),s=M.location,l=h(M.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&&bt(a.formMethod)&&a.formAction===M.location.pathname+M.location.search&&(p="REPLACE");let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,m=!0===(r&&r.flushSync),v=Fe({currentLocation:s,nextLocation:l,historyAction:p});v?Le(v,{state:"blocked",location:l,proceed(){Le(v,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),t(n,r)},reset(){let e=new Map(M.blockers);e.set(v,Ae),oe({blockers:e})}}):await ue(p,l,{submission:a,pendingError:c,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:r&&r.unstable_defaultShouldRevalidate})},fetch:async function(t,n,o,l){Se(t);let p=!0===(l&&l.flushSync),f=a||s,h=je(M.location,M.matches,u,o,n,l?.relative),m=k(f,h,u),v=We(m,f,h);if(v.active&&v.matches&&(m=v.matches),!m)return void ge(t,n,at(404,{pathname:h}),{flushSync:p});let{path:g,submission:y,error:b}=Te(!0,h,l);if(b)return void ge(t,n,b,{flushSync:p});let x=e.getContext?await e.getContext():new w,A=!0===(l&&l.preventScrollReset);y&&bt(y.formMethod)?await async function(t,n,o,l,p,f,h,m,v,g){me(),Q.delete(t);let y=M.fetchers.get(t);ve(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}(v,y),{flushSync:h});let b=new AbortController,w=Xe(e.history,o,b.signal,v);if(f){let e=await $e(l,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ge(t,n,e.error,{flushSync:h});if(!e.matches)return void ge(t,n,at(404,{pathname:o}),{flushSync:h});l=e.matches}let x=xt(l,o);if(!x.route.action&&!x.route.lazy){let e=at(405,{method:v.formMethod,pathname:o,routeId:n});return void ge(t,n,e,{flushSync:h})}Y.set(t,b);let A=V,O=qe(i,c,w,l,x,r,p),E=await fe(w,O,p,t),S=E[x.route.id];if(!S)for(let e of O)if(E[e.route.id]){S=E[e.route.id];break}if(w.signal.aborted)return void(Y.get(t)===b&&Y.delete(t));if(ee.has(t)){if(ht(S)||ft(S))return void ve(t,kt(void 0))}else{if(ht(S))return Y.delete(t),K>A?void ve(t,kt(void 0)):(X.add(t),ve(t,Et(v)),pe(w,S,!1,{fetcherSubmission:v,preventScrollReset:m}));if(ft(S))return void ge(t,n,S.error)}let j=M.navigation.location||M.location,T=Xe(e.history,j,b.signal),P=a||s,C="idle"!==M.navigation.state?k(P,M.navigation.location,u):M.matches;d(C,"Didn't find any matches after fetcher action");let _=++V;J.set(t,_);let R=Et(v,S.data);M.fetchers.set(t,R);let{dsMatches:D,revalidatingFetchers:L}=Pe(T,p,i,c,e.history,M,C,v,j,r,!1,q,G,ee,Q,X,P,u,null!=e.patchRoutesOnNavigation,[x.route.id,S],g);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=M.fetchers.get(t),r=Et(void 0,n?n.data:void 0);M.fetchers.set(t,r),Se(t),e.controller&&Y.set(t,e.controller)})),oe({fetchers:new Map(M.fetchers)});let F=()=>L.forEach((e=>Se(e.key)));b.signal.addEventListener("abort",F);let{loaderResults:H,fetcherResults:B}=await he(D,L,T,p);if(b.signal.aborted)return;if(b.signal.removeEventListener("abort",F),J.delete(t),Y.delete(t),L.forEach((e=>Y.delete(e.key))),M.fetchers.has(t)){let e=kt(S.data);M.fetchers.set(t,e)}let U=ct(H);if(U)return pe(T,U.result,!1,{preventScrollReset:m});if(U=ct(B),U)return X.add(U.key),pe(T,U.result,!1,{preventScrollReset:m});let{loaderData:z,errors:W}=tt(M,C,H,void 0,L,B);Me(_),"loading"===M.navigation.state&&_>K?(d(I,"Expected pending action"),N&&N.abort(),se(M.navigation.location,{matches:C,loaderData:z,errors:W,fetchers:new Map(M.fetchers)})):(oe({errors:W,loaderData:nt(M.loaderData,z,C,W),fetchers:new Map(M.fetchers)}),q=!1)}(t,n,g,m,x,v.active,p,A,y,l&&l.unstable_defaultShouldRevalidate):(Q.set(t,{routeId:n,path:g}),await async function(t,n,o,a,s,u,l,d,p){let f=M.fetchers.get(t);ve(t,Et(p,f?f.data:void 0),{flushSync:l});let h=new AbortController,m=Xe(e.history,o,h.signal);if(u){let e=await $e(a,new URL(m.url).pathname,m.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ge(t,n,e.error,{flushSync:l});if(!e.matches)return void ge(t,n,at(404,{pathname:o}),{flushSync:l});a=e.matches}let v=xt(a,o);Y.set(t,h);let g=V,y=qe(i,c,m,a,v,r,s),b=await fe(m,y,s,t),w=b[v.route.id];Y.get(t)===h&&Y.delete(t);if(m.signal.aborted)return;if(ee.has(t))return void ve(t,kt(void 0));if(ht(w))return K>g?void ve(t,kt(void 0)):(X.add(t),void await pe(m,w,!1,{preventScrollReset:d}));if(ft(w))return void ge(t,n,w.error);ve(t,kt(w.data))}(t,n,g,m,x,v.active,p,A,y))},revalidate:function(){re||(re=St()),me(),oe({revalidation:"loading"});let e=re.promise;return"submitting"===M.navigation.state?e:"idle"===M.navigation.state?(ue(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),e):(ue(I||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:!0===H}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ye,resetFetcher:function(e,t){Se(e,t?.reason),ve(e,kt(null))},deleteFetcher:function(e){let t=(Z.get(e)||0)-1;t<=0?(Z.delete(e),ee.add(e)):Z.set(e,t),oe({fetchers:new Map(M.fetchers)})},dispose:function(){b&&b(),U&&U(),x.clear(),N&&N.abort(),M.fetchers.forEach(((e,t)=>ke(t))),M.blockers.forEach(((e,t)=>Ie(t)))},getBlocker:function(e,t){let n=M.blockers.get(e)||Ae;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Ie,patchRoutes:function(e,t,n=!1){let r=null==a;Ne(e,t,a||s,c,i,n),r&&(s=[...s],oe({}))},_internalFetchControllers:Y,_internalSetRoutes:function(e){c={},a=O(e,i,void 0,c)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){oe(e)}},e.unstable_instrumentations&&(f=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[ie]??e.navigate,r=ce(n.navigate,t,((...t)=>{let[n,r]=t;return{to:"number"==typeof n||"string"==typeof n?n:n?m(n):".",...le(e,r??{})}}));r&&(r[ie]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[ie]??e.fetch,r=ce(n.fetch,t,((...t)=>{let[n,,r,o]=t;return{href:r??".",fetcherKey:n,...le(e,o??{})}}));r&&(r[ie]=t,e.fetch=r)}return e}(f,e.unstable_instrumentations.map((e=>e.router)).filter(Boolean))),f}function je(e,t,n,r,o,i){let a,c;if(o){a=[];for(let e of t)if(a.push(e),e.route.id===o){c=e;break}}else a=t,c=t[t.length-1];let s=K(r||".",V(a),z(e.pathname,n)||e.pathname,"path"===i);if(null==r&&(s.search=e.search,s.hash=e.hash),(null==r||""===r||"."===r)&&c){let e=wt(s.search);if(c.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();s.search=n?`?${n}`:""}}return"/"!==n&&(s.pathname=function({basename:e,pathname:t}){return"/"===t?e:J([e,t])}({basename:n,pathname:s.pathname})),m(s)}function Te(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:at(405,{method:n.formMethod})};let r,o,i=()=>({path:t,error:at(400,{type:"invalid-body"})}),a=(n.formMethod||"get").toUpperCase(),c=st(t);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!bt(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:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!bt(a))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(d("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=Ze(r);else if(null==n.body)r=new URLSearchParams,o=new FormData;else try{r=new URLSearchParams(n.body),o=Ze(r)}catch(e){return i()}let s={formMethod:a,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(bt(s.formMethod))return{path:t,submission:s};let u=v(t);return e&&u.search&&wt(u.search)&&r.append("index",""),u.search=`?${r}`,{path:m(u),submission:s}}function Pe(e,t,n,r,o,i,a,c,s,u,l,d,p,f,h,m,v,g,y,b,w){let x,A=b?ft(b[1])?b[1].error:b[1].data:void 0,O=o.createURL(i.location),E=o.createURL(s);if(l&&i.errors){let e=Object.keys(i.errors)[0];x=a.findIndex((t=>t.route.id===e))}else if(b&&ft(b[1])){let e=b[0];x=a.findIndex((t=>t.route.id===e))-1}let S=b?b[1].statusCode:void 0,j=S&&S>=400,T={currentUrl:O,currentParams:i.matches[0]?.params||{},nextUrl:E,nextParams:a[0].params,...c,actionResult:A,actionStatus:S},P=ne(a),C=a.map(((o,a)=>{let{route:c}=o,s=null;if(null!=x&&a>x?s=!1:c.lazy?s=!0:Ce(c)?l?s=_e(c,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)&&(s=!0):s=!1,null!==s)return $e(n,r,e,P,o,u,t,s);let p=!1;"boolean"==typeof w?p=w:j?p=!1:(d||O.pathname+O.search===E.pathname+E.search||O.search!==E.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={...T,defaultShouldRevalidate:p},h=Re(o,f);return $e(n,r,e,P,o,u,t,h,f,w)})),_=[];return h.forEach(((e,c)=>{if(l||!a.some((t=>t.route.id===e.routeId))||f.has(c))return;let s=i.fetchers.get(c),h=s&&"idle"!==s.state&&void 0===s.data,b=k(v,e.path,g);if(!b){if(y&&h)return;return void _.push({key:c,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(m.has(c))return;let x=xt(b,e.path),A=new AbortController,O=Xe(o,e.path,A.signal),E=null;if(p.has(c))p.delete(c),E=qe(n,r,O,b,x,u,t);else if(h)d&&(E=qe(n,r,O,b,x,u,t));else{let e;e="boolean"==typeof w?w:!j&&d;let o={...T,defaultShouldRevalidate:e};Re(x,o)&&(E=qe(n,r,O,b,x,u,t,o))}E&&_.push({key:c,routeId:e.routeId,path:e.path,matches:E,match:x,request:O,controller:A})})),{dsMatches:C,revalidatingFetchers:_}}function Ce(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function _e(e,t,n){if(e.lazy)return!0;if(!Ce(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 Re(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function Ne(e,t,n,r,o,i){let a;if(e){let t=r[e];d(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),a=t.children}else a=n;let c=[],s=[];if(t.forEach((e=>{let t=a.find((t=>De(e,t)));t?s.push({existingRoute:t,newRoute:e}):c.push(e)})),c.length>0){let t=O(c,o,[e||"_","patch",String(a?.length||"0")],r);a.push(...t)}if(i&&s.length>0)for(let e=0;e<s.length;e++){let{existingRoute:t,newRoute:n}=s[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 De(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=>De(e,t))))))}var Me=new WeakMap,Ie=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(d(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let i=o.lazy[e];if(!i)return;let a=Me.get(o);a||(a={},Me.set(o,a));let c=a[e];if(c)return c;let s=(async()=>{let t=function(e){return x.has(e)}(e),n=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)p(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(n)p(!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]=s,s},Le=new WeakMap;async function Fe(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 He(e){return e.matches.some((e=>e.route.middleware))?Be(e,(()=>Fe(e))):Fe(e)}function Be(e,t){return Ue(e,t,(e=>{if(gt(e))throw e;return e}),lt,(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=ot(r,r[o].route.id).route.id;return Promise.resolve({[i]:{type:"error",result:t}})}}))}async function Ue(e,t,n,r,o){let{matches:i,request:a,params:c,context:s,unstable_pattern:u}=e,l=i.flatMap((e=>e.route.middleware?e.route.middleware.map((t=>[e.route.id,t])):[]));return await ze({request:a,params:c,context:s,unstable_pattern:u},l,t,n,r,o)}async function ze(e,t,n,r,o,i,a=0){let{request:c}=e;if(c.signal.aborted)throw c.signal.reason??new Error(`Request aborted: ${c.method} ${c.url}`);let s=t[a];if(!s){return await n()}let u,[l,d]=s,p=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let c=await ze(e,t,n,r,o,i,a+1);return u={value:c},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 We(e,t,n,r,o){let i=Ie({key:"middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=function(e,t,n,r,o){let i=n[e.id];if(d(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=Le.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{d("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,A.has(o)),c=void 0!==i[e]&&"hasErrorBoundary"!==e;a?p(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):c?p(!c,`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 Le.set(i,n),n.catch((()=>{})),{lazyRoutePromise:n,lazyHandlerPromise:n}}let a,c=Object.keys(e.lazy),s=[];for(let i of c){if(o&&o.includes(i))continue;let c=Ie({key:i,route:e,manifest:n,mapRouteProperties:r});c&&(s.push(c),i===t&&(a=c))}let u=s.length>0?Promise.all(s).then((()=>{})):void 0;return u?.catch((()=>{})),a?.catch((()=>{})),{lazyRoutePromise:u,lazyHandlerPromise:a}}(r.route,bt(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function $e(e,t,n,r,o,i,a,c,s=null,u){let l=!1,d=We(e,t,n,o,i);return{...o,_lazyPromises:d,shouldLoad:c,shouldRevalidateArgs:s,shouldCallHandler:e=>(l=!0,s?Re(o,"boolean"==typeof u?{...s,defaultShouldRevalidate:u}:"boolean"==typeof e?{...s,defaultShouldRevalidate:e}:s):c),resolve(e){let{lazy:t,loader:i,middleware:s}=o.route,u=l||c||e&&!bt(n.method)&&(t||i),p=s&&s.length>0&&!i&&!t;return!u||!bt(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 c,s,u=bt(e.method),l=u?"action":"loader",d=r=>{let o,c=new Promise(((e,t)=>o=t));s=()=>o(),e.signal.addEventListener("abort",s);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,c])};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;c=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 at(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[c]=await Promise.all([d(t),o])}else{if(!t){let t=new URL(e.url);throw at(404,{pathname:t.pathname+t.search})}c=await d(t)}}catch(e){return{type:"error",result:e}}finally{s&&e.signal.removeEventListener("abort",s)}return c}({request:n,unstable_pattern:r,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:a})}}}function qe(e,t,n,r,o,i,a,c=null){return r.map((s=>s.route.id!==o.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:We(e,t,n,s,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:$e(e,t,n,ne(r),s,i,a,!0,c)))}async function Ge(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:ne(n),params:n[0].params,context:o,matches:n},c=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 Be(t,(()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},s=await e({...a,fetcherKey:r,runClientMiddleware:c});try{await Promise.all(n.flatMap((e=>[e._lazyPromises?.handler,e._lazyPromises?.route])))}catch(e){}return s}async function Ye(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 Ve(e){let{result:t,type:n}=e;if(vt(t)){let e;try{e=await Ye(t)}catch(e){return{type:"error",error:e}}return"error"===n?{type:"error",error:new ee(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:ut(t),statusCode:te(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:te(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 Ke(e,t,n,r,o){let i=e.headers.get("Location");if(d(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!$(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($(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!=z(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 Xe(e,t,n,r){let o=e.createURL(st(t)).toString(),i={signal:n};if(r&&bt(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 Ze(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function et(e,t,n,r=!1,o=!1){let i,a={},c=null,s=!1,u={},l=n&&ft(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(d(!ht(f),"Cannot handle redirect results in processLoaderData"),ft(f)){let t=f.error;if(void 0!==l&&(t=l,l=void 0),c=c||{},o)c[p]=t;else{let n=ot(e,p);null==c[n.route.id]&&(c[n.route.id]=t)}r||(a[p]=ke),s||(s=!0,i=te(f.error)?f.error.status:500),f.headers&&(u[p]=f.headers)}else a[p]=f.data,f.statusCode&&200!==f.statusCode&&!s&&(i=f.statusCode),f.headers&&(u[p]=f.headers)})),void 0!==l&&n&&(c={[n[0]]:l},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:c,statusCode:i||200,loaderHeaders:u}}function tt(e,t,n,r,o,i){let{loaderData:a,errors:c}=et(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(d(a,"Did not find corresponding fetcher result"),ft(a)){let t=ot(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:a.error}),e.fetchers.delete(n)}else if(ht(a))d(!1,"Unhandled fetcher revalidation redirect");else{let t=kt(a.data);e.fetchers.set(n,t)}})),{loaderData:a,errors:c}}function nt(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 rt(e){return e?ft(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ot(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 it(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 at(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",c="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&t&&n?c=`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&&(c="Unable to encode submission body")):403===e?(a="Forbidden",c=`Route "${n}" does not match URL "${t}"`):404===e?(a="Not Found",c=`No route matches URL "${t}"`):405===e&&(a="Method Not Allowed",r&&t&&n?c=`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&&(c=`Invalid request method "${r.toUpperCase()}"`)),new ee(e||500,a,new Error(c),!0)}function ct(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(ht(r))return{key:n,result:r}}}function st(e){return m({..."string"==typeof e?v(e):e,hash:""})}function ut(e){return new ee(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function lt(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&dt(t)))}function dt(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function pt(e){return vt(e.result)&&ye.has(e.result.status)}function ft(e){return"error"===e.type}function ht(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 vt(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function gt(e){return vt(e)&&(t=e.status,ye.has(t))&&e.headers.has("Location");var t}function yt(e){return ge.has(e.toUpperCase())}function bt(e){return me.has(e.toUpperCase())}function wt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function xt(e,t){let n="string"==typeof t?v(t).search:t.search;if(e[e.length-1].route.index&&wt(n||""))return e[e.length-1];let r=Y(e);return r[r.length-1]}function At(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 Et(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 Tt=i.createContext(null);Tt.displayName="DataRouterState";var Pt=i.createContext(!1);function Ct(){return i.useContext(Pt)}var _t=i.createContext({isTransitioning:!1});_t.displayName="ViewTransition";var Rt=i.createContext(new Map);Rt.displayName="Fetchers";var Nt=i.createContext(null);Nt.displayName="Await";var Dt=i.createContext(null);Dt.displayName="Navigation";var Mt=i.createContext(null);Mt.displayName="Location";var It=i.createContext({outlet:null,matches:[],isDataRoute:!1});It.displayName="Route";var Lt=i.createContext(null);Lt.displayName="RouteError";var Ft=!0,Ht="REACT_ROUTER_ERROR",Bt="REDIRECT";function Ut(){return null!=i.useContext(Mt)}function zt(){return d(Ut(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(Mt).location}var Wt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $t(e){i.useContext(Dt).static||i.useLayoutEffect(e)}function qt(){let{isDataRoute:e}=i.useContext(It);return e?function(){let{router:e}=rn("useNavigate"),t=an("useNavigate"),n=i.useRef(!1);return $t((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{p(n.current,Wt),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){d(Ut(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(jt),{basename:t,navigator:n}=i.useContext(Dt),{matches:r}=i.useContext(It),{pathname:o}=zt(),a=JSON.stringify(V(r)),c=i.useRef(!1);return $t((()=>{c.current=!0})),i.useCallback(((r,i={})=>{if(p(c.current,Wt),!c.current)return;if("number"==typeof r)return void n.go(r);let s=K(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:J([t,s.pathname])),(i.replace?n.replace:n.push)(s,i.state,i)}),[t,n,a,o,e])}()}i.createContext(null);function Gt(){let{matches:e}=i.useContext(It),t=e[e.length-1];return t?t.params:{}}function Yt(e,{relative:t}={}){let{matches:n}=i.useContext(It),{pathname:r}=zt(),o=JSON.stringify(V(n));return i.useMemo((()=>K(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function Vt(e,t,n,r,o){d(Ut(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=i.useContext(Dt),{matches:c}=i.useContext(It),s=c[c.length-1],u=s?s.params:{},l=s?s.pathname:"/",f=s?s.pathnameBase:"/",h=s&&s.route;if(Ft){let e=h&&h.path||"";pn(l,!h||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (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 m,g=zt();if(t){let e="string"==typeof t?v(t):t;d("/"===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.`),m=e}else m=g;let y=m.pathname||"/",b=y;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=k(e,{pathname:b});Ft&&(p(h||null!=w,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),p(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 "${m.pathname}${m.search}${m.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=tn(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])}))),c,n,r,o);return t&&x?i.createElement(Mt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},x):x}function Kt(){let e=sn(),t=te(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},c=null;return Ft&&(console.error("Error handled by React Router default ErrorBoundary:",e),c=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,c)}var Jt=i.createElement(Kt,null),Xt=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(`${Ht}: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 ee(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i.createElement(It.Provider,{value:this.props.routeContext},i.createElement(Lt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(Zt,{error:e},t):t}};Xt.contextType=Pt;var Qt=new WeakMap;function Zt({children:e,error:t}){let{basename:n}=i.useContext(Dt);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Ht}:${Bt}:{`))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=oe(e.location,n);if(re&&!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 en({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(It.Provider,{value:e},n)}function tn(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,c=n?.errors;if(null!=c){let e=a.findIndex((e=>e.route.id&&void 0!==c?.[e.route.id]));d(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!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){s=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:ne(n.matches),errorInfo:t})}:void 0;return a.reduceRight(((e,r,o)=>{let d,p=!1,f=null,h=null;n&&(d=c&&r.route.id?c[r.route.id]:void 0,f=r.route.errorElement||Jt,s&&(u<0&&0===o?(pn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):u===o&&(p=!0,h=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,o+1)),v=()=>{let t;return t=d?f:p?h:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(en,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(Xt,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):v()}),null)}function nn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rn(e){let t=i.useContext(jt);return d(t,nn(e)),t}function on(e){let t=i.useContext(Tt);return d(t,nn(e)),t}function an(e){let t=function(e){let t=i.useContext(It);return d(t,nn(e)),t}(e),n=t.matches[t.matches.length-1];return d(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function cn(){let{matches:e,loaderData:t}=on("useMatches");return i.useMemo((()=>e.map((e=>j(e,t)))),[e,t])}function sn(){let e=i.useContext(Lt),t=on("useRouteError"),n=an("useRouteError");return void 0!==e?e:t.errors?.[n]}var un=0;function ln(e){let{router:t,basename:n}=rn("useBlocker"),r=on("useBlocker"),[o,a]=i.useState(""),c=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:z(r.pathname,n)||r.pathname},nextLocation:{...o,pathname:z(o.pathname,n)||o.pathname},historyAction:i})}),[n,e]);return i.useEffect((()=>{let e=String(++un);return a(e),()=>t.deleteBlocker(e)}),[t]),i.useEffect((()=>{""!==o&&t.getBlocker(o,c)}),[t,o,c]),o&&r.blockers.has(o)?r.blockers.get(o):Ae}var dn={};function pn(e,t,n){t||dn[e]||(dn[e]=!0,p(!1,n))}var fn={};function hn(e,t){e||fn[t]||(fn[t]=!0,console.warn(t))}var mn=(r||(r=n.t(i,2))).useOptimistic,vn=()=>{};function gn(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(Ft&&e.element&&p(!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&&(Ft&&e.hydrateFallbackElement&&p(!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&&(Ft&&e.errorElement&&p(!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 yn=["HydrateFallback","hydrateFallbackElement"];function bn(e,t){return Se({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:u({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,hydrationRouteProperties:yn,mapRouteProperties:gn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}var wn=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 xn({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){let o=Ct();r=o||r;let[a,c]=i.useState(e.state),[s,u]=(l=a,mn?mn(l):[l,vn]);var l;let[d,p]=i.useState(),[f,h]=i.useState({isTransitioning:!1}),[m,v]=i.useState(),[g,y]=i.useState(),[b,w]=i.useState(),x=i.useRef(new Map),A=i.useCallback(((o,{deletedFetchers:a,newErrors:s,flushSync:l,viewTransitionOpts:d})=>{s&&n&&Object.values(s).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},unstable_pattern:ne(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)})),a.forEach((e=>x.current.delete(e))),hn(!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(hn(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((()=>{g&&(m?.resolve(),g.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>c(o)))}));return n.finished.finally((()=>{t((()=>{v(void 0),y(void 0),p(void 0),h({isTransitioning:!1})}))})),void t((()=>y(n)))}g?(m?.resolve(),g.skipTransition(),w({state:o,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(p(o),h({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&l?t((()=>c(o))):!1===r?c(o):i.startTransition((()=>{!0===r&&u((e=>An(e,o))),c(o)}))}),[e.window,t,g,m,r,u,n]);i.useLayoutEffect((()=>e.subscribe(A)),[e,A]),i.useEffect((()=>{f.isTransitioning&&!f.flushSync&&v(new wn)}),[f]),i.useEffect((()=>{if(m&&d&&e.window){let t=d,n=m.promise,o=e.window.document.startViewTransition((async()=>{!1===r?c(t):i.startTransition((()=>{!0===r&&u((e=>An(e,t))),c(t)})),await n}));o.finished.finally((()=>{v(void 0),y(void 0),p(void 0),h({isTransitioning:!1})})),y(o)}}),[d,m,e.window,r,u]),i.useEffect((()=>{m&&d&&s.location.key===d.location.key&&m.resolve()}),[m,g,s.location,d]),i.useEffect((()=>{!f.isTransitioning&&b&&(p(b.state),h({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))}),[f.isTransitioning,b]);let O=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]),E=e.basename||"/",k=i.useMemo((()=>({router:e,navigator:O,static:!1,basename:E,onError:n})),[e,O,E,n]);return i.createElement(i.Fragment,null,i.createElement(jt.Provider,{value:k},i.createElement(Tt.Provider,{value:s},i.createElement(Rt.Provider,{value:x.current},i.createElement(_t.Provider,{value:f},i.createElement(Sn,{basename:E,location:s.location,navigationType:s.historyAction,navigator:O,unstable_useTransitions:r},i.createElement(On,{routes:e.routes,future:e.future,state:s,onError:n})))))),null)}function An(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 On=i.memo((function({routes:e,future:t,state:n,onError:r}){return Vt(e,void 0,n,r,t)}));function En({to:e,replace:t,state:n,relative:r}){d(Ut(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=i.useContext(Dt);p(!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(It),{pathname:c}=zt(),s=qt(),u=K(e,V(a),c,"path"===r),l=JSON.stringify(u);return i.useEffect((()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})}),[s,l,r,t,n]),null}function kn(e){d(!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 Sn({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1,unstable_useTransitions:c}){d(!Ut(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=i.useMemo((()=>({basename:s,navigator:o,static:a,unstable_useTransitions:c,future:{}})),[s,o,a,c]);"string"==typeof n&&(n=v(n));let{pathname:l="/",search:f="",hash:h="",state:m=null,key:g="default"}=n,y=i.useMemo((()=>{let e=z(l,s);return null==e?null:{location:{pathname:e,search:f,hash:h,state:m,key:g},navigationType:r}}),[s,l,f,h,m,g,r]);return p(null!=y,`<Router basename="${s}"> is not able to match the URL "${l}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),null==y?null:i.createElement(Dt.Provider,{value:u},i.createElement(Mt.Provider,{children:t,value:y}))}function jn({children:e,location:t}){return Vt(Tn(e),t)}i.Component;function Tn(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,Tn(e.props.children,o));d(e.type===kn,`[${"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>`),d(!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=Tn(e.props.children,o)),n.push(a)})),n}var Pn="get",Cn="application/x-www-form-urlencoded";function _n(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Rn(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}var Nn=null;var Dn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mn(e){return null==e||Dn.has(e)?e:(p(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Cn}"`),null)}function In(e,t){let n,r,o,i,a;if(function(e){return _n(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?z(a,t):null,n=e.getAttribute("method")||Pn,o=Mn(e.getAttribute("enctype"))||Cn,i=new FormData(e)}else if(function(e){return _n(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return _n(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 c=e.getAttribute("formaction")||a.getAttribute("action");if(r=c?z(c,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Pn,o=Mn(e.getAttribute("formenctype"))||Mn(a.getAttribute("enctype"))||Cn,i=new FormData(a,e),!function(){if(null===Nn)try{new FormData(document.createElement("form"),0),Nn=!1}catch(e){Nn=!0}return Nn}()){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(_n(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Pn,r=null,o=Cn,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;var Ln={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Fn=/[&><\u2028\u2029]/g;function Hn(e){return e.replace(Fn,(e=>Ln[e]))}function Bn(e,t){if(!1===e||null==e)throw new Error(t)}Symbol("SingleFetchRedirect");function Un(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&&"/"===z(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function zn(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 Wn(e){return null!=e&&"string"==typeof e.page}function $n(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 qn(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,c=(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)||c(e,t))):"data"===i?t.filter(((t,i)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(a(t,i)||c(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 Gn(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 Yn(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&!Wn(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 Vn(e,t){return"lazy"===e.mode&&!0===t}function Kn(){let e=i.useContext(jt);return Bn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Jn(){let e=i.useContext(Tt);return Bn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Xn=i.createContext(void 0);function Qn(){let e=i.useContext(Xn);return Bn(e,"You must render this element inside a <HydratedRouter> element"),e}function Zn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function er(e,t,n){if(n&&!or)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}Xn.displayName="FrameworkContext";function tr({page:e,...t}){let{router:n}=Kn(),r=i.useMemo((()=>k(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(rr,{page:e,matches:r,...t}):null}function nr(e){let{manifest:t,routeModules:n}=Qn(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return async function(e,t,n){return Yn((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await zn(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter($n).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 rr({page:e,matches:t,...n}){let r=zt(),{future:o,manifest:a,routeModules:c}=Qn(),{basename:s}=Kn(),{loaderData:u,matches:l}=Jn(),d=i.useMemo((()=>qn(e,t,l,a,r,"data")),[e,t,l,a,r]),p=i.useMemo((()=>qn(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&&c[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let l=Un(e,s,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]}),[s,o.unstable_trailingSlashAwareDataRequests,u,r,a,d,t,e,c]),h=i.useMemo((()=>Gn(p,a)),[p,a]),m=nr(p);return i.createElement(i.Fragment,null,f.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),h.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),m.map((({key:e,link:t})=>i.createElement("link",{key:e,nonce:n.nonce,...t}))))}var or=!1;function ir(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:a,ssr:c}=Qn(),{router:s,static:u,staticContext:l}=Kn(),{matches:d}=Jn(),p=Ct(),f=Vn(a,c);o&&(o.didRenderScripts=!0);let h=er(d,null,r);i.useEffect((()=>{!0}),[]);let m=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${h.map(((e,n)=>{let r=`route${n}`,o=t.routes[e.route.id];Bn(o,`Route ${e.route.id} not found in manifest`);let{clientActionModule:i,clientLoaderModule:a,clientMiddlewareModule:c,hydrateFallbackModule:s,module:u}=o,l=[...i?[{module:i,varName:`${r}_clientAction`}]:[],...a?[{module:a,varName:`${r}_clientLoader`}]:[],...c?[{module:c,varName:`${r}_clientMiddleware`}]:[],...s?[{module:s,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,s),null,2)};`:""}\n window.__reactRouterRouteModules = {${h.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}))}),[]),v=or||p?[]:function(e){return[...new Set(e)]}(t.entry.imports.concat(Gn(h,t,{includeHydrateFallback:!0}))),g="object"==typeof t.sri?t.sri:{};return hn(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),or||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:g})}}):null,f?null:i.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:g[t.url],suppressHydrationWarning:!0}),i.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:g[t.entry.module],suppressHydrationWarning:!0}),v.map((t=>i.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:g[t],suppressHydrationWarning:!0}))),m)}function ar(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}i.Component;function cr({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(te(e))return i.createElement(sr,{title:"Unhandled Thrown Response!"},i.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),Ft?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(sr,{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 sr({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Qn();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(ir,null):null)))}var ur="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ur&&(window.__reactRouterVersion="7.12.0")}catch(e){}function lr(e,t){return Se({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:l({window:t?.window}),hydrationData:t?.hydrationData||dr(),routes:e,mapRouteProperties:gn,hydrationRouteProperties:yn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function dr(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:pr(e.errors)}),e}function pr(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 ee(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 fr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hr=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:c,target:s,to:u,preventScrollReset:l,viewTransition:p,unstable_defaultShouldRevalidate:f,...h},v){let{basename:g,unstable_useTransitions:y}=i.useContext(Dt),b="string"==typeof u&&fr.test(u),w=oe(u,g),x=function(e,{relative:t}={}){d(Ut(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(Dt),{hash:o,pathname:a,search:c}=Yt(e,{relative:t}),s=a;return"/"!==n&&(s="/"===a?n:J([n,a])),r.createHref({pathname:s,search:c,hash:o})}(u=w.to,{relative:r}),[A,O,E]=function(e,t){let n=i.useContext(Xn),[r,o]=i.useState(!1),[a,c]=i.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:l,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&c(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{c(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{c(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let h=()=>{o(!0)},m=()=>{o(!1),c(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:Zn(s,h),onBlur:Zn(u,m),onMouseEnter:Zn(l,h),onMouseLeave:Zn(d,m),onTouchStart:Zn(p,h)}]:[!1,f,{}]}(n,h),k=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:c,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let l=qt(),d=zt(),p=Yt(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:c,unstable_defaultShouldRevalidate:s});u?i.startTransition((()=>h())):h()}}),[d,l,p,n,r,t,e,o,a,c,s,u])}(u,{replace:a,state:c,target:s,preventScrollReset:l,relative:r,viewTransition:p,unstable_defaultShouldRevalidate:f,unstable_useTransitions:y});let S=i.createElement("a",{...h,...E,href:w.absoluteURL||x,onClick:w.isExternal||o?e:function(t){e&&e(t),t.defaultPrevented||k(t)},ref:ar(v,O),target:s,"data-discover":b||"render"!==t?void 0:"true"});return A&&!b?i.createElement(i.Fragment,null,S,i.createElement(tr,{page:x})):S}));hr.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:c,children:s,...u},l){let p=Yt(a,{relative:u.relative}),f=zt(),h=i.useContext(Tt),{navigator:m,basename:v}=i.useContext(Dt),g=null!=h&&function(e,{relative:t}={}){let n=i.useContext(_t);d(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=yr("useViewTransitionState"),o=Yt(e,{relative:t});if(!n.isTransitioning)return!1;let a=z(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=z(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=H(o.pathname,c)||null!=H(o.pathname,a)}(p)&&!0===c,y=m.encodeLocation?m.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&v&&(w=z(w,v)||w);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let A,O=b===y||!r&&b.startsWith(y)&&"/"===b.charAt(x),E=null!=w&&(w===y||!r&&w.startsWith(y)&&"/"===w.charAt(y.length)),k={isActive:O,isPending:E,isTransitioning:g},S=O?e:void 0;A="function"==typeof n?n(k):[n,O?"active":null,E?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let j="function"==typeof o?o(k):o;return i.createElement(hr,{...u,"aria-current":S,className:A,ref:l,style:j,to:a,viewTransition:c},"function"==typeof s?s(k):s)})).displayName="NavLink";var mr=i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:c=Pn,action:s,onSubmit:u,relative:l,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h,...v},g)=>{let{unstable_useTransitions:y}=i.useContext(Dt),b=Or(),w=function(e,{relative:t}={}){let{basename:n}=i.useContext(Dt),r=i.useContext(It);d(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Yt(e||".",{relative:t})},c=zt();if(null==e){a.search=c.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)}(s,{relative:l}),x="get"===c.toLowerCase()?"get":"post",A="string"==typeof s&&fr.test(s);return i.createElement("form",{ref:g,method:x,action:w,onSubmit:r?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute("formmethod")||c,d=()=>b(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:o,state:a,relative:l,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h});y&&!1!==n?i.startTransition((()=>d())):d()},...v,"data-discover":A||"render"!==e?void 0:"true"})}));function vr({getKey:e,storageKey:t,...n}){let r=i.useContext(Xn),{basename:o}=i.useContext(Dt),a=zt(),c=cn();!function({getKey:e,storageKey:t}={}){let{router:n}=yr("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:o}=br("useScrollRestoration"),{basename:a}=i.useContext(Dt),c=zt(),s=cn(),u=on("useNavigation").navigation;i.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:n}=t||{};i.useEffect((()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,n])}(i.useCallback((()=>{if("idle"===u.state){let t=Sr(c,s,a,e);kr[t]=window.scrollY}try{sessionStorage.setItem(t||Er,JSON.stringify(kr))}catch(e){p(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration="auto"}),[u.state,e,a,c,s,t])),"undefined"!=typeof document&&(i.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(t||Er);e&&(kr=JSON.parse(e))}catch(e){}}),[t]),i.useLayoutEffect((()=>{let t=n?.enableScrollRestoration(kr,(()=>window.scrollY),e?(t,n)=>Sr(t,n,a,e):void 0);return()=>t&&t()}),[n,a,e]),i.useLayoutEffect((()=>{if(!1!==r)if("number"!=typeof r){try{if(c.hash){let e=document.getElementById(decodeURIComponent(c.hash.slice(1)));if(e)return void e.scrollIntoView()}}catch{p(!1,`"${c.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}!0!==o&&window.scrollTo(0,0)}else window.scrollTo(0,r)}),[c,r,o]))}({getKey:e,storageKey:t});let s=i.useMemo((()=>{if(!r||!e)return null;let t=Sr(a,c,o,e);return t!==a.key?t:null}),[]);if(!r||r.isSpaMode)return null;let u=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},"")}try{let n=JSON.parse(sessionStorage.getItem(e)||"{}")[t||window.history.state.key];"number"==typeof n&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return i.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${u})(${Hn(JSON.stringify(t||Er))}, ${Hn(JSON.stringify(s))})`}})}function gr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yr(e){let t=i.useContext(jt);return d(t,gr(e)),t}function br(e){let t=i.useContext(Tt);return d(t,gr(e)),t}function wr(e){p("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(Rn(e)),n=i.useRef(!1),r=zt(),o=i.useMemo((()=>function(e,t){let n=Rn(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=qt(),c=i.useCallback(((e,t)=>{const r=Rn("function"==typeof e?e(new URLSearchParams(o)):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,c]}mr.displayName="Form",vr.displayName="ScrollRestoration";var xr=0,Ar=()=>`__${String(++xr)}__`;function Or(){let{router:e}=yr("useSubmit"),{basename:t}=i.useContext(Dt),n=an("useRouteId"),r=e.fetch,o=e.navigate;return i.useCallback((async(e,i={})=>{let{action:a,method:c,encType:s,formData:u,body:l}=In(e,t);if(!1===i.navigate){let e=i.fetcherKey||Ar();await r(e,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||c,formEncType:i.encType||s,flushSync:i.flushSync})}else await o(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||c,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[r,o,t,n])}var Er="react-router-scroll-positions",kr={};function Sr(e,t,n,r){let o=null;return r&&(o=r("/"!==n?{...e,pathname:z(e.pathname,n)||e.pathname}:e,t)),null==o&&(o=e.key),o}},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})},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})},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,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)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})},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})},52167:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6695),o=n(21648),i=n(25134),a=n(37820);function c(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})},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 c(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function s(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(c())}function f(e){return["html","body","#document"].includes(a(e))}Math.min,Math.max;const h=Math.round;function m(e,t,n){var r,i,a,c;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let d=1,f=1;t&&s(e)&&(d=e.offsetWidth>0&&h(l.width)/e.offsetWidth||1,f=e.offsetHeight>0&&h(l.height)/e.offsetHeight||1);const m=u(e)?o(e):window,v=!p()&&n,g=(l.left+(v&&null!=(r=null==(i=m.visualViewport)?void 0:i.offsetLeft)?r:0))/d,y=(l.top+(v&&null!=(a=null==(c=m.visualViewport)?void 0:c.offsetTop)?a:0))/f,b=l.width/d,w=l.height/f;return{width:b,height:w,top:y,right:g+b,bottom:y+w,left:g,x:g,y}}function v(e){return(t=e,(t instanceof o(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function g(e){if("html"===a(e))return e;const t=e.assignedSlot||e.parentNode||(l(e)?e.host:null)||v(e);return l(t)?t.host:t}function y(e){const t=g(e);return f(t)?e.ownerDocument.body:s(t)&&d(t)?t:y(t)}function b(e,t){var n;void 0===t&&(t=[]);const r=y(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=o(r),c=i?[a].concat(a.visualViewport||[],d(r)?r:[]):r,s=t.concat(c);return i?s:s.concat(b(c))}function w(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:c=!1}=r,s=o&&!c,l=s||i?[...u(e)?b(e):e.contextElement?b(e.contextElement):[],...b(t)]:[];l.forEach((e=>{s&&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)&&!c&&p.observe(e),u(e)||!e.contextElement||c||p.observe(e.contextElement),p.observe(t)}let f=c?m(e):null;return c&&function t(){const r=m(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=>{s&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(d)}}},92149:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});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 c=["onUpdate","onRepositioned","renderElement","renderElementTag","renderElementTo","renderTarget","className","id","style"];class s 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,c),i=a({target:this._targetNode.current,element:this._elementParentNode},o),s=n||"";if(this._elementParentNode&&this._elementParentNode.id!==s&&(this._elementParentNode.id=s),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:()=>c,Tw:()=>f,Zz:()=>p,ve:()=>h,y$:()=>s,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 c(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 s(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(s)(e,t)}let i=e,u=t,l=new Map,d=l,p=0,f=!1;function h(){d===l&&(d=new Map,l.forEach(((e,t)=>{d.set(t,e)})))}function m(){if(f)throw new Error(r(3));return u}function v(e){if("function"!=typeof e)throw new Error(r(4));if(f)throw new Error(r(5));let t=!0;h();const n=p++;return d.set(n,e),function(){if(t){if(f)throw new Error(r(6));t=!1,h(),d.delete(n),l=null}}}function g(e){if(!c(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}g({type:a.INIT});return{dispatch:g,subscribe:v,getState:m,replaceReducer:function(e){if("function"!=typeof e)throw new Error(r(10));i=e,g({type:a.REPLACE})},[o]:function(){const e=v;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(r(11));function n(){const e=t;e.next&&e.next(m())}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 c={};for(let i=0;i<o.length;i++){const s=o[i],u=n[s],l=e[s],d=u(l,t);if(void 0===d){t&&t.type;throw new Error(r(14))}c[s]=d,a=a||d!==l}return a=a||o.length!==Object.keys(e).length,a?c: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 c={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map((e=>e(c)));return a=p(...s)(i.dispatch),{...i,dispatch:a}}}function h(e){return c(e)&&"type"in e&&"string"==typeof e.type}}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=a,s.amdD=function(){throw new Error("define cannot be used indirect")},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.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);s.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,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"chunk-"+({222:"vendor-libphonenumber-js",236:"actions",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",236:"bc190594f35968573276",262:"2a1be3529076794f6bbc",264:"d086e7b6f5e07f62a05d",280:"1510eb8a8214f553a761",310:"5a9ed8cbebd7b6c77c2c",389:"185e13c535962fcbc2f8",556:"b4fac584233336e71fd4",651:"77319c414b403d20f608",668:"778bea177c4568925c34",672:"0899eb884a0c573f03ce",722:"e630249c129a300afa42",827:"d6342ceea1e020947fbc",916:"82f39f1e837cce57e8ad",987:"fc556865780dd6692aeb"}[e]+".js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.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),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i="tocco-widget-bundle:",s.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,c;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||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.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),c&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=101,s.p="/",(()=>{var e={101:0};s.f.j=(t,n)=>{var r=s.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=s.p+s.u(t),a=new Error;s.l(i,(n=>{if(s.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,c]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(c)c(s)}for(t&&t(n);u<i.length;u++)o=i[u],s.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))})(),s.nc=void 0;var u={};return(()=>{"use strict";s.r(u),s.d(u,{app:()=>qe});var e=s(61402),t=s(26396),n=s.n(t),r=s(62193),o=s.n(r),i=s(2404),a=s.n(i),c=s(71086),l=s.n(c),d=s(5556),p=s.n(d),f=s(4883),h=s.n(f),m=s(3433),v=s(52600),g=s(88951),y=s(13128),b=s(59042),w=s(28391),x=s(96450),A=s(72942),O=s(52334),E=s(82682),k=s(38159),S=s(33393),j=s(7311),T=s(66498),P=s(35301),C=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return T.A.getDispatchActions(e,_,t)},_=[{name:"entityName",action:P.Zl,mandatory:!0,argsFactory:function(e){return[e.entityName]}},{name:"entityName",action:P.uO,argsFactory:function(e){return[e.formBase||e.entityName]}},{name:"formBase",action:P.uO,argsFactory:function(e){return[e.formBase]}},{name:"scrollBehaviour",action:P.Zy,argsFactory:function(e){return[e.scrollBehaviour]}},{name:"id",action:P.RH,argsFactory:function(e){return[e.id||(new Date).valueOf()]}}],R=s(44467),N=s(92207),D=s.n(N),M=s(90167),I=s(29056),L=s(71635),F=n()(n()({},L.Bt,I.A.singleTransferReducer("formTouched")),L.wr,I.A.singleTransferReducer("detailParams")),H={detailParams:void 0,formTouched:!1};var B=s(15890),U=s.n(B),z=s(22056),W=s.n(z),$=s(32742),q=s(57327),G=s(27399);function Y(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 V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var K=function(e){var t={};return e.fields.forEach((function(e){t[e.fieldName]=V({},e)})),e.relations.forEach((function(e){t[e.relationName]=V({type:"relation"},e)})),t};function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K;return D().mark((function n(){var r;return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,M.T1)(q.A.requestSaga,"entities/".concat(e,"/model"));case 2:return r=n.sent,n.next=5,(0,M.T1)(t,r.body);case 5:return n.abrupt("return",n.sent);case 6:case"end":return n.stop()}}),n)}))()}var X={CREATE:"create",UPDATE:"update"};const Q={modes:X,getMode:function(e){return void 0===e?X.CREATE:X.UPDATE}};var Z=s(21259),ee=s.n(Z);const te=function(e){var t=e.split("/").filter((function(e){return!!e})),n=t[t.length-1],r=t.filter((function(e,t){return t>1&&t%2==0})).map((function(e){return e.split(".")})).reduce((function(e,t){return[].concat(ee()(e),ee()(t))}),[]);if(isNaN(n)){return{modelPaths:r,entityId:undefined,parentUrl:"/"+t.slice(0,-1).join("/")}}return{modelPaths:r,entityId:t[t.length-1],parentUrl:"/"+t.slice(0,-2).join("/")}};const ne=function(e,t){return 0!==t.length||(!e||isNaN(e))};var re=s(74848),oe=D().mark(ue),ie=D().mark(le),ae=D().mark(fe),ce=function(e){return e.entityBrowser},se=function(e){return e.input};function ue(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Q7)([(0,M.p8)(L.M4,de),(0,M.p8)(L.z3,le),(0,M.p8)(L.o7,he)]);case 2:case"end":return e.stop()}}),oe)}function le(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.yJ)(L.EJ(void 0));case 2:case"end":return e.stop()}}),ie)}function de(e){var t=e.payload;return D().mark((function e(){var n,r,o,i,a,c,s,u,l,d,p,f,h,m,v,g;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.T1)(te,t.url);case 2:return n=e.sent,r=n.modelPaths,o=n.entityId,i=n.parentUrl,e.next=8,(0,M.Lt)(ce);case 8:return a=e.sent,c=a.entityName,s=a.formBase,e.next=13,(0,M.T1)(Q.getMode,o);case 13:return u=e.sent,e.next=16,(0,M.T1)(pe,c,r,s);case 16:return l=e.sent,d=W()(l,2),p=d[0],f=d[1],e.next=22,(0,M.Lt)(se);case 22:return h=e.sent,m=h.initialKey,e.next=26,(0,M.T1)(ne,m,r);case 26:return v=e.sent,g={mode:u,entityId:o,entityName:p,formName:f,parentUrl:i,showBackButton:v},e.next=30,(0,M.yJ)(L.EJ(g));case 30:case"end":return e.stop()}}),e)}))()}function pe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return D().mark((function o(){var i,a,c,s,u,l,d;return D().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=U()(t),a=i[0],c=i.slice(1),a){o.next=3;break}return o.abrupt("return",[e,r]);case 3:return o.next=5,(0,M.T1)(J,e);case 5:if(s=o.sent,u=s[a]){o.next=16;break}return o.next=10,(0,M.T1)(q.A.fetchForm,"".concat(n,"_detail_").concat(a),"list");case 10:return l=o.sent,o.next=13,(0,M.T1)(pe,l.modelName,c,"".concat(n,"_").concat(a));case 13:case 19:return o.abrupt("return",o.sent);case 16:return d="".concat(n,"_").concat(u.targetEntity),o.next=19,(0,M.T1)(pe,u.targetEntity,c,n,d);case 20:case"end":return o.stop()}}),o)}))()}function fe(e){var t;return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,M.T1)($.Ix);case 2:return t=n.sent,n.next=5,(0,M.yJ)(A.A.modal("navigation-pending-changes","client.entity-browser.detail.confirmTouchedFormTitle",e,(function(e){var n=e.close;return(0,re.jsx)(G.A,{onYes:function(){n(),t.put("yes")},onNo:function(){n(),t.put("no")}})}),!0,(function(){return t.put("no")})));case 5:return n.next=7,(0,M.s)(t);case 7:return n.abrupt("return",n.sent);case 8:case"end":return n.stop()}}),ae)}function he(e){var t=e.payload;return D().mark((function e(){var n,r;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.message,r=t.confirmCallback,e.next=3,(0,M.T1)(fe,n);case 3:if("yes"!==e.sent){e.next=9;break}return e.next=7,(0,M.T1)(r,!0);case 7:e.next=11;break;case 9:return e.next=11,(0,M.T1)(r,!1);case 11:case"end":return e.stop()}}),e)}))()}var me=D().mark(ve);function ve(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Q7)([(0,M.Zy)(ue)]);case 2:case"end":return e.stop()}}),me)}const ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H,t=arguments.length>1?arguments[1]:void 0,n=F[t.type];return n?n(e,t):e};function ye(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 be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var we=n()(n()(n()(n()({},P.Rf,I.A.singleTransferReducer("entityName")),P.g0,(function(e,t){var n=t.payload.formBase;return n?be(be({},e),{},{formBase:n}):be({},e)})),P.J6,I.A.singleTransferReducer("scrollBehaviour")),P.PH,I.A.singleTransferReducer("appId")),xe={entityName:"",formBase:"",scrollBehaviour:"none",appId:""};var Ae=D().mark(ke),Oe=D().mark(Se),Ee=D().mark(je);function ke(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Q7)([(0,M.T1)(Se),(0,M.p8)(P.XA,je)]);case 2:case"end":return e.stop()}}),Ae)}function Se(){return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,M.s)(e.A.INPUT_INITIALIZED);case 2:return t.next=4,(0,M.yJ)(x.A.doSessionCheck());case 4:case"end":return t.stop()}}),Oe)}function je(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.yJ)(w.A.fireExternalEvent("onRouteChange"));case 2:case"end":return e.stop()}}),Ee)}var Te=D().mark(Pe);function Pe(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Q7)([(0,M.Zy)(ke)]);case 2:case"end":return e.stop()}}),Te)}const Ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xe,t=arguments.length>1?arguments[1]:void 0,n=we[t.type];return n?n(e,t):e},_e={detail:ge,form:R.A,entityBrowser:Ce};var Re,Ne,De=[Pe,ve];function Me(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 Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Le="entity-browser",Fe=["onVisibilityStatusChange","onRouteChange"],He=h().lazy((function(){return Promise.all([s.e(280),s.e(123),s.e(651)]).then(s.bind(s,19651))})),Be=function(){return Re||(Re=(0,re.jsx)(f.Suspense,{fallback:"",children:(0,re.jsx)(He,{})}))},Ue=function(e){var t=e.initialKey,n=e.initialAction,r=(0,m.Zp)(),o=(0,m.zy)().pathname;(0,f.useEffect)((function(){if(t&&!isNaN(t)){if(!o.match(/\/detail\/[0-9]*/)){var e="/detail/".concat(t);r(e)}}if(n&&n.name){var i="/action/".concat(n.name,"?").concat(S.A.toQueryString(n.properties));r(i)}}),[])},ze=function(e){var t=e.memoryRouter,n=e.initialKey,r=e.initialAction,o=(t?m.bg:m.Ge)([{path:"*",element:(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(Ue,{initialKey:n,initialAction:r}),Ne||(Ne=(0,re.jsx)(Be,{}))]})}]);return(0,re.jsx)(v.pg,{router:o})},We=function(t,n,r,o){n=Ie(Ie({},n),{},{id:t}),k.A.setInputEnvs(n);var i=e.A.createStore(_e,De,n,Le);w.A.addToStore(i,(function(t){return e.A.getEvents(Fe,t.input)})),g.A.addToStore(i),y.A.dynamicActionsAddToStore(i),b.A.addToStore(i,!0,["console","remote","notification"]),A.A.addToStore(i,!0),x.A.addToStore(i);var a=(0,re.jsx)(ze,{memoryRouter:n.memoryHistory,initialKey:n.initialKey,initialAction:n.initialAction});return e.A.createApp(Le,a,i,{input:n,actions:C(n),publicPath:o,textResourceModules:["component","common","actions","entity-list","entity-detail"]})},$e=function(t){var n=e.A.useApp({initApp:We,props:t,packageName:Le}),r=n.component,i=n.store,c=j.A.usePrevious(t);return j.A.useDidUpdate((function(){var e=l()(t,(function(e,t){return!a()(e,c[t])}));o()(e)||C(e,!1).forEach((function(e){i.dispatch(e)}))}),[t]),(0,re.jsx)(re.Fragment,{children:r})};$e.propTypes=Ie({entityName:p().string.isRequired,searchFormType:O.X,formBase:p().string,limit:p().oneOfType([p().number,p().string]),preselectedSearchFields:p().array,searchFilters:p().arrayOf(p().string),simpleSearchFields:p().string,initialKey:p().string,initialAction:p().shape({name:p().string,properties:p().objectOf(p().object)}),businessUnit:p().string,memoryHistory:p().bool,backendUrl:p().string,scrollBehaviour:p().oneOf(["none","inline"]),appContext:E.A.propTypes,modifyFormDefinition:p().func,modifyEntityPaths:p().func,disableDetailView:p().bool,reportIds:p().arrayOf(p().string),customActionEventHandlers:p().objectOf(p().objectOf(p().func)),isHidden:p().bool},w.A.createPropTypes(Fe));var qe=e.A.createBundleableApp(Le,We,$e);e.A.registerAppInRegistry(qe.name,qe.init)})(),u})()));
|