boltdocs 2.2.0 → 2.4.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 (124) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/bin/boltdocs.js +2 -2
  3. package/dist/base-ui/index.d.mts +4 -4
  4. package/dist/base-ui/index.d.ts +4 -4
  5. package/dist/base-ui/index.js +1 -1
  6. package/dist/base-ui/index.mjs +1 -1
  7. package/dist/{cache-CRAZ55X7.mjs → cache-P6WK424C.mjs} +1 -1
  8. package/dist/chunk-2DI3OGHV.mjs +1 -0
  9. package/dist/chunk-2Z5T6EAU.mjs +1 -0
  10. package/dist/chunk-64AJ5QLT.mjs +1 -0
  11. package/dist/chunk-DDX52BX4.mjs +1 -0
  12. package/dist/chunk-HRZDSFR5.mjs +1 -0
  13. package/dist/chunk-PPVDMDEL.mjs +1 -0
  14. package/dist/chunk-UBE4CKOA.mjs +1 -0
  15. package/dist/chunk-UWT4AJTH.mjs +73 -0
  16. package/dist/chunk-WWJ7WKDI.mjs +1 -0
  17. package/dist/chunk-Y4RRHPXC.mjs +1 -0
  18. package/dist/client/index.d.mts +15 -21
  19. package/dist/client/index.d.ts +15 -21
  20. package/dist/client/index.js +1 -1
  21. package/dist/client/index.mjs +1 -1
  22. package/dist/client/ssr.js +1 -1
  23. package/dist/client/ssr.mjs +1 -1
  24. package/dist/client/types.d.mts +1 -1
  25. package/dist/client/types.d.ts +1 -1
  26. package/dist/client/types.js +1 -1
  27. package/dist/{copy-markdown-CbS8X-qe.d.mts → copy-markdown--9yjpbyy.d.mts} +1 -1
  28. package/dist/{copy-markdown-C-90ixSe.d.ts → copy-markdown-l2MYkcG7.d.ts} +1 -1
  29. package/dist/hooks/index.d.mts +8 -16
  30. package/dist/hooks/index.d.ts +8 -16
  31. package/dist/hooks/index.js +1 -1
  32. package/dist/hooks/index.mjs +1 -1
  33. package/dist/integrations/index.d.mts +1 -1
  34. package/dist/integrations/index.d.ts +1 -1
  35. package/dist/{loading-chS3pm9W.d.ts → loading-BwUos0wZ.d.mts} +5 -16
  36. package/dist/{loading-BqGrFWO5.d.mts → loading-nlnUD01v.d.ts} +5 -16
  37. package/dist/mdx/index.d.mts +4 -2
  38. package/dist/mdx/index.d.ts +4 -2
  39. package/dist/mdx/index.js +1 -1
  40. package/dist/mdx/index.mjs +1 -1
  41. package/dist/node/cli-entry.js +25 -22
  42. package/dist/node/cli-entry.mjs +5 -1
  43. package/dist/node/index.d.mts +0 -9
  44. package/dist/node/index.d.ts +0 -9
  45. package/dist/node/index.js +14 -15
  46. package/dist/node/index.mjs +1 -1
  47. package/dist/primitives/index.d.mts +13 -22
  48. package/dist/primitives/index.d.ts +13 -22
  49. package/dist/primitives/index.js +1 -1
  50. package/dist/primitives/index.mjs +1 -1
  51. package/dist/search-dialog-OONKKC5H.mjs +1 -0
  52. package/dist/{types-j7jvWsJj.d.ts → types-opDA2E9-.d.mts} +4 -11
  53. package/dist/{types-j7jvWsJj.d.mts → types-opDA2E9-.d.ts} +4 -11
  54. package/dist/{use-routes-Cd806kGw.d.ts → use-routes-DNwgTRpU.d.ts} +1 -1
  55. package/dist/{use-routes-DDL0_jkQ.d.mts → use-routes-DrT80Eom.d.mts} +1 -1
  56. package/package.json +2 -1
  57. package/src/client/app/index.tsx +20 -9
  58. package/src/client/app/mdx-components-context.tsx +2 -2
  59. package/src/client/app/mdx-page.tsx +0 -1
  60. package/src/client/app/scroll-handler.tsx +21 -10
  61. package/src/client/app/theme-context.tsx +14 -7
  62. package/src/client/components/default-layout.tsx +6 -4
  63. package/src/client/components/docs-layout.tsx +34 -4
  64. package/src/client/components/icons-dev.tsx +154 -0
  65. package/src/client/components/mdx/code-block.tsx +57 -5
  66. package/src/client/components/mdx/component-preview.tsx +1 -0
  67. package/src/client/components/mdx/file-tree.tsx +35 -0
  68. package/src/client/components/primitives/helpers/observer.ts +30 -39
  69. package/src/client/components/primitives/index.ts +1 -0
  70. package/src/client/components/primitives/menu.tsx +18 -12
  71. package/src/client/components/primitives/navbar.tsx +34 -93
  72. package/src/client/components/primitives/on-this-page.tsx +7 -161
  73. package/src/client/components/primitives/popover.tsx +1 -2
  74. package/src/client/components/primitives/search-dialog.tsx +4 -4
  75. package/src/client/components/primitives/sidebar.tsx +3 -2
  76. package/src/client/components/primitives/skeleton.tsx +26 -0
  77. package/src/client/components/ui-base/copy-markdown.tsx +4 -10
  78. package/src/client/components/ui-base/index.ts +0 -1
  79. package/src/client/components/ui-base/loading.tsx +43 -73
  80. package/src/client/components/ui-base/navbar.tsx +18 -15
  81. package/src/client/components/ui-base/page-nav.tsx +2 -1
  82. package/src/client/components/ui-base/powered-by.tsx +4 -1
  83. package/src/client/components/ui-base/search-dialog.tsx +16 -5
  84. package/src/client/components/ui-base/sidebar.tsx +4 -2
  85. package/src/client/hooks/use-i18n.ts +3 -2
  86. package/src/client/hooks/use-localized-to.ts +6 -5
  87. package/src/client/hooks/use-navbar.ts +37 -6
  88. package/src/client/hooks/use-page-nav.ts +27 -6
  89. package/src/client/hooks/use-routes.ts +2 -1
  90. package/src/client/hooks/use-search.ts +81 -59
  91. package/src/client/hooks/use-sidebar.ts +2 -1
  92. package/src/client/index.ts +0 -1
  93. package/src/client/store/use-boltdocs-store.ts +6 -5
  94. package/src/client/theme/neutral.css +31 -3
  95. package/src/client/types.ts +2 -2
  96. package/src/node/{cli.ts → cli/build.ts} +17 -23
  97. package/src/node/cli/dev.ts +22 -0
  98. package/src/node/cli/doctor.ts +243 -0
  99. package/src/node/cli/index.ts +9 -0
  100. package/src/node/cli/ui.ts +54 -0
  101. package/src/node/cli-entry.ts +16 -16
  102. package/src/node/config.ts +1 -15
  103. package/src/node/mdx/cache.ts +1 -1
  104. package/src/node/mdx/index.ts +2 -0
  105. package/src/node/mdx/rehype-shiki.ts +9 -0
  106. package/src/node/mdx/remark-code-meta.ts +35 -0
  107. package/src/node/mdx/remark-shiki.ts +1 -1
  108. package/src/node/plugin/entry.ts +22 -15
  109. package/src/node/plugin/index.ts +46 -14
  110. package/src/node/routes/parser.ts +12 -9
  111. package/src/node/search/index.ts +55 -0
  112. package/src/node/ssg/index.ts +83 -15
  113. package/src/node/ssg/robots.ts +7 -4
  114. package/dist/chunk-5D6XPYQ3.mjs +0 -74
  115. package/dist/chunk-6QXCKZAT.mjs +0 -1
  116. package/dist/chunk-H4M6P3DM.mjs +0 -1
  117. package/dist/chunk-JXHNX2WN.mjs +0 -1
  118. package/dist/chunk-MZBG4N4W.mjs +0 -1
  119. package/dist/chunk-Q3MLYTIQ.mjs +0 -1
  120. package/dist/chunk-RSII2UPE.mjs +0 -1
  121. package/dist/chunk-ZK2266IZ.mjs +0 -1
  122. package/dist/chunk-ZRJ55GGF.mjs +0 -1
  123. package/dist/search-dialog-MA5AISC7.mjs +0 -1
  124. package/src/client/components/ui-base/progress-bar.tsx +0 -67
@@ -1 +1 @@
1
- import{a as H,b as O,f as F,h as I,i as U,j as V,k as W,l as q,m as z,n as X}from"../chunk-6QXCKZAT.mjs";import{a as $}from"../chunk-RSII2UPE.mjs";import{a as fo,b as E,c as Co,d as xo,e as Ro,f as ho,g as Lo,h as Po,i as vo,j as bo,k as To,l as Mo,m as Bo,n as Ho,o as So,p as ko,q as wo,r as No,s as Do,t as Eo,u as Ao,v as Oo,w as $o,x as Fo,y as Y}from"../chunk-MZBG4N4W.mjs";import{a as A}from"../chunk-ZK2266IZ.mjs";import{a as Q,b as lo}from"../chunk-JD3RSDE4.mjs";import{a as uo,b as yo,c as go}from"../chunk-T3W44KWY.mjs";import{a as R}from"../chunk-ZRJ55GGF.mjs";import{a as G,b as D,d as J,e as b,f as x}from"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";import k,{useEffect as K,useState as io,useMemo as mo}from"react";import oe from"react-dom/client";import{BrowserRouter as ee,Routes as te,Route as g}from"react-router-dom";import M from"virtual:boltdocs-layout";import{startTransition as Io}from"react";import{RouterProvider as Uo}from"react-aria-components";import{useNavigate as Vo,useHref as Wo}from"react-router-dom";import{jsx as qo}from"react/jsx-runtime";function Z({children:o}){let e=Vo();return qo(Uo,{navigate:(t,a)=>{Io(()=>{e(t,a)})},useHref:Wo,children:o})}import{useLayoutEffect as zo}from"react";import{useLocation as Xo}from"react-router-dom";function j(){let{pathname:o,hash:e}=Xo();return zo(()=>{let t=document.querySelector(".boltdocs-content");if(t){if(e){let a=e.replace("#",""),i=document.getElementById(a);if(i){let r=t.getBoundingClientRect().top,p=i.getBoundingClientRect().top-r-80+t.scrollTop;t.scrollTo({top:p,behavior:"smooth"});return}}t.scrollTo(0,0)}},[o,e]),null}import{Outlet as Ko}from"react-router-dom";import _o from"virtual:boltdocs-layout";import{jsx as oo}from"react/jsx-runtime";function eo(){return oo(_o,{children:oo(Ko,{})})}import{MDXProvider as Yo}from"@mdx-js/react";import{createContext as Go,useContext as Jo}from"react";import{jsx as Qo}from"react/jsx-runtime";var to=Go({});function T(){return Jo(to)}function no({components:o,children:e}){return Qo(to.Provider,{value:o,children:e})}import{jsx as ro}from"react/jsx-runtime";function so({Component:o}){let e=T();return ro(Yo,{components:e,children:ro(o,{})})}import{Link as Zo}from"lucide-react";import{jsx as u,jsxs as jo}from"react/jsx-runtime";var h=({level:o,id:e,children:t,...a})=>{let i=`h${o}`;return jo(i,{id:e,...a,className:"boltdocs-heading",children:[t,e&&u("a",{href:`#${e}`,className:"header-anchor","aria-label":"Anchor",children:u(Zo,{size:16})})]})},ao={...Y,Loading:O,h1:o=>u(h,{level:1,...o}),h2:o=>u(h,{level:2,...o}),h3:o=>u(h,{level:3,...o}),h4:o=>u(h,{level:4,...o}),h5:o=>u(h,{level:5,...o}),h6:o=>u(h,{level:6,...o}),pre:o=>u(E,{...o,children:o.children})};import{useLocation as ne}from"react-router-dom";import{Fragment as me,jsx as n,jsxs as S}from"react/jsx-runtime";function re(){let{currentLocale:o,config:e}=x();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 se(){let o=ne(),{config:e}=x(),t=b(r=>r.setLocale),a=b(r=>r.setVersion),i=b(r=>r.currentLocale),c=b(r=>r.currentVersion);return K(()=>{let r=o.pathname.split("/").filter(Boolean),m=0,l=e.versions?.defaultVersion,p=e.i18n?.defaultLocale;if(r[m]==="docs"&&m++,e.versions&&r.length>m){let d=e.versions.versions.find(P=>P.path===r[m]);d&&(l=d.path,m++)}e.i18n&&r.length>m&&e.i18n.locales[r[m]]?p=r[m]:e.i18n&&r.length===0&&(p=i||e.i18n.defaultLocale),p!==i&&t(p),l!==c&&a(l)},[o.pathname,e,t,a,i,c]),null}function ae({initialRoutes:o,initialConfig:e,docsDirName:t,modules:a,hot:i,homePage:c,externalPages:r,components:m={}}){let[l,p]=io(o),[d,P]=io(e),N=r||{},po=mo(()=>l.filter(s=>!(c&&(s.path==="/"||s.path===""))&&!N[s.path===""?"/":s.path]).map(s=>{let v=Object.keys(a).find(y=>y===`/${t}/${s.filePath}`||y.endsWith(`/${t}/${s.filePath}`)||y.endsWith(`/${t}\\${s.filePath.replace(/\\/g,"/")}`)),B=v?a[v]:null;return{...s,Component:k.lazy(async()=>B?await B():{default:H})}}),[l,a,t,c,N]);K(()=>{i&&(i.on("boltdocs:routes-update",s=>{p(s)}),i.on("boltdocs:config-update",s=>{P(s)}))},[i]);let _=mo(()=>({...ao,...m}),[m]),co=_.Loading;return n(Q,{children:n(no,{components:_,children:n(G.Provider,{value:d,children:n(Z,{children:S(J,{routes:l,modules:a,children:[n(j,{}),n(se,{}),n(re,{}),S(te,{children:[n(g,{element:n(eo,{}),children:po.map(s=>n(g,{path:s.path===""?"/":s.path,element:n(k.Suspense,{fallback:n(co,{}),children:n(so,{Component:s.Component})})},s.path))},"docs-layout"),c&&S(me,{children:[n(g,{path:"/",element:n(M,{children:n(c,{})})}),d.i18n&&Object.keys(d.i18n.locales).map(s=>n(g,{path:`/${s}`,element:n(M,{children:n(c,{})})},`home-${s}`))]}),Object.entries(N).map(([s,v])=>{let B=s==="/"?"":s;return S(k.Fragment,{children:[n(g,{path:s,element:n(M,{children:n(v,{})})}),d.i18n&&Object.keys(d.i18n.locales).map(y=>n(g,{path:`/${y}${B}`,element:n(M,{children:n(v,{})})},`${s}-${y}`))]},s)}),n(g,{path:"*",element:n(M,{children:n(H,{})})})]})]})})})})})}function ie(o){let{target:e,routes:t,docsDirName:a,config:i,modules:c,hot:r,homePage:m,externalPages:l,components:p}=o,d=document.querySelector(e);if(!d)throw new Error(`[boltdocs] Mount target "${e}" not found in document.`);let P=n(k.StrictMode,{children:n(ee,{children:n(ae,{initialRoutes:t,initialConfig:i,docsDirName:a,modules:c,hot:r,homePage:m,externalPages:l,components:p})})});d.innerHTML="",oe.createRoot(d).render(P)}import{jsx as L}from"react/jsx-runtime";function pe({children:o,className:e,style:t}){return L("div",{className:R("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",e),style:t,children:o})}function ce({children:o,className:e,style:t}){return L("div",{className:R("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",e),style:t,children:o})}function le({children:o,className:e,style:t}){return L("main",{className:R("boltdocs-content flex-1 min-w-0 overflow-y-auto",e),style:t,children:L("div",{className:"boltdocs-page mx-auto max-w-content-max pt-4 pb-20 px-4 sm:px-8",children:o})})}function de({children:o,className:e,style:t}){return L("div",{className:R("flex items-center justify-between mb-10",e),style:t,children:o})}function fe({children:o,className:e,style:t}){return L("div",{className:R("mt-20",e),style:t,children:o})}var C=Object.assign(pe,{Body:ce,Content:le,ContentHeader:de,ContentFooter:fe});import{useLocation as ue}from"react-router-dom";import{jsx as f,jsxs as w}from"react/jsx-runtime";function ye({children:o}){let{routes:e,allRoutes:t,currentRoute:a,currentLocale:i}=x(),{pathname:c}=ue(),r=D(),l=T().CopyMarkdown||A,p=c==="/"||c==="";return w(C,{children:[f(z,{}),f(V,{siteTitle:$(r.theme?.title,i)||"Boltdocs",siteDescription:$(r.theme?.description,i)||"",routes:t}),f(F,{}),w(C.Body,{children:[!p&&f(I,{routes:e,config:r}),w(C.Content,{children:[!p&&w(C.ContentHeader,{children:[f(W,{}),f(l,{mdxRaw:a?._rawContent,route:a,config:r.theme?.copyMarkdown})]}),f(X,{children:o}),!p&&f(C.ContentFooter,{children:f(q,{})})]}),!p&&f(U,{headings:a?.headings,editLink:r.theme?.editLink,communityHelp:r.theme?.communityHelp,filePath:a?.filePath})]})]})}export{vo as Admonition,ho as Badge,W as Breadcrumbs,fo as Button,Po as Card,Lo as Cards,ko as Caution,E as CodeBlock,Fo as ComponentPreview,$o as ComponentProps,A as CopyMarkdown,Bo as Danger,ye as DefaultLayout,C as DocsLayout,X as ErrorBoundary,Eo as Field,No as FileTree,V as Head,Oo as Image,So as Important,Ho as InfoBox,Ao as Link,wo as List,O as Loading,F as Navbar,H as NotFound,bo as Note,U as OnThisPage,q as PageNav,z as ProgressBar,I as Sidebar,Co as Tab,Do as Table,xo as Tabs,To as Tip,Ro as Video,Mo as Warning,ie as createBoltdocsApp,uo as defineSandbox,go as embedSandbox,yo as openSandbox,D as useConfig,T as useMdxComponents,x as useRoutes,lo as useTheme};
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 +1 @@
1
- "use strict";var rr=Object.create;var Me=Object.defineProperty;var nr=Object.getOwnPropertyDescriptor;var sr=Object.getOwnPropertyNames;var ir=Object.getPrototypeOf,ar=Object.prototype.hasOwnProperty;var gt=(e,t)=>{for(var o in t)Me(e,o,{get:t[o],enumerable:!0})},bt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of sr(t))!ar.call(e,n)&&n!==o&&Me(e,n,{get:()=>t[n],enumerable:!(r=nr(t,n))||r.enumerable});return e};var N=(e,t,o)=>(o=e!=null?rr(ir(e)):{},bt(t||!e||!e.__esModule?Me(o,"default",{value:e,enumerable:!0}):o,e)),lr=e=>bt(Me({},"__esModule",{value:!0}),e);var tn={};gt(tn,{render:()=>en});module.exports=lr(tn);var Qo=N(require("react")),Yo=N(require("react-dom/server")),er=require("react-router-dom/server");var I=N(require("react")),Jr=N(require("react-dom/client")),Z=require("react-router-dom");var Tt=require("lucide-react");var Qe=N(require("react")),Pt=require("react-aria-components"),wt=require("react-router-dom");var Ie=require("react"),Ze=(0,Ie.createContext)(null);function ne(){let e=(0,Ie.use)(Ze);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Ct=require("react-router-dom");var se=require("react"),vt=require("react/jsx-runtime"),xt=(0,se.createContext)({preload:()=>{},routes:[]});function Ee(){return(0,se.use)(xt)}function ht({routes:e,modules:t,children:o}){let r=(0,se.useRef)(null),n=(0,se.useCallback)(i=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let l=i.split("#")[0].split("?")[0],a=e.find(s=>s.path===l||l==="/"&&s.path==="");if(a?.filePath){let s=Object.keys(t).find(d=>d.endsWith("/"+a.filePath));s&&t[s]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${i}:`,d)})}},100)},[e,t]);return(0,vt.jsx)(xt.Provider,{value:{preload:n,routes:e},children:o})}var yt=require("zustand"),Oe=require("zustand/middleware"),Y=(0,yt.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 Re(){let{routes:e}=Ee(),t=ne(),o=(0,Ct.useLocation)(),r=Y(p=>p.currentLocale),n=Y(p=>p.currentVersion),i=Y(p=>p.hasHydrated),l=e.find(p=>p.path===o.pathname),a=t.i18n?l?.locale||(i?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?l?.version||(i?n:void 0)||t.versions.defaultVersion:void 0,d=e.filter(p=>{let T=t.i18n?(p.locale||t.i18n.defaultLocale)===a:!0,E=t.versions?(p.version||t.versions.defaultVersion)===s:!0;if(!(T&&E))return!1;let U=t.i18n;if(U){let tr=!!l?.locale,or=!!p.locale;if(e.some(Se=>Se!==p&&Se.filePath===p.filePath&&Se.version===p.version&&(Se.locale||U.defaultLocale)===(p.locale||U.defaultLocale))&&tr!==or)return!1}return!0}),f=t.i18n?.localeConfigs?.[a]?.label||t.i18n?.locales[a]||a,b=t.versions?.versions.find(p=>p.path===s)?.label||s,y=t.i18n?Object.entries(t.i18n.locales).map(([p,T])=>{let E=t.i18n?.localeConfigs?.[p];return{key:p,label:E?.label||T,isCurrent:p===a}}):[],C=t.versions?t.versions.versions.map(p=>({key:p.path,label:p.label,isCurrent:p.path===s})):[];return{routes:d,allRoutes:e,currentRoute:l,currentLocale:a,currentLocaleLabel:f,availableLocales:y,currentVersion:s,currentVersionLabel:b,availableVersions:C,config:t}}function Je(e){let t=ne(),{currentLocale:o,currentVersion:r}=Re();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,i=t.versions;if(!n&&!i)return e;let l=e.startsWith("/docs"),a=e.split("/").filter(Boolean),s=0;a[s]==="docs"&&s++,i&&a.length>s&&i.versions.find(b=>b.path===a[s])&&s++,n&&a.length>s&&n.locales[a[s]]&&s++;let d=a.slice(s),m=[];l&&(m.push("docs"),i&&r&&m.push(r)),n&&o&&o!==n.defaultLocale&&m.push(o),m.push(...d);let f=`/${m.join("/")}`;return f.length>1&&f.endsWith("/")?f.slice(0,-1):f||"/"}var Rt=require("clsx"),Nt=require("tailwind-merge");function c(...e){return(0,Nt.twMerge)((0,Rt.clsx)(e))}var Ye=require("react/jsx-runtime"),ie=Qe.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:i,...l}=e,a=Je(o??""),{preload:s}=Ee();return(0,Ye.jsx)(Pt.Link,{...l,ref:t,href:a,onMouseEnter:f=>{n?.(f),r==="hover"&&typeof a=="string"&&a.startsWith("/")&&s(a)},onFocus:f=>{i?.(f),r==="hover"&&typeof a=="string"&&a.startsWith("/")&&s(a)}})});ie.displayName="Link";var cr=Qe.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:i,...l}=e,a=(0,wt.useLocation)(),s=Je(o??""),d=r?a.pathname===s:a.pathname.startsWith(s),m=typeof n=="function"?n({isActive:d}):c(n,d&&"active"),f=typeof i=="function"?i({isActive:d}):i;return(0,Ye.jsx)(ie,{...l,ref:t,href:o,className:m,children:f})});cr.displayName="NavLink";var ee=require("react/jsx-runtime");function et(){return(0,ee.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,ee.jsxs)("div",{className:"space-y-4",children:[(0,ee.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,ee.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,ee.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,ee.jsxs)(ie,{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,ee.jsx)(Tt.ArrowLeft,{size:16})," Go to Home"]})]})})}var j=require("react"),Bt=require("react/jsx-runtime"),kt=(0,j.createContext)(void 0);function Lt({children:e}){let[t,o]=(0,j.useState)("system"),[r,n]=(0,j.useState)("dark"),[i,l]=(0,j.useState)(!1);(0,j.useEffect)(()=>{l(!0);let s=localStorage.getItem("boltdocs-theme"),d=s==="light"||s==="dark"||s==="system"?s:"system";o(d);let m=window.matchMedia("(prefers-color-scheme: dark)");((b,y)=>{n(b==="system"?y?"dark":"light":b)})(d,m.matches);let g=b=>{n(y=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?b.matches?"dark":"light":y)};return m.addEventListener("change",g),()=>m.removeEventListener("change",g)},[]),(0,j.useEffect)(()=>{if(!i)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,d=t==="system"?s?"dark":"light":t;n(d);let m=document.documentElement;d==="light"?(m.classList.add("theme-light"),m.dataset.theme="light"):(m.classList.remove("theme-light"),m.dataset.theme="dark")},[t,i]);let a=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return(0,Bt.jsx)(kt.Provider,{value:{theme:t,resolvedTheme:r,setTheme:a},children:e})}function At(){let e=(0,j.use)(kt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var Ce=N(require("virtual:boltdocs-layout"));var St=require("react"),Mt=require("react-aria-components"),Ve=require("react-router-dom"),Et=require("react/jsx-runtime");function It({children:e}){let t=(0,Ve.useNavigate)();return(0,Et.jsx)(Mt.RouterProvider,{navigate:(o,r)=>{(0,St.startTransition)(()=>{t(o,r)})},useHref:Ve.useHref,children:e})}var Ot=require("react"),Vt=require("react-router-dom");function Ht(){let{pathname:e,hash:t}=(0,Vt.useLocation)();return(0,Ot.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content");if(o){if(t){let r=t.replace("#",""),n=document.getElementById(r);if(n){let l=o.getBoundingClientRect().top,d=n.getBoundingClientRect().top-l-80+o.scrollTop;o.scrollTo({top:d,behavior:"smooth"});return}}o.scrollTo(0,0)}},[e,t]),null}var Dt=require("react-router-dom"),zt=N(require("virtual:boltdocs-layout")),tt=require("react/jsx-runtime");function Ft(){return(0,tt.jsx)(zt.default,{children:(0,tt.jsx)(Dt.Outlet,{})})}var Ut=require("@mdx-js/react");var He=require("react"),Gt=require("react/jsx-runtime"),$t=(0,He.createContext)({});function Wt(){return(0,He.useContext)($t)}function _t({components:e,children:t}){return(0,Gt.jsx)($t.Provider,{value:e,children:t})}var ot=require("react/jsx-runtime");function jt({Component:e}){let t=Wt();return(0,ot.jsx)(Ut.MDXProvider,{components:t,children:(0,ot.jsx)(e,{})})}var Xo=require("lucide-react");var ft={};gt(ft,{Admonition:()=>oe,Badge:()=>io,Button:()=>Xt,Card:()=>po,Cards:()=>mo,Caution:()=>Co,CodeBlock:()=>ae,ComponentPreview:()=>Eo,ComponentProps:()=>Mo,CopyMarkdown:()=>jo,Danger:()=>ho,Field:()=>ko,FileTree:()=>Po,Image:()=>Bo,Important:()=>yo,InfoBox:()=>vo,Link:()=>Lo,List:()=>Ro,Note:()=>go,Tab:()=>oo,Table:()=>To,Tabs:()=>ro,Tip:()=>bo,Video:()=>no,Warning:()=>xo});var ze=N(require("react-aria-components"));var qt=require("class-variance-authority"),q=require("react/jsx-runtime"),De=(0,qt.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"}}),de=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:i,variant:l,size:a,rounded:s,iconSize:d,disabled:m,...f})=>{let g=r||!n&&!!t,b=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)(ze.Link,{href:e,className:c(De({variant:l,size:a,rounded:s,iconSize:g?d:void 0,disabled:m}),i),...f,children:b}):(0,q.jsx)(ze.Button,{className:c(De({variant:l,size:a,rounded:s,iconSize:g?d:void 0,disabled:m}),i),...f,children:b})};var Kt=require("react/jsx-runtime"),Xt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:i,...l})=>(0,Kt.jsx)(de,{className:c("group",De({variant:t,size:o,rounded:r,iconSize:n,disabled:i,className:e})),...l});var Fe=N(require("react-aria-components")),$e=require("lucide-react");var rt=require("codesandbox/lib/api/define.js");function Zt(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",i=e.description||"Generic Sandbox",l={};for(let[a,s]of Object.entries(t)){let d=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;l[a]={content:d,isBinary:s.isBinary??!1}}if(!l["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"};l["package.json"]={content:JSON.stringify({private:!0,name:n,description:i,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return l}function dr(e){let t=Zt(e),o=(0,rt.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 Jt(e){if(typeof window>"u")return dr(e);let t=Zt(e),o=(0,rt.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 i=(a,s)=>{let d=document.createElement("input");d.type="hidden",d.name=a,d.value=s,n.appendChild(d)},l=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return i("query",l.toString()),i("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 Qt=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 X=require("react");function Yt(e){let{title:t,sandbox:o}=e,[r,n]=(0,X.useState)(!1),[i,l]=(0,X.useState)(!1),[a,s]=(0,X.useState)(!1),d=(0,X.useRef)(null),m=ne(),f=(0,X.useCallback)(async()=>{let b=d.current?.textContent??"";Qt(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),g=(0,X.useCallback)(()=>{let b=d.current?.textContent??"",y=m?.integrations?.sandbox?.config||{},C=typeof o=="object"?o:y,p=C.entry||"src/App.tsx";Jt({title:t??"Code Snippet",...C,files:{...C.files,[p]:{content:b}}})},[t,m,o]);return(0,X.useEffect)(()=>{let b=d.current?.textContent?.length??0;s(b>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:i,setIsExpanded:l,isExpandable:a,preRef:d,handleCopy:f,handleSandbox:g,shouldTruncate:a&&!i}}var Ne=require("react/jsx-runtime");function mr(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var eo=e=>(0,Ne.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...mr(e),children:[(0,Ne.jsx)("title",{children:"CodeSandbox"}),(0,Ne.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var me=N(require("react-aria-components"));var $=require("react/jsx-runtime"),ur=({className:e,children:t,...o})=>(0,$.jsx)(me.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,$.jsxs)($.Fragment,{children:[(0,$.jsx)(me.OverlayArrow,{children:(0,$.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,$.jsx)("title",{children:"Arrow"}),(0,$.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),nt=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,$.jsxs)(me.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,$.jsx)(ur,{...n,children:e})]});var A=require("react/jsx-runtime");function ae(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:i,...l}=e,d=!!ne()?.integrations?.sandbox?.enable&&!r,{copied:m,isExpanded:f,setIsExpanded:g,isExpandable:b,preRef:y,handleCopy:C,handleSandbox:p,shouldTruncate:T}=Yt(e);return(0,A.jsxs)("div",{className:c("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",T&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[(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:[d&&(0,A.jsx)(nt,{content:"Open in CodeSandbox",children:(0,A.jsx)(Fe.Button,{onPress:p,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)(eo,{size:20})})}),!n&&(0,A.jsx)(nt,{content:m?"Copied!":"Copy code",children:(0,A.jsx)(Fe.Button,{onPress:C,className:c("grid place-items-center w-8 h-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-115 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2",m?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:m?(0,A.jsx)($e.Check,{size:20}):(0,A.jsx)($e.Copy,{size:20})})})]}),i?(0,A.jsx)("div",{ref:y,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:i}}):(0,A.jsx)("pre",{ref:y,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...l,children:t}),b&&(0,A.jsx)("div",{className:c(T?"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)(Fe.Button,{onPress:()=>g(!f),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:f?"Show less":"Expand code"})})]})}var pe=require("react"),le=N(require("react-aria-components"));var te=require("react");function to({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=(0,te.useState)(o===-1?0:o),i=(0,te.useRef)([]),[l,a]=(0,te.useState)({opacity:0,transform:"translateX(0)",width:0});(0,te.useEffect)(()=>{let d=i.current[r];d&&a({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let s=(0,te.useCallback)(d=>{let m=0;if(d.key==="ArrowRight"?m=1:d.key==="ArrowLeft"&&(m=-1),m!==0){let f=(r+m+t.length)%t.length;for(;t[f].props.disabled&&f!==r;)f=(f+m+t.length)%t.length;f!==r&&!t[f].props.disabled&&(n(f),i.current[f]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:i,indicatorStyle:l,handleKeyDown:s}}var st=require("class-variance-authority"),O=require("react/jsx-runtime"),fr=(0,st.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"}}),gr=(0,st.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 oo({children:e}){let t=typeof e=="string"?(0,O.jsx)(ae,{className:"language-bash",children:(0,O.jsx)("code",{children:e.trim()})}):e;return(0,O.jsx)("div",{className:"py-4",children:t})}function ro({defaultIndex:e=0,children:t}){let o=(0,pe.useMemo)(()=>pe.Children.toArray(t).filter(a=>(0,pe.isValidElement)(a)&&a.props?.label),[t]),{active:r,setActive:n,tabRefs:i,indicatorStyle:l}=to({initialIndex:e,tabs:o});return(0,O.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,O.jsxs)(le.Tabs,{selectedKey:r.toString(),onSelectionChange:a=>n(Number(a)),className:"w-full",children:[(0,O.jsxs)(le.TabList,{"aria-label":"Content Tabs",className:c(fr()),children:[o.map((a,s)=>{let{label:d,icon:m,disabled:f}=a.props,g=s.toString();return(0,O.jsxs)(le.Tab,{id:g,isDisabled:f,ref:b=>{i.current[s]=b},className:({isSelected:b,isDisabled:y})=>c(gr({isActive:b,isDisabled:y})),children:[!!m&&(0,O.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),(0,O.jsx)("span",{children:d})]},g)}),(0,O.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:l,"aria-hidden":"true"})]}),o.map((a,s)=>(0,O.jsx)(le.TabPanel,{id:s.toString(),children:o[s]},s))]})})}var ue=require("react"),Pe=require("react/jsx-runtime");function no({src:e,poster:t,alt:o,children:r,controls:n,preload:i="metadata",...l}){let a=(0,ue.useRef)(null),[s,d]=(0,ue.useState)(!1);return(0,ue.useEffect)(()=>{let m=a.current;if(!m)return;let f=new IntersectionObserver(([g])=>{g.isIntersecting&&(d(!0),f.disconnect())},{rootMargin:"200px"});return f.observe(m),()=>f.disconnect()},[]),(0,Pe.jsx)("div",{ref:a,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?(0,Pe.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:i,playsInline:!0,...l,children:[r,"Your browser does not support the video tag."]}):(0,Pe.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var so=require("class-variance-authority"),ao=require("react/jsx-runtime"),br=(0,so.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 io({variant:e="default",children:t,className:o="",...r}){return(0,ao.jsx)("span",{className:c(br({variant:e}),o),...r,children:t})}var we=require("react"),lo=N(require("react-aria-components"));var co=require("class-variance-authority"),V=require("react/jsx-runtime"),xr=(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 mo({cols:e=3,children:t,className:o="",...r}){return(0,V.jsx)("div",{className:c(xr({cols:e}),o),...r,children:t})}function po({title:e,icon:t,href:o,children:r,className:n="",...i}){let l=(0,we.useRef)(null),a=(0,we.useRef)(null),s=(0,we.useCallback)(f=>{let g=l.current||a.current;if(!g)return;let{left:b,top:y}=g.getBoundingClientRect();g.style.setProperty("--x",`${f.clientX-b}px`),g.style.setProperty("--y",`${f.clientY-y}px`)},[]),d=(0,V.jsxs)(V.Fragment,{children:[(0,V.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,V.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,V.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,V.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,V.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),m=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,V.jsx)(lo.Link,{ref:a,href:o,className:c(m,"no-underline cursor-pointer"),onMouseMove:s,...i,children:d}):(0,V.jsx)("div",{ref:l,role:"presentation",className:m,onMouseMove:s,...i,children:d})}var S=require("lucide-react");var fo=require("class-variance-authority"),P=require("react/jsx-runtime"),hr={note:(0,P.jsx)(S.Bookmark,{size:18}),tip:(0,P.jsx)(S.Lightbulb,{size:18}),info:(0,P.jsx)(S.Info,{size:18}),warning:(0,P.jsx)(S.AlertTriangle,{size:18}),danger:(0,P.jsx)(S.ShieldAlert,{size:18}),important:(0,P.jsx)(S.Flame,{size:18}),caution:(0,P.jsx)(S.Zap,{size:18})},vr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},uo=(0,fo.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 oe({type:e="note",title:t,children:o,className:r="",...n}){return(0,P.jsxs)("div",{className:c(uo({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,P.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,P.jsx)("span",{className:c("shrink-0",uo({type:e})),children:hr[e]}),(0,P.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||vr[e]})]}),(0,P.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var go=e=>(0,P.jsx)(oe,{type:"note",...e}),bo=e=>(0,P.jsx)(oe,{type:"tip",...e}),xo=e=>(0,P.jsx)(oe,{type:"warning",...e}),ho=e=>(0,P.jsx)(oe,{type:"danger",...e}),vo=e=>(0,P.jsx)(oe,{type:"info",...e}),yo=e=>(0,P.jsx)(oe,{type:"important",...e}),Co=e=>(0,P.jsx)(oe,{type:"caution",...e});var We=require("react"),fe=require("lucide-react");var _e=require("class-variance-authority"),K=require("react/jsx-runtime"),yr=(0,_e.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}}),Cr=(0,_e.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}}),Rr=(0,_e.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 Nr({icon:e,children:t,variant:o,dense:r}){return(0,K.jsxs)("li",{className:c(Cr({variant:o,dense:r})),children:[e&&(0,K.jsx)("span",{className:c(Rr({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,K.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Pr={checked:e=>(0,K.jsx)(fe.Check,{size:14,className:c("text-emerald-500 shrink-0",e)}),arrow:e=>(0,K.jsx)(fe.ChevronRight,{size:14,className:c("text-primary-400 shrink-0",e)}),bubble:e=>(0,K.jsx)(fe.Circle,{size:6,fill:"currentColor",className:c("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Ro({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...i}){let l=t!==void 0&&Number(t)>1,a=Pr[e],s=yr({variant:e,cols:t,dense:o,isGrid:l,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,K.jsx)(d,{className:s,...i,children:r}):(0,K.jsx)("ul",{className:s,...i,children:We.Children.map(r,m=>{if(!(0,We.isValidElement)(m))return m;let f=m,g=f.type==="li"?f.props.children:f.props.children||m;return(0,K.jsx)(Nr,{icon:a(),variant:e,dense:o,children:g})})})}var J=require("react"),Q=N(require("react-aria-components")),W=require("lucide-react");var w=require("react/jsx-runtime"),Te=16,ke=2,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 lt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(lt).join(""):(0,J.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?lt(e.props.children):""}function wr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,w.jsx)(W.Folder,{size:Te,strokeWidth:ke,className:c(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=c(r,"text-text-dim group-hover:text-text-main");return it.CODE.test(o)?(0,w.jsx)(W.FileCode,{size:Te,strokeWidth:ke,className:n}):it.TEXT.test(o)?(0,w.jsx)(W.FileText,{size:Te,strokeWidth:ke,className:n}):it.IMAGE.test(o)?(0,w.jsx)(W.FileImage,{size:Te,strokeWidth:ke,className:n}):(0,w.jsx)(W.File,{size:Te,strokeWidth:ke,className:n})}function at(e,t){if(!(0,J.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 Tr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ge(e,t="root"){if(!(0,J.isValidElement)(e))return[];let o=[];if(at(e,"ul"))return J.Children.forEach(e.props.children,(r,n)=>{o.push(...Ge(r,`${t}-${n}`))}),o;if(at(e,"li")){let r=J.Children.toArray(e.props.children),n=r.findIndex(y=>at(y,"ul")),i=n!==-1,l=i?r.slice(0,n):r,a=i?r.slice(n):[],s=lt(l),{name:d,comment:m}=Tr(s),f=d.endsWith("/"),g=f?d.slice(0,-1):d,b=i||f;return o.push({id:`${t}-${g}`,name:g,comment:m,isFolder:b,children:i?Ge(a[0],`${t}-${g}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&J.Children.forEach(e.props.children,(r,n)=>{o.push(...Ge(r,`${t}-${n}`))}),o}function No({item:e}){return(0,w.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,w.jsx)(Q.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,w.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,w.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,w.jsx)(Q.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,w.jsx)(W.ChevronRight,{size:14,strokeWidth:3,className:c("transition-transform duration-200",t&&"rotate-90")})}):(0,w.jsx)("div",{className:"w-[18px]"}),wr(e.name,e.isFolder),(0,w.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,w.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,w.jsx)(Q.Collection,{items:e.children,children:t=>(0,w.jsx)(No,{item:t})})]})}function Po({children:e}){let t=(0,J.useMemo)(()=>Ge(e),[e]);return(0,w.jsx)("div",{className:"my-8",children:(0,w.jsx)(Q.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,w.jsx)(No,{item:o})})})}var Le=N(require("react-aria-components"));var ge=require("react");function wo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,i]=(0,ge.useState)(null),[l,a]=(0,ge.useState)(1),s=(0,ge.useMemo)(()=>{if(!e)return[];let g=[...e];return t&&n!==null&&g.sort((b,y)=>{let C=b[n.key],p=y[n.key],T=typeof C=="string"?C:"",E=typeof p=="string"?p:"";return T<E?n.direction==="asc"?-1:1:T>E?n.direction==="asc"?1:-1:0}),g},[e,n,t]),d=Math.ceil(s.length/r),m=(0,ge.useMemo)(()=>{if(!o)return s;let g=(l-1)*r;return s.slice(g,g+r)},[s,o,l,r]);return{sortConfig:n,currentPage:l,setCurrentPage:a,totalPages:d,paginatedData:m,requestSort:g=>{if(!t)return;let b="asc";n&&n.key===g&&n.direction==="asc"&&(b="desc"),i({key:g,direction:b})}}}var H=require("lucide-react");var h=require("react/jsx-runtime");function To({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:i=!1,pageSize:l=10}){let{sortConfig:a,currentPage:s,setCurrentPage:d,totalPages:m,paginatedData:f,requestSort:g}=wo({data:t,sortable:n,paginated:i,pageSize:l}),b=C=>n?a?.key!==C?(0,h.jsx)(H.ChevronDown,{size:14,className:"ml-1 opacity-30"}):a.direction==="asc"?(0,h.jsx)(H.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,h.jsx)(H.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,y=o||(0,h.jsxs)(h.Fragment,{children:[e&&(0,h.jsx)("thead",{children:(0,h.jsx)("tr",{children:e.map((C,p)=>(0,h.jsx)("th",{onClick:()=>g(p),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,h.jsxs)("div",{className:"flex items-center",children:[C,b(p)]})},p))})}),f&&(0,h.jsx)("tbody",{children:f.map((C,p)=>(0,h.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:C.map((T,E)=>(0,h.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:T},E))},p))})]});return(0,h.jsxs)("div",{className:c("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,h.jsx)("div",{className:"overflow-x-auto",children:(0,h.jsx)("table",{className:"w-full border-collapse text-sm",children:y})}),i&&m>1&&(0,h.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,h.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",m]}),(0,h.jsxs)("div",{className:"flex items-center gap-1",children:[(0,h.jsx)(Le.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,h.jsx)(H.ChevronsLeft,{size:16})}),(0,h.jsx)(Le.Button,{onPress:()=>d(C=>Math.max(C-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,h.jsx)(H.ChevronLeft,{size:16})}),(0,h.jsx)(Le.Button,{onPress:()=>d(C=>Math.min(C+1,m)),isDisabled:s===m,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,h.jsx)(H.ChevronRight,{size:16})}),(0,h.jsx)(Le.Button,{onPress:()=>d(m),isDisabled:s===m,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,h.jsx)(H.ChevronsRight,{size:16})})]})]})]})}var D=require("react/jsx-runtime");function ko({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:i,className:l=""}){return(0,D.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",l),id:i,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 Ao=require("react/jsx-runtime");function Lo({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),i=c("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Ao.jsx)(ie,{href:e,className:i,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var So=require("react/jsx-runtime");function Bo({src:e,alt:t,theme:o,...r}){let{theme:n}=At();return o&&o!==n?null:(0,So.jsx)("img",{src:e,alt:t||"",...r})}var R=require("react/jsx-runtime");function Mo({title:e,props:t,className:o=""}){return(0,R.jsxs)("div",{className:c("my-6",o),children:[e&&(0,R.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,R.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,R.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,R.jsx)("thead",{children:(0,R.jsxs)("tr",{children:[(0,R.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,R.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,R.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,R.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,R.jsx)("tbody",{children:t.map((r,n)=>(0,R.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,R.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,R.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,R.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,R.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,R.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,R.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var ct=require("react");function Io(e){let{code:t,children:o,preview:r}=e,n=(0,ct.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),i=(0,ct.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:i}}var be=require("react/jsx-runtime");function Eo(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:i={}}=e,{initialCode:l,previewElement:a}=Io(e);return(0,be.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,be.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:a}),!o&&(0,be.jsx)("div",{className:"border-t border-border-subtle",children:(0,be.jsx)(ae,{hideSandbox:r,hideCopy:n,title:i.title,lang:"tsx",highlightedHtml:t,children:l})})]})}var Uo=require("react"),re=require("lucide-react");var Oo=require("react");var kr=require("react-aria-components"),Ae=require("lucide-react");var Vo=require("react/jsx-runtime");var Be=N(require("react-aria-components")),Lr=require("lucide-react");var pt=require("react/jsx-runtime");var L=N(require("react-aria-components")),ce=require("lucide-react");var v=require("react/jsx-runtime"),Ar=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,v.jsx)(L.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,v.jsx)(L.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,v.jsx)(L.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Br=({children:e,className:t,onSelectionChange:o,...r})=>(0,v.jsx)("div",{className:t,children:(0,v.jsx)(L.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Sr=({className:e,...t})=>(0,v.jsxs)(L.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,v.jsx)(ce.Search,{className:"h-5 w-5 text-text-muted"}),(0,v.jsx)(L.Input,{...t,className:c("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,v.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,v.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Mr=({children:e,className:t,...o})=>(0,v.jsx)(L.ListBox,{...o,className:c("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Ir=({children:e,className:t,...o})=>(0,v.jsx)(L.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,v.jsxs)(v.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,v.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,v.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,v.jsx)(ce.CornerDownLeft,{size:10})]})]})}),Er=({isHeading:e,className:t})=>(0,v.jsx)("div",{className:c("shrink-0",t),children:e?(0,v.jsx)(ce.Hash,{size:18}):(0,v.jsx)(ce.FileText,{size:18})}),Or=({children:e,className:t})=>(0,v.jsx)("span",{className:c("block font-medium truncate flex-1 text-sm",t),children:e}),Vr=({children:e,className:t})=>(0,v.jsx)("span",{className:c("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),Ni={Root:Ar,Autocomplete:Br,Input:Sr,List:Mr,Item:Object.assign(Ir,{Icon:Er,Title:Or,Bio:Vr})};var z=require("react"),Hr=N(require("scroll-into-view-if-needed"));var Ho=require("react");var Do=require("react/jsx-runtime"),Vi=(0,z.createContext)(null),Hi=(0,z.createContext)(null);function Dr(e){let[t,o]=(0,z.useState)({isOverflowing:!1,isAtBottom:!1});return(0,z.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let l=r.scrollHeight>r.clientHeight,a=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:l,isAtBottom:a})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let i=new MutationObserver(n);return i.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),i.disconnect()}},[e]),t}var zr=({children:e,className:t,ref:o,...r})=>{let n=(0,z.useRef)(null);(0,z.useImperativeHandle)(o,()=>n.current);let{isOverflowing:i,isAtBottom:l}=Dr(n);return(0,Do.jsx)("div",{ref:n,className:c("relative overflow-y-auto boltdocs-otp-content",i&&!l&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};zr.displayName="OnThisPageContent";var zo=N(require("react-aria-components")),qe=require("lucide-react");var _=require("react/jsx-runtime"),Fr=({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}),$r=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,_.jsxs)(zo.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)(qe.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)(qe.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Wr=({children:e,className:t})=>(0,_.jsx)("span",{className:c("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),_r=({children:e,className:t})=>(0,_.jsx)("span",{className:c("text-base font-bold text-text-main truncate",t),children:e}),Gr=({children:e})=>(0,_.jsx)(_.Fragment,{children:e}),$i={PageNavRoot:Fr,PageNavLink:Object.assign($r,{Title:Wr,Description:_r,Icon:Gr})};var Ur=require("react/jsx-runtime");var jr=N(require("react-aria-components")),qr=require("lucide-react");var Fo=require("react/jsx-runtime");var ut=require("react-aria-components"),Xr=require("lucide-react");var Kr=require("react/jsx-runtime");var Wo=require("react/jsx-runtime"),$o=({children:e,className:t,vertical:o=!1})=>(0,Wo.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 ve=require("lucide-react"),Go=N(require("react")),B=N(require("react-aria-components"));var he=N(require("react-aria-components"));var xe=require("react/jsx-runtime"),_o=({children:e,className:t,showArrow:o,...r})=>(0,xe.jsxs)(he.Popover,{offset:8,...r,className:he.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","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",n)),children:[o&&(0,xe.jsx)(he.OverlayArrow,{className:"group",children:(0,xe.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,xe.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var M=require("react/jsx-runtime");function dt(e){let[t,o]=Go.default.Children.toArray(e.children).slice(0,2);return(0,M.jsxs)(B.MenuTrigger,{...e,children:[t,(0,M.jsx)(_o,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function mt(e){return(0,M.jsx)(B.Menu,{...e,className:B.composeRenderProps(e.className,t=>c("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function Ue(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,M.jsx)(B.MenuItem,{...e,textValue:t,className:B.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:i})=>c("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",n&&"scale-[0.98] bg-primary-500/15",i&&"opacity-40 grayscale pointer-events-none",o)),children:B.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:i})=>(0,M.jsxs)(M.Fragment,{children:[r!=="none"&&(0,M.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,M.jsx)(ve.Check,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,M.jsx)(ve.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,M.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),i&&(0,M.jsx)(ve.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var je=require("react-aria-components");var k=require("react/jsx-runtime"),Zr=e=>{let[t,o]=(0,Uo.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let i=new Blob([e],{type:"text/plain;charset=utf-8"}),l=URL.createObjectURL(i);window.open(l,"_blank")}}};function jo({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:i,handleOpenRaw:l}=Zr(r),a=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!a||!r?null:(0,k.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,k.jsxs)($o,{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,k.jsx)(de,{variant:"ghost",onPress:i,icon:n?(0,k.jsx)(re.Check,{size:16}):(0,k.jsx)(re.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,k.jsxs)(dt,{placement:"bottom end",children:[(0,k.jsx)(de,{variant:"ghost",isIconOnly:!0,icon:(0,k.jsx)(re.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,k.jsxs)(mt,{className:"w-52",children:[(0,k.jsxs)(Ue,{onAction:i,className:"flex flex-row items-start gap-2.5 group",children:[(0,k.jsx)(re.Copy,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,k.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,k.jsxs)(Ue,{onAction:l,className:"flex flex-row items-start gap-2.5 group",children:[(0,k.jsx)(re.ExternalLink,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,k.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var Xe=require("react"),F=require("react/jsx-runtime");function qo(){let[e,t]=(0,Xe.useState)(0);(0,Xe.useEffect)(()=>{let r=0,n=!0,i=setInterval(()=>{n?(r+=1,r>=100&&(r=100,n=!1)):(r-=1,r<=0&&(r=0,n=!0)),t(r)},20);return()=>clearInterval(i)},[]);let o=`inset(${100-e}% 0 0 0)`;return(0,F.jsx)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:(0,F.jsx)("div",{className:"relative group",children:(0,F.jsxs)("div",{className:"relative inline-block",children:[(0,F.jsxs)("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,F.jsx)("title",{children:"Loading indicator background"}),(0,F.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,F.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),(0,F.jsxs)("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:o},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,F.jsx)("title",{children:"Loading indicator animated fill"}),(0,F.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,F.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}var G=require("react/jsx-runtime"),ye=({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)(Xo.Link,{size:16})})]})},Ko={...ft,Loading:qo,h1:e=>(0,G.jsx)(ye,{level:1,...e}),h2:e=>(0,G.jsx)(ye,{level:2,...e}),h3:e=>(0,G.jsx)(ye,{level:3,...e}),h4:e=>(0,G.jsx)(ye,{level:4,...e}),h5:e=>(0,G.jsx)(ye,{level:5,...e}),h6:e=>(0,G.jsx)(ye,{level:6,...e}),pre:e=>(0,G.jsx)(ae,{...e,children:e.children})};var Zo=require("react-router-dom");var x=require("react/jsx-runtime");function Qr(){let{currentLocale:e,config:t}=Re();return(0,I.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 Yr(){let e=(0,Zo.useLocation)(),{config:t}=Re(),o=Y(l=>l.setLocale),r=Y(l=>l.setVersion),n=Y(l=>l.currentLocale),i=Y(l=>l.currentVersion);return(0,I.useEffect)(()=>{let l=e.pathname.split("/").filter(Boolean),a=0,s=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(l[a]==="docs"&&a++,t.versions&&l.length>a){let m=t.versions.versions.find(f=>f.path===l[a]);m&&(s=m.path,a++)}t.i18n&&l.length>a&&t.i18n.locales[l[a]]?d=l[a]:t.i18n&&l.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),s!==i&&r(s)},[e.pathname,t,o,r,n,i]),null}function Jo({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:i,externalPages:l,components:a={}}){let[s,d]=(0,I.useState)(e),[m,f]=(0,I.useState)(t),g=l||{},b=(0,I.useMemo)(()=>s.filter(p=>!(i&&(p.path==="/"||p.path===""))&&!g[p.path===""?"/":p.path]).map(p=>{let T=Object.keys(r).find(U=>U===`/${o}/${p.filePath}`||U.endsWith(`/${o}/${p.filePath}`)||U.endsWith(`/${o}\\${p.filePath.replace(/\\/g,"/")}`)),E=T?r[T]:null;return{...p,Component:I.default.lazy(async()=>E?await E():{default:et})}}),[s,r,o,i,g]);(0,I.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",p=>{d(p)}),n.on("boltdocs:config-update",p=>{f(p)}))},[n]);let y=(0,I.useMemo)(()=>({...Ko,...a}),[a]),C=y.Loading;return(0,x.jsx)(Lt,{children:(0,x.jsx)(_t,{components:y,children:(0,x.jsx)(Ze.Provider,{value:m,children:(0,x.jsx)(It,{children:(0,x.jsxs)(ht,{routes:s,modules:r,children:[(0,x.jsx)(Ht,{}),(0,x.jsx)(Yr,{}),(0,x.jsx)(Qr,{}),(0,x.jsxs)(Z.Routes,{children:[(0,x.jsx)(Z.Route,{element:(0,x.jsx)(Ft,{}),children:b.map(p=>(0,x.jsx)(Z.Route,{path:p.path===""?"/":p.path,element:(0,x.jsx)(I.default.Suspense,{fallback:(0,x.jsx)(C,{}),children:(0,x.jsx)(jt,{Component:p.Component})})},p.path))},"docs-layout"),i&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Z.Route,{path:"/",element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(i,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(p=>(0,x.jsx)(Z.Route,{path:`/${p}`,element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(i,{})})},`home-${p}`))]}),Object.entries(g).map(([p,T])=>{let E=p==="/"?"":p;return(0,x.jsxs)(I.default.Fragment,{children:[(0,x.jsx)(Z.Route,{path:p,element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(T,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(U=>(0,x.jsx)(Z.Route,{path:`/${U}${E}`,element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(T,{})})},`${p}-${U}`))]},p)}),(0,x.jsx)(Z.Route,{path:"*",element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(et,{})})})]})]})})})})})}var Ke=require("react/jsx-runtime");async function en(e){let{path:t,routes:o,config:r,modules:n,homePage:i,externalPages:l,docsDirName:a}=e,s={};for(let[m,f]of Object.entries(n))s[m]=()=>Promise.resolve(f);return Yo.default.renderToString((0,Ke.jsx)(Qo.default.StrictMode,{children:(0,Ke.jsx)(er.StaticRouter,{location:t,children:(0,Ke.jsx)(Jo,{initialRoutes:o,initialConfig:r,docsDirName:a,modules:s,homePage:i,externalPages:l})})}))}0&&(module.exports={render});
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});