@deslop/gateway 0.1.1231 → 0.1.1233
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/apple-touch-icon.png +0 -0
- package/dist/client/assets/(home)-pbfIvNZe.js +1 -0
- package/dist/client/assets/effect-DJFrJOhz.js +17 -0
- package/dist/client/assets/icon-61pmFc-p.svg +1 -0
- package/dist/client/assets/index-GPYSTNwq.js +4 -0
- package/dist/client/assets/index-I1PNwXTF.css +2 -0
- package/dist/client/index.html +4 -5
- package/dist/server.js +11 -45
- package/package.json +2 -2
- package/dist/client/assets/(home)-CQVRM9XF.js +0 -1
- package/dist/client/assets/effect-Mq46Au9-.js +0 -17
- package/dist/client/assets/icon-CY0KDqY_.svg +0 -1
- package/dist/client/assets/icon-dark-B6bEETJE.svg +0 -1
- package/dist/client/assets/index-CiFa0j4x.js +0 -4
- package/dist/client/assets/index-JWBKvPy0.css +0 -2
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/(home)-CQVRM9XF.js","assets/rolldown-runtime-WkwZ5CU-.js","assets/react-BUjtWCUj.js","assets/effect-Mq46Au9-.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,t}from"./rolldown-runtime-WkwZ5CU-.js";import{a as n,i as r,n as i,o as a,r as o,s}from"./react-BUjtWCUj.js";import{$ as c,$i as l,Ai as u,Ar as d,Dr as f,Dt as p,E as m,Er as h,Et as g,Fr as _,Ft as v,Ir as y,It as b,J as x,Ji as S,Ki as C,Mr as w,Nr as T,Or as E,P as D,Pr as O,Pt as k,Q as A,St as j,Ti as M,Tr as N,V as P,Wn as F,X as I,Xi as L,Y as R,Yi as ee,Z as z,Zi as B,_ as V,_t as te,c as ne,ci as H,ct as U,ft as re,g as ie,gt as ae,jr as oe,jt as se,kr as ce,lr as le,lt as ue,m as de,o as fe,ot as pe,p as me,pi as he,pt as ge,q as _e,qi as ve,ri as ye,s as be,st as xe,tt as Se,vi as Ce,vt as we,wi as Te,x as Ee,yi as De,zn as Oe}from"./effect-Mq46Au9-.js";var W=e(s(),1),ke=W.createContext(null);function Ae(e){return W.useContext(ke)}function je(e){return e[e.length-1]}function Me(e,t){return typeof e==`function`?e(t):e}var Ne=Object.prototype.hasOwnProperty;function Pe(e){for(let t in e)if(Ne.call(e,t))return!0;return!1}var Fe=()=>Object.create(null),Ie=(e,t)=>Le(e,t,!0);function Le(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(Re(e)&&Re(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&je(a)!==`${o-1}`||c&&je(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?Le(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?Le(d,o,n,r):o,i&&=u===d&&(a[l]===f||Ne.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?Fe():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?Le(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function Re(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function ze(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!ze(a,o,n,r))return!1}return!0}if(Re(e)&&Re(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!ze(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!ze(e[a],t[a],n,r)))return!1;return i===0}return!1}function Be(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var Ve=/[\x00-\x1f\x7f"<>`{}]/g;function He(e){return e.replace(Ve,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Ue(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return He(t)}var We=[`http:`,`https:`,`mailto:`,`tel:`];function Ge(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var Ke=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function qe(e,t){if(!e)return!1;if(Ke.test(e))return!0;let n=Ge(e);return n?!t.has(n):!1}var Je={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Ye=/[&><\u2028\u2029]/g;function Xe(e){return e.replace(Ye,e=>Je[e])}function Ze(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=Ue(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=Ue(r?e.slice(r):e)}return t}function Qe(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function $e(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function et(){throw Error(`Invariant failed`)}function tt(e){return e.replace(/\/{2,}/g,`/`)}function nt(e){return e===`/`?e:e.replace(/^\/+/,``)}function rt(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function it(e){return rt(nt(e))}function at(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function ot(e,t,n=`never`,r){if(t.includes(`//`)&&(t=tt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=tt(e)),o=e.split(`/`);o.length>1&&je(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(je(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?tt(s):s)||`/`;return a&&r&&r.set(a,c),c}function st(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function ct(e){return e==null||e===``}function lt(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function ut(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&ct(f)){if(c===`/`&&!d)continue;f=``}o+=c+lt(s,f,r)+(d||``)}}return o+a||`/`}function dt(e){return e?.isNotFound===!0}var ft=`__root__`;function pt(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function mt(e){return e instanceof Response&&!!e.options}function ht(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var gt=4,_t=5;function vt(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function yt(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function bt(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=je(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=yt(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=St(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.slice(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=St(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.slice(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=St(r,_t);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=St(r,gt);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function xt(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function St(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Ct(e,t){let n=St(),r=[];function i(e,t,n,a){let[o,s,c]=bt(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(xt);t.masksTree=n,t.flatCache=ht(1e3)}function wt(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Ot(e,t.masksTree);return t.flatCache.set(e,r),r}function Tt(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=St(),bt(t,{from:e},1,o),i.singleCache.set(a,o)),Ot(r,o,n)}function Et(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Ot(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=At(a.route)),t.matchCache.set(r,a),a}function Dt(e,t=!1){let n=St(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&et(),i[e.id]=e,o!==0&&e.path){let t=rt(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=bt(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(xt);return{processedTree:{segmentTree:n,singleCache:ht(1e3),matchCache:ht(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Ot(e,t,n=!1){let r=e.split(`/`),i=Mt(e,r,t,n);if(!i)return null;let[a]=kt(e,r,i);return{route:i.node.route,rawParams:a}}function kt(e,t,n){let r=jt(n.node),i=n.node.data&&vt(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===gt)break;if(u.kind===_t){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function At(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function jt(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Mt(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!je(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!It(l,n))continue;if(i.parse){if(!Ft(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==gt&&It(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===gt||i.kind===2)&&It(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Ft(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Pt(f,o))return n;It(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Nt(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Nt(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Nt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Nt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Nt(e,t){return 2**(e-t-1)}function Pt(e,t){return e===2**(t-1)-1}function Ft(e,t,n){let r,i;try{[r,i]=kt(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function It(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===gt)>(e.node.kind===gt)||t.node.kind===gt==(e.node.kind===gt)&&t.node.depth>e.node.depth)))}function Lt(){try{return sessionStorage}catch{return}}var Rt=`tsr-scroll-restoration-v1_3`,zt=Lt();function Bt(){try{return JSON.parse(zt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var Vt=Bt(),Ht=`data-scroll-restoration-id`,Ut=e=>e.state.__TSR_key||e.href;function Wt(e){let t=e.getAttribute(Ht);if(t)return`[${Ht}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Gt=!1,Kt=`window`;function qt(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Jt(e){let t=new Set;for(let n of e){if(n===Kt)continue;let e=qt(n);e&&t.add(e)}return t}function Yt(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Ut,a=new Set,o=e=>{let t=Vt[e]||={};for(let e of a)e===document?t[Kt]={scrollX,scrollY}:e.isConnected&&(t[Wt(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,Gt=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Gt||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{zt?.setItem(Rt,JSON.stringify(Vt))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=Vt[d];if(e){let t=Vt[u];for(let n in e){if(n===Kt){if(s)continue}else{let e=qt(n);if(!e||s&&o&&(l??=Jt(o),l.has(e)))continue}t||=Vt[u]={},t[n]??=e[n]}}}Gt=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Jt(o));let t=e&&i&&c,s=r.e?Vt[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Kt){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=qt(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Gt=!1}}))}function Xt(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Zt(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Qt(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Zt(r):Array.isArray(t)?t.push(Zt(r)):n[e]=[t,Zt(r)]}return n}var $t=/^(?:\s|["[{\d-]|fa|nu|tr)/,en=nn(JSON.parse),tn=rn(JSON.stringify,JSON.parse);function nn(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=Qt(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!$t.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function rn(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!$t.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Xt(e,r);return t?`?${t}`:``}}function an(e,t,n){let r=it(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=tt(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>on(n,s.input({url:e})),output:({url:e})=>s.output({url:sn(n,e)})}:s}function on(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function sn(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function cn(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{$e(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var ln=`__TSR_index`,un=`popstate`,dn=`beforeunload`,fn=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function pn(e){let t=fn.exec(e);return t?`/`+e.slice(t[0].length):e}function mn(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
3
|
-
\r`.includes(e)?``:encodeURIComponent(e))),pn(e)}function hn(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=vn(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[ln];i=gn(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[ln];i=gn(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[ln]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function gn(e,t){let n=yn();return{...t,key:n,__TSR_key:n,[ln]:e}}function _n(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>mn(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>vn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=yn();t.history.replaceState({[ln]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=vn(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[ln]-l.state[ln],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=hn({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(dn,x,{capture:!0}),t.removeEventListener(un,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(dn,x,{capture:!0}),t.addEventListener(un,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function vn(e,t){let n=mn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=yn();t={[ln]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function yn(){return(Math.random()+1).toString(36).slice(7)}function bn(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function xn(e){return e.pathname+e.search+e.hash}function Sn(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Cn(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function wn({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Tn(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function En(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var Dn=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:_n()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&it(n)?an(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=cn(this.latestLocation,e),Yt(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Dt(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Ct(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:ht(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:Ze(e),external:!1,searchStr:o,search:Ie(t?.search,i),hash:Ze(r.slice(1)),state:Le(t?.state,a)}}let o=on(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:Ze(pn(o.pathname)),external:!!this.rewrite&&bn(o,this.origin),searchStr:c,search:Ie(t?.search,s),hash:Ze(o.hash.slice(1)),state:Le(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Et(rt(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=vn(n.href,{});n={...n,to:on(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=ot(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[rt(c)],u=c.includes(`$`),d;if(l)d=l._branch??=At(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??bt(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=Mn(n.params,e),!Pe(p))break;p===e&&(p=Object.assign(Fe(),p));try{Object.assign(p,t(p))}catch{}}}p??=Mn(n.params,Nn(n.params,f)?o()[3]:Pn);let m=e.leaveParams?c:pn(Ze(f?ut(c,f,p,this.pathParamsDecoder):c)),h=Fn(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,jn(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?In(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||Pn,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:Pn,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=sn(this.rewrite,e);C=xn(e),bn(n,t)?(w=n.href,T=!0):w=pn(xn(n))}else C=Qe(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=wt(r.pathname,this.processedTree);if(t){let i=Object.assign(Fe(),t.rawParams),{from:a,params:o,...s}=t.route,c=Mn(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return On(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=rt(this.latestLocation.href)===rt(n.href)&&ze(wn(n.state),wn(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?Ge(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return On(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Ar(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Cn(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Sn(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(Ke.test(n)||(r=Ge(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:bn(e,this.origin)||(n=xn(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=Vn,this.preloadRoute=e=>jr(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?ot(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Tt(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!ze(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?ze(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=st(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??tn,parseSearch:e.parseSearch??en,protocolAllowlist:e.protocolAllowlist??We}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=bt(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:rt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Ln(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=jn(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof kn||(r=new kn(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=Fe(),_=i._interpolation?ut(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{Rn(i,d)}catch(e){if(x=dt(e)||mt(e)?e:new An(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:Ie(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=Sn(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?Ie(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?Le(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?Ie(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=je(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=je(a),c={...e.search};for(let e of a)try{Object.assign(c,jn(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{Rn(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function On(e,t,{replace:n,ignoreBlocker:r}){if(!qe(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var kn=class extends Error{},An=class extends Error{};function jn(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new kn(`Async validation not supported`);if(n.issues)throw new kn(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Mn(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function Nn(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!Ne.call(e,t[1]))}var Pn=Object.freeze({});function Fn(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=jn(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function In(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=Me(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Ln(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return ft}function Rn(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function zn(e,t){return e.options[t]?.preload?.()}function Bn(e,t){let n=zn(e,`component`),r=zn(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Vn(e,t,n){let r=()=>t===!1?void 0:t?zn(e,t):Bn(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Hn(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function Un(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}function Wn(e){let t=e.length;for(let n=0;n<t;n++){let r=e[n];if(r._assetEnd!==void 0)t=Math.min(t,Math.max(n+1,r._assetEnd));else if(r.status!==`success`||r._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}var Gn=0,Kn=1,qn=2,Jn=3,Yn=[4];function Xn(e){return typeof e[0]==`number`}function Zn(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function Qn(e,t){return e.routesById[t.routeId]}function $n(e,t,n){return mt(e)?[Jn,e]:dt(e)?(e.routeId||=n,[qn,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Kn,e]):[Gn,e]}function er(e,t){let n=$n(t,!0,e.id);if(n[0]!==Kn)return n;try{e.options.onError?.(n[1])}catch(t){n=$n(t,!0,e.id)}return n}function tr(e,t,n,r,i){return i[0].signal.aborted?Yn:_r(e,t,n,er(n,r),i)}async function nr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=Qn(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return ir(e,r),[i,tr(e,t,u,a,n)]}if(c.aborted)return[i,Yn];let p=r.paramsError??r.searchError;if(p!==void 0)return ir(e,r),[i,tr(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{sr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Zn(a,c):a);if(c.aborted)return[i,Yn];let s=_r(e,t,u,$n(o,!1,u.id),n);if(s[0]!==Gn)return ir(e,r),[i,s];r.context={...r.context,...o}}catch(a){return ir(e,r),[i,tr(e,t,u,a,n)]}finally{r.status=h,sr(e,r,!1,n[0])}}i()}function rr(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function ir(e,t){let n=t._flight;t._flight=void 0,rr(e,t,n)?.abort()}function ar(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=rr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function or(e){for(let t of e){let e=t._flight;e&&e[2]++}}function sr(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function cr(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function lr(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Yn;if(!i)return[Gn,void 0];let l=n._flight;sr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(cr(e,t,n,r,s,a,!!o[3]))).then(e=>$n(e,!1,r.id),e=>$n(e,!0,r.id)).then(t=>(t[0]!==Gn&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Kn&&l[2]?er(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],_r(e,t,r,await Zn(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return ir(e,n),Yn}finally{sr(e,n,!1,s)}}function ur(e,t,n){t[0]!==Jn&&(e.status=`success`,e.error=void 0,t[0]===Gn?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function dr(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&ir(e,r)}function fr(e,t){return t[0]===Kn||t[0]===qn?{...e,status:t[0]===Kn?`error`:`notFound`,error:t[1],_flight:void 0}:e}function pr(e,t,n,r,i,a,o){let s=t[1][n],c=Qn(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(cr(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Yn)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,ir(e,s),p=tr(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,rr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?lr(e,t,s,c,g,i,a).then(t=>(ur(s,t,l),t[0]===Gn&&(m&&!a[0].signal.aborted&&dr(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[Gn,s.loaderData]),T=(async()=>{try{let e=Vn(c,void 0,C);e&&await Zn(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,tr(e,t,c,r,a)]}let r=await w;x&&r[0]===Gn&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>fr(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=lr(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,ur(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>fr(E,e))}async function mr(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Qn(e,t[n]);try{let e=Vn(i,!1);e&&await Zn(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function hr(e,t){t[2]&&=(ar(e,t[2].map(e=>e[3])),void 0)}async function gr(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Jn)throw[a,t];!i&&t[0]!==Gn&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Jn)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function _r(e,t,n,r,i,a){for(;r[0]===Jn;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[Jn,t]:[Jn,t,a]}return[Jn,o,n]}catch(e){r=a?[Kn,e]:er(n,e),a=!0}}return r}async function vr(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===qn?mr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Jn)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Gn&&t[0]<Jn&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Jn){let n=s[1];if(n[0]!==Jn||n[1].options.reloadDocument||n[2])return hr(e,t),n;c=!0,s=[0,[Kn,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Kn?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Qn(e,u);try{await Zn(i?Promise.resolve().then(()=>Vn(m,l===Kn?`errorComponent`:`notFoundComponent`)):Promise.all([Vn(m),Vn(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return hr(e,t),Yn}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),hr(e,t),ar(e,o),p()):u.status=`success`}return t}async function yr(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Qn(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await Zn(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function br(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await mr(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=pr(e,i,t,u,f,r,l)},m=await nr(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===qn){let t=await mr(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=Jn&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=vr(e,i,u,r[0],gr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=gr(i[2],void 0,void 0,h.then(e=>Xn(e)?0:Hn(n).length,()=>0))),o=await h}catch(t){if(hr(e,i),t===a&&a.aborted)return Yn;throw t}return Xn(o)?o:yr(e,o,a,r[6]===n.length?r[6]:0)}function xr(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=Qn(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>xr(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Sr(e,t){let n=e._pending;e._tx!==t&&e._tx?.[3].some(e=>e.id===n?.[1])||(clearTimeout(n?.[3]),e._pending=void 0)}async function Cr(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Hn(t[3]).some(e=>e.id===n[1]))return;let i;try{await Zn(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function wr(e,t){e._committed=t,e.stores.setMatches(t)}function Tr(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Hn(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=Qn(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Tn(n);wr(e,n),ar(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),En(e,i,n,a,l,t)}async function Er(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Dr(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Or(e,t,n,r,i){let a=n.map(e=>({...e}));or(a);for(let t of r)ir(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await vr(e,o,r,t[0],i)}catch(t){throw ar(e,a),t}if(Xn(s))ar(e,a),s[0]===Jn&&e._tx===t&&e._committed===n&&await Dr(e,t,s);else if(await yr(e,s,t[0].signal),e._tx!==t||e._committed!==n)ar(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),ir(e,n))}wr(e,a),ar(e,n,a)}}async function kr(e,t,n,r,i,a){let o=await br(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Xn(o)){let n=o[0]===Jn&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Sr(e,t),ar(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Sr(e,t);return}await Dr(e,t,o);return}let s=o[1];if(e._tx===t&&await Cr(e,t),e._tx!==t){Sr(e,t),ar(e,s),hr(e,o);return}let c=t[2],l=Cn(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Cr(e,t),e._tx!==t){Sr(e,t),ar(e,s),hr(e,o);return}let n=await e.startTransition(()=>{Sr(e,t),Tr(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&Or(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):hr(e,o)})}async function Ar(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Cn(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Er(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});or(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){ar(e,m),await Er(e,n);return}e._preflight=void 0;let g,_=()=>kr(e,y,f,()=>xr(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Er(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&sr(e,t,!1)}n[0].abort(),ar(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&xr(e,y),g?.(_()),await y[5]):(ar(e,y[3]),y[3]=[],g?.(),await Er(e,y))}async function jr(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),or(a),o=(e._preloads??=new Map).set(i,a),s=await br(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),ar(e,a)),i.abort()}if(!Xn(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){dt(e)||console.error(e);return}}}var Mr=`Error preloading route! ☝️`;function Nr(e,t){if(e)return typeof e==`string`?e:e[t]}function Pr(e){return e?.scriptFormat??`module`}function Fr(e,t,n){let r=Ir(t),i=Nr(n,`script`)??r.crossOrigin;return{...Pr(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function Ir(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Lr(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function Rr(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function zr(e,t,n,r){let i=Wn(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function Br([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var Vr=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=ft:this.parentRoute||et();let r=n?ft:t?.path;r&&r!==`/`&&(r=nt(r));let i=t?.id||r,a=n?ft:tt((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:tt(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=rt(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>pt({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Hr=class extends Vr{constructor(e){super(e)}};function Ur(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{Un(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var Wr=W.createContext(void 0),Gr=W.createContext(void 0),Kr=t((e=>{var t=s();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),s=r[0].inst,l=r[1];return o(function(){s.value=n,s.getSnapshot=t,u(s)&&l({inst:s})},[e,n,t]),a(function(){return u(s)&&l({inst:s}),e(function(){u(s)&&l({inst:s})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(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=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),qr=t(((e,t)=>{t.exports=Kr()})),Jr=t((e=>{var t=s(),n=qr();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.useSyncExternalStore,o=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var d=o(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(!a){if(a=!0,o=e,e=r(e),s!==void 0&&f.hasValue){var t=f.value;if(s(t,e))return c=t}return c=e}if(t=c,i(o,e))return t;var n=r(e);return s!==void 0&&s(t,n)?(o=e,t):(o=e,c=n)}var a=!1,o,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,s]);var p=a(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Yr=t(((e,t)=>{t.exports=Jr()}))();function Xr(e,t){return e===t}function Zr(e,t=e=>e,n){let r=n?.compare??Xr,i=(0,W.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,W.useCallback)(()=>e.get(),[e]);return(0,Yr.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function Qr({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function $r(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var ei=[],ti=0,{link:ni,unlink:ri,propagate:ii,checkDirty:ai,shallowPropagate:oi}=Qr({update(e){return e._update()},notify(e){ei[ci++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,fi(e))}}),si=0,ci=0,li,ui=0;function di(e){try{++ui,e()}finally{--ui||pi()}}function fi(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=ri(n,e)}function pi(){if(!(ui>0)){for(;si<ci;){let e=ei[si];ei[si++]=void 0,e.notify()}si=0,ci=0}}function mi(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return li!==void 0&&ni(i,li,ti),i._snapshot},subscribe(e){let t=$r(e),n={current:!1},r=hi(()=>{i.get(),n.current?(li=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=li,o=t?.compare??Object.is;if(n)li=i,++ti,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{li=a,n&&(i.flags&=-5),fi(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&ai(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&oi(e)}}else e&32&&(i.flags=e&-33);return li!==void 0&&ni(i,li,ti),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ii(e),oi(e),pi())}},i}function hi(e){let t=()=>{let t=li;li=n,++ti,n.depsTail=void 0,n.flags=6;try{return e()}finally{li=t,n.flags&=-5,fi(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&ai(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,fi(this)}};return t(),n}var gi={};function _i(e,t){let n=W.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=Le(n.current,i):i}}function vi(e){let t=Ae(),n=W.useContext(e.from?Gr:Wr),r=e.from??n,i=t.stores.getMatchStore(r),a=_i(e,t),o=Zr(i,e=>e?a(e):gi);if(o!==gi)return o;(e.shouldThrow??!0)&&et()}function yi(e){return vi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function bi(e){let{select:t,...n}=e;return vi({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function xi(e){return vi({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Si(e){return vi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var Ci=W.use,wi=W.useLayoutEffect;function Ti(e){let t=Ae();return W.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ei(e){return vi({...e,select:t=>e.select?e.select(t.context):t.context})}var G=a();function Di(...e){let t=W.useRef(e),n=t.current;return e.forEach((e,t)=>{ze(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Oi(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(Mr)})}function ki(e,t){let n=typeof e==`string`&&Ge(e);if(n)return t.has(n)?e:null}function Ai(e,t,n,r){let i=at(e.pathname,r),a=at(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!ze(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function ji(e,t,n){let r=Ae(),i=W.useRef(null),a=W.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:_}=e,[v,y,b]=Di(e.search,e.params,o),x=W.useContext(Wr),S=(r.stores._linkScopes??={})[x]??=Ur(r,x),[C,w,T]=W.useMemo(()=>{let t=ki(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=S[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=zi(t,r,u),s=u||o&&!Ge(o)?Ai(e,t,b,r.basepath):void 0;a&&a[0]===o&&a[1]===s||(a=[o,s]),i=e}return a};return[n,c,b?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,S,e.from,e.hash,e.href,s,v,y,e.state,e.mask,e.unsafeRelative,b,u]),[E,D]=W.useSyncExternalStore(S[1],w,T||w),O=D===void 0&&E,k=u||E===void 0,A=W.useRef(!1),j=e.reloadDocument||O||k?!1:c??r.options.defaultPreload,M=l??r.options.defaultPreloadDelay??0,N=W.useCallback(e=>{let t=e?.isIntersecting;t??j===`intent`?M?i.t??=setTimeout(()=>{i.t=void 0,Oi(r,C)},M):Oi(r,C):t===!1&&Li(i)},[r,C,i,j,M]);W.useEffect(()=>{if(!j)return;j===`render`&&!A.current&&(A.current=!0,Oi(r,C));let e=!0,t;return j===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&N(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),Li(i)}},[r,C,j,N,i]);let P=Fi(e,n);if(P.ref=t?a:i,O)return P.href=O,P;let F=t=>{let n=d??t.currentTarget.getAttribute(`target`);k||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),Li(i),r.navigate({...e,_fromLocation:C._fromLocation}))},I=()=>{j===`intent`&&Oi(r,C)},L=()=>{j===`intent`&&Li(i)};return P.onClick=Ri(f,F),P.onBlur=Ri(p,L),P.onFocus=Ri(m,N),P.onMouseEnter=Ri(h,N),P.onMouseLeave=Ri(g,L),P.onTouchStart=Ri(_,I),Ii(P,e,D,E,k,n)}var Mi={},Ni={className:`active`},Pi=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function Fi(e,t){let n={};for(let r in e)Pi.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function Ii(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=Me(n?o:s,{})??(n?Ni:Mi);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var Li=e=>{clearTimeout(e.t),e.t=void 0},Ri=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function zi(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!qe(i,t.protocolAllowlist))return i}var Bi=W.memo(W.forwardRef((e,t)=>{let n=e._asChild||`a`,r=ji(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return W.createElement(n,r,i)}),Vi);function Vi(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Pi.has(r)||!ze(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var Hi=class extends Vr{constructor(e){super(e),this.useMatch=e=>vi({...e,from:this.id}),this.useRouteContext=e=>Ei({...e,from:this.id}),this.useSearch=e=>Si({...e,from:this.id}),this.useParams=e=>xi({...e,from:this.id}),this.useLoaderDeps=e=>bi({...e,from:this.id}),this.useLoaderData=e=>yi({...e,from:this.id}),this.useNavigate=()=>Ti({from:this.fullPath}),this.Link=W.forwardRef((e,t)=>(0,G.jsx)(Bi,{ref:t,from:this.fullPath,...e}))}};function Ui(e){return new Hi(e)}var Wi=class extends Hr{constructor(e){super(e),this.useMatch=e=>vi({...e,from:this.id}),this.useRouteContext=e=>Ei({...e,from:this.id}),this.useSearch=e=>Si({...e,from:this.id}),this.useParams=e=>xi({...e,from:this.id}),this.useLoaderDeps=e=>bi({...e,from:this.id}),this.useLoaderData=e=>yi({...e,from:this.id}),this.useNavigate=()=>Ti({from:this.fullPath}),this.Link=W.forwardRef((e,t)=>(0,G.jsx)(Bi,{ref:t,from:this.fullPath,...e}))}};function Gi(e){return new Wi(e)}function Ki(e){return e=>{let t=Ui(e);return t.isRoot=!1,t}}function qi(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(Be(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(Ci)Ci(a());else throw a()}return W.createElement(r,e)};return o.preload=a,o}var Ji=e=>({createMutableStore:mi,createReadonlyStore:mi,batch:di}),Yi=e=>new Xi(e),Xi=class extends Dn{constructor(e){super(e,Ji)}},Zi=class extends W.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?W.createElement(this.props.errorComponent??Qi,{error:e[0],reset:this.reset}):this.props.children}};function Qi({error:e}){let[t,n]=W.useState(!1);return(0,G.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,G.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,G.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,G.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,G.jsx)(`div`,{children:(0,G.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,G.jsx)(`code`,{children:e.message}):null})}):null]})}function $i(e,t){let n=e[1];e.length=0,n?.(t)}function ea({t:e}){let t=Ae(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{$i(n,!1),n.push(i,a),e(t),W.startTransition(r)}),wi(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(rt(r.publicHref)!==rt(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Cn(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}var ta=()=>!0,na=()=>!1;function ra({children:e,fallback:t=null}){return(0,G.jsx)(W.Fragment,{children:ia()?e:t})}function ia(e=!0){return W.useSyncExternalStore(aa,ta,e?na:ta)}function aa(){return()=>{}}function oa(e){let t=Ae(),n=`not-found-${Zr(t.stores.location,e=>e.pathname)}-${Zr(t.stores.status)}`;return(0,G.jsx)(Zi,{getResetKey:()=>n,onCatch:(t,n)=>{if(dt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(dt(t))return e.fallback?.(t);throw t},children:e.children})}function sa(){return(0,G.jsx)(`p`,{children:`Not Found`})}function ca(e,t,n){return t.options.notFoundComponent?(0,G.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,G.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,G.jsx)(sa,{})}function la(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,G.jsx)(n,{}):null}var ua=(e,t)=>e[0]===t[0]&&e[1]===t[1],da=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,fa=W.memo(function({routeId:e}){let t=Ae();return pa(t,Zr(t.stores.getMatchStore(e)))});function pa(e,t){let n=e.routesById[t.routeId],r=la(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=da(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,G.jsx)(ma,{match:t});s&&(l=(0,G.jsx)(ra,{fallback:r,children:l})),o&&(l=(0,G.jsx)(oa,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return W.createElement(o,e)},children:l})),i&&(l=(0,G.jsx)(Zi,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(dt(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,G.jsx)(W.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,G.jsx)(Wr.Provider,{value:t.routeId,children:(0,G.jsxs)(u,{children:[l,null]})}):(0,G.jsxs)(Wr.Provider,{value:t.routeId,children:[l,null]})}var ma=W.memo(function({match:e}){let t=Ae(),n=e.routeId,r=t.routesById[n],i=W.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=W.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,G.jsx)(e,{},i):(0,G.jsx)(ha,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!da(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return la(t,r)}if(e.status===`notFound`)return ca(t,r,e.error);if(e.status===`error`)throw e.error;return a}),ha=W.memo(function(){let e=Ae(),t=W.useContext(Wr),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Zr(a,e=>[!!e._notFound,e.error],{compare:ua}),i=Zr(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ca(e,e.routesById[t],r);if(!i)return null;let a=(0,G.jsx)(fa,{routeId:i});return t===`__root__`?(0,G.jsx)(W.Suspense,{fallback:la(e),children:a}):a});function ga(){let e=Ae(),t=e.routesById[ft],n=la(e,t),r=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ea,{t:W.useState()[1]}),e.ssr?(0,G.jsx)(_a,{}):(0,G.jsx)(W.Suspense,{fallback:n,children:(0,G.jsx)(_a,{})})]});return e.options.InnerWrap?(0,G.jsx)(e.options.InnerWrap,{children:r}):r}function _a(){let e=Ae(),t=e._rendered,n=Zr(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;wi(()=>{t[0]===n&&$i(t,!0)},[t,n]);let a=i?(0,G.jsx)(fa,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,G.jsx)(Zi,{getResetKey:()=>r,onCatch:void 0,children:a})}function va({router:e,children:t,...n}){Pe(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,G.jsx)(ke.Provider,{value:e,children:t});return e.options.Wrap?(0,G.jsx)(e.options.Wrap,{children:r}):r}function ya({router:e,...t}){return(0,G.jsx)(va,{router:e,...t,children:(0,G.jsx)(ga,{})})}function ba(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function xa(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=W.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,G.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,G.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,G.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,G.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,G.jsx)(Sa,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Sa({attrs:e,children:t,preventScriptHoist:n}){Ae();let r=ia(),i=W.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(W.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return ba(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,ba(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,G.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function Ca(e,t,n,r){n=Wn(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:Xe(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),l=e.ssr?.manifest,u=[];l&&(n.forEach(e=>{(l.routes[e.routeId]?.css)?.forEach(e=>{let n=Rr(e);u.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:Nr(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),l.inlineStyle&&u.push({tag:`style`,attrs:{...l.inlineStyle.attrs,nonce:t},children:l.inlineStyle.children,inlineCss:!0}));let d=[];l&&n.forEach(e=>{l.routes[e.routeId]?.preloads?.forEach(e=>{d.push({tag:`link`,attrs:{...Fr(l,e,r),nonce:t}})})});let f=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),p=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),m=[];return Lr(m,a),m.push(...d),Lr(m,c),m.push(...u),Lr(m,f),Lr(m,p),m}var wa=e=>{let t=Ae(),n=t.options.ssr?.nonce,r=W.useCallback(r=>Ca(t,n,r,e),[e,n,t]);return Zr(t.stores.matches,r,{compare:ze})};function Ta(e){let t=wa(e.assetCrossOrigin),n=Ae().options.ssr?.nonce;return(0,G.jsx)(G.Fragment,{children:t.map(e=>(0,W.createElement)(xa,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Ea={suppressHydrationWarning:!0},Da=()=>{let e=Ae(),t=e.options.ssr?.nonce,n=n=>{let r=zr(n,e.ssr?.manifest,t,Ea);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return Oa(Zr(e.stores.matches,e=>Br(n(e)),{compare:ze}))};function Oa(e){return(0,G.jsx)(G.Fragment,{children:e.map((e,t)=>(0,W.createElement)(xa,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var ka=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Aa(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:ka(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var ja=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Ma=e=>{let t=ja(e);return t.charAt(0).toUpperCase()+t.slice(1)},Na=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Pa={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Fa(e){return e!=null}function Ia(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Pa.width,a=e.size??e.height??Pa.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Na(...c):Na(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Pa[`stroke-width`])*Number(e.size??e.width??Pa.width)/Number(t.size??t.width??Pa.width):t.strokeWidth??Pa[`stroke-width`];return[`svg`,{...Object.entries(Pa).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Fa(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Fa(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Fa(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function La(e,t={}){return Ia(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Ra=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},za=(0,W.createContext)({}),Ba=()=>(0,W.useContext)(za),Va=(0,W.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Ba()??{},y=!!c||Ra(d),[b,x,S=[]]=La(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Na(v,s),hasA11yProp:y,attributes:d});return(0,W.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Ha(e,t=[],n=[]){let r=typeof e==`string`?Aa(e,t,n):e,i=(0,W.forwardRef)(({className:e,...t},n)=>(0,W.createElement)(Va,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ma(r.name)),i}var Ua={name:`octagon-alert`,size:24,node:[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]],aliases:[`alert-octagon`]};Ua.node;var Wa=Ha(Ua),Ga={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Ga.node;var Ka=Ha(Ga),qa={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};qa.node;var Ja=Ha(qa),Ya=o(),Xa=i();function Za(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=Za(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Qa(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Za(e))&&(r&&(r+=` `),r+=t);return r}var $a=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,eo=Qa,to=(e,t)=>n=>{if(t?.variants==null)return eo(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=$a(t)||$a(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return eo(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},no=(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},ro=(e,t)=>({classGroupId:e,validator:t}),io=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ao=`-`,oo=[],so=`arbitrary..`,co=e=>{let t=fo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return uo(e);let n=e.split(ao);return lo(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?no(i,t):t:i||oo}return n[e]||oo}}},lo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=lo(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ao):e.slice(t).join(ao),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},uo=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?so+r:void 0})(),fo=e=>{let{theme:t,classGroups:n}=e;return po(n,t)},po=(e,t)=>{let n=io();for(let r in e){let i=e[r];mo(i,n,r,t)}return n},mo=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ho(i,t,n,r)}},ho=(e,t,n,r)=>{typeof e==`string`?go(e,t,n):typeof e==`function`?_o(e,t,n,r):vo(e,t,n,r)},go=(e,t,n)=>{let r=e===``?t:yo(t,e);r.classGroupId=n},_o=(e,t,n,r)=>{bo(e)?mo(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(ro(n,e)))},vo=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];mo(o,yo(t,a),n,r)}},yo=(e,t)=>{let n=e,r=t.split(ao),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=io(),n.nextPart.set(t,i)),n=i}return n},bo=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,xo=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)}}},So=`!`,Co=`:`,wo=[],To=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Eo=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===Co){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(So)?(c=s.slice(0,-1),l=!0):s.startsWith(So)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return To(t,l,c,u)};if(t){let e=t+Co,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):To(wo,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Do=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}},Oo=e=>({cache:xo(e.cacheSize),parseClassName:Eo(e),sortModifiers:Do(e),postfixLookupClassGroupIds:ko(e),...co(e)}),ko=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+/,jo=(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||(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?_+So:_,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},Mo=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=No(n))&&(i&&(i+=` `),i+=r);return i},No=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=No(e[r]))&&(n&&(n+=` `),n+=t);return n},Po=(e,...t)=>{let n,r,i,a,o=o=>(n=Oo(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=jo(e,n);return i(e,a),a};return a=o,(...e)=>a(Mo(...e))},Fo=[],Io=e=>{let t=t=>t[e]||Fo;return t.isThemeGetter=!0,t.themeKey=e,t},Lo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ro=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zo=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Bo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vo=/\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$/,Ho=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Uo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Go=e=>zo.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),Ko=e=>!!e&&Number.isInteger(Number(e)),qo=e=>e.endsWith(`%`)&&K(e.slice(0,-1)),Jo=e=>Bo.test(e),Yo=()=>!0,Xo=e=>Vo.test(e)&&!Ho.test(e),Zo=()=>!1,Qo=e=>Uo.test(e),$o=e=>Wo.test(e),es=e=>!q(e)&&!J(e),ts=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)),ns=e=>_s(e,xs,Zo),q=e=>Lo.test(e),rs=e=>_s(e,Ss,Xo),is=e=>_s(e,Cs,K),as=e=>_s(e,Ts,Yo),os=e=>_s(e,ws,Zo),ss=e=>_s(e,ys,Zo),cs=e=>_s(e,bs,$o),ls=e=>_s(e,Es,Qo),J=e=>Ro.test(e),us=e=>vs(e,Ss),ds=e=>vs(e,ws),fs=e=>vs(e,ys),ps=e=>vs(e,xs),ms=e=>vs(e,bs),hs=e=>vs(e,Es,!0),gs=e=>vs(e,Ts,!0),_s=(e,t,n)=>{let r=Lo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vs=(e,t,n=!1)=>{let r=Ro.exec(e);return r?r[1]?t(r[1]):n:!1},ys=e=>e===`position`||e===`percentage`,bs=e=>e===`image`||e===`url`,xs=e=>e===`length`||e===`size`||e===`bg-size`,Ss=e=>e===`length`,Cs=e=>e===`number`,ws=e=>e===`family-name`,Ts=e=>e===`number`||e===`weight`,Es=e=>e===`shadow`,Ds=Po(()=>{let e=Io(`color`),t=Io(`font`),n=Io(`text`),r=Io(`font-weight`),i=Io(`tracking`),a=Io(`leading`),o=Io(`breakpoint`),s=Io(`container`),c=Io(`spacing`),l=Io(`radius`),u=Io(`shadow`),d=Io(`inset-shadow`),f=Io(`text-shadow`),p=Io(`drop-shadow`),m=Io(`blur`),h=Io(`perspective`),g=Io(`aspect`),_=Io(`ease`),v=Io(`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(),J,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,q,c],T=()=>[Go,`full`,`auto`,...w()],E=()=>[Ko,`none`,`subgrid`,J,q],D=()=>[`auto`,{span:[`full`,Ko,J,q]},Ko,J,q],O=()=>[Ko,`auto`,J,q],k=()=>[`auto`,`min`,`max`,`fr`,J,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=()=>[Go,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,Go,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Go,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,J,q],L=()=>[...b(),fs,ss,{position:[J,q]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ee=()=>[`auto`,`cover`,`contain`,ps,ns,{size:[J,q]}],z=()=>[qo,us,rs],B=()=>[``,`none`,`full`,l,J,q],V=()=>[``,K,us,rs],te=()=>[`solid`,`dashed`,`dotted`,`double`],ne=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],H=()=>[K,qo,fs,ss],U=()=>[``,`none`,m,J,q],re=()=>[`none`,K,J,q],ie=()=>[`none`,K,J,q],ae=()=>[K,J,q],oe=()=>[Go,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Jo],breakpoint:[Jo],color:[Yo],container:[Jo],"drop-shadow":[Jo],ease:[`in`,`out`,`in-out`],font:[es],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Jo],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Jo],shadow:[Jo],spacing:[`px`,K],text:[Jo],"text-shadow":[Jo],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Go,q,J,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,J,q]}],"container-named":[ts],columns:[{columns:[K,`auto`,q,J,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:[Ko,`auto`,J,q]}],basis:[{basis:[Go,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[K,Go,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,K,J,q]}],shrink:[{shrink:[``,K,J,q]}],order:[{order:[Ko,`first`,`last`,`none`,J,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`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],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`,`none`,...N()]}],"font-size":[{text:[`base`,n,us,rs]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,gs,as]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,qo,q]}],"font-family":[{font:[ds,os,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,J,q]}],"line-clamp":[{"line-clamp":[K,`none`,J,is]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,J,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...te(),`wavy`]}],"text-decoration-thickness":[{decoration:[K,`from-font`,`auto`,J,rs]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[K,`auto`,J,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:[Ko,J,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,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`,J,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:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ko,J,q],radial:[``,J,q],conic:[``,Ko,J,q]},ms,cs]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-bs":[{"border-bs":V()}],"border-w-be":[{"border-be":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":V()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...te(),`hidden`,`none`]}],"divide-style":[{divide:[...te(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...te(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[K,J,q]}],"outline-w":[{outline:[``,K,us,rs]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,hs,ls]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,hs,ls]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:V()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[K,rs]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,hs,ls]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[K,J,q]}],"mix-blend":[{"mix-blend":[...ne(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ne()}],"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":[K]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[J,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":[K]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,q]}],filter:[{filter:[``,`none`,J,q]}],blur:[{blur:U()}],brightness:[{brightness:[K,J,q]}],contrast:[{contrast:[K,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,hs,ls]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,K,J,q]}],"hue-rotate":[{"hue-rotate":[K,J,q]}],invert:[{invert:[``,K,J,q]}],saturate:[{saturate:[K,J,q]}],sepia:[{sepia:[``,K,J,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,q]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[K,J,q]}],"backdrop-contrast":[{"backdrop-contrast":[K,J,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,K,J,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,J,q]}],"backdrop-invert":[{"backdrop-invert":[``,K,J,q]}],"backdrop-opacity":[{"backdrop-opacity":[K,J,q]}],"backdrop-saturate":[{"backdrop-saturate":[K,J,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,K,J,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`,J,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[K,`initial`,J,q]}],ease:[{ease:[`linear`,`initial`,_,J,q]}],delay:[{delay:[K,J,q]}],animate:[{animate:[`none`,v,J,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":[`scale-3d`],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":[`translate-none`],zoom:[{zoom:[Ko,J,q]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,J,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":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"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`,J,q]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[K,us,rs,is]}],stroke:[{stroke:[`none`,...I()]}],"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":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`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-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`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-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`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-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`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 Os(...e){return Ds(Qa(e))}var ks=l(c(),Se(ve,e=>h(e.message)||e.message===`Error`?e.name:e.message),Se(H,e=>l(e,he,M(e=>Ce(f(e.message),{onFalse:()=>e.name,onTrue:()=>e.message})),Te(`
|
|
4
|
-
`))),Se(C(`message`),e=>N(e.message)),Se(B,e=>N(e)),Se(ee,()=>`Error`),Se(L,e=>g(p(j))(e)),A(()=>`Unknown Error`)),As=to(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2 py-1.5 text-left text-xs/relaxed has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-3.5`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function js(e){let t=(0,Xa.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]!==n||t[5]!==i?(a=Os(As({variant:i}),n),t[4]=n,t[5]=i,t[6]=a):a=t[6];let o;return t[7]!==r||t[8]!==a?(o=(0,G.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:a,...r}),t[7]=r,t[8]=a,t[9]=o):o=t[9],o}function Ms(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{"data-slot":`alert-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ns(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`text-xs/relaxed text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{"data-slot":`alert-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ps(){return typeof window<`u`}function Fs(e){return Rs(e)?(e.nodeName||``).toLowerCase():`#document`}function Is(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ls(e){return((Rs(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Rs(e){return Ps()?e instanceof Node||e instanceof Is(e).Node:!1}function zs(e){return Ps()?e instanceof Element||e instanceof Is(e).Element:!1}function Bs(e){return Ps()?e instanceof HTMLElement||e instanceof Is(e).HTMLElement:!1}function Vs(e){return!Ps()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Is(e).ShadowRoot}function Hs(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$s(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Us(e){return/^(table|td|th)$/.test(Fs(e))}function Ws(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Gs=/transform|translate|scale|rotate|perspective|filter/,Ks=/paint|layout|strict|content/,qs=e=>!!e&&e!==`none`,Js;function Ys(e){let t=zs(e)?$s(e):e;return qs(t.transform)||qs(t.translate)||qs(t.scale)||qs(t.rotate)||qs(t.perspective)||!Zs()&&(qs(t.backdropFilter)||qs(t.filter))||Gs.test(t.willChange||``)||Ks.test(t.contain||``)}function Xs(e){let t=tc(e);for(;Bs(t)&&!Qs(t);){if(Ys(t))return t;if(Ws(t))return null;t=tc(t)}return null}function Zs(){return Js??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Js}function Qs(e){return/^(html|body|#document)$/.test(Fs(e))}function $s(e){return Is(e).getComputedStyle(e)}function ec(e){return zs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tc(e){if(Fs(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Vs(e)&&e.host||Ls(e);return Vs(t)?t.host:t}function nc(e){let t=tc(e);return Qs(t)?(e.ownerDocument||e).body:Bs(t)&&Hs(t)?t:nc(t)}function rc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=nc(e),i=r===e.ownerDocument?.body,a=Is(r);if(i){let e=ic(a);return t.concat(a,a.visualViewport||[],Hs(r)?r:[],e&&n?rc(e):[])}return t.concat(r,rc(r,[],n))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var ac={...W},oc={};function sc(e,t){let n=W.useRef(oc);return n.current===oc&&(n.current=e(t)),n}var cc=ac.useInsertionEffect,lc=cc&&cc!==ac.useLayoutEffect?cc:e=>e();function Y(e){let t=sc(uc).current;return t.next=e,lc(t.effect),t.trampoline}function uc(){let e={next:void 0,callback:dc,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function dc(){}var X=typeof document<`u`?W.useLayoutEffect:()=>{};function fc(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var pc={};function mc(e,t,n,r,i){if(!n&&!r&&!i&&!e)return gc(t);let a=gc(e);return t&&(a=_c(a,t)),n&&(a=_c(a,n)),r&&(a=_c(a,r)),i&&(a=_c(a,i)),a}function hc(e){if(e.length===0)return pc;if(e.length===1)return gc(e[0]);let t=gc(e[0]);for(let n=1;n<e.length;n+=1)t=_c(t,e[n]);return t}function gc(e){return xc(e)?{...e(pc)}:vc(e)}function _c(e,t){return xc(t)?t(e):yc(e,t)}function vc(e){let t={...e};for(let e in t){let n=t[e];bc(e,n)&&(t[e]=Cc(n))}return t}function yc(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=fc(e.style,r);break;case`className`:e[n]=Tc(e.className,r);break;default:e[n]=bc(n,r)?Sc(e[n],r):r}}return e}function bc(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 xc(e){return typeof e==`function`}function Sc(e,t){return t?e?(...n)=>{let r=n[0];if(Ec(r)){let i=r;wc(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Cc(t):e}function Cc(e){return e&&((...t)=>{let n=t[0];return Ec(n)&&wc(n),e(...t)})}function wc(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Tc(e,t){return t?e?t+` `+e:t:e}function Ec(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Dc(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 Oc=Dc(`https://base-ui.com/production-error`,`Base UI`),kc=W.createContext(void 0);function Ac(e=!1){let t=W.useContext(kc);if(t===void 0&&!e)throw Error(Oc(16));return t}function jc(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:W.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||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Z(e){return e?.ownerDocument||document}function Mc(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Is(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Nc(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=W.useRef(null),s=Ac(!0),c=a??s!==void 0,{props:l}=jc({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=W.useCallback(()=>{let e=o.current;Pc(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return X(u,[u]),{getButtonProps:W.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return mc({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(wc(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Pc(r),s=!i&&Fc(r),l=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&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),Mc(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Mc(r,e)))},onKeyUp(e){t||(wc(e),a?.(e),e.target===e.currentTarget&&i&&c&&Pc(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),Mc(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Y(e=>{o.current=e,u()})}}function Pc(e){return Bs(e)&&e.tagName===`BUTTON`}function Fc(e){return Bs(e)&&e.tagName===`A`&&!!e.href}function Ic(e,t,n,r){let i=sc(Rc).current;return zc(i,e,t,n,r)&&Vc(i,[e,t,n,r]),i.callback}function Lc(e){let t=sc(Rc).current;return Bc(t,e)&&Vc(t,e),t.callback}function Rc(){return{callback:null,cleanup:null,refs:[]}}function zc(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Bc(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Vc(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null: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 Hc=19;function Uc(e){return Hc>=e}function Wc(e){if(!W.isValidElement(e))return null;let t=e,n=t.props;return(Uc(19)?n?.ref:t.ref)??null}function Gc(){}var Kc=Object.freeze([]),qc=Object.freeze({});function Jc(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)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Yc(e,t){return typeof e==`function`?e(t):e}function Xc(e,t){return typeof e==`function`?e(t):e}function Zc(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=tl(r));let i=Qc(t,n,r);if(n.enabled===!1)return null;let a=n.state??qc;return nl(e,r,i,a)}function Qc(e,t,n){let{className:r,style:i}=e,{state:a=qc,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Yc(r,a):void 0,d=l?Xc(i,a):void 0,f=l?Jc(a,c):qc,p=l&&s?$c(s):void 0,m=l?fc(f,p)??{}:qc;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Lc([m.ref,Wc(n),...o]):Ic(m.ref,Wc(n),o):Ic(null,null)),l?(u!==void 0&&(m.className=Tc(m.className,u)),d!==void 0&&(m.style=fc(m.style,d)),m):qc}function $c(e){return Array.isArray(e)?hc(e):mc(void 0,e)}var el=Symbol.for(`react.lazy`);function tl(e){if(e?.$$typeof!==el)return e;let t=W.Children.toArray(e)[0];return W.isValidElement(t)?t:e}function nl(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=mc(n,t.props);return e.ref=n.ref,W.cloneElement(t,e)}return rl(e,n)}function rl(e,t){return e===`button`?(0,W.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,W.createElement)(`img`,{alt:``,...t,key:t.key}):W.createElement(e,t)}var il=W.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Nc({disabled:i,focusableWhenDisabled:a,native:o});return Zc(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),al=to(`group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,xs:`h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5`,sm:`h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,lg:`h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4`,icon:`size-7 [&_svg:not([class*='size-'])]:size-3.5`,"icon-xs":`size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5`,"icon-sm":`size-6 [&_svg:not([class*='size-'])]:size-3`,"icon-lg":`size-8 [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`,size:`default`}});function ol(e){let t=(0,Xa.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:i,size:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`default`:i,s=a===void 0?`default`:a,c;t[5]!==n||t[6]!==s||t[7]!==o?(c=Os(al({variant:o,size:s,className:n})),t[5]=n,t[6]=s,t[7]=o,t[8]=c):c=t[8];let l;return t[9]!==r||t[10]!==c?(l=(0,G.jsx)(il,{"data-slot":`button`,className:c,...r}),t[9]=r,t[10]=c,t[11]=l):l=t[11],l}function sl(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{"data-slot":`empty`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function cl(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`flex max-w-sm flex-col items-center gap-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{"data-slot":`empty-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ll(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`text-sm font-medium tracking-tight`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{"data-slot":`empty-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ul(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`text-xs/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{"data-slot":`empty-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function dl(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`flex w-full max-w-sm min-w-0 flex-col items-center gap-2 text-xs/relaxed text-balance`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{"data-slot":`empty-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fl(){let e=(0,Xa.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,G.jsx)(cl,{children:(0,G.jsx)(ll,{children:`Page not found`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,G.jsxs)(sl,{children:[t,(0,G.jsx)(dl,{children:(0,G.jsx)(`a`,{className:al({variant:`outline`}),href:`/`,children:`Go home`})})]}),e[1]=n):n=e[1],n}function pl(e){let t=(0,Xa.c)(3),n,r;return t[0]===e.href?(n=t[1],r=t[2]):(n=()=>{location.replace(e.href)},r=[e.href],t[0]=e.href,t[1]=n,t[2]=r),(0,W.useEffect)(n,r),null}function ml(e){let t=(0,Xa.c)(16),n;t[0]===e.error?n=t[1]:(n=ks(e.error),t[0]=e.error,t[1]=n);let r=n,i,a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(Wa,{}),a=(0,G.jsx)(Ms,{children:`Something went wrong`}),t[2]=i,t[3]=a):(i=t[2],a=t[3]);let o;t[4]===r?o=t[5]:(o=(0,G.jsxs)(js,{variant:`destructive`,className:`w-full max-w-lg select-text`,children:[i,a,(0,G.jsx)(Ns,{className:`wrap-break-word whitespace-pre-wrap`,children:r})]}),t[4]=r,t[5]=o);let s;t[6]===r?s=t[7]:(s=(0,G.jsx)(ol,{variant:`ghost`,onClick:async()=>{await navigator.clipboard.writeText(r)},children:`Copy error`}),t[6]=r,t[7]=s);let c;t[8]===e.reset?c=t[9]:(c=(0,G.jsx)(ol,{onClick:e.reset,children:`Try again`}),t[8]=e.reset,t[9]=c);let l;t[10]!==s||t[11]!==c?(l=(0,G.jsxs)(`div`,{className:`flex gap-2`,children:[s,c]}),t[10]=s,t[11]=c,t[12]=l):l=t[12];let u;return t[13]!==o||t[14]!==l?(u=(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4 p-4`,children:[o,l]}),t[13]=o,t[14]=l,t[15]=u):u=t[15],u}var hl=class extends we()(`AuthError`,{cause:v(xe()),error:b(re([`invalid_request`,`invalid_client`,`invalid_client_metadata`,`invalid_redirect_uri`,`invalid_grant`,`invalid_target`,`invalid_scope`,`unsupported_grant_type`,`unsupported_response_type`,`access_denied`,`temporarily_unavailable`])),message:ae}){},gl=te({id:ge,name:ge});ae.check(se(/^https:\/\/[a-z\d-]+\.mp281x\.xyz(?:\/mcp)?$/u)),te({accessToken:ge,clientId:ge,expiresAt:U,refreshToken:ge}),te({client_id:ge}),te({access_token:ge,expires_in:U,refresh_token:ge}),ae.check(k(e=>{if(!URL.canParse(e))return!1;let t=new URL(e);return De([`http:`,`https:`],t.protocol)&&t.username===``&&t.password===``&&t.hash===``},{expected:`an HTTP(S) URL without credentials or a fragment`})).check(k(e=>{if(!URL.canParse(e))return!1;let t=new URL(e);return t.pathname===`/`&&t.search===``},{expected:`an HTTP(S) origin without a path or query`})).check(k(e=>{if(!URL.canParse(e))return!1;let t=new URL(e);return t.protocol===`https:`||De([`localhost`,`127.0.0.1`,`[::1]`],t.hostname)},{expected:`HTTPS outside loopback`})),ae.check(se(/^\d{1,5}$/u),k(e=>u(oe(e),e=>e>=1&&e<=65535),{expected:`a port between 1 and 65535`}));var _l=ae.check(se(/^0\.1\.\d+$/u)),vl=te({auth:b(ae),name:ae,traces:ae,version:_l});te({...gl.fields,signOut:pe}),te({config:te({port:ue}),name:ae,version:_l});function yl(e,t,n){return y(F(function*(){let r=`${yield*ye}`,i={attributes:{"scope.run.started_unix_nano":r,"scope.runtime":n,"service.instance.id":r},serviceName:e};return l(T(fe({exportInterval:`250 millis`,resource:i,url:new URL(`/v1/traces`,t).href}),be({exportInterval:`250 millis`,resource:i,url:new URL(`/v1/logs`,t).href})),O([ne,_e]))}))}function bl(e,t){let n=document.querySelector(`#root`);if(S(n))throw TypeError(`Missing application mount element with id "root"`);return{root:n,router:Yi({context:{},defaultErrorComponent:ml,defaultNotFoundComponent:fl,defaultPreload:`intent`,getScrollRestorationKey:t,routeTree:e,scrollRestoration:!0})}}var xl=l(me({pingTimeout:`15 seconds`,retryTransientErrors:!0}),O(l(ie(le(()=>`${location.origin}/api/rpc`)),O(V))),_(de()));function Sl(e){return m.addGlobalLayer(l(y(F(function*(){let t=yield*(yield*x).get(`/api/runtime`),n=yield*z(vl)(t);return n.traces===``?w:yl(`${e}-client`,n.traces,`web`)})),O(_e))),xl}var Cl=e(n(),1);function wl(e){let t=Cl.unstable_scheduleCallback(4,e);return()=>Cl.unstable_cancelCallback(t)}var Tl=W.createContext(D({scheduleTask:wl,defaultIdleTTL:400})),El=new WeakMap,Dl=0,Ol=new Set;function kl(e){Dl++;try{return e()}finally{Dl--}}function Al(e){if(Dl===0)return e();Ol.size===0&&queueMicrotask(jl),Ol.add(e)}function jl(){for(let e of Ol)Ol.delete(e),e()}function Ml(e,t){let n=El.get(e);n===void 0&&(n=new WeakMap,El.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i=0,a,o={subscribe(n){i++;let r=e.subscribe(t,()=>Al(n));return()=>{i--,Ol.delete(n),r()}},snapshot(){return kl(()=>e.get(t))},getServerSnapshot(){return(i===0||a===void 0)&&(a={value:kl(()=>Ee(t,e))}),a.value}};return n.set(t,o),o}function Nl(e,t){let n=Ml(e,t);return W.useEffect(jl),W.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}function Pl(e,t,n){let r=Ml(e,t),i=W.useMemo(()=>{let e;return t=>(e!==void 0&&Object.is(e.source,t)||(e={source:t,value:n(t)}),e.value)},[n]);return W.useEffect(jl),W.useSyncExternalStore(r.subscribe,()=>i(r.snapshot()),()=>i(r.getServerSnapshot()))}var Fl=(e,t)=>{let n=W.useContext(Tl);return t?Pl(n,e,t):Nl(n,e)},Il=W.createContext(void 0);function Ll(){let e=W.useContext(Il);if(e===void 0)throw Error(Oc(13));return e}var Rl={imageLoadingStatus:()=>null},zl=W.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[o,s]=W.useState(`idle`),c={imageLoadingStatus:o},l=W.useMemo(()=>({imageLoadingStatus:o,setImageLoadingStatus:s}),[o,s]),u=Zc(`span`,e,{state:c,ref:t,props:a,stateAttributesMapping:Rl});return(0,G.jsx)(Il.Provider,{value:l,children:u})});function Bl(e){W.useEffect(e,Kc)}var Vl=null;globalThis.requestAnimationFrame;var Hl=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.callbacks[t]=null,--this.callbacksCount)}},Ul=class e{static create(){return new e}static request(e){return Hl.request(e)}static cancel(e){return Hl.cancel(e)}currentId=Vl;request(e){this.cancel(),this.currentId=Hl.request(()=>{this.currentId=Vl,e()})}cancel=()=>{this.currentId!==Vl&&(Hl.cancel(this.currentId),this.currentId=Vl)};disposeEffect=()=>this.cancel};function Wl(){let e=sc(Ul.create).current;return Bl(e.disposeEffect),e}function Gl(e){return e==null?e:`current`in e?e.current:e}function Kl(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var ql=`data-starting-style`,Jl=`data-ending-style`,Yl=e(r(),1),Xl=null;function Zl(e){if(!Xl){let e=[];Xl=e,queueMicrotask(()=>{Xl=null,Yl.flushSync(()=>{for(let t of e)t()})})}Xl.push(e)}function Ql(e,t=!1,n=!1){let r=Wl();return Y((i,a=null)=>{r.cancel();let o=Gl(e);if(o==null)return;let s=o,c=()=>{n?Zl(()=>{a?.aborted||i()}):Yl.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Kl(s).map(e=>e.finished.then(Gc))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Kl(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=ql;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function $l(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=Y(a),s=Ql(r,n,i);W.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var eu={[ql]:``},tu={[Jl]:``},nu={transitionStatus(e){return e===`starting`?eu:e===`ending`?tu:null}};function ru(e,t=!1,n=!1,r=!1){let[i,a]=W.useState(e&&t?`idle`:void 0),[o,s]=W.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),X(()=>{if(!e&&o&&i!==`ending`&&n){let e=Ul.request(()=>{a(`ending`)});return()=>{Ul.cancel(e)}}},[e,o,i,n]),X(()=>{if(!e||t||i===void 0)return;let n=Ul.request(()=>{a(void 0)});return()=>{Ul.cancel(n)}},[t,e,i]),X(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Ul.request(()=>{a(`idle`)});return()=>{Ul.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function iu(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i},a){let o=W.useState(`idle`),s=o[1];return X(()=>{if(!a)return Gc;if(!e&&!i)return s(`error`),Gc;let o=!0,c=new window.Image,l=e=>()=>{o&&s(e)};return s(`loading`),c.onload=l(`loaded`),c.onerror=l(`error`),t&&(c.referrerPolicy=t),c.crossOrigin=n??null,r&&(c.sizes=r),i&&(c.srcset=i),e&&(c.src=e),c.complete&&s(c.naturalWidth>0?`loaded`:`error`),()=>{o=!1}},[a,e,i,r,n,t,s]),o}var au={...Rl,...nu},ou=W.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:i,keepMounted:a=!1,style:o,sizes:s,srcSet:c,src:l,...u}=e,{setImageLoadingStatus:d}=Ll(),[f,p]=iu(l,e,!a),m=f===`loaded`,{mounted:h,transitionStatus:g,setMounted:_}=ru(m),v=W.useRef(null),y=W.useRef(!0);X(()=>{if(!a)return;let e=y.current;y.current=!1;let t=v.current;if(!t)return;if(!t.complete){p(`loading`);return}let n=t.naturalWidth>0?`loaded`:`error`;p(n),n===`loaded`&&e&&_(!0)},[a,l,c,s,u.crossOrigin,u.referrerPolicy,r,p,_]);let b=a?{"data-loading":f===`loading`?``:void 0,"data-error":f===`error`?``:void 0,"aria-hidden":f!==`loaded`||void 0,onLoad(){p(`loaded`)},onError(){p(`error`)}}:void 0,x=Y(e=>{i?.(e),d(e)});X(()=>{f!==`idle`&&x(f)},[f,x]),X(()=>()=>d(`idle`),[d]),$l({enabled:!m,open:m,ref:v,onComplete(){m||_(!1)}});let S={imageLoadingStatus:f,transitionStatus:a&&g===`ending`?void 0:g},C=a||h,w={};s!==void 0&&(w.sizes=s),c!==void 0&&(w.srcSet=c),l!==void 0&&(w.src=l);let T=Zc(`img`,e,{state:S,ref:[t,v],props:[b,u,w],stateAttributesMapping:au,enabled:C});return C?T:null}),su=0,cu=class e{static create(){return new e}currentId=su;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=su,t()},e)}isStarted(){return this.currentId!==su}clear=()=>{this.currentId!==su&&(clearTimeout(this.currentId),this.currentId=su)};disposeEffect=()=>this.clear};function lu(){let e=sc(cu.create).current;return Bl(e.disposeEffect),e}var uu=W.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...o}=e,{imageLoadingStatus:s}=Ll(),[c,l]=W.useState(i===0),u=lu();return W.useEffect(()=>(i>0?u.start(i,()=>l(!0)):l(!0),u.clear),[u,i]),Zc(`span`,e,{state:{imageLoadingStatus:s},ref:t,props:o,stateAttributesMapping:Rl,enabled:s!==`loaded`&&(i===0||c)})});function du(e){let t=(0,Xa.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]===n?o=t[5]:(o=Os(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,G.jsx)(zl,{"data-slot":`avatar`,"data-size":a,className:o,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function fu(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`aspect-square size-full rounded-full object-cover`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(ou,{"data-slot":`avatar-image`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function pu(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(uu,{"data-slot":`avatar-fallback`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var mu=W.createContext(void 0);function hu(e){let t=W.useContext(mu);if(t===void 0&&!e)throw Error(Oc(33));return t}var gu=W.createContext(void 0);function _u(e){let t=W.useContext(gu);if(t===void 0&&!e)throw Error(Oc(36));return t}var vu=`data-open`,yu=`data-closed`,bu=ql,xu=Jl,Su=`data-anchor-hidden`,Cu=`data-popup-open`,wu=`data-pressed`,Tu={[Cu]:``},Eu={[Cu]:``,[wu]:``},Du={[vu]:``},Ou={[yu]:``},ku={[Su]:``},Au={open(e){return e?Tu:null}},ju={open(e){return e?Eu:null}},Mu={open(e){return e?Du:Ou},anchorHidden(e){return e?ku:null}},Nu={...Mu,...nu},Pu=W.createContext(void 0);function Fu(e=!0){let t=W.useContext(Pu);if(t===void 0&&!e)throw Error(Oc(25));return t}var Iu=`none`,Lu=`trigger-press`,Ru=`trigger-hover`,zu=`trigger-focus`,Bu=`outside-press`,Vu=`item-press`,Hu=`close-press`,Uu=`focus-out`,Wu=`escape-key`,Gu=`list-navigation`,Ku=`keyboard`,qu=`pointer`,Ju=`cancel-open`,Yu=`sibling-open`,Xu=`imperative-action`;function Zu({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=W.useRef(e!==void 0),[a,o]=W.useState(()=>t);return[i&&e!==void 0?e:a,W.useCallback(e=>{i||o(e)},[])]}var Qu=W.createContext(null);function $u(e=`root`){let t=W.useContext(Qu),n=W.useContext(gu);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var ed={visible:!0,ref:null};function td(){return ed}function nd(e,t,n=`root`){let r=$u(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??td)({label:e.label,children:e.children,render:e.render}),a=Ic(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}var rd=W.createContext(void 0);function id(){let e=W.useContext(rd);if(e===void 0)throw Error(Oc(30));return e}function ad(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:od,platform:sd,maxTouchPoints:cd}=ad(),ld=od.toLowerCase(),ud=sd.toLowerCase(),dd=/^i(os$|p)/.test(ud)||ud===`macintel`&&cd>1,fd=`android`,pd=ud===fd||ld.includes(fd),md=!dd&&ud.startsWith(`mac`);ud.startsWith(`win`),!pd&&/^(linux|chrome os)/.test(ud);var hd=md||dd,gd=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!gd&&ld.includes(`firefox`),!gd&&ld.includes(`chrom`);var _d=hd,vd=/jsdom|happydom/.test(ld);function yd(e){e.preventDefault()}function bd(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=_u(),u=Fu(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return W.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?yd:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:Vu})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!md&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&Mc(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var xd={type:`regular-item`};function Sd(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=W.useRef(null),{getButtonProps:d,buttonRef:f}=Nc({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=bd({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=W.useCallback(e=>mc(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=Ic(u,f);return W.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Cd=W.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function wd(){return W.useContext(Cd)}function Td(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=wd(),u=W.useRef(-1),[d,f]=W.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=W.useRef(null),h=W.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return X(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function Ed(){let[,e]=W.useState({});return W.useCallback(()=>{e({})},[])}var Dd=0;function Od(e,t=`mui`){let n=W.useRef(void 0),r=Ed(),i=e??n.current;return W.useEffect(()=>{n.current??(Dd+=1,n.current=`${t}-${Dd}`,e??r())},[e,t,r]),i}var kd=ac.useId;function Ad(e,t){if(kd!==void 0){let n=kd();return e??(t?`${t}-${n}`:n)}return Od(e,t)}function jd(e){return Ad(e,`base-ui`)}var Md=`data-checked`,Nd=`data-unchecked`,Pd={checked(e){return e?{[Md]:``}:{[Nd]:``}},...nu};function Fd(e,t,n,r){let i=!1,a=!1,o=r??qc;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}}function Id(e,t,n){let r=n??qc;return{reason:e,event:t??new Event(`base-ui`),...r}}var Ld=W.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,checked:l=!1,onCheckedChange:u,style:d,...f}=e,{store:p}=_u(),m=Td({guess:!0,label:a}),h=jd(i),g=p.useState(`disabled`),_=p.useState(`isActive`,m.index),v=p.useState(`floatingNodeId`),y=p.useState(`itemProps`),b=s||g,{getItemProps:x,itemRef:S}=Sd({closeOnClick:c,disabled:b,highlighted:_,id:h,store:p,nativeButton:o,nodeId:v,itemMetadata:xd}),C=W.useMemo(()=>({disabled:b,highlighted:_,checked:l}),[b,_,l]);function w(e){let t=Fd(Vu,e.nativeEvent,void 0,{preventUnmountOnClose:Gc});u?.(!l,t)}let T=Zc(`div`,e,{state:C,stateAttributesMapping:Pd,props:[y,{role:`menuitemcheckbox`,"aria-checked":l,onClick:w},f,x],ref:[S,t,m.ref]});return(0,G.jsx)(rd.Provider,{value:C,children:T})}),Rd=W.forwardRef(function(e,t){let{checked:n,defaultChecked:r,onCheckedChange:i,...a}=e,[o,s]=Zu({controlled:n,default:r??!1,name:`MenuCheckboxItem`,state:`checked`}),c=nd(e,t);function l(e,t){i?.(e,t),t.isCanceled||s(e)}return c.visible?(0,G.jsx)(Ld,{...a,checked:o,onCheckedChange:l,ref:c.ref}):null}),zd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=id(),c=W.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=ru(s.checked);return $l({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),Zc(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},ref:[t,c],stateAttributesMapping:Pd,props:{"aria-hidden":!0,...o},enabled:a||u})}),Bd=W.createContext(void 0);function Vd(){let e=W.useContext(Bd);if(e===void 0)throw Error(Oc(31));return e}var Hd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=W.useState(void 0),c=Zc(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,G.jsx)(Bd.Provider,{value:s,children:c})}),Ud=W.forwardRef(function(e,t){let n=$u()?.Group??Hd;return(0,G.jsx)(n,{...e,ref:t})}),Wd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=jd(a),c=Vd();return X(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),Zc(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),Gd=W.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,{store:d}=_u(),f=Td({guess:!0,label:a}),p=jd(i),m=d.useState(`disabled`),h=d.useState(`isActive`,f.index),g=d.useState(`floatingNodeId`),_=d.useState(`itemProps`),v=s||m,{getItemProps:y,itemRef:b}=Sd({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:xd});return Zc(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),Kd=W.forwardRef(function(e,t){let n=nd(e,t);return n.visible?(0,G.jsx)(Gd,{...e,ref:n.ref}):null});function Q(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function qd(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Jd(e){let t=sc(Yd,e).current;return t.next=e,X(t.effect),t}function Yd(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Xd={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Zd={...Xd,position:`fixed`,margin:0,top:0,left:0};({...Xd});var Qd=W.forwardRef(function(e,t){let[n,r]=W.useState();X(()=>{_d&&gd&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:Zd,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function $d(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function $(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Vs(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ef(e,t){let n=e;for(;n;){if(zs(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Vs(n)?n.host:null)}return null}function tf(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var nf=`data-base-ui-focusable`,rf=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,af=`ArrowLeft`,of=`ArrowRight`,sf=`ArrowUp`,cf=`ArrowDown`,lf=`data-trigger-disabled`;function uf(e,t){if(!zs(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(lf);for(let[,e]of t.entries())if($(e,n))return!e.hasAttribute(lf);return!1}function df(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 ff(e){return e.matches(`html,body`)}function pf(e){return Bs(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function mf(e){return ef(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${rf}`)!=null}function hf(e){return e?e.getAttribute(`role`)===`combobox`&&pf(e):!1}function gf(e){if(!e||vd)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function _f(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function vf(e){e.preventDefault(),e.stopPropagation()}function yf(e){return`nativeEvent`in e}function bf(e){return e.pointerType===``&&e.isTrusted?!0:pd&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function xf(e){return vd?!1:!pd&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(pd||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Sf(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Cf(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var wf=Math.min,Tf=Math.max,Ef=Math.round,Df=Math.floor,Of=e=>({x:e,y:e}),kf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Af(e,t,n){return Tf(e,wf(t,n))}function jf(e,t){return typeof e==`function`?e(t):e}function Mf(e){return e.split(`-`)[0]}function Nf(e){return e.split(`-`)[1]}function Pf(e){return e===`x`?`y`:`x`}function Ff(e){return e===`y`?`height`:`width`}function If(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Lf(e){return Pf(If(e))}function Rf(e,t,n){n===void 0&&(n=!1);let r=Nf(e),i=Lf(e),a=Ff(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=qf(o)),[o,qf(o)]}function zf(e){let t=qf(e);return[Bf(e),t,Bf(t)]}function Bf(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Vf=[`left`,`right`],Hf=[`right`,`left`],Uf=[`top`,`bottom`],Wf=[`bottom`,`top`];function Gf(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Hf:Vf:t?Vf:Hf;case`left`:case`right`:return t?Uf:Wf;default:return[]}}function Kf(e,t,n,r){let i=Nf(e),a=Gf(Mf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Bf)))),a}function qf(e){let t=Mf(e);return kf[t]+e.slice(t.length)}function Jf(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Yf(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Jf(e)}function Xf(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Zf(e,t){return t<0||t>=e.length}function Qf(e,t){return tp(e.current,{disabledIndices:t})}function $f(e,t){return tp(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ep(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>tp(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Zf(e,u)?-1:u,wrapped:d}}function tp(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&&np(e,a,r));return a}function np(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!ip(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function rp(e){return e.visibility===`hidden`||e.visibility===`collapse`}function ip(e,t=e?$s(e):null){return!e||!e.isConnected||!t||rp(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var ap=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function op(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Vs(n)?n.host:null}function sp(e){for(let t of Array.from(e.children))if(Fs(t)===`summary`)return t;return null}function cp(e,t){let n=sp(t);return!!n&&(e===n||$(n,e))}function lp(e){let t=e?Fs(e):``;return e!=null&&e.matches(ap)&&(t!==`summary`||e.parentElement!=null&&Fs(e.parentElement)===`details`&&sp(e.parentElement)===e)&&(t!==`details`||sp(e)==null)&&(t!==`input`||e.type!==`hidden`)}function up(e){if(!lp(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=op(t)){let n=t!==e,r=Fs(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Fs(t)===`details`&&!t.open&&!cp(e,t)||t.hasAttribute(`hidden`)||!r&&!dp(t,n))return!1}return!0}function dp(e,t){let n=$s(e);return t?n.display!==`none`:ip(e,n)}function fp(e){let t=e.tabIndex;if(t<0){let t=Fs(e);if(t===`details`||t===`audio`||t===`video`||Bs(e)&&e.isContentEditable)return 0}return t}function pp(e){if(Fs(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function mp(e,t){let n=pp(e);if(!n)return!0;let r=t.find(e=>{let t=pp(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=pp(e);return t?.name===n.name&&t.form===n.form})===n}function hp(e){if(Bs(e)&&Fs(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Bs(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function gp(e,t){hp(e).forEach(e=>{lp(e)&&t.push(e),gp(e,t)})}function _p(e,t,n){hp(e).forEach(e=>{Bs(e)&&e.matches(t)&&n.push(e),_p(e,t,n)})}function vp(e){return up(e)&&fp(e)>=0}function yp(e){let t=[];return gp(e,t),t.filter(up)}function bp(e){let t=yp(e);return t.filter(e=>fp(e)>=0&&mp(e,t))}function xp(e,t){let n=bp(e),r=n.length;if(r===0)return;let i=$d(Z(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Sp(e){return xp(Z(e).body,1)||e}function Cp(e){return xp(Z(e).body,-1)||e}function wp(e,t,n){if(!e)return null;let r=[];gp(Z(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(up);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!$(n,o)&&vp(o)&&mp(o,a))return o}return r[i]}function Tp(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!$(n,r)}function Ep(e){bp(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Dp(e){let t=[];_p(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 Op(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Op(e,t.id,n)])}function kp(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 Ap(e){return`data-base-ui-${e}`}var jp=0;function Mp(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(jp);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),Gc;let o=requestAnimationFrame(a);return jp=o,()=>{jp===o&&(cancelAnimationFrame(o),jp=0)}}var Np=`data-base-ui-inert`,Pp=new WeakMap,Fp=new WeakSet,Ip=new WeakMap,Lp=0;function Rp(e){return e?Vs(e)?e.host:Rp(e.parentNode):null}var zp=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Rp(t);return e.contains(n)?n:null}).filter(e=>e!=null),Bp=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Vp=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{Fs(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Hp(e,t,n,{mark:r=!0}){let i=zp(t,e),a=r?Vp(t,Bp(i),new Set(i)):[],o=[],s=[];if(n){let e=zp(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Vp(t,Bp(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Pp.get(e)||0)+1;Pp.set(e,r),o.push(e),r===1&&n&&Fp.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Ip.get(e)||0)+1;Ip.set(e,t),s.push(e),t===1&&e.setAttribute(Np,``)}),Lp+=1,()=>{o.forEach(e=>{let t=(Pp.get(e)||0)-1;Pp.set(e,t),t||(Fp.has(e)||e.removeAttribute(`aria-hidden`),Fp.delete(e))}),r&&s.forEach(e=>{let t=(Ip.get(e)||0)-1;Ip.set(e,t),t||e.removeAttribute(Np)}),--Lp,Lp||(Pp=new WeakMap,Fp=new WeakSet,Ip=new WeakMap)}}function Up(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Z(e[0]).body;return Hp(e,i,n,{mark:r})}var Wp={style:{transition:`none`}},Gp={fallbackAxisSide:`none`},Kp={fallbackAxisSide:`end`},qp={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Jp=W.createContext(null),Yp=()=>W.useContext(Jp),Xp=Ap(`portal`);function Zp(e={}){let{ref:t,container:n,componentProps:r=qc,elementProps:i}=e,a=Ad(),o=Yp()?.portalNode,[s,c]=W.useState(null),[l,u]=W.useState(null),d=Y(e=>{e!==null&&u(e)}),f=W.useRef(null);X(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Rs(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Zc(`div`,r,{ref:[t,d],props:[{id:a,[Xp]:``},i]}),m=s&&p?Yl.createPortal(p,s):null;return{node:l,nodeId:W.isValidElement(p)?p.props.id:void 0,subtree:m}}var Qp=W.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Zp({container:o,ref:t,componentProps:e,elementProps:c}),f=W.useRef(null),p=W.useRef(null),m=W.useRef(null),h=W.useRef(null),[g,_]=W.useState(null),v=W.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;W.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Tp(e)&&(e.type===`focusin`?v.current&&=(Dp(l),!1):(Ep(l),v.current=!0))}return qd(Q(l,`focusin`,e,!0),Q(l,`focusout`,e,!0))},[l,y]),X(()=>{l&&b===!0&&v.current&&(Dp(l),v.current=!1)},[b,l]);let S=W.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,G.jsxs)(W.Fragment,{children:[d,(0,G.jsxs)(Jp.Provider,{value:S,children:[x&&l&&(0,G.jsx)(Qd,{"data-type":`outside`,ref:f,onFocus:e=>{Tp(e,l)?m.current?.focus():Cp(g?g.domReference:null)?.focus()}}),x&&l&&(0,G.jsx)(`span`,{role:s,"aria-owns":u,style:qp}),l&&Yl.createPortal(a,l),x&&l&&(0,G.jsx)(Qd,{"data-type":`outside`,ref:p,onFocus:e=>{Tp(e,l)?h.current?.focus():(Sp(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Fd(`focus-out`,e.nativeEvent)))}})]})]})});function $p(){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 em=class{nodesRef={current:[]};events=$p();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)}},tm=W.createContext(null),nm=W.createContext(null),rm=()=>W.useContext(tm)?.id||null,im=e=>{let t=W.useContext(nm);return e??t};function am(e){let t=Ad(),n=im(e),r=rm();return X(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function om(e){let{children:t,id:n}=e,r=rm();return(0,G.jsx)(tm.Provider,{value:W.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function sm(e){let{children:t,externalTree:n}=e,r=sc(()=>n??new em).current;return(0,G.jsx)(nm.Provider,{value:r,children:t})}function cm(e,t){let n=Is(tf(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(bf(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var lm=20,um=[];function dm(){um=um.filter(e=>e.deref()?.isConnected)}function fm(e){dm(),e&&Fs(e)!==`body`&&(um.push(new WeakRef(e)),um.length>lm&&(um=um.slice(-20)))}function pm(){return dm(),um[um.length-1]?.deref()}function mm(e){return e?vp(e)?e:bp(e)[0]||e:null}function hm(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=yp(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return vp(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 gm(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=Y(()=>b.current.floatingContext?.nodeId),S=i===!1,C=hf(_)&&S,w=Jd(i),T=Jd(a),E=Jd(o),D=Jd(u),O=Jd(g),k=im(m),A=Yp(),j=W.useRef(!1),M=W.useRef(!1),N=W.useRef(!1),P=W.useRef(null),F=W.useRef(``),I=W.useRef(``),L=W.useRef(null),R=W.useRef(null),ee=Ic(L,p,A?.beforeInsideRef),z=Ic(R,A?.afterInsideRef),B=lu(),V=lu(),te=Wl(),ne=A!=null,H=_f(v),U=Y((e=H)=>e?bp(e):[]),re=Y(()=>h?.().filter(e=>e!=null)??[]);W.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&$(H,$d(Z(H)))&&U().length===0&&!C&&vf(e)}return Q(Z(H),`keydown`,e)},[r,H,c,C,U]),W.useEffect(()=>{if(r||!g)return;let e=Z(H);function t(){N.current=!1}function n(e){let t=tf(e),n=re(),r=$(v,t)||$(_,t)||$(A?.portalNode,t)||n.some(e=>e===t||$(e,t));N.current=!r,I.current=e.pointerType||`keyboard`,ef(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,V.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return qd(Q(e,`pointerdown`,n,!0),Q(e,`pointerup`,t,!0),Q(e,`pointercancel`,t,!0),Q(e,`keydown`,i,!0),t)},[r,v,_,H,g,A,V,re]),W.useEffect(()=>{if(r||!l)return;let e=Z(H);function n(){M.current=!0,V.start(0,()=>{M.current=!1})}function i(e){let t=tf(e);vp(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=tf(n);c&&r==null&&a!=null&&$(v,a)&&fm(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=re(),p=r?.hasAttribute(Ap(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,Gl(f),Gl(d)].includes(r),m=!($(_,r)||$(v,r)||$(r,v)||$(A?.portalNode,r)||u.some(e=>e===r||$(e,r))||l.hasMatchingElement(e=>$(e,r))||p||k&&(Op(k.nodesRef.current,o).find(e=>$(e.context?.elements.floating,r)||$(e.context?.elements.domReference,r))||kp(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,_f(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&H&&hm(H),s&&i!==_&&!ip(a)&&$d(e)===e.body){if(Bs(H)&&(H.focus(),s===`popup`)){te.request(()=>{H.focus()});return}let e=U(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||H;Bs(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!c)&&r&&m&&!M.current&&(C||r!==pm())&&(j.current=!0,t.setOpen(!1,Fd(Uu,n)))})}function o(){N.current||(b.current.insideReactTree=!0,B.start(0,()=>{b.current.insideReactTree=!1}))}let u=Bs(_)?_:null;if(v||u)return qd(u&&Q(u,`focusout`,a),u&&Q(u,`pointerdown`,n),v&&Q(v,`focusin`,i),v&&Q(v,`focusout`,a),v&&A&&Q(v,`focusout`,o,!0))},[r,_,v,H,c,k,A,t,l,s,U,C,x,b,B,V,te,d,f,re]),W.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${Ap(`portal`)}]`)||[]),t=(k?kp(k.nodesRef.current,x()):[]).find(e=>hf(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Up([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...re(),t,Gl(f),Gl(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=Up([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,re]),X(()=>{if(!g||r||!Bs(H))return;F.current=``,I.current=``;let e=Z(H),t=$d(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||$(H,t))return;let i=null,a=()=>(i??=U(H),i[0]||H),o;o=r===!0||r===null?a():Gl(r),o||=a();let s=$(H,$d(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&bf(c);Mp(o,{sync:l,preventScroll:o===H,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=$d(e);return!(t!==o&&$(H,t))}})})},[r,g,H,U,w,D,O,b]);let ie=W.useRef(null);X(()=>{if(r||!H){ie.current=null;return}ie.current&&=(ie.current.cancelled=!0,null);let e=Z(H),t=$d(e),n=D.current==null;fm(t);function i(e){if(e.open||(F.current=cm(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Ap(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(bf(e.nativeEvent)||xf(e.nativeEvent))j.current=!1;else{let e=!1;Z(H).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&Fs(t)!==`body`?t:null,s=n?o||a:a||o;return s||=pm()||null,typeof i==`boolean`?s:Gl(i)||s||null}return()=>{y.off(`openchange`,i);let t=$d(e),n=re(),r=$(v,t)||n.some(e=>e===t||$(e,t))||k&&Op(k.nodesRef.current,x(),!1).some(e=>$(e.context?.elements.floating,t)),o=T.current,s=F.current,c=a(s),l={cancelled:!1};ie.current=l,queueMicrotask(()=>{ie.current===l&&(ie.current=null);let n=mm(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&Bs(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,H,T,E,D,y,k,_,x,re]),X(()=>{if(!gd||g||!v)return;let e=$d(Z(v));Bs(e)&&pf(e)&&$(v,e)&&e.blur()},[g,v]),X(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),X(()=>{if(!r&&H)return hm(H),()=>{queueMicrotask(dm)}},[r,H]);let ae=!r&&(!c||!C)&&(ne||c);return(0,G.jsxs)(W.Fragment,{children:[ae&&(0,G.jsx)(Qd,{"data-type":`inside`,ref:ee,onFocus:e=>{if(c){let e=U();Mp(e[e.length-1])}else A?.portalNode&&(j.current=!1,Tp(e,A.portalNode)?Sp(_)?.focus():Gl(f??A.beforeOutsideRef)?.focus())}}),n,ae&&(0,G.jsx)(Qd,{"data-type":`inside`,ref:z,onFocus:e=>{c?Mp(U()[0]):A?.portalNode&&(l&&(j.current=!0),Tp(e,A.portalNode)?Cp(_)?.focus():Gl(d??A.afterOutsideRef)?.focus())}})]})}function _m(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Lu}=t,l=e.context.dataRef,u=W.useRef(void 0),d=Wl(),f=lu(),p=W.useMemo(()=>{function t(t,n,r,i){let a=Fd(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=Sf(e.pointerType,!0)&&xf(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Sf(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=tf(s),p=pf(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:Sf(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return W.useMemo(()=>n?{reference:p}:qc,[n,p])}function vm(){return!1}function ym(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function bm(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=vm,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=im(c),m=Y(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=Y(()=>a),{escapeKey:v,outsidePress:y}=ym(s),b=W.useRef(!1),x=W.useRef(!1),S=W.useRef(!1),C=W.useRef(!1),w=W.useRef(!1),T=W.useRef(``),E=W.useRef(null),D=lu(),O=lu(),k=lu(),A=Y(()=>{O.clear(),d.current.insideReactTree=!1}),j=Y(e=>{let t=d.current.floatingContext?.nodeId;return(p?Op(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=Y(t=>df(t,e.select(`floatingElement`))||df(t,e.select(`domReferenceElement`))),N=Y(t=>{o()&&e.setOpen(!1,Fd(Lu,t.nativeEvent))}),P=Y(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=yf(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=Fd(Wu,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),F=Y(()=>{d.current.insideReactTree=!0,O.start(0,A)}),I=Y(t=>{if(!l||!n||t.button!==0)return;let r=tf(t.nativeEvent);$(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),L=Y(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});W.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),W.useEffect(()=>A,[A]),W.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new cu,i=Z(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(gd?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&Op(p.nodesRef.current,t).some(t=>df(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=tf(n),i=`[${Ap(`inert`)}]`,a=zs(r)?r.getRootNode():null,o=Array.from((Vs(a)?a:Z(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>$(e,r))))return;let c=zs(r)?r:null;for(;c&&!Qs(c);){let e=tc(c);if(Qs(e)||!zs(e))break;c=e}if(!(o.length&&zs(r)&&!ff(r)&&!$(r,e.select(`floatingElement`))&&o.every(e=>!$(c,e)))){if(Bs(r)&&!(`touches`in n)){let e=Qs(r),t=$s(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!bf(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,Fd(Bu,n)),A())}}}function F(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!M(t)&&N(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=tf(e);if(!n)return;let r=Q(n,e.type,()=>{t(e),r()})}function R(e){T.current=`touch`,L(e,I)}function ee(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),(e.type!==`mousedown`||!E.current||E.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?F(e):N(e)})}function z(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():O(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),S.current=!0,A())))}function B(e){if(f()!==`sloppy`||!E.current||M(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&&(N(e),D.clear(),E.current=null)}function V(e){L(e,B)}function te(e){f()===`sloppy`&&E.current&&!M(e)&&(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function ne(e){L(e,te)}let H=qd(r&&qd(Q(i,`keydown`,P),Q(i,`compositionstart`,a),Q(i,`compositionend`,o)),g&&qd(Q(i,`click`,ee,!0),Q(i,`pointerdown`,ee,!0),Q(i,`pointerup`,z,!0),Q(i,`pointercancel`,z,!0),Q(i,`mousedown`,ee,!0),Q(i,`mouseup`,z,!0),Q(i,`touchstart`,R,{capture:!0,passive:!0}),Q(i,`touchmove`,V,{capture:!0,passive:!0}),Q(i,`touchend`,ne,{capture:!0,passive:!0})));return()=>{H(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let R=W.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),ee=W.useMemo(()=>({onKeyDown:P,onPointerDown:L,onMouseDown:L,onClickCapture:F,onMouseDownCapture(e){F(),I(e)},onPointerDownCapture(e){F(),I(e)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[P,F,I,L]);return W.useMemo(()=>n?{reference:R,floating:ee,trigger:R}:{},[n,R,ee])}function xm(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),X(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};zs(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}var Sm=md&&gd;function Cm(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=W.useRef(!1),s=W.useRef(null),c=W.useRef(!0),l=lu();W.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Is(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Bs(t)&&t===$d(Z(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return qd(Q(r,`blur`,i),Sm&&Q(r,`keydown`,a,!0),Sm&&Q(r,`pointerdown`,l,!0))},[e,n]),W.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);zs(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=W.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=tf(n.nativeEvent);if(zs(a)){if(Sm&&!n.relatedTarget){if(!c.current&&!pf(a))return}else if(!gf(a))return}let u=uf(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,Fd(zu,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,Fd(zu,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=zs(r)&&r.hasAttribute(Ap(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=$d(Z(t));!r&&n===t||$(a.current.floatingContext?.refs.floating.current,n)||$(t,n)||o||uf(r??n,e.context.triggerElements)||e.setOpen(!1,Fd(zu,i))})}}},[a,r,e,l]);return W.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var wm=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new cu;restTimeout=new cu;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Tm=new WeakMap;function Em(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Tm.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Tm.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Dm(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Tm.get(n);a&&a!==e&&Em(a),Em(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Tm.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Om(e){let t=e.context.dataRef.current,n=sc(()=>t.hoverInteractionState??wm.create()).current;return t.hoverInteractionState||=n,Bl(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function km(e,t){return t!=null&&!Sf(t)?0:typeof e==`function`?e():e}function Am(e,t,n){let r=km(e,n);return typeof r==`number`?r:r?.[t]}function jm(e){return typeof e==`function`?e():e}function Mm(e,t){return t||e===`click`||e===`mousedown`}function Nm(e){return e?.includes(`mouse`)&&e!==`mousedown`}function Pm(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=im(),u=rm(),d=Om(e),f=lu(),p=Y(()=>Mm(c.current.openEvent?.type,d.interactedInside)),m=Y(()=>Nm(c.current.openEvent?.type)),h=Y(()=>{Em(d)});X(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),W.useEffect(()=>h,[h]),X(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&zs(s)&&o){let e=s,t=o,n=Z(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??ef(e,`[data-rootownerid]`)??n.body;return Dm(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),W.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Op(l.nodesRef.current,u).length>0)}function a(t){let n=Am(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Fd(Ru,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=tf(e);mf(t)?d.interactedInside=ef(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(uf(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&zs(o)&&Op(l.nodesRef.current,r,!1).some(e=>$(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Fd(Ru,n)),l.events.emit(`floating.closed`,n)})}let y=o;return qd(y&&Q(y,`mouseenter`,g),y&&Q(y,`mouseleave`,_),y&&Q(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Fm={current:null};function Im(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Fm,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=im(l),v=Om(e),y=W.useRef(!1),b=Jd(i),x=Jd(r),S=Jd(o),C=Jd(n),w=Jd(p),T=Jd(f),E=Y(()=>Mm(h.current.openEvent?.type,v.interactedInside)),D=Y(()=>w.current?.()!==!1),O=Y((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!$(t,n);if(!zs(r))return!1;let a=r;return i.hasMatchingElement(e=>$(e,a))&&(!t||!$(t,a))}),k=Y(()=>{v.handler&&=(Z(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=Y(()=>{Em(v)});return u&&(v.handleCloseOptions=i?.__options),W.useEffect(()=>k,[k]),W.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===Ru,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),W.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=Am(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Fd(Ru,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Fd(Ru,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!zs(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Sf(v.pointerType))return;let n=jm(S.current),r=Am(x.current,`open`,v.pointerType),i=tf(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(zs(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if($(t,i)){c=t;break}}zs(o)&&zs(s)&&!e.context.triggerElements.hasElement(o)&&$(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&zs(c)&&zs(s)&&$(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?D()&&e.setOpen(!0,Fd(Ru,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,Fd(Ru,t,c))}):g&&D()&&e.setOpen(!0,Fd(Ru,t,c)))}function o(n){if(E()){A();return}k();let r=Z(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!uf(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else v.pointerType===`touch`&&$(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){$(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?Q(r,`mouseout`,l):void 0;return s?qd(Q(r,`mousemove`,i,{once:!0}),Q(r,`mouseenter`,i),Q(r,`mouseleave`,o),f):qd(Q(r,`mouseenter`,i),Q(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),W.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!Sf(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;Dm(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=jm(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,Fd(Ru,n,r))}v.pointerType===`touch`?Yl.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function Lm(e){return gd&&e.movementX===0&&e.movementY===0}function Rm(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function zm(e,t){return Rm(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Bm(e,t,n){return Rm(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Vm(e,t,n){return Rm(t,n?e===af:e===of,e===cf)}function Hm(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Rm(t,n?e===of:e===af,e===sf)}function Um(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:S,grid:C}=t,w=C!=null,T=e.useState(`open`),E=e.useState(`floatingElement`),D=e.useState(`domReferenceElement`),O=e.context.dataRef,k=_f(E),A=hf(D),j=Jd(k),M=rm(),N=im(x),P=W.useRef(f),F=W.useRef(o??-1),I=W.useRef(null),L=W.useRef(!0),R=Y(e=>{i(F.current===-1?null:F.current,e)}),ee=W.useRef(!!E),z=W.useRef(T),B=W.useRef(!1),V=W.useRef(!1),te=W.useRef(null),ne=Jd(h),H=Jd(T),U=Jd(o),re=Jd(b),ie=Wl(),ae=Wl(),oe=Y(()=>{ie.cancel();function e(e){d||(te.current=Mp(e,{sync:B.current,preventScroll:!0}))}let t=n.current[F.current],r=V.current;t&&e(t),(B.current?e=>e():e=>ie.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),fe&&(r||!L.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});X(()=>{O.current.orientation=g},[O,g]),X(()=>{T||(I.current=null),T&&f===`auto`||(P.current=f)},[T,f]),X(()=>{a&&(T&&E?(F.current=o??-1,P.current&&o!=null&&(V.current=!0,R())):ee.current&&(F.current=-1,R()))},[a,T,E,o,R]),X(()=>{if(a){if(!T)B.current=!1;else if(E){if(r==null){if(B.current=!1,U.current!=null)return;if(ee.current&&(F.current=-1,oe()),(!z.current||!ee.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ae.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||Bm(I.current,_,u)||l?Qf(n):$f(n),I.current=null,R())};t()}}else Zf(n.current,r)||(F.current=r,oe(),V.current=!1)}}},[a,T,E,r,U,l,n,_,u,R,oe,ae]),X(()=>{if(!a||E||!N||d||!ee.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=$d(Z(D??t??null)),r=e.some(e=>e.context&&$(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[a,E,D,N,M,d]),X(()=>{z.current=T,ee.current=!!E});let se=r!=null,ce=Y(e=>{if(!H.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,R(e))}),le=Y(()=>v??N?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),ue=Y(()=>Qf(n,ne.current)),de=Y(t=>{if(L.current=!1,B.current=!0,t.which===229||!H.current&&t.currentTarget===j.current)return;if(l&&Hm(t.key,g,u,w)){zm(t.key,le())||vf(t),e.setOpen(!1,Fd(Gu,t.nativeEvent));let n=S?.current??D;Bs(n)&&n.focus();return}r!=null&&r!==F.current&&!Zf(n.current,r)&&(F.current=r);let i=F.current,a=Qf(n,h),o=$f(n,h);if(A||(t.key===`Home`&&(vf(t),F.current=a,R(t)),t.key===`End`&&(vf(t),F.current=o,R(t))),C!=null){let e=C(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,R(t)),g===`both`)return}if(zm(t.key,g)){vf(t);let e=$d(t.currentTarget.ownerDocument);if(T&&!d&&$(t.currentTarget,e)&&!n.current.some(t=>t!=null&&$(t,e))){F.current=Bm(t.key,g,u)?a:o,R(t),r===F.current&&oe();return}let{index:l,wrapped:f}=ep(n.current,i,{decrement:!Bm(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(B.current=!1),F.current=l,R(t)}}),fe=W.useMemo(()=>({onFocus(e){B.current=!0,ce(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){Lm(e)||(B.current=!0,V.current=!1,p&&ce(e))},onPointerLeave(e){if(!H.current||!L.current||e.pointerType===`touch`)return;B.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&re.current&&(te.current?.(),te.current=null,F.current=-1,R(e),!d)){let e=j.current,t=$d(Z(e));e&&$(e,t)&&e.focus({preventScroll:!0})}}}),[ce,H,j,p,n,R,re,d]),pe=W.useMemo(()=>d&&T&&se&&{"aria-activedescendant":`${y}-${r}`},[d,T,se,y,r]),me=W.useMemo(()=>({...A?{}:pe,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&T&&!d){let n=tf(t.nativeEvent);if(n&&!$(j.current,n))return;vf(t);let r=Fd(Uu,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&Bs(i)&&i.focus()}else de(t)},onPointerMove(e){Lm(e)||(L.current=!0)}}),[pe,de,j,A,e,T,d,D,S]),he=W.useMemo(()=>{function t(t){e.setOpen(!0,Fd(Gu,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&bf(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&xf(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=Vm(n.key,le(),u),o=zm(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||pf(n.currentTarget)))return de(n);if(r||m||!i){if(s){let e=zm(n.key,le());I.current=l&&e?null:n.key}l?a&&(vf(n),r?(F.current=ue(),R(n),d&&j.current?.focus()):t(n)):o&&(U.current!=null&&(F.current=U.current),vf(n),!r&&m?t(n):de(n),r&&R(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,R(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[de,f,ue,l,R,e,m,g,_,le,u,U,d,j]),ge=W.useMemo(()=>({...pe,...he}),[pe,he]);return W.useMemo(()=>a?{reference:ge,floating:me,item:fe,trigger:he}:{},[a,ge,me,he,fe])}function Wm(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=Y(s),f=e.useState(`open`),p=lu(),m=W.useRef(``),h=W.useRef(u??i??-1),g=W.useRef(null),_=Y(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!ip(n)||n?.matches(`:disabled`)?!1:o==null||!np(Kc,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(vf(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(vf(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=Y(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);$(r,n)||$(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});X(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=W.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return W.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var Gm=.1,Km=Gm*Gm,qm=.5;function Jm(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ym(e,t,n,r,i,a,o,s,c,l){let u=!1;return Jm(e,t,n,r,i,a)&&(u=!u),Jm(e,t,i,a,o,s)&&(u=!u),Jm(e,t,o,s,c,l)&&(u=!u),Jm(e,t,c,l,n,r)&&(u=!u),u}function Xm(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Zm(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Qm(e={}){let{blockPointerEvents:t=!1}=e,n=new cu,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Km;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=tf(r),g=r.type===`mouseleave`,_=$(u,h),v=$(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&zs(r.relatedTarget)&&$(u,r.relatedTarget))return;function y(){return!!(s&&Op(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Zm(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Zm(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Zm(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Zm(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!Xm(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?qm/2:qm*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+qm+1,o=C||T?S.bottom-qm:S.top,s=C?T?S.bottom-qm:S.top:S.bottom-qm;M=Ym(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?qm/2:qm*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-qm,o=C||T?S.top+qm:S.bottom,s=C?T?S.top+qm:S.bottom:S.top+qm;M=Ym(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?qm/2:qm*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+qm+1,o=w||E?S.right-qm:S.left,s=w?E?S.right-qm:S.left:S.right-qm;M=Ym(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?qm/2:qm*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-qm,o=w||E?S.left+qm:S.right,s=w?E?S.left+qm:S.right:S.left+qm;M=Ym(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function $m(e,t,n){let{reference:r,floating:i}=e,a=If(t),o=Lf(t),s=Ff(o),c=Mf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Nf(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function eh(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=jf(t,e),p=Yf(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Xf(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Xf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var th=50,nh=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:eh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=$m(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<th&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=$m(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},rh=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=jf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Mf(r),_=If(o),v=Mf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[qf(o)]:zf(o)),x=p!==`none`;!d&&x&&b.push(...Kf(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Rf(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===If(t)||T.every(e=>If(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=If(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},ih=new Set([`left`,`top`]);async function ah(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Mf(n),s=Nf(n),c=If(n)===`y`,l=ih.has(o)?-1:1,u=a&&c?-1:1,d=jf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var oh=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ah(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},sh=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=jf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=If(i),p=Pf(f),m=u[p],h=u[f],g=(e,t)=>Af(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},ch=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=jf(e,t),u={x:n,y:r},d=If(i),f=Pf(d),p=u[f],m=u[d],h=jf(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ih.has(Mf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},lh=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=jf(e,t),c=await i.detectOverflow(t,s),l=Mf(n),u=Nf(n),d=If(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=wf(p-c[m],g),y=wf(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Tf(c.left,c.right):S=p-2*Tf(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function uh(e){let t=$s(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Bs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ef(n)!==a||Ef(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function dh(e){return zs(e)?e:e.contextElement}function fh(e){let t=dh(e);if(!Bs(t))return Of(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=uh(t),o=(a?Ef(n.width):n.width)/r,s=(a?Ef(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var ph=Of(0);function mh(e){let t=Is(e);return!Zs()||!t.visualViewport?ph:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hh(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Is(e)}function gh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=dh(e),o=Of(1);t&&(r?zs(r)&&(o=fh(r)):o=fh(e));let s=hh(a,n,r)?mh(a):Of(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Is(a),t=zs(r)?Is(r):r,n=e,i=ic(n);for(;i&&t!==n;){let e=fh(i),t=i.getBoundingClientRect(),r=$s(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Is(i),i=ic(n)}}return Xf({width:u,height:d,x:c,y:l})}function _h(e,t){let n=ec(e).scrollLeft;return t?t.left+n:gh(Ls(e)).left+n}function vh(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-_h(e,n),y:n.top+t.scrollTop}}function yh(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ls(r),s=t?Ws(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Of(1),u=Of(0),d=Bs(r);if((d||!a)&&((Fs(r)!==`body`||Hs(o))&&(c=ec(r)),d)){let e=gh(r);l=fh(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?vh(o,c):Of(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function bh(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function xh(e){let t=ec(e),n=e.ownerDocument.body,r=Tf(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Tf(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+_h(e),o=-t.scrollTop;return $s(n).direction===`rtl`&&(a+=Tf(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Sh=25;function Ch(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Is(e),a=Ls(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Zs()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(_h(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Sh&&(s-=o)}return{width:s,height:c,x:l,y:u}}function wh(e,t){let n=gh(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=fh(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Th(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ch(e,n,t);else if(t===`document`)r=xh(Ls(e));else if(zs(t))r=wh(t,n);else{let n=mh(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Xf(r)}function Eh(e,t){let n=t.get(e);if(n)return n;let r=rc(e,[],!1).filter(e=>zs(e)&&Fs(e)!==`body`),i=null,a=$s(e).position===`fixed`,o=a?tc(e):e;for(;zs(o)&&!Qs(o);){let e=$s(o),t=Ys(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=tc(o)}return t.set(e,r),r}function Dh(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ws(t)?[]:Eh(t,this._c):[].concat(n),r],o=Th(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Th(t,a[e],i);s=Tf(n.top,s),c=wf(n.right,c),l=wf(n.bottom,l),u=Tf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Oh(e){let{width:t,height:n}=uh(e);return{width:t,height:n}}function kh(e,t,n){let r=Bs(t),i=Ls(t),a=n===`fixed`,o=gh(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Of(0);if((r||!a)&&((Fs(t)!==`body`||Hs(i))&&(s=ec(t)),r)){let e=gh(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=_h(i));let l=i&&!r&&!a?vh(i,s):Of(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ah(e){return $s(e).position===`static`}function jh(e,t){if(!Bs(e)||$s(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ls(e)===n&&(n=n.ownerDocument.body),n}function Mh(e,t){let n=Is(e);if(Ws(e))return n;if(!Bs(e)){let t=tc(e);for(;t&&!Qs(t);){if(zs(t)&&!Ah(t))return t;t=tc(t)}return n}let r=jh(e,t);for(;r&&Us(r)&&Ah(r);)r=jh(r,t);return r&&Qs(r)&&Ah(r)&&!Ys(r)?n:r||Xs(e)||n}var Nh=async function(e){let t=this.getOffsetParent||Mh,n=this.getDimensions,r=await n(e.floating);return{reference:kh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ph(e){return $s(e).direction===`rtl`}var Fh={convertOffsetParentRelativeRectToViewportRelativeRect:yh,getDocumentElement:Ls,getClippingRect:Dh,getOffsetParent:Mh,getElementRects:Nh,getClientRects:bh,getDimensions:Oh,getScale:fh,isElement:zs,isRTL:Ph};function Ih(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lh(e,t,n){let r=null,i,a=Ls(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Df(d),h=Df(a.clientWidth-(u+f)),g=Df(a.clientHeight-(d+p)),_=Df(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Tf(0,wf(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ih(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Is(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Rh(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=dh(e),u=i||a?[...l?rc(l):[],...t?rc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Lh(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?gh(e):null;c&&g();function g(){let t=gh(e);h&&!Ih(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var zh=oh,Bh=sh,Vh=rh,Hh=lh,Uh=ch,Wh=(e,t,n)=>{let r=new Map,i=n??{},a={...Fh,...i.platform,_c:r};return nh(e,t,{...i,platform:a})},Gh=typeof document<`u`?W.useLayoutEffect:function(){};function Kh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Kh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Kh(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function qh(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jh(e,t){let n=qh(e);return Math.round(t*n)/n}function Yh(e){let t=W.useRef(e);return Gh(()=>{t.current=e}),t}function Xh(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);Kh(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=Yh(c),D=Yh(i),O=Yh(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Wh(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Kh(w.current,t)&&(w.current=t,Yl.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Gh(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);Gh(()=>(A.current=!0,()=>{A.current=!1}),[]),Gh(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=W.useMemo(()=>({reference:b,floating:x}),[b,x]),N=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Jh(M.floating,u.x),r=Jh(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...qh(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Zh=(e,t)=>{let n=zh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qh=(e,t)=>{let n=Bh(e);return{name:n.name,fn:n.fn,options:[e,t]}},$h=(e,t)=>({fn:Uh(e).fn,options:[e,t]}),eg=(e,t)=>{let n=Vh(e);return{name:n.name,fn:n.fn,options:[e,t]}},tg=(e,t)=>{let n=Hh(e);return{name:n.name,fn:n.fn,options:[e,t]}},ng=W.createContext(void 0);function rg(e){let t=W.useContext(ng);if(t===void 0&&!e)throw Error(Oc(69));return t}var ig=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);function ag(e){return e===`starting`?Wp:qc}var og=W.createContext(void 0);function sg(){return W.useContext(og)}function cg(e,t){let n=tl(e.render);if(W.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function lg(e,t,n){let r=cg(e,t),i=r===t?void 0:r;return[r,W.useCallback(e=>n?.(e?i:void 0),[i,n])]}function ug(e,t,n){let r=tl(e.render),i=W.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var dg=W.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:p}=_u(),m=sg(),{side:h,align:g}=hu(),_=rg(!0)!=null,v=l.useState(`open`),y=l.useState(`transitionStatus`),b=l.useState(`popupProps`),x=l.useState(`mounted`),S=l.useState(`instantType`),C=l.useState(`activeTriggerElement`),w=l.useState(`parent`),T=l.useState(`lastOpenChangeReason`),E=l.useState(`rootId`),D=l.useState(`floatingRootContext`),O=l.useState(`floatingTreeRoot`),k=l.useState(`closeDelay`),A=l.useState(`hoverEnabled`),j=l.useState(`disabled`),M=l.useState(`openMethod`),N=l.useState(`activeTriggerId`),P=l.useState(`listElement`),[F,I]=lg(e,u,d),L=ug(e,C,N),R=w.type===`menu`?m:void 0,ee=w.type===`context-menu`,z=s??w.type!==`menu`;s===void 0&&P&&w.type!==`menu`&&(z=()=>l.state.activeIndex===null&&P),$l({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}}),W.useEffect(()=>{function e(e){l.setOpen(!1,Fd(e.reason,e.domEvent))}return O.events.on(`close`,e),()=>{O.events.off(`close`,e)}},[O.events,l]),Pm(D,{enabled:A&&!j&&!ee&&w.type!==`menubar`,closeDelay:k});let B=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:V,handleFocus:te}=(W.useContext(Qu)?.useParentHandoff??pg)(l,w,v,f),ne=Zc(`div`,e,{state:{transitionStatus:y,side:h,align:g,open:v,nested:w.type===`menu`,instant:S},ref:[t,l.context.popupRef,B,I],stateAttributesMapping:Nu,props:[b,{id:F,...P?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":L},onKeyDown(e){R?.onPopupKeyDown?.(e),_&&ig.has(e.key)&&e.stopPropagation()},onFocus:te},ag(y),c,{"data-rootownerid":E}]}),H=w.type===void 0||ee;(C||w.type===`menubar`&&T!==`outside-press`)&&(H=!0);let U=R?.getReturnElement??V;return(0,G.jsx)(gm,{context:D,openInteractionType:M,modal:ee,disabled:!x,returnFocus:a??U??H,explicitReturnFocus:a===void 0&&U?!1:void 0,initialFocus:z,restoreFocus:!0,getInsideElements:w.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:w.type===`menubar`?void 0:O,previousFocusableElement:C,nextFocusableElement:w.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:ne})}),fg={parentVirtualFocusRef:void 0,handleFocus:void 0};function pg(){return fg}var mg=W.forwardRef(function(e,t){let n=$u()?.Popup??dg;return(0,G.jsx)(n,{...e,ref:t})}),hg=W.createContext(void 0);function gg(){let e=W.useContext(hg);if(e===void 0)throw Error(Oc(32));return e}var _g=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=_u();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,G.jsx)(hg.Provider,{value:n,children:(0,G.jsx)(Qp,{ref:t,...r,portalOwnerRole:o})})});function vg(e){return Uc(19)?e:e?`true`:void 0}function yg(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=W.useState(null),d=W.useRef(null),f=im(n),p=W.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=Xh({...e,elements:{...p,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=zs(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=W.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=W.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return X(()=>{o&&(d.current=o)},[o]),X(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),W.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var bg=W.createContext(void 0);function xg(){return W.useContext(bg)?.direction??`ltr`}var Sg=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=jf(e,t)||{};if(l==null)return{};let d=Yf(u),f={x:n,y:r},p=Lf(i),m=Ff(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=Af(D,k,O),j=!c.arrow&&Nf(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Cg=(e,t)=>{let{name:n,fn:r}=Sg(e);return{name:n,fn:r,options:[e,t]}},wg={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Tg={sideX:`left`,sideY:`top`},Eg=`--available-width`,Dg=`--available-height`,Og=`--anchor-width`,kg=`--anchor-height`,Ag=`--transform-origin`,jg=Eg,Mg=Dg;function Ng(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Pg(e,t,n){let{rects:r,placement:i}=e;return{side:Ng(t,Mf(i),n),align:Nf(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Fg(e){return Ig(e,yg)}function Ig(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=Y(O),A=O?k:n,j=Jd(n),M=Jd(g),N=xg()===`rtl`,[P,F]=W.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?Mf(P):null,R=P&&I?Nf(P)||`center`:null,ee=L||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],z=R||o,B=z===`center`?ee:`${ee}-${z}`,V=l;typeof V==`number`?V={top:V,right:V,bottom:V,left:V}:V&&={top:V.top||0,right:V.right||0,bottom:V.bottom||0,left:V.left||0};let te=+(i===`bottom`),ne=+(i===`top`),H=+(i===`right`),U=+(i===`left`),re={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:V},ie=W.useRef(null),ae=Jd(a),oe=Jd(s),se=typeof a==`function`?0:a,ce=typeof s==`function`?0:s,le=[];p&&le.push(p),le.push(Zh(e=>{let t=Pg(e,i,N),n=typeof ae.current==`function`?ae.current(t):ae.current,r=typeof oe.current==`function`?oe.current(t):oe.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[se,ce,N,i]));let ue=w===`none`&&C!==`shift`,de=!ue&&(u||E||C===`shift`),fe=C===`none`?null:eg({...re,padding:{top:V.top+1+te,right:V.right+1+U,bottom:V.bottom+1+ne,left:V.left+1+H},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),pe=ue?null:Qh({...re,rootBoundary:D,mainAxis:w!==`none`,crossAxis:de,limiter:u||E?void 0:$h(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=If(Mf(e.placement)),i=r===`y`?t:n,a=r===`y`?V.left+V.right:V.top+V.bottom;return{offset:i/2+a/2}})},[re,u,E,D,V,w]);C===`shift`||w===`shift`||z===`center`?le.push(pe,fe):le.push(fe,pe),le.push(tg({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(jg,`${t}px`),i.setProperty(Mg,`${n}px`);let a=Is(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Og,`${u}px`),i.setProperty(kg,`${d}px`)}}),Cg(e=>({element:ie.current||Z(e.elements.floating).createElement(`div`),padding:ie.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=Mf(r),u=Nf(r),d=If(l)===`y`,f=ie.current,p=typeof a==`function`?a(Pg(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return de&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Ag,d?`${m} ${h}`:`${h} ${m}`),{}}},wg,b),X(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let me=W.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:he,elements:ge,x:_e,y:ve,middlewareData:ye,update:be,placement:xe,context:Se,isPositioned:Ce,floatingStyles:we}=t({rootContext:h,open:m?g:void 0,placement:B,middleware:le,strategy:r,whileElementsMounted:m?void 0:(...e)=>Rh(...e,me),nodeId:y,externalTree:S}),{sideX:Te,sideY:Ee}=ye.adaptiveOrigin||Tg,De=Ce?r:`fixed`,Oe=W.useMemo(()=>{let e;return e=Ce?b?{position:De,[Te]:_e,[Ee]:ve}:{...we,position:De}:{position:De,top:0,left:0},e[jg]=`100vw`,e[Mg]=`100vh`,Ce||(e.opacity=0),e},[b,De,Te,_e,Ee,ve,we,Ce]),ke=W.useRef(null);X(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(Lg(t)?t.current:t)||null;n!==ke.current&&(he.setPositionReference(n),ke.current=n)},[g,he,A,j]),W.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&Lg(e)&&e.current!==ke.current&&(he.setPositionReference(e.current),ke.current=e.current)},[g,he,A,j]),W.useEffect(()=>{if(m&&g&&ge.reference&&ge.floating)return Rh(ge.reference,ge.floating,be,me)},[m,g,ge,be,me]);let Ae=Mf(xe),je=Ng(i,Ae,N),Me=Nf(xe)||`center`,Ne=!!ye.hide?.referenceHidden;X(()=>{x&&g&&Ce&&(Ae!==ee||I&&Me!==z)&&F(xe)},[x,I,g,Ce,xe,Ae,Me,ee,z]);let Pe=W.useMemo(()=>({position:`absolute`,top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Fe=ye.arrow?.centerOffset!==0;return W.useMemo(()=>({positionerStyles:Oe,arrowStyles:Pe,arrowRef:ie,arrowUncentered:Fe,side:je,align:Me,physicalSide:Ae,anchorHidden:Ne,refs:he,context:Se,isPositioned:Ce,update:be}),[Oe,Pe,ie,Fe,je,Me,Ae,Ne,he,Se,Ce,be])}function Lg(e){return e!=null&&`current`in e}function Rg(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Y(i),[,o]=W.useState(0),s=sc(Bg).current,c=sc(zg).current,l=W.useRef(0),u=W.useRef(!0),d=W.useRef(null),f=W.useRef(null),p=Y(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=Y((e,t)=>{c.set(e,t),p()}),h=Y(e=>{c.delete(e),p()}),g=Y(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Ug(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Wg(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Hg(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=Y(()=>{let[e,t]=Vg(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});X(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),X(()=>{u.current&&v()}),X(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=Y(e=>(s.add(e),()=>{s.delete(e)})),b=W.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,G.jsx)(Cd.Provider,{value:b,children:t})}function zg(){return new Map}function Bg(){return new Set}function Vg(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Wg(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Hg(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Ug(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Wg(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var Gg=W.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,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function Kg(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=W.useRef(null),o=W.useRef(null),s=Ql(r);X(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),X(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}function qg(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Zc(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},ag(r),i],stateAttributesMapping:Mu})}var Jg={},Yg={},Xg=``;function Zg(e,t){return Hs(e)?e:t}function Qg(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Zg(t,n)).overflowY)}function $g(e){if(typeof document>`u`)return!1;let t=Z(e);return Is(t).innerWidth-t.documentElement.clientWidth>0}function e_(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Z(e),n=t.documentElement,r=t.body,i=Zg(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 t_(e){let t=Z(e),n=t.documentElement,r=t.body,i=Zg(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 n_(e){let t=Z(e),n=t.documentElement,r=t.body,i=Is(n),a=0,o=0,s=!1,c=Ul.create();if(gd&&(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,Jg={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Xg=n.style.scrollBehavior,Yg={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=Zg(n,r);s=e_(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(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,Jg),Object.assign(r.style,Yg),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Xg)}function d(){u(),c.request(l)}l();let f=Q(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var r_=new class{lockCount=0;restore=null;timeoutLock=cu.create();timeoutUnlock=cu.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=Z(e),n=t.documentElement,r=t.body,i=Is(n);if(Qg(i,n,r)){let t=new i.MutationObserver(()=>{Qg(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=dd||!$g(e);this.restore=a?t_(e):n_(e)}};function i_(e=!0,t=null){X(()=>{if(e)return r_.acquire(t)},[e,t])}var a_=20;function o_(e,t,n,r){let[i,a]=W.useState(!1);X(()=>{if(!e||!t||n==null){a(!1);return}let r=Z(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-a_)},[e,t,n]),i_(e&&(!t||i),r)}var s_=W.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Gp,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=_u(),x=gg(),S=Fu(!0),C=v.useState(`parent`),w=v.useState(`floatingRootContext`),T=v.useState(`floatingTreeRoot`),E=v.useState(`mounted`),D=v.useState(`open`),O=v.useState(`modal`),k=v.useState(`openMethod`),A=v.useState(`activeTriggerElement`),j=v.useState(`transitionStatus`),M=v.useState(`positionerElement`),N=v.useState(`instantType`),P=v.useState(`adaptiveOrigin`),F=v.useState(`lastOpenChangeReason`),I=v.useState(`floatingNodeId`),L=v.useState(`floatingParentNodeId`),R=w.useState(`domReferenceElement`),ee=n,z=c,B=l,V=s,te=h;C.type===`context-menu`&&(ee=n??C.context?.anchor,V??=`start`,!o&&V!==`center`&&(B=e.alignOffset??2,z=e.sideOffset??-5));let ne=o,H=V;C.type===`menu`?(ne??=`inline-end`,H??=`start`,te=e.collisionAvoidance??Kp):C.type===`menubar`&&(ne??=C.context.orientation===`vertical`?`inline-end`:`bottom`,H??=`start`);let U=C.type===`context-menu`,re=Fg({anchor:ee,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:ne,sideOffset:z,align:H,alignOffset:B,arrowPadding:U?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:x,disableAnchorTracking:m,collisionAvoidance:te,shift:U?{crossAxis:!(`side`in te&&te.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:T,adaptiveOrigin:P,lazyFlip:y?`placement`:!1});W.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,Fd(Yu)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[v,T.events,I]),W.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,Fd(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,v]);let ie=lu();W.useEffect(()=>{D||ie.clear()},[D,ie]),W.useEffect(()=>{function e(e){if(D&&e.nodeId===v.select(`floatingParentNodeId`)){if(e.target&&A&&A!==e.target){let e=v.select(`closeDelay`);e>0?ie.isStarted()||ie.start(e,()=>{v.setOpen(!1,Fd(Yu))}):v.setOpen(!1,Fd(Yu))}else ie.clear()}}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,v,ie]),W.useEffect(()=>{let e={open:D,nodeId:I,parentNodeId:L,reason:v.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,v,I,L]),Kg({store:v,domReference:R,positionerElement:M,open:D});let ae={open:D,side:re.side,align:re.align,anchorHidden:re.anchorHidden,nested:C.type===`menu`,instant:N},oe=C.type===`menubar`&&C.context.modal;o_(D&&(oe||O&&F!==`trigger-hover`),k===`touch`,M,A);let se=qg(e,ae,{styles:re.positionerStyles,transitionStatus:j,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!E,inert:!D}),ce=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&F!==`trigger-hover`||C.type===`menubar`&&C.context.modal),le=null;return C.type===`menubar`?le=C.context.contentElement:C.type===void 0&&(le=A),(0,G.jsxs)(mu.Provider,{value:re,children:[ce&&(0,G.jsx)(Gg,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:vg(!D),cutout:le}),(0,G.jsx)(om,{id:I,children:(0,G.jsx)(Rg,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:se})})]})}),c_=[],l_=void 0;function u_(){return l_}function d_(e){c_.push(e)}function f_(e){let t=(t,n)=>{let r=sc(m_).current,i;try{l_=r;for(let e of c_)e.before(r);i=e(t,n);for(let e of c_)e.after(r);r.didInitialize=!0}finally{l_=void 0}return i};return t.displayName=e.displayName||e.name,t}function p_(e){return W.forwardRef(f_(e))}function m_(){return{didInitialize:!1}}var h_=W.createContext(null);function g_(e){let t=W.useContext(h_);if(t===null&&!e)throw Error(Oc(5));return t}function __(e){let t=W.useRef(``),n=W.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:W.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function v_(e,t){let n=W.useRef(e),r=Y(t);X(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function y_(e,t){let{onClick:n,onPointerDown:r}=__(Y((n,r)=>{(typeof e==`function`?e():e)||t(r||(dd?`touch`:``))}));return W.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function b_(e){let[t,n]=W.useState(null),r=y_(e,n);return v_(e,t=>{t&&!e&&n(null)}),W.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function x_(e){return e==null?Iu:e.type.startsWith(`key`)?Ku:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?qu:Iu}var S_=qr(),C_=Uc(19)?E_:D_;function w_(e,t,n,r,i){return C_(e,t,n,r,i)}function T_(e,t,n,r,i){let a=W.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,S_.useSyncExternalStore)(e.subscribe,a,a)}d_({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,S_.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function E_(e,t,n,r,i){let a=u_();if(!a)return T_(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 D_(e,t,n,r,i){return(0,Yr.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var O_=class{static create(e){return new this(e)}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 w_(this,e,t,n,r)}},k_=class extends O_{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){W.useDebugValue(e);let n=this;X(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;X(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;X(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){W.useDebugValue(e);let n=this,r=t!==void 0;X(()=>{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 W.useDebugValue(e),w_(this,this.selectors[e],t,n,r)}useContextCallback(e,t){W.useDebugValue(e);let n=Y(t??Gc);this.context[e]=n}useStateSetter(e){let t=W.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)}})}};function A_(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=Y(i),{mounted:c,setMounted:l,transitionStatus:u}=ru(t,!1,!1,o),d=!t&&r;X(()=>{t&&s(!1)},[t,s]);let f=W.useRef(c),p=W.useRef(!1),m=Ed(),h=()=>{f.current=!1,l(!1),a()};X(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=Y(()=>{f.current&&(t?(p.current=!0,m()):h())});return $l({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var j_={tabIndex:-1,[nf]:``};function M_(e){return t=>t!==`touch`||e.current}function N_(e,t=!1){let n=Ad(),r=rm()!=null,i=sc(()=>e(n,r)).current;return xm({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function P_({handle:e,store:t}){return X(()=>e.attachStore(t),[e,t]),null}function F_(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function I_(e,t){let n=W.useRef(null);return Y(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),F_(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),F_(t))})}function L_(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function R_(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function z_(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=I_(e,n),o=Y(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=Y(e=>{a(e),e&&o(e)});return X(()=>(s(t.current),()=>s(null)),[s,t,n,e]),X(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function B_(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=W.useRef(null),i=e.useState(`open`);X(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);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&&!e.state.openedWithoutTrigger&&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=Fd(Iu);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 V_(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=A_({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return sc(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function H_(e,t){e.useSyncedValues(t),X(()=>()=>{e.update({activeTriggerProps:qc,inactiveTriggerProps:qc,popupProps:qc})},[e])}function U_(e,t){X(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),X(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var W_=class{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}},G_={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},K_=class extends k_{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:$p(),nested:n,triggerElements:i},G_),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Cf(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)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function q_(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new K_({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:qc,inactiveTriggerProps:qc,popupProps:qc}}var J_=e=>e.triggerIdProp??e.activeTriggerId,Y_=e=>e.openProp??e.open,X_=e=>(e.popupElement?.id??e.floatingId)||void 0;function Z_(e,t){return t!==void 0&&Y_(e)&&J_(e)===t}function Q_(e,t){return Z_(e,t)?!0:t!==void 0&&Y_(e)&&J_(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var $_={open:Y_,mounted:e=>e.mounted,transitionStatus:e=>Y_(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:J_,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:X_,isTriggerActive:(e,t)=>t!==void 0&&J_(e)===t,isOpenedByTrigger:(e,t)=>Z_(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&J_(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Q_(e,t)?X_(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function ev(e){let t=W.useCallback(t=>e===void 0?Gc:e.subscribeStore(t),[e]),n=W.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,S_.useSyncExternalStore)(t,n,()=>e?.serverStore)}var tv={...$_,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=$_.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>gd&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!$_.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},nv=class extends k_{constructor(e,t,n=!1){let r=new W_,i=iv(r,t,n,e);super(i,rv(r),tv),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function rv(e){return{positionerRef:W.createRef(),popupRef:W.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:W.createRef(),beforeTriggerFocusGuardRef:W.createRef(),beforeContentFocusGuardRef:W.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function iv(e,t,n=!1,r){return{...q_(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:qc,inputProps:qc,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new em,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:qc,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var av=W.createContext(null);function ov(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function sv(e,t){return e===`list-navigation`||ov(e,t)}var cv=f_(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0,isSubmenu:_=!1,virtualFocus:v=!1,virtualFocusRef:y,allowEscape:b=!0,resetOnPointerLeave:x=!0}=e,S=Fu(!0),C=_u(!0),w=g_(!0),T=C?.store,E=C?.virtualFocus??!1,D=W.useMemo(()=>_&&T?{type:`menu`,store:T}:w?{type:`menubar`,context:w}:S&&!T?{type:`context-menu`,context:S}:{type:void 0},[S,T,w,_]),O=jd(),k=jd(),[A,j]=W.useState(void 0),M=(A??k)||void 0,N=rm(),P=D.type===`menu`?D.store:void 0,F=(n??o)&&P?.state.transitionStatus===`starting`,I=sc(()=>F?P?.state.instantType:void 0).current,L=sc(()=>{let e=new nv({open:o,openProp:n,activeTriggerId:h,triggerIdProp:m,parent:D,disabled:s,highlightItemOnHover:g,modal:D.type===void 0?c:void 0,rootId:O,instantType:I},M,N!=null);return e.context.virtualFocusRef=y,e}).current;L.useControlledProp(`openProp`,n),L.useControlledProp(`triggerIdProp`,m),L.useContextCallback(`onOpenChangeComplete`,i);let R=L.useState(`floatingTreeRoot`),ee=am(R),z=L.useState(`open`),B=L.useState(`activeTriggerElement`),V=L.useState(`positionerElement`),te=L.useState(`hoverEnabled`),ne=L.useState(`disabled`),H=L.useState(`lastOpenChangeReason`),U=L.useState(`parent`),re=L.useState(`activeIndex`),ie=L.useState(`keyboardOpen`),ae=L.useState(`payload`),oe=L.useState(`floatingParentNodeId`),se=W.useRef(null),ce=W.useRef(U.type!==`context-menu`),le=lu(),ue=W.useRef(!0),de=lu(),fe=oe!=null,{openMethod:pe,triggerProps:me}=b_(z);L.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:U.type===void 0?c:void 0,openMethod:pe,rootId:O}),B_(L);let{forceUnmount:he,transitionStatus:ge}=V_(z,L,()=>{L.set(`allowMouseEnter`,!1)},F),_e=Ql(L.context.popupRef);W.useEffect(()=>{if(I===void 0)return;let e=()=>{L.state.instantType===I&&L.set(`instantType`,void 0)};if(!z){e();return}if(ge!==void 0)return;if(L.context.popupRef.current==null){e();return}let t=new AbortController;return _e(e,t.signal),()=>{t.abort()}},[I,z,ge,_e,L]),X(()=>{S&&!C?L.update({parent:{type:`context-menu`,context:S},floatingNodeId:ee,floatingParentNodeId:N}):(C||!L.select(`activeTriggerElement`))&&L.update({floatingNodeId:ee,floatingParentNodeId:N})},[S,C,ee,N,B,L]),W.useEffect(()=>{z||(se.current=null),U.type===`context-menu`&&(z?le.start(500,()=>{ce.current=!0}):(le.clear(),ce.current=!1))},[le,z,U.type]),X(()=>{!z&&!te&&L.set(`hoverEnabled`,!0)},[z,te,L]);let ve=Y((e,t)=>{let n=t.reason;if(!e&&!L.select(`open`)||z===e&&t.trigger===B&&H===n)return;let i=R_(t);if(!e&&t.trigger==null&&(t.trigger=B??void 0),r?.(e,t),t.isCanceled)return;L.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!ue.current)return;e&&n===`trigger-focus`?(ue.current=!1,de.start(300,()=>{ue.current=!0})):(ue.current=!0,de.clear());let o=!e&&(n===`escape-key`||n==null);se.current=t.event;let s=L_(L.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&sv(n,a),s.instantType=U.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:ov(n,a)?`click`:o?`dismiss`:void 0,L.update(s)}),ye=xm({popupStore:L,floatingRootContext:L.state.floatingRootContext,floatingId:M,nested:N!=null,onOpenChange:ve}),be=ye.context.events;X(()=>{let e=({open:e,eventDetails:t})=>ve(e,t);return be.on(`setOpen`,e),()=>{be?.off(`setOpen`,e)}},[be,ve]),X(()=>L.subscribeToParentMenu(),[L]);let xe=W.useCallback(()=>{L.setOpen(!1,Fd(Xu))},[L]);W.useImperativeHandle(d,()=>({unmount:he,close:xe}),[he,xe]);let Se;U.type===`context-menu`&&(Se=U.context),W.useImperativeHandle(Se?.positionerRef,()=>V,[V]),W.useImperativeHandle(Se?.actionsRef,()=>({setOpen:ve}),[ve]);let Ce=bm(ye,{enabled:!ne,bubbles:{escapeKey:f&&U.type===`menu`},outsidePress(){return U.type!==`context-menu`||se.current?.type===`contextmenu`||ce.current},externalTree:fe?R:void 0}),we=xg(),Te=Um(ye,{enabled:!ne,listRef:L.context.itemDomElements,activeIndex:re,virtual:v,nested:U.type===`menubar`||!v&&U.type!==void 0,parentOrientation:U.type===`menubar`?U.context.orientation:void 0,loopFocus:l,focusItemOnOpen:v?ie:void 0,allowEscape:v&&l&&b,orientation:u,triggerOrientation:v?`vertical`:u,rtl:we===`rtl`,disabledIndices:Kc,onNavigate(e,t){L.setActiveIndex(e,x_(t),t?.nativeEvent)},openOnArrowKeyDown:U.type!==`context-menu`&&!(v&&_),externalTree:!v&&fe?R:void 0,nestedReturnFocusRef:P?.context.virtualFocusRef,focusItemOnHover:g,resetOnPointerLeave:x}),Ee=W.useCallback(e=>{L.context.typingRef.current=e},[L]),De=Wm(ye,{enabled:!ne&&!v,listRef:L.context.itemLabels,elementsRef:L.context.itemDomElements,activeIndex:re,resetMs:500,onMatch:(e,t)=>{z&&e!==re&&L.setActiveIndex(e,Ku,t.nativeEvent)},onTyping:Ee}),Oe=Y(a),ke=W.useRef(-1),Ae=Y(()=>{let e=L.state.activeIndex,t=e===null?void 0:L.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(ke.current===n&&L.context.reportedItem===t)return;ke.current=n,L.context.reportedItem=t,v&&L.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=L.context;L.context.highlightReason=Iu,L.context.highlightEvent=void 0,a&&Oe(t,Id(r,i,{label:t===void 0?void 0:L.context.itemLabels.current[n]??void 0}))});X(()=>{Ae()},[re,Ae]);let je=W.useMemo(()=>{if(!v)return Te.reference;if(!Te.trigger)return qc;let{onFocus:e,...t}=Te.trigger;return t},[v,Te.reference,Te.trigger]);L.useSyncedValue(`inputProps`,v?Te.reference??qc:qc);let Me=W.useMemo(()=>{let e=mc(De.reference,je,Ce.reference,{onMouseMove(){L.set(`allowMouseEnter`,!0)}},me);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=z,e},[L,De.reference,je,Ce.reference,me,z]),Ne=W.useMemo(()=>{let e=mc(Te.trigger,Ce.trigger,me);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[Te.trigger,Ce.trigger,me]);sc(()=>(L.update({inactiveTriggerProps:Ne}),null)),H_(L,{floatingRootContext:ye,activeTriggerProps:Me,inactiveTriggerProps:Ne,popupProps:W.useMemo(()=>mc(j_,{onMouseMove(){L.set(`allowMouseEnter`,!0),U.type===`menu`&&L.set(`hoverEnabled`,!1)},onClick(){L.select(`hoverEnabled`)&&L.set(`hoverEnabled`,!1)},onKeyDown(e){let t=L.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},De.floating,Te.floating,Ce.floating),[U.type,L,De.floating,Te.floating,Ce.floating]),itemProps:Te.item??qc});let Pe=W.useMemo(()=>({store:L,parent:D,orientation:u,loopFocus:l,allowEscape:b,defaultFloatingId:k,setRenderedFloatingId:j,virtualFocus:v,parentVirtualFocus:E,syncHighlightedItem:Ae}),[L,D,u,l,b,k,v,E,Ae]),Fe=typeof t==`function`?t({payload:ae}):t,Ie=(0,G.jsxs)(gu.Provider,{value:Pe,children:[p&&(0,G.jsx)(P_,{handle:p,store:L}),Fe]});return(U.type===void 0||U.type===`context-menu`)&&(Ie=(0,G.jsx)(sm,{externalTree:R,children:Ie})),Ie});function lv(e){let t=W.useContext(av);if(t===null)return(0,G.jsx)(cv,{...e});let n=t.Root;return(0,G.jsx)(av.Provider,{value:null,children:(0,G.jsx)(n,{...t.options,...e})})}var uv={};function dv(e){_u();let t=W.useContext(av);if(t!==null){let n=t.SubmenuRoot;return(0,G.jsx)(av.Provider,{value:null,children:(0,G.jsx)(n,{...t.options,...e})})}return(0,G.jsx)(og.Provider,{value:uv,children:(0,G.jsx)(cv,{...e,isSubmenu:!0})})}var fv=5;function pv(e,t){let n=mv(t);return e.clientX>=n.left-fv&&e.clientX<=n.right+fv&&e.clientY>=n.top-fv&&e.clientY<=n.bottom+fv}function mv(e){let t=e.getBoundingClientRect(),n=Is(e);if(vd)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function hv(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Ac(),{ref:i,index:a}=Td(e),o=n===a,s=W.useRef(null),c=Ic(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function gv(e){let{render:t,className:n,style:r,state:i=qc,props:a=Kc,refs:o=Kc,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=hv({metadata:s});return Zc(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function _v(e){if(Bs(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Qs(e))return _v(tc(e))}function vv(e,t){function n(n,r,i){let a=n.currentTarget;Yl.flushSync(()=>{e.setOpen(!1,Fd(Uu,n.nativeEvent,a))}),wp(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Tp(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function yv(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=W.useRef(!1);return W.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,Z(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:qc,[t,n,r])}var bv=p_(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=_u(!0),h=ev(d)??m?.store;if(!h)throw Error(Oc(85));let g=jd(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),x=W.useRef(null),S=Sv(),C=Ac(!0),w=im(),T=W.useMemo(()=>w??new em,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=z_(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:am(T),floatingParentNodeId:rm(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=Nc({disabled:A,native:o});W.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=W.useRef(null),P=lu(),F=Y(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;$(N.current,t)||$(h.select(`positionerElement`),t)||t===N.current||t!=null&&_v(t)===h.select(`rootId`)||pv(e,N.current)||T.events.emit(`close`,{domEvent:e,reason:Ju})});W.useEffect(()=>{let e=Z(N.current);if(y&&h.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,F,{once:!0}),()=>{e.removeEventListener(`mouseup`,F)}},[y,F,h]);let I=O&&S.context.hasSubmenuOpen,L=Im(v,{enabled:(c??I)&&!A&&(!O||I&&!D),handleClose:Qm({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),R=xv(y,h.select(`lastOpenChangeReason`)),ee=_m(v,{enabled:!A,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&R}),z=Cm(v,{enabled:!A&&I}),B=yv({open:y,enabled:O,mouseDownAction:`open`}),V=W.useMemo(()=>mc(z.reference,ee.reference),[z.reference,ee.reference]),te=h.useState(`triggerProps`,D),ne=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:H,handleFocusTargetFocus:U}=vv(h,x),re={disabled:A,open:y},ie=[N,t,M,E,x],ae=[V,L??qc,te,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),Z(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},ne,O?{role:`menuitem`}:{},B,p,j],oe=Zc(`button`,e,{enabled:!O,stateAttributesMapping:ju,state:re,ref:ie,props:ae});return O?(0,G.jsx)(gv,{tag:`button`,render:n,className:r,style:i,state:re,refs:ie,props:ae,stateAttributesMapping:ju}):y?(0,G.jsxs)(W.Fragment,{children:[(0,G.jsx)(Qd,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:H},`${g}-pre-focus-guard`),(0,G.jsx)(W.Fragment,{children:oe},g),(0,G.jsx)(Qd,{ref:h.context.triggerFocusTargetRef,onFocus:U},`${g}-post-focus-guard`)]}):(0,G.jsx)(W.Fragment,{children:oe},g)});function xv(e,t){let n=lu(),[r,i]=W.useState(!1);return X(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Sv(){let e=g_(!0);return W.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}var Cv=W.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Zc(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),wv={"aria-expanded":void 0},Tv=W.forwardRef(function(e,t){let{render:n,className:r,style:i,label:a,id:o,nativeButton:s=!1,openOnHover:c=!0,delay:l=100,closeDelay:u=0,disabled:d=!1,...f}=e,p=_u(!0);if(p?.parent.type!==`menu`)throw Error(Oc(37));let m=hu(),h=sg(),{store:g,parentVirtualFocus:_}=p,v=p.parent.store,y=Td({guess:!0,label:a}),b=jd(o),x=g.useState(`open`),S=W.useRef(!1),C=g.useState(`positionerElement`),w=g.useState(`floatingRootContext`),T=g.useState(`floatingTreeRoot`),E=g.useState(`triggerPopupId`,b),D=I_(b,g),O=Y(e=>{D(e);let t=g.select(`activeTriggerElement`);e!==null&&g.select(`open`)&&(t===e||g.select(`activeTriggerId`)==null)&&g.update({activeTriggerId:b??null,activeTriggerElement:e,closeDelay:u})}),k=W.useRef(null),A=W.useCallback(e=>{k.current=e,g.set(`activeTriggerElement`,e)},[g]);X(()=>(O(k.current),()=>O(null)),[O,b,g]),X(()=>{if(!x||!C)return;function e(e){tf(e)===g.context.beforeContentFocusGuardRef.current&&(S.current=e.relatedTarget===k.current)}return C.addEventListener(`focusout`,e,!0),()=>{S.current=!1,C.removeEventListener(`focusout`,e,!0)}},[x,C,g]),g.useSyncedValue(`closeDelay`,u);let j=g.useState(`disabled`),M=v.useState(`disabled`),N=d||j||M,P=v.useState(`itemProps`),F=v.useState(`isActive`,y.index),I=W.useMemo(()=>({type:`submenu-trigger`,setActive(e){v.select(`highlightItemOnHover`)&&v.setActiveIndex(y.index,qu,e)}}),[v,y.index]),{getItemProps:L,itemRef:R}=Sd({closeOnClick:!1,disabled:N,highlighted:F,id:b,store:g,typingRef:v.context.typingRef,nativeButton:s,itemMetadata:I,nodeId:m?.context.nodeId}),ee=Im(w,{enabled:g.useState(`hoverEnabled`)&&c&&!N,handleClose:Qm({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:{open:l,close:u},shouldOpen:l>0?()=>v.select(`allowMouseEnter`):void 0,triggerElementRef:k,externalTree:T,isClosing:()=>g.select(`transitionStatus`)===`ending`,guardStaleOpen:!0}),z=_m(w,{enabled:!N,event:`mousedown`,toggle:!0,ignoreMouse:c,stickIfOpen:c}).reference??qc,B=g.useState(`triggerProps`,!0);delete B.id;let V={disabled:N,highlighted:F,open:x},te=g.useState(`openMethod`),ne=g.useState(`lastOpenChangeReason`)===`list-navigation`||te===`keyboard`,H=x&&ne&&_d;return Zc(`div`,e,{state:V,stateAttributesMapping:Au,props:[z,ee,B,h?.onTriggerKeyDown?{onKeyDown:h.onTriggerKeyDown}:void 0,P,H?wv:void 0,{"aria-controls":E,tabIndex:_||!(x||F)?-1:0,onFocus(e){g.select(`open`)&&S.current&&(S.current=!1,g.setOpen(!1,Fd(Uu,e.nativeEvent)))},onBlur(){F&&v.setActiveIndex(null,Iu)}},f,L],ref:[t,y.ref,R,O,A]})}),Ev=W.forwardRef(function(e,t){let n=nd(e,t,`submenu-trigger`);if(!n.visible)return null;let r=n.props?mc(n.props,e):e;return(0,G.jsx)(Tv,{...r,ref:n.ref})});function Dv(e){let t=(0,Xa.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(lv,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function Ov(e){let t=(0,Xa.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(bv,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function kv(e){let t=(0,Xa.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?0:a,u=o===void 0?`bottom`:o,d=s===void 0?4:s,f;t[7]===n?f=t[8]:(f=Os(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;t[9]!==r||t[10]!==f?(p=(0,G.jsx)(mg,{"data-slot":`dropdown-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,G.jsx)(_g,{children:(0,G.jsx)(s_,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function Av(e){let t=(0,Xa.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(Ud,{"data-slot":`dropdown-menu-group`,...n}),t[2]=n,t[3]=r),r}function jv(e){let t=(0,Xa.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=Os(`px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,G.jsx)(Wd,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function Mv(e){let t=(0,Xa.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=Os(`group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,G.jsx)(Kd,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Nv(e){let t=(0,Xa.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(dv,{"data-slot":`dropdown-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Pv(e){let t=(0,Xa.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=Os(`flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,G.jsx)(Ja,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,G.jsxs)(Ev,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Fv(e){let t=(0,Xa.c)(16),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({align:i,alignOffset:a,side:o,sideOffset:s,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?-3:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=Os(`w-auto min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;return t[9]!==c||t[10]!==l||t[11]!==r||t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,G.jsx)(kv,{"data-slot":`dropdown-menu-sub-content`,className:f,align:c,alignOffset:l,side:u,sideOffset:d,...r}),t[9]=c,t[10]=l,t[11]=r,t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function Iv(e){let t=(0,Xa.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:i,children:r,checked:n,inset:a,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===i?s=t[7]:(s=Os(`relative flex min-h-7 cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,i),t[6]=i,t[7]=s);let c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,G.jsx)(zd,{children:(0,G.jsx)(Ka,{})})}),t[8]=c):c=t[8];let l;return t[9]!==n||t[10]!==r||t[11]!==a||t[12]!==o||t[13]!==s?(l=(0,G.jsxs)(Rd,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":a,className:s,checked:n,...o,children:[c,r]}),t[9]=n,t[10]=r,t[11]=a,t[12]=o,t[13]=s,t[14]=l):l=t[14],l}function Lv(e){let t=(0,Xa.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Os(`-mx-1 my-1 h-px bg-border/50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(Cv,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Rv=te({id:ae,name:ae,signOut:pe}),zv=m(_e).atom(l(R(`/auth/user`),Oe(I),Oe(z(Rv))));function Bv(){let e=(0,Xa.c)(27),t=Fl(zv);if(!P(t))return null;let n;e[0]===t.value.id?n=e[1]:(n=E(`github:`,``)(t.value.id),e[0]=t.value.id,e[1]=n);let r=`https://avatars.githubusercontent.com/u/${n}?s=96`,i;e[2]!==t.value.name||e[3]!==r?(i=(0,G.jsx)(fu,{src:r,alt:t.value.name}),e[2]=t.value.name,e[3]=r,e[4]=i):i=e[4];let a;e[5]===t.value.name?a=e[6]:(a=d(ce(0,1)(t.value.name)),e[5]=t.value.name,e[6]=a);let o;e[7]===a?o=e[8]:(o=(0,G.jsx)(pu,{children:a}),e[7]=a,e[8]=o);let s;e[9]!==i||e[10]!==o?(s=(0,G.jsx)(Ov,{"aria-label":`Account`,children:(0,G.jsxs)(du,{size:`sm`,children:[i,o]})}),e[9]=i,e[10]=o,e[11]=s):s=e[11];let c;e[12]===t.value.name?c=e[13]:(c=(0,G.jsx)(Av,{children:(0,G.jsxs)(jv,{children:[`@`,t.value.name]})}),e[12]=t.value.name,e[13]=c);let l;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,G.jsx)(Lv,{}),e[14]=l):l=e[14];let u=!t.value.signOut,f;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(f=new URLSearchParams({next:location.href}),e[15]=f):f=e[15];let p=`/auth/sign-out?${f}`,m;e[16]===p?m=e[17]:(m=(0,G.jsx)(`a`,{"aria-label":`Sign out`,href:p}),e[16]=p,e[17]=m);let h;e[18]!==m||e[19]!==u?(h=(0,G.jsx)(Mv,{variant:`destructive`,disabled:u,render:m,children:`Sign out`}),e[18]=m,e[19]=u,e[20]=h):h=e[20];let g;e[21]!==h||e[22]!==c?(g=(0,G.jsxs)(kv,{align:`end`,className:`w-auto min-w-48`,children:[c,l,h]}),e[21]=h,e[22]=c,e[23]=g):g=e[23];let _;return e[24]!==g||e[25]!==s?(_=(0,G.jsxs)(Dv,{children:[s,g]}),e[24]=g,e[25]=s,e[26]=_):_=e[26],_}function Vv(e){let t=(0,Xa.c)(15),n;t[0]===e.icon?n=t[1]:(n=(0,G.jsx)(`img`,{src:e.icon,alt:``,className:`pixelated size-8`}),t[0]=e.icon,t[1]=n);let r;t[2]===e.name?r=t[3]:(r=(0,G.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:e.name}),t[2]=e.name,t[3]=r);let i;t[4]!==n||t[5]!==r?(i=(0,G.jsxs)(`a`,{href:`/`,className:`-ml-1 flex shrink-0 items-center gap-1.5`,children:[n,r]}),t[4]=n,t[5]=r,t[6]=i):i=t[6];let a;t[7]===e.account?a=t[8]:(a=e.account??(0,G.jsx)(Bv,{}),t[7]=e.account,t[8]=a);let o;t[9]!==e.children||t[10]!==a?(o=(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[e.children,a]}),t[9]=e.children,t[10]=a,t[11]=o):o=t[11];let s;return t[12]!==i||t[13]!==o?(s=(0,G.jsxs)(`header`,{className:`bg-background border-border sticky top-0 z-30 flex h-12 shrink-0 items-center justify-between gap-4 border-b px-4`,children:[i,o]}),t[12]=i,t[13]=o,t[14]=s):s=t[14],s}var Hv=`/assets/icon-dark-B6bEETJE.svg`,Uv=Gi({shellComponent:e=>(0,G.jsxs)(`div`,{className:`bg-background text-foreground safe-area flex h-dvh w-dvw flex-col`,children:[(0,G.jsx)(Ta,{}),(0,G.jsx)(Da,{}),(0,G.jsx)(Vv,{icon:Hv,name:`gateway`}),e.children]})}),Wv=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Gv=function(e){return`/`+e},Kv={},qv=function(e){return e.pathname.endsWith(`.css`)},Jv=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Yv=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,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 s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Gv(t,n);let r=s(t),i=qv(r);return Jv(Kv,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Wv,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}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)})},Xv={homeIndexRoute:Ki(`/(home)/`)({component:qi(()=>Yv(()=>import(`./(home)-CQVRM9XF.js`),__vite__mapDeps([0,1,2,3])),`component`)}).update({id:`/(home)/`,path:`/`,getParentRoute:()=>Uv})},Zv=bl(Uv._addFileChildren(Xv)._addFileTypes());(0,Ya.createRoot)(Zv.root).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(ya,{router:Zv.router})}));export{ul as $,gm as A,Nu as B,v_ as C,vg as D,Gg as E,jd as F,lu as G,xu as H,Hu as I,Sl as J,nu as K,Xu as L,$ as M,tf as N,ig as O,Fd as P,sl as Q,Iu as R,k_ as S,i_ as T,vu as U,yu as V,bu as W,ml as X,hl as Y,pl as Z,B_ as _,Nv as a,Gc as at,N_ as b,Ov as c,mc as ct,$_ as d,sc as dt,cl as et,W_ as f,Os as ft,L_ as g,M_ as h,Ha as ht,Mv as i,qc as it,Qp as j,bm as k,Cv as l,X as lt,P_ as m,Ka as mt,Iv as n,ol as nt,Fv as o,Nc as ot,j_ as p,to as pt,$l as q,kv as r,Zc as rt,Pv as s,Oc as st,Dv as t,ll as tt,q_ as u,Y as ut,V_ as v,f_ as w,U_ as x,H_ as y,Mu as z};
|