boltdocs 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/bin/boltdocs.js +2 -2
- package/dist/base-ui/index.d.mts +3 -3
- package/dist/base-ui/index.d.ts +3 -3
- package/dist/base-ui/index.js +1 -1
- package/dist/base-ui/index.mjs +1 -1
- package/dist/{cache-CRAZ55X7.mjs → cache-P6WK424C.mjs} +1 -1
- package/dist/chunk-22NXDNP4.mjs +74 -0
- package/dist/chunk-2HUVMMJU.mjs +1 -0
- package/dist/chunk-2Z5T6EAU.mjs +1 -0
- package/dist/chunk-CRZGOE32.mjs +1 -0
- package/dist/chunk-HA6543SL.mjs +1 -0
- package/dist/{chunk-ZK2266IZ.mjs → chunk-RPUERTVC.mjs} +1 -1
- package/dist/{chunk-MZBG4N4W.mjs → chunk-URTD6E6S.mjs} +1 -1
- package/dist/chunk-W2NB4T6V.mjs +1 -0
- package/dist/chunk-Y4RRHPXC.mjs +1 -0
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/client/ssr.js +1 -1
- package/dist/client/ssr.mjs +1 -1
- package/dist/hooks/index.d.mts +7 -15
- package/dist/hooks/index.d.ts +7 -15
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/{loading-chS3pm9W.d.ts → loading-B7X5Wchs.d.ts} +3 -5
- package/dist/{loading-BqGrFWO5.d.mts → loading-WuaQbsKb.d.mts} +3 -5
- package/dist/mdx/index.js +1 -1
- package/dist/mdx/index.mjs +1 -1
- package/dist/node/cli-entry.js +27 -23
- package/dist/node/cli-entry.mjs +5 -1
- package/dist/node/index.js +10 -10
- package/dist/node/index.mjs +1 -1
- package/dist/primitives/index.d.mts +2 -2
- package/dist/primitives/index.d.ts +2 -2
- package/dist/primitives/index.js +1 -1
- package/dist/primitives/index.mjs +1 -1
- package/dist/search-dialog-ZRXBAQJ5.mjs +1 -0
- package/package.json +2 -1
- package/src/client/app/theme-context.tsx +14 -7
- package/src/client/components/default-layout.tsx +6 -2
- package/src/client/components/primitives/navbar.tsx +3 -3
- package/src/client/components/primitives/search-dialog.tsx +4 -4
- package/src/client/components/primitives/sidebar.tsx +3 -2
- package/src/client/components/primitives/skeleton.tsx +26 -0
- package/src/client/components/ui-base/loading.tsx +43 -73
- package/src/client/components/ui-base/navbar.tsx +8 -6
- package/src/client/components/ui-base/page-nav.tsx +2 -1
- package/src/client/components/ui-base/powered-by.tsx +4 -1
- package/src/client/components/ui-base/search-dialog.tsx +16 -5
- package/src/client/components/ui-base/sidebar.tsx +4 -2
- package/src/client/hooks/use-i18n.ts +3 -2
- package/src/client/hooks/use-localized-to.ts +6 -5
- package/src/client/hooks/use-page-nav.ts +27 -6
- package/src/client/hooks/use-routes.ts +2 -1
- package/src/client/hooks/use-search.ts +81 -59
- package/src/client/hooks/use-sidebar.ts +2 -1
- package/src/client/store/use-boltdocs-store.ts +6 -5
- package/src/client/theme/neutral.css +29 -0
- package/src/node/{cli.ts → cli/build.ts} +17 -23
- package/src/node/cli/dev.ts +22 -0
- package/src/node/cli/doctor.ts +243 -0
- package/src/node/cli/index.ts +9 -0
- package/src/node/cli/ui.ts +54 -0
- package/src/node/cli-entry.ts +16 -16
- package/src/node/config.ts +1 -1
- package/src/node/plugin/entry.ts +1 -1
- package/src/node/plugin/index.ts +24 -10
- package/src/node/routes/parser.ts +9 -9
- package/src/node/search/index.ts +55 -0
- package/src/node/ssg/index.ts +14 -6
- package/src/node/ssg/robots.ts +7 -4
- package/dist/chunk-5D6XPYQ3.mjs +0 -74
- package/dist/chunk-6QXCKZAT.mjs +0 -1
- package/dist/chunk-H4M6P3DM.mjs +0 -1
- package/dist/chunk-JXHNX2WN.mjs +0 -1
- package/dist/chunk-Q3MLYTIQ.mjs +0 -1
- package/dist/chunk-RSII2UPE.mjs +0 -1
- package/dist/chunk-ZRJ55GGF.mjs +0 -1
- package/dist/search-dialog-MA5AISC7.mjs +0 -1
package/dist/client/index.mjs
CHANGED
|
@@ -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-
|
|
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-CRZGOE32.mjs";import{a as $}from"../chunk-2HUVMMJU.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-URTD6E6S.mjs";import{a as A}from"../chunk-RPUERTVC.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-W2NB4T6V.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};
|
package/dist/client/ssr.js
CHANGED
|
@@ -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 nr=Object.create;var Ie=Object.defineProperty;var sr=Object.getOwnPropertyDescriptor;var ar=Object.getOwnPropertyNames;var ir=Object.getPrototypeOf,lr=Object.prototype.hasOwnProperty;var gt=(e,t)=>{for(var o in t)Ie(e,o,{get:t[o],enumerable:!0})},bt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ar(t))!lr.call(e,n)&&n!==o&&Ie(e,n,{get:()=>t[n],enumerable:!(r=sr(t,n))||r.enumerable});return e};var P=(e,t,o)=>(o=e!=null?nr(ir(e)):{},bt(t||!e||!e.__esModule?Ie(o,"default",{value:e,enumerable:!0}):o,e)),cr=e=>bt(Ie({},"__esModule",{value:!0}),e);var on={};gt(on,{render:()=>tn});module.exports=cr(on);var Yo=P(require("react")),er=P(require("react-dom/server")),tr=require("react-router-dom/server");var O=P(require("react")),Qr=P(require("react-dom/client")),J=require("react-router-dom");var Tt=require("lucide-react");var Qe=P(require("react")),Pt=require("react-aria-components"),wt=require("react-router-dom");var Ee=require("react"),Ze=(0,Ee.createContext)(null);function se(){let e=(0,Ee.use)(Ze);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Ct=require("react-router-dom");var ae=require("react"),vt=require("react/jsx-runtime"),xt=(0,ae.createContext)({preload:()=>{},routes:[]});function Oe(){return(0,ae.use)(xt)}function ht({routes:e,modules:t,children:o}){let r=(0,ae.useRef)(null),n=(0,ae.useCallback)(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let l=a.split("#")[0].split("?")[0],i=e.find(s=>s.path===l||l==="/"&&s.path==="");if(i?.filePath){let s=Object.keys(t).find(d=>d.endsWith("/"+i.filePath));s&&t[s]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${a}:`,d)})}},100)},[e,t]);return(0,vt.jsx)(xt.Provider,{value:{preload:n,routes:e},children:o})}var yt=require("zustand"),Ve=require("zustand/middleware"),ee=(0,yt.create)()((0,Ve.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,Ve.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Ne(){let{routes:e}=Oe(),t=se(),o=(0,Ct.useLocation)(),r=ee(p=>p.currentLocale),n=ee(p=>p.currentVersion),a=ee(p=>p.hasHydrated),l=e.find(p=>p.path===o.pathname),i=t.i18n?l?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?l?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,d=e.filter(p=>{let k=t.i18n?(p.locale||t.i18n.defaultLocale)===i:!0,V=t.versions?(p.version||t.versions.defaultVersion)===s:!0;if(!(k&&V))return!1;let j=t.i18n;if(j){let or=!!l?.locale,rr=!!p.locale;if(e.some(Me=>Me!==p&&Me.filePath===p.filePath&&Me.version===p.version&&(Me.locale||j.defaultLocale)===(p.locale||j.defaultLocale))&&or!==rr)return!1}return!0}),f=t.i18n?.localeConfigs?.[i]?.label||t.i18n?.locales[i]||i,b=t.versions?.versions.find(p=>p.path===s)?.label||s,C=t.i18n?Object.entries(t.i18n.locales).map(([p,k])=>{let V=t.i18n?.localeConfigs?.[p];return{key:p,label:V?.label||k,isCurrent:p===i}}):[],R=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:i,currentLocaleLabel:f,availableLocales:C,currentVersion:s,currentVersionLabel:b,availableVersions:R,config:t}}function Je(e){let t=se(),{currentLocale:o,currentVersion:r}=Ne();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 l=e.startsWith("/docs"),i=e.split("/").filter(Boolean),s=0;i[s]==="docs"&&s++,a&&i.length>s&&a.versions.find(b=>b.path===i[s])&&s++,n&&i.length>s&&n.locales[i[s]]&&s++;let d=i.slice(s),m=[];l&&(m.push("docs"),a&&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:a,...l}=e,i=Je(o??""),{preload:s}=Oe();return(0,Ye.jsx)(Pt.Link,{...l,ref:t,href:i,onMouseEnter:f=>{n?.(f),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&s(i)},onFocus:f=>{a?.(f),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&s(i)}})});ie.displayName="Link";var dr=Qe.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...l}=e,i=(0,wt.useLocation)(),s=Je(o??""),d=r?i.pathname===s:i.pathname.startsWith(s),m=typeof n=="function"?n({isActive:d}):c(n,d&&"active"),f=typeof a=="function"?a({isActive:d}):a;return(0,Ye.jsx)(ie,{...l,ref:t,href:o,className:m,children:f})});dr.displayName="NavLink";var te=require("react/jsx-runtime");function et(){return(0,te.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,te.jsxs)("div",{className:"space-y-4",children:[(0,te.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,te.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,te.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,te.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,te.jsx)(Tt.ArrowLeft,{size:16})," Go to Home"]})]})})}var q=require("react"),Bt=require("react/jsx-runtime"),kt=(0,q.createContext)(void 0);function Lt({children:e}){let[t,o]=(0,q.useState)("system"),[r,n]=(0,q.useState)("dark"),[a,l]=(0,q.useState)(!1);(0,q.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,C)=>{n(b==="system"?C?"dark":"light":b)})(d,m.matches);let g=b=>{n(C=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?b.matches?"dark":"light":C)};return m.addEventListener("change",g),()=>m.removeEventListener("change",g)},[]),(0,q.useEffect)(()=>{if(!a)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,a]);let i=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return(0,Bt.jsx)(kt.Provider,{value:{theme:t,resolvedTheme:r,setTheme:i},children:e})}function At(){let e=(0,q.use)(kt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var Re=P(require("virtual:boltdocs-layout"));var St=require("react"),Mt=require("react-aria-components"),He=require("react-router-dom"),Et=require("react/jsx-runtime");function It({children:e}){let t=(0,He.useNavigate)();return(0,Et.jsx)(Mt.RouterProvider,{navigate:(o,r)=>{(0,St.startTransition)(()=>{t(o,r)})},useHref:He.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=P(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 De=require("react"),_t=require("react/jsx-runtime"),$t=(0,De.createContext)({});function Wt(){return(0,De.useContext)($t)}function Gt({components:e,children:t}){return(0,_t.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 Ko=require("lucide-react");var ft={};gt(ft,{Admonition:()=>re,Badge:()=>ao,Button:()=>Xt,Card:()=>po,Cards:()=>mo,Caution:()=>Co,CodeBlock:()=>le,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 Fe=P(require("react-aria-components"));var qt=require("class-variance-authority"),X=require("react/jsx-runtime"),ze=(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"}}),me=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:l,size:i,rounded:s,iconSize:d,disabled:m,...f})=>{let g=r||!n&&!!t,b=g?(0,X.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,X.jsxs)(X.Fragment,{children:[t&&o==="left"&&(0,X.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,X.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,X.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,X.jsx)(Fe.Link,{href:e,className:c(ze({variant:l,size:i,rounded:s,iconSize:g?d:void 0,disabled:m}),a),...f,children:b}):(0,X.jsx)(Fe.Button,{className:c(ze({variant:l,size:i,rounded:s,iconSize:g?d:void 0,disabled:m}),a),...f,children:b})};var Kt=require("react/jsx-runtime"),Xt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...l})=>(0,Kt.jsx)(me,{className:c("group",ze({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...l});var $e=P(require("react-aria-components")),We=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",a=e.description||"Generic Sandbox",l={};for(let[i,s]of Object.entries(t)){let d=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;l[i]={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:a,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return l}function mr(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 mr(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 a=(i,s)=>{let d=document.createElement("input");d.type="hidden",d.name=i,d.value=s,n.appendChild(d)},l=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",l.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 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 K=require("react");function Yt(e){let{title:t,sandbox:o}=e,[r,n]=(0,K.useState)(!1),[a,l]=(0,K.useState)(!1),[i,s]=(0,K.useState)(!1),d=(0,K.useRef)(null),m=se(),f=(0,K.useCallback)(async()=>{let b=d.current?.textContent??"";Qt(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),g=(0,K.useCallback)(()=>{let b=d.current?.textContent??"",C=m?.integrations?.sandbox?.config||{},R=typeof o=="object"?o:C,p=R.entry||"src/App.tsx";Jt({title:t??"Code Snippet",...R,files:{...R.files,[p]:{content:b}}})},[t,m,o]);return(0,K.useEffect)(()=>{let b=d.current?.textContent?.length??0;s(b>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:l,isExpandable:i,preRef:d,handleCopy:f,handleSandbox:g,shouldTruncate:i&&!a}}var Pe=require("react/jsx-runtime");function pr(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var eo=e=>(0,Pe.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...pr(e),children:[(0,Pe.jsx)("title",{children:"CodeSandbox"}),(0,Pe.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var pe=P(require("react-aria-components"));var W=require("react/jsx-runtime"),fr=({className:e,children:t,...o})=>(0,W.jsx)(pe.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,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(pe.OverlayArrow,{children:(0,W.jsxs)("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[(0,W.jsx)("title",{children:"Arrow"}),(0,W.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),nt=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,W.jsxs)(pe.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,W.jsx)(fr,{...n,children:e})]});var S=require("react/jsx-runtime");function le(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,...l}=e,d=!!se()?.integrations?.sandbox?.enable&&!r,{copied:m,isExpanded:f,setIsExpanded:g,isExpandable:b,preRef:C,handleCopy:R,handleSandbox:p,shouldTruncate:k}=Yt(e);return(0,S.jsxs)("div",{className:c("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",k&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[(0,S.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,S.jsx)(nt,{content:"Open in CodeSandbox",children:(0,S.jsx)($e.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,S.jsx)(eo,{size:20})})}),!n&&(0,S.jsx)(nt,{content:m?"Copied!":"Copy code",children:(0,S.jsx)($e.Button,{onPress:R,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,S.jsx)(We.Check,{size:20}):(0,S.jsx)(We.Copy,{size:20})})})]}),a?(0,S.jsx)("div",{ref:C,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,S.jsx)("pre",{ref:C,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...l,children:t}),b&&(0,S.jsx)("div",{className:c(k?"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,S.jsx)($e.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 ue=require("react"),ce=P(require("react-aria-components"));var oe=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,oe.useState)(o===-1?0:o),a=(0,oe.useRef)([]),[l,i]=(0,oe.useState)({opacity:0,transform:"translateX(0)",width:0});(0,oe.useEffect)(()=>{let d=a.current[r];d&&i({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let s=(0,oe.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),a.current[f]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:l,handleKeyDown:s}}var st=require("class-variance-authority"),H=require("react/jsx-runtime"),gr=(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"}}),br=(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,H.jsx)(le,{className:"language-bash",children:(0,H.jsx)("code",{children:e.trim()})}):e;return(0,H.jsx)("div",{className:"py-4",children:t})}function ro({defaultIndex:e=0,children:t}){let o=(0,ue.useMemo)(()=>ue.Children.toArray(t).filter(i=>(0,ue.isValidElement)(i)&&i.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:l}=to({initialIndex:e,tabs:o});return(0,H.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,H.jsxs)(ce.Tabs,{selectedKey:r.toString(),onSelectionChange:i=>n(Number(i)),className:"w-full",children:[(0,H.jsxs)(ce.TabList,{"aria-label":"Content Tabs",className:c(gr()),children:[o.map((i,s)=>{let{label:d,icon:m,disabled:f}=i.props,g=s.toString();return(0,H.jsxs)(ce.Tab,{id:g,isDisabled:f,ref:b=>{a.current[s]=b},className:({isSelected:b,isDisabled:C})=>c(br({isActive:b,isDisabled:C})),children:[!!m&&(0,H.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),(0,H.jsx)("span",{children:d})]},g)}),(0,H.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((i,s)=>(0,H.jsx)(ce.TabPanel,{id:s.toString(),children:o[s]},s))]})})}var fe=require("react"),we=require("react/jsx-runtime");function no({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...l}){let i=(0,fe.useRef)(null),[s,d]=(0,fe.useState)(!1);return(0,fe.useEffect)(()=>{let m=i.current;if(!m)return;let f=new IntersectionObserver(([g])=>{g.isIntersecting&&(d(!0),f.disconnect())},{rootMargin:"200px"});return f.observe(m),()=>f.disconnect()},[]),(0,we.jsx)("div",{ref:i,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?(0,we.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...l,children:[r,"Your browser does not support the video tag."]}):(0,we.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var so=require("class-variance-authority"),io=require("react/jsx-runtime"),xr=(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 ao({variant:e="default",children:t,className:o="",...r}){return(0,io.jsx)("span",{className:c(xr({variant:e}),o),...r,children:t})}var Te=require("react"),lo=P(require("react-aria-components"));var co=require("class-variance-authority"),D=require("react/jsx-runtime"),hr=(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,D.jsx)("div",{className:c(hr({cols:e}),o),...r,children:t})}function po({title:e,icon:t,href:o,children:r,className:n="",...a}){let l=(0,Te.useRef)(null),i=(0,Te.useRef)(null),s=(0,Te.useCallback)(f=>{let g=l.current||i.current;if(!g)return;let{left:b,top:C}=g.getBoundingClientRect();g.style.setProperty("--x",`${f.clientX-b}px`),g.style.setProperty("--y",`${f.clientY-C}px`)},[]),d=(0,D.jsxs)(D.Fragment,{children:[(0,D.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,D.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,D.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,D.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,D.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,D.jsx)(lo.Link,{ref:i,href:o,className:c(m,"no-underline cursor-pointer"),onMouseMove:s,...a,children:d}):(0,D.jsx)("div",{ref:l,role:"presentation",className:m,onMouseMove:s,...a,children:d})}var I=require("lucide-react");var fo=require("class-variance-authority"),w=require("react/jsx-runtime"),vr={note:(0,w.jsx)(I.Bookmark,{size:18}),tip:(0,w.jsx)(I.Lightbulb,{size:18}),info:(0,w.jsx)(I.Info,{size:18}),warning:(0,w.jsx)(I.AlertTriangle,{size:18}),danger:(0,w.jsx)(I.ShieldAlert,{size:18}),important:(0,w.jsx)(I.Flame,{size:18}),caution:(0,w.jsx)(I.Zap,{size:18})},yr={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 re({type:e="note",title:t,children:o,className:r="",...n}){return(0,w.jsxs)("div",{className:c(uo({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,w.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,w.jsx)("span",{className:c("shrink-0",uo({type:e})),children:vr[e]}),(0,w.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||yr[e]})]}),(0,w.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,w.jsx)(re,{type:"note",...e}),bo=e=>(0,w.jsx)(re,{type:"tip",...e}),xo=e=>(0,w.jsx)(re,{type:"warning",...e}),ho=e=>(0,w.jsx)(re,{type:"danger",...e}),vo=e=>(0,w.jsx)(re,{type:"info",...e}),yo=e=>(0,w.jsx)(re,{type:"important",...e}),Co=e=>(0,w.jsx)(re,{type:"caution",...e});var Ge=require("react"),ge=require("lucide-react");var _e=require("class-variance-authority"),Z=require("react/jsx-runtime"),Cr=(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}}),Rr=(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}}),Nr=(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 Pr({icon:e,children:t,variant:o,dense:r}){return(0,Z.jsxs)("li",{className:c(Rr({variant:o,dense:r})),children:[e&&(0,Z.jsx)("span",{className:c(Nr({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,Z.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var wr={checked:e=>(0,Z.jsx)(ge.Check,{size:14,className:c("text-emerald-500 shrink-0",e)}),arrow:e=>(0,Z.jsx)(ge.ChevronRight,{size:14,className:c("text-primary-400 shrink-0",e)}),bubble:e=>(0,Z.jsx)(ge.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,...a}){let l=t!==void 0&&Number(t)>1,i=wr[e],s=Cr({variant:e,cols:t,dense:o,isGrid:l,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,Z.jsx)(d,{className:s,...a,children:r}):(0,Z.jsx)("ul",{className:s,...a,children:Ge.Children.map(r,m=>{if(!(0,Ge.isValidElement)(m))return m;let f=m,g=f.type==="li"?f.props.children:f.props.children||m;return(0,Z.jsx)(Pr,{icon:i(),variant:e,dense:o,children:g})})})}var Q=require("react"),Y=P(require("react-aria-components")),G=require("lucide-react");var T=require("react/jsx-runtime"),ke=16,Le=2,at={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,Q.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?lt(e.props.children):""}function Tr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,T.jsx)(G.Folder,{size:ke,strokeWidth:Le,className:c(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=c(r,"text-text-dim group-hover:text-text-main");return at.CODE.test(o)?(0,T.jsx)(G.FileCode,{size:ke,strokeWidth:Le,className:n}):at.TEXT.test(o)?(0,T.jsx)(G.FileText,{size:ke,strokeWidth:Le,className:n}):at.IMAGE.test(o)?(0,T.jsx)(G.FileImage,{size:ke,strokeWidth:Le,className:n}):(0,T.jsx)(G.File,{size:ke,strokeWidth:Le,className:n})}function it(e,t){if(!(0,Q.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 kr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ue(e,t="root"){if(!(0,Q.isValidElement)(e))return[];let o=[];if(it(e,"ul"))return Q.Children.forEach(e.props.children,(r,n)=>{o.push(...Ue(r,`${t}-${n}`))}),o;if(it(e,"li")){let r=Q.Children.toArray(e.props.children),n=r.findIndex(C=>it(C,"ul")),a=n!==-1,l=a?r.slice(0,n):r,i=a?r.slice(n):[],s=lt(l),{name:d,comment:m}=kr(s),f=d.endsWith("/"),g=f?d.slice(0,-1):d,b=a||f;return o.push({id:`${t}-${g}`,name:g,comment:m,isFolder:b,children:a?Ue(i[0],`${t}-${g}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Q.Children.forEach(e.props.children,(r,n)=>{o.push(...Ue(r,`${t}-${n}`))}),o}function No({item:e}){return(0,T.jsxs)(Y.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,T.jsx)(Y.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,T.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,T.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,T.jsx)(Y.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,T.jsx)(G.ChevronRight,{size:14,strokeWidth:3,className:c("transition-transform duration-200",t&&"rotate-90")})}):(0,T.jsx)("div",{className:"w-[18px]"}),Tr(e.name,e.isFolder),(0,T.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,T.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,T.jsx)(Y.Collection,{items:e.children,children:t=>(0,T.jsx)(No,{item:t})})]})}function Po({children:e}){let t=(0,Q.useMemo)(()=>Ue(e),[e]);return(0,T.jsx)("div",{className:"my-8",children:(0,T.jsx)(Y.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,T.jsx)(No,{item:o})})})}var Ae=P(require("react-aria-components"));var be=require("react");function wo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=(0,be.useState)(null),[l,i]=(0,be.useState)(1),s=(0,be.useMemo)(()=>{if(!e)return[];let g=[...e];return t&&n!==null&&g.sort((b,C)=>{let R=b[n.key],p=C[n.key],k=typeof R=="string"?R:"",V=typeof p=="string"?p:"";return k<V?n.direction==="asc"?-1:1:k>V?n.direction==="asc"?1:-1:0}),g},[e,n,t]),d=Math.ceil(s.length/r),m=(0,be.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:i,totalPages:d,paginatedData:m,requestSort:g=>{if(!t)return;let b="asc";n&&n.key===g&&n.direction==="asc"&&(b="desc"),a({key:g,direction:b})}}}var z=require("lucide-react");var h=require("react/jsx-runtime");function To({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:l=10}){let{sortConfig:i,currentPage:s,setCurrentPage:d,totalPages:m,paginatedData:f,requestSort:g}=wo({data:t,sortable:n,paginated:a,pageSize:l}),b=R=>n?i?.key!==R?(0,h.jsx)(z.ChevronDown,{size:14,className:"ml-1 opacity-30"}):i.direction==="asc"?(0,h.jsx)(z.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,h.jsx)(z.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,C=o||(0,h.jsxs)(h.Fragment,{children:[e&&(0,h.jsx)("thead",{children:(0,h.jsx)("tr",{children:e.map((R,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:[R,b(p)]})},p))})}),f&&(0,h.jsx)("tbody",{children:f.map((R,p)=>(0,h.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:R.map((k,V)=>(0,h.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:k},V))},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:C})}),a&&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)(Ae.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)(z.ChevronsLeft,{size:16})}),(0,h.jsx)(Ae.Button,{onPress:()=>d(R=>Math.max(R-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)(z.ChevronLeft,{size:16})}),(0,h.jsx)(Ae.Button,{onPress:()=>d(R=>Math.min(R+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)(z.ChevronRight,{size:16})}),(0,h.jsx)(Ae.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)(z.ChevronsRight,{size:16})})]})]})]})}var F=require("react/jsx-runtime");function ko({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:l=""}){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",l),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 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("//")),a=c("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Ao.jsx)(ie,{href:e,className:a,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 N=require("react/jsx-runtime");function Mo({title:e,props:t,className:o=""}){return(0,N.jsxs)("div",{className:c("my-6",o),children:[e&&(0,N.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,N.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,N.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,N.jsx)("thead",{children:(0,N.jsxs)("tr",{children:[(0,N.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,N.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,N.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,N.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,N.jsx)("tbody",{children:t.map((r,n)=>(0,N.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,N.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,N.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,N.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,N.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,N.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,N.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,N.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,N.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,N.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]),a=(0,ct.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}var xe=require("react/jsx-runtime");function Eo(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:l,previewElement:i}=Io(e);return(0,xe.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,xe.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:i}),!o&&(0,xe.jsx)("div",{className:"border-t border-border-subtle",children:(0,xe.jsx)(le,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,children:l})})]})}var Uo=require("react"),ne=require("lucide-react");var Oo=require("react");var Lr=require("react-aria-components"),Be=require("lucide-react");var Vo=require("react/jsx-runtime");var Se=P(require("react-aria-components")),Ar=require("lucide-react");var pt=require("react/jsx-runtime");var A=P(require("react-aria-components")),de=require("lucide-react");var v=require("react/jsx-runtime"),Br=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,v.jsx)(A.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)(A.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)(A.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Sr=({children:e,className:t,onSelectionChange:o,...r})=>(0,v.jsx)("div",{className:t,children:(0,v.jsx)(A.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Mr=({className:e,...t})=>(0,v.jsxs)(A.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,v.jsx)(de.Search,{className:"h-5 w-5 text-text-muted"}),(0,v.jsx)(A.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"})})]}),Ir=({children:e,className:t,...o})=>(0,v.jsx)(A.ListBox,{...o,className:c("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Er=({children:e,className:t,...o})=>(0,v.jsx)(A.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)(de.CornerDownLeft,{size:10})]})]})}),Or=({isHeading:e,className:t})=>(0,v.jsx)("div",{className:c("shrink-0",t),children:e?(0,v.jsx)(de.Hash,{size:18}):(0,v.jsx)(de.FileText,{size:18})}),Vr=({children:e,className:t})=>(0,v.jsx)("span",{className:c("block font-medium truncate flex-1 text-sm",t),children:e}),Hr=({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}),Pa={Root:Br,Autocomplete:Sr,Input:Mr,List:Ir,Item:Object.assign(Er,{Icon:Or,Title:Vr,Bio:Hr})};var $=require("react"),Dr=P(require("scroll-into-view-if-needed"));var Ho=require("react");var Do=require("react/jsx-runtime"),Ha=(0,$.createContext)(null),Da=(0,$.createContext)(null);function zr(e){let[t,o]=(0,$.useState)({isOverflowing:!1,isAtBottom:!1});return(0,$.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let l=r.scrollHeight>r.clientHeight,i=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:l,isAtBottom:i})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let a=new MutationObserver(n);return a.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),a.disconnect()}},[e]),t}var Fr=({children:e,className:t,ref:o,...r})=>{let n=(0,$.useRef)(null);(0,$.useImperativeHandle)(o,()=>n.current);let{isOverflowing:a,isAtBottom:l}=zr(n);return(0,Do.jsx)("div",{ref:n,className:c("relative overflow-y-auto boltdocs-otp-content",a&&!l&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};Fr.displayName="OnThisPageContent";var zo=P(require("react-aria-components")),Xe=require("lucide-react");var _=require("react/jsx-runtime"),$r=({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}),Wr=({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)(Xe.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)(Xe.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Gr=({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}),Ur=({children:e})=>(0,_.jsx)(_.Fragment,{children:e}),Wa={PageNavRoot:$r,PageNavLink:Object.assign(Wr,{Title:Gr,Description:_r,Icon:Ur})};var jr=require("react/jsx-runtime");var qr=P(require("react-aria-components")),Xr=require("lucide-react");var Fo=require("react/jsx-runtime");var ut=require("react-aria-components"),Kr=require("lucide-react");var Zr=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 ye=require("lucide-react"),_o=P(require("react")),M=P(require("react-aria-components"));var ve=P(require("react-aria-components"));var he=require("react/jsx-runtime"),Go=({children:e,className:t,showArrow:o,...r})=>(0,he.jsxs)(ve.Popover,{offset:8,...r,className:ve.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,he.jsx)(ve.OverlayArrow,{className:"group",children:(0,he.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,he.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var E=require("react/jsx-runtime");function dt(e){let[t,o]=_o.default.Children.toArray(e.children).slice(0,2);return(0,E.jsxs)(M.MenuTrigger,{...e,children:[t,(0,E.jsx)(Go,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function mt(e){return(0,E.jsx)(M.Menu,{...e,className:M.composeRenderProps(e.className,t=>c("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function je(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,E.jsx)(M.MenuItem,{...e,textValue:t,className:M.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>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",a&&"opacity-40 grayscale pointer-events-none",o)),children:M.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>(0,E.jsxs)(E.Fragment,{children:[r!=="none"&&(0,E.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,E.jsx)(ye.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,E.jsx)(ye.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,E.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),a&&(0,E.jsx)(ye.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var qe=require("react-aria-components");var L=require("react/jsx-runtime"),Jr=e=>{let[t,o]=(0,Uo.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"}),l=URL.createObjectURL(a);window.open(l,"_blank")}}};function jo({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:l}=Jr(r),i=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!i||!r?null:(0,L.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,L.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,L.jsx)(me,{variant:"ghost",onPress:a,icon:n?(0,L.jsx)(ne.Check,{size:16}):(0,L.jsx)(ne.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,L.jsxs)(dt,{placement:"bottom end",children:[(0,L.jsx)(me,{variant:"ghost",isIconOnly:!0,icon:(0,L.jsx)(ne.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,L.jsxs)(mt,{className:"w-52",children:[(0,L.jsxs)(je,{onAction:a,className:"flex flex-row items-start gap-2.5 group",children:[(0,L.jsx)(ne.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,L.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,L.jsxs)(je,{onAction:l,className:"flex flex-row items-start gap-2.5 group",children:[(0,L.jsx)(ne.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,L.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var qo=require("react/jsx-runtime");function B({className:e,variant:t="rect",...o}){return(0,qo.jsx)("div",{className:c("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var y=require("react/jsx-runtime");function Xo(){return(0,y.jsx)("div",{className:c("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,y.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,y.jsxs)("div",{className:"flex gap-2",children:[(0,y.jsx)(B,{className:"h-3 w-16"}),(0,y.jsx)(B,{className:"h-3 w-24"})]}),(0,y.jsx)(B,{className:"h-10 w-[60%] sm:h-12"}),(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsx)(B,{className:"h-4 w-full"}),(0,y.jsx)(B,{className:"h-4 w-[95%]"}),(0,y.jsx)(B,{className:"h-4 w-[40%]"})]}),(0,y.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,y.jsx)(B,{className:"h-7 w-32"}),(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsx)(B,{className:"h-4 w-full"}),(0,y.jsx)(B,{className:"h-4 w-[98%]"}),(0,y.jsx)(B,{className:"h-4 w-[92%]"}),(0,y.jsx)(B,{className:"h-4 w-[60%]"})]})]}),(0,y.jsx)(B,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,y.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,y.jsx)(B,{className:"h-7 w-48"}),(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsx)(B,{className:"h-4 w-full"}),(0,y.jsx)(B,{className:"h-4 w-[85%]"})]})]})]})})}var U=require("react/jsx-runtime"),Ce=({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)(Ko.Link,{size:16})})]})},Zo={...ft,Loading:Xo,h1:e=>(0,U.jsx)(Ce,{level:1,...e}),h2:e=>(0,U.jsx)(Ce,{level:2,...e}),h3:e=>(0,U.jsx)(Ce,{level:3,...e}),h4:e=>(0,U.jsx)(Ce,{level:4,...e}),h5:e=>(0,U.jsx)(Ce,{level:5,...e}),h6:e=>(0,U.jsx)(Ce,{level:6,...e}),pre:e=>(0,U.jsx)(le,{...e,children:e.children})};var Jo=require("react-router-dom");var x=require("react/jsx-runtime");function Yr(){let{currentLocale:e,config:t}=Ne();return(0,O.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 en(){let e=(0,Jo.useLocation)(),{config:t}=Ne(),o=ee(l=>l.setLocale),r=ee(l=>l.setVersion),n=ee(l=>l.currentLocale),a=ee(l=>l.currentVersion);return(0,O.useEffect)(()=>{let l=e.pathname.split("/").filter(Boolean),i=0,s=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(l[i]==="docs"&&i++,t.versions&&l.length>i){let m=t.versions.versions.find(f=>f.path===l[i]);m&&(s=m.path,i++)}t.i18n&&l.length>i&&t.i18n.locales[l[i]]?d=l[i]:t.i18n&&l.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),s!==a&&r(s)},[e.pathname,t,o,r,n,a]),null}function Qo({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:l,components:i={}}){let[s,d]=(0,O.useState)(e),[m,f]=(0,O.useState)(t),g=l||{},b=(0,O.useMemo)(()=>s.filter(p=>!(a&&(p.path==="/"||p.path===""))&&!g[p.path===""?"/":p.path]).map(p=>{let k=Object.keys(r).find(j=>j===`/${o}/${p.filePath}`||j.endsWith(`/${o}/${p.filePath}`)||j.endsWith(`/${o}\\${p.filePath.replace(/\\/g,"/")}`)),V=k?r[k]:null;return{...p,Component:O.default.lazy(async()=>V?await V():{default:et})}}),[s,r,o,a,g]);(0,O.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",p=>{d(p)}),n.on("boltdocs:config-update",p=>{f(p)}))},[n]);let C=(0,O.useMemo)(()=>({...Zo,...i}),[i]),R=C.Loading;return(0,x.jsx)(Lt,{children:(0,x.jsx)(Gt,{components:C,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)(en,{}),(0,x.jsx)(Yr,{}),(0,x.jsxs)(J.Routes,{children:[(0,x.jsx)(J.Route,{element:(0,x.jsx)(Ft,{}),children:b.map(p=>(0,x.jsx)(J.Route,{path:p.path===""?"/":p.path,element:(0,x.jsx)(O.default.Suspense,{fallback:(0,x.jsx)(R,{}),children:(0,x.jsx)(jt,{Component:p.Component})})},p.path))},"docs-layout"),a&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(J.Route,{path:"/",element:(0,x.jsx)(Re.default,{children:(0,x.jsx)(a,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(p=>(0,x.jsx)(J.Route,{path:`/${p}`,element:(0,x.jsx)(Re.default,{children:(0,x.jsx)(a,{})})},`home-${p}`))]}),Object.entries(g).map(([p,k])=>{let V=p==="/"?"":p;return(0,x.jsxs)(O.default.Fragment,{children:[(0,x.jsx)(J.Route,{path:p,element:(0,x.jsx)(Re.default,{children:(0,x.jsx)(k,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(j=>(0,x.jsx)(J.Route,{path:`/${j}${V}`,element:(0,x.jsx)(Re.default,{children:(0,x.jsx)(k,{})})},`${p}-${j}`))]},p)}),(0,x.jsx)(J.Route,{path:"*",element:(0,x.jsx)(Re.default,{children:(0,x.jsx)(et,{})})})]})]})})})})})}var Ke=require("react/jsx-runtime");async function tn(e){let{path:t,routes:o,config:r,modules:n,homePage:a,externalPages:l,docsDirName:i}=e,s={};for(let[m,f]of Object.entries(n))s[m]=()=>Promise.resolve(f);return er.default.renderToString((0,Ke.jsx)(Yo.default.StrictMode,{children:(0,Ke.jsx)(tr.StaticRouter,{location:t,children:(0,Ke.jsx)(Qo,{initialRoutes:o,initialConfig:r,docsDirName:i,modules:s,homePage:a,externalPages:l})})}))}0&&(module.exports={render});
|