diffbook-app 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/bin/export.mjs +4 -0
  2. package/bin/serve-static.mjs +11 -0
  3. package/dist/client/assets/{CodeBlocks.impl-8fm4eP2E.js → CodeBlocks.impl-B2bHHbVr.js} +1 -1
  4. package/dist/client/assets/{Quiz.impl-Czw0AT5-.js → Quiz.impl-noCK8St2.js} +1 -1
  5. package/dist/client/assets/{_-BnmuYgCn.js → _-CzvvmzrL.js} +1 -1
  6. package/dist/client/assets/{_-CWRmCnat.js → _-DtlOTuaQ.js} +1 -1
  7. package/dist/client/assets/{_bookSlug-uvbJ2lZK.js → _bookSlug-CDIukwwd.js} +1 -1
  8. package/dist/client/assets/{book-links-oBD5_TD9.js → book-links-POwyHx-T.js} +11 -11
  9. package/dist/client/assets/{book-view-D8DLuZwr.js → book-view-B1VhlTqp.js} +3 -3
  10. package/dist/client/assets/{index-DcbQMucQ.js → index-fwL8CzeX.js} +2 -2
  11. package/dist/client/assets/{islands-BwU5t8ZK.js → islands-B6tNK80x.js} +2 -2
  12. package/dist/client/assets/{routes-CT1bBFQw.js → routes-DFt923uJ.js} +1 -1
  13. package/dist/client/assets/{search-BQRXPbYd.js → search-CiDFupIW.js} +1 -1
  14. package/dist/client/assets/{search-ByaQDQCI.js → search-RZsiFwn_.js} +1 -1
  15. package/dist/client/assets/{search-static-CANzr7Ay.js → search-static-BBk4OCV1.js} +1 -1
  16. package/dist/client/assets/{unavailable-YWEROYT2.js → unavailable-zzVFaXGP.js} +1 -1
  17. package/dist/server/assets/{Chart.impl-CoSFHAkZ.js → Chart.impl-BD778Sfz.js} +1 -1
  18. package/dist/server/assets/{CodeBlocks.impl-D0UyITJk.js → CodeBlocks.impl-BzZzzShT.js} +1 -1
  19. package/dist/server/assets/{Quiz.impl-D-jyKFzT.js → Quiz.impl--cKtTK4q.js} +1 -1
  20. package/dist/server/assets/{_-jK1csG3l.js → _-B80GDgiD.js} +1 -1
  21. package/dist/server/assets/{_-DdSkkwCj.js → _-B_NWL_qD.js} +1 -1
  22. package/dist/server/assets/{_-Dl8L0oTA.js → _-BtAixLy_.js} +3 -3
  23. package/dist/server/assets/{_-FUnPhrKP.js → _-CP8_agta.js} +3 -3
  24. package/dist/server/assets/{_bookSlug-D2UZWAHI.js → _bookSlug-CKPYyfgT.js} +1 -1
  25. package/dist/server/assets/{_bookSlug-Ra6D0Anb.js → _bookSlug-DrcXOgap.js} +4 -4
  26. package/dist/server/assets/{_tanstack-start-manifest_v-Ls_2zams.js → _tanstack-start-manifest_v-DzW688Vp.js} +22 -22
  27. package/dist/server/assets/{book-27zd8xMq.js → book-DwyvrUaa.js} +1 -1
  28. package/dist/server/assets/{book-links-DBPZZUO9.js → book-links-Bf2mPPK2.js} +15 -24
  29. package/dist/server/assets/{book-view-CZ19qQ01.js → book-view-BNB-pHS9.js} +6 -5
  30. package/dist/server/assets/{dist-CavVXdxV.js → dist-Dum_xO7d.js} +19 -10
  31. package/dist/server/assets/{islands-CC6fLMd4.js → islands-CrS5y5FI.js} +9 -9
  32. package/dist/server/assets/{router-D_hgIf_w.js → router-DpEmZ9-Y.js} +6 -6
  33. package/dist/server/assets/{routes-6WLGfEkb.js → routes-DcjNYCIo.js} +1 -1
  34. package/dist/server/assets/{routes-JZ-jv6kU.js → routes-FcpIT7AD.js} +5 -5
  35. package/dist/server/assets/{search-D0xbOYMw.js → search-B9QT-xba.js} +1 -1
  36. package/dist/server/assets/{search-Bin1_Wwn.js → search-CCISbhVN.js} +2 -2
  37. package/dist/server/assets/{search-C_oIfoAM.js → search-Kx_2e8nt.js} +2 -2
  38. package/dist/server/assets/{search-E-VnyBez.js → search-WKn1ukuf.js} +1 -1
  39. package/dist/server/assets/{unavailable-BiwA5vh7.js → unavailable-0XWFBxtd.js} +2 -2
  40. package/dist/server/server.js +8 -8
  41. package/package.json +3 -3
@@ -1,10 +1,10 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/client-DFmNPiUt.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/react-FVqWAEVH.js","assets/react-dom-CTKIkrPf.js"])))=>i.map(i=>d[i]);
2
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-FVqWAEVH.js";import{t as n}from"./react-dom-CTKIkrPf.js";import{m as r}from"./book-CAuFl1ig.js";import{t as i}from"./jsx-runtime-DREnUpxT.js";import{n as a,t as o}from"./with-selector-C9wwYFib.js";import{t as s}from"./preload-helper-Czpn1I53.js";import{t as c}from"./clsx-CjueKrWZ.js";import{C as l,D as u,E as d,S as f,T as p,_ as m,a as h,b as g,f as _,g as v,h as y,i as b,m as x,o as S,p as C,r as w,s as T,t as ee,u as E,v as te,w as ne,x as D,y as O}from"./useRenderElement-BQ1V91fw.js";import{t as k}from"./createLucideIcon-CSrh2MqE.js";var A=[],j=0,M=4,N=0,P=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=j+M;t<A.length;)A[t]===e?A.splice(t,M):t+=M;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){N++;let i=!A.length;for(let i of t)A.push(i,n.value,e,r);if(i){for(j=0;j<A.length;j+=M)A[j](A[j+1],A[j+2],A[j+3]);A.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};function re(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 F=e(t(),1),I=e(n(),1),L=i(),R=a(),z=o(),B=P(``),V=P(!1),ie=`theme-`,ae=typeof window<`u`&&typeof document<`u`;function oe(e){if(!ae)return;let t=document.documentElement,n=[];t.classList.forEach(e=>{e.startsWith(ie)&&n.push(e)});for(let e of n)t.classList.remove(e);e&&e!=="default"&&t.classList.add(`${ie}${e}`)}var H=new Map;function se(){for(let[e,t]of H)if(!e.isConnected){try{t.unmount()}catch{}H.delete(e)}}function U(t){if(typeof document>`u`)return;se();let{createElement:n}=F,r=[],i=document.querySelectorAll(`[data-diffbook-island]`);for(let e of i){if(e.dataset.diffbookHydrated===`true`)continue;let n=e.getAttribute(`data-diffbook-island`);if(!n)continue;let i=t[n];if(!i)continue;let a={},o=e.getAttribute(`data-diffbook-props`);if(o)try{a=JSON.parse(o)}catch{}e.dataset.diffbookHydrated=`true`,r.push({el:e,Component:i,props:a})}r.length!==0&&s(async()=>{let{createRoot:t}=await import(`./client-DFmNPiUt.js`).then(t=>e(t.t(),1));return{createRoot:t}},__vite__mapDeps([0,1,2,3])).then(({createRoot:e})=>{for(let{el:t,Component:i,props:a}of r){let r=e(t);H.set(t,r),r.render(n(i,a))}}).catch(()=>{for(let{el:e}of r)delete e.dataset.diffbookHydrated})}var ce=k(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),le=k(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ue=k(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),de=k(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),fe=k(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),pe=k(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),me=k(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),he=k(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ge=k(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),_e=k(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),ve=k(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ye=k(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),be=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,xe=c,Se=(e,t)=>n=>{if(t?.variants==null)return xe(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=be(t)||be(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 xe(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)},Ce=Se([`relative w-full text-sm border has-[>svg]:grid-cols-[calc(var(--spacing)*3)_1fr] grid-cols-[0_1fr] grid gap-y-0.5 items-center [&>svg:not([class*=size-])]:size-4`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:[&_[data-slot=alert-action]]:sm:row-end-3`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:items-start`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:[&_svg]:translate-y-0.5`,`rounded-lg`,`px-3`,`py-2.5`,`has-[>svg]:gap-x-2.5`],{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`border-destructive/30 bg-destructive/5 [&>svg]:text-destructive`,info:`border-info/30 bg-info/5 [&>svg]:text-info`,success:`border-success/30 bg-success/5 [&>svg]:text-success`,warning:`border-warning/30 bg-warning/5 [&>svg]:text-warning`}},defaultVariants:{variant:`default`}});function we({className:e,variant:t,...n}){return(0,L.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:u(Ce({variant:t}),e),...n})}function Te({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-title`,className:u(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function Ee({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-description`,className:u(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}var De={info:`info`,success:`success`,warning:`warning`,error:`destructive`,none:`default`},Oe={info:ue,success:ce,warning:ve,error:le,none:null};function ke({variant:e=`info`,title:t,children:n}){let r=Oe[e];return(0,L.jsxs)(we,{variant:De[e],className:`not-prose my-4`,children:[r?(0,L.jsx)(r,{"aria-hidden":`true`}):null,t?(0,L.jsx)(Te,{children:t}):null,n?(0,L.jsx)(Ee,{children:n}):null]})}function Ae({prev:e,next:t}){return!e&&!t?null:(0,L.jsxs)(`nav`,{className:`not-prose mt-8 flex flex-col gap-3 border-t border-border pt-6 sm:flex-row sm:justify-between`,"aria-label":`Previous and next pages`,children:[e?(0,L.jsxs)(`a`,{href:e.href,className:`group flex min-w-0 flex-1 flex-col rounded-lg border border-border px-4 py-3 no-underline transition-colors hover:border-primary`,children:[(0,L.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Previous`}),(0,L.jsxs)(`span`,{className:`truncate text-sm font-medium text-foreground transition-colors group-hover:text-primary`,children:[`← `,e.title]})]}):(0,L.jsx)(`span`,{className:`flex-1`}),t?(0,L.jsxs)(`a`,{href:t.href,className:`group flex min-w-0 flex-1 flex-col items-end rounded-lg border border-border px-4 py-3 text-right no-underline transition-colors hover:border-primary`,children:[(0,L.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Next`}),(0,L.jsxs)(`span`,{className:`truncate text-sm font-medium text-foreground transition-colors group-hover:text-primary`,children:[t.title,` →`]})]}):(0,L.jsx)(`span`,{className:`flex-1`})]})}var je=(e,t)=>n=>{e.current!==n&&(e.current=n,t())};function Me(e,{keys:t,deps:n=[e,t]}={}){let r=(0,F.useRef)();r.current=e.get();let i=(0,F.useCallback)(n=>(je(r,n)(e.value),t?.length>0?re(e,t,je(r,n)):e.listen(je(r,n))),n),a=()=>r.current;return(0,F.useSyncExternalStore)(i,a,a)}var Ne=`diffbook:theme`;function Pe(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(Ne);if(e)return e}catch{}return e}function Fe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ie({activeTheme:e=`default`,themes:t=[`default`]}){let n=t,[r,i]=(0,F.useState)(()=>Pe(e)),[a,o]=(0,F.useState)(!1),s=(0,F.useRef)(null);function c(e){oe(e);try{window.localStorage.setItem(Ne,e)}catch{}i(e),o(!1)}return(0,F.useEffect)(()=>{function e(e){let t=s.current;t&&e.target instanceof Node&&!t.contains(e.target)&&o(!1)}function t(e){e.key===`Escape`&&o(!1)}return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t)}},[]),(0,L.jsxs)(`div`,{className:`relative`,ref:s,children:[(0,L.jsx)(`button`,{type:`button`,className:`flex h-9 w-9 items-center justify-center rounded-md text-foreground hover:bg-accent`,"aria-label":`Pick theme`,"aria-haspopup":`menu`,"aria-expanded":a,onClick:()=>o(e=>!e),children:(0,L.jsx)(me,{className:`h-[18px] w-[18px]`})}),a&&(0,L.jsx)(`div`,{className:`absolute right-0 z-50 mt-2 max-h-[70vh] min-w-40 overflow-y-auto overscroll-contain rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md`,role:`menu`,children:n.map(e=>(0,L.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e===r,className:`flex w-full items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground`,onClick:()=>c(e),children:[(0,L.jsx)(`span`,{children:Fe(e)}),e===r&&(0,L.jsx)(d,{className:`h-4 w-4`})]},e))})]})}var Le=F.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=T({disabled:i,focusableWhenDisabled:a,native:o});return ee(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),Re=Se(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function ze({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,L.jsx)(Le,{"data-slot":`button`,className:u(Re({variant:t,size:n,className:e})),...r})}function Be({className:e=``}){return(0,L.jsxs)(`svg`,{viewBox:`91.9 5.6 449.4 531.5`,className:e,role:`img`,"aria-label":`diffbook`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,L.jsxs)(`mask`,{id:`diffbook-mark`,maskUnits:`userSpaceOnUse`,x:`91.9`,y:`5.6`,width:`449.4`,height:`531.5`,children:[(0,L.jsx)(`path`,{d:`M634.9568,192.9023 C634.9568,192.9023 634.9568,192.6097 634.9568,192.6097 C634.9568,192.6097 640.1213,192.6097 640.1213,192.6097 C640.1213,192.6097 984.8307,192.6097 984.8307,192.6097 C984.8307,192.6097 984.8307,610.6294 984.8307,610.6294 C984.8307,610.6294 682.3755,610.6294 682.3755,610.6294 C683.5736,614.4207 684.2177,618.4408 684.2177,622.6032 C684.2177,626.4111 683.6786,630.0998 682.6696,633.6032 C682.6696,633.6032 986.2264,633.6032 986.2264,633.6032 C986.2264,633.6032 986.2264,664.1117 986.2264,664.1117 C986.2264,664.1117 642.2317,664.1117 642.2317,664.1117 C642.2317,664.1117 642.2317,663.9735 642.2317,663.9735 C641.8083,663.9853 641.3833,663.9912 640.9568,663.9912 C617.0861,663.9912 597.6959,645.4405 597.6959,622.6032 C597.6959,622.0642 597.7067,621.5276 597.7281,620.9936 C597.7281,620.9936 597.3726,620.9936 597.3726,620.9936 C597.3726,620.9936 597.3726,240.3775 597.3726,240.3775 C597.0354,238.2977 596.8604,236.167 596.8604,233.9976 C596.8604,212.8322 613.5156,195.3487 634.9568,192.9023 Z`,transform:`matrix(1,0,0,1,-475,-157)`,fill:`#fff`}),(0,L.jsx)(`path`,{d:`M174.3752,432.0145 C185.7941,432.0145 195.0697,442.0269 195.0697,454.3529 C195.0697,466.679 185.7941,476.6914 174.3752,476.6914 C162.9562,476.6914 153.6806,466.679 153.6806,454.3529 C153.6806,442.0269 162.9562,432.0145 174.3752,432.0145 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M174.3752,432.0145 L511.2264,432.0145 L511.2264,476.6032 L174.3752,476.6032 L174.3752,432.0145 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M334.50258129633266,294.27363553484156 C348.7507574972707,294.27363553484156 360.32456257368557,305.7967526855735 360.32456257368557,319.98252844934996 C360.32456257368557,334.1683042131264 348.7507574972707,345.69142136385835 334.50258129633266,345.69142136385835 C320.25440509539465,345.69142136385835 308.68060001897976,334.1683042131264 308.68060001897976,319.98252844934996 C308.68060001897976,305.7967526855735 320.25440509539465,294.27363553484156 334.50258129633266,294.27363553484156 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M247.50258129633266,221.27363553484153 C261.7507574972707,221.27363553484153 273.32456257368557,232.79675268557344 273.32456257368557,246.9825284493499 C273.32456257368557,261.16830421312636 261.7507574972707,272.6914213638583 247.50258129633266,272.6914213638583 C233.25440509539465,272.6914213638583 221.68060001897976,261.16830421312636 221.68060001897976,246.9825284493499 C221.68060001897976,232.79675268557344 233.25440509539465,221.27363553484153 247.50258129633266,221.27363553484153 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M323.159194379625,29.609673288504922 L347.6008777334275,29.609673288504922 L347.6008777334275,313.98252844934996 L323.159194379625,313.98252844934996 L323.159194379625,29.609673288504922 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M329.5112191835173,151.03726690747317 L345.44784283820945,166.9738905621653 L264.47089312367876,247.950840276696 L248.53426946898662,232.01421662200386 L329.5112191835173,151.03726690747317 Z`,fill:`#000`})]}),(0,L.jsx)(`rect`,{x:`91.9`,y:`5.6`,width:`449.4`,height:`531.5`,fill:`currentColor`,mask:`url(#diffbook-mark)`})]})}var Ve=`diffbook:color-mode`;function He({title:e,logo:t,nav:n,homeLink:r=`/`,github:i,searchLink:a,showMenu:o=!0,showBrand:s=!0,sidebarCollapsed:c=!1,showThemePicker:l=!1,showThemeToggle:u=!0,appearanceControl:d,breadcrumbs:f,badge:p}){let m=Me(V),[h,g]=(0,F.useState)(!1);(0,F.useEffect)(()=>{let e=document.documentElement,t=()=>e.classList.toggle(`db-scrolled`,window.scrollY>4);return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[]),(0,F.useEffect)(()=>{let e=window.matchMedia(`(min-width: 1024px)`),t=()=>g(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);function _(){if(!(typeof window>`u`))if(window.matchMedia(`(min-width: 1024px)`).matches){let e=document.documentElement.classList.toggle(`db-sidebar-collapsed`);try{localStorage.setItem(`diffbook:sidebar-collapsed`,e?`1`:`0`)}catch{}document.dispatchEvent(new CustomEvent(`diffbook:sidebar-change`,{detail:e}))}else V.set(!V.get())}function v(){let e=document.documentElement.classList.toggle(`dark`);try{localStorage.setItem(Ve,e?`dark`:`light`)}catch{}}return(0,L.jsxs)(`div`,{className:`flex h-14 items-center gap-3 px-4 sm:px-6`,children:[o&&(0,L.jsx)(`button`,{type:`button`,className:`flex h-9 w-9 items-center justify-center rounded-md hover:bg-accent`,"aria-label":`Toggle sidebar`,"aria-expanded":h?!c:m,onClick:_,children:(0,L.jsx)(de,{className:`h-5 w-5`})}),s&&(0,L.jsxs)(`a`,{href:r,className:`flex min-w-0 items-center gap-2 font-semibold`,children:[t?(0,L.jsx)(`img`,{src:t,alt:e,className:`h-7 w-auto shrink-0`}):(0,L.jsx)(Be,{className:`h-7 w-7 shrink-0 text-primary`}),(0,L.jsx)(`span`,{className:`truncate`,children:e}),p&&(0,L.jsx)(`span`,{className:`shrink-0 rounded-full border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium uppercase leading-none tracking-wide text-primary`,children:p})]}),f&&(0,L.jsx)(`div`,{className:`hidden min-w-0 flex-1 md:block`,children:f}),(0,L.jsx)(`nav`,{className:`ml-auto hidden items-center gap-5 text-sm font-medium md:flex`,children:n.map(e=>(0,L.jsx)(`a`,{href:e.link,className:`text-muted-foreground transition-colors hover:text-foreground`,children:e.text},e.link))}),(0,L.jsxs)(`div`,{className:`ml-auto flex items-center gap-1 md:ml-2`,children:[a&&(0,L.jsx)(`a`,{href:a,"aria-label":`Search`,title:`Search (⌘K)`,className:`flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,L.jsx)(he,{className:`h-[18px] w-[18px]`,"aria-hidden":`true`})}),d??(l&&(0,L.jsx)(Ie,{})),!d&&!l&&u&&(0,L.jsxs)(ze,{variant:`ghost`,size:`icon`,className:`h-9 w-9`,"aria-label":`Toggle theme`,onClick:v,children:[(0,L.jsx)(_e,{className:`hidden h-[18px] w-[18px] dark:block`}),(0,L.jsx)(pe,{className:`block h-[18px] w-[18px] dark:hidden`})]}),i&&(0,L.jsx)(`a`,{href:i,target:`_blank`,rel:`noreferrer noopener`,className:`flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,"aria-label":`GitHub`,children:(0,L.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,L.jsx)(`path`,{d:`M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2 0 1.9 1.2 1.9 1.2 1 1.8 2.8 1.3 3.5 1 0-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.2.5-2.3 1.3-3.1-.2-.4-.6-1.6 0-3.2 0 0 1-.3 3.4 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.8 0 3.2.9.8 1.3 1.9 1.3 3.2 0 4.6-2.8 5.6-5.5 5.9.5.4.9 1 .9 2.2v3.3c0 .3.1.7.8.6A12 12 0 0 0 12 .3`})})})]})]})}var Ue=F.createContext(!1),We=F.createContext(void 0);function Ge(e){let t=F.useContext(We);if(e===!1&&t===void 0)throw Error(E(27));return t}var Ke=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),qe={[Ke.startingStyle]:``},Je={[Ke.endingStyle]:``},Ye={transitionStatus(e){return e===`starting`?qe:e===`ending`?Je:null}},Xe=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Ke.startingStyle]=`startingStyle`,e[e.endingStyle=Ke.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Ze=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({});Ze.popupOpen,Ze.popupOpen,Ze.pressed;var Qe={[Xe.open]:``},$e={[Xe.closed]:``},et={[Xe.anchorHidden]:``},tt={open(e){return e?Qe:$e},anchorHidden(e){return e?et:null}},nt={...tt,...Ye},rt=F.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=Ge(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return ee(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:nt,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),it=`none`,at=`trigger-press`,ot=`outside-press`,st=`focus-out`,ct=`escape-key`,lt=`imperative-action`;function ut(e,t,n,r){let i=!1,a=!1,o=r??w;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var dt=0;function ft(e,t=`mui`){let[n,r]=F.useState(e),i=e||n;return F.useEffect(()=>{n??(dt+=1,r(`${t}-${dt}`))},[n,t]),i}var pt=y.useId;function mt(e,t){if(pt!==void 0){let n=pt();return e??(t?`${t}-${n}`:n)}return ft(e,t)}var ht=[];function gt(e){F.useEffect(e,ht)}var _t=0,vt=class e{static create(){return new e}currentId=_t;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=_t,t()},e)}isStarted(){return this.currentId!==_t}clear=()=>{this.currentId!==_t&&(clearTimeout(this.currentId),this.currentId=_t)};disposeEffect=()=>this.clear};function yt(){let e=x(vt.create).current;return gt(e.disposeEffect),e}function bt(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:xt,platform:St,maxTouchPoints:Ct}=bt(),wt=xt.toLowerCase(),Tt=St.toLowerCase(),Et=/^i(os$|p)/.test(Tt)||Tt===`macintel`&&Ct>1,Dt=`android`,Ot=Tt===Dt||wt.includes(Dt),kt=!Et&&Tt.startsWith(`mac`);Tt.startsWith(`win`),!Ot&&/^(linux|chrome os)/.test(Tt);var At=kt||Et,jt=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!jt&&wt.includes(`firefox`),!jt&&wt.includes(`chrom`);var Mt=At,Nt=/jsdom|happydom/.test(wt);function Pt(e){e.preventDefault(),e.stopPropagation()}function Ft(e){return`nativeEvent`in e}function It(e){return e.pointerType===``&&e.isTrusted?!0:Ot&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Lt(e){return Nt?!1:!Ot&&e.width===0&&e.height===0||Ot&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Rt(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var zt=`data-base-ui-focusable`;function Bt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function W(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&p(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Vt(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ht(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ut(e){return e.matches(`html,body`)}function Wt(e){return D(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Gt(e){return e?e.getAttribute(`role`)===`combobox`&&Wt(e):!1}function Kt(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function G(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function qt(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Jt(e){let t=x(Yt,e).current;return t.next=e,_(t.effect),t}function Yt(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Xt=null;globalThis.requestAnimationFrame;var Zt=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Qt=class e{static create(){return new e}static request(e){return Zt.request(e)}static cancel(e){return Zt.cancel(e)}currentId=Xt;request(e){this.cancel(),this.currentId=Zt.request(()=>{this.currentId=Xt,e()})}cancel=()=>{this.currentId!==Xt&&(Zt.cancel(this.currentId),this.currentId=Xt)};disposeEffect=()=>this.cancel};function $t(){let e=x(Qt.create).current;return gt(e.disposeEffect),e}function K(e){return e?.ownerDocument||document}var en={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},tn={...en,position:`fixed`,top:0,left:0},nn={...en,position:`absolute`},rn=F.forwardRef(function(e,t){let[n,r]=F.useState();_(()=>{Mt&&jt&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,L.jsx)(`span`,{...e,ref:t,style:tn,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function an(e,t){return t<0||t>=e.length}function on(e,t){return cn(e.current,{disabledIndices:t})}function sn(e,t){return cn(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function cn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ln(e,a,r));return a}function ln(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!dn(r)||!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function un(e){return e.visibility===`hidden`||e.visibility===`collapse`}function dn(e,t=e?v(e):null){return!e||!e.isConnected||!t||un(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var fn=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function pn(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return p(n)?n.host:null}function mn(e){for(let t of Array.from(e.children))if(m(t)===`summary`)return t;return null}function hn(e,t){let n=mn(t);return!!n&&(e===n||W(n,e))}function gn(e){let t=e?m(e):``;return e!=null&&e.matches(fn)&&(t!==`summary`||e.parentElement!=null&&m(e.parentElement)===`details`&&mn(e.parentElement)===e)&&(t!==`details`||mn(e)==null)&&(t!==`input`||e.type!==`hidden`)}function _n(e){if(!gn(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=pn(t)){let n=t!==e,r=m(t)===`slot`;if(t.hasAttribute(`inert`)||n&&m(t)===`details`&&!t.open&&!hn(e,t)||t.hasAttribute(`hidden`)||!r&&!vn(t,n))return!1}return!0}function vn(e,t){let n=v(e);return t?n.display!==`none`:dn(e,n)}function yn(e){let t=e.tabIndex;if(t<0){let t=m(e);if(t===`details`||t===`audio`||t===`video`||D(e)&&e.isContentEditable)return 0}return t}function bn(e){if(m(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function xn(e,t){let n=bn(e);if(!n)return!0;let r=t.find(e=>{let t=bn(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=bn(e);return t?.name===n.name&&t.form===n.form})===n}function Sn(e){if(D(e)&&m(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return D(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Cn(e,t){Sn(e).forEach(e=>{gn(e)&&t.push(e),Cn(e,t)})}function wn(e,t,n){Sn(e).forEach(e=>{D(e)&&e.matches(t)&&n.push(e),wn(e,t,n)})}function Tn(e){return _n(e)&&yn(e)>=0}function En(e){let t=[];return Cn(e,t),t.filter(_n)}function Dn(e){let t=En(e);return t.filter(e=>yn(e)>=0&&xn(e,t))}function On(e,t){let n=Dn(e),r=n.length;if(r===0)return;let i=Bt(K(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function kn(e){return On(K(e).body,1)||e}function An(e){return On(K(e).body,-1)||e}function jn(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!W(n,r)}function Mn(e){Dn(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Nn(e){let t=[];wn(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Pn(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Pn(e,t.id,n)])}function Fn(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function In(e){return`data-base-ui-${e}`}var Ln=0;function Rn(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ln);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),b;let o=requestAnimationFrame(a);return Ln=o,()=>{Ln===o&&(cancelAnimationFrame(o),Ln=0)}}var zn={inert:new WeakMap,"aria-hidden":new WeakMap},Bn=`data-base-ui-inert`,Vn={inert:new WeakSet,"aria-hidden":new WeakSet},Hn=new WeakMap,Un=0;function Wn(e){return Vn[e]}function Gn(e){return e?p(e)?e.host:Gn(e.parentNode):null}var Kn=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Gn(t);return e.contains(n)?n:null}).filter(e=>e!=null),qn=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Jn=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{m(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Yn(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Kn(t,e),l=i?Jn(t,qn(c),new Set(c)):[],u=[],d=[];if(a){let e=zn[a],n=Wn(a);s=n,o=e;let r=Kn(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);Jn(t,qn(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Hn.get(e)||0)+1;Hn.set(e,t),d.push(e),t===1&&e.setAttribute(Bn,``)}),Un+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Hn.get(e)||0)-1;Hn.set(e,t),t||e.removeAttribute(Bn)}),--Un,Un||(zn.inert=new WeakMap,zn[`aria-hidden`]=new WeakMap,Vn.inert=new WeakSet,Vn[`aria-hidden`]=new WeakSet,Hn=new WeakMap)}}function Xn(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=K(e[0]).body;return Yn(e,a,n,r,{mark:i})}var Zn={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Qn=F.createContext(null),$n=()=>F.useContext(Qn),er=In(`portal`);function tr(e={}){let{ref:t,container:n,componentProps:r=w,elementProps:i}=e,a=mt(),o=$n()?.portalNode,[s,c]=F.useState(null),[u,d]=F.useState(null),f=C(e=>{e!==null&&d(e)}),p=F.useRef(null);_(()=>{if(n===null){p.current&&(p.current=null,d(null),c(null));return}if(a==null)return;let e=(n&&(l(n)?n:n.current))??o??document.body;if(e==null){p.current&&(p.current=null,d(null),c(null));return}p.current!==e&&(p.current=e,d(null),c(e))},[n,o,a]);let m=ee(`div`,r,{ref:[t,f],props:[{id:a,[er]:``},i]});return{portalNode:u,portalSubtree:s&&m?I.createPortal(m,s):null}}var nr=F.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=tr({container:o,ref:t,componentProps:e,elementProps:c}),d=F.useRef(null),f=F.useRef(null),p=F.useRef(null),m=F.useRef(null),[h,g]=F.useState(null),v=F.useRef(!1),y=h?.modal,b=h?.open,x=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;F.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&jn(e)&&(e.type===`focusin`?v.current&&=(Nn(l),!1):(Mn(l),v.current=!0))}return qt(G(l,`focusin`,e,!0),G(l,`focusout`,e,!0))},[l,y]),_(()=>{!l||b!==!0||!v.current||(Nn(l),v.current=!1)},[b,l]);let S=F.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,L.jsxs)(F.Fragment,{children:[u,(0,L.jsxs)(Qn.Provider,{value:S,children:[x&&l&&(0,L.jsx)(rn,{"data-type":`outside`,ref:d,onFocus:e=>{jn(e,l)?p.current?.focus():An(h?h.domReference:null)?.focus()}}),x&&l&&(0,L.jsx)(`span`,{"aria-owns":l.id,style:Zn}),l&&I.createPortal(a,l),x&&l&&(0,L.jsx)(rn,{"data-type":`outside`,ref:f,onFocus:e=>{jn(e,l)?m.current?.focus():(kn(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,ut(`focus-out`,e.nativeEvent)))}})]})]})});function rr(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var ir=F.createContext(null),ar=F.createContext(null),or=()=>F.useContext(ir)?.id||null,sr=e=>{let t=F.useContext(ar);return e??t};function cr(e){return e==null?e:`current`in e?e.current:e}function lr(e,t){let n=O(Vt(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var ur=20,dr=[];function fr(){dr=dr.filter(e=>e.deref()?.isConnected)}function pr(e){fr(),e&&m(e)!==`body`&&(dr.push(new WeakRef(e)),dr.length>ur&&(dr=dr.slice(-20)))}function mr(){return fr(),dr[dr.length-1]?.deref()}function hr(e){return e?Tn(e)?e:Dn(e)[0]||e:null}function gr(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=En(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Tn(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function _r(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:h}=e,g=`rootStore`in t?t.rootStore:t,v=g.useState(`open`),y=g.useState(`domReferenceElement`),b=g.useState(`floatingElement`),{events:x,dataRef:w}=g.context,T=C(()=>w.current.floatingContext?.nodeId),ee=i===!1,E=Gt(y)&&ee,te=Jt(i),ne=Jt(a),O=Jt(l),k=Jt(v),A=sr(p),j=$n(),M=F.useRef(!1),N=F.useRef(!1),P=F.useRef(!1),re=F.useRef(null),I=F.useRef(``),R=F.useRef(``),z=F.useRef(null),B=F.useRef(null),V=S(z,f,j?.beforeInsideRef),ie=S(B,j?.afterInsideRef),ae=yt(),oe=yt(),H=$t(),se=j!=null,U=Kt(b),ce=C((e=U)=>e?Dn(e):[]),le=C(()=>h?.().filter(e=>e!=null)??[]);F.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&W(U,Bt(K(U)))&&ce().length===0&&!E&&Pt(e)}return G(K(U),`keydown`,e)},[r,U,s,E,ce]),F.useEffect(()=>{if(r||!v)return;let e=K(U);function t(){P.current=!1}function n(e){let t=Vt(e),n=le(),r=W(b,t)||W(y,t)||W(j?.portalNode,t)||n.some(e=>e===t||W(e,t));P.current=!r,R.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(N.current=!0,oe.start(0,()=>{N.current=!1}))}function i(){R.current=`keyboard`}return qt(G(e,`pointerdown`,n,!0),G(e,`pointerup`,t,!0),G(e,`pointercancel`,t,!0),G(e,`keydown`,i,!0),t)},[r,b,y,U,v,j,oe,le]),F.useEffect(()=>{if(r||!c)return;let e=K(U);function t(){N.current=!0,oe.start(0,()=>{N.current=!1})}function n(e){let t=Vt(e);Tn(t)&&(re.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Vt(t);s&&n==null&&i!=null&&W(b,i)&&pr(i),queueMicrotask(()=>{let a=T(),c=g.context.triggerElements,l=le(),f=n?.hasAttribute(In(`focus-guard`))&&[z.current,B.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,cr(d),cr(u)].includes(n),p=!(W(y,n)||W(b,n)||W(n,b)||W(j?.portalNode,n)||l.some(e=>e===n||W(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>W(e,n))||f||A&&(Pn(A.nodesRef.current,a).find(e=>W(e.context?.elements.floating,n)||W(e.context?.elements.domReference,n))||Fn(A.nodesRef.current,a).find(e=>[e.context?.elements.floating,Kt(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===y&&U&&gr(U),o&&r!==y&&!dn(i)&&Bt(e)===e.body){if(D(U)&&(U.focus(),o===`popup`)){H.request(()=>{U.focus()});return}let e=ce(),t=re.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||U;D(n)&&n.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(E||!s)&&n&&p&&!N.current&&(E||n!==mr())&&(M.current=!0,g.setOpen(!1,ut(st,t)))})}function a(){P.current||(w.current.insideReactTree=!0,ae.start(0,()=>{w.current.insideReactTree=!1}))}let l=D(y)?y:null;if(!(!b&&!l))return qt(l&&G(l,`focusout`,i),l&&G(l,`pointerdown`,t),b&&G(b,`focusin`,n),b&&G(b,`focusout`,i),b&&j&&G(b,`focusout`,a,!0))},[r,y,b,U,s,A,j,g,c,o,ce,E,T,w,ae,oe,H,u,d,le]),F.useEffect(()=>{if(r||!b||!v)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${In(`portal`)}]`)||[]),t=(A?Fn(A.nodesRef.current,T()):[]).find(e=>Gt(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Xn([b,...e,z.current,B.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...le(),t,cr(d),cr(u),E?y:null].filter(e=>e!=null),{ariaHidden:s||E,mark:!1}),i=Xn([b,...e].filter(e=>e!=null));return()=>{i(),n()}},[v,r,y,b,s,j,E,A,T,u,d,le]),_(()=>{if(!v||r||!D(U))return;let e=K(U),t=Bt(e);queueMicrotask(()=>{let n=te.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||W(U,t))return;let i=null,a=()=>(i??=ce(U),i[0]||U),o;o=r===!0||r===null?a():cr(r),o||=a();let s=W(U,Bt(e));Rn(o,{preventScroll:o===U,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=Bt(e);return!(t!==o&&W(U,t))}})})},[r,v,U,ce,te,O,k]),_(()=>{if(r||!U)return;let e=K(U),t=Bt(e),n=O.current==null;pr(t);function i(e){if(e.open||(I.current=lr(e.nativeEvent,R.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(M.current=!0),e.reason===`outside-press`)if(e.nested)M.current=!1;else if(It(e.nativeEvent)||Lt(e.nativeEvent))M.current=!1;else{let e=!1;K(U).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}x.on(`openchange`,i);function a(){let e=ne.current,r=typeof e==`function`?e(I.current):e;if(r===void 0||r===!1)return null;r===null&&(r=!0);let i=y?.isConnected?y:null,a=t?.isConnected&&m(t)!==`body`?t:null,o=n?a||i:i||a;return o||=mr()||null,typeof r==`boolean`?o:cr(r)||o||null}return()=>{x.off(`openchange`,i);let t=Bt(e),n=le(),r=W(b,t)||n.some(e=>e===t||W(e,t))||A&&Pn(A.nodesRef.current,T(),!1).some(e=>W(e.context?.elements.floating,t)),o=ne.current,s=a();queueMicrotask(()=>{let n=hr(s),i=typeof o!=`boolean`;o&&!M.current&&D(n)&&(!(!i&&n!==t&&t!==e.body)||r)&&n.focus({preventScroll:!0}),M.current=!1})}},[r,b,U,ne,O,x,A,y,T,le]),_(()=>{if(!jt||v||!b)return;let e=Bt(K(b));!D(e)||!Wt(e)||W(b,e)&&e.blur()},[v,b]),_(()=>{if(!(r||!j))return j.setFocusManagerState({modal:s,closeOnFocusOut:c,open:v,onOpenChange:g.setOpen,domReference:y}),()=>{j.setFocusManagerState(null)}},[r,j,s,v,g,c,y]),_(()=>{if(!(r||!U))return gr(U),()=>{queueMicrotask(fr)}},[r,U]);let ue=!r&&(!s||!E)&&(se||s);return(0,L.jsxs)(F.Fragment,{children:[ue&&(0,L.jsx)(rn,{"data-type":`inside`,ref:V,onFocus:e=>{if(s){let e=ce();Rn(e[e.length-1])}else j?.portalNode&&(M.current=!1,jn(e,j.portalNode)?kn(y)?.focus():cr(d??j.beforeOutsideRef)?.focus())}}),n,ue&&(0,L.jsx)(rn,{"data-type":`inside`,ref:ie,onFocus:e=>{s?Rn(ce()[0]):j?.portalNode&&(c&&(M.current=!0),jn(e,j.portalNode)?An(y)?.focus():cr(u??j.afterOutsideRef)?.focus())}})]})}function vr(){return!1}function yr(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function br(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=vr,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:m}=l.context,h=sr(c),_=C(typeof i==`function`?i:()=>!1),y=typeof i==`function`?_:i,b=y!==!1,x=C(()=>a),{escapeKey:S,outsidePress:w}=yr(s),T=F.useRef(!1),ee=F.useRef(!1),E=F.useRef(!1),ne=F.useRef(!1),O=F.useRef(``),k=F.useRef(null),A=yt(),j=yt(),M=C(()=>{j.clear(),m.current.insideReactTree=!1}),N=C(e=>{let t=m.current.floatingContext?.nodeId;return(h?Pn(h.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),P=C(e=>Ht(e,l.select(`floatingElement`))||Ht(e,l.select(`domReferenceElement`))),re=C(e=>{o()&&l.setOpen(!1,ut(at,e.nativeEvent))}),I=C(e=>{if(!u||!n||!r||e.key!==`Escape`||ne.current||!S&&N(`__escapeKeyBubbles`))return;let t=ut(ct,Ft(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!S&&!t.isPropagationAllowed&&e.stopPropagation()}),L=C(()=>{m.current.insideReactTree=!0,j.start(0,M)}),R=C(e=>{if(!u||!n||e.button!==0)return;let t=Vt(e.nativeEvent);W(l.select(`floatingElement`),t)&&(T.current||(T.current=!0,ee.current=!1))}),z=C(e=>{!u||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&T.current&&(ee.current=!0)});F.useEffect(()=>{if(!u||!n)return;m.current.__escapeKeyBubbles=S,m.current.__outsidePressBubbles=w;let e=new vt,t=new vt;function i(){e.clear(),ne.current=!0}function a(){e.start(jt?5:0,()=>{ne.current=!1})}function o(){E.current=!0,t.start(0,()=>{E.current=!1})}function s(){T.current=!1,ee.current=!1}function c(){let e=O.current,t=e===`pen`||!e?`mouse`:e,n=x(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function _(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function C(e){let t=m.current.floatingContext?.nodeId,n=h&&Pn(h.nodesRef.current,t).some(t=>Ht(e,t.context?.elements.floating));return P(e)||n}function j(e){if(_(e)){e.type!==`click`&&!P(e)&&(t.clear(),E.current=!1),M();return}if(m.current.insideReactTree){M();return}let n=Vt(e),r=`[${In(`inert`)}]`,i=g(n)?n.getRootNode():null,a=Array.from((p(i)?i:K(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>W(e,n))))return;let s=g(n)?n:null;for(;s&&!f(s);){let e=te(s);if(f(e)||!g(e))break;s=e}if(!(a.length&&g(n)&&!Ut(n)&&!W(n,l.select(`floatingElement`))&&a.every(e=>!W(s,e)))){if(D(n)&&!(`touches`in e)){let t=f(n),r=v(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!C(e)){if(c()===`intentional`&&E.current){t.clear(),E.current=!1;return}typeof y==`function`&&!y(e)||N(`__outsidePressBubbles`)||(l.setOpen(!1,ut(ot,e)),M())}}}function re(e){c()!==`sloppy`||e.pointerType===`touch`||!l.select(`open`)||!n||P(e)||j(e)}function F(e){if(c()!==`sloppy`||!l.select(`open`)||!n||P(e))return;let t=e.touches[0];t&&(k.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Vt(e);if(!n)return;let r=G(n,e.type,()=>{t(e),r()})}function R(e){O.current=`touch`,L(e,F)}function z(e){A.clear(),e.type===`pointerdown`&&(O.current=e.pointerType),!(e.type===`mousedown`&&k.current&&!k.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?re(e):j(e)})}function B(e){if(!T.current)return;let n=ee.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!C(e)){if(n){o();return}typeof y==`function`&&!y(e)||(t.clear(),E.current=!0,M())}}}function V(e){if(c()!==`sloppy`||!k.current||P(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(k.current.dismissOnTouchEnd=!0),i>10&&(j(e),A.clear(),k.current=null)}function ie(e){L(e,V)}function ae(e){c()!==`sloppy`||!k.current||P(e)||(k.current.dismissOnTouchEnd&&j(e),A.clear(),k.current=null)}function oe(e){L(e,ae)}let H=K(d),se=qt(r&&qt(G(H,`keydown`,I),G(H,`compositionstart`,i),G(H,`compositionend`,a)),b&&qt(G(H,`click`,z,!0),G(H,`pointerdown`,z,!0),G(H,`pointerup`,B,!0),G(H,`pointercancel`,B,!0),G(H,`mousedown`,z,!0),G(H,`mouseup`,B,!0),G(H,`touchstart`,R,!0),G(H,`touchmove`,ie,!0),G(H,`touchend`,oe,!0)));return()=>{se(),e.clear(),t.clear(),s(),E.current=!1}},[m,d,r,b,y,u,n,S,w,I,M,x,N,P,h,l,A]),F.useEffect(M,[y,M]);let B=F.useMemo(()=>({onKeyDown:I,onPointerDown:re,onClick:re}),[I,re]),V=F.useMemo(()=>({onKeyDown:I,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(e){L(),R(e)},onPointerDownCapture(e){L(),R(e)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[I,L,R,z]);return F.useMemo(()=>n?{reference:B,floating:V,trigger:B}:{},[n,B,V])}function xr(e){let t=F.useRef(!0);t.current&&(t.current=!1,e())}var q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(E(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Sr=[],Cr=void 0;function wr(){return Cr}function Tr(e){Sr.push(e)}var Er=h(19)?kr:Ar;function Dr(e,t,n,r,i){return Er(e,t,n,r,i)}function Or(e,t,n,r,i){let a=F.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,R.useSyncExternalStore)(e.subscribe,a,a)}Tr({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,R.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function kr(e,t,n,r,i){let a=wr();if(!a)return Or(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Ar(e,t,n,r,i){return(0,z.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var jr=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Dr(this,e,t,n,r)}},Mr=class extends jr{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){F.useDebugValue(e);let n=this;_(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;_(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);_(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){F.useDebugValue(e);let n=this,r=t!==void 0;_(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return F.useDebugValue(e),Dr(this,this.selectors[e],t,n,r)}useContextCallback(e,t){F.useDebugValue(e);let n=C(t??b);this.context[e]=n}useStateSetter(e){let t=F.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Nr={open:q(e=>e.open),transitionStatus:q(e=>e.transitionStatus),domReferenceElement:q(e=>e.domReferenceElement),referenceElement:q(e=>e.positionReference??e.referenceElement),floatingElement:q(e=>e.floatingElement),floatingId:q(e=>e.floatingId)},Pr=class extends Mr{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:rr(),nested:n,triggerElements:i},Nr),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Rt(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Fr(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=F.useRef(null);r===void 0&&f.current===null&&(f.current=new Pr({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),_(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};g(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function Ir(e,t=!1,n=!1){let[r,i]=F.useState(e&&t?`idle`:void 0),[a,o]=F.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),_(()=>{if(!e&&a&&r!==`ending`&&n){let e=Qt.request(()=>{i(`ending`)});return()=>{Qt.cancel(e)}}},[e,a,r,n]),_(()=>{if(!e||t)return;let n=Qt.request(()=>{i(void 0)});return()=>{Qt.cancel(n)}},[t,e]),_(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Qt.request(()=>{i(`idle`)});return()=>{Qt.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}function Lr(e,t=!1,n=!0){let r=$t();return C((i,a=null)=>{r.cancel();let o=cr(e);if(o==null)return;let s=o,c=()=>{I.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=Ke.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Rr(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=C(i),o=Lr(r,n,!1);F.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}var zr={tabIndex:-1,[zt]:``};function Br(e){return t=>t!==`touch`||e.current}function Vr(e,t,n=!1){let r=mt(),i=or()!=null,a=F.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return Fr({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function Hr(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let i=n?.id??null;(i||t)&&(e.activeTriggerId=i,e.activeTriggerElement=n??null)}function Ur(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState(`open`),i=e.useState(`triggerCount`);_(()=>{if(!r){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,i={};e.state.triggerCount!==t&&(i.triggerCount=t);let a=e.select(`activeTriggerId`),o=null;if(a){let t=e.context.triggerElements.getById(a);t?t!==e.state.activeTriggerElement&&(i.activeTriggerElement=t):o=a}if(!o&&!a&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;i.activeTriggerId=e,i.activeTriggerElement=n}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),o&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===o&&!e.context.triggerElements.getById(o)){let t=ut(it);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,i,n])}function Wr(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Ir(e),o=t.useState(`preventUnmountingOnClose`),s=!e&&o;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:s});let c=C(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Rr({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:a}}function Gr(e,t){e.useSyncedValues(t),_(()=>()=>{e.update({activeTriggerProps:w,inactiveTriggerProps:w,popupProps:w})},[e])}function Kr(e,t){_(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),_(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var qr=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Jr(){return new Pr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new qr,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Yr(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Jr(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:w,inactiveTriggerProps:w,popupProps:w}}function Xr(e,t,n=!1){return new Pr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var Zr=q(e=>e.triggerIdProp??e.activeTriggerId),Qr=q(e=>e.openProp??e.open),$r=q(e=>(e.popupElement?.id??e.floatingId)||void 0);function ei(e,t){return t!==void 0&&Qr(e)&&Zr(e)===t}function ti(e,t){return ei(e,t)?!0:t!==void 0&&Qr(e)&&Zr(e)==null&&e.triggerCount===1}var ni={open:Qr,mounted:q(e=>e.mounted),transitionStatus:q(e=>e.transitionStatus),floatingRootContext:q(e=>e.floatingRootContext),triggerCount:q(e=>e.triggerCount),preventUnmountingOnClose:q(e=>e.preventUnmountingOnClose),payload:q(e=>e.payload),activeTriggerId:Zr,activeTriggerElement:q(e=>e.mounted?e.activeTriggerElement:null),popupId:$r,isTriggerActive:q((e,t)=>t!==void 0&&Zr(e)===t),isOpenedByTrigger:q((e,t)=>ei(e,t)),isMountedByTrigger:q((e,t)=>t!==void 0&&Zr(e)===t&&e.mounted),triggerProps:q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:q((e,t)=>ti(e,t)?$r(e):void 0),popupProps:q(e=>e.popupProps),popupElement:q(e=>e.popupElement),positionerElement:q(e=>e.positionerElement)},ri=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),ii=function(e){return e[e.open=Xe.open]=`open`,e[e.closed=Xe.closed]=`closed`,e[e.startingStyle=Xe.startingStyle]=`startingStyle`,e[e.endingStyle=Xe.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),ai=F.createContext(void 0);function oi(){let e=F.useContext(ai);if(e===void 0)throw Error(E(26));return e}var si=`ArrowUp`,ci=`ArrowDown`,li=`ArrowLeft`,ui=`ArrowRight`,di=`Home`,fi=new Set([li,ui]),pi=new Set([li,ui,di,`End`]),mi=new Set([si,ci]),hi=new Set([si,ci,di,`End`]),gi=new Set([...fi,...mi]),_i=new Set([...gi,di,`End`]),vi=`Shift`,yi=new Set([vi,`Control`,`Alt`,`Meta`]);function bi(e){return D(e)&&e.tagName===`INPUT`}function xi(e){return!!(bi(e)&&e.selectionStart!=null||D(e)&&e.tagName===`TEXTAREA`)}function Si(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Ci(e,t,`left`),a=wi(e),o=wi(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Ci(e,t,`top`),r=wi(e),i=wi(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Ci(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function wi(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Ti={...tt,...Ye,nestedDialogOpen(e){return e?{[ii.nestedDialogOpen]:``}:null}},Ei=F.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,{store:c}=Ge(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`),C=s.id??S;oi(),Rr({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let w=o===void 0?Br(c.context.popupRef):o,T=g>0,E=c.useStateSetter(`popupElement`),te=ee(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:T},props:[f,{id:C,"aria-labelledby":y??void 0,"aria-describedby":l??void 0,role:x,...zr,hidden:!m,onKeyDown(e){_i.has(e.key)&&e.stopPropagation()},style:{[ri.nestedDialogs]:g}},s],ref:[t,c.context.popupRef,E],stateAttributesMapping:Ti});return(0,L.jsx)(_r,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:w,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:te})});function Di(e){return h(19)?e:e?`true`:void 0}var Oi=F.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,L.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),ki=F.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Ge(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,L.jsx)(ai.Provider,{value:n,children:(0,L.jsxs)(nr,{ref:t,...r,children:[a&&o===!0&&(0,L.jsx)(Oi,{ref:i.context.internalBackdropRef,inert:Di(!s)}),e.children]})}):null}),Ai={},ji={},Mi=``;function Ni(e){if(typeof document>`u`)return!1;let t=K(e);return O(t).innerWidth-t.documentElement.clientWidth>0}function Pi(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=K(e),n=t.documentElement,r=t.body,i=ne(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Fi(e){let t=K(e),n=t.documentElement,r=t.body,i=ne(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Ii(e){let t=K(e),n=t.documentElement,r=t.body,i=O(n),a=0,o=0,s=!1,c=Qt.create();if(jt&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Ai={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Mi=n.style.scrollBehavior,ji={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=ne(n)?n:r;if(s=Pi(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Ai),Object.assign(r.style,ji),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Mi)}function d(){u(),c.request(l)}l();let f=G(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Li=new class{lockCount=0;restore=null;timeoutLock=vt.create();timeoutUnlock=vt.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=K(e).documentElement,n=O(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=b;return}let r=Et||!Ni(e);this.restore=r?Fi(e):Ii(e)}};function Ri(e=!0,t=null){_(()=>{if(e)return Li.acquire(t)},[e,t])}function zi(e){let{store:t,actionsRef:n}=e,r=t.useState(`open`);Kr(t,r),Ur(t);let{forceUnmount:i}=Wr(r,t),a=F.useCallback(()=>{t.setOpen(!1,ut(lt))},[t]);F.useImperativeHandle(n,()=>({unmount:i,close:a}),[i,a])}function Bi({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=F.useState(0),[u,d]=F.useState(0),f=c===0,p=br(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=Vt(t);return f&&!i?a&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||W(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0:!1},escapeKey:f});return Ri(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{l(0),d(0)}),F.useEffect(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(c+1,u+ +!!n),t?.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,c,u,t]),Gr(e,{activeTriggerProps:p.reference??w,inactiveTriggerProps:p.trigger??w,popupProps:p.floating??w,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var Vi={...ni,modal:q(e=>e.modal),nested:q(e=>e.nested),nestedOpenDialogCount:q(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:q(e=>e.nestedOpenDrawerCount),disablePointerDismissal:q(e=>e.disablePointerDismissal),openMethod:q(e=>e.openMethod),descriptionElementId:q(e=>e.descriptionElementId),titleElementId:q(e=>e.titleElementId),viewportElement:q(e=>e.viewportElement),role:q(e=>e.role)},Hi=class e extends Mr{constructor(e,t,n=!1){let r=new qr,i=Ui(e);i.floatingRootContext=Xr(r,t,n),super(i,{popupRef:F.createRef(),backdropRef:F.createRef(),internalBackdropRef:F.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Vi)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};Hr(n,e,t.trigger),this.update(n)};static useStore(t,n){return Vr(t,(t,r)=>new e(n,t,r),!0).store}};function Ui(e={}){return{...Yr(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Wi(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Ge(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=Hi.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});xr(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);zi({store:b,actionsRef:l});let w=x||S,T=F.useMemo(()=>({store:b}),[b]);return(0,L.jsx)(Ue.Provider,{value:!1,children:(0,L.jsxs)(We.Provider,{value:T,children:[w&&(0,L.jsx)(Bi,{store:b,parentContext:v?.store.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})})}function Gi(e){return Wi(e,F.useContext(Ue)?`drawer`:`dialog`)}function Ki({open:e=!1,side:t=`left`,className:n,onOpenChange:r,children:i}){return(0,L.jsx)(Gi,{open:e,onOpenChange:r,modal:!0,children:(0,L.jsxs)(ki,{children:[(0,L.jsx)(rt,{className:`fixed inset-0 z-50 bg-black/50 duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`}),(0,L.jsx)(Ei,{"aria-modal":`true`,className:u(`fixed top-0 z-50 h-full w-72 border-r bg-background p-4 shadow-lg outline-none duration-200`,`data-open:animate-in data-closed:animate-out`,t===`left`?`left-0 data-open:slide-in-from-left data-closed:slide-out-to-left`:`right-0 border-l border-r-0 data-open:slide-in-from-right data-closed:slide-out-to-right`,n),children:i})]})})}var qi=.75,Ji=.75;function Yi({open:e}){return(0,L.jsx)(`svg`,{viewBox:`0 0 8 8`,fill:`currentColor`,"aria-hidden":`true`,className:u(`size-2.5 transition-transform duration-200`,e&&`rotate-90`),children:(0,L.jsx)(`path`,{d:`M2.5 1 6 4 2.5 7Z`})})}function Xi({node:e,depth:t,currentPath:n,isActive:r,closeDrawer:i}){let a=`db-sidebar:${e.label}:${e.link??``}`,[o,s]=(0,F.useState)(()=>{try{let e=sessionStorage.getItem(a);if(e!==null)return e===`true`}catch{}return t===0});function c(){let e=!o;s(e);try{sessionStorage.setItem(a,String(e))}catch{}}let l=!!e.link,d=r(e.link);return(0,L.jsxs)(`li`,{className:`group/row relative text-sm text-foreground`,children:[(0,L.jsx)(`div`,{className:u(`flex min-w-0 items-start transition-colors hover:bg-accent/60 hover:text-accent-foreground`,d&&`bg-accent text-accent-foreground`),children:l?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`a`,{href:e.link,className:u(`flex min-h-6 min-w-0 flex-1 items-start py-2`,d&&`font-semibold`),style:{paddingLeft:`${qi+t*Ji}rem`},"aria-current":d?`page`:void 0,onClick:i,children:(0,L.jsx)(`span`,{className:`min-w-0 leading-tight break-words`,children:e.label})}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>c(),className:`mt-1.5 mr-1 flex size-4 shrink-0 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:text-foreground`,"aria-expanded":o,"aria-label":`${o?`Collapse`:`Expand`} ${e.label}`,children:(0,L.jsx)(Yi,{open:o})})]}):(0,L.jsxs)(`button`,{type:`button`,onClick:()=>c(),className:`flex min-h-6 w-full items-start py-2 pr-2 text-left`,style:{paddingLeft:`${qi+t*Ji}rem`},"aria-expanded":o,children:[(0,L.jsx)(`span`,{className:`min-w-0 flex-1 leading-tight break-words`,children:e.label}),(0,L.jsx)(`span`,{className:`ml-1 flex size-4 shrink-0 items-center justify-center text-muted-foreground/70`,children:(0,L.jsx)(Yi,{open:o})})]})}),o&&e.items&&e.items.length>0&&(0,L.jsx)(`div`,{children:(0,L.jsx)(Zi,{nodes:e.items,depth:t+1,currentPath:n,isActive:r,closeDrawer:i})})]})}function Zi({nodes:e,depth:t=0,currentPath:n,isActive:r,closeDrawer:i}){return(0,L.jsx)(`nav`,{className:t===0?`pt-4`:void 0,children:(0,L.jsx)(`ul`,{children:e.map(e=>e.items&&e.items.length>0?(0,L.jsx)(Xi,{node:e,depth:t,currentPath:n,isActive:r,closeDrawer:i},e.label+(e.link??``)):(0,L.jsx)(`li`,{className:`text-sm text-foreground transition-colors hover:bg-accent/60 hover:text-accent-foreground`,children:e.link?(0,L.jsx)(`a`,{href:e.link,className:u(`flex min-h-6 min-w-0 items-start py-2 pr-2 leading-tight break-words`,r(e.link)&&`bg-accent text-accent-foreground font-semibold`),style:{paddingLeft:`${qi+t*Ji}rem`},"aria-current":r(e.link)?`page`:void 0,onClick:i,children:e.label}):(0,L.jsx)(`span`,{className:`flex min-h-6 items-start py-2 pr-2 leading-tight break-words`,style:{paddingLeft:`${qi+t*Ji}rem`},children:e.label})},e.label+(e.link??``)))})})}function Qi({nav:e,currentPath:t,title:n,homeLink:r=`/`,footer:i,github:a,nested:o=!1}){let s=Me(V);function c(e){return e?e.replace(/\/$/,``)===t.replace(/\/$/,``):!1}function l(){V.set(!1)}function u(e){V.set(e)}let d=(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[n&&(0,L.jsx)(`div`,{className:`flex h-14 items-center border-b px-3`,children:(0,L.jsxs)(`a`,{href:r,className:`flex min-w-0 items-center gap-2 px-1 font-semibold text-foreground transition-colors hover:text-foreground/80`,children:[(0,L.jsx)(Be,{className:`h-6 w-6 shrink-0 text-primary`}),(0,L.jsx)(`span`,{className:`truncate text-base font-bold tracking-tight`,children:n})]})}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,L.jsx)(Zi,{nodes:e,currentPath:t,isActive:c,closeDrawer:l})}),(i||a)&&(0,L.jsxs)(`footer`,{className:`flex items-center gap-1 border-t px-2 py-2`,children:[i,a&&(0,L.jsx)(`a`,{href:a,target:`_blank`,rel:`noreferrer noopener`,"aria-label":`Project repository`,className:`flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,L.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,L.jsx)(`path`,{d:`M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2 0 1.9 1.2 1.9 1.2 1 1.8 2.8 1.3 3.5 1 0-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.2.5-2.3 1.3-3.1-.2-.4-.6-1.6 0-3.2 0 0 1-.3 3.4 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.8 0 3.2.9.8 1.3 1.9 1.3 3.2 0 4.6-2.8 5.6-5.5 5.9.5.4.9 1 .9 2.2v3.3c0 .3.1.7.8.6A12 12 0 0 0 12 .3`})})})]})]});return o?d:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`hidden h-full lg:block`,children:d}),(0,L.jsx)(`div`,{className:`lg:hidden`,children:(0,L.jsx)(Ki,{open:s,side:`left`,onOpenChange:u,children:d})})]})}function $i({headings:e,activeSlug:t}){let n=Me(B)||t||``,r=(0,F.useMemo)(()=>e.filter(e=>e.depth>=2&&e.depth<=3),[e]);return(0,F.useEffect)(()=>{t&&!B.get()&&B.set(t);let e=0,n=()=>{if(e=0,r.length===0)return;let t=r[r.length-1],n=document.documentElement;if(window.innerHeight+window.scrollY>=n.scrollHeight-2){t&&B.set(t.slug);return}let i=r[0]?.slug??``;for(let e of r){let t=document.getElementById(e.slug);if(t)if(t.getBoundingClientRect().top<=120)i=e.slug;else break}B.set(i)},i=()=>{e||=requestAnimationFrame(n)};return n(),window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i,{passive:!0}),()=>{window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i),e&&cancelAnimationFrame(e)}},[r,t]),r.length===0?null:(0,L.jsxs)(`nav`,{"aria-label":`Table of contents`,className:`text-sm`,children:[(0,L.jsx)(`p`,{className:`mb-2 font-semibold`,children:`On this page`}),(0,L.jsx)(`ul`,{className:`border-l border-border`,children:r.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsx)(`a`,{href:`#${e.slug}`,className:u(`-ml-px block border-l-2 py-1 text-muted-foreground transition-colors hover:text-foreground`,n===e.slug&&`text-primary`,n===e.slug&&`font-medium`),style:{borderLeftColor:n===e.slug?`var(--primary)`:`transparent`,paddingLeft:`${.75+(e.depth-2)*.75}rem`},children:e.text})},e.slug))})]})}var ea=Object.defineProperty,ta=(e,t)=>ea(e,`name`,{value:t,configurable:!0});function na(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ta(na,`setRef`);function ra(...e){return t=>{let n=!1,r=e.map(e=>{let r=na(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():na(e[t],null)}}}}ta(ra,`composeRefs`);function ia(...e){return F.useCallback(ra(...e),e)}ta(ia,`useComposedRefs`);var aa=Object.defineProperty,oa=(e,t)=>aa(e,`name`,{value:t,configurable:!0});function sa(e){let t=F.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];ga(r)&&typeof ba==`function`&&(r=ba(r._payload)),F.Children.forEach(r,e=>{if(ma(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ga(n)&&typeof ba==`function`&&(n=ba(n._payload)),a=da(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=F.cloneElement(a,void 0,s):!o&&F.Children.count(r)===1&&F.isValidElement(r)&&(a=r);let c=a?pa(a):void 0,l=ia(n,c);if(!a){if(r||r===0)throw Error(o?ya(e):va(e));return r}let u=fa(i,a.props??{});return a.type!==F.Fragment&&(u.ref=n?l:c),F.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}oa(sa,`createSlot`);var ca=sa(`Slot`),la=Symbol.for(`radix.slottable`);function ua(e){let t=oa(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=la,t}oa(ua,`createSlottable`);var da=oa((e,t)=>{if(`child`in e.props){let t=e.props.child;return F.isValidElement(t)?F.cloneElement(t,void 0,e.props.children(t.props.children)):null}return F.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function fa(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}}oa(fa,`mergeProps`);function pa(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)}oa(pa,`getElementRef`);function ma(e){return F.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===la}oa(ma,`isSlottable`);var ha=Symbol.for(`react.lazy`);function ga(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ha&&`_payload`in e&&_a(e._payload)}oa(ga,`isLazyComponent`);function _a(e){return typeof e==`object`&&!!e&&`then`in e}oa(_a,`isPromiseLike`);var va=oa(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),ya=oa(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ba=F.use,xa=Object.defineProperty,Sa=(e,t)=>xa(e,`name`,{value:t,configurable:!0}),Ca=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=sa(`Primitive.${t}`),r=F.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wa(e,t){e&&I.flushSync(()=>e.dispatchEvent(t))}Sa(wa,`dispatchDiscreteCustomEvent`);var Ta=Object.defineProperty,Ea=(e,t)=>Ta(e,`name`,{value:t,configurable:!0});function Da(e,t){let n=F.createContext(t);n.displayName=e+`Context`;let r=Ea(e=>{let{children:t,...r}=e,i=F.useMemo(()=>r,Object.values(r));return(0,L.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=F.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Ea(i,`useContext`),[r,i]}Ea(Da,`createContext`);function Oa(e,t=[]){let n=[];function r(t,r){let i=F.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Ea(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=F.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=F.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Ea(s,`useContext`),[o,s]}Ea(r,`createContext`);let i=Ea(()=>{let t=n.map(e=>F.createContext(e));return Ea(function(n){let r=n?.[e]||t;return F.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,ka(i,...t)]}Ea(Oa,`createContextScope`);function ka(...e){let t=e[0];if(e.length===1)return t;let n=Ea(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Ea(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return F.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Ea(ka,`composeContextScopes`);var Aa=Object.defineProperty,ja=(e,t)=>Aa(e,`name`,{value:t,configurable:!0}),Ma=!!(typeof window<`u`&&window.document&&window.document.createElement);function Na(e,t,{checkForDefaultPrevented:n=!0}={}){return ja(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ja(Na,`composeEventHandlers`);function Pa(e){if(!Ma)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ja(Pa,`getOwnerWindow`);function Fa(e){if(!Ma)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ja(Fa,`getOwnerDocument`);function Ia(e,t=!1){let{activeElement:n}=Fa(e);if(!n?.nodeName)return null;if(La(n)&&n.contentDocument)return Ia(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Fa(n).getElementById(e);if(t)return t}}return n}ja(Ia,`getActiveElement`);function La(e){return e.tagName===`IFRAME`}ja(La,`isFrame`);var Ra=globalThis?.document?F.useLayoutEffect:()=>{},za=Object.defineProperty,Ba=(e,t)=>za(e,`name`,{value:t,configurable:!0}),Va=F.useEffectEvent,Ha=F.useInsertionEffect;function Ua(e){if(typeof Va==`function`)return Va(e);let t=F.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ha==`function`?Ha(()=>{t.current=e}):Ra(()=>{t.current=e}),F.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ba(Ua,`useEffectEvent`);var Wa=Object.defineProperty,Ga=(e,t)=>Wa(e,`name`,{value:t,configurable:!0}),Ka=F.useInsertionEffect||Ra;function qa({prop:e,defaultProp:t,onChange:n=Ga(()=>{},`onChange`),caller:r}){let[i,a,o]=Ja({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,F.useCallback(t=>{if(s){let n=Ya(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Ga(qa,`useControllableState`);function Ja({defaultProp:e,onChange:t}){let[n,r]=F.useState(e),i=F.useRef(n),a=F.useRef(t);return Ka(()=>{a.current=t},[t]),F.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Ga(Ja,`useUncontrolledState`);function Ya(e){return typeof e==`function`}Ga(Ya,`isFunction`);var Xa=Symbol(`RADIX:SYNC_STATE`);function Za(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Ua(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=F.useReducer((t,n)=>{if(n.type===Xa)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=F.useRef(p);F.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=F.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return F.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Xa,state:i})},[i,d.state,c]),[h,f]}Ga(Za,`useControllableStateReducer`);var Qa=Object.defineProperty,$a=(e,t)=>Qa(e,`name`,{value:t,configurable:!0});function eo(e,t){return F.useReducer((e,n)=>t[e][n]??e,e)}$a(eo,`useStateMachine`);var to=$a(e=>{let{present:t,children:n}=e,r=no(t),i=typeof n==`function`?n({present:r.isPresent}):F.Children.only(n),a=io(r.ref,oo(i));return typeof n==`function`||r.isPresent?F.cloneElement(i,{ref:a}):null},`Presence`);function no(e){let[t,n]=F.useState(),r=F.useRef(null),i=F.useRef(e),a=F.useRef(`none`),o=F.useRef(void 0),[s,c]=eo(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return F.useEffect(()=>{s===`mounted`?(a.current=o.current??ao(r.current),o.current=void 0):a.current=`none`},[s]),Ra(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=ao(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Ra(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=$a(a=>{let o=ao(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=$a(e=>{e.target===t&&(a.current=ao(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:F.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=ao(t)}else r.current=null;n(e)},[])}}$a(no,`usePresence`);function ro(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}$a(ro,`setRef`);function io(...e){let t=F.useRef(e);return t.current=e,F.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=ro(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():ro(n[e],null)}}},[])}$a(io,`useStableComposedRefs`);function ao(e){return e?.animationName||`none`}$a(ao,`getAnimationName`);function oo(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)}$a(oo,`getElementRef`);var so=Object.defineProperty,co=(e,t)=>so(e,`name`,{value:t,configurable:!0}),lo=F.useId||(()=>void 0),uo=0;function fo(e){let[t,n]=F.useState(lo());return Ra(()=>{e||n(e=>e??String(uo++))},[e]),e||(t?`radix-${t}`:``)}co(fo,`useId`);var po=Object.defineProperty,mo=(e,t)=>po(e,`name`,{value:t,configurable:!0});function ho(e){let t=F.useRef(e);return F.useEffect(()=>{t.current=e}),F.useMemo(()=>((...e)=>t.current?.(...e)),[])}mo(ho,`useCallbackRef`);var go=Object.defineProperty,J=(e,t)=>go(e,`name`,{value:t,configurable:!0}),_o=`dismissableLayer.update`,vo=`dismissableLayer.pointerDownOutside`,yo=`dismissableLayer.focusOutside`,bo,xo=F.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),So=F.forwardRef(J(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=F.useContext(xo),[d,f]=F.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=F.useState({}),h=ia(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=F.useRef(!1),C=To(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:F.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=Eo(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,ee=ho(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return F.useEffect(()=>{if(T)return p.addEventListener(`keydown`,ee,{capture:!0}),()=>p.removeEventListener(`keydown`,ee,{capture:!0})},[p,T,ee]),F.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(bo=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Do(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=bo))}},[d,p,n,u]),F.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Do())},[d,u]),F.useEffect(()=>{let e=J(()=>m({}),`handleUpdate`);return document.addEventListener(_o,e),()=>document.removeEventListener(_o,e)},[]),(0,L.jsx)(Ca.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Na(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Na(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Na(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function Co(){let e=F.useContext(xo),[t,n]=F.useState(null);return F.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}J(Co,`useDismissableLayerSurface`);var wo=J(()=>!0,`IS_TRUE`);function To(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=wo}=t,s=ho(e),c=F.useRef(!1),l=F.useRef(!1),u=F.useRef(new Map),d=F.useRef(()=>{});return F.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}J(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}J(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}J(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}J(p,`handleInteractionBubble`);let m=J(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Oo(vo,s,p,{discrete:!0})};if(J(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:J(()=>c.current=!0,`onPointerDownCapture`)}}J(To,`usePointerDownOutside`);function Eo(e,t=globalThis?.document){let n=ho(e),r=F.useRef(!1);return F.useEffect(()=>{let e=J(e=>{e.target&&!r.current&&Oo(yo,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:J(()=>r.current=!0,`onFocusCapture`),onBlurCapture:J(()=>r.current=!1,`onBlurCapture`)}}J(Eo,`useFocusOutside`);function Do(){let e=new CustomEvent(_o);document.dispatchEvent(e)}J(Do,`dispatchUpdate`);function Oo(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?wa(i,a):i.dispatchEvent(a)}J(Oo,`handleAndDispatchCustomEvent`);var ko=Object.defineProperty,Y=(e,t)=>ko(e,`name`,{value:t,configurable:!0}),Ao=`focusScope.autoFocusOnMount`,jo=`focusScope.autoFocusOnUnmount`,Mo={bubbles:!1,cancelable:!0},No=F.forwardRef(Y(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=F.useState(null),l=ho(i),u=ho(a),d=F.useRef(null),f=ia(t,c),p=F.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;F.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Bo(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Bo(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Bo(s)};Y(e,`handleFocusIn`),Y(t,`handleFocusOut`),Y(n,`handleMutations`),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]),F.useEffect(()=>{if(s){Vo.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ao,Mo);s.addEventListener(Ao,l),s.dispatchEvent(t),t.defaultPrevented||(Po(Wo(Io(s)),{select:!0}),document.activeElement===e&&Bo(s))}return()=>{s.removeEventListener(Ao,l),setTimeout(()=>{let t=new CustomEvent(jo,Mo);s.addEventListener(jo,u),s.dispatchEvent(t),t.defaultPrevented||Bo(e??document.body,{select:!0}),s.removeEventListener(jo,u),Vo.remove(p)},0)}}},[s,l,u,p]);let m=F.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]=Fo(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Bo(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Bo(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)(Ca.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Po(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Bo(r,{select:t}),document.activeElement!==n)return}Y(Po,`focusFirst`);function Fo(e){let t=Io(e);return[Lo(t,e),Lo(t.reverse(),e)]}Y(Fo,`getTabbableEdges`);function Io(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Y(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Y(Io,`getTabbableCandidates`);function Lo(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Ro(r,{upTo:t})))return r}Y(Lo,`findVisible`);function Ro(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}Y(Ro,`isHidden`);function zo(e){return e instanceof HTMLInputElement&&`select`in e}Y(zo,`isSelectableInput`);function Bo(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zo(e)&&t&&e.select()}}Y(Bo,`focus`);var Vo=Ho();function Ho(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Uo(e,t),e.unshift(t)},remove(t){e=Uo(e,t),e[0]?.resume()}}}Y(Ho,`createFocusScopesStack`);function Uo(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Y(Uo,`arrayRemove`);function Wo(e){return e.filter(e=>e.tagName!==`A`)}Y(Wo,`removeLinks`);var Go=Object.defineProperty,Ko=F.forwardRef(((e,t)=>Go(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=F.useState(!1);Ra(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?I.createPortal((0,L.jsx)(Ca.div,{...r,ref:t}),o):null},`Portal`)),qo=Object.defineProperty,Jo=(e,t)=>qo(e,`name`,{value:t,configurable:!0}),Yo=0,Xo=null;function Zo(e){return Qo(),e.children}Jo(Zo,`FocusGuards`);function Qo(){F.useEffect(()=>{Xo||={start:$o(),end:$o()};let{start:e,end:t}=Xo;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Yo++,()=>{Yo===1&&(Xo?.start.remove(),Xo?.end.remove(),Xo=null),Yo=Math.max(0,Yo-1)}},[])}Jo(Qo,`useFocusGuards`);function $o(){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}Jo($o,`createFocusGuard`);var es=function(){return es=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},es.apply(this,arguments)};function ts(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 ns(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 rs=`right-scroll-bar-position`,is=`width-before-scroll-bar`,as=`with-scroll-bars-hidden`,os=`--removed-body-scroll-bar-size`;function ss(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function cs(e,t){var n=(0,F.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 ls=typeof window<`u`?F.useLayoutEffect:F.useEffect,us=new WeakMap;function ds(e,t){var n=cs(t||null,function(t){return e.forEach(function(e){return ss(e,t)})});return ls(function(){var t=us.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||ss(e,null)}),i.forEach(function(e){r.has(e)||ss(e,a)})}us.set(n,e)},[e]),n}function fs(e){return e}function ps(e,t){t===void 0&&(t=fs);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 ms(e){e===void 0&&(e={});var t=ps(null);return t.options=es({async:!0,ssr:!1},e),t}var hs=function(e){var t=e.sideCar,n=ts(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 F.createElement(r,es({},n))};hs.isSideCarExport=!0;function gs(e,t){return e.useMedium(t),hs}var _s=ms(),vs=function(){},ys=F.forwardRef(function(e,t){var n=F.useRef(null),r=F.useState({onScrollCapture:vs,onWheelCapture:vs,onTouchMoveCapture:vs}),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=ts(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=ds([n,t]),C=es(es({},b),i);return F.createElement(F.Fragment,null,u&&F.createElement(x,{sideCar:_s,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?F.cloneElement(F.Children.only(s),es(es({},C),{ref:S})):F.createElement(v,es({},C,{className:c,ref:S}),s))});ys.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ys.classNames={fullWidth:is,zeroRight:rs};var bs,xs=function(){if(bs)return bs;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Ss(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=xs();return t&&e.setAttribute(`nonce`,t),e}function Cs(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ws(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ts=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ss())&&(Cs(t,n),ws(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Es=function(){var e=Ts();return function(t,n){F.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ds=function(){var e=Es();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Os={left:0,top:0,right:0,gap:0},ks=function(e){return parseInt(e||``,10)||0},As=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[ks(n),ks(r),ks(i)]},js=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Os;var t=As(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])}},Ms=Ds(),Ns=`data-scroll-locked`,Ps=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
3
- .${as} {
2
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-FVqWAEVH.js";import{t as n}from"./react-dom-CTKIkrPf.js";import{u as r}from"./book-CAuFl1ig.js";import{t as i}from"./jsx-runtime-DREnUpxT.js";import{n as a,t as o}from"./with-selector-C9wwYFib.js";import{t as s}from"./preload-helper-Czpn1I53.js";import{t as c}from"./clsx-CjueKrWZ.js";import{C as l,D as u,E as d,S as f,T as p,_ as m,a as h,b as g,f as _,g as v,h as y,i as b,m as x,o as S,p as C,r as w,s as T,t as ee,u as E,v as te,w as ne,x as D,y as O}from"./useRenderElement-BQ1V91fw.js";import{t as k}from"./createLucideIcon-CSrh2MqE.js";var A=[],j=0,M=4,N=0,P=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=j+M;t<A.length;)A[t]===e?A.splice(t,M):t+=M;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){N++;let i=!A.length;for(let i of t)A.push(i,n.value,e,r);if(i){for(j=0;j<A.length;j+=M)A[j](A[j+1],A[j+2],A[j+3]);A.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};function re(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 F=e(t(),1),I=e(n(),1),L=i(),R=a(),z=o(),B=P(``),V=P(!1),ie=`theme-`,ae=typeof window<`u`&&typeof document<`u`;function oe(e){if(!ae)return;let t=document.documentElement,n=[];t.classList.forEach(e=>{e.startsWith(ie)&&n.push(e)});for(let e of n)t.classList.remove(e);e&&e!=="default"&&t.classList.add(`${ie}${e}`)}var H=new Map;function se(){for(let[e,t]of H)if(!e.isConnected){try{t.unmount()}catch{}H.delete(e)}}function U(t){if(typeof document>`u`)return;se();let{createElement:n}=F,r=[],i=document.querySelectorAll(`[data-diffbook-island]`);for(let e of i){if(e.dataset.diffbookHydrated===`true`)continue;let n=e.getAttribute(`data-diffbook-island`);if(!n)continue;let i=t[n];if(!i)continue;let a={},o=e.getAttribute(`data-diffbook-props`);if(o)try{a=JSON.parse(o)}catch{}e.dataset.diffbookHydrated=`true`,r.push({el:e,Component:i,props:a})}r.length!==0&&s(async()=>{let{createRoot:t}=await import(`./client-DFmNPiUt.js`).then(t=>e(t.t(),1));return{createRoot:t}},__vite__mapDeps([0,1,2,3])).then(({createRoot:e})=>{for(let{el:t,Component:i,props:a}of r){let r=e(t);H.set(t,r),r.render(n(i,a))}}).catch(()=>{for(let{el:e}of r)delete e.dataset.diffbookHydrated})}var ce=k(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),le=k(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ue=k(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),de=k(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),fe=k(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),pe=k(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),me=k(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),he=k(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ge=k(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),_e=k(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),ve=k(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ye=k(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),be=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,xe=c,Se=(e,t)=>n=>{if(t?.variants==null)return xe(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=be(t)||be(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 xe(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)},Ce=Se([`relative w-full text-sm border has-[>svg]:grid-cols-[calc(var(--spacing)*3)_1fr] grid-cols-[0_1fr] grid gap-y-0.5 items-center [&>svg:not([class*=size-])]:size-4`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:[&_[data-slot=alert-action]]:sm:row-end-3`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:items-start`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:[&_svg]:translate-y-0.5`,`rounded-lg`,`px-3`,`py-2.5`,`has-[>svg]:gap-x-2.5`],{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`border-destructive/30 bg-destructive/5 [&>svg]:text-destructive`,info:`border-info/30 bg-info/5 [&>svg]:text-info`,success:`border-success/30 bg-success/5 [&>svg]:text-success`,warning:`border-warning/30 bg-warning/5 [&>svg]:text-warning`}},defaultVariants:{variant:`default`}});function we({className:e,variant:t,...n}){return(0,L.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:u(Ce({variant:t}),e),...n})}function Te({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-title`,className:u(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function Ee({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-description`,className:u(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}var De={info:`info`,success:`success`,warning:`warning`,error:`destructive`,none:`default`},Oe={info:ue,success:ce,warning:ve,error:le,none:null};function ke({variant:e=`info`,title:t,children:n}){let r=Oe[e];return(0,L.jsxs)(we,{variant:De[e],className:`not-prose my-4`,children:[r?(0,L.jsx)(r,{"aria-hidden":`true`}):null,t?(0,L.jsx)(Te,{children:t}):null,n?(0,L.jsx)(Ee,{children:n}):null]})}function Ae({prev:e,next:t}){return!e&&!t?null:(0,L.jsxs)(`nav`,{className:`not-prose mt-8 flex flex-col gap-3 border-t border-border pt-6 sm:flex-row sm:justify-between`,"aria-label":`Previous and next pages`,children:[e?(0,L.jsxs)(`a`,{href:e.href,className:`group flex min-w-0 flex-1 flex-col rounded-lg border border-border px-4 py-3 no-underline transition-colors hover:border-primary`,children:[(0,L.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Previous`}),(0,L.jsxs)(`span`,{className:`truncate text-sm font-medium text-foreground transition-colors group-hover:text-primary`,children:[`← `,e.title]})]}):(0,L.jsx)(`span`,{className:`flex-1`}),t?(0,L.jsxs)(`a`,{href:t.href,className:`group flex min-w-0 flex-1 flex-col items-end rounded-lg border border-border px-4 py-3 text-right no-underline transition-colors hover:border-primary`,children:[(0,L.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Next`}),(0,L.jsxs)(`span`,{className:`truncate text-sm font-medium text-foreground transition-colors group-hover:text-primary`,children:[t.title,` →`]})]}):(0,L.jsx)(`span`,{className:`flex-1`})]})}var je=(e,t)=>n=>{e.current!==n&&(e.current=n,t())};function Me(e,{keys:t,deps:n=[e,t]}={}){let r=(0,F.useRef)();r.current=e.get();let i=(0,F.useCallback)(n=>(je(r,n)(e.value),t?.length>0?re(e,t,je(r,n)):e.listen(je(r,n))),n),a=()=>r.current;return(0,F.useSyncExternalStore)(i,a,a)}var Ne=`diffbook:theme`;function Pe(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(Ne);if(e)return e}catch{}return e}function Fe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ie({activeTheme:e=`default`,themes:t=[`default`]}){let n=t,[r,i]=(0,F.useState)(()=>Pe(e)),[a,o]=(0,F.useState)(!1),s=(0,F.useRef)(null);function c(e){oe(e);try{window.localStorage.setItem(Ne,e)}catch{}i(e),o(!1)}return(0,F.useEffect)(()=>{function e(e){let t=s.current;t&&e.target instanceof Node&&!t.contains(e.target)&&o(!1)}function t(e){e.key===`Escape`&&o(!1)}return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t)}},[]),(0,L.jsxs)(`div`,{className:`relative`,ref:s,children:[(0,L.jsx)(`button`,{type:`button`,className:`flex h-9 w-9 items-center justify-center rounded-md text-foreground hover:bg-accent`,"aria-label":`Pick theme`,"aria-haspopup":`menu`,"aria-expanded":a,onClick:()=>o(e=>!e),children:(0,L.jsx)(me,{className:`h-[18px] w-[18px]`})}),a&&(0,L.jsx)(`div`,{className:`absolute right-0 z-50 mt-2 max-h-[70vh] min-w-40 overflow-y-auto overscroll-contain rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md`,role:`menu`,children:n.map(e=>(0,L.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e===r,className:`flex w-full items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground`,onClick:()=>c(e),children:[(0,L.jsx)(`span`,{children:Fe(e)}),e===r&&(0,L.jsx)(d,{className:`h-4 w-4`})]},e))})]})}var Le=F.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=T({disabled:i,focusableWhenDisabled:a,native:o});return ee(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),Re=Se(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function ze({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,L.jsx)(Le,{"data-slot":`button`,className:u(Re({variant:t,size:n,className:e})),...r})}function Be({className:e=``}){return(0,L.jsxs)(`svg`,{viewBox:`91.9 5.6 449.4 531.5`,className:e,role:`img`,"aria-label":`diffbook`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,L.jsxs)(`mask`,{id:`diffbook-mark`,maskUnits:`userSpaceOnUse`,x:`91.9`,y:`5.6`,width:`449.4`,height:`531.5`,children:[(0,L.jsx)(`path`,{d:`M634.9568,192.9023 C634.9568,192.9023 634.9568,192.6097 634.9568,192.6097 C634.9568,192.6097 640.1213,192.6097 640.1213,192.6097 C640.1213,192.6097 984.8307,192.6097 984.8307,192.6097 C984.8307,192.6097 984.8307,610.6294 984.8307,610.6294 C984.8307,610.6294 682.3755,610.6294 682.3755,610.6294 C683.5736,614.4207 684.2177,618.4408 684.2177,622.6032 C684.2177,626.4111 683.6786,630.0998 682.6696,633.6032 C682.6696,633.6032 986.2264,633.6032 986.2264,633.6032 C986.2264,633.6032 986.2264,664.1117 986.2264,664.1117 C986.2264,664.1117 642.2317,664.1117 642.2317,664.1117 C642.2317,664.1117 642.2317,663.9735 642.2317,663.9735 C641.8083,663.9853 641.3833,663.9912 640.9568,663.9912 C617.0861,663.9912 597.6959,645.4405 597.6959,622.6032 C597.6959,622.0642 597.7067,621.5276 597.7281,620.9936 C597.7281,620.9936 597.3726,620.9936 597.3726,620.9936 C597.3726,620.9936 597.3726,240.3775 597.3726,240.3775 C597.0354,238.2977 596.8604,236.167 596.8604,233.9976 C596.8604,212.8322 613.5156,195.3487 634.9568,192.9023 Z`,transform:`matrix(1,0,0,1,-475,-157)`,fill:`#fff`}),(0,L.jsx)(`path`,{d:`M174.3752,432.0145 C185.7941,432.0145 195.0697,442.0269 195.0697,454.3529 C195.0697,466.679 185.7941,476.6914 174.3752,476.6914 C162.9562,476.6914 153.6806,466.679 153.6806,454.3529 C153.6806,442.0269 162.9562,432.0145 174.3752,432.0145 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M174.3752,432.0145 L511.2264,432.0145 L511.2264,476.6032 L174.3752,476.6032 L174.3752,432.0145 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M334.50258129633266,294.27363553484156 C348.7507574972707,294.27363553484156 360.32456257368557,305.7967526855735 360.32456257368557,319.98252844934996 C360.32456257368557,334.1683042131264 348.7507574972707,345.69142136385835 334.50258129633266,345.69142136385835 C320.25440509539465,345.69142136385835 308.68060001897976,334.1683042131264 308.68060001897976,319.98252844934996 C308.68060001897976,305.7967526855735 320.25440509539465,294.27363553484156 334.50258129633266,294.27363553484156 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M247.50258129633266,221.27363553484153 C261.7507574972707,221.27363553484153 273.32456257368557,232.79675268557344 273.32456257368557,246.9825284493499 C273.32456257368557,261.16830421312636 261.7507574972707,272.6914213638583 247.50258129633266,272.6914213638583 C233.25440509539465,272.6914213638583 221.68060001897976,261.16830421312636 221.68060001897976,246.9825284493499 C221.68060001897976,232.79675268557344 233.25440509539465,221.27363553484153 247.50258129633266,221.27363553484153 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M323.159194379625,29.609673288504922 L347.6008777334275,29.609673288504922 L347.6008777334275,313.98252844934996 L323.159194379625,313.98252844934996 L323.159194379625,29.609673288504922 Z`,fill:`#000`}),(0,L.jsx)(`path`,{d:`M329.5112191835173,151.03726690747317 L345.44784283820945,166.9738905621653 L264.47089312367876,247.950840276696 L248.53426946898662,232.01421662200386 L329.5112191835173,151.03726690747317 Z`,fill:`#000`})]}),(0,L.jsx)(`rect`,{x:`91.9`,y:`5.6`,width:`449.4`,height:`531.5`,fill:`currentColor`,mask:`url(#diffbook-mark)`})]})}var Ve=`diffbook:color-mode`;function He({title:e,logo:t,nav:n,homeLink:r=`/`,github:i,searchLink:a,showMenu:o=!0,showBrand:s=!0,sidebarCollapsed:c=!1,showThemePicker:l=!1,showThemeToggle:u=!0,appearanceControl:d,breadcrumbs:f,badge:p}){let m=Me(V),[h,g]=(0,F.useState)(!1);(0,F.useEffect)(()=>{let e=document.documentElement,t=()=>e.classList.toggle(`db-scrolled`,window.scrollY>4);return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[]),(0,F.useEffect)(()=>{let e=window.matchMedia(`(min-width: 1024px)`),t=()=>g(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);function _(){if(!(typeof window>`u`))if(window.matchMedia(`(min-width: 1024px)`).matches){let e=document.documentElement.classList.toggle(`db-sidebar-collapsed`);try{localStorage.setItem(`diffbook:sidebar-collapsed`,e?`1`:`0`)}catch{}document.dispatchEvent(new CustomEvent(`diffbook:sidebar-change`,{detail:e}))}else V.set(!V.get())}function v(){let e=document.documentElement.classList.toggle(`dark`);try{localStorage.setItem(Ve,e?`dark`:`light`)}catch{}}return(0,L.jsxs)(`div`,{className:`flex h-14 items-center gap-3 px-4 sm:px-6`,children:[o&&(0,L.jsx)(`button`,{type:`button`,className:`flex h-9 w-9 items-center justify-center rounded-md hover:bg-accent`,"aria-label":`Toggle sidebar`,"aria-expanded":h?!c:m,onClick:_,children:(0,L.jsx)(de,{className:`h-5 w-5`})}),s&&(0,L.jsxs)(`a`,{href:r,className:`flex min-w-0 items-center gap-2 font-semibold`,children:[t?(0,L.jsx)(`img`,{src:t,alt:e,className:`h-7 w-auto shrink-0`}):(0,L.jsx)(Be,{className:`h-7 w-7 shrink-0 text-primary`}),(0,L.jsx)(`span`,{className:`truncate`,children:e}),p&&(0,L.jsx)(`span`,{className:`shrink-0 rounded-full border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium uppercase leading-none tracking-wide text-primary`,children:p})]}),f&&(0,L.jsx)(`div`,{className:`hidden min-w-0 flex-1 md:block`,children:f}),(0,L.jsx)(`nav`,{className:`ml-auto hidden items-center gap-5 text-sm font-medium md:flex`,children:n.map(e=>(0,L.jsx)(`a`,{href:e.link,className:`text-muted-foreground transition-colors hover:text-foreground`,children:e.text},e.link))}),(0,L.jsxs)(`div`,{className:`ml-auto flex items-center gap-1 md:ml-2`,children:[a&&(0,L.jsx)(`a`,{href:a,"aria-label":`Search`,title:`Search (⌘K)`,className:`flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,L.jsx)(he,{className:`h-[18px] w-[18px]`,"aria-hidden":`true`})}),d??(l&&(0,L.jsx)(Ie,{})),!d&&!l&&u&&(0,L.jsxs)(ze,{variant:`ghost`,size:`icon`,className:`h-9 w-9`,"aria-label":`Toggle theme`,onClick:v,children:[(0,L.jsx)(_e,{className:`hidden h-[18px] w-[18px] dark:block`}),(0,L.jsx)(pe,{className:`block h-[18px] w-[18px] dark:hidden`})]}),i&&(0,L.jsx)(`a`,{href:i,target:`_blank`,rel:`noreferrer noopener`,className:`flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,"aria-label":`GitHub`,children:(0,L.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,L.jsx)(`path`,{d:`M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2 0 1.9 1.2 1.9 1.2 1 1.8 2.8 1.3 3.5 1 0-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.2.5-2.3 1.3-3.1-.2-.4-.6-1.6 0-3.2 0 0 1-.3 3.4 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.8 0 3.2.9.8 1.3 1.9 1.3 3.2 0 4.6-2.8 5.6-5.5 5.9.5.4.9 1 .9 2.2v3.3c0 .3.1.7.8.6A12 12 0 0 0 12 .3`})})})]})]})}var Ue=F.createContext(!1),We=F.createContext(void 0);function Ge(e){let t=F.useContext(We);if(e===!1&&t===void 0)throw Error(E(27));return t}var Ke=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),qe={[Ke.startingStyle]:``},Je={[Ke.endingStyle]:``},Ye={transitionStatus(e){return e===`starting`?qe:e===`ending`?Je:null}},Xe=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Ke.startingStyle]=`startingStyle`,e[e.endingStyle=Ke.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Ze=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({});Ze.popupOpen,Ze.popupOpen,Ze.pressed;var Qe={[Xe.open]:``},$e={[Xe.closed]:``},et={[Xe.anchorHidden]:``},tt={open(e){return e?Qe:$e},anchorHidden(e){return e?et:null}},nt={...tt,...Ye},rt=F.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=Ge(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return ee(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:nt,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),it=`none`,at=`trigger-press`,ot=`outside-press`,st=`focus-out`,ct=`escape-key`,lt=`imperative-action`;function ut(e,t,n,r){let i=!1,a=!1,o=r??w;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var dt=0;function ft(e,t=`mui`){let[n,r]=F.useState(e),i=e||n;return F.useEffect(()=>{n??(dt+=1,r(`${t}-${dt}`))},[n,t]),i}var pt=y.useId;function mt(e,t){if(pt!==void 0){let n=pt();return e??(t?`${t}-${n}`:n)}return ft(e,t)}var ht=[];function gt(e){F.useEffect(e,ht)}var _t=0,vt=class e{static create(){return new e}currentId=_t;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=_t,t()},e)}isStarted(){return this.currentId!==_t}clear=()=>{this.currentId!==_t&&(clearTimeout(this.currentId),this.currentId=_t)};disposeEffect=()=>this.clear};function yt(){let e=x(vt.create).current;return gt(e.disposeEffect),e}function bt(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:xt,platform:St,maxTouchPoints:Ct}=bt(),wt=xt.toLowerCase(),Tt=St.toLowerCase(),Et=/^i(os$|p)/.test(Tt)||Tt===`macintel`&&Ct>1,Dt=`android`,Ot=Tt===Dt||wt.includes(Dt),kt=!Et&&Tt.startsWith(`mac`);Tt.startsWith(`win`),!Ot&&/^(linux|chrome os)/.test(Tt);var At=kt||Et,jt=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!jt&&wt.includes(`firefox`),!jt&&wt.includes(`chrom`);var Mt=At,Nt=/jsdom|happydom/.test(wt);function Pt(e){e.preventDefault(),e.stopPropagation()}function Ft(e){return`nativeEvent`in e}function It(e){return e.pointerType===``&&e.isTrusted?!0:Ot&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Lt(e){return Nt?!1:!Ot&&e.width===0&&e.height===0||Ot&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Rt(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var zt=`data-base-ui-focusable`;function Bt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function W(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&p(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Vt(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ht(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ut(e){return e.matches(`html,body`)}function Wt(e){return D(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Gt(e){return e?e.getAttribute(`role`)===`combobox`&&Wt(e):!1}function Kt(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function G(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function qt(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Jt(e){let t=x(Yt,e).current;return t.next=e,_(t.effect),t}function Yt(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Xt=null;globalThis.requestAnimationFrame;var Zt=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Qt=class e{static create(){return new e}static request(e){return Zt.request(e)}static cancel(e){return Zt.cancel(e)}currentId=Xt;request(e){this.cancel(),this.currentId=Zt.request(()=>{this.currentId=Xt,e()})}cancel=()=>{this.currentId!==Xt&&(Zt.cancel(this.currentId),this.currentId=Xt)};disposeEffect=()=>this.cancel};function $t(){let e=x(Qt.create).current;return gt(e.disposeEffect),e}function K(e){return e?.ownerDocument||document}var en={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},tn={...en,position:`fixed`,top:0,left:0},nn={...en,position:`absolute`},rn=F.forwardRef(function(e,t){let[n,r]=F.useState();_(()=>{Mt&&jt&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,L.jsx)(`span`,{...e,ref:t,style:tn,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function an(e,t){return t<0||t>=e.length}function on(e,t){return cn(e.current,{disabledIndices:t})}function sn(e,t){return cn(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function cn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ln(e,a,r));return a}function ln(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!dn(r)||!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function un(e){return e.visibility===`hidden`||e.visibility===`collapse`}function dn(e,t=e?v(e):null){return!e||!e.isConnected||!t||un(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var fn=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function pn(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return p(n)?n.host:null}function mn(e){for(let t of Array.from(e.children))if(m(t)===`summary`)return t;return null}function hn(e,t){let n=mn(t);return!!n&&(e===n||W(n,e))}function gn(e){let t=e?m(e):``;return e!=null&&e.matches(fn)&&(t!==`summary`||e.parentElement!=null&&m(e.parentElement)===`details`&&mn(e.parentElement)===e)&&(t!==`details`||mn(e)==null)&&(t!==`input`||e.type!==`hidden`)}function _n(e){if(!gn(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=pn(t)){let n=t!==e,r=m(t)===`slot`;if(t.hasAttribute(`inert`)||n&&m(t)===`details`&&!t.open&&!hn(e,t)||t.hasAttribute(`hidden`)||!r&&!vn(t,n))return!1}return!0}function vn(e,t){let n=v(e);return t?n.display!==`none`:dn(e,n)}function yn(e){let t=e.tabIndex;if(t<0){let t=m(e);if(t===`details`||t===`audio`||t===`video`||D(e)&&e.isContentEditable)return 0}return t}function bn(e){if(m(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function xn(e,t){let n=bn(e);if(!n)return!0;let r=t.find(e=>{let t=bn(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=bn(e);return t?.name===n.name&&t.form===n.form})===n}function Sn(e){if(D(e)&&m(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return D(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Cn(e,t){Sn(e).forEach(e=>{gn(e)&&t.push(e),Cn(e,t)})}function wn(e,t,n){Sn(e).forEach(e=>{D(e)&&e.matches(t)&&n.push(e),wn(e,t,n)})}function Tn(e){return _n(e)&&yn(e)>=0}function En(e){let t=[];return Cn(e,t),t.filter(_n)}function Dn(e){let t=En(e);return t.filter(e=>yn(e)>=0&&xn(e,t))}function On(e,t){let n=Dn(e),r=n.length;if(r===0)return;let i=Bt(K(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function kn(e){return On(K(e).body,1)||e}function An(e){return On(K(e).body,-1)||e}function jn(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!W(n,r)}function Mn(e){Dn(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Nn(e){let t=[];wn(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Pn(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Pn(e,t.id,n)])}function Fn(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function In(e){return`data-base-ui-${e}`}var Ln=0;function Rn(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ln);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),b;let o=requestAnimationFrame(a);return Ln=o,()=>{Ln===o&&(cancelAnimationFrame(o),Ln=0)}}var zn={inert:new WeakMap,"aria-hidden":new WeakMap},Bn=`data-base-ui-inert`,Vn={inert:new WeakSet,"aria-hidden":new WeakSet},Hn=new WeakMap,Un=0;function Wn(e){return Vn[e]}function Gn(e){return e?p(e)?e.host:Gn(e.parentNode):null}var Kn=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Gn(t);return e.contains(n)?n:null}).filter(e=>e!=null),qn=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Jn=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{m(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Yn(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Kn(t,e),l=i?Jn(t,qn(c),new Set(c)):[],u=[],d=[];if(a){let e=zn[a],n=Wn(a);s=n,o=e;let r=Kn(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);Jn(t,qn(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Hn.get(e)||0)+1;Hn.set(e,t),d.push(e),t===1&&e.setAttribute(Bn,``)}),Un+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Hn.get(e)||0)-1;Hn.set(e,t),t||e.removeAttribute(Bn)}),--Un,Un||(zn.inert=new WeakMap,zn[`aria-hidden`]=new WeakMap,Vn.inert=new WeakSet,Vn[`aria-hidden`]=new WeakSet,Hn=new WeakMap)}}function Xn(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=K(e[0]).body;return Yn(e,a,n,r,{mark:i})}var Zn={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Qn=F.createContext(null),$n=()=>F.useContext(Qn),er=In(`portal`);function tr(e={}){let{ref:t,container:n,componentProps:r=w,elementProps:i}=e,a=mt(),o=$n()?.portalNode,[s,c]=F.useState(null),[u,d]=F.useState(null),f=C(e=>{e!==null&&d(e)}),p=F.useRef(null);_(()=>{if(n===null){p.current&&(p.current=null,d(null),c(null));return}if(a==null)return;let e=(n&&(l(n)?n:n.current))??o??document.body;if(e==null){p.current&&(p.current=null,d(null),c(null));return}p.current!==e&&(p.current=e,d(null),c(e))},[n,o,a]);let m=ee(`div`,r,{ref:[t,f],props:[{id:a,[er]:``},i]});return{portalNode:u,portalSubtree:s&&m?I.createPortal(m,s):null}}var nr=F.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=tr({container:o,ref:t,componentProps:e,elementProps:c}),d=F.useRef(null),f=F.useRef(null),p=F.useRef(null),m=F.useRef(null),[h,g]=F.useState(null),v=F.useRef(!1),y=h?.modal,b=h?.open,x=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;F.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&jn(e)&&(e.type===`focusin`?v.current&&=(Nn(l),!1):(Mn(l),v.current=!0))}return qt(G(l,`focusin`,e,!0),G(l,`focusout`,e,!0))},[l,y]),_(()=>{!l||b!==!0||!v.current||(Nn(l),v.current=!1)},[b,l]);let S=F.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,L.jsxs)(F.Fragment,{children:[u,(0,L.jsxs)(Qn.Provider,{value:S,children:[x&&l&&(0,L.jsx)(rn,{"data-type":`outside`,ref:d,onFocus:e=>{jn(e,l)?p.current?.focus():An(h?h.domReference:null)?.focus()}}),x&&l&&(0,L.jsx)(`span`,{"aria-owns":l.id,style:Zn}),l&&I.createPortal(a,l),x&&l&&(0,L.jsx)(rn,{"data-type":`outside`,ref:f,onFocus:e=>{jn(e,l)?m.current?.focus():(kn(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,ut(`focus-out`,e.nativeEvent)))}})]})]})});function rr(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var ir=F.createContext(null),ar=F.createContext(null),or=()=>F.useContext(ir)?.id||null,sr=e=>{let t=F.useContext(ar);return e??t};function cr(e){return e==null?e:`current`in e?e.current:e}function lr(e,t){let n=O(Vt(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var ur=20,dr=[];function fr(){dr=dr.filter(e=>e.deref()?.isConnected)}function pr(e){fr(),e&&m(e)!==`body`&&(dr.push(new WeakRef(e)),dr.length>ur&&(dr=dr.slice(-20)))}function mr(){return fr(),dr[dr.length-1]?.deref()}function hr(e){return e?Tn(e)?e:Dn(e)[0]||e:null}function gr(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=En(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Tn(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function _r(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:h}=e,g=`rootStore`in t?t.rootStore:t,v=g.useState(`open`),y=g.useState(`domReferenceElement`),b=g.useState(`floatingElement`),{events:x,dataRef:w}=g.context,T=C(()=>w.current.floatingContext?.nodeId),ee=i===!1,E=Gt(y)&&ee,te=Jt(i),ne=Jt(a),O=Jt(l),k=Jt(v),A=sr(p),j=$n(),M=F.useRef(!1),N=F.useRef(!1),P=F.useRef(!1),re=F.useRef(null),I=F.useRef(``),R=F.useRef(``),z=F.useRef(null),B=F.useRef(null),V=S(z,f,j?.beforeInsideRef),ie=S(B,j?.afterInsideRef),ae=yt(),oe=yt(),H=$t(),se=j!=null,U=Kt(b),ce=C((e=U)=>e?Dn(e):[]),le=C(()=>h?.().filter(e=>e!=null)??[]);F.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&W(U,Bt(K(U)))&&ce().length===0&&!E&&Pt(e)}return G(K(U),`keydown`,e)},[r,U,s,E,ce]),F.useEffect(()=>{if(r||!v)return;let e=K(U);function t(){P.current=!1}function n(e){let t=Vt(e),n=le(),r=W(b,t)||W(y,t)||W(j?.portalNode,t)||n.some(e=>e===t||W(e,t));P.current=!r,R.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(N.current=!0,oe.start(0,()=>{N.current=!1}))}function i(){R.current=`keyboard`}return qt(G(e,`pointerdown`,n,!0),G(e,`pointerup`,t,!0),G(e,`pointercancel`,t,!0),G(e,`keydown`,i,!0),t)},[r,b,y,U,v,j,oe,le]),F.useEffect(()=>{if(r||!c)return;let e=K(U);function t(){N.current=!0,oe.start(0,()=>{N.current=!1})}function n(e){let t=Vt(e);Tn(t)&&(re.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Vt(t);s&&n==null&&i!=null&&W(b,i)&&pr(i),queueMicrotask(()=>{let a=T(),c=g.context.triggerElements,l=le(),f=n?.hasAttribute(In(`focus-guard`))&&[z.current,B.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,cr(d),cr(u)].includes(n),p=!(W(y,n)||W(b,n)||W(n,b)||W(j?.portalNode,n)||l.some(e=>e===n||W(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>W(e,n))||f||A&&(Pn(A.nodesRef.current,a).find(e=>W(e.context?.elements.floating,n)||W(e.context?.elements.domReference,n))||Fn(A.nodesRef.current,a).find(e=>[e.context?.elements.floating,Kt(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===y&&U&&gr(U),o&&r!==y&&!dn(i)&&Bt(e)===e.body){if(D(U)&&(U.focus(),o===`popup`)){H.request(()=>{U.focus()});return}let e=ce(),t=re.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||U;D(n)&&n.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(E||!s)&&n&&p&&!N.current&&(E||n!==mr())&&(M.current=!0,g.setOpen(!1,ut(st,t)))})}function a(){P.current||(w.current.insideReactTree=!0,ae.start(0,()=>{w.current.insideReactTree=!1}))}let l=D(y)?y:null;if(!(!b&&!l))return qt(l&&G(l,`focusout`,i),l&&G(l,`pointerdown`,t),b&&G(b,`focusin`,n),b&&G(b,`focusout`,i),b&&j&&G(b,`focusout`,a,!0))},[r,y,b,U,s,A,j,g,c,o,ce,E,T,w,ae,oe,H,u,d,le]),F.useEffect(()=>{if(r||!b||!v)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${In(`portal`)}]`)||[]),t=(A?Fn(A.nodesRef.current,T()):[]).find(e=>Gt(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Xn([b,...e,z.current,B.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...le(),t,cr(d),cr(u),E?y:null].filter(e=>e!=null),{ariaHidden:s||E,mark:!1}),i=Xn([b,...e].filter(e=>e!=null));return()=>{i(),n()}},[v,r,y,b,s,j,E,A,T,u,d,le]),_(()=>{if(!v||r||!D(U))return;let e=K(U),t=Bt(e);queueMicrotask(()=>{let n=te.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||W(U,t))return;let i=null,a=()=>(i??=ce(U),i[0]||U),o;o=r===!0||r===null?a():cr(r),o||=a();let s=W(U,Bt(e));Rn(o,{preventScroll:o===U,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=Bt(e);return!(t!==o&&W(U,t))}})})},[r,v,U,ce,te,O,k]),_(()=>{if(r||!U)return;let e=K(U),t=Bt(e),n=O.current==null;pr(t);function i(e){if(e.open||(I.current=lr(e.nativeEvent,R.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(M.current=!0),e.reason===`outside-press`)if(e.nested)M.current=!1;else if(It(e.nativeEvent)||Lt(e.nativeEvent))M.current=!1;else{let e=!1;K(U).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}x.on(`openchange`,i);function a(){let e=ne.current,r=typeof e==`function`?e(I.current):e;if(r===void 0||r===!1)return null;r===null&&(r=!0);let i=y?.isConnected?y:null,a=t?.isConnected&&m(t)!==`body`?t:null,o=n?a||i:i||a;return o||=mr()||null,typeof r==`boolean`?o:cr(r)||o||null}return()=>{x.off(`openchange`,i);let t=Bt(e),n=le(),r=W(b,t)||n.some(e=>e===t||W(e,t))||A&&Pn(A.nodesRef.current,T(),!1).some(e=>W(e.context?.elements.floating,t)),o=ne.current,s=a();queueMicrotask(()=>{let n=hr(s),i=typeof o!=`boolean`;o&&!M.current&&D(n)&&(!(!i&&n!==t&&t!==e.body)||r)&&n.focus({preventScroll:!0}),M.current=!1})}},[r,b,U,ne,O,x,A,y,T,le]),_(()=>{if(!jt||v||!b)return;let e=Bt(K(b));!D(e)||!Wt(e)||W(b,e)&&e.blur()},[v,b]),_(()=>{if(!(r||!j))return j.setFocusManagerState({modal:s,closeOnFocusOut:c,open:v,onOpenChange:g.setOpen,domReference:y}),()=>{j.setFocusManagerState(null)}},[r,j,s,v,g,c,y]),_(()=>{if(!(r||!U))return gr(U),()=>{queueMicrotask(fr)}},[r,U]);let ue=!r&&(!s||!E)&&(se||s);return(0,L.jsxs)(F.Fragment,{children:[ue&&(0,L.jsx)(rn,{"data-type":`inside`,ref:V,onFocus:e=>{if(s){let e=ce();Rn(e[e.length-1])}else j?.portalNode&&(M.current=!1,jn(e,j.portalNode)?kn(y)?.focus():cr(d??j.beforeOutsideRef)?.focus())}}),n,ue&&(0,L.jsx)(rn,{"data-type":`inside`,ref:ie,onFocus:e=>{s?Rn(ce()[0]):j?.portalNode&&(c&&(M.current=!0),jn(e,j.portalNode)?An(y)?.focus():cr(u??j.afterOutsideRef)?.focus())}})]})}function vr(){return!1}function yr(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function br(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=vr,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:m}=l.context,h=sr(c),_=C(typeof i==`function`?i:()=>!1),y=typeof i==`function`?_:i,b=y!==!1,x=C(()=>a),{escapeKey:S,outsidePress:w}=yr(s),T=F.useRef(!1),ee=F.useRef(!1),E=F.useRef(!1),ne=F.useRef(!1),O=F.useRef(``),k=F.useRef(null),A=yt(),j=yt(),M=C(()=>{j.clear(),m.current.insideReactTree=!1}),N=C(e=>{let t=m.current.floatingContext?.nodeId;return(h?Pn(h.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),P=C(e=>Ht(e,l.select(`floatingElement`))||Ht(e,l.select(`domReferenceElement`))),re=C(e=>{o()&&l.setOpen(!1,ut(at,e.nativeEvent))}),I=C(e=>{if(!u||!n||!r||e.key!==`Escape`||ne.current||!S&&N(`__escapeKeyBubbles`))return;let t=ut(ct,Ft(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!S&&!t.isPropagationAllowed&&e.stopPropagation()}),L=C(()=>{m.current.insideReactTree=!0,j.start(0,M)}),R=C(e=>{if(!u||!n||e.button!==0)return;let t=Vt(e.nativeEvent);W(l.select(`floatingElement`),t)&&(T.current||(T.current=!0,ee.current=!1))}),z=C(e=>{!u||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&T.current&&(ee.current=!0)});F.useEffect(()=>{if(!u||!n)return;m.current.__escapeKeyBubbles=S,m.current.__outsidePressBubbles=w;let e=new vt,t=new vt;function i(){e.clear(),ne.current=!0}function a(){e.start(jt?5:0,()=>{ne.current=!1})}function o(){E.current=!0,t.start(0,()=>{E.current=!1})}function s(){T.current=!1,ee.current=!1}function c(){let e=O.current,t=e===`pen`||!e?`mouse`:e,n=x(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function _(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function C(e){let t=m.current.floatingContext?.nodeId,n=h&&Pn(h.nodesRef.current,t).some(t=>Ht(e,t.context?.elements.floating));return P(e)||n}function j(e){if(_(e)){e.type!==`click`&&!P(e)&&(t.clear(),E.current=!1),M();return}if(m.current.insideReactTree){M();return}let n=Vt(e),r=`[${In(`inert`)}]`,i=g(n)?n.getRootNode():null,a=Array.from((p(i)?i:K(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>W(e,n))))return;let s=g(n)?n:null;for(;s&&!f(s);){let e=te(s);if(f(e)||!g(e))break;s=e}if(!(a.length&&g(n)&&!Ut(n)&&!W(n,l.select(`floatingElement`))&&a.every(e=>!W(s,e)))){if(D(n)&&!(`touches`in e)){let t=f(n),r=v(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!C(e)){if(c()===`intentional`&&E.current){t.clear(),E.current=!1;return}typeof y==`function`&&!y(e)||N(`__outsidePressBubbles`)||(l.setOpen(!1,ut(ot,e)),M())}}}function re(e){c()!==`sloppy`||e.pointerType===`touch`||!l.select(`open`)||!n||P(e)||j(e)}function F(e){if(c()!==`sloppy`||!l.select(`open`)||!n||P(e))return;let t=e.touches[0];t&&(k.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Vt(e);if(!n)return;let r=G(n,e.type,()=>{t(e),r()})}function R(e){O.current=`touch`,L(e,F)}function z(e){A.clear(),e.type===`pointerdown`&&(O.current=e.pointerType),!(e.type===`mousedown`&&k.current&&!k.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?re(e):j(e)})}function B(e){if(!T.current)return;let n=ee.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!C(e)){if(n){o();return}typeof y==`function`&&!y(e)||(t.clear(),E.current=!0,M())}}}function V(e){if(c()!==`sloppy`||!k.current||P(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(k.current.dismissOnTouchEnd=!0),i>10&&(j(e),A.clear(),k.current=null)}function ie(e){L(e,V)}function ae(e){c()!==`sloppy`||!k.current||P(e)||(k.current.dismissOnTouchEnd&&j(e),A.clear(),k.current=null)}function oe(e){L(e,ae)}let H=K(d),se=qt(r&&qt(G(H,`keydown`,I),G(H,`compositionstart`,i),G(H,`compositionend`,a)),b&&qt(G(H,`click`,z,!0),G(H,`pointerdown`,z,!0),G(H,`pointerup`,B,!0),G(H,`pointercancel`,B,!0),G(H,`mousedown`,z,!0),G(H,`mouseup`,B,!0),G(H,`touchstart`,R,!0),G(H,`touchmove`,ie,!0),G(H,`touchend`,oe,!0)));return()=>{se(),e.clear(),t.clear(),s(),E.current=!1}},[m,d,r,b,y,u,n,S,w,I,M,x,N,P,h,l,A]),F.useEffect(M,[y,M]);let B=F.useMemo(()=>({onKeyDown:I,onPointerDown:re,onClick:re}),[I,re]),V=F.useMemo(()=>({onKeyDown:I,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(e){L(),R(e)},onPointerDownCapture(e){L(),R(e)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[I,L,R,z]);return F.useMemo(()=>n?{reference:B,floating:V,trigger:B}:{},[n,B,V])}function xr(e){let t=F.useRef(!0);t.current&&(t.current=!1,e())}var q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(E(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Sr=[],Cr=void 0;function wr(){return Cr}function Tr(e){Sr.push(e)}var Er=h(19)?kr:Ar;function Dr(e,t,n,r,i){return Er(e,t,n,r,i)}function Or(e,t,n,r,i){let a=F.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,R.useSyncExternalStore)(e.subscribe,a,a)}Tr({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,R.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function kr(e,t,n,r,i){let a=wr();if(!a)return Or(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Ar(e,t,n,r,i){return(0,z.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var jr=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Dr(this,e,t,n,r)}},Mr=class extends jr{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){F.useDebugValue(e);let n=this;_(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;_(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);_(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){F.useDebugValue(e);let n=this,r=t!==void 0;_(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return F.useDebugValue(e),Dr(this,this.selectors[e],t,n,r)}useContextCallback(e,t){F.useDebugValue(e);let n=C(t??b);this.context[e]=n}useStateSetter(e){let t=F.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Nr={open:q(e=>e.open),transitionStatus:q(e=>e.transitionStatus),domReferenceElement:q(e=>e.domReferenceElement),referenceElement:q(e=>e.positionReference??e.referenceElement),floatingElement:q(e=>e.floatingElement),floatingId:q(e=>e.floatingId)},Pr=class extends Mr{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:rr(),nested:n,triggerElements:i},Nr),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Rt(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Fr(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=F.useRef(null);r===void 0&&f.current===null&&(f.current=new Pr({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),_(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};g(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function Ir(e,t=!1,n=!1){let[r,i]=F.useState(e&&t?`idle`:void 0),[a,o]=F.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),_(()=>{if(!e&&a&&r!==`ending`&&n){let e=Qt.request(()=>{i(`ending`)});return()=>{Qt.cancel(e)}}},[e,a,r,n]),_(()=>{if(!e||t)return;let n=Qt.request(()=>{i(void 0)});return()=>{Qt.cancel(n)}},[t,e]),_(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Qt.request(()=>{i(`idle`)});return()=>{Qt.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}function Lr(e,t=!1,n=!0){let r=$t();return C((i,a=null)=>{r.cancel();let o=cr(e);if(o==null)return;let s=o,c=()=>{I.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=Ke.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Rr(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=C(i),o=Lr(r,n,!1);F.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}var zr={tabIndex:-1,[zt]:``};function Br(e){return t=>t!==`touch`||e.current}function Vr(e,t,n=!1){let r=mt(),i=or()!=null,a=F.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return Fr({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function Hr(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let i=n?.id??null;(i||t)&&(e.activeTriggerId=i,e.activeTriggerElement=n??null)}function Ur(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState(`open`),i=e.useState(`triggerCount`);_(()=>{if(!r){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,i={};e.state.triggerCount!==t&&(i.triggerCount=t);let a=e.select(`activeTriggerId`),o=null;if(a){let t=e.context.triggerElements.getById(a);t?t!==e.state.activeTriggerElement&&(i.activeTriggerElement=t):o=a}if(!o&&!a&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;i.activeTriggerId=e,i.activeTriggerElement=n}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),o&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===o&&!e.context.triggerElements.getById(o)){let t=ut(it);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,i,n])}function Wr(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Ir(e),o=t.useState(`preventUnmountingOnClose`),s=!e&&o;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:s});let c=C(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Rr({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:a}}function Gr(e,t){e.useSyncedValues(t),_(()=>()=>{e.update({activeTriggerProps:w,inactiveTriggerProps:w,popupProps:w})},[e])}function Kr(e,t){_(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),_(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var qr=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Jr(){return new Pr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new qr,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Yr(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Jr(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:w,inactiveTriggerProps:w,popupProps:w}}function Xr(e,t,n=!1){return new Pr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var Zr=q(e=>e.triggerIdProp??e.activeTriggerId),Qr=q(e=>e.openProp??e.open),$r=q(e=>(e.popupElement?.id??e.floatingId)||void 0);function ei(e,t){return t!==void 0&&Qr(e)&&Zr(e)===t}function ti(e,t){return ei(e,t)?!0:t!==void 0&&Qr(e)&&Zr(e)==null&&e.triggerCount===1}var ni={open:Qr,mounted:q(e=>e.mounted),transitionStatus:q(e=>e.transitionStatus),floatingRootContext:q(e=>e.floatingRootContext),triggerCount:q(e=>e.triggerCount),preventUnmountingOnClose:q(e=>e.preventUnmountingOnClose),payload:q(e=>e.payload),activeTriggerId:Zr,activeTriggerElement:q(e=>e.mounted?e.activeTriggerElement:null),popupId:$r,isTriggerActive:q((e,t)=>t!==void 0&&Zr(e)===t),isOpenedByTrigger:q((e,t)=>ei(e,t)),isMountedByTrigger:q((e,t)=>t!==void 0&&Zr(e)===t&&e.mounted),triggerProps:q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:q((e,t)=>ti(e,t)?$r(e):void 0),popupProps:q(e=>e.popupProps),popupElement:q(e=>e.popupElement),positionerElement:q(e=>e.positionerElement)},ri=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),ii=function(e){return e[e.open=Xe.open]=`open`,e[e.closed=Xe.closed]=`closed`,e[e.startingStyle=Xe.startingStyle]=`startingStyle`,e[e.endingStyle=Xe.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),ai=F.createContext(void 0);function oi(){let e=F.useContext(ai);if(e===void 0)throw Error(E(26));return e}var si=`ArrowUp`,ci=`ArrowDown`,li=`ArrowLeft`,ui=`ArrowRight`,di=`Home`,fi=new Set([li,ui]),pi=new Set([li,ui,di,`End`]),mi=new Set([si,ci]),hi=new Set([si,ci,di,`End`]),gi=new Set([...fi,...mi]),_i=new Set([...gi,di,`End`]),vi=`Shift`,yi=new Set([vi,`Control`,`Alt`,`Meta`]);function bi(e){return D(e)&&e.tagName===`INPUT`}function xi(e){return!!(bi(e)&&e.selectionStart!=null||D(e)&&e.tagName===`TEXTAREA`)}function Si(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Ci(e,t,`left`),a=wi(e),o=wi(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Ci(e,t,`top`),r=wi(e),i=wi(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Ci(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function wi(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Ti={...tt,...Ye,nestedDialogOpen(e){return e?{[ii.nestedDialogOpen]:``}:null}},Ei=F.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,{store:c}=Ge(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`),C=s.id??S;oi(),Rr({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let w=o===void 0?Br(c.context.popupRef):o,T=g>0,E=c.useStateSetter(`popupElement`),te=ee(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:T},props:[f,{id:C,"aria-labelledby":y??void 0,"aria-describedby":l??void 0,role:x,...zr,hidden:!m,onKeyDown(e){_i.has(e.key)&&e.stopPropagation()},style:{[ri.nestedDialogs]:g}},s],ref:[t,c.context.popupRef,E],stateAttributesMapping:Ti});return(0,L.jsx)(_r,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:w,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:te})});function Di(e){return h(19)?e:e?`true`:void 0}var Oi=F.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,L.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),ki=F.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Ge(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,L.jsx)(ai.Provider,{value:n,children:(0,L.jsxs)(nr,{ref:t,...r,children:[a&&o===!0&&(0,L.jsx)(Oi,{ref:i.context.internalBackdropRef,inert:Di(!s)}),e.children]})}):null}),Ai={},ji={},Mi=``;function Ni(e){if(typeof document>`u`)return!1;let t=K(e);return O(t).innerWidth-t.documentElement.clientWidth>0}function Pi(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=K(e),n=t.documentElement,r=t.body,i=ne(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Fi(e){let t=K(e),n=t.documentElement,r=t.body,i=ne(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Ii(e){let t=K(e),n=t.documentElement,r=t.body,i=O(n),a=0,o=0,s=!1,c=Qt.create();if(jt&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Ai={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Mi=n.style.scrollBehavior,ji={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=ne(n)?n:r;if(s=Pi(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Ai),Object.assign(r.style,ji),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Mi)}function d(){u(),c.request(l)}l();let f=G(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Li=new class{lockCount=0;restore=null;timeoutLock=vt.create();timeoutUnlock=vt.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=K(e).documentElement,n=O(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=b;return}let r=Et||!Ni(e);this.restore=r?Fi(e):Ii(e)}};function Ri(e=!0,t=null){_(()=>{if(e)return Li.acquire(t)},[e,t])}function zi(e){let{store:t,actionsRef:n}=e,r=t.useState(`open`);Kr(t,r),Ur(t);let{forceUnmount:i}=Wr(r,t),a=F.useCallback(()=>{t.setOpen(!1,ut(lt))},[t]);F.useImperativeHandle(n,()=>({unmount:i,close:a}),[i,a])}function Bi({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=F.useState(0),[u,d]=F.useState(0),f=c===0,p=br(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=Vt(t);return f&&!i?a&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||W(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0:!1},escapeKey:f});return Ri(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{l(0),d(0)}),F.useEffect(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(c+1,u+ +!!n),t?.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,c,u,t]),Gr(e,{activeTriggerProps:p.reference??w,inactiveTriggerProps:p.trigger??w,popupProps:p.floating??w,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var Vi={...ni,modal:q(e=>e.modal),nested:q(e=>e.nested),nestedOpenDialogCount:q(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:q(e=>e.nestedOpenDrawerCount),disablePointerDismissal:q(e=>e.disablePointerDismissal),openMethod:q(e=>e.openMethod),descriptionElementId:q(e=>e.descriptionElementId),titleElementId:q(e=>e.titleElementId),viewportElement:q(e=>e.viewportElement),role:q(e=>e.role)},Hi=class e extends Mr{constructor(e,t,n=!1){let r=new qr,i=Ui(e);i.floatingRootContext=Xr(r,t,n),super(i,{popupRef:F.createRef(),backdropRef:F.createRef(),internalBackdropRef:F.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Vi)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};Hr(n,e,t.trigger),this.update(n)};static useStore(t,n){return Vr(t,(t,r)=>new e(n,t,r),!0).store}};function Ui(e={}){return{...Yr(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Wi(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Ge(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=Hi.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});xr(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);zi({store:b,actionsRef:l});let w=x||S,T=F.useMemo(()=>({store:b}),[b]);return(0,L.jsx)(Ue.Provider,{value:!1,children:(0,L.jsxs)(We.Provider,{value:T,children:[w&&(0,L.jsx)(Bi,{store:b,parentContext:v?.store.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})})}function Gi(e){return Wi(e,F.useContext(Ue)?`drawer`:`dialog`)}function Ki({open:e=!1,side:t=`left`,className:n,onOpenChange:r,children:i}){return(0,L.jsx)(Gi,{open:e,onOpenChange:r,modal:!0,children:(0,L.jsxs)(ki,{children:[(0,L.jsx)(rt,{className:`fixed inset-0 z-50 bg-black/50 duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`}),(0,L.jsx)(Ei,{"aria-modal":`true`,className:u(`fixed top-0 z-50 h-full w-72 border-r bg-background p-4 shadow-lg outline-none duration-200`,`data-open:animate-in data-closed:animate-out`,t===`left`?`left-0 data-open:slide-in-from-left data-closed:slide-out-to-left`:`right-0 border-l border-r-0 data-open:slide-in-from-right data-closed:slide-out-to-right`,n),children:i})]})})}var qi=({href:e,children:t,...n})=>(0,L.jsx)(`a`,{href:e,...n,children:t}),Ji=.75,Yi=.75;function Xi({open:e}){return(0,L.jsx)(`svg`,{viewBox:`0 0 8 8`,fill:`currentColor`,"aria-hidden":`true`,className:u(`size-2.5 transition-transform duration-200`,e&&`rotate-90`),children:(0,L.jsx)(`path`,{d:`M2.5 1 6 4 2.5 7Z`})})}function Zi({node:e,depth:t,currentPath:n,isActive:r,closeDrawer:i,Link:a}){let o=`db-sidebar:${e.label}:${e.link??``}`,[s,c]=(0,F.useState)(()=>{try{let e=sessionStorage.getItem(o);if(e!==null)return e===`true`}catch{}return t===0});function l(){let e=!s;c(e);try{sessionStorage.setItem(o,String(e))}catch{}}let d=!!e.link,f=r(e.link);return(0,L.jsxs)(`li`,{className:`group/row relative text-sm text-foreground`,children:[(0,L.jsx)(`div`,{className:u(`flex min-w-0 items-start transition-colors hover:bg-accent/60 hover:text-accent-foreground`,f&&`bg-accent text-accent-foreground`),children:d?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(a,{href:e.link??``,className:u(`flex min-h-6 min-w-0 flex-1 items-start py-2`,f&&`font-semibold`),style:{paddingLeft:`${Ji+t*Yi}rem`},"aria-current":f?`page`:void 0,onClick:i,children:(0,L.jsx)(`span`,{className:`min-w-0 leading-tight break-words`,children:e.label})}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>l(),className:`mt-1.5 mr-1 flex size-4 shrink-0 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:text-foreground`,"aria-expanded":s,"aria-label":`${s?`Collapse`:`Expand`} ${e.label}`,children:(0,L.jsx)(Xi,{open:s})})]}):(0,L.jsxs)(`button`,{type:`button`,onClick:()=>l(),className:`flex min-h-6 w-full items-start py-2 pr-2 text-left`,style:{paddingLeft:`${Ji+t*Yi}rem`},"aria-expanded":s,children:[(0,L.jsx)(`span`,{className:`min-w-0 flex-1 leading-tight break-words`,children:e.label}),(0,L.jsx)(`span`,{className:`ml-1 flex size-4 shrink-0 items-center justify-center text-muted-foreground/70`,children:(0,L.jsx)(Xi,{open:s})})]})}),s&&e.items&&e.items.length>0&&(0,L.jsx)(`div`,{children:(0,L.jsx)(Qi,{nodes:e.items,depth:t+1,currentPath:n,isActive:r,closeDrawer:i,Link:a})})]})}function Qi({nodes:e,depth:t=0,currentPath:n,isActive:r,closeDrawer:i,Link:a}){return(0,L.jsx)(`nav`,{className:t===0?`pt-4`:void 0,children:(0,L.jsx)(`ul`,{children:e.map(e=>e.items&&e.items.length>0?(0,L.jsx)(Zi,{node:e,depth:t,currentPath:n,isActive:r,closeDrawer:i,Link:a},e.label+(e.link??``)):(0,L.jsx)(`li`,{className:`text-sm text-foreground transition-colors hover:bg-accent/60 hover:text-accent-foreground`,children:e.link?(0,L.jsx)(a,{href:e.link,className:u(`flex min-h-6 min-w-0 items-start py-2 pr-2 leading-tight break-words`,r(e.link)&&`bg-accent text-accent-foreground font-semibold`),style:{paddingLeft:`${Ji+t*Yi}rem`},"aria-current":r(e.link)?`page`:void 0,onClick:i,children:e.label}):(0,L.jsx)(`span`,{className:`flex min-h-6 items-start py-2 pr-2 leading-tight break-words`,style:{paddingLeft:`${Ji+t*Yi}rem`},children:e.label})},e.label+(e.link??``)))})})}function $i({nav:e,currentPath:t,title:n,homeLink:r=`/`,footer:i,github:a,linkComponent:o,nested:s=!1}){let c=Me(V),l=o??qi;function u(e){return e?e.replace(/\/$/,``)===t.replace(/\/$/,``):!1}function d(){V.set(!1)}function f(e){V.set(e)}let p=(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[n&&(0,L.jsx)(`div`,{className:`flex h-14 items-center border-b px-3`,children:(0,L.jsxs)(l,{href:r,className:`flex min-w-0 items-center gap-2 px-1 font-semibold text-foreground transition-colors hover:text-foreground/80`,children:[(0,L.jsx)(Be,{className:`h-6 w-6 shrink-0 text-primary`}),(0,L.jsx)(`span`,{className:`truncate text-base font-bold tracking-tight`,children:n})]})}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,L.jsx)(Qi,{nodes:e,currentPath:t,isActive:u,closeDrawer:d,Link:l})}),(i||a)&&(0,L.jsxs)(`footer`,{className:`flex items-center gap-1 border-t px-2 py-2`,children:[i,a&&(0,L.jsx)(`a`,{href:a,target:`_blank`,rel:`noreferrer noopener`,"aria-label":`Project repository`,className:`flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,L.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,L.jsx)(`path`,{d:`M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2 0 1.9 1.2 1.9 1.2 1 1.8 2.8 1.3 3.5 1 0-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.2.5-2.3 1.3-3.1-.2-.4-.6-1.6 0-3.2 0 0 1-.3 3.4 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.8 0 3.2.9.8 1.3 1.9 1.3 3.2 0 4.6-2.8 5.6-5.5 5.9.5.4.9 1 .9 2.2v3.3c0 .3.1.7.8.6A12 12 0 0 0 12 .3`})})})]})]});return s?p:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:`hidden h-full lg:block`,children:p}),(0,L.jsx)(`div`,{className:`lg:hidden`,children:(0,L.jsx)(Ki,{open:c,side:`left`,onOpenChange:f,children:p})})]})}function ea({headings:e,activeSlug:t}){let n=Me(B)||t||``,r=(0,F.useMemo)(()=>e.filter(e=>e.depth>=2&&e.depth<=3),[e]);return(0,F.useEffect)(()=>{t&&!B.get()&&B.set(t);let e=0,n=()=>{if(e=0,r.length===0)return;let t=r[r.length-1],n=document.documentElement;if(window.innerHeight+window.scrollY>=n.scrollHeight-2){t&&B.set(t.slug);return}let i=r[0]?.slug??``;for(let e of r){let t=document.getElementById(e.slug);if(t)if(t.getBoundingClientRect().top<=120)i=e.slug;else break}B.set(i)},i=()=>{e||=requestAnimationFrame(n)};return n(),window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i,{passive:!0}),()=>{window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i),e&&cancelAnimationFrame(e)}},[r,t]),r.length===0?null:(0,L.jsxs)(`nav`,{"aria-label":`Table of contents`,className:`text-sm`,children:[(0,L.jsx)(`p`,{className:`mb-2 font-semibold`,children:`On this page`}),(0,L.jsx)(`ul`,{className:`border-l border-border`,children:r.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsx)(`a`,{href:`#${e.slug}`,className:u(`-ml-px block border-l-2 py-1 text-muted-foreground transition-colors hover:text-foreground`,n===e.slug&&`text-primary`,n===e.slug&&`font-medium`),style:{borderLeftColor:n===e.slug?`var(--primary)`:`transparent`,paddingLeft:`${.75+(e.depth-2)*.75}rem`},children:e.text})},e.slug))})]})}var ta=Object.defineProperty,na=(e,t)=>ta(e,`name`,{value:t,configurable:!0});function ra(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}na(ra,`setRef`);function ia(...e){return t=>{let n=!1,r=e.map(e=>{let r=ra(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():ra(e[t],null)}}}}na(ia,`composeRefs`);function aa(...e){return F.useCallback(ia(...e),e)}na(aa,`useComposedRefs`);var oa=Object.defineProperty,sa=(e,t)=>oa(e,`name`,{value:t,configurable:!0});function ca(e){let t=F.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];_a(r)&&typeof xa==`function`&&(r=xa(r._payload)),F.Children.forEach(r,e=>{if(ha(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;_a(n)&&typeof xa==`function`&&(n=xa(n._payload)),a=fa(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=F.cloneElement(a,void 0,s):!o&&F.Children.count(r)===1&&F.isValidElement(r)&&(a=r);let c=a?ma(a):void 0,l=aa(n,c);if(!a){if(r||r===0)throw Error(o?ba(e):ya(e));return r}let u=pa(i,a.props??{});return a.type!==F.Fragment&&(u.ref=n?l:c),F.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}sa(ca,`createSlot`);var la=ca(`Slot`),ua=Symbol.for(`radix.slottable`);function da(e){let t=sa(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=ua,t}sa(da,`createSlottable`);var fa=sa((e,t)=>{if(`child`in e.props){let t=e.props.child;return F.isValidElement(t)?F.cloneElement(t,void 0,e.props.children(t.props.children)):null}return F.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function pa(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}}sa(pa,`mergeProps`);function ma(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)}sa(ma,`getElementRef`);function ha(e){return F.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ua}sa(ha,`isSlottable`);var ga=Symbol.for(`react.lazy`);function _a(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ga&&`_payload`in e&&va(e._payload)}sa(_a,`isLazyComponent`);function va(e){return typeof e==`object`&&!!e&&`then`in e}sa(va,`isPromiseLike`);var ya=sa(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),ba=sa(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),xa=F.use,Sa=Object.defineProperty,Ca=(e,t)=>Sa(e,`name`,{value:t,configurable:!0}),wa=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=ca(`Primitive.${t}`),r=F.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ta(e,t){e&&I.flushSync(()=>e.dispatchEvent(t))}Ca(Ta,`dispatchDiscreteCustomEvent`);var Ea=Object.defineProperty,Da=(e,t)=>Ea(e,`name`,{value:t,configurable:!0});function Oa(e,t){let n=F.createContext(t);n.displayName=e+`Context`;let r=Da(e=>{let{children:t,...r}=e,i=F.useMemo(()=>r,Object.values(r));return(0,L.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=F.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Da(i,`useContext`),[r,i]}Da(Oa,`createContext`);function ka(e,t=[]){let n=[];function r(t,r){let i=F.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Da(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=F.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=F.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Da(s,`useContext`),[o,s]}Da(r,`createContext`);let i=Da(()=>{let t=n.map(e=>F.createContext(e));return Da(function(n){let r=n?.[e]||t;return F.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Aa(i,...t)]}Da(ka,`createContextScope`);function Aa(...e){let t=e[0];if(e.length===1)return t;let n=Da(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Da(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return F.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Da(Aa,`composeContextScopes`);var ja=Object.defineProperty,Ma=(e,t)=>ja(e,`name`,{value:t,configurable:!0}),Na=!!(typeof window<`u`&&window.document&&window.document.createElement);function Pa(e,t,{checkForDefaultPrevented:n=!0}={}){return Ma(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ma(Pa,`composeEventHandlers`);function Fa(e){if(!Na)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ma(Fa,`getOwnerWindow`);function Ia(e){if(!Na)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ma(Ia,`getOwnerDocument`);function La(e,t=!1){let{activeElement:n}=Ia(e);if(!n?.nodeName)return null;if(Ra(n)&&n.contentDocument)return La(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Ia(n).getElementById(e);if(t)return t}}return n}Ma(La,`getActiveElement`);function Ra(e){return e.tagName===`IFRAME`}Ma(Ra,`isFrame`);var za=globalThis?.document?F.useLayoutEffect:()=>{},Ba=Object.defineProperty,Va=(e,t)=>Ba(e,`name`,{value:t,configurable:!0}),Ha=F.useEffectEvent,Ua=F.useInsertionEffect;function Wa(e){if(typeof Ha==`function`)return Ha(e);let t=F.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ua==`function`?Ua(()=>{t.current=e}):za(()=>{t.current=e}),F.useMemo(()=>((...e)=>t.current?.(...e)),[])}Va(Wa,`useEffectEvent`);var Ga=Object.defineProperty,Ka=(e,t)=>Ga(e,`name`,{value:t,configurable:!0}),qa=F.useInsertionEffect||za;function Ja({prop:e,defaultProp:t,onChange:n=Ka(()=>{},`onChange`),caller:r}){let[i,a,o]=Ya({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,F.useCallback(t=>{if(s){let n=Xa(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Ka(Ja,`useControllableState`);function Ya({defaultProp:e,onChange:t}){let[n,r]=F.useState(e),i=F.useRef(n),a=F.useRef(t);return qa(()=>{a.current=t},[t]),F.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Ka(Ya,`useUncontrolledState`);function Xa(e){return typeof e==`function`}Ka(Xa,`isFunction`);var Za=Symbol(`RADIX:SYNC_STATE`);function Qa(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Wa(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=F.useReducer((t,n)=>{if(n.type===Za)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=F.useRef(p);F.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=F.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return F.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Za,state:i})},[i,d.state,c]),[h,f]}Ka(Qa,`useControllableStateReducer`);var $a=Object.defineProperty,eo=(e,t)=>$a(e,`name`,{value:t,configurable:!0});function to(e,t){return F.useReducer((e,n)=>t[e][n]??e,e)}eo(to,`useStateMachine`);var no=eo(e=>{let{present:t,children:n}=e,r=ro(t),i=typeof n==`function`?n({present:r.isPresent}):F.Children.only(n),a=ao(r.ref,so(i));return typeof n==`function`||r.isPresent?F.cloneElement(i,{ref:a}):null},`Presence`);function ro(e){let[t,n]=F.useState(),r=F.useRef(null),i=F.useRef(e),a=F.useRef(`none`),o=F.useRef(void 0),[s,c]=to(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return F.useEffect(()=>{s===`mounted`?(a.current=o.current??oo(r.current),o.current=void 0):a.current=`none`},[s]),za(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=oo(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),za(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=eo(a=>{let o=oo(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=eo(e=>{e.target===t&&(a.current=oo(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:F.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=oo(t)}else r.current=null;n(e)},[])}}eo(ro,`usePresence`);function io(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}eo(io,`setRef`);function ao(...e){let t=F.useRef(e);return t.current=e,F.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=io(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():io(n[e],null)}}},[])}eo(ao,`useStableComposedRefs`);function oo(e){return e?.animationName||`none`}eo(oo,`getAnimationName`);function so(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)}eo(so,`getElementRef`);var co=Object.defineProperty,lo=(e,t)=>co(e,`name`,{value:t,configurable:!0}),uo=F.useId||(()=>void 0),fo=0;function po(e){let[t,n]=F.useState(uo());return za(()=>{e||n(e=>e??String(fo++))},[e]),e||(t?`radix-${t}`:``)}lo(po,`useId`);var mo=Object.defineProperty,ho=(e,t)=>mo(e,`name`,{value:t,configurable:!0});function go(e){let t=F.useRef(e);return F.useEffect(()=>{t.current=e}),F.useMemo(()=>((...e)=>t.current?.(...e)),[])}ho(go,`useCallbackRef`);var _o=Object.defineProperty,J=(e,t)=>_o(e,`name`,{value:t,configurable:!0}),vo=`dismissableLayer.update`,yo=`dismissableLayer.pointerDownOutside`,bo=`dismissableLayer.focusOutside`,xo,So=F.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Co=F.forwardRef(J(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=F.useContext(So),[d,f]=F.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=F.useState({}),h=aa(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=F.useRef(!1),C=Eo(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:F.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=Do(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,ee=go(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return F.useEffect(()=>{if(T)return p.addEventListener(`keydown`,ee,{capture:!0}),()=>p.removeEventListener(`keydown`,ee,{capture:!0})},[p,T,ee]),F.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xo=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Oo(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=xo))}},[d,p,n,u]),F.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Oo())},[d,u]),F.useEffect(()=>{let e=J(()=>m({}),`handleUpdate`);return document.addEventListener(vo,e),()=>document.removeEventListener(vo,e)},[]),(0,L.jsx)(wa.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Pa(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Pa(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Pa(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function wo(){let e=F.useContext(So),[t,n]=F.useState(null);return F.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}J(wo,`useDismissableLayerSurface`);var To=J(()=>!0,`IS_TRUE`);function Eo(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=To}=t,s=go(e),c=F.useRef(!1),l=F.useRef(!1),u=F.useRef(new Map),d=F.useRef(()=>{});return F.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}J(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}J(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}J(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}J(p,`handleInteractionBubble`);let m=J(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||ko(yo,s,p,{discrete:!0})};if(J(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:J(()=>c.current=!0,`onPointerDownCapture`)}}J(Eo,`usePointerDownOutside`);function Do(e,t=globalThis?.document){let n=go(e),r=F.useRef(!1);return F.useEffect(()=>{let e=J(e=>{e.target&&!r.current&&ko(bo,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:J(()=>r.current=!0,`onFocusCapture`),onBlurCapture:J(()=>r.current=!1,`onBlurCapture`)}}J(Do,`useFocusOutside`);function Oo(){let e=new CustomEvent(vo);document.dispatchEvent(e)}J(Oo,`dispatchUpdate`);function ko(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?Ta(i,a):i.dispatchEvent(a)}J(ko,`handleAndDispatchCustomEvent`);var Ao=Object.defineProperty,Y=(e,t)=>Ao(e,`name`,{value:t,configurable:!0}),jo=`focusScope.autoFocusOnMount`,Mo=`focusScope.autoFocusOnUnmount`,No={bubbles:!1,cancelable:!0},Po=F.forwardRef(Y(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=F.useState(null),l=go(i),u=go(a),d=F.useRef(null),f=aa(t,c),p=F.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;F.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Vo(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Vo(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Vo(s)};Y(e,`handleFocusIn`),Y(t,`handleFocusOut`),Y(n,`handleMutations`),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]),F.useEffect(()=>{if(s){Ho.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(jo,No);s.addEventListener(jo,l),s.dispatchEvent(t),t.defaultPrevented||(Fo(Go(Lo(s)),{select:!0}),document.activeElement===e&&Vo(s))}return()=>{s.removeEventListener(jo,l),setTimeout(()=>{let t=new CustomEvent(Mo,No);s.addEventListener(Mo,u),s.dispatchEvent(t),t.defaultPrevented||Vo(e??document.body,{select:!0}),s.removeEventListener(Mo,u),Ho.remove(p)},0)}}},[s,l,u,p]);let m=F.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]=Io(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Vo(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Vo(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)(wa.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Fo(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Vo(r,{select:t}),document.activeElement!==n)return}Y(Fo,`focusFirst`);function Io(e){let t=Lo(e);return[Ro(t,e),Ro(t.reverse(),e)]}Y(Io,`getTabbableEdges`);function Lo(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Y(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Y(Lo,`getTabbableCandidates`);function Ro(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):zo(r,{upTo:t})))return r}Y(Ro,`findVisible`);function zo(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}Y(zo,`isHidden`);function Bo(e){return e instanceof HTMLInputElement&&`select`in e}Y(Bo,`isSelectableInput`);function Vo(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Bo(e)&&t&&e.select()}}Y(Vo,`focus`);var Ho=Uo();function Uo(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Wo(e,t),e.unshift(t)},remove(t){e=Wo(e,t),e[0]?.resume()}}}Y(Uo,`createFocusScopesStack`);function Wo(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Y(Wo,`arrayRemove`);function Go(e){return e.filter(e=>e.tagName!==`A`)}Y(Go,`removeLinks`);var Ko=Object.defineProperty,qo=F.forwardRef(((e,t)=>Ko(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=F.useState(!1);za(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?I.createPortal((0,L.jsx)(wa.div,{...r,ref:t}),o):null},`Portal`)),Jo=Object.defineProperty,Yo=(e,t)=>Jo(e,`name`,{value:t,configurable:!0}),Xo=0,Zo=null;function Qo(e){return $o(),e.children}Yo(Qo,`FocusGuards`);function $o(){F.useEffect(()=>{Zo||={start:es(),end:es()};let{start:e,end:t}=Zo;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Xo++,()=>{Xo===1&&(Zo?.start.remove(),Zo?.end.remove(),Zo=null),Xo=Math.max(0,Xo-1)}},[])}Yo($o,`useFocusGuards`);function es(){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}Yo(es,`createFocusGuard`);var ts=function(){return ts=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},ts.apply(this,arguments)};function ns(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 rs(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 is=`right-scroll-bar-position`,as=`width-before-scroll-bar`,os=`with-scroll-bars-hidden`,ss=`--removed-body-scroll-bar-size`;function cs(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function ls(e,t){var n=(0,F.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 us=typeof window<`u`?F.useLayoutEffect:F.useEffect,ds=new WeakMap;function fs(e,t){var n=ls(t||null,function(t){return e.forEach(function(e){return cs(e,t)})});return us(function(){var t=ds.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||cs(e,null)}),i.forEach(function(e){r.has(e)||cs(e,a)})}ds.set(n,e)},[e]),n}function ps(e){return e}function ms(e,t){t===void 0&&(t=ps);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 hs(e){e===void 0&&(e={});var t=ms(null);return t.options=ts({async:!0,ssr:!1},e),t}var gs=function(e){var t=e.sideCar,n=ns(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 F.createElement(r,ts({},n))};gs.isSideCarExport=!0;function _s(e,t){return e.useMedium(t),gs}var vs=hs(),ys=function(){},bs=F.forwardRef(function(e,t){var n=F.useRef(null),r=F.useState({onScrollCapture:ys,onWheelCapture:ys,onTouchMoveCapture:ys}),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=ns(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=fs([n,t]),C=ts(ts({},b),i);return F.createElement(F.Fragment,null,u&&F.createElement(x,{sideCar:vs,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?F.cloneElement(F.Children.only(s),ts(ts({},C),{ref:S})):F.createElement(v,ts({},C,{className:c,ref:S}),s))});bs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},bs.classNames={fullWidth:as,zeroRight:is};var xs,Ss=function(){if(xs)return xs;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Cs(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ss();return t&&e.setAttribute(`nonce`,t),e}function ws(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ts(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Es=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Cs())&&(ws(t,n),Ts(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ds=function(){var e=Es();return function(t,n){F.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Os=function(){var e=Ds();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ks={left:0,top:0,right:0,gap:0},As=function(e){return parseInt(e||``,10)||0},js=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[As(n),As(r),As(i)]},Ms=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ks;var t=js(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])}},Ns=Os(),Ps=`data-scroll-locked`,Fs=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
3
+ .${os} {
4
4
  overflow: hidden ${r};
5
5
  padding-right: ${s}px ${r};
6
6
  }
7
- body[${Ns}] {
7
+ body[${Ps}] {
8
8
  overflow: hidden ${r};
9
9
  overscroll-behavior: contain;
10
10
  ${[t&&`position: relative ${r};`,n===`margin`&&`
@@ -17,26 +17,26 @@ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-FVqWAEV
17
17
  `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
18
18
  }
19
19
 
20
- .${rs} {
20
+ .${is} {
21
21
  right: ${s}px ${r};
22
22
  }
23
23
 
24
- .${is} {
24
+ .${as} {
25
25
  margin-right: ${s}px ${r};
26
26
  }
27
27
 
28
- .${rs} .${rs} {
28
+ .${is} .${is} {
29
29
  right: 0 ${r};
30
30
  }
31
31
 
32
- .${is} .${is} {
32
+ .${as} .${as} {
33
33
  margin-right: 0 ${r};
34
34
  }
35
35
 
36
- body[${Ns}] {
37
- ${os}: ${s}px;
36
+ body[${Ps}] {
37
+ ${ss}: ${s}px;
38
38
  }
39
- `},Fs=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Is=function(){F.useEffect(function(){return document.body.setAttribute(Ns,(Fs()+1).toString()),function(){var e=Fs()-1;e<=0?document.body.removeAttribute(Ns):document.body.setAttribute(Ns,e.toString())}},[])},Ls=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Is();var a=F.useMemo(function(){return js(i)},[i]);return F.createElement(Ms,{styles:Ps(a,!t,i,n?``:`!important`)})},Rs=!1;if(typeof window<`u`)try{var zs=Object.defineProperty({},"passive",{get:function(){return Rs=!0,!0}});window.addEventListener(`test`,zs,zs),window.removeEventListener(`test`,zs,zs)}catch{Rs=!1}var Bs=Rs?{passive:!1}:!1,Vs=function(e){return e.tagName===`TEXTAREA`},Hs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Vs(e)&&n[t]===`visible`)},Us=function(e){return Hs(e,`overflowY`)},Ws=function(e){return Hs(e,`overflowX`)},Gs=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Js(e,r)){var i=Ys(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ks=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},qs=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Js=function(e,t){return e===`v`?Us(t):Ws(t)},Ys=function(e,t){return e===`v`?Ks(t):qs(t)},Xs=function(e,t){return e===`h`&&t===`rtl`?-1:1},Zs=function(e,t,n,r,i){var a=Xs(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=Ys(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Js(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},Qs=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$s=function(e){return[e.deltaX,e.deltaY]},ec=function(e){return e&&`current`in e?e.current:e},tc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nc=function(e){return`
39
+ `},Is=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Ls=function(){F.useEffect(function(){return document.body.setAttribute(Ps,(Is()+1).toString()),function(){var e=Is()-1;e<=0?document.body.removeAttribute(Ps):document.body.setAttribute(Ps,e.toString())}},[])},Rs=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Ls();var a=F.useMemo(function(){return Ms(i)},[i]);return F.createElement(Ns,{styles:Fs(a,!t,i,n?``:`!important`)})},zs=!1;if(typeof window<`u`)try{var Bs=Object.defineProperty({},"passive",{get:function(){return zs=!0,!0}});window.addEventListener(`test`,Bs,Bs),window.removeEventListener(`test`,Bs,Bs)}catch{zs=!1}var Vs=zs?{passive:!1}:!1,Hs=function(e){return e.tagName===`TEXTAREA`},Us=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Hs(e)&&n[t]===`visible`)},Ws=function(e){return Us(e,`overflowY`)},Gs=function(e){return Us(e,`overflowX`)},Ks=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ys(e,r)){var i=Xs(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qs=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Js=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ys=function(e,t){return e===`v`?Ws(t):Gs(t)},Xs=function(e,t){return e===`v`?qs(t):Js(t)},Zs=function(e,t){return e===`h`&&t===`rtl`?-1:1},Qs=function(e,t,n,r,i){var a=Zs(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=Xs(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ys(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},$s=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ec=function(e){return[e.deltaX,e.deltaY]},tc=function(e){return e&&`current`in e?e.current:e},nc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rc=function(e){return`
40
40
  .block-interactivity-${e} {pointer-events: none;}
41
41
  .allow-interactivity-${e} {pointer-events: all;}
42
- `},rc=0,ic=[];function ac(e){var t=F.useRef([]),n=F.useRef([0,0]),r=F.useRef(),i=F.useState(rc++)[0],a=F.useState(Ds)[0],o=F.useRef(e);F.useEffect(function(){o.current=e},[e]),F.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ns([e.lockRef.current],(e.shards||[]).map(ec),!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=F.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Qs(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=Gs(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Gs(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 Zs(h,t,e,h===`h`?s:c,!0)},[]),c=F.useCallback(function(e){var n=e;if(!(!ic.length||ic[ic.length-1]!==a)){var r=`deltaY`in n?$s(n):Qs(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&tc(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ec).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=F.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:oc(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=F.useCallback(function(e){n.current=Qs(e),r.current=void 0},[]),d=F.useCallback(function(t){l(t.type,$s(t),t.target,s(t,e.lockRef.current))},[]),f=F.useCallback(function(t){l(t.type,Qs(t),t.target,s(t,e.lockRef.current))},[]);F.useEffect(function(){return ic.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Bs),document.addEventListener(`touchmove`,c,Bs),document.addEventListener(`touchstart`,u,Bs),function(){ic=ic.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Bs),document.removeEventListener(`touchmove`,c,Bs),document.removeEventListener(`touchstart`,u,Bs)}},[]);var p=e.removeScrollBar,m=e.inert;return F.createElement(F.Fragment,null,m?F.createElement(a,{styles:nc(i)}):null,p?F.createElement(Ls,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function oc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var sc=gs(_s,ac),cc=F.forwardRef(function(e,t){return F.createElement(ys,es({},e,{ref:t,sideCar:sc}))});cc.classNames=ys.classNames;var lc=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},uc=new WeakMap,dc=new WeakMap,fc={},pc=0,mc=function(e){return e&&(e.host||mc(e.parentNode))},hc=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=mc(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})},gc=function(e,t,n,r){var i=hc(t,Array.isArray(e)?e:[e]);fc[n]||(fc[n]=new WeakMap);var a=fc[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=(uc.get(e)||0)+1,l=(a.get(e)||0)+1;uc.set(e,c),a.set(e,l),o.push(e),c===1&&i&&dc.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(),pc++,function(){o.forEach(function(e){var t=uc.get(e)-1,i=a.get(e)-1;uc.set(e,t),a.set(e,i),t||(dc.has(e)||e.removeAttribute(r),dc.delete(e)),i||e.removeAttribute(n)}),pc--,pc||(uc=new WeakMap,uc=new WeakMap,dc=new WeakMap,fc={})}},_c=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||lc(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),gc(r,i,n,`aria-hidden`)):function(){return null}},vc=Object.defineProperty,yc=(e,t)=>vc(e,`name`,{value:t,configurable:!0}),bc=`Dialog`,[xc,Sc]=Oa(bc),[Cc,wc]=xc(bc),Tc=yc(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=F.useRef(null),c=F.useRef(null),[l,u]=qa({prop:r,defaultProp:i??!1,onChange:a,caller:bc}),[d,f]=F.useState(0),[p,m]=F.useState(0);return(0,L.jsx)(Cc,{scope:t,triggerRef:s,contentRef:c,contentId:fo(),titleId:fo(),descriptionId:fo(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:F.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),Ec=`DialogTrigger`,Dc=F.forwardRef(yc(function(e,t){let{__scopeDialog:n,...r}=e,i=wc(Ec,n),a=ia(t,i.triggerRef);return(0,L.jsx)(Ca.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Gc(i.open),...r,ref:a,onClick:Na(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),Oc=`DialogPortal`,[kc,Ac]=xc(Oc,{forceMount:void 0}),jc=yc(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=wc(Oc,t);return(0,L.jsx)(kc,{scope:t,forceMount:n,children:F.Children.map(r,e=>(0,L.jsx)(to,{present:n||a.open,children:(0,L.jsx)(Ko,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Mc=`DialogOverlay`,Nc=F.forwardRef(yc(function(e,t){let n=Ac(Mc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=wc(Mc,e.__scopeDialog);return a.modal?(0,L.jsx)(to,{present:r||a.open,children:(0,L.jsx)(Fc,{...i,ref:t})}):null},`DialogOverlay`)),Pc=sa(`DialogOverlay.RemoveScroll`),Fc=F.forwardRef(yc(function(e,t){let{__scopeDialog:n,...r}=e,i=wc(Mc,n),a=ia(t,Co());return(0,L.jsx)(cc,{as:Pc,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(Ca.div,{"data-state":Gc(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Ic=`DialogContent`,Lc=F.forwardRef(yc(function(e,t){let n=Ac(Ic,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=wc(Ic,e.__scopeDialog);return(0,L.jsx)(to,{present:r||a.open,children:a.modal?(0,L.jsx)(Rc,{...i,ref:t}):(0,L.jsx)(zc,{...i,ref:t})})},`DialogContent`)),Rc=F.forwardRef(yc(function(e,t){let n=wc(Ic,e.__scopeDialog),r=F.useRef(null),i=ia(t,n.contentRef,r);return F.useEffect(()=>{let e=r.current;if(e)return _c(e)},[]),(0,L.jsx)(Bc,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Na(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Na(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Na(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),zc=F.forwardRef(yc(function(e,t){let n=wc(Ic,e.__scopeDialog),r=F.useRef(!1),i=F.useRef(!1);return(0,L.jsx)(Bc,{...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()}})},`DialogContentNonModal`)),Bc=F.forwardRef(yc(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=wc(Ic,n);return Qo(),(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(No,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(So,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Gc(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Vc=`DialogTitle`,Hc=F.forwardRef(yc(function(e,t){let{__scopeDialog:n,...r}=e,i=wc(Vc,n),{setTitleCount:a}=i;return Ra(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(Ca.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Uc=`DialogClose`,Wc=F.forwardRef(yc(function(e,t){let{__scopeDialog:n,...r}=e,i=wc(Uc,n);return(0,L.jsx)(Ca.button,{type:`button`,...r,ref:t,onClick:Na(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Gc(e){return e?`open`:`closed`}yc(Gc,`getState`);var Kc=(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},qc=(e,t)=>({classGroupId:e,validator:t}),Jc=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Yc=`-`,Xc=[],Zc=`arbitrary..`,Qc=e=>{let t=tl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return el(e);let n=e.split(Yc);return $c(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Kc(i,t):t:i||Xc}return n[e]||Xc}}},$c=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=$c(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Yc):e.slice(t).join(Yc),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},el=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?Zc+r:void 0})(),tl=e=>{let{theme:t,classGroups:n}=e;return nl(n,t)},nl=(e,t)=>{let n=Jc();for(let r in e){let i=e[r];rl(i,n,r,t)}return n},rl=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];il(i,t,n,r)}},il=(e,t,n,r)=>{if(typeof e==`string`){al(e,t,n);return}if(typeof e==`function`){ol(e,t,n,r);return}sl(e,t,n,r)},al=(e,t,n)=>{let r=e===``?t:cl(t,e);r.classGroupId=n},ol=(e,t,n,r)=>{if(ll(e)){rl(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qc(n,e))},sl=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];rl(o,cl(t,a),n,r)}},cl=(e,t)=>{let n=e,r=t.split(Yc),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Jc(),n.nextPart.set(t,i)),n=i}return n},ll=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ul=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)}}},dl=`!`,fl=`:`,pl=[],ml=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),hl=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===fl){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(dl)?(c=s.slice(0,-1),l=!0):s.startsWith(dl)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ml(t,l,c,u)};if(t){let e=t+fl,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ml(pl,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},gl=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}},_l=e=>({cache:ul(e.cacheSize),parseClassName:hl(e),sortModifiers:gl(e),postfixLookupClassGroupIds:vl(e),...Qc(e)}),vl=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},yl=/\s+/,bl=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(yl),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+dl:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},xl=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Sl(n))&&(i&&(i+=` `),i+=r);return i},Sl=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Sl(e[r]))&&(n&&(n+=` `),n+=t);return n},Cl=(e,...t)=>{let n,r,i,a,o=o=>(n=_l(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=bl(e,n);return i(e,a),a};return a=o,(...e)=>a(xl(...e))},wl=[],X=e=>{let t=t=>t[e]||wl;return t.isThemeGetter=!0,t},Tl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,El=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Dl=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ol=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kl=/\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$/,Al=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ml=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nl=e=>Dl.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),Pl=e=>!!e&&Number.isInteger(Number(e)),Fl=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),Il=e=>Ol.test(e),Ll=()=>!0,Rl=e=>kl.test(e)&&!Al.test(e),zl=()=>!1,Bl=e=>jl.test(e),Vl=e=>Ml.test(e),Hl=e=>!Q(e)&&!$(e),Ul=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Wl=e=>au(e,lu,zl),Q=e=>Tl.test(e),Gl=e=>au(e,uu,Rl),Kl=e=>au(e,du,Z),ql=e=>au(e,pu,Ll),Jl=e=>au(e,fu,zl),Yl=e=>au(e,su,zl),Xl=e=>au(e,cu,Vl),Zl=e=>au(e,mu,Bl),$=e=>El.test(e),Ql=e=>ou(e,uu),$l=e=>ou(e,fu),eu=e=>ou(e,su),tu=e=>ou(e,lu),nu=e=>ou(e,cu),ru=e=>ou(e,mu,!0),iu=e=>ou(e,pu,!0),au=(e,t,n)=>{let r=Tl.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ou=(e,t,n=!1)=>{let r=El.exec(e);return r?r[1]?t(r[1]):n:!1},su=e=>e===`position`||e===`percentage`,cu=e=>e===`image`||e===`url`,lu=e=>e===`length`||e===`size`||e===`bg-size`,uu=e=>e===`length`,du=e=>e===`number`,fu=e=>e===`family-name`,pu=e=>e===`number`||e===`weight`,mu=e=>e===`shadow`,hu=Cl(()=>{let e=X(`color`),t=X(`font`),n=X(`text`),r=X(`font-weight`),i=X(`tracking`),a=X(`leading`),o=X(`breakpoint`),s=X(`container`),c=X(`spacing`),l=X(`radius`),u=X(`shadow`),d=X(`inset-shadow`),f=X(`text-shadow`),p=X(`drop-shadow`),m=X(`blur`),h=X(`perspective`),g=X(`aspect`),_=X(`ease`),v=X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[Nl,`full`,`auto`,...w()],ee=()=>[Pl,`none`,`subgrid`,$,Q],E=()=>[`auto`,{span:[`full`,Pl,$,Q]},Pl,$,Q],te=()=>[Pl,`auto`,$,Q],ne=()=>[`auto`,`min`,`max`,`fr`,$,Q],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],O=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],A=()=>[Nl,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[Nl,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[Nl,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,$,Q],P=()=>[...b(),eu,Yl,{position:[$,Q]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],F=()=>[`auto`,`cover`,`contain`,tu,Wl,{size:[$,Q]}],I=()=>[Fl,Ql,Gl],L=()=>[``,`none`,`full`,l,$,Q],R=()=>[``,Z,Ql,Gl],z=()=>[`solid`,`dashed`,`dotted`,`double`],B=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],V=()=>[Z,Fl,eu,Yl],ie=()=>[``,`none`,m,$,Q],ae=()=>[`none`,Z,$,Q],oe=()=>[`none`,Z,$,Q],H=()=>[Z,$,Q],se=()=>[Nl,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Il],breakpoint:[Il],color:[Ll],container:[Il],"drop-shadow":[Il],ease:[`in`,`out`,`in-out`],font:[Hl],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Il],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Il],shadow:[Il],spacing:[`px`,Z],text:[Il],"text-shadow":[Il],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Nl,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[Ul],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Pl,`auto`,$,Q]}],basis:[{basis:[Nl,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,Nl,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[Pl,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...O(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...O()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...O(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...O(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...O(),`baseline`]}],"place-self":[{"place-self":[`auto`,...O()]}],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:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...j()]}],"min-inline-size":[{"min-inline":[`auto`,...j()]}],"max-inline-size":[{"max-inline":[`none`,...j()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,...A()]}],"font-size":[{text:[`base`,n,Ql,Gl]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,iu,ql]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Fl,Q]}],"font-family":[{font:[$l,Jl,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,Kl]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,Gl]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Pl,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:F()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Pl,$,Q],radial:[``,$,Q],conic:[Pl,$,Q]},nu,Xl]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,Ql,Gl]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,ru,Zl]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,ru,Zl]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[Z,Gl]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,ru,Zl]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...B(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":B()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:ie()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ru,Zl]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:H()}],"skew-x":[{"skew-x":H()}],"skew-y":[{"skew-y":H()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":[`translate-none`],zoom:[{zoom:[Pl,$,Q]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[Z,Ql,Gl,Kl]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function gu(...e){return hu(c(e))}var _u=Se(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 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`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function vu({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?ca:`button`;return(0,L.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:gu(_u({variant:t,size:n,className:e})),...i})}function yu({...e}){return(0,L.jsx)(Tc,{"data-slot":`dialog`,...e})}function bu({...e}){return(0,L.jsx)(Dc,{"data-slot":`dialog-trigger`,...e})}function xu({...e}){return(0,L.jsx)(jc,{"data-slot":`dialog-portal`,...e})}function Su({className:e,...t}){return(0,L.jsx)(Nc,{"data-slot":`dialog-overlay`,className:gu(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Cu({className:e,children:t,showCloseButton:n=!0,...r}){return(0,L.jsxs)(xu,{children:[(0,L.jsx)(Su,{}),(0,L.jsxs)(Lc,{"data-slot":`dialog-content`,className:gu(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r,children:[t,n&&(0,L.jsxs)(Wc,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,L.jsx)(ye,{className:`size-4`}),(0,L.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function wu({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`dialog-header`,className:gu(`flex flex-col gap-1.5`,e),...t})}function Tu({className:e,...t}){return(0,L.jsx)(Hc,{"data-slot":`dialog-title`,className:gu(`text-lg font-semibold text-foreground`,e),...t})}var Eu=[{name:`amber-minimal`,label:`Amber Minimal`},{name:`amethyst-haze`,label:`Amethyst Haze`},{name:`anthropic`,label:`Anthropic`},{name:`anyscale`,label:`Anyscale`},{name:`bold-tech`,label:`Bold Tech`},{name:`bubblegum`,label:`Bubblegum`},{name:`caffeine`,label:`Caffeine`},{name:`candyland`,label:`Candyland`},{name:`catppuccin`,label:`Catppuccin`},{name:`claude`,label:`Claude`},{name:`claymorphism`,label:`Claymorphism`},{name:`clean-slate`,label:`Clean Slate`},{name:`cosmic-night`,label:`Cosmic Night`},{name:`cyberpunk`,label:`Cyberpunk`},{name:`darkmatter`,label:`Darkmatter`},{name:`default`,label:`Default`},{name:`doom-64`,label:`Doom 64`},{name:`elegant-luxury`,label:`Elegant Luxury`},{name:`graphite`,label:`Graphite`},{name:`green`,label:`Green`},{name:`kodama-grove`,label:`Kodama Grove`},{name:`lambda`,label:`Lambda`},{name:`midnight-bloom`,label:`Midnight Bloom`},{name:`mdbook`,label:`mdBook`},{name:`mocha-mousse`,label:`Mocha Mousse`},{name:`modern-minimal`,label:`Modern Minimal`},{name:`mono`,label:`Mono`},{name:`nature`,label:`Nature`},{name:`neo-brutalism`,label:`Neo Brutalism`},{name:`northern-lights`,label:`Northern Lights`},{name:`notebook`,label:`Notebook`},{name:`ocean-breeze`,label:`Ocean Breeze`},{name:`openai`,label:`Openai`},{name:`pastel-dreams`,label:`Pastel Dreams`},{name:`perpetuity`,label:`Perpetuity`},{name:`quantum-rose`,label:`Quantum Rose`},{name:`retro-arcade`,label:`Retro Arcade`},{name:`rose`,label:`Rose`},{name:`sage-garden`,label:`Sage Garden`},{name:`slate`,label:`Slate`},{name:`soft-pop`,label:`Soft Pop`},{name:`solar-dusk`,label:`Solar Dusk`},{name:`starry-night`,label:`Starry Night`},{name:`sunset-horizon`,label:`Sunset Horizon`},{name:`supabase`,label:`Supabase`},{name:`t3-chat`,label:`T3 Chat`},{name:`tangerine`,label:`Tangerine`},{name:`twitter`,label:`Twitter`},{name:`vercel`,label:`Vercel`},{name:`vintage-paper`,label:`Vintage Paper`},{name:`violet-bloom`,label:`Violet Bloom`},{name:`vitepress`,label:`Vitepress`}],Du=Eu.map(e=>e.name),Ou=`diffbook:color-mode`,ku=`diffbook:theme`,Au=`theme-`;function ju(){return typeof window<`u`&&!!window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches}function Mu(){if(typeof window>`u`)return`system`;try{let e=localStorage.getItem(Ou);if(e===`dark`||e===`light`||e===`system`)return e}catch{}return`system`}function Nu(e){return e===`system`?ju()?`dark`:`light`:e}function Pu(e){if(!(typeof document>`u`)){document.documentElement.classList.toggle(`dark`,Nu(e)===`dark`);try{localStorage.setItem(Ou,e)}catch{}}}function Fu(){if(typeof window>`u`)return`default`;try{let e=localStorage.getItem(ku);if(e&&Du.includes(e))return e}catch{}return`default`}function Iu(e){if(typeof document>`u`)return;let t=document.documentElement,n=[];t.classList.forEach(e=>{e.startsWith(Au)&&n.push(e)});for(let e of n)t.classList.remove(e);t.classList.add(`${Au}${e}`);try{localStorage.setItem(ku,e)}catch{}}var Lu=[{value:`light`,label:`Light`,Icon:_e},{value:`dark`,label:`Dark`,Icon:pe},{value:`system`,label:`System`,Icon:fe}];function Ru({onResolvedDarkChange:e}){let[t,n]=(0,F.useState)(()=>Mu());function r(e){Pu(e),n(e)}return(0,F.useEffect)(()=>{if(e(Nu(t)===`dark`),t!==`system`||typeof window>`u`||!window.matchMedia)return;let n=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>e(Nu(`system`)===`dark`);return n.addEventListener(`change`,r),()=>n.removeEventListener(`change`,r)},[t,e]),(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Color mode`}),(0,L.jsx)(`div`,{role:`group`,className:`flex w-full items-stretch`,children:Lu.map((e,n)=>{let i=t===e.value;return(0,L.jsxs)(`button`,{type:`button`,onClick:()=>r(e.value),"aria-pressed":i,className:gu(`relative flex flex-1 items-center justify-center gap-1.5 border bg-card px-3 py-2 text-xs transition-colors`,n===0&&`rounded-l-md`,n===Lu.length-1&&`rounded-r-md`,n>0&&`-ml-px`,i?`z-10 border-foreground text-foreground`:`border-border text-muted-foreground hover:border-muted-foreground`),children:[i&&(0,L.jsx)(`span`,{className:`absolute right-1 top-1 size-1.5 rounded-full bg-green-500`}),(0,L.jsx)(e.Icon,{className:`size-3.5`,"aria-hidden":!0}),(0,L.jsx)(`span`,{children:e.label})]},e.value)})})]})}function zu({theme:e,active:t,isDark:n,onSelect:r}){return(0,L.jsxs)(`button`,{type:`button`,title:e.label,onClick:()=>r(e.name),"aria-pressed":t,className:gu(`theme-${e.name}`,n&&`dark`,`relative flex flex-col gap-1.5 overflow-hidden rounded-md border bg-background p-1.5 text-left text-foreground transition-colors`,t?`border-foreground`:`border-border hover:border-muted-foreground`),children:[t&&(0,L.jsx)(`span`,{className:`absolute right-1 top-1 size-1.5 rounded-full bg-green-500`}),(0,L.jsxs)(`div`,{className:`flex h-9 flex-col justify-center gap-1 rounded-sm bg-foreground/10 p-1.5`,children:[(0,L.jsx)(`div`,{className:`h-1.5 w-4/5 rounded-full bg-primary`}),(0,L.jsx)(`div`,{className:`h-1.5 w-3/5 rounded-full bg-foreground/40`})]}),(0,L.jsx)(`span`,{className:`truncate text-[11px] font-medium`,style:{fontFamily:`var(--font-sans)`},children:e.label})]})}function Bu({isDark:e}){let[t,n]=(0,F.useState)(()=>Fu());function r(e){Iu(e),n(e)}return(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Theme`}),(0,L.jsx)(`div`,{className:`max-h-64 overflow-y-auto rounded-md border p-2`,children:(0,L.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,style:{"--font-sans":`ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif`},children:Eu.map(n=>(0,L.jsx)(zu,{theme:n,active:t===n.name,isDark:e,onSelect:r},n.name))})})]})}function Vu(){let[e,t]=(0,F.useState)(()=>Nu(Mu())===`dark`);return(0,L.jsxs)(yu,{children:[(0,L.jsx)(bu,{asChild:!0,children:(0,L.jsx)(vu,{variant:`ghost`,size:`icon`,className:`h-9 w-9`,"aria-label":`Open settings`,children:(0,L.jsx)(ge,{className:`h-[18px] w-[18px]`,"aria-hidden":!0})})}),(0,L.jsxs)(Cu,{className:`max-w-md`,"aria-describedby":void 0,children:[(0,L.jsx)(wu,{children:(0,L.jsxs)(Tu,{className:`flex items-center gap-2`,children:[(0,L.jsx)(ge,{className:`size-4`,"aria-hidden":!0}),`Settings`]})}),(0,L.jsx)(Ru,{onResolvedDarkChange:t}),(0,L.jsx)(Bu,{isDark:e})]})]})}function Hu(){let[e,t]=(0,F.useState)(!1);return(0,F.useEffect)(()=>{function e(){t(window.scrollY>0)}return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),e}function Uu(e,t,n=!1,r=``){return e.map((e,i)=>{let a=n?r?`${r}.${i+1}`:`${i+1}`:``;return{label:a?`${a} ${e.title}`:e.title,...e.slug?{link:t.document(e.slug)}:{},...e.children?{items:Uu(e.children,t,n,a)}:{}}})}function Wu(e,t,n){for(let r of e){if(r.slug&&t.document(r.slug)===n)return[{title:r.title}];if(r.children){let e=Wu(r.children,t,n);if(e.length)return[{title:r.title,href:r.slug?t.document(r.slug):void 0},...e]}}return[]}function Gu({config:e,tree:t,links:n,currentPath:i,headings:a=[],children:o,catalogHome:s}){let[c,l]=(0,F.useState)(!1),[u,d]=(0,F.useState)(!1),f=Wu(t,n,i),p=Hu(),m=r(),h=(0,F.useRef)(null);(0,F.useEffect)(()=>{l(document.documentElement.classList.contains(`db-sidebar-collapsed`)),d(!0);let e=e=>l(e.detail);return document.addEventListener(`diffbook:sidebar-change`,e),()=>document.removeEventListener(`diffbook:sidebar-change`,e)},[]),(0,F.useEffect)(()=>{let e=e=>{if(!(!(e.metaKey||e.ctrlKey)||e.key.toLocaleLowerCase()!==`k`)){if(e.preventDefault(),i===n.search){document.querySelector(`input[type="search"][name="q"]`)?.focus();return}window.location.assign(n.search)}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i,n.search]),(0,F.useEffect)(()=>{let e=h.current;if(!e)return;let t=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target?.closest(`a`);if(!t||t.target||t.hasAttribute(`download`))return;let n=t.getAttribute(`href`);!n||!n.startsWith(`/`)||n.startsWith(`//`)||(e.preventDefault(),m.navigate({to:n}))};return e.addEventListener(`click`,t,!0),()=>e.removeEventListener(`click`,t,!0)},[m]);let g=p?``:` border-transparent`;return(0,L.jsxs)(`div`,{"data-sidebar-ready":u,className:`db-docs-shell min-h-screen${c?` db-sidebar-collapsed`:``}`,children:[(0,L.jsx)(`aside`,{ref:h,"data-testid":`book-sidebar`,"aria-hidden":c,className:`db-docs-sidebar fixed inset-y-0 left-0 z-50 hidden w-64 border-r bg-sidebar transition-transform duration-200 ease-linear lg:block`,children:(0,L.jsx)(Qi,{nav:Uu(t,n,e.mode===`book`),currentPath:i,homeLink:n.home,nested:!0})}),(0,L.jsxs)(`div`,{className:`db-docs-body flex min-h-screen flex-col`,children:[(0,L.jsx)(`header`,{className:`db-docs-navbar db-topnav sticky top-0 z-40 border-b bg-background transition-colors${g}`,children:(0,L.jsx)(He,{title:e.title,nav:(e.nav??[]).map(e=>({...e,link:n.configured(e.link)})),showMenu:!0,sidebarCollapsed:c,homeLink:s??n.home,searchLink:n.search,github:e.repo,appearanceControl:(0,L.jsx)(Vu,{}),breadcrumbs:i===n.search||f.length>0?(0,L.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:`flex min-w-0 items-center gap-2 text-sm text-muted-foreground`,children:i===n.search?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),(0,L.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:`Search`})]}):f.map((e,t)=>{let n=t===f.length-1;return(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),!n&&e.href?(0,L.jsx)(`a`,{href:e.href,className:`truncate transition-colors hover:text-foreground`,children:e.title}):(0,L.jsx)(`span`,{className:`truncate${n?` font-medium text-foreground`:``}`,children:e.title})]},e.title+t)})}):void 0})}),(0,L.jsxs)(`div`,{className:`db-docs-page w-full flex-1 px-6 py-10 sm:px-10 min-[84rem]:grid min-[84rem]:grid-cols-[1fr_minmax(0,48rem)_1fr] min-[84rem]:items-start min-[84rem]:gap-x-10 min-[84rem]:px-8`,children:[(0,L.jsx)(`div`,{"aria-hidden":`true`,className:`hidden min-[84rem]:block`}),(0,L.jsx)(`main`,{className:`db-docs-main mx-auto w-full min-w-0 max-w-3xl min-[84rem]:mx-0 min-[84rem]:max-w-none`,children:(0,L.jsx)(`article`,{className:`prose dark:prose-invert`,children:o??(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`h1`,{children:e.title}),(0,L.jsx)(`p`,{children:`Choose a page from the documentation navigation.`})]})})}),a.length>0?(0,L.jsx)(`aside`,{className:`db-docs-toc sticky top-[calc(var(--nav-h)+2.5rem)] hidden max-h-[calc(100svh-var(--nav-h)-4rem)] w-64 self-start overflow-y-auto min-[84rem]:block`,children:(0,L.jsx)($i,{headings:a})}):(0,L.jsx)(`div`,{"aria-hidden":`true`,className:`hidden min-[84rem]:block`})]})]}),(0,L.jsx)(`div`,{className:`contents lg:hidden`,children:(0,L.jsx)(Qi,{nav:Uu(t,n,e.mode===`book`),currentPath:i,title:e.title,homeLink:n.home})})]})}var Ku=`/`.replace(/\/$/,``);function qu(e,t){let n=`${Ku}${e===`registry`&&t?`/${t}`:``}`;return{home:n||`/`,search:`${n}/search`,document:e=>{let t=e.replace(/^\/+|\/+$/g,``);return t?`${n}/${t}`:n||`/`},configured:e=>!e||/^(?:[a-z][a-z0-9+.-]*:|\/\/|#)/i.test(e)?e:e.startsWith(`/`)?`${n}${e}`||`/`:e}}export{W as A,ye as B,cn as C,ln as D,an as E,Ye as F,P as G,le as H,He as I,ze as L,mt as M,ut as N,tn as O,it as P,Ae as R,Ir as S,on as T,ce as U,he as V,U as W,mi as _,vu as a,Si as b,li as c,_i as d,di as f,vi as g,yi as h,Vu as i,Vt as j,nn as k,ui as l,pi as m,Gu as n,ci as o,fi as p,Hu as r,gi as s,qu as t,si as u,hi as v,sn as w,Rr as x,xi as y,ke as z};
42
+ `},ic=0,ac=[];function oc(e){var t=F.useRef([]),n=F.useRef([0,0]),r=F.useRef(),i=F.useState(ic++)[0],a=F.useState(Os)[0],o=F.useRef(e);F.useEffect(function(){o.current=e},[e]),F.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=rs([e.lockRef.current],(e.shards||[]).map(tc),!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=F.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=$s(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=Ks(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ks(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 Qs(h,t,e,h===`h`?s:c,!0)},[]),c=F.useCallback(function(e){var n=e;if(!(!ac.length||ac[ac.length-1]!==a)){var r=`deltaY`in n?ec(n):$s(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&nc(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(tc).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=F.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:sc(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=F.useCallback(function(e){n.current=$s(e),r.current=void 0},[]),d=F.useCallback(function(t){l(t.type,ec(t),t.target,s(t,e.lockRef.current))},[]),f=F.useCallback(function(t){l(t.type,$s(t),t.target,s(t,e.lockRef.current))},[]);F.useEffect(function(){return ac.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Vs),document.addEventListener(`touchmove`,c,Vs),document.addEventListener(`touchstart`,u,Vs),function(){ac=ac.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Vs),document.removeEventListener(`touchmove`,c,Vs),document.removeEventListener(`touchstart`,u,Vs)}},[]);var p=e.removeScrollBar,m=e.inert;return F.createElement(F.Fragment,null,m?F.createElement(a,{styles:rc(i)}):null,p?F.createElement(Rs,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function sc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var cc=_s(vs,oc),lc=F.forwardRef(function(e,t){return F.createElement(bs,ts({},e,{ref:t,sideCar:cc}))});lc.classNames=bs.classNames;var uc=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},dc=new WeakMap,fc=new WeakMap,pc={},mc=0,hc=function(e){return e&&(e.host||hc(e.parentNode))},gc=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=hc(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})},_c=function(e,t,n,r){var i=gc(t,Array.isArray(e)?e:[e]);pc[n]||(pc[n]=new WeakMap);var a=pc[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=(dc.get(e)||0)+1,l=(a.get(e)||0)+1;dc.set(e,c),a.set(e,l),o.push(e),c===1&&i&&fc.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(),mc++,function(){o.forEach(function(e){var t=dc.get(e)-1,i=a.get(e)-1;dc.set(e,t),a.set(e,i),t||(fc.has(e)||e.removeAttribute(r),fc.delete(e)),i||e.removeAttribute(n)}),mc--,mc||(dc=new WeakMap,dc=new WeakMap,fc=new WeakMap,pc={})}},vc=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||uc(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),_c(r,i,n,`aria-hidden`)):function(){return null}},yc=Object.defineProperty,bc=(e,t)=>yc(e,`name`,{value:t,configurable:!0}),xc=`Dialog`,[Sc,Cc]=ka(xc),[wc,Tc]=Sc(xc),Ec=bc(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=F.useRef(null),c=F.useRef(null),[l,u]=Ja({prop:r,defaultProp:i??!1,onChange:a,caller:xc}),[d,f]=F.useState(0),[p,m]=F.useState(0);return(0,L.jsx)(wc,{scope:t,triggerRef:s,contentRef:c,contentId:po(),titleId:po(),descriptionId:po(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:F.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),Dc=`DialogTrigger`,Oc=F.forwardRef(bc(function(e,t){let{__scopeDialog:n,...r}=e,i=Tc(Dc,n),a=aa(t,i.triggerRef);return(0,L.jsx)(wa.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Kc(i.open),...r,ref:a,onClick:Pa(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),kc=`DialogPortal`,[Ac,jc]=Sc(kc,{forceMount:void 0}),Mc=bc(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Tc(kc,t);return(0,L.jsx)(Ac,{scope:t,forceMount:n,children:F.Children.map(r,e=>(0,L.jsx)(no,{present:n||a.open,children:(0,L.jsx)(qo,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Nc=`DialogOverlay`,Pc=F.forwardRef(bc(function(e,t){let n=jc(Nc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Tc(Nc,e.__scopeDialog);return a.modal?(0,L.jsx)(no,{present:r||a.open,children:(0,L.jsx)(Ic,{...i,ref:t})}):null},`DialogOverlay`)),Fc=ca(`DialogOverlay.RemoveScroll`),Ic=F.forwardRef(bc(function(e,t){let{__scopeDialog:n,...r}=e,i=Tc(Nc,n),a=aa(t,wo());return(0,L.jsx)(lc,{as:Fc,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(wa.div,{"data-state":Kc(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Lc=`DialogContent`,Rc=F.forwardRef(bc(function(e,t){let n=jc(Lc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Tc(Lc,e.__scopeDialog);return(0,L.jsx)(no,{present:r||a.open,children:a.modal?(0,L.jsx)(zc,{...i,ref:t}):(0,L.jsx)(Bc,{...i,ref:t})})},`DialogContent`)),zc=F.forwardRef(bc(function(e,t){let n=Tc(Lc,e.__scopeDialog),r=F.useRef(null),i=aa(t,n.contentRef,r);return F.useEffect(()=>{let e=r.current;if(e)return vc(e)},[]),(0,L.jsx)(Vc,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Pa(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Pa(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Pa(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Bc=F.forwardRef(bc(function(e,t){let n=Tc(Lc,e.__scopeDialog),r=F.useRef(!1),i=F.useRef(!1);return(0,L.jsx)(Vc,{...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()}})},`DialogContentNonModal`)),Vc=F.forwardRef(bc(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Tc(Lc,n);return $o(),(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(Po,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(Co,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Kc(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Hc=`DialogTitle`,Uc=F.forwardRef(bc(function(e,t){let{__scopeDialog:n,...r}=e,i=Tc(Hc,n),{setTitleCount:a}=i;return za(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(wa.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Wc=`DialogClose`,Gc=F.forwardRef(bc(function(e,t){let{__scopeDialog:n,...r}=e,i=Tc(Wc,n);return(0,L.jsx)(wa.button,{type:`button`,...r,ref:t,onClick:Pa(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Kc(e){return e?`open`:`closed`}bc(Kc,`getState`);var qc=(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},Jc=(e,t)=>({classGroupId:e,validator:t}),Yc=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xc=`-`,Zc=[],Qc=`arbitrary..`,$c=e=>{let t=nl(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return tl(e);let n=e.split(Xc);return el(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?qc(i,t):t:i||Zc}return n[e]||Zc}}},el=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=el(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Xc):e.slice(t).join(Xc),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},tl=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?Qc+r:void 0})(),nl=e=>{let{theme:t,classGroups:n}=e;return rl(n,t)},rl=(e,t)=>{let n=Yc();for(let r in e){let i=e[r];il(i,n,r,t)}return n},il=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];al(i,t,n,r)}},al=(e,t,n,r)=>{if(typeof e==`string`){ol(e,t,n);return}if(typeof e==`function`){sl(e,t,n,r);return}cl(e,t,n,r)},ol=(e,t,n)=>{let r=e===``?t:ll(t,e);r.classGroupId=n},sl=(e,t,n,r)=>{if(ul(e)){il(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Jc(n,e))},cl=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];il(o,ll(t,a),n,r)}},ll=(e,t)=>{let n=e,r=t.split(Xc),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Yc(),n.nextPart.set(t,i)),n=i}return n},ul=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,dl=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)}}},fl=`!`,pl=`:`,ml=[],hl=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),gl=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===pl){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(fl)?(c=s.slice(0,-1),l=!0):s.startsWith(fl)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return hl(t,l,c,u)};if(t){let e=t+pl,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):hl(ml,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},_l=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}},vl=e=>({cache:dl(e.cacheSize),parseClassName:gl(e),sortModifiers:_l(e),postfixLookupClassGroupIds:yl(e),...$c(e)}),yl=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},bl=/\s+/,xl=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(bl),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+fl:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Sl=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Cl(n))&&(i&&(i+=` `),i+=r);return i},Cl=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Cl(e[r]))&&(n&&(n+=` `),n+=t);return n},wl=(e,...t)=>{let n,r,i,a,o=o=>(n=vl(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=xl(e,n);return i(e,a),a};return a=o,(...e)=>a(Sl(...e))},Tl=[],X=e=>{let t=t=>t[e]||Tl;return t.isThemeGetter=!0,t},El=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Dl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ol=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,kl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Al=/\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$/,jl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ml=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pl=e=>Ol.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),Fl=e=>!!e&&Number.isInteger(Number(e)),Il=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),Ll=e=>kl.test(e),Rl=()=>!0,zl=e=>Al.test(e)&&!jl.test(e),Bl=()=>!1,Vl=e=>Ml.test(e),Hl=e=>Nl.test(e),Ul=e=>!Q(e)&&!$(e),Wl=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Gl=e=>ou(e,uu,Bl),Q=e=>El.test(e),Kl=e=>ou(e,du,zl),ql=e=>ou(e,fu,Z),Jl=e=>ou(e,mu,Rl),Yl=e=>ou(e,pu,Bl),Xl=e=>ou(e,cu,Bl),Zl=e=>ou(e,lu,Hl),Ql=e=>ou(e,hu,Vl),$=e=>Dl.test(e),$l=e=>su(e,du),eu=e=>su(e,pu),tu=e=>su(e,cu),nu=e=>su(e,uu),ru=e=>su(e,lu),iu=e=>su(e,hu,!0),au=e=>su(e,mu,!0),ou=(e,t,n)=>{let r=El.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},su=(e,t,n=!1)=>{let r=Dl.exec(e);return r?r[1]?t(r[1]):n:!1},cu=e=>e===`position`||e===`percentage`,lu=e=>e===`image`||e===`url`,uu=e=>e===`length`||e===`size`||e===`bg-size`,du=e=>e===`length`,fu=e=>e===`number`,pu=e=>e===`family-name`,mu=e=>e===`number`||e===`weight`,hu=e=>e===`shadow`,gu=wl(()=>{let e=X(`color`),t=X(`font`),n=X(`text`),r=X(`font-weight`),i=X(`tracking`),a=X(`leading`),o=X(`breakpoint`),s=X(`container`),c=X(`spacing`),l=X(`radius`),u=X(`shadow`),d=X(`inset-shadow`),f=X(`text-shadow`),p=X(`drop-shadow`),m=X(`blur`),h=X(`perspective`),g=X(`aspect`),_=X(`ease`),v=X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[Pl,`full`,`auto`,...w()],ee=()=>[Fl,`none`,`subgrid`,$,Q],E=()=>[`auto`,{span:[`full`,Fl,$,Q]},Fl,$,Q],te=()=>[Fl,`auto`,$,Q],ne=()=>[`auto`,`min`,`max`,`fr`,$,Q],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],O=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],A=()=>[Pl,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[Pl,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[Pl,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,$,Q],P=()=>[...b(),tu,Xl,{position:[$,Q]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],F=()=>[`auto`,`cover`,`contain`,nu,Gl,{size:[$,Q]}],I=()=>[Il,$l,Kl],L=()=>[``,`none`,`full`,l,$,Q],R=()=>[``,Z,$l,Kl],z=()=>[`solid`,`dashed`,`dotted`,`double`],B=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],V=()=>[Z,Il,tu,Xl],ie=()=>[``,`none`,m,$,Q],ae=()=>[`none`,Z,$,Q],oe=()=>[`none`,Z,$,Q],H=()=>[Z,$,Q],se=()=>[Pl,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ll],breakpoint:[Ll],color:[Rl],container:[Ll],"drop-shadow":[Ll],ease:[`in`,`out`,`in-out`],font:[Ul],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ll],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ll],shadow:[Ll],spacing:[`px`,Z],text:[Ll],"text-shadow":[Ll],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Pl,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[Wl],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Fl,`auto`,$,Q]}],basis:[{basis:[Pl,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,Pl,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[Fl,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...O(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...O()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...O(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...O(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...O(),`baseline`]}],"place-self":[{"place-self":[`auto`,...O()]}],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:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...j()]}],"min-inline-size":[{"min-inline":[`auto`,...j()]}],"max-inline-size":[{"max-inline":[`none`,...j()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,...A()]}],"font-size":[{text:[`base`,n,$l,Kl]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,au,Jl]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Il,Q]}],"font-family":[{font:[eu,Yl,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,ql]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...z(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,Kl]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Fl,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:F()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Fl,$,Q],radial:[``,$,Q],conic:[Fl,$,Q]},ru,Zl]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...z(),`hidden`,`none`]}],"divide-style":[{divide:[...z(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...z(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,$l,Kl]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,iu,Ql]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,iu,Ql]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[Z,Kl]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,iu,Ql]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...B(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":B()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:ie()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,iu,Ql]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:H()}],"skew-x":[{"skew-x":H()}],"skew-y":[{"skew-y":H()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":[`translate-none`],zoom:[{zoom:[Fl,$,Q]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[Z,$l,Kl,ql]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function _u(...e){return gu(c(e))}var vu=Se(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 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`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function yu({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?la:`button`;return(0,L.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:_u(vu({variant:t,size:n,className:e})),...i})}function bu({...e}){return(0,L.jsx)(Ec,{"data-slot":`dialog`,...e})}function xu({...e}){return(0,L.jsx)(Oc,{"data-slot":`dialog-trigger`,...e})}function Su({...e}){return(0,L.jsx)(Mc,{"data-slot":`dialog-portal`,...e})}function Cu({className:e,...t}){return(0,L.jsx)(Pc,{"data-slot":`dialog-overlay`,className:_u(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function wu({className:e,children:t,showCloseButton:n=!0,...r}){return(0,L.jsxs)(Su,{children:[(0,L.jsx)(Cu,{}),(0,L.jsxs)(Rc,{"data-slot":`dialog-content`,className:_u(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r,children:[t,n&&(0,L.jsxs)(Gc,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,L.jsx)(ye,{className:`size-4`}),(0,L.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Tu({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`dialog-header`,className:_u(`flex flex-col gap-1.5`,e),...t})}function Eu({className:e,...t}){return(0,L.jsx)(Uc,{"data-slot":`dialog-title`,className:_u(`text-lg font-semibold text-foreground`,e),...t})}var Du=[{name:`amber-minimal`,label:`Amber Minimal`},{name:`amethyst-haze`,label:`Amethyst Haze`},{name:`anthropic`,label:`Anthropic`},{name:`anyscale`,label:`Anyscale`},{name:`bold-tech`,label:`Bold Tech`},{name:`bubblegum`,label:`Bubblegum`},{name:`caffeine`,label:`Caffeine`},{name:`candyland`,label:`Candyland`},{name:`catppuccin`,label:`Catppuccin`},{name:`claude`,label:`Claude`},{name:`claymorphism`,label:`Claymorphism`},{name:`clean-slate`,label:`Clean Slate`},{name:`cosmic-night`,label:`Cosmic Night`},{name:`cyberpunk`,label:`Cyberpunk`},{name:`darkmatter`,label:`Darkmatter`},{name:`default`,label:`Default`},{name:`doom-64`,label:`Doom 64`},{name:`elegant-luxury`,label:`Elegant Luxury`},{name:`graphite`,label:`Graphite`},{name:`green`,label:`Green`},{name:`kodama-grove`,label:`Kodama Grove`},{name:`lambda`,label:`Lambda`},{name:`midnight-bloom`,label:`Midnight Bloom`},{name:`mdbook`,label:`mdBook`},{name:`mocha-mousse`,label:`Mocha Mousse`},{name:`modern-minimal`,label:`Modern Minimal`},{name:`mono`,label:`Mono`},{name:`nature`,label:`Nature`},{name:`neo-brutalism`,label:`Neo Brutalism`},{name:`northern-lights`,label:`Northern Lights`},{name:`notebook`,label:`Notebook`},{name:`ocean-breeze`,label:`Ocean Breeze`},{name:`openai`,label:`Openai`},{name:`pastel-dreams`,label:`Pastel Dreams`},{name:`perpetuity`,label:`Perpetuity`},{name:`quantum-rose`,label:`Quantum Rose`},{name:`retro-arcade`,label:`Retro Arcade`},{name:`rose`,label:`Rose`},{name:`sage-garden`,label:`Sage Garden`},{name:`slate`,label:`Slate`},{name:`soft-pop`,label:`Soft Pop`},{name:`solar-dusk`,label:`Solar Dusk`},{name:`starry-night`,label:`Starry Night`},{name:`sunset-horizon`,label:`Sunset Horizon`},{name:`supabase`,label:`Supabase`},{name:`t3-chat`,label:`T3 Chat`},{name:`tangerine`,label:`Tangerine`},{name:`twitter`,label:`Twitter`},{name:`vercel`,label:`Vercel`},{name:`vintage-paper`,label:`Vintage Paper`},{name:`violet-bloom`,label:`Violet Bloom`},{name:`vitepress`,label:`Vitepress`}],Ou=Du.map(e=>e.name),ku=`diffbook:color-mode`,Au=`diffbook:theme`,ju=`theme-`;function Mu(){return typeof window<`u`&&!!window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches}function Nu(){if(typeof window>`u`)return`system`;try{let e=localStorage.getItem(ku);if(e===`dark`||e===`light`||e===`system`)return e}catch{}return`system`}function Pu(e){return e===`system`?Mu()?`dark`:`light`:e}function Fu(e){if(!(typeof document>`u`)){document.documentElement.classList.toggle(`dark`,Pu(e)===`dark`);try{localStorage.setItem(ku,e)}catch{}}}function Iu(){if(typeof window>`u`)return`default`;try{let e=localStorage.getItem(Au);if(e&&Ou.includes(e))return e}catch{}return`default`}function Lu(e){if(typeof document>`u`)return;let t=document.documentElement,n=[];t.classList.forEach(e=>{e.startsWith(ju)&&n.push(e)});for(let e of n)t.classList.remove(e);t.classList.add(`${ju}${e}`);try{localStorage.setItem(Au,e)}catch{}}var Ru=[{value:`light`,label:`Light`,Icon:_e},{value:`dark`,label:`Dark`,Icon:pe},{value:`system`,label:`System`,Icon:fe}];function zu({onResolvedDarkChange:e}){let[t,n]=(0,F.useState)(()=>Nu());function r(e){Fu(e),n(e)}return(0,F.useEffect)(()=>{if(e(Pu(t)===`dark`),t!==`system`||typeof window>`u`||!window.matchMedia)return;let n=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>e(Pu(`system`)===`dark`);return n.addEventListener(`change`,r),()=>n.removeEventListener(`change`,r)},[t,e]),(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Color mode`}),(0,L.jsx)(`div`,{role:`group`,className:`flex w-full items-stretch`,children:Ru.map((e,n)=>{let i=t===e.value;return(0,L.jsxs)(`button`,{type:`button`,onClick:()=>r(e.value),"aria-pressed":i,className:_u(`relative flex flex-1 items-center justify-center gap-1.5 border bg-card px-3 py-2 text-xs transition-colors`,n===0&&`rounded-l-md`,n===Ru.length-1&&`rounded-r-md`,n>0&&`-ml-px`,i?`z-10 border-foreground text-foreground`:`border-border text-muted-foreground hover:border-muted-foreground`),children:[i&&(0,L.jsx)(`span`,{className:`absolute right-1 top-1 size-1.5 rounded-full bg-green-500`}),(0,L.jsx)(e.Icon,{className:`size-3.5`,"aria-hidden":!0}),(0,L.jsx)(`span`,{children:e.label})]},e.value)})})]})}function Bu({theme:e,active:t,isDark:n,onSelect:r}){return(0,L.jsxs)(`button`,{type:`button`,title:e.label,onClick:()=>r(e.name),"aria-pressed":t,className:_u(`theme-${e.name}`,n&&`dark`,`relative flex flex-col gap-1.5 overflow-hidden rounded-md border bg-background p-1.5 text-left text-foreground transition-colors`,t?`border-foreground`:`border-border hover:border-muted-foreground`),children:[t&&(0,L.jsx)(`span`,{className:`absolute right-1 top-1 size-1.5 rounded-full bg-green-500`}),(0,L.jsxs)(`div`,{className:`flex h-9 flex-col justify-center gap-1 rounded-sm bg-foreground/10 p-1.5`,children:[(0,L.jsx)(`div`,{className:`h-1.5 w-4/5 rounded-full bg-primary`}),(0,L.jsx)(`div`,{className:`h-1.5 w-3/5 rounded-full bg-foreground/40`})]}),(0,L.jsx)(`span`,{className:`truncate text-[11px] font-medium`,style:{fontFamily:`var(--font-sans)`},children:e.label})]})}function Vu({isDark:e}){let[t,n]=(0,F.useState)(()=>Iu());function r(e){Lu(e),n(e)}return(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Theme`}),(0,L.jsx)(`div`,{className:`max-h-64 overflow-y-auto rounded-md border p-2`,children:(0,L.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,style:{"--font-sans":`ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif`},children:Du.map(n=>(0,L.jsx)(Bu,{theme:n,active:t===n.name,isDark:e,onSelect:r},n.name))})})]})}function Hu(){let[e,t]=(0,F.useState)(()=>Pu(Nu())===`dark`);return(0,L.jsxs)(bu,{children:[(0,L.jsx)(xu,{asChild:!0,children:(0,L.jsx)(yu,{variant:`ghost`,size:`icon`,className:`h-9 w-9`,"aria-label":`Open settings`,children:(0,L.jsx)(ge,{className:`h-[18px] w-[18px]`,"aria-hidden":!0})})}),(0,L.jsxs)(wu,{className:`max-w-md`,"aria-describedby":void 0,children:[(0,L.jsx)(Tu,{children:(0,L.jsxs)(Eu,{className:`flex items-center gap-2`,children:[(0,L.jsx)(ge,{className:`size-4`,"aria-hidden":!0}),`Settings`]})}),(0,L.jsx)(zu,{onResolvedDarkChange:t}),(0,L.jsx)(Vu,{isDark:e})]})]})}function Uu(){let[e,t]=(0,F.useState)(!1);return(0,F.useEffect)(()=>{function e(){t(window.scrollY>0)}return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),e}function Wu(e,t,n=!1,r=``){return e.map((e,i)=>{let a=n?r?`${r}.${i+1}`:`${i+1}`:``;return{label:a?`${a} ${e.title}`:e.title,...e.slug?{link:t.document(e.slug)}:{},...e.children?{items:Wu(e.children,t,n,a)}:{}}})}function Gu(e,t,n){for(let r of e){if(r.slug&&t.document(r.slug)===n)return[{title:r.title}];if(r.children){let e=Gu(r.children,t,n);if(e.length)return[{title:r.title,href:r.slug?t.document(r.slug):void 0},...e]}}return[]}function Ku({config:e,tree:t,links:n,currentPath:i,headings:a=[],children:o,catalogHome:s}){let[c,l]=(0,F.useState)(!1),[u,d]=(0,F.useState)(!1),f=Gu(t,n,i),p=Uu(),m=`/`.replace(/\/$/,``),h=(0,F.useCallback)(({href:e,children:t,...n})=>{let i=m&&(e===m||e.startsWith(`${m}/`))?e.slice(m.length)||`/`:e;return(0,L.jsx)(r,{to:i,...n,children:t})},[m]);(0,F.useEffect)(()=>{l(document.documentElement.classList.contains(`db-sidebar-collapsed`)),d(!0);let e=e=>l(e.detail);return document.addEventListener(`diffbook:sidebar-change`,e),()=>document.removeEventListener(`diffbook:sidebar-change`,e)},[]),(0,F.useEffect)(()=>{let e=e=>{if(!(!(e.metaKey||e.ctrlKey)||e.key.toLocaleLowerCase()!==`k`)){if(e.preventDefault(),i===n.search){document.querySelector(`input[type="search"][name="q"]`)?.focus();return}window.location.assign(n.search)}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i,n.search]);let g=p?``:` border-transparent`;return(0,L.jsxs)(`div`,{"data-sidebar-ready":u,className:`db-docs-shell min-h-screen${c?` db-sidebar-collapsed`:``}`,children:[(0,L.jsx)(`aside`,{"data-testid":`book-sidebar`,"aria-hidden":c,className:`db-docs-sidebar fixed inset-y-0 left-0 z-50 hidden w-64 border-r bg-sidebar transition-transform duration-200 ease-linear lg:block`,children:(0,L.jsx)($i,{nav:Wu(t,n,e.mode===`book`),currentPath:i,homeLink:n.home,linkComponent:h,nested:!0})}),(0,L.jsxs)(`div`,{className:`db-docs-body flex min-h-screen flex-col`,children:[(0,L.jsx)(`header`,{className:`db-docs-navbar db-topnav sticky top-0 z-40 border-b bg-background transition-colors${g}`,children:(0,L.jsx)(He,{title:e.title,nav:(e.nav??[]).map(e=>({...e,link:n.configured(e.link)})),showMenu:!0,sidebarCollapsed:c,homeLink:s??n.home,searchLink:n.search,github:e.repo,appearanceControl:(0,L.jsx)(Hu,{}),breadcrumbs:i===n.search||f.length>0?(0,L.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:`flex min-w-0 items-center gap-2 text-sm text-muted-foreground`,children:i===n.search?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),(0,L.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:`Search`})]}):f.map((e,t)=>{let n=t===f.length-1;return(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),!n&&e.href?(0,L.jsx)(`a`,{href:e.href,className:`truncate transition-colors hover:text-foreground`,children:e.title}):(0,L.jsx)(`span`,{className:`truncate${n?` font-medium text-foreground`:``}`,children:e.title})]},e.title+t)})}):void 0})}),(0,L.jsxs)(`div`,{className:`db-docs-page w-full flex-1 px-6 py-10 sm:px-10 min-[84rem]:grid min-[84rem]:grid-cols-[1fr_minmax(0,48rem)_1fr] min-[84rem]:items-start min-[84rem]:gap-x-10 min-[84rem]:px-8`,children:[(0,L.jsx)(`div`,{"aria-hidden":`true`,className:`hidden min-[84rem]:block`}),(0,L.jsx)(`main`,{className:`db-docs-main mx-auto w-full min-w-0 max-w-3xl min-[84rem]:mx-0 min-[84rem]:max-w-none`,children:(0,L.jsx)(`article`,{className:`prose dark:prose-invert`,children:o??(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`h1`,{children:e.title}),(0,L.jsx)(`p`,{children:`Choose a page from the documentation navigation.`})]})})}),a.length>0?(0,L.jsx)(`aside`,{className:`db-docs-toc sticky top-[calc(var(--nav-h)+2.5rem)] hidden max-h-[calc(100svh-var(--nav-h)-4rem)] w-64 self-start overflow-y-auto min-[84rem]:block`,children:(0,L.jsx)(ea,{headings:a})}):(0,L.jsx)(`div`,{"aria-hidden":`true`,className:`hidden min-[84rem]:block`})]})]}),(0,L.jsx)(`div`,{className:`contents lg:hidden`,children:(0,L.jsx)($i,{nav:Wu(t,n,e.mode===`book`),currentPath:i,title:e.title,homeLink:n.home,linkComponent:h})})]})}var qu=`/`.replace(/\/$/,``);function Ju(e,t){let n=`${qu}${e===`registry`&&t?`/${t}`:``}`;return{home:n||`/`,search:`${n}/search`,document:e=>{let t=e.replace(/^\/+|\/+$/g,``);return t?`${n}/${t}`:n||`/`},configured:e=>!e||/^(?:[a-z][a-z0-9+.-]*:|\/\/|#)/i.test(e)?e:e.startsWith(`/`)?`${n}${e}`||`/`:e}}export{W as A,ye as B,cn as C,ln as D,an as E,Ye as F,P as G,le as H,He as I,ze as L,mt as M,ut as N,tn as O,it as P,Ae as R,Ir as S,on as T,ce as U,he as V,U as W,mi as _,yu as a,Si as b,li as c,_i as d,di as f,vi as g,yi as h,Hu as i,Vt as j,nn as k,ui as l,pi as m,Ku as n,ci as o,fi as p,Uu as r,gi as s,Ju as t,si as u,hi as v,sn as w,Rr as x,xi as y,ke as z};