codesesh 1.0.5 → 1.0.7

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.
Files changed (54) hide show
  1. package/README.md +1 -0
  2. package/dist/{chunk-PAP2Q3WV.js → chunk-DE6UJMOY.js} +2 -2
  3. package/dist/{chunk-YQFEGFWD.js → chunk-EYZ73CYP.js} +2 -2
  4. package/dist/{chunk-NBJJGH5P.js → chunk-QHWSZFRM.js} +118 -74
  5. package/dist/chunk-QHWSZFRM.js.map +1 -0
  6. package/dist/{chunk-WUYSZAYR.js → chunk-SII3M66U.js} +13 -6
  7. package/dist/chunk-SII3M66U.js.map +1 -0
  8. package/dist/{chunk-TS3IWH5U.js → chunk-VVCSQU5B.js} +120 -20
  9. package/dist/chunk-VVCSQU5B.js.map +1 -0
  10. package/dist/{chunk-FCYCBGEL.js → chunk-WIWK7BXS.js} +3 -3
  11. package/dist/{chunk-XKZSX5BM.js → chunk-YEQTRALH.js} +3 -3
  12. package/dist/{discovery-D23RV7FY.js → discovery-4WAEYSTR.js} +7 -5
  13. package/dist/index.js +217 -150
  14. package/dist/index.js.map +1 -1
  15. package/dist/project-identity-worker.js +4 -4
  16. package/dist/scan-refresh-worker.js +6 -6
  17. package/dist/search-index-worker.js +6 -6
  18. package/dist/session-detail-worker.js +6 -6
  19. package/dist/smart-tag-worker.js +3 -3
  20. package/dist/web/assets/CustomTimeWindowDialog-CVURkiVO.js +1 -0
  21. package/dist/web/assets/InteractiveReceipt-DGC-xV7U.js +1 -0
  22. package/dist/web/assets/OverviewScreen-DoXrZ5qp.js +1 -0
  23. package/dist/web/assets/{PrismHighlighter-LWITDffT.js → PrismHighlighter-02695Lmx.js} +1 -1
  24. package/dist/web/assets/Projects-DZiYh6hp.js +1 -0
  25. package/dist/web/assets/SearchResultsPanel-CAQe8Di0.js +1 -0
  26. package/dist/web/assets/SessionDetail-Da8EBygt.js +53 -0
  27. package/dist/web/assets/api-ToidoNW6.js +1 -0
  28. package/dist/web/assets/index-Bl8pbRFj.js +1423 -0
  29. package/dist/web/assets/index-CRI1m3xN.css +1 -0
  30. package/dist/web/assets/session-indexes-D5gps7K8.js +4 -0
  31. package/dist/web/assets/translate-BDFu3ZiK.js +2 -0
  32. package/dist/web/assets/utils-BIZi2up3.js +1 -0
  33. package/dist/web/index.html +7 -7
  34. package/package.json +3 -3
  35. package/dist/chunk-NBJJGH5P.js.map +0 -1
  36. package/dist/chunk-TS3IWH5U.js.map +0 -1
  37. package/dist/chunk-WUYSZAYR.js.map +0 -1
  38. package/dist/web/assets/CustomTimeWindowDialog-C9XTZRm0.js +0 -1
  39. package/dist/web/assets/InteractiveReceipt-Sca1smpv.js +0 -1
  40. package/dist/web/assets/OverviewScreen-Vq6BQR9_.js +0 -1
  41. package/dist/web/assets/Projects-CwicV3Dk.js +0 -1
  42. package/dist/web/assets/SearchResultsPanel-DCO0Ak0c.js +0 -1
  43. package/dist/web/assets/SessionDetail-mdmTQgo1.js +0 -53
  44. package/dist/web/assets/api-CXVT9XcZ.js +0 -1
  45. package/dist/web/assets/contract-BS78VBCV.js +0 -2
  46. package/dist/web/assets/index-C5cyw58A.css +0 -1
  47. package/dist/web/assets/index-H2cT-6c6.js +0 -1423
  48. package/dist/web/assets/session-indexes-yyyWpKLf.js +0 -4
  49. package/dist/web/assets/utils-C7BqyxxV.js +0 -1
  50. /package/dist/{chunk-PAP2Q3WV.js.map → chunk-DE6UJMOY.js.map} +0 -0
  51. /package/dist/{chunk-YQFEGFWD.js.map → chunk-EYZ73CYP.js.map} +0 -0
  52. /package/dist/{chunk-FCYCBGEL.js.map → chunk-WIWK7BXS.js.map} +0 -0
  53. /package/dist/{chunk-XKZSX5BM.js.map → chunk-YEQTRALH.js.map} +0 -0
  54. /package/dist/{discovery-D23RV7FY.js.map → discovery-4WAEYSTR.js.map} +0 -0
@@ -1,4 +0,0 @@
1
- import{a as e,n as t}from"./jsx-runtime-B-hcVAMW.js";import{S as n,s as r,u as i,x as a}from"./contract-BS78VBCV.js";var o=e(t(),1),s=`modulepreload`,c=function(e){return`/`+e},l={},u=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=c(t,n),t=u(t),t in l)return;l[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:s,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},d=e=>{throw TypeError(e)},f=(e,t,n)=>t.has(e)||d(`Cannot `+n),p=(e,t,n)=>(f(e,t,`read from private field`),n?n.call(e):t.get(e)),m=(e,t,n)=>t.has(e)?d(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),h=(e,t,n,r)=>(f(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),g=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,_=/^[\\/]{2}/;function v(e,t){return t+e.replace(/\\/g,`/`)}var y=`popstate`;function b(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function x(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return E(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:D(t)}return k(t,n,null,e)}function S(e,t){if(e===!1||e==null)throw Error(t)}function C(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function w(){return Math.random().toString(36).substring(2,10)}function T(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function E(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?O(t):t,state:n,key:t&&t.key||r||w(),mask:i}}function D({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function O(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function k(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=b(e)?e:E(h.location,e,t);n&&n(r,e),l=u()+1;let d=T(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=b(e)?e:E(h.location,e,t);n&&n(r,e),l=u();let i=T(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return A(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(y,d),c=e,()=>{i.removeEventListener(y,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function A(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),S(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:D(t);return i=i.replace(/ $/,`%20`),!n&&_.test(i)&&(i=r+i),new URL(i,r)}function j(e){return{defaultValue:e}}var M,ee=class{constructor(e){if(m(this,M,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(p(this,M).has(e))return p(this,M).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){p(this,M).set(e,t)}};M=new WeakMap;var N=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function P(e){return N.has(e)}var F=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function te(e){return F.has(e)}function ne(e){return e.index===!0}function re(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(S(e.index!==!0||!e.children,`Cannot specify children on an index route`),S(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ne(e)){let n={...e,id:s};return r[s]=ie(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=ie(n,t(n)),e.children&&(n.children=re(e.children,t,o,r,i)),n}})}function ie(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ae(e,t,n=`/`){return I(e,t,n,!1)}function I(e,t,n,r,i){let a=U((typeof t==`string`?O(t):t).pathname||`/`,n);if(a==null)return null;let o=i??L(e),s=null,c=ve(a);for(let e=0;s==null&&e<o.length;++e)s=he(o[e],c,r);return s}function oe(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function L(e){let t=se(e);return le(t),t}function se(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;S(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=W([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(S(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),se(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:pe(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=_e(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ce(e.path))a(e,t,!0,n)}),t}function ce(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ce(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function le(e){e.sort((e,t)=>e.score===t.score?me(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var R=/^:[\w-]+$/,ue=3,z=2,B=1,V=10,de=-2,fe=e=>e===`*`;function pe(e,t){let n=e.split(`/`),r=n.length;return n.some(fe)&&(r+=de),t&&(r+=z),n.filter(e=>!fe(e)).reduce((e,t)=>e+(R.test(t)?ue:t===``?B:V),r)}function me(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function he(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ge(u,l,s.matcher,s.compiledParams):H(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:W([a,d.pathname]),pathnameBase:ke(W([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=W([a,d.pathnameBase]))}return o}function H(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=_e(e.path,e.caseSensitive,e.end);return ge(e,t,n,r)}function ge(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function _e(e,t=!1,n=!0){C(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ve(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return C(!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 U(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ye({basename:e,pathname:t}){return t===`/`?e:W([e,t])}var be=e=>g.test(e);function xe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?O(e):e,a;return n?(n=De(n),a=n.startsWith(`/`)?Se(n.substring(1),`/`):Se(n,t)):a=t,{pathname:a,search:Ae(r),hash:G(i)}}function Se(e,t){let n=Oe(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ce(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function we(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Te(e){let t=we(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ee(e,t,n,r=!1){let i;typeof e==`string`?i=O(e):(i={...e},S(!i.pathname||!i.pathname.includes(`?`),Ce(`?`,`pathname`,`search`,i)),S(!i.pathname||!i.pathname.includes(`#`),Ce(`#`,`pathname`,`hash`,i)),S(!i.search||!i.search.includes(`#`),Ce(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=xe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var De=e=>e.replace(/[\\/]{2,}/g,`/`),W=e=>De(e.join(`/`)),Oe=e=>e.replace(/\/+$/,``),ke=e=>Oe(e).replace(/^\/*/,`/`),Ae=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,G=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,K=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],je=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Me(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ne(e){return W(e.map(e=>e.route.path).filter(Boolean))||`/`}var Pe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Fe(e,t){let n=e;if(typeof n!=`string`||!g.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Pe)try{let e=new URL(window.location.href),r=_.test(n)?new URL(v(n,e.protocol)):new URL(n),a=U(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{C(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var q=Symbol(`Uninstrumented`);function Ie(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Re(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Re(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[q]??i,a=Re(n[e],t,(...e)=>Be(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[q]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[q]??e,r=Re(n.middleware,t,(...e)=>Be(e[0]));return r?(r[q]=t,r):e})),r}function Le(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[q]??e.navigate,r=Re(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?D(n):`.`,...Ve(e,r??{})}});r&&(r[q]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[q]??e.fetch,r=Re(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Ve(e,i??{})}});r&&(r[q]=t,e.fetch=r)}return e}function Re(e,t,n){return e.length===0?null:async(...r)=>{let i=await ze(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function ze(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=ze(e,t,n,r-1),a=await o,S(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function Be(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:He(t),params:{...r},pattern:i,context:Ue(n)}}function Ve(e,t){return{currentUrl:D(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function He(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ue(e){if(Ge(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var We=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ge(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===We}var Ke=[`POST`,`PUT`,`PATCH`,`DELETE`],qe=new Set(Ke),Je=[`GET`,...Ke],Ye=new Set(Je),Xe=new Set([301,302,303,307,308]),Ze=new Set([307,308]),Qe={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$e={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},et={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},tt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),nt=`remix-router-transitions`,rt=Symbol(`ResetLoaderData`),it,at,ot,st,ct=class{constructor(e){m(this,it),m(this,at),m(this,ot),m(this,st),h(this,it,e),h(this,at,L(e))}get stableRoutes(){return p(this,it)}get activeRoutes(){return p(this,ot)??p(this,it)}get branches(){return p(this,st)??p(this,at)}get hasHMRRoutes(){return p(this,ot)!=null}setRoutes(e){h(this,it,e),h(this,at,L(e))}setHmrRoutes(e){h(this,ot,e),h(this,st,L(e))}commitHmrRoutes(){p(this,ot)&&(h(this,it,p(this,ot)),h(this,at,p(this,st)),h(this,ot,void 0),h(this,st,void 0))}};it=new WeakMap,at=new WeakMap,ot=new WeakMap,st=new WeakMap;function lt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;S(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||tt,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...Ie(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new ct(re(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Et,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=I(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,w;if(v==null&&!e.patchRoutesOnNavigation){let t=J(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Xt(s.activeRoutes);x=!0,w=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&Xe(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,w=!x,v=[];let t=Xe(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,w=!x;else if(!v.some(e=>mt(e.route)))x=!0,w=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}w=!1,x=!0,r.forEach(e=>{let r=ht(e.route,t,n);w||=r.renderFallback,x&&=!r.shouldLoad})}let T,D={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:w,navigation:Qe,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},k=`POP`,j=null,M=!1,N,P=!1,F=new Map,te=null,ne=!1,ie=!1,ae=new Set,L=new Map,se=0,ce=-1,le=new Map,R=new Set,ue=new Map,z=new Map,B=new Set,V=new Map,de,fe=null;function pe(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(de){de(),de=void 0;return}C(V.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=We({currentLocation:D.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{de=e});e.history.go(r*-1),Ue(i,{state:`blocked`,location:n,proceed(){Ue(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(D.blockers);e.set(i,et),H({blockers:e})}}),j?.resolve(),j=null;return}return ye(t,n)}),n){vn(t,F);let e=()=>yn(t,F);t.addEventListener(`pagehide`,e),te=()=>t.removeEventListener(`pagehide`,e)}return D.initialized||ye(`POP`,D.location,{initialHydration:!0}),T}function me(){d&&d(),te&&te(),f.clear(),N&&N.abort(),D.fetchers.forEach((e,t)=>Pe(D.fetchers,t)),D.blockers.forEach((e,t)=>He(t))}function he(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(D,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function H(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),D={...D,...e};let n=[],r=[];D.fetchers.forEach((e,t)=>{e.state===`idle`&&(B.has(t)?n.push(t):r.push(t))}),B.forEach(e=>{!D.fetchers.has(e)&&!L.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(D,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Pe(D.fetchers,e)),r.forEach(e=>D.fetchers.delete(e))}function ge(t,n,{flushSync:r}={}){let i=D.actionData!=null&&D.navigation.formMethod!=null&&X(D.navigation.formMethod)&&D.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?D.actionData:null;let o=n.loaderData?qt(D.loaderData,n.loaderData,n.matches||[],n.errors):D.loaderData,c=D.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,et)));let l=!ne&&Ye(t,n.matches||D.matches),u=M===!0||D.navigation.formMethod!=null&&X(D.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ne||k===`POP`||(k===`PUSH`?e.history.push(t,t.state):k===`REPLACE`&&e.history.replace(t,t.state));let d;if(k===`POP`){let e=F.get(D.location.pathname);e&&e.has(t.pathname)?d={currentLocation:D.location,nextLocation:t}:F.has(t.pathname)&&(d={currentLocation:t,nextLocation:D.location})}else if(P){let e=F.get(D.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),F.set(D.location.pathname,e)),d={currentLocation:D.location,nextLocation:t}}H({...n,actionData:a,loaderData:o,historyAction:k,location:t,initialized:!0,renderFallback:!1,navigation:Qe,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),k=`POP`,M=!1,P=!1,ne=!1,ie=!1,j?.resolve(),j=null,fe?.resolve(),fe=null}async function _e(t,n){if(j?.resolve(),j=null,typeof t==`number`){j||=bn();let n=j.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=ft(!1,dt(D.location,D.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?O(n.mask):{...D.location.mask,...n.mask}});let s=D.location,l=E(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&X(i.formMethod)&&i.formAction===D.location.pathname+D.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=We({currentLocation:s,nextLocation:l,historyAction:d});if(m){Ue(m,{state:`blocked`,location:l,proceed(){Ue(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),_e(t,n)},reset(){let e=new Map(D.blockers);e.set(m,et),H({blockers:e})}});return}await ye(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function ve(){fe||=bn(),Ae(),H({revalidation:`loading`});let e=fe.promise;return D.navigation.state===`submitting`?e:D.navigation.state===`idle`?(ye(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),e):(ye(k||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:P===!0}),e)}async function ye(t,n,r){N&&N.abort(),N=null,k=t,ne=(r&&r.startUninterruptedRevalidation)===!0,Je(D.location,D.matches),M=(r&&r.preventScrollReset)===!0,P=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&D.matches&&D.matches.length>0&&!y?D.matches:I(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&D.initialized&&!ie&&$t(D.location,n)&&!(r&&r.submission&&X(r.submission.formMethod))){ge(n,{matches:a},{flushSync:o});return}let l=Xe(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=Ge(n.pathname);ge(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;N=new AbortController;let d=Vt(e.history,n,N.signal,r&&r.submission),f=e.getContext?await e.getContext():new ee,p;if(r&&r.pendingError)p=[Yt(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&X(r.submission.formMethod)){let i=await xe(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(Y(t)&&Me(t.error)&&t.error.status===404){N=null,ge(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=mn(n,a,t,r.submission),o=!1,l.active=!1,d=Vt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Se(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(N=null,ge(n,{matches:h||a,...Jt(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function xe(t,n,i,l,u,d,f,p,m={}){if(Ae(),H({navigation:hn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await nt(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Xt(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Yt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ge(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=fn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:J(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Oe(t,n,Mt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(an(h)){let n;return n=m&&m.replace!=null?m.replace:Bt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===D.location.pathname+D.location.search,await W(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Y(h)){let e=Yt(l,g.route.id);return(m&&m.replace)!==!0&&(k=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Se(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||mn(n,i,l,p),x=p||m||pn(b),S=!ne&&!g;if(d){if(S){let e=Ce(v);H({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await nt(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Xt(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Yt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ge(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=pt(t,u,a,o,e.history,D,i,x,n,g?[]:r,g===!0,ie,ae,B,ue,R,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ce=++se,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(D.fetchers),t=ze(e);return ge(n,{matches:i,loaderData:{},errors:v&&Y(v[1])?{[v[0]]:v[1].error}:null,...Jt(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ce(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=we(T)),H(e,{flushSync:_})}T.forEach(e=>{q(e.key),e.controller&&L.set(e.key,e.controller)});let E=()=>T.forEach(e=>q(e.key));N&&N.signal.addEventListener(`abort`,E);let{loaderResults:O,fetcherResults:k}=await ke(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener(`abort`,E),T.forEach(e=>L.delete(e.key));let A=Zt(O);if(A)return await W(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=Zt(k),A)return R.add(A.key),await W(t,A.result,!0,{replace:h}),{shortCircuited:!0};let j=new Map(D.fetchers),{loaderData:M,errors:ee}=Kt(D,i,O,v,T,k,j);g&&D.errors&&(ee={...D.errors,...ee});let P=ze(j),F=Be(ce,j),te=P||F||T.length>0;return{matches:i,loaderData:M,errors:ee,...te?{workingFetchers:j}:{}}}function Ce(e){if(e&&!Y(e[1]))return{[e[0]]:e[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function we(e){let t=new Map(D.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=gn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Te(t,n,r,i){q(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=dt(D.location,D.matches,c,r,n,i?.relative),u=I(o,l,c,!1,s.branches),d=Xe(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){K(t,n,J(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=ft(!0,l,i);if(m){K(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new ee,g=(i&&i.preventScrollReset)===!0;if(p&&X(p.formMethod)){await Ee(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}ue.set(t,{routeId:n,path:f}),await De(t,n,f,u,h,d.active,a,g,p)}async function Ee(t,n,i,l,u,d,f,p,m,h){Ae(),ue.delete(t),G(t,_n(m,D.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Vt(e.history,i,g.signal,m);if(d){let e=await nt(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{K(t,n,J(404,{pathname:i}),{flushSync:f});return}}let v=fn(l,i);if(!v.route.action&&!v.route.lazy){K(t,n,J(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}L.set(t,g);let y=se,b=Mt(a,o,_,i,l,v,r,u),x=await Oe(_,i,b,u,t),C=x[v.route.id];if(!C){for(let e of b)if(x[e.route.id]){C=x[e.route.id];break}}if(_.signal.aborted){L.get(t)===g&&L.delete(t);return}if(B.has(t)){if(an(C)||Y(C)){G(t,Z(void 0));return}}else{if(an(C)){if(L.delete(t),ce>y){G(t,Z(void 0));return}return R.add(t),G(t,gn(m)),W(_,C,!1,{fetcherSubmission:m,preventScrollReset:p})}if(Y(C)){K(t,n,C.error);return}}let w=D.navigation.location||D.location,T=Vt(e.history,w,g.signal),E=s.activeRoutes,O=D.navigation.state===`idle`?D.matches:I(E,D.navigation.location,c,!1,s.branches);S(O,`Didn't find any matches after fetcher action`);let A=++se;le.set(t,A);let{dsMatches:j,revalidatingFetchers:M}=pt(T,u,a,o,e.history,D,O,m,w,r,!1,ie,ae,B,ue,R,E,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,C],h),ee=gn(m,C.data),P=new Map(D.fetchers);P.set(t,ee),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=gn(void 0,n?n.data:void 0);P.set(t,r),q(t),e.controller&&L.set(t,e.controller)}),H({fetchers:P});let F=()=>M.forEach(e=>q(e.key));g.signal.addEventListener(`abort`,F);let{loaderResults:te,fetcherResults:ne}=await ke(j,M,T,w,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,F),le.delete(t),L.delete(t),M.forEach(e=>L.delete(e.key));let re=D.fetchers.has(t),oe=e=>{if(!re)return e;let n=new Map(e.fetchers);return n.set(t,Z(C.data)),{...e,fetchers:n}},z=Zt(te);if(z)return D=oe(D),W(T,z.result,!1,{preventScrollReset:p});if(z=Zt(ne),z)return R.add(z.key),D=oe(D),W(T,z.result,!1,{preventScrollReset:p});let V=new Map(D.fetchers);re&&V.set(t,Z(C.data));let{loaderData:de,errors:fe}=Kt(D,O,te,void 0,M,ne,V);Be(A,V),D.navigation.state===`loading`&&A>ce?(S(k,`Expected pending action`),N&&N.abort(),ge(D.navigation.location,{matches:O,loaderData:de,errors:fe,fetchers:V})):(H({errors:fe,loaderData:qt(D.loaderData,de,O,fe),fetchers:V}),ie=!1)}async function De(t,n,i,s,c,l,u,d,f){let p=D.fetchers.get(t);G(t,gn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Vt(e.history,i,m.signal);if(l){let e=await nt(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{K(t,n,J(404,{pathname:i}),{flushSync:u});return}}let g=fn(s,i);L.set(t,m);let _=se,v=await Oe(h,i,Mt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(L.get(t)===m&&L.delete(t),!h.signal.aborted){if(B.has(t)){G(t,Z(void 0));return}if(an(y)){if(ce>_){G(t,Z(void 0));return}R.add(t),await W(h,y,!1,{preventScrollReset:d});return}if(Y(y)){K(t,n,y.error);return}G(t,Z(y.data))}}async function W(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(j?.resolve(),j=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ie=!0);let d=i.response.headers.get(`Location`);S(d,`Expected a Location header on the redirect Response`),d=Bt(d,new URL(r.url),c,e.history);let f=E(D.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(be(d)){let n=A(t,d,!0);e=n.origin!==t.location.origin||U(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}N=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=D.navigation;!o&&!s&&m&&h&&g&&(o=pn(D.navigation));let _=o||s;Ze.has(i.response.status)&&_&&X(_.formMethod)?await ye(p,f,{submission:{..._,formAction:d},preventScrollReset:l||M,enableViewTransition:a?P:void 0}):await ye(p,f,{overrideNavigation:mn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||M,enableViewTransition:a?P:void 0})}async function Oe(e,t,n,r,i){let a,o={};try{a=await Nt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!X(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!D.loaderData.hasOwnProperty(e.route.id)&&(!D.errors||!D.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(rn(r)){let i=r.result;o[t]={type:`redirect`,response:Lt(i,e,t,n,c)}}else o[t]=await It(r);return o}async function ke(e,t,n,r,i){let a=Oe(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Oe(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:J(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Ae(){ie=!0,ue.forEach((e,t)=>{L.has(t)&&ae.add(t),q(t)})}function G(e,t,n={}){let r=new Map(D.fetchers);r.set(e,t),H({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function K(e,t,n,r={}){let i=Yt(D.matches,t),a=new Map(D.fetchers);Pe(a,e),H({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function je(e){return z.set(e,(z.get(e)||0)+1),B.has(e)&&B.delete(e),D.fetchers.get(e)||$e}function Ne(e,t){q(e,t?.reason),G(e,Z(null))}function Pe(e,t){let n=D.fetchers.get(t);L.has(t)&&!(n&&n.state===`loading`&&le.has(t))&&q(t),ue.delete(t),le.delete(t),R.delete(t),B.delete(t),ae.delete(t),e.delete(t)}function Fe(e){let t=(z.get(e)||0)-1;t<=0?(z.delete(e),B.add(e)):z.set(e,t),H({fetchers:new Map(D.fetchers)})}function q(e,t){let n=L.get(e);n&&(n.abort(t),L.delete(e))}function Re(e,t){for(let n of e){let e=t.get(n);S(e,`Expected fetcher: ${n}`);let r=Z(e.data);t.set(n,r)}}function ze(e){let t=[],n=!1;for(let r of R){let i=e.get(r);S(i,`Expected fetcher: ${r}`),i.state===`loading`&&(R.delete(r),t.push(r),n=!0)}return Re(t,e),n}function Be(e,t){let n=[];for(let[r,i]of le)if(i<e){let e=t.get(r);S(e,`Expected fetcher: ${r}`),e.state===`loading`&&(q(r),le.delete(r),n.push(r))}return Re(n,t),n.length>0}function Ve(e,t){let n=D.blockers.get(e)||et;return V.get(e)!==t&&V.set(e,t),n}function He(e){D.blockers.delete(e),V.delete(e)}function Ue(e,t){let n=D.blockers.get(e)||et;S(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(D.blockers);r.set(e,t),H({blockers:r})}function We({currentLocation:e,nextLocation:t,historyAction:n}){if(V.size===0)return;V.size>1&&C(!1,`A router only supports one blocker at a time`);let r=Array.from(V.entries()),[i,a]=r[r.length-1],o=D.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ge(e){let t=J(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Xt(n);return{notFoundMatches:r,route:i,error:t}}function Ke(e,t,n){if(m=e,g=t,h=n||null,!_&&D.navigation===Qe){_=!0;let e=Ye(D.location,D.matches);e!=null&&H({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function qe(e,t){return h&&h(e,t.map(e=>oe(e,D.loaderData)))||e.key}function Je(e,t){if(m&&g){let n=qe(e,t);m[n]=g()}}function Ye(e,t){if(m){let n=qe(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Xe(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:I(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:I(n,r,c,!0,e)}}return{active:!1,matches:null}}async function nt(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||yt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=I(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=I(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&rt(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=I(s.activeRoutes,n,c,!0,u),!f||rt(l,f))return{type:`success`,matches:null};l=f}}function rt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function it(e){o={},s.setHmrRoutes(re(e,a,void 0,o))}function at(e,t,n=!1){yt(e,t,s,o,a,n),s.hasHMRRoutes||H({})}return T={get basename(){return c},get future(){return u},get state(){return D},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:pe,subscribe:he,enableScrollRestoration:Ke,navigate:_e,fetch:Te,revalidate:ve,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:je,resetFetcher:Ne,deleteFetcher:Fe,dispose:me,getBlocker:Ve,deleteBlocker:He,patchRoutes:at,_internalFetchControllers:L,_internalSetRoutes:it,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){H(e)}},e.instrumentations&&(T=Le(T,e.instrumentations.map(e=>e.router).filter(Boolean))),T}function ut(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function dt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ee(r||`.`,Te(o),U(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=dn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=ye({basename:n,pathname:c.pathname})),D(c)}function ft(e,t,n){if(!n||!ut(n))return{path:t};if(n.formMethod&&!un(n.formMethod))return{path:t,error:J(405,{method:n.formMethod})};let r=()=>({path:t,error:J(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Qt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!X(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
2
- `,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!X(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}S(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Ut(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Ut(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Wt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Wt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(X(c.formMethod))return{path:t,submission:c};let l=O(t);return e&&l.search&&dn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:D(l),submission:c}}function pt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Y(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Y(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=Ne(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!mt(s))f=!1;else if(u){let{shouldLoad:e}=ht(s,a.loaderData,a.errors);f=e}else gt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return jt(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?_t(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=vt(i,m);return jt(n,r,e,c,k,i,l,t,h,m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=I(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=fn(b,e.path),C=new AbortController,w=Vt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Mt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Mt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};vt(S,a)&&(T=Mt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function mt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function ht(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!mt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function gt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function _t(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function vt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function yt(e,t,n,r,i,a){let o;if(e){let t=r[e];S(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>bt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=re(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=re([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function bt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>bt(e,t)))??!1}var xt=new WeakMap,St=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(S(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=xt.get(i);o||(o={},xt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=P(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)C(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)C(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Ct=new WeakMap;function wt(e,t,n,r,i){let a=n[e.id];if(S(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Ct.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{S(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=te(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?C(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?C(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Ct.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=St({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Tt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Et(e){return e.matches.some(e=>e.route.middleware)?Dt(e,()=>Tt(e)):Tt(e)}function Dt(e,t){return Ot(e,t,e=>{if(ln(e))throw e;return e},tn,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=Yt(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Ot(e,t,n,r,i){let{matches:a,...o}=e;return await kt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function kt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await kt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function At(e,t,n,r,i){let a=St({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=wt(r.route,X(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function jt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=At(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?vt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?vt(a,{...l,defaultShouldRevalidate:e}):vt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!X(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(X(n.method)||!p)?Pt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Mt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?jt(e,t,n,r,Ne(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:At(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Nt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Ht(t,n),pattern:Ne(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Dt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Pt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=X(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Ht(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw J(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw J(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Ft(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function It(e){let{result:t,type:n}=e;if(sn(t)){let e;try{e=await Ft(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new je(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?on(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:en(t),statusCode:Me(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Me(t)?t.status:void 0}:on(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Lt(e,t,n,r,i){let a=e.headers.get(`Location`);if(S(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!be(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=dt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Rt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function zt(e){try{return Rt.includes(new URL(e).protocol)}catch{return!1}}function Bt(e,t,n,r){if(be(e)){let r=e,i=_.test(r)?new URL(v(r,t.protocol)):new URL(r);if(zt(i.toString()))throw Error(`Invalid redirect location`);let a=U(i.pathname,n)!=null;if(i.origin===t.origin&&a)return De(i.pathname)+i.search+i.hash}try{if(zt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Vt(e,t,n,r){let i=e.createURL(Qt(t)).toString(),a={signal:n};if(r&&X(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Ut(r.formData):r.formData}return new Request(i,a)}function Ht(e,t){let n=new URL(e.url),r=typeof t==`string`?O(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function Ut(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Wt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Gt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Y(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(S(!an(f),`Cannot handle redirect results in processLoaderData`),Y(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Yt(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=rt),c||(c=!0,s=Me(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Kt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Gt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(S(s,`Did not find corresponding fetcher result`),Y(s)){let t=Yt(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(an(s))S(!1,`Unhandled fetcher revalidation redirect`);else{let e=Z(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function qt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==rt).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Jt(e){return e?Y(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Yt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function Xt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function J(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new je(e||500,o,Error(s),!0)}function Zt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(an(r))return{key:n,result:r}}}function Qt(e){return D({...typeof e==`string`?O(e):e,hash:``})}function $t(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function en(e){return new je(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function tn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&nn(t))}function nn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function rn(e){return sn(e.result)&&Xe.has(e.result.status)}function Y(e){return e.type===`error`}function an(e){return(e&&e.type)===`redirect`}function on(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function sn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function cn(e){return Xe.has(e)}function ln(e){return sn(e)&&cn(e.status)&&e.headers.has(`Location`)}function un(e){return Ye.has(e.toUpperCase())}function X(e){return qe.has(e.toUpperCase())}function dn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function fn(e,t){let n=typeof t==`string`?O(t).search:t.search;if(e[e.length-1].route.index&&dn(n||``))return e[e.length-1];let r=we(e);return r[r.length-1]}function pn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function mn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function hn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function gn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function _n(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Z(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function vn(e,t){try{let n=e.sessionStorage.getItem(nt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function yn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(nt,JSON.stringify(n))}catch(e){C(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function bn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var xn=o.createContext(null);xn.displayName=`DataRouter`;var Sn=o.createContext(null);Sn.displayName=`DataRouterState`;var Cn=o.createContext(!1);function wn(){return o.useContext(Cn)}var Tn=o.createContext({isTransitioning:!1});Tn.displayName=`ViewTransition`;var En=o.createContext(new Map);En.displayName=`Fetchers`;var Dn=o.createContext(null);Dn.displayName=`Await`;var Q=o.createContext(null);Q.displayName=`Navigation`;var On=o.createContext(null);On.displayName=`Location`;var kn=o.createContext({outlet:null,matches:[],isDataRoute:!1});kn.displayName=`Route`;var An=o.createContext(null);An.displayName=`RouteError`;var jn=`REACT_ROUTER_ERROR`,Mn=`REDIRECT`,Nn=`ROUTE_ERROR_RESPONSE`;function Pn(e){if(e.startsWith(`${jn}:${Mn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Fn(e){if(e.startsWith(`${jn}:${Nn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new je(t.status,t.statusText,t.data)}catch{}}function In(e,{relative:t}={}){S(Ln(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(Q),{hash:i,pathname:a,search:s}=Hn(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:W([n,a])),r.createHref({pathname:c,search:s,hash:i})}function Ln(){return o.useContext(On)!=null}function $(){return S(Ln(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(On).location}var Rn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function zn(e){o.useContext(Q).static||o.useLayoutEffect(e)}function Bn(){let{isDataRoute:e}=o.useContext(kn);return e?ar():Vn()}function Vn(){S(Ln(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext(xn),{basename:t,navigator:n}=o.useContext(Q),{matches:r}=o.useContext(kn),{pathname:i}=$(),a=JSON.stringify(Te(r)),s=o.useRef(!1);return zn(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(C(s.current,Rn),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=Ee(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:W([t,c.pathname])),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}o.createContext(null);function Hn(e,{relative:t}={}){let{matches:n}=o.useContext(kn),{pathname:r}=$(),i=JSON.stringify(Te(n));return o.useMemo(()=>Ee(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Un(e,t,n){S(Ln(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=o.useContext(Q),{matches:i}=o.useContext(kn),a=i[i.length-1],s=a?a.params:{},c=a?a.pathname:`/`,l=a?a.pathnameBase:`/`,u=a&&a.route;{let e=u&&u.path||``;sr(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (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.
3
-
4
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=$(),f;if(t){let e=typeof t==`string`?O(t):t;S(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ae(e,{pathname:m});C(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),C(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.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=Xn(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:W([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:W([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?o.createElement(On.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Wn(){let e=ir(),t=Me(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=o.createElement(o.Fragment,null,o.createElement(`p`,null,`💿 Hey developer 👋`),o.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,o.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,o.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),o.createElement(o.Fragment,null,o.createElement(`h2`,null,`Unexpected Application Error!`),o.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?o.createElement(`pre`,{style:i},n):null,s)}var Gn=o.createElement(Wn,null),Kn=class extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Fn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:o.createElement(kn.Provider,{value:this.props.routeContext},o.createElement(An.Provider,{value:e,children:this.props.component}));return this.context?o.createElement(Jn,{error:e},t):t}};Kn.contextType=Cn;var qn=new WeakMap;function Jn({children:e,error:t}){let{basename:n}=o.useContext(Q);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Pn(t.digest);if(e){let r=qn.get(t);if(r)throw r;let i=Fe(e.location,n),a=i.absoluteURL||i.to;if(zt(a))throw Error(`Invalid redirect location`);if(Pe&&!qn.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw qn.set(t,n),n}}return o.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Yn({routeContext:e,match:t,children:n}){let r=o.useContext(xn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(kn.Provider,{value:e},n)}function Xn(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);S(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:a}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),i=c>=0?i.slice(0,c+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ne(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Gn,s&&(c<0&&l===0?(sr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?o.createElement(n.route.Component,null):n.route.element?n.route.element:e,o.createElement(Yn,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?o.createElement(Kn,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Zn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qn(e){let t=o.useContext(xn);return S(t,Zn(e)),t}function $n(e){let t=o.useContext(Sn);return S(t,Zn(e)),t}function er(e){let t=o.useContext(kn);return S(t,Zn(e)),t}function tr(e){let t=er(e),n=t.matches[t.matches.length-1];return S(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function nr(){return tr(`useRouteId`)}function rr(){let{matches:e,loaderData:t}=$n(`useMatches`);return o.useMemo(()=>e.map(e=>oe(e,t)),[e,t])}function ir(){let e=o.useContext(An),t=$n(`useRouteError`),n=tr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ar(){let{router:e}=Qn(`useNavigate`),t=tr(`useNavigate`),n=o.useRef(!1);return zn(()=>{n.current=!0}),o.useCallback(async(r,i={})=>{C(n.current,Rn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var or={};function sr(e,t,n){!t&&!or[e]&&(or[e]=!0,C(!1,n))}var cr={};function lr(e,t){!e&&!cr[t]&&(cr[t]=!0,console.warn(t))}var ur=o.useOptimistic,dr=()=>void 0;function fr(e){return ur?ur(e):[e,dr]}function pr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&C(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:o.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&C(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:o.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&C(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var mr=[`HydrateFallback`,`hydrateFallbackElement`],hr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function gr({router:e,flushSync:t,onError:n,useTransitions:r}){r=wn()||r;let[i,a]=o.useState(e.state),[s,c]=fr(i),[l,u]=o.useState(),[d,f]=o.useState({isTransitioning:!1}),[p,m]=o.useState(),[h,g]=o.useState(),[_,v]=o.useState(),y=o.useRef(new Map),b=o.useCallback((i,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&n&&Object.values(l).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Ne(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),lr(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(lr(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b){t&&d?t(()=>a(i)):r===!1?a(i):o.startTransition(()=>{r===!0&&c(e=>_r(e,i)),a(i)});return}if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n));return}h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,c,n]);o.useLayoutEffect(()=>e.subscribe(b),[e,b]),o.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new hr)},[d]),o.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):o.startTransition(()=>{r===!0&&c(e=>_r(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(i)}},[l,p,e.window,r,c]),o.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),o.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=o.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=o.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return o.createElement(o.Fragment,null,o.createElement(xn.Provider,{value:C},o.createElement(Sn.Provider,{value:s},o.createElement(En.Provider,{value:y.current},o.createElement(Tn.Provider,{value:d},o.createElement(br,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:r},o.createElement(vr,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function _r(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var vr=o.memo(yr);function yr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Un(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function br({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:s}){S(!Ln(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=o.useMemo(()=>({basename:c,navigator:i,static:a,useTransitions:s,future:{}}),[c,i,a,s]);typeof n==`string`&&(n=O(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=o.useMemo(()=>{let e=U(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return C(g!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:o.createElement(Q.Provider,{value:l},o.createElement(On.Provider,{children:t,value:g}))}o.Component;var xr=`get`,Sr=`application/x-www-form-urlencoded`;function Cr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function wr(e){return Cr(e)&&e.tagName.toLowerCase()===`button`}function Tr(e){return Cr(e)&&e.tagName.toLowerCase()===`form`}function Er(e){return Cr(e)&&e.tagName.toLowerCase()===`input`}function Dr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Or(e,t){return e.button===0&&(!t||t===`_self`)&&!Dr(e)}function kr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Ar(e,t){let n=kr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var jr=null;function Mr(){if(jr===null)try{new FormData(document.createElement(`form`),0),jr=!1}catch{jr=!0}return jr}var Nr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Pr(e){return e!=null&&!Nr.has(e)?(C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Sr}"`),null):e}function Fr(e,t){let n,r,i,a,o;if(Tr(e)){let o=e.getAttribute(`action`);r=o?U(o,t):null,n=e.getAttribute(`method`)||xr,i=Pr(e.getAttribute(`enctype`))||Sr,a=new FormData(e)}else if(wr(e)||Er(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?U(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||xr,i=Pr(e.getAttribute(`formenctype`))||Pr(o.getAttribute(`enctype`))||Sr,a=new FormData(o,e),!Mr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Cr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=xr,r=null,i=Sr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ir(e,t){if(e===!1||e==null)throw Error(t)}function Lr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&U(i.pathname,t)===`/`?`${Oe(t)}/_root.${r}`:`${Oe(i.pathname)}.${r}`,i}async function Rr(e,t){if(e.id in t)return t[e.id];try{let n=await u(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function zr(e){return e!=null&&typeof e.page==`string`}function Br(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Vr(e,t,n){return Kr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Rr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Br).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Hr(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ur(e,t,{includeHydrateFallback:n}={}){return Wr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Wr(e){return[...new Set(e)]}function Gr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Kr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!zr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Gr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function qr(){let e=o.useContext(xn);return Ir(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Jr(){let e=o.useContext(Sn);return Ir(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Yr=o.createContext(void 0);Yr.displayName=`FrameworkContext`;function Xr(){let e=o.useContext(Yr);return Ir(e,`You must render this element inside a <HydratedRouter> element`),e}function Zr(e,t){let n=o.useContext(Yr),[r,i]=o.useState(!1),[a,s]=o.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=o.useRef(null);o.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),o.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),s(!1)};return n?e===`intent`?[a,p,{onFocus:Qr(c,m),onBlur:Qr(l,h),onMouseEnter:Qr(u,m),onMouseLeave:Qr(d,h),onTouchStart:Qr(f,m)}]:[a,p,{}]:[!1,p,{}]}function Qr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $r({page:e,...t}){let n=wn(),{nonce:r}=Xr(),{router:i}=qr(),a=o.useMemo(()=>ae(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?o.createElement(ti,{page:e,matches:a,...t}):o.createElement(ni,{page:e,matches:a,...t})):null}function ei(e){let{manifest:t,routeModules:n}=Xr(),[r,i]=o.useState([]);return o.useEffect(()=>{let r=!1;return Vr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ti({page:e,matches:t,...n}){let r=$(),{future:i}=Xr(),{basename:a}=qr(),s=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Lr(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return o.createElement(o.Fragment,null,s.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ni({page:e,matches:t,...n}){let r=$(),{future:i,manifest:a,routeModules:s}=Xr(),{basename:c}=qr(),{loaderData:l,matches:u}=Jr(),d=o.useMemo(()=>Hr(e,t,u,a,r,`data`),[e,t,u,a,r]),f=o.useMemo(()=>Hr(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let u=Lr(e,c,i.v8_trailingSlashAwareDataRequests,`data`);return o&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.v8_trailingSlashAwareDataRequests,l,r,a,d,t,e,s]),m=o.useMemo(()=>Ur(f,a),[f,a]),h=ei(f);return o.createElement(o.Fragment,null,p.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>o.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>o.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ri(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}o.Component;var ii=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ii&&(window.__reactRouterVersion=`7.18.2`)}catch{}function ai(e,t){return lt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:x({window:t?.window}),hydrationData:t?.hydrationData||oi(),routes:e,mapRouteProperties:pr,hydrationRouteProperties:mr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function oi(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:si(e.errors)}),e}function si(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new je(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&K.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var ci=o.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:_,navigator:v,useTransitions:y}=o.useContext(Q),b=typeof u==`string`&&g.test(u),x=Fe(u,_);u=x.to;let S=In(u,{relative:r}),C=$(),w=null;if(s){let e=Ee(s,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:W([_,e.pathname])),w=v.createHref(e)}let[T,E,D]=Zr(n,m),O=pi(u,{replace:a,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:y});function k(t){e&&e(t),t.defaultPrevented||O(t)}let A=!(x.isExternal||i),j=o.createElement(`a`,{...m,...D,href:(A?w:void 0)||x.absoluteURL||S,onClick:A?k:e,ref:ri(h,E),target:l,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?o.createElement(o.Fragment,null,j,o.createElement($r,{page:S})):j});ci.displayName=`Link`;var li=o.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:s,children:c,...l},u){let d=Hn(a,{relative:l.relative}),f=$(),p=o.useContext(Sn),{navigator:m,basename:h}=o.useContext(Q),g=p!=null&&yi(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=U(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return o.createElement(ci,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:s},typeof c==`function`?c(C):c)});li.displayName=`NavLink`;var ui=o.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=xr,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:_}=o.useContext(Q),v=_i(),y=vi(c,{relative:u}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&g.test(c);return o.createElement(`form`,{ref:h,method:b,action:y,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||s,m=()=>v(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});_&&n!==!1?o.startTransition(()=>m()):m()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});ui.displayName=`Form`;function di(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fi(e){let t=o.useContext(xn);return S(t,di(e)),t}function pi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Bn(),f=$(),p=Hn(e,{relative:s});return o.useCallback(m=>{if(Or(m,t)){m.preventDefault();let t=n===void 0?D(f)===D(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?o.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,s,c,l,u])}function mi(e){C(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=o.useRef(kr(e)),n=o.useRef(!1),r=$(),i=o.useMemo(()=>Ar(r.search,n.current?null:t.current),[r.search]),a=Bn();return[i,o.useCallback((e,t)=>{let r=kr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var hi=0,gi=()=>`__${String(++hi)}__`;function _i(){let{router:e}=fi(`useSubmit`),{basename:t}=o.useContext(Q),n=nr(),r=e.fetch,i=e.navigate;return o.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Fr(e,t);if(a.navigate===!1){let e=a.fetcherKey||gi();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function vi(e,{relative:t}={}){let{basename:n}=o.useContext(Q),r=o.useContext(kn);S(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Hn(e||`.`,{relative:t})},s=$();if(e==null){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:W([n,a.pathname])),D(a)}function yi(e,{relative:t}={}){let n=o.useContext(Tn);S(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=fi(`useViewTransitionState`),i=Hn(e,{relative:t});if(!n.isTransitioning)return!1;let a=U(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=U(n.nextLocation.pathname,r)||n.nextLocation.pathname;return H(i.pathname,s)!=null||H(i.pathname,a)!=null}function bi(e){return{kind:e.identityKind,key:e.identityKey}}function xi(e){return`/projects/${encodeURIComponent(e.kind)}/${encodeURIComponent(e.key)}`}function Si(e){return n(e.reference)}function Ci(e,t,n){let r=e.get(t);if(r){r.push(n);return}e.set(t,[n])}function wi(e,t){let n=r(e),o=new Map,s=new Map,c=new Map,l=new Map,u=[],d=new Set(t.map(e=>e.name.toLowerCase()));for(let e of d)o.set(e,[]),s.set(e,[]);for(let t of e){let e=a(t);u.push(t),d.has(e)&&s.get(e).push(t);let n=t.project_identity;if(!n?.key)continue;let r=i(n);Ci(c,r,t);let o=l.get(r);o?o.count+=1:l.set(r,{key:r,identityKind:n.kind,identityKey:n.key,label:n.displayName||t.directory,count:1})}for(let e of d)o.set(e,n.byAgent.get(e)??[]);return{byRouteKey:n.byRouteKey,childrenByParentRouteKey:n.childrenByParentRouteKey,byAgent:o,byProjectIdentityKey:n.byProjectIdentityKey,byProjectAgentKey:n.byProjectAgentKey,byLandingAgent:s,byLandingProjectIdentityKey:c,landingSessions:u,sessionsByActivity:n.sessionsByActivity,projectOptions:[...l.values()].toSorted((e,t)=>t.count-e.count).slice(0,8)}}function Ti(e){let t=new Map,n=new Map;for(let r=0;r<e.length;r+=1){let i=e[r],a=Si(i);t.has(a)||(t.set(a,i),n.set(a,r))}return{byReference:t,indexByReference:n}}export{xi as a,ai as c,$ as d,rr as f,u as g,mi as h,bi as i,j as l,ir as m,Ti as n,ci as o,Bn as p,Si as r,gr as s,wi as t,Me as u};
@@ -1 +0,0 @@
1
- import{a as e,n as t,r as n,t as r}from"./jsx-runtime-B-hcVAMW.js";var i=n((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),a=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=i()})),o=e(t(),1);function s(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var c=s(`https://base-ui.com/production-error`,`Base UI`),l=o.createContext(void 0);function u(e){let t=o.useContext(l);if(!e&&t===void 0)throw Error(c(27));return t}var d={};function f(e,t){let n=o.useRef(d);return n.current===d&&(n.current=e(t)),n}function p(e,t,n,r){let i=f(h).current;return g(i,e,t,n,r)&&v(i,[e,t,n,r]),i.callback}function m(e){let t=f(h).current;return _(t,e)&&v(t,e),t.callback}function h(){return{callback:null,cleanup:null,refs:[]}}function g(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function _(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function v(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var y=19;function b(e){return y>=e}function x(e){if(!o.isValidElement(e))return null;let t=e,n=t.props;return(b(19)?n?.ref:t.ref)??null}function S(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function C(){}var w=Object.freeze([]),T=Object.freeze({});function E(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function D(e,t){return typeof e==`function`?e(t):e}function O(e,t){return typeof e==`function`?e(t):e}var k={};function A(e,t,n,r,i){if(!n&&!r&&!i&&!e)return M(t);let a=M(e);return t&&(a=N(a,t)),n&&(a=N(a,n)),r&&(a=N(a,r)),i&&(a=N(a,i)),a}function j(e){if(e.length===0)return k;if(e.length===1)return M(e[0]);let t=M(e[0]);for(let n=1;n<e.length;n+=1)t=N(t,e[n]);return t}function M(e){return I(e)?{...te(e,k)}:P(e)}function N(e,t){return I(t)?te(t,e):ee(e,t)}function P(e){let t={...e};for(let e in t){let n=t[e];F(e,n)&&(t[e]=re(n))}return t}function ee(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=S(e.style,r);break;case`className`:e[n]=R(e.className,r);break;default:e[n]=F(n,r)?ne(e[n],r):r}}return e}function F(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function I(e){return typeof e==`function`}function te(e,t){return I(e)?e(t):e??k}function ne(e,t){return t?e?(...n)=>{let r=n[0];if(z(r)){let i=r;L(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:re(t):e}function re(e){return e&&((...t)=>{let n=t[0];return z(n)&&L(n),e(...t)})}function L(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function R(e,t){return t?e?t+` `+e:t:e}function z(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function ie(e,t,n={}){let r=t.render,i=B(t,n);return n.enabled===!1?null:oe(e,r,i,n.state??T)}function B(e,t={}){let{className:n,style:r,render:i}=e,{state:a=T,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?D(n,a):void 0,d=l?O(r,a):void 0,f=l?E(a,c):T,h=l&&s?V(s):void 0,g=l?S(f,h)??{}:T;return typeof document<`u`&&(l?g.ref=Array.isArray(o)?m([g.ref,x(i),...o]):p(g.ref,x(i),o):p(null,null)),l?(u!==void 0&&(g.className=R(g.className,u)),d!==void 0&&(g.style=S(g.style,d)),g):T}function V(e){return Array.isArray(e)?j(e):A(void 0,e)}var ae=Symbol.for(`react.lazy`);function oe(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=A(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===ae&&(i=o.Children.toArray(t)[0]),o.cloneElement(i,e)}if(e&&typeof e==`string`)return se(e,n);throw Error(c(8))}function se(e,t){return e===`button`?(0,o.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,o.createElement)(`img`,{alt:``,...t,key:t.key}):o.createElement(e,t)}var ce=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),le={"data-starting-style":``},ue={"data-ending-style":``},de={transitionStatus(e){return e===`starting`?le:e===`ending`?ue:null}};(function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=ce.startingStyle]=`startingStyle`,e[e.endingStyle=ce.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e})({});var fe={"data-popup-open":``,"data-pressed":``},pe={"data-open":``},me={"data-closed":``},he={"data-anchor-hidden":``},ge={open(e){return e?fe:null}},_e={open(e){return e?pe:me},anchorHidden(e){return e?he:null}},ve={..._e,...de},ye=o.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=u(),c=s.useState(`open`),l=s.useState(`nested`),d=s.useState(`mounted`);return ie(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:ve,props:[{role:`presentation`,hidden:!d,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})});function be(){return typeof window<`u`}function H(e){return Ce(e)?(e.nodeName||``).toLowerCase():`#document`}function xe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Se(e){return((Ce(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ce(e){return be()?e instanceof Node||e instanceof xe(e).Node:!1}function we(e){return be()?e instanceof Element||e instanceof xe(e).Element:!1}function U(e){return be()?e instanceof HTMLElement||e instanceof xe(e).HTMLElement:!1}function Te(e){return!be()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xe(e).ShadowRoot}function Ee(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function De(e){return/^(table|td|th)$/.test(H(e))}function Oe(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ke=/transform|translate|scale|rotate|perspective|filter/,Ae=/paint|layout|strict|content/,je=e=>!!e&&e!==`none`,Me;function Ne(e){let t=we(e)?Le(e):e;return je(t.transform)||je(t.translate)||je(t.scale)||je(t.rotate)||je(t.perspective)||!Fe()&&(je(t.backdropFilter)||je(t.filter))||ke.test(t.willChange||``)||Ae.test(t.contain||``)}function Pe(e){let t=ze(e);for(;U(t)&&!Ie(t);){if(Ne(t))return t;if(Oe(t))return null;t=ze(t)}return null}function Fe(){return Me??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Me}function Ie(e){return/^(html|body|#document)$/.test(H(e))}function Le(e){return xe(e).getComputedStyle(e)}function Re(e){return we(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ze(e){if(H(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Te(e)&&e.host||Se(e);return Te(t)?t.host:t}function Be(e){let t=ze(e);return Ie(t)?(e.ownerDocument||e).body:U(t)&&Ee(t)?t:Be(t)}function Ve(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Be(e),i=r===e.ownerDocument?.body,a=xe(r);if(i){let e=He(a);return t.concat(a,a.visualViewport||[],Ee(r)?r:[],e&&n?Ve(e):[])}return t.concat(r,Ve(r,[],n))}function He(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ue={...o},We=Ue.useInsertionEffect,Ge=We&&We!==Ue.useLayoutEffect?We:e=>e();function W(e){let t=f(Ke).current;return t.next=e,Ge(t.effect),t.trampoline}function Ke(){let e={next:void 0,callback:qe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function qe(){}var G=typeof document<`u`?o.useLayoutEffect:()=>{},Je=o.createContext(void 0);function Ye(e=!1){let t=o.useContext(Je);if(t===void 0&&!e)throw Error(c(16));return t}function Xe(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,s=r&&t!==!1,c=r&&t===!1;return{props:o.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||s)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||c)&&(e.disabled=n),e},[r,n,t,s,c,a,i])}}function K(e){return e?.ownerDocument||document}function Ze(e,t,{detail:n=0}={}){e.dispatchEvent(new(xe(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Qe(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,s=o.useRef(null),c=Ye(!0),l=a??c!==void 0,{props:u}=Xe({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),d=o.useCallback(()=>{let e=s.current;$e(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return G(d,[d]),{getButtonProps:o.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...c}=e;return A({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(L(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=$e(r),s=!i&&et(r),c=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&l&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),Ze(r,e));return}if(!c||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Ze(r,e)))},onKeyUp(e){if(!t){if(L(e),a?.(e),e.target===e.currentTarget&&i&&l&&$e(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!l&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),Ze(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},u,c)},[t,u,l,i]),buttonRef:W(e=>{s.current=e,d()})}}function $e(e){return U(e)&&e.tagName===`BUTTON`}function et(e){return U(e)&&e.tagName===`A`&&!!e.href}var tt=`none`,nt=`trigger-press`,rt=`trigger-hover`,it=`trigger-focus`,at=`outside-press`,ot=`item-press`,st=`close-press`,ct=`focus-out`,lt=`escape-key`,ut=`list-navigation`,dt=`cancel-open`,ft=`sibling-open`,pt=`imperative-action`;function mt(e,t,n,r){let i=!1,a=!1,o=r??T;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var ht=o.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=u(),l=c.useState(`open`),{getButtonProps:d,buttonRef:f}=Qe({disabled:a,native:o}),p={disabled:a};function m(e){l&&c.setOpen(!1,mt(st,e.nativeEvent))}return ie(`button`,e,{state:p,ref:[t,f],props:[{onClick:m},s,d]})}),gt=e(a(),1),q=r(),_t=0;function vt(e,t=`mui`){let[n,r]=o.useState(e),i=e||n;return o.useEffect(()=>{n??(_t+=1,r(`${t}-${_t}`))},[n,t]),i}var yt=Ue.useId;function bt(e,t){if(yt!==void 0){let n=yt();return e??(t?`${t}-${n}`:n)}return vt(e,t)}function xt(e){return bt(e,`base-ui`)}function St(e){o.useEffect(e,w)}var Ct=0,wt=class e{static create(){return new e}currentId=Ct;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ct,t()},e)}isStarted(){return this.currentId!==Ct}clear=()=>{this.currentId!==Ct&&(clearTimeout(this.currentId),this.currentId=Ct)};disposeEffect=()=>this.clear};function Tt(){let e=f(wt.create).current;return St(e.disposeEffect),e}function Et(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Dt,platform:Ot,maxTouchPoints:kt}=Et(),At=Dt.toLowerCase(),jt=Ot.toLowerCase(),Mt=/^i(os$|p)/.test(jt)||jt===`macintel`&&kt>1,Nt=`android`,Pt=jt===Nt||At.includes(Nt),Ft=!Mt&&jt.startsWith(`mac`);jt.startsWith(`win`),!Pt&&/^(linux|chrome os)/.test(jt);var It=Ft||Mt,Lt=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!Lt&&At.includes(`firefox`),!Lt&&At.includes(`chrom`);var Rt=It,zt=/jsdom|happydom/.test(At);function Bt(e){e.preventDefault(),e.stopPropagation()}function Vt(e){return`nativeEvent`in e}function Ht(e){return e.pointerType===``&&e.isTrusted?!0:Pt&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ut(e){return zt?!1:!Pt&&e.width===0&&e.height===0||Pt&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Wt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Gt(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Kt=`data-base-ui-focusable`,qt=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Jt=`ArrowLeft`,Yt=`ArrowRight`,Xt=`ArrowUp`,Zt=`ArrowDown`;function Qt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function J(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Te(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $t(e){return`composedPath`in e?e.composedPath()[0]:e.target}function en(e,t){if(!we(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(J(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function tn(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function nn(e){return e.matches(`html,body`)}function rn(e){return U(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function an(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${qt}`)!=null}function on(e){return e?e.getAttribute(`role`)===`combobox`&&rn(e):!1}function sn(e){if(!e||zt)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function cn(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Y(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ln(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function un(e){let t=f(dn,e).current;return t.next=e,G(t.effect),t}function dn(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var fn=null;globalThis.requestAnimationFrame;var pn=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},mn=class e{static create(){return new e}static request(e){return pn.request(e)}static cancel(e){return pn.cancel(e)}currentId=fn;request(e){this.cancel(),this.currentId=pn.request(()=>{this.currentId=fn,e()})}cancel=()=>{this.currentId!==fn&&(pn.cancel(this.currentId),this.currentId=fn)};disposeEffect=()=>this.cancel};function hn(){let e=f(mn.create).current;return St(e.disposeEffect),e}var gn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},_n={...gn,position:`fixed`,top:0,left:0};({...gn});var vn=o.forwardRef(function(e,t){let[n,r]=o.useState();G(()=>{Rt&&Lt&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,q.jsx)(`span`,{...e,ref:t,style:_n,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function yn(e,t){return t<0||t>=e.length}function bn(e,t){return Sn(e.current,{disabledIndices:t})}function xn(e,t){return Sn(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Sn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Cn(e,a,r));return a}function Cn(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Tn(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function wn(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Tn(e,t=e?Le(e):null){return!e||!e.isConnected||!t||wn(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var En=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Dn(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Te(n)?n.host:null}function On(e){for(let t of Array.from(e.children))if(H(t)===`summary`)return t;return null}function kn(e,t){let n=On(t);return!!n&&(e===n||J(n,e))}function An(e){let t=e?H(e):``;return e!=null&&e.matches(En)&&(t!==`summary`||e.parentElement!=null&&H(e.parentElement)===`details`&&On(e.parentElement)===e)&&(t!==`details`||On(e)==null)&&(t!==`input`||e.type!==`hidden`)}function jn(e){if(!An(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Dn(t)){let n=t!==e,r=H(t)===`slot`;if(t.hasAttribute(`inert`)||n&&H(t)===`details`&&!t.open&&!kn(e,t)||t.hasAttribute(`hidden`)||!r&&!Mn(t,n))return!1}return!0}function Mn(e,t){let n=Le(e);return t?n.display!==`none`:Tn(e,n)}function Nn(e){let t=e.tabIndex;if(t<0){let t=H(e);if(t===`details`||t===`audio`||t===`video`||U(e)&&e.isContentEditable)return 0}return t}function Pn(e){if(H(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Fn(e,t){let n=Pn(e);if(!n)return!0;let r=t.find(e=>{let t=Pn(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Pn(e);return t?.name===n.name&&t.form===n.form})===n}function In(e){if(U(e)&&H(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return U(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ln(e,t){In(e).forEach(e=>{An(e)&&t.push(e),Ln(e,t)})}function Rn(e,t,n){In(e).forEach(e=>{U(e)&&e.matches(t)&&n.push(e),Rn(e,t,n)})}function zn(e){return jn(e)&&Nn(e)>=0}function Bn(e){let t=[];return Ln(e,t),t.filter(jn)}function Vn(e){let t=Bn(e);return t.filter(e=>Nn(e)>=0&&Fn(e,t))}function Hn(e,t){let n=Vn(e),r=n.length;if(r===0)return;let i=Qt(K(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Un(e){return Hn(K(e).body,1)||e}function Wn(e){return Hn(K(e).body,-1)||e}function Gn(e,t){if(!e)return null;let n=Vn(K(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Kn(e){return Gn(e,1)}function qn(e){return Gn(e,-1)}function Jn(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!J(n,r)}function Yn(e){Vn(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Xn(e){let t=[];Rn(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Zn(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Zn(e,t.id,n)])}function Qn(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function $n(e){return`data-base-ui-${e}`}var er=0;function tr(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(er);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),C;let o=requestAnimationFrame(a);return er=o,()=>{er===o&&(cancelAnimationFrame(o),er=0)}}var nr={inert:new WeakMap,"aria-hidden":new WeakMap},rr=`data-base-ui-inert`,ir={inert:new WeakSet,"aria-hidden":new WeakSet},ar=new WeakMap,or=0;function sr(e){return ir[e]}function cr(e){return e?Te(e)?e.host:cr(e.parentNode):null}var lr=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=cr(t);return e.contains(n)?n:null}).filter(e=>e!=null),ur=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},dr=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{H(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function fr(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=lr(t,e),l=i?dr(t,ur(c),new Set(c)):[],u=[],d=[];if(a){let e=nr[a],n=sr(a);s=n,o=e;let r=lr(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);dr(t,ur(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(ar.get(e)||0)+1;ar.set(e,t),d.push(e),t===1&&e.setAttribute(rr,``)}),or+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(ar.get(e)||0)-1;ar.set(e,t),t||e.removeAttribute(rr)}),--or,or||(nr.inert=new WeakMap,nr[`aria-hidden`]=new WeakMap,ir.inert=new WeakSet,ir[`aria-hidden`]=new WeakSet,ar=new WeakMap)}}function pr(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=K(e[0]).body;return fr(e,a,n,r,{mark:i})}var mr={style:{transition:`none`}},hr={fallbackAxisSide:`none`},gr={fallbackAxisSide:`end`},_r={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},vr=o.createContext(null),yr=()=>o.useContext(vr),br=$n(`portal`);function xr(e={}){let{ref:t,container:n,componentProps:r=T,elementProps:i}=e,a=bt(),s=yr()?.portalNode,[c,l]=o.useState(null),[u,d]=o.useState(null),f=W(e=>{e!==null&&d(e)}),p=o.useRef(null);G(()=>{if(n===null){p.current&&(p.current=null,d(null),l(null));return}let e=(n&&(Ce(n)?n:n.current))??s??document.body;if(e==null){p.current&&(p.current=null,d(null),l(null));return}p.current!==e&&(p.current=e,d(null),l(e))},[n,s]);let m=ie(`div`,r,{ref:[t,f],props:[{id:a,[br]:``},i]}),h=c&&m?gt.createPortal(m,c):null;return{node:u,nodeId:o.isValidElement(m)?m.props.id:void 0,subtree:h}}var Sr=o.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:s,...c}=e,{node:l,nodeId:u,subtree:d}=xr({container:s,ref:t,componentProps:e,elementProps:c}),f=o.useRef(null),p=o.useRef(null),m=o.useRef(null),h=o.useRef(null),[g,_]=o.useState(null),v=o.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;o.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Jn(e)&&(e.type===`focusin`?v.current&&=(Xn(l),!1):(Yn(l),v.current=!0))}return ln(Y(l,`focusin`,e,!0),Y(l,`focusout`,e,!0))},[l,y]),G(()=>{!l||b!==!0||!v.current||(Xn(l),v.current=!1)},[b,l]);let S=o.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,q.jsxs)(o.Fragment,{children:[d,(0,q.jsxs)(vr.Provider,{value:S,children:[x&&l&&(0,q.jsx)(vn,{"data-type":`outside`,ref:f,onFocus:e=>{Jn(e,l)?m.current?.focus():Wn(g?g.domReference:null)?.focus()}}),x&&l&&(0,q.jsx)(`span`,{"aria-owns":u,style:_r}),l&&gt.createPortal(a,l),x&&l&&(0,q.jsx)(vn,{"data-type":`outside`,ref:p,onFocus:e=>{Jn(e,l)?h.current?.focus():(Un(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,mt(`focus-out`,e.nativeEvent)))}})]})]})});function Cr(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var wr=class{nodesRef={current:[]};events=Cr();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Tr=o.createContext(null),Er=o.createContext(null),Dr=()=>o.useContext(Tr)?.id||null,Or=e=>{let t=o.useContext(Er);return e??t};function kr(e){let t=bt(),n=Or(e),r=Dr();return G(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Ar(e){let{children:t,id:n}=e,r=Dr();return(0,q.jsx)(Tr.Provider,{value:o.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function jr(e){let{children:t,externalTree:n}=e,r=f(()=>n??new wr).current;return(0,q.jsx)(Er.Provider,{value:r,children:t})}function Mr(e){return e==null?e:`current`in e?e.current:e}function Nr(e,t){let n=xe($t(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Pr=20,Fr=[];function Ir(){Fr=Fr.filter(e=>e.deref()?.isConnected)}function Lr(e){Ir(),e&&H(e)!==`body`&&(Fr.push(new WeakRef(e)),Fr.length>Pr&&(Fr=Fr.slice(-20)))}function Rr(){return Ir(),Fr[Fr.length-1]?.deref()}function zr(e){return e?zn(e)?e:Vn(e)[0]||e:null}function Br(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Bn(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return zn(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Vr(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:h,getInsideElements:g}=e,_=`rootStore`in t?t.rootStore:t,v=_.useState(`open`),y=_.useState(`domReferenceElement`),b=_.useState(`floatingElement`),{events:x,dataRef:S}=_.context,C=W(()=>S.current.floatingContext?.nodeId),w=i===!1,T=on(y)&&w,E=un(i),D=un(a),O=un(u),k=un(v),A=Or(h),j=yr(),M=o.useRef(!1),N=o.useRef(!1),P=o.useRef(!1),ee=o.useRef(null),F=o.useRef(``),I=o.useRef(``),te=o.useRef(null),ne=o.useRef(null),re=p(te,m,j?.beforeInsideRef),L=p(ne,j?.afterInsideRef),R=Tt(),z=Tt(),ie=hn(),B=j!=null,V=cn(b),ae=W((e=V)=>e?Vn(e):[]),oe=W(()=>g?.().filter(e=>e!=null)??[]);o.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&J(V,Qt(K(V)))&&ae().length===0&&!T&&Bt(e)}return Y(K(V),`keydown`,e)},[r,V,c,T,ae]),o.useEffect(()=>{if(r||!v)return;let e=K(V);function t(){P.current=!1}function n(e){let t=$t(e),n=oe(),r=J(b,t)||J(y,t)||J(j?.portalNode,t)||n.some(e=>e===t||J(e,t));P.current=!r,I.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(N.current=!0,z.start(0,()=>{N.current=!1}))}function i(){I.current=`keyboard`}return ln(Y(e,`pointerdown`,n,!0),Y(e,`pointerup`,t,!0),Y(e,`pointercancel`,t,!0),Y(e,`keydown`,i,!0),t)},[r,b,y,V,v,j,z,oe]),o.useEffect(()=>{if(r||!l)return;let e=K(V);function t(){N.current=!0,z.start(0,()=>{N.current=!1})}function n(e){let t=$t(e);zn(t)&&(ee.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=$t(t);c&&n==null&&i!=null&&J(b,i)&&Lr(i),queueMicrotask(()=>{let a=C(),o=_.context.triggerElements,l=oe(),u=n?.hasAttribute($n(`focus-guard`))&&[te.current,ne.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,Mr(f),Mr(d)].includes(n),p=!(J(y,n)||J(b,n)||J(n,b)||J(j?.portalNode,n)||l.some(e=>e===n||J(e,n))||o.hasMatchingElement(e=>J(e,n))||u||A&&(Zn(A.nodesRef.current,a).find(e=>J(e.context?.elements.floating,n)||J(e.context?.elements.domReference,n))||Qn(A.nodesRef.current,a).find(e=>[e.context?.elements.floating,cn(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===y&&V&&Br(V),s&&r!==y&&!Tn(i)&&Qt(e)===e.body){if(U(V)&&(V.focus(),s===`popup`)){ie.request(()=>{V.focus()});return}let e=ae(),t=ee.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||V;U(n)&&n.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(T||!c)&&n&&p&&!N.current&&(T||n!==Rr())&&(M.current=!0,_.setOpen(!1,mt(ct,t)))})}function a(){P.current||(S.current.insideReactTree=!0,R.start(0,()=>{S.current.insideReactTree=!1}))}let o=U(y)?y:null;if(!(!b&&!o))return ln(o&&Y(o,`focusout`,i),o&&Y(o,`pointerdown`,t),b&&Y(b,`focusin`,n),b&&Y(b,`focusout`,i),b&&j&&Y(b,`focusout`,a,!0))},[r,y,b,V,c,A,j,_,l,s,ae,T,C,S,R,z,ie,d,f,oe]),o.useEffect(()=>{if(r||!b||!v)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${$n(`portal`)}]`)||[]),t=(A?Qn(A.nodesRef.current,C()):[]).find(e=>on(e.context?.elements.domReference||null))?.context?.elements.domReference,n=pr([b,...e,te.current,ne.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...oe(),t,Mr(f),Mr(d),T?y:null].filter(e=>e!=null),{ariaHidden:c||T,mark:!1}),i=pr([b,...e].filter(e=>e!=null));return()=>{i(),n()}},[v,r,y,b,c,j,T,A,C,d,f,oe]),G(()=>{if(!v||r||!U(V))return;F.current=``,I.current=``;let e=K(V),t=Qt(e);queueMicrotask(()=>{let n=E.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||J(V,t))return;let i=null,a=()=>(i??=ae(V),i[0]||V),o;o=r===!0||r===null?a():Mr(r),o||=a();let s=J(V,Qt(e));tr(o,{preventScroll:o===V,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=Qt(e);return!(t!==o&&J(V,t))}})})},[r,v,V,ae,E,O,k]),G(()=>{if(r||!V)return;let e=K(V),t=Qt(e),n=O.current==null;Lr(t);function i(e){if(e.open||(F.current=Nr(e.nativeEvent,I.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(M.current=!0),e.reason===`outside-press`){if(e.nested)M.current=!1;else if(Ht(e.nativeEvent)||Ut(e.nativeEvent))M.current=!1;else{let e=!1;K(V).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}}x.on(`openchange`,i);function a(e){let r=D.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=y?.isConnected?y:null,o=t?.isConnected&&H(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Rr()||null,typeof i==`boolean`?s:Mr(i)||s||null}return()=>{x.off(`openchange`,i);let t=Qt(e),n=oe(),r=J(b,t)||n.some(e=>e===t||J(e,t))||A&&Zn(A.nodesRef.current,C(),!1).some(e=>J(e.context?.elements.floating,t)),o=D.current,s=F.current,c=a(s);queueMicrotask(()=>{let n=zr(c),i=typeof o!=`boolean`;if(o&&!M.current&&U(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}M.current=!1})}},[r,b,V,D,O,x,A,y,C,oe]),G(()=>{if(!Lt||v||!b)return;let e=Qt(K(b));!U(e)||!rn(e)||J(b,e)&&e.blur()},[v,b]),G(()=>{if(!(r||!j))return j.setFocusManagerState({modal:c,closeOnFocusOut:l,open:v,onOpenChange:_.setOpen,domReference:y}),()=>{j.setFocusManagerState(null)}},[r,j,c,v,_,l,y]),G(()=>{if(!(r||!V))return Br(V),()=>{queueMicrotask(Ir)}},[r,V]);let se=!r&&(!c||!T)&&(B||c);return(0,q.jsxs)(o.Fragment,{children:[se&&(0,q.jsx)(vn,{"data-type":`inside`,ref:re,onFocus:e=>{if(c){let e=ae();tr(e[e.length-1])}else j?.portalNode&&(M.current=!1,Jn(e,j.portalNode)?Un(y)?.focus():Mr(f??j.beforeOutsideRef)?.focus())}}),n,se&&(0,q.jsx)(vn,{"data-type":`inside`,ref:L,onFocus:e=>{c?tr(ae()[0]):j?.portalNode&&(l&&(M.current=!0),Jn(e,j.portalNode)?Wn(y)?.focus():Mr(d??j.afterOutsideRef)?.focus())}})]})}function Hr(){return!1}function Ur(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Wr(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:s=Hr,bubbles:c,externalTree:l}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=u.useState(`floatingElement`),{dataRef:p}=u.context,m=Or(l),h=W(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=W(()=>a),{escapeKey:y,outsidePress:b}=Ur(c),x=o.useRef(!1),S=o.useRef(!1),C=o.useRef(!1),w=o.useRef(!1),T=o.useRef(``),E=o.useRef(null),D=Tt(),O=Tt(),k=W(()=>{O.clear(),p.current.insideReactTree=!1}),A=W(e=>{let t=p.current.floatingContext?.nodeId;return(m?Zn(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),j=W(e=>tn(e,u.select(`floatingElement`))||tn(e,u.select(`domReferenceElement`))),M=W(e=>{s()&&u.setOpen(!1,mt(nt,e.nativeEvent))}),N=W(e=>{if(!d||!n||!r||e.key!==`Escape`||w.current||!y&&A(`__escapeKeyBubbles`))return;let t=mt(lt,Vt(e)?e.nativeEvent:e);u.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),P=W(()=>{p.current.insideReactTree=!0,O.start(0,k)}),ee=W(e=>{if(!d||!n||e.button!==0)return;let t=$t(e.nativeEvent);J(u.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),F=W(e=>{!d||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});o.useEffect(()=>{if(!d||!n)return k;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=b;let e=new wt,t=new wt;function i(){e.clear(),w.current=!0}function a(){e.start(Lt?5:0,()=>{w.current=!1})}function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function s(){x.current=!1,S.current=!1}function c(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function l(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=p.current.floatingContext?.nodeId,n=m&&Zn(m.nodesRef.current,t).some(t=>tn(e,t.context?.elements.floating));return j(e)||n}function O(e){if(l(e)){e.type!==`click`&&!j(e)&&(t.clear(),C.current=!1),k();return}if(p.current.insideReactTree){k();return}let n=$t(e),r=`[${$n(`inert`)}]`,i=we(n)?n.getRootNode():null,a=Array.from((Te(i)?i:K(u.select(`floatingElement`))).querySelectorAll(r)),o=u.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>J(e,n))))return;let s=we(n)?n:null;for(;s&&!Ie(s);){let e=ze(s);if(Ie(e)||!we(e))break;s=e}if(!(a.length&&we(n)&&!nn(n)&&!J(n,u.select(`floatingElement`))&&a.every(e=>!J(s,e)))){if(U(n)&&!(`touches`in e)){let t=Ie(n),r=Le(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!h(e)){if(c()===`intentional`&&C.current){t.clear(),C.current=!1;return}typeof g==`function`&&!g(e)||A(`__outsidePressBubbles`)||(u.setOpen(!1,mt(at,e)),k())}}}function M(e){c()!==`sloppy`||e.pointerType===`touch`||!u.select(`open`)||!n||j(e)||O(e)}function P(e){if(c()!==`sloppy`||!u.select(`open`)||!n||j(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function ee(e,t){let n=$t(e);if(!n)return;let r=Y(n,e.type,()=>{t(e),r()})}function F(e){T.current=`touch`,ee(e,P)}function I(e){D.clear(),e.type===`pointerdown`&&(T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&ee(e,e=>{e.type===`pointerdown`?M(e):O(e)})}function te(e){if(!x.current)return;let n=S.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!h(e)){if(n){o();return}typeof g==`function`&&!g(e)||(t.clear(),C.current=!0,k())}}}function ne(e){if(c()!==`sloppy`||!E.current||j(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(O(e),D.clear(),E.current=null)}function re(e){ee(e,ne)}function L(e){c()!==`sloppy`||!E.current||j(e)||(E.current.dismissOnTouchEnd&&O(e),D.clear(),E.current=null)}function R(e){ee(e,L)}let z=K(f),ie=ln(r&&ln(Y(z,`keydown`,N),Y(z,`compositionstart`,i),Y(z,`compositionend`,a)),_&&ln(Y(z,`click`,I,!0),Y(z,`pointerdown`,I,!0),Y(z,`pointerup`,te,!0),Y(z,`pointercancel`,te,!0),Y(z,`mousedown`,I,!0),Y(z,`mouseup`,te,!0),Y(z,`touchstart`,F,!0),Y(z,`touchmove`,re,!0),Y(z,`touchend`,R,!0)));return()=>{ie(),e.clear(),t.clear(),s(),C.current=!1,k()}},[p,f,r,_,g,d,n,y,b,N,k,v,A,j,m,u,D]);let I=o.useMemo(()=>({onKeyDown:N,onPointerDown:M,onClick:M}),[N,M]),te=o.useMemo(()=>({onKeyDown:N,onPointerDown:F,onMouseDown:F,onClickCapture:P,onMouseDownCapture(e){P(),ee(e)},onPointerDownCapture(e){P(),ee(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[N,P,ee,F]);return o.useMemo(()=>n?{reference:I,floating:te,trigger:I}:{},[n,I,te])}var Gr=n((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),Kr=n(((e,t)=>{t.exports=Gr()})),qr=n((e=>{var n=t(),r=Kr();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=n.useRef,c=n.useEffect,l=n.useMemo,u=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Jr=n(((e,t)=>{t.exports=qr()})),Yr=Kr(),Xr=Jr(),Zr=[],Qr=void 0;function $r(){return Qr}function ei(e){Zr.push(e)}function ti(e){let t=(t,n)=>{let r=f(ri).current,i;try{Qr=r;for(let e of Zr)e.before(r);i=e(t,n);for(let e of Zr)e.after(r);r.didInitialize=!0}finally{Qr=void 0}return i};return t.displayName=e.displayName||e.name,t}function ni(e){return o.forwardRef(ti(e))}function ri(){return{didInitialize:!1}}var ii=b(19)?si:ci;function ai(e,t,n,r,i){return ii(e,t,n,r,i)}function oi(e,t,n,r,i){let a=o.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Yr.useSyncExternalStore)(e.subscribe,a,a)}ei({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Yr.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function si(e,t,n,r,i){let a=$r();if(!a)return oi(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function ci(e,t,n,r,i){return(0,Xr.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var li=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return ai(this,e,t,n,r)}},ui=class extends li{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){o.useDebugValue(e);let n=this;G(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;G(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;G(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){o.useDebugValue(e);let n=this,r=t!==void 0;G(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return o.useDebugValue(e),ai(this,this.selectors[e],t,n,r)}useContextCallback(e,t){o.useDebugValue(e);let n=W(t??C);this.context[e]=n}useStateSetter(e){let t=o.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},di={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},fi=class extends ui{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Cr(),nested:n,triggerElements:i},di),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Gt(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function pi(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:s}=e,c=t.useState(`open`),l=t.useState(`activeTriggerElement`),u=t.useState(n?`popupElement`:`positionerElement`),d=t.context.triggerElements,f=s,p=o.useRef(null);r===void 0&&p.current===null&&(p.current=new fi({open:c,transitionStatus:void 0,referenceElement:l,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:i,syncOnly:!0,nested:a}));let m=r??p.current;return t.useSyncedValue(`floatingId`,i),G(()=>{let e={open:c,floatingId:i,referenceElement:l,floatingElement:u};we(l)&&(e.domReferenceElement=l),m.state.positionReference===m.state.referenceElement&&(e.positionReference=l),m.update(e)},[c,i,l,u,m]),m.context.onOpenChange=f,m.context.nested=a,m}function mi(e,t=!1,n=!1){let[r,i]=o.useState(e&&t?`idle`:void 0),[a,s]=o.useState(e);return e&&!a&&(s(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),G(()=>{if(!e&&a&&r!==`ending`&&n){let e=mn.request(()=>{i(`ending`)});return()=>{mn.cancel(e)}}},[e,a,r,n]),G(()=>{if(!e||t)return;let n=mn.request(()=>{i(void 0)});return()=>{mn.cancel(n)}},[t,e]),G(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=mn.request(()=>{i(`idle`)});return()=>{mn.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:s,transitionStatus:r}}function hi(e,t=!1){let n=hn();return W((r,i=null)=>{n.cancel();let a=Mr(e);if(a==null)return;let o=a,s=()=>{gt.flushSync(r)};if(typeof o.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function c(){Promise.all(o.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||s()},()=>{if(!i?.aborted){if(o.getAnimations().some(e=>e.pending||e.playState!==`finished`)){c();return}s()}})}if(t){let e=`data-starting-style`;if(!o.hasAttribute(e)){n.request(c);return}let t=new MutationObserver(()=>{o.hasAttribute(e)||(t.disconnect(),c())});t.observe(o,{attributes:!0,attributeFilter:[e]}),i?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}n.request(c)})}function gi(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=W(i),s=hi(r,n);o.useEffect(()=>{if(!t)return;let e=new AbortController;return s(a,e.signal),()=>{e.abort()}},[t,n,a,s])}var _i={tabIndex:-1,[Kt]:``};function vi(e){return t=>t!==`touch`||e.current}function yi(e,t=!1){let n=bt(),r=Dr()!=null,i=f(()=>e(n,r)).current;return pi({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function bi({handle:e,store:t}){return G(()=>e.attachStore(t),[e,t]),null}function xi(e,t){let n=o.useRef(null),r=o.useRef(null);return o.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function Si(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let i=n?.id??null;(i||t)&&(e.activeTriggerId=i,e.activeTriggerElement=n??null)}function Ci(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function wi(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=xi(e,n),s=W(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){n.update({activeTriggerElement:t,...i?r:null});return}a==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})}),c=o.useCallback(e=>{a(e),e&&s(e)},[a,s]);return G(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:c,isMountedByThisTrigger:i}}function Ti(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=o.useRef(null),i=e.useState(`open`);G(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=mt(tt);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function Ei(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=mi(e),o=t.useState(`preventUnmountingOnClose`),s=!e&&o;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:s});let c=W(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return gi({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:a}}function Di(e,t){e.useSyncedValues(t),G(()=>()=>{e.update({activeTriggerProps:T,inactiveTriggerProps:T,popupProps:T})},[e])}function Oi(e,t){G(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),G(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var ki=class{constructor(){this.idMap=new Map}add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};function Ai(){return new fi({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new ki,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function ji(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Ai(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:T,inactiveTriggerProps:T,popupProps:T}}function Mi(e,t,n=!1){return new fi({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var Ni=e=>e.triggerIdProp??e.activeTriggerId,Pi=e=>e.openProp??e.open,Fi=e=>(e.popupElement?.id??e.floatingId)||void 0;function Ii(e,t){return t!==void 0&&Pi(e)&&Ni(e)===t}function Li(e,t){return Ii(e,t)?!0:t!==void 0&&Pi(e)&&Ni(e)==null&&e.triggerCount===1}var Ri={open:Pi,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Ni,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Fi,isTriggerActive:(e,t)=>t!==void 0&&Ni(e)===t,isOpenedByTrigger:(e,t)=>Ii(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Ni(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Li(e,t)?Fi(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement},zi=o.createContext(void 0);function Bi(){let e=o.useContext(zi);if(e===void 0)throw Error(c(26));return e}var Vi=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),Hi={..._e,...de,nestedDialogOpen(e){return e?{"data-nested-dialog-open":``}:null}},Ui=o.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=u(),l=c.useState(`descriptionElementId`),d=c.useState(`disablePointerDismissal`),f=c.useState(`floatingRootContext`),p=c.useState(`popupProps`),m=c.useState(`modal`),h=c.useState(`mounted`),g=c.useState(`nested`),_=c.useState(`nestedOpenDialogCount`),v=c.useState(`open`),y=c.useState(`openMethod`),b=c.useState(`titleElementId`),x=c.useState(`transitionStatus`),S=c.useState(`role`),C=f.useState(`floatingId`);Bi(),gi({open:v,ref:c.context.popupRef,onComplete(){v&&c.context.onOpenChangeComplete?.(!0)}});let w=o===void 0?vi(c.context.popupRef):o,T=_>0,E=c.useStateSetter(`popupElement`),D=ie(`div`,e,{state:{open:v,nested:g,transitionStatus:x,nestedDialogOpen:T},props:[p,{id:C,"aria-labelledby":b,"aria-describedby":l,role:S,..._i,hidden:!h,onKeyDown(e){Vi.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":_}},s],ref:[t,c.context.popupRef,E],stateAttributesMapping:Hi});return(0,q.jsx)(Vr,{context:f,openInteractionType:y,disabled:!h,closeOnFocusOut:!d,initialFocus:w,returnFocus:a,modal:m!==!1,restoreFocus:`popup`,children:D})});function Wi(e){return b(19)?e:e?`true`:void 0}var Gi=o.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,q.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Ki=o.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=u(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,q.jsx)(zi.Provider,{value:n,children:(0,q.jsxs)(Sr,{ref:t,...r,children:[a&&o===!0&&(0,q.jsx)(Gi,{ref:i.context.internalBackdropRef,inert:Wi(!s)}),e.children]})}):null}),qi={},Ji={},Yi=``;function Xi(e,t){return Ee(e)?e:t}function Zi(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Xi(t,n)).overflowY)}function Qi(e){if(typeof document>`u`)return!1;let t=K(e);return xe(t).innerWidth-t.documentElement.clientWidth>0}function $i(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=K(e),n=t.documentElement,r=t.body,i=Xi(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function ea(e){let t=K(e),n=t.documentElement,r=t.body,i=Xi(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function ta(e){let t=K(e),n=t.documentElement,r=t.body,i=xe(n),a=0,o=0,s=!1,c=mn.create();if(Lt&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,qi={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Yi=n.style.scrollBehavior,Ji={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Xi(n,r);if(s=$i(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,qi),Object.assign(r.style,Ji),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Yi)}function d(){u(),c.request(l)}l();let f=Y(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var na=new class{lockCount=0;restore=null;timeoutLock=wt.create();timeoutUnlock=wt.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=K(e),n=t.documentElement,r=t.body,i=xe(n);if(Zi(i,n,r)){let t=new i.MutationObserver(()=>{Zi(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Mt||!Qi(e);this.restore=a?ea(e):ta(e)}};function ra(e=!0,t=null){G(()=>{if(e)return na.acquire(t)},[e,t])}function ia({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=o.useState(0),[d,f]=o.useState(0),p=l===0,m=Wr(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=$t(t);if(p&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||J(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return ra(r&&a===!0,s),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{u(e),f(t)}),G(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(l+1,d+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),Di(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var aa={...Ri,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},oa=class extends ui{constructor(e,t,n){let r=new ki,i=sa(e,r,t,n);super(i,ca(r),aa)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};Si(n,e,t.trigger),this.update(n)}};function sa(e,t,n,r=!1){let i={...ji(),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e};return i.floatingRootContext=Mi(t,n,r),i}function ca(e){return{popupRef:o.createRef(),backdropRef:o.createRef(),internalBackdropRef:o.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function la(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:d=!0,actionsRef:f,handle:p,triggerId:m,defaultTriggerId:h=null}=t,g=e===`drawer`,_=e===`alert-dialog`,v=_?!0:d,y=_||c,b=_?`alertdialog`:`dialog`,x=u(!0),S={modal:v,disablePointerDismissal:y,nested:x!=null,role:b},C=yi((e,t)=>new oa({open:i,openProp:r,activeTriggerId:h,triggerIdProp:m,...S},e,t),!0);C.useControlledProp(`openProp`,r),C.useControlledProp(`triggerIdProp`,m),C.useSyncedValues(S),C.useContextCallback(`onOpenChange`,a),C.useContextCallback(`onOpenChangeComplete`,s);let w=C.useState(`open`),T=C.useState(`mounted`),E=C.useState(`payload`);Oi(C,w),Ti(C);let{forceUnmount:D}=Ei(w,C);o.useImperativeHandle(f,()=>({unmount:D,close:()=>C.setOpen(!1,mt(pt))}),[D,C]);let O=w||T;return(0,q.jsxs)(l.Provider,{value:C,children:[p&&(0,q.jsx)(bi,{handle:p,store:C}),O&&(0,q.jsx)(ia,{store:C,parentContext:x?.context,isDrawer:g}),typeof n==`function`?n({payload:E}):n]})}function ua(e){return la(`dialog`,e)}var da=o.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=u(),c=xt(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),ie(`h2`,e,{ref:t,props:[{id:c},o]})});function fa(e){if(!e)return`unknown`;let t=Date.now()-e;if(Number.isNaN(t)||t<0)return`just now`;let n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function pa(e){return e.toLocaleString(`en-US`)}function ma(e){return e===0?`$0.00`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function ha(e){if(e===`recorded`)return`recorded`;if(e===`estimated`)return`estimated`}function ga(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function _a(e){return Math.round(e).toLocaleString(`en-US`)}function va(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:_a(e)}function ya(e){return`$${e.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2})}`}function ba(e){let t=Math.abs(e);return t>=1e6?`$${(e/1e6).toFixed(2)}M`:t>=1e3?`$${(e/1e3).toFixed(2)}k`:ya(e)}function xa(e,t){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=0)return null;let n=(e-t)/t;return`${n<0?`▼`:`▲`} ${Math.round(Math.abs(n)*100)}%`}function Sa(e,t=Date.now()){let n=t-e;if(n<6e4)return`just now`;let r=Math.floor(n/6e4);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=new Date(t);a.setDate(a.getDate()-1);let o=new Date(e);return Ea(o,a)?`Yesterday`:Ca(o.getTime())}function Ca(e){if(typeof e==`string`){let t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);if(t)return`${t[2]}-${t[3]}`}let t=new Date(e);return Number.isNaN(t.getTime())?``:`${Da(t.getMonth()+1)}-${Da(t.getDate())}`}function wa(e){if(!Number.isFinite(e))return``;let t=new Date(e);return`${Da(t.getHours())}:${Da(t.getMinutes())}`}function Ta(e){return Number.isFinite(e)?`${Math.round(e*100)}%`:`0%`}function Ea(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Da(e){return String(e).padStart(2,`0`)}function Oa(e){if(e==null||typeof e==`number`&&(!Number.isFinite(e)||e<=0))return null;let t=null;if(typeof e==`number`){let n=e<10**12?e*1e3:e;t=new Date(n)}else if(typeof e==`string`&&e.trim()){let n=Number(e);t=Number.isFinite(n)&&n>0?new Date(n<10**12?n*1e3:n):Number.isFinite(n)?null:new Date(e)}return!t||Number.isNaN(t.getTime())?null:t.toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!0})}function ka({icon:e,iconColored:t,alt:n,className:r}){if(t)return(0,q.jsx)(`img`,{src:e,alt:n,className:r});let i=`url("${e}") center / contain no-repeat`;return(0,q.jsx)(`span`,{role:`img`,"aria-label":n,className:`inline-block bg-current ${r??``}`,style:{mask:i,WebkitMask:i}})}function Aa(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Aa(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ja(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Aa(e))&&(r&&(r+=` `),r+=t);return r}var Ma=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Na=(e,t)=>({classGroupId:e,validator:t}),Pa=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Fa=`-`,Ia=[],La=`arbitrary..`,Ra=e=>{let t=Va(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Ba(e);let n=e.split(Fa);return za(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Ma(i,t):t:i||Ia}return n[e]||Ia}}},za=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=za(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Fa):e.slice(t).join(Fa),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Ba=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?La+r:void 0})(),Va=e=>{let{theme:t,classGroups:n}=e;return Ha(n,t)},Ha=(e,t)=>{let n=Pa();for(let r in e){let i=e[r];Ua(i,n,r,t)}return n},Ua=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Wa(i,t,n,r)}},Wa=(e,t,n,r)=>{if(typeof e==`string`){Ga(e,t,n);return}if(typeof e==`function`){Ka(e,t,n,r);return}qa(e,t,n,r)},Ga=(e,t,n)=>{let r=e===``?t:Ja(t,e);r.classGroupId=n},Ka=(e,t,n,r)=>{if(Ya(e)){Ua(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Na(n,e))},qa=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ua(o,Ja(t,a),n,r)}},Ja=(e,t)=>{let n=e,r=t.split(Fa),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Pa(),n.nextPart.set(t,i)),n=i}return n},Ya=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Xa=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Za=`!`,Qa=`:`,$a=[],eo=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),to=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Qa){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Za)?(c=s.slice(0,-1),l=!0):s.startsWith(Za)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return eo(t,l,c,u)};if(t){let e=t+Qa,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):eo($a,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},no=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},ro=e=>({cache:Xa(e.cacheSize),parseClassName:to(e),sortModifiers:no(e),postfixLookupClassGroupIds:io(e),...Ra(e)}),io=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ao=/\s+/,oo=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ao),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Za:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},so=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=co(n))&&(i&&(i+=` `),i+=r);return i},co=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=co(e[r]))&&(n&&(n+=` `),n+=t);return n},lo=(e,...t)=>{let n,r,i,a,o=o=>(n=ro(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=oo(e,n);return i(e,a),a};return a=o,(...e)=>a(so(...e))},uo=[],X=e=>{let t=t=>t[e]||uo;return t.isThemeGetter=!0,t},fo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,po=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mo=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ho=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,go=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_o=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bo=e=>mo.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),xo=e=>!!e&&Number.isInteger(Number(e)),So=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),Co=e=>ho.test(e),wo=()=>!0,To=e=>go.test(e)&&!_o.test(e),Eo=()=>!1,Do=e=>vo.test(e),Oo=e=>yo.test(e),ko=e=>!Q(e)&&!$(e),Ao=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),jo=e=>Ko(e,Xo,Eo),Q=e=>fo.test(e),Mo=e=>Ko(e,Zo,To),No=e=>Ko(e,Qo,Z),Po=e=>Ko(e,es,wo),Fo=e=>Ko(e,$o,Eo),Io=e=>Ko(e,Jo,Eo),Lo=e=>Ko(e,Yo,Oo),Ro=e=>Ko(e,ts,Do),$=e=>po.test(e),zo=e=>qo(e,Zo),Bo=e=>qo(e,$o),Vo=e=>qo(e,Jo),Ho=e=>qo(e,Xo),Uo=e=>qo(e,Yo),Wo=e=>qo(e,ts,!0),Go=e=>qo(e,es,!0),Ko=(e,t,n)=>{let r=fo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},qo=(e,t,n=!1)=>{let r=po.exec(e);return r?r[1]?t(r[1]):n:!1},Jo=e=>e===`position`||e===`percentage`,Yo=e=>e===`image`||e===`url`,Xo=e=>e===`length`||e===`size`||e===`bg-size`,Zo=e=>e===`length`,Qo=e=>e===`number`,$o=e=>e===`family-name`,es=e=>e===`number`||e===`weight`,ts=e=>e===`shadow`,ns=lo(()=>{let e=X(`color`),t=X(`font`),n=X(`text`),r=X(`font-weight`),i=X(`tracking`),a=X(`leading`),o=X(`breakpoint`),s=X(`container`),c=X(`spacing`),l=X(`radius`),u=X(`shadow`),d=X(`inset-shadow`),f=X(`text-shadow`),p=X(`drop-shadow`),m=X(`blur`),h=X(`perspective`),g=X(`aspect`),_=X(`ease`),v=X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[bo,`full`,`auto`,...w()],E=()=>[xo,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,xo,$,Q]},xo,$,Q],O=()=>[xo,`auto`,$,Q],k=()=>[`auto`,`min`,`max`,`fr`,$,Q],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[bo,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[bo,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[bo,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,$,Q],I=()=>[...b(),Vo,Io,{position:[$,Q]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Ho,jo,{size:[$,Q]}],re=()=>[So,zo,Mo],L=()=>[``,`none`,`full`,l,$,Q],R=()=>[``,Z,zo,Mo],z=()=>[`solid`,`dashed`,`dotted`,`double`],ie=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],B=()=>[Z,So,Vo,Io],V=()=>[``,`none`,m,$,Q],ae=()=>[`none`,Z,$,Q],oe=()=>[`none`,Z,$,Q],se=()=>[Z,$,Q],ce=()=>[bo,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Co],breakpoint:[Co],color:[wo],container:[Co],"drop-shadow":[Co],ease:[`in`,`out`,`in-out`],font:[ko],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Co],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Co],shadow:[Co],spacing:[`px`,Z],text:[Co],"text-shadow":[Co],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,bo,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[Ao],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[xo,`auto`,$,Q]}],basis:[{basis:[bo,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,bo,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[xo,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,zo,Mo]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Go,Po]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,So,Q]}],"font-family":[{font:[Bo,Fo,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,No]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,Mo]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[xo,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},xo,$,Q],radial:[``,$,Q],conic:[xo,$,Q]},Uo,Lo]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,zo,Mo]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,Wo,Ro]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Wo,Ro]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Z,Mo]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Wo,Ro]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...ie(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":B()}],"mask-image-linear-to-pos":[{"mask-linear-to":B()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":B()}],"mask-image-t-to-pos":[{"mask-t-to":B()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":B()}],"mask-image-r-to-pos":[{"mask-r-to":B()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":B()}],"mask-image-b-to-pos":[{"mask-b-to":B()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":B()}],"mask-image-l-to-pos":[{"mask-l-to":B()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":B()}],"mask-image-x-to-pos":[{"mask-x-to":B()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":B()}],"mask-image-y-to-pos":[{"mask-y-to":B()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":B()}],"mask-image-radial-to-pos":[{"mask-radial-to":B()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":B()}],"mask-image-conic-to-pos":[{"mask-conic-to":B()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:V()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Wo,Ro]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[xo,$,Q]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[Z,zo,Mo,No]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function rs(...e){return ns(ja(e))}export{mr as $,ut as $t,bi as A,ve as An,Jt as At,ui as B,a as Bn,Ft as Bt,Wi as C,Ie as Cn,on as Ct,Ri as D,Fe as Dn,J as Dt,ji as E,Oe as En,Qt as Et,Di as F,T as Fn,Ut as Ft,Vr as G,bt as Gt,ni as H,Tt as Ht,wi as I,C as In,Bt as It,kr as J,dt as Jt,Ar as K,ht as Kt,gi as L,p as Ln,zt as Lt,Si as M,ie as Mn,Xt as Mt,Ti as N,A as Nn,Wt as Nt,ki as O,ye as On,$t as Ot,Ei as P,w as Pn,Ht as Pt,Sr as Q,ot as Qt,hi as R,f as Rn,Lt as Rt,Gi as S,U as Sn,en as St,Vi as T,De as Tn,sn as Tt,Kr as U,St as Ut,ti as V,wt as Vt,Wr as W,xt as Wt,Or as X,ct as Xt,Dr as Y,lt as Yt,wr as Z,pt as Zt,ba as _,Ve as _n,un as _t,ha as a,Qe as an,Un as at,ra as b,Ne as bn,cn as bt,Oa as c,Ye as cn,Jn as ct,pa as d,Le as dn,bn as dt,at as en,hr as et,Ta as f,Pe as fn,Tn as ft,ya as g,Re as gn,hn as gt,ga as h,H as hn,vn as ht,va as i,nt as in,Zn as it,Ci as j,ge as jn,Yt as jt,_i as k,_e as kn,Zt as kt,ma as l,G as ln,Sn as lt,fa as m,He as mn,Cn as mt,ka as n,it as nn,tr as nt,xa as o,Ze as on,Kn as ot,Sa as p,Se as pn,yn as pt,jr as q,mt as qt,wa as r,rt as rn,$n as rt,_a as s,K as sn,qn as st,rs as t,ft as tn,gr as tt,Ca as u,W as un,xn as ut,da as v,ze as vn,ln as vt,Ui as w,Ee as wn,rn as wt,Ki as x,we as xn,an as xt,ua as y,xe as yn,Y as yt,pi as z,c as zn,Mt as zt};