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.
Files changed (81) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/bin/boltdocs.js +2 -2
  3. package/dist/base-ui/index.d.mts +3 -3
  4. package/dist/base-ui/index.d.ts +3 -3
  5. package/dist/base-ui/index.js +1 -1
  6. package/dist/base-ui/index.mjs +1 -1
  7. package/dist/{cache-CRAZ55X7.mjs → cache-P6WK424C.mjs} +1 -1
  8. package/dist/chunk-22NXDNP4.mjs +74 -0
  9. package/dist/chunk-2HUVMMJU.mjs +1 -0
  10. package/dist/chunk-2Z5T6EAU.mjs +1 -0
  11. package/dist/chunk-CRZGOE32.mjs +1 -0
  12. package/dist/chunk-HA6543SL.mjs +1 -0
  13. package/dist/{chunk-ZK2266IZ.mjs → chunk-RPUERTVC.mjs} +1 -1
  14. package/dist/{chunk-MZBG4N4W.mjs → chunk-URTD6E6S.mjs} +1 -1
  15. package/dist/chunk-W2NB4T6V.mjs +1 -0
  16. package/dist/chunk-Y4RRHPXC.mjs +1 -0
  17. package/dist/client/index.d.mts +1 -1
  18. package/dist/client/index.d.ts +1 -1
  19. package/dist/client/index.js +1 -1
  20. package/dist/client/index.mjs +1 -1
  21. package/dist/client/ssr.js +1 -1
  22. package/dist/client/ssr.mjs +1 -1
  23. package/dist/hooks/index.d.mts +7 -15
  24. package/dist/hooks/index.d.ts +7 -15
  25. package/dist/hooks/index.js +1 -1
  26. package/dist/hooks/index.mjs +1 -1
  27. package/dist/{loading-chS3pm9W.d.ts → loading-B7X5Wchs.d.ts} +3 -5
  28. package/dist/{loading-BqGrFWO5.d.mts → loading-WuaQbsKb.d.mts} +3 -5
  29. package/dist/mdx/index.js +1 -1
  30. package/dist/mdx/index.mjs +1 -1
  31. package/dist/node/cli-entry.js +27 -23
  32. package/dist/node/cli-entry.mjs +5 -1
  33. package/dist/node/index.js +10 -10
  34. package/dist/node/index.mjs +1 -1
  35. package/dist/primitives/index.d.mts +2 -2
  36. package/dist/primitives/index.d.ts +2 -2
  37. package/dist/primitives/index.js +1 -1
  38. package/dist/primitives/index.mjs +1 -1
  39. package/dist/search-dialog-ZRXBAQJ5.mjs +1 -0
  40. package/package.json +2 -1
  41. package/src/client/app/theme-context.tsx +14 -7
  42. package/src/client/components/default-layout.tsx +6 -2
  43. package/src/client/components/primitives/navbar.tsx +3 -3
  44. package/src/client/components/primitives/search-dialog.tsx +4 -4
  45. package/src/client/components/primitives/sidebar.tsx +3 -2
  46. package/src/client/components/primitives/skeleton.tsx +26 -0
  47. package/src/client/components/ui-base/loading.tsx +43 -73
  48. package/src/client/components/ui-base/navbar.tsx +8 -6
  49. package/src/client/components/ui-base/page-nav.tsx +2 -1
  50. package/src/client/components/ui-base/powered-by.tsx +4 -1
  51. package/src/client/components/ui-base/search-dialog.tsx +16 -5
  52. package/src/client/components/ui-base/sidebar.tsx +4 -2
  53. package/src/client/hooks/use-i18n.ts +3 -2
  54. package/src/client/hooks/use-localized-to.ts +6 -5
  55. package/src/client/hooks/use-page-nav.ts +27 -6
  56. package/src/client/hooks/use-routes.ts +2 -1
  57. package/src/client/hooks/use-search.ts +81 -59
  58. package/src/client/hooks/use-sidebar.ts +2 -1
  59. package/src/client/store/use-boltdocs-store.ts +6 -5
  60. package/src/client/theme/neutral.css +29 -0
  61. package/src/node/{cli.ts → cli/build.ts} +17 -23
  62. package/src/node/cli/dev.ts +22 -0
  63. package/src/node/cli/doctor.ts +243 -0
  64. package/src/node/cli/index.ts +9 -0
  65. package/src/node/cli/ui.ts +54 -0
  66. package/src/node/cli-entry.ts +16 -16
  67. package/src/node/config.ts +1 -1
  68. package/src/node/plugin/entry.ts +1 -1
  69. package/src/node/plugin/index.ts +24 -10
  70. package/src/node/routes/parser.ts +9 -9
  71. package/src/node/search/index.ts +55 -0
  72. package/src/node/ssg/index.ts +14 -6
  73. package/src/node/ssg/robots.ts +7 -4
  74. package/dist/chunk-5D6XPYQ3.mjs +0 -74
  75. package/dist/chunk-6QXCKZAT.mjs +0 -1
  76. package/dist/chunk-H4M6P3DM.mjs +0 -1
  77. package/dist/chunk-JXHNX2WN.mjs +0 -1
  78. package/dist/chunk-Q3MLYTIQ.mjs +0 -1
  79. package/dist/chunk-RSII2UPE.mjs +0 -1
  80. package/dist/chunk-ZRJ55GGF.mjs +0 -1
  81. package/dist/search-dialog-MA5AISC7.mjs +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # boltdocs
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5d53fd0`](https://github.com/jesusalcaladev/boltdocs/commit/5d53fd0eddbcc0e22b092f52cea82df78063376b) Thanks [@jesusalcaladev](https://github.com/jesusalcaladev)! - feat: added new primitives `Skeleton`
8
+ feat: added new loading with `Skeleton` primitives
9
+ feat: added new command `boltdocs doctor` for diagnostic your project
10
+ feat: support full-text search
11
+ fix: better calc in page-nav
12
+
3
13
  ## 2.2.0
4
14
 
5
15
  ### Minor Changes
package/bin/boltdocs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
2
+ 'use strict'
3
3
 
4
4
  /**
5
5
  * Stable entry point for the Boltdocs CLI.
@@ -9,4 +9,4 @@
9
9
  */
10
10
 
11
11
  // We use require because the core package is currently CommonJS.
12
- require("../dist/node/cli-entry.js");
12
+ require('../dist/node/cli-entry.js')
@@ -1,7 +1,7 @@
1
- export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, b as ProgressBar, S as Sidebar } from '../loading-BqGrFWO5.mjs';
1
+ export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, b as ProgressBar, S as Sidebar } from '../loading-WuaQbsKb.mjs';
2
2
  export { C as CopyMarkdown, a as CopyMarkdownProps } from '../copy-markdown-CbS8X-qe.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { a as BoltdocsTab, C as ComponentRoute } from '../types-j7jvWsJj.mjs';
4
+ import { C as ComponentRoute, a as BoltdocsTab } from '../types-j7jvWsJj.mjs';
5
5
  import 'react';
6
6
  import 'vite';
7
7
 
@@ -12,7 +12,7 @@ declare function GithubStars({ repo }: {
12
12
  declare function PoweredBy(): react_jsx_runtime.JSX.Element;
13
13
 
14
14
  declare function SearchDialog({ routes }: {
15
- routes: any[];
15
+ routes: ComponentRoute[];
16
16
  }): react_jsx_runtime.JSX.Element;
17
17
 
18
18
  declare function Tabs({ tabs, routes, }: {
@@ -1,7 +1,7 @@
1
- export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, b as ProgressBar, S as Sidebar } from '../loading-chS3pm9W.js';
1
+ export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, b as ProgressBar, S as Sidebar } from '../loading-B7X5Wchs.js';
2
2
  export { C as CopyMarkdown, a as CopyMarkdownProps } from '../copy-markdown-C-90ixSe.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { a as BoltdocsTab, C as ComponentRoute } from '../types-j7jvWsJj.js';
4
+ import { C as ComponentRoute, a as BoltdocsTab } from '../types-j7jvWsJj.js';
5
5
  import 'react';
6
6
  import 'vite';
7
7
 
@@ -12,7 +12,7 @@ declare function GithubStars({ repo }: {
12
12
  declare function PoweredBy(): react_jsx_runtime.JSX.Element;
13
13
 
14
14
  declare function SearchDialog({ routes }: {
15
- routes: any[];
15
+ routes: ComponentRoute[];
16
16
  }): react_jsx_runtime.JSX.Element;
17
17
 
18
18
  declare function Tabs({ tabs, routes, }: {
@@ -1 +1 @@
1
- "use strict";var fr=Object.create;var Ve=Object.defineProperty;var gr=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var br=Object.getPrototypeOf,xr=Object.prototype.hasOwnProperty;var y=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ut=(e,t)=>{for(var o in t)Ve(e,o,{get:t[o],enumerable:!0})},jt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of hr(t))!xr.call(e,n)&&n!==o&&Ve(e,n,{get:()=>t[n],enumerable:!(r=gr(t,n))||r.enumerable});return e};var V=(e,t,o)=>(o=e!=null?fr(br(e)):{},jt(t||!e||!e.__esModule?Ve(o,"default",{value:e,enumerable:!0}):o,e)),vr=e=>jt(Ve({},"__esModule",{value:!0}),e);var i=y(()=>{"use strict"});function F(){let e=(0,De.use)(Cr);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var De,Cr,pe=y(()=>{"use strict";i();De=require("react"),Cr=(0,De.createContext)(null)});function He(){return(0,ue.use)(yr)}var ue,Nr,yr,mt=y(()=>{"use strict";i();ue=require("react"),Nr=require("react/jsx-runtime"),yr=(0,ue.createContext)({preload:()=>{},routes:[]})});var Kt,ze,ne,$e=y(()=>{"use strict";i();Kt=require("zustand"),ze=require("zustand/middleware"),ne=(0,Kt.create)()((0,ze.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,ze.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}))});function k(){let{routes:e}=He(),t=F(),o=(0,qt.useLocation)(),r=ne(h=>h.currentLocale),n=ne(h=>h.currentVersion),s=ne(h=>h.hasHydrated),a=e.find(h=>h.path===o.pathname),l=t.i18n?a?.locale||(s?r:void 0)||t.i18n.defaultLocale:void 0,c=t.versions?a?.version||(s?n:void 0)||t.versions.defaultVersion:void 0,f=e.filter(h=>{let Z=t.i18n?(h.locale||t.i18n.defaultLocale)===l:!0,lt=t.versions?(h.version||t.versions.defaultVersion)===c:!0;if(!(Z&&lt))return!1;let ct=t.i18n;if(ct){let ur=!!a?.locale,dr=!!h.locale;if(e.some(Ee=>Ee!==h&&Ee.filePath===h.filePath&&Ee.version===h.version&&(Ee.locale||ct.defaultLocale)===(h.locale||ct.defaultLocale))&&ur!==dr)return!1}return!0}),p=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,v=t.versions?.versions.find(h=>h.path===c)?.label||c,N=t.i18n?Object.entries(t.i18n.locales).map(([h,Z])=>{let lt=t.i18n?.localeConfigs?.[h];return{key:h,label:lt?.label||Z,isCurrent:h===l}}):[],C=t.versions?t.versions.versions.map(h=>({key:h.path,label:h.label,isCurrent:h.path===c})):[];return{routes:f,allRoutes:e,currentRoute:a,currentLocale:l,currentLocaleLabel:p,availableLocales:N,currentVersion:c,currentVersionLabel:v,availableVersions:C,config:t}}var qt,W=y(()=>{"use strict";i();qt=require("react-router-dom");pe();mt();$e()});function m(...e){return(0,Qt.twMerge)((0,Zt.clsx)(e))}var Zt,Qt,I=y(()=>{"use strict";i();Zt=require("clsx"),Qt=require("tailwind-merge")});var de,Jt,ke,Yt,pt,ut,eo,dt=y(()=>{"use strict";i();de=require("react-aria-components"),Jt=require("lucide-react");I();ke=require("react/jsx-runtime"),Yt=({children:e,className:t,...o})=>(0,ke.jsx)(de.Breadcrumbs,{className:m("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),pt=({children:e,className:t,...o})=>(0,ke.jsx)(de.Breadcrumb,{className:m("flex items-center mb-0 gap-1.5",t),...o,children:e}),ut=({children:e,href:t,className:o,...r})=>(0,ke.jsx)(de.Link,{href:t,className:m("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm","current:font-medium current:text-text-main current:pointer-events-none cursor-pointer",o),...r,children:e}),eo=({className:e})=>(0,ke.jsx)(Jt.ChevronRight,{size:14,className:m("shrink-0 text-text-dim",e)})});function Ge(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var D,_e,ro,no,so,ft=y(()=>{"use strict";i();D=require("react/jsx-runtime");_e=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Ge(e),children:[(0,D.jsx)("title",{children:"GitHub"}),(0,D.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),ro=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Ge(e),children:[(0,D.jsx)("title",{children:"Discord"}),(0,D.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),no=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Ge(e),children:[(0,D.jsx)("title",{children:"X"}),(0,D.jsx)("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]}),so=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Ge(e),children:[(0,D.jsx)("title",{children:"Bluesky"}),(0,D.jsx)("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]})});var Fe,io,J,x,Rr,wr,Tr,Lr,kr,Sr,Ir,Br,Mr,Ar,Or,Er,Vr,Dr,Hr,O,We=y(()=>{"use strict";i();Fe=require("react");Ue();io=require("react-aria-components"),J=require("lucide-react");ft();x=require("react/jsx-runtime"),Rr=({children:e,className:t,...o})=>(0,x.jsx)("header",{className:m("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),wr=({children:e,className:t})=>(0,x.jsx)("div",{className:m("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),Tr=({children:e,className:t})=>(0,x.jsx)("div",{className:m("flex items-center gap-4",t),children:e}),Lr=({children:e,className:t})=>(0,x.jsx)("div",{className:m("flex items-center gap-2 md:gap-4",t),children:e}),kr=({children:e,className:t})=>(0,x.jsx)("div",{className:m("hidden lg:flex flex-1 justify-center items-center gap-4 px-4",t),children:e}),Sr=({src:e,alt:t,width:o=24,height:r=24,className:n})=>(0,x.jsx)(z,{href:"/",className:m("flex items-center gap-2 shrink-0 outline-none",n),children:e?(0,x.jsx)("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),Ir=({children:e,className:t})=>(0,x.jsx)("span",{className:m("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e}),Br=({children:e,className:t})=>(0,x.jsx)("nav",{className:m("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),Mr=({label:e,href:t,active:o,to:r,className:n})=>(0,x.jsxs)(z,{href:t,target:r==="external"?"_blank":void 0,className:m("transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500 font-bold":o,"text-text-muted hover:text-text-main font-medium":!o},n),children:[e,r==="external"&&(0,x.jsx)("span",{className:"ml-1 inline-block",children:(0,x.jsx)(J.ExternalLink,{size:12})})]}),Ar=({className:e,onPress:t})=>{let[o,r]=(0,Fe.useState)(!1),n=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return(0,Fe.useEffect)(()=>{r(!0)},[]),(0,x.jsxs)(io.Button,{onPress:t,className:m("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-colors hover:border-border-strong hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[320px] justify-between",e),children:[(0,x.jsxs)("div",{className:"flex items-center gap-2",children:[(0,x.jsx)(J.Search,{size:16}),(0,x.jsx)("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),(0,x.jsxs)("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[(0,x.jsx)("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:n?"\u2318":"Ctrl"}),(0,x.jsx)("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},Or=({className:e,theme:t,onThemeChange:o})=>(0,x.jsx)(he.ToggleButton,{isSelected:t==="dark",onChange:o,className:m("rounded-md p-2 text-text-muted outline-none cursor-pointer transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?(0,x.jsx)(J.Sun,{size:20}):(0,x.jsx)(J.Moon,{size:20})}),Er=({label:e,className:t,onPress:o,isCurrent:r})=>(0,x.jsx)(U,{onAction:o,className:m(r&&"bg-primary-500 text-white font-medium hover:bg-primary-600 focus:bg-primary-600 focus:text-white",t),children:e}),Vr=({name:e})=>{if(e==="github")return(0,x.jsx)(_e,{});if(e==="discord")return(0,x.jsx)(ro,{});if(e==="x")return(0,x.jsx)(no,{});if(e==="bluesky")return(0,x.jsx)(so,{})},Dr=({icon:e,link:t,className:o})=>(0,x.jsx)(z,{href:t,target:"_blank",rel:"noopener noreferrer",className:m("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:(0,x.jsx)(Vr,{name:e})}),Hr=({className:e})=>(0,x.jsx)(he.Separator,{orientation:"vertical",className:m("h-6 w-px bg-border-subtle mx-1",e)}),O={NavbarRoot:Rr,NavbarLeft:Tr,NavbarRight:Lr,NavbarCenter:kr,NavbarLogo:Sr,Title:Ir,Links:Br,Link:Mr,SearchTrigger:Ar,Theme:Or,Item:Er,Socials:Dr,Split:Hr,Content:wr}});var Se,zr,gt,ao=y(()=>{"use strict";i();Se=V(require("react-aria-components")),zr=require("lucide-react");I();gt=require("react/jsx-runtime")});var B,se,P,ht,bt,xt,vt,Ct,yt,Nt,Pt,ms,Rt=y(()=>{"use strict";i();B=V(require("react-aria-components")),se=require("lucide-react");I();P=require("react/jsx-runtime"),ht=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,P.jsx)(B.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:m("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,P.jsx)(B.Modal,{className:m("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,P.jsx)(B.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),bt=({children:e,className:t,onSelectionChange:o,...r})=>(0,P.jsx)("div",{className:t,children:(0,P.jsx)(B.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),xt=({className:e,...t})=>(0,P.jsxs)(B.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,P.jsx)(se.Search,{className:"h-5 w-5 text-text-muted"}),(0,P.jsx)(B.Input,{...t,className:m("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,P.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,P.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),vt=({children:e,className:t,...o})=>(0,P.jsx)(B.ListBox,{...o,className:m("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Ct=({children:e,className:t,...o})=>(0,P.jsx)(B.ListBoxItem,{...o,className:m("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,P.jsxs)(P.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,P.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,P.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,P.jsx)(se.CornerDownLeft,{size:10})]})]})}),yt=({isHeading:e,className:t})=>(0,P.jsx)("div",{className:m("shrink-0",t),children:e?(0,P.jsx)(se.Hash,{size:18}):(0,P.jsx)(se.FileText,{size:18})}),Nt=({children:e,className:t})=>(0,P.jsx)("span",{className:m("block font-medium truncate flex-1 text-sm",t),children:e}),Pt=({children:e,className:t})=>(0,P.jsx)("span",{className:m("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),ms={Root:ht,Autocomplete:bt,Input:xt,List:vt,Item:Object.assign(Ct,{Icon:yt,Title:Nt,Bio:Pt})}});function lo(e,t){let o=(0,je.useRef)(e);(0,je.useEffect)(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}var je,co=y(()=>{"use strict";i();je=require("react")});function wt(e){return e.startsWith("#")?e.slice(1):null}var mo=y(()=>{"use strict";i()});function $r(){let e=(0,R.use)(Lt);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function Gr(e){let[t,o]=(0,R.useState)({isOverflowing:!1,isAtBottom:!1});return(0,R.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let a=r.scrollHeight>r.clientHeight,l=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:a,isAtBottom:l})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let s=new MutationObserver(n);return s.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),s.disconnect()}},[e]),t}function fo(){let e=$r();return(0,R.useMemo)(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function go({containerRef:e,children:t}){return(0,j.jsx)(uo.Provider,{value:e,children:t})}function ho({toc:e,single:t=!1,children:o}){let r=(0,R.useMemo)(()=>new Tt,[]),[n,s]=(0,R.useState)(r.items);return r.single=t,(0,R.useEffect)(()=>{r.setItems(e)},[r,e]),(0,R.useEffect)(()=>(r.watch({rootMargin:"0px",threshold:.98}),r.onChange=()=>s([...r.items]),()=>{r.unwatch()}),[r]),(0,j.jsx)(Lt.Provider,{value:n,children:o})}var R,po,j,Lt,uo,Tt,_r,Fr,bo,Wr,Ur,jr,Kr,le,kt=y(()=>{"use strict";i();R=require("react"),po=V(require("scroll-into-view-if-needed"));I();co();mo();j=require("react/jsx-runtime"),Lt=(0,R.createContext)(null),uo=(0,R.createContext)(null),Tt=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;let o=!1;if(this.items=this.items.map(r=>{let n=t.find(a=>a.target.id===r.id),s=n?n.isIntersecting:r.active&&!r.fallback;return this.single&&o&&(s=!1),r.active!==s&&(r={...r,t:Date.now(),active:s,fallback:!1}),s&&(o=!0),r}),!o&&t[0].rootBounds){let r=t[0].rootBounds.top,n=Number.MAX_VALUE,s=-1;for(let a=0;a<this.items.length;a++){let l=document.getElementById(this.items[a].id);if(!l)continue;let c=Math.abs(r-l.getBoundingClientRect().top);c<n&&(s=a,n=c)}s!==-1&&(this.items[s]={...this.items[s],active:!0,fallback:!0,t:Date.now()})}this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let n=document.getElementById(r.id);n&&o.unobserve(n)}this.items=[];for(let r of t){let n=wt(r.url);n&&this.items.push({id:n,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}};_r=({children:e,className:t})=>(0,j.jsx)("nav",{className:m("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),Fr=({children:e,className:t,...o})=>(0,j.jsx)("div",{className:m("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),bo=({children:e,className:t,ref:o,...r})=>{let n=(0,R.useRef)(null);(0,R.useImperativeHandle)(o,()=>n.current);let{isOverflowing:s,isAtBottom:a}=Gr(n);return(0,j.jsx)("div",{ref:n,className:m("relative overflow-y-auto boltdocs-otp-content",s&&!a&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};bo.displayName="OnThisPageContent";Wr=({children:e,className:t})=>(0,j.jsx)("ul",{className:m("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),Ur=({level:e,children:t,className:o})=>(0,j.jsx)("li",{className:m(e===3&&"pl-3",o),children:t}),jr=({children:e,href:t,active:o,onClick:r,className:n})=>{let s=(0,R.use)(Lt),a=(0,R.use)(uo),l=t?wt(t):null,c=(0,R.useRef)(null),[f,d]=(0,R.useState)(o);return lo(l&&s?s.find(p=>p.id===l)?.active:null,p=>{p!==null&&p!==f&&(d(!!p),p&&c.current&&a?.current&&(0,po.default)(c.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:a.current}))}),(0,R.useEffect)(()=>{o!==void 0&&d(o)},[o]),(0,j.jsx)("a",{ref:c,href:t,onClick:r,"data-active":f,className:m("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",f?"text-primary-500 font-medium":"text-text-muted",n),children:e})},Kr=({style:e,className:t})=>(0,j.jsx)("div",{className:m("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e}),le={OnThisPageRoot:_r,OnThisPageHeader:Fr,OnThisPageContent:bo,OnThisPageList:Wr,OnThisPageItem:Ur,OnThisPageLink:jr,OnThisPageIndicator:Kr}});var xo,Ke,$,qr,Xr,Zr,Qr,Jr,ie,St=y(()=>{"use strict";i();xo=V(require("react-aria-components")),Ke=require("lucide-react");I();$=require("react/jsx-runtime"),qr=({children:e,className:t})=>(0,$.jsx)("nav",{className:m("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Xr=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,$.jsxs)(xo.Link,{href:t,className:m("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)(Ke.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)(Ke.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Zr=({children:e,className:t})=>(0,$.jsx)("span",{className:m("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Qr=({children:e,className:t})=>(0,$.jsx)("span",{className:m("text-base font-bold text-text-main truncate",t),children:e}),Jr=({children:e})=>(0,$.jsx)($.Fragment,{children:e}),ie={PageNavRoot:qr,PageNavLink:Object.assign(Xr,{Title:Zr,Description:Qr,Icon:Jr})}});var be,Yr,en,tn,on,rn,It,Bt=y(()=>{"use strict";i();I();be=require("react/jsx-runtime"),Yr=({children:e,className:t="",...o})=>(0,be.jsx)("div",{className:m("w-full",t),...o,children:e}),en=({children:e,className:t=""})=>(0,be.jsx)("div",{role:"tablist",className:m("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),tn=({children:e,id:t,selected:o,className:r="",...n})=>(0,be.jsx)("button",{role:"tab","aria-selected":o,className:m("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...n,children:e}),on=({children:e,className:t=""})=>(0,be.jsx)("div",{className:m("p-4 outline-none",t),children:e}),rn=({className:e="",style:t})=>(0,be.jsx)("div",{className:m("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t}),It={TabsRoot:Yr,TabsList:en,TabsItem:tn,TabsContent:on,TabsIndicator:rn}});function Ie(e){let t=F(),{currentLocale:o,currentVersion:r}=k();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,s=t.versions;if(!n&&!s)return e;let a=e.startsWith("/docs"),l=e.split("/").filter(Boolean),c=0;l[c]==="docs"&&c++,s&&l.length>c&&s.versions.find(v=>v.path===l[c])&&c++,n&&l.length>c&&n.locales[l[c]]&&c++;let f=l.slice(c),d=[];a&&(d.push("docs"),s&&r&&d.push(r)),n&&o&&o!==n.defaultLocale&&d.push(o),d.push(...f);let p=`/${d.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}var Mt=y(()=>{"use strict";i();pe();W()});var At,vo,Co,Ot,z,nn,Be=y(()=>{"use strict";i();At=V(require("react")),vo=require("react-aria-components"),Co=require("react-router-dom");Mt();mt();I();Ot=require("react/jsx-runtime"),z=At.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:s,...a}=e,l=Ie(o??""),{preload:c}=He();return(0,Ot.jsx)(vo.Link,{...a,ref:t,href:l,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&c(l)},onFocus:p=>{s?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&c(l)}})});z.displayName="Link";nn=At.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:s,...a}=e,l=(0,Co.useLocation)(),c=Ie(o??""),f=r?l.pathname===c:l.pathname.startsWith(c),d=typeof n=="function"?n({isActive:f}):m(n,f&&"active"),p=typeof s=="function"?s({isActive:f}):s;return(0,Ot.jsx)(z,{...a,ref:t,href:o,className:d,children:p})});nn.displayName="NavLink"});var yo,No,M,sn,an,ln,cn,mn,xe,Et=y(()=>{"use strict";i();Be();yo=V(require("react-aria-components")),No=require("lucide-react");I();M=require("react/jsx-runtime"),sn=({badge:e})=>{let t={new:"bg-primary-500/20 text-primary-500",updated:"bg-gray-500/20 text-gray-500",deprecated:"bg-red-500/20 text-red-500"};if(typeof e=="object"&&e?.expires){let r=new Date(e.expires),n=new Date,s=r.getTime()-n.getTime();if(Math.ceil(s/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return(0,M.jsx)("span",{className:m("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},an=({children:e,className:t})=>(0,M.jsx)("aside",{className:m("boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0","w-sidebar h-full","overflow-y-auto border-r border-border-subtle bg-bg-main","py-6 px-4",t),children:(0,M.jsx)("nav",{className:"flex-1 space-y-6",children:e})}),ln=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:n,className:s})=>(0,M.jsxs)("div",{className:m("space-y-1",s),children:[t&&(0,M.jsxs)(yo.Button,{onPress:n,className:m("flex w-full items-center justify-between px-2 py-1.5 text-xs font-bold uppercase tracking-wider outline-none cursor-pointer","text-text-muted hover:text-text-main transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md"),children:[(0,M.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,M.jsx)(o,{size:14}),t]}),(0,M.jsx)(No.ChevronRight,{size:14,className:m("transition-transform duration-200",r&&"rotate-90")})]}),r&&(0,M.jsx)("div",{className:"space-y-0.5",children:e})]}),cn=({children:e,className:t})=>(0,M.jsx)("div",{className:m(t),children:e}),mn=({label:e,href:t,active:o,icon:r,badge:n,className:s})=>(0,M.jsxs)(z,{href:t,className:m("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30",o?"bg-primary-500/10 text-primary-500 font-medium":"text-text-muted hover:bg-bg-surface hover:text-text-main",s),children:[r&&(0,M.jsx)(r,{size:16,className:m(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),(0,M.jsx)("span",{className:"truncate",children:e}),n&&(0,M.jsx)(sn,{badge:n})]}),xe={SidebarRoot:an,SidebarGroup:ln,SidebarGroupItem:cn,SidebarLink:mn}});var qe,Ro,G,Po,Y,Vt=y(()=>{"use strict";i();qe=V(require("react-aria-components"));I();Ro=require("class-variance-authority"),G=require("react/jsx-runtime"),Po=(0,Ro.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"}}),Y=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:s,variant:a,size:l,rounded:c,iconSize:f,disabled:d,...p})=>{let u=r||!n&&!!t,v=u?(0,G.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,G.jsxs)(G.Fragment,{children:[t&&o==="left"&&(0,G.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,G.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,G.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,G.jsx)(qe.Link,{href:e,className:m(Po({variant:a,size:l,rounded:c,iconSize:u?f:void 0,disabled:d}),s),...p,children:v}):(0,G.jsx)(qe.Button,{className:m(Po({variant:a,size:l,rounded:c,iconSize:u?f:void 0,disabled:d}),s),...p,children:v})}});var To,wo,Lo=y(()=>{"use strict";i();I();To=require("react/jsx-runtime"),wo=({children:e,className:t,vertical:o=!1})=>(0,To.jsx)("div",{className:m("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e})});var Ce,ve,Dt,Ht=y(()=>{"use strict";"use client";i();Ce=V(require("react-aria-components"));I();ve=require("react/jsx-runtime"),Dt=({children:e,className:t,showArrow:o,...r})=>(0,ve.jsxs)(Ce.Popover,{offset:8,...r,className:Ce.composeRenderProps(t,n=>m("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","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,ve.jsx)(Ce.OverlayArrow,{className:"group",children:(0,ve.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,ve.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]})});function fe(e){let[t,o]=zt.default.Children.toArray(e.children).slice(0,2);return(0,T.jsxs)(L.MenuTrigger,{...e,children:[t,(0,T.jsx)(Dt,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function pn(e){let[t,o]=zt.default.Children.toArray(e.children).slice(0,2);return(0,T.jsxs)(L.SubmenuTrigger,{...e,children:[t,(0,T.jsx)(Dt,{offset:-4,crossOffset:-4,children:o})]})}function ge(e){return(0,T.jsx)(L.Menu,{...e,className:L.composeRenderProps(e.className,t=>m("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function U(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,T.jsx)(L.MenuItem,{...e,textValue:t,className:L.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:s})=>m("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",s&&"opacity-40 grayscale pointer-events-none",o)),children:L.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:s})=>(0,T.jsxs)(T.Fragment,{children:[r!=="none"&&(0,T.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,T.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,T.jsx)(ye.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,T.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),s&&(0,T.jsx)(ye.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function un({title:e,...t}){return(0,T.jsxs)(L.MenuSection,{...t,className:m("flex flex-col gap-0.5",t.className),children:[e&&(0,T.jsx)(L.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,T.jsx)(L.Collection,{items:t.items,children:t.children})]})}function dn(e){return(0,T.jsx)(L.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var ye,zt,L,T,ee,Xe=y(()=>{"use strict";"use client";i();ye=require("lucide-react"),zt=V(require("react")),L=V(require("react-aria-components"));Ht();I();T=require("react/jsx-runtime");ee={Root:ge,Item:U,Trigger:fe,SubTrigger:pn,Section:un,Separator:dn}});var $t,Gt,ko=y(()=>{"use strict";i();$t=V(require("react-aria-components"));I();Gt=require("react/jsx-runtime")});var he,Ue=y(()=>{"use strict";i();We();ao();Rt();kt();St();Bt();Et();dt();Vt();Lo();Xe();Ht();ko();Be();he=require("react-aria-components");I()});function jo(e){let{currentLocale:t,currentVersion:o}=k(),[r,n]=(0,Ae.useState)(!1),[s,a]=(0,Ae.useState)(""),l=(0,Ae.useMemo)(()=>{let c=e.filter(u=>{let v=!t||u.locale===t,N=!o||u.version===o;return v&&N});if(!s)return c.slice(0,10).map(u=>({id:u.path,title:u.title,path:u.path,bio:u.description||"",groupTitle:u.groupTitle}));let f=[],d=s.toLowerCase();for(let u of c)if(u.title?.toLowerCase().includes(d)&&f.push({id:u.path,title:u.title,path:u.path,bio:u.description||"",groupTitle:u.groupTitle}),u.headings)for(let v of u.headings)v.text.toLowerCase().includes(d)&&f.push({id:`${u.path}#${v.id}`,title:v.text,path:`${u.path}#${v.id}`,bio:`Heading in ${u.title}`,groupTitle:u.title,isHeading:!0});let p=new Set;return f.filter(u=>p.has(u.path)?!1:(p.add(u.path),!0)).slice(0,10)},[e,s,t,o]);return{isOpen:r,setIsOpen:n,query:s,setQuery:a,list:l,input:{value:s,onChange:c=>a(c.target.value)}}}var Ae,Ko=y(()=>{"use strict";i();Ae=require("react");W()});var Xo={};Ut(Xo,{SearchDialog:()=>_t});function _t({routes:e}){let{isOpen:t,setIsOpen:o,query:r,setQuery:n,list:s}=jo(e),a=(0,qo.useNavigate)();(0,nt.useEffect)(()=>{let c=f=>{(/Mac/.test(navigator.userAgent)?f.metaKey:f.ctrlKey)&&(f.key==="k"||f.key==="j")&&(f.preventDefault(),o(u=>!u))};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[o]);let l=(0,nt.useCallback)(c=>{let f=String(c);if(o(!1),f.includes("#")){let[d,p]=f.split("#");a(d),setTimeout(()=>{let u=document.getElementById(p);u&&u.scrollIntoView({behavior:"smooth"})},100)}else a(f)},[a,o]);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(O.SearchTrigger,{onPress:()=>o(!0)}),(0,E.jsx)(ht,{isOpen:t,onOpenChange:o,children:(0,E.jsxs)(bt,{onSelectionChange:l,children:[(0,E.jsx)(xt,{value:r,onChange:c=>n(c.target.value)}),(0,E.jsx)(vt,{items:s,children:c=>(0,E.jsxs)(Ct,{onPress:()=>l(c.id),textValue:c.title,children:[(0,E.jsx)(yt,{isHeading:c.isHeading}),(0,E.jsxs)("div",{className:"flex flex-col justify-center gap-0.5",children:[(0,E.jsx)(Nt,{children:c.title}),(0,E.jsx)(Pt,{children:c.groupTitle})]})]},c.id)})]})})]})}var nt,qo,E,Ft=y(()=>{"use strict";i();nt=require("react");Ko();Rt();We();qo=require("react-router-dom"),E=require("react/jsx-runtime")});var Ln={};Ut(Ln,{Breadcrumbs:()=>oo,CopyMarkdown:()=>Io,ErrorBoundary:()=>Ze,GithubStars:()=>Je,Head:()=>Eo,Loading:()=>Vo,Navbar:()=>Qo,NotFound:()=>Yo,OnThisPage:()=>or,PageNav:()=>nr,PoweredBy:()=>it,ProgressBar:()=>ar,SearchDialog:()=>_t,Sidebar:()=>pr,Tabs:()=>rt,ThemeToggle:()=>ot});module.exports=vr(Ln);i();i();i();W();function Xt(){let{currentRoute:e}=k(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}var to=require("lucide-react");dt();I();pe();var Q=require("react/jsx-runtime");function oo(){let{crumbs:e,activeRoute:t}=Xt(),r=F().theme||{};return e.length===0||!r?.breadcrumbs?null:(0,Q.jsxs)(Yt,{children:[(0,Q.jsx)(pt,{children:(0,Q.jsx)(ut,{href:"/",children:(0,Q.jsx)(to.Home,{size:14})})}),e.map((n,s)=>(0,Q.jsxs)(pt,{children:[(0,Q.jsx)(eo,{}),(0,Q.jsx)(ut,{href:n.href,className:m({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${s}`))]})}i();var So=require("react"),te=require("lucide-react");Ue();var S=require("react/jsx-runtime"),fn=e=>{let[t,o]=(0,So.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let s=new Blob([e],{type:"text/plain;charset=utf-8"}),a=URL.createObjectURL(s);window.open(a,"_blank")}}};function Io({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:s,handleOpenRaw:a}=fn(r),l=o!==!1,c=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:(0,S.jsx)("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:(0,S.jsxs)(wo,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[(0,S.jsx)(Y,{variant:"ghost",onPress:s,icon:n?(0,S.jsx)(te.Check,{size:16}):(0,S.jsx)(te.Copy,{size:16}),iconPosition:"left",className:m("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":c}),(0,S.jsxs)(fe,{placement:"bottom end",children:[(0,S.jsx)(Y,{variant:"ghost",isIconOnly:!0,icon:(0,S.jsx)(te.ChevronDown,{size:14}),className:m("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,S.jsxs)(ge,{className:"w-52",children:[(0,S.jsxs)(U,{onAction:s,className:"flex flex-row items-start gap-2.5 group",children:[(0,S.jsx)(te.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,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,S.jsxs)(U,{onAction:a,className:"flex flex-row items-start gap-2.5 group",children:[(0,S.jsx)(te.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,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}i();var Bo=require("react");Ue();var Ne=require("react/jsx-runtime"),Ze=class extends Bo.Component{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error in Boltdocs Layout:",t,o)}render(){return this.state.hasError?this.props.fallback||(0,Ne.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[(0,Ne.jsx)("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),(0,Ne.jsx)("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),(0,Ne.jsx)(Y,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};i();var Qe=require("react");i();var gn="https://api.github.com";async function Mo(e,t,o=gn){let r=new Headers;t&&r.append("authorization",t);let s=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return s.stargazers_count!==void 0?hn(s.stargazers_count):"0"}var hn=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);ft();var Me=require("react/jsx-runtime");function Je({repo:e}){let[t,o]=(0,Qe.useState)(null);return(0,Qe.useEffect)(()=>{e&&Mo(e).then(r=>o(r)).catch(()=>o("0"))},[e]),(0,Me.jsxs)("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[(0,Me.jsx)(_e,{className:"h-4 w-4"}),t&&(0,Me.jsx)("span",{className:"tabular-nums",children:t})]})}i();var Ao=require("react"),Oo=require("react-router-dom");function Eo({siteTitle:e,siteDescription:t,routes:o}){let r=(0,Oo.useLocation)();return(0,Ao.useEffect)(()=>{let n=o.find(f=>f.path===r.pathname),s=n?.title,a=n?.description||t||"";document.title=s?`${s} | ${e}`:e;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.name="description",document.head.appendChild(l)),l.content=a,ce("property","og:title",document.title),ce("property","og:description",a),ce("property","og:type","article"),ce("property","og:url",window.location.href),ce("name","twitter:card","summary"),ce("name","twitter:title",document.title),ce("name","twitter:description",a);let c=document.querySelector('link[rel="canonical"]');c||(c=document.createElement("link"),c.rel="canonical",document.head.appendChild(c)),c.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function ce(e,t,o){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=o}i();var Ye=require("react"),H=require("react/jsx-runtime");function Vo(){let[e,t]=(0,Ye.useState)(0);(0,Ye.useEffect)(()=>{let r=0,n=!0,s=setInterval(()=>{n?(r+=1,r>=100&&(r=100,n=!1)):(r-=1,r<=0&&(r=0,n=!0)),t(r)},20);return()=>clearInterval(s)},[]);let o=`inset(${100-e}% 0 0 0)`;return(0,H.jsx)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:(0,H.jsx)("div",{className:"relative group",children:(0,H.jsxs)("div",{className:"relative inline-block",children:[(0,H.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,H.jsx)("title",{children:"Loading indicator background"}),(0,H.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,H.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,H.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,H.jsx)("title",{children:"Loading indicator animated fill"}),(0,H.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,H.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"})]})]})})})}i();var st=require("react");i();var Do=require("react-router-dom");pe();i();var Pe=require("react"),xn=require("react/jsx-runtime"),bn=(0,Pe.createContext)(void 0);function et(){let e=(0,Pe.use)(bn);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}i();function Re(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}W();function Ho(){let e=F(),{theme:t}=et(),o=(0,Do.useLocation)(),{currentLocale:r}=k(),n=e.theme||{},s=Re(n.title,r)||"Boltdocs",a=n.navbar||[],l=n.socialLinks||[],c=n.githubRepo,f=a.map(N=>{let C=N.href||N.to||N.link||"";return{label:Re(N.label||N.text,r),href:C,active:o.pathname===C,to:C.startsWith("http")||C.startsWith("//")?"external":void 0,items:N.items?.map(h=>({label:Re(h.label||h.text,r),href:h.href||h.link||h.to||""}))}}),d=n.logo,p=d?typeof d=="string"?d:t==="dark"?d.dark:d.light:null,u={alt:(d&&typeof d=="object"?d.alt:void 0)||s,width:d&&typeof d=="object"?d.width:void 0,height:d&&typeof d=="object"?d.height:void 0},v=c?`https://github.com/${c}`:null;return{links:f,title:s,logo:p,logoProps:u,github:v,social:l,config:e,theme:t}}i();var zo=require("react-router-dom");i();function ae(e,t,o){let r=e;return t&&(r===t||r.startsWith(t+"/"))&&(r=r===t?"index.md":r.slice(t.length+1)),o&&(r===o||r.startsWith(o+"/"))&&(r=r===o?"index.md":r.slice(o.length+1)),r}W();$e();function $o(){let e=(0,zo.useNavigate)(),t=k(),{allRoutes:o,currentRoute:r,currentVersion:n,currentLocale:s,config:a}=t,l=a.versions,c=ne(p=>p.setVersion),f=p=>{if(!l||p===n)return;c(p);let u=`/docs/${p}`;if(r){let v=ae(r.filePath,r.version,r.locale),N=o.find(C=>ae(C.filePath,C.version,C.locale)===v&&(C.version||l.defaultVersion)===p&&(s?C.locale===s:!C.locale));if(N)u=N.path;else{let C=o.find(h=>ae(h.filePath,h.version,h.locale)==="index.md"&&(h.version||l.defaultVersion)===p&&(s?h.locale===s:!h.locale));u=C?C.path:`/docs/${p}${s?`/${s}`:""}`}}e(u)},d=t.availableVersions.map(p=>({...p,label:p.label,value:p.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:d,handleVersionChange:f}}i();var Go=require("react-router-dom");W();$e();function _o(){let e=(0,Go.useNavigate)(),t=k(),{allRoutes:o,currentRoute:r,currentLocale:n,config:s}=t,a=s.i18n,l=ne(u=>u.setLocale),c=u=>{if(!a||u===n)return;l(u);let v="/";if(r){let N=ae(r.filePath,r.version,r.locale),C=o.find(h=>ae(h.filePath,h.version,h.locale)===N&&(h.locale||a.defaultLocale)===u&&h.version===r.version);if(C)v=C.path;else{let h=o.find(Z=>ae(Z.filePath,Z.version,Z.locale)==="index.md"&&(Z.locale||a.defaultLocale)===u&&Z.version===r.version);v=h?h.path:u===a.defaultLocale?r.version?`/${r.version}`:"/":r.version?`/${r.version}/${u}`:`/${u}`}}else{let N=o.find(C=>(C.filePath==="index.mdx"||C.filePath==="index.md")&&(C.locale||a.defaultLocale)===u&&!C.version);N?v=N.path:v=u===a.defaultLocale?"/":`/${u}`}e(v)},d=s.i18n?.localeConfigs?.[n]?.label||s.i18n?.locales[n]||n,p=s.i18n?Object.entries(s.i18n.locales).map(([u,v])=>{let N=s.i18n?.localeConfigs?.[u];return{key:u,label:N?.label||v,value:u,isCurrent:u===n}}):[];return{currentLocale:n,currentLocaleLabel:d,availableLocales:p,handleLocaleChange:c}}W();We();i();var tt=require("react"),oe=require("lucide-react");var Fo=require("react-aria-components");Xe();var A=require("react/jsx-runtime");function ot(){let{theme:e,setTheme:t}=et(),[o,r]=(0,tt.useState)(!1);return(0,tt.useEffect)(()=>{r(!0)},[]),o?(0,A.jsxs)(fe,{placement:"bottom right",children:[(0,A.jsx)(Fo.Button,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:(0,A.jsx)(e==="system"?oe.Monitor:e==="dark"?oe.Moon:oe.Sun,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),(0,A.jsxs)(ge,{selectionMode:"single",selectedKeys:[e],onSelectionChange:s=>{let a=Array.from(s)[0];t(a)},children:[(0,A.jsxs)(U,{id:"light",children:[(0,A.jsx)(oe.Sun,{size:16}),(0,A.jsx)("span",{children:"Light"})]}),(0,A.jsxs)(U,{id:"dark",children:[(0,A.jsx)(oe.Moon,{size:16}),(0,A.jsx)("span",{children:"Dark"})]}),(0,A.jsxs)(U,{id:"system",children:[(0,A.jsx)(oe.Monitor,{size:16}),(0,A.jsx)("span",{children:"System"})]})]})]}):(0,A.jsx)("div",{className:"h-9 w-9"})}i();i();var Wo=require("react-router-dom"),we=require("react");function Uo(e=[],t=[]){let o=(0,Wo.useLocation)(),r=(0,we.useRef)([]),[n,s]=(0,we.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),l=t.find(d=>d.path===o.pathname)?.tab?.toLowerCase(),c=e.findIndex(d=>d.id.toLowerCase()===l),f=c===-1?0:c;return(0,we.useEffect)(()=>{let d=r.current[f];d&&s({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[f,e.length,o.pathname]),{tabs:e,activeIndex:f,indicatorStyle:n,tabRefs:r,activeTabId:l}}Bt();Be();var vn=V(require("lucide-react"));W();var K=require("react/jsx-runtime");function rt({tabs:e,routes:t}){let{currentLocale:o}=k(),{indicatorStyle:r,tabRefs:n,activeIndex:s}=Uo(e,t),a=l=>{if(!l)return null;if(l.trim().startsWith("<svg"))return(0,K.jsx)("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:l}});let c=vn[l];return c?(0,K.jsx)(c,{size:16}):(0,K.jsx)("img",{src:l,alt:"",className:"h-4 w-4 object-contain"})};return(0,K.jsx)("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:(0,K.jsxs)(It.TabsList,{className:"border-none py-0",children:[e.map((l,c)=>{let f=c===s,d=t.find(u=>u.tab&&u.tab.toLowerCase()===l.id.toLowerCase()),p=d?d.path:"#";return(0,K.jsxs)(z,{href:p,ref:u=>{n.current[c]=u},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${f?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[a(l.icon),(0,K.jsx)("span",{children:Re(l.text,o)})]},l.id)}),(0,K.jsx)(It.TabsIndicator,{style:r})]})})}var Zo=require("react-router-dom");Xe();Vt();var Oe=require("lucide-react");Mt();var b=require("react/jsx-runtime"),Cn=(0,st.lazy)(()=>Promise.resolve().then(()=>(Ft(),Xo)).then(e=>({default:e.SearchDialog})));function Qo(){let{links:e,title:t,logo:o,logoProps:r,github:n,social:s,config:a}=Ho(),{routes:l,allRoutes:c,currentVersion:f,currentLocale:d}=k(),{pathname:p}=(0,Zo.useLocation)(),u=a.theme||{},v=u?.tabs&&u.tabs.length>0;return(0,b.jsxs)(O.NavbarRoot,{className:v?"border-b-0":"",children:[(0,b.jsxs)(O.Content,{children:[(0,b.jsxs)(O.NavbarLeft,{children:[(0,b.jsx)(O.NavbarLogo,{src:o??"",alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),(0,b.jsx)(O.Title,{children:t}),a.versions&&f&&(0,b.jsx)(Nn,{}),(0,b.jsx)(O.Links,{children:e.map(N=>(0,b.jsx)(yn,{link:N},N.href))})]}),(0,b.jsx)(O.NavbarCenter,{children:(0,b.jsx)(st.Suspense,{fallback:(0,b.jsx)("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:(0,b.jsx)(Cn,{routes:l||[]})})}),(0,b.jsxs)(O.NavbarRight,{children:[a.i18n&&d&&(0,b.jsx)(Pn,{}),(0,b.jsx)(O.Split,{}),(0,b.jsx)(ot,{}),n&&(0,b.jsx)(Je,{repo:u?.githubRepo??""}),s.length>0&&(0,b.jsx)(O.Split,{}),(0,b.jsx)("div",{className:"flex items-center gap-1",children:s.map(({icon:N,link:C})=>(0,b.jsx)(O.Socials,{icon:N,link:C,className:"p-1.5"},C))})]})]}),p!=="/"&&v&&u?.tabs&&(0,b.jsx)("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:(0,b.jsx)(rt,{tabs:u.tabs,routes:c||l||[]})})]})}function yn({link:e}){let t=Ie(e.href);return(0,b.jsx)(O.Link,{...e,href:t})}function Nn(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=$o();return t.length===0?null:(0,b.jsxs)(ee.Trigger,{children:[(0,b.jsx)(Y,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,b.jsx)(Oe.ChevronDown,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:(0,b.jsx)("span",{className:"font-semibold text-[0.8125rem]",children:e})}),(0,b.jsx)(ee.Root,{children:(0,b.jsx)(ee.Section,{items:t,children:r=>(0,b.jsx)(ee.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})})]})}function Pn(){let{currentLocale:e,availableLocales:t,handleLocaleChange:o}=_o();return t.length===0?null:(0,b.jsxs)(ee.Trigger,{children:[(0,b.jsx)(Y,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,b.jsx)(Oe.ChevronDown,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(Oe.Languages,{className:"w-3.5 h-3.5 text-primary-500"}),(0,b.jsx)("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),(0,b.jsx)(ee.Root,{children:(0,b.jsx)(ee.Section,{items:t,children:r=>(0,b.jsx)(ee.Item,{onPress:()=>o(r.value),children:(0,b.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",children:[(0,b.jsx)("span",{children:r.label}),(0,b.jsx)("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}i();var Jo=require("lucide-react");Be();var re=require("react/jsx-runtime");function Yo(){return(0,re.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,re.jsxs)("div",{className:"space-y-4",children:[(0,re.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,re.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,re.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,re.jsxs)(z,{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,re.jsx)(Jo.ArrowLeft,{size:16})," Go to Home"]})]})})}i();kt();var _=V(require("react"));i();var er=require("react");function tr(e=[]){let[t,o]=(0,er.useState)(null);return{headings:e,activeId:t,setActiveId:o}}var Te=require("lucide-react"),w=require("react/jsx-runtime");function or({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:n}=tr(e),s=_.default.useMemo(()=>n.map(a=>({title:a.text,url:`#${a.id}`,depth:a.level})),[n]);return n.length===0?null:(0,w.jsx)(ho,{toc:s,children:(0,w.jsx)(Rn,{headings:n,editLink:t,communityHelp:o,filePath:r})})}function Rn({headings:e,editLink:t,communityHelp:o,filePath:r}){let n=fo(),[s,a]=(0,_.useState)({opacity:0}),l=(0,_.useRef)(null),c=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(!n||!l.current)return;let d=l.current.querySelector(`a[href="#${n}"]`);d&&a({transform:`translateY(${d.offsetTop}px)`,height:`${d.offsetHeight}px`,opacity:1})},[n]);let f=(0,_.useCallback)((d,p)=>{d.preventDefault();let u=document.getElementById(p);u&&(u.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${p}`))},[]);return(0,w.jsxs)(le.OnThisPageRoot,{children:[(0,w.jsxs)(le.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[(0,w.jsx)(Te.TextAlignStart,{size:16}),"On this page"]}),(0,w.jsx)(go,{containerRef:c,children:(0,w.jsxs)(le.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:c,children:[(0,w.jsx)(le.OnThisPageIndicator,{style:s}),(0,w.jsx)("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:l,children:e.map(d=>(0,w.jsx)(le.OnThisPageItem,{level:d.level,children:(0,w.jsx)(le.OnThisPageLink,{href:`#${d.id}`,active:n===d.id,onClick:p=>f(p,d.id),className:"pl-4",children:d.text})},d.id))})]})}),(t||o)&&(0,w.jsxs)("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[(0,w.jsx)("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),(0,w.jsxs)("ul",{className:"space-y-3",children:[t&&r&&(0,w.jsx)("li",{children:(0,w.jsxs)("a",{href:t.replace(":path",r),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,w.jsx)(Te.Pencil,{size:16}),"Edit this page"]})}),o&&(0,w.jsx)("li",{children:(0,w.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,w.jsx)(Te.CircleHelp,{size:16}),"Community help"]})})]})]})]})}i();i();W();function rr(){let{routes:e}=k(),t=window.location.pathname,o=e.findIndex(a=>a.path===t),r=e[o],n=o>0?e[o-1]:null,s=o<e.length-1?e[o+1]:null;return{prevPage:n,nextPage:s,currentRoute:r}}St();var q=require("react/jsx-runtime");function nr(){let{prevPage:e,nextPage:t}=rr();return!e&&!t?null:(0,q.jsxs)(ie.PageNavRoot,{children:[e?(0,q.jsxs)(ie.PageNavLink,{to:e.path,direction:"prev",children:[(0,q.jsx)(ie.PageNavLink.Title,{children:"Previous"}),(0,q.jsx)(ie.PageNavLink.Description,{children:e.title})]}):(0,q.jsx)("div",{}),t&&(0,q.jsxs)(ie.PageNavLink,{to:t.path,direction:"next",children:[(0,q.jsx)(ie.PageNavLink.Title,{children:"Next"}),(0,q.jsx)(ie.PageNavLink.Description,{children:t.title})]})]})}i();var sr=require("lucide-react"),me=require("react/jsx-runtime");function it(){return(0,me.jsx)("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:(0,me.jsxs)("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[(0,me.jsx)(sr.Zap,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),(0,me.jsxs)("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by ",(0,me.jsx)("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}i();var at=require("react"),ir=require("react-aria-components"),Wt=require("react/jsx-runtime");function ar(){let[e,t]=(0,at.useState)(0);return(0,at.useEffect)(()=>{let o=null,r,n=()=>{if(!o)return;let{scrollTop:a,scrollHeight:l,clientHeight:c}=o;if(l<=c){t(0);return}let f=a/(l-c)*100;t(Math.min(100,Math.max(0,f)))},s=()=>(o=document.querySelector(".boltdocs-content"),o?(o.addEventListener("scroll",n),n(),r&&clearInterval(r),!0):!1);return s()||(r=setInterval(s,100)),()=>{o&&o.removeEventListener("scroll",n),r&&clearInterval(r)}},[]),(0,Wt.jsx)(ir.ProgressBar,{value:e,"aria-label":"Reading progress",className:"fixed top-0 left-0 right-0 z-999 h-0.5 bg-transparent w-full pointer-events-none",children:({percentage:o})=>(0,Wt.jsx)("div",{className:"h-full bg-primary-500 transition-[width] duration-300 ease-out shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]",style:{width:`${o}%`}})})}Ft();i();var Le=require("react");i();var lr=require("react-router-dom");pe();function cr(e){let t=F(),o=(0,lr.useLocation)(),r=p=>p.endsWith("/")&&p.length>1?p.slice(0,-1):p,n=r(o.pathname),s=e.find(p=>r(p.path)===n),a=s?.tab?.toLowerCase(),l=a?e.filter(p=>!p.tab||p.tab.toLowerCase()===a):e,c=[],f=new Map;for(let p of l)p.group?(f.has(p.group)||f.set(p.group,{slug:p.group,title:p.groupTitle||p.group,routes:[],icon:p.groupIcon}),f.get(p.group).routes.push(p)):c.push(p);return{groups:Array.from(f.values()),ungrouped:c,activeRoute:s,activePath:n,config:t}}Et();var wn=V(require("lucide-react")),X=require("react/jsx-runtime");function mr(e){return e&&wn[e]||void 0}function Tn({group:e,activePath:t,getIcon:o}){let r=(0,Le.useMemo)(()=>e.routes.some(a=>a.path===t),[e.routes,t]),[n,s]=(0,Le.useState)(!0);return(0,Le.useEffect)(()=>{r&&s(!0)},[r]),(0,X.jsx)(xe.SidebarGroup,{title:e.title,isOpen:n,onToggle:()=>s(!n),children:e.routes.map(a=>{let l=t===(a.path.endsWith("/")?a.path.slice(0,-1):a.path);return(0,X.jsx)(xe.SidebarLink,{label:a.title,href:a.path,active:l,icon:o(a.icon),badge:a.badge},a.path)})})}function pr({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:n}=cr(e),s=t.theme||{};return(0,X.jsxs)(xe.SidebarRoot,{children:[r.length>0&&(0,X.jsx)(xe.SidebarGroup,{className:"mb-6",children:r.map(a=>{let l=n===(a.path.endsWith("/")?a.path.slice(0,-1):a.path);return(0,X.jsx)(xe.SidebarLink,{label:a.title,href:a.path,active:l,icon:mr(a.icon),badge:a.badge},a.path)})}),o.map(a=>(0,X.jsx)(Tn,{group:a,activePath:n,getIcon:mr},a.slug)),s?.poweredBy&&(0,X.jsx)("div",{className:"mt-auto pt-8",children:(0,X.jsx)(it,{})})]})}
1
+ "use strict";var xr=Object.create;var He=Object.defineProperty;var vr=Object.getOwnPropertyDescriptor;var yr=Object.getOwnPropertyNames;var Cr=Object.getPrototypeOf,Nr=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var jt=(e,t)=>{for(var o in t)He(e,o,{get:t[o],enumerable:!0})},Kt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yr(t))!Nr.call(e,n)&&n!==o&&He(e,n,{get:()=>t[n],enumerable:!(r=vr(t,n))||r.enumerable});return e};var D=(e,t,o)=>(o=e!=null?xr(Cr(e)):{},Kt(t||!e||!e.__esModule?He(o,"default",{value:e,enumerable:!0}):o,e)),Pr=e=>Kt(He({},"__esModule",{value:!0}),e);var a=N(()=>{"use strict"});function U(){let e=(0,Ve.use)(Rr);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Ve,Rr,de=N(()=>{"use strict";a();Ve=require("react"),Rr=(0,Ve.createContext)(null)});function ze(){return(0,fe.use)(wr)}var fe,Tr,wr,mt=N(()=>{"use strict";a();fe=require("react"),Tr=require("react/jsx-runtime"),wr=(0,fe.createContext)({preload:()=>{},routes:[]})});var qt,$e,se,Ge=N(()=>{"use strict";a();qt=require("zustand"),$e=require("zustand/middleware"),se=(0,qt.create)()((0,$e.persist)(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:(0,$e.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}))});function S(){let{routes:e}=ze(),t=U(),o=(0,Xt.useLocation)(),r=se(h=>h.currentLocale),n=se(h=>h.currentVersion),s=se(h=>h.hasHydrated),i=e.find(h=>h.path===o.pathname),l=t.i18n?i?.locale||(s?r:void 0)||t.i18n.defaultLocale:void 0,c=t.versions?i?.version||(s?n:void 0)||t.versions.defaultVersion:void 0,f=e.filter(h=>{let F=t.i18n?(h.locale||t.i18n.defaultLocale)===l:!0,lt=t.versions?(h.version||t.versions.defaultVersion)===c:!0;if(!(F&&lt))return!1;let ct=t.i18n;if(ct){let hr=!!i?.locale,br=!!h.locale;if(e.some(De=>De!==h&&De.filePath===h.filePath&&De.version===h.version&&(De.locale||ct.defaultLocale)===(h.locale||ct.defaultLocale))&&hr!==br)return!1}return!0}),u=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,v=t.versions?.versions.find(h=>h.path===c)?.label||c,x=t.i18n?Object.entries(t.i18n.locales).map(([h,F])=>{let lt=t.i18n?.localeConfigs?.[h];return{key:h,label:lt?.label||F,isCurrent:h===l}}):[],C=t.versions?t.versions.versions.map(h=>({key:h.path,label:h.label,isCurrent:h.path===c})):[];return{routes:f,allRoutes:e,currentRoute:i,currentLocale:l,currentLocaleLabel:u,availableLocales:x,currentVersion:c,currentVersionLabel:v,availableVersions:C,config:t}}var Xt,j=N(()=>{"use strict";a();Xt=require("react-router-dom");de();mt();Ge()});function m(...e){return(0,Jt.twMerge)((0,Zt.clsx)(e))}var Zt,Jt,I=N(()=>{"use strict";a();Zt=require("clsx"),Jt=require("tailwind-merge")});var ge,Yt,Ie,eo,ut,pt,to,dt=N(()=>{"use strict";a();ge=require("react-aria-components"),Yt=require("lucide-react");I();Ie=require("react/jsx-runtime"),eo=({children:e,className:t,...o})=>(0,Ie.jsx)(ge.Breadcrumbs,{className:m("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),ut=({children:e,className:t,...o})=>(0,Ie.jsx)(ge.Breadcrumb,{className:m("flex items-center mb-0 gap-1.5",t),...o,children:e}),pt=({children:e,href:t,className:o,...r})=>(0,Ie.jsx)(ge.Link,{href:t,className:m("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm","current:font-medium current:text-text-main current:pointer-events-none cursor-pointer",o),...r,children:e}),to=({className:e})=>(0,Ie.jsx)(Yt.ChevronRight,{size:14,className:m("shrink-0 text-text-dim",e)})});function Fe(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var z,We,no,so,ao,ft=N(()=>{"use strict";a();z=require("react/jsx-runtime");We=e=>(0,z.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Fe(e),children:[(0,z.jsx)("title",{children:"GitHub"}),(0,z.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),no=e=>(0,z.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Fe(e),children:[(0,z.jsx)("title",{children:"Discord"}),(0,z.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),so=e=>(0,z.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Fe(e),children:[(0,z.jsx)("title",{children:"X"}),(0,z.jsx)("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]}),ao=e=>(0,z.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Fe(e),children:[(0,z.jsx)("title",{children:"Bluesky"}),(0,z.jsx)("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]})});var _e,io,Y,y,kr,Sr,Ir,Br,Mr,Ar,Or,Er,Dr,Hr,Vr,zr,$r,Gr,Fr,H,Ue=N(()=>{"use strict";a();_e=require("react");je();io=require("react-aria-components"),Y=require("lucide-react");ft();y=require("react/jsx-runtime"),kr=({children:e,className:t,...o})=>(0,y.jsx)("header",{className:m("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),Sr=({children:e,className:t})=>(0,y.jsx)("div",{className:m("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),Ir=({children:e,className:t})=>(0,y.jsx)("div",{className:m("flex items-center gap-4",t),children:e}),Br=({children:e,className:t})=>(0,y.jsx)("div",{className:m("flex items-center gap-2 md:gap-4",t),children:e}),Mr=({children:e,className:t})=>(0,y.jsx)("div",{className:m("hidden lg:flex flex-1 justify-center items-center gap-4 px-4",t),children:e}),Ar=({src:e,alt:t,width:o=24,height:r=24,className:n})=>(0,y.jsx)($,{href:"/",className:m("flex items-center gap-2 shrink-0 outline-none",n),children:e?(0,y.jsx)("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),Or=({children:e,className:t})=>(0,y.jsx)("span",{className:m("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e}),Er=({children:e,className:t})=>(0,y.jsx)("nav",{className:m("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),Dr=({label:e,href:t,active:o,to:r,className:n})=>(0,y.jsxs)($,{href:t,target:r==="external"?"_blank":void 0,className:m("transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500 font-bold":o,"text-text-muted hover:text-text-main font-medium":!o},n),children:[e,r==="external"&&(0,y.jsx)("span",{className:"ml-1 inline-block",children:(0,y.jsx)(Y.ExternalLink,{size:12})})]}),Hr=({className:e,onPress:t})=>{let[o,r]=(0,_e.useState)(!1),n=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return(0,_e.useEffect)(()=>{r(!0)},[]),(0,y.jsxs)(io.Button,{onPress:t,className:m("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[320px] justify-between",e),children:[(0,y.jsxs)("div",{className:"flex items-center gap-2",children:[(0,y.jsx)(Y.Search,{size:16}),(0,y.jsx)("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),(0,y.jsxs)("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[(0,y.jsx)("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:n?"\u2318":"Ctrl"}),(0,y.jsx)("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},Vr=({className:e,theme:t,onThemeChange:o})=>(0,y.jsx)(xe.ToggleButton,{isSelected:t==="dark",onChange:o,className:m("rounded-md p-2 text-text-muted outline-none cursor-pointer","transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?(0,y.jsx)(Y.Sun,{size:20}):(0,y.jsx)(Y.Moon,{size:20})}),zr=({label:e,className:t,onPress:o,isCurrent:r})=>(0,y.jsx)(K,{onAction:o,className:m(r&&"bg-primary-500 text-white font-medium hover:bg-primary-600 focus:bg-primary-600 focus:text-white",t),children:e}),$r=({name:e})=>{if(e==="github")return(0,y.jsx)(We,{});if(e==="discord")return(0,y.jsx)(no,{});if(e==="x")return(0,y.jsx)(so,{});if(e==="bluesky")return(0,y.jsx)(ao,{})},Gr=({icon:e,link:t,className:o})=>(0,y.jsx)($,{href:t,target:"_blank",rel:"noopener noreferrer",className:m("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:(0,y.jsx)($r,{name:e})}),Fr=({className:e})=>(0,y.jsx)(xe.Separator,{orientation:"vertical",className:m("h-6 w-px bg-border-subtle mx-1",e)}),H={NavbarRoot:kr,NavbarLeft:Ir,NavbarRight:Br,NavbarCenter:Mr,NavbarLogo:Ar,Title:Or,Links:Er,Link:Dr,SearchTrigger:Hr,Theme:Vr,Item:zr,Socials:Gr,Split:Fr,Content:Sr}});var Be,Wr,gt,lo=N(()=>{"use strict";a();Be=D(require("react-aria-components")),Wr=require("lucide-react");I();gt=require("react/jsx-runtime")});var M,ae,P,ht,bt,xt,vt,yt,Ct,Nt,Pt,fs,Rt=N(()=>{"use strict";a();M=D(require("react-aria-components")),ae=require("lucide-react");I();P=require("react/jsx-runtime"),ht=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,P.jsx)(M.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:m("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,P.jsx)(M.Modal,{className:m("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,P.jsx)(M.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),bt=({children:e,className:t,onSelectionChange:o,...r})=>(0,P.jsx)("div",{className:t,children:(0,P.jsx)(M.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),xt=({className:e,...t})=>(0,P.jsxs)(M.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,P.jsx)(ae.Search,{className:"h-5 w-5 text-text-muted"}),(0,P.jsx)(M.Input,{...t,className:m("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,P.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,P.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),vt=({children:e,className:t,...o})=>(0,P.jsx)(M.ListBox,{...o,className:m("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),yt=({children:e,className:t,...o})=>(0,P.jsx)(M.ListBoxItem,{...o,className:m("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,P.jsxs)(P.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,P.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,P.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,P.jsx)(ae.CornerDownLeft,{size:10})]})]})}),Ct=({isHeading:e,className:t})=>(0,P.jsx)("div",{className:m("shrink-0",t),children:e?(0,P.jsx)(ae.Hash,{size:18}):(0,P.jsx)(ae.FileText,{size:18})}),Nt=({children:e,className:t})=>(0,P.jsx)("span",{className:m("block font-medium truncate flex-1 text-sm",t),children:e}),Pt=({children:e,className:t})=>(0,P.jsx)("span",{className:m("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),fs={Root:ht,Autocomplete:bt,Input:xt,List:vt,Item:Object.assign(yt,{Icon:Ct,Title:Nt,Bio:Pt})}});function co(e,t){let o=(0,Ke.useRef)(e);(0,Ke.useEffect)(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}var Ke,mo=N(()=>{"use strict";a();Ke=require("react")});function wt(e){return e.startsWith("#")?e.slice(1):null}var uo=N(()=>{"use strict";a()});function _r(){let e=(0,w.use)(Lt);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function Ur(e){let[t,o]=(0,w.useState)({isOverflowing:!1,isAtBottom:!1});return(0,w.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let i=r.scrollHeight>r.clientHeight,l=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:i,isAtBottom:l})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let s=new MutationObserver(n);return s.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),s.disconnect()}},[e]),t}function go(){let e=_r();return(0,w.useMemo)(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function ho({containerRef:e,children:t}){return(0,q.jsx)(fo.Provider,{value:e,children:t})}function bo({toc:e,single:t=!1,children:o}){let r=(0,w.useMemo)(()=>new Tt,[]),[n,s]=(0,w.useState)(r.items);return r.single=t,(0,w.useEffect)(()=>{r.setItems(e)},[r,e]),(0,w.useEffect)(()=>(r.watch({rootMargin:"0px",threshold:.98}),r.onChange=()=>s([...r.items]),()=>{r.unwatch()}),[r]),(0,q.jsx)(Lt.Provider,{value:n,children:o})}var w,po,q,Lt,fo,Tt,jr,Kr,xo,qr,Xr,Qr,Zr,me,kt=N(()=>{"use strict";a();w=require("react"),po=D(require("scroll-into-view-if-needed"));I();mo();uo();q=require("react/jsx-runtime"),Lt=(0,w.createContext)(null),fo=(0,w.createContext)(null),Tt=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;let o=!1;if(this.items=this.items.map(r=>{let n=t.find(i=>i.target.id===r.id),s=n?n.isIntersecting:r.active&&!r.fallback;return this.single&&o&&(s=!1),r.active!==s&&(r={...r,t:Date.now(),active:s,fallback:!1}),s&&(o=!0),r}),!o&&t[0].rootBounds){let r=t[0].rootBounds.top,n=Number.MAX_VALUE,s=-1;for(let i=0;i<this.items.length;i++){let l=document.getElementById(this.items[i].id);if(!l)continue;let c=Math.abs(r-l.getBoundingClientRect().top);c<n&&(s=i,n=c)}s!==-1&&(this.items[s]={...this.items[s],active:!0,fallback:!0,t:Date.now()})}this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let n=document.getElementById(r.id);n&&o.unobserve(n)}this.items=[];for(let r of t){let n=wt(r.url);n&&this.items.push({id:n,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}};jr=({children:e,className:t})=>(0,q.jsx)("nav",{className:m("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),Kr=({children:e,className:t,...o})=>(0,q.jsx)("div",{className:m("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),xo=({children:e,className:t,ref:o,...r})=>{let n=(0,w.useRef)(null);(0,w.useImperativeHandle)(o,()=>n.current);let{isOverflowing:s,isAtBottom:i}=Ur(n);return(0,q.jsx)("div",{ref:n,className:m("relative overflow-y-auto boltdocs-otp-content",s&&!i&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};xo.displayName="OnThisPageContent";qr=({children:e,className:t})=>(0,q.jsx)("ul",{className:m("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),Xr=({level:e,children:t,className:o})=>(0,q.jsx)("li",{className:m(e===3&&"pl-3",o),children:t}),Qr=({children:e,href:t,active:o,onClick:r,className:n})=>{let s=(0,w.use)(Lt),i=(0,w.use)(fo),l=t?wt(t):null,c=(0,w.useRef)(null),[f,p]=(0,w.useState)(o);return co(l&&s?s.find(u=>u.id===l)?.active:null,u=>{u!==null&&u!==f&&(p(!!u),u&&c.current&&i?.current&&(0,po.default)(c.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:i.current}))}),(0,w.useEffect)(()=>{o!==void 0&&p(o)},[o]),(0,q.jsx)("a",{ref:c,href:t,onClick:r,"data-active":f,className:m("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",f?"text-primary-500 font-medium":"text-text-muted",n),children:e})},Zr=({style:e,className:t})=>(0,q.jsx)("div",{className:m("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e}),me={OnThisPageRoot:jr,OnThisPageHeader:Kr,OnThisPageContent:xo,OnThisPageList:qr,OnThisPageItem:Xr,OnThisPageLink:Qr,OnThisPageIndicator:Zr}});var vo,qe,G,Jr,Yr,en,tn,on,ie,St=N(()=>{"use strict";a();vo=D(require("react-aria-components")),qe=require("lucide-react");I();G=require("react/jsx-runtime"),Jr=({children:e,className:t})=>(0,G.jsx)("nav",{className:m("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Yr=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,G.jsxs)(vo.Link,{href:t,className:m("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,G.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,G.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,G.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"})]})},en=({children:e,className:t})=>(0,G.jsx)("span",{className:m("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),tn=({children:e,className:t})=>(0,G.jsx)("span",{className:m("text-base font-bold text-text-main truncate",t),children:e}),on=({children:e})=>(0,G.jsx)(G.Fragment,{children:e}),ie={PageNavRoot:Jr,PageNavLink:Object.assign(Yr,{Title:en,Description:tn,Icon:on})}});var ve,rn,nn,sn,an,ln,It,Bt=N(()=>{"use strict";a();I();ve=require("react/jsx-runtime"),rn=({children:e,className:t="",...o})=>(0,ve.jsx)("div",{className:m("w-full",t),...o,children:e}),nn=({children:e,className:t=""})=>(0,ve.jsx)("div",{role:"tablist",className:m("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),sn=({children:e,id:t,selected:o,className:r="",...n})=>(0,ve.jsx)("button",{role:"tab","aria-selected":o,className:m("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...n,children:e}),an=({children:e,className:t=""})=>(0,ve.jsx)("div",{className:m("p-4 outline-none",t),children:e}),ln=({className:e="",style:t})=>(0,ve.jsx)("div",{className:m("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t}),It={TabsRoot:rn,TabsList:nn,TabsItem:sn,TabsContent:an,TabsIndicator:ln}});function Me(e){let t=U(),{currentLocale:o,currentVersion:r}=S();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,s=t.versions;if(!n&&!s)return e;let i=e.startsWith("/docs"),l=e.split("/").filter(Boolean),c=0;l[c]==="docs"&&c++,s&&l.length>c&&s.versions.find(v=>v.path===l[c])&&c++,n&&l.length>c&&n.locales[l[c]]&&c++;let f=l.slice(c),p=[];i&&(p.push("docs"),s&&r&&p.push(r)),n&&o&&o!==n.defaultLocale&&p.push(o),p.push(...f);let u=`/${p.join("/")}`;return u.length>1&&u.endsWith("/")?u.slice(0,-1):u||"/"}var Mt=N(()=>{"use strict";a();de();j()});var At,yo,Co,Ot,$,cn,Ae=N(()=>{"use strict";a();At=D(require("react")),yo=require("react-aria-components"),Co=require("react-router-dom");Mt();mt();I();Ot=require("react/jsx-runtime"),$=At.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:s,...i}=e,l=Me(o??""),{preload:c}=ze();return(0,Ot.jsx)(yo.Link,{...i,ref:t,href:l,onMouseEnter:u=>{n?.(u),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&c(l)},onFocus:u=>{s?.(u),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&c(l)}})});$.displayName="Link";cn=At.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:s,...i}=e,l=(0,Co.useLocation)(),c=Me(o??""),f=r?l.pathname===c:l.pathname.startsWith(c),p=typeof n=="function"?n({isActive:f}):m(n,f&&"active"),u=typeof s=="function"?s({isActive:f}):s;return(0,Ot.jsx)($,{...i,ref:t,href:o,className:p,children:u})});cn.displayName="NavLink"});var No,Po,A,mn,un,pn,dn,fn,ye,Et=N(()=>{"use strict";a();Ae();No=D(require("react-aria-components")),Po=require("lucide-react");I();A=require("react/jsx-runtime"),mn=({badge:e})=>{let t={new:"bg-primary-500/20 text-primary-500",updated:"bg-gray-500/20 text-gray-500",deprecated:"bg-red-500/20 text-red-500"};if(typeof e=="object"&&e?.expires){let r=new Date(e.expires),n=new Date,s=r.getTime()-n.getTime();if(Math.ceil(s/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return(0,A.jsx)("span",{className:m("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},un=({children:e,className:t})=>(0,A.jsx)("aside",{className:m("boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0","w-sidebar h-full","overflow-y-auto border-r border-border-subtle bg-bg-main","py-6 px-4",t),children:(0,A.jsx)("nav",{className:"flex-1 space-y-6",children:e})}),pn=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:n,className:s})=>(0,A.jsxs)("div",{className:m("space-y-1",s),children:[t&&(0,A.jsxs)(No.Button,{onPress:n,className:m("flex w-full items-center justify-between px-2 py-1.5 text-xs font-bold uppercase tracking-wider outline-none cursor-pointer","text-text-muted hover:text-text-main transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md"),children:[(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,A.jsx)(o,{size:14}),t]}),(0,A.jsx)(Po.ChevronRight,{size:14,className:m("transition-transform duration-200",r&&"rotate-90")})]}),r&&(0,A.jsx)("div",{className:"space-y-0.5",children:e})]}),dn=({children:e,className:t})=>(0,A.jsx)("div",{className:m(t),children:e}),fn=({label:e,href:t,active:o,icon:r,badge:n,className:s})=>(0,A.jsxs)($,{href:t,className:m("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none","transition-all duration-200 ease-in-out","focus-visible:ring-2 focus-visible:ring-primary-500/30",o?"bg-primary-500/10 text-primary-500 font-medium":"text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1",s),children:[r&&(0,A.jsx)(r,{size:16,className:m(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),(0,A.jsx)("span",{className:"truncate",children:e}),n&&(0,A.jsx)(mn,{badge:n})]}),ye={SidebarRoot:un,SidebarGroup:pn,SidebarGroupItem:dn,SidebarLink:fn}});var Xe,wo,W,Ro,ee,Dt=N(()=>{"use strict";a();Xe=D(require("react-aria-components"));I();wo=require("class-variance-authority"),W=require("react/jsx-runtime"),Ro=(0,wo.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"}}),ee=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:s,variant:i,size:l,rounded:c,iconSize:f,disabled:p,...u})=>{let g=r||!n&&!!t,v=g?(0,W.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,W.jsxs)(W.Fragment,{children:[t&&o==="left"&&(0,W.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,W.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,W.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,W.jsx)(Xe.Link,{href:e,className:m(Ro({variant:i,size:l,rounded:c,iconSize:g?f:void 0,disabled:p}),s),...u,children:v}):(0,W.jsx)(Xe.Button,{className:m(Ro({variant:i,size:l,rounded:c,iconSize:g?f:void 0,disabled:p}),s),...u,children:v})}});var Lo,To,ko=N(()=>{"use strict";a();I();Lo=require("react/jsx-runtime"),To=({children:e,className:t,vertical:o=!1})=>(0,Lo.jsx)("div",{className:m("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e})});var Ne,Ce,Ht,Vt=N(()=>{"use strict";"use client";a();Ne=D(require("react-aria-components"));I();Ce=require("react/jsx-runtime"),Ht=({children:e,className:t,showArrow:o,...r})=>(0,Ce.jsxs)(Ne.Popover,{offset:8,...r,className:Ne.composeRenderProps(t,n=>m("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","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,Ce.jsx)(Ne.OverlayArrow,{className:"group",children:(0,Ce.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,Ce.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]})});function he(e){let[t,o]=zt.default.Children.toArray(e.children).slice(0,2);return(0,L.jsxs)(k.MenuTrigger,{...e,children:[t,(0,L.jsx)(Ht,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function gn(e){let[t,o]=zt.default.Children.toArray(e.children).slice(0,2);return(0,L.jsxs)(k.SubmenuTrigger,{...e,children:[t,(0,L.jsx)(Ht,{offset:-4,crossOffset:-4,children:o})]})}function be(e){return(0,L.jsx)(k.Menu,{...e,className:k.composeRenderProps(e.className,t=>m("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function K(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,L.jsx)(k.MenuItem,{...e,textValue:t,className:k.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:s})=>m("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",s&&"opacity-40 grayscale pointer-events-none",o)),children:k.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:s})=>(0,L.jsxs)(L.Fragment,{children:[r!=="none"&&(0,L.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,L.jsx)(Pe.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,L.jsx)(Pe.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,L.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),s&&(0,L.jsx)(Pe.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function hn({title:e,...t}){return(0,L.jsxs)(k.MenuSection,{...t,className:m("flex flex-col gap-0.5",t.className),children:[e&&(0,L.jsx)(k.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,L.jsx)(k.Collection,{items:t.items,children:t.children})]})}function bn(e){return(0,L.jsx)(k.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var Pe,zt,k,L,te,Qe=N(()=>{"use strict";"use client";a();Pe=require("lucide-react"),zt=D(require("react")),k=D(require("react-aria-components"));Vt();I();L=require("react/jsx-runtime");te={Root:be,Item:K,Trigger:he,SubTrigger:gn,Section:hn,Separator:bn}});var $t,Gt,So=N(()=>{"use strict";a();$t=D(require("react-aria-components"));I();Gt=require("react/jsx-runtime")});var xe,je=N(()=>{"use strict";a();Ue();lo();Rt();kt();St();Bt();Et();dt();Dt();ko();Qe();Vt();So();Ae();xe=require("react-aria-components");I()});function Xo(e){let{currentLocale:t,currentVersion:o}=S(),[r,n]=(0,ce.useState)(!1),[s,i]=(0,ce.useState)(""),[l,c]=(0,ce.useState)(null);(0,ce.useEffect)(()=>{if(!r||l)return;let p=new qo.Index({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let u of Ft.default)p.add(u.id,`${u.title} ${u.content}`);c(p)},[r,l]);let f=(0,ce.useMemo)(()=>{if(!s)return e.filter(v=>{let x=!t||v.locale===t,C=!o||v.version===o;return x&&C}).slice(0,10).map(v=>({id:v.path,title:v.title,path:v.path,bio:v.description||"",groupTitle:v.groupTitle}));if(!l)return[];let p=l.search(s,{limit:20,suggest:!0}),u=[],g=new Set;for(let v of p){let x=Ft.default.find(F=>F.id===v);if(!x)continue;let C=!t||x.locale===t,h=!o||x.version===o;!C||!h||g.has(x.url)||(g.add(x.url),u.push({id:x.url,title:x.title,path:x.url,bio:x.display,groupTitle:x.display.split(" > ")[0],isHeading:x.url.includes("#")}))}return u.slice(0,10)},[s,l,t,o,e]);return{isOpen:r,setIsOpen:n,query:s,setQuery:i,list:f,input:{value:s,onChange:p=>i(p.target.value)}}}var ce,qo,Ft,Qo=N(()=>{"use strict";a();ce=require("react"),qo=require("flexsearch");j();Ft=D(require("virtual:boltdocs-search"))});var Jo={};jt(Jo,{SearchDialog:()=>Wt});function Wt({routes:e}){let{isOpen:t,setIsOpen:o,query:r,setQuery:n,list:s}=Xo(e),i=(0,Zo.useNavigate)();(0,nt.useEffect)(()=>{let c=f=>{(/Mac/.test(navigator.userAgent)?f.metaKey:f.ctrlKey)&&(f.key==="k"||f.key==="j")&&(f.preventDefault(),o(g=>!g))};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[o]);let l=(0,nt.useCallback)(c=>{let f=String(c);if(o(!1),f.includes("#")){let[p,u]=f.split("#");i(p),setTimeout(()=>{let g=document.getElementById(u);g&&g.scrollIntoView({behavior:"smooth"})},100)}else i(f)},[i,o]);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H.SearchTrigger,{onPress:()=>o(!0)}),(0,V.jsx)(ht,{isOpen:t,onOpenChange:o,children:(0,V.jsxs)(bt,{onSelectionChange:l,children:[(0,V.jsx)(xt,{value:r,onChange:c=>n(c.target.value)}),(0,V.jsx)(vt,{items:s,children:c=>(0,V.jsxs)(yt,{onPress:()=>l(c.id),textValue:c.title,children:[(0,V.jsx)(Ct,{isHeading:c.isHeading}),(0,V.jsxs)("div",{className:"flex flex-col justify-center gap-0.5",children:[(0,V.jsx)(Nt,{children:c.title}),(0,V.jsx)(Pt,{children:c.bio})]})]},c.id)})]})})]})}var nt,Zo,V,_t=N(()=>{"use strict";a();nt=require("react");Qo();Rt();Ue();Zo=require("react-router-dom"),V=require("react/jsx-runtime")});var Bn={};jt(Bn,{Breadcrumbs:()=>ro,CopyMarkdown:()=>Bo,ErrorBoundary:()=>Ze,GithubStars:()=>Ye,Head:()=>Do,Loading:()=>Vo,Navbar:()=>er,NotFound:()=>or,OnThisPage:()=>sr,PageNav:()=>lr,PoweredBy:()=>at,ProgressBar:()=>ur,SearchDialog:()=>Wt,Sidebar:()=>gr,Tabs:()=>rt,ThemeToggle:()=>ot});module.exports=Pr(Bn);a();a();a();j();function Qt(){let{currentRoute:e}=S(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}var oo=require("lucide-react");dt();I();de();var J=require("react/jsx-runtime");function ro(){let{crumbs:e,activeRoute:t}=Qt(),r=U().theme||{};return e.length===0||!r?.breadcrumbs?null:(0,J.jsxs)(eo,{children:[(0,J.jsx)(ut,{children:(0,J.jsx)(pt,{href:"/",children:(0,J.jsx)(oo.Home,{size:14})})}),e.map((n,s)=>(0,J.jsxs)(ut,{children:[(0,J.jsx)(to,{}),(0,J.jsx)(pt,{href:n.href,className:m({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${s}`))]})}a();var Io=require("react"),oe=require("lucide-react");je();var B=require("react/jsx-runtime"),xn=e=>{let[t,o]=(0,Io.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let s=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(s);window.open(i,"_blank")}}};function Bo({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:s,handleOpenRaw:i}=xn(r),l=o!==!1,c=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:(0,B.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,B.jsxs)(To,{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,B.jsx)(ee,{variant:"ghost",onPress:s,icon:n?(0,B.jsx)(oe.Check,{size:16}):(0,B.jsx)(oe.Copy,{size:16}),iconPosition:"left",className:m("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":c}),(0,B.jsxs)(he,{placement:"bottom end",children:[(0,B.jsx)(ee,{variant:"ghost",isIconOnly:!0,icon:(0,B.jsx)(oe.ChevronDown,{size:14}),className:m("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,B.jsxs)(be,{className:"w-52",children:[(0,B.jsxs)(K,{onAction:s,className:"flex flex-row items-start gap-2.5 group",children:[(0,B.jsx)(oe.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,B.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,B.jsxs)(K,{onAction:i,className:"flex flex-row items-start gap-2.5 group",children:[(0,B.jsx)(oe.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,B.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}a();var Mo=require("react");je();var Re=require("react/jsx-runtime"),Ze=class extends Mo.Component{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error in Boltdocs Layout:",t,o)}render(){return this.state.hasError?this.props.fallback||(0,Re.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[(0,Re.jsx)("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),(0,Re.jsx)("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),(0,Re.jsx)(ee,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};a();var Je=require("react");a();var vn="https://api.github.com";async function Ao(e,t,o=vn){let r=new Headers;t&&r.append("authorization",t);let s=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return s.stargazers_count!==void 0?yn(s.stargazers_count):"0"}var yn=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);ft();var Oe=require("react/jsx-runtime");function Ye({repo:e}){let[t,o]=(0,Je.useState)(null);return(0,Je.useEffect)(()=>{e&&Ao(e).then(r=>o(r)).catch(()=>o("0"))},[e]),(0,Oe.jsxs)("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[(0,Oe.jsx)(We,{className:"h-4 w-4"}),t&&(0,Oe.jsx)("span",{className:"tabular-nums",children:t})]})}a();var Oo=require("react"),Eo=require("react-router-dom");function Do({siteTitle:e,siteDescription:t,routes:o}){let r=(0,Eo.useLocation)();return(0,Oo.useEffect)(()=>{let n=o.find(f=>f.path===r.pathname),s=n?.title,i=n?.description||t||"";document.title=s?`${s} | ${e}`:e;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.name="description",document.head.appendChild(l)),l.content=i,ue("property","og:title",document.title),ue("property","og:description",i),ue("property","og:type","article"),ue("property","og:url",window.location.href),ue("name","twitter:card","summary"),ue("name","twitter:title",document.title),ue("name","twitter:description",i);let c=document.querySelector('link[rel="canonical"]');c||(c=document.createElement("link"),c.rel="canonical",document.head.appendChild(c)),c.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function ue(e,t,o){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=o}a();I();a();I();var Ho=require("react/jsx-runtime");function O({className:e,variant:t="rect",...o}){return(0,Ho.jsx)("div",{className:m("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var R=require("react/jsx-runtime");function Vo(){return(0,R.jsx)("div",{className:m("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,R.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,R.jsxs)("div",{className:"flex gap-2",children:[(0,R.jsx)(O,{className:"h-3 w-16"}),(0,R.jsx)(O,{className:"h-3 w-24"})]}),(0,R.jsx)(O,{className:"h-10 w-[60%] sm:h-12"}),(0,R.jsxs)("div",{className:"space-y-3",children:[(0,R.jsx)(O,{className:"h-4 w-full"}),(0,R.jsx)(O,{className:"h-4 w-[95%]"}),(0,R.jsx)(O,{className:"h-4 w-[40%]"})]}),(0,R.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,R.jsx)(O,{className:"h-7 w-32"}),(0,R.jsxs)("div",{className:"space-y-3",children:[(0,R.jsx)(O,{className:"h-4 w-full"}),(0,R.jsx)(O,{className:"h-4 w-[98%]"}),(0,R.jsx)(O,{className:"h-4 w-[92%]"}),(0,R.jsx)(O,{className:"h-4 w-[60%]"})]})]}),(0,R.jsx)(O,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,R.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,R.jsx)(O,{className:"h-7 w-48"}),(0,R.jsxs)("div",{className:"space-y-3",children:[(0,R.jsx)(O,{className:"h-4 w-full"}),(0,R.jsx)(O,{className:"h-4 w-[85%]"})]})]})]})})}a();var st=require("react");a();var zo=require("react-router-dom");de();a();var we=require("react"),Nn=require("react/jsx-runtime"),Cn=(0,we.createContext)(void 0);function et(){let e=(0,we.use)(Cn);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}a();function Te(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}j();function $o(){let e=U(),{theme:t}=et(),o=(0,zo.useLocation)(),{currentLocale:r}=S(),n=e.theme||{},s=Te(n.title,r)||"Boltdocs",i=n.navbar||[],l=n.socialLinks||[],c=n.githubRepo,f=i.map(x=>{let C=x.href||x.to||x.link||"";return{label:Te(x.label||x.text,r),href:C,active:o.pathname===C,to:C.startsWith("http")||C.startsWith("//")?"external":void 0,items:x.items?.map(h=>({label:Te(h.label||h.text,r),href:h.href||h.link||h.to||""}))}}),p=n.logo,u=p?typeof p=="string"?p:t==="dark"?p.dark:p.light:null,g={alt:(p&&typeof p=="object"?p.alt:void 0)||s,width:p&&typeof p=="object"?p.width:void 0,height:p&&typeof p=="object"?p.height:void 0},v=c?`https://github.com/${c}`:null;return{links:f,title:s,logo:u,logoProps:g,github:v,social:l,config:e,theme:t}}a();var Go=require("react-router-dom");a();function le(e,t,o){let r=e;return t&&(r===t||r.startsWith(t+"/"))&&(r=r===t?"index.md":r.slice(t.length+1)),o&&(r===o||r.startsWith(o+"/"))&&(r=r===o?"index.md":r.slice(o.length+1)),r}j();Ge();function Fo(){let e=(0,Go.useNavigate)(),t=S(),{allRoutes:o,currentRoute:r,currentVersion:n,currentLocale:s,config:i}=t,l=i.versions,c=se(u=>u.setVersion),f=u=>{if(!l||u===n)return;c(u);let g=`/docs/${u}`;if(r){let v=le(r.filePath,r.version,r.locale),x=o.find(C=>le(C.filePath,C.version,C.locale)===v&&(C.version||l.defaultVersion)===u&&(s?C.locale===s:!C.locale));if(x)g=x.path;else{let C=o.find(h=>le(h.filePath,h.version,h.locale)==="index.md"&&(h.version||l.defaultVersion)===u&&(s?h.locale===s:!h.locale));g=C?C.path:`/docs/${u}${s?`/${s}`:""}`}}e(g)},p=t.availableVersions.map(u=>({...u,label:u.label,value:u.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:p,handleVersionChange:f}}a();var Wo=require("react-router-dom");j();Ge();function _o(){let e=(0,Wo.useNavigate)(),t=S(),{allRoutes:o,currentRoute:r,currentLocale:n,config:s}=t,i=s.i18n,l=se(g=>g.setLocale),c=g=>{if(!i||g===n)return;l(g);let v="/";if(r){let x=le(r.filePath,r.version,r.locale),C=o.find(h=>le(h.filePath,h.version,h.locale)===x&&(h.locale||i.defaultLocale)===g&&h.version===r.version);if(C)v=C.path;else{let h=o.find(F=>le(F.filePath,F.version,F.locale)==="index.md"&&(F.locale||i.defaultLocale)===g&&F.version===r.version);v=h?h.path:g===i.defaultLocale?r.version?`/${r.version}`:"/":r.version?`/${r.version}/${g}`:`/${g}`}}else{let x=o.find(C=>(C.filePath==="index.mdx"||C.filePath==="index.md")&&(C.locale||i.defaultLocale)===g&&!C.version);x?v=x.path:v=g===i.defaultLocale?"/":`/${g}`}e(v)},p=s.i18n?.localeConfigs?.[n]?.label||s.i18n?.locales[n]||n,u=s.i18n?Object.entries(s.i18n.locales).map(([g,v])=>{let x=s.i18n?.localeConfigs?.[g];return{key:g,label:x?.label||v,value:g,isCurrent:g===n}}):[];return{currentLocale:n,currentLocaleLabel:p,availableLocales:u,handleLocaleChange:c}}j();Ue();a();var tt=require("react"),re=require("lucide-react");var Uo=require("react-aria-components");Qe();var E=require("react/jsx-runtime");function ot(){let{theme:e,setTheme:t}=et(),[o,r]=(0,tt.useState)(!1);return(0,tt.useEffect)(()=>{r(!0)},[]),o?(0,E.jsxs)(he,{placement:"bottom right",children:[(0,E.jsx)(Uo.Button,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:(0,E.jsx)(e==="system"?re.Monitor:e==="dark"?re.Moon:re.Sun,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),(0,E.jsxs)(be,{selectionMode:"single",selectedKeys:[e],onSelectionChange:s=>{let i=Array.from(s)[0];t(i)},children:[(0,E.jsxs)(K,{id:"light",children:[(0,E.jsx)(re.Sun,{size:16}),(0,E.jsx)("span",{children:"Light"})]}),(0,E.jsxs)(K,{id:"dark",children:[(0,E.jsx)(re.Moon,{size:16}),(0,E.jsx)("span",{children:"Dark"})]}),(0,E.jsxs)(K,{id:"system",children:[(0,E.jsx)(re.Monitor,{size:16}),(0,E.jsx)("span",{children:"System"})]})]})]}):(0,E.jsx)("div",{className:"h-9 w-9"})}a();a();var jo=require("react-router-dom"),Le=require("react");function Ko(e=[],t=[]){let o=(0,jo.useLocation)(),r=(0,Le.useRef)([]),[n,s]=(0,Le.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),l=t.find(p=>p.path===o.pathname)?.tab?.toLowerCase(),c=e.findIndex(p=>p.id.toLowerCase()===l),f=c===-1?0:c;return(0,Le.useEffect)(()=>{let p=r.current[f];p&&s({opacity:1,width:p.offsetWidth,transform:`translateX(${p.offsetLeft}px)`})},[f,e.length,o.pathname]),{tabs:e,activeIndex:f,indicatorStyle:n,tabRefs:r,activeTabId:l}}Bt();Ae();var Pn=D(require("lucide-react"));j();var X=require("react/jsx-runtime");function rt({tabs:e,routes:t}){let{currentLocale:o}=S(),{indicatorStyle:r,tabRefs:n,activeIndex:s}=Ko(e,t),i=l=>{if(!l)return null;if(l.trim().startsWith("<svg"))return(0,X.jsx)("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:l}});let c=Pn[l];return c?(0,X.jsx)(c,{size:16}):(0,X.jsx)("img",{src:l,alt:"",className:"h-4 w-4 object-contain"})};return(0,X.jsx)("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:(0,X.jsxs)(It.TabsList,{className:"border-none py-0",children:[e.map((l,c)=>{let f=c===s,p=t.find(g=>g.tab&&g.tab.toLowerCase()===l.id.toLowerCase()),u=p?p.path:"#";return(0,X.jsxs)($,{href:u,ref:g=>{n.current[c]=g},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${f?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[i(l.icon),(0,X.jsx)("span",{children:Te(l.text,o)})]},l.id)}),(0,X.jsx)(It.TabsIndicator,{style:r})]})})}var Yo=require("react-router-dom");Qe();Dt();var Ee=require("lucide-react");Mt();var b=require("react/jsx-runtime"),Rn=(0,st.lazy)(()=>Promise.resolve().then(()=>(_t(),Jo)).then(e=>({default:e.SearchDialog})));function er(){let{links:e,title:t,logo:o,logoProps:r,github:n,social:s,config:i}=$o(),{routes:l,allRoutes:c,currentVersion:f,currentLocale:p}=S(),{pathname:u}=(0,Yo.useLocation)(),g=i.theme||{},v=g?.tabs&&g.tabs.length>0;return(0,b.jsxs)(H.NavbarRoot,{className:v?"border-b-0":"",children:[(0,b.jsxs)(H.Content,{children:[(0,b.jsxs)(H.NavbarLeft,{children:[o&&(0,b.jsx)(H.NavbarLogo,{src:o,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),(0,b.jsx)(H.Title,{children:t}),i.versions&&f&&(0,b.jsx)(Tn,{}),(0,b.jsx)(H.Links,{children:e.map(x=>(0,b.jsx)(wn,{link:x},x.href))})]}),(0,b.jsx)(H.NavbarCenter,{children:(0,b.jsx)(st.Suspense,{fallback:(0,b.jsx)("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:(0,b.jsx)(Rn,{routes:l||[]})})}),(0,b.jsxs)(H.NavbarRight,{children:[i.i18n&&p&&(0,b.jsx)(Ln,{}),(0,b.jsx)(H.Split,{}),(0,b.jsx)(ot,{}),n&&(0,b.jsx)(Ye,{repo:g?.githubRepo??""}),s.length>0&&(0,b.jsx)(H.Split,{}),(0,b.jsx)("div",{className:"flex items-center gap-1",children:s.map(({icon:x,link:C})=>(0,b.jsx)(H.Socials,{icon:x,link:C,className:"p-1.5"},C))})]})]}),u!=="/"&&v&&g?.tabs&&(0,b.jsx)("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:(0,b.jsx)(rt,{tabs:g.tabs,routes:c||l||[]})})]})}function wn({link:e}){let t=Me(e.href);return(0,b.jsx)(H.Link,{...e,href:t})}function Tn(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=Fo();return t.length===0?null:(0,b.jsxs)(te.Trigger,{children:[(0,b.jsx)(ee,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,b.jsx)(Ee.ChevronDown,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:(0,b.jsx)("span",{className:"font-semibold text-[0.8125rem]",children:e})}),(0,b.jsx)(te.Root,{children:(0,b.jsx)(te.Section,{items:t,children:r=>(0,b.jsx)(te.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})})]})}function Ln(){let{currentLocale:e,availableLocales:t,handleLocaleChange:o}=_o();return t.length===0?null:(0,b.jsxs)(te.Trigger,{children:[(0,b.jsx)(ee,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,b.jsx)(Ee.ChevronDown,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(Ee.Languages,{className:"w-3.5 h-3.5 text-primary-500"}),(0,b.jsx)("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),(0,b.jsx)(te.Root,{children:(0,b.jsx)(te.Section,{items:t,children:r=>(0,b.jsx)(te.Item,{onPress:()=>o(r.value),children:(0,b.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",children:[(0,b.jsx)("span",{children:r.label}),(0,b.jsx)("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}a();var tr=require("lucide-react");Ae();var ne=require("react/jsx-runtime");function or(){return(0,ne.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,ne.jsxs)("div",{className:"space-y-4",children:[(0,ne.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,ne.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,ne.jsx)("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),(0,ne.jsxs)($,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[(0,ne.jsx)(tr.ArrowLeft,{size:16})," Go to Home"]})]})})}a();kt();var _=D(require("react"));a();var rr=require("react");function nr(e=[]){let[t,o]=(0,rr.useState)(null);return{headings:e,activeId:t,setActiveId:o}}var ke=require("lucide-react"),T=require("react/jsx-runtime");function sr({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:n}=nr(e),s=_.default.useMemo(()=>n.map(i=>({title:i.text,url:`#${i.id}`,depth:i.level})),[n]);return n.length===0?null:(0,T.jsx)(bo,{toc:s,children:(0,T.jsx)(kn,{headings:n,editLink:t,communityHelp:o,filePath:r})})}function kn({headings:e,editLink:t,communityHelp:o,filePath:r}){let n=go(),[s,i]=(0,_.useState)({opacity:0}),l=(0,_.useRef)(null),c=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(!n||!l.current)return;let p=l.current.querySelector(`a[href="#${n}"]`);p&&i({transform:`translateY(${p.offsetTop}px)`,height:`${p.offsetHeight}px`,opacity:1})},[n]);let f=(0,_.useCallback)((p,u)=>{p.preventDefault();let g=document.getElementById(u);g&&(g.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${u}`))},[]);return(0,T.jsxs)(me.OnThisPageRoot,{children:[(0,T.jsxs)(me.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[(0,T.jsx)(ke.TextAlignStart,{size:16}),"On this page"]}),(0,T.jsx)(ho,{containerRef:c,children:(0,T.jsxs)(me.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:c,children:[(0,T.jsx)(me.OnThisPageIndicator,{style:s}),(0,T.jsx)("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:l,children:e.map(p=>(0,T.jsx)(me.OnThisPageItem,{level:p.level,children:(0,T.jsx)(me.OnThisPageLink,{href:`#${p.id}`,active:n===p.id,onClick:u=>f(u,p.id),className:"pl-4",children:p.text})},p.id))})]})}),(t||o)&&(0,T.jsxs)("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[(0,T.jsx)("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),(0,T.jsxs)("ul",{className:"space-y-3",children:[t&&r&&(0,T.jsx)("li",{children:(0,T.jsxs)("a",{href:t.replace(":path",r),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,T.jsx)(ke.Pencil,{size:16}),"Edit this page"]})}),o&&(0,T.jsx)("li",{children:(0,T.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,T.jsx)(ke.CircleHelp,{size:16}),"Community help"]})})]})]})]})}a();a();var ar=require("react-router-dom");j();function ir(){let{routes:e,currentRoute:t}=S(),o=(0,ar.useLocation)();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),n=r?e.filter(c=>c.tab?.toLowerCase()===r):e.filter(c=>!c.tab),s=n.findIndex(c=>c.path===o.pathname),i=s>0?n[s-1]:null,l=s!==-1&&s<n.length-1?n[s+1]:null;return{prevPage:i,nextPage:l,currentRoute:t}}St();var Q=require("react/jsx-runtime");function lr(){let{prevPage:e,nextPage:t}=ir();return!e&&!t?null:(0,Q.jsxs)(ie.PageNavRoot,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?(0,Q.jsxs)(ie.PageNavLink,{to:e.path,direction:"prev",children:[(0,Q.jsx)(ie.PageNavLink.Title,{children:"Previous"}),(0,Q.jsx)(ie.PageNavLink.Description,{children:e.title})]}):(0,Q.jsx)("div",{}),t&&(0,Q.jsxs)(ie.PageNavLink,{to:t.path,direction:"next",children:[(0,Q.jsx)(ie.PageNavLink.Title,{children:"Next"}),(0,Q.jsx)(ie.PageNavLink.Description,{children:t.title})]})]})}a();var cr=require("lucide-react"),pe=require("react/jsx-runtime");function at(){return(0,pe.jsx)("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:(0,pe.jsxs)("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[(0,pe.jsx)(cr.Zap,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),(0,pe.jsxs)("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by"," ",(0,pe.jsx)("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}a();var it=require("react"),mr=require("react-aria-components"),Ut=require("react/jsx-runtime");function ur(){let[e,t]=(0,it.useState)(0);return(0,it.useEffect)(()=>{let o=null,r,n=()=>{if(!o)return;let{scrollTop:i,scrollHeight:l,clientHeight:c}=o;if(l<=c){t(0);return}let f=i/(l-c)*100;t(Math.min(100,Math.max(0,f)))},s=()=>(o=document.querySelector(".boltdocs-content"),o?(o.addEventListener("scroll",n),n(),r&&clearInterval(r),!0):!1);return s()||(r=setInterval(s,100)),()=>{o&&o.removeEventListener("scroll",n),r&&clearInterval(r)}},[]),(0,Ut.jsx)(mr.ProgressBar,{value:e,"aria-label":"Reading progress",className:"fixed top-0 left-0 right-0 z-999 h-0.5 bg-transparent w-full pointer-events-none",children:({percentage:o})=>(0,Ut.jsx)("div",{className:"h-full bg-primary-500 transition-[width] duration-300 ease-out shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]",style:{width:`${o}%`}})})}_t();a();var Se=require("react");a();var pr=require("react-router-dom");de();function dr(e){let t=U(),o=(0,pr.useLocation)(),r=u=>u.endsWith("/")&&u.length>1?u.slice(0,-1):u,n=r(o.pathname),s=e.find(u=>r(u.path)===n),i=s?.tab?.toLowerCase(),l=i?e.filter(u=>!u.tab||u.tab.toLowerCase()===i):e,c=[],f=new Map;for(let u of l)u.group?(f.has(u.group)||f.set(u.group,{slug:u.group,title:u.groupTitle||u.group,routes:[],icon:u.groupIcon}),f.get(u.group).routes.push(u)):c.push(u);return{groups:Array.from(f.values()),ungrouped:c,activeRoute:s,activePath:n,config:t}}Et();var Sn=D(require("lucide-react")),Z=require("react/jsx-runtime");function fr(e){return e&&Sn[e]||void 0}function In({group:e,activePath:t,getIcon:o}){let r=(0,Se.useMemo)(()=>e.routes.some(i=>i.path===t),[e.routes,t]),[n,s]=(0,Se.useState)(!0);return(0,Se.useEffect)(()=>{r&&s(!0)},[r]),(0,Z.jsx)(ye.SidebarGroup,{title:e.title,isOpen:n,onToggle:()=>s(!n),children:e.routes.map(i=>{let l=t===(i.path.endsWith("/")?i.path.slice(0,-1):i.path);return(0,Z.jsx)(ye.SidebarLink,{label:i.title,href:i.path,active:l,icon:o(i.icon),badge:i.badge},i.path)})})}function gr({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:n}=dr(e),s=t.theme||{};return(0,Z.jsxs)(ye.SidebarRoot,{children:[r.length>0&&(0,Z.jsx)(ye.SidebarGroup,{className:"mb-6",children:r.map(i=>{let l=n===(i.path.endsWith("/")?i.path.slice(0,-1):i.path);return(0,Z.jsx)(ye.SidebarLink,{label:i.title,href:i.path,active:l,icon:fr(i.icon),badge:i.badge},i.path)})}),o.map(i=>(0,Z.jsx)(In,{group:i,activePath:n,getIcon:fr},i.slug)),s?.poweredBy&&(0,Z.jsx)("div",{className:"mt-auto pt-8",children:(0,Z.jsx)(at,{})})]})}
@@ -1 +1 @@
1
- import{a as r,b as e,c as p,d as t,e as m,f,g as x,h as d,i as g,j as n,k as s,l as y,m as b,n as i}from"../chunk-6QXCKZAT.mjs";import"../chunk-RSII2UPE.mjs";import{a as o}from"../chunk-ZK2266IZ.mjs";import"../chunk-JD3RSDE4.mjs";import{a}from"../chunk-H4M6P3DM.mjs";import"../chunk-JXHNX2WN.mjs";import"../chunk-ZRJ55GGF.mjs";import"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";export{s as Breadcrumbs,o as CopyMarkdown,i as ErrorBoundary,t as GithubStars,n as Head,e as Loading,f as Navbar,r as NotFound,g as OnThisPage,y as PageNav,x as PoweredBy,b as ProgressBar,a as SearchDialog,d as Sidebar,m as Tabs,p as ThemeToggle};
1
+ import{a as r,b as e,c as p,d as t,e as m,f,g as x,h as d,i as g,j as n,k as s,l as y,m as b,n as i}from"../chunk-CRZGOE32.mjs";import"../chunk-2HUVMMJU.mjs";import{a as o}from"../chunk-RPUERTVC.mjs";import"../chunk-JD3RSDE4.mjs";import{a}from"../chunk-HA6543SL.mjs";import"../chunk-2Z5T6EAU.mjs";import"../chunk-W2NB4T6V.mjs";import"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";export{s as Breadcrumbs,o as CopyMarkdown,i as ErrorBoundary,t as GithubStars,n as Head,e as Loading,f as Navbar,r as NotFound,g as OnThisPage,y as PageNav,x as PoweredBy,b as ProgressBar,a as SearchDialog,d as Sidebar,m as Tabs,p as ThemeToggle};
@@ -1 +1 @@
1
- import{q as a,r as b,s as c,t as d,u as e}from"./chunk-Q3MLYTIQ.mjs";e();export{c as AssetCache,a as FileCache,b as TransformCache,d as flushCache};
1
+ import{r as a,s as b,t as c,u as d,v as e}from"./chunk-Y4RRHPXC.mjs";e();export{c as AssetCache,a as FileCache,b as TransformCache,d as flushCache};
@@ -0,0 +1,74 @@
1
+ import{a as v,d as u,e as S,f as W,g as q,h as xt,i as bt,j as F,k as it,l as vt,m as G,n as nt,o as N,p as rt,q as _,r as Pt,s as wt,v as $t}from"./chunk-Y4RRHPXC.mjs";function st(){D.invalidateAll()}function at(i){D.invalidate(i)}var D,Ct=v(()=>{"use strict";u();$t();D=new Pt({name:"routes"})});import A from"path";import le from"github-slugger";function kt(i,r,e,d){let o=decodeURIComponent(i),l=A.resolve(o),c=A.resolve(r),p=S(A.relative(c,l));if(p.startsWith("../")||p===".."||l.includes("\0"))throw new Error(`Security breach: File is outside of docs directory or contains null bytes: ${i}`);let{data:t,content:s}=bt(i),a=p.split("/"),m,h;if(d?.versions&&a.length>0){let R=a[0],et=d.versions.prefix||"",V=d.versions.versions.find(E=>{let ot=et+E.path;return R===ot||R===E.path});V&&(h=V.path,a=a.slice(1))}if(d?.i18n&&a.length>0){let R=a[0];d.i18n.locales[R]&&(m=R,a=a.slice(1))}let y;if(a.length>0){let R=a[0].match(/^\((.+)\)$/);R&&(y=R[1].toLowerCase(),a=a.slice(1))}let k=a.join("/"),n;t.permalink?n=t.permalink.startsWith("/")?t.permalink:`/${t.permalink}`:n=vt(k||"index.md");let g=e;h&&(g+="/"+h),m&&(g+="/"+m),g+=n==="/"?"":n,(!g||g==="")&&(g="/");let b=a[a.length-1],f=W(b),B=W(A.basename(i,A.extname(i))),x=t.sidebarPosition??q(b),C=a.length>=2?a[0]:void 0,$=C?W(C):void 0,L=a.length>=2&&/^index\.mdx?$/.test(f),ie=new le,ht=[],ne=/^(#{2,4})\s+(.+)$/gm;for(let R of s.matchAll(ne)){let et=R[1].length,V=R[2].replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/[_*`]/g,"").trim(),E=G(V).trim(),ot=ie.slug(E);ht.push({level:et,text:E,id:ot})}let re=t.title?G(String(t.title)):B,tt=t.description?G(String(t.description)):"";!tt&&s&&(tt=nt(s.replace(/^#+.*$/gm,"").replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/[_*`]/g,"").replace(/\s+/g," ")).trim().slice(0,160));let se=t.badge?G(String(t.badge)):void 0,yt=t.icon?String(t.icon):void 0,ae=ce(s);return{route:{path:g,componentPath:i,filePath:p,title:re,description:tt,sidebarPosition:x,headings:ht,locale:m,version:h,badge:se,icon:yt,tab:y,_content:ae,_rawContent:s},relativeDir:$,isGroupIndex:L,inferredTab:y,groupMeta:L?{title:t.groupTitle||t.title||($?N($):""),position:t.groupPosition??t.sidebarPosition??(C?q(C):void 0),icon:yt}:void 0,inferredGroupPosition:C?q(C):void 0}}function ce(i){let r=i.replace(/^#+.*$/gm,"").replace(/\[([^\]]+)\]\([^\)]+\)/g,"$1").replace(/\{[^\}]+\}/g,"").replace(/[_*`]/g,"").replace(/\s+/g," ");return nt(r).trim()}var Bt=v(()=>{"use strict";u();_()});function St(i){return i.sort((r,e)=>!r.group&&!e.group?Rt(r,e):r.group?e.group?r.group!==e.group?de(r,e):Rt(r,e):1:-1)}function Rt(i,r){return i.sidebarPosition!==void 0&&r.sidebarPosition!==void 0?i.sidebarPosition-r.sidebarPosition:i.sidebarPosition!==void 0?-1:r.sidebarPosition!==void 0?1:i.title.localeCompare(r.title)}function de(i,r){return i.groupPosition!==void 0&&r.groupPosition!==void 0?i.groupPosition-r.groupPosition:i.groupPosition!==void 0?-1:r.groupPosition!==void 0?1:(i.groupTitle||i.group).localeCompare(r.groupTitle||r.group)}var Dt=v(()=>{"use strict";u()});import pe from"fast-glob";async function H(i,r,e="/docs",d=!0){let o=performance.now();D.load(),U.clear(),(process.env.BOLTDOCS_FORCE_REPARSE==="true"||r?.i18n)&&D.invalidateAll();let l;!d&&lt?l=lt:(l=await pe(["**/*.md","**/*.mdx"],{cwd:i,absolute:!0,suppressErrors:!0,followSymbolicLinks:!1}),lt=l),D.pruneStale(new Set(l));let c=50,p=[],t=0;for(let n=0;n<l.length;n+=c){let g=l.slice(n,n+c),b=await Promise.all(g.map(async f=>{let B=D.get(f);if(B)return t++,B;let x=kt(f,i,e,r);return D.set(f,x),x}));p.push(...b),n+c<l.length&&await new Promise(f=>setImmediate(f))}D.save();let s=new Map,a=[];for(let n of p)if(n.isGroupIndex&&n.relativeDir&&a.push(n),n.relativeDir){let g=s.get(n.relativeDir);g?(g.position===void 0&&n.inferredGroupPosition!==void 0&&(g.position=n.inferredGroupPosition),!g.icon&&n.route.icon&&(g.icon=n.route.icon)):(g={title:N(n.relativeDir),position:n.inferredGroupPosition,icon:n.route.icon},s.set(n.relativeDir,g))}for(let n of a){let g=s.get(n.relativeDir);n.groupMeta&&(g.title=n.groupMeta.title,n.groupMeta.position!==void 0&&(g.position=n.groupMeta.position),n.groupMeta.icon&&(g.icon=n.groupMeta.icon))}let m=new Array(p.length);for(let n=0;n<p.length;n++){let g=p[n],b=g.relativeDir,f=b?s.get(b):void 0;m[n]={...g.route,group:b,groupTitle:f?.title||(b?N(b):void 0),groupPosition:f?.position,groupIcon:f?.icon}}let h=m;if(r?.i18n){let n=me(m,r,e);h=[...m,...n]}let y=St(h),k=performance.now()-o;return console.log(`[boltdocs] Route generation: ${k.toFixed(2)}ms (${l.length} files, ${t} cache hits)`),y}function me(i,r,e){let d=r.i18n.defaultLocale,o=Object.keys(r.i18n.locales),l=[],c=new Map,p=[];for(let t of i){let s=t.locale||d;c.has(s)||c.set(s,new Set),c.get(s).add(t.path),s===d&&p.push(t)}for(let t of o){let s=c.get(t)||new Set;for(let a of p){let m=ge(a.path,d,t,e,r);m!==a.path&&(s.has(m)||l.push({...a,path:m,locale:t}))}}return l}function ge(i,r,e,d,o){let l=`${i}:${e}`,c=U.get(l);if(c)return c;let p=d;if(o?.versions){let m=o.versions.prefix||"";for(let h of o.versions.versions){let y=m+h.path;if(i.startsWith(`${d}/${y}`)){p+="/"+y;break}if(i.startsWith(`${d}/${h.path}`)){p+="/"+h.path;break}}}let t=i.substring(p.length),s=`/${r}`;if(t.startsWith(s+"/"))t="/"+e+"/"+t.substring(s.length+1);else if(t===s)t="/"+e;else if(t==="/"||t==="")t="/"+e;else{let m=t.startsWith("/")?"":"/";t="/"+e+m+t}let a=p+t;return U.size>2e3&&U.clear(),U.set(l,a),a}var lt,U,ct=v(()=>{"use strict";u();_();Ct();Bt();Dt();lt=null,U=new Map});import dt from"path";import ue from"fs";import{loadConfigFromFile as fe}from"vite";function he(i){return i}async function j(i,r=process.cwd()){let e=r,d={docsDir:dt.resolve(i),theme:{title:"Boltdocs",description:"A Vite documentation framework",navbar:[{label:"Home",href:"/"},{label:"Documentation",href:"/docs"}],codeTheme:{light:"github-light",dark:"github-dark"},poweredBy:!0,breadcrumbs:!0}},o={};for(let t of J){let s=dt.resolve(e,t);if(ue.existsSync(s))try{let a=await fe({command:"serve",mode:"development"},s,e);if(a){o=a.config;break}}catch(a){console.warn(`[boltdocs] Failed to load config from ${t}:`,a)}}let c={...{title:o.title,description:o.description,logo:o.logo,favicon:o.favicon,ogImage:o.ogImage,navbar:o.navbar,sidebar:o.sidebar,socialLinks:o.socialLinks,footer:o.footer,githubRepo:o.githubRepo,tabs:o.tabs,codeTheme:o.codeTheme,copyMarkdown:o.copyMarkdown,breadcrumbs:o.breadcrumbs,poweredBy:o.poweredBy,communityHelp:o.communityHelp,version:o.version,editLink:o.editLink},...o.theme||{}},p=Object.fromEntries(Object.entries(c).filter(([t,s])=>s!==void 0));return p.navbar&&(p.navbar=p.navbar.map(t=>({label:t.label||t.text||"",href:t.href||t.link||t.to||"",items:t.items?.map(s=>({label:s.label||s.text||"",href:s.href||s.link||s.to||""}))}))),{docsDir:dt.resolve(i),homePage:o.homePage,theme:{...d.theme,...p},i18n:o.i18n,versions:o.versions,siteUrl:o.siteUrl,plugins:o.plugins||[],external:o.external,integrations:o.integrations,robots:o.robots,vite:o.vite}}var J,X=v(()=>{"use strict";u();J=["boltdocs.config.js","boltdocs.config.mjs","boltdocs.config.ts"]});function Mt(i,r){let e=F(r.title),d=F(r.description);return i.replace(/<title>.*?<\/title>/,`<title>${e}</title>`).replace(/(<meta name="description" content=")[^"]*(")/,`$1${d}$2`).replace(/(<meta property="og:title" content=")[^"]*(")/,`$1${e}$2`).replace(/(<meta property="og:description" content=")[^"]*(")/,`$1${d}$2`).replace(/(<meta name="twitter:title" content=")[^"]*(")/,`$1${e}$2`).replace(/(<meta name="twitter:description" content=")[^"]*(")/,`$1${d}$2`)}var Tt=v(()=>{"use strict";u();_()});function _t(i,r){let e=r?.siteUrl?.replace(/\/$/,"")||"https://example.com",d=new Date().toISOString().split("T")[0],o=[{url:"/",priority:"1.0",changefreq:"daily"}];if(r?.i18n){let c=r.i18n.defaultLocale;for(let p of Object.keys(r.i18n.locales))p!==c&&o.push({url:`/${p}/`,priority:"1.0",changefreq:"daily"})}return`<?xml version="1.0" encoding="UTF-8"?>
2
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
+ ${[...o,...i.map(c=>({url:c,priority:"0.8",changefreq:"weekly"}))].map(c=>` <url>
4
+ <loc>${it(e)}${it(c.url)}</loc>
5
+ <lastmod>${d}</lastmod>
6
+ <changefreq>${c.changefreq}</changefreq>
7
+ <priority>${c.priority}</priority>
8
+ </url>`).join(`
9
+ `)}
10
+ </urlset>`}var jt=v(()=>{"use strict";u();_()});function K(i){if(typeof i.robots=="string")return i.robots;let r=i.siteUrl?.replace(/\/$/,"")||"",e=i.robots||{},d=e.rules||[{userAgent:"*",allow:"/"}],o=e.sitemaps||(r?[`${r}/sitemap.xml`]:[]),l="";for(let c of d){if(l+=`User-agent: ${c.userAgent}
11
+ `,c.disallow){let p=Array.isArray(c.disallow)?c.disallow:[c.disallow];for(let t of p)l+=`Disallow: ${t}
12
+ `}if(c.allow){let p=Array.isArray(c.allow)?c.allow:[c.allow];for(let t of p)l+=`Allow: ${t}
13
+ `}l+=`
14
+ `}for(let c of o)l+=`Sitemap: ${c}
15
+ `;return l.trim()}var pt=v(()=>{"use strict";u()});import I from"fs";import T from"path";import{fileURLToPath as ye}from"url";import{createRequire as xe}from"module";async function mt(i){let{docsDir:r,docsDirName:e,outDir:d,config:o}=i,l=await H(r,o),c=T.resolve(It,"../client/ssr.js");if(!I.existsSync(c)){console.error("[boltdocs] SSR module not found at",c,"- Did you build the core package?");return}let p=Ft("module"),t=p.prototype.require;p.prototype.require=function(n,...g){return n==="virtual:boltdocs-layout"?{__esModule:!0,default:function(f){try{let x=t.apply(this,[T.resolve(It,"../client/index.js")]).DefaultLayout||(({children:$})=>$);return t.apply(this,["react"]).createElement(x,f)}catch{return f.children}}}:t.apply(this,[n,...g])};let{render:s}=Ft(c);p.prototype.require=t;let a=T.join(d,"index.html");if(!I.existsSync(a)){console.warn("[boltdocs] No index.html found in outDir, skipping SSG.");return}let m=I.readFileSync(a,"utf-8");await Promise.all(l.map(async n=>{let g=rt(o?.theme?.title,n.locale)||"Boltdocs",b=rt(o?.theme?.description,n.locale)||"",f=`${n.title} | ${g}`,B=n.description||b,x={};x[`/${e}/${n.filePath}`]={default:()=>null};try{let C=await s({path:n.path,routes:l,config:o||{},docsDirName:e,modules:x,homePage:void 0}),$=Mt(m,{title:F(f),description:F(B)}).replace("<!--app-html-->",C).replace('<div id="root"></div>',`<div id="root">${C}</div>`),L=T.join(d,n.path);await I.promises.mkdir(L,{recursive:!0}),await I.promises.writeFile(T.join(L,"index.html"),$,"utf-8")}catch(C){console.error(`[boltdocs] Error SSR rendering route ${n.path}:`,C&&(C.stack||C))}}));let h=_t(l.map(n=>n.path),o);I.writeFileSync(T.join(d,"sitemap.xml"),h,"utf-8");let y=K(o);I.writeFileSync(T.join(d,"robots.txt"),y,"utf-8"),console.log(`[boltdocs] Generated ${l.length} static pages + sitemap.xml + robots.txt`);let{flushCache:k}=await import("./cache-P6WK424C.mjs");await k()}var be,It,Ft,gt=v(()=>{"use strict";u();ct();_();Tt();jt();pt();be=ye(import.meta.url),It=T.dirname(be),Ft=xe(import.meta.url)});import Ht from"path";import ve from"fs";function Ot(i,r){let e=i.homePage?`import HomePage from '${S(i.homePage)}';`:"",d=Ht.resolve(process.cwd(),"index.css"),o=ve.existsSync(d)?"import './index.css';":"",l=i.homePage?"homePage: HomePage,":"",c=r?.plugins?.flatMap(y=>Object.entries(y.components||{}))||[],p=c.map(([y,k])=>`import * as _comp_${y} from '${S(k)}';
16
+ const ${y} = _comp_${y}.default || _comp_${y}['${y}'] || _comp_${y};`).join(`
17
+ `),t=c.map(([y])=>y).join(", "),s=Ht.basename(i.docsDir||"docs"),a=Object.entries(r?.external||{}),m=a.map(([y,k],n)=>`import _ext_${n} from '${S(k)}';`).join(`
18
+ `),h=a.length>0?`externalPages: { ${a.map(([y],k)=>`"${y}": _ext_${k}`).join(", ")} },`:"";return`
19
+ import { createBoltdocsApp as _createApp } from 'boltdocs/client';
20
+ import _routes from 'virtual:boltdocs-routes';
21
+ import _config from 'virtual:boltdocs-config';
22
+ import _user_mdx_components from 'virtual:boltdocs-mdx-components';
23
+ ${o}
24
+ ${e}
25
+ ${p}
26
+ ${m}
27
+
28
+ _createApp({
29
+ target: '#root',
30
+ routes: _routes,
31
+ docsDirName: '${s}',
32
+ config: _config,
33
+ modules: import.meta.glob('/${s}/**/*.{md,mdx}'),
34
+ hot: import.meta.hot,
35
+ ${l}
36
+ ${h}
37
+ components: { ${t}${t?", ":""} ...(_user_mdx_components || {}) },
38
+ });
39
+ `}var Lt=v(()=>{"use strict";u();_()});function Et(i){return`<!doctype html>
40
+ <html lang="en">
41
+ <head>
42
+ <meta charset="UTF-8" />
43
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
44
+ <title>${i.theme?.title||"Boltdocs"}</title>
45
+ </head>
46
+ <body>
47
+ <div id="root"></div>
48
+ </body>
49
+ </html>`}function ut(i,r){let e=r.theme,d=e?.title||"Boltdocs",o=e?.description||"",l=e?.favicon;!l&&e?.logo&&(typeof e.logo=="string"?l=e.logo:l=e.logo.light||e.logo.dark);let c=[l?`<link rel="icon" href="${l}">`:"",`<meta name="description" content="${o}">`,`<meta property="og:title" content="${d}">`,`<meta property="og:description" content="${o}">`,e?.ogImage?`<meta property="og:image" content="${e.ogImage}">`:"",'<meta property="og:type" content="website">','<meta name="twitter:card" content="summary_large_image">',`<meta name="twitter:title" content="${d}">`,`<meta name="twitter:description" content="${o}">`,e?.ogImage?`<meta name="twitter:image" content="${e.ogImage}">`:"",'<meta name="generator" content="Boltdocs">'].filter(Boolean).join(`
50
+ `),p=`
51
+ <script>
52
+ (function() {
53
+ try {
54
+ var stored = localStorage.getItem("boltdocs-theme");
55
+ var theme = stored || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
56
+ if (theme === "light") {
57
+ document.documentElement.classList.add("theme-light");
58
+ document.documentElement.dataset.theme = "light";
59
+ } else {
60
+ document.documentElement.classList.remove("theme-light");
61
+ document.documentElement.dataset.theme = "dark";
62
+ }
63
+ } catch (e) {}
64
+ })();
65
+ </script>
66
+ `;return i.includes("<title>")?i=i.replace(/<title>.*?<\/title>/,`<title>${d}</title>`):i=i.replace("</head>",` <title>${d}</title>
67
+ </head>`),i=i.replace("</head>",` ${c}
68
+ ${p} </head>`),!i.includes("src/main")&&!i.includes("virtual:boltdocs-entry")&&(i=i.replace("</body>",` <script type="module">import "virtual:boltdocs-entry";</script>
69
+ </body>`)),i}var Gt=v(()=>{"use strict";u()});function Nt(i){let r=[];for(let e of i)if(r.push({id:e.path,title:e.title,content:e._content||"",url:e.path,display:e.groupTitle?`${e.groupTitle} > ${e.title}`:e.title,locale:e.locale,version:e.version}),e.headings)for(let d of e.headings)r.push({id:`${e.path}#${d.id}`,title:d.text,content:`${d.text} in ${e.title}`,url:`${e.path}#${d.id}`,display:`${e.title} > ${d.text}`,locale:e.locale,version:e.version});return r}var At=v(()=>{"use strict";u()});var Ut=v(()=>{"use strict";u()});import{loadEnv as Pe}from"vite";import{ViteImageOptimizer as we}from"vite-plugin-image-optimizer";import M from"path";import zt from"fs";function Vt(i={},r){let e=M.resolve(process.cwd(),i.docsDir||"docs"),d=S(e),o=r,l,c=!1,p=o?.plugins?.flatMap(t=>t.vitePlugins||[])||[];return[{name:"vite-plugin-boltdocs",enforce:"pre",async config(t,s){c=s.command==="build";let a=t.envDir||process.cwd(),m=Pe(s.mode,a,"");return Object.assign(process.env,m),o||(o=await j(e)),{optimizeDeps:{include:["react","react-dom"],exclude:["boltdocs","boltdocs/client","boltdocs/hooks","boltdocs/primitives","boltdocs/base-ui","boltdocs/mdx","boltdocs/integrations","boltdocs/client/hooks","boltdocs/client/primitives"]}}},configResolved(t){l=t},configureServer(t){t.middlewares.use((n,g,b)=>{if(n.url==="/robots.txt"){let f=K(o);g.statusCode=200,g.setHeader("Content-Type","text/plain"),g.end(f);return}b()}),t.middlewares.use(async(n,g,b)=>{let f=n.url?.split("?")[0]||"/",B=n.headers.accept||"",x=f==="/"||f.startsWith("/docs")||o.i18n&&Object.keys(o.i18n.locales).some($=>f.startsWith(`/${$}/docs`)||f===`/${$}`)||o.external&&Object.keys(o.external).some($=>f.startsWith($)),C=/\.(js|css|png|jpe?g|gif|svg|ico|webp|woff2?|ttf|otf|mp4|webm|ogg|mp3|wav|flac|aac|pdf|zip|gz|map|json)$/i.test(f);if(B.includes("text/html")&&!C&&x){let $=Et(o);$=ut($,o),$=await t.transformIndexHtml(n.url||"/",$),g.statusCode=200,g.setHeader("Content-Type","text/html"),g.end($);return}b()});let s=J.map(n=>M.resolve(process.cwd(),n)),a=["tsx","jsx"],m=a.map(n=>M.resolve(e,`layout.${n}`)),h=["tsx","ts","jsx","js"],y=h.map(n=>M.resolve(e,`mdx-components.${n}`));t.watcher.add([...s,...y,...m]);let k=async(n,g)=>{try{let b=S(n);if(J.some(x=>b.endsWith(x))){t.restart();return}if(h.some(x=>b.endsWith(`mdx-components.${x}`))){let x=t.moduleGraph.getModuleById("\0virtual:boltdocs-mdx-components");x&&t.moduleGraph.invalidateModule(x),t.ws.send({type:"full-reload"});return}if(a.some(x=>b.endsWith(`layout.${x}`))){let x=t.moduleGraph.getModuleById("\0virtual:boltdocs-layout");x&&t.moduleGraph.invalidateModule(x),t.ws.send({type:"full-reload"});return}if(!b.startsWith(d)||!xt(b))return;if(g==="add"||g==="unlink"){st(),o=await j(e);let x=t.moduleGraph.getModuleById("\0virtual:boltdocs-config");x&&t.moduleGraph.invalidateModule(x),t.ws.send({type:"custom",event:"boltdocs:config-update",data:{theme:o?.theme,integrations:o?.integrations,i18n:o?.i18n,versions:o?.versions,siteUrl:o?.siteUrl}})}else at(n);let f=await H(e,o,"/docs",g!=="change"),B=t.moduleGraph.getModuleById("\0virtual:boltdocs-routes");B&&t.moduleGraph.invalidateModule(B),t.ws.send({type:"custom",event:"boltdocs:routes-update",data:f})}catch(b){console.error(`[boltdocs] HMR error during ${g} event:`,b)}};t.watcher.on("add",n=>k(n,"add")),t.watcher.on("unlink",n=>k(n,"unlink")),t.watcher.on("change",n=>k(n,"change"))},resolveId(t){if(t==="virtual:boltdocs-routes"||t==="virtual:boltdocs-config"||t==="virtual:boltdocs-entry"||t==="virtual:boltdocs-mdx-components"||t==="virtual:boltdocs-layout"||t==="virtual:boltdocs-search")return"\0"+t},async load(t){if(t==="\0virtual:boltdocs-routes"){let s=await H(e,o);return`export default ${JSON.stringify(s,null,2)};`}if(t==="\0virtual:boltdocs-config"){let s={theme:o?.theme,integrations:o?.integrations,i18n:o?.i18n,versions:o?.versions,siteUrl:o?.siteUrl};return`export default ${JSON.stringify(s,null,2)};`}if(t==="\0virtual:boltdocs-entry")return Ot(i,o);if(t==="\0virtual:boltdocs-mdx-components"){let s=["tsx","ts","jsx","js"],a=null;for(let m of s){let h=M.resolve(e,`mdx-components.${m}`);if(zt.existsSync(h)){a=h;break}}if(a){let m=S(a);return`import * as components from '${m}';
70
+ const mdxComponents = components.default || components;
71
+ export default mdxComponents;
72
+ export * from '${m}';`}return"export default {};"}if(t==="\0virtual:boltdocs-layout"){let s=["tsx","jsx"],a=null;for(let m of s){let h=M.resolve(e,`layout.${m}`);if(zt.existsSync(h)){a=h;break}}return a?`import UserLayout from '${S(a)}';
73
+ export default UserLayout;`:`import { DefaultLayout } from 'boltdocs/client';
74
+ export default DefaultLayout;`}if(t==="\0virtual:boltdocs-search"){let s=await H(e,o),a=Nt(s);return`export default ${JSON.stringify(a,null,2)};`}},transformIndexHtml:{order:"pre",handler(t){return ut(t,o)}},async closeBundle(){if(!c)return;let t=l?.build?.outDir?M.resolve(l.root,l.build.outDir):M.resolve(process.cwd(),"dist"),s=M.basename(e||"docs");await mt({docsDir:e,docsDirName:s,outDir:t,config:o});let{flushCache:a}=await import("./cache-P6WK424C.mjs");await a()}},we({includePublic:!0,png:{quality:80},jpeg:{quality:80},jpg:{quality:80},webp:{quality:80},avif:{quality:80},svg:{multipass:!0,plugins:[{name:"preset-default"}]}}),...p.filter(t=>!!t)]}var Wt=v(()=>{"use strict";u();ct();X();gt();_();Lt();Gt();pt();At();Ut()});var qt,O,Jt=v(()=>{"use strict";u();$t();qt="v3",O=new wt("mdx")});import{createHighlighter as $e}from"shiki";async function Q(i){if(Z)return Z;let r=typeof i=="object"?[i.light,i.dark]:[i??"github-dark"];return["github-light","github-dark"].forEach(e=>{r.includes(e)||r.push(e)}),Z=await $e({themes:r,langs:["tsx","jsx","ts","js","json","md","mdx","css","html","bash","sh","yaml","yml"]}),Z}var Z,ft=v(()=>{"use strict";u();Z=null});import{visit as Ce}from"unist-util-visit";function Xt(i){return async r=>{let e=i?.theme?.codeTheme??{light:"github-light",dark:"github-dark"},d=await Q(e);Ce(r,["mdxJsxFlowElement","mdxJsxTextElement"],o=>{if(o.name!=="ComponentPreview")return;let l=o.attributes?.find(s=>s.name==="code"),c="";if(l){if(typeof l.value=="string")c=l.value;else if(l.value?.type==="mdxJsxAttributeValueExpression"){let s=l.value.value??"";c=s.match(/^[`'"](.+)[`'"]$/)?.[1]??s}}if(!c)return;let p=typeof e=="object"?{themes:{light:e.light,dark:e.dark},lang:"tsx"}:{theme:e,lang:"tsx"},t=d.codeToHtml(c,p);o.attributes=(o.attributes??[]).filter(s=>s.name!=="highlightedHtml"),o.attributes.push({type:"mdxJsxAttribute",name:"highlightedHtml",value:t})})}}var Kt=v(()=>{"use strict";u();ft()});import{visit as ke}from"unist-util-visit";function Zt(i){return async r=>{let e=i?.theme?.codeTheme||{light:"github-light",dark:"github-dark"},d=await Q(e);ke(r,"element",o=>{if(o.tagName==="pre"&&o.children?.[0]?.tagName==="code"){let l=o.children[0],p=(l.properties?.className||[]).find(h=>h.startsWith("language-")),t=p?p.slice(9):"text",s=l.children[0]?.value||"",a={lang:t};typeof e=="object"?a.themes={light:e.light,dark:e.dark}:a.theme=e;let m=d.codeToHtml(s,a);o.properties.dataHighlighted="true",o.properties.highlightedHtml=m,o.children=[]}})}}var Qt=v(()=>{"use strict";u();ft()});import Be from"@mdx-js/rollup";import Re from"remark-gfm";import Se from"remark-frontmatter";import De from"rehype-slug";import Me from"crypto";function te(i,r=Be){let e=i?.plugins?.flatMap(l=>l.remarkPlugins||[])||[],d=i?.plugins?.flatMap(l=>l.rehypePlugins||[])||[],o=r({remarkPlugins:[Re,Se,[Xt,i],...e],rehypePlugins:[De,[Zt,i],...d],jsxRuntime:"automatic",providerImportSource:"@mdx-js/react"});return{...o,name:"vite-plugin-boltdocs-mdx",async buildStart(){Y=0,z=0,Yt||(O.load(),Yt=!0),o.buildStart&&await o.buildStart.call(this)},async transform(l,c,p){if(!c.endsWith(".md")&&!c.endsWith(".mdx"))return o.transform?.call(this,l,c,p);console.log(`[boltdocs] Transforming MDX: ${c}`),z++;let t=Me.createHash("md5").update(l).digest("hex"),s=`${c}:${t}:${qt}`,a=O.get(s);if(a)return Y++,{code:a,map:null};let m=await o.transform.call(this,l,c,p);return m&&typeof m=="object"&&m.code&&O.set(s,m.code),m},async buildEnd(){z>0&&console.log(`[boltdocs] MDX Cache Performance: ${Y}/${z} hits (${Math.round(Y/z*100)||0}%)`),O.save(),await O.flush(),o.buildEnd&&await o.buildEnd.call(this)}}}var Yt,Y,z,ee=v(()=>{"use strict";u();Jt();Kt();Qt();Yt=!1,Y=0,z=0});import Te from"@vitejs/plugin-react";import _e from"@tailwindcss/vite";async function oe(i){let r=i?.docsDir||"docs",e=await j(r),d={...i,homePage:i?.homePage||e.homePage};return[...Vt(d,e),te(e)]}async function wi(i,r="development"){let e=await j("docs",i);return{root:i,mode:r,plugins:[Te(),_e(),await oe({docsDir:e.docsDir,homePage:e.homePage})],...e.vite}}var je=v(()=>{u();Wt();ee();X();gt();X()});export{he as a,j as b,X as c,mt as d,Et as e,Gt as f,oe as g,wi as h,je as i};
@@ -0,0 +1 @@
1
+ import{b as y}from"./chunk-JD3RSDE4.mjs";import{b as x,e as R,f as b}from"./chunk-NBCYHLAA.mjs";import{useLocation as P}from"react-router-dom";function C(n,o){return n?typeof n=="string"?n:o&&n[o]?n[o]:Object.values(n)[0]||"":""}function H(){let n=x(),{theme:o}=y(),a=P(),{currentLocale:t}=b(),s=n.theme||{},r=C(s.title,t)||"Boltdocs",g=s.navbar||[],d=s.socialLinks||[],f=s.githubRepo,h=g.map(p=>{let l=p.href||p.to||p.link||"";return{label:C(p.label||p.text,t),href:l,active:a.pathname===l,to:l.startsWith("http")||l.startsWith("//")?"external":void 0,items:p.items?.map(u=>({label:C(u.label||u.text,t),href:u.href||u.link||u.to||""}))}}),i=s.logo,e=i?typeof i=="string"?i:o==="dark"?i.dark:i.light:null,c={alt:(i&&typeof i=="object"?i.alt:void 0)||r,width:i&&typeof i=="object"?i.width:void 0,height:i&&typeof i=="object"?i.height:void 0},m=f?`https://github.com/${f}`:null;return{links:h,title:r,logo:e,logoProps:c,github:m,social:d,config:n,theme:o}}import{useNavigate as V}from"react-router-dom";function v(n,o,a){let t=n;return o&&(t===o||t.startsWith(o+"/"))&&(t=t===o?"index.md":t.slice(o.length+1)),a&&(t===a||t.startsWith(a+"/"))&&(t=t===a?"index.md":t.slice(a.length+1)),t}function G(){let n=V(),o=b(),{allRoutes:a,currentRoute:t,currentVersion:s,currentLocale:r,config:g}=o,d=g.versions,f=R(e=>e.setVersion),h=e=>{if(!d||e===s)return;f(e);let c=`/docs/${e}`;if(t){let m=v(t.filePath,t.version,t.locale),p=a.find(l=>v(l.filePath,l.version,l.locale)===m&&(l.version||d.defaultVersion)===e&&(r?l.locale===r:!l.locale));if(p)c=p.path;else{let l=a.find(u=>v(u.filePath,u.version,u.locale)==="index.md"&&(u.version||d.defaultVersion)===e&&(r?u.locale===r:!u.locale));c=l?l.path:`/docs/${e}${r?`/${r}`:""}`}}n(c)},i=o.availableVersions.map(e=>({...e,label:e.label,value:e.key}));return{currentVersion:s,currentVersionLabel:o.currentVersionLabel,availableVersions:i,handleVersionChange:h}}import{useNavigate as I}from"react-router-dom";function _(){let n=I(),o=b(),{allRoutes:a,currentRoute:t,currentLocale:s,config:r}=o,g=r.i18n,d=R(c=>c.setLocale),f=c=>{if(!g||c===s)return;d(c);let m="/";if(t){let p=v(t.filePath,t.version,t.locale),l=a.find(u=>v(u.filePath,u.version,u.locale)===p&&(u.locale||g.defaultLocale)===c&&u.version===t.version);if(l)m=l.path;else{let u=a.find(L=>v(L.filePath,L.version,L.locale)==="index.md"&&(L.locale||g.defaultLocale)===c&&L.version===t.version);m=u?u.path:c===g.defaultLocale?t.version?`/${t.version}`:"/":t.version?`/${t.version}/${c}`:`/${c}`}}else{let p=a.find(l=>(l.filePath==="index.mdx"||l.filePath==="index.md")&&(l.locale||g.defaultLocale)===c&&!l.version);p?m=p.path:m=c===g.defaultLocale?"/":`/${c}`}n(m)},i=r.i18n?.localeConfigs?.[s]?.label||r.i18n?.locales[s]||s,e=r.i18n?Object.entries(r.i18n.locales).map(([c,m])=>{let p=r.i18n?.localeConfigs?.[c];return{key:c,label:p?.label||m,value:c,isCurrent:c===s}}):[];return{currentLocale:s,currentLocaleLabel:i,availableLocales:e,handleLocaleChange:f}}import{useLocation as T}from"react-router-dom";import{useEffect as w,useState as $,useRef as k}from"react";function ot(n=[],o=[]){let a=T(),t=k([]),[s,r]=$({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),d=o.find(i=>i.path===a.pathname)?.tab?.toLowerCase(),f=n.findIndex(i=>i.id.toLowerCase()===d),h=f===-1?0:f;return w(()=>{let i=t.current[h];i&&r({opacity:1,width:i.offsetWidth,transform:`translateX(${i.offsetLeft}px)`})},[h,n.length,a.pathname]),{tabs:n,activeIndex:h,indicatorStyle:s,tabRefs:t,activeTabId:d}}import{useLocation as S}from"react-router-dom";function at(n){let o=x(),a=S(),t=e=>e.endsWith("/")&&e.length>1?e.slice(0,-1):e,s=t(a.pathname),r=n.find(e=>t(e.path)===s),g=r?.tab?.toLowerCase(),d=g?n.filter(e=>!e.tab||e.tab.toLowerCase()===g):n,f=[],h=new Map;for(let e of d)e.group?(h.has(e.group)||h.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),h.get(e.group).routes.push(e)):f.push(e);return{groups:Array.from(h.values()),ungrouped:f,activeRoute:r,activePath:s,config:o}}import{useState as B}from"react";function ut(n=[]){let[o,a]=B(null);return{headings:n,activeId:o,setActiveId:a}}function pt(){let{currentRoute:n}=b(),o=[];return n&&(n.groupTitle&&o.push({label:n.groupTitle}),o.push({label:n.title,href:n.path})),{crumbs:o,activeRoute:n}}import{useLocation as O}from"react-router-dom";function bt(){let{routes:n,currentRoute:o}=b(),a=O();if(!o)return{prevPage:null,nextPage:null,currentRoute:null};let t=o.tab?.toLowerCase(),s=t?n.filter(f=>f.tab?.toLowerCase()===t):n.filter(f=>!f.tab),r=s.findIndex(f=>f.path===a.pathname),g=r>0?s[r-1]:null,d=r!==-1&&r<s.length-1?s[r+1]:null;return{prevPage:g,nextPage:d,currentRoute:o}}export{C as a,H as b,G as c,_ as d,ot as e,at as f,ut as g,pt as h,bt as i};
@@ -0,0 +1 @@
1
+ import{f as h}from"./chunk-NBCYHLAA.mjs";import{useState as u,useMemo as M,useEffect as S}from"react";import{Index as R}from"flexsearch";import m from"virtual:boltdocs-search";function E(p){let{currentLocale:o,currentVersion:s}=h(),[a,g]=u(!1),[r,d]=u(""),[c,I]=u(null);S(()=>{if(!a||c)return;let n=new R({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let i of m)n.add(i.id,`${i.title} ${i.content}`);I(n)},[a,c]);let v=M(()=>{if(!r)return p.filter(e=>{let t=!o||e.locale===o,l=!s||e.version===s;return t&&l}).slice(0,10).map(e=>({id:e.path,title:e.title,path:e.path,bio:e.description||"",groupTitle:e.groupTitle}));if(!c)return[];let n=c.search(r,{limit:20,suggest:!0}),i=[],f=new Set;for(let e of n){let t=m.find(x=>x.id===e);if(!t)continue;let l=!o||t.locale===o,y=!s||t.version===s;!l||!y||f.has(t.url)||(f.add(t.url),i.push({id:t.url,title:t.title,path:t.url,bio:t.display,groupTitle:t.display.split(" > ")[0],isHeading:t.url.includes("#")}))}return i.slice(0,10)},[r,c,o,s,p]);return{isOpen:a,setIsOpen:g,query:r,setQuery:d,list:v,input:{value:r,onChange:n=>d(n.target.value)}}}export{E as a};