@worldresources/wri-design-systems 2.132.0 → 2.133.0

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/dist/index.cjs.js CHANGED
@@ -2160,18 +2160,7 @@
2160
2160
  @media screen and (max-width: 768px) {
2161
2161
  text-align: left;
2162
2162
  }
2163
- `;var Bo,Oo={};
2164
- /**
2165
- * react-router v7.1.5
2166
- *
2167
- * Copyright (c) Remix Software Inc.
2168
- *
2169
- * This source code is licensed under the MIT license found in the
2170
- * LICENSE.md file in the root directory of this source tree.
2171
- *
2172
- * @license MIT
2173
- */
2174
- function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function No({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function Fo(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Ao(e,t,r="/"){return function(e,t,r,n){let o="string"==typeof t?Fo(t):t,a=na(o.pathname||"/",r);if(null==a)return null;let i=Zo(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let l=null;for(let e=0;null==l&&e<i.length;++e){let t=ra(a);l=ea(i[e],t,n)}return l}(e,t,r,!1)}function Zo(e,t=[],r=[],n=""){let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(zo(i.relativePath.startsWith(n),`Absolute route path "${i.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(n.length));let l=la([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(zo(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Zo(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:Qo(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of Wo(e.path))o(e,t,r);else o(e,t)})),t}function Wo(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=Wo(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(){if(Bo)return Oo;Bo=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.parse=function(e,t){const r=new a,n=e.length;if(n<2)return r;const o=t?.decode||s;let c=0;do{const t=e.indexOf("=",c);if(-1===t)break;const a=e.indexOf(";",c),s=-1===a?n:a;if(t>s){c=e.lastIndexOf(";",t-1)+1;continue}const d=i(e,c,t),p=l(e,t,d),u=e.slice(d,p);if(void 0===r[u]){let n=i(e,t+1,s),a=l(e,s,n);const c=o(e.slice(n,a));r[u]=c}c=s+1}while(c<n);return r},Oo.serialize=function(a,i,l){const s=l?.encode||encodeURIComponent;if(!e.test(a))throw new TypeError(`argument name is invalid: ${a}`);const c=s(i);if(!t.test(c))throw new TypeError(`argument val is invalid: ${i}`);let d=a+"="+c;if(!l)return d;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw new TypeError(`option maxAge is invalid: ${l.maxAge}`);d+="; Max-Age="+l.maxAge}if(l.domain){if(!r.test(l.domain))throw new TypeError(`option domain is invalid: ${l.domain}`);d+="; Domain="+l.domain}if(l.path){if(!n.test(l.path))throw new TypeError(`option path is invalid: ${l.path}`);d+="; Path="+l.path}if(l.expires){if(!function(e){return"[object Date]"===o.call(e)}(l.expires)||!Number.isFinite(l.expires.valueOf()))throw new TypeError(`option expires is invalid: ${l.expires}`);d+="; Expires="+l.expires.toUTCString()}l.httpOnly&&(d+="; HttpOnly");l.secure&&(d+="; Secure");l.partitioned&&(d+="; Partitioned");if(l.priority){switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${l.priority}`)}}if(l.sameSite){switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${l.sameSite}`)}}return d};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,a=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function i(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function l(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function s(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}}();var Yo=/^:[\w-]+$/,Uo=3,Go=2,qo=1,Xo=10,Ko=-2,Jo=e=>"*"===e;function Qo(e,t){let r=e.split("/"),n=r.length;return r.some(Jo)&&(n+=Ko),t&&(n+=Go),r.filter((e=>!Jo(e))).reduce(((e,t)=>e+(Yo.test(t)?Uo:""===t?qo:Xo)),n)}function ea(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",i=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,c="/"===a?t:t.slice(a.length)||"/",d=ta({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},c),p=l.route;if(!d&&s&&r&&!n[n.length-1].route.index&&(d=ta({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),i.push({params:o,pathname:la([a,d.pathname]),pathnameBase:sa(la([a,d.pathnameBase])),route:p}),"/"!==d.pathnameBase&&(a=la([a,d.pathnameBase]))}return i}function ta(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){Ho("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function ra(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return Ho(!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 na(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function oa(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function aa(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function ia(e,t,r,n=!1){let o;"string"==typeof e?o=Fo(e):(o={...e},zo(!o.pathname||!o.pathname.includes("?"),oa("?","pathname","search",o)),zo(!o.pathname||!o.pathname.includes("#"),oa("#","pathname","hash",o)),zo(!o.search||!o.search.includes("#"),oa("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t="/"){let{pathname:r,search:n="",hash:o=""}="string"==typeof e?Fo(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:ca(n),hash:da(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),d=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!c&&!d||(s.pathname+="/"),s}var la=e=>e.join("/").replace(/\/\/+/g,"/"),sa=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ca=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",da=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var pa=["POST","PUT","PATCH","DELETE"];new Set(pa);var ua=["GET",...pa];new Set(ua);var ha=s.createContext(null);ha.displayName="DataRouter";var xa=s.createContext(null);xa.displayName="DataRouterState";var fa=s.createContext({isTransitioning:!1});fa.displayName="ViewTransition",s.createContext(new Map).displayName="Fetchers",s.createContext(null).displayName="Await";var ga=s.createContext(null);ga.displayName="Navigation";var ma=s.createContext(null);ma.displayName="Location";var ba=s.createContext({outlet:null,matches:[],isDataRoute:!1});ba.displayName="Route";var Ca=s.createContext(null);function va(){return null!=s.useContext(ma)}function wa(){return zo(va(),"useLocation() may be used only in the context of a <Router> component."),s.useContext(ma).location}Ca.displayName="RouteError";var ya="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ja(e){s.useContext(ga).static||s.useLayoutEffect(e)}function $a(){let{isDataRoute:e}=s.useContext(ba);return e?function(){let{router:e}=function(e){let t=s.useContext(ha);return zo(t,Ta(e)),t}("useNavigate"),t=Ia("useNavigate"),r=s.useRef(!1);return ja((()=>{r.current=!0})),s.useCallback((async(n,o={})=>{Ho(r.current,ya),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))}),[e,t])}():function(){zo(va(),"useNavigate() may be used only in the context of a <Router> component.");let e=s.useContext(ha),{basename:t,navigator:r}=s.useContext(ga),{matches:n}=s.useContext(ba),{pathname:o}=wa(),a=JSON.stringify(aa(n)),i=s.useRef(!1);return ja((()=>{i.current=!0})),s.useCallback(((n,l={})=>{if(Ho(i.current,ya),!i.current)return;if("number"==typeof n)return void r.go(n);let s=ia(n,JSON.parse(a),o,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:la([t,s.pathname])),(l.replace?r.replace:r.push)(s,l.state,l)}),[t,r,a,o,e])}()}function ka(e,{relative:t}={}){let{matches:r}=s.useContext(ba),{pathname:n}=wa(),o=JSON.stringify(aa(r));return s.useMemo((()=>ia(e,JSON.parse(o),n,"path"===t)),[e,o,n,t])}function Sa(e,t,r,n){zo(va(),"useRoutes() may be used only in the context of a <Router> component.");let o,{navigator:a,static:i}=s.useContext(ga),{matches:l}=s.useContext(ba),c=l[l.length-1],d=c?c.params:{},p=c?c.pathname:"/",u=c?c.pathnameBase:"/",h=c&&c.route;{let e=h&&h.path||"";Va(p,!h||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}o=wa();let x=o.pathname||"/",f=x;if("/"!==u){let e=u.replace(/^\//,"").split("/");f="/"+x.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=!i&&r&&r.matches&&r.matches.length>0?r.matches:Ao(e,{pathname:f});Ho(h||null!=g,`No routes matched location "${o.pathname}${o.search}${o.hash}" `),Ho(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${o.pathname}${o.search}${o.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let m=function(e,t=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let n=e,o=r?.errors;if(null!=o){let e=n.findIndex((e=>e.route.id&&void 0!==o?.[e.route.id]));zo(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,e+1))}let a=!1,i=-1;if(r)for(let e=0;e<n.length;e++){let t=n[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(i=e),t.route.id){let{loaderData:e,errors:o}=r,l=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||l){a=!0,n=i>=0?n.slice(0,i+1):[n[0]];break}}}return n.reduceRight(((e,l,c)=>{let d,p=!1,u=null,h=null;r&&(d=o&&l.route.id?o[l.route.id]:void 0,u=l.route.errorElement||Ra,a&&(i<0&&0===c?(Va("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):i===c&&(p=!0,h=l.route.hydrateFallbackElement||null)));let x=t.concat(n.slice(0,c+1)),f=()=>{let t;return t=d?u:p?h:l.route.Component?s.createElement(l.route.Component,null):l.route.element?l.route.element:e,s.createElement(Ea,{match:l,routeContext:{outlet:e,matches:x,isDataRoute:null!=r},children:t})};return r&&(l.route.ErrorBoundary||l.route.errorElement||0===c)?s.createElement(Ma,{location:r.location,revalidation:r.revalidation,component:u,error:d,children:f(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):f()}),null)}(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:la([u,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:la([u,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,r,n);return m}function La(){let e=function(){let e=s.useContext(Ca),t=function(e){let t=s.useContext(xa);return zo(t,Ta(e)),t}("useRouteError"),r=Ia("useRouteError");if(void 0!==e)return e;return t.errors?.[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=s.createElement(s.Fragment,null,s.createElement("p",null,"💿 Hey developer 👋"),s.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",s.createElement("code",{style:a},"ErrorBoundary")," or"," ",s.createElement("code",{style:a},"errorElement")," prop on your route.")),s.createElement(s.Fragment,null,s.createElement("h2",null,"Unexpected Application Error!"),s.createElement("h3",{style:{fontStyle:"italic"}},t),r?s.createElement("pre",{style:o},r):null,i)}s.createContext(null);var Ra=s.createElement(La,null),Ma=class extends s.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?s.createElement(ba.Provider,{value:this.props.routeContext},s.createElement(Ca.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ea({routeContext:e,match:t,children:r}){let n=s.useContext(ha);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),s.createElement(ba.Provider,{value:e},r)}function Ta(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ia(e){let t=function(e){let t=s.useContext(ba);return zo(t,Ta(e)),t}(e),r=t.matches[t.matches.length-1];return zo(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var Da={};function Va(e,t,r){t||Da[e]||(Da[e]=!0,Ho(!1,r))}s.memo((function({routes:e,future:t,state:r}){return Sa(e,0,r,t)}));var Pa="get",_a="application/x-www-form-urlencoded";function Ba(e){return null!=e&&"string"==typeof e.tagName}var Oa=null;var za=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ha(e){return null==e||za.has(e)?e:(Ho(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_a}"`),null)}function Na(e,t){let r,n,o,a,i;if(Ba(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?na(i,t):null,r=e.getAttribute("method")||Pa,o=Ha(e.getAttribute("enctype"))||_a,a=new FormData(e)}else if(function(e){return Ba(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ba(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?na(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||Pa,o=Ha(e.getAttribute("formenctype"))||Ha(i.getAttribute("enctype"))||_a,a=new FormData(i,e),!function(){if(null===Oa)try{new FormData(document.createElement("form"),0),Oa=!1}catch(e){Oa=!0}return Oa}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,n)}}else{if(Ba(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Pa,n=null,o=_a,i=e}var l;return a&&"text/plain"===o&&(i=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:i}}function Fa(e,t){if(!1===e||null==e)throw new Error(t)}function Aa(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Za(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(Aa).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function Wa(e,t,r,n,o,a){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===a?t.filter(((e,t)=>i(e,t)||l(e,t))):"data"===a?t.filter(((t,a)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,a)||l(t,a))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Ya(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Ua=s.createContext(void 0);function Ga(){let e=s.useContext(Ua);return Fa(e,"You must render this element inside a <HydratedRouter> element"),e}function qa(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Xa({page:e,...t}){let{router:r}=function(){let e=s.useContext(ha);return Fa(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),n=s.useMemo((()=>Ao(r.routes,e,r.basename)),[r.routes,e,r.basename]);return n?s.createElement(Ka,{page:e,matches:n,...t}):null}function Ka({page:e,matches:t,...r}){let n=wa(),{manifest:o,routeModules:a}=Ga(),{loaderData:i,matches:l}=function(){let e=s.useContext(xa);return Fa(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),c=s.useMemo((()=>Wa(e,t,l,o,n,"data")),[e,t,l,o,n]),d=s.useMemo((()=>Wa(e,t,l,o,n,"assets")),[e,t,l,o,n]),p=s.useMemo((()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,l=!1;if(t.forEach((e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!c.some((t=>t.route.id===e.route.id))&&e.route.id in i&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:r.add(e.route.id))})),0===r.size)return[];let s=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return l&&r.size>0&&s.searchParams.set("_routes",t.filter((e=>r.has(e.route.id))).map((e=>e.route.id)).join(",")),[s.pathname+s.search]}),[i,n,o,c,t,e,a]),u=s.useMemo((()=>Ya(d,o)),[d,o]),h=function(e){let{manifest:t,routeModules:r}=Ga(),[n,o]=s.useState([]);return s.useEffect((()=>{let n=!1;return Za(e,t,r).then((e=>{n||o(e)})),()=>{n=!0}}),[e,t,r]),n}(d);return s.createElement(s.Fragment,null,p.map((e=>s.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),u.map((e=>s.createElement("link",{key:e,rel:"modulepreload",href:e,...r}))),h.map((({key:e,link:t})=>s.createElement("link",{key:e,...t}))))}function Ja(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Ua.displayName="FrameworkContext";var Qa="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Qa&&(window.__reactRouterVersion="7.1.5")}catch(e){}var ei=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ti=s.forwardRef((function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:o,replace:a,state:i,target:l,to:c,preventScrollReset:d,viewTransition:p,...u},h){let x,{basename:f}=s.useContext(ga),g="string"==typeof c&&ei.test(c),m=!1;if("string"==typeof c&&g&&(x=c,Qa))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=na(t.pathname,f);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:m=!0}catch(e){Ho(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=function(e,{relative:t}={}){zo(va(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=s.useContext(ga),{hash:o,pathname:a,search:i}=ka(e,{relative:t}),l=a;return"/"!==r&&(l="/"===a?r:la([r,a])),n.createHref({pathname:l,search:i,hash:o})}(c,{relative:n}),[C,v,w]=function(e,t){let r=s.useContext(Ua),[n,o]=s.useState(!1),[a,i]=s.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:p,onTouchStart:u}=t,h=s.useRef(null);s.useEffect((()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{i(e.isIntersecting)}))}),{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}}),[e]),s.useEffect((()=>{if(n){let e=setTimeout((()=>{i(!0)}),100);return()=>{clearTimeout(e)}}}),[n]);let x=()=>{o(!0)},f=()=>{o(!1),i(!1)};return r?"intent"!==e?[a,h,{}]:[a,h,{onFocus:qa(l,x),onBlur:qa(c,f),onMouseEnter:qa(d,x),onMouseLeave:qa(p,f),onTouchStart:qa(u,x)}]:[!1,h,{}]}(r,u),y=function(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:a,viewTransition:i}={}){let l=$a(),c=wa(),d=ka(e,{relative:a});return s.useCallback((s=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(s,t)){s.preventDefault();let t=void 0!==r?r:No(c)===No(d);l(e,{replace:t,state:n,preventScrollReset:o,relative:a,viewTransition:i})}}),[c,l,d,r,n,t,e,o,a,i])}(c,{replace:a,state:i,target:l,preventScrollReset:d,relative:n,viewTransition:p});let j=s.createElement("a",{...u,...w,href:x||b,onClick:m||o?e:function(t){e&&e(t),t.defaultPrevented||y(t)},ref:Ja(h,v),target:l,"data-discover":g||"render"!==t?void 0:"true"});return C&&!g?s.createElement(s.Fragment,null,j,s.createElement(Xa,{page:b})):j}));function ri(e){let t=s.useContext(ha);return zo(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}ti.displayName="Link",s.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:o,to:a,viewTransition:i,children:l,...c},d){let p=ka(a,{relative:c.relative}),u=wa(),h=s.useContext(xa),{navigator:x,basename:f}=s.useContext(ga),g=null!=h&&function(e,t={}){let r=s.useContext(fa);zo(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=ri("useViewTransitionState"),o=ka(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=na(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=na(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=ta(o.pathname,i)||null!=ta(o.pathname,a)}(p)&&!0===i,m=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,b=u.pathname,C=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;t||(b=b.toLowerCase(),C=C?C.toLowerCase():null,m=m.toLowerCase()),C&&f&&(C=na(C,f)||C);const v="/"!==m&&m.endsWith("/")?m.length-1:m.length;let w,y=b===m||!n&&b.startsWith(m)&&"/"===b.charAt(v),j=null!=C&&(C===m||!n&&C.startsWith(m)&&"/"===C.charAt(m.length)),$={isActive:y,isPending:j,isTransitioning:g},k=y?e:void 0;w="function"==typeof r?r($):[r,y?"active":null,j?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let S="function"==typeof o?o($):o;return s.createElement(ti,{...c,"aria-current":k,className:w,ref:d,style:S,to:a,viewTransition:i},"function"==typeof l?l($):l)})).displayName="NavLink",s.forwardRef((({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:a,method:i=Pa,action:l,onSubmit:c,relative:d,preventScrollReset:p,viewTransition:u,...h},x)=>{let f=function(){let{router:e}=ri("useSubmit"),{basename:t}=s.useContext(ga),r=Ia("useRouteId");return s.useCallback((async(n,o={})=>{let{action:a,method:i,encType:l,formData:s,body:c}=Na(n,t);if(!1===o.navigate){let t=o.fetcherKey||oi();await e.fetch(t,r,o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[e,t,r])}(),g=function(e,{relative:t}={}){let{basename:r}=s.useContext(ga),n=s.useContext(ba);zo(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),a={...ka(e||".",{relative:t})},i=wa();if(null==e){a.search=i.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 r=e.toString();a.search=r?`?${r}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(a.pathname="/"===a.pathname?r:la([r,a.pathname]));return No(a)}(l,{relative:d}),m="get"===i.toLowerCase()?"get":"post",b="string"==typeof l&&ei.test(l);return s.createElement("form",{ref:x,method:m,action:g,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=n?.getAttribute("formmethod")||i;f(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:o,state:a,relative:d,preventScrollReset:p,viewTransition:u})},...h,"data-discover":b||"render"!==e?void 0:"true"})})).displayName="Form";var ni=0,oi=()=>`__${String(++ni)}__`;new TextEncoder;const ai=(e,t)=>r.css`
2163
+ `,Bo=(e,t)=>r.css`
2175
2164
  height: ${e?"96px":"48px"};
2176
2165
  width: 100%;
2177
2166
  background-color: ${p("neutral",100)};
@@ -2180,7 +2169,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2180
2169
  left: 0;
2181
2170
  z-index: 102;
2182
2171
  border-bottom: 1px solid ${p("neutral",400)};
2183
- `,ii=r.css`
2172
+ `,Oo=r.css`
2184
2173
  height: 48px;
2185
2174
  width: 100%;
2186
2175
  background-color: ${p("neutral",100)};
@@ -2190,7 +2179,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2190
2179
  justify-content: flex-start;
2191
2180
  gap: 0px;
2192
2181
  padding: 8px 16px;
2193
- `,li=(e,t)=>r.css`
2182
+ `,zo=(e,t)=>r.css`
2194
2183
  height: 48px;
2195
2184
  width: 100%;
2196
2185
  max-width: ${t?`${t}px`:"100%"};
@@ -2200,7 +2189,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2200
2189
  justify-content: space-between;
2201
2190
  margin: 0 auto;
2202
2191
  padding: 8px 16px;
2203
- `,si=r.css`
2192
+ `,Ho=r.css`
2204
2193
  outline: none;
2205
2194
  a {
2206
2195
  &:focus-visible {
@@ -2211,12 +2200,12 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2211
2200
  outline-width: 2px;
2212
2201
  }
2213
2202
  }
2214
- `,ci=e=>r.css`
2203
+ `,No=e=>r.css`
2215
2204
  display: ${e?"none":"flex"};
2216
2205
  align-items: center;
2217
2206
  justify-content: flex-start;
2218
2207
  gap: 0px;
2219
- `,di=e=>r.css`
2208
+ `,Fo=e=>r.css`
2220
2209
  font-size: 16px;
2221
2210
  line-height: 24px;
2222
2211
  font-weight: 400;
@@ -2241,12 +2230,12 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2241
2230
  font-weight: 700;
2242
2231
  color: ${p("accessible","controls-on-neutral-lights")};
2243
2232
  `:""}
2244
- `,pi=r.css`
2233
+ `,Ao=r.css`
2245
2234
  height: 48px;
2246
2235
  display: flex;
2247
2236
  align-items: center;
2248
2237
  justify-content: flex-end;
2249
- `,ui=e=>r.css`
2238
+ `,Zo=e=>r.css`
2250
2239
  height: 100%;
2251
2240
  font-size: 16px;
2252
2241
  line-height: 24px;
@@ -2265,7 +2254,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2265
2254
  }
2266
2255
  }
2267
2256
  `:""}
2268
- `,hi=e=>r.css`
2257
+ `,Wo=e=>r.css`
2269
2258
  height: 100%;
2270
2259
  display: flex;
2271
2260
  align-items: center;
@@ -2273,7 +2262,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2273
2262
  gap: 20px;
2274
2263
  padding-left: 16px;
2275
2264
  border-left: 1px solid ${p("neutral",e?700:300)};
2276
- `,xi=r.css`
2265
+ `,Yo=r.css`
2277
2266
  background-color: none;
2278
2267
  border: none;
2279
2268
  cursor: pointer;
@@ -2298,7 +2287,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2298
2287
  outline-width: 2px;
2299
2288
  background-color: ${p("neutral",200)};
2300
2289
  }
2301
- `,fi=e=>r.css`
2290
+ `,Uo=e=>r.css`
2302
2291
  position: absolute;
2303
2292
  top: 48px;
2304
2293
  right: 0;
@@ -2311,10 +2300,10 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2311
2300
  justify-content: flex-start;
2312
2301
  gap: 16px;
2313
2302
  transition: width 0.5s ease-in-out;
2314
- `,gi=r.css`
2303
+ `,Go=r.css`
2315
2304
  height: 100%;
2316
2305
  width: 100%;
2317
- `,mi=r.css`
2306
+ `,qo=r.css`
2318
2307
  background-color: ${p("neutral",200)};
2319
2308
  border-bottom: 1px solid ${p("neutral",300)};
2320
2309
 
@@ -2334,14 +2323,14 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2334
2323
  margin-left: -12px;
2335
2324
  }
2336
2325
  }
2337
- `,bi=r.css`
2326
+ `,Xo=r.css`
2338
2327
  padding-top: 16px;
2339
2328
  background-color: ${p("neutral",100)};
2340
- `,Ci=r.css`
2329
+ `,Ko=r.css`
2341
2330
  min-height: 100vh;
2342
2331
  width: 100%;
2343
2332
  overflow-y: scroll;
2344
- `;r.css``;const vi=e=>r.css`
2333
+ `;r.css``;const Jo=e=>r.css`
2345
2334
  width: 100%;
2346
2335
  padding: 12px 16px;
2347
2336
  color: ${p("neutral",900)};
@@ -2369,7 +2358,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2369
2358
  outline-width: 2px;
2370
2359
  background-color: ${p("neutral",200)};
2371
2360
  }
2372
- `,wi=r.css`
2361
+ `,Qo=r.css`
2373
2362
  width: 100%;
2374
2363
  padding: 12px 16px;
2375
2364
  display: flex;
@@ -2393,7 +2382,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2393
2382
  outline-width: 2px;
2394
2383
  background-color: ${p("neutral",200)};
2395
2384
  }
2396
- `,yi=e=>r.css`
2385
+ `,ea=e=>r.css`
2397
2386
  position: absolute;
2398
2387
  top: 0px;
2399
2388
  right: 0;
@@ -2405,7 +2394,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2405
2394
  align-items: flex-start;
2406
2395
  justify-content: flex-start;
2407
2396
  transition: width 0.5s ease-in-out;
2408
- `,ji=r.css`
2397
+ `,ta=r.css`
2409
2398
  height: 48px;
2410
2399
  width: 100%;
2411
2400
  display: flex;
@@ -2416,7 +2405,7 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2416
2405
  position: relative;
2417
2406
  top: 0;
2418
2407
  left: 0;
2419
- `,$i=r.css`
2408
+ `,ra=r.css`
2420
2409
  position: absolute;
2421
2410
  bottom: 0;
2422
2411
  left: 0;
@@ -2431,7 +2420,18 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2431
2420
  button {
2432
2421
  width: calc(48% - 24px);
2433
2422
  }
2434
- `,ki=({navigationSection:e,utilitySection:r,actionsSection:n,linkRouter:a,isOpen:i,setIsOpen:l})=>{const[s,c]=o.useState(void 0),[d,p]=o.useState(-1),u=wa(),h=$a(),x=o.useRef(null),f=o.useRef([]);return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:fi(i),children:i&&t.jsxs("div",{css:gi,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:mi,children:r?.map((e=>t.jsx("div",{className:"utility-item",children:e})))}):null,e?t.jsx("div",{css:bi,children:e.map(((e,r)=>e.link?t.jsx("button",{type:"button",css:vi(u.pathname===e.link),onClick:()=>{h(e.link||""),c(void 0),p(-1),l(!1)},children:e.label},e.label):t.jsxs("button",{css:wi,type:"button",ref:e=>f.current[r]=e,onClick:()=>{e.items&&(c(e),p(r),setTimeout((()=>{x.current?.focus()}),100))},children:[e.label,e.items?t.jsx(j,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),n?t.jsx("div",{css:$i,children:n.map((e=>t.jsx(m,{label:e.label,onClick:()=>{e?.onClick?.(),c(void 0),p(-1),l(!1)}},e.label)))}):null]})}),t.jsx("div",{css:yi(!!s?.items),children:s?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:ji,children:[t.jsxs("button",{type:"button",onClick:()=>{c(void 0),p(-1),f.current[d]?.focus()},"aria-label":"Go back",css:xi,ref:x,children:[t.jsx(j,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),s?.label]}),t.jsxs("button",{type:"button",onClick:()=>{c(void 0),p(-1),l(!1)},"aria-label":"Close menu",css:xi,children:["Close",t.jsx($,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:Ci,children:s?.items?.map((e=>t.jsx("button",{type:"button",css:vi(),onClick:()=>{h(e.link||""),c(void 0),p(-1),l(!1)},children:e.label},e.label)))})]}):null})]})},Si=1023,Li=(e,t)=>r.css`
2423
+ `;var na,oa={};
2424
+ /**
2425
+ * react-router v7.1.5
2426
+ *
2427
+ * Copyright (c) Remix Software Inc.
2428
+ *
2429
+ * This source code is licensed under the MIT license found in the
2430
+ * LICENSE.md file in the root directory of this source tree.
2431
+ *
2432
+ * @license MIT
2433
+ */
2434
+ function aa(e,t){if(!1===e||null==e)throw new Error(t)}function ia(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function la({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function sa(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ca(e,t,r="/"){return function(e,t,r,n){let o="string"==typeof t?sa(t):t,a=ja(o.pathname||"/",r);if(null==a)return null;let i=da(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let l=null;for(let e=0;null==l&&e<i.length;++e){let t=ya(a);l=va(i[e],t,n)}return l}(e,t,r,!1)}function da(e,t=[],r=[],n=""){let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(aa(i.relativePath.startsWith(n),`Absolute route path "${i.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(n.length));let l=La([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(aa(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),da(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:Ca(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of pa(e.path))o(e,t,r);else o(e,t)})),t}function pa(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=pa(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(){if(na)return oa;na=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.parse=function(e,t){const r=new a,n=e.length;if(n<2)return r;const o=t?.decode||s;let c=0;do{const t=e.indexOf("=",c);if(-1===t)break;const a=e.indexOf(";",c),s=-1===a?n:a;if(t>s){c=e.lastIndexOf(";",t-1)+1;continue}const d=i(e,c,t),p=l(e,t,d),u=e.slice(d,p);if(void 0===r[u]){let n=i(e,t+1,s),a=l(e,s,n);const c=o(e.slice(n,a));r[u]=c}c=s+1}while(c<n);return r},oa.serialize=function(a,i,l){const s=l?.encode||encodeURIComponent;if(!e.test(a))throw new TypeError(`argument name is invalid: ${a}`);const c=s(i);if(!t.test(c))throw new TypeError(`argument val is invalid: ${i}`);let d=a+"="+c;if(!l)return d;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw new TypeError(`option maxAge is invalid: ${l.maxAge}`);d+="; Max-Age="+l.maxAge}if(l.domain){if(!r.test(l.domain))throw new TypeError(`option domain is invalid: ${l.domain}`);d+="; Domain="+l.domain}if(l.path){if(!n.test(l.path))throw new TypeError(`option path is invalid: ${l.path}`);d+="; Path="+l.path}if(l.expires){if(!function(e){return"[object Date]"===o.call(e)}(l.expires)||!Number.isFinite(l.expires.valueOf()))throw new TypeError(`option expires is invalid: ${l.expires}`);d+="; Expires="+l.expires.toUTCString()}l.httpOnly&&(d+="; HttpOnly");l.secure&&(d+="; Secure");l.partitioned&&(d+="; Partitioned");if(l.priority){switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${l.priority}`)}}if(l.sameSite){switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${l.sameSite}`)}}return d};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,a=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function i(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function l(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function s(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}}();var ua=/^:[\w-]+$/,ha=3,xa=2,fa=1,ga=10,ma=-2,ba=e=>"*"===e;function Ca(e,t){let r=e.split("/"),n=r.length;return r.some(ba)&&(n+=ma),t&&(n+=xa),r.filter((e=>!ba(e))).reduce(((e,t)=>e+(ua.test(t)?ha:""===t?fa:ga)),n)}function va(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",i=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,c="/"===a?t:t.slice(a.length)||"/",d=wa({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},c),p=l.route;if(!d&&s&&r&&!n[n.length-1].route.index&&(d=wa({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),i.push({params:o,pathname:La([a,d.pathname]),pathnameBase:Ra(La([a,d.pathnameBase])),route:p}),"/"!==d.pathnameBase&&(a=La([a,d.pathnameBase]))}return i}function wa(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){ia("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function ya(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return ia(!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 ja(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function $a(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ka(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function Sa(e,t,r,n=!1){let o;"string"==typeof e?o=sa(e):(o={...e},aa(!o.pathname||!o.pathname.includes("?"),$a("?","pathname","search",o)),aa(!o.pathname||!o.pathname.includes("#"),$a("#","pathname","hash",o)),aa(!o.search||!o.search.includes("#"),$a("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t="/"){let{pathname:r,search:n="",hash:o=""}="string"==typeof e?sa(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:Ma(n),hash:Ea(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),d=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!c&&!d||(s.pathname+="/"),s}var La=e=>e.join("/").replace(/\/\/+/g,"/"),Ra=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ma=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Ea=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Ta=["POST","PUT","PATCH","DELETE"];new Set(Ta);var Ia=["GET",...Ta];new Set(Ia);var Da=s.createContext(null);Da.displayName="DataRouter";var Va=s.createContext(null);Va.displayName="DataRouterState";var Pa=s.createContext({isTransitioning:!1});Pa.displayName="ViewTransition",s.createContext(new Map).displayName="Fetchers",s.createContext(null).displayName="Await";var _a=s.createContext(null);_a.displayName="Navigation";var Ba=s.createContext(null);Ba.displayName="Location";var Oa=s.createContext({outlet:null,matches:[],isDataRoute:!1});Oa.displayName="Route";var za=s.createContext(null);function Ha(){return null!=s.useContext(Ba)}function Na(){return aa(Ha(),"useLocation() may be used only in the context of a <Router> component."),s.useContext(Ba).location}za.displayName="RouteError";var Fa="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Aa(e){s.useContext(_a).static||s.useLayoutEffect(e)}function Za(){let{isDataRoute:e}=s.useContext(Oa);return e?function(){let{router:e}=function(e){let t=s.useContext(Da);return aa(t,Ka(e)),t}("useNavigate"),t=Ja("useNavigate"),r=s.useRef(!1);return Aa((()=>{r.current=!0})),s.useCallback((async(n,o={})=>{ia(r.current,Fa),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))}),[e,t])}():function(){aa(Ha(),"useNavigate() may be used only in the context of a <Router> component.");let e=s.useContext(Da),{basename:t,navigator:r}=s.useContext(_a),{matches:n}=s.useContext(Oa),{pathname:o}=Na(),a=JSON.stringify(ka(n)),i=s.useRef(!1);return Aa((()=>{i.current=!0})),s.useCallback(((n,l={})=>{if(ia(i.current,Fa),!i.current)return;if("number"==typeof n)return void r.go(n);let s=Sa(n,JSON.parse(a),o,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:La([t,s.pathname])),(l.replace?r.replace:r.push)(s,l.state,l)}),[t,r,a,o,e])}()}function Wa(e,{relative:t}={}){let{matches:r}=s.useContext(Oa),{pathname:n}=Na(),o=JSON.stringify(ka(r));return s.useMemo((()=>Sa(e,JSON.parse(o),n,"path"===t)),[e,o,n,t])}function Ya(e,t,r,n){aa(Ha(),"useRoutes() may be used only in the context of a <Router> component.");let o,{navigator:a,static:i}=s.useContext(_a),{matches:l}=s.useContext(Oa),c=l[l.length-1],d=c?c.params:{},p=c?c.pathname:"/",u=c?c.pathnameBase:"/",h=c&&c.route;{let e=h&&h.path||"";ei(p,!h||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}o=Na();let x=o.pathname||"/",f=x;if("/"!==u){let e=u.replace(/^\//,"").split("/");f="/"+x.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=!i&&r&&r.matches&&r.matches.length>0?r.matches:ca(e,{pathname:f});ia(h||null!=g,`No routes matched location "${o.pathname}${o.search}${o.hash}" `),ia(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${o.pathname}${o.search}${o.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let m=function(e,t=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let n=e,o=r?.errors;if(null!=o){let e=n.findIndex((e=>e.route.id&&void 0!==o?.[e.route.id]));aa(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,e+1))}let a=!1,i=-1;if(r)for(let e=0;e<n.length;e++){let t=n[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(i=e),t.route.id){let{loaderData:e,errors:o}=r,l=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||l){a=!0,n=i>=0?n.slice(0,i+1):[n[0]];break}}}return n.reduceRight(((e,l,c)=>{let d,p=!1,u=null,h=null;r&&(d=o&&l.route.id?o[l.route.id]:void 0,u=l.route.errorElement||Ga,a&&(i<0&&0===c?(ei("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):i===c&&(p=!0,h=l.route.hydrateFallbackElement||null)));let x=t.concat(n.slice(0,c+1)),f=()=>{let t;return t=d?u:p?h:l.route.Component?s.createElement(l.route.Component,null):l.route.element?l.route.element:e,s.createElement(Xa,{match:l,routeContext:{outlet:e,matches:x,isDataRoute:null!=r},children:t})};return r&&(l.route.ErrorBoundary||l.route.errorElement||0===c)?s.createElement(qa,{location:r.location,revalidation:r.revalidation,component:u,error:d,children:f(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):f()}),null)}(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:La([u,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:La([u,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,r,n);return m}function Ua(){let e=function(){let e=s.useContext(za),t=function(e){let t=s.useContext(Va);return aa(t,Ka(e)),t}("useRouteError"),r=Ja("useRouteError");if(void 0!==e)return e;return t.errors?.[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=s.createElement(s.Fragment,null,s.createElement("p",null,"💿 Hey developer 👋"),s.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",s.createElement("code",{style:a},"ErrorBoundary")," or"," ",s.createElement("code",{style:a},"errorElement")," prop on your route.")),s.createElement(s.Fragment,null,s.createElement("h2",null,"Unexpected Application Error!"),s.createElement("h3",{style:{fontStyle:"italic"}},t),r?s.createElement("pre",{style:o},r):null,i)}s.createContext(null);var Ga=s.createElement(Ua,null),qa=class extends s.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?s.createElement(Oa.Provider,{value:this.props.routeContext},s.createElement(za.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Xa({routeContext:e,match:t,children:r}){let n=s.useContext(Da);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),s.createElement(Oa.Provider,{value:e},r)}function Ka(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ja(e){let t=function(e){let t=s.useContext(Oa);return aa(t,Ka(e)),t}(e),r=t.matches[t.matches.length-1];return aa(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var Qa={};function ei(e,t,r){t||Qa[e]||(Qa[e]=!0,ia(!1,r))}s.memo((function({routes:e,future:t,state:r}){return Ya(e,0,r,t)}));var ti="get",ri="application/x-www-form-urlencoded";function ni(e){return null!=e&&"string"==typeof e.tagName}var oi=null;var ai=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ii(e){return null==e||ai.has(e)?e:(ia(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ri}"`),null)}function li(e,t){let r,n,o,a,i;if(ni(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?ja(i,t):null,r=e.getAttribute("method")||ti,o=ii(e.getAttribute("enctype"))||ri,a=new FormData(e)}else if(function(e){return ni(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ni(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?ja(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||ti,o=ii(e.getAttribute("formenctype"))||ii(i.getAttribute("enctype"))||ri,a=new FormData(i,e),!function(){if(null===oi)try{new FormData(document.createElement("form"),0),oi=!1}catch(e){oi=!0}return oi}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,n)}}else{if(ni(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ti,n=null,o=ri,i=e}var l;return a&&"text/plain"===o&&(i=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:i}}function si(e,t){if(!1===e||null==e)throw new Error(t)}function ci(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function di(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(ci).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function pi(e,t,r,n,o,a){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===a?t.filter(((e,t)=>i(e,t)||l(e,t))):"data"===a?t.filter(((t,a)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,a)||l(t,a))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function ui(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var hi=s.createContext(void 0);function xi(){let e=s.useContext(hi);return si(e,"You must render this element inside a <HydratedRouter> element"),e}function fi(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function gi({page:e,...t}){let{router:r}=function(){let e=s.useContext(Da);return si(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),n=s.useMemo((()=>ca(r.routes,e,r.basename)),[r.routes,e,r.basename]);return n?s.createElement(mi,{page:e,matches:n,...t}):null}function mi({page:e,matches:t,...r}){let n=Na(),{manifest:o,routeModules:a}=xi(),{loaderData:i,matches:l}=function(){let e=s.useContext(Va);return si(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),c=s.useMemo((()=>pi(e,t,l,o,n,"data")),[e,t,l,o,n]),d=s.useMemo((()=>pi(e,t,l,o,n,"assets")),[e,t,l,o,n]),p=s.useMemo((()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,l=!1;if(t.forEach((e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!c.some((t=>t.route.id===e.route.id))&&e.route.id in i&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:r.add(e.route.id))})),0===r.size)return[];let s=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return l&&r.size>0&&s.searchParams.set("_routes",t.filter((e=>r.has(e.route.id))).map((e=>e.route.id)).join(",")),[s.pathname+s.search]}),[i,n,o,c,t,e,a]),u=s.useMemo((()=>ui(d,o)),[d,o]),h=function(e){let{manifest:t,routeModules:r}=xi(),[n,o]=s.useState([]);return s.useEffect((()=>{let n=!1;return di(e,t,r).then((e=>{n||o(e)})),()=>{n=!0}}),[e,t,r]),n}(d);return s.createElement(s.Fragment,null,p.map((e=>s.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),u.map((e=>s.createElement("link",{key:e,rel:"modulepreload",href:e,...r}))),h.map((({key:e,link:t})=>s.createElement("link",{key:e,...t}))))}function bi(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}hi.displayName="FrameworkContext";var Ci="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ci&&(window.__reactRouterVersion="7.1.5")}catch(e){}var vi=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wi=s.forwardRef((function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:o,replace:a,state:i,target:l,to:c,preventScrollReset:d,viewTransition:p,...u},h){let x,{basename:f}=s.useContext(_a),g="string"==typeof c&&vi.test(c),m=!1;if("string"==typeof c&&g&&(x=c,Ci))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=ja(t.pathname,f);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:m=!0}catch(e){ia(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=function(e,{relative:t}={}){aa(Ha(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=s.useContext(_a),{hash:o,pathname:a,search:i}=Wa(e,{relative:t}),l=a;return"/"!==r&&(l="/"===a?r:La([r,a])),n.createHref({pathname:l,search:i,hash:o})}(c,{relative:n}),[C,v,w]=function(e,t){let r=s.useContext(hi),[n,o]=s.useState(!1),[a,i]=s.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:p,onTouchStart:u}=t,h=s.useRef(null);s.useEffect((()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{i(e.isIntersecting)}))}),{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}}),[e]),s.useEffect((()=>{if(n){let e=setTimeout((()=>{i(!0)}),100);return()=>{clearTimeout(e)}}}),[n]);let x=()=>{o(!0)},f=()=>{o(!1),i(!1)};return r?"intent"!==e?[a,h,{}]:[a,h,{onFocus:fi(l,x),onBlur:fi(c,f),onMouseEnter:fi(d,x),onMouseLeave:fi(p,f),onTouchStart:fi(u,x)}]:[!1,h,{}]}(r,u),y=function(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:a,viewTransition:i}={}){let l=Za(),c=Na(),d=Wa(e,{relative:a});return s.useCallback((s=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(s,t)){s.preventDefault();let t=void 0!==r?r:la(c)===la(d);l(e,{replace:t,state:n,preventScrollReset:o,relative:a,viewTransition:i})}}),[c,l,d,r,n,t,e,o,a,i])}(c,{replace:a,state:i,target:l,preventScrollReset:d,relative:n,viewTransition:p});let j=s.createElement("a",{...u,...w,href:x||b,onClick:m||o?e:function(t){e&&e(t),t.defaultPrevented||y(t)},ref:bi(h,v),target:l,"data-discover":g||"render"!==t?void 0:"true"});return C&&!g?s.createElement(s.Fragment,null,j,s.createElement(gi,{page:b})):j}));function yi(e){let t=s.useContext(Da);return aa(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}wi.displayName="Link",s.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:o,to:a,viewTransition:i,children:l,...c},d){let p=Wa(a,{relative:c.relative}),u=Na(),h=s.useContext(Va),{navigator:x,basename:f}=s.useContext(_a),g=null!=h&&function(e,t={}){let r=s.useContext(Pa);aa(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=yi("useViewTransitionState"),o=Wa(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=ja(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ja(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=wa(o.pathname,i)||null!=wa(o.pathname,a)}(p)&&!0===i,m=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,b=u.pathname,C=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;t||(b=b.toLowerCase(),C=C?C.toLowerCase():null,m=m.toLowerCase()),C&&f&&(C=ja(C,f)||C);const v="/"!==m&&m.endsWith("/")?m.length-1:m.length;let w,y=b===m||!n&&b.startsWith(m)&&"/"===b.charAt(v),j=null!=C&&(C===m||!n&&C.startsWith(m)&&"/"===C.charAt(m.length)),$={isActive:y,isPending:j,isTransitioning:g},k=y?e:void 0;w="function"==typeof r?r($):[r,y?"active":null,j?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let S="function"==typeof o?o($):o;return s.createElement(wi,{...c,"aria-current":k,className:w,ref:d,style:S,to:a,viewTransition:i},"function"==typeof l?l($):l)})).displayName="NavLink",s.forwardRef((({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:a,method:i=ti,action:l,onSubmit:c,relative:d,preventScrollReset:p,viewTransition:u,...h},x)=>{let f=function(){let{router:e}=yi("useSubmit"),{basename:t}=s.useContext(_a),r=Ja("useRouteId");return s.useCallback((async(n,o={})=>{let{action:a,method:i,encType:l,formData:s,body:c}=li(n,t);if(!1===o.navigate){let t=o.fetcherKey||$i();await e.fetch(t,r,o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[e,t,r])}(),g=function(e,{relative:t}={}){let{basename:r}=s.useContext(_a),n=s.useContext(Oa);aa(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),a={...Wa(e||".",{relative:t})},i=Na();if(null==e){a.search=i.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 r=e.toString();a.search=r?`?${r}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(a.pathname="/"===a.pathname?r:La([r,a.pathname]));return la(a)}(l,{relative:d}),m="get"===i.toLowerCase()?"get":"post",b="string"==typeof l&&vi.test(l);return s.createElement("form",{ref:x,method:m,action:g,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=n?.getAttribute("formmethod")||i;f(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:o,state:a,relative:d,preventScrollReset:p,viewTransition:u})},...h,"data-discover":b||"render"!==e?void 0:"true"})})).displayName="Form";var ji=0,$i=()=>`__${String(++ji)}__`;new TextEncoder;const ki=({navigationSection:e,utilitySection:r,actionsSection:n,linkRouter:a,isOpen:i,setIsOpen:l,pathname:s})=>{const[c,d]=o.useState(void 0),[p,u]=o.useState(-1),h=Za(),x=o.useRef(null),f=o.useRef([]);return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Uo(i),children:i&&t.jsxs("div",{css:Go,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:qo,children:r?.map((e=>t.jsx("div",{className:"utility-item",children:e})))}):null,e?t.jsx("div",{css:Xo,children:e.map(((e,r)=>e.link?t.jsx("button",{type:"button",css:Jo(s===e.link),onClick:()=>{h(e.link||""),d(void 0),u(-1),l(!1)},children:e.label},e.label):t.jsxs("button",{css:Qo,type:"button",ref:e=>f.current[r]=e,onClick:()=>{e.items&&(d(e),u(r),setTimeout((()=>{x.current?.focus()}),100))},children:[e.label,e.items?t.jsx(j,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),n?t.jsx("div",{css:ra,children:n.map((e=>t.jsx(m,{label:e.label,onClick:()=>{e?.onClick?.(),d(void 0),u(-1),l(!1)}},e.label)))}):null]})}),t.jsx("div",{css:ea(!!c?.items),children:c?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:ta,children:[t.jsxs("button",{type:"button",onClick:()=>{d(void 0),u(-1),f.current[p]?.focus()},"aria-label":"Go back",css:Yo,ref:x,children:[t.jsx(j,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),c?.label]}),t.jsxs("button",{type:"button",onClick:()=>{d(void 0),u(-1),l(!1)},"aria-label":"Close menu",css:Yo,children:["Close",t.jsx($,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:Ko,children:c?.items?.map((e=>t.jsx("button",{type:"button",css:Jo(),onClick:()=>{h(e.link||""),d(void 0),u(-1),l(!1)},children:e.label},e.label)))})]}):null})]})},Si=1023,Li=(e,t)=>r.css`
2435
2435
  width: 64px;
2436
2436
  height: calc(100vh - ${e||"0px"} - ${t||"0px"});
2437
2437
  z-index: 100;
@@ -2979,13 +2979,13 @@ function zo(e,t){if(!1===e||null==e)throw new Error(t)}function Ho(e,t){if(!e){"
2979
2979
  padding: 0px;
2980
2980
  padding-top: 8px;
2981
2981
  color: ${a?p("neutral",500):"inherit"};
2982
- `),children:o.children}):null]},`${o.label}-${o.value}`);var a,i}))})}),exports.CloseButton=J,exports.Footer=({children:e,label:r="©️World Resources Institute",fixed:n,filled:o,maxWidth:a})=>{const i=(new Date).getFullYear();return t.jsx("footer",{css:Do(n,o),children:t.jsxs("div",{css:Vo(a),children:[t.jsx("div",{children:t.jsx(T,{height:"32px",width:"91px"})}),t.jsx("div",{css:Po,children:e}),t.jsx("div",{children:t.jsxs("p",{css:_o,children:[r," ",i]})})]})})},exports.IconButton=K,exports.IconMarker=sr,exports.IconMarkers=cr,exports.InlineMessage=({label:e,caption:r,variant:n,size:o="large",icon:a=t.jsx(y,{height:"16px",width:"16px"}),onActionClick:i,actionLabel:l,isButtonRight:s})=>{let c=Xi;return"info-grey"===n?c=Ki:"success"===n?c=Ji:"warning"===n?c=Qi:"error"===n&&(c=el),t.jsxs("div",{css:[Yi(o,s),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Ui,children:[a,t.jsx("p",{css:Gi(o),children:e})]}),t.jsx("p",{css:qi(o),children:r})]}),l?t.jsx(m,{label:l,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:i}):null]})},exports.InputWithUnits=({label:r,caption:n,errorMessage:a,units:i,unitsPosition:l="end",defaultUnit:s="",defaultValue:c="",onChange:d,required:p,disabled:u})=>{const[h,x]=o.useState(c),[f,g]=o.useState(s?[s]:[i[0].value]),m=(e,t)=>{d&&d("end"===l?""+(t?`${h} ${e}`:`${e} ${f}`):""+(t?`${e} ${h}`:`${f} ${e}`))};return t.jsxs("div",{css:Je,children:[a?t.jsx("div",{css:tt}):null,t.jsxs("div",{style:{marginLeft:a?"19px":"0px"},children:[t.jsxs("p",{css:Qe(u),"aria-label":r,children:[p?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:et(u),"aria-label":n,children:n}),a?t.jsx("p",{css:rt,"aria-label":a,children:a}):null,t.jsxs(e.Group,{css:nt(!!a,l),attached:!0,children:["start"===l?t.jsx(_t,{placeholder:"",value:f,items:i,disabled:u,onChange:e=>{g(e),m(e?.[0],!0)}}):null,t.jsx(dt,{type:"number",value:h,disabled:u,onChange:e=>{x(e.target.value),m(e.target.value)}}),"end"===l?t.jsx(_t,{placeholder:"",value:f,items:i,disabled:u,onChange:e=>{g(e),m(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Kr,exports.LayerGroup=({label:r,caption:n,value:a,layerItems:i,onChangeForRadioVariant:l})=>{const[s,c]=o.useState({}),[d]=o.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(i));o.useEffect((()=>{let e={...s};i.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const p=(e,t,r,n)=>{const o={...s,[e]:t};c(o),r&&r(e,t,n)},u=Object.values(s).filter((e=>!0===e)).length;return t.jsxs(e.Accordion.Item,{value:a,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{padding:"16px",alignItems:"flex-start",children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:pr,children:[r,t.jsx(Dt,{label:`${u} Active`,size:"small",variant:u>0?"success":"info-grey"})]}),t.jsx("div",{css:ur,children:n})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(Ve,{name:r,defaultValue:d,customGap:"0px",onChange:(e,t)=>p(e,!!t,l,t),children:i.map((e=>t.jsx(br,{...e,onChange:(t,r)=>p(t,r,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:r,defaultValue:n,...o})=>t.jsx("div",{css:dr,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:r})}),exports.LayerItem=br,exports.LayerParameters=({label:r,children:n,openedByDefault:a})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:a?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:Cr,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:vr,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:wr,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:yr,children:o.Children.map(n,(e=>t.jsx("div",{className:"layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:r,onDrag:n,onUpClick:o,onDownClick:a,onRemoveClick:i,children:l,onInfoClick:s,onOpacityChanged:c})=>t.jsxs("div",{css:jr,children:[t.jsxs("div",{css:$r,children:[t.jsx(K,{icon:t.jsx(L,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:n,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(K,{icon:t.jsx(j,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(K,{icon:t.jsx(j,{}),"aria-label":"Down",onClick:a})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:kr,children:[t.jsxs("div",{children:[t.jsx("h3",{css:Sr,children:e}),t.jsx("p",{css:Lr,children:r})]}),t.jsx(m,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx($,{}),onClick:i})]}),l,t.jsxs("div",{css:Rr,children:[t.jsx(m,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(y,{}),onClick:s}),t.jsx(Dr,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.MapControl=ne,exports.MapControls=oe,exports.Menu=ue,exports.Modal=({title:r,content:n,size:o="medium",draggable:a,blocking:i,open:l,onClose:s,showCancelButton:c,cancelLabel:d="Cancel",showActionButton:p,actionLabel:u,onActionClick:h})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:s,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!i,preventScroll:!a&&!i,closeOnEscape:!i,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(po,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:uo(o),children:[t.jsxs(e.Dialog.Header,{css:ho,children:[t.jsx(e.Dialog.Title,{css:xo,children:r}),i?null:t.jsx(e.Dialog.CloseTrigger,{css:fo,asChild:!0,children:t.jsx(J,{})})]}),t.jsx(e.Dialog.Body,{css:go,children:n}),c||p?t.jsxs(e.Dialog.Footer,{children:[c?t.jsx(e.Dialog.ActionTrigger,{asChild:!0,children:t.jsx(m,{label:d,variant:"secondary"})}):null,p?t.jsx(m,{label:u,onClick:h}):null]}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:n="default",mainActionLabel:a,mainActionOnClick:i=()=>{},otherActions:l=[],...s})=>{const[c,d]=o.useState(!1);return t.jsxs(e.Group,{attached:!0,"aria-disabled":s.disabled,children:[t.jsx(m,{css:{},label:a,variant:r,size:n,onClick:i,...s}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:xe(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(m,{variant:r,size:n,leftIcon:t.jsx(j,{rotate:c?"180":"0",color:p("accessible","text-on-primary-mids")||p("primary",900)}),disabled:s.disabled})}),t.jsx(ge,{children:l.map((({label:r,value:o,onClick:a})=>t.jsx(e.Menu.Item,{css:fe(n),onClick:a,value:o,children:r},o)))})]})]})},exports.Navbar=({logo:e,linkRouter:n,navigationSection:a,utilitySection:i,actionsSection:l,maxWidth:s,fixed:c,onNavbarHeightChange:d})=>{const u=wa(),h=o.useRef(null),x=o.useRef(null),f=o.useRef(null),[g,b]=o.useState(!1),[C,v]=o.useState(-1),[w,y]=o.useState(window?.innerWidth<=Si),[j,k]=o.useState(!1),S=n,L=o.useCallback((()=>{if(x.current&&h.current&&f.current){const e=h.current.getBoundingClientRect(),t=x.current.getBoundingClientRect(),r=f.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=Si||window.innerWidth<=C?(d?.(96),b(!0)):window.innerWidth>Si&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),b(!0),v(window.innerWidth)):window.innerWidth>C&&(d?.(48),b(!1),v(-1)):(d?.(48),b(!1),v(-1)),g&&(window.innerWidth<=Si||r.right>=t.left?(y(!0),d?.(48)):(y(!1),d?.(96)))}}),[C,g]);return o.useEffect((()=>(L(),window.addEventListener("resize",L),()=>{window.removeEventListener("resize",L)})),[L]),t.jsxs("nav",{css:ai(g&&!w,c),children:[t.jsxs("div",{css:li(g&&!w,s),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
2982
+ `),children:o.children}):null]},`${o.label}-${o.value}`);var a,i}))})}),exports.CloseButton=J,exports.Footer=({children:e,label:r="©️World Resources Institute",fixed:n,filled:o,maxWidth:a})=>{const i=(new Date).getFullYear();return t.jsx("footer",{css:Do(n,o),children:t.jsxs("div",{css:Vo(a),children:[t.jsx("div",{children:t.jsx(T,{height:"32px",width:"91px"})}),t.jsx("div",{css:Po,children:e}),t.jsx("div",{children:t.jsxs("p",{css:_o,children:[r," ",i]})})]})})},exports.IconButton=K,exports.IconMarker=sr,exports.IconMarkers=cr,exports.InlineMessage=({label:e,caption:r,variant:n,size:o="large",icon:a=t.jsx(y,{height:"16px",width:"16px"}),onActionClick:i,actionLabel:l,isButtonRight:s})=>{let c=Xi;return"info-grey"===n?c=Ki:"success"===n?c=Ji:"warning"===n?c=Qi:"error"===n&&(c=el),t.jsxs("div",{css:[Yi(o,s),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Ui,children:[a,t.jsx("p",{css:Gi(o),children:e})]}),t.jsx("p",{css:qi(o),children:r})]}),l?t.jsx(m,{label:l,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:i}):null]})},exports.InputWithUnits=({label:r,caption:n,errorMessage:a,units:i,unitsPosition:l="end",defaultUnit:s="",defaultValue:c="",onChange:d,required:p,disabled:u})=>{const[h,x]=o.useState(c),[f,g]=o.useState(s?[s]:[i[0].value]),m=(e,t)=>{d&&d("end"===l?""+(t?`${h} ${e}`:`${e} ${f}`):""+(t?`${e} ${h}`:`${f} ${e}`))};return t.jsxs("div",{css:Je,children:[a?t.jsx("div",{css:tt}):null,t.jsxs("div",{style:{marginLeft:a?"19px":"0px"},children:[t.jsxs("p",{css:Qe(u),"aria-label":r,children:[p?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:et(u),"aria-label":n,children:n}),a?t.jsx("p",{css:rt,"aria-label":a,children:a}):null,t.jsxs(e.Group,{css:nt(!!a,l),attached:!0,children:["start"===l?t.jsx(_t,{placeholder:"",value:f,items:i,disabled:u,onChange:e=>{g(e),m(e?.[0],!0)}}):null,t.jsx(dt,{type:"number",value:h,disabled:u,onChange:e=>{x(e.target.value),m(e.target.value)}}),"end"===l?t.jsx(_t,{placeholder:"",value:f,items:i,disabled:u,onChange:e=>{g(e),m(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Kr,exports.LayerGroup=({label:r,caption:n,value:a,layerItems:i,onChangeForRadioVariant:l})=>{const[s,c]=o.useState({}),[d]=o.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(i));o.useEffect((()=>{let e={...s};i.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const p=(e,t,r,n)=>{const o={...s,[e]:t};c(o),r&&r(e,t,n)},u=Object.values(s).filter((e=>!0===e)).length;return t.jsxs(e.Accordion.Item,{value:a,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{padding:"16px",alignItems:"flex-start",children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:pr,children:[r,t.jsx(Dt,{label:`${u} Active`,size:"small",variant:u>0?"success":"info-grey"})]}),t.jsx("div",{css:ur,children:n})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(Ve,{name:r,defaultValue:d,customGap:"0px",onChange:(e,t)=>p(e,!!t,l,t),children:i.map((e=>t.jsx(br,{...e,onChange:(t,r)=>p(t,r,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:r,defaultValue:n,...o})=>t.jsx("div",{css:dr,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:r})}),exports.LayerItem=br,exports.LayerParameters=({label:r,children:n,openedByDefault:a})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:a?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:Cr,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:vr,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:wr,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(j,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:yr,children:o.Children.map(n,(e=>t.jsx("div",{className:"layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:r,onDrag:n,onUpClick:o,onDownClick:a,onRemoveClick:i,children:l,onInfoClick:s,onOpacityChanged:c})=>t.jsxs("div",{css:jr,children:[t.jsxs("div",{css:$r,children:[t.jsx(K,{icon:t.jsx(L,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:n,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(K,{icon:t.jsx(j,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(K,{icon:t.jsx(j,{}),"aria-label":"Down",onClick:a})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:kr,children:[t.jsxs("div",{children:[t.jsx("h3",{css:Sr,children:e}),t.jsx("p",{css:Lr,children:r})]}),t.jsx(m,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx($,{}),onClick:i})]}),l,t.jsxs("div",{css:Rr,children:[t.jsx(m,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(y,{}),onClick:s}),t.jsx(Dr,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.MapControl=ne,exports.MapControls=oe,exports.Menu=ue,exports.Modal=({title:r,content:n,size:o="medium",draggable:a,blocking:i,open:l,onClose:s,showCancelButton:c,cancelLabel:d="Cancel",showActionButton:p,actionLabel:u,onActionClick:h})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:s,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!i,preventScroll:!a&&!i,closeOnEscape:!i,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(po,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:uo(o),children:[t.jsxs(e.Dialog.Header,{css:ho,children:[t.jsx(e.Dialog.Title,{css:xo,children:r}),i?null:t.jsx(e.Dialog.CloseTrigger,{css:fo,asChild:!0,children:t.jsx(J,{})})]}),t.jsx(e.Dialog.Body,{css:go,children:n}),c||p?t.jsxs(e.Dialog.Footer,{children:[c?t.jsx(e.Dialog.ActionTrigger,{asChild:!0,children:t.jsx(m,{label:d,variant:"secondary"})}):null,p?t.jsx(m,{label:u,onClick:h}):null]}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:n="default",mainActionLabel:a,mainActionOnClick:i=()=>{},otherActions:l=[],...s})=>{const[c,d]=o.useState(!1);return t.jsxs(e.Group,{attached:!0,"aria-disabled":s.disabled,children:[t.jsx(m,{css:{},label:a,variant:r,size:n,onClick:i,...s}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:xe(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(m,{variant:r,size:n,leftIcon:t.jsx(j,{rotate:c?"180":"0",color:p("accessible","text-on-primary-mids")||p("primary",900)}),disabled:s.disabled})}),t.jsx(ge,{children:l.map((({label:r,value:o,onClick:a})=>t.jsx(e.Menu.Item,{css:fe(n),onClick:a,value:o,children:r},o)))})]})]})},exports.Navbar=({logo:e,linkRouter:n,pathname:a,navigationSection:i,utilitySection:l,actionsSection:s,maxWidth:c,fixed:d,onNavbarHeightChange:u})=>{const h=o.useRef(null),x=o.useRef(null),f=o.useRef(null),[g,b]=o.useState(!1),[C,v]=o.useState(-1),[w,y]=o.useState(window?.innerWidth<=Si),[j,k]=o.useState(!1),S=n,L=o.useCallback((()=>{if(x.current&&h.current&&f.current){const e=h.current.getBoundingClientRect(),t=x.current.getBoundingClientRect(),r=f.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=Si||window.innerWidth<=C?(u?.(96),b(!0)):window.innerWidth>Si&&window.innerWidth<=1440?e.right>=t.left?(u?.(96),b(!0),v(window.innerWidth)):window.innerWidth>C&&(u?.(48),b(!1),v(-1)):(u?.(48),b(!1),v(-1)),g&&(window.innerWidth<=Si||r.right>=t.left?(y(!0),u?.(48)):(y(!1),u?.(96)))}}),[C,g]);return o.useEffect((()=>(L(),window.addEventListener("resize",L),()=>{window.removeEventListener("resize",L)})),[L]),t.jsxs("nav",{css:Bo(g&&!w,d),children:[t.jsxs("div",{css:zo(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
2983
2983
  display: flex;
2984
2984
  align-items: center;
2985
2985
  justify-content: flex-start;
2986
2986
  gap: 12px;
2987
2987
  color: ${p("neutral",R?100:900)};
2988
- `),ref:h,children:[e?t.jsx("div",{ref:f,css:si,children:e}):null,t.jsx("div",{css:ci(g),children:a?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:di(u.pathname===e.link),children:e.label},e.label):t.jsx(ue,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:pi,ref:x,children:w?t.jsxs("button",{type:"button",onClick:()=>k(!j),"aria-label":"Open menu",css:xi,children:[j?"Close":"Menu",j?t.jsx($,{height:"16px",width:"16px"}):t.jsx(U,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:pi,children:i?.map(((e,r)=>t.jsx("div",{css:ui(g),children:e},r)))}),l?t.jsx("div",{css:hi(g),children:l.map((e=>t.jsx(m,{...e},e.label)))}):null]})})]}),g&&!w?t.jsx("div",{css:ii,children:a?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:di(u.pathname===e.link),children:e.label},e.label):t.jsx(ue,{label:e.label,items:e.items||[]},e.label)))}):null,w?t.jsx(ki,{navigationSection:a,utilitySection:i,actionsSection:l,linkRouter:n,isOpen:j,setIsOpen:k}):null]});var R},exports.NavigationRail=({tabs:r=[],defaultValue:n,onTabClick:a,children:i,onOpenChange:l,navbarHeight:s,footerHeight:c})=>{const[d,p]=o.useState(!1),[u,h]=o.useState(n||r?.[0]?.value);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:Li(s,c),children:[t.jsx(e.Tabs.Root,{defaultValue:n||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{var t;h(t=e),a&&a(t)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((r=>t.jsx(e.Tabs.Trigger,{css:Ri,"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"tab-label",children:[r.icon?t.jsx("div",{css:Mi,children:r.icon}):null,t.jsx("p",{children:r.label})]})},r.label)))})}),i?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{p(e),l&&l(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:Ei,children:[t.jsx("div",{css:Mi,children:d?t.jsx(C,{}):t.jsx(b,{})}),t.jsxs("div",{className:"tab-label",children:[t.jsx("p",{children:d?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),i?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:t.jsx(e.Collapsible.Content,{children:t.jsx("div",{css:Ti(s,c),role:"tabpanel","aria-labelledby":u,children:i})})}):null]})},exports.OptionCard=({defaultValue:n,items:o,onValueChange:a})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:a,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((n=>{return t.jsxs(e.RadioCard.Item,{css:ke,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Se,children:[t.jsxs("div",{css:(a=n.variant,r.css`
2988
+ `),ref:h,children:[e?t.jsx("div",{ref:f,css:Ho,children:e}):null,t.jsx("div",{css:No(g),children:i?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:Fo(a===e.link),children:e.label},e.label):t.jsx(ue,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:Ao,ref:x,children:w?t.jsxs("button",{type:"button",onClick:()=>k(!j),"aria-label":"Open menu",css:Yo,children:[j?"Close":"Menu",j?t.jsx($,{height:"16px",width:"16px"}):t.jsx(U,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Ao,children:l?.map(((e,r)=>t.jsx("div",{css:Zo(g),children:e},r)))}),s?t.jsx("div",{css:Wo(g),children:s.map((e=>t.jsx(m,{...e},e.label)))}):null]})})]}),g&&!w?t.jsx("div",{css:Oo,children:i?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:Fo(a===e.link),children:e.label},e.label):t.jsx(ue,{label:e.label,items:e.items||[]},e.label)))}):null,w?t.jsx(ki,{navigationSection:i,utilitySection:l,actionsSection:s,linkRouter:n,isOpen:j,setIsOpen:k,pathname:a}):null]});var R},exports.NavigationRail=({tabs:r=[],defaultValue:n,onTabClick:a,children:i,onOpenChange:l,navbarHeight:s,footerHeight:c})=>{const[d,p]=o.useState(!1),[u,h]=o.useState(n||r?.[0]?.value);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:Li(s,c),children:[t.jsx(e.Tabs.Root,{defaultValue:n||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{var t;h(t=e),a&&a(t)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((r=>t.jsx(e.Tabs.Trigger,{css:Ri,"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"tab-label",children:[r.icon?t.jsx("div",{css:Mi,children:r.icon}):null,t.jsx("p",{children:r.label})]})},r.label)))})}),i?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{p(e),l&&l(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:Ei,children:[t.jsx("div",{css:Mi,children:d?t.jsx(C,{}):t.jsx(b,{})}),t.jsxs("div",{className:"tab-label",children:[t.jsx("p",{children:d?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),i?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:t.jsx(e.Collapsible.Content,{children:t.jsx("div",{css:Ti(s,c),role:"tabpanel","aria-labelledby":u,children:i})})}):null]})},exports.OptionCard=({defaultValue:n,items:o,onValueChange:a})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:a,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((n=>{return t.jsxs(e.RadioCard.Item,{css:ke,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Se,children:[t.jsxs("div",{css:(a=n.variant,r.css`
2989
2989
  width: 100%;
2990
2990
  display: flex;
2991
2991
  flex-direction: ${"centered"===a?"column":"row"};
package/dist/index.d.ts CHANGED
@@ -588,6 +588,7 @@ type NavbarNavigationItemsProps = {
588
588
  type NavbarProps = {
589
589
  logo?: React.ReactNode;
590
590
  linkRouter: any;
591
+ pathname: string;
591
592
  navigationSection?: NavbarNavigationItemsProps[];
592
593
  utilitySection?: React.ReactNode[];
593
594
  actionsSection?: {
@@ -599,7 +600,7 @@ type NavbarProps = {
599
600
  onNavbarHeightChange?: (height: number) => void;
600
601
  };
601
602
 
602
- declare const Navbar: ({ logo, linkRouter, navigationSection, utilitySection, actionsSection, maxWidth, fixed, onNavbarHeightChange, }: NavbarProps) => _emotion_react_jsx_runtime.JSX.Element;
603
+ declare const Navbar: ({ logo, linkRouter, pathname, navigationSection, utilitySection, actionsSection, maxWidth, fixed, onNavbarHeightChange, }: NavbarProps) => _emotion_react_jsx_runtime.JSX.Element;
603
604
 
604
605
  type NavigationRailTabProps = Omit<Tabs.TriggerProps, 'asChild'> & {
605
606
  label: string;
package/dist/index.esm.js CHANGED
@@ -2208,18 +2208,7 @@ import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Ic
2208
2208
  @media screen and (max-width: 768px) {
2209
2209
  text-align: left;
2210
2210
  }
2211
- `,qi=({children:e,label:t="©️World Resources Institute",fixed:r,filled:n,maxWidth:o})=>{const i=(new Date).getFullYear();return H("footer",{css:Wi(r,n),children:O("div",{css:Yi(o),children:[H("div",{children:H($e,{height:"32px",width:"91px"})}),H("div",{css:Ui,children:e}),H("div",{children:O("p",{css:Xi,children:[t," ",i]})})]})})};var Gi,Ki={};
2212
- /**
2213
- * react-router v7.1.5
2214
- *
2215
- * Copyright (c) Remix Software Inc.
2216
- *
2217
- * This source code is licensed under the MIT license found in the
2218
- * LICENSE.md file in the root directory of this source tree.
2219
- *
2220
- * @license MIT
2221
- */
2222
- function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function ea({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function ta(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ra(e,t,r="/"){return function(e,t,r,n){let o="string"==typeof t?ta(t):t,i=ga(o.pathname||"/",r);if(null==i)return null;let a=na(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let l=null;for(let e=0;null==l&&e<a.length;++e){let t=xa(i);l=ha(a[e],t,n)}return l}(e,t,r,!1)}function na(e,t=[],r=[],n=""){let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(Ji(a.relativePath.startsWith(n),`Absolute route path "${a.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(n.length));let l=va([n,a.relativePath]),s=r.concat(a);e.children&&e.children.length>0&&(Ji(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),na(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:ua(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of oa(e.path))o(e,t,r);else o(e,t)})),t}function oa(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];let a=oa(n.join("/")),l=[];return l.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&l.push(...a),l.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(){if(Gi)return Ki;Gi=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.parse=function(e,t){const r=new i,n=e.length;if(n<2)return r;const o=t?.decode||s;let c=0;do{const t=e.indexOf("=",c);if(-1===t)break;const i=e.indexOf(";",c),s=-1===i?n:i;if(t>s){c=e.lastIndexOf(";",t-1)+1;continue}const d=a(e,c,t),p=l(e,t,d),u=e.slice(d,p);if(void 0===r[u]){let n=a(e,t+1,s),i=l(e,s,n);const c=o(e.slice(n,i));r[u]=c}c=s+1}while(c<n);return r},Ki.serialize=function(i,a,l){const s=l?.encode||encodeURIComponent;if(!e.test(i))throw new TypeError(`argument name is invalid: ${i}`);const c=s(a);if(!t.test(c))throw new TypeError(`argument val is invalid: ${a}`);let d=i+"="+c;if(!l)return d;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw new TypeError(`option maxAge is invalid: ${l.maxAge}`);d+="; Max-Age="+l.maxAge}if(l.domain){if(!r.test(l.domain))throw new TypeError(`option domain is invalid: ${l.domain}`);d+="; Domain="+l.domain}if(l.path){if(!n.test(l.path))throw new TypeError(`option path is invalid: ${l.path}`);d+="; Path="+l.path}if(l.expires){if(!function(e){return"[object Date]"===o.call(e)}(l.expires)||!Number.isFinite(l.expires.valueOf()))throw new TypeError(`option expires is invalid: ${l.expires}`);d+="; Expires="+l.expires.toUTCString()}l.httpOnly&&(d+="; HttpOnly");l.secure&&(d+="; Secure");l.partitioned&&(d+="; Partitioned");if(l.priority){switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${l.priority}`)}}if(l.sameSite){switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${l.sameSite}`)}}return d};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function a(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function l(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function s(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}}();var ia=/^:[\w-]+$/,aa=3,la=2,sa=1,ca=10,da=-2,pa=e=>"*"===e;function ua(e,t){let r=e.split("/"),n=r.length;return r.some(pa)&&(n+=da),t&&(n+=la),r.filter((e=>!pa(e))).reduce(((e,t)=>e+(ia.test(t)?aa:""===t?sa:ca)),n)}function ha(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",a=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,c="/"===i?t:t.slice(i.length)||"/",d=fa({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},c),p=l.route;if(!d&&s&&r&&!n[n.length-1].route.index&&(d=fa({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),a.push({params:o,pathname:va([i,d.pathname]),pathnameBase:wa(va([i,d.pathnameBase])),route:p}),"/"!==d.pathnameBase&&(i=va([i,d.pathnameBase]))}return a}function fa(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){Qi("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function xa(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return Qi(!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 ga(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function ma(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ba(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function Ca(e,t,r,n=!1){let o;"string"==typeof e?o=ta(e):(o={...e},Ji(!o.pathname||!o.pathname.includes("?"),ma("?","pathname","search",o)),Ji(!o.pathname||!o.pathname.includes("#"),ma("#","pathname","hash",o)),Ji(!o.search||!o.search.includes("#"),ma("#","search","hash",o)));let i,a=""===e||""===o.pathname,l=a?"/":o.pathname;if(null==l)i=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t="/"){let{pathname:r,search:n="",hash:o=""}="string"==typeof e?ta(e):e,i=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:i,search:ya(n),hash:$a(o)}}(o,i),c=l&&"/"!==l&&l.endsWith("/"),d=(a||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!c&&!d||(s.pathname+="/"),s}var va=e=>e.join("/").replace(/\/\/+/g,"/"),wa=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ya=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",$a=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var ka=["POST","PUT","PATCH","DELETE"];new Set(ka);var La=["GET",...ka];new Set(La);var Sa=Z.createContext(null);Sa.displayName="DataRouter";var Ma=Z.createContext(null);Ma.displayName="DataRouterState";var Ra=Z.createContext({isTransitioning:!1});Ra.displayName="ViewTransition",Z.createContext(new Map).displayName="Fetchers",Z.createContext(null).displayName="Await";var Ea=Z.createContext(null);Ea.displayName="Navigation";var Va=Z.createContext(null);Va.displayName="Location";var Da=Z.createContext({outlet:null,matches:[],isDataRoute:!1});Da.displayName="Route";var Ta=Z.createContext(null);function _a(){return null!=Z.useContext(Va)}function Pa(){return Ji(_a(),"useLocation() may be used only in the context of a <Router> component."),Z.useContext(Va).location}Ta.displayName="RouteError";var Ia="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function za(e){Z.useContext(Ea).static||Z.useLayoutEffect(e)}function Oa(){let{isDataRoute:e}=Z.useContext(Da);return e?function(){let{router:e}=function(e){let t=Z.useContext(Sa);return Ji(t,Za(e)),t}("useNavigate"),t=Wa("useNavigate"),r=Z.useRef(!1);return za((()=>{r.current=!0})),Z.useCallback((async(n,o={})=>{Qi(r.current,Ia),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))}),[e,t])}():function(){Ji(_a(),"useNavigate() may be used only in the context of a <Router> component.");let e=Z.useContext(Sa),{basename:t,navigator:r}=Z.useContext(Ea),{matches:n}=Z.useContext(Da),{pathname:o}=Pa(),i=JSON.stringify(ba(n)),a=Z.useRef(!1);return za((()=>{a.current=!0})),Z.useCallback(((n,l={})=>{if(Qi(a.current,Ia),!a.current)return;if("number"==typeof n)return void r.go(n);let s=Ca(n,JSON.parse(i),o,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:va([t,s.pathname])),(l.replace?r.replace:r.push)(s,l.state,l)}),[t,r,i,o,e])}()}function Ha(e,{relative:t}={}){let{matches:r}=Z.useContext(Da),{pathname:n}=Pa(),o=JSON.stringify(ba(r));return Z.useMemo((()=>Ca(e,JSON.parse(o),n,"path"===t)),[e,o,n,t])}function ja(e,t,r,n){Ji(_a(),"useRoutes() may be used only in the context of a <Router> component.");let o,{navigator:i,static:a}=Z.useContext(Ea),{matches:l}=Z.useContext(Da),s=l[l.length-1],c=s?s.params:{},d=s?s.pathname:"/",p=s?s.pathnameBase:"/",u=s&&s.route;{let e=u&&u.path||"";Ua(d,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (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}/*`}">.`)}o=Pa();let h=o.pathname||"/",f=h;if("/"!==p){let e=p.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=!a&&r&&r.matches&&r.matches.length>0?r.matches:ra(e,{pathname:f});Qi(u||null!=x,`No routes matched location "${o.pathname}${o.search}${o.hash}" `),Qi(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,`Matched leaf route at location "${o.pathname}${o.search}${o.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(e,t=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let n=e,o=r?.errors;if(null!=o){let e=n.findIndex((e=>e.route.id&&void 0!==o?.[e.route.id]));Ji(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,e+1))}let i=!1,a=-1;if(r)for(let e=0;e<n.length;e++){let t=n[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(a=e),t.route.id){let{loaderData:e,errors:o}=r,l=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||l){i=!0,n=a>=0?n.slice(0,a+1):[n[0]];break}}}return n.reduceRight(((e,l,s)=>{let c,d=!1,p=null,u=null;r&&(c=o&&l.route.id?o[l.route.id]:void 0,p=l.route.errorElement||Na,i&&(a<0&&0===s?(Ua("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,u=null):a===s&&(d=!0,u=l.route.hydrateFallbackElement||null)));let h=t.concat(n.slice(0,s+1)),f=()=>{let t;return t=c?p:d?u:l.route.Component?Z.createElement(l.route.Component,null):l.route.element?l.route.element:e,Z.createElement(Fa,{match:l,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:t})};return r&&(l.route.ErrorBoundary||l.route.errorElement||0===s)?Z.createElement(Aa,{location:r.location,revalidation:r.revalidation,component:p,error:c,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()}),null)}(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:va([p,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?p:va([p,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,r,n);return g}function Ba(){let e=function(){let e=Z.useContext(Ta),t=function(e){let t=Z.useContext(Ma);return Ji(t,Za(e)),t}("useRouteError"),r=Wa("useRouteError");if(void 0!==e)return e;return t.errors?.[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=Z.createElement(Z.Fragment,null,Z.createElement("p",null,"💿 Hey developer 👋"),Z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",Z.createElement("code",{style:i},"ErrorBoundary")," or"," ",Z.createElement("code",{style:i},"errorElement")," prop on your route.")),Z.createElement(Z.Fragment,null,Z.createElement("h2",null,"Unexpected Application Error!"),Z.createElement("h3",{style:{fontStyle:"italic"}},t),r?Z.createElement("pre",{style:o},r):null,a)}Z.createContext(null);var Na=Z.createElement(Ba,null),Aa=class extends Z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?Z.createElement(Da.Provider,{value:this.props.routeContext},Z.createElement(Ta.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Fa({routeContext:e,match:t,children:r}){let n=Z.useContext(Sa);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),Z.createElement(Da.Provider,{value:e},r)}function Za(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wa(e){let t=function(e){let t=Z.useContext(Da);return Ji(t,Za(e)),t}(e),r=t.matches[t.matches.length-1];return Ji(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var Ya={};function Ua(e,t,r){t||Ya[e]||(Ya[e]=!0,Qi(!1,r))}Z.memo((function({routes:e,future:t,state:r}){return ja(e,0,r,t)}));var Xa="get",qa="application/x-www-form-urlencoded";function Ga(e){return null!=e&&"string"==typeof e.tagName}var Ka=null;var Ja=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qa(e){return null==e||Ja.has(e)?e:(Qi(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qa}"`),null)}function el(e,t){let r,n,o,i,a;if(Ga(l=e)&&"form"===l.tagName.toLowerCase()){let a=e.getAttribute("action");n=a?ga(a,t):null,r=e.getAttribute("method")||Xa,o=Qa(e.getAttribute("enctype"))||qa,i=new FormData(e)}else if(function(e){return Ga(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ga(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 l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?ga(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Xa,o=Qa(e.getAttribute("formenctype"))||Qa(a.getAttribute("enctype"))||qa,i=new FormData(a,e),!function(){if(null===Ka)try{new FormData(document.createElement("form"),0),Ka=!1}catch(e){Ka=!0}return Ka}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,n)}}else{if(Ga(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Xa,n=null,o=qa,a=e}var l;return i&&"text/plain"===o&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:a}}function tl(e,t){if(!1===e||null==e)throw new Error(t)}function rl(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function nl(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw t;return window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(rl).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function ol(e,t,r,n,o,i){let a=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||l(e,t))):"data"===i?t.filter(((t,i)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(a(t,i)||l(t,i))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function il(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var al=Z.createContext(void 0);function ll(){let e=Z.useContext(al);return tl(e,"You must render this element inside a <HydratedRouter> element"),e}function sl(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function cl({page:e,...t}){let{router:r}=function(){let e=Z.useContext(Sa);return tl(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),n=Z.useMemo((()=>ra(r.routes,e,r.basename)),[r.routes,e,r.basename]);return n?Z.createElement(dl,{page:e,matches:n,...t}):null}function dl({page:e,matches:t,...r}){let n=Pa(),{manifest:o,routeModules:i}=ll(),{loaderData:a,matches:l}=function(){let e=Z.useContext(Ma);return tl(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),s=Z.useMemo((()=>ol(e,t,l,o,n,"data")),[e,t,l,o,n]),c=Z.useMemo((()=>ol(e,t,l,o,n,"assets")),[e,t,l,o,n]),d=Z.useMemo((()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,l=!1;if(t.forEach((e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!s.some((t=>t.route.id===e.route.id))&&e.route.id in a&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:r.add(e.route.id))})),0===r.size)return[];let c=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return l&&r.size>0&&c.searchParams.set("_routes",t.filter((e=>r.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[a,n,o,s,t,e,i]),p=Z.useMemo((()=>il(c,o)),[c,o]),u=function(e){let{manifest:t,routeModules:r}=ll(),[n,o]=Z.useState([]);return Z.useEffect((()=>{let n=!1;return nl(e,t,r).then((e=>{n||o(e)})),()=>{n=!0}}),[e,t,r]),n}(c);return Z.createElement(Z.Fragment,null,d.map((e=>Z.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),p.map((e=>Z.createElement("link",{key:e,rel:"modulepreload",href:e,...r}))),u.map((({key:e,link:t})=>Z.createElement("link",{key:e,...t}))))}function pl(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}al.displayName="FrameworkContext";var ul="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ul&&(window.__reactRouterVersion="7.1.5")}catch(e){}var hl=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fl=Z.forwardRef((function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:o,replace:i,state:a,target:l,to:s,preventScrollReset:c,viewTransition:d,...p},u){let h,{basename:f}=Z.useContext(Ea),x="string"==typeof s&&hl.test(s),g=!1;if("string"==typeof s&&x&&(h=s,ul))try{let e=new URL(window.location.href),t=s.startsWith("//")?new URL(e.protocol+s):new URL(s),r=ga(t.pathname,f);t.origin===e.origin&&null!=r?s=r+t.search+t.hash:g=!0}catch(e){Qi(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let m=function(e,{relative:t}={}){Ji(_a(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=Z.useContext(Ea),{hash:o,pathname:i,search:a}=Ha(e,{relative:t}),l=i;return"/"!==r&&(l="/"===i?r:va([r,i])),n.createHref({pathname:l,search:a,hash:o})}(s,{relative:n}),[b,C,v]=function(e,t){let r=Z.useContext(al),[n,o]=Z.useState(!1),[i,a]=Z.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:c,onMouseLeave:d,onTouchStart:p}=t,u=Z.useRef(null);Z.useEffect((()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{a(e.isIntersecting)}))}),{threshold:.5});return u.current&&e.observe(u.current),()=>{e.disconnect()}}}),[e]),Z.useEffect((()=>{if(n){let e=setTimeout((()=>{a(!0)}),100);return()=>{clearTimeout(e)}}}),[n]);let h=()=>{o(!0)},f=()=>{o(!1),a(!1)};return r?"intent"!==e?[i,u,{}]:[i,u,{onFocus:sl(l,h),onBlur:sl(s,f),onMouseEnter:sl(c,h),onMouseLeave:sl(d,f),onTouchStart:sl(p,h)}]:[!1,u,{}]}(r,p),w=function(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:a}={}){let l=Oa(),s=Pa(),c=Ha(e,{relative:i});return Z.useCallback((d=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(d,t)){d.preventDefault();let t=void 0!==r?r:ea(s)===ea(c);l(e,{replace:t,state:n,preventScrollReset:o,relative:i,viewTransition:a})}}),[s,l,c,r,n,t,e,o,i,a])}(s,{replace:i,state:a,target:l,preventScrollReset:c,relative:n,viewTransition:d});let y=Z.createElement("a",{...p,...v,href:h||m,onClick:g||o?e:function(t){e&&e(t),t.defaultPrevented||w(t)},ref:pl(u,C),target:l,"data-discover":x||"render"!==t?void 0:"true"});return b&&!x?Z.createElement(Z.Fragment,null,y,Z.createElement(cl,{page:m})):y}));function xl(e){let t=Z.useContext(Sa);return Ji(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}fl.displayName="Link",Z.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:o,to:i,viewTransition:a,children:l,...s},c){let d=Ha(i,{relative:s.relative}),p=Pa(),u=Z.useContext(Ma),{navigator:h,basename:f}=Z.useContext(Ea),x=null!=u&&function(e,t={}){let r=Z.useContext(Ra);Ji(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=xl("useViewTransitionState"),o=Ha(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=ga(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=ga(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=fa(o.pathname,a)||null!=fa(o.pathname,i)}(d)&&!0===a,g=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,m=p.pathname,b=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;t||(m=m.toLowerCase(),b=b?b.toLowerCase():null,g=g.toLowerCase()),b&&f&&(b=ga(b,f)||b);const C="/"!==g&&g.endsWith("/")?g.length-1:g.length;let v,w=m===g||!n&&m.startsWith(g)&&"/"===m.charAt(C),y=null!=b&&(b===g||!n&&b.startsWith(g)&&"/"===b.charAt(g.length)),$={isActive:w,isPending:y,isTransitioning:x},k=w?e:void 0;v="function"==typeof r?r($):[r,w?"active":null,y?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let L="function"==typeof o?o($):o;return Z.createElement(fl,{...s,"aria-current":k,className:v,ref:c,style:L,to:i,viewTransition:a},"function"==typeof l?l($):l)})).displayName="NavLink",Z.forwardRef((({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:a=Xa,action:l,onSubmit:s,relative:c,preventScrollReset:d,viewTransition:p,...u},h)=>{let f=function(){let{router:e}=xl("useSubmit"),{basename:t}=Z.useContext(Ea),r=Wa("useRouteId");return Z.useCallback((async(n,o={})=>{let{action:i,method:a,encType:l,formData:s,body:c}=el(n,t);if(!1===o.navigate){let t=o.fetcherKey||ml();await e.fetch(t,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||a,formEncType:o.encType||l,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||a,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[e,t,r])}(),x=function(e,{relative:t}={}){let{basename:r}=Z.useContext(Ea),n=Z.useContext(Da);Ji(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Ha(e||".",{relative:t})},a=Pa();if(null==e){i.search=a.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();i.search=r?`?${r}`:""}}e&&"."!==e||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(i.pathname="/"===i.pathname?r:va([r,i.pathname]));return ea(i)}(l,{relative:c}),g="get"===a.toLowerCase()?"get":"post",m="string"==typeof l&&hl.test(l);return Z.createElement("form",{ref:h,method:g,action:x,onSubmit:n?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=n?.getAttribute("formmethod")||a;f(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:o,state:i,relative:c,preventScrollReset:d,viewTransition:p})},...u,"data-discover":m||"render"!==e?void 0:"true"})})).displayName="Form";var gl=0,ml=()=>`__${String(++gl)}__`;new TextEncoder;const bl=(e,t)=>B`
2211
+ `,qi=({children:e,label:t="©️World Resources Institute",fixed:r,filled:n,maxWidth:o})=>{const i=(new Date).getFullYear();return H("footer",{css:Wi(r,n),children:O("div",{css:Yi(o),children:[H("div",{children:H($e,{height:"32px",width:"91px"})}),H("div",{css:Ui,children:e}),H("div",{children:O("p",{css:Xi,children:[t," ",i]})})]})})},Gi=(e,t)=>B`
2223
2212
  height: ${e?"96px":"48px"};
2224
2213
  width: 100%;
2225
2214
  background-color: ${ne("neutral",100)};
@@ -2228,7 +2217,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2228
2217
  left: 0;
2229
2218
  z-index: 102;
2230
2219
  border-bottom: 1px solid ${ne("neutral",400)};
2231
- `,Cl=B`
2220
+ `,Ki=B`
2232
2221
  height: 48px;
2233
2222
  width: 100%;
2234
2223
  background-color: ${ne("neutral",100)};
@@ -2238,7 +2227,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2238
2227
  justify-content: flex-start;
2239
2228
  gap: 0px;
2240
2229
  padding: 8px 16px;
2241
- `,vl=(e,t)=>B`
2230
+ `,Ji=(e,t)=>B`
2242
2231
  height: 48px;
2243
2232
  width: 100%;
2244
2233
  max-width: ${t?`${t}px`:"100%"};
@@ -2248,7 +2237,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2248
2237
  justify-content: space-between;
2249
2238
  margin: 0 auto;
2250
2239
  padding: 8px 16px;
2251
- `,wl=B`
2240
+ `,Qi=B`
2252
2241
  outline: none;
2253
2242
  a {
2254
2243
  &:focus-visible {
@@ -2259,12 +2248,12 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2259
2248
  outline-width: 2px;
2260
2249
  }
2261
2250
  }
2262
- `,yl=e=>B`
2251
+ `,ea=e=>B`
2263
2252
  display: ${e?"none":"flex"};
2264
2253
  align-items: center;
2265
2254
  justify-content: flex-start;
2266
2255
  gap: 0px;
2267
- `,$l=e=>B`
2256
+ `,ta=e=>B`
2268
2257
  font-size: 16px;
2269
2258
  line-height: 24px;
2270
2259
  font-weight: 400;
@@ -2289,12 +2278,12 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2289
2278
  font-weight: 700;
2290
2279
  color: ${ne("accessible","controls-on-neutral-lights")};
2291
2280
  `:""}
2292
- `,kl=B`
2281
+ `,ra=B`
2293
2282
  height: 48px;
2294
2283
  display: flex;
2295
2284
  align-items: center;
2296
2285
  justify-content: flex-end;
2297
- `,Ll=e=>B`
2286
+ `,na=e=>B`
2298
2287
  height: 100%;
2299
2288
  font-size: 16px;
2300
2289
  line-height: 24px;
@@ -2313,7 +2302,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2313
2302
  }
2314
2303
  }
2315
2304
  `:""}
2316
- `,Sl=e=>B`
2305
+ `,oa=e=>B`
2317
2306
  height: 100%;
2318
2307
  display: flex;
2319
2308
  align-items: center;
@@ -2321,7 +2310,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2321
2310
  gap: 20px;
2322
2311
  padding-left: 16px;
2323
2312
  border-left: 1px solid ${ne("neutral",e?700:300)};
2324
- `,Ml=B`
2313
+ `,ia=B`
2325
2314
  background-color: none;
2326
2315
  border: none;
2327
2316
  cursor: pointer;
@@ -2346,7 +2335,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2346
2335
  outline-width: 2px;
2347
2336
  background-color: ${ne("neutral",200)};
2348
2337
  }
2349
- `,Rl=e=>B`
2338
+ `,aa=e=>B`
2350
2339
  position: absolute;
2351
2340
  top: 48px;
2352
2341
  right: 0;
@@ -2359,10 +2348,10 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2359
2348
  justify-content: flex-start;
2360
2349
  gap: 16px;
2361
2350
  transition: width 0.5s ease-in-out;
2362
- `,El=B`
2351
+ `,la=B`
2363
2352
  height: 100%;
2364
2353
  width: 100%;
2365
- `,Vl=B`
2354
+ `,sa=B`
2366
2355
  background-color: ${ne("neutral",200)};
2367
2356
  border-bottom: 1px solid ${ne("neutral",300)};
2368
2357
 
@@ -2382,14 +2371,14 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2382
2371
  margin-left: -12px;
2383
2372
  }
2384
2373
  }
2385
- `,Dl=B`
2374
+ `,ca=B`
2386
2375
  padding-top: 16px;
2387
2376
  background-color: ${ne("neutral",100)};
2388
- `,Tl=B`
2377
+ `,da=B`
2389
2378
  min-height: 100vh;
2390
2379
  width: 100%;
2391
2380
  overflow-y: scroll;
2392
- `;B``;const _l=e=>B`
2381
+ `;B``;const pa=e=>B`
2393
2382
  width: 100%;
2394
2383
  padding: 12px 16px;
2395
2384
  color: ${ne("neutral",900)};
@@ -2417,7 +2406,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2417
2406
  outline-width: 2px;
2418
2407
  background-color: ${ne("neutral",200)};
2419
2408
  }
2420
- `,Pl=B`
2409
+ `,ua=B`
2421
2410
  width: 100%;
2422
2411
  padding: 12px 16px;
2423
2412
  display: flex;
@@ -2441,7 +2430,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2441
2430
  outline-width: 2px;
2442
2431
  background-color: ${ne("neutral",200)};
2443
2432
  }
2444
- `,Il=e=>B`
2433
+ `,ha=e=>B`
2445
2434
  position: absolute;
2446
2435
  top: 0px;
2447
2436
  right: 0;
@@ -2453,7 +2442,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2453
2442
  align-items: flex-start;
2454
2443
  justify-content: flex-start;
2455
2444
  transition: width 0.5s ease-in-out;
2456
- `,zl=B`
2445
+ `,fa=B`
2457
2446
  height: 48px;
2458
2447
  width: 100%;
2459
2448
  display: flex;
@@ -2464,7 +2453,7 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2464
2453
  position: relative;
2465
2454
  top: 0;
2466
2455
  left: 0;
2467
- `,Ol=B`
2456
+ `,xa=B`
2468
2457
  position: absolute;
2469
2458
  bottom: 0;
2470
2459
  left: 0;
@@ -2479,13 +2468,24 @@ function Ji(e,t){if(!1===e||null==e)throw new Error(t)}function Qi(e,t){if(!e){"
2479
2468
  button {
2480
2469
  width: calc(48% - 24px);
2481
2470
  }
2482
- `,Hl=({navigationSection:e,utilitySection:t,actionsSection:r,linkRouter:n,isOpen:o,setIsOpen:i})=>{const[a,l]=Y(void 0),[s,c]=Y(-1),d=Pa(),p=Oa(),u=q(null),h=q([]);return O(j,{children:[H("div",{css:Rl(o),children:o&&O("div",{css:El,children:[O("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[t?H("div",{css:Vl,children:t?.map((e=>H("div",{className:"utility-item",children:e})))}):null,e?H("div",{css:Dl,children:e.map(((e,t)=>e.link?H("button",{type:"button",css:_l(d.pathname===e.link),onClick:()=>{p(e.link||""),l(void 0),c(-1),i(!1)},children:e.label},e.label):O("button",{css:Pl,type:"button",ref:e=>h.current[t]=e,onClick:()=>{e.items&&(l(e),c(t),setTimeout((()=>{u.current?.focus()}),100))},children:[e.label,e.items?H(xe,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),r?H("div",{css:Ol,children:r.map((e=>H(ce,{label:e.label,onClick:()=>{e?.onClick?.(),l(void 0),c(-1),i(!1)}},e.label)))}):null]})}),H("div",{css:Il(!!a?.items),children:a?.items?O(j,{children:[O("div",{css:zl,children:[O("button",{type:"button",onClick:()=>{l(void 0),c(-1),h.current[s]?.focus()},"aria-label":"Go back",css:Ml,ref:u,children:[H(xe,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),a?.label]}),O("button",{type:"button",onClick:()=>{l(void 0),c(-1),i(!1)},"aria-label":"Close menu",css:Ml,children:["Close",H(ge,{height:"16px",width:"16px"})]})]}),H("div",{css:Tl,children:a?.items?.map((e=>H("button",{type:"button",css:_l(),onClick:()=>{p(e.link||""),l(void 0),c(-1),i(!1)},children:e.label},e.label)))})]}):null})]})},jl=1023,Bl=({logo:e,linkRouter:t,navigationSection:r,utilitySection:n,actionsSection:o,maxWidth:i,fixed:a,onNavbarHeightChange:l})=>{const s=Pa(),c=q(null),d=q(null),p=q(null),[u,h]=Y(!1),[f,x]=Y(-1),[g,m]=Y(window?.innerWidth<=jl),[b,C]=Y(!1),v=t,w=J((()=>{if(d.current&&c.current&&p.current){const e=c.current.getBoundingClientRect(),t=d.current.getBoundingClientRect(),r=p.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=jl||window.innerWidth<=f?(l?.(96),h(!0)):window.innerWidth>jl&&window.innerWidth<=1440?e.right>=t.left?(l?.(96),h(!0),x(window.innerWidth)):window.innerWidth>f&&(l?.(48),h(!1),x(-1)):(l?.(48),h(!1),x(-1)),u&&(window.innerWidth<=jl||r.right>=t.left?(m(!0),l?.(48)):(m(!1),l?.(96)))}}),[f,u]);return U((()=>(w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)})),[w]),O("nav",{css:bl(u&&!g,a),children:[O("div",{css:vl(u&&!g,i),children:[O("div",{css:(y=u&&!g,B`
2471
+ `;var ga,ma={};
2472
+ /**
2473
+ * react-router v7.1.5
2474
+ *
2475
+ * Copyright (c) Remix Software Inc.
2476
+ *
2477
+ * This source code is licensed under the MIT license found in the
2478
+ * LICENSE.md file in the root directory of this source tree.
2479
+ *
2480
+ * @license MIT
2481
+ */
2482
+ function ba(e,t){if(!1===e||null==e)throw new Error(t)}function Ca(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function va({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function wa(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ya(e,t,r="/"){return function(e,t,r,n){let o="string"==typeof t?wa(t):t,i=za(o.pathname||"/",r);if(null==i)return null;let a=$a(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let l=null;for(let e=0;null==l&&e<a.length;++e){let t=Ia(i);l=_a(a[e],t,n)}return l}(e,t,r,!1)}function $a(e,t=[],r=[],n=""){let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(ba(a.relativePath.startsWith(n),`Absolute route path "${a.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(n.length));let l=Ba([n,a.relativePath]),s=r.concat(a);e.children&&e.children.length>0&&(ba(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),$a(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:Ta(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of ka(e.path))o(e,t,r);else o(e,t)})),t}function ka(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];let a=ka(n.join("/")),l=[];return l.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&l.push(...a),l.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(){if(ga)return ma;ga=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.parse=function(e,t){const r=new i,n=e.length;if(n<2)return r;const o=t?.decode||s;let c=0;do{const t=e.indexOf("=",c);if(-1===t)break;const i=e.indexOf(";",c),s=-1===i?n:i;if(t>s){c=e.lastIndexOf(";",t-1)+1;continue}const d=a(e,c,t),p=l(e,t,d),u=e.slice(d,p);if(void 0===r[u]){let n=a(e,t+1,s),i=l(e,s,n);const c=o(e.slice(n,i));r[u]=c}c=s+1}while(c<n);return r},ma.serialize=function(i,a,l){const s=l?.encode||encodeURIComponent;if(!e.test(i))throw new TypeError(`argument name is invalid: ${i}`);const c=s(a);if(!t.test(c))throw new TypeError(`argument val is invalid: ${a}`);let d=i+"="+c;if(!l)return d;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw new TypeError(`option maxAge is invalid: ${l.maxAge}`);d+="; Max-Age="+l.maxAge}if(l.domain){if(!r.test(l.domain))throw new TypeError(`option domain is invalid: ${l.domain}`);d+="; Domain="+l.domain}if(l.path){if(!n.test(l.path))throw new TypeError(`option path is invalid: ${l.path}`);d+="; Path="+l.path}if(l.expires){if(!function(e){return"[object Date]"===o.call(e)}(l.expires)||!Number.isFinite(l.expires.valueOf()))throw new TypeError(`option expires is invalid: ${l.expires}`);d+="; Expires="+l.expires.toUTCString()}l.httpOnly&&(d+="; HttpOnly");l.secure&&(d+="; Secure");l.partitioned&&(d+="; Partitioned");if(l.priority){switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${l.priority}`)}}if(l.sameSite){switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${l.sameSite}`)}}return d};const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function a(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function l(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function s(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}}();var La=/^:[\w-]+$/,Sa=3,Ma=2,Ra=1,Ea=10,Va=-2,Da=e=>"*"===e;function Ta(e,t){let r=e.split("/"),n=r.length;return r.some(Da)&&(n+=Va),t&&(n+=Ma),r.filter((e=>!Da(e))).reduce(((e,t)=>e+(La.test(t)?Sa:""===t?Ra:Ea)),n)}function _a(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",a=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,c="/"===i?t:t.slice(i.length)||"/",d=Pa({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},c),p=l.route;if(!d&&s&&r&&!n[n.length-1].route.index&&(d=Pa({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),a.push({params:o,pathname:Ba([i,d.pathname]),pathnameBase:Na(Ba([i,d.pathnameBase])),route:p}),"/"!==d.pathnameBase&&(i=Ba([i,d.pathnameBase]))}return a}function Pa(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){Ca("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function Ia(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return Ca(!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 za(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Oa(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ha(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function ja(e,t,r,n=!1){let o;"string"==typeof e?o=wa(e):(o={...e},ba(!o.pathname||!o.pathname.includes("?"),Oa("?","pathname","search",o)),ba(!o.pathname||!o.pathname.includes("#"),Oa("#","pathname","hash",o)),ba(!o.search||!o.search.includes("#"),Oa("#","search","hash",o)));let i,a=""===e||""===o.pathname,l=a?"/":o.pathname;if(null==l)i=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=function(e,t="/"){let{pathname:r,search:n="",hash:o=""}="string"==typeof e?wa(e):e,i=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:i,search:Aa(n),hash:Fa(o)}}(o,i),c=l&&"/"!==l&&l.endsWith("/"),d=(a||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!c&&!d||(s.pathname+="/"),s}var Ba=e=>e.join("/").replace(/\/\/+/g,"/"),Na=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Aa=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Fa=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Za=["POST","PUT","PATCH","DELETE"];new Set(Za);var Wa=["GET",...Za];new Set(Wa);var Ya=Z.createContext(null);Ya.displayName="DataRouter";var Ua=Z.createContext(null);Ua.displayName="DataRouterState";var Xa=Z.createContext({isTransitioning:!1});Xa.displayName="ViewTransition",Z.createContext(new Map).displayName="Fetchers",Z.createContext(null).displayName="Await";var qa=Z.createContext(null);qa.displayName="Navigation";var Ga=Z.createContext(null);Ga.displayName="Location";var Ka=Z.createContext({outlet:null,matches:[],isDataRoute:!1});Ka.displayName="Route";var Ja=Z.createContext(null);function Qa(){return null!=Z.useContext(Ga)}function el(){return ba(Qa(),"useLocation() may be used only in the context of a <Router> component."),Z.useContext(Ga).location}Ja.displayName="RouteError";var tl="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function rl(e){Z.useContext(qa).static||Z.useLayoutEffect(e)}function nl(){let{isDataRoute:e}=Z.useContext(Ka);return e?function(){let{router:e}=function(e){let t=Z.useContext(Ya);return ba(t,dl(e)),t}("useNavigate"),t=pl("useNavigate"),r=Z.useRef(!1);return rl((()=>{r.current=!0})),Z.useCallback((async(n,o={})=>{Ca(r.current,tl),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))}),[e,t])}():function(){ba(Qa(),"useNavigate() may be used only in the context of a <Router> component.");let e=Z.useContext(Ya),{basename:t,navigator:r}=Z.useContext(qa),{matches:n}=Z.useContext(Ka),{pathname:o}=el(),i=JSON.stringify(Ha(n)),a=Z.useRef(!1);return rl((()=>{a.current=!0})),Z.useCallback(((n,l={})=>{if(Ca(a.current,tl),!a.current)return;if("number"==typeof n)return void r.go(n);let s=ja(n,JSON.parse(i),o,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:Ba([t,s.pathname])),(l.replace?r.replace:r.push)(s,l.state,l)}),[t,r,i,o,e])}()}function ol(e,{relative:t}={}){let{matches:r}=Z.useContext(Ka),{pathname:n}=el(),o=JSON.stringify(Ha(r));return Z.useMemo((()=>ja(e,JSON.parse(o),n,"path"===t)),[e,o,n,t])}function il(e,t,r,n){ba(Qa(),"useRoutes() may be used only in the context of a <Router> component.");let o,{navigator:i,static:a}=Z.useContext(qa),{matches:l}=Z.useContext(Ka),s=l[l.length-1],c=s?s.params:{},d=s?s.pathname:"/",p=s?s.pathnameBase:"/",u=s&&s.route;{let e=u&&u.path||"";hl(d,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (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}/*`}">.`)}o=el();let h=o.pathname||"/",f=h;if("/"!==p){let e=p.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=!a&&r&&r.matches&&r.matches.length>0?r.matches:ya(e,{pathname:f});Ca(u||null!=x,`No routes matched location "${o.pathname}${o.search}${o.hash}" `),Ca(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,`Matched leaf route at location "${o.pathname}${o.search}${o.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=function(e,t=[],r=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let n=e,o=r?.errors;if(null!=o){let e=n.findIndex((e=>e.route.id&&void 0!==o?.[e.route.id]));ba(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,e+1))}let i=!1,a=-1;if(r)for(let e=0;e<n.length;e++){let t=n[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(a=e),t.route.id){let{loaderData:e,errors:o}=r,l=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||l){i=!0,n=a>=0?n.slice(0,a+1):[n[0]];break}}}return n.reduceRight(((e,l,s)=>{let c,d=!1,p=null,u=null;r&&(c=o&&l.route.id?o[l.route.id]:void 0,p=l.route.errorElement||ll,i&&(a<0&&0===s?(hl("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,u=null):a===s&&(d=!0,u=l.route.hydrateFallbackElement||null)));let h=t.concat(n.slice(0,s+1)),f=()=>{let t;return t=c?p:d?u:l.route.Component?Z.createElement(l.route.Component,null):l.route.element?l.route.element:e,Z.createElement(cl,{match:l,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:t})};return r&&(l.route.ErrorBoundary||l.route.errorElement||0===s)?Z.createElement(sl,{location:r.location,revalidation:r.revalidation,component:p,error:c,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()}),null)}(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:Ba([p,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?p:Ba([p,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,r,n);return g}function al(){let e=function(){let e=Z.useContext(Ja),t=function(e){let t=Z.useContext(Ua);return ba(t,dl(e)),t}("useRouteError"),r=pl("useRouteError");if(void 0!==e)return e;return t.errors?.[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=Z.createElement(Z.Fragment,null,Z.createElement("p",null,"💿 Hey developer 👋"),Z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",Z.createElement("code",{style:i},"ErrorBoundary")," or"," ",Z.createElement("code",{style:i},"errorElement")," prop on your route.")),Z.createElement(Z.Fragment,null,Z.createElement("h2",null,"Unexpected Application Error!"),Z.createElement("h3",{style:{fontStyle:"italic"}},t),r?Z.createElement("pre",{style:o},r):null,a)}Z.createContext(null);var ll=Z.createElement(al,null),sl=class extends Z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?Z.createElement(Ka.Provider,{value:this.props.routeContext},Z.createElement(Ja.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function cl({routeContext:e,match:t,children:r}){let n=Z.useContext(Ya);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),Z.createElement(Ka.Provider,{value:e},r)}function dl(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pl(e){let t=function(e){let t=Z.useContext(Ka);return ba(t,dl(e)),t}(e),r=t.matches[t.matches.length-1];return ba(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var ul={};function hl(e,t,r){t||ul[e]||(ul[e]=!0,Ca(!1,r))}Z.memo((function({routes:e,future:t,state:r}){return il(e,0,r,t)}));var fl="get",xl="application/x-www-form-urlencoded";function gl(e){return null!=e&&"string"==typeof e.tagName}var ml=null;var bl=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Cl(e){return null==e||bl.has(e)?e:(Ca(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xl}"`),null)}function vl(e,t){let r,n,o,i,a;if(gl(l=e)&&"form"===l.tagName.toLowerCase()){let a=e.getAttribute("action");n=a?za(a,t):null,r=e.getAttribute("method")||fl,o=Cl(e.getAttribute("enctype"))||xl,i=new FormData(e)}else if(function(e){return gl(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return gl(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 l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?za(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||fl,o=Cl(e.getAttribute("formenctype"))||Cl(a.getAttribute("enctype"))||xl,i=new FormData(a,e),!function(){if(null===ml)try{new FormData(document.createElement("form"),0),ml=!1}catch(e){ml=!0}return ml}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,n)}}else{if(gl(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=fl,n=null,o=xl,a=e}var l;return i&&"text/plain"===o&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:a}}function wl(e,t){if(!1===e||null==e)throw new Error(t)}function yl(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function $l(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw t;return window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(yl).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function kl(e,t,r,n,o,i){let a=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||l(e,t))):"data"===i?t.filter(((t,i)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(a(t,i)||l(t,i))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Ll(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Sl=Z.createContext(void 0);function Ml(){let e=Z.useContext(Sl);return wl(e,"You must render this element inside a <HydratedRouter> element"),e}function Rl(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function El({page:e,...t}){let{router:r}=function(){let e=Z.useContext(Ya);return wl(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),n=Z.useMemo((()=>ya(r.routes,e,r.basename)),[r.routes,e,r.basename]);return n?Z.createElement(Vl,{page:e,matches:n,...t}):null}function Vl({page:e,matches:t,...r}){let n=el(),{manifest:o,routeModules:i}=Ml(),{loaderData:a,matches:l}=function(){let e=Z.useContext(Ua);return wl(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),s=Z.useMemo((()=>kl(e,t,l,o,n,"data")),[e,t,l,o,n]),c=Z.useMemo((()=>kl(e,t,l,o,n,"assets")),[e,t,l,o,n]),d=Z.useMemo((()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,l=!1;if(t.forEach((e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!s.some((t=>t.route.id===e.route.id))&&e.route.id in a&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:r.add(e.route.id))})),0===r.size)return[];let c=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(e);return l&&r.size>0&&c.searchParams.set("_routes",t.filter((e=>r.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[a,n,o,s,t,e,i]),p=Z.useMemo((()=>Ll(c,o)),[c,o]),u=function(e){let{manifest:t,routeModules:r}=Ml(),[n,o]=Z.useState([]);return Z.useEffect((()=>{let n=!1;return $l(e,t,r).then((e=>{n||o(e)})),()=>{n=!0}}),[e,t,r]),n}(c);return Z.createElement(Z.Fragment,null,d.map((e=>Z.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),p.map((e=>Z.createElement("link",{key:e,rel:"modulepreload",href:e,...r}))),u.map((({key:e,link:t})=>Z.createElement("link",{key:e,...t}))))}function Dl(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Sl.displayName="FrameworkContext";var Tl="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Tl&&(window.__reactRouterVersion="7.1.5")}catch(e){}var _l=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pl=Z.forwardRef((function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:o,replace:i,state:a,target:l,to:s,preventScrollReset:c,viewTransition:d,...p},u){let h,{basename:f}=Z.useContext(qa),x="string"==typeof s&&_l.test(s),g=!1;if("string"==typeof s&&x&&(h=s,Tl))try{let e=new URL(window.location.href),t=s.startsWith("//")?new URL(e.protocol+s):new URL(s),r=za(t.pathname,f);t.origin===e.origin&&null!=r?s=r+t.search+t.hash:g=!0}catch(e){Ca(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let m=function(e,{relative:t}={}){ba(Qa(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=Z.useContext(qa),{hash:o,pathname:i,search:a}=ol(e,{relative:t}),l=i;return"/"!==r&&(l="/"===i?r:Ba([r,i])),n.createHref({pathname:l,search:a,hash:o})}(s,{relative:n}),[b,C,v]=function(e,t){let r=Z.useContext(Sl),[n,o]=Z.useState(!1),[i,a]=Z.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:c,onMouseLeave:d,onTouchStart:p}=t,u=Z.useRef(null);Z.useEffect((()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{a(e.isIntersecting)}))}),{threshold:.5});return u.current&&e.observe(u.current),()=>{e.disconnect()}}}),[e]),Z.useEffect((()=>{if(n){let e=setTimeout((()=>{a(!0)}),100);return()=>{clearTimeout(e)}}}),[n]);let h=()=>{o(!0)},f=()=>{o(!1),a(!1)};return r?"intent"!==e?[i,u,{}]:[i,u,{onFocus:Rl(l,h),onBlur:Rl(s,f),onMouseEnter:Rl(c,h),onMouseLeave:Rl(d,f),onTouchStart:Rl(p,h)}]:[!1,u,{}]}(r,p),w=function(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:a}={}){let l=nl(),s=el(),c=ol(e,{relative:i});return Z.useCallback((d=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(d,t)){d.preventDefault();let t=void 0!==r?r:va(s)===va(c);l(e,{replace:t,state:n,preventScrollReset:o,relative:i,viewTransition:a})}}),[s,l,c,r,n,t,e,o,i,a])}(s,{replace:i,state:a,target:l,preventScrollReset:c,relative:n,viewTransition:d});let y=Z.createElement("a",{...p,...v,href:h||m,onClick:g||o?e:function(t){e&&e(t),t.defaultPrevented||w(t)},ref:Dl(u,C),target:l,"data-discover":x||"render"!==t?void 0:"true"});return b&&!x?Z.createElement(Z.Fragment,null,y,Z.createElement(El,{page:m})):y}));function Il(e){let t=Z.useContext(Ya);return ba(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}Pl.displayName="Link",Z.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:o,to:i,viewTransition:a,children:l,...s},c){let d=ol(i,{relative:s.relative}),p=el(),u=Z.useContext(Ua),{navigator:h,basename:f}=Z.useContext(qa),x=null!=u&&function(e,t={}){let r=Z.useContext(Xa);ba(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Il("useViewTransitionState"),o=ol(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=za(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=za(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=Pa(o.pathname,a)||null!=Pa(o.pathname,i)}(d)&&!0===a,g=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,m=p.pathname,b=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;t||(m=m.toLowerCase(),b=b?b.toLowerCase():null,g=g.toLowerCase()),b&&f&&(b=za(b,f)||b);const C="/"!==g&&g.endsWith("/")?g.length-1:g.length;let v,w=m===g||!n&&m.startsWith(g)&&"/"===m.charAt(C),y=null!=b&&(b===g||!n&&b.startsWith(g)&&"/"===b.charAt(g.length)),$={isActive:w,isPending:y,isTransitioning:x},k=w?e:void 0;v="function"==typeof r?r($):[r,w?"active":null,y?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let L="function"==typeof o?o($):o;return Z.createElement(Pl,{...s,"aria-current":k,className:v,ref:c,style:L,to:i,viewTransition:a},"function"==typeof l?l($):l)})).displayName="NavLink",Z.forwardRef((({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:a=fl,action:l,onSubmit:s,relative:c,preventScrollReset:d,viewTransition:p,...u},h)=>{let f=function(){let{router:e}=Il("useSubmit"),{basename:t}=Z.useContext(qa),r=pl("useRouteId");return Z.useCallback((async(n,o={})=>{let{action:i,method:a,encType:l,formData:s,body:c}=vl(n,t);if(!1===o.navigate){let t=o.fetcherKey||Ol();await e.fetch(t,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||a,formEncType:o.encType||l,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||a,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[e,t,r])}(),x=function(e,{relative:t}={}){let{basename:r}=Z.useContext(qa),n=Z.useContext(Ka);ba(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...ol(e||".",{relative:t})},a=el();if(null==e){i.search=a.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();i.search=r?`?${r}`:""}}e&&"."!==e||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(i.pathname="/"===i.pathname?r:Ba([r,i.pathname]));return va(i)}(l,{relative:c}),g="get"===a.toLowerCase()?"get":"post",m="string"==typeof l&&_l.test(l);return Z.createElement("form",{ref:h,method:g,action:x,onSubmit:n?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=n?.getAttribute("formmethod")||a;f(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:o,state:i,relative:c,preventScrollReset:d,viewTransition:p})},...u,"data-discover":m||"render"!==e?void 0:"true"})})).displayName="Form";var zl=0,Ol=()=>`__${String(++zl)}__`;new TextEncoder;const Hl=({navigationSection:e,utilitySection:t,actionsSection:r,linkRouter:n,isOpen:o,setIsOpen:i,pathname:a})=>{const[l,s]=Y(void 0),[c,d]=Y(-1),p=nl(),u=q(null),h=q([]);return O(j,{children:[H("div",{css:aa(o),children:o&&O("div",{css:la,children:[O("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[t?H("div",{css:sa,children:t?.map((e=>H("div",{className:"utility-item",children:e})))}):null,e?H("div",{css:ca,children:e.map(((e,t)=>e.link?H("button",{type:"button",css:pa(a===e.link),onClick:()=>{p(e.link||""),s(void 0),d(-1),i(!1)},children:e.label},e.label):O("button",{css:ua,type:"button",ref:e=>h.current[t]=e,onClick:()=>{e.items&&(s(e),d(t),setTimeout((()=>{u.current?.focus()}),100))},children:[e.label,e.items?H(xe,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),r?H("div",{css:xa,children:r.map((e=>H(ce,{label:e.label,onClick:()=>{e?.onClick?.(),s(void 0),d(-1),i(!1)}},e.label)))}):null]})}),H("div",{css:ha(!!l?.items),children:l?.items?O(j,{children:[O("div",{css:fa,children:[O("button",{type:"button",onClick:()=>{s(void 0),d(-1),h.current[c]?.focus()},"aria-label":"Go back",css:ia,ref:u,children:[H(xe,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),l?.label]}),O("button",{type:"button",onClick:()=>{s(void 0),d(-1),i(!1)},"aria-label":"Close menu",css:ia,children:["Close",H(ge,{height:"16px",width:"16px"})]})]}),H("div",{css:da,children:l?.items?.map((e=>H("button",{type:"button",css:pa(),onClick:()=>{p(e.link||""),s(void 0),d(-1),i(!1)},children:e.label},e.label)))})]}):null})]})},jl=1023,Bl=({logo:e,linkRouter:t,pathname:r,navigationSection:n,utilitySection:o,actionsSection:i,maxWidth:a,fixed:l,onNavbarHeightChange:s})=>{const c=q(null),d=q(null),p=q(null),[u,h]=Y(!1),[f,x]=Y(-1),[g,m]=Y(window?.innerWidth<=jl),[b,C]=Y(!1),v=t,w=J((()=>{if(d.current&&c.current&&p.current){const e=c.current.getBoundingClientRect(),t=d.current.getBoundingClientRect(),r=p.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=jl||window.innerWidth<=f?(s?.(96),h(!0)):window.innerWidth>jl&&window.innerWidth<=1440?e.right>=t.left?(s?.(96),h(!0),x(window.innerWidth)):window.innerWidth>f&&(s?.(48),h(!1),x(-1)):(s?.(48),h(!1),x(-1)),u&&(window.innerWidth<=jl||r.right>=t.left?(m(!0),s?.(48)):(m(!1),s?.(96)))}}),[f,u]);return U((()=>(w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)})),[w]),O("nav",{css:Gi(u&&!g,l),children:[O("div",{css:Ji(u&&!g,a),children:[O("div",{css:(y=u&&!g,B`
2483
2483
  display: flex;
2484
2484
  align-items: center;
2485
2485
  justify-content: flex-start;
2486
2486
  gap: 12px;
2487
2487
  color: ${ne("neutral",y?100:900)};
2488
- `),ref:c,children:[e?H("div",{ref:p,css:wl,children:e}):null,H("div",{css:yl(u),children:r?.map((e=>e.link?H(v,{to:e.link,href:e.link,css:$l(s.pathname===e.link),children:e.label},e.label):H(ot,{label:e.label,items:e.items||[]},e.label)))})]}),H("div",{css:kl,ref:d,children:g?O("button",{type:"button",onClick:()=>C(!b),"aria-label":"Open menu",css:Ml,children:[b?"Close":"Menu",H(b?ge:je,{height:"16px",width:"16px"})]}):O(j,{children:[H("div",{css:kl,children:n?.map(((e,t)=>H("div",{css:Ll(u),children:e},t)))}),o?H("div",{css:Sl(u),children:o.map((e=>H(ce,{...e},e.label)))}):null]})})]}),u&&!g?H("div",{css:Cl,children:r?.map((e=>e.link?H(v,{to:e.link,href:e.link,css:$l(s.pathname===e.link),children:e.label},e.label):H(ot,{label:e.label,items:e.items||[]},e.label)))}):null,g?H(Hl,{navigationSection:r,utilitySection:n,actionsSection:o,linkRouter:t,isOpen:b,setIsOpen:C}):null]});var y},Nl=(e,t)=>B`
2488
+ `),ref:c,children:[e?H("div",{ref:p,css:Qi,children:e}):null,H("div",{css:ea(u),children:n?.map((e=>e.link?H(v,{to:e.link,href:e.link,css:ta(r===e.link),children:e.label},e.label):H(ot,{label:e.label,items:e.items||[]},e.label)))})]}),H("div",{css:ra,ref:d,children:g?O("button",{type:"button",onClick:()=>C(!b),"aria-label":"Open menu",css:ia,children:[b?"Close":"Menu",H(b?ge:je,{height:"16px",width:"16px"})]}):O(j,{children:[H("div",{css:ra,children:o?.map(((e,t)=>H("div",{css:na(u),children:e},t)))}),i?H("div",{css:oa(u),children:i.map((e=>H(ce,{...e},e.label)))}):null]})})]}),u&&!g?H("div",{css:Ki,children:n?.map((e=>e.link?H(v,{to:e.link,href:e.link,css:ta(r===e.link),children:e.label},e.label):H(ot,{label:e.label,items:e.items||[]},e.label)))}):null,g?H(Hl,{navigationSection:n,utilitySection:o,actionsSection:i,linkRouter:t,isOpen:b,setIsOpen:C,pathname:r}):null]});var y},Nl=(e,t)=>B`
2489
2489
  width: 64px;
2490
2490
  height: calc(100vh - ${e||"0px"} - ${t||"0px"});
2491
2491
  z-index: 100;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldresources/wri-design-systems",
3
- "version": "2.132.0",
3
+ "version": "2.133.0",
4
4
  "description": "WRI UI Library",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",