diff --git a/static/dist/jbot.js b/static/dist/jbot.js index b6983bd..e1912a8 100644 --- a/static/dist/jbot.js +++ b/static/dist/jbot.js @@ -1,4 +1,4 @@ -import{r as i,j as l,c as tn}from"./client-DS0SU7Jy.js";/** +import{r as i,j as l,c as Qt}from"./client-DS0SU7Jy.js";/** * react-router v7.15.1 * * Copyright (c) Remix Software Inc. @@ -7,6 +7,6 @@ import{r as i,j as l,c as tn}from"./client-DS0SU7Jy.js";/** * LICENSE.md file in the root directory of this source tree. * * @license MIT - */var ft="popstate";function mt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function nn(e={}){function t(r,a){var d;let s=(d=a.state)==null?void 0:d.masked,{pathname:o,search:c,hash:u}=s||r.location;return Ge("",{pathname:o,search:c,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:we(a)}return an(t,n,null,e)}function M(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function K(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rn(){return Math.random().toString(36).substring(2,10)}function pt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ge(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ue(t):t,state:n,key:t&&t.key||r||rn(),mask:a}}function we({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 ue(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 an(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,o=a.history,c="POP",u=null,d=f();d==null&&(d=0,o.replaceState({...o.state,idx:d},""));function f(){return(o.state||{idx:null}).idx}function h(){c="POP";let m=f(),g=m==null?null:m-d;d=m,u&&u({action:c,location:b.location,delta:g})}function p(m,g){c="PUSH";let w=mt(m)?m:Ge(b.location,m,g);d=f()+1;let x=pt(w,d),P=b.createHref(w.mask||w);try{o.pushState(x,"",P)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;a.location.assign(P)}s&&u&&u({action:c,location:b.location,delta:1})}function y(m,g){c="REPLACE";let w=mt(m)?m:Ge(b.location,m,g);d=f();let x=pt(w,d),P=b.createHref(w.mask||w);o.replaceState(x,"",P),s&&u&&u({action:c,location:b.location,delta:0})}function v(m){return sn(m)}let b={get action(){return c},get location(){return e(a,o)},listen(m){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(ft,h),u=m,()=>{a.removeEventListener(ft,h),u=null}},createHref(m){return t(a,m)},createURL:v,encodeLocation(m){let g=v(m);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:y,go(m){return o.go(m)}};return b}function sn(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),M(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:we(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function jt(e,t,n="/"){return on(e,t,n,!1)}function on(e,t,n,r,a){let s=typeof t=="string"?ue(t):t,o=ee(s.pathname||"/",n);if(o==null)return null;let c=ln(e),u=null,d=wn(o);for(let f=0;u==null&&f{let f={relativePath:d===void 0?o.path||"":d,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&u)return;M(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let h=V([r,f.relativePath]),p=n.concat(f);o.children&&o.children.length>0&&(M(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Tt(o.children,t,p,h,u)),!(o.path==null&&!o.index)&&t.push({path:h,score:gn(h,o.index),routesMeta:p})};return e.forEach((o,c)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))s(o,c);else for(let d of Mt(o.path))s(o,c,!0,d)}),t}function Mt(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let o=Mt(r.join("/")),c=[];return c.push(...o.map(u=>u===""?s:[s,u].join("/"))),a&&c.push(...o),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function un(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:yn(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var cn=/^:[\w-]+$/,dn=3,hn=2,fn=1,mn=10,pn=-2,gt=e=>e==="*";function gn(e,t){let n=e.split("/"),r=n.length;return n.some(gt)&&(r+=pn),t&&(r+=hn),n.filter(a=>!gt(a)).reduce((a,s)=>a+(cn.test(s)?dn:s===""?fn:mn),r)}function yn(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function vn(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",o=[];for(let c=0;c{if(f==="*"){let v=c[p]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const y=c[p];return h&&!y?d[f]=void 0:d[f]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:o,pattern:e}}function bn(e,t=!1,n=!0){K(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,u,d,f)=>{if(r.push({paramName:c,isOptional:u!=null}),u){let h=f.charAt(d+o.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function wn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return K(!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 ee(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 xn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function En(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?ue(e):e,s;return n?(n=It(n),n.startsWith("/")?s=yt(n.substring(1),"/"):s=yt(n,t)):s=t,{pathname:s,search:kn(r),hash:Cn(a)}}function yt(e,t){let n=$e(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ve(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 and the router will parse it for you.`}function Rn(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Pt(e){let t=Rn(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function tt(e,t,n,r=!1){let a;typeof e=="string"?a=ue(e):(a={...e},M(!a.pathname||!a.pathname.includes("?"),Ve("?","pathname","search",a)),M(!a.pathname||!a.pathname.includes("#"),Ve("#","pathname","hash",a)),M(!a.search||!a.search.includes("#"),Ve("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,c;if(o==null)c=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}c=h>=0?t[h]:"/"}let u=En(a,c),d=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||f)&&(u.pathname+="/"),u}var It=e=>e.replace(/\/\/+/g,"/"),V=e=>It(e.join("/")),$e=e=>e.replace(/\/+$/,""),Sn=e=>$e(e).replace(/^\/*/,"/"),kn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Cn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Nn=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 jn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Tn(e){let t=e.map(n=>n.route.path).filter(Boolean);return V(t)||"/"}var At=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Lt(e,t){let n=e;if(typeof n!="string"||!xn.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(At)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),c=ee(o.pathname,t);o.origin===s.origin&&c!=null?n=c+o.search+o.hash:a=!0}catch{K(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var $t=["POST","PUT","PATCH","DELETE"];new Set($t);var Mn=["GET",...$t];new Set(Mn);var ce=i.createContext(null);ce.displayName="DataRouter";var Be=i.createContext(null);Be.displayName="DataRouterState";var _t=i.createContext(!1);function Pn(){return i.useContext(_t)}var Bt=i.createContext({isTransitioning:!1});Bt.displayName="ViewTransition";var In=i.createContext(new Map);In.displayName="Fetchers";var An=i.createContext(null);An.displayName="Await";var H=i.createContext(null);H.displayName="Navigation";var Ee=i.createContext(null);Ee.displayName="Location";var te=i.createContext({outlet:null,matches:[],isDataRoute:!1});te.displayName="Route";var nt=i.createContext(null);nt.displayName="RouteError";var Ft="REACT_ROUTER_ERROR",Ln="REDIRECT",$n="ROUTE_ERROR_RESPONSE";function _n(e){if(e.startsWith(`${Ft}:${Ln}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Bn(e){if(e.startsWith(`${Ft}:${$n}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Nn(t.status,t.statusText,t.data)}catch{}}function Fn(e,{relative:t}={}){M(Re(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=i.useContext(H),{hash:a,pathname:s,search:o}=ke(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:V([n,s])),r.createHref({pathname:c,search:o,hash:a})}function Re(){return i.useContext(Ee)!=null}function ne(){return M(Re(),"useLocation() may be used only in the context of a component."),i.useContext(Ee).location}var Ot="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Dt(e){i.useContext(H).static||i.useLayoutEffect(e)}function Se(){let{isDataRoute:e}=i.useContext(te);return e?Xn():On()}function On(){M(Re(),"useNavigate() may be used only in the context of a component.");let e=i.useContext(ce),{basename:t,navigator:n}=i.useContext(H),{matches:r}=i.useContext(te),{pathname:a}=ne(),s=JSON.stringify(Pt(r)),o=i.useRef(!1);return Dt(()=>{o.current=!0}),i.useCallback((u,d={})=>{if(K(o.current,Ot),!o.current)return;if(typeof u=="number"){n.go(u);return}let f=tt(u,JSON.parse(s),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:V([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,s,a,e])}i.createContext(null);function ke(e,{relative:t}={}){let{matches:n}=i.useContext(te),{pathname:r}=ne(),a=JSON.stringify(Pt(n));return i.useMemo(()=>tt(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Dn(e,t){return Ut(e,t)}function Ut(e,t,n){var m;M(Re(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=i.useContext(H),{matches:a}=i.useContext(te),s=a[a.length-1],o=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let g=d&&d.path||"";Ht(c,!d||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + */var ft="popstate";function mt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Zt(e={}){function t(r,a){var d;let s=(d=a.state)==null?void 0:d.masked,{pathname:o,search:c,hash:u}=s||r.location;return Ge("",{pathname:o,search:c,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:we(a)}return tn(t,n,null,e)}function M(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function K(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function en(){return Math.random().toString(36).substring(2,10)}function pt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ge(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ue(t):t,state:n,key:t&&t.key||r||en(),mask:a}}function we({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 ue(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 tn(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,o=a.history,c="POP",u=null,d=f();d==null&&(d=0,o.replaceState({...o.state,idx:d},""));function f(){return(o.state||{idx:null}).idx}function h(){c="POP";let m=f(),g=m==null?null:m-d;d=m,u&&u({action:c,location:b.location,delta:g})}function p(m,g){c="PUSH";let w=mt(m)?m:Ge(b.location,m,g);d=f()+1;let x=pt(w,d),P=b.createHref(w.mask||w);try{o.pushState(x,"",P)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;a.location.assign(P)}s&&u&&u({action:c,location:b.location,delta:1})}function y(m,g){c="REPLACE";let w=mt(m)?m:Ge(b.location,m,g);d=f();let x=pt(w,d),P=b.createHref(w.mask||w);o.replaceState(x,"",P),s&&u&&u({action:c,location:b.location,delta:0})}function v(m){return nn(m)}let b={get action(){return c},get location(){return e(a,o)},listen(m){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(ft,h),u=m,()=>{a.removeEventListener(ft,h),u=null}},createHref(m){return t(a,m)},createURL:v,encodeLocation(m){let g=v(m);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:y,go(m){return o.go(m)}};return b}function nn(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),M(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:we(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Nt(e,t,n="/"){return rn(e,t,n,!1)}function rn(e,t,n,r,a){let s=typeof t=="string"?ue(t):t,o=ee(s.pathname||"/",n);if(o==null)return null;let c=an(e),u=null,d=yn(o);for(let f=0;u==null&&f{let f={relativePath:d===void 0?o.path||"":d,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&u)return;M(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let h=V([r,f.relativePath]),p=n.concat(f);o.children&&o.children.length>0&&(M(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),jt(o.children,t,p,h,u)),!(o.path==null&&!o.index)&&t.push({path:h,score:fn(h,o.index),routesMeta:p})};return e.forEach((o,c)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))s(o,c);else for(let d of Tt(o.path))s(o,c,!0,d)}),t}function Tt(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let o=Tt(r.join("/")),c=[];return c.push(...o.map(u=>u===""?s:[s,u].join("/"))),a&&c.push(...o),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function sn(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mn(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var on=/^:[\w-]+$/,ln=3,un=2,cn=1,dn=10,hn=-2,gt=e=>e==="*";function fn(e,t){let n=e.split("/"),r=n.length;return n.some(gt)&&(r+=hn),t&&(r+=un),n.filter(a=>!gt(a)).reduce((a,s)=>a+(on.test(s)?ln:s===""?cn:dn),r)}function mn(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function pn(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",o=[];for(let c=0;c{if(f==="*"){let v=c[p]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const y=c[p];return h&&!y?d[f]=void 0:d[f]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:o,pattern:e}}function gn(e,t=!1,n=!0){K(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,u,d,f)=>{if(r.push({paramName:c,isOptional:u!=null}),u){let h=f.charAt(d+o.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function yn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return K(!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 ee(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 vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function bn(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?ue(e):e,s;return n?(n=Pt(n),n.startsWith("/")?s=yt(n.substring(1),"/"):s=yt(n,t)):s=t,{pathname:s,search:En(r),hash:Rn(a)}}function yt(e,t){let n=_e(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ve(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 and the router will parse it for you.`}function wn(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Mt(e){let t=wn(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function tt(e,t,n,r=!1){let a;typeof e=="string"?a=ue(e):(a={...e},M(!a.pathname||!a.pathname.includes("?"),Ve("?","pathname","search",a)),M(!a.pathname||!a.pathname.includes("#"),Ve("#","pathname","hash",a)),M(!a.search||!a.search.includes("#"),Ve("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,c;if(o==null)c=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}c=h>=0?t[h]:"/"}let u=bn(a,c),d=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||f)&&(u.pathname+="/"),u}var Pt=e=>e.replace(/\/\/+/g,"/"),V=e=>Pt(e.join("/")),_e=e=>e.replace(/\/+$/,""),xn=e=>_e(e).replace(/^\/*/,"/"),En=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Rn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Sn=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 kn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Cn(e){let t=e.map(n=>n.route.path).filter(Boolean);return V(t)||"/"}var It=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function At(e,t){let n=e;if(typeof n!="string"||!vn.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(It)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),c=ee(o.pathname,t);o.origin===s.origin&&c!=null?n=c+o.search+o.hash:a=!0}catch{K(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Lt=["POST","PUT","PATCH","DELETE"];new Set(Lt);var Nn=["GET",...Lt];new Set(Nn);var ce=i.createContext(null);ce.displayName="DataRouter";var Be=i.createContext(null);Be.displayName="DataRouterState";var _t=i.createContext(!1);function jn(){return i.useContext(_t)}var $t=i.createContext({isTransitioning:!1});$t.displayName="ViewTransition";var Tn=i.createContext(new Map);Tn.displayName="Fetchers";var Mn=i.createContext(null);Mn.displayName="Await";var H=i.createContext(null);H.displayName="Navigation";var Ee=i.createContext(null);Ee.displayName="Location";var te=i.createContext({outlet:null,matches:[],isDataRoute:!1});te.displayName="Route";var nt=i.createContext(null);nt.displayName="RouteError";var Bt="REACT_ROUTER_ERROR",Pn="REDIRECT",In="ROUTE_ERROR_RESPONSE";function An(e){if(e.startsWith(`${Bt}:${Pn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Ln(e){if(e.startsWith(`${Bt}:${In}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Sn(t.status,t.statusText,t.data)}catch{}}function _n(e,{relative:t}={}){M(Re(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=i.useContext(H),{hash:a,pathname:s,search:o}=ke(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:V([n,s])),r.createHref({pathname:c,search:o,hash:a})}function Re(){return i.useContext(Ee)!=null}function ne(){return M(Re(),"useLocation() may be used only in the context of a component."),i.useContext(Ee).location}var Ft="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ot(e){i.useContext(H).static||i.useLayoutEffect(e)}function Se(){let{isDataRoute:e}=i.useContext(te);return e?Kn():$n()}function $n(){M(Re(),"useNavigate() may be used only in the context of a component.");let e=i.useContext(ce),{basename:t,navigator:n}=i.useContext(H),{matches:r}=i.useContext(te),{pathname:a}=ne(),s=JSON.stringify(Mt(r)),o=i.useRef(!1);return Ot(()=>{o.current=!0}),i.useCallback((u,d={})=>{if(K(o.current,Ft),!o.current)return;if(typeof u=="number"){n.go(u);return}let f=tt(u,JSON.parse(s),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:V([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,s,a,e])}i.createContext(null);function ke(e,{relative:t}={}){let{matches:n}=i.useContext(te),{pathname:r}=ne(),a=JSON.stringify(Mt(n));return i.useMemo(()=>tt(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Bn(e,t){return Dt(e,t)}function Dt(e,t,n){var m;M(Re(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=i.useContext(H),{matches:a}=i.useContext(te),s=a[a.length-1],o=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let g=d&&d.path||"";zt(c,!d||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let f=ne(),h;if(t){let g=typeof t=="string"?ue(t):t;M(u==="/"||((m=g.pathname)==null?void 0:m.startsWith(u)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${g.pathname}" was given in the \`location\` prop.`),h=g}else h=f;let p=h.pathname||"/",y=p;if(u!=="/"){let g=u.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=n&&n.state.matches.length?n.state.matches.map(g=>Object.assign(g,{route:n.manifest[g.route.id]||g.route})):jt(e,{pathname:y});K(d||v!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),K(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let b=Vn(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},o,g.params),pathname:V([u,r.encodeLocation?r.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:V([u,r.encodeLocation?r.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),a,n);return t&&b?i.createElement(Ee.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},b):b}function Un(){let e=Yn(),t=jn(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)",a={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=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:s},"ErrorBoundary")," or"," ",i.createElement("code",{style:s},"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:a},n):null,o)}var zn=i.createElement(Un,null),zt=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||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?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&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Bn(e.digest);n&&(e=n)}let t=e!==void 0?i.createElement(te.Provider,{value:this.props.routeContext},i.createElement(nt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(Hn,{error:e},t):t}};zt.contextType=_t;var Je=new WeakMap;function Hn({children:e,error:t}){let{basename:n}=i.useContext(H);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=_n(t.digest);if(r){let a=Je.get(t);if(a)throw a;let s=Lt(r.location,n);if(At&&!Je.get(t))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Je.set(t,o),o}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function Wn({routeContext:e,match:t,children:n}){let r=i.useContext(ce);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(te.Provider,{value:e},n)}function Vn(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r==null?void 0:r.errors;if(s!=null){let f=a.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);M(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let o=!1,c=-1;if(n&&r){o=r.renderFallback;for(let f=0;f=0?a=a.slice(0,c+1):a=[a[0]];break}}}}let u=n==null?void 0:n.onError,d=r&&u?(f,h)=>{var p,y;u(f,{location:r.location,params:((y=(p=r.matches)==null?void 0:p[0])==null?void 0:y.params)??{},pattern:Tn(r.matches),errorInfo:h})}:void 0;return a.reduceRight((f,h,p)=>{let y,v=!1,b=null,m=null;r&&(y=s&&h.route.id?s[h.route.id]:void 0,b=h.route.errorElement||zn,o&&(c<0&&p===0?(Ht("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,m=null):c===p&&(v=!0,m=h.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,p+1)),w=()=>{let x;return y?x=b:v?x=m:h.route.Component?x=i.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=f,i.createElement(Wn,{match:h,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:x})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?i.createElement(zt,{location:r.location,revalidation:r.revalidation,component:b,error:y,children:w(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:d}):w()},null)}function rt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jn(e){let t=i.useContext(ce);return M(t,rt(e)),t}function qn(e){let t=i.useContext(Be);return M(t,rt(e)),t}function Kn(e){let t=i.useContext(te);return M(t,rt(e)),t}function at(e){let t=Kn(e),n=t.matches[t.matches.length-1];return M(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Gn(){return at("useRouteId")}function Yn(){var r;let e=i.useContext(nt),t=qn("useRouteError"),n=at("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Xn(){let{router:e}=Jn("useNavigate"),t=at("useNavigate"),n=i.useRef(!1);return Dt(()=>{n.current=!0}),i.useCallback(async(a,s={})=>{K(n.current,Ot),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var vt={};function Ht(e,t,n){!t&&!vt[e]&&(vt[e]=!0,K(!1,n))}i.memo(Qn);function Qn({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:s}){return Ut(e,void 0,{manifest:t,state:r,isStatic:a,onError:s})}function Pe(e){M(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Zn({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:s=!1,useTransitions:o}){M(!Re(),"You cannot render a inside another . You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=i.useMemo(()=>({basename:c,navigator:a,static:s,useTransitions:o,future:{}}),[c,a,s,o]);typeof n=="string"&&(n=ue(n));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:y="default",mask:v}=n,b=i.useMemo(()=>{let m=ee(d,c);return m==null?null:{location:{pathname:m,search:f,hash:h,state:p,key:y,mask:v},navigationType:r}},[c,d,f,h,p,y,r,v]);return K(b!=null,` is not able to match the URL "${d}${f}${h}" because it does not start with the basename, so the won't render anything.`),b==null?null:i.createElement(H.Provider,{value:u},i.createElement(Ee.Provider,{children:t,value:b}))}function er({children:e,location:t}){return Dn(Ye(e),t)}function Ye(e,t=[]){let n=[];return i.Children.forEach(e,(r,a)=>{if(!i.isValidElement(r))return;let s=[...t,a];if(r.type===i.Fragment){n.push.apply(n,Ye(r.props.children,s));return}M(r.type===Pe,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),M(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ye(r.props.children,s)),n.push(o)}),n}var Ie="get",Ae="application/x-www-form-urlencoded";function Fe(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function tr(e){return Fe(e)&&e.tagName.toLowerCase()==="button"}function nr(e){return Fe(e)&&e.tagName.toLowerCase()==="form"}function rr(e){return Fe(e)&&e.tagName.toLowerCase()==="input"}function ar(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sr(e,t){return e.button===0&&(!t||t==="_self")&&!ar(e)}var je=null;function or(){if(je===null)try{new FormData(document.createElement("form"),0),je=!1}catch{je=!0}return je}var ir=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qe(e){return e!=null&&!ir.has(e)?(K(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Ae}"`),null):e}function lr(e,t){let n,r,a,s,o;if(nr(e)){let c=e.getAttribute("action");r=c?ee(c,t):null,n=e.getAttribute("method")||Ie,a=qe(e.getAttribute("enctype"))||Ae,s=new FormData(e)}else if(tr(e)||rr(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a -