@cartanova/qgrid-cli 2.9.6 → 2.9.9
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/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +3 -2
- package/bundle/dist/application/qgrid/qgrid.types.js +2 -2
- package/bundle/dist/application/request-log/request-log.model.js +2 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-constants.js +6 -2
- package/bundle/dist/utils/providers/common/model-cost.js +20 -2
- package/bundle/dist/utils/providers/openai/openai-backend-protocol.js +3 -2
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +86 -5
- package/bundle/src/application/qgrid/qgrid-image-generation.test.ts +7 -1
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.test.ts +13 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +2 -1
- package/bundle/src/application/qgrid/qgrid.frame.test.ts +2 -2
- package/bundle/src/application/qgrid/qgrid.types.ts +2 -2
- package/bundle/src/application/request-log/request-log.model.ts +2 -0
- package/bundle/src/application/sonamu.generated.http +4 -2
- package/bundle/src/utils/providers/anthropic/anthropic-constants.test.ts +9 -1
- package/bundle/src/utils/providers/anthropic/anthropic-constants.ts +11 -2
- package/bundle/src/utils/providers/common/effort.test.ts +3 -0
- package/bundle/src/utils/providers/common/model-cost.test.ts +23 -0
- package/bundle/src/utils/providers/common/model-cost.ts +28 -2
- package/bundle/src/utils/providers/common/provider-dispatcher.ts +1 -1
- package/bundle/src/utils/providers/openai/openai-backend-protocol.test.ts +5 -0
- package/bundle/src/utils/providers/openai/openai-backend-protocol.ts +2 -2
- package/bundle/src/utils/providers/openai/openai-dispatcher.test.ts +117 -0
- package/bundle/src/utils/providers/openai/openai-dispatcher.ts +136 -1
- package/bundle/web-dist/client/assets/index-D8VwLsuq.js +106 -0
- package/bundle/web-dist/client/assets/index-D_sagzsR.css +1 -0
- package/bundle/web-dist/client/assets/logs-_T8KV5ne.js +1 -0
- package/bundle/web-dist/client/assets/{monit-BkGkzl6m.js → monit-DRCrtO2j.js} +1 -1
- package/bundle/web-dist/client/assets/request-model-eygfdRv7.js +1 -0
- package/bundle/web-dist/client/assets/{routes-DqY8SXcB.js → routes-5A6mia6C.js} +1 -1
- package/bundle/web-dist/client/assets/{services.generated-C6jfEwfK.js → services.generated-Bg2XkD-D.js} +1 -1
- package/bundle/web-dist/client/assets/settings-BpP9WVFI.js +1 -0
- package/bundle/web-dist/client/assets/show-D5ifZXdy.js +2 -0
- package/bundle/web-dist/client/assets/tokens-Cfe6WvLK.js +1 -0
- package/bundle/web-dist/client/assets/{use-oauth-login-flow-Cjdnj_8D.js → use-oauth-login-flow-BTLUGhwh.js} +1 -1
- package/bundle/web-dist/client/assets/{use-update-token-mutation-BIvO70-M.js → use-update-token-mutation-Dkv_HG-C.js} +1 -1
- package/bundle/web-dist/client/index.html +3 -3
- package/bundle/web-dist/server/assets/{lazyRouteComponent-C_k4R5n6.js → lazyRouteComponent-DyizoQKi.js} +2 -2
- package/bundle/web-dist/server/assets/{logs-lBOU5eUP.js → logs-DO8zBdBR.js} +12 -5
- package/bundle/web-dist/server/assets/{monit-BW2X1D23.js → monit-COH4MckI.js} +2 -2
- package/bundle/web-dist/server/assets/{plus-DilmHifT.js → plus-C1D8z9o0.js} +1 -1
- package/bundle/web-dist/server/assets/{react-dom-CHRRsKwb.js → react-dom-PfWvArTX.js} +1 -1
- package/bundle/web-dist/server/assets/request-model-DXclJfdP.js +13 -0
- package/bundle/web-dist/server/assets/{routes-B408iqh1.js → routes-Btja-741.js} +4 -4
- package/bundle/web-dist/server/assets/{services.generated-buX3cJzR.js → services.generated-BsKOUSXl.js} +1 -1
- package/bundle/web-dist/server/assets/{settings-CFoXQaAg.js → settings-DPcWGvy-.js} +3 -3
- package/bundle/web-dist/server/assets/{show-CcZJO6WF.js → show-CMXbb3TJ.js} +10 -4
- package/bundle/web-dist/server/assets/{tokens-C32lycTe.js → tokens-DAUmTrgO.js} +15 -11
- package/bundle/web-dist/server/assets/{use-oauth-login-flow-DCjxIa80.js → use-oauth-login-flow-GsGwqefs.js} +1 -1
- package/bundle/web-dist/server/assets/{use-update-token-mutation-CqK8i8Fa.js → use-update-token-mutation-RujWERvj.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +275 -51
- package/package.json +1 -1
- package/skills/qgrid/SKILL.md +10 -1
- package/skills/qgrid/references/ai-sdk-provider-contract.md +1 -1
- package/skills/qgrid/references/anthropic-claude-code-runtime.md +4 -2
- package/skills/qgrid/references/decision-rationale.md +11 -2
- package/skills/qgrid/references/openai-codex-runtime.md +30 -5
- package/skills/qgrid/references/provider-runtime-differences.md +1 -1
- package/skills/qgrid/references/request-log-run-lifecycle.md +3 -1
- package/skills/qgrid/references/sonamu-api-web-flow.md +9 -1
- package/skills/qgrid/references/token-auth-quota-lifecycle.md +2 -0
- package/skills/qgrid/references/verification-and-debugging.md +4 -1
- package/bundle/web-dist/client/assets/index-BshX4Gd8.css +0 -1
- package/bundle/web-dist/client/assets/index-BtVmANcA.js +0 -106
- package/bundle/web-dist/client/assets/logs-BCuaLfPL.js +0 -1
- package/bundle/web-dist/client/assets/settings-DbkDAJfh.js +0 -1
- package/bundle/web-dist/client/assets/show-Dx5JFzwy.js +0 -2
- package/bundle/web-dist/client/assets/tokens-DHahzDQJ.js +0 -1
- /package/bundle/web-dist/client/assets/{plus-p4vtg6LN.js → plus-CknMNCP5.js} +0 -0
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tokens-DHahzDQJ.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-tanstack-DJRQAbrY.js","assets/vendor-react-DH4kUfK2.js","assets/services.generated-C6jfEwfK.js","assets/use-oauth-login-flow-Cjdnj_8D.js","assets/use-update-token-mutation-BIvO70-M.js","assets/plus-p4vtg6LN.js","assets/settings-DbkDAJfh.js","assets/monit-BkGkzl6m.js","assets/cost-CpjVoAqp.js","assets/logs-BCuaLfPL.js","assets/routes-DqY8SXcB.js","assets/show-Dx5JFzwy.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-Dw2cE7zH.js";import{A as r,C as i,D as a,E as o,F as s,I as c,M as l,N as u,O as d,P as f,S as p,T as m,a as h,b as g,c as _,d as v,f as y,i as b,j as x,k as S,l as C,n as w,o as T,r as E,s as D,t as O,v as k,w as A,x as j}from"./vendor-tanstack-DJRQAbrY.js";import{i as M,n as N,r as P,t as ee}from"./vendor-react-DH4kUfK2.js";import{d as F,f as I,h as te,l as ne,m as re,n as L,o as ie,p as ae,s as oe,u as se}from"./services.generated-C6jfEwfK.js";import{t as ce}from"./preload-helper-ca-nBW7U.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function le(e){return e}function R(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??le,o=t.mutations||[],s=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),s.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l})=>{let u=c?m(c):void 0,d=r.data===void 0?u?.data:r.data,f=d===void 0?d:a(d),p=i.get(o),h=p?.state.status===`pending`,g=p?.state.fetchStatus===`fetching`;if(p){let e=u&&l!==void 0&&l>p.state.dataUpdatedAt;if(r.dataUpdatedAt>p.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;p.setState({...t,data:f})}}else p=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s},{...r,data:f,fetchStatus:`idle`,status:f===void 0?r.status:`success`});c&&!h&&!g&&(l===void 0||l>p.state.dataUpdatedAt)&&p.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(x)})}var ue=class extends c{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new g({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=de(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=de(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=de(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=de(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){A.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>S(t,e))}findAll(e={}){return this.getAll().filter(t=>S(e,t))}notify(e){A.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return A.batch(()=>Promise.all(e.map(e=>e.continue().catch(x))))}};function de(e){return e.options.scope?.id}var fe=class extends c{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??d(r,t),a=this.get(i);return a||(a=new p({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){A.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>r(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>r(e,t)):t}notify(e){A.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){A.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){A.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},pe=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new fe,this.#t=e.mutationCache||new ue,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=s.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=i.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(u(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=o(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return A.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;A.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return A.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=A.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(x).catch(x)}invalidateQueries(e,t={}){return A.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=A.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(x)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(x)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(u(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(x).catch(x)}fetchInfiniteQuery(e){return e.behavior=j(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(x).catch(x)}ensureInfiniteQueryData(e){return e.behavior=j(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return i.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(a(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{l(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(a(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{l(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=d(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===f&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},me=t(ee(),1),z=t(M()),B=P(),he=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}),(0,B.jsx)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8`})]})}),ge=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}),(0,B.jsx)(`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`})]})}),_e=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`}),(0,B.jsx)(`circle`,{cx:16.5,cy:7.5,r:.5,fill:`currentColor`})]})}),ve=[{label:`Overview`,items:[{title:`Dashboard`,path:`/`,icon:ge}]},{label:`Manage`,items:[{title:`Tokens`,path:`/tokens`,icon:_e},{title:`Request Logs`,shortTitle:`Logs`,path:`/logs`,icon:he},{title:`Server Logs`,shortTitle:`Server`,path:`/monit`,icon:e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 19h8M4 17l6-6l-6-6`})})},{title:`Settings`,path:`/settings`,icon:e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}),(0,B.jsx)(`circle`,{cx:12,cy:12,r:3})]})})}]}],ye=ve.flatMap(e=>e.items);function be(e,t){return e===`/`?t===`/`||t===``:t.startsWith(e)}function xe(){let e=v({select:e=>e.location.pathname});return(0,B.jsx)(`nav`,{className:`md:hidden shrink-0 border-t border-sand-200/60 bg-sand-50/95 backdrop-blur-sm pb-[env(safe-area-inset-bottom)]`,children:(0,B.jsx)(`div`,{className:`flex`,children:ye.map(t=>{let n=be(t.path,e);return(0,B.jsxs)(C,{to:t.path,className:`flex-1 flex flex-col items-center gap-0.5 py-2 no-underline transition-colors duration-150 ${n?`text-sienna-600`:`text-sand-500`}`,children:[(0,B.jsx)(t.icon,{className:`size-5 ${n?`text-sienna-500`:`text-sand-400`}`}),(0,B.jsx)(`span`,{className:`text-[10px] ${n?`font-medium`:``}`,children:t.shortTitle??t.title})]},t.path)})})})}function Se(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,we=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Te={};function Ee(e,t){return((t||Te).jsx?we:Ce).test(e)}var De=/[ \t\n\f\r]/g;function Oe(e){return typeof e==`object`?e.type===`text`?ke(e.value):!1:ke(e)}function ke(e){return e.replace(De,``)===``}var Ae=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ae.prototype.normal={},Ae.prototype.property={},Ae.prototype.space=void 0;function je(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ae(n,r,t)}function Me(e){return e.toLowerCase()}var Ne=class{constructor(e,t){this.attribute=t,this.property=e}};Ne.prototype.attribute=``,Ne.prototype.booleanish=!1,Ne.prototype.boolean=!1,Ne.prototype.commaOrSpaceSeparated=!1,Ne.prototype.commaSeparated=!1,Ne.prototype.defined=!1,Ne.prototype.mustUseProperty=!1,Ne.prototype.number=!1,Ne.prototype.overloadedBoolean=!1,Ne.prototype.property=``,Ne.prototype.spaceSeparated=!1,Ne.prototype.space=void 0;var Pe=e({boolean:()=>V,booleanish:()=>Ie,commaOrSpaceSeparated:()=>Be,commaSeparated:()=>ze,number:()=>H,overloadedBoolean:()=>Le,spaceSeparated:()=>Re}),Fe=0,V=Ve(),Ie=Ve(),Le=Ve(),H=Ve(),Re=Ve(),ze=Ve(),Be=Ve();function Ve(){return 2**++Fe}var He=Object.keys(Pe),Ue=class extends Ne{constructor(e,t,n,r){let i=-1;if(super(e,t),We(this,`space`,r),typeof n==`number`)for(;++i<He.length;){let e=He[i];We(this,He[i],(n&Pe[e])===Pe[e])}}};Ue.prototype.defined=!0;function We(e,t,n){n&&(e[t]=n)}function Ge(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ue(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Me(r)]=r,n[Me(a.attribute)]=r}return new Ae(t,n,e.space)}var Ke=Ge({properties:{ariaActiveDescendant:null,ariaAtomic:Ie,ariaAutoComplete:null,ariaBusy:Ie,ariaChecked:Ie,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:Re,ariaCurrent:null,ariaDescribedBy:Re,ariaDetails:null,ariaDisabled:Ie,ariaDropEffect:Re,ariaErrorMessage:null,ariaExpanded:Ie,ariaFlowTo:Re,ariaGrabbed:Ie,ariaHasPopup:null,ariaHidden:Ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Re,ariaLevel:H,ariaLive:null,ariaModal:Ie,ariaMultiLine:Ie,ariaMultiSelectable:Ie,ariaOrientation:null,ariaOwns:Re,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Ie,ariaReadOnly:Ie,ariaRelevant:null,ariaRequired:Ie,ariaRoleDescription:Re,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Ie,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function qe(e,t){return t in e?e[t]:t}function Je(e,t){return qe(e,t.toLowerCase())}var Ye=Ge({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ze,acceptCharset:Re,accessKey:Re,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:Re,autoFocus:V,autoPlay:V,blocking:Re,capture:null,charSet:null,checked:V,cite:null,className:Re,cols:H,colSpan:null,content:null,contentEditable:Ie,controls:V,controlsList:Re,coords:H|ze,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:Le,draggable:Ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:Re,height:H,hidden:Le,high:H,href:null,hrefLang:null,htmlFor:Re,httpEquiv:Re,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:Re,itemRef:Re,itemScope:V,itemType:Re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:V,optimum:H,pattern:null,ping:Re,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:Re,required:V,reversed:V,rows:H,rowSpan:H,sandbox:Re,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:Ie,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Re,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Ie,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:H,security:null,unselectable:null},space:`html`,transform:Je}),Xe=Ge({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Be,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:Re,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ze,g2:ze,glyphName:ze,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Be,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Be,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Be,rev:Be,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Be,requiredFeatures:Be,requiredFonts:Be,requiredFormats:Be,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Be,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Be,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Be,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:qe}),Ze=Ge({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Qe=Ge({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Je}),$e=Ge({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),et={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},tt=/[A-Z]/g,nt=/-[a-z]/g,rt=/^data[-\w.:]+$/i;function it(e,t){let n=Me(t),r=t,i=Ne;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&rt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(nt,ot);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!nt.test(e)){let n=e.replace(tt,at);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ue}return new i(r,t)}function at(e){return`-`+e.toLowerCase()}function ot(e){return e.charAt(1).toUpperCase()}var st=je([Ke,Ye,Ze,Qe,$e],`html`),ct=je([Ke,Xe,Ze,Qe,$e],`svg`);function lt(e){return e.join(` `).trim()}var ut=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
3
|
-
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),dt=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(ut());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),ft=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),pt=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(dt()),r=ft();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),mt=gt(`end`),ht=gt(`start`);function gt(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function _t(e){let t=ht(e),n=mt(e);if(t&&n)return{start:t,end:n}}function vt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?bt(e.position):`start`in e||`end`in e?bt(e):`line`in e||`column`in e?yt(e):``}function yt(e){return xt(e&&e.line)+`:`+xt(e&&e.column)}function bt(e){return yt(e&&e.start)+`-`+yt(e&&e.end)}function xt(e){return e&&typeof e==`number`?e:1}var St=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=vt(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};St.prototype.file=``,St.prototype.name=``,St.prototype.reason=``,St.prototype.message=``,St.prototype.stack=``,St.prototype.column=void 0,St.prototype.line=void 0,St.prototype.ancestors=void 0,St.prototype.cause=void 0,St.prototype.fatal=void 0,St.prototype.place=void 0,St.prototype.ruleId=void 0,St.prototype.source=void 0;var Ct=t(pt(),1),wt={}.hasOwnProperty,Tt=new Map,Et=/[A-Z]/g,Dt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Ot=new Set([`td`,`th`]),kt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function At(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Vt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Bt(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?ct:st,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=jt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function jt(e,t,n){if(t.type===`element`)return Mt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Nt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Ft(e,t,n);if(t.type===`mdxjsEsm`)return Pt(e,t);if(t.type===`root`)return It(e,t,n);if(t.type===`text`)return Lt(e,t)}function Mt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ct,e.schema=i),e.ancestors.push(t);let a=qt(e,t.tagName,!1),o=Ht(e,t),s=Wt(e,t);return Dt.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Oe(e):!0})),Rt(e,o,a,t),zt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Nt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Jt(e,t.position)}function Pt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Jt(e,t.position)}function Ft(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ct,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:qt(e,t.name,!0),o=Ut(e,t),s=Wt(e,t);return Rt(e,o,a,t),zt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function It(e,t,n){let r={};return zt(r,Wt(e,t)),e.create(t,e.Fragment,r,n)}function Lt(e,t){return t.value}function Rt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Bt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Vt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=ht(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ht(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&wt.call(t.properties,i)){let a=Gt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Ot.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Ut(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Jt(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Jt(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Wt(e,t){let n=[],r=-1,i=e.passKeys?new Map:Tt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=jt(e,a,o);s!==void 0&&n.push(s)}return n}function Gt(e,t,n){let r=it(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Se(n):lt(n)),r.property===`style`){let t=typeof n==`object`?n:Kt(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Yt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?et[r.property]||r.property:r.attribute,n]}}function Kt(e,t){try{return(0,Ct.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new St("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=kt+`#cannot-parse-style-attribute`,r}}function qt(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Ee(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Ee(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return wt.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Jt(e)}function Jt(e,t){let n=new St("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=kt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Yt(e){let t={},n;for(n in e)wt.call(e,n)&&(t[Xt(n)]=e[n]);return t}function Xt(e){let t=e.replace(Et,Zt);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Zt(e){return`-`+e.toLowerCase()}var Qt={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},$t={};function en(e,t){let n=t||$t;return tn(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function tn(e,t,n){if(rn(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return nn(e.children,t,n)}return Array.isArray(e)?nn(e,t,n):``}function nn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=tn(e[i],t,n);return r.join(``)}function rn(e){return!!(e&&typeof e==`object`)}var an=document.createElement(`i`);function on(e){let t=`&`+e+`;`;an.innerHTML=t;let n=an.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function sn(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function cn(e,t){return e.length>0?(sn(e,e.length,0,t),e):t}var ln={}.hasOwnProperty;function un(e){let t={},n=-1;for(;++n<e.length;)dn(t,e[n]);return t}function dn(e,t){let n;for(n in t){let r=(ln.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ln.call(r,a)||(r[a]=[]);let e=i[a];fn(r[a],Array.isArray(e)?e:e?[e]:[])}}}function fn(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);sn(e,0,0,r)}function pn(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function mn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var hn=Tn(/[A-Za-z]/),gn=Tn(/[\dA-Za-z]/),_n=Tn(/[#-'*+\--9=?A-Z^-~]/);function vn(e){return e!==null&&(e<32||e===127)}var yn=Tn(/\d/),bn=Tn(/[\dA-Fa-f]/),xn=Tn(/[!-/:-@[-`{-~]/);function U(e){return e!==null&&e<-2}function Sn(e){return e!==null&&(e<0||e===32)}function W(e){return e===-2||e===-1||e===32}var Cn=Tn(/\p{P}|\p{S}/u),wn=Tn(/\s/);function Tn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function En(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&gn(e.charCodeAt(n+1))&&gn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function G(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return W(r)?(e.enter(n),s(r)):t(r)}function s(r){return W(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Dn={tokenize:On};function On(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),G(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return U(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var kn={tokenize:jn},An={tokenize:Mn};function jn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return sn(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(An,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(An,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return U(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;sn(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Mn(e,t,n){return G(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Nn(e){if(e===null||Sn(e)||wn(e))return 1;if(Cn(e))return 2}function Pn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Fn={name:`attention`,resolveAll:In,tokenize:Ln};function In(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Rn(d,-c),Rn(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=cn(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=cn(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=cn(l,Pn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=cn(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=cn(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,sn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Ln(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Nn(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Nn(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Rn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var zn={name:`autolink`,tokenize:Bn};function Bn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return hn(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||gn(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||gn(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||vn(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):_n(t)?(e.consume(t),l):n(t)}function u(e){return gn(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||gn(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Vn={partial:!0,tokenize:Hn};function Hn(e,t,n){return r;function r(t){return W(t)?G(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||U(e)?t(e):n(e)}}var Un={continuation:{tokenize:Gn},exit:Kn,name:`blockQuote`,tokenize:Wn};function Wn(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return W(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Gn(e,t,n){let r=this;return i;function i(t){return W(t)?G(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Un,t,n)(r)}}function Kn(e){e.exit(`blockQuote`)}var qn={name:`characterEscape`,tokenize:Jn};function Jn(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return xn(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Yn={name:`characterReference`,tokenize:Xn};function Xn(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=gn,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=bn,u):(e.enter(`characterReferenceValue`),a=7,o=yn,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===gn&&!on(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Zn={partial:!0,tokenize:er},Qn={concrete:!0,name:`codeFenced`,tokenize:$n};function $n(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),W(t)?G(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||U(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Zn,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||U(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),G(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||U(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||U(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&W(t)?G(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||U(t)?e.check(Zn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||U(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),W(t)?G(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),W(t)?G(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||U(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function er(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var tr={name:`codeIndented`,tokenize:rr},nr={partial:!0,tokenize:ir};function rr(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),G(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):U(t)?e.attempt(nr,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||U(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ir(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):G(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):U(e)?i(e):n(e)}}var ar={name:`codeText`,previous:sr,resolve:or,tokenize:cr};function or(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function sr(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function cr(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||U(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var lr=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ur(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ur(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ur(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);ur(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ur(this.left,t.reverse())}}};function ur(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function dr(e){let t={},n=-1,r,i,a,o,s,c,l,u=new lr(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,fr(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return sn(e,0,1/0,u.slice(0)),!l}function fr(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var pr={resolve:hr,tokenize:gr},mr={partial:!0,tokenize:_r};function hr(e){return dr(e),e}function gr(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):U(t)?e.check(mr,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function _r(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),G(e,a,`linePrefix`)}function a(i){if(i===null||U(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function vr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||vn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||U(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Sn(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||vn(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function yr(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):U(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||U(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!W(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function br(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),G(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||U(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function xr(e,t){let n;return r;function r(i){return U(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):W(i)?G(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Sr={name:`definition`,tokenize:wr},Cr={partial:!0,tokenize:Tr};function wr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return yr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Sn(t)?xr(e,l)(t):l(t)}function l(t){return vr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Cr,d,d)(t)}function d(t){return W(t)?G(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||U(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Tr(e,t,n){return r;function r(t){return Sn(t)?xr(e,i)(t):n(t)}function i(t){return br(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return W(t)?G(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||U(e)?t(e):n(e)}}var Er={name:`hardBreakEscape`,tokenize:Dr};function Dr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return U(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Or={name:`headingAtx`,resolve:kr,tokenize:Ar};function kr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},sn(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ar(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Sn(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||U(n)?(e.exit(`atxHeading`),t(n)):W(n)?G(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Sn(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var jr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Mr=[`pre`,`script`,`style`,`textarea`],Nr={concrete:!0,name:`htmlFlow`,resolveTo:Ir,tokenize:Lr},Pr={partial:!0,tokenize:zr},Fr={partial:!0,tokenize:Rr};function Ir(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Lr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):hn(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):hn(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return hn(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Sn(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Mr.includes(l)?(i=1,r.interrupt?t(s):O(s)):jr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||gn(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return W(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||hn(t)?(e.consume(t),b):W(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||gn(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):W(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):W(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||U(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Sn(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||W(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||U(t)?O(t):W(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):U(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Pr,te,k)(t)):t===null||U(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Fr,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||U(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Mr.includes(n)?(e.consume(t),I):O(t)}return hn(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||U(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function Rr(e,t,n){let r=this;return i;function i(t){return U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function zr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Vn,t,n)}}var Br={name:`htmlText`,tokenize:Vr};function Vr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):hn(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):hn(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):U(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):U(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):U(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):U(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return hn(t)?(e.consume(t),S):n(t)}function S(t){return t===45||gn(t)?(e.consume(t),S):C(t)}function C(t){return U(t)?(o=C,N(t)):W(t)?(e.consume(t),C):M(t)}function w(t){return t===45||gn(t)?(e.consume(t),w):t===47||t===62||Sn(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||hn(t)?(e.consume(t),E):U(t)?(o=T,N(t)):W(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||gn(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):U(t)?(o=D,N(t)):W(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):U(t)?(o=O,N(t)):W(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):U(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Sn(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Sn(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return W(t)?G(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var Hr={name:`labelEnd`,resolveAll:Kr,resolveTo:qr,tokenize:Jr},Ur={tokenize:Yr},Wr={tokenize:Xr},Gr={tokenize:Zr};function Kr(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&sn(e,0,e.length,n),e}function qr(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=cn(s,e.slice(a+1,a+r+3)),s=cn(s,[[`enter`,u,t]]),s=cn(s,Pn(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=cn(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=cn(s,e.slice(o+1)),s=cn(s,[[`exit`,c,t]]),sn(e,a,e.length,s),e}function Jr(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(mn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Ur,u,o?u:d)(t):t===91?e.attempt(Wr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Gr,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Yr(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Sn(t)?xr(e,a)(t):a(t)}function a(t){return t===41?u(t):vr(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Sn(t)?xr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?br(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Sn(t)?xr(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Xr(e,t,n){let r=this;return i;function i(t){return yr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Zr(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Qr={name:`labelStartImage`,resolveAll:Hr.resolveAll,tokenize:$r};function $r(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ei={name:`labelStartLink`,resolveAll:Hr.resolveAll,tokenize:ti};function ti(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ni={name:`lineEnding`,tokenize:ri};function ri(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),G(e,t,`linePrefix`)}}var ii={name:`thematicBreak`,tokenize:ai};function ai(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||U(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),W(t)?G(e,s,`whitespace`)(t):s(t))}}var oi={continuation:{tokenize:ui},exit:fi,name:`list`,tokenize:li},si={partial:!0,tokenize:pi},ci={partial:!0,tokenize:di};function li(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:yn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(ii,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return yn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Vn,r.interrupt?n:u,e.attempt(si,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return W(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ui(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Vn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,G(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!W(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ci,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,G(e,e.attempt(oi,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function di(e,t,n){let r=this;return G(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function fi(e){e.exit(this.containerState.type)}function pi(e,t,n){let r=this;return G(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!W(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var mi={name:`setextUnderline`,resolveTo:hi,tokenize:gi};function hi(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function gi(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),W(t)?G(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||U(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var _i={tokenize:vi};function vi(e){let t=this,n=e.attempt(Vn,r,e.attempt(this.parser.constructs.flowInitial,i,G(e,e.attempt(this.parser.constructs.flow,i,e.attempt(pr,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var yi={resolveAll:Ci()},bi=Si(`string`),xi=Si(`text`);function Si(e){return{resolveAll:Ci(e===`text`?wi:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Ci(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function wi(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Ti=e({attentionMarkers:()=>Ni,contentInitial:()=>Di,disable:()=>Pi,document:()=>Ei,flow:()=>ki,flowInitial:()=>Oi,insideSpan:()=>Mi,string:()=>Ai,text:()=>ji}),Ei={42:oi,43:oi,45:oi,48:oi,49:oi,50:oi,51:oi,52:oi,53:oi,54:oi,55:oi,56:oi,57:oi,62:Un},Di={91:Sr},Oi={[-2]:tr,[-1]:tr,32:tr},ki={35:Or,42:ii,45:[mi,ii],60:Nr,61:mi,95:ii,96:Qn,126:Qn},Ai={38:Yn,92:qn},ji={[-5]:ni,[-4]:ni,[-3]:ni,33:Qr,38:Yn,42:Fn,60:[zn,Br],91:ei,92:[Er,qn],93:Hr,95:Fn,96:ar},Mi={null:[Fn,yi]},Ni={null:[42,95]},Pi={null:[]};function Fi(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=cn(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Pn(a,l.events,l),l.events):[]}function f(e,t){return Li(p(e),t)}function p(e){return Ii(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){U(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&sn(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ii(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Li(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
4
|
-
`;break;case-3:o=`\r
|
|
5
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Ri(e){let t={constructs:un([Ti,...(e||{}).extensions||[]]),content:n(Dn),defined:[],document:n(kn),flow:n(_i),lazy:{},string:n(bi),text:n(xi)};return t;function n(e){return n;function n(n){return Fi(t,e,n)}}}function zi(e){for(;!dr(e););return e}var Bi=/[\0\t\n\r]/g;function Vi(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Bi.lastIndex=u,c=Bi.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Hi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ui(e){return e.replace(Hi,Wi)}function Wi(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return pn(n.slice(t?2:1),t?16:10)}return on(n)||e}var Gi={}.hasOwnProperty;function Ki(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),qi(n)(zi(Ri(n).document().write(Vi()(e,t,!0))))}function qi(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(B),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(fe),blockQuote:a(ce),characterEscape:T,characterReference:T,codeFenced:a(le),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(le,o),codeText:a(R,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:T,htmlText:a(me,o),htmlTextData:T,image:a(z),label:o,link:a(B),listItem:a(ge),listItemValue:f,listOrdered:a(he,d),listUnordered:a(he),paragraph:a(_e),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(ve),thematicBreak:a(be)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:L,characterReferenceMarkerNumeric:L,characterReferenceValue:ie,characterReference:ae,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:ee,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Yi(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Gi.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Zi).call(a,void 0,e[0])}for(r.position={start:Ji(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ji(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ji(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Zi).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+vt({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ji(e.end)}function u(){return en(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=mn(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ye(),n.position={start:Ji(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ji(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Ji(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Ui(t),n.identifier=mn(t).toLowerCase()}function ee(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=mn(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function L(e){this.data.characterReferenceType=e.type}function ie(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=pn(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=on(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=Ji(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[]}}function le(){return{type:`code`,lang:null,meta:null,value:``}}function R(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function z(){return{type:`image`,title:null,url:``,alt:null}}function B(){return{type:`link`,title:null,url:``,children:[]}}function he(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ge(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function _e(){return{type:`paragraph`,children:[]}}function ve(){return{type:`strong`,children:[]}}function ye(){return{type:`text`,value:``}}function be(){return{type:`thematicBreak`}}}function Ji(e){return{line:e.line,column:e.column,offset:e.offset}}function Yi(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Yi(e,r):Xi(e,r)}}function Xi(e,t){let n;for(n in t)if(Gi.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Zi(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+vt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vt({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+vt({start:t.start,end:t.end})+`) is still open`)}function Qi(e){let t=this;t.parser=n;function n(n){return Ki(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function $i(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ea(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
6
|
-
`}]}function ta(e,t){let n=t.value?t.value+`
|
|
7
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function na(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ra(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ia(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=En(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function aa(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oa(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function sa(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function ca(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sa(e,t);let i={src:En(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function la(e,t){let n={src:En(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ua(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function da(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sa(e,t);let i={href:En(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function fa(e,t){let n={href:En(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pa(e,t,n){let r=e.all(t),i=n?ma(n):ha(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
9
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function ma(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=ha(n[r])}return t}function ha(e){return e.spread??e.children.length>1}function ga(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function _a(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function va(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ya(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ba(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=ht(t.children[1]),o=mt(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function xa(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Sa(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ca=9,wa=32;function Ta(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Ea(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ea(t.slice(i),i>0,!1)),a.join(``)}function Ea(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ca||t===wa;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ca||t===wa;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Da(e,t){let n={type:`text`,value:Ta(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Oa(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var ka={blockquote:$i,break:ea,code:ta,delete:na,emphasis:ra,footnoteReference:ia,heading:aa,html:oa,imageReference:ca,image:la,inlineCode:ua,linkReference:da,link:fa,listItem:pa,list:ga,paragraph:_a,root:va,strong:ya,table:ba,tableCell:Sa,tableRow:xa,text:Da,thematicBreak:Oa,toml:Aa,yaml:Aa,definition:Aa,footnoteDefinition:Aa};function Aa(){}var ja=typeof self==`object`?self:globalThis,Ma=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new ja[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new ja[a](o),i)};return r},Na=e=>Ma(new Map,e)(0),Pa=``,{toString:Fa}={},{keys:Ia}=Object,La=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Fa.call(e).slice(8,-1);switch(n){case`Array`:return[1,Pa];case`Object`:return[2,Pa];case`Date`:return[3,Pa];case`RegExp`:return[4,Pa];case`Map`:return[5,Pa];case`Set`:return[6,Pa];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Ra=([e,t])=>e===0&&(t===`function`||t===`symbol`),za=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=La(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Ia(r))(e||!Ra(La(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Ra(La(n))||Ra(La(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Ra(La(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Ba=(e,{json:t,lossy:n}={})=>{let r=[];return za(!(t||n),!!t,new Map,r)(e),r},Va=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Na(Ba(e,t)):structuredClone(e):(e,t)=>Na(Ba(e,t));function Ha(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ua(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Wa(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Ha,r=e.options.footnoteBackLabel||Ua,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=En(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Va(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
10
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
11
|
-
`}]}}var Ga=(function(e){if(e==null)return Xa;if(typeof e==`function`)return Ya(e);if(typeof e==`object`)return Array.isArray(e)?Ka(e):qa(e);if(typeof e==`string`)return Ja(e);throw Error(`Expected function, string, or object as test`)});function Ka(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Ga(e[n]);return Ya(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function qa(e){let t=e;return Ya(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Ja(e){return Ya(t);function t(t){return t&&t.type===e}}function Ya(e){return t;function t(t,n,r){return!!(Za(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Xa(){return!0}function Za(e){return typeof e==`object`&&!!e&&`type`in e}function Qa(e){return e}var $a=[];function eo(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Ga(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Qa(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=$a,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=to(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function to(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?$a:[e]}function no(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),eo(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var ro={}.hasOwnProperty,io={};function ao(e,t){let n=t||io,r=new Map,i=new Map,a={all:s,applyData:so,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...ka,...n.handlers},one:o,options:n,patch:oo,wrap:lo};return no(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(ro.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Va(n);return r.children=a.all(e),r}return Va(e)}return(a.options.unknownHandler||co)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=uo(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=uo(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function oo(e,t){e.position&&(t.position=_t(e))}function so(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Va(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function co(e,t){let n=t.data||{},r=`value`in t&&!(ro.call(n,`hProperties`)||ro.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lo(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
12
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
13
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
14
|
-
`}),n}function uo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function fo(e,t){let n=ao(e,t),r=n.one(e,void 0),i=Wa(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
15
|
-
`},i)),a}function po(e,t){return e&&`run`in e?async function(n,r){let i=fo(n,{file:r,...t});await e.run(i,r)}:function(n,r){return fo(n,{file:r,...e||t})}}function mo(e){if(e)throw e}var ho=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function go(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function _o(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?vo(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function vo(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var yo={basename:bo,dirname:xo,extname:So,join:Co,sep:`/`};function bo(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Eo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function xo(e){if(Eo(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function So(e){Eo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Co(...e){let t=-1,n;for(;++t<e.length;)Eo(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:wo(n)}function wo(e){Eo(e);let t=e.codePointAt(0)===47,n=To(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function To(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Eo(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Do={cwd:Oo};function Oo(){return`/`}function ko(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ao(e){if(typeof e==`string`)e=new URL(e);else if(!ko(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return jo(e)}function jo(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Mo=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],No=class{constructor(e){let t;t=e?ko(e)?{path:e}:typeof e==`string`||Lo(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Do.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Mo.length;){let e=Mo[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Mo.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?yo.basename(this.path):void 0}set basename(e){Fo(e,`basename`),Po(e,`basename`),this.path=yo.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?yo.dirname(this.path):void 0}set dirname(e){Io(this.basename,`dirname`),this.path=yo.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?yo.extname(this.path):void 0}set extname(e){if(Po(e,`extname`),Io(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=yo.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ko(e)&&(e=Ao(e)),Fo(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?yo.basename(this.path,this.extname):void 0}set stem(e){Fo(e,`stem`),Po(e,`stem`),this.path=yo.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new St(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Po(e,t){if(e&&e.includes(yo.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+yo.sep+"`")}function Fo(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Io(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Lo(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ro=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),zo=t(ho(),1),Bo={}.hasOwnProperty,Vo=new class e extends Ro{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=_o()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,zo.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Wo(`data`,this.frozen),this.namespace[e]=t,this):Bo.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Wo(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=qo(e),n=this.parser||this.Parser;return Ho(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Ho(`process`,this.parser||this.Parser),Uo(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=qo(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Yo(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Ho(`processSync`,this.parser||this.Parser),Uo(`processSync`,this.compiler||this.Compiler),this.process(e,r),Ko(`processSync`,`process`,t),n;function r(e,r){t=!0,mo(e),n=r}}run(e,t,n){Go(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=qo(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Ko(`runSync`,`run`,n),r;function i(e,t){mo(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=qo(t),r=this.compiler||this.Compiler;return Uo(`stringify`,r),Go(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Wo(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,zo.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];go(o)&&go(r)&&(r=(0,zo.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Ho(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Uo(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Wo(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Go(e){if(!go(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Ko(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function qo(e){return Jo(e)?e:new No(e)}function Jo(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Yo(e){return typeof e==`string`||Xo(e)}function Xo(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Zo=[],Qo={allowDangerousHtml:!0},$o=/^(https?|ircs?|mailto|xmpp)$/i,es=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function ts(e){let t=ns(e),n=rs(e);return is(t.runSync(t.parse(n),n),e)}function ns(e){let t=e.rehypePlugins||Zo,n=e.remarkPlugins||Zo,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qo}:Qo;return Vo().use(Qi).use(n).use(po,r).use(t)}function rs(e){let t=e.children||``,n=new No;return typeof t==`string`?n.value=t:``+t,n}function is(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||as;for(let e of es)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),no(e,l),At(e,{Fragment:B.Fragment,components:i,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Qt)if(Object.hasOwn(Qt,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Qt[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function as(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||$o.test(e.slice(0,t))?e:``}function os(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ss(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function cs(e,t,n){let r=Ga((n||{}).ignore||[]),i=ls(t),a=-1;for(;++a<i.length;)eo(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function ls(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([us(e[0]),ds(e[1])])}return t}function us(e){return typeof e==`string`?new RegExp(ss(e),`g`):e}function ds(e){return typeof e==`function`?e:function(){return e}}var fs=`phrasing`,ps=[`autolink`,`link`,`image`,`label`];function ms(){return{transforms:[Ss],enter:{literalAutolink:gs,literalAutolinkEmail:_s,literalAutolinkHttp:_s,literalAutolinkWww:_s},exit:{literalAutolink:xs,literalAutolinkEmail:bs,literalAutolinkHttp:vs,literalAutolinkWww:ys}}}function hs(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:fs,notInConstruct:ps},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:fs,notInConstruct:ps},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:fs,notInConstruct:ps}]}}function gs(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function _s(e){this.config.enter.autolinkProtocol.call(this,e)}function vs(e){this.config.exit.autolinkProtocol.call(this,e)}function ys(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function bs(e){this.config.exit.autolinkEmail.call(this,e)}function xs(e){this.exit(e)}function Ss(e){cs(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Cs],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ws]],{ignore:[`link`,`linkReference`]})}function Cs(e,t,n,r,i){let a=``;if(!Ds(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Ts(n)))return!1;let o=Es(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ws(e,t,n,r){return!Ds(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Ts(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Es(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=os(e,`(`),a=os(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Ds(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||wn(n)||Cn(n))&&(!t||n!==47)}Ls.peek=Is;function Os(){this.buffer()}function ks(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function As(){this.buffer()}function js(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Ms(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ns(e){this.exit(e)}function Ps(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Fs(e){this.exit(e)}function Is(){return`[`}function Ls(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Rs(){return{enter:{gfmFootnoteCallString:Os,gfmFootnoteCall:ks,gfmFootnoteDefinitionLabelString:As,gfmFootnoteDefinition:js},exit:{gfmFootnoteCallString:Ms,gfmFootnoteCall:Ns,gfmFootnoteDefinitionLabelString:Ps,gfmFootnoteDefinition:Fs}}}function zs(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ls},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
16
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Vs:Bs))),s(),o}}function Bs(e,t,n){return t===0?e:Vs(e,t,n)}function Vs(e,t,n){return(n?``:` `)+e}var Hs=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];qs.peek=Js;function Us(){return{canContainEols:[`delete`],enter:{strikethrough:Gs},exit:{strikethrough:Ks}}}function Ws(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Hs}],handlers:{delete:qs}}}function Gs(e){this.enter({type:`delete`,children:[]},e)}function Ks(e){this.exit(e)}function qs(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Js(){return`~`}function Ys(e){return e.length}function Xs(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ys,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Zs(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Qs(r[d]);else{let e=Qs(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
17
|
-
`)}function Zs(e){return e==null?``:String(e)}function Qs(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function $s(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),ec);return i(),o}function ec(e,t,n){return`>`+(n?``:` `)+e}function tc(e,t){return nc(e,t.inConstruct,!0)&&!nc(e,t.notInConstruct,!1)}function nc(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function rc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
18
|
-
`&&tc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
19
|
-
`}function ic(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function ac(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function oc(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function sc(e,t,n,r){let i=oc(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(ac(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,cc);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(ic(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
20
|
-
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
21
|
-
`),a&&(u+=s.move(a+`
|
|
22
|
-
`)),u+=s.move(c),l(),u}function cc(e,t,n){return(n?``:` `)+e}function lc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function uc(e,t,n,r){let i=lc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
23
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function dc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function fc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function pc(e,t,n){let r=Nn(e),i=Nn(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}mc.peek=hc;function mc(e,t,n,r){let i=dc(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=pc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=fc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=pc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+fc(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function hc(e,t,n){return n.options.emphasis||`*`}function gc(e,t){let n=!1;return no(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&en(e)&&(t.options.setext||n))}function _c(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(gc(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
24
|
-
`,after:`
|
|
25
|
-
`});return r(),t(),o+`
|
|
26
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
27
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
28
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=fc(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}vc.peek=yc;function vc(e){return e.value||``}function yc(){return`<`}bc.peek=xc;function bc(e,t,n,r){let i=lc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function xc(){return`!`}Sc.peek=Cc;function Sc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Cc(){return`!`}wc.peek=Tc;function wc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Tc(){return"`"}function Ec(e,t){let n=en(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Dc.peek=Oc;function Dc(e,t,n,r){let i=lc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Ec(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Oc(e,t,n){return Ec(e,n)?`<`:`[`}kc.peek=Ac;function kc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ac(){return`[`}function jc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Mc(e){let t=jc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Nc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Pc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Fc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Nc(n):jc(n),s=e.ordered?o===`.`?`)`:`.`:Mc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Pc(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Ic(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Lc(e,t,n,r){let i=Ic(n),a=n.bulletCurrent||jc(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Rc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var zc=Ga([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Bc(e,t,n,r){return(e.children.some(function(e){return zc(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Vc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Hc.peek=Uc;function Hc(e,t,n,r){let i=Vc(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=pc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=fc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=pc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+fc(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Uc(e,t,n){return n.options.strong||`*`}function Wc(e,t,n,r){return n.safe(e.value,r)}function Gc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Kc(e,t,n){let r=(Pc(n)+(n.options.ruleSpaces?` `:``)).repeat(Gc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var qc={blockquote:$s,break:rc,code:sc,definition:uc,emphasis:mc,hardBreak:rc,heading:_c,html:vc,image:bc,imageReference:Sc,inlineCode:wc,link:Dc,linkReference:kc,list:Fc,listItem:Lc,paragraph:Rc,root:Bc,strong:Hc,text:Wc,thematicBreak:Kc};function Jc(){return{enter:{table:Yc,tableData:$c,tableHeader:$c,tableRow:Zc},exit:{codeText:el,table:Xc,tableData:Qc,tableHeader:Qc,tableRow:Qc}}}function Yc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Xc(e){this.exit(e),this.data.inTable=void 0}function Zc(e){this.enter({type:`tableRow`,children:[]},e)}function Qc(e){this.exit(e)}function $c(e){this.enter({type:`tableCell`,children:[]},e)}function el(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tl));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tl(e,t){return t===`|`?t:e}function nl(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
29
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
30
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Xs(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=qc.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function rl(){return{exit:{taskListCheckValueChecked:al,taskListCheckValueUnchecked:al,paragraph:ol}}}function il(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:sl}}}function al(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function ol(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function sl(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=qc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function cl(){return[ms(),Rs(),Us(),Jc(),rl()]}function ll(e){return{extensions:[hs(),zs(e),Ws(),nl(e),il()]}}var ul={tokenize:wl,partial:!0},dl={tokenize:Tl,partial:!0},fl={tokenize:El,partial:!0},pl={tokenize:Dl,partial:!0},ml={tokenize:Ol,partial:!0},hl={name:`wwwAutolink`,tokenize:Sl,previous:kl},gl={name:`protocolAutolink`,tokenize:Cl,previous:Al},_l={name:`emailAutolink`,tokenize:xl,previous:jl},vl={};function yl(){return{text:vl}}for(var bl=48;bl<123;)vl[bl]=_l,bl++,bl===58?bl=65:bl===91&&(bl=97);vl[43]=_l,vl[45]=_l,vl[46]=_l,vl[95]=_l,vl[72]=[_l,gl],vl[104]=[_l,gl],vl[87]=[_l,hl],vl[119]=[_l,hl];function xl(e,t,n){let r=this,i,a;return o;function o(t){return!Ml(t)||!jl.call(r,r.previous)||Nl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Ml(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ml,u,l)(t):t===45||t===95||gn(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&hn(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Sl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!kl.call(r,r.previous)||Nl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ul,e.attempt(dl,e.attempt(fl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Cl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Al.call(r,r.previous)&&!Nl(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(hn(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||vn(t)||Sn(t)||wn(t)||Cn(t)?n(t):e.attempt(dl,e.attempt(fl,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function wl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Tl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(pl,c,s)(t):t===null||Sn(t)||wn(t)||t!==45&&Cn(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function El(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(pl,t,a)(o):o===null||Sn(o)||wn(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Dl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Sn(o)||wn(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Sn(e)||wn(e)?t(e):r(e)}function a(e){return hn(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):hn(t)?(e.consume(t),o):n(t)}}function Ol(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return gn(e)?n(e):t(e)}}function kl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Sn(e)}function Al(e){return!hn(e)}function jl(e){return!(e===47||Ml(e))}function Ml(e){return e===43||e===45||e===46||e===95||gn(e)}function Nl(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Pl={tokenize:Hl,partial:!0};function Fl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:zl,continuation:{tokenize:Bl},exit:Vl}},text:{91:{name:`gfmFootnoteCall`,tokenize:Rl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Il,resolveTo:Ll}}}}function Il(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=mn(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ll(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Rl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Sn(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(mn(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Sn(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function zl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Sn(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=mn(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Sn(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),G(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Bl(e,t,n){return e.check(Vn,t,e.attempt(Pl,t,n))}function Vl(e){e.exit(`gfmFootnoteDefinition`)}function Hl(e,t,n){let r=this;return G(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Ul(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&sn(o,o.length,0,Pn(s,e.slice(r+1,n),t)),sn(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),sn(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Nn(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Nn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Wl=class{constructor(){this.map=[]}add(e,t,n){Gl(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Gl(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Kl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ql(){return{flow:{null:{name:`table`,tokenize:Jl,resolveAll:Yl}}}}function Jl(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):U(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):W(t)?G(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Sn(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,W(t)?G(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return W(t)?G(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||U(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return W(t)?G(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||U(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||U(n)?(e.exit(`tableRow`),t(n)):W(n)?G(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Sn(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Yl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Wl;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Zl(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Xl(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Xl(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Xl(f,t,o,i,n,d)):(o[0]=o[1],d=Xl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Zl(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Kl(t.events,n))}return e}function Xl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ql(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ql(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ql(t.events,n[2]),a=Ql(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ql(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Zl(e,t,n,r,i){let a=[],o=Ql(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ql(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var $l={name:`tasklistCheck`,tokenize:tu};function eu(){return{text:{91:$l}}}function tu(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Sn(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return U(r)?t(r):W(r)?e.check({tokenize:nu},t,n)(r):n(r)}}function nu(e,t,n){return G(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function ru(e){return un([yl(),Fl(),Ul(e),ql(),eu()])}var iu={};function au(e){let t=this,n=e||iu,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(ru(n)),a.push(cl()),o.push(ll(n))}var ou=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m5 12l7-7l7 7m-7 7V5`})}),su=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`rect`,{width:18,height:18,x:3,y:3,rx:2,ry:2}),(0,B.jsx)(`circle`,{cx:9,cy:9,r:2}),(0,B.jsx)(`path`,{d:`m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21`})]})}),cu=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,B.jsx)(`path`,{d:`M3 3v5h5`})]})}),lu=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M10 5H3m9 14H3M14 3v4m2 10v4m5-9h-9m9 7h-5m5-14h-7m-6 5v4m0-2H3`})}),uu=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`rect`,{width:18,height:18,x:3,y:3,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,rx:2})}),du=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 6L6 18M6 6l12 12`})}),fu=`/assets/chat-icon-JYfue7fB.png`;function pu(e,t){return e.filter(e=>e.active&&e.provider===t).toSorted((e,t)=>e.ord-t.ord||e.name.localeCompare(t.name))}function mu(e,t){return t!==void 0&&!e.some(e=>e.active&&e.provider===t)}function hu(e,t,n){return!e||!n||t.some(t=>t.name===e)?e:``}function gu(e,t){return e.model!==t.model||e.system!==t.system||e.tokenName!==t.tokenName}function _u(e){return e?{tokenName:e}:{}}var vu=`qgrid_chat`,yu=`anthropic/claude-fable-5-1`,bu=[{label:`OpenAI`,models:[`openai/gpt-6-astra`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-sol`,`openai/gpt-5.6-luna`,`openai/gpt-5.5`,`openai/gpt-5.3-codex-spark`]},{label:`Anthropic`,models:[`anthropic/claude-fable-5-1`,`anthropic/claude-fable-5`,`anthropic/claude-opus-5`,`anthropic/claude-sonnet-5`,`anthropic/claude-opus-4-8`,`anthropic/claude-opus-4-7`,`anthropic/claude-opus-4-6`,`anthropic/claude-opus-4-5`,`anthropic/claude-sonnet-4-6`,`anthropic/claude-sonnet-4-5`,`anthropic/claude-haiku-4-5`,`anthropic/claude-opus-4-1`,`anthropic/claude-opus-4`,`anthropic/claude-sonnet-4`]}],xu=[`low`,`medium`,`high`];function Su(e){let t=[];for(let n of e)n.role===`user`?t.push({type:`message`,role:`user`,content:[{type:`input_text`,text:n.text}]}):n.text&&t.push({type:`message`,role:`assistant`,content:[{type:`output_text`,text:n.text}]});return t}function Cu(e){return e instanceof Error?e.message:String(e)}var wu={openai:`OpenAI`,anthropic:`Anthropic`};function Tu(e,t,n){let r=n!==void 0&&mu(n,t);return/NO_OPENAI_WORKERS|no ready openai workers|no anthropic tokens available/i.test(e)||r&&/기동 중입니다/.test(e)?`사용 가능한 ${t?wu[t]??t:``} 토큰이 없습니다. Tokens 페이지에서 토큰을 추가해주세요.`:e}function Eu(e){return e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}var Du=4,Ou=1536;async function ku(e){let t=await createImageBitmap(e),n=Math.min(1,Ou/Math.max(t.width,t.height)),r=document.createElement(`canvas`);return r.width=Math.max(1,Math.round(t.width*n)),r.height=Math.max(1,Math.round(t.height*n)),r.getContext(`2d`).drawImage(t,0,0,r.width,r.height),t.close(),r.toDataURL(`image/jpeg`,.85)}function Au(){let[e,t]=(0,z.useState)(!1),[n,r]=(0,z.useState)(!1),[i,a]=(0,z.useState)([]),[o,s]=(0,z.useState)(``),[c,l]=(0,z.useState)(yu),[u,d]=(0,z.useState)(``),[f,p]=(0,z.useState)(``),[m,h]=(0,z.useState)(``),[g,_]=(0,z.useState)(!1),[v,y]=(0,z.useState)(null),[b,x]=(0,z.useState)(!1),[S,w]=(0,z.useState)([]),T=(0,z.useRef)(void 0),E=(0,z.useRef)(void 0),D=(0,z.useRef)(null),O=(0,z.useRef)(null),k=(0,z.useRef)(null),A=c.split(`/`)[0],j=A===`openai`,{data:M}=ie.useTokens(`A`,{orderBy:`ord-asc`},{enabled:e}),N=(0,z.useMemo)(()=>pu(M?.rows??[],A),[A,M?.rows]),P=M?.rows!==void 0,ee=(0,z.useRef)(void 0);(0,z.useEffect)(()=>{ee.current=M?.rows},[M?.rows]);let F=M?.rows!==void 0&&mu(M.rows,A);(0,z.useEffect)(()=>{j||w([])},[j]),(0,z.useEffect)(()=>{d(e=>hu(e,N,P))},[P,N]);let I=async e=>{if(!e)return;let t=Du-S.length,n=await Promise.all([...e].slice(0,t).map(e=>ku(e).catch(()=>null)));w(e=>[...e,...n.filter(e=>e!==null)].slice(0,Du))},te=e=>{a(t=>{let n=t[t.length-1];return!n||n.role!==`assistant`?t:[...t.slice(0,-1),e(n)]})},ne=e=>{let t=Tu(e,E.current?.model.split(`/`)[0],ee.current);te(e=>e.status===`streaming`?{...e,status:`error`,error:t}:e),y(null),x(!1)},re=L.useQueryStream({streamId:v??``},{delta:({text:e})=>{te(t=>t.status===`streaming`?{...t,text:t.text+e}:t)},toolCall:()=>{ne(`tool call 응답은 채팅에서 지원하지 않습니다`)},done:e=>{T.current=e.runContext?.threadCoord,te(t=>({...t,text:e.text||t.text,status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.runContext?.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}}))},error:({message:e})=>{ne(e)},end:()=>{te(e=>e.status===`streaming`?{...e,status:`error`,error:`응답 완료 전에 스트림이 종료되었습니다`}:e),y(null),x(!1)}},{enabled:v!==null,retry:0});(0,z.useEffect)(()=>{v!==null&&re.error&&ne(re.error)},[re.error]),(0,z.useEffect)(()=>{D.current?.scrollTo({top:D.current.scrollHeight})},[i,e]),(0,z.useEffect)(()=>{e&&O.current?.focus()},[e]);let ae=async()=>{let e=o.trim();if(!e||b)return;let t=m.trim(),n=hu(u,N,P),r={model:c,system:t,tokenName:n};E.current&&gu(E.current,r)&&(T.current=void 0),E.current=r;let l=j?S:[],d=Su(i);a(t=>[...t,{role:`user`,text:e,...l.length>0?{images:l}:{}},{role:`assistant`,text:``,status:`streaming`}]),s(``),w([]),x(!0);try{let{streamId:r}=await L.prepareStream({prompt:e,model:c,projectName:vu,..._u(n),...t?{system:t}:{},...f?{effort:f}:{},...l.length>0?{input:l.map(e=>({type:`image`,url:e}))}:{},...d.length>0?{history:JSON.stringify(d)}:{},...T.current?{runContext:{threadCoord:T.current}}:{}});y(r)}catch(e){ne(Cu(e))}},oe=()=>{te(e=>e.status===`streaming`?{...e,status:`aborted`}:e),y(null),x(!1)};return(0,B.jsx)(`div`,{className:`fixed bottom-5 right-5 z-40`,children:e?(0,B.jsxs)(`div`,{onAnimationEnd:()=>{n&&(t(!1),r(!1))},className:`flex flex-col w-[min(400px,calc(100vw-2.5rem))] h-[min(640px,calc(100dvh-7rem))] bg-white rounded-2xl shadow-[0_16px_48px_rgba(44,36,24,0.18),0_0_0_1px_rgba(227,218,204,0.6)] overflow-hidden origin-bottom-right ${n?`chat-panel-pop-out`:`chat-panel-pop`}`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2.5 px-4 py-2.5 border-b border-sand-100 shrink-0`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsx)(`p`,{className:`text-[14px] font-semibold text-sand-900 leading-tight`,children:`채팅`}),(0,B.jsxs)(`p`,{className:`text-[11px] text-sand-400 truncate leading-tight`,children:[c,f?` · ${f}`:``,u?` · ${u}`:``]})]}),(0,B.jsxs)(`div`,{className:`ml-auto flex items-center gap-0.5`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:()=>_(e=>!e),title:`모델·토큰·effort·system prompt 설정`,className:`size-8 grid place-items-center rounded-full transition-colors duration-150 ${g?`text-sienna-500 bg-sienna-50`:`text-sand-500 hover:text-sand-700 hover:bg-sand-100`}`,children:(0,B.jsx)(lu,{className:`size-4`})}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>{b&&oe(),a([]),T.current=void 0,E.current=void 0},disabled:i.length===0,title:`새 대화`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,B.jsx)(cu,{className:`size-4`})}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>{if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){t(!1);return}r(!0)},title:`닫기`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 transition-colors duration-150`,children:(0,B.jsx)(du,{className:`size-4.5`})})]})]}),g&&(0,B.jsxs)(`div`,{className:`px-4 py-2.5 border-b border-sand-100 bg-sand-50/60 shrink-0 flex flex-col gap-1.5`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,B.jsx)(`select`,{value:c,onChange:e=>l(e.target.value),disabled:b,className:`min-w-0 flex-1 rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-800 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:bu.map(e=>(0,B.jsx)(`optgroup`,{label:e.label,children:e.models.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))},e.label))}),(0,B.jsxs)(`select`,{value:f,onChange:e=>p(e.target.value),disabled:b,className:`rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-600 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,B.jsx)(`option`,{value:``,children:`effort 기본`}),xu.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e))]})]}),(0,B.jsxs)(`select`,{value:u,onChange:e=>d(e.target.value),disabled:b,"aria-label":`요청 토큰`,className:`w-full rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-700 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,B.jsx)(`option`,{value:``,children:`토큰 자동 분배`}),N.map(e=>(0,B.jsx)(`option`,{value:e.name,children:e.name},e.name))]}),(0,B.jsx)(`textarea`,{value:m,onChange:e=>h(e.target.value),disabled:b,placeholder:`system prompt (선택)`,rows:2,className:`w-full resize-none rounded-xl border border-sand-200/80 bg-white px-2.5 py-1.5 text-[12px] text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 disabled:opacity-50`})]}),(0,B.jsx)(`div`,{ref:D,className:`flex-1 overflow-y-auto main-scroll px-3.5 py-3`,children:i.length===0?(0,B.jsx)(`div`,{className:`h-full grid place-items-center`,children:(0,B.jsxs)(`div`,{className:`text-center px-4`,children:[(0,B.jsx)(`img`,{src:fu,alt:``,className:`mx-auto mb-2.5 size-14 rounded-[35%] object-cover`}),(0,B.jsx)(`p`,{className:`text-[13px] text-sand-600`,children:`가용 토큰에게 바로 물어보세요.`}),(0,B.jsxs)(`p`,{className:`mt-1 text-[11px] text-sand-400`,children:[`대화는 저장되지 않고, 요청은`,` `,(0,B.jsx)(C,{to:`/logs`,search:{project:vu,page:1},className:`text-sienna-500 hover:underline`,children:`request log`}),`에 기록됩니다.`]})]})}):(0,B.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:i.map((e,t)=>e.role===`user`?(0,B.jsxs)(`div`,{className:`self-end max-w-[80%] flex flex-col items-end gap-1`,children:[e.images&&(0,B.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1`,children:e.images.map((e,t)=>(0,B.jsx)(`img`,{src:e,alt:``,className:`size-24 rounded-xl object-cover`},t))}),(0,B.jsx)(`div`,{className:`rounded-[18px] rounded-br-[5px] bg-sienna-600 px-3.5 py-2 text-[13px] leading-relaxed text-white whitespace-pre-wrap break-words`,children:e.text})]},t):(0,B.jsxs)(`div`,{className:`self-start max-w-[88%] min-w-0`,children:[(0,B.jsxs)(`div`,{className:`rounded-[18px] rounded-bl-[5px] bg-sand-100 px-3.5 py-2`,children:[e.text?(0,B.jsx)(`div`,{className:`prose prose-sm prose-qgrid max-w-none text-[13px] leading-relaxed break-words`,children:(0,B.jsx)(ts,{remarkPlugins:[au],children:e.text})}):e.status===`streaming`?(0,B.jsxs)(`span`,{className:`inline-flex gap-1 py-1.5 px-0.5`,"aria-label":`응답 대기 중`,children:[(0,B.jsx)(`span`,{className:`chat-typing-dot`}),(0,B.jsx)(`span`,{className:`chat-typing-dot [animation-delay:150ms]`}),(0,B.jsx)(`span`,{className:`chat-typing-dot [animation-delay:300ms]`})]}):null,e.status===`aborted`&&(0,B.jsx)(`p`,{className:`mt-1 text-[10px] text-sand-400`,children:`중단됨`}),e.status===`error`&&(0,B.jsx)(`p`,{className:`mt-1 text-[12px] text-danger-500 break-words`,children:e.error})]}),e.meta&&(0,B.jsxs)(C,{to:e.meta.requestLogId===void 0?`/logs`:`/requests/show`,search:e.meta.requestLogId===void 0?{project:vu,page:1}:{id:e.meta.requestLogId},className:`mt-1 ml-1.5 inline-block text-[10px] tabular-nums text-sand-400 hover:text-sienna-500 transition-colors duration-150`,title:`request log 보기`,children:[e.meta.model,e.meta.fallback&&` (폴백)`,e.meta.tokenName?` · ${e.meta.tokenName}`:``,` · ${(e.meta.durationMs/1e3).toFixed(1)}s · ${Eu(e.meta.costUsd)}`]})]},t))})}),F&&(0,B.jsxs)(`div`,{className:`px-4 py-1.5 border-t border-caution-400/30 bg-caution-400/10 text-[11px] text-caution-500 shrink-0`,children:[wu[A]??A,` 토큰이 등록되어 있지 않습니다.`,` `,(0,B.jsx)(C,{to:`/tokens`,className:`font-medium underline hover:text-caution-400`,children:`Tokens 페이지`}),`에서 추가해주세요.`]}),(0,B.jsxs)(`div`,{className:`px-3 py-2.5 border-t border-sand-100 shrink-0`,children:[S.length>0&&(0,B.jsx)(`div`,{className:`flex gap-1.5 pb-2`,children:S.map((e,t)=>(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(`img`,{src:e,alt:``,className:`size-12 rounded-xl object-cover`}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>w(e=>e.filter((e,n)=>n!==t)),title:`첨부 제거`,className:`absolute -top-1.5 -right-1.5 size-4.5 grid place-items-center rounded-full bg-sand-800 text-white hover:bg-sand-700`,children:(0,B.jsx)(du,{className:`size-2.5`})})]},t))}),(0,B.jsxs)(`div`,{className:`flex items-end gap-1.5`,children:[j&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`input`,{ref:k,type:`file`,accept:`image/*`,multiple:!0,hidden:!0,onChange:e=>{I(e.target.files),e.target.value=``}}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>k.current?.click(),disabled:b||S.length>=Du,title:`이미지 첨부`,className:`size-9 shrink-0 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,B.jsx)(su,{className:`size-4.5`})})]}),(0,B.jsx)(`textarea`,{ref:O,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ae())},placeholder:`메시지 입력...`,rows:1,className:`min-w-0 flex-1 resize-none [field-sizing:content] max-h-28 rounded-[20px] border border-sand-200/80 bg-sand-50/60 px-4 py-2 text-[13px] leading-relaxed text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 focus:bg-white transition-colors duration-150`}),b?(0,B.jsx)(`button`,{type:`button`,onClick:oe,title:`응답 중단`,className:`size-9 shrink-0 grid place-items-center rounded-full border border-sand-200/80 text-sand-600 hover:bg-sand-100 active:scale-[0.96] transition-all duration-150`,children:(0,B.jsx)(uu,{className:`size-3.5`})}):(0,B.jsx)(`button`,{type:`button`,onClick:()=>void ae(),disabled:!o.trim(),title:`전송`,className:`size-9 shrink-0 grid place-items-center rounded-full bg-sienna-600 text-white hover:bg-sienna-700 disabled:opacity-40 active:scale-[0.96] transition-all duration-150`,children:(0,B.jsx)(ou,{className:`size-4.5`})})]})]})]}):(0,B.jsx)(`button`,{type:`button`,onClick:()=>t(!0),title:`채팅 열기`,className:`block size-15 rounded-[35%] overflow-hidden shadow-[0_6px_20px_rgba(44,36,24,0.25)] hover:scale-105 active:scale-[0.96] transition-transform duration-150`,children:(0,B.jsx)(`img`,{src:fu,alt:``,className:`size-full object-cover`})})})}var ju=`2.9.6`;function Mu({className:e}){let t=v({select:e=>e.location.pathname});return(0,B.jsxs)(`aside`,{className:`hidden md:flex w-[200px] bg-sand-50 flex-col shrink-0 border-r border-sand-200/40 ${e??``}`,children:[(0,B.jsx)(`div`,{className:`h-11 flex items-center px-4 border-b border-sand-200/30`,children:(0,B.jsx)(`span`,{className:`text-[13px] font-semibold text-sand-800 tracking-tight`,children:`Qgrid`})}),(0,B.jsx)(`nav`,{className:`flex-1 px-2.5 py-3 space-y-4 overflow-y-auto`,children:ve.map(e=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`px-2 pb-1.5`,children:(0,B.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.08em] text-sand-400 font-medium`,children:e.label})}),(0,B.jsx)(`div`,{className:`space-y-0.5`,children:e.items.map(e=>{let n=be(e.path,t);return(0,B.jsxs)(C,{to:e.path,className:`flex items-center gap-2 px-2 py-[6px] rounded-[7px] text-[13px] no-underline transition-all duration-150 ${n?`bg-sand-200/60 text-sand-900 font-medium`:`text-sand-500 hover:bg-sand-100 hover:text-sand-700`}`,style:n?{boxShadow:`0 0.5px 1px rgba(0,0,0,0.04), inset 0 0.5px 0 rgba(255,255,255,0.6)`}:void 0,children:[(0,B.jsx)(e.icon,{className:`size-[15px] shrink-0 ${n?`text-sienna-500`:`text-sand-400`}`}),(0,B.jsx)(`span`,{children:e.title})]},e.path)})})]},e.label))}),(0,B.jsx)(`div`,{className:`px-4 py-3 border-t border-sand-200/30`,children:(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(`div`,{className:`size-1.5 rounded-full bg-sage-400`}),(0,B.jsxs)(`span`,{className:`text-[10px] text-sand-400`,children:[`v`,ju]})]})})]})}var Nu={"/":`Dashboard`,"/tokens":`Tokens`,"/logs":`Request Logs`,"/monit":`Server Logs`};function Pu(e){return e.startsWith(`/requests/show`)?{parent:`Request Logs`,parentPath:`/logs`,current:`Detail`}:{current:Nu[e]??e}}function Fu(){let e=Pu(v({select:e=>e.location.pathname}));return(0,B.jsx)(`div`,{className:`toolbar-glass h-11 shrink-0 flex items-center px-5`,children:(0,B.jsxs)(`nav`,{className:`flex items-center gap-1.5 text-[13px]`,children:[e.parent&&e.parentPath&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(C,{to:e.parentPath,className:`text-sand-400 hover:text-sand-600 transition-colors no-underline`,children:e.parent}),(0,B.jsx)(`span`,{className:`text-sand-300 select-none`,children:`/`})]}),(0,B.jsx)(`span`,{className:`font-medium text-sand-800`,children:e.current})]})})}var Iu=[`/login`,`/signup`];function Lu({children:e}){(0,z.useEffect)(()=>{let e=navigator.language.split(`-`)[0];se.includes(e)&&F(e)},[]);let t=v({select:e=>e.location.pathname}),n=!Iu.includes(t);return(0,B.jsxs)(`div`,{className:`flex h-screen w-full bg-sand-100 overflow-hidden font-sans`,children:[n&&(0,B.jsx)(Mu,{}),(0,B.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden min-w-0`,children:[n&&(0,B.jsx)(Fu,{}),(0,B.jsx)(`main`,{className:`flex-1 overflow-y-auto main-scroll content-inset`,children:(0,B.jsx)(`div`,{className:`px-3 py-4 sm:px-6 sm:py-5 md:px-8`,children:(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{className:`text-sand-400 text-center py-8 text-sm`,children:`로딩 중...`}),children:e})})}),n&&(0,B.jsx)(xe,{})]}),n&&(0,B.jsx)(Au,{})]})}function Ru(e,t){let n=z.createContext(t),r=e=>{let{children:t,...r}=e,i=z.useMemo(()=>r,Object.values(r));return(0,B.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=z.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function zu(e,t=[]){let n=[];function r(t,r){let i=z.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=z.useMemo(()=>o,Object.values(o));return(0,B.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=z.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>z.createContext(e));return function(n){let r=n?.[e]||t;return z.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Bu(i,...t)]}function Bu(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Vu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Hu(...e){return t=>{let n=!1,r=e.map(e=>{let r=Vu(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Vu(e[t],null)}}}}function K(...e){return z.useCallback(Hu(...e),e)}function Uu(e){let t=Wu(e),n=z.forwardRef((e,n)=>{let{children:r,...i}=e,a=z.Children.toArray(r),o=a.find(qu);if(o){let e=o.props.children,r=a.map(t=>t===o?z.Children.count(e)>1?z.Children.only(null):z.isValidElement(e)?e.props.children:null:t);return(0,B.jsx)(t,{...i,ref:n,children:z.isValidElement(e)?z.cloneElement(e,void 0,r):null})}return(0,B.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Wu(e){let t=z.forwardRef((e,t)=>{let{children:n,...r}=e;if(z.isValidElement(n)){let e=Yu(n),i=Ju(r,n.props);return n.type!==z.Fragment&&(i.ref=t?Hu(t,e):e),z.cloneElement(n,i)}return z.Children.count(n)>1?z.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gu=Symbol(`radix.slottable`);function Ku(e){let t=({children:e})=>(0,B.jsx)(B.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Gu,t}function qu(e){return z.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Gu}function Ju(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Yu(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Xu(e){let t=e+`CollectionProvider`,[n,r]=zu(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=z.useRef(null),a=z.useRef(new Map).current;return(0,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Uu(s),l=z.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,B.jsx)(c,{ref:K(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Uu(u),p=z.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=z.useRef(null),s=K(t,o),c=a(u,n);return z.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return z.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}typeof window<`u`&&window.document&&window.document.createElement;function q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Zu=globalThis?.document?z.useLayoutEffect:()=>{},Qu=z.useInsertionEffect||Zu;function $u({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=ed({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=z.useRef(e!==void 0);z.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,z.useCallback(t=>{if(s){let n=td(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function ed({defaultProp:e,onChange:t}){let[n,r]=z.useState(e),i=z.useRef(n),a=z.useRef(t);return Qu(()=>{a.current=t},[t]),z.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function td(e){return typeof e==`function`}var nd=t(N(),1),J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Uu(`Primitive.${t}`),r=z.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function rd(e,t){e&&nd.flushSync(()=>e.dispatchEvent(t))}function id(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}var ad=e=>{let{present:t,children:n}=e,r=od(t),i=typeof n==`function`?n({present:r.isPresent}):z.Children.only(n),a=K(r.ref,cd(i));return typeof n==`function`||r.isPresent?z.cloneElement(i,{ref:a}):null};ad.displayName=`Presence`;function od(e){let[t,n]=z.useState(),r=z.useRef(null),i=z.useRef(e),a=z.useRef(`none`),[o,s]=id(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return z.useEffect(()=>{let e=sd(r.current);a.current=o===`mounted`?e:`none`},[o]),Zu(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=sd(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Zu(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=sd(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=sd(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:z.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function sd(e){return e?.animationName||`none`}function cd(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ld=z.useId||(()=>void 0),ud=0;function dd(e){let[t,n]=z.useState(ld());return Zu(()=>{e||n(e=>e??String(ud++))},[e]),e||(t?`radix-${t}`:``)}var fd=`Collapsible`,[pd,md]=zu(fd),[hd,gd]=pd(fd),_d=z.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=$u({prop:r,defaultProp:i??!1,onChange:o,caller:fd});return(0,B.jsx)(hd,{scope:n,disabled:a,contentId:dd(),open:c,onOpenToggle:z.useCallback(()=>l(e=>!e),[l]),children:(0,B.jsx)(J.div,{"data-state":Cd(c),"data-disabled":a?``:void 0,...s,ref:t})})});_d.displayName=fd;var vd=`CollapsibleTrigger`,yd=z.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=gd(vd,n);return(0,B.jsx)(J.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Cd(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:q(e.onClick,i.onOpenToggle)})});yd.displayName=vd;var bd=`CollapsibleContent`,xd=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=gd(bd,e.__scopeCollapsible);return(0,B.jsx)(ad,{present:n||i.open,children:({present:e})=>(0,B.jsx)(Sd,{...r,ref:t,present:e})})});xd.displayName=bd;var Sd=z.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=gd(bd,n),[s,c]=z.useState(r),l=z.useRef(null),u=K(t,l),d=z.useRef(0),f=d.current,p=z.useRef(0),m=p.current,h=o.open||s,g=z.useRef(h),_=z.useRef(void 0);return z.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Zu(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,B.jsx)(J.div,{"data-state":Cd(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function Cd(e){return e?`open`:`closed`}var wd=_d,Td=yd,Ed=xd,Dd=z.createContext(void 0);function Od(e){let t=z.useContext(Dd);return e||t||`ltr`}var kd=`Accordion`,Ad=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[jd,Md,Nd]=Xu(kd),[Pd,Fd]=zu(kd,[Nd,md]),Id=md(),Ld=z.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,B.jsx)(jd.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,B.jsx)(Ud,{...a,ref:t}):(0,B.jsx)(Hd,{...i,ref:t})})});Ld.displayName=kd;var[Rd,zd]=Pd(kd),[Bd,Vd]=Pd(kd,{collapsible:!1}),Hd=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=$u({prop:n,defaultProp:r??``,onChange:i,caller:kd});return(0,B.jsx)(Rd,{scope:e.__scopeAccordion,value:z.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:z.useCallback(()=>a&&c(``),[a,c]),children:(0,B.jsx)(Bd,{scope:e.__scopeAccordion,collapsible:a,children:(0,B.jsx)(Kd,{...o,ref:t})})})}),Ud=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=$u({prop:n,defaultProp:r??[],onChange:i,caller:kd}),c=z.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=z.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,B.jsx)(Rd,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,B.jsx)(Bd,{scope:e.__scopeAccordion,collapsible:!0,children:(0,B.jsx)(Kd,{...a,ref:t})})})}),[Wd,Gd]=Pd(kd),Kd=z.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=K(z.useRef(null),t),c=Md(n),l=Od(i)===`ltr`,u=q(e.onKeyDown,e=>{if(!Ad.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=()=>{o=r+1,o>s&&(o=0)},d=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,B.jsx)(Wd,{scope:n,disabled:r,direction:i,orientation:a,children:(0,B.jsx)(jd.Slot,{scope:n,children:(0,B.jsx)(J.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),qd=`AccordionItem`,[Jd,Yd]=Pd(qd),Xd=z.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=Gd(qd,n),o=zd(qd,n),s=Id(n),c=dd(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,B.jsx)(Jd,{scope:n,open:l,disabled:u,triggerId:c,children:(0,B.jsx)(wd,{"data-orientation":a.orientation,"data-state":rf(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});Xd.displayName=qd;var Zd=`AccordionHeader`,Qd=z.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Gd(kd,n),a=Yd(Zd,n);return(0,B.jsx)(J.h3,{"data-orientation":i.orientation,"data-state":rf(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});Qd.displayName=Zd;var $d=`AccordionTrigger`,ef=z.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Gd(kd,n),a=Yd($d,n),o=Vd($d,n),s=Id(n);return(0,B.jsx)(jd.ItemSlot,{scope:n,children:(0,B.jsx)(Td,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});ef.displayName=$d;var tf=`AccordionContent`,nf=z.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Gd(kd,n),a=Yd(tf,n),o=Id(n);return(0,B.jsx)(Ed,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});nf.displayName=tf;function rf(e){return e?`open`:`closed`}var af=Xd,of=Qd,sf=ef,cf=nf;function lf(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=lf(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function uf(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=lf(e))&&(r&&(r+=` `),r+=t);return r}var df=(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},ff=(e,t)=>({classGroupId:e,validator:t}),pf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),mf=`-`,hf=[],gf=`arbitrary..`,_f=e=>{let t=bf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return yf(e);let n=e.split(mf);return vf(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?df(i,t):t:i||hf}return n[e]||hf}}},vf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=vf(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(mf):e.slice(t).join(mf),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},yf=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?gf+r:void 0})(),bf=e=>{let{theme:t,classGroups:n}=e;return xf(n,t)},xf=(e,t)=>{let n=pf();for(let r in e){let i=e[r];Sf(i,n,r,t)}return n},Sf=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Cf(i,t,n,r)}},Cf=(e,t,n,r)=>{if(typeof e==`string`){wf(e,t,n);return}if(typeof e==`function`){Tf(e,t,n,r);return}Ef(e,t,n,r)},wf=(e,t,n)=>{let r=e===``?t:Df(t,e);r.classGroupId=n},Tf=(e,t,n,r)=>{if(Of(e)){Sf(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ff(n,e))},Ef=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Sf(o,Df(t,a),n,r)}},Df=(e,t)=>{let n=e,r=t.split(mf),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=pf(),n.nextPart.set(t,i)),n=i}return n},Of=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,kf=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)}}},Af=`!`,jf=`:`,Mf=[],Nf=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Pf=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===jf){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(Af)?(c=s.slice(0,-1),l=!0):s.startsWith(Af)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Nf(t,l,c,u)};if(t){let e=t+jf,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Nf(Mf,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ff=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}},If=e=>({cache:kf(e.cacheSize),parseClassName:Pf(e),sortModifiers:Ff(e),..._f(e)}),Lf=/\s+/,Rf=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Lf),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Af:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},zf=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Bf(n))&&(i&&(i+=` `),i+=r);return i},Bf=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Bf(e[r]))&&(n&&(n+=` `),n+=t);return n},Vf=(e,...t)=>{let n,r,i,a,o=o=>(n=If(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=Rf(e,n);return i(e,a),a};return a=o,(...e)=>a(zf(...e))},Hf=[],Uf=e=>{let t=t=>t[e]||Hf;return t.isThemeGetter=!0,t},Wf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Kf=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jf=/\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$/,Yf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qf=e=>Kf.test(e),Y=e=>!!e&&!Number.isNaN(Number(e)),$f=e=>!!e&&Number.isInteger(Number(e)),ep=e=>e.endsWith(`%`)&&Y(e.slice(0,-1)),tp=e=>qf.test(e),np=()=>!0,rp=e=>Jf.test(e)&&!Yf.test(e),ip=()=>!1,ap=e=>Xf.test(e),op=e=>Zf.test(e),sp=e=>!X(e)&&!Z(e),cp=e=>Cp(e,Dp,ip),X=e=>Wf.test(e),lp=e=>Cp(e,Op,rp),up=e=>Cp(e,kp,Y),dp=e=>Cp(e,jp,np),fp=e=>Cp(e,Ap,ip),pp=e=>Cp(e,Tp,ip),mp=e=>Cp(e,Ep,op),hp=e=>Cp(e,Mp,ap),Z=e=>Gf.test(e),gp=e=>wp(e,Op),_p=e=>wp(e,Ap),vp=e=>wp(e,Tp),yp=e=>wp(e,Dp),bp=e=>wp(e,Ep),xp=e=>wp(e,Mp,!0),Sp=e=>wp(e,jp,!0),Cp=(e,t,n)=>{let r=Wf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wp=(e,t,n=!1)=>{let r=Gf.exec(e);return r?r[1]?t(r[1]):n:!1},Tp=e=>e===`position`||e===`percentage`,Ep=e=>e===`image`||e===`url`,Dp=e=>e===`length`||e===`size`||e===`bg-size`,Op=e=>e===`length`,kp=e=>e===`number`,Ap=e=>e===`family-name`,jp=e=>e===`number`||e===`weight`,Mp=e=>e===`shadow`,Np=Vf(()=>{let e=Uf(`color`),t=Uf(`font`),n=Uf(`text`),r=Uf(`font-weight`),i=Uf(`tracking`),a=Uf(`leading`),o=Uf(`breakpoint`),s=Uf(`container`),c=Uf(`spacing`),l=Uf(`radius`),u=Uf(`shadow`),d=Uf(`inset-shadow`),f=Uf(`text-shadow`),p=Uf(`drop-shadow`),m=Uf(`blur`),h=Uf(`perspective`),g=Uf(`aspect`),_=Uf(`ease`),v=Uf(`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(),Z,X],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Z,X,c],T=()=>[Qf,`full`,`auto`,...w()],E=()=>[$f,`none`,`subgrid`,Z,X],D=()=>[`auto`,{span:[`full`,$f,Z,X]},$f,Z,X],O=()=>[$f,`auto`,Z,X],k=()=>[`auto`,`min`,`max`,`fr`,Z,X],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=()=>[Qf,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Qf,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[Qf,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,Z,X],I=()=>[...b(),vp,pp,{position:[Z,X]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,yp,cp,{size:[Z,X]}],re=()=>[ep,gp,lp],L=()=>[``,`none`,`full`,l,Z,X],ie=()=>[``,Y,gp,lp],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],se=()=>[Y,ep,vp,pp],ce=()=>[``,`none`,m,Z,X],le=()=>[`none`,Y,Z,X],R=()=>[`none`,Y,Z,X],ue=()=>[Y,Z,X],de=()=>[Qf,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[tp],breakpoint:[tp],color:[np],container:[tp],"drop-shadow":[tp],ease:[`in`,`out`,`in-out`],font:[sp],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[tp],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[tp],shadow:[tp],spacing:[`px`,Y],text:[tp],"text-shadow":[tp],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Qf,X,Z,g]}],container:[`container`],columns:[{columns:[Y,X,Z,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:[$f,`auto`,Z,X]}],basis:[{basis:[Qf,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Y,Qf,`auto`,`initial`,`none`,X]}],grow:[{grow:[``,Y,Z,X]}],shrink:[{shrink:[``,Y,Z,X]}],order:[{order:[$f,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,gp,lp]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Sp,dp]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ep,X]}],"font-family":[{font:[_p,fp,t]}],"font-features":[{"font-features":[X]}],"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,Z,X]}],"line-clamp":[{"line-clamp":[Y,`none`,Z,up]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[Y,`from-font`,`auto`,Z,lp]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Y,`auto`,Z,X]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],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`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},$f,Z,X],radial:[``,Z,X],conic:[$f,Z,X]},bp,mp]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Y,Z,X]}],"outline-w":[{outline:[``,Y,gp,lp]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,xp,hp]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,xp,hp]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ie()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Y,lp]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,xp,hp]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Y,Z,X]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"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":[Y]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Y]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:ce()}],brightness:[{brightness:[Y,Z,X]}],contrast:[{contrast:[Y,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,xp,hp]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Y,Z,X]}],"hue-rotate":[{"hue-rotate":[Y,Z,X]}],invert:[{invert:[``,Y,Z,X]}],saturate:[{saturate:[Y,Z,X]}],sepia:[{sepia:[``,Y,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Y,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[Y,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Y,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,Y,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[Y,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[Y,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,Y,Z,X]}],"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`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Y,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[Y,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:R()}],"scale-x":[{"scale-x":R()}],"scale-y":[{"scale-y":R()}],"scale-z":[{"scale-z":R()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Z,X]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"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`,Z,X]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[Y,gp,lp,up]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Pp=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Fp=uf,Ip=(e,t)=>n=>{if(t?.variants==null)return Fp(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=Pp(t)||Pp(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 Fp(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)};function Lp(e){let t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>(...e)=>t.current?.(...e),[])}function Rp(e,t=globalThis?.document){let n=Lp(e);z.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var zp=`DismissableLayer`,Bp=`dismissableLayer.update`,Vp=`dismissableLayer.pointerDownOutside`,Hp=`dismissableLayer.focusOutside`,Up,Wp=z.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gp=z.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=z.useContext(Wp),[u,d]=z.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=z.useState({}),m=K(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=Jp(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=Yp(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Rp(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),z.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Up=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Xp(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Up)}},[u,f,n,l]),z.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Xp())},[u,l]),z.useEffect(()=>{let e=()=>p({});return document.addEventListener(Bp,e),()=>document.removeEventListener(Bp,e)},[]),(0,B.jsx)(J.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:q(e.onFocusCapture,S.onFocusCapture),onBlurCapture:q(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,x.onPointerDownCapture)})});Gp.displayName=zp;var Kp=`DismissableLayerBranch`,qp=z.forwardRef((e,t)=>{let n=z.useContext(Wp),r=z.useRef(null),i=K(t,r);return z.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,B.jsx)(J.div,{...e,ref:i})});qp.displayName=Kp;function Jp(e,t=globalThis?.document){let n=Lp(e),r=z.useRef(!1),i=z.useRef(()=>{});return z.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Zp(Vp,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Yp(e,t=globalThis?.document){let n=Lp(e),r=z.useRef(!1);return z.useEffect(()=>{let e=e=>{e.target&&!r.current&&Zp(Hp,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xp(){let e=new CustomEvent(Bp);document.dispatchEvent(e)}function Zp(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?rd(i,a):i.dispatchEvent(a)}var Qp=Gp,$p=qp,em=`focusScope.autoFocusOnMount`,tm=`focusScope.autoFocusOnUnmount`,nm={bubbles:!1,cancelable:!0},rm=`FocusScope`,im=z.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=z.useState(null),l=Lp(i),u=Lp(a),d=z.useRef(null),f=K(t,e=>c(e)),p=z.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;z.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:dm(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||dm(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&dm(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),z.useEffect(()=>{if(s){fm.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(em,nm);s.addEventListener(em,l),s.dispatchEvent(t),t.defaultPrevented||(am(hm(sm(s)),{select:!0}),document.activeElement===e&&dm(s))}return()=>{s.removeEventListener(em,l),setTimeout(()=>{let t=new CustomEvent(tm,nm);s.addEventListener(tm,u),s.dispatchEvent(t),t.defaultPrevented||dm(e??document.body,{select:!0}),s.removeEventListener(tm,u),fm.remove(p)},0)}}},[s,l,u,p]);let m=z.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=om(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&dm(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&dm(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,B.jsx)(J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});im.displayName=rm;function am(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(dm(r,{select:t}),document.activeElement!==n)return}function om(e){let t=sm(e);return[cm(t,e),cm(t.reverse(),e)]}function sm(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cm(e,t){for(let n of e)if(!lm(n,{upTo:t}))return n}function lm(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function um(e){return e instanceof HTMLInputElement&&`select`in e}function dm(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&um(e)&&t&&e.select()}}var fm=pm();function pm(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=mm(e,t),e.unshift(t)},remove(t){e=mm(e,t),e[0]?.resume()}}}function mm(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hm(e){return e.filter(e=>e.tagName!==`A`)}var gm=`Portal`,_m=z.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=z.useState(!1);Zu(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?nd.createPortal((0,B.jsx)(J.div,{...r,ref:t}),o):null});_m.displayName=gm;var vm=0;function ym(){z.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??bm()),document.body.insertAdjacentElement(`beforeend`,e[1]??bm()),vm++,()=>{vm===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),vm--}},[])}function bm(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var xm=function(){return xm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xm.apply(this,arguments)};function Sm(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Cm(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var wm=`right-scroll-bar-position`,Tm=`width-before-scroll-bar`,Em=`with-scroll-bars-hidden`,Dm=`--removed-body-scroll-bar-size`;function Om(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function km(e,t){var n=(0,z.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Am=typeof window<`u`?z.useLayoutEffect:z.useEffect,jm=new WeakMap;function Mm(e,t){var n=km(t||null,function(t){return e.forEach(function(e){return Om(e,t)})});return Am(function(){var t=jm.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Om(e,null)}),i.forEach(function(e){r.has(e)||Om(e,a)})}jm.set(n,e)},[e]),n}function Nm(e){return e}function Pm(e,t){t===void 0&&(t=Nm);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Fm(e){e===void 0&&(e={});var t=Pm(null);return t.options=xm({async:!0,ssr:!1},e),t}var Im=function(e){var t=e.sideCar,n=Sm(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return z.createElement(r,xm({},n))};Im.isSideCarExport=!0;function Lm(e,t){return e.useMedium(t),Im}var Rm=Fm(),zm=function(){},Bm=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:zm,onWheelCapture:zm,onTouchMoveCapture:zm}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Sm(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Mm([n,t]),C=xm(xm({},b),i);return z.createElement(z.Fragment,null,u&&z.createElement(x,{sideCar:Rm,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?z.cloneElement(z.Children.only(s),xm(xm({},C),{ref:S})):z.createElement(v,xm({},C,{className:c,ref:S}),s))});Bm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Bm.classNames={fullWidth:Tm,zeroRight:wm};var Vm,Hm=function(){if(Vm)return Vm;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Um(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Hm();return t&&e.setAttribute(`nonce`,t),e}function Wm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gm(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Km=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Um())&&(Wm(t,n),Gm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qm=function(){var e=Km();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jm=function(){var e=qm();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Ym={left:0,top:0,right:0,gap:0},Xm=function(e){return parseInt(e||``,10)||0},Zm=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Xm(n),Xm(r),Xm(i)]},Qm=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Ym;var t=Zm(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$m=Jm(),eh=`data-scroll-locked`,th=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
31
|
-
.${Em} {
|
|
32
|
-
overflow: hidden ${r};
|
|
33
|
-
padding-right: ${s}px ${r};
|
|
34
|
-
}
|
|
35
|
-
body[${eh}] {
|
|
36
|
-
overflow: hidden ${r};
|
|
37
|
-
overscroll-behavior: contain;
|
|
38
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
39
|
-
padding-left: ${i}px;
|
|
40
|
-
padding-top: ${a}px;
|
|
41
|
-
padding-right: ${o}px;
|
|
42
|
-
margin-left:0;
|
|
43
|
-
margin-top:0;
|
|
44
|
-
margin-right: ${s}px ${r};
|
|
45
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.${wm} {
|
|
49
|
-
right: ${s}px ${r};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.${Tm} {
|
|
53
|
-
margin-right: ${s}px ${r};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.${wm} .${wm} {
|
|
57
|
-
right: 0 ${r};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.${Tm} .${Tm} {
|
|
61
|
-
margin-right: 0 ${r};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
body[${eh}] {
|
|
65
|
-
${Dm}: ${s}px;
|
|
66
|
-
}
|
|
67
|
-
`},nh=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},rh=function(){z.useEffect(function(){return document.body.setAttribute(eh,(nh()+1).toString()),function(){var e=nh()-1;e<=0?document.body.removeAttribute(eh):document.body.setAttribute(eh,e.toString())}},[])},ih=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;rh();var a=z.useMemo(function(){return Qm(i)},[i]);return z.createElement($m,{styles:th(a,!t,i,n?``:`!important`)})},ah=!1;if(typeof window<`u`)try{var oh=Object.defineProperty({},`passive`,{get:function(){return ah=!0,!0}});window.addEventListener(`test`,oh,oh),window.removeEventListener(`test`,oh,oh)}catch{ah=!1}var sh=ah?{passive:!1}:!1,ch=function(e){return e.tagName===`TEXTAREA`},lh=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ch(e)&&n[t]===`visible`)},uh=function(e){return lh(e,`overflowY`)},dh=function(e){return lh(e,`overflowX`)},fh=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),hh(e,r)){var i=gh(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ph=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},mh=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},hh=function(e,t){return e===`v`?uh(t):dh(t)},gh=function(e,t){return e===`v`?ph(t):mh(t)},_h=function(e,t){return e===`h`&&t===`rtl`?-1:1},vh=function(e,t,n,r,i){var a=_h(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=gh(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&hh(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},yh=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bh=function(e){return[e.deltaX,e.deltaY]},xh=function(e){return e&&`current`in e?e.current:e},Sh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ch=function(e){return`
|
|
68
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
69
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
70
|
-
`},wh=0,Th=[];function Eh(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(wh++)[0],a=z.useState(Jm)[0],o=z.useRef(e);z.useEffect(function(){o.current=e},[e]),z.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Cm([e.lockRef.current],(e.shards||[]).map(xh),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=z.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=yh(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=fh(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=fh(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return vh(h,t,e,h===`h`?s:c,!0)},[]),c=z.useCallback(function(e){var n=e;if(!(!Th.length||Th[Th.length-1]!==a)){var r=`deltaY`in n?bh(n):yh(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Sh(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(xh).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=z.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Dh(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=z.useCallback(function(e){n.current=yh(e),r.current=void 0},[]),d=z.useCallback(function(t){l(t.type,bh(t),t.target,s(t,e.lockRef.current))},[]),f=z.useCallback(function(t){l(t.type,yh(t),t.target,s(t,e.lockRef.current))},[]);z.useEffect(function(){return Th.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,sh),document.addEventListener(`touchmove`,c,sh),document.addEventListener(`touchstart`,u,sh),function(){Th=Th.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,sh),document.removeEventListener(`touchmove`,c,sh),document.removeEventListener(`touchstart`,u,sh)}},[]);var p=e.removeScrollBar,m=e.inert;return z.createElement(z.Fragment,null,m?z.createElement(a,{styles:Ch(i)}):null,p?z.createElement(ih,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Dh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Oh=Lm(Rm,Eh),kh=z.forwardRef(function(e,t){return z.createElement(Bm,xm({},e,{ref:t,sideCar:Oh}))});kh.classNames=Bm.classNames;var Ah=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},jh=new WeakMap,Mh=new WeakMap,Nh={},Ph=0,Fh=function(e){return e&&(e.host||Fh(e.parentNode))},Ih=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Fh(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Lh=function(e,t,n,r){var i=Ih(t,Array.isArray(e)?e:[e]);Nh[n]||(Nh[n]=new WeakMap);var a=Nh[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(jh.get(e)||0)+1,l=(a.get(e)||0)+1;jh.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Mh.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ph++,function(){o.forEach(function(e){var t=jh.get(e)-1,i=a.get(e)-1;jh.set(e,t),a.set(e,i),t||(Mh.has(e)||e.removeAttribute(r),Mh.delete(e)),i||e.removeAttribute(n)}),Ph--,Ph||(jh=new WeakMap,jh=new WeakMap,Mh=new WeakMap,Nh={})}},Rh=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ah(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Lh(r,i,n,`aria-hidden`)):function(){return null}},zh=`Dialog`,[Bh,Vh]=zu(zh),[Hh,Uh]=Bh(zh),Wh=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=z.useRef(null),c=z.useRef(null),[l,u]=$u({prop:r,defaultProp:i??!1,onChange:a,caller:zh});return(0,B.jsx)(Hh,{scope:t,triggerRef:s,contentRef:c,contentId:dd(),titleId:dd(),descriptionId:dd(),open:l,onOpenChange:u,onOpenToggle:z.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Wh.displayName=zh;var Gh=`DialogTrigger`,Kh=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Uh(Gh,n),a=K(t,i.triggerRef);return(0,B.jsx)(J.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fg(i.open),...r,ref:a,onClick:q(e.onClick,i.onOpenToggle)})});Kh.displayName=Gh;var qh=`DialogPortal`,[Jh,Yh]=Bh(qh,{forceMount:void 0}),Xh=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Uh(qh,t);return(0,B.jsx)(Jh,{scope:t,forceMount:n,children:z.Children.map(r,e=>(0,B.jsx)(ad,{present:n||a.open,children:(0,B.jsx)(_m,{asChild:!0,container:i,children:e})}))})};Xh.displayName=qh;var Zh=`DialogOverlay`,Qh=z.forwardRef((e,t)=>{let n=Yh(Zh,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Uh(Zh,e.__scopeDialog);return a.modal?(0,B.jsx)(ad,{present:r||a.open,children:(0,B.jsx)(eg,{...i,ref:t})}):null});Qh.displayName=Zh;var $h=Uu(`DialogOverlay.RemoveScroll`),eg=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Uh(Zh,n);return(0,B.jsx)(kh,{as:$h,allowPinchZoom:!0,shards:[i.contentRef],children:(0,B.jsx)(J.div,{"data-state":fg(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),tg=`DialogContent`,ng=z.forwardRef((e,t)=>{let n=Yh(tg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Uh(tg,e.__scopeDialog);return(0,B.jsx)(ad,{present:r||a.open,children:a.modal?(0,B.jsx)(rg,{...i,ref:t}):(0,B.jsx)(ig,{...i,ref:t})})});ng.displayName=tg;var rg=z.forwardRef((e,t)=>{let n=Uh(tg,e.__scopeDialog),r=z.useRef(null),i=K(t,n.contentRef,r);return z.useEffect(()=>{let e=r.current;if(e)return Rh(e)},[]),(0,B.jsx)(ag,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:q(e.onFocusOutside,e=>e.preventDefault())})}),ig=z.forwardRef((e,t)=>{let n=Uh(tg,e.__scopeDialog),r=z.useRef(!1),i=z.useRef(!1);return(0,B.jsx)(ag,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),ag=z.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Uh(tg,n),c=z.useRef(null),l=K(t,c);return ym(),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(im,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(Gp,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":fg(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(gg,{titleId:s.titleId}),(0,B.jsx)(vg,{contentRef:c,descriptionId:s.descriptionId})]})]})}),og=`DialogTitle`,sg=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Uh(og,n);return(0,B.jsx)(J.h2,{id:i.titleId,...r,ref:t})});sg.displayName=og;var cg=`DialogDescription`,lg=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Uh(cg,n);return(0,B.jsx)(J.p,{id:i.descriptionId,...r,ref:t})});lg.displayName=cg;var ug=`DialogClose`,dg=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Uh(ug,n);return(0,B.jsx)(J.button,{type:`button`,...r,ref:t,onClick:q(e.onClick,()=>i.onOpenChange(!1))})});dg.displayName=ug;function fg(e){return e?`open`:`closed`}var pg=`DialogTitleWarning`,[mg,hg]=Ru(pg,{contentName:tg,titleName:og,docsSlug:`dialog`}),gg=({titleId:e})=>{let t=hg(pg),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
71
|
-
|
|
72
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
73
|
-
|
|
74
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return z.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_g=`DialogDescriptionWarning`,vg=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hg(_g).contentName}}.`;return z.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},yg=Wh,bg=Kh,xg=Xh,Sg=Qh,Cg=ng,wg=sg,Tg=lg,Eg=dg,Dg=`AlertDialog`,[Og,kg]=zu(Dg,[Vh]),Ag=Vh(),jg=e=>{let{__scopeAlertDialog:t,...n}=e,r=Ag(t);return(0,B.jsx)(yg,{...r,...n,modal:!0})};jg.displayName=Dg;var Mg=`AlertDialogTrigger`,Ng=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Ag(n);return(0,B.jsx)(bg,{...i,...r,ref:t})});Ng.displayName=Mg;var Pg=`AlertDialogPortal`,Fg=e=>{let{__scopeAlertDialog:t,...n}=e,r=Ag(t);return(0,B.jsx)(xg,{...r,...n})};Fg.displayName=Pg;var Ig=`AlertDialogOverlay`,Lg=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Ag(n);return(0,B.jsx)(Sg,{...i,...r,ref:t})});Lg.displayName=Ig;var Rg=`AlertDialogContent`,[zg,Bg]=Og(Rg),Vg=Ku(`AlertDialogContent`),Hg=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=Ag(n),o=z.useRef(null),s=K(t,o),c=z.useRef(null);return(0,B.jsx)(mg,{contentName:Rg,titleName:Ug,docsSlug:`alert-dialog`,children:(0,B.jsx)(zg,{scope:n,cancelRef:c,children:(0,B.jsxs)(Cg,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:q(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,B.jsx)(Vg,{children:r}),(0,B.jsx)(Zg,{contentRef:o})]})})})});Hg.displayName=Rg;var Ug=`AlertDialogTitle`,Wg=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Ag(n);return(0,B.jsx)(wg,{...i,...r,ref:t})});Wg.displayName=Ug;var Gg=`AlertDialogDescription`,Kg=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Ag(n);return(0,B.jsx)(Tg,{...i,...r,ref:t})});Kg.displayName=Gg;var qg=`AlertDialogAction`,Jg=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Ag(n);return(0,B.jsx)(Eg,{...i,...r,ref:t})});Jg.displayName=qg;var Yg=`AlertDialogCancel`,Xg=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Bg(Yg,n),a=Ag(n),o=K(t,i);return(0,B.jsx)(Eg,{...a,...r,ref:o})});Xg.displayName=Yg;var Zg=({contentRef:e})=>{let t=`\`${Rg}\` requires a description for the component to be accessible for screen reader users.
|
|
75
|
-
|
|
76
|
-
You can add a description to the \`${Rg}\` by passing a \`${Gg}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
77
|
-
|
|
78
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Rg}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
79
|
-
|
|
80
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return z.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},Qg=Fg,$g=Lg,e_=Hg,t_=Jg,n_=Xg,r_=Wg,i_=Kg,a_=Symbol.for(`react.lazy`),o_=z.use;function s_(e){return typeof e==`object`&&!!e&&`then`in e}function c_(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===a_&&`_payload`in e&&s_(e._payload)}function l_(e){let t=d_(e),n=z.forwardRef((e,n)=>{let{children:r,...i}=e;c_(r)&&typeof o_==`function`&&(r=o_(r._payload));let a=z.Children.toArray(r),o=a.find(p_);if(o){let e=o.props.children,r=a.map(t=>t===o?z.Children.count(e)>1?z.Children.only(null):z.isValidElement(e)?e.props.children:null:t);return(0,B.jsx)(t,{...i,ref:n,children:z.isValidElement(e)?z.cloneElement(e,void 0,r):null})}return(0,B.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var u_=l_(`Slot`);function d_(e){let t=z.forwardRef((e,t)=>{let{children:n,...r}=e;if(c_(n)&&typeof o_==`function`&&(n=o_(n._payload)),z.isValidElement(n)){let e=h_(n),i=m_(r,n.props);return n.type!==z.Fragment&&(i.ref=t?Hu(t,e):e),z.cloneElement(n,i)}return z.Children.count(n)>1?z.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f_=Symbol(`radix.slottable`);function p_(e){return z.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===f_}function m_(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function h_(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var g_=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=l_(`Primitive.${t}`),r=z.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,B.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),__=`AspectRatio`,v_=z.forwardRef((e,t)=>{let{ratio:n=1/1,style:r,...i}=e;return(0,B.jsx)(`div`,{style:{position:`relative`,width:`100%`,paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":``,children:(0,B.jsx)(g_.div,{...i,ref:t,style:{...r,position:`absolute`,top:0,right:0,bottom:0,left:0}})})});v_.displayName=__;function y_(e,t=[]){let n=[];function r(t,r){let i=z.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=z.useMemo(()=>o,Object.values(o));return(0,B.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=z.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>z.createContext(e));return function(n){let r=n?.[e]||t;return z.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,b_(i,...t)]}function b_(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var x_=y();function S_(){return(0,x_.useSyncExternalStore)(C_,()=>!0,()=>!1)}function C_(){return()=>{}}var w_=`Avatar`,[T_,E_]=y_(w_),[D_,O_]=T_(w_),k_=z.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=z.useState(`idle`);return(0,B.jsx)(D_,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:(0,B.jsx)(g_.span,{...r,ref:t})})});k_.displayName=w_;var A_=`AvatarImage`,j_=z.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=O_(A_,n),s=F_(r,a),c=Lp(e=>{i(e),o.onImageLoadingStatusChange(e)});return Zu(()=>{s!==`idle`&&c(s)},[s,c]),s===`loaded`?(0,B.jsx)(g_.img,{...a,ref:t,src:r}):null});j_.displayName=A_;var M_=`AvatarFallback`,N_=z.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=O_(M_,n),[o,s]=z.useState(r===void 0);return z.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,B.jsx)(g_.span,{...i,ref:t}):null});N_.displayName=M_;function P_(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function F_(e,{referrerPolicy:t,crossOrigin:n}){let r=S_(),i=z.useRef(null),a=r?(i.current||=new window.Image,i.current):null,[o,s]=z.useState(()=>P_(a,e));return Zu(()=>{s(P_(a,e))},[a,e]),Zu(()=>{let e=e=>()=>{s(e)};if(!a)return;let r=e(`loaded`),i=e(`error`);return a.addEventListener(`load`,r),a.addEventListener(`error`,i),t&&(a.referrerPolicy=t),typeof n==`string`&&(a.crossOrigin=n),()=>{a.removeEventListener(`load`,r),a.removeEventListener(`error`,i)}},[a,n,t]),o}var I_=k_,L_=j_,R_=N_,z_=function(){return z_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},z_.apply(this,arguments)},B_=(0,z.createContext)(void 0);function V_(){var e=(0,z.useContext)(B_);if(!e)throw Error(`useDayPicker must be used within a DayPickerProvider.`);return e}(0,z.createContext)(void 0),(0,z.forwardRef)(function(e,t){var n=V_(),r=n.classNames,i=n.styles,a=[r.button_reset,r.button];e.className&&a.push(e.className);var o=a.join(` `),s=z_(z_({},i.button_reset),i.button);return e.style&&Object.assign(s,e.style),(0,B.jsx)(`button`,z_({},e,{ref:t,type:`button`,className:o,style:s}))}),(0,z.createContext)(void 0),(0,z.createContext)(void 0);var H_;(function(e){e.Outside=`outside`,e.Disabled=`disabled`,e.Selected=`selected`,e.Hidden=`hidden`,e.Today=`today`,e.RangeStart=`range_start`,e.RangeEnd=`range_end`,e.RangeMiddle=`range_middle`})(H_||={}),H_.Selected,H_.Disabled,H_.Hidden,H_.Today,H_.RangeEnd,H_.RangeMiddle,H_.RangeStart,H_.Outside,(0,z.createContext)(void 0),(0,z.createContext)(void 0),(0,z.createContext)(void 0);function U_(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}U_()?z.useLayoutEffect:z.useEffect;function W_(e){return Object.prototype.toString.call(e)===`[object Object]`}function G_(e){return W_(e)||Array.isArray(e)}function K_(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function q_(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!G_(r)||!G_(i)?r===i:q_(r,i)})}function J_(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Y_(e,t){if(e.length!==t.length)return!1;let n=J_(e),r=J_(t);return n.every((e,t)=>{let n=r[t];return q_(e,n)})}function X_(e){return typeof e==`number`}function Z_(e){return typeof e==`string`}function Q_(e){return typeof e==`boolean`}function $_(e){return Object.prototype.toString.call(e)===`[object Object]`}function ev(e){return Math.abs(e)}function tv(e){return Math.sign(e)}function nv(e,t){return ev(e-t)}function rv(e,t){return e===0||t===0||ev(e)<=ev(t)?0:ev(nv(ev(e),ev(t))/e)}function iv(e){return Math.round(e*100)/100}function av(e){return uv(e).map(Number)}function ov(e){return e[sv(e)]}function sv(e){return Math.max(0,e.length-1)}function cv(e,t){return t===sv(e)}function lv(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function uv(e){return Object.keys(e)}function dv(e,t){return[e,t].reduce((e,t)=>(uv(t).forEach(n=>{let r=e[n],i=t[n];e[n]=$_(r)&&$_(i)?dv(r,i):i}),e),{})}function fv(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function pv(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return Z_(e)?n[e](r):e(t,r,i)}return{measure:o}}function mv(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function hv(e,t,n,r){let i=mv(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function gv(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function _v(e=0,t=0){let n=ev(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function vv(e,t,n){let{constrain:r}=_v(0,e),i=e+1,a=o(t);function o(e){return n?ev((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return vv(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function yv(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=mv(),w=mv(),T=_v(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,ee=!1;function F(e){if(!v)return;function n(t){(Q_(v)||v(e,t))&&ie(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,oe).add(r,`contextmenu`,oe).add(r,`click`,se,!0)}function I(){C.clear(),w.clear()}function te(){let e=ee?n:t;w.add(e,`touchmove`,ae,S).add(e,`touchend`,oe).add(e,`mousemove`,ae,S).add(e,`mouseup`,oe)}function ne(e){let t=e.nodeName||``;return x.includes(t)}function re(){return(m?D:E)[ee?`mouse`:`touch`]}function L(e,t){let n=d.add(tv(e)*-1),r=u.byDistance(e,!m).distance;return m||ev(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function ie(e){let t=fv(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=nv(i.get(),o.get())>=2,!(t&&e.button!==0)&&(ne(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),te(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function ae(e){if(!fv(e,r)&&e.touches.length>=2)return oe(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=nv(t,A),c=nv(n,j);if(!N&&!ee&&(!e.cancelable||(N=o>c,!N)))return oe(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function oe(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*re(),r=L(b(n),t),i=rv(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),ee=!1,f.emit(`pointerUp`)}function se(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function ce(){return M}return{init:F,destroy:I,pointerDown:ce}}function bv(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(fv(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&ev(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function xv(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function Sv(e){function t(t){return t/100*e}return{measure:t}}function Cv(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(ev(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(Q_(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function wv(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=tv(a),d=u,x}function p(){return ev(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function Tv(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=_v(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=ev(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&ev(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function Ev(e,t,n,r,i){let a=_v(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return nv(e,t)<=1}function u(){let e=o[0],t=ov(o);return _v(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=cv(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function Dv(e,t,n){let r=t[0];return{limit:_v(n?r-e:ov(t),r)}}function Ov(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=_v(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function kv(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function Av(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>ov(e)[o]-e[0][a]).map(ev)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-ev(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function jv(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=cv(n,t);return r?lv(ov(n[0])+1):i?lv(sv(a)-ov(n)[0]+1,ov(n)[0]):e})}return{slideRegistry:l}}function Mv(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>ev(e)-ev(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>ev(e.diff)-ev(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>tv(e)===r);return a.length?c(a):ov(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function Nv(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function Pv(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));X_(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(Q_(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Fv(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return X_(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Iv(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=iv(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function Lv(e,t,n,r,i,a,o,s,c){let l=.5,u=av(i),d=av(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:Fv(-1),translate:Iv(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function Rv(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(Q_(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function zv(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return uv(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function Bv(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return ev(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(ov(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=cv(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(ev)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Vv(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=X_(n);function p(e,t){return av(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?av(e).reduce((n,f,p)=>{let m=ov(n)||0,h=m===0,g=f===sv(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=ev(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function Hv(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=xv(),w=C.measure(t),T=n.map(C.measure),E=gv(c,l),D=E.measureSize(w),O=Sv(D),k=pv(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=Bv(E,w,T,n,d||!!v,i),ee=Vv(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=Av(E,k,w,T,ee),te=-ov(F)+ov(M),{snapsContained:ne,scrollContainLimit:re}=Ev(D,te,I,v,2),L=A?ne:I,{limit:ie}=Dv(te,L,d),ae=vv(sv(L),u,d),oe=ae.clone(),se=av(n),ce=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},le=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},R=hv(r,i,()=>ce(Se),e=>le(Se,e)),ue=.68,de=L[ae.get()],fe=Fv(de),pe=Fv(de),me=Fv(de),z=Fv(de),B=wv(fe,me,pe,z,f,ue),he=Mv(d,L,te,ie,z),ge=Nv(R,ae,oe,B,he,z,o),_e=kv(ie),ve=mv(),ye=zv(t,n,o,h),{slideRegistry:be}=jv(A,v,L,re,ee,se),xe=Pv(e,n,be,ge,B,ve,o,S),Se={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:R,axis:E,dragHandler:yv(E,e,r,i,z,bv(E,i),fe,R,ge,B,he,ae,o,O,p,m,_,ue,x),eventStore:ve,percentOfView:O,index:ae,indexPrevious:oe,limit:ie,location:fe,offsetLocation:me,previousLocation:pe,options:a,resizeHandler:Cv(t,o,i,n,E,y,C),scrollBody:B,scrollBounds:Tv(ie,me,z,B,O),scrollLooper:Ov(te,ie,me,[fe,me,pe,z]),scrollProgress:_e,scrollSnapList:L.map(_e.get),scrollSnaps:L,scrollTarget:he,scrollTo:ge,slideLooper:Lv(E,D,te,j,M,F,L,me,n),slideFocus:xe,slidesHandler:Rv(t,o,b),slidesInView:ye,slideIndexes:se,slideRegistry:be,slidesToScroll:ee,target:z,translate:Iv(E,t)};return Se}function Uv(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var Wv={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Gv(e){function t(e,t){return dv(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,uv(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>uv(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Kv(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function qv(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Gv(i),o=Kv(a),s=mv(),c=Uv(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Wv,qv.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(Z_(t)?e.querySelector(t):t)||e.children[0];let r=Z_(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Hv(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(ce),_.eventHandler.init(ce),_.resizeHandler.init(ce),_.slidesHandler.init(ce),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(ce),x=o.init(ce,b)))}function D(e,t){let n=I();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==I()}function P(){return _.index.add(-1).get()!==I()}function ee(){return _.scrollSnapList}function F(){return _.scrollProgress.get(_.offsetLocation.get())}function I(){return _.index.get()}function te(){return _.indexPrevious.get()}function ne(){return _.slidesInView.get()}function re(){return _.slidesInView.get(!1)}function L(){return x}function ie(){return _}function ae(){return e}function oe(){return S}function se(){return C}let ce={canScrollNext:N,canScrollPrev:P,containerNode:oe,internalEngine:ie,destroy:k,off:p,on:f,emit:m,plugins:L,previousScrollSnap:te,reInit:h,rootNode:ae,scrollNext:j,scrollPrev:M,scrollProgress:F,scrollSnapList:ee,scrollTo:A,selectedScrollSnap:I,slideNodes:se,slidesInView:ne,slidesNotInView:re};return E(t,n),setTimeout(()=>c.emit(`init`),0),ce}qv.globalOptions=void 0;function Jv(e={},t=[]){let n=(0,z.useRef)(e),r=(0,z.useRef)(t),[i,a]=(0,z.useState)(),[o,s]=(0,z.useState)(),c=(0,z.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,z.useEffect)(()=>{q_(n.current,e)||(n.current=e,c())},[e,c]),(0,z.useEffect)(()=>{Y_(r.current,t)||(r.current=t,c())},[t,c]),(0,z.useEffect)(()=>{if(K_()&&o){qv.globalOptions=Jv.globalOptions;let e=qv(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}Jv.globalOptions=void 0;function Yv(e){let t=z.useRef({value:e,previous:e});return z.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Xv(e){let[t,n]=z.useState(void 0);return Zu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Zv=`Checkbox`,[Qv,$v]=zu(Zv),[ey,ty]=Qv(Zv);function ny(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=$u({prop:n,defaultProp:i??!1,onChange:c,caller:Zv}),[m,h]=z.useState(null),[g,_]=z.useState(null),v=z.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:dy(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,B.jsx)(ey,{scope:t,...b,children:uy(d)?d(b):r})}var ry=`CheckboxTrigger`,iy=z.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=ty(ry,e),h=K(i,u),g=z.useRef(c);return z.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,B.jsx)(J.button,{type:`button`,role:`checkbox`,"aria-checked":dy(c)?`mixed`:c,"aria-required":l,"data-state":fy(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:q(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:q(n,e=>{d(e=>dy(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});iy.displayName=ry;var ay=z.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,B.jsx)(ny,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(iy,{...d,ref:t,__scopeCheckbox:n}),e&&(0,B.jsx)(ly,{__scopeCheckbox:n})]})})});ay.displayName=Zv;var oy=`CheckboxIndicator`,sy=z.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=ty(oy,n);return(0,B.jsx)(ad,{present:r||dy(a.checked)||a.checked===!0,children:(0,B.jsx)(J.span,{"data-state":fy(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});sy.displayName=oy;var cy=`CheckboxBubbleInput`,ly=z.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=ty(cy,e),m=K(n,p),h=Yv(a),g=Xv(r);z.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=dy(a),n.call(e,dy(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=z.useRef(dy(a)?!1:a);return(0,B.jsx)(J.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});ly.displayName=cy;function uy(e){return typeof e==`function`}function dy(e){return e===`indeterminate`}function fy(e){return dy(e)?`indeterminate`:e?`checked`:`unchecked`}var py=Object.create(null),my=e=>({}),hy=new Proxy(py,{get(e,t){return my()[t]??py[t]},has(e,t){return t in my()||t in py},set(e,t,n){let r=my(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=my(!0);return delete n[t],!0},ownKeys(){let e=my(!0);return Object.keys(e)}});function gy(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return gy(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return gy(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return gy(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return gy(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return gy(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return gy(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return gy(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var _y=1,vy=4,yy=8,by=24,xy={eterm:vy,cons25:vy,console:vy,cygwin:vy,dtterm:vy,gnome:vy,hurd:vy,jfbterm:vy,konsole:vy,kterm:vy,mlterm:vy,mosh:by,putty:vy,st:vy,"rxvt-unicode-24bit":by,terminator:by,"xterm-kitty":by},Sy=new Map(Object.entries({APPVEYOR:yy,BUILDKITE:yy,CIRCLECI:by,DRONE:yy,GITEA_ACTIONS:by,GITHUB_ACTIONS:by,GITLAB_CI:yy,TRAVIS:yy})),Cy=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function wy(){if(gy(`FORCE_COLOR`)!==void 0)switch(gy(`FORCE_COLOR`)){case``:case`1`:case`true`:return vy;case`2`:return yy;case`3`:return by;default:return _y}if(gy(`NODE_DISABLE_COLORS`)!==void 0&&gy(`NODE_DISABLE_COLORS`)!==``||gy(`NO_COLOR`)!==void 0&&gy(`NO_COLOR`)!==``||gy(`TERM`)===`dumb`)return _y;if(gy(`TMUX`))return by;if(`TF_BUILD`in hy&&`AGENT_NAME`in hy)return vy;if(`CI`in hy){for(let{0:e,1:t}of Sy)if(e in hy)return t;return gy(`CI_NAME`)===`codeship`?yy:_y}if(`TEAMCITY_VERSION`in hy)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(gy(`TEAMCITY_VERSION`))===null?_y:vy;switch(gy(`TERM_PROGRAM`)){case`iTerm.app`:return!gy(`TERM_PROGRAM_VERSION`)||/^[0-2]\./.exec(gy(`TERM_PROGRAM_VERSION`))!==null?yy:by;case`HyperTerm`:case`MacTerm`:return by;case`Apple_Terminal`:return yy}if(gy(`COLORTERM`)===`truecolor`||gy(`COLORTERM`)===`24bit`)return by;if(gy(`TERM`)){if(/truecolor/.exec(gy(`TERM`))!==null)return by;if(/^xterm-256/.exec(gy(`TERM`))!==null)return yy;let e=gy(`TERM`).toLowerCase();if(xy[e])return xy[e];if(Cy.some(t=>t.exec(e)!==null))return vy}return gy(`COLORTERM`)?vy:_y}var Ty={reset:`\x1B[0m`,bright:`\x1B[1m`,dim:`\x1B[2m`,undim:`\x1B[22m`,underscore:`\x1B[4m`,blink:`\x1B[5m`,reverse:`\x1B[7m`,hidden:`\x1B[8m`,fg:{black:`\x1B[30m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,magenta:`\x1B[35m`,cyan:`\x1B[36m`,white:`\x1B[37m`},bg:{black:`\x1B[40m`,red:`\x1B[41m`,green:`\x1B[42m`,yellow:`\x1B[43m`,blue:`\x1B[44m`,magenta:`\x1B[45m`,cyan:`\x1B[46m`,white:`\x1B[47m`}},Ey=[`debug`,`info`,`success`,`warn`,`error`];function Dy(e,t){return Ey.indexOf(t)>=Ey.indexOf(e)}var Oy={info:Ty.fg.blue,success:Ty.fg.green,warn:Ty.fg.yellow,error:Ty.fg.red,debug:Ty.fg.magenta},ky=(e,t,n)=>{let r=new Date().toISOString();return n?`${Ty.dim}${r}${Ty.reset} ${Oy[e]}${e.toUpperCase()}${Ty.reset} ${Ty.bright}[Better Auth]:${Ty.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`};(e=>{let t=e?.disabled!==!0,n=e?.level??`warn`,r=e?.disableColors===void 0?wy()!==1:!e.disableColors,i=(i,a,o=[])=>{if(!t||!Dy(n,i))return;let s=ky(i,a,r);if(!e||typeof e.log!=`function`){i===`error`?console.error(s,...o):i===`warn`?console.warn(s,...o):console.log(s,...o);return}e.log(i===`success`?`info`:i,a,...o)};return{...Object.fromEntries(Ey.map(e=>[e,(...[t,...n])=>i(e,t,n)])),get level(){return n}}})();function Ay(e){return e.charAt(0).toUpperCase()+e.slice(1)}var jy=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function My(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new jy(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Ny(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new jy(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof jy?t:new jy(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Py(e,t=`/api/auth`){if(Ny(e),My(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function Fy(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function Iy(e,t,n,r,i){if(e)return Py(e,t);if(r!==!1){let e=hy.BETTER_AUTH_URL||hy.NEXT_PUBLIC_BETTER_AUTH_URL||hy.PUBLIC_BETTER_AUTH_URL||hy.NUXT_PUBLIC_BETTER_AUTH_URL||hy.NUXT_PUBLIC_AUTH_URL||(hy.BASE_URL===`/`?void 0:hy.BASE_URL);if(e)return Py(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&Fy(o,`proto`)&&Fy(a,`host`))try{return Py(`${o}://${a}`,t)}catch{}if(n){let e=Ly(n.url);if(!e)throw new jy(`Could not get origin from request. Please provide a valid base URL.`);return Py(e,t)}if(typeof window<`u`&&window.location)return Py(window.location.origin,t)}function Ly(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Ry={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},zy={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},By=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Vy={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},Hy=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Uy(e){return e instanceof Date&&!isNaN(e.getTime())}function Wy(e){let t=Hy.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return Uy(f)?f:null}function Gy(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in Vy)return Vy[s];if(!By.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(zy).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=Wy(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function Ky(e,t={strict:!0}){return Gy(e,t)}var qy=[],Jy=0,Yy=4,Xy=0,Zy=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=Jy+Yy;t<qy.length;)qy[t]===e?qy.splice(t,Yy):t+=Yy;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){Xy++;let i=!qy.length;for(let i of t)qy.push(i,n.value,e,r);if(i){for(Jy=0;Jy<qy.length;Jy+=Yy)qy[Jy](qy[Jy+1],qy[Jy+2],qy[Jy+3]);qy.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},Qy=5,$y=6,eb=10,tb=(e,t,n,r)=>(e.events=e.events||{},e.events[n+eb]||(e.events[n+eb]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+eb](),delete e.events[n+eb])}),nb=1e3,rb=(e,t)=>tb(e,n=>{let r=t(n);r&&e.events[$y].push(r)},Qy,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[$y]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[$y])t();e.events[$y]=[]}},nb)},()=>{e.listen=n,e.off=r}});function ib(e,t,n){let r=new Set(t).add(void 0);return e.listen((e,t,i)=>{r.has(i)&&n(e,t,i)})}var ab=()=>typeof window>`u`,ob=(e,t,n,r)=>{let i=Zy({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;n&&r<n||(i.set({error:e.error,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e))},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{ab()||(o?await a():rb(i,()=>{let e=setTimeout(async()=>{o||=(await a(),!0)},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},sb=Symbol.for(`better-auth:broadcast-channel`),cb=()=>Math.floor(Date.now()/1e3),lb=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:cb()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function ub(e=`better-auth.message`){return globalThis[sb]||(globalThis[sb]=new lb(e)),globalThis[sb]}var db=Symbol.for(`better-auth:focus-manager`),fb=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function pb(){return globalThis[db]||(globalThis[db]=new fb),globalThis[db]}var mb=Symbol.for(`better-auth:online-manager`),hb=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function gb(){return globalThis[mb]||(globalThis[mb]=new hb),globalThis[mb]}var _b=()=>Math.floor(Date.now()/1e3),vb=5;function yb(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||gb().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=_b(),n.set(!n.get());return}let i=t.get();if(e?.event===`poll`){c.lastSessionRequest=_b(),r(`/get-session`).then(e=>{e.error?t.set({...i,data:null,error:e.error}):t.set({...i,data:e.data,error:null}),c.lastSync=_b(),n.set(!n.get())}).catch(()=>{});return}if(e?.event===`visibilitychange`){if(_b()-c.lastSessionRequest<vb)return;c.lastSessionRequest=_b()}(i?.data===null||i?.data===void 0||e?.event===`visibilitychange`)&&(c.lastSync=_b(),n.set(!n.get()))},d=e=>{ub().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=ub().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=pb().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=gb().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),ub().setup(),pb().setup(),gb().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}function bb(e,t){let n=Zy(!1),r=ob(n,`/get-session`,e,{method:`GET`});return rb(r,()=>{let i=yb({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:r,$sessionSignal:n}}function xb(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Sb(e,t,n=`.`,r){if(!xb(t))return Sb(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:xb(a)&&xb(i[t])?i[t]=Sb(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Cb(e){return(...t)=>t.reduce((t,n)=>Sb(t,n,``,e),{})}var wb=Cb(),Tb=Object.defineProperty,Eb=Object.defineProperties,Db=Object.getOwnPropertyDescriptors,Ob=Object.getOwnPropertySymbols,kb=Object.prototype.hasOwnProperty,Ab=Object.prototype.propertyIsEnumerable,jb=(e,t,n)=>t in e?Tb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mb=(e,t)=>{for(var n in t||={})kb.call(t,n)&&jb(e,n,t[n]);if(Ob)for(var n of Ob(t))Ab.call(t,n)&&jb(e,n,t[n]);return e},Nb=(e,t)=>Eb(e,Db(t)),Pb=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},Fb=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},Ib=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Lb=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Rb(e){if(typeof e==`number`)return new Ib({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new Ib(e);case`exponential`:return new Lb(e);default:throw Error(`Invalid retry strategy`)}}var zb=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},Bb=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Vb(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return Bb.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function Hb(e){try{return JSON.parse(e),!0}catch{return!1}}function Ub(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function Wb(e){try{return JSON.parse(e)}catch{return e}}function Gb(e){return typeof e==`function`}function Kb(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&Gb(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&Gb(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function qb(e){let t=new Headers(e?.headers),n=await zb(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=Jb(e?.body);n&&t.set(`content-type`,n)}return t}function Jb(e){return Ub(e)?`application/json`:null}function Yb(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(Ub(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&Ub(e.body)?new URLSearchParams(e.body).toString():e.body}function Xb(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return ex.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function Zb(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var Qb=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function $b(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new Qb(n.issues);return n.value}var ex=[`get`,`post`,`put`,`patch`,`delete`],tx=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=Nb(Mb({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=Nb(Mb({},e),{body:i.input?await $b(i.input,n?.body):n?.body,params:i.params?await $b(i.params,n?.params):n?.params,query:i.query?await $b(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),nx=e=>{async function t(t,n){let r=Nb(Mb(Mb({},e),n),{plugins:[...e?.plugins||[],tx(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await ix(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await ix(t,r)}return t};function rx(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];ex.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var ix=async(e,t)=>{let{hooks:n,url:r,options:i}=await Fb(e,t),a=Kb(i),o=new AbortController,s=i.signal??o.signal,c=rx(r,i),l=Yb(i),u=await qb(i),d=Xb(r,i),f=Nb(Mb({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=Zb(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(Nb(Mb({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=Vb(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??Wb)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await $b(f.output,r.data));for(let e of n.onSuccess)e&&await e(Nb(Mb({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??Wb,_=await m.text(),v=Hb(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:Nb(Mb({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(Nb(Mb({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=Rb(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await ix(e,Nb(Mb({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new Pb(m.status,m.statusText,v?y:_);return{data:null,error:Nb(Mb({},y),{status:m.status,statusText:m.statusText})}},ax=(e,t)=>{let n=`credentials`in Request.prototype,r=Iy(e?.baseURL,e?.basePath,void 0,t)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=nx({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?Ky(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Ry],...i]}),{$sessionSignal:f,session:p}=bb(d,e),m=e?.plugins||[],h={},g={$sessionSignal:f,session:p},_={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},v=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/change-email`}}];for(let e of m)e.getAtoms&&Object.assign(g,e.getAtoms?.(d)),e.pathMethods&&Object.assign(_,e.pathMethods),e.atomListeners&&v.push(...e.atomListeners);let y={notify:e=>{g[e].set(!g[e].get())},listen:(e,t)=>{g[e].subscribe(t)},atoms:g};for(let t of m)t.getActions&&(h=wb(t.getActions?.(d,y,e)??{},h));return{get baseURL(){return r},pluginsActions:h,pluginsAtoms:g,pluginPathMethods:_,atomListeners:v,$fetch:d,$store:y}};function ox(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function sx(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function cx(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||ox(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=sx(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10)}}})}})}return a()}function lx(e,t={}){let n=(0,z.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,z.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?ib(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,z.useSyncExternalStore)(a,o,o)}function ux(e){return`use${Ay(e)}`}function dx(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,$store:a,atomListeners:o}=ax(e),s={};for(let[e,t]of Object.entries(r))s[ux(e)]=()=>lx(t);return cx({...n,...s,$fetch:i,$store:a},i,t,r,o)}var fx=1,px=.9,mx=.8,hx=.17,gx=.1,_x=.999,vx=.9999,yx=.99,bx=/[\\\/_+.#"@\[\(\{&]/,xx=/[\\\/_+.#"@\[\(\{&]/g,Sx=/[\s-]/,Cx=/[\s-]/g;function wx(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?fx:yx;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=wx(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=fx:bx.test(e.charAt(l-1))?(d*=mx,p=e.slice(i,l-1).match(xx),p&&i>0&&(d*=_x**+p.length)):Sx.test(e.charAt(l-1))?(d*=px,m=e.slice(i,l-1).match(Cx),m&&i>0&&(d*=_x**+m.length)):(d*=hx,i>0&&(d*=_x**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=vx)),(d<gx&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=wx(e,t,n,r,l+1,a+2,o),f*gx>d&&(d=f*gx)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Tx(e){return e.toLowerCase().replace(Cx,` `)}function Ex(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,wx(e,t,Tx(e),Tx(t),0,0,{})}var Dx=`[cmdk-group=""]`,Ox=`[cmdk-group-items=""]`,kx=`[cmdk-group-heading=""]`,Ax=`[cmdk-item=""]`,jx=`${Ax}:not([aria-disabled="true"])`,Mx=`cmdk-item-select`,Nx=`data-value`,Px=(e,t,n)=>Ex(e,t,n),Fx=z.createContext(void 0),Ix=()=>z.useContext(Fx),Lx=z.createContext(void 0),Rx=()=>z.useContext(Lx),zx=z.createContext(void 0),Bx=z.forwardRef((e,t)=>{let n=eS(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=eS(()=>new Set),i=eS(()=>new Map),a=eS(()=>new Map),o=eS(()=>new Set),s=Qx(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=dd(),y=dd(),b=dd(),x=z.useRef(null),S=rS();$x(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),$x(()=>{S(6,k)},[]);let C=z.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=z.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??Px;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Ox);t?t.appendChild(e.parentElement===t?e:e.closest(`${Ox} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Ox} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${Dx}[${Nx}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Nx);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Dx)?.querySelector(kx))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${Ax}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(jx)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(Nx))}function N(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(Nx))}function P(e){let t=A()?.closest(Dx),n;for(;t&&!n;)t=e>0?Xx(t,Dx):Zx(t,Dx),n=t?.querySelector(jx);n?C.setState(`value`,n.getAttribute(Nx)):N(e)}let ee=()=>M(j().length-1),F=e=>{e.preventDefault(),e.metaKey?ee():e.altKey?P(1):N(1)},I=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?P(-1):N(-1)};return z.createElement(g_.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&F(e);break;case`ArrowDown`:F(e);break;case`p`:case`k`:g&&e.ctrlKey&&I(e);break;case`ArrowUp`:I(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),ee();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(Mx);t.dispatchEvent(e)}}}}},z.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:oS},c),aS(e,e=>z.createElement(Lx.Provider,{value:C},z.createElement(Fx.Provider,{value:w},e))))}),Vx=z.forwardRef((e,t)=>{let n=dd(),r=z.useRef(null),i=z.useContext(zx),a=Ix(),o=Qx(e),s=o.current?.forceMount??i?.forceMount;$x(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=nS(n,r,[e.value,e.children,r],e.keywords),l=Rx(),u=tS(e=>e.value&&e.value===c.current),d=tS(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);z.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Mx,f),()=>t.removeEventListener(Mx,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return z.createElement(g_.div,{ref:Hu(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Hx=z.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=dd(),s=z.useRef(null),c=z.useRef(null),l=dd(),u=Ix(),d=tS(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);$x(()=>u.group(o),[]),nS(o,s,[e.value,e.heading,c]);let f=z.useMemo(()=>({id:o,forceMount:i}),[i]);return z.createElement(g_.div,{ref:Hu(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&z.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),aS(e,e=>z.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},z.createElement(zx.Provider,{value:f},e))))}),Ux=z.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=z.useRef(null),a=tS(e=>!e.search);return!n&&!a?null:z.createElement(g_.div,{ref:Hu(i,t),...r,"cmdk-separator":``,role:`separator`})}),Wx=z.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=Rx(),o=tS(e=>e.search),s=tS(e=>e.selectedItemId),c=Ix();return z.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),z.createElement(g_.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Gx=z.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=z.useRef(null),o=z.useRef(null),s=tS(e=>e.selectedItemId),c=Ix();return z.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),z.createElement(g_.div,{ref:Hu(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},aS(e,e=>z.createElement(`div`,{ref:Hu(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Kx=z.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return z.createElement(yg,{open:n,onOpenChange:r},z.createElement(xg,{container:o},z.createElement(Sg,{"cmdk-overlay":``,className:i}),z.createElement(Cg,{"aria-label":e.label,"cmdk-dialog":``,className:a},z.createElement(Bx,{ref:t,...s}))))}),qx=z.forwardRef((e,t)=>tS(e=>e.filtered.count===0)?z.createElement(g_.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Jx=z.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return z.createElement(g_.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},aS(e,e=>z.createElement(`div`,{"aria-hidden":!0},e)))}),Yx=Object.assign(Bx,{List:Gx,Item:Vx,Input:Wx,Group:Hx,Separator:Ux,Dialog:Kx,Empty:qx,Loading:Jx});function Xx(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Zx(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Qx(e){let t=z.useRef(e);return $x(()=>{t.current=e}),t}var $x=typeof window>`u`?z.useEffect:z.useLayoutEffect;function eS(e){let t=z.useRef();return t.current===void 0&&(t.current=e()),t}function tS(e){let t=Rx(),n=()=>e(t.snapshot());return z.useSyncExternalStore(t.subscribe,n,n)}function nS(e,t,n,r=[]){let i=z.useRef(),a=Ix();return $x(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Nx,s),i.current=s}),i}var rS=()=>{let[e,t]=z.useState(),n=eS(()=>new Map);return $x(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function iS(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function aS({asChild:e,children:t},n){return e&&z.isValidElement(t)?z.cloneElement(iS(t),{ref:t.ref},n(t.props.children)):n(t)}var oS={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},sS=[`top`,`right`,`bottom`,`left`],cS=Math.min,lS=Math.max,uS=Math.round,dS=Math.floor,fS=e=>({x:e,y:e}),pS={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function mS(e,t,n){return lS(e,cS(t,n))}function hS(e,t){return typeof e==`function`?e(t):e}function gS(e){return e.split(`-`)[0]}function _S(e){return e.split(`-`)[1]}function vS(e){return e===`x`?`y`:`x`}function yS(e){return e===`y`?`height`:`width`}function bS(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xS(e){return vS(bS(e))}function SS(e,t,n){n===void 0&&(n=!1);let r=_S(e),i=xS(e),a=yS(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=jS(o)),[o,jS(o)]}function CS(e){let t=jS(e);return[wS(e),t,wS(t)]}function wS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var TS=[`left`,`right`],ES=[`right`,`left`],DS=[`top`,`bottom`],OS=[`bottom`,`top`];function kS(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ES:TS:t?TS:ES;case`left`:case`right`:return t?DS:OS;default:return[]}}function AS(e,t,n,r){let i=_S(e),a=kS(gS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(wS)))),a}function jS(e){let t=gS(e);return pS[t]+e.slice(t.length)}function MS(e){return{top:0,right:0,bottom:0,left:0,...e}}function NS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:MS(e)}function PS(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 FS(e,t,n){let{reference:r,floating:i}=e,a=bS(t),o=xS(t),s=yS(o),c=gS(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}}switch(_S(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function IS(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}=hS(t,e),p=NS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=PS(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=PS(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 LS=50,RS=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:IS},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=FS(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<LS&&(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}=FS(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},zS=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}=hS(e,t)||{};if(l==null)return{};let d=NS(u),f={x:n,y:r},p=xS(i),m=yS(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=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=cS(d[_],T),D=cS(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=mS(O,A,k),M=!c.arrow&&_S(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),BS=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}=hS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=gS(r),_=bS(o),v=gS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[jS(o)]:CS(o)),x=p!==`none`;!d&&x&&b.push(...AS(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=SS(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`&&_!==bS(t))||T.every(e=>bS(e.placement)===_?e.overflows[0]>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=bS(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;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function VS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function HS(e){return sS.some(t=>e[t]>=0)}var US=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=hS(e,t);switch(i){case`referenceHidden`:{let e=VS(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:HS(e)}}}case`escaped`:{let e=VS(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:HS(e)}}}default:return{}}}}},WS=new Set([`left`,`top`]);async function GS(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gS(n),s=_S(n),c=bS(n)===`y`,l=WS.has(o)?-1:1,u=a&&c?-1:1,d=hS(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 KS=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 GS(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}}}}},qS=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}=hS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=bS(gS(i)),p=vS(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=mS(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=mS(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},JS=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}=hS(e,t),u={x:n,y:r},d=bS(i),f=vS(d),p=u[f],m=u[d],h=hS(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};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=WS.has(gS(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}}}},YS=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=hS(e,t),u=await o.detectOverflow(t,l),d=gS(i),f=_S(i),p=bS(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=cS(h-u[g],v),x=cS(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=lS(u.left,0),t=lS(u.right,0),n=lS(u.top,0),r=lS(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:lS(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:lS(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function XS(){return typeof window<`u`}function ZS(e){return eC(e)?(e.nodeName||``).toLowerCase():`#document`}function QS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $S(e){return((eC(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function eC(e){return XS()?e instanceof Node||e instanceof QS(e).Node:!1}function tC(e){return XS()?e instanceof Element||e instanceof QS(e).Element:!1}function nC(e){return XS()?e instanceof HTMLElement||e instanceof QS(e).HTMLElement:!1}function rC(e){return!XS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof QS(e).ShadowRoot}function iC(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=hC(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function aC(e){return/^(table|td|th)$/.test(ZS(e))}function oC(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var sC=/transform|translate|scale|rotate|perspective|filter/,cC=/paint|layout|strict|content/,lC=e=>!!e&&e!==`none`,uC;function dC(e){let t=tC(e)?hC(e):e;return lC(t.transform)||lC(t.translate)||lC(t.scale)||lC(t.rotate)||lC(t.perspective)||!pC()&&(lC(t.backdropFilter)||lC(t.filter))||sC.test(t.willChange||``)||cC.test(t.contain||``)}function fC(e){let t=_C(e);for(;nC(t)&&!mC(t);){if(dC(t))return t;if(oC(t))return null;t=_C(t)}return null}function pC(){return uC??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),uC}function mC(e){return/^(html|body|#document)$/.test(ZS(e))}function hC(e){return QS(e).getComputedStyle(e)}function gC(e){return tC(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _C(e){if(ZS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||rC(e)&&e.host||$S(e);return rC(t)?t.host:t}function vC(e){let t=_C(e);return mC(t)?e.ownerDocument?e.ownerDocument.body:e.body:nC(t)&&iC(t)?t:vC(t)}function yC(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=vC(e),i=r===e.ownerDocument?.body,a=QS(r);if(i){let e=bC(a);return t.concat(a,a.visualViewport||[],iC(r)?r:[],e&&n?yC(e):[])}else return t.concat(r,yC(r,[],n))}function bC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xC(e){let t=hC(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=nC(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=uS(n)!==a||uS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function SC(e){return tC(e)?e:e.contextElement}function CC(e){let t=SC(e);if(!nC(t))return fS(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=xC(t),o=(a?uS(n.width):n.width)/r,s=(a?uS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var wC=fS(0);function TC(e){let t=QS(e);return!pC()||!t.visualViewport?wC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==QS(e)?!1:t}function DC(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=SC(e),o=fS(1);t&&(r?tC(r)&&(o=CC(r)):o=CC(e));let s=EC(a,n,r)?TC(a):fS(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){let e=QS(a),t=r&&tC(r)?QS(r):r,n=e,i=bC(n);for(;i&&r&&t!==n;){let e=CC(i),t=i.getBoundingClientRect(),r=hC(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=QS(i),i=bC(n)}}return PS({width:u,height:d,x:c,y:l})}function OC(e,t){let n=gC(e).scrollLeft;return t?t.left+n:DC($S(e)).left+n}function kC(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-OC(e,n),y:n.top+t.scrollTop}}function AC(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=$S(r),s=t?oC(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fS(1),u=fS(0),d=nC(r);if((d||!d&&!a)&&((ZS(r)!==`body`||iC(o))&&(c=gC(r)),d)){let e=DC(r);l=CC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?kC(o,c):fS(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 jC(e){return Array.from(e.getClientRects())}function MC(e){let t=$S(e),n=gC(e),r=e.ownerDocument.body,i=lS(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=lS(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+OC(e),s=-n.scrollTop;return hC(r).direction===`rtl`&&(o+=lS(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var NC=25;function PC(e,t){let n=QS(e),r=$S(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=pC();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=OC(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=NC&&(a-=o)}else l<=NC&&(a+=l);return{width:a,height:o,x:s,y:c}}function FC(e,t){let n=DC(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=nC(e)?CC(e):fS(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function IC(e,t,n){let r;if(t===`viewport`)r=PC(e,n);else if(t===`document`)r=MC($S(e));else if(tC(t))r=FC(t,n);else{let n=TC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return PS(r)}function LC(e,t){let n=_C(e);return n===t||!tC(n)||mC(n)?!1:hC(n).position===`fixed`||LC(n,t)}function RC(e,t){let n=t.get(e);if(n)return n;let r=yC(e,[],!1).filter(e=>tC(e)&&ZS(e)!==`body`),i=null,a=hC(e).position===`fixed`,o=a?_C(e):e;for(;tC(o)&&!mC(o);){let t=hC(o),n=dC(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||iC(o)&&!n&&LC(e,o))?r=r.filter(e=>e!==o):i=t,o=_C(o)}return t.set(e,r),r}function zC(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?oC(t)?[]:RC(t,this._c):[].concat(n),r],o=IC(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=IC(t,a[e],i);s=lS(n.top,s),c=cS(n.right,c),l=cS(n.bottom,l),u=lS(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function BC(e){let{width:t,height:n}=xC(e);return{width:t,height:n}}function VC(e,t,n){let r=nC(t),i=$S(t),a=n===`fixed`,o=DC(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=fS(0);function l(){c.x=OC(i)}if(r||!r&&!a)if((ZS(t)!==`body`||iC(i))&&(s=gC(t)),r){let e=DC(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?kC(i,s):fS(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function HC(e){return hC(e).position===`static`}function UC(e,t){if(!nC(e)||hC(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return $S(e)===n&&(n=n.ownerDocument.body),n}function WC(e,t){let n=QS(e);if(oC(e))return n;if(!nC(e)){let t=_C(e);for(;t&&!mC(t);){if(tC(t)&&!HC(t))return t;t=_C(t)}return n}let r=UC(e,t);for(;r&&aC(r)&&HC(r);)r=UC(r,t);return r&&mC(r)&&HC(r)&&!dC(r)?n:r||fC(e)||n}var GC=async function(e){let t=this.getOffsetParent||WC,n=this.getDimensions,r=await n(e.floating);return{reference:VC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function KC(e){return hC(e).direction===`rtl`}var qC={convertOffsetParentRelativeRectToViewportRelativeRect:AC,getDocumentElement:$S,getClippingRect:zC,getOffsetParent:WC,getElementRects:GC,getClientRects:jC,getDimensions:BC,getScale:CC,isElement:tC,isRTL:KC};function JC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YC(e,t){let n=null,r,i=$S(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=dS(d),h=dS(i.clientWidth-(u+f)),g=dS(i.clientHeight-(d+p)),_=dS(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:lS(0,cS(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!JC(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function XC(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=SC(e),u=i||a?[...l?yC(l):[],...t?yC(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?YC(l,n):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?DC(e):null;c&&g();function g(){let t=DC(e);h&&!JC(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 ZC=KS,QC=qS,$C=BS,ew=YS,tw=US,nw=zS,rw=JS,iw=(e,t,n)=>{let r=new Map,i={platform:qC,...n},a={...i.platform,_c:r};return RS(e,t,{...i,platform:a})},aw=typeof document<`u`?z.useLayoutEffect:function(){};function ow(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(!ow(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)&&!ow(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function sw(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cw(e,t){let n=sw(e);return Math.round(t*n)/n}function lw(e){let t=z.useRef(e);return aw(()=>{t.current=e}),t}function uw(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]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=z.useState(r);ow(f,r)||p(r);let[m,h]=z.useState(null),[g,_]=z.useState(null),v=z.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=z.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=z.useRef(null),C=z.useRef(null),w=z.useRef(u),T=c!=null,E=lw(c),D=lw(i),O=lw(l),k=z.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),iw(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!ow(w.current,t)&&(w.current=t,nd.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);aw(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=z.useRef(!1);aw(()=>(A.current=!0,()=>{A.current=!1}),[]),aw(()=>{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=z.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=z.useMemo(()=>({reference:b,floating:x}),[b,x]),N=z.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=cw(M.floating,u.x),r=cw(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...sw(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return z.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var dw=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:nw({element:r.current,padding:i}).fn(n):r?nw({element:r,padding:i}).fn(n):{}}}},fw=(e,t)=>{let n=ZC(e);return{name:n.name,fn:n.fn,options:[e,t]}},pw=(e,t)=>{let n=QC(e);return{name:n.name,fn:n.fn,options:[e,t]}},mw=(e,t)=>({fn:rw(e).fn,options:[e,t]}),hw=(e,t)=>{let n=$C(e);return{name:n.name,fn:n.fn,options:[e,t]}},gw=(e,t)=>{let n=ew(e);return{name:n.name,fn:n.fn,options:[e,t]}},_w=(e,t)=>{let n=tw(e);return{name:n.name,fn:n.fn,options:[e,t]}},vw=(e,t)=>{let n=dw(e);return{name:n.name,fn:n.fn,options:[e,t]}},yw=`Arrow`,bw=z.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,B.jsx)(J.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,B.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});bw.displayName=yw;var xw=bw,Sw=`Popper`,[Cw,ww]=zu(Sw),[Tw,Ew]=Cw(Sw),Dw=e=>{let{__scopePopper:t,children:n}=e,[r,i]=z.useState(null);return(0,B.jsx)(Tw,{scope:t,anchor:r,onAnchorChange:i,children:n})};Dw.displayName=Sw;var Ow=`PopperAnchor`,kw=z.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Ew(Ow,n),o=z.useRef(null),s=K(t,o),c=z.useRef(null);return z.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,B.jsx)(J.div,{...i,ref:s})});kw.displayName=Ow;var Aw=`PopperContent`,[jw,Mw]=Cw(Aw),Nw=z.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Ew(Aw,n),[_,v]=z.useState(null),y=K(t,e=>v(e)),[b,x]=z.useState(null),S=Xv(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Lw),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:N,middlewareData:P}=uw({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>XC(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[fw({mainAxis:i+w,alignmentAxis:o}),c&&pw({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?mw():void 0,...k}),c&&hw({...k}),gw({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&vw({element:b,padding:s}),Rw({arrowWidth:C,arrowHeight:w}),f&&_w({strategy:`referenceHidden`,...k})]}),[ee,F]=zw(M),I=Lp(m);Zu(()=>{N&&I?.()},[N,I]);let te=P.arrow?.x,ne=P.arrow?.y,re=P.arrow?.centerOffset!==0,[L,ie]=z.useState();return Zu(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),(0,B.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:N?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:L,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,B.jsx)(jw,{scope:n,placedSide:ee,onArrowChange:x,arrowX:te,arrowY:ne,shouldHideArrow:re,children:(0,B.jsx)(J.div,{"data-side":ee,"data-align":F,...h,ref:y,style:{...h.style,animation:N?void 0:`none`}})})})});Nw.displayName=Aw;var Pw=`PopperArrow`,Fw={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Iw=z.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Mw(Pw,n),a=Fw[i.placedSide];return(0,B.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,B.jsx)(xw,{...r,ref:t,style:{...r.style,display:`block`}})})});Iw.displayName=Pw;function Lw(e){return e!==null}var Rw=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=zw(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function zw(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Bw=Dw,Vw=kw,Hw=Nw,Uw=Iw,Ww=`Popover`,[Gw,Kw]=zu(Ww,[ww]),qw=ww(),[Jw,Yw]=Gw(Ww),Xw=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=qw(t),c=z.useRef(null),[l,u]=z.useState(!1),[d,f]=$u({prop:r,defaultProp:i??!1,onChange:a,caller:Ww});return(0,B.jsx)(Bw,{...s,children:(0,B.jsx)(Jw,{scope:t,contentId:dd(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:z.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:z.useCallback(()=>u(!0),[]),onCustomAnchorRemove:z.useCallback(()=>u(!1),[]),modal:o,children:n})})};Xw.displayName=Ww;var Zw=`PopoverAnchor`,Qw=z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Yw(Zw,n),a=qw(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return z.useEffect(()=>(o(),()=>s()),[o,s]),(0,B.jsx)(Vw,{...a,...r,ref:t})});Qw.displayName=Zw;var $w=`PopoverTrigger`,eT=z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Yw($w,n),a=qw(n),o=K(t,i.triggerRef),s=(0,B.jsx)(J.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":hT(i.open),...r,ref:o,onClick:q(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,B.jsx)(Vw,{asChild:!0,...a,children:s})});eT.displayName=$w;var tT=`PopoverPortal`,[nT,rT]=Gw(tT,{forceMount:void 0}),iT=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Yw(tT,t);return(0,B.jsx)(nT,{scope:t,forceMount:n,children:(0,B.jsx)(ad,{present:n||a.open,children:(0,B.jsx)(_m,{asChild:!0,container:i,children:r})})})};iT.displayName=tT;var aT=`PopoverContent`,oT=z.forwardRef((e,t)=>{let n=rT(aT,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Yw(aT,e.__scopePopover);return(0,B.jsx)(ad,{present:r||a.open,children:a.modal?(0,B.jsx)(cT,{...i,ref:t}):(0,B.jsx)(lT,{...i,ref:t})})});oT.displayName=aT;var sT=Uu(`PopoverContent.RemoveScroll`),cT=z.forwardRef((e,t)=>{let n=Yw(aT,e.__scopePopover),r=z.useRef(null),i=K(t,r),a=z.useRef(!1);return z.useEffect(()=>{let e=r.current;if(e)return Rh(e)},[]),(0,B.jsx)(kh,{as:sT,allowPinchZoom:!0,children:(0,B.jsx)(uT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),lT=z.forwardRef((e,t)=>{let n=Yw(aT,e.__scopePopover),r=z.useRef(!1),i=z.useRef(!1);return(0,B.jsx)(uT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),uT=z.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Yw(aT,n),p=qw(n);return ym(),(0,B.jsx)(im,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(Gp,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,B.jsx)(Hw,{"data-state":hT(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),dT=`PopoverClose`,fT=z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Yw(dT,n);return(0,B.jsx)(J.button,{type:`button`,...r,ref:t,onClick:q(e.onClick,()=>i.onOpenChange(!1))})});fT.displayName=dT;var pT=`PopoverArrow`,mT=z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=qw(n);return(0,B.jsx)(Uw,{...i,...r,ref:t})});mT.displayName=pT;function hT(e){return e?`open`:`closed`}var gT=Xw,_T=eT,vT=iT,yT=oT,bT=0;function xT(e,t){let n=`atom${++bT}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=ST,r.write=CT),t&&(r.write=t),r}function ST(e){return e(this)}function CT(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var wT=`rovingFocusGroup.onEntryFocus`,TT={bubbles:!1,cancelable:!0},ET=`RovingFocusGroup`,[DT,OT,kT]=Xu(ET),[AT,jT]=zu(ET,[kT]),[MT,NT]=AT(ET),PT=z.forwardRef((e,t)=>(0,B.jsx)(DT.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,B.jsx)(DT.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,B.jsx)(FT,{...e,ref:t})})}));PT.displayName=ET;var FT=z.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=z.useRef(null),p=K(t,f),m=Od(a),[h,g]=$u({prop:o,defaultProp:s??null,onChange:c,caller:ET}),[_,v]=z.useState(!1),y=Lp(l),b=OT(n),x=z.useRef(!1),[S,C]=z.useState(0);return z.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(wT,y),()=>e.removeEventListener(wT,y)},[y]),(0,B.jsx)(MT,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:z.useCallback(e=>g(e),[g]),onItemShiftTab:z.useCallback(()=>v(!0),[]),onFocusableItemAdd:z.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:z.useCallback(()=>C(e=>e-1),[]),children:(0,B.jsx)(J.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:q(e.onMouseDown,()=>{x.current=!0}),onFocus:q(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(wT,TT);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);VT([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:q(e.onBlur,()=>v(!1))})})}),IT=`RovingFocusGroupItem`,LT=z.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=dd(),l=a||c,u=NT(IT,n),d=u.currentTabStopId===l,f=OT(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return z.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,B.jsx)(DT.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,B.jsx)(J.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:q(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:q(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:q(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=BT(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?HT(n,r+1):n.slice(r+1)}setTimeout(()=>VT(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});LT.displayName=IT;var RT={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function zT(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function BT(e,t,n){let r=zT(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return RT[r]}function VT(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function HT(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var UT=PT,WT=LT,GT=[`Enter`,` `],KT=[`ArrowDown`,`PageUp`,`Home`],qT=[`ArrowUp`,`PageDown`,`End`],JT=[...KT,...qT],YT={ltr:[...GT,`ArrowRight`],rtl:[...GT,`ArrowLeft`]},XT={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},ZT=`Menu`,[QT,$T,eE]=Xu(ZT),[tE,nE]=zu(ZT,[eE,ww,jT]),rE=ww(),iE=jT(),[aE,oE]=tE(ZT),[sE,cE]=tE(ZT),lE=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=rE(t),[c,l]=z.useState(null),u=z.useRef(!1),d=Lp(a),f=Od(i);return z.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,B.jsx)(Bw,{...s,children:(0,B.jsx)(aE,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,B.jsx)(sE,{scope:t,onClose:z.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};lE.displayName=ZT;var uE=`MenuAnchor`,dE=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=rE(n);return(0,B.jsx)(Vw,{...i,...r,ref:t})});dE.displayName=uE;var fE=`MenuPortal`,[pE,mE]=tE(fE,{forceMount:void 0}),hE=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=oE(fE,t);return(0,B.jsx)(pE,{scope:t,forceMount:n,children:(0,B.jsx)(ad,{present:n||a.open,children:(0,B.jsx)(_m,{asChild:!0,container:i,children:r})})})};hE.displayName=fE;var gE=`MenuContent`,[_E,vE]=tE(gE),yE=z.forwardRef((e,t)=>{let n=mE(gE,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=oE(gE,e.__scopeMenu),o=cE(gE,e.__scopeMenu);return(0,B.jsx)(QT.Provider,{scope:e.__scopeMenu,children:(0,B.jsx)(ad,{present:r||a.open,children:(0,B.jsx)(QT.Slot,{scope:e.__scopeMenu,children:o.modal?(0,B.jsx)(bE,{...i,ref:t}):(0,B.jsx)(xE,{...i,ref:t})})})})}),bE=z.forwardRef((e,t)=>{let n=oE(gE,e.__scopeMenu),r=z.useRef(null),i=K(t,r);return z.useEffect(()=>{let e=r.current;if(e)return Rh(e)},[]),(0,B.jsx)(CE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:q(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),xE=z.forwardRef((e,t)=>{let n=oE(gE,e.__scopeMenu);return(0,B.jsx)(CE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),SE=Uu(`MenuContent.ScrollLock`),CE=z.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=oE(gE,n),_=cE(gE,n),v=rE(n),y=iE(n),b=$T(n),[x,S]=z.useState(null),C=z.useRef(null),w=K(t,C,g.onContentChange),T=z.useRef(0),E=z.useRef(``),D=z.useRef(0),O=z.useRef(null),k=z.useRef(`right`),A=z.useRef(0),j=m?kh:z.Fragment,M=m?{as:SE,allowPinchZoom:!0}:void 0,N=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=sD(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};z.useEffect(()=>()=>window.clearTimeout(T.current),[]),ym();let P=z.useCallback(e=>k.current===O.current?.side&&lD(e,O.current?.area),[]);return(0,B.jsx)(_E,{scope:n,searchRef:E,onItemEnter:z.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:z.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:z.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:z.useCallback(e=>{O.current=e},[]),children:(0,B.jsx)(j,{...M,children:(0,B.jsx)(im,{asChild:!0,trapped:i,onMountAutoFocus:q(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,B.jsx)(Gp,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,B.jsx)(UT,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:q(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,B.jsx)(Hw,{role:`menu`,"aria-orientation":`vertical`,"data-state":nD(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:q(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&N(e.key));let i=C.current;if(e.target!==i||!JT.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);qT.includes(e.key)&&a.reverse(),aD(a)}),onBlur:q(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:q(e.onPointerMove,uD(e=>{let t=e.target,n=A.current!==e.clientX;e.currentTarget.contains(t)&&n&&(k.current=e.clientX>A.current?`right`:`left`,A.current=e.clientX)}))})})})})})})});yE.displayName=gE;var wE=`MenuGroup`,TE=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,B.jsx)(J.div,{role:`group`,...r,ref:t})});TE.displayName=wE;var EE=`MenuLabel`,DE=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,B.jsx)(J.div,{...r,ref:t})});DE.displayName=EE;var OE=`MenuItem`,kE=`menu.itemSelect`,AE=z.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=z.useRef(null),o=cE(OE,e.__scopeMenu),s=vE(OE,e.__scopeMenu),c=K(t,a),l=z.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(kE,{bubbles:!0,cancelable:!0});e.addEventListener(kE,e=>r?.(e),{once:!0}),rd(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,B.jsx)(jE,{...i,ref:c,disabled:n,onClick:q(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:q(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:q(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||GT.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});AE.displayName=OE;var jE=z.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=vE(OE,n),s=iE(n),c=z.useRef(null),l=K(t,c),[u,d]=z.useState(!1),[f,p]=z.useState(``);return z.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,B.jsx)(QT.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,B.jsx)(WT,{asChild:!0,...s,focusable:!r,children:(0,B.jsx)(J.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:q(e.onPointerMove,uD(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:q(e.onPointerLeave,uD(e=>o.onItemLeave(e))),onFocus:q(e.onFocus,()=>d(!0)),onBlur:q(e.onBlur,()=>d(!1))})})})}),ME=`MenuCheckboxItem`,NE=z.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,B.jsx)(VE,{scope:e.__scopeMenu,checked:n,children:(0,B.jsx)(AE,{role:`menuitemcheckbox`,"aria-checked":rD(n)?`mixed`:n,...i,ref:t,"data-state":iD(n),onSelect:q(i.onSelect,()=>r?.(rD(n)?!0:!n),{checkForDefaultPrevented:!1})})})});NE.displayName=ME;var PE=`MenuRadioGroup`,[FE,IE]=tE(PE,{value:void 0,onValueChange:()=>{}}),LE=z.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Lp(r);return(0,B.jsx)(FE,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,B.jsx)(TE,{...i,ref:t})})});LE.displayName=PE;var RE=`MenuRadioItem`,zE=z.forwardRef((e,t)=>{let{value:n,...r}=e,i=IE(RE,e.__scopeMenu),a=n===i.value;return(0,B.jsx)(VE,{scope:e.__scopeMenu,checked:a,children:(0,B.jsx)(AE,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":iD(a),onSelect:q(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});zE.displayName=RE;var BE=`MenuItemIndicator`,[VE,HE]=tE(BE,{checked:!1}),UE=z.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=HE(BE,n);return(0,B.jsx)(ad,{present:r||rD(a.checked)||a.checked===!0,children:(0,B.jsx)(J.span,{...i,ref:t,"data-state":iD(a.checked)})})});UE.displayName=BE;var WE=`MenuSeparator`,GE=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,B.jsx)(J.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});GE.displayName=WE;var KE=`MenuArrow`,qE=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=rE(n);return(0,B.jsx)(Uw,{...i,...r,ref:t})});qE.displayName=KE;var JE=`MenuSub`,[YE,XE]=tE(JE),ZE=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=oE(JE,t),o=rE(t),[s,c]=z.useState(null),[l,u]=z.useState(null),d=Lp(i);return z.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,B.jsx)(Bw,{...o,children:(0,B.jsx)(aE,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,B.jsx)(YE,{scope:t,contentId:dd(),triggerId:dd(),trigger:s,onTriggerChange:c,children:n})})})};ZE.displayName=JE;var QE=`MenuSubTrigger`,$E=z.forwardRef((e,t)=>{let n=oE(QE,e.__scopeMenu),r=cE(QE,e.__scopeMenu),i=XE(QE,e.__scopeMenu),a=vE(QE,e.__scopeMenu),o=z.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=z.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return z.useEffect(()=>u,[u]),z.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,B.jsx)(dE,{asChild:!0,...l,children:(0,B.jsx)(jE,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":nD(n.open),...e,ref:Hu(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:q(e.onPointerMove,uD(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:q(e.onPointerLeave,uD(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:q(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||YT[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});$E.displayName=QE;var eD=`MenuSubContent`,tD=z.forwardRef((e,t)=>{let n=mE(gE,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=oE(gE,e.__scopeMenu),o=cE(gE,e.__scopeMenu),s=XE(eD,e.__scopeMenu),c=z.useRef(null),l=K(t,c);return(0,B.jsx)(QT.Provider,{scope:e.__scopeMenu,children:(0,B.jsx)(ad,{present:r||a.open,children:(0,B.jsx)(QT.Slot,{scope:e.__scopeMenu,children:(0,B.jsx)(CE,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:q(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:q(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:q(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=XT[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});tD.displayName=eD;function nD(e){return e?`open`:`closed`}function rD(e){return e===`indeterminate`}function iD(e){return rD(e)?`indeterminate`:e?`checked`:`unchecked`}function aD(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function oD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function sD(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=oD(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function cD(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function lD(e,t){return t?cD({x:e.clientX,y:e.clientY},t):!1}function uD(e){return t=>t.pointerType===`mouse`?e(t):void 0}var dD=lE,fD=dE,pD=hE,mD=yE,hD=TE,gD=DE,_D=AE,vD=NE,yD=LE,bD=zE,xD=UE,SD=GE,CD=qE,wD=ZE,TD=$E,ED=tD,DD=`ContextMenu`,[OD,kD]=zu(DD,[nE]),AD=nE(),[jD,MD]=OD(DD),ND=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=z.useState(!1),c=AD(t),l=Lp(r),u=z.useCallback(e=>{s(e),l(e)},[l]);return(0,B.jsx)(jD,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,B.jsx)(dD,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};ND.displayName=DD;var PD=`ContextMenuTrigger`,FD=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=MD(PD,n),o=AD(n),s=z.useRef({x:0,y:0}),c=z.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=z.useRef(0),u=z.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return z.useEffect(()=>u,[u]),z.useEffect(()=>void(r&&u()),[r,u]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(fD,{...o,virtualRef:c}),(0,B.jsx)(J.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:q(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:q(e.onPointerDown,uO(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:q(e.onPointerMove,uO(u)),onPointerCancel:r?e.onPointerCancel:q(e.onPointerCancel,uO(u)),onPointerUp:r?e.onPointerUp:q(e.onPointerUp,uO(u))})]})});FD.displayName=PD;var ID=`ContextMenuPortal`,LD=e=>{let{__scopeContextMenu:t,...n}=e,r=AD(t);return(0,B.jsx)(pD,{...r,...n})};LD.displayName=ID;var RD=`ContextMenuContent`,zD=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=MD(RD,n),a=AD(n),o=z.useRef(!1);return(0,B.jsx)(mD,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});zD.displayName=RD;var BD=`ContextMenuGroup`,VD=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(hD,{...i,...r,ref:t})});VD.displayName=BD;var HD=`ContextMenuLabel`,UD=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(gD,{...i,...r,ref:t})});UD.displayName=HD;var WD=`ContextMenuItem`,GD=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(_D,{...i,...r,ref:t})});GD.displayName=WD;var KD=`ContextMenuCheckboxItem`,qD=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(vD,{...i,...r,ref:t})});qD.displayName=KD;var JD=`ContextMenuRadioGroup`,YD=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(yD,{...i,...r,ref:t})});YD.displayName=JD;var XD=`ContextMenuRadioItem`,ZD=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(bD,{...i,...r,ref:t})});ZD.displayName=XD;var QD=`ContextMenuItemIndicator`,$D=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(xD,{...i,...r,ref:t})});$D.displayName=QD;var eO=`ContextMenuSeparator`,tO=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(SD,{...i,...r,ref:t})});tO.displayName=eO;var nO=`ContextMenuArrow`,rO=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(CD,{...i,...r,ref:t})});rO.displayName=nO;var iO=`ContextMenuSub`,aO=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=AD(t),[s,c]=$u({prop:i,defaultProp:a??!1,onChange:r,caller:iO});return(0,B.jsx)(wD,{...o,open:s,onOpenChange:c,children:n})};aO.displayName=iO;var oO=`ContextMenuSubTrigger`,sO=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(TD,{...i,...r,ref:t})});sO.displayName=oO;var cO=`ContextMenuSubContent`,lO=z.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=AD(n);return(0,B.jsx)(ED,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});lO.displayName=cO;function uO(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var dO=LD,fO=zD,pO=UD,mO=GD,hO=qD,gO=ZD,_O=$D,vO=tO,yO=sO,bO=lO;function xO(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var SO=z.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:`bottom`,shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),CO=()=>{let e=z.useContext(SO);if(!e)throw Error(`useDrawerContext must be used within a Drawer.Root`);return e};xO(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
81
|
-
[data-state=closed]
|
|
82
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function wO(){let e=navigator.userAgent;return typeof window<`u`&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function TO(){return AO(/^Mac/)}function EO(){return AO(/^iPhone/)}function DO(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function OO(){return AO(/^iPad/)||TO()&&navigator.maxTouchPoints>1}function kO(){return EO()||OO()}function AO(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.platform):void 0}var jO=24,MO=typeof window<`u`?z.useLayoutEffect:z.useEffect;function NO(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var PO=typeof document<`u`&&window.visualViewport;function FO(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function IO(e){for(FO(e)&&(e=e.parentElement);e&&!FO(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var LO=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),RO=0,zO;function BO(e={}){let{isDisabled:t}=e;MO(()=>{if(!t)return RO++,RO===1&&kO()&&(zO=VO()),()=>{RO--,RO===0&&zO?.()}},[t])}function VO(){let e,t=0,n=n=>{e=IO(n.target),!(e===document.documentElement&&e===document.body)&&(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}let r=n.changedTouches[0].pageY,i=e.scrollTop,a=e.scrollHeight-e.clientHeight;a!==0&&((i<=0&&r>t||i>=a&&r<t)&&n.preventDefault(),t=r)},i=e=>{let t=e.target;GO(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform=`translateY(-2000px)`,t.focus(),requestAnimationFrame(()=>{t.style.transform=``}))},a=e=>{let t=e.target;GO(t)&&(t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>{t.style.transform=``,PO&&(PO.height<window.innerHeight?requestAnimationFrame(()=>{WO(t)}):PO.addEventListener(`resize`,()=>WO(t),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=NO(HO(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let u=NO(UO(document,`touchstart`,n,{passive:!1,capture:!0}),UO(document,`touchmove`,r,{passive:!1,capture:!0}),UO(document,`touchend`,i,{passive:!1,capture:!0}),UO(document,`focus`,a,!0),UO(window,`scroll`,o));return()=>{l(),u(),window.scrollTo(s,c)}}function HO(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function UO(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function WO(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=IO(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+jO&&(t.scrollTop+=r-n)}e=t.parentElement}}function GO(e){return e instanceof HTMLInputElement&&!LO.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function KO(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function qO(...e){return t=>e.forEach(e=>KO(e,t))}function JO(...e){return z.useCallback(qO(...e),e)}var YO=new WeakMap;function XO(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&YO.set(e,r)}function ZO(e,t){if(!e||!(e instanceof HTMLElement))return;let n=YO.get(e);n&&(e.style[t]=n[t])}var QO=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function $O(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(`, `)[QO(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(`, `)[QO(t)?5:4]):null)}function ek(e){return 8*(Math.log(e+1)-2)}function tk(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var nk={DURATION:.5,EASE:[.32,.72,0,1]},rk=.4,ik=.25,ak=100,ok=8,sk=16,ck=26,lk=`vaul-dragging`;function uk(e){let t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>(...e)=>t.current==null?void 0:t.current.call(t,...e),[])}function dk({defaultProp:e,onChange:t}){let n=z.useState(e),[r]=n,i=z.useRef(r),a=uk(t);return z.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function fk({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=dk({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=uk(n);return[o,z.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function pk({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:o,direction:s=`bottom`,container:c,snapToSequentialPoint:l}){let[u,d]=fk({prop:e,defaultProp:n?.[0],onChange:t}),[f,p]=z.useState(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);z.useEffect(()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let m=z.useMemo(()=>u===n?.[n.length-1]||null,[n,u]),h=z.useMemo(()=>n?.findIndex(e=>e===u)??null,[n,u]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===u||!n,_=z.useMemo(()=>{let e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return n?.map(t=>{let n=typeof t==`string`,r=0;if(n&&(r=parseInt(t,10)),QO(s)){let i=n?r:f?t*e.height:0;return f?s===`bottom`?e.height-i:-e.height+i:i}let i=n?r:f?t*e.width:0;return f?s===`right`?e.width-i:-e.width+i:i})??[]},[n,f,c]),v=z.useMemo(()=>h===null?null:_?.[h],[_,h]),y=z.useCallback(e=>{let t=_?.findIndex(t=>t===e)??null;o(t),XO(r.current,{transition:`transform ${nk.DURATION}s cubic-bezier(${nk.EASE.join(`,`)})`,transform:QO(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),_&&t!==_.length-1&&a!==void 0&&t!==a&&t<a?XO(i.current,{transition:`opacity ${nk.DURATION}s cubic-bezier(${nk.EASE.join(`,`)})`,opacity:`0`}):XO(i.current,{transition:`opacity ${nk.DURATION}s cubic-bezier(${nk.EASE.join(`,`)})`,opacity:`1`}),d(n?.[Math.max(t,0)])},[r.current,n,_,a,i,d]);z.useEffect(()=>{if(u||e){let t=n?.findIndex(t=>t===e||t===u)??-1;_&&t!==-1&&typeof _[t]==`number`&&y(_[t])}},[u,e,n,_,y]);function b({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(a===void 0)return;let c=s===`bottom`||s===`right`?(v??0)-e:(v??0)+e,u=h===a-1,d=h===0,f=e>0;if(u&&XO(i.current,{transition:`opacity ${nk.DURATION}s cubic-bezier(${nk.EASE.join(`,`)})`}),!l&&r>2&&!f){o?t():y(_[0]);return}if(!l&&r>2&&f&&_&&n){y(_[n.length-1]);return}let p=_?.reduce((e,t)=>typeof e!=`number`||typeof t!=`number`?e:Math.abs(t-c)<Math.abs(e-c)?t:e),g=QO(s)?window.innerHeight:window.innerWidth;if(r>rk&&Math.abs(e)<g*.4){let e=f?1:-1;if(e>0&&m&&n){y(_[n.length-1]);return}if(d&&e<0&&o&&t(),h===null)return;y(_[h+e]);return}y(p)}function x({draggedDistance:e}){if(v===null)return;let t=s===`bottom`||s===`right`?v-e:v+e;(s===`bottom`||s===`right`)&&t<_[_.length-1]||(s===`top`||s===`left`)&&t>_[_.length-1]||XO(r.current,{transform:QO(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function S(e,t){if(!n||typeof h!=`number`||!_||a===void 0)return null;let r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;let i=r?h+1:h-1,o=r?_[i]-_[i-1]:_[i+1]-_[i],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:m,activeSnapPoint:u,shouldFade:g,getPercentageDragged:S,setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:b,onDrag:x,snapPointsOffset:_}}function mk(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=CO(),a=z.useRef(null),o=(0,z.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-ck)/window.innerWidth}z.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&tk(document.body,{background:`black`}),tk(t,{transformOrigin:QO(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${nk.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nk.EASE.join(`,`)})`});let n=tk(t,{borderRadius:`${ok}px`,overflow:`hidden`,...QO(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},nk.DURATION*1e3)}}},[t,n,o])}var hk=null;function gk({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){let[o,s]=z.useState(()=>typeof window<`u`?window.location.href:``),c=z.useRef(0),l=z.useCallback(()=>{if(DO()&&hk===null&&e&&!a){hk={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:`unset`};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-e}px`,right:`0px`,height:`auto`}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=`${-(c.current+e)}px`)}),300)}},[e]),u=z.useCallback(()=>{if(DO()&&hk!==null&&!a){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,hk),window.requestAnimationFrame(()=>{if(i&&o!==window.location.href){s(window.location.href);return}window.scrollTo(t,e)}),hk=null}},[o]);return z.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener(`scroll`,e),()=>{window.removeEventListener(`scroll`,e)}},[]),z.useEffect(()=>{if(t)return()=>{typeof document>`u`||document.querySelector(`[data-vaul-drawer]`)||u()}},[t,u]),z.useEffect(()=>{n||!r||(e?(!window.matchMedia(`(display-mode: standalone)`).matches&&l(),t||window.setTimeout(()=>{u()},500)):u())},[e,r,o,t,n,l,u]),{restorePositionSetting:u}}function _k({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=ik,scrollLockTimeout:l=ak,dismissible:u=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:_,nested:v,noBodyStyles:y=!1,direction:b=`bottom`,defaultOpen:x=!1,disablePreventScroll:S=!0,snapToSequentialPoint:C=!1,preventScrollRestoration:w=!1,repositionInputs:T=!0,onAnimationEnd:E,container:D,autoFocus:O=!1}){let[k=!1,A]=fk({defaultProp:x,prop:e,onChange:e=>{t?.(e),!e&&!v&&be(),setTimeout(()=>{E?.(e)},nk.DURATION*1e3),e&&!g&&typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),e||(document.body.style.pointerEvents=`auto`)}}),[j,M]=z.useState(!1),[N,P]=z.useState(!1),[ee,F]=z.useState(!1),I=z.useRef(null),te=z.useRef(null),ne=z.useRef(null),re=z.useRef(null),L=z.useRef(null),ie=z.useRef(!1),ae=z.useRef(null),oe=z.useRef(0),se=z.useRef(!1),ce=z.useRef(!x),le=z.useRef(0),R=z.useRef(null),ue=z.useRef(R.current?.getBoundingClientRect().height||0),de=z.useRef(R.current?.getBoundingClientRect().width||0),fe=z.useRef(0),{activeSnapPoint:pe,activeSnapPointIndex:me,setActiveSnapPoint:B,onRelease:he,snapPointsOffset:ge,onDrag:_e,shouldFade:ve,getPercentageDragged:ye}=pk({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:R,fadeFromIndex:f,overlayRef:I,onSnapPointChange:z.useCallback(e=>{a&&e===ge.length-1&&(te.current=new Date)},[]),direction:b,container:D,snapToSequentialPoint:C});BO({isDisabled:!k||N||!g||ee||!j||!T||!S});let{restorePositionSetting:be}=gk({isOpen:k,modal:g,nested:v??!1,hasBeenOpened:j,preventScrollRestoration:w,noBodyStyles:y});function xe(){return(window.innerWidth-ck)/window.innerWidth}function Se(e){!u&&!a||R.current&&!R.current.contains(e.target)||(ue.current=R.current?.getBoundingClientRect().height||0,de.current=R.current?.getBoundingClientRect().width||0,P(!0),ne.current=new Date,kO()&&window.addEventListener(`touchend`,()=>ie.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),oe.current=QO(b)?e.pageY:e.pageX)}function Ce(e,t){let n=e,r=window.getSelection()?.toString(),i=R.current?$O(R.current,b):null,a=new Date;if(n.tagName===`SELECT`||n.hasAttribute(`data-vaul-no-drag`)||n.closest(`[data-vaul-no-drag]`))return!1;if(b===`right`||b===`left`)return!0;if(te.current&&a.getTime()-te.current.getTime()<500)return!1;if(i!==null&&(b===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(L.current&&a.getTime()-L.current.getTime()<l&&i===0||t)return L.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return L.current=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function we(e){if(R.current&&N){let t=b===`bottom`||b===`right`?1:-1,n=(oe.current-(QO(b)?e.pageY:e.pageX))*t,i=n>0,s=a&&!u&&!i;if(s&&me===0)return;let c=Math.abs(n),l=document.querySelector(`[data-vaul-drawer-wrapper]`),d=c/(b===`bottom`||b===`top`?ue.current:de.current),p=ye(c,i);if(p!==null&&(d=p),s&&d>=1||!ie.current&&!Ce(e.target,i))return;if(R.current.classList.add(lk),ie.current=!0,XO(R.current,{transition:`none`}),XO(I.current,{transition:`none`}),a&&_e({draggedDistance:n}),i&&!a){let e=ek(n),r=Math.min(e*-1,0)*t;XO(R.current,{transform:QO(b)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-d;if((ve||f&&me===f-1)&&(r?.(e,d),XO(I.current,{opacity:`${m}`,transition:`none`},!0)),l&&I.current&&o){let e=Math.min(xe()+d*(1-xe()),1),t=8-d*8,n=Math.max(0,14-d*14);XO(l,{borderRadius:`${t}px`,transform:QO(b)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!a){let e=c*t;XO(R.current,{transform:QO(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}}z.useEffect(()=>{window.requestAnimationFrame(()=>{ce.current=!0})},[]),z.useEffect(()=>{var e;function t(){if(!R.current||!T)return;let e=document.activeElement;if(GO(e)||se.current){let e=window.visualViewport?.height||0,t=window.innerHeight,n=t-e,r=R.current.getBoundingClientRect().height||0,i=r>t*.8;fe.current||=r;let o=R.current.getBoundingClientRect().top;if(Math.abs(le.current-n)>60&&(se.current=!se.current),a&&a.length>0&&ge&&me){let e=ge[me]||0;n+=e}if(le.current=n,r>e||se.current){let t=R.current.getBoundingClientRect().height,r=t;t>e&&(r=e-(i?o:ck)),h?R.current.style.height=`${t-Math.max(n,0)}px`:R.current.style.height=`${Math.max(r,e-o)}px`}else wO()||(R.current.style.height=`${fe.current}px`);a&&a.length>0&&!se.current?R.current.style.bottom=`0px`:R.current.style.bottom=`${Math.max(n,0)}px`}}return(e=window.visualViewport)==null||e.addEventListener(`resize`,t),()=>window.visualViewport?.removeEventListener(`resize`,t)},[me,a,ge]);function Te(e){De(),_?.(),e||A(!1),setTimeout(()=>{a&&B(a[0])},nk.DURATION*1e3)}function Ee(){if(!R.current)return;let e=document.querySelector(`[data-vaul-drawer-wrapper]`),t=$O(R.current,b);XO(R.current,{transform:`translate3d(0, 0, 0)`,transition:`transform ${nk.DURATION}s cubic-bezier(${nk.EASE.join(`,`)})`}),XO(I.current,{transition:`opacity ${nk.DURATION}s cubic-bezier(${nk.EASE.join(`,`)})`,opacity:`1`}),o&&t&&t>0&&k&&XO(e,{borderRadius:`${ok}px`,overflow:`hidden`,...QO(b)?{transform:`scale(${xe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${xe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${nk.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nk.EASE.join(`,`)})`},!0)}function De(){!N||!R.current||(R.current.classList.remove(lk),ie.current=!1,P(!1),re.current=new Date)}function Oe(e){if(!N||!R.current)return;R.current.classList.remove(lk),ie.current=!1,P(!1),re.current=new Date;let t=$O(R.current,b);if(!e||!Ce(e.target,!1)||!t||Number.isNaN(t)||ne.current===null)return;let n=re.current.getTime()-ne.current.getTime(),r=oe.current-(QO(b)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(F(!0),setTimeout(()=>{F(!1)},200)),a){he({draggedDistance:r*(b===`bottom`||b===`right`?1:-1),closeDrawer:Te,velocity:o,dismissible:u}),i?.(e,!0);return}if(b===`bottom`||b===`right`?r>0:r<0){Ee(),i?.(e,!0);return}if(o>rk){Te(),i?.(e,!1);return}let s=Math.min(R.current.getBoundingClientRect().height??0,window.innerHeight),l=Math.min(R.current.getBoundingClientRect().width??0,window.innerWidth);if(Math.abs(t)>=(b===`left`||b===`right`?l:s)*c){Te(),i?.(e,!1);return}i?.(e,!0),Ee()}z.useEffect(()=>(k&&(XO(document.documentElement,{scrollBehavior:`auto`}),te.current=new Date),()=>{ZO(document.documentElement,`scrollBehavior`)}),[k]);function ke(e){let t=e?(window.innerWidth-sk)/window.innerWidth:1,n=e?-sk:0;ae.current&&window.clearTimeout(ae.current),XO(R.current,{transition:`transform ${nk.DURATION}s cubic-bezier(${nk.EASE.join(`,`)})`,transform:QO(b)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&R.current&&(ae.current=setTimeout(()=>{let e=$O(R.current,b);XO(R.current,{transition:`none`,transform:QO(b)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function Ae(e,t){if(t<0)return;let n=(window.innerWidth-sk)/window.innerWidth,r=n+t*(1-n),i=-sk+t*sk;XO(R.current,{transform:QO(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function je(e,t){let n=QO(b)?window.innerHeight:window.innerWidth,r=t?(n-sk)/n:1,i=t?-sk:0;t&&XO(R.current,{transition:`transform ${nk.DURATION}s cubic-bezier(${nk.EASE.join(`,`)})`,transform:QO(b)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`})}return z.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`})},[g]),z.createElement(yg,{defaultOpen:x,onOpenChange:e=>{!u&&!e||(e?M(!0):Te(!0),A(e))},open:k},z.createElement(SO.Provider,{value:{activeSnapPoint:pe,snapPoints:a,setActiveSnapPoint:B,drawerRef:R,overlayRef:I,onOpenChange:t,onPress:Se,onRelease:Oe,onDrag:we,dismissible:u,shouldAnimate:ce,handleOnly:d,isOpen:k,isDragging:N,shouldFade:ve,closeDrawer:Te,onNestedDrag:Ae,onNestedOpenChange:ke,onNestedRelease:je,keyboardIsOpen:se,modal:g,snapPointsOffset:ge,activeSnapPointIndex:me,direction:b,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:y,container:D,autoFocus:O}},n))}var vk=z.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s,shouldAnimate:c}=CO(),l=JO(t,n),u=r&&r.length>0;if(!s)return null;let d=z.useCallback(e=>i(e),[i]);return z.createElement(Sg,{onMouseUp:d,ref:l,"data-vaul-overlay":``,"data-vaul-snap-points":o&&u?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,"data-vaul-animate":c?.current?`true`:`false`,...e})});vk.displayName=`Drawer.Overlay`;var yk=z.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,activeSnapPointIndex:d,modal:f,isOpen:p,direction:m,snapPoints:h,container:g,handleOnly:_,shouldAnimate:v,autoFocus:y}=CO(),[b,x]=z.useState(!1),S=JO(i,a),C=z.useRef(null),w=z.useRef(null),T=z.useRef(!1),E=h&&h.length>0;mk();let D=(e,t,n=0)=>{if(T.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return T.current=!0,!0};z.useEffect(()=>{E&&window.requestAnimationFrame(()=>{x(!0)})},[]);function O(e){C.current=null,T.current=!1,s(e)}return z.createElement(Cg,{"data-vaul-drawer-direction":m,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":b?`true`:`false`,"data-vaul-snap-points":p&&E?`true`:`false`,"data-vaul-custom-container":g?`true`:`false`,"data-vaul-animate":v?.current?`true`:`false`,...r,ref:S,style:u&&u.length>0?{"--snap-point-height":`${u[d??0]}px`,...t}:t,onPointerDown:e=>{_||(r.onPointerDown==null||r.onPointerDown.call(r,e),C.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),y||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!f||t.defaultPrevented){t.preventDefault();return}l.current&&=!1},onFocusOutside:e=>{if(!f){e.preventDefault();return}},onPointerMove:e=>{if(w.current=e,_||(r.onPointerMove==null||r.onPointerMove.call(r,e),!C.current))return;let t=e.pageY-C.current.y,n=e.pageX-C.current.x,i=e.pointerType===`touch`?10:2;D({x:n,y:t},m,i)?c(e):(Math.abs(n)>i||Math.abs(t)>i)&&(C.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),C.current=null,T.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),O(w.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),w.current&&O(w.current)}})});yk.displayName=`Drawer.Content`;var bk=250,xk=120,Sk=z.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=CO(),m=z.useRef(null),h=z.useRef(!1);function g(){if(h.current){y();return}window.setTimeout(()=>{_()},xk)}function _(){if(a||e||h.current){y();return}if(y(),!o||o.length===0){l||i();return}if(s===o[o.length-1]&&l){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];c(n)}function v(){m.current=window.setTimeout(()=>{h.current=!0},bk)}function y(){m.current&&window.clearTimeout(m.current),h.current=!1}return z.createElement(`div`,{onClick:g,onPointerCancel:y,onPointerDown:e=>{u&&f(e),v()},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":d?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},z.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});Sk.displayName=`Drawer.Handle`;function Ck({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:o}=CO();if(!i)throw Error(`Drawer.NestedRoot must be placed in another drawer`);return z.createElement(_k,{nested:!0,open:n,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),e?.(t,n)},onOpenChange:e=>{e&&a(e),t?.(e)},onRelease:o,...r})}function wk(e){let t=CO(),{container:n=t.container,...r}=e;return z.createElement(xg,{container:n,...r})}var Tk={Root:_k,NestedRoot:Ck,Content:yk,Overlay:vk,Trigger:bg,Portal:wk,Handle:Sk,Close:Eg,Title:wg,Description:Tg},Ek=`DropdownMenu`,[Dk,Ok]=zu(Ek,[nE]),kk=nE(),[Ak,jk]=Dk(Ek),Mk=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=kk(t),l=z.useRef(null),[u,d]=$u({prop:i,defaultProp:a??!1,onChange:o,caller:Ek});return(0,B.jsx)(Ak,{scope:t,triggerId:dd(),triggerRef:l,contentId:dd(),open:u,onOpenChange:d,onOpenToggle:z.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,B.jsx)(dD,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Mk.displayName=Ek;var Nk=`DropdownMenuTrigger`,Pk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=jk(Nk,n),o=kk(n);return(0,B.jsx)(fD,{asChild:!0,...o,children:(0,B.jsx)(J.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:Hu(t,a.triggerRef),onPointerDown:q(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:q(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Pk.displayName=Nk;var Fk=`DropdownMenuPortal`,Ik=e=>{let{__scopeDropdownMenu:t,...n}=e,r=kk(t);return(0,B.jsx)(pD,{...r,...n})};Ik.displayName=Fk;var Lk=`DropdownMenuContent`,Rk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jk(Lk,n),a=kk(n),o=z.useRef(!1);return(0,B.jsx)(mD,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:q(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Rk.displayName=Lk;var zk=`DropdownMenuGroup`,Bk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(hD,{...i,...r,ref:t})});Bk.displayName=zk;var Vk=`DropdownMenuLabel`,Hk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(gD,{...i,...r,ref:t})});Hk.displayName=Vk;var Uk=`DropdownMenuItem`,Wk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(_D,{...i,...r,ref:t})});Wk.displayName=Uk;var Gk=`DropdownMenuCheckboxItem`,Kk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(vD,{...i,...r,ref:t})});Kk.displayName=Gk;var qk=`DropdownMenuRadioGroup`,Jk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(yD,{...i,...r,ref:t})});Jk.displayName=qk;var Yk=`DropdownMenuRadioItem`,Xk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(bD,{...i,...r,ref:t})});Xk.displayName=Yk;var Zk=`DropdownMenuItemIndicator`,Qk=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(xD,{...i,...r,ref:t})});Qk.displayName=Zk;var $k=`DropdownMenuSeparator`,eA=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(SD,{...i,...r,ref:t})});eA.displayName=$k;var tA=`DropdownMenuArrow`,nA=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(CD,{...i,...r,ref:t})});nA.displayName=tA;var rA=`DropdownMenuSubTrigger`,iA=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(TD,{...i,...r,ref:t})});iA.displayName=rA;var aA=`DropdownMenuSubContent`,oA=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kk(n);return(0,B.jsx)(ED,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});oA.displayName=aA;var sA=Ik,cA=Rk,lA=Hk,uA=Wk,dA=Kk,fA=Xk,pA=Qk,mA=eA,hA=iA,gA=oA,_A=e=>e instanceof Date,vA=e=>e==null,yA=e=>typeof e==`object`,bA=e=>!vA(e)&&!Array.isArray(e)&&yA(e)&&!_A(e),xA=e=>{let t=e.constructor&&e.constructor.prototype;return bA(t)&&t.hasOwnProperty(`isPrototypeOf`)},SA=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function CA(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(SA&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(bA(e)&&xA(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=CA(e[t]));return r}var wA={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},TA=z.createContext(null);TA.displayName=`HookFormControlContext`,typeof window<`u`?z.useLayoutEffect:z.useEffect;var EA=e=>vA(e)||!yA(e);function DA(e,t,n=new WeakSet){if(EA(e)||EA(t))return Object.is(e,t);if(_A(e)&&_A(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(let a of r){let r=e[a];if(!i.includes(a))return!1;if(a!==`ref`){let e=t[a];if(_A(r)&&_A(e)||bA(r)&&bA(e)||Array.isArray(r)&&Array.isArray(e)?!DA(r,e,n):!Object.is(r,e))return!1}}return!0}var OA=z.createContext(null);OA.displayName=`HookFormContext`;var kA=()=>z.useContext(OA);wA.onSubmit,wA.onChange;var AA=`Label`,jA=z.forwardRef((e,t)=>(0,B.jsx)(g_.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));jA.displayName=AA;var MA=jA,NA,PA=`HoverCard`,[FA,IA]=zu(PA,[ww]),LA=ww(),[RA,zA]=FA(PA),BA=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,c=LA(t),l=z.useRef(0),u=z.useRef(0),d=z.useRef(!1),f=z.useRef(!1),[p,m]=$u({prop:r,defaultProp:i??!1,onChange:a,caller:PA}),h=z.useCallback(()=>{clearTimeout(u.current),l.current=window.setTimeout(()=>m(!0),o)},[o,m]),g=z.useCallback(()=>{clearTimeout(l.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>m(!1),s))},[s,m]),_=z.useCallback(()=>m(!1),[m]);return z.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(u.current)},[]),(0,B.jsx)(RA,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:g,onDismiss:_,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,B.jsx)(Bw,{...c,children:n})})};BA.displayName=PA;var VA=`HoverCardTrigger`,HA=z.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=zA(VA,n),a=LA(n);return(0,B.jsx)(Vw,{asChild:!0,...a,children:(0,B.jsx)(J.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:q(e.onPointerEnter,QA(i.onOpen)),onPointerLeave:q(e.onPointerLeave,QA(i.onClose)),onFocus:q(e.onFocus,i.onOpen),onBlur:q(e.onBlur,i.onClose),onTouchStart:q(e.onTouchStart,e=>e.preventDefault())})})});HA.displayName=VA;var UA=`HoverCardPortal`,[WA,GA]=FA(UA,{forceMount:void 0}),KA=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=zA(UA,t);return(0,B.jsx)(WA,{scope:t,forceMount:n,children:(0,B.jsx)(ad,{present:n||a.open,children:(0,B.jsx)(_m,{asChild:!0,container:i,children:r})})})};KA.displayName=UA;var qA=`HoverCardContent`,JA=z.forwardRef((e,t)=>{let n=GA(qA,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=zA(qA,e.__scopeHoverCard);return(0,B.jsx)(ad,{present:r||a.open,children:(0,B.jsx)(YA,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:q(e.onPointerEnter,QA(a.onOpen)),onPointerLeave:q(e.onPointerLeave,QA(a.onClose)),ref:t})})});JA.displayName=qA;var YA=z.forwardRef((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,c=zA(qA,n),l=LA(n),u=z.useRef(null),d=K(t,u),[f,p]=z.useState(!1);return z.useEffect(()=>{if(f){let e=document.body;return NA=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=NA,e.style.webkitUserSelect=NA}}},[f]),z.useEffect(()=>{if(u.current){let e=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(c.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),z.useEffect(()=>{u.current&&$A(u.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,B.jsx)(Gp,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:q(a,e=>{e.preventDefault()}),onDismiss:c.onDismiss,children:(0,B.jsx)(Hw,{...l,...s,onPointerDown:q(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:f?`text`:void 0,WebkitUserSelect:f?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),XA=`HoverCardArrow`,ZA=z.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=LA(n);return(0,B.jsx)(Uw,{...i,...r,ref:t})});ZA.displayName=XA;function QA(e){return t=>t.pointerType===`touch`?void 0:e()}function $A(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var ej=JA,tj=Object.defineProperty,nj=Object.defineProperties,rj=Object.getOwnPropertyDescriptors,ij=Object.getOwnPropertySymbols,aj=Object.prototype.hasOwnProperty,oj=Object.prototype.propertyIsEnumerable,sj=(e,t,n)=>t in e?tj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cj=(e,t)=>{for(var n in t||={})aj.call(t,n)&&sj(e,n,t[n]);if(ij)for(var n of ij(t))oj.call(t,n)&&sj(e,n,t[n]);return e},lj=(e,t)=>nj(e,rj(t)),uj=(e,t)=>{var n={};for(var r in e)aj.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ij)for(var r of ij(e))t.indexOf(r)<0&&oj.call(e,r)&&(n[r]=e[r]);return n};function dj(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function fj(e){let t=z.useRef();return z.useEffect(()=>{t.current=e}),t.current}var pj=18,mj=40,hj=`${mj}px`,gj=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function _j({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=z.useState(!1),[o,s]=z.useState(!1),[c,l]=z.useState(!1),u=z.useMemo(()=>n===`none`?!1:(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=z.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,u=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-pj,f=u;document.querySelectorAll(gj).length===0&&document.elementFromPoint(d,f)===r||(a(!0),l(!0))},[e,t,c,n]);return z.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){s(window.innerWidth-t.getBoundingClientRect().right>=mj)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),z.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:hj}}var vj=z.createContext({}),yj=z.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=xj,render:h,children:g}=n,_=uj(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),v;let[y,b]=z.useState(typeof _.defaultValue==`string`?_.defaultValue:``),x=r??y,S=fj(x),C=z.useCallback(e=>{i?.(e),b(e)},[i]),w=z.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),T=z.useRef(null),E=z.useRef(null),D=z.useRef({value:x,onChange:C,isIOS:typeof window<`u`&&((v=window==null?void 0:window.CSS)?.supports)?.call(v,`-webkit-touch-callout`,`none`)}),O=z.useRef({prev:[T.current?.selectionStart,T.current?.selectionEnd,T.current?.selectionDirection]});z.useImperativeHandle(t,()=>T.current,[]),z.useEffect(()=>{let e=T.current,t=E.current;if(!e||!t)return;D.current.value!==e.value&&D.current.onChange(e.value),O.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){P(null),F(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=O.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&T.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;P(u),F(d),O.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&M(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;bj(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),bj(e.sheet,`[data-input-otp]:autofill { ${t} }`),bj(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),bj(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),bj(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[k,A]=z.useState(!1),[j,M]=z.useState(!1),[N,P]=z.useState(null),[ee,F]=z.useState(null);z.useEffect(()=>{dj(()=>{var e;(e=T.current)==null||e.dispatchEvent(new Event(`input`));let t=T.current?.selectionStart,n=T.current?.selectionEnd,r=T.current?.selectionDirection;t!==null&&n!==null&&(P(t),F(n),O.current.prev=[t,n,r])})},[x,j]),z.useEffect(()=>{S!==void 0&&x!==S&&S.length<a&&x.length===a&&u?.(x)},[a,u,S,x]);let I=_j({containerRef:E,inputRef:T,pushPasswordManagerStrategy:d,isFocused:j}),te=z.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&w&&!w.test(t)){e.preventDefault();return}typeof S==`string`&&t.length<S.length&&document.dispatchEvent(new Event(`selectionchange`)),C(t)},[a,C,S,w]),ne=z.useCallback(()=>{var e;if(T.current){let t=Math.min(T.current.value.length,a-1),n=T.current.value.length;(e=T.current)==null||e.setSelectionRange(t,n),P(t),F(n)}M(!0)},[a]),re=z.useCallback(e=>{let t=T.current;if(!f&&(!D.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=T.current?.selectionStart,o=T.current?.selectionEnd,s=(i===o?x.slice(0,i)+r+x.slice(i):x.slice(0,i)+r+x.slice(o)).slice(0,a);if(s.length>0&&w&&!w.test(s))return;t.value=s,C(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),P(c),F(l)},[a,C,w,x]),L=z.useMemo(()=>({position:`relative`,cursor:_.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[_.disabled]),ie=z.useMemo(()=>({position:`absolute`,inset:0,width:I.willPushPWMBadge?`calc(100% + ${I.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:I.willPushPWMBadge?`inset(0 ${I.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[I.PWM_BADGE_SPACE_WIDTH,I.willPushPWMBadge,o]),ae=z.useMemo(()=>z.createElement(`input`,lj(cj({autoComplete:_.autoComplete||`one-time-code`},_),{"data-input-otp":!0,"data-input-otp-placeholder-shown":x.length===0||void 0,"data-input-otp-mss":N,"data-input-otp-mse":ee,inputMode:l,pattern:w?.source,"aria-placeholder":c,style:ie,maxLength:a,value:x,ref:T,onPaste:e=>{var t;re(e),(t=_.onPaste)==null||t.call(_,e)},onChange:te,onMouseOver:e=>{var t;A(!0),(t=_.onMouseOver)==null||t.call(_,e)},onMouseLeave:e=>{var t;A(!1),(t=_.onMouseLeave)==null||t.call(_,e)},onFocus:e=>{var t;ne(),(t=_.onFocus)==null||t.call(_,e)},onBlur:e=>{var t;M(!1),(t=_.onBlur)==null||t.call(_,e)}})),[te,ne,re,l,ie,a,ee,N,_,w?.source,x]),oe=z.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=j&&N!==null&&ee!==null&&(N===ee&&t===N||t>=N&&t<ee),r=x[t]===void 0?null:x[t];return{char:r,placeholderChar:x[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:j,isHovering:!_.disabled&&k}),[j,k,a,ee,N,_.disabled,x]),se=z.useMemo(()=>h?h(oe):z.createElement(vj.Provider,{value:oe},g),[g,oe,h]);return z.createElement(z.Fragment,null,m!==null&&z.createElement(`noscript`,null,z.createElement(`style`,null,m)),z.createElement(`div`,{ref:E,"data-input-otp-container":!0,style:L,className:p},se,z.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},ae)))});yj.displayName=`Input`;function bj(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var xj=`
|
|
83
|
-
[data-input-otp] {
|
|
84
|
-
--nojs-bg: white !important;
|
|
85
|
-
--nojs-fg: black !important;
|
|
86
|
-
|
|
87
|
-
background-color: var(--nojs-bg) !important;
|
|
88
|
-
color: var(--nojs-fg) !important;
|
|
89
|
-
caret-color: var(--nojs-fg) !important;
|
|
90
|
-
letter-spacing: .25em !important;
|
|
91
|
-
text-align: center !important;
|
|
92
|
-
border: 1px solid var(--nojs-fg) !important;
|
|
93
|
-
border-radius: 4px !important;
|
|
94
|
-
width: 100% !important;
|
|
95
|
-
}
|
|
96
|
-
@media (prefers-color-scheme: dark) {
|
|
97
|
-
[data-input-otp] {
|
|
98
|
-
--nojs-bg: black !important;
|
|
99
|
-
--nojs-fg: white !important;
|
|
100
|
-
}
|
|
101
|
-
}`,Sj=`Menubar`,[Cj,wj,Tj]=Xu(Sj),[Ej,Dj]=zu(Sj,[Tj,jT]),Oj=nE(),kj=jT(),[Aj,jj]=Ej(Sj),Mj=z.forwardRef((e,t)=>{let{__scopeMenubar:n,value:r,onValueChange:i,defaultValue:a,loop:o=!0,dir:s,...c}=e,l=Od(s),u=kj(n),[d,f]=$u({prop:r,onChange:i,defaultProp:a??``,caller:Sj}),[p,m]=z.useState(null);return(0,B.jsx)(Aj,{scope:n,value:d,onMenuOpen:z.useCallback(e=>{f(e),m(e)},[f]),onMenuClose:z.useCallback(()=>f(``),[f]),onMenuToggle:z.useCallback(e=>{f(t=>t?``:e),m(e)},[f]),dir:l,loop:o,children:(0,B.jsx)(Cj.Provider,{scope:n,children:(0,B.jsx)(Cj.Slot,{scope:n,children:(0,B.jsx)(UT,{asChild:!0,...u,orientation:`horizontal`,loop:o,dir:l,currentTabStopId:p,onCurrentTabStopIdChange:m,children:(0,B.jsx)(J.div,{role:`menubar`,...c,ref:t})})})})})});Mj.displayName=Sj;var Nj=`MenubarMenu`,[Pj,Fj]=Ej(Nj),Ij=e=>{let{__scopeMenubar:t,value:n,...r}=e,i=dd(),a=n||i||`LEGACY_REACT_AUTO_VALUE`,o=jj(Nj,t),s=Oj(t),c=z.useRef(null),l=z.useRef(!1),u=o.value===a;return z.useEffect(()=>{u||(l.current=!1)},[u]),(0,B.jsx)(Pj,{scope:t,value:a,triggerId:dd(),triggerRef:c,contentId:dd(),wasKeyboardTriggerOpenRef:l,children:(0,B.jsx)(dD,{...s,open:u,onOpenChange:e=>{e||o.onMenuClose()},modal:!1,dir:o.dir,...r})})};Ij.displayName=Nj;var Lj=`MenubarTrigger`,Rj=z.forwardRef((e,t)=>{let{__scopeMenubar:n,disabled:r=!1,...i}=e,a=kj(n),o=Oj(n),s=jj(Lj,n),c=Fj(Lj,n),l=z.useRef(null),u=K(t,l,c.triggerRef),[d,f]=z.useState(!1),p=s.value===c.value;return(0,B.jsx)(Cj.ItemSlot,{scope:n,value:c.value,disabled:r,children:(0,B.jsx)(WT,{asChild:!0,...a,focusable:!r,tabStopId:c.value,children:(0,B.jsx)(fD,{asChild:!0,...o,children:(0,B.jsx)(J.button,{type:`button`,role:`menuitem`,id:c.triggerId,"aria-haspopup":`menu`,"aria-expanded":p,"aria-controls":p?c.contentId:void 0,"data-highlighted":d?``:void 0,"data-state":p?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:u,onPointerDown:q(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(s.onMenuOpen(c.value),p||e.preventDefault())}),onPointerEnter:q(e.onPointerEnter,()=>{s.value&&!p&&(s.onMenuOpen(c.value),l.current?.focus())}),onKeyDown:q(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&s.onMenuToggle(c.value),e.key===`ArrowDown`&&s.onMenuOpen(c.value),[`Enter`,` `,`ArrowDown`].includes(e.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))}),onFocus:q(e.onFocus,()=>f(!0)),onBlur:q(e.onBlur,()=>f(!1))})})})})});Rj.displayName=Lj;var zj=`MenubarPortal`,Bj=e=>{let{__scopeMenubar:t,...n}=e,r=Oj(t);return(0,B.jsx)(pD,{...r,...n})};Bj.displayName=zj;var Vj=`MenubarContent`,Hj=z.forwardRef((e,t)=>{let{__scopeMenubar:n,align:r=`start`,...i}=e,a=Oj(n),o=jj(Vj,n),s=Fj(Vj,n),c=wj(n),l=z.useRef(!1);return(0,B.jsx)(mD,{id:s.contentId,"aria-labelledby":s.triggerId,"data-radix-menubar-content":``,...a,...i,ref:t,align:r,onCloseAutoFocus:q(e.onCloseAutoFocus,e=>{!o.value&&!l.current&&s.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onFocusOutside:q(e.onFocusOutside,e=>{let t=e.target;c().some(e=>e.ref.current?.contains(t))&&e.preventDefault()}),onInteractOutside:q(e.onInteractOutside,()=>{l.current=!0}),onEntryFocus:e=>{s.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:q(e.onKeyDown,e=>{if([`ArrowRight`,`ArrowLeft`].includes(e.key)){let t=e.target,n=t.hasAttribute(`data-radix-menubar-subtrigger`),r=t.closest(`[data-radix-menubar-content]`)!==e.currentTarget,i=(o.dir===`rtl`?`ArrowRight`:`ArrowLeft`)===e.key;if(!i&&n||r&&i)return;let a=c().filter(e=>!e.disabled).map(e=>e.value);i&&a.reverse();let l=a.indexOf(s.value);a=o.loop?pM(a,l+1):a.slice(l+1);let[u]=a;u&&o.onMenuOpen(u)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});Hj.displayName=Vj;var Uj=`MenubarGroup`,Wj=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(hD,{...i,...r,ref:t})});Wj.displayName=Uj;var Gj=`MenubarLabel`,Kj=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(gD,{...i,...r,ref:t})});Kj.displayName=Gj;var qj=`MenubarItem`,Jj=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(_D,{...i,...r,ref:t})});Jj.displayName=qj;var Yj=`MenubarCheckboxItem`,Xj=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(vD,{...i,...r,ref:t})});Xj.displayName=Yj;var Zj=`MenubarRadioGroup`,Qj=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(yD,{...i,...r,ref:t})});Qj.displayName=Zj;var $j=`MenubarRadioItem`,eM=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(bD,{...i,...r,ref:t})});eM.displayName=$j;var tM=`MenubarItemIndicator`,nM=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(xD,{...i,...r,ref:t})});nM.displayName=tM;var rM=`MenubarSeparator`,iM=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(SD,{...i,...r,ref:t})});iM.displayName=rM;var aM=`MenubarArrow`,oM=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(CD,{...i,...r,ref:t})});oM.displayName=aM;var sM=`MenubarSub`,cM=e=>{let{__scopeMenubar:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Oj(t),[s,c]=$u({prop:r,defaultProp:a??!1,onChange:i,caller:sM});return(0,B.jsx)(wD,{...o,open:s,onOpenChange:c,children:n})};cM.displayName=sM;var lM=`MenubarSubTrigger`,uM=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(TD,{"data-radix-menubar-subtrigger":``,...i,...r,ref:t})});uM.displayName=lM;var dM=`MenubarSubContent`,fM=z.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=Oj(n);return(0,B.jsx)(ED,{...i,"data-radix-menubar-content":``,...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});fM.displayName=dM;function pM(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mM=Mj,hM=Rj,gM=Bj,_M=Hj,vM=Kj,yM=Jj,bM=Xj,xM=eM,SM=nM,CM=iM,wM=uM,TM=fM,EM=`Separator`,DM=`horizontal`,OM=[`horizontal`,`vertical`],kM=z.forwardRef((e,t)=>{let{decorative:n,orientation:r=DM,...i}=e,a=AM(r)?r:DM,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,B.jsx)(g_.div,{"data-orientation":a,...s,...i,ref:t})});kM.displayName=EM;function AM(e){return OM.includes(e)}var jM=kM,MM=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),NM=`VisuallyHidden`,PM=z.forwardRef((e,t)=>(0,B.jsx)(J.span,{...e,ref:t,style:{...MM,...e.style}}));PM.displayName=NM;var FM=PM,IM=`NavigationMenu`,[LM,RM,zM]=Xu(IM),[BM,VM,HM]=Xu(IM),[UM,WM]=zu(IM,[zM,HM]),[GM,KM]=UM(IM),[qM,JM]=UM(IM),YM=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,delayDuration:o=200,skipDelayDuration:s=300,orientation:c=`horizontal`,dir:l,...u}=e,[d,f]=z.useState(null),p=K(t,e=>f(e)),m=Od(l),h=z.useRef(0),g=z.useRef(0),_=z.useRef(0),[v,y]=z.useState(!0),[b,x]=$u({prop:r,onChange:e=>{let t=e!==``,n=s>0;t?(window.clearTimeout(_.current),n&&y(!1)):(window.clearTimeout(_.current),_.current=window.setTimeout(()=>y(!0),s)),i?.(e)},defaultProp:a??``,caller:IM}),S=z.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(``),150)},[x]),C=z.useCallback(e=>{window.clearTimeout(g.current),x(e)},[x]),w=z.useCallback(e=>{b===e?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(e)},o)},[b,x,o]);return z.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(_.current)},[]),(0,B.jsx)(QM,{scope:n,isRootMenu:!0,value:b,dir:m,orientation:c,rootNavigationMenu:d,onTriggerEnter:e=>{window.clearTimeout(h.current),v?w(e):C(e)},onTriggerLeave:()=>{window.clearTimeout(h.current),S()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:S,onItemSelect:e=>{x(t=>t===e?``:e)},onItemDismiss:()=>x(``),children:(0,B.jsx)(J.nav,{"aria-label":`Main`,"data-orientation":c,dir:m,...u,ref:p})})});YM.displayName=IM;var XM=`NavigationMenuSub`,ZM=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,...s}=e,c=KM(XM,n),[l,u]=$u({prop:r,onChange:i,defaultProp:a??``,caller:XM});return(0,B.jsx)(QM,{scope:n,isRootMenu:!1,value:l,dir:c.dir,orientation:o,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>u(e),onItemSelect:e=>u(e),onItemDismiss:()=>u(``),children:(0,B.jsx)(J.div,{"data-orientation":o,...s,ref:t})})});ZM.displayName=XM;var QM=e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:i,orientation:a,children:o,value:s,onItemSelect:c,onItemDismiss:l,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:p}=e,[m,h]=z.useState(null),[g,_]=z.useState(new Map),[v,y]=z.useState(null);return(0,B.jsx)(GM,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:Yv(s),baseId:dd(),dir:i,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:v,onIndicatorTrackChange:y,onTriggerEnter:Lp(u),onTriggerLeave:Lp(d),onContentEnter:Lp(f),onContentLeave:Lp(p),onItemSelect:Lp(c),onItemDismiss:Lp(l),onViewportContentChange:z.useCallback((e,t)=>{_(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:z.useCallback(e=>{_(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,B.jsx)(LM.Provider,{scope:t,children:(0,B.jsx)(qM,{scope:t,items:g,children:o})})})},$M=`NavigationMenuList`,eN=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=KM($M,n),a=(0,B.jsx)(J.ul,{"data-orientation":i.orientation,...r,ref:t});return(0,B.jsx)(J.div,{style:{position:`relative`},ref:i.onIndicatorTrackChange,children:(0,B.jsx)(LM.Slot,{scope:n,children:i.isRootMenu?(0,B.jsx)(SN,{asChild:!0,children:a}):a})})});eN.displayName=$M;var tN=`NavigationMenuItem`,[nN,rN]=UM(tN),iN=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,...i}=e,a=dd(),o=r||a||`LEGACY_REACT_AUTO_VALUE`,s=z.useRef(null),c=z.useRef(null),l=z.useRef(null),u=z.useRef(()=>{}),d=z.useRef(!1),f=z.useCallback((e=`start`)=>{if(s.current){u.current();let t=EN(s.current);t.length&&DN(e===`start`?t:t.reverse())}},[]),p=z.useCallback(()=>{if(s.current){let e=EN(s.current);e.length&&(u.current=ON(e))}},[]);return(0,B.jsx)(nN,{scope:n,value:o,triggerRef:c,contentRef:s,focusProxyRef:l,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,B.jsx)(J.li,{...i,ref:t})})});iN.displayName=tN;var aN=`NavigationMenuTrigger`,oN=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:r,...i}=e,a=KM(aN,e.__scopeNavigationMenu),o=rN(aN,e.__scopeNavigationMenu),s=z.useRef(null),c=K(s,o.triggerRef,t),l=jN(a.baseId,o.value),u=MN(a.baseId,o.value),d=z.useRef(!1),f=z.useRef(!1),p=o.value===a.value;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(LM.ItemSlot,{scope:n,value:o.value,children:(0,B.jsx)(TN,{asChild:!0,children:(0,B.jsx)(J.button,{id:l,disabled:r,"data-disabled":r?``:void 0,"data-state":AN(p),"aria-expanded":p,"aria-controls":u,...i,ref:c,onPointerEnter:q(e.onPointerEnter,()=>{f.current=!1,o.wasEscapeCloseRef.current=!1}),onPointerMove:q(e.onPointerMove,NN(()=>{r||f.current||o.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(o.value),d.current=!0)})),onPointerLeave:q(e.onPointerLeave,NN(()=>{r||(a.onTriggerLeave(),d.current=!1)})),onClick:q(e.onClick,()=>{a.onItemSelect(o.value),f.current=p}),onKeyDown:q(e.onKeyDown,e=>{let t={horizontal:`ArrowDown`,vertical:a.dir===`rtl`?`ArrowLeft`:`ArrowRight`}[a.orientation];p&&e.key===t&&(o.onEntryKeyDown(),e.preventDefault())})})})}),p&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(FM,{"aria-hidden":!0,tabIndex:0,ref:o.focusProxyRef,onFocus:e=>{let t=o.contentRef.current,n=e.relatedTarget,r=n===s.current,i=t?.contains(n);(r||!i)&&o.onFocusProxyEnter(r?`start`:`end`)}}),a.viewport&&(0,B.jsx)(`span`,{"aria-owns":u})]})]})});oN.displayName=aN;var sN=`NavigationMenuLink`,cN=`navigationMenu.linkSelect`,lN=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:i,...a}=e;return(0,B.jsx)(TN,{asChild:!0,children:(0,B.jsx)(J.a,{"data-active":r?``:void 0,"aria-current":r?`page`:void 0,...a,ref:t,onClick:q(e.onClick,e=>{let t=e.target,n=new CustomEvent(cN,{bubbles:!0,cancelable:!0});t.addEventListener(cN,e=>i?.(e),{once:!0}),rd(t,n),!n.defaultPrevented&&!e.metaKey&&rd(t,new CustomEvent(gN,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});lN.displayName=sN;var uN=`NavigationMenuIndicator`,dN=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=KM(uN,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?nd.createPortal((0,B.jsx)(ad,{present:n||a,children:(0,B.jsx)(fN,{...r,ref:t})}),i.indicatorTrack):null});dN.displayName=uN;var fN=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=KM(uN,n),a=RM(n),[o,s]=z.useState(null),[c,l]=z.useState(null),u=i.orientation===`horizontal`,d=!!i.value;z.useEffect(()=>{let e=a().find(e=>e.value===i.value)?.ref.current;e&&s(e)},[a,i.value]);let f=()=>{o&&l({size:u?o.offsetWidth:o.offsetHeight,offset:u?o.offsetLeft:o.offsetTop})};return kN(o,f),kN(i.indicatorTrack,f),c?(0,B.jsx)(J.div,{"aria-hidden":!0,"data-state":d?`visible`:`hidden`,"data-orientation":i.orientation,...r,ref:t,style:{position:`absolute`,...u?{left:0,width:c.size+`px`,transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+`px`,transform:`translateY(${c.offset}px)`},...r.style}}):null}),pN=`NavigationMenuContent`,mN=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=KM(pN,e.__scopeNavigationMenu),a=rN(pN,e.__scopeNavigationMenu),o=K(a.contentRef,t),s=a.value===i.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?(0,B.jsx)(hN,{forceMount:n,...c,ref:o}):(0,B.jsx)(ad,{present:n||s,children:(0,B.jsx)(_N,{"data-state":AN(s),...c,ref:o,onPointerEnter:q(e.onPointerEnter,i.onContentEnter),onPointerLeave:q(e.onPointerLeave,NN(i.onContentLeave)),style:{pointerEvents:!s&&i.isRootMenu?`none`:void 0,...c.style}})})});mN.displayName=pN;var hN=z.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=KM(pN,e.__scopeNavigationMenu);return Zu(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Zu(()=>()=>r(e.value),[e.value,r]),null}),gN=`navigationMenu.rootContentDismiss`,_N=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:o,onRootContentClose:s,onContentFocusOutside:c,...l}=e,u=KM(pN,n),d=z.useRef(null),f=K(d,t),p=jN(u.baseId,r),m=MN(u.baseId,r),h=RM(n),g=z.useRef(null),{onItemDismiss:_}=u;z.useEffect(()=>{let e=d.current;if(u.isRootMenu&&e){let t=()=>{_(),s(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(gN,t),()=>e.removeEventListener(gN,t)}},[u.isRootMenu,e.value,i,_,s]);let v=z.useMemo(()=>{let e=h().map(e=>e.value);u.dir===`rtl`&&e.reverse();let t=e.indexOf(u.value),n=e.indexOf(u.previousValue),i=r===u.value,a=n===e.indexOf(r);if(!i&&!a)return g.current;let o=(()=>{if(t!==n){if(i&&n!==-1)return t>n?`from-end`:`from-start`;if(a&&t!==-1)return t>n?`to-start`:`to-end`}return null})();return g.current=o,o},[u.previousValue,u.value,u.dir,h,r]);return(0,B.jsx)(SN,{asChild:!0,children:(0,B.jsx)(Gp,{id:m,"aria-labelledby":p,"data-motion":v,"data-orientation":u.orientation,...l,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(gN,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(e)},onFocusOutside:q(e.onFocusOutside,e=>{c();let t=e.target;u.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:q(e.onPointerDownOutside,e=>{let t=e.target,n=h().some(e=>e.ref.current?.contains(t)),r=u.isRootMenu&&u.viewport?.contains(t);(n||r||!u.isRootMenu)&&e.preventDefault()}),onKeyDown:q(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if(e.key===`Tab`&&!t){let t=EN(e.currentTarget),n=document.activeElement,r=t.findIndex(e=>e===n);DN(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length))?e.preventDefault():a.current?.focus()}}),onEscapeKeyDown:q(e.onEscapeKeyDown,e=>{o.current=!0})})})}),vN=`NavigationMenuViewport`,yN=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=!!KM(vN,e.__scopeNavigationMenu).value;return(0,B.jsx)(ad,{present:n||i,children:(0,B.jsx)(bN,{...r,ref:t})})});yN.displayName=vN;var bN=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:r,...i}=e,a=KM(vN,n),o=K(t,a.onViewportChange),s=JM(pN,e.__scopeNavigationMenu),[c,l]=z.useState(null),[u,d]=z.useState(null),f=c?c?.width+`px`:void 0,p=c?c?.height+`px`:void 0,m=!!a.value,h=m?a.value:a.previousValue;return kN(u,()=>{u&&l({width:u.offsetWidth,height:u.offsetHeight})}),(0,B.jsx)(J.div,{"data-state":AN(m),"data-orientation":a.orientation,...i,ref:o,style:{pointerEvents:!m&&a.isRootMenu?`none`:void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":p,...i.style},onPointerEnter:q(e.onPointerEnter,a.onContentEnter),onPointerLeave:q(e.onPointerLeave,NN(a.onContentLeave)),children:Array.from(s.items).map(([e,{ref:t,forceMount:n,...r}])=>{let i=h===e;return(0,B.jsx)(ad,{present:n||i,children:(0,B.jsx)(_N,{...r,ref:Hu(t,e=>{i&&e&&d(e)})})},e)})})}),xN=`FocusGroup`,SN=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=KM(xN,n);return(0,B.jsx)(BM.Provider,{scope:n,children:(0,B.jsx)(BM.Slot,{scope:n,children:(0,B.jsx)(J.div,{dir:i.dir,...r,ref:t})})})}),CN=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`],wN=`FocusGroupItem`,TN=z.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,i=VM(n),a=KM(wN,n);return(0,B.jsx)(BM.ItemSlot,{scope:n,children:(0,B.jsx)(J.button,{...r,ref:t,onKeyDown:q(e.onKeyDown,e=>{if([`Home`,`End`,...CN].includes(e.key)){let t=i().map(e=>e.ref.current);if([a.dir===`rtl`?`ArrowRight`:`ArrowLeft`,`ArrowUp`,`End`].includes(e.key)&&t.reverse(),CN.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>DN(t)),e.preventDefault()}})})})});function EN(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function DN(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}function ON(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute(`tabindex`,t)})}}function kN(e,t){let n=Lp(t);Zu(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function AN(e){return e?`open`:`closed`}function jN(e,t){return`${e}-trigger-${t}`}function MN(e,t){return`${e}-content-${t}`}function NN(e){return t=>t.pointerType===`mouse`?e(t):void 0}var PN=YM,FN=eN,IN=oN,LN=dN,RN=mN,zN=yN,BN=`Progress`,VN=100,[HN,UN]=y_(BN),[WN,GN]=HN(BN),KN=z.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=YN,...o}=e;(i||i===0)&&!QN(i)&&console.error(eP(`${i}`,`Progress`));let s=QN(i)?i:VN;r!==null&&!$N(r,s)&&console.error(tP(`${r}`,`Progress`));let c=$N(r,s)?r:null,l=ZN(c)?a(c,s):void 0;return(0,B.jsx)(WN,{scope:n,value:c,max:s,children:(0,B.jsx)(g_.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":ZN(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":XN(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});KN.displayName=BN;var qN=`ProgressIndicator`,JN=z.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=GN(qN,n);return(0,B.jsx)(g_.div,{"data-state":XN(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});JN.displayName=qN;function YN(e,t){return`${Math.round(e/t*100)}%`}function XN(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function ZN(e){return typeof e==`number`}function QN(e){return ZN(e)&&!isNaN(e)&&e>0}function $N(e,t){return ZN(e)&&!isNaN(e)&&e<=t&&e>=0}function eP(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${VN}\`.`}function tP(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
102
|
-
- a positive number
|
|
103
|
-
- less than the value passed to \`max\` (or ${VN} if no \`max\` prop is set)
|
|
104
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
105
|
-
|
|
106
|
-
Defaulting to \`null\`.`}var nP=KN,rP=JN,iP=`Radio`,[aP,oP]=zu(iP),[sP,cP]=aP(iP),lP=z.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=z.useState(null),p=K(t,e=>f(e)),m=z.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,B.jsxs)(sP,{scope:n,checked:i,disabled:o,children:[(0,B.jsx)(J.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":mP(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:q(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,B.jsx)(pP,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});lP.displayName=iP;var uP=`RadioIndicator`,dP=z.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=cP(uP,n);return(0,B.jsx)(ad,{present:r||a.checked,children:(0,B.jsx)(J.span,{"data-state":mP(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});dP.displayName=uP;var fP=`RadioBubbleInput`,pP=z.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=z.useRef(null),s=K(o,a),c=Yv(n),l=Xv(t);return z.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,B.jsx)(J.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});pP.displayName=fP;function mP(e){return e?`checked`:`unchecked`}var hP=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],gP=`RadioGroup`,[_P,vP]=zu(gP,[jT,oP]),yP=jT(),bP=oP(),[xP,SP]=_P(gP),CP=z.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=yP(n),m=Od(l),[h,g]=$u({prop:a,defaultProp:i??null,onChange:d,caller:gP});return(0,B.jsx)(xP,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,B.jsx)(UT,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,B.jsx)(J.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});CP.displayName=gP;var wP=`RadioGroupItem`,TP=z.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=SP(wP,n),o=a.disabled||r,s=yP(n),c=bP(n),l=z.useRef(null),u=K(t,l),d=a.value===i.value,f=z.useRef(!1);return z.useEffect(()=>{let e=e=>{hP.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,B.jsx)(WT,{asChild:!0,...s,focusable:!o,active:d,children:(0,B.jsx)(lP,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:q(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:q(i.onFocus,()=>{f.current&&l.current?.click()})})})});TP.displayName=wP;var EP=`RadioGroupIndicator`,DP=z.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,B.jsx)(dP,{...bP(n),...r,ref:t})});DP.displayName=EP;var OP=CP,kP=TP,AP=DP,jP=(0,z.createContext)(null);jP.displayName=`PanelGroupContext`;var MP={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},NP=10,PP=z.useLayoutEffect,FP=z.useId,IP=typeof FP==`function`?FP:()=>null,LP=0;function RP(e=null){let t=IP(),n=(0,z.useRef)(e||t||null);return n.current===null&&(n.current=``+ LP++),e??n.current}function zP({children:e,className:t=``,collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:a,id:o,maxSize:s,minSize:c,onCollapse:l,onExpand:u,onResize:d,order:f,style:p,tagName:m=`div`,...h}){let g=(0,z.useContext)(jP);if(g===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:_,expandPanel:v,getPanelSize:y,getPanelStyle:b,groupId:x,isPanelCollapsed:S,reevaluatePanelConstraints:C,registerPanel:w,resizePanel:T,unregisterPanel:E}=g,D=RP(o),O=(0,z.useRef)({callbacks:{onCollapse:l,onExpand:u,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:c},id:D,idIsFromProps:o!==void 0,order:f});(0,z.useRef)({didLogMissingDefaultSizeWarning:!1}),PP(()=>{let{callbacks:e,constraints:t}=O.current,a={...t};O.current.id=D,O.current.idIsFromProps=o!==void 0,O.current.order=f,e.onCollapse=l,e.onExpand=u,e.onResize=d,t.collapsedSize=n,t.collapsible=r,t.defaultSize=i,t.maxSize=s,t.minSize=c,(a.collapsedSize!==t.collapsedSize||a.collapsible!==t.collapsible||a.maxSize!==t.maxSize||a.minSize!==t.minSize)&&C(O.current,a)}),PP(()=>{let e=O.current;return w(e),()=>{E(e)}},[f,D,w,E]),(0,z.useImperativeHandle)(a,()=>({collapse:()=>{_(O.current)},expand:e=>{v(O.current,e)},getId(){return D},getSize(){return y(O.current)},isCollapsed(){return S(O.current)},isExpanded(){return!S(O.current)},resize:e=>{T(O.current,e)}}),[_,v,y,S,D,T]);let k=b(O.current,i);return(0,z.createElement)(m,{...h,children:e,className:t,id:D,style:{...k,...p},[MP.groupId]:x,[MP.panel]:``,[MP.panelCollapsible]:r||void 0,[MP.panelId]:D,[MP.panelSize]:parseFloat(``+k.flexGrow).toFixed(1)})}var BP=(0,z.forwardRef)((e,t)=>(0,z.createElement)(zP,{...e,forwardedRef:t}));zP.displayName=`Panel`,BP.displayName=`forwardRef(Panel)`;var VP;function HP(){return VP}var UP=null,WP=!0,GP=null,KP=-1,qP=null;function JP(e,t,n){let r=(t&dF)!==0,i=(t&fF)!==0,a=(t&pF)!==0,o=(t&mF)!==0;if(GP)return GP({exceedsHorizontalMaximum:i,exceedsHorizontalMinimum:r,exceedsVerticalMaximum:o,exceedsVerticalMinimum:a,intersectsHorizontalDragHandle:e===`horizontal`||e===`intersection`,intersectsVerticalDragHandle:e===`vertical`||e===`intersection`,isPointerDown:n});if(t){if(r)return a?`se-resize`:o?`ne-resize`:`e-resize`;if(i)return a?`sw-resize`:o?`nw-resize`:`w-resize`;if(a)return`s-resize`;if(o)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function YP(){qP!==null&&(document.head.removeChild(qP),UP=null,qP=null,KP=-1)}function XP(e,t,n){if(!WP)return;let r=JP(e,t,n);if(UP!==r){if(UP=r,qP===null){qP=document.createElement(`style`);let e=HP();e&&qP.setAttribute(`nonce`,e),document.head.appendChild(qP)}if(KP>=0){var i;(i=qP.sheet)==null||i.removeRule(KP)}KP=qP.sheet?.insertRule(`*{cursor: ${r} !important;}`)??-1}}function ZP(e){return e.type===`keydown`}function QP(e){return e.type.startsWith(`pointer`)}function $P(e){return e.type.startsWith(`mouse`)}function eF(e){if(QP(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if($P(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function tF(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function nF(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function rF(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:lF(e),b:lF(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Q(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:cF(sF(n.a)),b:cF(sF(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var iF=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function aF(e){let t=getComputedStyle(uF(e)??e).display;return t===`flex`||t===`inline-flex`}function oF(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||aF(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||iF.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function sF(e){let t=e.length;for(;t--;){let n=e[t];if(Q(n,`Missing node`),oF(n))return n}return null}function cF(e){return e&&Number(getComputedStyle(e).zIndex)||0}function lF(e){let t=[];for(;e;)t.push(e),e=uF(e);return t}function uF(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var dF=1,fF=2,pF=4,mF=8,hF=tF()===`coarse`,gF=[],_F=!1,vF=new Map,yF=new Map,bF=new Set;function xF(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=vF.get(a)??0;return vF.set(a,s+1),bF.add(o),AF(),function(){yF.delete(e),bF.delete(o);let t=vF.get(a)??1;if(vF.set(a,t-1),AF(),t===1&&vF.delete(a),gF.includes(o)){let e=gF.indexOf(o);e>=0&&gF.splice(e,1),OF(),i(`up`,!0,null)}}}function SF(e){let{target:t}=e,{x:n,y:r}=eF(e);_F=!0,EF({target:t,x:n,y:r}),AF(),gF.length>0&&(jF(`down`,e),OF(),e.preventDefault(),TF(t)||e.stopImmediatePropagation())}function CF(e){let{x:t,y:n}=eF(e);if(_F&&e.type!==`pointerleave`&&e.buttons===0&&(_F=!1,jF(`up`,e)),!_F){let{target:r}=e;EF({target:r,x:t,y:n})}jF(`move`,e),OF(),gF.length>0&&e.preventDefault()}function wF(e){let{target:t}=e,{x:n,y:r}=eF(e);yF.clear(),_F=!1,gF.length>0&&(e.preventDefault(),TF(t)||e.stopImmediatePropagation()),jF(`up`,e),EF({target:t,x:n,y:r}),OF(),AF()}function TF(e){let t=e;for(;t;){if(t.hasAttribute(MP.resizeHandle))return!0;t=t.parentElement}return!1}function EF({target:e,x:t,y:n}){gF.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),bF.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=hF?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&rF(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(nF(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}gF.push(e)}})}function DF(e,t){yF.set(e,t)}function OF(){let e=!1,t=!1;gF.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;yF.forEach(e=>{n|=e}),e&&t?XP(`intersection`,n,_F):e?XP(`horizontal`,n,_F):t?XP(`vertical`,n,_F):YP()}var kF;function AF(){var e;(e=kF)==null||e.abort(),kF=new AbortController;let t={capture:!0,signal:kF.signal};bF.size&&(_F?(gF.length>0&&vF.forEach((e,n)=>{let{body:r}=n;e>0&&(r.addEventListener(`contextmenu`,wF,t),r.addEventListener(`pointerleave`,CF,t),r.addEventListener(`pointermove`,CF,t))}),vF.forEach((e,n)=>{let{body:r}=n;r.addEventListener(`pointerup`,wF,t),r.addEventListener(`pointercancel`,wF,t)})):vF.forEach((e,n)=>{let{body:r}=n;e>0&&(r.addEventListener(`pointerdown`,SF,t),r.addEventListener(`pointermove`,CF,t))}))}function jF(e,t){bF.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,gF.includes(n),t)})}function MF(){let[e,t]=(0,z.useState)(0);return(0,z.useCallback)(()=>t(e=>e+1),[])}function Q(e,t){if(!e)throw console.error(t),Error(t)}function NF(e,t,n=NP){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function PF(e,t,n=NP){return NF(e,t,n)===0}function FF(e,t,n){return NF(e,t,n)===0}function IF(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!FF(i,a,n))return!1}return!0}function LF({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];Q(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:s=0}=r;if(NF(n,s)<0)if(a){let e=(i+s)/2;n=NF(n,e)<0?i:s}else n=s;return n=Math.min(o,n),n=parseFloat(n.toFixed(NP)),n}function RF({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(FF(e,0))return t;let o=[...t],[s,c]=r;Q(s!=null,`Invalid first pivot index`),Q(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];Q(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(Q(n!=null,`Previous layout not found for panel index ${r}`),FF(n,a)){let t=l-n;NF(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];Q(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(Q(n!=null,`Previous layout not found for panel index ${r}`),FF(n,l)){let t=n-a;NF(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];Q(e!=null,`Previous layout not found for panel index ${i}`);let o=LF({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];Q(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=LF({panelConstraints:n,panelIndex:r,size:s});if(!FF(a,c)&&(l+=a-c,o[r]=c,l.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(IF(i,o))return i;{let r=e<0?c:s,i=t[r];Q(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=LF({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!FF(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];Q(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=LF({panelConstraints:n,panelIndex:r,size:a});if(FF(i,s)||(t-=s-i,o[r]=s),FF(t,0))break;e>0?r--:r++}}}return FF(o.reduce((e,t)=>t+e,0),100)?o:i}function zF({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return Q(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function BF(e,t=document){return Array.from(t.querySelectorAll(`[${MP.resizeHandleId}][data-panel-group-id="${e}"]`))}function VF(e,t,n=document){return BF(e,n).findIndex(e=>e.getAttribute(MP.resizeHandleId)===t)??null}function HF(e,t,n){let r=VF(e,t,n);return r==null?[-1,-1]:[r,r+1]}function UF(e){return e instanceof HTMLElement?!0:typeof e==`object`&&!!e&&`tagName`in e&&`getAttribute`in e}function WF(e,t=document){return UF(t)&&t.dataset.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function GF(e,t=document){return t.querySelector(`[${MP.resizeHandleId}="${e}"]`)||null}function KF(e,t,n,r=document){let i=GF(t,r),a=BF(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function qF({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:a,setLayout:o}){(0,z.useRef)({didWarnAboutMissingResizeHandle:!1}),PP(()=>{if(!a)return;let e=BF(n,a);for(let t=0;t<i.length-1;t++){let{valueMax:n,valueMin:a,valueNow:o}=zF({layout:r,panelsArray:i,pivotIndices:[t,t+1]}),s=e[t];if(s!=null){let e=i[t];Q(e,`No panel data found for index "${t}"`),s.setAttribute(`aria-controls`,e.id),s.setAttribute(`aria-valuemax`,``+Math.round(n)),s.setAttribute(`aria-valuemin`,``+Math.round(a)),s.setAttribute(`aria-valuenow`,o==null?``:``+Math.round(o))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[n,r,i,a]),(0,z.useEffect)(()=>{if(!a)return;let e=t.current;Q(e,`Eager values not found`);let{panelDataArray:i}=e;Q(WF(n,a)!=null,`No group found for id "${n}"`);let s=BF(n,a);Q(s,`No resize handles found for group id "${n}"`);let c=s.map(e=>{let t=e.getAttribute(MP.resizeHandleId);Q(t,`Resize handle element has no handle id attribute`);let[s,c]=KF(n,t,i,a);if(s==null||c==null)return()=>{};let l=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let c=i.findIndex(e=>e.id===s);if(c>=0){let e=i[c];Q(e,`No panel data found for index ${c}`);let s=r[c],{collapsedSize:l=0,collapsible:u,minSize:d=0}=e.constraints;if(s!=null&&u){let e=RF({delta:FF(s,l)?d-l:l-s,initialLayout:r,panelConstraints:i.map(e=>e.constraints),pivotIndices:HF(n,t,a),prevLayout:r,trigger:`keyboard`});r!==e&&o(e)}}break}}};return e.addEventListener(`keydown`,l),()=>{e.removeEventListener(`keydown`,l)}});return()=>{c.forEach(e=>e())}},[a,e,t,n,r,i,o])}function JF(e,t){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 YF(e,t){let n=e===`horizontal`,{x:r,y:i}=eF(t);return n?r:i}function XF(e,t,n,r,i){let a=n===`horizontal`,o=GF(t,i);Q(o,`No resize handle element found for id "${t}"`);let s=o.getAttribute(MP.groupId);Q(s,`Resize handle element has no group id attribute`);let{initialCursorPosition:c}=r,l=YF(n,e),u=WF(s,i);Q(u,`No group element found for id "${s}"`);let d=u.getBoundingClientRect(),f=a?d.width:d.height;return(l-c)/f*100}function ZF(e,t,n,r,i,a){if(ZP(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100;break}return a}else return r==null?0:XF(e,t,n,r,a)}function QF({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];Q(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];Q(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function $F(e,t,n){t.forEach((t,r)=>{let i=e[r];Q(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||PF(u,c))&&!PF(t,c)&&r(),e&&(u==null||!PF(u,c))&&PF(t,c)&&e())}})}function eI(e,t){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 tI({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toFixed(a):r.length===1?`1`:o.toFixed(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function nI(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function rI(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function iI(e){return`react-resizable-panels:${e}`}function aI(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function oI(e,t){try{let n=iI(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function sI(e,t,n){return(oI(e,n)??{})[aI(t)]??null}function cI(e,t,n,r,i){let a=iI(e),o=aI(t),s=oI(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function lI({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!FF(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];Q(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];Q(r!=null,`No layout data found for index ${e}`);let a=LF({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!FF(i,0))for(let e=0;e<t.length;e++){let r=n[e];Q(r!=null,`No layout data found for index ${e}`);let a=r+i,o=LF({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,FF(i,0)))break}return n}var uI=100,dI={getItem:e=>(rI(dI),dI.getItem(e)),setItem:(e,t)=>{rI(dI),dI.setItem(e,t)}},fI={};function pI({autoSaveId:e=null,children:t,className:n=``,direction:r,forwardedRef:i,id:a=null,onLayout:o=null,keyboardResizeBy:s=null,storage:c=dI,style:l,tagName:u=`div`,...d}){let f=RP(a),p=(0,z.useRef)(null),[m,h]=(0,z.useState)(null),[g,_]=(0,z.useState)([]),v=MF(),y=(0,z.useRef)({}),b=(0,z.useRef)(new Map),x=(0,z.useRef)(0),S=(0,z.useRef)({autoSaveId:e,direction:r,dragState:m,id:f,keyboardResizeBy:s,onLayout:o,storage:c}),C=(0,z.useRef)({layout:g,panelDataArray:[],panelDataArrayChanged:!1});(0,z.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,z.useImperativeHandle)(i,()=>({getId:()=>S.current.id,getLayout:()=>{let{layout:e}=C.current;return e},setLayout:e=>{let{onLayout:t}=S.current,{layout:n,panelDataArray:r}=C.current,i=lI({layout:e,panelConstraints:r.map(e=>e.constraints)});JF(n,i)||(_(i),C.current.layout=i,t&&t(i),$F(r,i,y.current))}}),[]),PP(()=>{S.current.autoSaveId=e,S.current.direction=r,S.current.dragState=m,S.current.id=f,S.current.onLayout=o,S.current.storage=c}),qF({committedValuesRef:S,eagerValuesRef:C,groupId:f,layout:g,panelDataArray:C.current.panelDataArray,setLayout:_,panelGroupElement:p.current}),(0,z.useEffect)(()=>{let{panelDataArray:t}=C.current;if(e){if(g.length===0||g.length!==t.length)return;let n=fI[e];n??(n=nI(cI,uI),fI[e]=n);let r=[...t],i=new Map(b.current);n(e,r,i,g,c)}},[e,g,c]),(0,z.useEffect)(()=>{});let w=(0,z.useCallback)(e=>{let{onLayout:t}=S.current,{layout:n,panelDataArray:r}=C.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=gI(r,e,n);if(Q(o!=null,`Panel size not found for panel "${e.id}"`),!PF(o,a)){b.current.set(e.id,o);let c=RF({delta:hI(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});eI(n,c)||(_(c),C.current.layout=c,t&&t(c),$F(r,c,y.current))}}},[]),T=(0,z.useCallback)((e,t)=>{let{onLayout:n}=S.current,{layout:r,panelDataArray:i}=C.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=gI(i,e,r),u=t??c;if(PF(s,o)){let t=b.current.get(e.id),o=t!=null&&t>=u?t:u,c=RF({delta:hI(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});eI(r,c)||(_(c),C.current.layout=c,n&&n(c),$F(i,c,y.current))}}},[]),E=(0,z.useCallback)(e=>{let{layout:t,panelDataArray:n}=C.current,{panelSize:r}=gI(n,e,t);return Q(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),D=(0,z.useCallback)((e,t)=>{let{panelDataArray:n}=C.current;return tI({defaultSize:t,dragState:m,layout:g,panelData:n,panelIndex:hI(n,e)})},[m,g]),O=(0,z.useCallback)(e=>{let{layout:t,panelDataArray:n}=C.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=gI(n,e,t);return Q(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&PF(a,r)},[]),k=(0,z.useCallback)(e=>{let{layout:t,panelDataArray:n}=C.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=gI(n,e,t);return Q(a!=null,`Panel size not found for panel "${e.id}"`),!i||NF(a,r)>0},[]),A=(0,z.useCallback)(e=>{let{panelDataArray:t}=C.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),C.current.panelDataArrayChanged=!0,v()},[v]);PP(()=>{if(C.current.panelDataArrayChanged){C.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=S.current,{layout:r,panelDataArray:i}=C.current,a=null;if(e){let t=sI(e,i,n);t&&(b.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=QF({panelDataArray:i});let o=lI({layout:a,panelConstraints:i.map(e=>e.constraints)});JF(r,o)||(_(o),C.current.layout=o,t&&t(o),$F(i,o,y.current))}}),PP(()=>{let e=C.current;return()=>{e.layout=[]}},[]);let j=(0,z.useCallback)(e=>{let t=!1,n=p.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=p.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=S.current,{layout:l,panelDataArray:u}=C.current,{initialLayout:d}=a??{},f=HF(o,e,r),m=ZF(n,e,i,a,s,r),h=i===`horizontal`;h&&t&&(m=-m);let g=u.map(e=>e.constraints),v=RF({delta:m,initialLayout:d??l,panelConstraints:g,pivotIndices:f,prevLayout:l,trigger:ZP(n)?`keyboard`:`mouse-or-touch`}),b=!eI(l,v);(QP(n)||$P(n))&&x.current!=m&&(x.current=m,!b&&m!==0?h?DF(e,m<0?dF:fF):DF(e,m<0?pF:mF):DF(e,0)),b&&(_(v),C.current.layout=v,c&&c(v),$F(u,v,y.current))}},[]),M=(0,z.useCallback)((e,t)=>{let{onLayout:n}=S.current,{layout:r,panelDataArray:i}=C.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=gI(i,e,r);Q(o!=null,`Panel size not found for panel "${e.id}"`);let c=RF({delta:hI(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});eI(r,c)||(_(c),C.current.layout=c,n&&n(c),$F(i,c,y.current))},[]),N=(0,z.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=C.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=gI(r,e,n);u!=null&&(a&&s&&PF(u,i)?PF(i,o)||M(e,o):u<l?M(e,l):u>c&&M(e,c))},[M]),P=(0,z.useCallback)((e,t)=>{let{direction:n}=S.current,{layout:r}=C.current;if(!p.current)return;let i=GF(e,p.current);Q(i,`Drag handle element not found for id "${e}"`);let a=YF(n,t);h({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),ee=(0,z.useCallback)(()=>{h(null)},[]),F=(0,z.useCallback)(e=>{let{panelDataArray:t}=C.current,n=hI(t,e);n>=0&&(t.splice(n,1),delete y.current[e.id],C.current.panelDataArrayChanged=!0,v())},[v]),I=(0,z.useMemo)(()=>({collapsePanel:w,direction:r,dragState:m,expandPanel:T,getPanelSize:E,getPanelStyle:D,groupId:f,isPanelCollapsed:O,isPanelExpanded:k,reevaluatePanelConstraints:N,registerPanel:A,registerResizeHandle:j,resizePanel:M,startDragging:P,stopDragging:ee,unregisterPanel:F,panelGroupElement:p.current}),[w,m,r,T,E,D,f,O,k,N,A,j,M,P,ee,F]),te={display:`flex`,flexDirection:r===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return(0,z.createElement)(jP.Provider,{value:I},(0,z.createElement)(u,{...d,children:t,className:n,id:a,ref:p,style:{...te,...l},[MP.group]:``,[MP.groupDirection]:r,[MP.groupId]:f}))}var mI=(0,z.forwardRef)((e,t)=>(0,z.createElement)(pI,{...e,forwardedRef:t}));pI.displayName=`PanelGroup`,mI.displayName=`forwardRef(PanelGroup)`;function hI(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function gI(e,t,n){let r=hI(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function _I({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,z.useEffect)(()=>{if(e||n==null||r==null)return;let i=GF(t,r);if(i==null)return;let a=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),n(e);break;case`F6`:{e.preventDefault();let n=i.getAttribute(MP.groupId);Q(n,`No group element found for id "${n}"`);let a=BF(n,r),o=VF(n,t,r);Q(o!==null,`No resize element found for id "${t}"`),a[e.shiftKey?o>0?o-1:a.length-1:o+1<a.length?o+1:0].focus();break}}};return i.addEventListener(`keydown`,a),()=>{i.removeEventListener(`keydown`,a)}},[r,e,t,n])}function vI({children:e=null,className:t=``,disabled:n=!1,hitAreaMargins:r,id:i,onBlur:a,onClick:o,onDragging:s,onFocus:c,onPointerDown:l,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p=`div`,...m}){let h=(0,z.useRef)(null),g=(0,z.useRef)({onClick:o,onDragging:s,onPointerDown:l,onPointerUp:u});(0,z.useEffect)(()=>{g.current.onClick=o,g.current.onDragging=s,g.current.onPointerDown=l,g.current.onPointerUp=u});let _=(0,z.useContext)(jP);if(_===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:v,groupId:y,registerResizeHandle:b,startDragging:x,stopDragging:S,panelGroupElement:C}=_,w=RP(i),[T,E]=(0,z.useState)(`inactive`),[D,O]=(0,z.useState)(!1),[k,A]=(0,z.useState)(null),j=(0,z.useRef)({state:T});PP(()=>{j.current.state=T}),(0,z.useEffect)(()=>{if(n)A(null);else{let e=b(w);A(()=>e)}},[n,w,b]);let M=r?.coarse??15,N=r?.fine??5;(0,z.useEffect)(()=>{if(n||k==null)return;let e=h.current;Q(e,`Element ref not attached`);let t=!1;return xF(w,e,v,{coarse:M,fine:N},(e,n,r)=>{if(!n){E(`inactive`);return}switch(e){case`down`:{E(`drag`),t=!1,Q(r,`Expected event to be defined for "down" action`),x(w,r);let{onDragging:e,onPointerDown:n}=g.current;e?.(!0),n?.();break}case`move`:{let{state:e}=j.current;t=!0,e!==`drag`&&E(`hover`),Q(r,`Expected event to be defined for "move" action`),k(r);break}case`up`:{E(`hover`),S();let{onClick:e,onDragging:n,onPointerUp:r}=g.current;n?.(!1),r?.(),t||e?.();break}}})},[M,v,n,N,b,w,k,x,S]),_I({disabled:n,handleId:w,resizeHandler:k,panelGroupElement:C});let P={touchAction:`none`,userSelect:`none`};return(0,z.createElement)(p,{...m,children:e,className:t,id:i,onBlur:()=>{O(!1),a?.()},onFocus:()=>{O(!0),c?.()},ref:h,role:`separator`,style:{...P,...d},tabIndex:f,[MP.groupDirection]:v,[MP.groupId]:y,[MP.resizeHandle]:``,[MP.resizeHandleActive]:T===`drag`?`pointer`:D?`keyboard`:void 0,[MP.resizeHandleEnabled]:!n,[MP.resizeHandleId]:w,[MP.resizeHandleState]:T})}vI.displayName=`PanelResizeHandle`;function yI(e,[t,n]){return Math.min(n,Math.max(t,e))}function bI(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}var xI=`ScrollArea`,[SI,CI]=zu(xI),[wI,TI]=SI(xI),EI=z.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=z.useState(null),[l,u]=z.useState(null),[d,f]=z.useState(null),[p,m]=z.useState(null),[h,g]=z.useState(null),[_,v]=z.useState(0),[y,b]=z.useState(0),[x,S]=z.useState(!1),[C,w]=z.useState(!1),T=K(t,e=>c(e)),E=Od(i);return(0,B.jsx)(wI,{scope:n,type:r,dir:E,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,children:(0,B.jsx)(J.div,{dir:E,...o,ref:T,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":y+`px`,...e.style}})})});EI.displayName=xI;var DI=`ScrollAreaViewport`,OI=z.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=TI(DI,n),s=K(t,z.useRef(null),o.onViewportChange);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,B.jsx)(J.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,B.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});OI.displayName=DI;var kI=`ScrollAreaScrollbar`,AI=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=TI(kI,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return z.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,B.jsx)(jI,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,B.jsx)(MI,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,B.jsx)(NI,{...r,ref:t,forceMount:n}):i.type===`always`?(0,B.jsx)(PI,{...r,ref:t}):null});AI.displayName=kI;var jI=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=TI(kI,e.__scopeScrollArea),[a,o]=z.useState(!1);return z.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,B.jsx)(ad,{present:n||a,children:(0,B.jsx)(NI,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),MI=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=TI(kI,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=eL(()=>c(`SCROLL_END`),100),[s,c]=bI(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return z.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),z.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,B.jsx)(ad,{present:n||s!==`hidden`,children:(0,B.jsx)(PI,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:q(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:q(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),NI=z.forwardRef((e,t)=>{let n=TI(kI,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=z.useState(!1),s=e.orientation===`horizontal`,c=eL(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return tL(n.viewport,c),tL(n.content,c),(0,B.jsx)(ad,{present:r||a,children:(0,B.jsx)(PI,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),PI=z.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=TI(kI,e.__scopeScrollArea),a=z.useRef(null),o=z.useRef(0),[s,c]=z.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=qI(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return YI(e,o.current,s,t)}return n===`horizontal`?(0,B.jsx)(FI,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=XI(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,B.jsx)(II,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=XI(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),FI=z.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=TI(kI,e.__scopeScrollArea),[o,s]=z.useState(),c=z.useRef(null),l=K(t,c,a.onScrollbarXChange);return z.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,B.jsx)(zI,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":JI(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),QI(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:KI(o.paddingLeft),paddingEnd:KI(o.paddingRight)}})}})}),II=z.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=TI(kI,e.__scopeScrollArea),[o,s]=z.useState(),c=z.useRef(null),l=K(t,c,a.onScrollbarYChange);return z.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,B.jsx)(zI,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":JI(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),QI(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:KI(o.paddingTop),paddingEnd:KI(o.paddingBottom)}})}})}),[LI,RI]=SI(kI),zI=z.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=TI(kI,n),[m,h]=z.useState(null),g=K(t,e=>h(e)),_=z.useRef(null),v=z.useRef(``),y=p.viewport,b=r.content-r.viewport,x=Lp(u),S=Lp(c),C=eL(d,10);function w(e){_.current&&l({x:e.clientX-_.current.left,y:e.clientY-_.current.top})}return z.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&x(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b,x]),z.useEffect(S,[r,S]),tL(m,C),tL(p.content,C),(0,B.jsx)(LI,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Lp(a),onThumbPointerUp:Lp(o),onThumbPositionChange:S,onThumbPointerDown:Lp(s),children:(0,B.jsx)(J.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:q(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),w(e))}),onPointerMove:q(e.onPointerMove,w),onPointerUp:q(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})}),BI=`ScrollAreaThumb`,VI=z.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=RI(BI,e.__scopeScrollArea);return(0,B.jsx)(ad,{present:n||i.hasThumb,children:(0,B.jsx)(HI,{ref:t,...r})})}),HI=z.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=TI(BI,n),o=RI(BI,n),{onThumbPositionChange:s}=o,c=K(t,e=>o.onThumbChange(e)),l=z.useRef(void 0),u=eL(()=>{l.current&&=(l.current(),void 0)},100);return z.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=$I(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,B.jsx)(J.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:q(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:q(e.onPointerUp,o.onThumbPointerUp)})});VI.displayName=BI;var UI=`ScrollAreaCorner`,WI=z.forwardRef((e,t)=>{let n=TI(UI,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,B.jsx)(GI,{...e,ref:t}):null});WI.displayName=UI;var GI=z.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=TI(UI,n),[a,o]=z.useState(0),[s,c]=z.useState(0),l=!!(a&&s);return tL(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),tL(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,B.jsx)(J.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function KI(e){return e?parseInt(e,10):0}function qI(e,t){let n=e/t;return isNaN(n)?0:n}function JI(e){let t=qI(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function YI(e,t,n,r=`ltr`){let i=JI(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return ZI([c,l],d)(e)}function XI(e,t,n=`ltr`){let r=JI(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=yI(e,n===`ltr`?[0,o]:[o*-1,0]);return ZI([0,o],[0,s])(c)}function ZI(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function QI(e,t){return e>0&&e<t}var $I=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function eL(e,t){let n=Lp(e),r=z.useRef(0);return z.useEffect(()=>()=>window.clearTimeout(r.current),[]),z.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function tL(e,t){let n=Lp(t);Zu(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var nL=EI,rL=OI,iL=WI,[aL,oL]=zu(`Tooltip`,[ww]),sL=ww(),cL=`TooltipProvider`,lL=700,uL=`tooltip.open`,[dL,fL]=aL(cL),pL=e=>{let{__scopeTooltip:t,delayDuration:n=lL,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=z.useRef(!0),s=z.useRef(!1),c=z.useRef(0);return z.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,B.jsx)(dL,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:z.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:z.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:z.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};pL.displayName=cL;var mL=`Tooltip`,[hL,gL]=aL(mL),_L=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=fL(mL,e.__scopeTooltip),l=sL(t),[u,d]=z.useState(null),f=dd(),p=z.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=z.useRef(!1),[_,v]=$u({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(uL))):c.onClose(),a?.(e)},caller:mL}),y=z.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=z.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=z.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=z.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return z.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,B.jsx)(Bw,{...l,children:(0,B.jsx)(hL,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:z.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:z.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};_L.displayName=mL;var vL=`TooltipTrigger`,yL=z.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=gL(vL,n),a=fL(vL,n),o=sL(n),s=K(t,z.useRef(null),i.onTriggerChange),c=z.useRef(!1),l=z.useRef(!1),u=z.useCallback(()=>c.current=!1,[]);return z.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,B.jsx)(Vw,{asChild:!0,...o,children:(0,B.jsx)(J.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:q(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:q(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:q(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:q(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:q(e.onBlur,i.onClose),onClick:q(e.onClick,i.onClose)})})});yL.displayName=vL;var bL=`TooltipPortal`,[xL,SL]=aL(bL,{forceMount:void 0}),CL=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=gL(bL,t);return(0,B.jsx)(xL,{scope:t,forceMount:n,children:(0,B.jsx)(ad,{present:n||a.open,children:(0,B.jsx)(_m,{asChild:!0,container:i,children:r})})})};CL.displayName=bL;var wL=`TooltipContent`,TL=z.forwardRef((e,t)=>{let n=SL(wL,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=gL(wL,e.__scopeTooltip);return(0,B.jsx)(ad,{present:r||o.open,children:o.disableHoverableContent?(0,B.jsx)(AL,{side:i,...a,ref:t}):(0,B.jsx)(EL,{side:i,...a,ref:t})})}),EL=z.forwardRef((e,t)=>{let n=gL(wL,e.__scopeTooltip),r=fL(wL,e.__scopeTooltip),i=z.useRef(null),a=K(t,i),[o,s]=z.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=z.useCallback(()=>{s(null),d(!1)},[d]),p=z.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=PL(r,NL(r,n.getBoundingClientRect())),a=FL(t.getBoundingClientRect());s(LL([...i,...a])),d(!0)},[d]);return z.useEffect(()=>()=>f(),[f]),z.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),z.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!IL(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,B.jsx)(AL,{...e,ref:a})}),[DL,OL]=aL(mL,{isInside:!1}),kL=Ku(`TooltipContent`),AL=z.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=gL(wL,n),l=sL(n),{onClose:u}=c;return z.useEffect(()=>(document.addEventListener(uL,u),()=>document.removeEventListener(uL,u)),[u]),z.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,B.jsx)(Gp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,B.jsxs)(Hw,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,B.jsx)(kL,{children:r}),(0,B.jsx)(DL,{scope:n,isInside:!0,children:(0,B.jsx)(FM,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});TL.displayName=wL;var jL=`TooltipArrow`,ML=z.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=sL(n);return OL(jL,n).isInside?null:(0,B.jsx)(Uw,{...i,...r,ref:t})});ML.displayName=jL;function NL(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function PL(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function FL(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function IL(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function LL(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),RL(t)}function RL(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var zL=TL,BL=[`PageUp`,`PageDown`],VL=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],HL={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},UL=`Slider`,[WL,GL,KL]=Xu(UL),[qL,JL]=zu(UL,[KL]),[YL,XL]=qL(UL),ZL=z.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=z.useRef(new Set),_=z.useRef(0),v=o===`horizontal`?eR:tR,[y=[],b]=$u({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),x=z.useRef(y);function S(e){T(e,hR(y,e))}function C(e){T(e,_.current)}function w(){let e=x.current[_.current];y[_.current]!==e&&f(y)}function T(e,t,{commit:n}={commit:!1}){let o=bR(a),s=yI(xR(Math.round((e-r)/a)*a+r,o),[r,i]);b((e=[])=>{let r=fR(e,s,t);if(vR(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,B.jsx)(YL,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,B.jsx)(WL.Provider,{scope:e.__scopeSlider,children:(0,B.jsx)(WL.Slot,{scope:e.__scopeSlider,children:(0,B.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:q(h.onPointerDown,()=>{s||(x.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:S,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:w,onHomeKeyDown:()=>!s&&T(r,0,{commit:!0}),onEndKeyDown:()=>!s&&T(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=BL.includes(e.key)||e.shiftKey&&VL.includes(e.key)?10:1,r=_.current,i=y[r];T(i+a*n*t,r,{commit:!0})}}})})})})});ZL.displayName=UL;var[QL,$L]=qL(UL,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),eR=z.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=z.useState(null),p=K(t,e=>f(e)),m=z.useRef(void 0),h=Od(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=yR([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,B.jsx)(QL,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,B.jsx)(nR,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=HL[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),tR=z.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=z.useRef(null),d=K(t,u),f=z.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=yR([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,B.jsx)(QL,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,B.jsx)(nR,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=HL[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),nR=z.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=XL(UL,n);return(0,B.jsx)(J.span,{...l,ref:t,onKeyDown:q(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):BL.concat(VL).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:q(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:q(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:q(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),rR=`SliderTrack`,iR=z.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=XL(rR,n);return(0,B.jsx)(J.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});iR.displayName=rR;var aR=`SliderRange`,oR=z.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=XL(aR,n),a=$L(aR,n),o=K(t,z.useRef(null)),s=i.values.length,c=i.values.map(e=>pR(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,B.jsx)(J.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});oR.displayName=aR;var sR=`SliderThumb`,cR=z.forwardRef((e,t)=>{let n=GL(e.__scopeSlider),[r,i]=z.useState(null),a=K(t,e=>i(e)),o=z.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,B.jsx)(lR,{...e,ref:a,index:o})}),lR=z.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=XL(sR,n),s=$L(sR,n),[c,l]=z.useState(null),u=K(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=Xv(c),p=o.values[r],m=p===void 0?0:pR(p,o.min,o.max),h=mR(r,o.values.length),g=f?.[s.size],_=g?gR(g,m,s.direction):0;return z.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,B.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,B.jsx)(WL.ItemSlot,{scope:e.__scopeSlider,children:(0,B.jsx)(J.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:q(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,B.jsx)(dR,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});cR.displayName=sR;var uR=`RadioBubbleInput`,dR=z.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=z.useRef(null),a=K(i,r),o=Yv(t);return z.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,B.jsx)(J.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});dR.displayName=uR;function fR(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function pR(e,t,n){return yI(100/(n-t)*(e-t),[0,100])}function mR(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function hR(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function gR(e,t,n){let r=e/2;return(r-yR([0,50],[0,r])(t)*n)*n}function _R(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function vR(e,t){if(t>0){let n=_R(e);return Math.min(...n)>=t}return!0}function yR(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function bR(e){return(String(e).split(`.`)[1]||``).length}function xR(e,t){let n=10**t;return Math.round(e*n)/n}var SR=ZL,CR=iR,wR=oR,TR=cR;n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))();var ER=`Switch`,[DR,OR]=zu(ER),[kR,AR]=DR(ER),jR=z.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=z.useState(null),m=K(t,e=>p(e)),h=z.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=$u({prop:i,defaultProp:a??!1,onChange:l,caller:ER});return(0,B.jsxs)(kR,{scope:n,checked:_,disabled:s,children:[(0,B.jsx)(J.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":IR(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:q(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,B.jsx)(FR,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});jR.displayName=ER;var MR=`SwitchThumb`,NR=z.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=AR(MR,n);return(0,B.jsx)(J.span,{"data-state":IR(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});NR.displayName=MR;var PR=`SwitchBubbleInput`,FR=z.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=z.useRef(null),s=K(o,a),c=Yv(n),l=Xv(t);return z.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,B.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});FR.displayName=PR;function IR(e){return e?`checked`:`unchecked`}var LR=jR,RR=NR,zR=`Tabs`,[BR,VR]=zu(zR,[jT]),HR=jT(),[UR,WR]=BR(zR),GR=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Od(s),[d,f]=$u({prop:r,onChange:i,defaultProp:a??``,caller:zR});return(0,B.jsx)(UR,{scope:n,baseId:dd(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,B.jsx)(J.div,{dir:u,"data-orientation":o,...l,ref:t})})});GR.displayName=zR;var KR=`TabsList`,qR=z.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=WR(KR,n),o=HR(n);return(0,B.jsx)(UT,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,B.jsx)(J.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});qR.displayName=KR;var JR=`TabsTrigger`,YR=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=WR(JR,n),s=HR(n),c=QR(o.baseId,r),l=$R(o.baseId,r),u=r===o.value;return(0,B.jsx)(WT,{asChild:!0,...s,focusable:!i,active:u,children:(0,B.jsx)(J.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:q(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:q(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:q(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});YR.displayName=JR;var XR=`TabsContent`,ZR=z.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=WR(XR,n),c=QR(s.baseId,r),l=$R(s.baseId,r),u=r===s.value,d=z.useRef(u);return z.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,B.jsx)(ad,{present:i||u,children:({present:n})=>(0,B.jsx)(J.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});ZR.displayName=XR;function QR(e,t){return`${e}-trigger-${t}`}function $R(e,t){return`${e}-content-${t}`}var ez=qR,tz=YR,nz=ZR,rz=`ToastProvider`,[iz,az,oz]=Xu(`Toast`),[sz,cz]=zu(`Toast`,[oz]),[lz,uz]=sz(rz),dz=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=z.useState(null),[l,u]=z.useState(0),d=z.useRef(!1),f=z.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${rz}\`. Expected non-empty \`string\`.`),(0,B.jsx)(iz.Provider,{scope:t,children:(0,B.jsx)(lz,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:z.useCallback(()=>u(e=>e+1),[]),onToastRemove:z.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};dz.displayName=rz;var fz=`ToastViewport`,pz=[`F8`],mz=`toast.viewportPause`,hz=`toast.viewportResume`,gz=z.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=pz,label:i=`Notifications ({hotkey})`,...a}=e,o=uz(fz,n),s=az(n),c=z.useRef(null),l=z.useRef(null),u=z.useRef(null),d=z.useRef(null),f=K(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;z.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),z.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(mz);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(hz);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=z.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...Uz(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return z.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Wz(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),(0,B.jsxs)($p,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,B.jsx)(vz,{ref:l,onFocusFromOutsideViewport:()=>{Wz(h({tabbingDirection:`forwards`}))}}),(0,B.jsx)(iz.Slot,{scope:n,children:(0,B.jsx)(J.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,B.jsx)(vz,{ref:u,onFocusFromOutsideViewport:()=>{Wz(h({tabbingDirection:`backwards`}))}})]})});gz.displayName=fz;var _z=`ToastFocusProxy`,vz=z.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=uz(_z,n);return(0,B.jsx)(PM,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});vz.displayName=_z;var yz=`Toast`,bz=`toast.swipeStart`,xz=`toast.swipeMove`,Sz=`toast.swipeCancel`,Cz=`toast.swipeEnd`,wz=z.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=$u({prop:r,defaultProp:i??!0,onChange:a,caller:yz});return(0,B.jsx)(ad,{present:n||s,children:(0,B.jsx)(Dz,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:Lp(e.onPause),onResume:Lp(e.onResume),onSwipeStart:q(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:q(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:q(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:q(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});wz.displayName=yz;var[Tz,Ez]=sz(yz,{onClose(){}}),Dz=z.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=uz(yz,n),[g,_]=z.useState(null),v=K(t,e=>_(e)),y=z.useRef(null),b=z.useRef(null),x=i||h.duration,S=z.useRef(0),C=z.useRef(x),w=z.useRef(0),{onToastAdd:T,onToastRemove:E}=h,D=Lp(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),O=z.useCallback(e=>{!e||e===1/0||(window.clearTimeout(w.current),S.current=new Date().getTime(),w.current=window.setTimeout(D,e))},[D]);z.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{O(C.current),l?.()},n=()=>{let e=new Date().getTime()-S.current;C.current-=e,window.clearTimeout(w.current),c?.()};return e.addEventListener(mz,n),e.addEventListener(hz,t),()=>{e.removeEventListener(mz,n),e.removeEventListener(hz,t)}}},[h.viewport,x,c,l,O]),z.useEffect(()=>{a&&!h.isClosePausedRef.current&&O(x)},[a,x,h.isClosePausedRef,O]),z.useEffect(()=>(T(),()=>E()),[T,E]);let k=z.useMemo(()=>g?Rz(g):null,[g]);return h.viewport?(0,B.jsxs)(B.Fragment,{children:[k&&(0,B.jsx)(Oz,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:k}),(0,B.jsx)(Tz,{scope:n,onClose:D,children:nd.createPortal((0,B.jsx)(iz.ItemSlot,{scope:n,children:(0,B.jsx)(Qp,{asChild:!0,onEscapeKeyDown:q(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||D(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,B.jsx)(J.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:q(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:q(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:q(e.onPointerMove,e=>{if(!y.current)return;let t=e.clientX-y.current.x,n=e.clientY-y.current.y,r=!!b.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(b.current=l,zz(xz,d,f,{discrete:!1})):Bz(l,h.swipeDirection,c)?(b.current=l,zz(bz,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:q(e.onPointerUp,e=>{let t=b.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),b.current=null,y.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Bz(t,h.swipeDirection,h.swipeThreshold)?zz(Cz,p,r,{discrete:!0}):zz(Sz,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Oz=e=>{let{__scopeToast:t,children:n,...r}=e,i=uz(yz,t),[a,o]=z.useState(!1),[s,c]=z.useState(!1);return Vz(()=>o(!0)),z.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,B.jsx)(_m,{asChild:!0,children:(0,B.jsx)(PM,{...r,children:a&&(0,B.jsxs)(B.Fragment,{children:[i.label,` `,n]})})})},kz=`ToastTitle`,Az=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,B.jsx)(J.div,{...r,ref:t})});Az.displayName=kz;var jz=`ToastDescription`,Mz=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,B.jsx)(J.div,{...r,ref:t})});Mz.displayName=jz;var Nz=`ToastAction`,Pz=z.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,B.jsx)(Lz,{altText:n,asChild:!0,children:(0,B.jsx)(Iz,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Nz}\`. Expected non-empty \`string\`.`),null)});Pz.displayName=Nz;var Fz=`ToastClose`,Iz=z.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=Ez(Fz,n);return(0,B.jsx)(Lz,{asChild:!0,children:(0,B.jsx)(J.button,{type:`button`,...r,ref:t,onClick:q(e.onClick,i.onClose)})})});Iz.displayName=Fz;var Lz=z.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,B.jsx)(J.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Rz(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Hz(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Rz(e))}}),t}function zz(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?rd(i,a):i.dispatchEvent(a)}var Bz=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function Vz(e=()=>{}){let t=Lp(e);Zu(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function Hz(e){return e.nodeType===e.ELEMENT_NODE}function Uz(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Wz(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var Gz=gz,Kz=wz,qz=Az,Jz=Mz,Yz=Pz,Xz=Iz,Zz=`Toggle`,Qz=z.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=$u({prop:n,onChange:i,defaultProp:r??!1,caller:Zz});return(0,B.jsx)(J.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:q(e.onClick,()=>{e.disabled||s(!o)})})});Qz.displayName=Zz;var $z=Qz,eB=`ToggleGroup`,[tB,nB]=zu(eB,[jT]),rB=jT(),iB=z.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,B.jsx)(sB,{...r,ref:t});if(n===`multiple`)return(0,B.jsx)(cB,{...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${eB}\``)});iB.displayName=eB;var[aB,oB]=tB(eB),sB=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=$u({prop:n,defaultProp:r??``,onChange:i,caller:eB});return(0,B.jsx)(aB,{scope:e.__scopeToggleGroup,type:`single`,value:z.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:z.useCallback(()=>s(``),[s]),children:(0,B.jsx)(dB,{...a,ref:t})})}),cB=z.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=$u({prop:n,defaultProp:r??[],onChange:i,caller:eB}),c=z.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=z.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,B.jsx)(aB,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,B.jsx)(dB,{...a,ref:t})})});iB.displayName=eB;var[lB,uB]=tB(eB),dB=z.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=rB(n),u=Od(o),d={role:`group`,dir:u,...c};return(0,B.jsx)(lB,{scope:n,rovingFocus:i,disabled:r,children:i?(0,B.jsx)(UT,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,B.jsx)(J.div,{...d,ref:t})}):(0,B.jsx)(J.div,{...d,ref:t})})}),fB=`ToggleGroupItem`,pB=z.forwardRef((e,t)=>{let n=oB(fB,e.__scopeToggleGroup),r=uB(fB,e.__scopeToggleGroup),i=rB(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=z.useRef(null);return r.rovingFocus?(0,B.jsx)(WT,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,B.jsx)(mB,{...s,ref:t})}):(0,B.jsx)(mB,{...s,ref:t})});pB.displayName=fB;var mB=z.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=oB(fB,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,B.jsx)(Qz,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),hB=iB,gB=pB,_B=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m6 9l6 6l6-6`})});function $(...e){return Np(uf(e))}function vB(e){return e===void 0?void 0:Array.isArray(e)?e:[e]}var yB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(af,{ref:n,className:$(`border-b`,e),...t}));yB.displayName=`AccordionItem`;var bB=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsx)(of,{className:`flex`,children:(0,B.jsxs)(sf,{ref:r,className:$(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,B.jsx)(_B,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));bB.displayName=sf.displayName;var xB=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsx)(cf,{ref:r,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,B.jsx)(`div`,{className:$(`pb-4 pt-0`,e),children:t})}));xB.displayName=cf.displayName;var SB=Ip(`relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground`,{variants:{variant:{default:`bg-background text-foreground`,destructive:`border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive`}},defaultVariants:{variant:`default`}}),CB=z.forwardRef(({className:e,variant:t,...n},r)=>(0,B.jsx)(`div`,{ref:r,role:`alert`,className:$(SB({variant:t}),e),...n}));CB.displayName=`Alert`;var wB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`h5`,{ref:n,className:$(`mb-1 font-medium leading-none tracking-tight`,e),...t}));wB.displayName=`AlertTitle`;var TB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{ref:n,className:$(`text-sm [&_p]:leading-relaxed`,e),...t}));TB.displayName=`AlertDescription`;var EB=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21 12a9 9 0 1 1-6.219-8.56`})}),DB=Ip(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-button text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`,red:`bg-red-500 text-white hover:bg-red-600`,yellow:`bg-yellow-500 text-white hover:bg-yellow-600`,green:`bg-green-500 text-white hover:bg-green-600`,blue:`bg-blue-500 text-white hover:bg-blue-600`,cyan:`bg-cyan-500 text-white hover:bg-cyan-600`,purple:`bg-purple-500 text-white hover:bg-purple-600`,pink:`bg-pink-500 text-white hover:bg-pink-600`,orange:`bg-orange-500 text-white hover:bg-orange-600`},size:{xs:`h-6 px-2 py-1 text-xs [&_svg]:size-3 has-[>svg]:px-1.5 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`,sm:`h-7 px-3 py-1.5 text-xs [&_svg]:size-3.5 has-[>svg]:px-2 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`,default:`h-9 px-4 py-2 [&_svg]:size-4 has-[>svg]:px-3 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`,lg:`h-11 px-6 py-3 text-base [&_svg]:size-5 has-[>svg]:px-4 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`,xl:`h-13 px-8 py-4 text-lg [&_svg]:size-6 has-[>svg]:px-6 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square`}},defaultVariants:{variant:`default`,size:`default`}}),OB=z.forwardRef(({className:e,variant:t,size:n,icon:r,children:i,loading:a,disabled:o,asChild:s=!1,...c},l)=>{let u=s?u_:`button`,d=z.Children.count(i)===0,f=a?(0,B.jsx)(EB,{className:`animate-spin`}):r;return(0,B.jsx)(u,{"data-slot":`button`,className:$(DB({variant:t,size:n,className:e})),ref:l,disabled:o||a,...c,children:d?f:f?(0,B.jsxs)(`span`,{className:`contents`,children:[f,i]}):i})});OB.displayName=`Button`;var kB=Qg,AB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)($g,{className:$(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));AB.displayName=$g.displayName;var jB=z.forwardRef(({className:e,...t},n)=>(0,B.jsxs)(kB,{children:[(0,B.jsx)(AB,{}),(0,B.jsx)(e_,{ref:n,className:$(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...t})]}));jB.displayName=e_.displayName;var MB=({className:e,...t})=>(0,B.jsx)(`div`,{className:$(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});MB.displayName=`AlertDialogHeader`;var NB=({className:e,...t})=>(0,B.jsx)(`div`,{className:$(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});NB.displayName=`AlertDialogFooter`;var PB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(r_,{ref:n,className:$(`text-lg font-semibold`,e),...t}));PB.displayName=r_.displayName;var FB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(i_,{ref:n,className:$(`text-sm text-muted-foreground`,e),...t}));FB.displayName=i_.displayName;var IB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(t_,{ref:n,className:$(DB(),e),...t}));IB.displayName=t_.displayName;var LB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(n_,{ref:n,className:$(DB({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));LB.displayName=n_.displayName;var RB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(I_,{ref:n,className:$(`relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full`,e),...t}));RB.displayName=I_.displayName;var zB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(L_,{ref:n,className:$(`aspect-square h-full w-full`,e),...t}));zB.displayName=L_.displayName;var BB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(R_,{ref:n,className:$(`flex h-full w-full items-center justify-center rounded-full bg-muted`,e),...t}));BB.displayName=R_.displayName;var VB=Ip(`inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function HB({className:e,variant:t,asChild:n=!1,...r}){return(0,B.jsx)(n?u_:`span`,{"data-slot":`badge`,className:$(VB({variant:t}),e),...r})}var UB=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m9 18l6-6l-6-6`})}),WB=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`circle`,{cx:12,cy:12,r:1}),(0,B.jsx)(`circle`,{cx:19,cy:12,r:1}),(0,B.jsx)(`circle`,{cx:5,cy:12,r:1})]})}),GB=z.forwardRef(({...e},t)=>(0,B.jsx)(`nav`,{ref:t,"aria-label":`breadcrumb`,...e}));GB.displayName=`Breadcrumb`;var KB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`ol`,{ref:n,className:$(`flex flex-wrap items-center gap-1.5 overflow-wrap-anywhere text-sm text-muted-foreground sm:gap-2.5`,e),...t}));KB.displayName=`BreadcrumbList`;var qB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`li`,{ref:n,className:$(`inline-flex items-center gap-1.5`,e),...t}));qB.displayName=`BreadcrumbItem`;var JB=z.forwardRef(({asChild:e,className:t,...n},r)=>(0,B.jsx)(e?u_:`a`,{ref:r,className:$(`transition-colors hover:text-foreground`,t),...n}));JB.displayName=`BreadcrumbLink`;var YB=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`span`,{ref:n,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:$(`font-normal text-foreground`,e),...t}));YB.displayName=`BreadcrumbPage`;var XB=({children:e,className:t,...n})=>(0,B.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:$(`[&>svg]:w-3.5 [&>svg]:h-3.5`,t),...n,children:e??(0,B.jsx)(UB,{})});XB.displayName=`BreadcrumbSeparator`;var ZB=({className:e,...t})=>(0,B.jsxs)(`span`,{role:`presentation`,"aria-hidden":`true`,className:$(`flex h-9 w-9 items-center justify-center`,e),...t,children:[(0,B.jsx)(WB,{className:`h-4 w-4`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`More`})]});ZB.displayName=`BreadcrumbElipssis`;var QB=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m12 19l-7-7l7-7m7 7H5`})}),$B=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 12h14m-7-7l7 7l-7 7`})}),eV=z.createContext(null);function tV(){let e=z.useContext(eV);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}var nV=z.forwardRef(({orientation:e=`horizontal`,opts:t,setApi:n,plugins:r,className:i,children:a,...o},s)=>{let[c,l]=Jv({...t,axis:e===`horizontal`?`x`:`y`},r),[u,d]=z.useState(!1),[f,p]=z.useState(!1),m=z.useCallback(e=>{e&&(d(e.canScrollPrev()),p(e.canScrollNext()))},[]),h=z.useCallback(()=>{l?.scrollPrev()},[l]),g=z.useCallback(()=>{l?.scrollNext()},[l]),_=z.useCallback(e=>{e.key===`ArrowLeft`?(e.preventDefault(),h()):e.key===`ArrowRight`&&(e.preventDefault(),g())},[h,g]);return z.useEffect(()=>{!l||!n||n(l)},[l,n]),z.useEffect(()=>{if(l)return m(l),l.on(`reInit`,m),l.on(`select`,m),()=>{l?.off(`select`,m)}},[l,m]),(0,B.jsx)(eV.Provider,{value:{carouselRef:c,api:l,opts:t,orientation:e||(t?.axis===`y`?`vertical`:`horizontal`),scrollPrev:h,scrollNext:g,canScrollPrev:u,canScrollNext:f},children:(0,B.jsx)(`div`,{ref:s,onKeyDownCapture:_,className:$(`relative`,i),role:`region`,"aria-roledescription":`carousel`,...o,children:a})})});nV.displayName=`Carousel`;var rV=z.forwardRef(({className:e,...t},n)=>{let{carouselRef:r,orientation:i}=tV();return(0,B.jsx)(`div`,{ref:r,className:`overflow-hidden`,children:(0,B.jsx)(`div`,{ref:n,className:$(`flex`,i===`horizontal`?`-ml-4`:`-mt-4 flex-col`,e),...t})})});rV.displayName=`CarouselContent`;var iV=z.forwardRef(({className:e,...t},n)=>{let{orientation:r}=tV();return(0,B.jsx)(`div`,{ref:n,role:`group`,"aria-roledescription":`slide`,className:$(`min-w-0 shrink-0 grow-0 basis-full`,r===`horizontal`?`pl-4`:`pt-4`,e),...t})});iV.displayName=`CarouselItem`;var aV=z.forwardRef(({className:e,variant:t=`outline`,size:n=`default`,...r},i)=>{let{orientation:a,scrollPrev:o,canScrollPrev:s}=tV();return(0,B.jsxs)(OB,{ref:i,variant:t,size:n,className:$(`absolute h-8 w-8 rounded-full`,a===`horizontal`?`-left-12 top-1/2 -translate-y-1/2`:`-top-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!s,onClick:o,...r,children:[(0,B.jsx)(QB,{className:`h-4 w-4`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Previous slide`})]})});aV.displayName=`CarouselPrevious`;var oV=z.forwardRef(({className:e,variant:t=`outline`,size:n=`default`,...r},i)=>{let{orientation:a,scrollNext:o,canScrollNext:s}=tV();return(0,B.jsxs)(OB,{ref:i,variant:t,size:n,className:$(`absolute h-8 w-8 rounded-full`,a===`horizontal`?`-right-12 top-1/2 -translate-y-1/2`:`-bottom-12 left-1/2 -translate-x-1/2 rotate-90`,e),disabled:!s,onClick:o,...r,children:[(0,B.jsx)($B,{className:`h-4 w-4`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Next slide`})]})});oV.displayName=`CarouselNext`;var sV=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M20 6L9 17l-5-5`})}),cV=z.forwardRef(({className:e,name:t,checked:n,value:r,defaultChecked:i,onValueChange:a,onBlur:o,label:s,labelClassName:c,disabled:l,...u},d)=>{let f=r===void 0?n:r,p=z.useRef(null),m=z.useRef(null),h=z.useId();z.useImperativeHandle(d,()=>p.current);let g=e=>{a?.(e===`indeterminate`?!1:e)},_=e=>{e.preventDefault(),!l&&m.current?.click()},v=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`input`,{type:`checkbox`,ref:p,name:t,defaultChecked:i===!0,onBlur:o,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),(0,B.jsx)(ay,{ref:m,"data-slot":`checkbox`,checked:f,defaultChecked:i,onCheckedChange:g,disabled:l,"aria-labelledby":s?h:void 0,className:$(`peer border border-muted-foreground/30 bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...u,children:(0,B.jsx)(sy,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,B.jsx)(sV,{className:`size-3.5`})})})]});return s?(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[v,(0,B.jsx)(`label`,{id:h,className:$(`text-sm cursor-pointer select-none`,l&&`cursor-not-allowed opacity-50`,c),onClick:_,children:s})]}):v});cV.displayName=`Checkbox`;var lV=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m7 15l5 5l5-5M7 9l5-5l5 5`})}),uV=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`circle`,{cx:12,cy:12,r:10}),(0,B.jsx)(`path`,{d:`m15 9l-6 6m0-6l6 6`})]})}),dV={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},fV=e=>`[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`,pV=()=>()=>{throw Error(fV(`uploader`))},mV=()=>e=>dV[e],hV=(0,z.createContext)({});function gV({children:e,authOptions:t,...n}){let r=(0,z.useRef)(void 0);t&&!r.current&&(r.current=dx(t));let i={uploader:n.uploader??pV(),auth:n.auth??r.current,SD:n.SD??mV()};return(0,B.jsx)(hV.Provider,{value:i,children:e})}function _V(){return(0,z.useContext)(hV)}var vV=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,B.jsx)(`path`,{d:`m21 21l-4.34-4.34`}),(0,B.jsx)(`circle`,{cx:11,cy:11,r:8})]})}),yV=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 6L6 18M6 6l12 12`})}),bV=xg,xV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Sg,{ref:n,className:$(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));xV.displayName=Sg.displayName;var SV=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(bV,{children:[(0,B.jsx)(xV,{}),(0,B.jsxs)(Cg,{ref:r,className:$(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...n,children:[t,(0,B.jsxs)(Eg,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,B.jsx)(yV,{className:`h-4 w-4`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));SV.displayName=Cg.displayName;var CV=({className:e,...t})=>(0,B.jsx)(`div`,{className:$(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});CV.displayName=`DialogHeader`;var wV=({className:e,...t})=>(0,B.jsx)(`div`,{className:$(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});wV.displayName=`DialogFooter`;var TV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(wg,{ref:n,className:$(`text-lg font-semibold leading-none tracking-tight`,e),...t}));TV.displayName=wg.displayName;var EV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Tg,{ref:n,className:$(`text-sm text-muted-foreground`,e),...t}));EV.displayName=Tg.displayName;var DV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Yx,{ref:n,className:$(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t}));DV.displayName=Yx.displayName;var OV=z.forwardRef(({className:e,...t},n)=>(0,B.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,B.jsx)(vV,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,B.jsx)(Yx.Input,{ref:n,className:$(`flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));OV.displayName=Yx.Input.displayName;var kV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Yx.List,{ref:n,className:$(`max-h-[300px] overflow-y-auto overflow-x-hidden`,e),...t}));kV.displayName=Yx.List.displayName;var AV=z.forwardRef((e,t)=>(0,B.jsx)(Yx.Empty,{ref:t,className:`py-6 text-center text-sm`,...e}));AV.displayName=Yx.Empty.displayName;var jV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Yx.Group,{ref:n,className:$(`overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground`,e),...t}));jV.displayName=Yx.Group.displayName;var MV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Yx.Separator,{ref:n,className:$(`-mx-1 h-px bg-border`,e),...t}));MV.displayName=Yx.Separator.displayName;var NV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Yx.Item,{ref:n,className:$(`relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 **:[svg]:pointer-events-none **:[svg]:size-4 **:[svg]:shrink-0`,e),...t}));NV.displayName=Yx.Item.displayName;var PV=({className:e,...t})=>(0,B.jsx)(`span`,{className:$(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});PV.displayName=`CommandShortcut`;function FV({...e}){return(0,B.jsx)(gT,{"data-slot":`popover`,...e})}function IV({...e}){return(0,B.jsx)(_T,{"data-slot":`popover-trigger`,...e})}function LV({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,B.jsx)(vT,{children:(0,B.jsx)(yT,{"data-slot":`popover-content`,align:t,sideOffset:n,className:$(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...r})})}var RV=z.forwardRef(({options:e,name:t,value:n,onValueChange:r,onBlur:i,placeholder:a,searchPlaceholder:o,emptyText:s,disabled:c=!1,className:l,clearable:u=!1},d)=>{let{SD:f}=_V(),[p,m]=z.useState(!1),h=z.useRef(null),g=a??f(`rc.combobox.selectPlaceholder`),_=o??f(`common.searchPlaceholder`),v=s??f(`rc.combobox.noResults`);z.useImperativeHandle(d,()=>h.current);let y=e=>{r?.((e===n?``:e)||void 0),m(!1)},b=e=>{e.preventDefault(),e.stopPropagation(),r?.(void 0),m(!1)},x=!!n;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`input`,{type:`hidden`,ref:h,name:t,value:n||``,onBlur:i}),(0,B.jsxs)(FV,{open:p,onOpenChange:m,children:[(0,B.jsx)(IV,{asChild:!0,children:(0,B.jsxs)(OB,{variant:`outline`,role:`combobox`,"aria-expanded":p,disabled:c,className:$(`w-full justify-between`,l),children:[(0,B.jsx)(`span`,{className:`flex-1 truncate text-left`,children:n?e.find(e=>e.value===n)?.label:g}),(0,B.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0 pl-2`,children:[u&&x&&(0,B.jsx)(`span`,{className:`flex items-center justify-center`,onMouseDown:e=>e.stopPropagation(),onClick:b,children:(0,B.jsx)(uV,{className:`h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity`})}),(0,B.jsx)(lV,{className:`h-4 w-4 opacity-50`})]})]})}),(0,B.jsx)(LV,{className:`w-full p-0`,children:(0,B.jsxs)(DV,{children:[(0,B.jsx)(OV,{placeholder:_,className:`h-9`}),(0,B.jsxs)(kV,{children:[(0,B.jsx)(AV,{children:v}),(0,B.jsx)(jV,{children:e.map(e=>(0,B.jsxs)(NV,{value:e.value,onSelect:y,children:[e.label,(0,B.jsx)(sV,{className:$(`ml-auto`,n===e.value?`opacity-100`:`opacity-0`)})]},e.value))})]})]})})]})]})});RV.displayName=`Combobox`,xT({open:!1,reactNode:null});var zV=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`circle`,{cx:12,cy:12,r:10,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2})}),BV=z.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,B.jsxs)(yO,{ref:i,className:$(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,t&&`pl-8`,e),...r,children:[n,(0,B.jsx)(UB,{className:`ml-auto h-4 w-4`})]}));BV.displayName=yO.displayName;var VV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(bO,{ref:n,className:$(`z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-context-menu-content-transform-origin]`,e),...t}));VV.displayName=bO.displayName;var HV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(dO,{children:(0,B.jsx)(fO,{ref:n,className:$(`z-50 max-h-[--radix-context-menu-content-available-height] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-context-menu-content-transform-origin]`,e),...t})}));HV.displayName=fO.displayName;var UV=z.forwardRef(({className:e,inset:t,...n},r)=>(0,B.jsx)(mO,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,t&&`pl-8`,e),...n}));UV.displayName=mO.displayName;var WV=z.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,B.jsxs)(hO,{ref:i,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),checked:n,...r,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,B.jsx)(_O,{children:(0,B.jsx)(sV,{className:`h-4 w-4`})})}),t]}));WV.displayName=hO.displayName;var GV=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(gO,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,B.jsx)(_O,{children:(0,B.jsx)(zV,{className:`h-2 w-2 fill-current`})})}),t]}));GV.displayName=gO.displayName;var KV=z.forwardRef(({className:e,inset:t,...n},r)=>(0,B.jsx)(pO,{ref:r,className:$(`px-2 py-1.5 text-sm font-semibold text-foreground`,t&&`pl-8`,e),...n}));KV.displayName=pO.displayName;var qV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(vO,{ref:n,className:$(`-mx-1 my-1 h-px bg-border`,e),...t}));qV.displayName=vO.displayName;var JV=({className:e,...t})=>(0,B.jsx)(`span`,{className:$(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});JV.displayName=`ContextMenuShortcut`;var YV=z.forwardRef(({className:e,type:t,onValueChange:n,onChange:r,...i},a)=>{let o=e=>{n?.(e.target.value),r?.(e)};return(0,B.jsx)(`input`,{type:t,"data-slot":`input`,className:$(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),ref:a,...i,onChange:o})});YV.displayName=`Input`;var XV=({shouldScaleBackground:e=!0,...t})=>(0,B.jsx)(Tk.Root,{shouldScaleBackground:e,...t});XV.displayName=`Drawer`,Tk.Trigger;var ZV=Tk.Portal;Tk.Close;var QV=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Tk.Overlay,{ref:n,className:$(`fixed inset-0 z-50 bg-black/80`,e),...t}));QV.displayName=Tk.Overlay.displayName;var $V=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(ZV,{children:[(0,B.jsx)(QV,{}),(0,B.jsxs)(Tk.Content,{ref:r,className:$(`fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background`,e),...n,children:[(0,B.jsx)(`div`,{className:`mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted`}),t]})]}));$V.displayName=`DrawerContent`;var eH=({className:e,...t})=>(0,B.jsx)(`div`,{className:$(`grid gap-1.5 p-4 text-center sm:text-left`,e),...t});eH.displayName=`DrawerHeader`;var tH=({className:e,...t})=>(0,B.jsx)(`div`,{className:$(`mt-auto flex flex-col gap-2 p-4`,e),...t});tH.displayName=`DrawerFooter`;var nH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Tk.Title,{ref:n,className:$(`text-lg font-semibold leading-none tracking-tight`,e),...t}));nH.displayName=Tk.Title.displayName;var rH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Tk.Description,{ref:n,className:$(`text-sm text-muted-foreground`,e),...t}));rH.displayName=Tk.Description.displayName;var iH=z.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,B.jsxs)(hA,{ref:i,className:$(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,B.jsx)(UB,{className:`ml-auto`})]}));iH.displayName=hA.displayName;var aH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(gA,{ref:n,className:$(`z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-dropdown-menu-content-transform-origin]`,e),...t}));aH.displayName=gA.displayName;var oH=z.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,B.jsx)(sA,{children:(0,B.jsx)(cA,{ref:r,sideOffset:t,className:$(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-dropdown-menu-content-transform-origin]`,e),...n})}));oH.displayName=cA.displayName;var sH=z.forwardRef(({className:e,inset:t,...n},r)=>(0,B.jsx)(uA,{ref:r,className:$(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...n}));sH.displayName=uA.displayName;var cH=z.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,B.jsxs)(dA,{ref:i,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),checked:n,...r,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,B.jsx)(pA,{children:(0,B.jsx)(sV,{className:`h-4 w-4`})})}),t]}));cH.displayName=dA.displayName;var lH=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(fA,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,B.jsx)(pA,{children:(0,B.jsx)(zV,{className:`h-2 w-2 fill-current`})})}),t]}));lH.displayName=fA.displayName;var uH=z.forwardRef(({className:e,inset:t,...n},r)=>(0,B.jsx)(lA,{ref:r,className:$(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));uH.displayName=lA.displayName;var dH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(mA,{ref:n,className:$(`-mx-1 my-1 h-px bg-muted`,e),...t}));dH.displayName=mA.displayName;var fH=({className:e,...t})=>(0,B.jsx)(`span`,{className:$(`ml-auto text-xs tracking-widest opacity-60`,e),...t});fH.displayName=`DropdownMenuShortcut`;var pH=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21 12a9 9 0 1 1-6.219-8.56`})}),mH=Ip(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),hH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(MA,{ref:n,className:$(mH(),e),...t}));hH.displayName=MA.displayName;var gH=z.createContext(null),_H=()=>{let e=z.useContext(gH),t=z.useContext(vH),{getFieldState:n,formState:r}=kA();if(!e)throw Error(`useFormField should be used within <FormField>`);if(!t)throw Error(`useFormField should be used within <FormItem>`);let i=n(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},vH=z.createContext(null),yH=z.forwardRef(({className:e,...t},n)=>{let r=z.useId();return(0,B.jsx)(vH.Provider,{value:{id:r},children:(0,B.jsx)(`div`,{ref:n,className:$(`space-y-2`,e),...t})})});yH.displayName=`FormItem`;var bH=z.forwardRef(({className:e,...t},n)=>{let{error:r,formItemId:i}=_H();return(0,B.jsx)(hH,{ref:n,className:$(r&&`text-destructive`,e),htmlFor:i,...t})});bH.displayName=`FormLabel`;var xH=z.forwardRef(({...e},t)=>{let{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=_H();return(0,B.jsx)(u_,{ref:t,id:r,"aria-describedby":n?`${i} ${a}`:`${i}`,"aria-invalid":!!n,...e})});xH.displayName=`FormControl`;var SH=z.forwardRef(({className:e,...t},n)=>{let{formDescriptionId:r}=_H();return(0,B.jsx)(`p`,{ref:n,id:r,className:$(`text-sm text-muted-foreground`,e),...t})});SH.displayName=`FormDescription`;var CH=z.forwardRef(({className:e,children:t,...n},r)=>{let{error:i,formMessageId:a}=_H(),o=i?String(i?.message??``):t;return o?(0,B.jsx)(`p`,{ref:r,id:a,className:$(`text-sm font-medium text-destructive`,e),...n,children:o}):null});CH.displayName=`FormMessage`;var wH=z.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,B.jsx)(ej,{ref:i,align:t,sideOffset:n,className:$(`z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-hover-card-content-transform-origin]`,e),...r}));wH.displayName=ej.displayName;var TH=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,B.jsx)(`circle`,{cx:12.1,cy:12.1,r:1,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2})}),EH=z.forwardRef(({className:e,containerClassName:t,...n},r)=>(0,B.jsx)(yj,{ref:r,containerClassName:$(`flex items-center gap-2 has-[:disabled]:opacity-50`,t),className:$(`disabled:cursor-not-allowed`,e),...n}));EH.displayName=`InputOTP`;var DH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{ref:n,className:$(`flex items-center`,e),...t}));DH.displayName=`InputOTPGroup`;var OH=z.forwardRef(({index:e,className:t,...n},r)=>{let{char:i,hasFakeCaret:a,isActive:o}=z.useContext(vj).slots[e];return(0,B.jsxs)(`div`,{ref:r,className:$(`relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md`,o&&`z-10 ring-2 ring-ring ring-offset-background`,t),...n,children:[i,a&&(0,B.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,B.jsx)(`div`,{className:`h-4 w-px animate-caret-blink bg-foreground duration-1000`})})]})});OH.displayName=`InputOTPSlot`;var kH=z.forwardRef(({...e},t)=>(0,B.jsx)(`div`,{ref:t,role:`separator`,...e,children:(0,B.jsx)(TH,{})}));kH.displayName=`InputOTPSeparator`;var AH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(mM,{ref:n,className:$(`flex h-10 items-center space-x-1 rounded-md border bg-background p-1`,e),...t}));AH.displayName=mM.displayName;var jH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(hM,{ref:n,className:$(`flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,e),...t}));jH.displayName=hM.displayName;var MH=z.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,B.jsxs)(wM,{ref:i,className:$(`flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,t&&`pl-8`,e),...r,children:[n,(0,B.jsx)(UB,{className:`ml-auto h-4 w-4`})]}));MH.displayName=wM.displayName;var NH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(TM,{ref:n,className:$(`z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-menubar-content-transform-origin]`,e),...t}));NH.displayName=TM.displayName;var PH=z.forwardRef(({className:e,align:t=`start`,alignOffset:n=-4,sideOffset:r=8,...i},a)=>(0,B.jsx)(gM,{children:(0,B.jsx)(_M,{ref:a,align:t,alignOffset:n,sideOffset:r,className:$(`z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-menubar-content-transform-origin]`,e),...i})}));PH.displayName=_M.displayName;var FH=z.forwardRef(({className:e,inset:t,...n},r)=>(0,B.jsx)(yM,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,t&&`pl-8`,e),...n}));FH.displayName=yM.displayName;var IH=z.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,B.jsxs)(bM,{ref:i,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),checked:n,...r,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,B.jsx)(SM,{children:(0,B.jsx)(sV,{className:`h-4 w-4`})})}),t]}));IH.displayName=bM.displayName;var LH=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(xM,{ref:r,className:$(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,B.jsx)(SM,{children:(0,B.jsx)(zV,{className:`h-2 w-2 fill-current`})})}),t]}));LH.displayName=xM.displayName;var RH=z.forwardRef(({className:e,inset:t,...n},r)=>(0,B.jsx)(vM,{ref:r,className:$(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));RH.displayName=vM.displayName;var zH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(CM,{ref:n,className:$(`-mx-1 my-1 h-px bg-muted`,e),...t}));zH.displayName=CM.displayName;var BH=({className:e,...t})=>(0,B.jsx)(`span`,{className:$(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t});BH.displayname=`MenubarShortcut`;var VH=z.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,B.jsx)(jM,{ref:i,decorative:n,orientation:t,className:$(`shrink-0 bg-border`,t===`horizontal`?`h-px w-full`:`h-full w-px`,e),...r}));VH.displayName=jM.displayName;function HH(e){return typeof e==`object`&&!!e&&`value`in e}function UH(e,t){let n=e.multiple===!0,r=e.async===!0,i=(0,z.useRef)(null);(0,z.useImperativeHandle)(t,()=>i.current);let[a,o]=(0,z.useState)(!1),[s,c]=(0,z.useState)(``),[l,u]=(0,z.useState)(new Map),d=r&&`onOpenChange`in e?e.onOpenChange:void 0,f=(0,z.useRef)(a);(0,z.useEffect)(()=>{f.current!==a&&(d&&d(a),f.current=a)},[a,d]);let p=(0,z.useCallback)(t=>t==null?``:e.valueKey?e.valueKey(t):String(t),[e.valueKey]),m=(0,z.useMemo)(()=>e.items.map(e=>HH(e)?e:{value:e}),[e.items]),h=(0,z.useMemo)(()=>{let e=new Map;for(let t of m)e.set(p(t.value),t.value);return e},[m,p]),g=(0,z.useCallback)(t=>{if(e.renderItem)return e.renderItem(t);let n=m.find(e=>e.value===t);if(n?.label!==void 0)return n.label;if(r){let e=l.get(p(t));if(e?.label!==void 0)return e.label}return String(t)},[e.renderItem,m,r,l,p]);(0,z.useEffect)(()=>{if(!r)return;let t=n?e.value:[e.value].filter(Boolean),i=new Map;for(let e of t){let t=p(e),n=m.find(t=>t.value===e);n&&i.set(t,n)}u(i)},[r,n,e,m,p]);let _=(0,z.useCallback)(e=>{c(e)},[]),v=r&&`onSearch`in e?e.onSearch:void 0,y=r&&`searchDebounce`in e&&e.searchDebounce!==void 0?e.searchDebounce:300;(0,z.useEffect)(()=>{if(!v)return;let e=setTimeout(()=>{v(s)},s===``?0:y);return()=>clearTimeout(e)},[s,v,y]);let b=(0,z.useMemo)(()=>{if(r){let e=new Map;for(let[t,n]of l)e.set(t,n);for(let t of m)e.set(p(t.value),t);return Array.from(e.values())}else return s?m.filter(e=>{let t=g(e.value);return String(t).toLowerCase().includes(s.toLowerCase())}):m},[r,m,l,s,p,g]);return(0,z.useEffect)(()=>{a||c(``)},[a]),{isMultiple:n,isAsync:r,selectRef:i,isPopoverOpen:a,setIsPopoverOpen:o,searchValue:s,handleSearchChange:_,filteredOptions:b,normalizedItems:m,getKeyForValue:p,valueByKey:h,getItemLabel:g}}function WH(e,t){if(!t||typeof e!=`string`)return e;let n=e.toLowerCase(),r=t.toLowerCase(),i=n.indexOf(r);if(i===-1)return e;let a=e.slice(0,i),o=e.slice(i,i+t.length),s=e.slice(i+t.length);return(0,B.jsxs)(B.Fragment,{children:[a,(0,B.jsx)(`strong`,{className:`font-bold`,children:o}),s]})}function GH({props:e,isMultiple:t,isAsync:n,isPopoverOpen:r,setIsPopoverOpen:i,searchValue:a,handleSearchChange:o,filteredOptions:s,getKeyForValue:c,getItemLabel:l}){let{SD:u}=_V(),[d,f]=(0,z.useState)(null),p=(0,z.useCallback)(e=>{f(e)},[]),[m,h]=(0,z.useState)(null),g=(0,z.useCallback)(e=>{h(e)},[]),_=n&&`onLoadMore`in e?e.onLoadMore:void 0,v=n&&`hasMore`in e?e.hasMore??!1:!1,y=n&&`isLoadingMore`in e?e.isLoadingMore??!1:!1,b=n&&_!==void 0;(0,z.useEffect)(()=>{if(!_||!v||y||!m||!d)return;let e=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&_()},{root:d,threshold:0});return e.observe(m),()=>e.disconnect()},[m,d,_,v,y]);let x=e.searchable??n,S=(0,z.useCallback)(e=>{let t=d;if(!t)return;let n=t.scrollTop<t.scrollHeight-t.clientHeight,r=t.scrollTop>0;(e.deltaY>0&&n||e.deltaY<0&&r)&&e.stopPropagation()},[d]),C=(0,z.useCallback)(n=>{if(!e.disabled)if(t){let t=e.value,r=t.includes(n)?t.filter(e=>e!==n):[...t,n];e.onValueChange(r)}else e.onValueChange?.(n),i(!1)},[t,e,i]),w=(0,z.useCallback)(()=>{if(!t||e.disabled)return;let n=s.filter(e=>!e.disabled);if(e.value.length===n.length)e.onValueChange([]);else{let t=n.map(e=>e.value);e.onValueChange(t)}},[t,e,s]),T=(0,z.useCallback)(()=>{e.disabled||(t?e.onValueChange([]):e.onValueChange?.(void 0))},[t,e]),E=(0,z.useCallback)(n=>t?e.value.includes(n):e.value===n,[t,e]),D=n&&`loading`in e?e.loading:!1,O=n&&`error`in e?e.error:void 0,k=t?e.value.length>0:e.value!==void 0&&e.value!==null&&e.value!==``,A=()=>{if(!t)return null;let n=e.value;return(0,B.jsx)(B.Fragment,{children:n.map(e=>{let t=c(e);return(0,B.jsxs)(HB,{variant:`outline`,className:`m-1 transition-all duration-300 ease-in-out`,children:[l(e),(0,B.jsx)(uV,{className:`ml-2 h-3 w-3 cursor-pointer`,onClick:t=>{t.stopPropagation(),C(e)}})]},t)})})};return(0,B.jsxs)(FV,{open:r,onOpenChange:i,children:[(0,B.jsx)(IV,{asChild:!0,children:(0,B.jsx)(OB,{variant:`outline`,role:`combobox`,"aria-expanded":r,disabled:e.disabled||D,className:$(`flex p-1 rounded-md border border-input min-h-10 h-auto items-center justify-between bg-white hover:bg-white hover:text-inherit [&_svg]:pointer-events-auto w-full`,e.className),children:t&&k?(0,B.jsxs)(`div`,{className:`flex justify-between items-center w-full`,children:[(0,B.jsx)(`div`,{className:`flex items-center gap-1 flex-wrap`,children:A()}),(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[e.clearable&&(0,B.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e=>{e.stopPropagation(),T()},className:`flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground`,children:(0,B.jsx)(yV,{className:`h-4 w-4`})}),(0,B.jsx)(VH,{orientation:`vertical`,className:`flex min-h-6 h-full`}),(0,B.jsx)(_B,{className:`h-4 mx-2 cursor-pointer text-muted-foreground`})]})]}):!t&&k?(0,B.jsxs)(`div`,{className:`flex justify-between items-center w-full px-2 py-1`,children:[(()=>{let t=e.value;return t==null?null:(0,B.jsx)(`span`,{className:`flex-1 truncate text-left text-sm`,children:l(t)})})(),(0,B.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[e.clearable&&k&&(0,B.jsx)(uV,{className:`h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity`,onPointerDownCapture:T,onMouseDownCapture:T}),(0,B.jsx)(_B,{className:`h-4 w-4 opacity-50`})]})]}):(0,B.jsxs)(`div`,{className:`flex items-center justify-between w-full px-2 py-1`,children:[(0,B.jsx)(`span`,{className:`text-sm text-muted-foreground flex-1 truncate text-left`,children:e.placeholder}),(0,B.jsx)(_B,{className:`h-4 cursor-pointer text-muted-foreground`})]})})}),(0,B.jsx)(LV,{className:`min-w-40 p-0`,align:`start`,style:{width:`var(--radix-popover-trigger-width)`},children:(0,B.jsxs)(DV,{shouldFilter:!1,children:[x&&(0,B.jsx)(OV,{placeholder:u(`common.searchPlaceholder`),value:a,onValueChange:o}),(0,B.jsx)(kV,{ref:p,onWheel:S,children:D?(0,B.jsx)(AV,{children:(0,B.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,B.jsx)(pH,{className:`h-4 w-4 animate-spin mr-2`})})}):O?(0,B.jsxs)(AV,{children:[`Error: `,O.message]}):s.length===0?(0,B.jsx)(AV,{children:u(`rc.multiSelect.noResults`)}):(0,B.jsxs)(B.Fragment,{children:[t&&!(`hideSelectAll`in e&&e.hideSelectAll)&&(0,B.jsx)(jV,{children:(0,B.jsxs)(NV,{onSelect:w,className:`cursor-pointer`,children:[(0,B.jsx)(`div`,{className:$(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,e.value.length===s.filter(e=>!e.disabled).length?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),children:(0,B.jsx)(sV,{className:`h-4 w-4`})}),(0,B.jsxs)(`span`,{children:[`(`,u(`rc.multiSelect.selectAll`),`)`]})]})}),(0,B.jsx)(jV,{children:s.map(e=>{let n=c(e.value),r=E(e.value);return(0,B.jsxs)(NV,{onSelect:()=>C(e.value),disabled:e.disabled,className:$(`cursor-pointer`,e.disabled&&`opacity-50 cursor-not-allowed`),children:[t&&(0,B.jsx)(`div`,{className:$(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,r?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),children:(0,B.jsx)(sV,{className:`h-4 w-4`})}),!t&&(0,B.jsx)(sV,{className:$(`mr-2 h-4 w-4`,r?`opacity-100`:`opacity-0`)}),(0,B.jsx)(`span`,{children:WH(l(e.value),a)})]},n)})}),b&&(0,B.jsx)(`div`,{ref:g,className:`flex items-center justify-center py-2 text-xs text-muted-foreground`,children:y?(0,B.jsx)(pH,{className:`h-3 w-3 animate-spin`}):null})]})})]})})]})}z.forwardRef(function(e,t){let n=UH(e,t);return(0,B.jsx)(GH,{props:e,isMultiple:n.isMultiple,isAsync:n.isAsync,isPopoverOpen:n.isPopoverOpen,setIsPopoverOpen:n.setIsPopoverOpen,searchValue:n.searchValue,handleSearchChange:n.handleSearchChange,filteredOptions:n.filteredOptions,getKeyForValue:n.getKeyForValue,getItemLabel:n.getItemLabel})});var KH=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(PN,{ref:r,className:$(`relative z-10 flex max-w-max flex-1 items-center justify-center`,e),...n,children:[t,(0,B.jsx)(ZH,{})]}));KH.displayName=PN.displayName;var qH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(FN,{ref:n,className:$(`group flex flex-1 list-none items-center justify-center space-x-1`,e),...t}));qH.displayName=FN.displayName;var JH=Ip(`group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent`),YH=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(IN,{ref:r,className:$(JH(),`group`,e),...n,children:[t,` `,(0,B.jsx)(_B,{className:`relative top-px ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180`,"aria-hidden":`true`})]}));YH.displayName=IN.displayName;var XH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(RN,{ref:n,className:$(`left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto `,e),...t}));XH.displayName=RN.displayName;var ZH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{className:$(`absolute left-0 top-full flex justify-center`),children:(0,B.jsx)(zN,{className:$(`origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)`,e),ref:n,...t})}));ZH.displayName=zN.displayName;var QH=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(LN,{ref:n,className:$(`top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in`,e),...t,children:(0,B.jsx)(`div`,{className:`relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md`})}));QH.displayName=LN.displayName;var $H=z.forwardRef(({value:e,onValueChange:t,total:n,itemsPerPage:r,className:i,maxVisible:a=6},o)=>{let{SD:s}=_V(),c=Math.ceil(n/r),l=e,u=(l-1)*r+1,d=Math.min(l*r,n);return(0,B.jsxs)(`div`,{ref:o,className:$(`flex items-center justify-between pt-6`,i),children:[(0,B.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:s(`rc.pagination.showing`)(u,d,n)}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(OB,{variant:`outline`,size:`sm`,className:`h-8 px-3 text-xs`,disabled:l===1,onClick:()=>t(l-1),children:s(`rc.pagination.previous`)}),(0,B.jsx)(`div`,{className:`flex items-center gap-1`,children:(()=>{let e=Math.max(1,l-Math.floor(a/2)),n=Math.min(c,e+a-1);return n-e+1<a&&(e=Math.max(1,n-a+1)),Array.from({length:n-e+1},(t,n)=>e+n).map(e=>(0,B.jsx)(OB,{variant:`outline`,size:`sm`,className:`h-8 w-8 text-xs ${e===l?`bg-primary text-primary-foreground`:``}`,onClick:()=>t(e),children:e},e))})()}),(0,B.jsx)(OB,{variant:`outline`,size:`sm`,className:`h-8 px-3 text-xs`,disabled:l===c,onClick:()=>t(l+1),children:s(`rc.pagination.next`)})]})]})});$H.displayName=`Pagination`;var eU=z.forwardRef(({className:e,value:t,...n},r)=>(0,B.jsx)(nP,{ref:r,className:$(`relative h-4 w-full overflow-hidden rounded-full bg-secondary`,e),...n,children:(0,B.jsx)(rP,{className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})}));eU.displayName=nP.displayName;var tU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(OP,{className:$(`grid gap-2`,e),...t,ref:n}));tU.displayName=OP.displayName;var nU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(kP,{ref:n,className:$(`aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,B.jsx)(AP,{className:`flex items-center justify-center`,children:(0,B.jsx)(`div`,{className:`h-2 w-2 rounded-full bg-current`})})}));nU.displayName=kP.displayName;var rU=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(nL,{ref:r,className:$(`relative overflow-hidden`,e),...n,children:[(0,B.jsx)(rL,{className:`h-full w-full rounded-[inherit]`,children:t}),(0,B.jsx)(iU,{}),(0,B.jsx)(iL,{})]}));rU.displayName=nL.displayName;var iU=z.forwardRef(({className:e,orientation:t=`vertical`,...n},r)=>(0,B.jsx)(AI,{ref:r,orientation:t,className:$(`flex touch-none select-none transition-colors`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent p-px`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent p-px`,e),...n,children:(0,B.jsx)(VI,{className:`relative flex-1 rounded-full bg-border`})}));iU.displayName=AI.displayName;var aU=xg,oU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Sg,{className:$(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));oU.displayName=Sg.displayName;var sU=Ip(`fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500`,{variants:{side:{top:`inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,bottom:`inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,left:`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,right:`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`}},defaultVariants:{side:`right`}}),cU=z.forwardRef(({side:e=`right`,className:t,children:n,...r},i)=>(0,B.jsxs)(aU,{children:[(0,B.jsx)(oU,{}),(0,B.jsxs)(Cg,{ref:i,className:$(sU({side:e}),t),...r,children:[n,(0,B.jsxs)(Eg,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,B.jsx)(yV,{className:`h-4 w-4`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));cU.displayName=Cg.displayName;var lU=({className:e,...t})=>(0,B.jsx)(`div`,{className:$(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});lU.displayName=`SheetHeader`;var uU=({className:e,...t})=>(0,B.jsx)(`div`,{className:$(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});uU.displayName=`SheetFooter`;var dU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(wg,{ref:n,className:$(`text-lg font-semibold text-foreground`,e),...t}));dU.displayName=wg.displayName;var fU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Tg,{ref:n,className:$(`text-sm text-muted-foreground`,e),...t}));fU.displayName=Tg.displayName;var pU=z.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,B.jsx)(zL,{ref:r,sideOffset:t,className:$(`z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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 origin-[--radix-tooltip-content-transform-origin]`,e),...n}));pU.displayName=zL.displayName,z.createContext(null);var mU=z.forwardRef(({className:e,name:t,value:n,defaultValue:r,onValueChange:i,onBlur:a,...o},s)=>{let c=z.useRef(null);z.useImperativeHandle(s,()=>c.current);let l=e=>{i?.(e[0])},u=vB(n),d=vB(r);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`input`,{type:`range`,ref:c,name:t,defaultValue:d?.[0],onBlur:a,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),(0,B.jsxs)(SR,{value:u,defaultValue:d,onValueChange:l,className:$(`relative flex w-full touch-none select-none items-center`,e),...o,children:[(0,B.jsx)(CR,{className:`relative h-2 w-full grow overflow-hidden rounded-full bg-secondary`,children:(0,B.jsx)(wR,{className:`absolute h-full bg-primary`})}),(0,B.jsx)(TR,{className:`block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`})]})]})});mU.displayName=`Slider`;var hU=z.forwardRef(({className:e,name:t,checked:n,value:r,defaultChecked:i,onValueChange:a,onBlur:o,...s},c)=>{let l=r===void 0?n:r,u=z.useRef(null);z.useImperativeHandle(c,()=>u.current);let d=e=>{a?.(e)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`input`,{type:`checkbox`,ref:u,name:t,defaultChecked:i,onBlur:o,className:`sr-only`,tabIndex:-1,"aria-hidden":`true`}),(0,B.jsx)(LR,{checked:l,defaultChecked:i,onCheckedChange:d,className:$(`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...s,children:(0,B.jsx)(RR,{className:$(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0`)})})]})});hU.displayName=`Switch`;var gU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(ez,{ref:n,className:$(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));gU.displayName=ez.displayName;var _U=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(tz,{ref:n,className:$(`inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm`,e),...t}));_U.displayName=tz.displayName;var vU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(nz,{ref:n,className:$(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));vU.displayName=nz.displayName;var yU=z.forwardRef(({className:e,onValueChange:t,onChange:n,...r},i)=>{let a=e=>{t?.(e.target.value),n?.(e)};return(0,B.jsx)(`textarea`,{className:$(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:i,...r,onChange:a})});yU.displayName=`Textarea`;var bU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Gz,{ref:n,className:$(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]`,e),...t}));bU.displayName=Gz.displayName;var xU=Ip(`group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),SU=z.forwardRef(({className:e,variant:t,...n},r)=>(0,B.jsx)(Kz,{ref:r,className:$(xU({variant:t}),e),...n}));SU.displayName=Kz.displayName;var CU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Yz,{ref:n,className:$(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive`,e),...t}));CU.displayName=Yz.displayName;var wU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Xz,{ref:n,className:$(`absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...t,children:(0,B.jsx)(yV,{className:`h-4 w-4`})}));wU.displayName=Xz.displayName;var TU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(qz,{ref:n,className:$(`text-sm font-semibold`,e),...t}));TU.displayName=qz.displayName;var EU=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Jz,{ref:n,className:$(`text-sm opacity-90`,e),...t}));EU.displayName=Jz.displayName;var DU=Ip(`inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-accent hover:text-accent-foreground`},size:{default:`h-10 px-3 min-w-10`,sm:`h-9 px-2.5 min-w-9`,lg:`h-11 px-5 min-w-11`}},defaultVariants:{variant:`default`,size:`default`}}),OU=z.forwardRef(({className:e,variant:t,size:n,value:r,pressed:i,onValueChange:a,onPressedChange:o,...s},c)=>{let l=r===void 0?i:r;return(0,B.jsx)($z,{ref:c,pressed:l,onPressedChange:e=>{a?.(e),o?.(e)},className:$(DU({variant:t,size:n,className:e})),...s})});OU.displayName=$z.displayName;var kU=z.createContext({size:`default`,variant:`default`}),AU=z.forwardRef(({className:e,variant:t,size:n,children:r,...i},a)=>(0,B.jsx)(hB,{ref:a,className:$(`flex items-center justify-center gap-1`,e),...i,children:(0,B.jsx)(kU.Provider,{value:{variant:t,size:n},children:r})}));AU.displayName=hB.displayName;var jU=z.forwardRef(({className:e,children:t,variant:n,size:r,...i},a)=>{let o=z.useContext(kU);return(0,B.jsx)(gB,{ref:a,className:$(DU({variant:o.variant||n,size:o.size||r}),e),...i,children:t})});jU.displayName=gB.displayName;var MU=async e=>(e.length===0||console.log(`File upload not implemented yet`),[]),NU=e=>ne(e);function PU({children:e}){return(0,B.jsx)(gV,{uploader:MU,SD:NU,children:e})}var FU=_()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:IU});function IU(){let{queryClient:e}=FU.useRouteContext();return(0,B.jsxs)(`html`,{lang:`en`,children:[(0,B.jsxs)(`head`,{children:[(0,B.jsx)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`}),(0,B.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.googleapis.com`}),(0,B.jsx)(`link`,{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:``}),(0,B.jsx)(`link`,{href:`https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=DM+Mono:wght@400;500&display=swap`,rel:`stylesheet`}),(0,B.jsx)(w,{})]}),(0,B.jsxs)(`body`,{children:[(0,B.jsx)(`div`,{id:`root`,children:(0,B.jsx)(k,{client:e,children:(0,B.jsx)(PU,{children:(0,B.jsx)(Lu,{children:(0,B.jsx)(h,{})})})})}),(0,B.jsx)(O,{})]})]})}var LU=D(`/tokens`)({component:T(()=>ce(()=>import(`./tokens-DHahzDQJ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`)}),RU=D(`/settings`)({component:T(()=>ce(()=>import(`./settings-DbkDAJfh.js`),__vite__mapDeps([8,1,2,3,4,6,7])),`component`)}),zU=()=>ce(()=>import(`./monit-BkGkzl6m.js`),__vite__mapDeps([9,1,2,3,4,10])),BU=re({level:I([`all`,`warn`,`error`]).optional().default(`all`).catch(()=>`all`)}),VU=D(`/monit`)({validateSearch:BU,component:T(zU,`component`)}),HU=()=>ce(()=>import(`./logs-BCuaLfPL.js`),__vite__mapDeps([11,1,2,3,4,10])),UU=re({token:te().optional(),project:te().optional(),model:te().optional(),sort:te().optional(),page:ae().optional().default(1)}),WU=D(`/logs`)({validateSearch:UU,component:T(HU,`component`)}),GU=D(`/`)({component:T(()=>ce(()=>import(`./routes-DqY8SXcB.js`),__vite__mapDeps([12,1,2,3,4,5,10,6])),`component`)}),KU=()=>ce(()=>import(`./show-Dx5JFzwy.js`),__vite__mapDeps([13,1,2,3,4,10])),qU=re({id:ae()}),JU=D(`/requests/show`)({validateSearch:qU,component:T(KU,`component`)}),YU=LU.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>FU}),XU=RU.update({id:`/settings`,path:`/settings`,getParentRoute:()=>FU}),ZU=VU.update({id:`/monit`,path:`/monit`,getParentRoute:()=>FU}),QU=WU.update({id:`/logs`,path:`/logs`,getParentRoute:()=>FU}),$U={IndexRoute:GU.update({id:`/`,path:`/`,getParentRoute:()=>FU}),LogsRoute:QU,MonitRoute:ZU,SettingsRoute:XU,TokensRoute:YU,RequestsShowRoute:JU.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>FU})},eW=FU._addFileChildren($U)._addFileTypes(),tW=new pe({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),nW=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),oe):void 0;nW&&R(tW,nW);var rW=window.__SONAMU_SSR_CONFIG__,iW=b({routeTree:eW,context:{queryClient:tW},defaultPreload:`intent`});(async()=>{await iW.load(),document.documentElement.innerHTML&&nW?rW?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),me.createRoot(document).render((0,B.jsx)(E,{router:iW}))):me.hydrateRoot(document,(0,B.jsx)(E,{router:iW})):me.createRoot(document).render((0,B.jsx)(E,{router:iW}))})(),window.__TANSTACK_QUERY_CLIENT__=tW;export{uf as a,au as c,YV as i,ts as l,WU as n,du as o,VU as r,cu as s,JU as t,_e as u};
|