boltdocs 2.4.2 → 2.5.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 (116) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cache-3FOEPC2P.mjs +1 -0
  3. package/dist/chunk-ITFGVXPE.mjs +1 -0
  4. package/dist/chunk-JGR2ELBA.mjs +75 -0
  5. package/dist/chunk-TP5KMRD3.mjs +1 -0
  6. package/dist/chunk-Y4RE5KI7.mjs +1 -0
  7. package/dist/client/index.d.mts +1225 -14
  8. package/dist/client/index.d.ts +1225 -14
  9. package/dist/client/index.js +1 -1
  10. package/dist/client/index.mjs +1 -1
  11. package/dist/client/ssr.js +1 -1
  12. package/dist/client/ssr.mjs +1 -1
  13. package/dist/node/cli-entry.js +37 -35
  14. package/dist/node/cli-entry.mjs +1 -1
  15. package/dist/node/index.d.mts +263 -1
  16. package/dist/node/index.d.ts +263 -1
  17. package/dist/node/index.js +34 -32
  18. package/dist/node/index.mjs +1 -1
  19. package/dist/package-SGBODKXD.mjs +1 -0
  20. package/dist/search-dialog-YBM4GYDR.mjs +1 -0
  21. package/package.json +45 -76
  22. package/src/client/app/mdx-page.tsx +2 -6
  23. package/src/client/components/mdx/code-block.tsx +4 -2
  24. package/src/client/components/primitives/breadcrumbs.tsx +10 -10
  25. package/src/client/components/primitives/index.ts +17 -16
  26. package/src/client/components/primitives/menu.tsx +11 -14
  27. package/src/client/components/primitives/navbar.tsx +29 -29
  28. package/src/client/components/primitives/navigation-menu.tsx +7 -9
  29. package/src/client/components/primitives/on-this-page.tsx +16 -18
  30. package/src/client/components/primitives/page-nav.tsx +10 -13
  31. package/src/client/components/primitives/search-dialog.tsx +17 -19
  32. package/src/client/components/primitives/sidebar.tsx +8 -10
  33. package/src/client/components/primitives/tabs.tsx +10 -12
  34. package/src/client/components/primitives/tooltip.tsx +3 -5
  35. package/src/client/components/ui-base/breadcrumbs.tsx +12 -15
  36. package/src/client/components/ui-base/copy-markdown.tsx +8 -10
  37. package/src/client/components/ui-base/navbar.tsx +10 -10
  38. package/src/client/components/ui-base/on-this-page.tsx +13 -12
  39. package/src/client/components/ui-base/page-nav.tsx +15 -15
  40. package/src/client/components/ui-base/search-dialog.tsx +13 -20
  41. package/src/client/components/ui-base/sidebar.tsx +9 -9
  42. package/src/client/components/ui-base/tabs.tsx +6 -7
  43. package/src/client/components/ui-base/theme-toggle.tsx +11 -11
  44. package/src/client/hooks/index.ts +12 -12
  45. package/src/client/index.ts +34 -11
  46. package/src/node/config.ts +48 -6
  47. package/src/node/errors.ts +44 -0
  48. package/src/node/index.ts +29 -2
  49. package/src/node/mdx/index.ts +9 -3
  50. package/src/node/mdx/rehype-shiki.ts +2 -2
  51. package/src/node/plugin/index.ts +72 -4
  52. package/src/node/plugins/index.ts +17 -0
  53. package/src/node/plugins/plugin-errors.ts +62 -0
  54. package/src/node/plugins/plugin-lifecycle.ts +117 -0
  55. package/src/node/plugins/plugin-sandbox.ts +59 -0
  56. package/src/node/plugins/plugin-store.ts +54 -0
  57. package/src/node/plugins/plugin-types.ts +107 -0
  58. package/src/node/plugins/plugin-validator.ts +105 -0
  59. package/src/node/routes/parser.ts +35 -5
  60. package/src/node/schema/config.ts +208 -0
  61. package/src/node/schema/frontmatter.ts +17 -0
  62. package/src/node/security/constants/index.ts +10 -0
  63. package/src/node/security/csp.ts +31 -0
  64. package/src/node/security/headers.ts +27 -0
  65. package/src/node/utils.ts +153 -5
  66. package/tsup.config.ts +0 -6
  67. package/dist/base-ui/index.d.mts +0 -25
  68. package/dist/base-ui/index.d.ts +0 -25
  69. package/dist/base-ui/index.js +0 -1
  70. package/dist/base-ui/index.mjs +0 -1
  71. package/dist/cache-P6WK424C.mjs +0 -1
  72. package/dist/chunk-2DI3OGHV.mjs +0 -1
  73. package/dist/chunk-2Z5T6EAU.mjs +0 -1
  74. package/dist/chunk-64AJ5QLT.mjs +0 -1
  75. package/dist/chunk-DDX52BX4.mjs +0 -1
  76. package/dist/chunk-HRZDSFR5.mjs +0 -1
  77. package/dist/chunk-JD3RSDE4.mjs +0 -1
  78. package/dist/chunk-JZXLCA2E.mjs +0 -1
  79. package/dist/chunk-NBCYHLAA.mjs +0 -1
  80. package/dist/chunk-PPVDMDEL.mjs +0 -1
  81. package/dist/chunk-T3W44KWY.mjs +0 -1
  82. package/dist/chunk-UBE4CKOA.mjs +0 -1
  83. package/dist/chunk-UWT4AJTH.mjs +0 -73
  84. package/dist/chunk-WWJ7WKDI.mjs +0 -1
  85. package/dist/chunk-Y4RRHPXC.mjs +0 -1
  86. package/dist/client/types.d.mts +0 -3
  87. package/dist/client/types.d.ts +0 -3
  88. package/dist/client/types.js +0 -1
  89. package/dist/client/types.mjs +0 -0
  90. package/dist/copy-markdown--9yjpbyy.d.mts +0 -15
  91. package/dist/copy-markdown-l2MYkcG7.d.ts +0 -15
  92. package/dist/hooks/index.d.mts +0 -137
  93. package/dist/hooks/index.d.ts +0 -137
  94. package/dist/hooks/index.js +0 -1
  95. package/dist/hooks/index.mjs +0 -1
  96. package/dist/integrations/index.d.mts +0 -48
  97. package/dist/integrations/index.d.ts +0 -48
  98. package/dist/integrations/index.js +0 -1
  99. package/dist/integrations/index.mjs +0 -1
  100. package/dist/link-DfBwCeZc.d.mts +0 -68
  101. package/dist/link-DfBwCeZc.d.ts +0 -68
  102. package/dist/loading-BwUos0wZ.d.mts +0 -57
  103. package/dist/loading-nlnUD01v.d.ts +0 -57
  104. package/dist/mdx/index.d.mts +0 -178
  105. package/dist/mdx/index.d.ts +0 -178
  106. package/dist/mdx/index.js +0 -1
  107. package/dist/mdx/index.mjs +0 -1
  108. package/dist/primitives/index.d.mts +0 -292
  109. package/dist/primitives/index.d.ts +0 -292
  110. package/dist/primitives/index.js +0 -1
  111. package/dist/primitives/index.mjs +0 -1
  112. package/dist/search-dialog-OONKKC5H.mjs +0 -1
  113. package/dist/types-opDA2E9-.d.mts +0 -394
  114. package/dist/types-opDA2E9-.d.ts +0 -394
  115. package/dist/use-routes-DNwgTRpU.d.ts +0 -29
  116. package/dist/use-routes-DrT80Eom.d.mts +0 -29
@@ -1 +1 @@
1
- import{a as Z}from"../chunk-DDX52BX4.mjs";import{a as H,b as O,f as I,h as V,i as U,j as W,k as q,l as z,m as X}from"../chunk-PPVDMDEL.mjs";import{a as $}from"../chunk-HRZDSFR5.mjs";import{a as yo,b as A,c as Lo,d as Ro,e as ho,f as Po,g as vo,h as To,i as Mo,j as bo,k as Bo,l as Ho,m as wo,n as So,o as Eo,p as ko,q as No,r as Do,s as Ao,t as Fo,u as Oo,v as $o,w as Io,x as Vo,y as Q}from"../chunk-2DI3OGHV.mjs";import{a as F}from"../chunk-64AJ5QLT.mjs";import{a as J,b as uo}from"../chunk-JD3RSDE4.mjs";import{a as Co,b as xo,c as go}from"../chunk-T3W44KWY.mjs";import"../chunk-2Z5T6EAU.mjs";import{a as x}from"../chunk-WWJ7WKDI.mjs";import{a as _,b as D,d as G,e as T,f as R}from"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";import S,{useEffect as K,useState as mo,useMemo as co}from"react";import te from"react-dom/client";import{BrowserRouter as ne,Routes as re,Route as g}from"react-router-dom";import po from"virtual:boltdocs-layout";import{startTransition as Uo}from"react";import{RouterProvider as Wo}from"react-aria-components";import{useNavigate as qo,useHref as zo}from"react-router-dom";import{jsx as Xo}from"react/jsx-runtime";function j({children:o}){let e=qo();return Xo(Wo,{navigate:(t,s)=>{Uo(()=>{e(t,s)})},useHref:zo,children:o})}import{useLayoutEffect as Ko}from"react";import{useLocation as Yo}from"react-router-dom";function oo(){let{pathname:o,hash:e}=Yo();return Ko(()=>{let t=document.querySelector(".boltdocs-content")||window,s=()=>t===window?window.scrollY:t.scrollTop,i=(m,n="auto")=>{t===window?window.scrollTo({top:m,behavior:n}):t.scrollTo({top:m,behavior:n})};if(e){let m=e.replace("#",""),n=document.getElementById(m);if(n){let d=t===window?0:t.getBoundingClientRect().top,l=n.getBoundingClientRect().top-d-80+s();i(l,"smooth");return}}i(0)},[o,e]),null}import{Outlet as _o}from"react-router-dom";import Go from"virtual:boltdocs-layout";import{jsx as eo}from"react/jsx-runtime";function to(){return eo(Go,{children:eo(_o,{})})}import{MDXProvider as jo}from"@mdx-js/react";import{createContext as Jo,use as Qo}from"react";import{jsx as Zo}from"react/jsx-runtime";var no=Jo({});function M(){return Qo(no)}function ro({components:o,children:e}){return Zo(no.Provider,{value:o,children:e})}import{jsx as ao}from"react/jsx-runtime";function so({Component:o}){let e=M();return ao(jo,{components:e,children:ao(o,{})})}import{Link as oe}from"lucide-react";import{jsx as f,jsxs as ee}from"react/jsx-runtime";var h=({level:o,id:e,children:t,...s})=>{let i=`h${o}`;return ee(i,{id:e,...s,className:"boltdocs-heading",children:[t,e&&f("a",{href:`#${e}`,className:"header-anchor","aria-label":"Anchor",children:f(oe,{size:16})})]})},io={...Q,Loading:O,h1:o=>f(h,{level:1,...o}),h2:o=>f(h,{level:2,...o}),h3:o=>f(h,{level:3,...o}),h4:o=>f(h,{level:4,...o}),h5:o=>f(h,{level:5,...o}),h6:o=>f(h,{level:6,...o}),pre:o=>f(A,{...o,children:o.children})};import ae from"virtual:boltdocs-mdx-components";import{useLocation as se}from"react-router-dom";import{Fragment as le,jsx as r,jsxs as w}from"react/jsx-runtime";function ie(){let{currentLocale:o,config:e}=R();return K(()=>{if(!e.i18n)return;let t=e.i18n.localeConfigs?.[o];document.documentElement.lang=t?.htmlLang||o||"en",document.documentElement.dir=t?.direction||"ltr"},[o,e.i18n]),null}function me(){let o=se(),{config:e}=R(),t=T(n=>n.setLocale),s=T(n=>n.setVersion),i=T(n=>n.currentLocale),m=T(n=>n.currentVersion);return K(()=>{let n=o.pathname.split("/").filter(Boolean),p=0,d=e.versions?.defaultVersion,c=e.i18n?.defaultLocale;if(n[p]==="docs"&&p++,e.versions&&n.length>p){let y=e.versions.versions.find(l=>l.path===n[p]);y&&(d=y.path,p++)}e.i18n&&n.length>p&&e.i18n.locales[n[p]]?c=n[p]:e.i18n&&n.length===0&&(c=i||e.i18n.defaultLocale),c!==i&&t(c),d!==m&&s(d)},[o.pathname,e,t,s,i,m]),null}function ce({initialRoutes:o,initialConfig:e,docsDirName:t,modules:s,hot:i,homePage:m,externalPages:n,externalLayout:p,components:d={}}){let[c,y]=mo(o),[l,k]=mo(e),N=n||{},b=p||po,lo=co(()=>c.filter(a=>!(m&&(a.path==="/"||a.path===""))&&!N[a.path===""?"/":a.path]).map(a=>{let v=Object.keys(s).find(C=>C===`/${t}/${a.filePath}`||C.endsWith(`/${t}/${a.filePath}`)||C.endsWith(`/${t}\\${a.filePath.replace(/\\/g,"/")}`)),B=v?s[v]:null;return{...a,Component:S.lazy(async()=>B?await B():{default:H})}}),[c,s,t,m,N]);K(()=>{i&&(i.on("boltdocs:routes-update",a=>{y(a)}),i.on("boltdocs:config-update",a=>{k(a)}))},[i]);let Y=co(()=>({...io,...ae,...d}),[d]),fo=Y.Loading;return r(J,{children:r(ro,{components:Y,children:r(_.Provider,{value:l,children:r(j,{children:w(G,{routes:c,modules:s,children:[r(oo,{}),r(me,{}),r(ie,{}),w(re,{children:[r(g,{element:r(to,{}),children:lo.map(a=>r(g,{path:a.path===""?"/":a.path,element:r(S.Suspense,{fallback:r(fo,{}),children:r(so,{Component:a.Component})})},a.path))},"docs-layout"),m&&w(le,{children:[r(g,{path:"/",element:r(b,{children:r(m,{})})}),l.i18n&&Object.keys(l.i18n.locales).map(a=>r(g,{path:`/${a}`,element:r(b,{children:r(m,{})})},`home-${a}`))]}),Object.entries(N).map(([a,v])=>{let B=a==="/"?"":a;return w(S.Fragment,{children:[r(g,{path:a,element:r(b,{children:r(v,{})})}),l.i18n&&Object.keys(l.i18n.locales).map(C=>r(g,{path:`/${C}${B}`,element:r(b,{children:r(v,{})})},`${a}-${C}`))]},a)}),r(g,{path:"*",element:r(po,{children:r(H,{})})})]})]})})})})})}function pe(o){let{target:e,routes:t,docsDirName:s,config:i,modules:m,hot:n,homePage:p,externalPages:d,externalLayout:c,components:y}=o,l=document.querySelector(e);if(!l)throw new Error(`[boltdocs] Mount target "${e}" not found in document.`);let k=r(S.StrictMode,{children:r(ne,{children:r(ce,{initialRoutes:t,initialConfig:i,docsDirName:s,modules:m,hot:n,homePage:p,externalPages:d,externalLayout:c,components:y})})});l.innerHTML="",te.createRoot(l).render(k)}import{jsx as P}from"react/jsx-runtime";function de({children:o,className:e,style:t}){return P("div",{className:x("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",e),style:t,children:o})}function fe({children:o,className:e,style:t}){return P("div",{className:x("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",e),style:t,children:o})}function ue({children:o,className:e,style:t}){return P("main",{className:x("boltdocs-content flex-1 min-w-0 overflow-y-auto","contain-layout",e),style:t,children:o})}function ye({children:o,className:e,style:t}){let{pathname:s}=Z();return P("div",{className:x("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8",{"max-w-content-max":s.includes("/docs/")},e),style:t,children:o})}function Ce({children:o,className:e,style:t}){return P("div",{className:x("flex items-center justify-between mb-10",e),style:t,children:o})}function xe({children:o,className:e,style:t}){return P("div",{className:x("mt-20",e),style:t,children:o})}var L=Object.assign(de,{Body:fe,Content:ue,ContentMdx:ye,ContentHeader:Ce,ContentFooter:xe});import{useLocation as ge}from"react-router-dom";import{jsx as u,jsxs as E}from"react/jsx-runtime";function Le({children:o}){let{routes:e,allRoutes:t,currentRoute:s,currentLocale:i}=R(),{pathname:m}=ge(),n=D(),d=M().CopyMarkdown||F,c=m==="/"||m==="";return E(L,{children:[u(W,{siteTitle:$(n.theme?.title,i)||"Boltdocs",siteDescription:$(n.theme?.description,i)||"",routes:t}),u(I,{}),E(L.Body,{children:[!c&&u(V,{routes:e,config:n}),E(L.Content,{children:[!c&&E(L.ContentHeader,{children:[u(q,{}),u(d,{mdxRaw:s?._rawContent,route:s,config:n.theme?.copyMarkdown})]}),u(X,{children:o}),!c&&u(L.ContentFooter,{children:u(z,{})})]}),!c&&u(U,{headings:s?.headings,editLink:n.theme?.editLink,communityHelp:n.theme?.communityHelp,filePath:s?.filePath})]})]})}export{Mo as Admonition,Po as Badge,q as Breadcrumbs,yo as Button,To as Card,vo as Cards,ko as Caution,A as CodeBlock,Vo as ComponentPreview,Io as ComponentProps,F as CopyMarkdown,wo as Danger,Le as DefaultLayout,L as DocsLayout,X as ErrorBoundary,Fo as Field,Do as FileTree,W as Head,$o as Image,Eo as Important,So as InfoBox,Oo as Link,No as List,O as Loading,I as Navbar,H as NotFound,bo as Note,U as OnThisPage,z as PageNav,V as Sidebar,Lo as Tab,Ao as Table,Ro as Tabs,Bo as Tip,ho as Video,Ho as Warning,pe as createBoltdocsApp,Co as defineSandbox,go as embedSandbox,xo as openSandbox,D as useConfig,M as useMdxComponents,R as useRoutes,uo as useTheme};
1
+ import{A as mr,B as dr,C as pr,D as Je,E as ur,F as Ye,G as Ze,H as K,I as G,J as We,K as ne,L as J,M as Qe,N as fr,O as C,P as T,Q as gr,a as ir,b as to,c as B,d as oo,e as _,f as P,g as Ke,h as u,i as re,j as lr,k as ro,l as V,m as no,n as so,o as Ve,p as Oe,q as De,r as $e,s as ze,t as ue,u as fe,v as ge,w as be,x as Fe,y as cr,z as E}from"../chunk-ITFGVXPE.mjs";import je,{useEffect as Vt,useState as Wo,useMemo as _o}from"react";import es from"react-dom/client";import{BrowserRouter as ts,Routes as os,Route as le}from"react-router-dom";import{ArrowLeft as br}from"lucide-react";import{jsx as Ne,jsxs as ao}from"react/jsx-runtime";function _e(){return Ne("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:ao("div",{className:"space-y-4",children:[Ne("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),Ne("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),Ne("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),ao(re,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[Ne(br,{size:16})," Go to Home"]})]})})}import{createContext as hr,use as xr,useEffect as io,useState as et}from"react";import{jsx as vr}from"react/jsx-runtime";var lo=hr(void 0);function co({children:e}){let[t,o]=et("system"),[r,n]=et("dark"),[a,s]=et(!1);io(()=>{s(!0);let i=localStorage.getItem("boltdocs-theme"),d=i==="light"||i==="dark"||i==="system"?i:"system";o(d);let c=window.matchMedia("(prefers-color-scheme: dark)");((g,b)=>{n(g==="system"?b?"dark":"light":g)})(d,c.matches);let p=g=>{n(b=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?g.matches?"dark":"light":b)};return c.addEventListener("change",p),()=>c.removeEventListener("change",p)},[]),io(()=>{if(!a)return;let i=window.matchMedia("(prefers-color-scheme: dark)").matches,d=t==="system"?i?"dark":"light":t;n(d);let c=document.documentElement;d==="light"?(c.classList.add("theme-light"),c.dataset.theme="light"):(c.classList.remove("theme-light"),c.dataset.theme="dark")},[t,a]);let l=i=>{o(i),localStorage.setItem("boltdocs-theme",i)};return vr(lo.Provider,{value:{theme:t,resolvedTheme:r,setTheme:l},children:e})}function se(){let e=xr(lo);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}import Go from"virtual:boltdocs-layout";import{startTransition as yr}from"react";import{RouterProvider as Cr}from"react-aria-components";import{useNavigate as Rr,useHref as Pr}from"react-router-dom";import{jsx as Nr}from"react/jsx-runtime";function mo({children:e}){let t=Rr();return Nr(Cr,{navigate:(o,r)=>{yr(()=>{t(o,r)})},useHref:Pr,children:e})}import{useLayoutEffect as Tr}from"react";import{useLocation as Lr}from"react-router-dom";function po(){let{pathname:e,hash:t}=Lr();return Tr(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,s="auto")=>{o===window?window.scrollTo({top:a,behavior:s}):o.scrollTo({top:a,behavior:s})};if(t){let a=t.replace("#",""),s=document.getElementById(a);if(s){let i=o===window?0:o.getBoundingClientRect().top,m=s.getBoundingClientRect().top-i-80+r();n(m,"smooth");return}}n(0)},[e,t]),null}import{Outlet as wr}from"react-router-dom";import kr from"virtual:boltdocs-layout";import{jsx as uo}from"react/jsx-runtime";function fo(){return uo(kr,{children:uo(wr,{})})}import{createContext as Sr,use as Mr}from"react";import{jsx as Ir}from"react/jsx-runtime";var go=Sr({});function Te(){return Mr(go)}function bo({components:e,children:t}){return Ir(go.Provider,{value:e,children:t})}import{jsx as Br}from"react/jsx-runtime";function ho({Component:e}){let t=Te();return Br(e,{components:t})}import{Link as Zn}from"lucide-react";var At={};ir(At,{Admonition:()=>z,Badge:()=>lt,Button:()=>tt,Card:()=>mt,Cards:()=>ct,Caution:()=>ht,CodeBlock:()=>U,ComponentPreview:()=>Et,ComponentProps:()=>It,CopyMarkdown:()=>Ie,Danger:()=>ft,Field:()=>kt,FileTree:()=>Lt,Image:()=>Mt,Important:()=>bt,InfoBox:()=>gt,Link:()=>St,List:()=>vt,Note:()=>dt,Tab:()=>st,Table:()=>wt,Tabs:()=>at,Tip:()=>pt,Video:()=>it,Warning:()=>ut});import{jsx as Er}from"react/jsx-runtime";var tt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...s})=>Er(V,{className:u("group",ro({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...s});import*as Ge from"react-aria-components";import{Copy as Or,Check as Dr,File as $r}from"lucide-react";import{getParameters as xo}from"codesandbox/lib/api/define.js";function vo(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",s={};for(let[l,i]of Object.entries(t)){let d=typeof i.content=="object"?JSON.stringify(i.content,null,2):i.content;s[l]={content:d,isBinary:i.isBinary??!1}}if(!s["package.json"]){let i=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};s["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||i,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return s}function Ar(e){let t=vo(e),o=xo({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function yo(e){if(typeof window>"u")return Ar(e);let t=vo(e),o=xo({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let a=(l,i)=>{let d=document.createElement("input");d.type="hidden",d.name=l,d.value=i,n.appendChild(d)},s=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",s.toString()),a("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}var Co=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};import{useCallback as Ro,useEffect as Hr,useRef as Vr,useState as ot}from"react";function Po(e){let{title:t,sandbox:o}=e,[r,n]=ot(!1),[a,s]=ot(!1),[l,i]=ot(!1),d=Vr(null),c=B(),m=Ro(async()=>{let g=d.current?.textContent??"";Co(g),n(!0),setTimeout(()=>n(!1),2e3)},[]),p=Ro(()=>{let g=d.current?.textContent??"",b=c?.integrations?.sandbox?.config||{},f=typeof o=="object"?o:b,h=f.entry||"src/App.tsx";yo({title:t??"Code Snippet",...f,files:{...f.files,[h]:{content:g}}})},[t,c,o]);return Hr(()=>{let g=d.current?.textContent?.length??0;i(g>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:s,isExpandable:l,preRef:d,handleCopy:m,handleSandbox:p,shouldTruncate:l&&!a}}import{jsx as M,jsxs as rt}from"react/jsx-runtime";var zr={ts:Ve,tsx:ue,js:Oe,jsx:ue,json:De,css:$e,html:ze,md:fe,mdx:fe,bash:ge,sh:ge,yaml:be,yml:be};function U(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,"data-highlighted-html":s,title:l,"data-lang":i,plain:d=!1,...c}=e,m=a||s,b=!!B()?.integrations?.sandbox?.enable&&!r,f=e.lang||i||"",{copied:h,isExpanded:R,setIsExpanded:x,isExpandable:O,preRef:H,handleCopy:I,handleSandbox:Pe,shouldTruncate:D}=Po(e),$=zr[f];return rt("div",{className:u("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!d,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":D},e.className),children:[l&&rt("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[$?M($,{size:14}):M($r,{size:14,className:"opacity-60"}),M("span",{children:l})]}),rt("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:[b&&M(Fe,{content:"Open in CodeSandbox",children:M(Ge.Button,{onPress:Pe,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:M(so,{size:20})})}),!n&&M(Fe,{content:h?"Copied!":"Copy code",children:M(Ge.Button,{onPress:I,className:u("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",h?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:h?M(Dr,{size:20}):M(Or,{size:20})})})]}),m?M("div",{ref:H,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:m}}):M("pre",{ref:H,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...c,children:t}),O&&M("div",{className:u(D?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:M(Ge.Button,{onPress:()=>x(!R),className:"rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md",children:R?"Show less":"Expand code"})})]})}import{Children as Gr,isValidElement as Ur,useMemo as qr}from"react";import*as Z from"react-aria-components";import{useState as No,useRef as Fr,useEffect as Wr,useCallback as _r}from"react";function To({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=No(o===-1?0:o),a=Fr([]),[s,l]=No({opacity:0,transform:"translateX(0)",width:0});Wr(()=>{let d=a.current[r];d&&l({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let i=_r(d=>{let c=0;if(d.key==="ArrowRight"?c=1:d.key==="ArrowLeft"&&(c=-1),c!==0){let m=(r+c+t.length)%t.length;for(;t[m].props.disabled&&m!==r;)m=(m+c+t.length)%t.length;m!==r&&!t[m].props.disabled&&(n(m),a.current[m]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:s,handleKeyDown:i}}import{cva as Lo}from"class-variance-authority";import{jsx as Y,jsxs as nt}from"react/jsx-runtime";var jr=Lo("relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar",{variants:{size:{default:"px-0",compact:"px-2"}},defaultVariants:{size:"default"}}),Xr=Lo("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function st({children:e}){let t=typeof e=="string"?Y(U,{className:"language-bash",children:Y("code",{children:e.trim()})}):e;return Y("div",{className:"py-4",children:t})}function at({defaultIndex:e=0,children:t}){let o=qr(()=>Gr.toArray(t).filter(l=>Ur(l)&&l.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:s}=To({initialIndex:e,tabs:o});return Y("div",{className:"my-8 w-full group/tabs",children:nt(Z.Tabs,{selectedKey:r.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[nt(Z.TabList,{"aria-label":"Content Tabs",className:u(jr()),children:[o.map((l,i)=>{let{label:d,icon:c,disabled:m}=l.props,p=i.toString();return nt(Z.Tab,{id:p,isDisabled:m,ref:g=>{a.current[i]=g},className:({isSelected:g,isDisabled:b})=>u(Xr({isActive:g,isDisabled:b})),children:[!!c&&Y("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:c}),Y("span",{children:d})]},p)}),Y("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:s,"aria-hidden":"true"})]}),o.map((l,i)=>Y(Z.TabPanel,{id:i.toString(),children:o[i]},i))]})})}import{useRef as Kr,useState as Jr,useEffect as Yr}from"react";import{jsx as wo,jsxs as Zr}from"react/jsx-runtime";function it({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...s}){let l=Kr(null),[i,d]=Jr(!1);return Yr(()=>{let c=l.current;if(!c)return;let m=new IntersectionObserver(([p])=>{p.isIntersecting&&(d(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(c),()=>m.disconnect()},[]),wo("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:i?Zr("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...s,children:[r,"Your browser does not support the video tag."]}):wo("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}import{cva as Qr}from"class-variance-authority";import{jsx as tn}from"react/jsx-runtime";var en=Qr("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function lt({variant:e="default",children:t,className:o="",...r}){return tn("span",{className:u(en({variant:e}),o),...r,children:t})}import{useCallback as on,useRef as ko}from"react";import*as Mo from"react-aria-components";import{cva as rn}from"class-variance-authority";import{Fragment as sn,jsx as ae,jsxs as So}from"react/jsx-runtime";var nn=rn("grid gap-4 my-6",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{cols:3}});function ct({cols:e=3,children:t,className:o="",...r}){return ae("div",{className:u(nn({cols:e}),o),...r,children:t})}function mt({title:e,icon:t,href:o,children:r,className:n="",...a}){let s=ko(null),l=ko(null),i=on(m=>{let p=s.current||l.current;if(!p)return;let{left:g,top:b}=p.getBoundingClientRect();p.style.setProperty("--x",`${m.clientX-g}px`),p.style.setProperty("--y",`${m.clientY-b}px`)},[]),d=So(sn,{children:[ae("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&ae("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),So("div",{className:"space-y-1.5",children:[e&&ae("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&ae("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),c=u("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?ae(Mo.Link,{ref:l,href:o,className:u(c,"no-underline cursor-pointer"),onMouseMove:i,...a,children:d}):ae("div",{ref:s,role:"presentation",className:c,onMouseMove:i,...a,children:d})}import{Info as an,Lightbulb as ln,AlertTriangle as cn,ShieldAlert as mn,Bookmark as dn,Zap as pn,Flame as un}from"lucide-react";import{cva as fn}from"class-variance-authority";import{jsx as L,jsxs as Bo}from"react/jsx-runtime";var gn={note:L(dn,{size:18}),tip:L(ln,{size:18}),info:L(an,{size:18}),warning:L(cn,{size:18}),danger:L(mn,{size:18}),important:L(un,{size:18}),caution:L(pn,{size:18})},bn={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Io=fn("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function z({type:e="note",title:t,children:o,className:r="",...n}){return Bo("div",{className:u(Io({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[Bo("div",{className:"flex items-center flex-row gap-2 mb-2",children:[L("span",{className:u("shrink-0",Io({type:e})),children:gn[e]}),L("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||bn[e]})]}),L("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var dt=e=>L(z,{type:"note",...e}),pt=e=>L(z,{type:"tip",...e}),ut=e=>L(z,{type:"warning",...e}),ft=e=>L(z,{type:"danger",...e}),gt=e=>L(z,{type:"info",...e}),bt=e=>L(z,{type:"important",...e}),ht=e=>L(z,{type:"caution",...e});import{Children as hn,isValidElement as xn}from"react";import{Check as vn,ChevronRight as yn,Circle as Cn}from"lucide-react";import{cva as xt}from"class-variance-authority";import{jsx as Q,jsxs as wn}from"react/jsx-runtime";var Rn=xt("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),Pn=xt("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),Nn=xt("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function Tn({icon:e,children:t,variant:o,dense:r}){return wn("li",{className:u(Pn({variant:o,dense:r})),children:[e&&Q("span",{className:u(Nn({variant:o==="bubble"?"bubble":"default"})),children:e}),Q("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Ln={checked:e=>Q(vn,{size:14,className:u("text-emerald-500 shrink-0",e)}),arrow:e=>Q(yn,{size:14,className:u("text-primary-400 shrink-0",e)}),bubble:e=>Q(Cn,{size:6,fill:"currentColor",className:u("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function vt({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let s=t!==void 0&&Number(t)>1,l=Ln[e],i=Rn({variant:e,cols:t,dense:o,isGrid:s,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?Q(d,{className:i,...a,children:r}):Q("ul",{className:i,...a,children:hn.map(r,c=>{if(!xn(c))return c;let m=c,p=m.type==="li"?m.props.children:m.props.children||c;return Q(Tn,{icon:l(),variant:e,dense:o,children:p})})})}import{Children as yt,isValidElement as Tt,useMemo as kn}from"react";import*as F from"react-aria-components";import{Folder as Sn,FileText as Mn,File as In,FileCode as Bn,FileImage as En,ChevronRight as An}from"lucide-react";import{jsx as w,jsxs as Pt}from"react/jsx-runtime";var he=16,Le=2,Hn={ts:Ve,tsx:ue,js:Oe,jsx:ue,json:De,css:$e,html:ze,md:fe,mdx:fe,bash:ge,sh:ge,yaml:be,yml:be},Ct={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function Nt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Nt).join(""):Tt(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Nt(e.props.children):""}function Vn(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return w(Sn,{size:he,strokeWidth:Le,className:u(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=Hn[n];if(a)return w(a,{size:he});let s=u(r,"text-text-dim group-hover:text-text-main");return Ct.CODE.test(o)?w(Bn,{size:he,strokeWidth:Le,className:s}):Ct.TEXT.test(o)?w(Mn,{size:he,strokeWidth:Le,className:s}):Ct.IMAGE.test(o)?w(En,{size:he,strokeWidth:Le,className:s}):w(In,{size:he,strokeWidth:Le,className:s})}function Rt(e,t){if(!Tt(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function On(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ue(e,t="root"){if(!Tt(e))return[];let o=[];if(Rt(e,"ul"))return yt.forEach(e.props.children,(r,n)=>{o.push(...Ue(r,`${t}-${n}`))}),o;if(Rt(e,"li")){let r=yt.toArray(e.props.children),n=r.findIndex(b=>Rt(b,"ul")),a=n!==-1,s=a?r.slice(0,n):r,l=a?r.slice(n):[],i=Nt(s),{name:d,comment:c}=On(i),m=d.endsWith("/"),p=m?d.slice(0,-1):d,g=a||m;return o.push({id:`${t}-${p}`,name:p,comment:c,isFolder:g,children:a?Ue(l[0],`${t}-${p}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&yt.forEach(e.props.children,(r,n)=>{o.push(...Ue(r,`${t}-${n}`))}),o}function Eo({item:e}){return Pt(F.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[w(F.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>Pt("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[w("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?w(F.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:w(An,{size:14,strokeWidth:3,className:u("transition-transform duration-200",t&&"rotate-90")})}):w("div",{className:"w-[18px]"}),Vn(e.name,e.isFolder),w("span",{className:u("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&Pt("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&w(F.Collection,{items:e.children,children:t=>w(Eo,{item:t})})]})}function Lt({children:e}){let t=kn(()=>Ue(e),[e]);return w("div",{className:"my-8",children:w(F.Tree,{items:t,"aria-label":"File Tree",className:u("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>w(Eo,{item:o})})})}import*as we from"react-aria-components";import{useState as Ao,useMemo as Ho}from"react";function Vo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=Ao(null),[s,l]=Ao(1),i=Ho(()=>{if(!e)return[];let p=[...e];return t&&n!==null&&p.sort((g,b)=>{let f=g[n.key],h=b[n.key],R=typeof f=="string"?f:"",x=typeof h=="string"?h:"";return R<x?n.direction==="asc"?-1:1:R>x?n.direction==="asc"?1:-1:0}),p},[e,n,t]),d=Math.ceil(i.length/r),c=Ho(()=>{if(!o)return i;let p=(s-1)*r;return i.slice(p,p+r)},[i,o,s,r]);return{sortConfig:n,currentPage:s,setCurrentPage:l,totalPages:d,paginatedData:c,requestSort:p=>{if(!t)return;let g="asc";n&&n.key===p&&n.direction==="asc"&&(g="desc"),a({key:p,direction:g})}}}import{ChevronUp as Dn,ChevronDown as Oo,ChevronLeft as $n,ChevronRight as zn,ChevronsLeft as Fn,ChevronsRight as Wn}from"lucide-react";import{Fragment as _n,jsx as N,jsxs as xe}from"react/jsx-runtime";function wt({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:s=10}){let{sortConfig:l,currentPage:i,setCurrentPage:d,totalPages:c,paginatedData:m,requestSort:p}=Vo({data:t,sortable:n,paginated:a,pageSize:s}),g=f=>n?l?.key!==f?N(Oo,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?N(Dn,{size:14,className:"ml-1 text-primary-400"}):N(Oo,{size:14,className:"ml-1 text-primary-400"}):null,b=o||xe(_n,{children:[e&&N("thead",{children:N("tr",{children:e.map((f,h)=>N("th",{onClick:()=>p(h),className:u("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:xe("div",{className:"flex items-center",children:[f,g(h)]})},h))})}),m&&N("tbody",{children:m.map((f,h)=>N("tr",{className:"transition-colors hover:bg-bg-surface",children:f.map((R,x)=>N("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:R},x))},h))})]});return xe("div",{className:u("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[N("div",{className:"overflow-x-auto",children:N("table",{className:"w-full border-collapse text-sm",children:b})}),a&&c>1&&xe("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[xe("span",{className:"text-xs text-text-muted",children:["Page ",i," of ",c]}),xe("div",{className:"flex items-center gap-1",children:[N(we.Button,{onPress:()=>d(1),isDisabled:i===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:N(Fn,{size:16})}),N(we.Button,{onPress:()=>d(f=>Math.max(f-1,1)),isDisabled:i===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:N($n,{size:16})}),N(we.Button,{onPress:()=>d(f=>Math.min(f+1,c)),isDisabled:i===c,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:N(zn,{size:16})}),N(we.Button,{onPress:()=>d(c),isDisabled:i===c,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:N(Wn,{size:16})})]})]})]})}import{jsx as ve,jsxs as ke}from"react/jsx-runtime";function kt({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:s=""}){return ke("article",{className:u("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",s),id:a,children:[ke("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[ke("div",{className:"flex flex-wrap items-center gap-2.5",children:[ve("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&ve("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),r&&ke("div",{className:"flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[ve("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&ke("div",{className:"flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50",children:[ve("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),ve("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),ve("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as Gn}from"react/jsx-runtime";function St({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=u("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return Gn(re,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}import{jsx as Un}from"react/jsx-runtime";function Mt({src:e,alt:t,theme:o,...r}){let{theme:n}=se();return o&&o!==n?null:Un("img",{src:e,alt:t||"",...r})}import{jsx as k,jsxs as Se}from"react/jsx-runtime";function It({title:e,props:t,className:o=""}){return Se("div",{className:u("my-6",o),children:[e&&k("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),k("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:Se("table",{className:"w-full border-collapse text-sm",children:[k("thead",{children:Se("tr",{children:[k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Property"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Type"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Default"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Description"})]})}),k("tbody",{children:t.map((r,n)=>Se("tr",{className:"transition-colors hover:bg-bg-surface",children:[Se("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[k("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&k("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):k("span",{className:"text-text-dim",children:"\u2014"})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}import{useMemo as Do}from"react";function $o(e){let{code:t,children:o,preview:r}=e,n=Do(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=Do(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}import{jsx as Bt,jsxs as qn}from"react/jsx-runtime";function Et(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:s,previewElement:l}=$o(e);return qn("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[Bt("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!o&&Bt("div",{className:"border-t border-border-subtle",children:Bt(U,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,plain:!0,children:s})})]})}import{useState as jn}from"react";import{Copy as zo,Check as Xn,ExternalLink as Kn,ChevronDown as Jn}from"lucide-react";import{jsx as W,jsxs as Me}from"react/jsx-runtime";var Yn=e=>{let[t,o]=jn(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),s=URL.createObjectURL(a);window.open(s,"_blank")}}};function Ie({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:s}=Yn(r),l=o!==!1,i=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:W("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:Me(Qe,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[W(V,{variant:"ghost",onPress:a,icon:n?W(Xn,{size:16}):W(zo,{size:16}),iconPosition:"left",className:u("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":i}),Me(C.Trigger,{placement:"bottom end",children:[W(V,{variant:"ghost",isIconOnly:!0,icon:W(Jn,{size:14}),className:u("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),Me(C.Root,{className:"w-52",children:[Me(C.Item,{onAction:a,children:[W(zo,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),W("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),Me(C.Item,{onAction:s,children:[W(Kn,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),W("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}import{jsx as S,jsxs as ie}from"react/jsx-runtime";function Ht(){return S("div",{className:u("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:ie("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[ie("div",{className:"flex gap-2",children:[S(T,{className:"h-3 w-16"}),S(T,{className:"h-3 w-24"})]}),S(T,{className:"h-10 w-[60%] sm:h-12"}),ie("div",{className:"space-y-3",children:[S(T,{className:"h-4 w-full"}),S(T,{className:"h-4 w-[95%]"}),S(T,{className:"h-4 w-[40%]"})]}),ie("div",{className:"space-y-6 pt-4",children:[S(T,{className:"h-7 w-32"}),ie("div",{className:"space-y-3",children:[S(T,{className:"h-4 w-full"}),S(T,{className:"h-4 w-[98%]"}),S(T,{className:"h-4 w-[92%]"}),S(T,{className:"h-4 w-[60%]"})]})]}),S(T,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),ie("div",{className:"space-y-6 pt-4",children:[S(T,{className:"h-7 w-48"}),ie("div",{className:"space-y-3",children:[S(T,{className:"h-4 w-full"}),S(T,{className:"h-4 w-[85%]"})]})]})]})})}import{jsx as q,jsxs as Qn}from"react/jsx-runtime";var ye=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return Qn(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&q("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:q(Zn,{size:16})})]})},Fo={...At,Loading:Ht,h1:e=>q(ye,{level:1,...e}),h2:e=>q(ye,{level:2,...e}),h3:e=>q(ye,{level:3,...e}),h4:e=>q(ye,{level:4,...e}),h5:e=>q(ye,{level:5,...e}),h6:e=>q(ye,{level:6,...e}),pre:e=>q(U,{...e,children:e.children})};import rs from"virtual:boltdocs-mdx-components";import{useLocation as ns}from"react-router-dom";import{Fragment as cs,jsx as y,jsxs as qe}from"react/jsx-runtime";function ss(){let{currentLocale:e,config:t}=P();return Vt(()=>{if(!t.i18n)return;let o=t.i18n.localeConfigs?.[e];document.documentElement.lang=o?.htmlLang||e||"en",document.documentElement.dir=o?.direction||"ltr"},[e,t.i18n]),null}function as(){let e=ns(),{config:t}=P(),o=_(s=>s.setLocale),r=_(s=>s.setVersion),n=_(s=>s.currentLocale),a=_(s=>s.currentVersion);return Vt(()=>{let s=e.pathname.split("/").filter(Boolean),l=0,i=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(s[l]==="docs"&&l++,t.versions&&s.length>l){let c=t.versions.versions.find(m=>m.path===s[l]);c&&(i=c.path,l++)}t.i18n&&s.length>l&&t.i18n.locales[s[l]]?d=s[l]:t.i18n&&s.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),i!==a&&r(i)},[e.pathname,t,o,r,n,a]),null}function is({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:s,externalLayout:l,components:i={}}){let[d,c]=Wo(e),[m,p]=Wo(t),g=s||{},b=l||Go,f=_o(()=>d.filter(x=>!(a&&(x.path==="/"||x.path===""))&&!g[x.path===""?"/":x.path]).map(x=>{let O=Object.keys(r).find(I=>I===`/${o}/${x.filePath}`||I.endsWith(`/${o}/${x.filePath}`)||I.endsWith(`/${o}\\${x.filePath.replace(/\\/g,"/")}`)),H=O?r[O]:null;return{...x,Component:je.lazy(async()=>H?await H():{default:_e})}}),[d,r,o,a,g]);Vt(()=>{n&&(n.on("boltdocs:routes-update",x=>{c(x)}),n.on("boltdocs:config-update",x=>{p(x)}))},[n]);let h=_o(()=>({...Fo,...rs,...i}),[i]),R=h.Loading;return y(co,{children:y(bo,{components:h,children:y(to.Provider,{value:m,children:y(mo,{children:qe(oo,{routes:d,modules:r,children:[y(po,{}),y(as,{}),y(ss,{}),qe(os,{children:[y(le,{element:y(fo,{}),children:f.map(x=>y(le,{path:x.path===""?"/":x.path,element:y(je.Suspense,{fallback:y(R,{}),children:y(ho,{Component:x.Component})})},x.path))},"docs-layout"),a&&qe(cs,{children:[y(le,{path:"/",element:y(b,{children:y(a,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(x=>y(le,{path:`/${x}`,element:y(b,{children:y(a,{})})},`home-${x}`))]}),Object.entries(g).map(([x,O])=>{let H=x==="/"?"":x;return qe(je.Fragment,{children:[y(le,{path:x,element:y(b,{children:y(O,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(I=>y(le,{path:`/${I}${H}`,element:y(b,{children:y(O,{})})},`${x}-${I}`))]},x)}),y(le,{path:"*",element:y(Go,{children:y(_e,{})})})]})]})})})})})}function ls(e){let{target:t,routes:o,docsDirName:r,config:n,modules:a,hot:s,homePage:l,externalPages:i,externalLayout:d,components:c}=e,m=document.querySelector(t);if(!m)throw new Error(`[boltdocs] Mount target "${t}" not found in document.`);let p=y(je.StrictMode,{children:y(ts,{children:y(is,{initialRoutes:o,initialConfig:n,docsDirName:r,modules:a,hot:s,homePage:l,externalPages:i,externalLayout:d,components:c})})});m.innerHTML="",es.createRoot(m).render(p)}import{useLocation as ms}from"react-router-dom";function ee(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}function Ot(){let e=B(),{theme:t}=se(),o=ms(),{currentLocale:r}=P(),n=e.theme||{},a=ee(n.title,r)||"Boltdocs",s=n.navbar||[],l=n.socialLinks||[],i=n.githubRepo,d=s.map(b=>{let f=b.href||b.to||b.link||"",h=R=>{let x=o.pathname;if(x===R)return!0;if(!R||R==="/")return x==="/";let O=Pe=>{let D=Pe.split("/").filter(Boolean),$=0;return e.i18n?.locales&&D[$]&&e.i18n.locales[D[$]]&&$++,e.versions?.versions&&D[$]&&e.versions.versions.some(ar=>ar.path===D[$])&&$++,D.slice($)},H=O(R),I=O(x);return H.length===0?I.length===0:I.length<H.length?!1:H.every((Pe,D)=>I[D]===Pe)};return{label:ee(b.label||b.text,r),href:f,active:h(f),to:f.startsWith("http")||f.startsWith("//")?"external":void 0}}),c=n.logo,m=c?typeof c=="string"?c:t==="dark"?c.dark:c.light:null,p={alt:(c&&typeof c=="object"?c.alt:void 0)||a,width:c&&typeof c=="object"?c.width:void 0,height:c&&typeof c=="object"?c.height:void 0},g=i?`https://github.com/${i}`:null;return{links:d,title:a,logo:m,logoProps:p,github:g,social:l,config:e,theme:t}}import{useLocation as ds}from"react-router-dom";function Dt(e){let t=B(),o=ds(),r=m=>m.endsWith("/")&&m.length>1?m.slice(0,-1):m,n=r(o.pathname),a=e.find(m=>r(m.path)===n),s=a?.tab?.toLowerCase(),l=s?e.filter(m=>!m.tab||m.tab.toLowerCase()===s):e,i=[],d=new Map;for(let m of l)m.group?(d.has(m.group)||d.set(m.group,{slug:m.group,title:m.groupTitle||m.group,routes:[],icon:m.groupIcon}),d.get(m.group).routes.push(m)):i.push(m);return{groups:Array.from(d.values()),ungrouped:i,activeRoute:a,activePath:n,config:t}}import{useState as ps}from"react";function $t(e=[]){let[t,o]=ps(null);return{headings:e,activeId:t,setActiveId:o}}import{useLocation as us}from"react-router-dom";import{useEffect as fs,useState as gs,useRef as bs}from"react";function zt(e=[],t=[]){let o=us(),r=bs([]),[n,a]=gs({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),l=t.find(c=>c.path===o.pathname)?.tab?.toLowerCase(),i=e.findIndex(c=>c.id.toLowerCase()===l),d=i===-1?0:i;return fs(()=>{let c=r.current[d];c&&a({opacity:1,width:c.offsetWidth,transform:`translateX(${c.offsetLeft}px)`})},[d,e.length,o.pathname]),{tabs:e,activeIndex:d,indicatorStyle:n,tabRefs:r,activeTabId:l}}import{useNavigate as hs}from"react-router-dom";function te(e,t,o){let r=e;return t&&(r===t||r.startsWith(t+"/"))&&(r=r===t?"index.md":r.slice(t.length+1)),o&&(r===o||r.startsWith(o+"/"))&&(r=r===o?"index.md":r.slice(o.length+1)),r}function Ft(){let e=hs(),t=P(),{allRoutes:o,currentRoute:r,currentVersion:n,currentLocale:a,config:s}=t,l=s.versions,i=_(m=>m.setVersion),d=m=>{if(!l||m===n)return;i(m);let p=`/docs/${m}`;if(r){let g=te(r.filePath,r.version,r.locale),b=o.find(f=>te(f.filePath,f.version,f.locale)===g&&(f.version||l.defaultVersion)===m&&(a?f.locale===a:!f.locale));if(b)p=b.path;else{let f=o.find(h=>te(h.filePath,h.version,h.locale)==="index.md"&&(h.version||l.defaultVersion)===m&&(a?h.locale===a:!h.locale));p=f?f.path:`/docs/${m}${a?`/${a}`:""}`}}e(p)},c=t.availableVersions.map(m=>({...m,label:m.label,value:m.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:c,handleVersionChange:d}}import{useNavigate as xs}from"react-router-dom";function Wt(){let e=xs(),t=P(),{allRoutes:o,currentRoute:r,currentLocale:n,config:a}=t,s=a.i18n,l=_(p=>p.setLocale),i=p=>{if(!s||p===n)return;l(p);let g="/";if(r){let b=te(r.filePath,r.version,r.locale),f=o.find(h=>te(h.filePath,h.version,h.locale)===b&&(h.locale||s.defaultLocale)===p&&h.version===r.version);if(f)g=f.path;else{let h=o.find(R=>te(R.filePath,R.version,R.locale)==="index.md"&&(R.locale||s.defaultLocale)===p&&R.version===r.version);g=h?h.path:p===s.defaultLocale?r.version?`/${r.version}`:"/":r.version?`/${r.version}/${p}`:`/${p}`}}else{let b=o.find(f=>(f.filePath==="index.mdx"||f.filePath==="index.md")&&(f.locale||s.defaultLocale)===p&&!f.version);b?g=b.path:g=p===s.defaultLocale?"/":`/${p}`}e(g)},c=a.i18n?.localeConfigs?.[n]?.label||a.i18n?.locales[n]||n,m=a.i18n?Object.entries(a.i18n.locales).map(([p,g])=>{let b=a.i18n?.localeConfigs?.[p];return{key:p,label:b?.label||g,value:p,isCurrent:p===n}}):[];return{currentLocale:n,currentLocaleLabel:c,availableLocales:m,handleLocaleChange:i}}import{useLocation as vs}from"react-router-dom";function _t(){let{routes:e,currentRoute:t}=P(),o=vs();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),n=r?e.filter(i=>i.tab?.toLowerCase()===r):e.filter(i=>!i.tab),a=n.findIndex(i=>i.path===o.pathname),s=a>0?n[a-1]:null,l=a!==-1&&a<n.length-1?n[a+1]:null;return{prevPage:s,nextPage:l,currentRoute:t}}function Gt(){let{currentRoute:e}=P(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}import{useLocation as ys}from"react-router-dom";var Ut=()=>ys();import{jsx as Ce}from"react/jsx-runtime";function Cs({children:e,className:t,style:o}){return Ce("div",{className:u("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:o,children:e})}function Rs({children:e,className:t,style:o}){return Ce("div",{className:u("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:o,children:e})}function Ps({children:e,className:t,style:o}){return Ce("main",{className:u("boltdocs-content flex-1 min-w-0 overflow-y-auto","contain-layout",t),style:o,children:e})}function Ns({children:e,className:t,style:o}){let{pathname:r}=Ut();return Ce("div",{className:u("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8",{"max-w-content-max":r.includes("/docs/")},t),style:o,children:e})}function Ts({children:e,className:t,style:o}){return Ce("div",{className:u("flex items-center justify-between mb-10",t),style:o,children:e})}function Ls({children:e,className:t,style:o}){return Ce("div",{className:u("mt-20",t),style:o,children:e})}var ce=Object.assign(Cs,{Body:Rs,Content:Ps,ContentMdx:Ns,ContentHeader:Ts,ContentFooter:Ls});import{Suspense as Vs,lazy as Os}from"react";import{useEffect as ws,useState as ks}from"react";import{Sun as Uo,Moon as qo,Monitor as jo}from"lucide-react";import{Button as Ss}from"react-aria-components";import{jsx as j,jsxs as Be}from"react/jsx-runtime";function Xo(){let{theme:e,setTheme:t}=se(),[o,r]=ks(!1);if(ws(()=>{r(!0)},[]),!o)return j("div",{className:"h-9 w-9"});let n=e==="system"?jo:e==="dark"?qo:Uo;return Be(C.Trigger,{placement:"bottom right",children:[j(Ss,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:j(n,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),Be(C.Root,{selectionMode:"single",selectedKeys:[e],onSelectionChange:a=>{let s=Array.from(a)[0];t(s)},children:[Be(C.Item,{id:"light",children:[j(Uo,{size:16}),j("span",{children:"Light"})]}),Be(C.Item,{id:"dark",children:[j(qo,{size:16}),j("span",{children:"Dark"})]}),Be(C.Item,{id:"system",children:[j(jo,{size:16}),j("span",{children:"System"})]})]})]})}import{useEffect as Bs,useState as Es}from"react";var Ms="https://api.github.com";async function Ko(e,t,o=Ms){let r=new Headers;t&&r.append("authorization",t);let a=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return a.stargazers_count!==void 0?Is(a.stargazers_count):"0"}var Is=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as Jo,jsxs as As}from"react/jsx-runtime";function Yo({repo:e}){let[t,o]=Es(null);return Bs(()=>{e&&Ko(e).then(r=>o(r)).catch(()=>o("0"))},[e]),As("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[Jo(no,{className:"h-4 w-4"}),t&&Jo("span",{className:"tabular-nums",children:t})]})}import*as Hs from"lucide-react";import{jsx as Re,jsxs as Zo}from"react/jsx-runtime";function Qo({tabs:e,routes:t}){let{currentLocale:o}=P(),{indicatorStyle:r,tabRefs:n,activeIndex:a}=zt(e,t),s=l=>{if(!l)return null;if(l.trim().startsWith("<svg"))return Re("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:l}});let i=Hs[l];return i?Re(i,{size:16}):Re("img",{src:l,alt:"",className:"h-4 w-4 object-contain"})};return Re("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:Zo(We.List,{className:"border-none py-0",children:[e.map((l,i)=>{let d=i===a,c=t.find(p=>p.tab&&p.tab.toLowerCase()===l.id.toLowerCase()),m=c?c.path:"#";return Zo(re,{href:m,ref:p=>{n.current[i]=p},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${d?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[s(l.icon),Re("span",{children:ee(l.text,o)})]},l.id)}),Re(We.Indicator,{style:r})]})})}import{useLocation as Ds}from"react-router-dom";import{ChevronDown as er,Languages as $s}from"lucide-react";import{Fragment as Gs,jsx as v,jsxs as oe}from"react/jsx-runtime";var zs=Os(()=>import("../search-dialog-YBM4GYDR.mjs").then(e=>({default:e.SearchDialog})));function qt(){let{links:e,title:t,logo:o,logoProps:r,github:n,social:a,config:s}=Ot(),{routes:l,allRoutes:i,currentVersion:d,currentLocale:c}=P(),{pathname:m}=Ds(),p=s.theme||{},g=m.startsWith("/docs"),b=p?.tabs&&p.tabs.length>0;return oe(E.Root,{className:b?"border-b-0":"",children:[oe(E.Content,{children:[oe(E.Left,{children:[o&&v(E.Logo,{src:o,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),v(E.Title,{children:t}),s.versions&&d&&v(Ws,{})]}),v(E.Center,{children:v(Vs,{fallback:v("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:v(zs,{routes:l||[]})})}),oe(E.Right,{children:[v(E.Links,{children:e.map(f=>v(Gs,{children:v(Fs,{link:f},f.href)}))}),s.i18n&&c&&v(_s,{}),v(E.Split,{}),v(Xo,{}),n&&v(Yo,{repo:p?.githubRepo??""}),a.length>0&&v(E.Split,{}),v("div",{className:"flex items-center gap-1",children:a.map(({icon:f,link:h})=>v(E.Socials,{icon:f,link:h,className:"p-1.5"},h))})]})]}),g&&b&&p?.tabs&&v("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:v(Qo,{tabs:p.tabs,routes:i||l||[]})})]})}function Fs({link:e}){let t=Ke(e.href||"");return v(E.Link,{...e,href:t})}function Ws(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=Ft();return t.length===0?null:oe(C.Trigger,{children:[v(V,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:v(er,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:v("span",{className:"font-semibold text-[0.8125rem]",children:e})}),v(C.Root,{children:v(C.Section,{items:t,children:r=>v(C.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})})]})}function _s(){let{currentLocale:e,availableLocales:t,handleLocaleChange:o}=Wt();return t.length===0?null:oe(C.Trigger,{children:[v(V,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:v(er,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:oe("div",{className:"flex items-center gap-1.5",children:[v($s,{className:"w-3.5 h-3.5 text-primary-500"}),v("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),v(C.Root,{children:v(C.Section,{items:t,children:r=>v(C.Item,{onPress:()=>o(r.value),children:oe("div",{className:"flex items-center justify-between w-full gap-4",children:[v("span",{children:r.label}),v("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}import{useState as qs,useEffect as js,useMemo as Xs}from"react";import{Zap as Us}from"lucide-react";import{jsx as jt,jsxs as tr}from"react/jsx-runtime";function or(){return jt("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:tr("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[jt(Us,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),tr("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by"," ",jt("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}import*as Ks from"lucide-react";import{jsx as me,jsxs as Ys}from"react/jsx-runtime";function rr(e){return e&&Ks[e]||void 0}function Js({group:e,activePath:t,getIcon:o}){let r=Xs(()=>e.routes.some(s=>s.path===t),[e.routes,t]),[n,a]=qs(!0);return js(()=>{r&&a(!0)},[r]),me(ne.Group,{title:e.title,isOpen:n,onToggle:()=>a(!n),children:e.routes.map(s=>{let l=t===(s.path.endsWith("/")?s.path.slice(0,-1):s.path);return me(ne.Link,{label:s.title,href:s.path,active:l,icon:o(s.icon),badge:s.badge},s.path)})})}function Xt({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:n}=Dt(e),a=t.theme||{};return Ys(ne.Root,{children:[r.length>0&&me(ne.Group,{className:"mb-6",children:r.map(s=>{let l=n===(s.path.endsWith("/")?s.path.slice(0,-1):s.path);return me(ne.Link,{label:s.title,href:s.path,active:l,icon:rr(s.icon),badge:s.badge},s.path)})}),o.map(s=>me(Js,{group:s,activePath:n,getIcon:rr},s.slug)),a?.poweredBy&&me("div",{className:"mt-auto pt-8",children:me(or,{})})]})}import Zs,{useRef as nr,useEffect as Qs,useState as ea,useCallback as ta}from"react";import{Pencil as oa,CircleHelp as ra,TextAlignStart as na}from"lucide-react";import{jsx as A,jsxs as de}from"react/jsx-runtime";function Kt({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:n}=$t(e),a=Zs.useMemo(()=>n.map(s=>({title:s.text,url:`#${s.id}`,depth:s.level})),[n]);return n.length===0?null:A(Ze,{toc:a,children:A(sa,{headings:n,editLink:t,communityHelp:o,filePath:r})})}function sa({headings:e,editLink:t,communityHelp:o,filePath:r}){let n=Je(),[a,s]=ea({opacity:0}),l=nr(null),i=nr(null);Qs(()=>{if(!n||!l.current)return;let c=l.current.querySelector(`a[href="#${n}"]`);c&&s({transform:`translateY(${c.offsetTop}px)`,height:`${c.offsetHeight}px`,opacity:1})},[n]);let d=ta((c,m)=>{c.preventDefault();let p=document.getElementById(m);p&&(p.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${m}`))},[]);return de(K.Root,{children:[de(K.Header,{className:"flex flex-row gap-x-2",children:[A(na,{size:16}),"On this page"]}),A(Ye,{containerRef:i,children:de(K.Content,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:i,children:[A(K.Indicator,{style:a}),A("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:l,children:e.map(c=>A(K.Item,{level:c.level,children:A(K.Link,{href:`#${c.id}`,active:n===c.id,onClick:m=>d(m,c.id),className:"pl-4",children:c.text})},c.id))})]})}),(t||o)&&de("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[A("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),de("ul",{className:"space-y-3",children:[t&&r&&A("li",{children:de("a",{href:t.replace(":path",r),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[A(oa,{size:16}),"Edit this page"]})}),o&&A("li",{children:de("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[A(ra,{size:16}),"Community help"]})})]})]})]})}import{useEffect as aa}from"react";import{useLocation as ia}from"react-router-dom";function Jt({siteTitle:e,siteDescription:t,routes:o}){let r=ia();return aa(()=>{let n=o.find(d=>d.path===r.pathname),a=n?.title,s=n?.description||t||"";document.title=a?`${a} | ${e}`:e;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.name="description",document.head.appendChild(l)),l.content=s,pe("property","og:title",document.title),pe("property","og:description",s),pe("property","og:type","article"),pe("property","og:url",window.location.href),pe("name","twitter:card","summary"),pe("name","twitter:title",document.title),pe("name","twitter:description",s);let i=document.querySelector('link[rel="canonical"]');i||(i=document.createElement("link"),i.rel="canonical",document.head.appendChild(i)),i.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function pe(e,t,o){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=o}import{Home as la}from"lucide-react";import{jsx as Ee,jsxs as sr}from"react/jsx-runtime";function Yt(){let{crumbs:e,activeRoute:t}=Gt(),r=B().theme||{};return e.length===0||!r?.breadcrumbs?null:sr(J.Root,{children:[Ee(J.Item,{children:Ee(J.Link,{href:"/",children:Ee(la,{size:14})})}),e.map((n,a)=>sr(J.Item,{children:[Ee(J.Separator,{}),Ee(J.Link,{href:n.href,className:u({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${a}`))]})}import{jsx as Ae,jsxs as Zt}from"react/jsx-runtime";function Qt(){let{prevPage:e,nextPage:t}=_t();return!e&&!t?null:Zt(G.Root,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?Zt(G.Link,{to:e.path,direction:"prev",children:[Ae(G.Title,{children:"Previous"}),Ae(G.Description,{children:e.title})]}):Ae("div",{}),t&&Zt(G.Link,{to:t.path,direction:"next",children:[Ae(G.Title,{children:"Next"}),Ae(G.Description,{children:t.title})]})]})}import{Component as ca}from"react";import{jsx as eo,jsxs as ma}from"react/jsx-runtime";var He=class extends ca{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error in Boltdocs Layout:",t,o)}render(){return this.state.hasError?this.props.fallback||ma("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[eo("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),eo("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),eo(V,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};import{useLocation as da}from"react-router-dom";import{jsx as X,jsxs as Xe}from"react/jsx-runtime";function pa({children:e}){let{routes:t,allRoutes:o,currentRoute:r,currentLocale:n}=P(),{pathname:a}=da(),s=B(),i=Te().CopyMarkdown||Ie,d=a==="/"||a==="";return Xe(ce,{children:[X(Jt,{siteTitle:ee(s.theme?.title,n)||"Boltdocs",siteDescription:ee(s.theme?.description,n)||"",routes:o}),X(qt,{}),Xe(ce.Body,{children:[!d&&X(Xt,{routes:t,config:s}),Xe(ce.Content,{children:[!d&&Xe(ce.ContentHeader,{children:[X(Yt,{}),X(i,{mdxRaw:r?._rawContent,route:r,config:s.theme?.copyMarkdown})]}),X(He,{children:e}),!d&&X(ce.ContentFooter,{children:X(Qt,{})})]}),!d&&X(Kt,{headings:r?.headings,editLink:s.theme?.editLink,communityHelp:s.theme?.communityHelp,filePath:r?.filePath})]})]})}export{z as Admonition,Ze as AnchorProvider,lt as Badge,Yt as Breadcrumbs,tt as Button,Qe as ButtonGroup,mt as Card,ct as Cards,ht as Caution,U as CodeBlock,Et as ComponentPreview,It as ComponentProps,Ie as CopyMarkdown,ft as Danger,pa as DefaultLayout,ce as DocsLayout,He as ErrorBoundary,kt as Field,Lt as FileTree,Jt as Head,Mt as Image,bt as Important,gt as InfoBox,St as Link,vt as List,Ht as Loading,qt as Navbar,_e as NotFound,dt as Note,Kt as OnThisPage,Qt as PageNav,J as PrimitiveBreadcrumbs,V as PrimitiveButton,re as PrimitiveLink,C as PrimitiveMenu,lr as PrimitiveNavLink,cr as PrimitiveNavbar,mr as PrimitiveNavigationMenu,K as PrimitiveOnThisPage,G as PrimitivePageNav,fr as PrimitivePopover,ne as PrimitiveSidebar,T as PrimitiveSkeleton,We as PrimitiveTabs,Fe as PrimitiveTooltip,Ye as ScrollProvider,dr as SearchDialogPrimitive,Xt as Sidebar,st as Tab,wt as Table,at as Tabs,pt as Tip,it as Video,ut as Warning,u as cn,ls as createBoltdocsApp,Je as useActiveAnchor,ur as useActiveAnchors,Gt as useBreadcrumbs,B as useConfig,Wt as useI18n,pr as useItems,Ke as useLocalizedTo,Ut as useLocation,Te as useMdxComponents,Ot as useNavbar,$t as useOnThisPage,_t as usePageNav,P as useRoutes,gr as useSearch,Dt as useSidebar,zt as useTabs,se as useTheme,Ft as useVersion};
@@ -1 +1 @@
1
- "use strict";var xr=Object.create;var De=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty;var Tt=(e,t)=>{for(var o in t)De(e,o,{get:t[o],enumerable:!0})},kt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of hr(t))!yr.call(e,n)&&n!==o&&De(e,n,{get:()=>t[n],enumerable:!(r=br(t,n))||r.enumerable});return e};var w=(e,t,o)=>(o=e!=null?xr(vr(e)):{},kt(t||!e||!e.__esModule?De(o,"default",{value:e,enumerable:!0}):o,e)),Cr=e=>kt(De({},"__esModule",{value:!0}),e);var gn={};Tt(gn,{render:()=>fn});module.exports=Cr(gn);var ur=w(require("react")),fr=w(require("react-dom/server")),gr=require("react-router-dom/server");var V=w(require("react")),pn=w(require("react-dom/client")),Q=require("react-router-dom");var zt=require("lucide-react");var ct=w(require("react")),Ot=require("react-aria-components"),Vt=require("react-router-dom");var Fe=require("react"),it=(0,Fe.createContext)(null);function ce(){let e=(0,Fe.use)(it);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Bt=require("react-router-dom");var de=require("react"),St=require("react/jsx-runtime"),Lt=(0,de.createContext)({preload:()=>{},routes:[]});function We(){return(0,de.use)(Lt)}function At({routes:e,modules:t,children:o}){let r=(0,de.useRef)(null),n=(0,de.useCallback)(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let i=a.split("#")[0].split("?")[0],l=e.find(s=>s.path===i||i==="/"&&s.path==="");if(l?.filePath){let s=Object.keys(t).find(d=>d.endsWith("/"+l.filePath));s&&t[s]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${a}:`,d)})}},100)},[e,t]);return(0,St.jsx)(Lt.Provider,{value:{preload:n,routes:e},children:o})}var Mt=require("zustand"),$e=require("zustand/middleware"),re=(0,Mt.create)()((0,$e.persist)(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:(0,$e.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Me(){let{routes:e}=We(),t=ce(),o=(0,Bt.useLocation)(),r=re(g=>g.currentLocale),n=re(g=>g.currentVersion),a=re(g=>g.hasHydrated),i=e.find(g=>g.path===o.pathname),l=t.i18n?i?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?i?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,d=e.filter(g=>{let W=t.i18n?(g.locale||t.i18n.defaultLocale)===l:!0,x=t.versions?(g.version||t.versions.defaultVersion)===s:!0;if(!(W&&x))return!1;let q=t.i18n;if(q){let le=!!i?.locale,$=!!g.locale;if(e.some(He=>He!==g&&He.filePath===g.filePath&&He.version===g.version&&(He.locale||q.defaultLocale)===(g.locale||q.defaultLocale))&&le!==$)return!1}return!0}),m=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,b=t.versions?.versions.find(g=>g.path===s)?.label||s,C=t.i18n?Object.entries(t.i18n.locales).map(([g,W])=>{let x=t.i18n?.localeConfigs?.[g];return{key:g,label:x?.label||W,isCurrent:g===l}}):[],P=t.versions?t.versions.versions.map(g=>({key:g.path,label:g.label,isCurrent:g.path===s})):[];return{routes:d,allRoutes:e,currentRoute:i,currentLocale:l,currentLocaleLabel:m,availableLocales:C,currentVersion:s,currentVersionLabel:b,availableVersions:P,config:t}}function lt(e){let t=ce(),{currentLocale:o,currentVersion:r}=Me();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,a=t.versions;if(!n&&!a)return e;let i=e.startsWith("/docs"),l=e.split("/").filter(Boolean),s=0;l[s]==="docs"&&s++,a&&l.length>s&&a.versions.find(b=>b.path===l[s])&&s++,n&&l.length>s&&n.locales[l[s]]&&s++;let d=l.slice(s),p=[];i&&(p.push("docs"),a&&r&&p.push(r)),n&&o&&o!==n.defaultLocale&&p.push(o),p.push(...d);let m=`/${p.join("/")}`;return m.length>1&&m.endsWith("/")?m.slice(0,-1):m||"/"}var It=require("clsx"),Et=require("tailwind-merge");function c(...e){return(0,Et.twMerge)((0,It.clsx)(e))}var dt=require("react/jsx-runtime"),pe=ct.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:a,...i}=e,l=lt(o??""),{preload:s}=We();return(0,dt.jsx)(Ot.Link,{...i,ref:t,href:l,onMouseEnter:m=>{n?.(m),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)},onFocus:m=>{a?.(m),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)}})});pe.displayName="Link";var Rr=ct.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...i}=e,l=(0,Vt.useLocation)(),s=lt(o??""),d=r?l.pathname===s:l.pathname.startsWith(s),p=typeof n=="function"?n({isActive:d}):c(n,d&&"active"),m=typeof a=="function"?a({isActive:d}):a;return(0,dt.jsx)(pe,{...i,ref:t,href:o,className:p,children:m})});Rr.displayName="NavLink";var ne=require("react/jsx-runtime");function pt(){return(0,ne.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,ne.jsxs)("div",{className:"space-y-4",children:[(0,ne.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,ne.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,ne.jsx)("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),(0,ne.jsxs)(pe,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[(0,ne.jsx)(zt.ArrowLeft,{size:16})," Go to Home"]})]})})}var X=require("react"),Wt=require("react/jsx-runtime"),Ht=(0,X.createContext)(void 0);function Dt({children:e}){let[t,o]=(0,X.useState)("system"),[r,n]=(0,X.useState)("dark"),[a,i]=(0,X.useState)(!1);(0,X.useEffect)(()=>{i(!0);let s=localStorage.getItem("boltdocs-theme"),d=s==="light"||s==="dark"||s==="system"?s:"system";o(d);let p=window.matchMedia("(prefers-color-scheme: dark)");((b,C)=>{n(b==="system"?C?"dark":"light":b)})(d,p.matches);let f=b=>{n(C=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?b.matches?"dark":"light":C)};return p.addEventListener("change",f),()=>p.removeEventListener("change",f)},[]),(0,X.useEffect)(()=>{if(!a)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,d=t==="system"?s?"dark":"light":t;n(d);let p=document.documentElement;d==="light"?(p.classList.add("theme-light"),p.dataset.theme="light"):(p.classList.remove("theme-light"),p.dataset.theme="dark")},[t,a]);let l=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return(0,Wt.jsx)(Ht.Provider,{value:{theme:t,resolvedTheme:r,setTheme:l},children:e})}function Ft(){let e=(0,X.use)(Ht);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var wt=w(require("virtual:boltdocs-layout"));var $t=require("react"),jt=require("react-aria-components"),je=require("react-router-dom"),_t=require("react/jsx-runtime");function Gt({children:e}){let t=(0,je.useNavigate)();return(0,_t.jsx)(jt.RouterProvider,{navigate:(o,r)=>{(0,$t.startTransition)(()=>{t(o,r)})},useHref:je.useHref,children:e})}var Ut=require("react"),qt=require("react-router-dom");function Xt(){let{pathname:e,hash:t}=(0,qt.useLocation)();return(0,Ut.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,i="auto")=>{o===window?window.scrollTo({top:a,behavior:i}):o.scrollTo({top:a,behavior:i})};if(t){let a=t.replace("#",""),i=document.getElementById(a);if(i){let s=o===window?0:o.getBoundingClientRect().top,m=i.getBoundingClientRect().top-s-80+r();n(m,"smooth");return}}n(0)},[e,t]),null}var Jt=require("react-router-dom"),Kt=w(require("virtual:boltdocs-layout")),mt=require("react/jsx-runtime");function Yt(){return(0,mt.jsx)(Kt.default,{children:(0,mt.jsx)(Jt.Outlet,{})})}var oo=require("@mdx-js/react");var Ge=require("react"),to=require("react/jsx-runtime"),Zt=(0,Ge.createContext)({});function Qt(){return(0,Ge.use)(Zt)}function eo({components:e,children:t}){return(0,to.jsx)(Zt.Provider,{value:e,children:t})}var ut=require("react/jsx-runtime");function ro({Component:e}){let t=Qt();return(0,ut.jsx)(oo.MDXProvider,{components:t,children:(0,ut.jsx)(e,{})})}var lr=require("lucide-react");var Pt={};Tt(Pt,{Admonition:()=>ae,Badge:()=>ho,Button:()=>so,Card:()=>No,Cards:()=>Ro,Caution:()=>Bo,CodeBlock:()=>me,ComponentPreview:()=>_o,ComponentProps:()=>jo,CopyMarkdown:()=>ar,Danger:()=>Ao,Field:()=>Ho,FileTree:()=>Oo,Image:()=>Wo,Important:()=>Mo,InfoBox:()=>So,Link:()=>Do,List:()=>Io,Note:()=>To,Tab:()=>fo,Table:()=>zo,Tabs:()=>go,Tip:()=>ko,Video:()=>xo,Warning:()=>Lo});var Ue=w(require("react-aria-components"));var no=require("class-variance-authority"),J=require("react/jsx-runtime"),_e=(0,no.cva)("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),Be=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:i,size:l,rounded:s,iconSize:d,disabled:p,...m})=>{let f=r||!n&&!!t,b=f?(0,J.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,J.jsxs)(J.Fragment,{children:[t&&o==="left"&&(0,J.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,J.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,J.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,J.jsx)(Ue.Link,{href:e,className:c(_e({variant:i,size:l,rounded:s,iconSize:f?d:void 0,disabled:p}),a),...m,children:b}):(0,J.jsx)(Ue.Button,{className:c(_e({variant:i,size:l,rounded:s,iconSize:f?d:void 0,disabled:p}),a),...m,children:b})};var ao=require("react/jsx-runtime"),so=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...i})=>(0,ao.jsx)(Be,{className:c("group",_e({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...i});var Ze=w(require("react-aria-components")),ye=require("lucide-react");var ft=require("codesandbox/lib/api/define.js");function io(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",i={};for(let[l,s]of Object.entries(t)){let d=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;i[l]={content:d,isBinary:s.isBinary??!1}}if(!i["package.json"]){let s=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};i["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return i}function Nr(e){let t=io(e),o=(0,ft.getParameters)({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function lo(e){if(typeof window>"u")return Nr(e);let t=io(e),o=(0,ft.getParameters)({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let a=(l,s)=>{let d=document.createElement("input");d.type="hidden",d.name=l,d.value=s,n.appendChild(d)},i=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",i.toString()),a("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}var co=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};var K=require("react");function po(e){let{title:t,sandbox:o}=e,[r,n]=(0,K.useState)(!1),[a,i]=(0,K.useState)(!1),[l,s]=(0,K.useState)(!1),d=(0,K.useRef)(null),p=ce(),m=(0,K.useCallback)(async()=>{let b=d.current?.textContent??"";co(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),f=(0,K.useCallback)(()=>{let b=d.current?.textContent??"",C=p?.integrations?.sandbox?.config||{},P=typeof o=="object"?o:C,g=P.entry||"src/App.tsx";lo({title:t??"Code Snippet",...P,files:{...P.files,[g]:{content:b}}})},[t,p,o]);return(0,K.useEffect)(()=>{let b=d.current?.textContent?.length??0;s(b>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:i,isExpandable:l,preRef:d,handleCopy:m,handleSandbox:f,shouldTruncate:l&&!a}}var v=require("react/jsx-runtime");function ee(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var mo=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...ee(e),children:[(0,v.jsx)("title",{children:"CodeSandbox"}),(0,v.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var qe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"TypeScript"}),(0,v.jsx)("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),Xe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"JavaScript"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),Je=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"JSON"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Ke=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"CSS"}),(0,v.jsx)("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Ye=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"HTML"}),(0,v.jsx)("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var ge=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"React"}),(0,v.jsx)("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),xe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"Markdown"}),(0,v.jsx)("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),be=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...ee(e),children:[(0,v.jsx)("title",{children:"Shell"}),(0,v.jsx)("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),he=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"YAML"}),(0,v.jsx)("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});var ve=w(require("react-aria-components"));var j=require("react/jsx-runtime"),wr=({className:e,children:t,...o})=>(0,j.jsx)(ve.Tooltip,{...o,offset:8,className:r=>c("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ve.OverlayArrow,{children:(0,j.jsxs)("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[(0,j.jsx)("title",{children:"Arrow"}),(0,j.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),gt=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,j.jsxs)(ve.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,j.jsx)(wr,{...n,children:e})]});var A=require("react/jsx-runtime"),Tr={ts:qe,tsx:ge,js:Xe,jsx:ge,json:Je,css:Ke,html:Ye,md:xe,mdx:xe,bash:be,sh:be,yaml:he,yml:he};function me(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,title:i,"data-lang":l,plain:s=!1,...d}=e,f=!!ce()?.integrations?.sandbox?.enable&&!r,b=e.lang||l||"",{copied:C,isExpanded:P,setIsExpanded:g,isExpandable:W,preRef:x,handleCopy:q,handleSandbox:le,shouldTruncate:$}=po(e),at=Tr[b];return(0,A.jsxs)("div",{className:c("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!s,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":$},e.className),children:[i&&(0,A.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[at?(0,A.jsx)(at,{size:14}):(0,A.jsx)(ye.File,{size:14,className:"opacity-60"}),(0,A.jsx)("span",{children:i})]}),(0,A.jsxs)("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:[f&&(0,A.jsx)(gt,{content:"Open in CodeSandbox",children:(0,A.jsx)(Ze.Button,{onPress:le,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,A.jsx)(mo,{size:20})})}),!n&&(0,A.jsx)(gt,{content:C?"Copied!":"Copy code",children:(0,A.jsx)(Ze.Button,{onPress:q,className:c("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",C?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:C?(0,A.jsx)(ye.Check,{size:20}):(0,A.jsx)(ye.Copy,{size:20})})})]}),a?(0,A.jsx)("div",{ref:x,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:a}}):(0,A.jsx)("pre",{ref:x,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...d,children:t}),W&&(0,A.jsx)("div",{className:c($?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:(0,A.jsx)(Ze.Button,{onPress:()=>g(!P),className:"rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md",children:P?"Show less":"Expand code"})})]})}var Ce=require("react"),ue=w(require("react-aria-components"));var se=require("react");function uo({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=(0,se.useState)(o===-1?0:o),a=(0,se.useRef)([]),[i,l]=(0,se.useState)({opacity:0,transform:"translateX(0)",width:0});(0,se.useEffect)(()=>{let d=a.current[r];d&&l({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let s=(0,se.useCallback)(d=>{let p=0;if(d.key==="ArrowRight"?p=1:d.key==="ArrowLeft"&&(p=-1),p!==0){let m=(r+p+t.length)%t.length;for(;t[m].props.disabled&&m!==r;)m=(m+p+t.length)%t.length;m!==r&&!t[m].props.disabled&&(n(m),a.current[m]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:i,handleKeyDown:s}}var xt=require("class-variance-authority"),z=require("react/jsx-runtime"),kr=(0,xt.cva)("relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar",{variants:{size:{default:"px-0",compact:"px-2"}},defaultVariants:{size:"default"}}),Lr=(0,xt.cva)("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function fo({children:e}){let t=typeof e=="string"?(0,z.jsx)(me,{className:"language-bash",children:(0,z.jsx)("code",{children:e.trim()})}):e;return(0,z.jsx)("div",{className:"py-4",children:t})}function go({defaultIndex:e=0,children:t}){let o=(0,Ce.useMemo)(()=>Ce.Children.toArray(t).filter(l=>(0,Ce.isValidElement)(l)&&l.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:i}=uo({initialIndex:e,tabs:o});return(0,z.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,z.jsxs)(ue.Tabs,{selectedKey:r.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[(0,z.jsxs)(ue.TabList,{"aria-label":"Content Tabs",className:c(kr()),children:[o.map((l,s)=>{let{label:d,icon:p,disabled:m}=l.props,f=s.toString();return(0,z.jsxs)(ue.Tab,{id:f,isDisabled:m,ref:b=>{a.current[s]=b},className:({isSelected:b,isDisabled:C})=>c(Lr({isActive:b,isDisabled:C})),children:[!!p&&(0,z.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:p}),(0,z.jsx)("span",{children:d})]},f)}),(0,z.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),o.map((l,s)=>(0,z.jsx)(ue.TabPanel,{id:s.toString(),children:o[s]},s))]})})}var Re=require("react"),Ie=require("react/jsx-runtime");function xo({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...i}){let l=(0,Re.useRef)(null),[s,d]=(0,Re.useState)(!1);return(0,Re.useEffect)(()=>{let p=l.current;if(!p)return;let m=new IntersectionObserver(([f])=>{f.isIntersecting&&(d(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(p),()=>m.disconnect()},[]),(0,Ie.jsx)("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?(0,Ie.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...i,children:[r,"Your browser does not support the video tag."]}):(0,Ie.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var bo=require("class-variance-authority"),vo=require("react/jsx-runtime"),Ar=(0,bo.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function ho({variant:e="default",children:t,className:o="",...r}){return(0,vo.jsx)("span",{className:c(Ar({variant:e}),o),...r,children:t})}var Ee=require("react"),yo=w(require("react-aria-components"));var Co=require("class-variance-authority"),H=require("react/jsx-runtime"),Sr=(0,Co.cva)("grid gap-4 my-6",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{cols:3}});function Ro({cols:e=3,children:t,className:o="",...r}){return(0,H.jsx)("div",{className:c(Sr({cols:e}),o),...r,children:t})}function No({title:e,icon:t,href:o,children:r,className:n="",...a}){let i=(0,Ee.useRef)(null),l=(0,Ee.useRef)(null),s=(0,Ee.useCallback)(m=>{let f=i.current||l.current;if(!f)return;let{left:b,top:C}=f.getBoundingClientRect();f.style.setProperty("--x",`${m.clientX-b}px`),f.style.setProperty("--y",`${m.clientY-C}px`)},[]),d=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&(0,H.jsx)("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),(0,H.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,H.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,H.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),p=c("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?(0,H.jsx)(yo.Link,{ref:l,href:o,className:c(p,"no-underline cursor-pointer"),onMouseMove:s,...a,children:d}):(0,H.jsx)("div",{ref:i,role:"presentation",className:p,onMouseMove:s,...a,children:d})}var E=require("lucide-react");var wo=require("class-variance-authority"),L=require("react/jsx-runtime"),Mr={note:(0,L.jsx)(E.Bookmark,{size:18}),tip:(0,L.jsx)(E.Lightbulb,{size:18}),info:(0,L.jsx)(E.Info,{size:18}),warning:(0,L.jsx)(E.AlertTriangle,{size:18}),danger:(0,L.jsx)(E.ShieldAlert,{size:18}),important:(0,L.jsx)(E.Flame,{size:18}),caution:(0,L.jsx)(E.Zap,{size:18})},Br={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Po=(0,wo.cva)("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function ae({type:e="note",title:t,children:o,className:r="",...n}){return(0,L.jsxs)("div",{className:c(Po({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,L.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,L.jsx)("span",{className:c("shrink-0",Po({type:e})),children:Mr[e]}),(0,L.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||Br[e]})]}),(0,L.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var To=e=>(0,L.jsx)(ae,{type:"note",...e}),ko=e=>(0,L.jsx)(ae,{type:"tip",...e}),Lo=e=>(0,L.jsx)(ae,{type:"warning",...e}),Ao=e=>(0,L.jsx)(ae,{type:"danger",...e}),So=e=>(0,L.jsx)(ae,{type:"info",...e}),Mo=e=>(0,L.jsx)(ae,{type:"important",...e}),Bo=e=>(0,L.jsx)(ae,{type:"caution",...e});var Qe=require("react"),Ne=require("lucide-react");var et=require("class-variance-authority"),Y=require("react/jsx-runtime"),Ir=(0,et.cva)("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),Er=(0,et.cva)("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),Or=(0,et.cva)("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function Vr({icon:e,children:t,variant:o,dense:r}){return(0,Y.jsxs)("li",{className:c(Er({variant:o,dense:r})),children:[e&&(0,Y.jsx)("span",{className:c(Or({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,Y.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var zr={checked:e=>(0,Y.jsx)(Ne.Check,{size:14,className:c("text-emerald-500 shrink-0",e)}),arrow:e=>(0,Y.jsx)(Ne.ChevronRight,{size:14,className:c("text-primary-400 shrink-0",e)}),bubble:e=>(0,Y.jsx)(Ne.Circle,{size:6,fill:"currentColor",className:c("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Io({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let i=t!==void 0&&Number(t)>1,l=zr[e],s=Ir({variant:e,cols:t,dense:o,isGrid:i,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,Y.jsx)(d,{className:s,...a,children:r}):(0,Y.jsx)("ul",{className:s,...a,children:Qe.Children.map(r,p=>{if(!(0,Qe.isValidElement)(p))return p;let m=p,f=m.type==="li"?m.props.children:m.props.children||p;return(0,Y.jsx)(Vr,{icon:l(),variant:e,dense:o,children:f})})})}var te=require("react"),oe=w(require("react-aria-components")),G=require("lucide-react");var k=require("react/jsx-runtime"),Pe=16,Oe=2,Hr={ts:qe,tsx:ge,js:Xe,jsx:ge,json:Je,css:Ke,html:Ye,md:xe,mdx:xe,bash:be,sh:be,yaml:he,yml:he},bt={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function vt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(vt).join(""):(0,te.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?vt(e.props.children):""}function Dr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,k.jsx)(G.Folder,{size:Pe,strokeWidth:Oe,className:c(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=Hr[n];if(a)return(0,k.jsx)(a,{size:Pe});let i=c(r,"text-text-dim group-hover:text-text-main");return bt.CODE.test(o)?(0,k.jsx)(G.FileCode,{size:Pe,strokeWidth:Oe,className:i}):bt.TEXT.test(o)?(0,k.jsx)(G.FileText,{size:Pe,strokeWidth:Oe,className:i}):bt.IMAGE.test(o)?(0,k.jsx)(G.FileImage,{size:Pe,strokeWidth:Oe,className:i}):(0,k.jsx)(G.File,{size:Pe,strokeWidth:Oe,className:i})}function ht(e,t){if(!(0,te.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function Fr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function tt(e,t="root"){if(!(0,te.isValidElement)(e))return[];let o=[];if(ht(e,"ul"))return te.Children.forEach(e.props.children,(r,n)=>{o.push(...tt(r,`${t}-${n}`))}),o;if(ht(e,"li")){let r=te.Children.toArray(e.props.children),n=r.findIndex(C=>ht(C,"ul")),a=n!==-1,i=a?r.slice(0,n):r,l=a?r.slice(n):[],s=vt(i),{name:d,comment:p}=Fr(s),m=d.endsWith("/"),f=m?d.slice(0,-1):d,b=a||m;return o.push({id:`${t}-${f}`,name:f,comment:p,isFolder:b,children:a?tt(l[0],`${t}-${f}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&te.Children.forEach(e.props.children,(r,n)=>{o.push(...tt(r,`${t}-${n}`))}),o}function Eo({item:e}){return(0,k.jsxs)(oe.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[(0,k.jsx)(oe.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,k.jsxs)("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[(0,k.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,k.jsx)(oe.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,k.jsx)(G.ChevronRight,{size:14,strokeWidth:3,className:c("transition-transform duration-200",t&&"rotate-90")})}):(0,k.jsx)("div",{className:"w-[18px]"}),Dr(e.name,e.isFolder),(0,k.jsx)("span",{className:c("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&(0,k.jsxs)("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&(0,k.jsx)(oe.Collection,{items:e.children,children:t=>(0,k.jsx)(Eo,{item:t})})]})}function Oo({children:e}){let t=(0,te.useMemo)(()=>tt(e),[e]);return(0,k.jsx)("div",{className:"my-8",children:(0,k.jsx)(oe.Tree,{items:t,"aria-label":"File Tree",className:c("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>(0,k.jsx)(Eo,{item:o})})})}var Ve=w(require("react-aria-components"));var we=require("react");function Vo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=(0,we.useState)(null),[i,l]=(0,we.useState)(1),s=(0,we.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((b,C)=>{let P=b[n.key],g=C[n.key],W=typeof P=="string"?P:"",x=typeof g=="string"?g:"";return W<x?n.direction==="asc"?-1:1:W>x?n.direction==="asc"?1:-1:0}),f},[e,n,t]),d=Math.ceil(s.length/r),p=(0,we.useMemo)(()=>{if(!o)return s;let f=(i-1)*r;return s.slice(f,f+r)},[s,o,i,r]);return{sortConfig:n,currentPage:i,setCurrentPage:l,totalPages:d,paginatedData:p,requestSort:f=>{if(!t)return;let b="asc";n&&n.key===f&&n.direction==="asc"&&(b="desc"),a({key:f,direction:b})}}}var D=require("lucide-react");var y=require("react/jsx-runtime");function zo({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:i=10}){let{sortConfig:l,currentPage:s,setCurrentPage:d,totalPages:p,paginatedData:m,requestSort:f}=Vo({data:t,sortable:n,paginated:a,pageSize:i}),b=P=>n?l?.key!==P?(0,y.jsx)(D.ChevronDown,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?(0,y.jsx)(D.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,y.jsx)(D.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,C=o||(0,y.jsxs)(y.Fragment,{children:[e&&(0,y.jsx)("thead",{children:(0,y.jsx)("tr",{children:e.map((P,g)=>(0,y.jsx)("th",{onClick:()=>f(g),className:c("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:(0,y.jsxs)("div",{className:"flex items-center",children:[P,b(g)]})},g))})}),m&&(0,y.jsx)("tbody",{children:m.map((P,g)=>(0,y.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:P.map((W,x)=>(0,y.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:W},x))},g))})]});return(0,y.jsxs)("div",{className:c("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,y.jsx)("div",{className:"overflow-x-auto",children:(0,y.jsx)("table",{className:"w-full border-collapse text-sm",children:C})}),a&&p>1&&(0,y.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,y.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",p]}),(0,y.jsxs)("div",{className:"flex items-center gap-1",children:[(0,y.jsx)(Ve.Button,{onPress:()=>d(1),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(D.ChevronsLeft,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>d(P=>Math.max(P-1,1)),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(D.ChevronLeft,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>d(P=>Math.min(P+1,p)),isDisabled:s===p,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(D.ChevronRight,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>d(p),isDisabled:s===p,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(D.ChevronsRight,{size:16})})]})]})]})}var F=require("react/jsx-runtime");function Ho({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:i=""}){return(0,F.jsxs)("article",{className:c("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",i),id:a,children:[(0,F.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,F.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,F.jsx)("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&(0,F.jsx)("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),r&&(0,F.jsxs)("div",{className:"flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[(0,F.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,F.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50",children:[(0,F.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,F.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,F.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var Fo=require("react/jsx-runtime");function Do({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=c("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Fo.jsx)(pe,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var $o=require("react/jsx-runtime");function Wo({src:e,alt:t,theme:o,...r}){let{theme:n}=Ft();return o&&o!==n?null:(0,$o.jsx)("img",{src:e,alt:t||"",...r})}var T=require("react/jsx-runtime");function jo({title:e,props:t,className:o=""}){return(0,T.jsxs)("div",{className:c("my-6",o),children:[e&&(0,T.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,T.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,T.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,T.jsx)("thead",{children:(0,T.jsxs)("tr",{children:[(0,T.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Property"}),(0,T.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Type"}),(0,T.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Default"}),(0,T.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Description"})]})}),(0,T.jsx)("tbody",{children:t.map((r,n)=>(0,T.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,T.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,T.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,T.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,T.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,T.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,T.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,T.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,T.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,T.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var yt=require("react");function Go(e){let{code:t,children:o,preview:r}=e,n=(0,yt.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=(0,yt.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}var Te=require("react/jsx-runtime");function _o(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:i,previewElement:l}=Go(e);return(0,Te.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,Te.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!o&&(0,Te.jsx)("div",{className:"border-t border-border-subtle",children:(0,Te.jsx)(me,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,plain:!0,children:i})})]})}var sr=require("react"),ie=require("lucide-react");var Uo=require("react");var Wr=require("react-aria-components"),ot=require("lucide-react");var qo=require("react/jsx-runtime");var ze=w(require("react-aria-components")),$r=require("lucide-react");var Ct=require("react/jsx-runtime");var M=w(require("react-aria-components")),fe=require("lucide-react");var R=require("react/jsx-runtime"),jr=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,R.jsx)(M.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:c("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:(0,R.jsx)(M.Modal,{className:c("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:(0,R.jsx)(M.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Gr=({children:e,className:t,onSelectionChange:o,...r})=>(0,R.jsx)("div",{className:t,children:(0,R.jsx)(M.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),_r=({className:e,...t})=>(0,R.jsxs)(M.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,R.jsx)(fe.Search,{className:"h-5 w-5 text-text-muted"}),(0,R.jsx)(M.Input,{...t,className:c("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,R.jsx)("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:(0,R.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Ur=({children:e,className:t,...o})=>(0,R.jsx)(M.ListBox,{...o,className:c("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),qr=({children:e,className:t,...o})=>(0,R.jsx)(M.ListBoxItem,{...o,className:c("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>(0,R.jsxs)(R.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,R.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,R.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,R.jsx)(fe.CornerDownLeft,{size:10})]})]})}),Xr=({isHeading:e,className:t})=>(0,R.jsx)("div",{className:c("shrink-0",t),children:e?(0,R.jsx)(fe.Hash,{size:18}):(0,R.jsx)(fe.FileText,{size:18})}),Jr=({children:e,className:t})=>(0,R.jsx)("span",{className:c("block font-medium truncate flex-1 text-sm",t),children:e}),Kr=({children:e,className:t})=>(0,R.jsx)("span",{className:c("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),Oa={Root:jr,Autocomplete:Gr,Input:_r,List:Ur,Item:Object.assign(qr,{Icon:Xr,Title:Jr,Bio:Kr})};var Z=require("react"),Yr=w(require("scroll-into-view-if-needed"));var Xo=require("react");var Jo=require("react/jsx-runtime"),Ja=(0,Z.createContext)(null),Ka=(0,Z.createContext)(null);var Zr=({children:e,className:t,ref:o,...r})=>{let n=(0,Z.useRef)(null);return(0,Z.useImperativeHandle)(o,()=>n.current),(0,Jo.jsx)("div",{ref:n,className:c("relative overflow-y-auto boltdocs-otp-content",t),...r,children:e})};Zr.displayName="OnThisPageContent";var Ko=w(require("react-aria-components")),nt=require("lucide-react");var _=require("react/jsx-runtime"),Qr=({children:e,className:t})=>(0,_.jsx)("nav",{className:c("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),en=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,_.jsxs)(Ko.Link,{href:t,className:c("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&(0,_.jsx)(nt.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,_.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,_.jsx)(nt.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},tn=({children:e,className:t})=>(0,_.jsx)("span",{className:c("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),on=({children:e,className:t})=>(0,_.jsx)("span",{className:c("text-base font-bold text-text-main truncate",t),children:e}),rn=({children:e})=>(0,_.jsx)(_.Fragment,{children:e}),ei={PageNavRoot:Qr,PageNavLink:Object.assign(en,{Title:tn,Description:on,Icon:rn})};var nn=require("react/jsx-runtime");var sn=w(require("react-aria-components")),an=require("lucide-react");var Yo=require("react/jsx-runtime");var Rt=require("react-aria-components"),ln=require("lucide-react");var cn=require("react/jsx-runtime");var Qo=require("react/jsx-runtime"),Zo=({children:e,className:t,vertical:o=!1})=>(0,Qo.jsx)("div",{className:c("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});var Ae=require("lucide-react"),tr=w(require("react")),I=w(require("react-aria-components"));var Le=w(require("react-aria-components"));var ke=require("react/jsx-runtime"),er=({children:e,className:t,showArrow:o,...r})=>(0,ke.jsxs)(Le.Popover,{offset:8,...r,className:Le.composeRenderProps(t,n=>c("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",n)),children:[o&&(0,ke.jsx)(Le.OverlayArrow,{className:"group",children:(0,ke.jsx)("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:(0,ke.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var O=require("react/jsx-runtime");function or(e){let[t,o]=tr.default.Children.toArray(e.children).slice(0,2);return(0,O.jsxs)(I.MenuTrigger,{...e,children:[t,(0,O.jsx)(er,{placement:e.placement,className:"min-w-35",children:o})]})}function rr(e){return(0,O.jsx)(I.Menu,{...e,className:I.composeRenderProps(e.className,t=>c("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function Nt(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,O.jsx)(I.MenuItem,{...e,textValue:t,className:I.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>c("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":a},o)),children:I.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>(0,O.jsxs)(O.Fragment,{children:[r!=="none"&&(0,O.jsxs)("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,O.jsx)(Ae.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,O.jsx)(Ae.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,O.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&(0,O.jsx)(Ae.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var nr=require("react/jsx-runtime");function B({className:e,variant:t="rect",...o}){return(0,nr.jsx)("div",{className:c("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var rt=require("react-aria-components");var S=require("react/jsx-runtime"),dn=e=>{let[t,o]=(0,sr.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(a);window.open(i,"_blank")}}};function ar({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:i}=dn(r),l=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:(0,S.jsx)("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:(0,S.jsxs)(Zo,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[(0,S.jsx)(Be,{variant:"ghost",onPress:a,icon:n?(0,S.jsx)(ie.Check,{size:16}):(0,S.jsx)(ie.Copy,{size:16}),iconPosition:"left",className:c("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":s}),(0,S.jsxs)(or,{placement:"bottom end",children:[(0,S.jsx)(Be,{variant:"ghost",isIconOnly:!0,icon:(0,S.jsx)(ie.ChevronDown,{size:14}),className:c("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,S.jsxs)(rr,{className:"w-52",children:[(0,S.jsxs)(Nt,{onAction:a,children:[(0,S.jsx)(ie.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,S.jsxs)(Nt,{onAction:i,children:[(0,S.jsx)(ie.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var N=require("react/jsx-runtime");function ir(){return(0,N.jsx)("div",{className:c("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,N.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)(B,{className:"h-3 w-16"}),(0,N.jsx)(B,{className:"h-3 w-24"})]}),(0,N.jsx)(B,{className:"h-10 w-[60%] sm:h-12"}),(0,N.jsxs)("div",{className:"space-y-3",children:[(0,N.jsx)(B,{className:"h-4 w-full"}),(0,N.jsx)(B,{className:"h-4 w-[95%]"}),(0,N.jsx)(B,{className:"h-4 w-[40%]"})]}),(0,N.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,N.jsx)(B,{className:"h-7 w-32"}),(0,N.jsxs)("div",{className:"space-y-3",children:[(0,N.jsx)(B,{className:"h-4 w-full"}),(0,N.jsx)(B,{className:"h-4 w-[98%]"}),(0,N.jsx)(B,{className:"h-4 w-[92%]"}),(0,N.jsx)(B,{className:"h-4 w-[60%]"})]})]}),(0,N.jsx)(B,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,N.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,N.jsx)(B,{className:"h-7 w-48"}),(0,N.jsxs)("div",{className:"space-y-3",children:[(0,N.jsx)(B,{className:"h-4 w-full"}),(0,N.jsx)(B,{className:"h-4 w-[85%]"})]})]})]})})}var U=require("react/jsx-runtime"),Se=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return(0,U.jsxs)(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&(0,U.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,U.jsx)(lr.Link,{size:16})})]})},cr={...Pt,Loading:ir,h1:e=>(0,U.jsx)(Se,{level:1,...e}),h2:e=>(0,U.jsx)(Se,{level:2,...e}),h3:e=>(0,U.jsx)(Se,{level:3,...e}),h4:e=>(0,U.jsx)(Se,{level:4,...e}),h5:e=>(0,U.jsx)(Se,{level:5,...e}),h6:e=>(0,U.jsx)(Se,{level:6,...e}),pre:e=>(0,U.jsx)(me,{...e,children:e.children})};var dr=w(require("virtual:boltdocs-mdx-components"));var pr=require("react-router-dom");var h=require("react/jsx-runtime");function mn(){let{currentLocale:e,config:t}=Me();return(0,V.useEffect)(()=>{if(!t.i18n)return;let o=t.i18n.localeConfigs?.[e];document.documentElement.lang=o?.htmlLang||e||"en",document.documentElement.dir=o?.direction||"ltr"},[e,t.i18n]),null}function un(){let e=(0,pr.useLocation)(),{config:t}=Me(),o=re(i=>i.setLocale),r=re(i=>i.setVersion),n=re(i=>i.currentLocale),a=re(i=>i.currentVersion);return(0,V.useEffect)(()=>{let i=e.pathname.split("/").filter(Boolean),l=0,s=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(i[l]==="docs"&&l++,t.versions&&i.length>l){let p=t.versions.versions.find(m=>m.path===i[l]);p&&(s=p.path,l++)}t.i18n&&i.length>l&&t.i18n.locales[i[l]]?d=i[l]:t.i18n&&i.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),s!==a&&r(s)},[e.pathname,t,o,r,n,a]),null}function mr({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:i,externalLayout:l,components:s={}}){let[d,p]=(0,V.useState)(e),[m,f]=(0,V.useState)(t),b=i||{},C=l||wt.default,P=(0,V.useMemo)(()=>d.filter(x=>!(a&&(x.path==="/"||x.path===""))&&!b[x.path===""?"/":x.path]).map(x=>{let q=Object.keys(r).find($=>$===`/${o}/${x.filePath}`||$.endsWith(`/${o}/${x.filePath}`)||$.endsWith(`/${o}\\${x.filePath.replace(/\\/g,"/")}`)),le=q?r[q]:null;return{...x,Component:V.default.lazy(async()=>le?await le():{default:pt})}}),[d,r,o,a,b]);(0,V.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",x=>{p(x)}),n.on("boltdocs:config-update",x=>{f(x)}))},[n]);let g=(0,V.useMemo)(()=>({...cr,...dr.default,...s}),[s]),W=g.Loading;return(0,h.jsx)(Dt,{children:(0,h.jsx)(eo,{components:g,children:(0,h.jsx)(it.Provider,{value:m,children:(0,h.jsx)(Gt,{children:(0,h.jsxs)(At,{routes:d,modules:r,children:[(0,h.jsx)(Xt,{}),(0,h.jsx)(un,{}),(0,h.jsx)(mn,{}),(0,h.jsxs)(Q.Routes,{children:[(0,h.jsx)(Q.Route,{element:(0,h.jsx)(Yt,{}),children:P.map(x=>(0,h.jsx)(Q.Route,{path:x.path===""?"/":x.path,element:(0,h.jsx)(V.default.Suspense,{fallback:(0,h.jsx)(W,{}),children:(0,h.jsx)(ro,{Component:x.Component})})},x.path))},"docs-layout"),a&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q.Route,{path:"/",element:(0,h.jsx)(C,{children:(0,h.jsx)(a,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(x=>(0,h.jsx)(Q.Route,{path:`/${x}`,element:(0,h.jsx)(C,{children:(0,h.jsx)(a,{})})},`home-${x}`))]}),Object.entries(b).map(([x,q])=>{let le=x==="/"?"":x;return(0,h.jsxs)(V.default.Fragment,{children:[(0,h.jsx)(Q.Route,{path:x,element:(0,h.jsx)(C,{children:(0,h.jsx)(q,{})})}),m.i18n&&Object.keys(m.i18n.locales).map($=>(0,h.jsx)(Q.Route,{path:`/${$}${le}`,element:(0,h.jsx)(C,{children:(0,h.jsx)(q,{})})},`${x}-${$}`))]},x)}),(0,h.jsx)(Q.Route,{path:"*",element:(0,h.jsx)(wt.default,{children:(0,h.jsx)(pt,{})})})]})]})})})})})}var st=require("react/jsx-runtime");async function fn(e){let{path:t,routes:o,config:r,modules:n,homePage:a,externalPages:i,docsDirName:l}=e,s={};for(let[p,m]of Object.entries(n))s[p]=()=>Promise.resolve(m);return fr.default.renderToString((0,st.jsx)(ur.default.StrictMode,{children:(0,st.jsx)(gr.StaticRouter,{location:t,children:(0,st.jsx)(mr,{initialRoutes:o,initialConfig:r,docsDirName:l,modules:s,homePage:a,externalPages:i})})}))}0&&(module.exports={render});
1
+ "use strict";var Zo=Object.create;var He=Object.defineProperty;var Qo=Object.getOwnPropertyDescriptor;var er=Object.getOwnPropertyNames;var tr=Object.getPrototypeOf,or=Object.prototype.hasOwnProperty;var ht=(e,t)=>{for(var o in t)He(e,o,{get:t[o],enumerable:!0})},vt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of er(t))!or.call(e,n)&&n!==o&&He(e,n,{get:()=>t[n],enumerable:!(r=Qo(t,n))||r.enumerable});return e};var M=(e,t,o)=>(o=e!=null?Zo(tr(e)):{},vt(t||!e||!e.__esModule?He(o,"default",{value:e,enumerable:!0}):o,e)),rr=e=>vt(He({},"__esModule",{value:!0}),e);var Er={};ht(Er,{render:()=>Br});module.exports=rr(Er);var Xo=M(require("react")),Ko=M(require("react-dom/server")),Yo=require("react-router-dom/server");var V=M(require("react")),Ar=M(require("react-dom/client")),K=require("react-router-dom");var At=require("lucide-react");var tt=M(require("react")),kt=require("react-aria-components"),Lt=require("react-router-dom");var ze=require("react"),Qe=(0,ze.createContext)(null);function ae(){let e=(0,ze.use)(Qe);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Pt=require("react-router-dom");var ie=require("react"),Rt=require("react/jsx-runtime"),yt=(0,ie.createContext)({preload:()=>{},routes:[]});function Ie(){return(0,ie.use)(yt)}function Ct({routes:e,modules:t,children:o}){let r=(0,ie.useRef)(null),n=(0,ie.useCallback)(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let i=a.split("#")[0].split("?")[0],l=e.find(s=>s.path===i||i==="/"&&s.path==="");if(l?.filePath){let s=Object.keys(t).find(c=>c.endsWith("/"+l.filePath));s&&t[s]().catch(c=>{console.error(`[boltdocs] Failed to preload route ${a}:`,c)})}},100)},[e,t]);return(0,Rt.jsx)(yt.Provider,{value:{preload:n,routes:e},children:o})}var wt=require("zustand"),Oe=require("zustand/middleware"),te=(0,wt.create)()((0,Oe.persist)(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:(0,Oe.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Me(){let{routes:e}=Ie(),t=ae(),o=(0,Pt.useLocation)(),r=te(f=>f.currentLocale),n=te(f=>f.currentVersion),a=te(f=>f.hasHydrated),i=e.find(f=>f.path===o.pathname),l=t.i18n?i?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?i?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,c=e.filter(f=>{let H=t.i18n?(f.locale||t.i18n.defaultLocale)===l:!0,b=t.versions?(f.version||t.versions.defaultVersion)===s:!0;if(!(H&&b))return!1;let _=t.i18n;if(_){let ee=!!i?.locale,U=!!f.locale;if(e.some(de=>de!==f&&de.filePath===f.filePath&&de.version===f.version&&(de.locale||_.defaultLocale)===(f.locale||_.defaultLocale))&&ee!==U)return!1}return!0}),p=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,x=t.versions?.versions.find(f=>f.path===s)?.label||s,R=t.i18n?Object.entries(t.i18n.locales).map(([f,H])=>{let b=t.i18n?.localeConfigs?.[f];return{key:f,label:b?.label||H,isCurrent:f===l}}):[],w=t.versions?t.versions.versions.map(f=>({key:f.path,label:f.label,isCurrent:f.path===s})):[];return{routes:c,allRoutes:e,currentRoute:i,currentLocale:l,currentLocaleLabel:p,availableLocales:R,currentVersion:s,currentVersionLabel:x,availableVersions:w,config:t}}function et(e){let t=ae(),{currentLocale:o,currentVersion:r}=Me();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,a=t.versions;if(!n&&!a)return e;let i=e.startsWith("/docs"),l=e.split("/").filter(Boolean),s=0;l[s]==="docs"&&s++,a&&l.length>s&&a.versions.find(x=>x.path===l[s])&&s++,n&&l.length>s&&n.locales[l[s]]&&s++;let c=l.slice(s),d=[];i&&(d.push("docs"),a&&r&&d.push(r)),n&&o&&o!==n.defaultLocale&&d.push(o),d.push(...c);let p=`/${d.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}var Nt=require("clsx"),Tt=require("tailwind-merge");function m(...e){return(0,Tt.twMerge)((0,Nt.clsx)(e))}var ot=require("react/jsx-runtime"),pe=tt.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:a,...i}=e,l=et(o??""),{preload:s}=Ie();return(0,ot.jsx)(kt.Link,{...i,ref:t,href:l,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)},onFocus:p=>{a?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)}})});pe.displayName="Link";var nr=tt.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...i}=e,l=(0,Lt.useLocation)(),s=et(o??""),c=r?l.pathname===s:l.pathname.startsWith(s),d=typeof n=="function"?n({isActive:c}):m(n,c&&"active"),p=typeof a=="function"?a({isActive:c}):a;return(0,ot.jsx)(pe,{...i,ref:t,href:o,className:d,children:p})});nr.displayName="NavLink";var oe=require("react/jsx-runtime");function rt(){return(0,oe.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,oe.jsxs)("div",{className:"space-y-4",children:[(0,oe.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,oe.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,oe.jsx)("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),(0,oe.jsxs)(pe,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[(0,oe.jsx)(At.ArrowLeft,{size:16})," Go to Home"]})]})})}var j=require("react"),Et=require("react/jsx-runtime"),Mt=(0,j.createContext)(void 0);function St({children:e}){let[t,o]=(0,j.useState)("system"),[r,n]=(0,j.useState)("dark"),[a,i]=(0,j.useState)(!1);(0,j.useEffect)(()=>{i(!0);let s=localStorage.getItem("boltdocs-theme"),c=s==="light"||s==="dark"||s==="system"?s:"system";o(c);let d=window.matchMedia("(prefers-color-scheme: dark)");((x,R)=>{n(x==="system"?R?"dark":"light":x)})(c,d.matches);let g=x=>{n(R=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?x.matches?"dark":"light":R)};return d.addEventListener("change",g),()=>d.removeEventListener("change",g)},[]),(0,j.useEffect)(()=>{if(!a)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,c=t==="system"?s?"dark":"light":t;n(c);let d=document.documentElement;c==="light"?(d.classList.add("theme-light"),d.dataset.theme="light"):(d.classList.remove("theme-light"),d.dataset.theme="dark")},[t,a]);let l=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return(0,Et.jsx)(Mt.Provider,{value:{theme:t,resolvedTheme:r,setTheme:l},children:e})}function Bt(){let e=(0,j.use)(Mt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var gt=M(require("virtual:boltdocs-layout"));var Vt=require("react"),Ht=require("react-aria-components"),De=require("react-router-dom"),It=require("react/jsx-runtime");function zt({children:e}){let t=(0,De.useNavigate)();return(0,It.jsx)(Ht.RouterProvider,{navigate:(o,r)=>{(0,Vt.startTransition)(()=>{t(o,r)})},useHref:De.useHref,children:e})}var Ot=require("react"),Dt=require("react-router-dom");function Ft(){let{pathname:e,hash:t}=(0,Dt.useLocation)();return(0,Ot.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,i="auto")=>{o===window?window.scrollTo({top:a,behavior:i}):o.scrollTo({top:a,behavior:i})};if(t){let a=t.replace("#",""),i=document.getElementById(a);if(i){let s=o===window?0:o.getBoundingClientRect().top,p=i.getBoundingClientRect().top-s-80+r();n(p,"smooth");return}}n(0)},[e,t]),null}var Wt=require("react-router-dom"),$t=M(require("virtual:boltdocs-layout")),nt=require("react/jsx-runtime");function Gt(){return(0,nt.jsx)($t.default,{children:(0,nt.jsx)(Wt.Outlet,{})})}var Fe=require("react"),qt=require("react/jsx-runtime"),_t=(0,Fe.createContext)({});function Ut(){return(0,Fe.use)(_t)}function jt({components:e,children:t}){return(0,qt.jsx)(_t.Provider,{value:e,children:t})}var Xt=require("react/jsx-runtime");function Jt({Component:e}){let t=Ut();return(0,Xt.jsx)(e,{components:t})}var _o=require("lucide-react");var ft={};ht(ft,{Admonition:()=>ne,Badge:()=>po,Button:()=>Yt,Card:()=>bo,Cards:()=>go,Caution:()=>No,CodeBlock:()=>le,ComponentPreview:()=>Oo,ComponentProps:()=>zo,CopyMarkdown:()=>$o,Danger:()=>Ro,Field:()=>So,FileTree:()=>Lo,Image:()=>Vo,Important:()=>Po,InfoBox:()=>wo,Link:()=>Bo,List:()=>To,Note:()=>vo,Tab:()=>ao,Table:()=>Mo,Tabs:()=>io,Tip:()=>yo,Video:()=>lo,Warning:()=>Co});var $e=M(require("react-aria-components"));var Kt=require("class-variance-authority"),q=require("react/jsx-runtime"),We=(0,Kt.cva)("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),me=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:i,size:l,rounded:s,iconSize:c,disabled:d,...p})=>{let g=r||!n&&!!t,x=g?(0,q.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,q.jsxs)(q.Fragment,{children:[t&&o==="left"&&(0,q.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,q.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,q.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,q.jsx)($e.Link,{href:e,className:m(We({variant:i,size:l,rounded:s,iconSize:g?c:void 0,disabled:d}),a),...p,children:x}):(0,q.jsx)($e.Button,{className:m(We({variant:i,size:l,rounded:s,iconSize:g?c:void 0,disabled:d}),a),...p,children:x})};var Zt=require("react/jsx-runtime"),Yt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...i})=>(0,Zt.jsx)(me,{className:m("group",We({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...i});var Je=M(require("react-aria-components")),ve=require("lucide-react");var st=require("codesandbox/lib/api/define.js");function Qt(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",i={};for(let[l,s]of Object.entries(t)){let c=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;i[l]={content:c,isBinary:s.isBinary??!1}}if(!i["package.json"]){let s=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};i["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return i}function sr(e){let t=Qt(e),o=(0,st.getParameters)({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function eo(e){if(typeof window>"u")return sr(e);let t=Qt(e),o=(0,st.getParameters)({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let a=(l,s)=>{let c=document.createElement("input");c.type="hidden",c.name=l,c.value=s,n.appendChild(c)},i=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",i.toString()),a("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}var to=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};var J=require("react");function oo(e){let{title:t,sandbox:o}=e,[r,n]=(0,J.useState)(!1),[a,i]=(0,J.useState)(!1),[l,s]=(0,J.useState)(!1),c=(0,J.useRef)(null),d=ae(),p=(0,J.useCallback)(async()=>{let x=c.current?.textContent??"";to(x),n(!0),setTimeout(()=>n(!1),2e3)},[]),g=(0,J.useCallback)(()=>{let x=c.current?.textContent??"",R=d?.integrations?.sandbox?.config||{},w=typeof o=="object"?o:R,f=w.entry||"src/App.tsx";eo({title:t??"Code Snippet",...w,files:{...w.files,[f]:{content:x}}})},[t,d,o]);return(0,J.useEffect)(()=>{let x=c.current?.textContent?.length??0;s(x>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:i,isExpandable:l,preRef:c,handleCopy:p,handleSandbox:g,shouldTruncate:l&&!a}}var v=require("react/jsx-runtime");function Y(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var ro=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Y(e),children:[(0,v.jsx)("title",{children:"CodeSandbox"}),(0,v.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var Ge=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"TypeScript"}),(0,v.jsx)("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),_e=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"JavaScript"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),Ue=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"JSON"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),je=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"CSS"}),(0,v.jsx)("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),qe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"HTML"}),(0,v.jsx)("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var ue=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"React"}),(0,v.jsx)("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),fe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"Markdown"}),(0,v.jsx)("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),ge=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...Y(e),children:[(0,v.jsx)("title",{children:"Shell"}),(0,v.jsx)("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),be=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"YAML"}),(0,v.jsx)("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});var he=M(require("react-aria-components"));var W=require("react/jsx-runtime"),no=({className:e,children:t,...o})=>(0,W.jsx)(he.Tooltip,{...o,offset:8,className:r=>m("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(he.OverlayArrow,{children:(0,W.jsxs)("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[(0,W.jsx)("title",{children:"Arrow"}),(0,W.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),xe=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,W.jsxs)(he.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,W.jsx)(no,{...n,children:e})]});xe.Root=xe;xe.Content=no;var A=require("react/jsx-runtime"),ar={ts:Ge,tsx:ue,js:_e,jsx:ue,json:Ue,css:je,html:qe,md:fe,mdx:fe,bash:ge,sh:ge,yaml:be,yml:be};function le(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,"data-highlighted-html":i,title:l,"data-lang":s,plain:c=!1,...d}=e,p=a||i,R=!!ae()?.integrations?.sandbox?.enable&&!r,w=e.lang||s||"",{copied:f,isExpanded:H,setIsExpanded:b,isExpandable:_,preRef:ee,handleCopy:U,handleSandbox:bt,shouldTruncate:de}=oo(e),xt=ar[w];return(0,A.jsxs)("div",{className:m("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!c,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":de},e.className),children:[l&&(0,A.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[xt?(0,A.jsx)(xt,{size:14}):(0,A.jsx)(ve.File,{size:14,className:"opacity-60"}),(0,A.jsx)("span",{children:l})]}),(0,A.jsxs)("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:[R&&(0,A.jsx)(xe,{content:"Open in CodeSandbox",children:(0,A.jsx)(Je.Button,{onPress:bt,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,A.jsx)(ro,{size:20})})}),!n&&(0,A.jsx)(xe,{content:f?"Copied!":"Copy code",children:(0,A.jsx)(Je.Button,{onPress:U,className:m("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",f?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:f?(0,A.jsx)(ve.Check,{size:20}):(0,A.jsx)(ve.Copy,{size:20})})})]}),p?(0,A.jsx)("div",{ref:ee,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:p}}):(0,A.jsx)("pre",{ref:ee,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...d,children:t}),_&&(0,A.jsx)("div",{className:m(de?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:(0,A.jsx)(Je.Button,{onPress:()=>b(!H),className:"rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md",children:H?"Show less":"Expand code"})})]})}var ye=require("react"),ce=M(require("react-aria-components"));var re=require("react");function so({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(c=>!c.props.disabled):e,[r,n]=(0,re.useState)(o===-1?0:o),a=(0,re.useRef)([]),[i,l]=(0,re.useState)({opacity:0,transform:"translateX(0)",width:0});(0,re.useEffect)(()=>{let c=a.current[r];c&&l({opacity:1,width:c.offsetWidth,transform:`translateX(${c.offsetLeft}px)`})},[r,t]);let s=(0,re.useCallback)(c=>{let d=0;if(c.key==="ArrowRight"?d=1:c.key==="ArrowLeft"&&(d=-1),d!==0){let p=(r+d+t.length)%t.length;for(;t[p].props.disabled&&p!==r;)p=(p+d+t.length)%t.length;p!==r&&!t[p].props.disabled&&(n(p),a.current[p]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:i,handleKeyDown:s}}var at=require("class-variance-authority"),z=require("react/jsx-runtime"),ir=(0,at.cva)("relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar",{variants:{size:{default:"px-0",compact:"px-2"}},defaultVariants:{size:"default"}}),lr=(0,at.cva)("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function ao({children:e}){let t=typeof e=="string"?(0,z.jsx)(le,{className:"language-bash",children:(0,z.jsx)("code",{children:e.trim()})}):e;return(0,z.jsx)("div",{className:"py-4",children:t})}function io({defaultIndex:e=0,children:t}){let o=(0,ye.useMemo)(()=>ye.Children.toArray(t).filter(l=>(0,ye.isValidElement)(l)&&l.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:i}=so({initialIndex:e,tabs:o});return(0,z.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,z.jsxs)(ce.Tabs,{selectedKey:r.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[(0,z.jsxs)(ce.TabList,{"aria-label":"Content Tabs",className:m(ir()),children:[o.map((l,s)=>{let{label:c,icon:d,disabled:p}=l.props,g=s.toString();return(0,z.jsxs)(ce.Tab,{id:g,isDisabled:p,ref:x=>{a.current[s]=x},className:({isSelected:x,isDisabled:R})=>m(lr({isActive:x,isDisabled:R})),children:[!!d&&(0,z.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:d}),(0,z.jsx)("span",{children:c})]},g)}),(0,z.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),o.map((l,s)=>(0,z.jsx)(ce.TabPanel,{id:s.toString(),children:o[s]},s))]})})}var Ce=require("react"),Se=require("react/jsx-runtime");function lo({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...i}){let l=(0,Ce.useRef)(null),[s,c]=(0,Ce.useState)(!1);return(0,Ce.useEffect)(()=>{let d=l.current;if(!d)return;let p=new IntersectionObserver(([g])=>{g.isIntersecting&&(c(!0),p.disconnect())},{rootMargin:"200px"});return p.observe(d),()=>p.disconnect()},[]),(0,Se.jsx)("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?(0,Se.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...i,children:[r,"Your browser does not support the video tag."]}):(0,Se.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var co=require("class-variance-authority"),mo=require("react/jsx-runtime"),cr=(0,co.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function po({variant:e="default",children:t,className:o="",...r}){return(0,mo.jsx)("span",{className:m(cr({variant:e}),o),...r,children:t})}var Be=require("react"),uo=M(require("react-aria-components"));var fo=require("class-variance-authority"),I=require("react/jsx-runtime"),dr=(0,fo.cva)("grid gap-4 my-6",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{cols:3}});function go({cols:e=3,children:t,className:o="",...r}){return(0,I.jsx)("div",{className:m(dr({cols:e}),o),...r,children:t})}function bo({title:e,icon:t,href:o,children:r,className:n="",...a}){let i=(0,Be.useRef)(null),l=(0,Be.useRef)(null),s=(0,Be.useCallback)(p=>{let g=i.current||l.current;if(!g)return;let{left:x,top:R}=g.getBoundingClientRect();g.style.setProperty("--x",`${p.clientX-x}px`),g.style.setProperty("--y",`${p.clientY-R}px`)},[]),c=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&(0,I.jsx)("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),(0,I.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,I.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,I.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),d=m("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?(0,I.jsx)(uo.Link,{ref:l,href:o,className:m(d,"no-underline cursor-pointer"),onMouseMove:s,...a,children:c}):(0,I.jsx)("div",{ref:i,role:"presentation",className:d,onMouseMove:s,...a,children:c})}var E=require("lucide-react");var ho=require("class-variance-authority"),T=require("react/jsx-runtime"),pr={note:(0,T.jsx)(E.Bookmark,{size:18}),tip:(0,T.jsx)(E.Lightbulb,{size:18}),info:(0,T.jsx)(E.Info,{size:18}),warning:(0,T.jsx)(E.AlertTriangle,{size:18}),danger:(0,T.jsx)(E.ShieldAlert,{size:18}),important:(0,T.jsx)(E.Flame,{size:18}),caution:(0,T.jsx)(E.Zap,{size:18})},mr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},xo=(0,ho.cva)("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function ne({type:e="note",title:t,children:o,className:r="",...n}){return(0,T.jsxs)("div",{className:m(xo({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,T.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,T.jsx)("span",{className:m("shrink-0",xo({type:e})),children:pr[e]}),(0,T.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||mr[e]})]}),(0,T.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var vo=e=>(0,T.jsx)(ne,{type:"note",...e}),yo=e=>(0,T.jsx)(ne,{type:"tip",...e}),Co=e=>(0,T.jsx)(ne,{type:"warning",...e}),Ro=e=>(0,T.jsx)(ne,{type:"danger",...e}),wo=e=>(0,T.jsx)(ne,{type:"info",...e}),Po=e=>(0,T.jsx)(ne,{type:"important",...e}),No=e=>(0,T.jsx)(ne,{type:"caution",...e});var Xe=require("react"),Re=require("lucide-react");var Ke=require("class-variance-authority"),X=require("react/jsx-runtime"),ur=(0,Ke.cva)("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),fr=(0,Ke.cva)("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),gr=(0,Ke.cva)("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function br({icon:e,children:t,variant:o,dense:r}){return(0,X.jsxs)("li",{className:m(fr({variant:o,dense:r})),children:[e&&(0,X.jsx)("span",{className:m(gr({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,X.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var xr={checked:e=>(0,X.jsx)(Re.Check,{size:14,className:m("text-emerald-500 shrink-0",e)}),arrow:e=>(0,X.jsx)(Re.ChevronRight,{size:14,className:m("text-primary-400 shrink-0",e)}),bubble:e=>(0,X.jsx)(Re.Circle,{size:6,fill:"currentColor",className:m("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function To({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let i=t!==void 0&&Number(t)>1,l=xr[e],s=ur({variant:e,cols:t,dense:o,isGrid:i,className:n}),c=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,X.jsx)(c,{className:s,...a,children:r}):(0,X.jsx)("ul",{className:s,...a,children:Xe.Children.map(r,d=>{if(!(0,Xe.isValidElement)(d))return d;let p=d,g=p.type==="li"?p.props.children:p.props.children||d;return(0,X.jsx)(br,{icon:l(),variant:e,dense:o,children:g})})})}var Z=require("react"),Q=M(require("react-aria-components")),$=require("lucide-react");var N=require("react/jsx-runtime"),we=16,Ee=2,hr={ts:Ge,tsx:ue,js:_e,jsx:ue,json:Ue,css:je,html:qe,md:fe,mdx:fe,bash:ge,sh:ge,yaml:be,yml:be},it={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function ct(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(ct).join(""):(0,Z.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?ct(e.props.children):""}function vr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,N.jsx)($.Folder,{size:we,strokeWidth:Ee,className:m(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=hr[n];if(a)return(0,N.jsx)(a,{size:we});let i=m(r,"text-text-dim group-hover:text-text-main");return it.CODE.test(o)?(0,N.jsx)($.FileCode,{size:we,strokeWidth:Ee,className:i}):it.TEXT.test(o)?(0,N.jsx)($.FileText,{size:we,strokeWidth:Ee,className:i}):it.IMAGE.test(o)?(0,N.jsx)($.FileImage,{size:we,strokeWidth:Ee,className:i}):(0,N.jsx)($.File,{size:we,strokeWidth:Ee,className:i})}function lt(e,t){if(!(0,Z.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function yr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ye(e,t="root"){if(!(0,Z.isValidElement)(e))return[];let o=[];if(lt(e,"ul"))return Z.Children.forEach(e.props.children,(r,n)=>{o.push(...Ye(r,`${t}-${n}`))}),o;if(lt(e,"li")){let r=Z.Children.toArray(e.props.children),n=r.findIndex(R=>lt(R,"ul")),a=n!==-1,i=a?r.slice(0,n):r,l=a?r.slice(n):[],s=ct(i),{name:c,comment:d}=yr(s),p=c.endsWith("/"),g=p?c.slice(0,-1):c,x=a||p;return o.push({id:`${t}-${g}`,name:g,comment:d,isFolder:x,children:a?Ye(l[0],`${t}-${g}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Z.Children.forEach(e.props.children,(r,n)=>{o.push(...Ye(r,`${t}-${n}`))}),o}function ko({item:e}){return(0,N.jsxs)(Q.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[(0,N.jsx)(Q.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,N.jsxs)("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[(0,N.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,N.jsx)(Q.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,N.jsx)($.ChevronRight,{size:14,strokeWidth:3,className:m("transition-transform duration-200",t&&"rotate-90")})}):(0,N.jsx)("div",{className:"w-[18px]"}),vr(e.name,e.isFolder),(0,N.jsx)("span",{className:m("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&(0,N.jsxs)("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&(0,N.jsx)(Q.Collection,{items:e.children,children:t=>(0,N.jsx)(ko,{item:t})})]})}function Lo({children:e}){let t=(0,Z.useMemo)(()=>Ye(e),[e]);return(0,N.jsx)("div",{className:"my-8",children:(0,N.jsx)(Q.Tree,{items:t,"aria-label":"File Tree",className:m("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>(0,N.jsx)(ko,{item:o})})})}var Ve=M(require("react-aria-components"));var Pe=require("react");function Ao({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=(0,Pe.useState)(null),[i,l]=(0,Pe.useState)(1),s=(0,Pe.useMemo)(()=>{if(!e)return[];let g=[...e];return t&&n!==null&&g.sort((x,R)=>{let w=x[n.key],f=R[n.key],H=typeof w=="string"?w:"",b=typeof f=="string"?f:"";return H<b?n.direction==="asc"?-1:1:H>b?n.direction==="asc"?1:-1:0}),g},[e,n,t]),c=Math.ceil(s.length/r),d=(0,Pe.useMemo)(()=>{if(!o)return s;let g=(i-1)*r;return s.slice(g,g+r)},[s,o,i,r]);return{sortConfig:n,currentPage:i,setCurrentPage:l,totalPages:c,paginatedData:d,requestSort:g=>{if(!t)return;let x="asc";n&&n.key===g&&n.direction==="asc"&&(x="desc"),a({key:g,direction:x})}}}var O=require("lucide-react");var y=require("react/jsx-runtime");function Mo({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:i=10}){let{sortConfig:l,currentPage:s,setCurrentPage:c,totalPages:d,paginatedData:p,requestSort:g}=Ao({data:t,sortable:n,paginated:a,pageSize:i}),x=w=>n?l?.key!==w?(0,y.jsx)(O.ChevronDown,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?(0,y.jsx)(O.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,y.jsx)(O.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,R=o||(0,y.jsxs)(y.Fragment,{children:[e&&(0,y.jsx)("thead",{children:(0,y.jsx)("tr",{children:e.map((w,f)=>(0,y.jsx)("th",{onClick:()=>g(f),className:m("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:(0,y.jsxs)("div",{className:"flex items-center",children:[w,x(f)]})},f))})}),p&&(0,y.jsx)("tbody",{children:p.map((w,f)=>(0,y.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:w.map((H,b)=>(0,y.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:H},b))},f))})]});return(0,y.jsxs)("div",{className:m("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,y.jsx)("div",{className:"overflow-x-auto",children:(0,y.jsx)("table",{className:"w-full border-collapse text-sm",children:R})}),a&&d>1&&(0,y.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,y.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",d]}),(0,y.jsxs)("div",{className:"flex items-center gap-1",children:[(0,y.jsx)(Ve.Button,{onPress:()=>c(1),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(O.ChevronsLeft,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>c(w=>Math.max(w-1,1)),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(O.ChevronLeft,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>c(w=>Math.min(w+1,d)),isDisabled:s===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(O.ChevronRight,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>c(d),isDisabled:s===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(O.ChevronsRight,{size:16})})]})]})]})}var D=require("react/jsx-runtime");function So({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:i=""}){return(0,D.jsxs)("article",{className:m("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",i),id:a,children:[(0,D.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,D.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,D.jsx)("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&(0,D.jsx)("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),r&&(0,D.jsxs)("div",{className:"flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[(0,D.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,D.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50",children:[(0,D.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,D.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,D.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var Eo=require("react/jsx-runtime");function Bo({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=m("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Eo.jsx)(pe,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var Ho=require("react/jsx-runtime");function Vo({src:e,alt:t,theme:o,...r}){let{theme:n}=Bt();return o&&o!==n?null:(0,Ho.jsx)("img",{src:e,alt:t||"",...r})}var P=require("react/jsx-runtime");function zo({title:e,props:t,className:o=""}){return(0,P.jsxs)("div",{className:m("my-6",o),children:[e&&(0,P.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,P.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,P.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,P.jsx)("thead",{children:(0,P.jsxs)("tr",{children:[(0,P.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Property"}),(0,P.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Type"}),(0,P.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Default"}),(0,P.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Description"})]})}),(0,P.jsx)("tbody",{children:t.map((r,n)=>(0,P.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,P.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,P.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,P.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,P.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,P.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,P.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,P.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,P.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,P.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var dt=require("react");function Io(e){let{code:t,children:o,preview:r}=e,n=(0,dt.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=(0,dt.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}var Ne=require("react/jsx-runtime");function Oo(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:i,previewElement:l}=Io(e);return(0,Ne.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,Ne.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!o&&(0,Ne.jsx)("div",{className:"border-t border-border-subtle",children:(0,Ne.jsx)(le,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,plain:!0,children:i})})]})}var Wo=require("react"),se=require("lucide-react");var Do=require("react/jsx-runtime"),pt=({children:e,className:t,vertical:o=!1})=>(0,Do.jsx)("div",{className:m("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});var Le=require("lucide-react"),ut=M(require("react")),L=M(require("react-aria-components"));var ke=M(require("react-aria-components"));var Te=require("react/jsx-runtime"),mt=({children:e,className:t,showArrow:o,...r})=>(0,Te.jsxs)(ke.Popover,{offset:8,...r,className:ke.composeRenderProps(t,n=>m("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",n)),children:[o&&(0,Te.jsx)(ke.OverlayArrow,{className:"group",children:(0,Te.jsx)("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:(0,Te.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var k=require("react/jsx-runtime");function Cr(e){let[t,o]=ut.default.Children.toArray(e.children).slice(0,2);return(0,k.jsxs)(L.MenuTrigger,{...e,children:[t,(0,k.jsx)(mt,{placement:e.placement,className:"min-w-35",children:o})]})}function Rr(e){let[t,o]=ut.default.Children.toArray(e.children).slice(0,2);return(0,k.jsxs)(L.SubmenuTrigger,{...e,children:[t,(0,k.jsx)(mt,{offset:-4,crossOffset:-4,children:o})]})}function F(e){return(0,k.jsx)(L.Menu,{...e,className:L.composeRenderProps(e.className,t=>m("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function wr(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,k.jsx)(L.MenuItem,{...e,textValue:t,className:L.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>m("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":a},o)),children:L.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>(0,k.jsxs)(k.Fragment,{children:[r!=="none"&&(0,k.jsxs)("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,k.jsx)(Le.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,k.jsx)(Le.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,k.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&(0,k.jsx)(Le.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function Pr({title:e,...t}){return(0,k.jsxs)(L.MenuSection,{...t,className:m("flex flex-col gap-0.5",t.className),children:[e&&(0,k.jsx)(L.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,k.jsx)(L.Collection,{items:t.items,children:t.children})]})}function Nr(e){return(0,k.jsx)(L.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}F.Root=F;F.Item=wr;F.Trigger=Cr;F.SubTrigger=Rr;F.Section=Pr;F.Separator=Nr;var Fo=require("react/jsx-runtime");function B({className:e,variant:t="rect",...o}){return(0,Fo.jsx)("div",{className:m("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var Tr=require("react-aria-components"),kr=require("react-aria-components");var S=require("react/jsx-runtime"),Lr=e=>{let[t,o]=(0,Wo.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(a);window.open(i,"_blank")}}};function $o({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:i}=Lr(r),l=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:(0,S.jsx)("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:(0,S.jsxs)(pt,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[(0,S.jsx)(me,{variant:"ghost",onPress:a,icon:n?(0,S.jsx)(se.Check,{size:16}):(0,S.jsx)(se.Copy,{size:16}),iconPosition:"left",className:m("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":s}),(0,S.jsxs)(F.Trigger,{placement:"bottom end",children:[(0,S.jsx)(me,{variant:"ghost",isIconOnly:!0,icon:(0,S.jsx)(se.ChevronDown,{size:14}),className:m("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,S.jsxs)(F.Root,{className:"w-52",children:[(0,S.jsxs)(F.Item,{onAction:a,children:[(0,S.jsx)(se.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,S.jsxs)(F.Item,{onAction:i,children:[(0,S.jsx)(se.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var C=require("react/jsx-runtime");function Go(){return(0,C.jsx)("div",{className:m("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,C.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,C.jsxs)("div",{className:"flex gap-2",children:[(0,C.jsx)(B,{className:"h-3 w-16"}),(0,C.jsx)(B,{className:"h-3 w-24"})]}),(0,C.jsx)(B,{className:"h-10 w-[60%] sm:h-12"}),(0,C.jsxs)("div",{className:"space-y-3",children:[(0,C.jsx)(B,{className:"h-4 w-full"}),(0,C.jsx)(B,{className:"h-4 w-[95%]"}),(0,C.jsx)(B,{className:"h-4 w-[40%]"})]}),(0,C.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,C.jsx)(B,{className:"h-7 w-32"}),(0,C.jsxs)("div",{className:"space-y-3",children:[(0,C.jsx)(B,{className:"h-4 w-full"}),(0,C.jsx)(B,{className:"h-4 w-[98%]"}),(0,C.jsx)(B,{className:"h-4 w-[92%]"}),(0,C.jsx)(B,{className:"h-4 w-[60%]"})]})]}),(0,C.jsx)(B,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,C.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,C.jsx)(B,{className:"h-7 w-48"}),(0,C.jsxs)("div",{className:"space-y-3",children:[(0,C.jsx)(B,{className:"h-4 w-full"}),(0,C.jsx)(B,{className:"h-4 w-[85%]"})]})]})]})})}var G=require("react/jsx-runtime"),Ae=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return(0,G.jsxs)(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&(0,G.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,G.jsx)(_o.Link,{size:16})})]})},Uo={...ft,Loading:Go,h1:e=>(0,G.jsx)(Ae,{level:1,...e}),h2:e=>(0,G.jsx)(Ae,{level:2,...e}),h3:e=>(0,G.jsx)(Ae,{level:3,...e}),h4:e=>(0,G.jsx)(Ae,{level:4,...e}),h5:e=>(0,G.jsx)(Ae,{level:5,...e}),h6:e=>(0,G.jsx)(Ae,{level:6,...e}),pre:e=>(0,G.jsx)(le,{...e,children:e.children})};var jo=M(require("virtual:boltdocs-mdx-components"));var qo=require("react-router-dom");var h=require("react/jsx-runtime");function Mr(){let{currentLocale:e,config:t}=Me();return(0,V.useEffect)(()=>{if(!t.i18n)return;let o=t.i18n.localeConfigs?.[e];document.documentElement.lang=o?.htmlLang||e||"en",document.documentElement.dir=o?.direction||"ltr"},[e,t.i18n]),null}function Sr(){let e=(0,qo.useLocation)(),{config:t}=Me(),o=te(i=>i.setLocale),r=te(i=>i.setVersion),n=te(i=>i.currentLocale),a=te(i=>i.currentVersion);return(0,V.useEffect)(()=>{let i=e.pathname.split("/").filter(Boolean),l=0,s=t.versions?.defaultVersion,c=t.i18n?.defaultLocale;if(i[l]==="docs"&&l++,t.versions&&i.length>l){let d=t.versions.versions.find(p=>p.path===i[l]);d&&(s=d.path,l++)}t.i18n&&i.length>l&&t.i18n.locales[i[l]]?c=i[l]:t.i18n&&i.length===0&&(c=n||t.i18n.defaultLocale),c!==n&&o(c),s!==a&&r(s)},[e.pathname,t,o,r,n,a]),null}function Jo({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:i,externalLayout:l,components:s={}}){let[c,d]=(0,V.useState)(e),[p,g]=(0,V.useState)(t),x=i||{},R=l||gt.default,w=(0,V.useMemo)(()=>c.filter(b=>!(a&&(b.path==="/"||b.path===""))&&!x[b.path===""?"/":b.path]).map(b=>{let _=Object.keys(r).find(U=>U===`/${o}/${b.filePath}`||U.endsWith(`/${o}/${b.filePath}`)||U.endsWith(`/${o}\\${b.filePath.replace(/\\/g,"/")}`)),ee=_?r[_]:null;return{...b,Component:V.default.lazy(async()=>ee?await ee():{default:rt})}}),[c,r,o,a,x]);(0,V.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",b=>{d(b)}),n.on("boltdocs:config-update",b=>{g(b)}))},[n]);let f=(0,V.useMemo)(()=>({...Uo,...jo.default,...s}),[s]),H=f.Loading;return(0,h.jsx)(St,{children:(0,h.jsx)(jt,{components:f,children:(0,h.jsx)(Qe.Provider,{value:p,children:(0,h.jsx)(zt,{children:(0,h.jsxs)(Ct,{routes:c,modules:r,children:[(0,h.jsx)(Ft,{}),(0,h.jsx)(Sr,{}),(0,h.jsx)(Mr,{}),(0,h.jsxs)(K.Routes,{children:[(0,h.jsx)(K.Route,{element:(0,h.jsx)(Gt,{}),children:w.map(b=>(0,h.jsx)(K.Route,{path:b.path===""?"/":b.path,element:(0,h.jsx)(V.default.Suspense,{fallback:(0,h.jsx)(H,{}),children:(0,h.jsx)(Jt,{Component:b.Component})})},b.path))},"docs-layout"),a&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(K.Route,{path:"/",element:(0,h.jsx)(R,{children:(0,h.jsx)(a,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(b=>(0,h.jsx)(K.Route,{path:`/${b}`,element:(0,h.jsx)(R,{children:(0,h.jsx)(a,{})})},`home-${b}`))]}),Object.entries(x).map(([b,_])=>{let ee=b==="/"?"":b;return(0,h.jsxs)(V.default.Fragment,{children:[(0,h.jsx)(K.Route,{path:b,element:(0,h.jsx)(R,{children:(0,h.jsx)(_,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(U=>(0,h.jsx)(K.Route,{path:`/${U}${ee}`,element:(0,h.jsx)(R,{children:(0,h.jsx)(_,{})})},`${b}-${U}`))]},b)}),(0,h.jsx)(K.Route,{path:"*",element:(0,h.jsx)(gt.default,{children:(0,h.jsx)(rt,{})})})]})]})})})})})}var Ze=require("react/jsx-runtime");async function Br(e){let{path:t,routes:o,config:r,modules:n,homePage:a,externalPages:i,docsDirName:l}=e,s={};for(let[d,p]of Object.entries(n))s[d]=()=>Promise.resolve(p);return Ko.default.renderToString((0,Ze.jsx)(Xo.default.StrictMode,{children:(0,Ze.jsx)(Yo.StaticRouter,{location:t,children:(0,Ze.jsx)(Jo,{initialRoutes:o,initialConfig:r,docsDirName:l,modules:s,homePage:a,externalPages:i})})}))}0&&(module.exports={render});