boltdocs 2.7.0 → 2.7.2

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 (70) hide show
  1. package/dist/client/index.cjs +1 -1
  2. package/dist/client/index.d.cts +2 -2
  3. package/dist/client/index.d.ts +4 -4
  4. package/dist/client/index.js +1 -1
  5. package/dist/client/mdx.cjs +1 -1
  6. package/dist/client/mdx.d.ts +1 -1
  7. package/dist/client/mdx.js +1 -1
  8. package/dist/client/primitives.cjs +1 -1
  9. package/dist/client/primitives.d.ts +1 -1
  10. package/dist/client/primitives.js +1 -1
  11. package/dist/docs-layout-CCUDPQ8O.js +6 -0
  12. package/dist/docs-layout-CZVMDgr-.cjs +6 -0
  13. package/dist/icons-dev-B_RZIyxu.js +6 -0
  14. package/dist/icons-dev-BlV3wWFT.cjs +6 -0
  15. package/dist/image-BHhTvQzr.cjs +6 -0
  16. package/dist/image-CqKzYD8f.js +6 -0
  17. package/dist/mdx-DudBEac0.js +7 -0
  18. package/dist/mdx-r4cDQxWu.cjs +7 -0
  19. package/dist/node/cli-entry.cjs +1 -1
  20. package/dist/node/cli-entry.mjs +1 -1
  21. package/dist/node/index.cjs +1 -1
  22. package/dist/node/index.mjs +1 -1
  23. package/dist/{node-CinkUtxV.cjs → node-BsiWa41f.cjs} +2 -3
  24. package/dist/{node-C2nWXElP.mjs → node-DVSpPqT-.mjs} +2 -3
  25. package/dist/{package-BMYLDBBP.cjs → package-Swb4Rj3z.cjs} +1 -1
  26. package/dist/{package-HegMOTL_.mjs → package-ztArRM6v.mjs} +1 -1
  27. package/dist/search-dialog-B584t9ZF.js +6 -0
  28. package/dist/search-dialog-BvBopRsZ.cjs +6 -0
  29. package/dist/search-dialog-ByvGScjt.js +6 -0
  30. package/dist/{search-dialog-CGyrozZE.cjs → search-dialog-Cyko6TJm.cjs} +1 -1
  31. package/dist/search-dialog-D6BNohIJ.js +6 -0
  32. package/dist/search-dialog-DuYTIefy.cjs +6 -0
  33. package/package.json +2 -3
  34. package/src/client/app/scroll-handler.tsx +32 -12
  35. package/src/client/components/mdx/callout.tsx +1 -1
  36. package/src/client/components/mdx/code-block.tsx +1 -1
  37. package/src/client/components/primitives/breadcrumbs.tsx +1 -1
  38. package/src/client/components/primitives/heading.tsx +1 -1
  39. package/src/client/components/primitives/menu.tsx +1 -1
  40. package/src/client/components/primitives/navbar.tsx +1 -1
  41. package/src/client/components/primitives/page-nav.tsx +1 -1
  42. package/src/client/components/primitives/search-dialog.tsx +1 -1
  43. package/src/client/components/primitives/sidebar.tsx +3 -3
  44. package/src/client/components/ui-base/banner.tsx +1 -1
  45. package/src/client/components/ui-base/breadcrumbs.tsx +1 -1
  46. package/src/client/components/ui-base/copy-markdown.tsx +1 -1
  47. package/src/client/components/ui-base/icons.tsx +240 -0
  48. package/src/client/components/ui-base/navbar.tsx +1 -1
  49. package/src/client/components/ui-base/not-found.tsx +1 -1
  50. package/src/client/components/ui-base/on-this-page.tsx +1 -1
  51. package/src/client/components/ui-base/search-dialog.tsx +1 -1
  52. package/src/client/components/ui-base/sidebar.tsx +2 -2
  53. package/src/client/components/ui-base/tabs.tsx +6 -4
  54. package/src/client/components/ui-base/theme-toggle.tsx +1 -1
  55. package/src/client/components/ui-base/version-i18n.tsx +1 -1
  56. package/src/client/ssg/index.ts +1 -0
  57. package/dist/docs-layout-BlDhcQRv.cjs +0 -6
  58. package/dist/docs-layout-BvAOWEJw.js +0 -6
  59. package/dist/icons-dev-CrQLjoQp.js +0 -6
  60. package/dist/icons-dev-rzdz6Lf3.cjs +0 -6
  61. package/dist/image-BkIfa9oo.js +0 -6
  62. package/dist/image-DIGjCPe6.cjs +0 -6
  63. package/dist/mdx-K0WYBAJ3.js +0 -7
  64. package/dist/mdx-hpErbRUe.cjs +0 -7
  65. package/dist/search-dialog-BACuzoVX.cjs +0 -6
  66. package/dist/search-dialog-BKagVT17.js +0 -6
  67. package/dist/search-dialog-C8w12eUx.js +0 -6
  68. package/dist/search-dialog-D26rUnJ_.cjs +0 -6
  69. /package/dist/{cards-BLoSiRuL.d.ts → cards-BakZPTz9.d.ts} +0 -0
  70. /package/dist/{sidebar-Dr1TiRIy.d.ts → sidebar-CbQtlYiz.d.ts} +0 -0
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./icons-dev-BlV3wWFT.cjs`);let t=require(`react-router-dom`),n=require(`react`);n=e.rt(n);let r=require(`react/jsx-runtime`),i=require(`react-aria-components`);i=e.rt(i);let a=require(`virtual:boltdocs-icons`);a=e.rt(a);let o=require(`scroll-into-view-if-needed`);o=e.rt(o);const s=({children:t,className:n,...a})=>(0,r.jsx)(i.Breadcrumbs,{className:e.y(`flex flex-wrap items-center`,n),...a,children:t});s.Root=s,s.Item=({children:t,className:n,...a})=>(0,r.jsx)(i.Breadcrumb,{className:e.y(`flex items-center`,n),...a,children:t}),s.Link=({children:t,href:n,className:i,...a})=>(0,r.jsx)(e._,{href:n,className:e.y(`cursor-pointer`,i),...a,children:t}),s.Separator=({className:t})=>(0,r.jsx)(e.D,{size:14,className:e.y(`shrink-0`,t)});const c=({...e})=>(0,r.jsx)(i.Button,{...e}),l=({children:t,className:n,vertical:i=!1})=>(0,r.jsx)(`div`,{className:e.y(`inline-flex`,i?`flex-col`:`flex-row`,!i&&[`[&>*:not(:first-child)]:-ml-px`,`[&>*:first-child]:rounded-r-none`,`[&>*:last-child]:rounded-l-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,n?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-l-full`,`[&>*:last-child]:rounded-r-full`],n?.includes(`rounded-xl`)&&[`[&>*:first-child]:rounded-l-xl`,`[&>*:last-child]:rounded-r-xl`],n?.includes(`rounded-lg`)&&[`[&>*:first-child]:rounded-l-lg`,`[&>*:last-child]:rounded-r-lg`]],i&&[`[&>*:not(:first-child)]:-mt-px`,`[&>*:first-child]:rounded-b-none`,`[&>*:last-child]:rounded-t-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,n?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-t-full`,`[&>*:last-child]:rounded-b-full`]],n),children:t}),u=({children:t,className:n,...a})=>(0,r.jsx)(i.Popover,{offset:8,className:e.y(`z-50 overflow-auto outline-none transition-none`,n),...a,children:t});function d({placement:e,className:t,...a}){let[o,s]=n.Children.toArray(a.children).slice(0,2);return(0,r.jsxs)(i.MenuTrigger,{...a,children:[o,(0,r.jsx)(u,{placement:e,className:t,children:s})]})}function f({className:e,...t}){let[a,o]=n.Children.toArray(t.children).slice(0,2);return(0,r.jsxs)(i.SubmenuTrigger,{...t,children:[a,(0,r.jsx)(u,{offset:-4,crossOffset:-4,className:e,children:o})]})}function p(t){return(0,r.jsx)(i.Menu,{...t,className:i.composeRenderProps(t.className,t=>e.y(`outline-none overflow-auto`,t))})}function m(t){let n=t.textValue||(typeof t.children==`string`?t.children:void 0);return(0,r.jsx)(i.MenuItem,{...t,textValue:n,className:i.composeRenderProps(t.className,t=>e.y(`group relative flex flex-row items-center cursor-default outline-none`,t)),children:i.composeRenderProps(t.children,(t,{selectionMode:n,isSelected:i,hasSubmenu:a})=>(0,r.jsxs)(r.Fragment,{children:[n===`multiple`&&(0,r.jsx)(`span`,{className:`flex items-center shrink-0 justify-center`,children:i&&(0,r.jsx)(e.w,{className:`size-3.5`})}),(0,r.jsx)(`div`,{className:`flex flex-row w-full items-center`,children:t}),a&&(0,r.jsx)(e.D,{className:`size-4 ml-auto`})]}))})}function ee({title:t,...n}){return(0,r.jsxs)(i.MenuSection,{...n,className:e.y(`flex flex-col`,n.className),children:[t&&(0,r.jsx)(i.Header,{className:`select-none`,children:t}),(0,r.jsx)(i.Collection,{items:n.items,children:n.children})]})}function te(t){return(0,r.jsx)(i.Separator,{...t,className:e.y(`border-t`,t.className)})}p.Root=p,p.Item=m,p.Trigger=d,p.SubTrigger=f,p.Section=ee,p.Separator=te;var ne=class extends n.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`ErrorBoundary caught an unhandled error:`,e,t)}resetErrorBoundary=()=>{this.props.onReset&&this.props.onReset(),this.setState({hasError:!1,error:null})};render(){let{hasError:e,error:t}=this.state,{children:n,fallback:i,FallbackComponent:a}=this.props;return e&&t?a?(0,r.jsx)(a,{error:t,resetErrorBoundary:this.resetErrorBoundary}):i||(0,r.jsx)(h,{error:t,resetErrorBoundary:this.resetErrorBoundary}):n}};function h({error:e,resetErrorBoundary:t}){return(0,r.jsxs)(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-6 py-8 border border-subtle bg-surface rounded-2xl max-w-lg mx-auto shadow-xs`,children:[(0,r.jsx)(`div`,{className:`text-lg font-bold text-rose-600 dark:text-rose-400`,children:`Something went wrong`}),(0,r.jsx)(`p`,{className:`text-sm text-muted max-w-sm leading-relaxed`,children:e?.message||`An unexpected error occurred while rendering this page.`}),(0,r.jsx)(c,{className:`rounded-xl border border-subtle bg-main px-6 py-2.5 text-xs font-semibold text-body hover:bg-primary-50/50 hover:border-primary-500/50 transition-all duration-300 cursor-pointer outline-none select-none`,onPress:t,children:`Try again`})]})}const g=({children:t,className:n=``,...i})=>(0,r.jsx)(`div`,{className:e.y(`w-full`,n),...i,children:t});g.Root=g,g.List=({children:t,className:n=``})=>(0,r.jsx)(`div`,{role:`tablist`,className:e.y(`relative flex flex-row items-center`,n),children:t}),g.Item=({children:t,id:n,selected:i,className:a=``,...o})=>(0,r.jsx)(`button`,{role:`tab`,"aria-selected":i,"data-selected":i,className:e.y(`outline-none cursor-pointer bg-transparent border-none`,a),...o,children:t}),g.Content=({children:t,className:n=``})=>(0,r.jsx)(`div`,{className:e.y(`outline-none`,n),children:t}),g.Indicator=({className:t=``,style:n})=>(0,r.jsx)(`div`,{className:e.y(`absolute bottom-0`,t),style:n});const _=(0,n.createContext)(void 0);function v({children:e}){let[i,a]=(0,n.useState)(!1),o=(0,t.useLocation)();return(0,n.useEffect)(()=>{a(!1)},[o.pathname]),(0,r.jsx)(_.Provider,{value:{isSidebarOpen:i,toggleSidebar:()=>a(e=>!e),closeSidebar:()=>a(!1)},children:e})}function y(){let e=(0,n.useContext)(_);return e===void 0?{isSidebarOpen:!1,toggleSidebar:()=>{},closeSidebar:()=>{}}:e}function b(e){return e.startsWith(`#`)?e.slice(1):null}var re=class{items=[];single=!1;observer=null;onChange;callback(e){for(let e of this.items){let t=document.getElementById(e.id);if(!t){e.active=!1,e.fallback=!1;continue}let n=t.getBoundingClientRect(),r=typeof window<`u`?window.innerHeight:1e3,i=n.bottom>0&&n.top<r;e.active=i,e.fallback=!i&&n.top>0&&n.top<r*2}if(this.single){let e=-1,t=this.items.map((e,t)=>({item:e,idx:t})).filter(({item:e})=>e.active);if(t.length>0)e=t[0].idx;else{let t=this.items.map((e,t)=>({item:e,idx:t})).filter(({item:e})=>e.fallback);t.length>0?e=t[0].idx:this.items.length>0&&(e=0)}this.items=this.items.map((t,n)=>({...t,active:n===e,t:n===e?Date.now():t.t}))}else this.items=this.items.map((e,t)=>({...e,active:e.active,t:e.active?Date.now():e.t}));this.onChange?.()}setItems(e){let t=this.observer;if(t)for(let e of this.items){let n=document.getElementById(e.id);n&&t.unobserve(n)}this.items=[];for(let t of e){let e=b(t.url);e&&this.items.push({id:e,active:!1,fallback:!1,t:0,original:t})}this.watchItems(),typeof window<`u`&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.watchItems())}watchItems(){if(this.observer)for(let e of this.items){let t=document.getElementById(e.id);t&&this.observer.observe(t)}}unwatch(){this.observer?.disconnect(),this.observer=null}};const x=(0,n.createContext)(null),S=(0,n.createContext)(null);function C(){let e=(0,n.use)(x);if(!e)throw Error(`Component must be used under the <AnchorProvider /> component.`);return e}function w(){let e=C();return(0,n.useMemo)(()=>{let t;for(let n of e)n.active&&(!t||n.t>t.t)&&(t=n);return t?.id},[e])}function T(){let e=C();return(0,n.useMemo)(()=>{let t=[];for(let n of e)n.active&&t.push(n.id);return t},[e])}function E({containerRef:e,children:t}){return(0,r.jsx)(S.Provider,{value:e,children:t})}function D({toc:e,single:t=!1,observerOptions:i,children:a}){let o=(0,n.useMemo)(()=>new re,[]),[s,c]=(0,n.useState)(o.items);return o.single=t,(0,n.useEffect)(()=>{o.setItems(e)},[o,e]),(0,n.useEffect)(()=>{let e={rootMargin:`-80px 0% -60% 0%`,threshold:0},t=i?{...e,...i}:e;return o.watch(t),o.onChange=()=>c([...o.items]),()=>{o.unwatch()}},[o]),(0,r.jsx)(x.Provider,{value:s,children:a})}const O=({children:t,className:n})=>(0,r.jsx)(`nav`,{className:e.y(`sticky top-navbar hidden xl:flex flex-col shrink-0`,`w-toc`,`py-4 pl-6 pr-4`,n),children:t}),k=({children:t,className:n,...i})=>(0,r.jsx)(`div`,{className:e.y(`mb-4 text-xs font-bold text-body`,n),...i,children:t}),A=({children:t,className:i,ref:a,...o})=>{let s=(0,n.useRef)(null);return(0,n.useImperativeHandle)(a,()=>s.current),(0,r.jsx)(`div`,{ref:s,className:e.y(`relative overflow-y-auto boltdocs-otp-content pb-12`,`max-h-[70%]`,i),style:{maskImage:`linear-gradient(to bottom, black 90%, transparent 100%)`,WebkitMaskImage:`linear-gradient(to bottom, black 90%, transparent 100%)`},...o,children:t})};A.displayName=`OnThisPageContent`;const j=({children:t,className:n})=>(0,r.jsx)(`ul`,{className:e.y(`relative space-y-0.5 text-sm border-l border-subtle`,n),children:t}),M=({level:t,children:n,className:i})=>(0,r.jsx)(`li`,{className:e.y(t===3&&`pl-3`,i),children:n}),N=({children:t,href:i,active:a,onClick:s,className:c})=>{let l=(0,n.use)(x),u=(0,n.use)(S),d=i?b(i):null,f=(0,n.useRef)(null),p=a===void 0?d&&l?!!l.find(e=>e.id===d)?.active:!1:a;return(0,n.useEffect)(()=>{p&&f.current&&u?.current&&(0,o.default)(f.current,{behavior:`smooth`,block:`center`,inline:`center`,scrollMode:`if-needed`,boundary:u.current})},[p,u]),(0,r.jsx)(`a`,{ref:f,href:i,onClick:e=>{if(s)s(e);else if(i&&i.startsWith(`#`)){e.preventDefault();let t=i.slice(1),n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,i))}},"data-active":p,className:e.y(`block py-0.5 pl-4 text-[13px] outline-none transition-colors`,p?`text-primary-500`:`text-muted hover:text-body`,c),children:t})},P=({style:t,className:i})=>{let a=(0,n.useRef)(null),[o,s]=(0,n.useState)({opacity:0,...t});return(0,n.useEffect)(()=>{let e=a.current?.parentElement;if(!e)return;let n=e.querySelectorAll(`a[data-active="true"]`);if(n.length>0){let r=n[0],i=n[n.length-1],a=r.getBoundingClientRect(),o=i.getBoundingClientRect(),c=e.getBoundingClientRect(),l=a.top-c.top,u=o.bottom-a.top;s({transform:`translateY(${l}px)`,height:`${u}px`,opacity:1,...t})}else s({opacity:0,...t})},[C(),t]),(0,r.jsx)(`div`,{ref:a,className:e.y(`absolute -left-px w-0.5 rounded-full bg-primary-500`,i),style:{transition:`transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), height 180ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 150ms`,...o}})};function F({headings:e=[],className:t}){let n=T();return e.length===0?null:(0,r.jsxs)(j,{className:t,children:[(0,r.jsx)(P,{}),e.map(e=>(0,r.jsx)(M,{level:e.level,children:(0,r.jsx)(N,{href:`#${e.id}`,active:n.includes(e.id),children:e.text})},e.id))]})}function I({headings:e=[],className:t}){let i=(0,n.useMemo)(()=>e.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[e]),a=(0,n.useRef)(null);return e.length===0?null:(0,r.jsx)(D,{toc:i,single:!1,children:(0,r.jsx)(E,{containerRef:a,children:(0,r.jsx)(A,{ref:a,children:(0,r.jsx)(F,{headings:e,className:t})})})})}O.Root=O,O.Header=k,O.Content=A,O.List=j,O.Item=M,O.Link=N,O.Indicator=P,O.Items=F,O.Tree=I;const L=({children:t,className:n})=>(0,r.jsx)(`nav`,{className:e.y(`grid sm:grid-cols-2 gap-4`,n),children:t});L.Root=L,L.Link=({children:t,to:n,direction:i,className:a})=>{let o=i===`next`;return(0,r.jsxs)(e._,{href:n,className:e.y(`flex items-center outline-none no-underline`,o?`justify-end`:`justify-start`,a),children:[!o&&(0,r.jsx)(e.E,{className:`shrink-0`}),(0,r.jsx)(`div`,{className:`flex flex-col flex-1`,children:t}),o&&(0,r.jsx)(e.D,{className:`shrink-0`})]})},L.Title=({children:t,className:n})=>(0,r.jsx)(`span`,{className:e.y(n),children:t}),L.Description=({children:t,className:n})=>(0,r.jsx)(`span`,{className:e.y(`truncate`,n),children:t}),L.Icon=({children:e})=>(0,r.jsx)(r.Fragment,{children:e});function R(r){let i=e.nt(),a=e.Z((0,t.useLocation)().pathname);return(0,n.useMemo)(()=>{let t=r.find(t=>e.Z(t.path)===a),n=t?.tab?.toLowerCase(),o=n?r.filter(e=>!e.tab||e.tab.toLowerCase()===n):r,s={};if(i.directoryMeta)for(let[e,t]of Object.entries(i.directoryMeta)){let n=e.split(`/`).filter(e=>!e.startsWith(`(`)||!e.endsWith(`)`)).map(e=>e.replace(/^\d+-/,``)).join(`/`);s[n===``?`.`:n]=t}let c=e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g,` `),l=new Map,u=[],d=(e,t)=>{let n=t,r=``,i=null;for(let t=0;t<e.length;t++){let a=e[t],o=r?`${r}/${a}`:a;if(!n.has(a)){let e=s[o]||{},t={path:`#`,title:e.title||c(a),componentPath:``,filePath:``,icon:e.icon,groupPosition:typeof e.order==`number`?e.order:999,subRoutes:[]};n.set(a,t)}i=n.get(a),i._subMap||=new Map,n=i._subMap,r=o}return i},f=[...o].sort((e,t)=>(e.sidebarPosition??e.order??999)-(t.sidebarPosition??t.order??999));for(let e of f){if(e.sidebarHidden)continue;let t=e.slugParts||[],n=e.filePath.split(`/`).pop()||``,r=/^index\.mdx?$/.test(n);if(t.length===0){e.filePath&&u.push(e);continue}if(r){let n=d(t,l);n&&(n.path=e.path,n.title=e.title||n.title,n.icon=e.icon||n.icon,n.badge=e.badge,n.sidebarPosition=e.sidebarPosition,n.frontmatter=e.frontmatter)}else{let n=d(t,l);n&&n.subRoutes.push(e)}}let p=(e,t=``)=>(e.forEach(e=>{if(e._subMap){let t=Array.from(e._subMap.values());e.subRoutes=[...e.subRoutes||[],...t],delete e._subMap}e.subRoutes&&e.subRoutes.length>0&&(e.subRoutes=p(e.subRoutes))}),e.sort((e,t)=>{let n=e.sidebarPosition??e.groupPosition??999,r=t.sidebarPosition??t.groupPosition??999;return n===r?e.title.localeCompare(t.title):n-r})),m=p(Array.from(l.values()));return m.map(e=>({slug:e.title.toLowerCase().replace(/\s+/g,`-`),title:e.title,icon:e.icon,routes:[e]})),{groups:m.map(e=>e.subRoutes&&e.subRoutes.length>0?{slug:e.title.toLowerCase().replace(/\s+/g,`-`),title:e.title,icon:e.icon,routes:e.subRoutes}:(u.push(e),null)).filter(Boolean),ungrouped:p(u),activeRoute:t,activePath:a,config:i}},[r,i,a])}let z=0;function B(t){if(!t)return;let n={...e.Y,...a.default};return n[t]||n[t+`Icon`]||void 0}const V=({badge:t})=>{let n={new:`bg-primary-500/10 text-primary-500 border border-primary-500/20`,updated:`bg-emerald-500/10 text-emerald-500 border border-emerald-500/20`,deprecated:`bg-danger-500/10 text-danger-500 border border-danger-500/20`},i=typeof t==`string`?t:t?.text;return i?(0,r.jsx)(`span`,{className:e.y(`ml-auto flex h-5 items-center rounded-md text-[10px] font-bold px-1.5 py-0.5 uppercase tracking-wider`,n[i]||n.new),children:i}):null};function H({children:t,className:n}){return(0,r.jsx)(`aside`,{className:e.y(`hidden lg:flex flex-col w-sidebar sticky top-navbar h-[calc(100vh-var(--spacing-navbar))] border-r border-subtle bg-main`,n),children:t})}function U({children:t,className:n}){let{isSidebarOpen:a,closeSidebar:o}=y();return(0,r.jsx)(i.ModalOverlay,{isOpen:a,onOpenChange:e=>!e&&o(),isDismissable:!0,className:e.y(`fixed inset-0 z-50 bg-black/20 backdrop-blur-sm lg:hidden`,`entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out duration-300`),children:(0,r.jsx)(i.Modal,{className:e.y(`fixed top-0 left-0 bottom-0 w-80 bg-main border-r border-subtle shadow-2xl outline-none`,`entering:animate-in entering:slide-in-from-left exiting:animate-out exiting:slide-out-to-left duration-300`,n),children:(0,r.jsx)(i.Dialog,{className:`h-full focus:outline-none outline-none flex flex-col`,children:t})})})}function W({children:t,className:n}){return(0,r.jsx)(`div`,{className:e.y(`flex items-center justify-between p-4 border-b border-subtle`,n),children:t})}function G({children:t,className:i}){let a=(0,n.useRef)(null);return(0,n.useLayoutEffect)(()=>{a.current&&(a.current.scrollTop=z)},[]),(0,n.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{z=e.scrollTop};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[]),(0,r.jsx)(`div`,{ref:a,className:e.y(`flex-1 overflow-y-auto p-4 pb-16 custom-scrollbar`,i),children:(0,r.jsx)(`nav`,{className:`flex flex-col gap-6`,children:t})})}const K=({title:e,icon:t,children:n,className:i})=>(0,r.jsxs)(`div`,{className:i,children:[e&&(0,r.jsxs)(`h4`,{className:`px-2 mb-2 flex items-center gap-2 text-[11px] font-bold uppercase tracking-widest text-muted/50`,children:[t&&(0,r.jsx)(t,{size:12}),e]}),(0,r.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:n})]}),q=({label:t,href:n,active:i,icon:a,badge:o,className:s})=>(0,r.jsxs)(e._,{href:n,className:e.y(`group flex items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-sm transition-all outline-none`,i?`bg-primary-500/10 text-primary-500 font-medium shadow-sm`:`text-muted hover:bg-surface hover:text-body`,s),children:[a&&(0,r.jsx)(a,{size:16,className:e.y(i?`text-primary-500`:`text-muted group-hover:text-body`)}),(0,r.jsx)(`span`,{className:`truncate`,children:t}),o&&(0,r.jsx)(V,{badge:o})]}),J=({label:t,href:n,active:i,icon:a,badge:o,isOpen:s,onToggle:c,children:l,className:u})=>(0,r.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,r.jsxs)(`div`,{className:`group relative flex items-center`,children:[(0,r.jsx)(q,{label:t,href:n,active:i,icon:a,badge:o,className:e.y(`flex-1 pr-8`,u)}),(0,r.jsx)(`button`,{onClick:e=>{e.preventDefault(),e.stopPropagation(),c()},className:`absolute right-1 p-1.5 text-muted hover:text-body transition-colors outline-none cursor-pointer`,children:(0,r.jsx)(e.D,{size:14,className:e.y(`transition-transform duration-200`,s&&`rotate-90`)})})]}),s&&(0,r.jsx)(`div`,{className:`ml-4 pl-3 border-l border-subtle/50 mt-0.5 flex flex-col gap-0.5`,children:l})]});function Y({route:t,activePath:i,className:a}){let o=e.b(t.path),s=i===(o.endsWith(`/`)?o.slice(0,-1):o),c=!!t.routes?.length||!!t.subRoutes?.length,l=t.routes||t.subRoutes,[u,d]=(0,n.useState)(()=>i.startsWith(o)),[f,p]=(0,n.useState)(i);return i!==f&&(p(i),i.startsWith(o)&&d(!0)),c?(0,r.jsx)(J,{label:t.title,href:t.path,active:s,icon:B(t.icon),badge:t.badge,isOpen:u,onToggle:()=>d(!u),className:a,children:l?.map(e=>(0,r.jsx)(Y,{route:e,activePath:i},e.path))}):(0,r.jsx)(q,{label:t.title,href:t.path,active:s,icon:B(t.icon),badge:t.badge,className:a})}function X({routes:t,className:n}){let{groups:i,ungrouped:a,activePath:o}=R(t);return(0,r.jsxs)(`div`,{className:e.y(`flex flex-col gap-6`,n),children:[a.length>0&&(0,r.jsx)(K,{children:a.map(e=>(0,r.jsx)(Y,{route:e,activePath:o},e.path))}),i.map(e=>(0,r.jsx)(K,{title:e.title,icon:B(e.icon),children:e.routes.map(e=>(0,r.jsx)(Y,{route:e,activePath:o},e.path))},e.title))]})}const ie=Object.assign(H,{Root:H,Mobile:U,Header:W,Content:G,Group:K,Link:q,SubGroup:J,Item:Y,Items:X}),Z=()=>(0,t.useLocation)();function Q(e=`.boltdocs-page`){let{search:t}=Z(),r=new URLSearchParams(t).get(`hl`);(0,n.useEffect)(()=>{if(!r){$(e);return}let t=document.querySelector(e);if(!t)return;let n,i=new MutationObserver(e=>{e.some(e=>{let t=Array.from(e.addedNodes),n=Array.from(e.removedNodes);return t.some(e=>!(e instanceof HTMLElement&&e.hasAttribute(`data-search-highlight`)))||n.some(e=>!(e instanceof HTMLElement&&e.hasAttribute(`data-search-highlight`)))})&&a()});function a(){cancelAnimationFrame(n),n=requestAnimationFrame(()=>{i.disconnect(),$(e);let n=r.split(/\s+/).map(e=>e.trim()).filter(e=>e.length>=2);n.length>0&&ae(t,n),i.observe(t,{childList:!0,subtree:!0})})}return a(),()=>{cancelAnimationFrame(n),i.disconnect(),$(e)}},[r,t,e])}function $(e){document.querySelectorAll(`${e} mark[data-search-highlight]`).forEach(e=>{try{let t=e.parentNode;if(t&&t.contains(e)){let n=e.textContent||``;t.replaceChild(document.createTextNode(n),e)}}catch{}})}function ae(e,t){let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>{let t=e.parentElement;return t&&(t.tagName===`SCRIPT`||t.tagName===`STYLE`||t.tagName===`MARK`||t.closest(`pre`)||t.closest(`code`))?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=[],i;for(;i=n.nextNode();)r.push(i);let a={a:`[aáàäâã]`,e:`[eéèëê]`,i:`[iíìïî]`,o:`[oóòöôõ]`,u:`[uúùüû]`,n:`[nñ]`,c:`[cç]`},o=e=>{let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return t=t.split(``).map(e=>a[e.toLowerCase()]||e).join(``),t},s=t.map(o).join(`|`),c=RegExp(`(${s})`,`gi`),l=t.map(e=>{let t=o(e);return RegExp(`^${t}$`,`i`)});r.forEach(e=>{let t=e.textContent;if(t&&c.test(t)){let n=document.createDocumentFragment();t.split(c).forEach(e=>{if(l.some(t=>t.test(e))){let t=document.createElement(`mark`);t.textContent=e,t.setAttribute(`data-search-highlight`,`true`),n.appendChild(t)}else e&&n.appendChild(document.createTextNode(e))}),e.parentNode&&e.parentNode.replaceChild(n,e)}})}function oe(){return Q(`.boltdocs-page`),null}function se({children:t,className:n,style:i}){return(0,r.jsx)(`div`,{className:e.y(`h-screen flex flex-col overflow-hidden bg-main text-body`,n),style:i,children:t})}function ce({children:t,className:n,style:i}){return(0,r.jsx)(`div`,{className:e.y(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-main overflow-hidden`,n),style:i,children:t})}function le({children:t,className:n,style:i}){return(0,r.jsx)(`main`,{className:e.y(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,n),style:i,children:t})}function ue({children:t,className:n,style:i}){return(0,r.jsxs)(`div`,{className:e.y(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,n),style:i,children:[(0,r.jsx)(oe,{}),t]})}function de({children:t,className:n,style:i}){return(0,r.jsx)(`header`,{className:e.y(`mb-10`,n),style:i,children:t})}function fe({children:t,className:n,style:i}){return(0,r.jsx)(`div`,{className:e.y(`mt-20`,n),style:i,children:t})}const pe=Object.assign(se,{Body:ce,Content:le,ContentMdx:ue,Header:de,Footer:fe});Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return I}});
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{useLocation as e,useNavigate as t}from"react-router-dom";import{createContext as n,use as r,useEffect as i,useMemo as a,useState as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import{clsx as u}from"clsx";import{twMerge as d}from"tailwind-merge";var f=Object.defineProperty,p=(e,t)=>{let n={};for(var r in e)f(n,r,{get:e[r],enumerable:!0});return t||f(n,Symbol.toStringTag,{value:`Module`}),n};const m=Symbol.for(`__BDOCS_CONFIG_CONTEXT__`),h=Symbol.for(`__BDOCS_CONFIG_INSTANCE__`),g=globalThis[m]||(globalThis[m]=n(null));function _(){let e=r(g);if(!e&&typeof globalThis<`u`&&globalThis[h])return globalThis[h];if(!e)throw Error(`useConfig must be used within a ConfigProvider`);return e}const v=n({routes:[]});function y(){return r(v)}function b({routes:e,children:t}){return c(v.Provider,{value:{routes:e},children:t})}const x=`boltdocs-user-preferences`,S=Symbol.for(`__BDOCS_BOLTDOCS_CONTEXT__`),C=Symbol.for(`__BDOCS_BOLTDOCS_INSTANCE__`),w=globalThis[S]||(globalThis[S]=n(void 0));function ee({children:e,initialLocale:t=``,initialVersion:n=``}){let r=()=>{if(typeof window>`u`)return{};try{let e=localStorage.getItem(x);return e?JSON.parse(e):{}}catch{return{}}},[s,l]=o(()=>t||r().locale||``),[u,d]=o(()=>n||r().version||``),[f,p]=o(()=>typeof window<`u`);i(()=>{p(!0)},[]);let m=a(()=>({currentLocale:s,currentVersion:u,setLocale:e=>{let t=e||``;if(l(t),typeof window<`u`)try{let e=r();localStorage.setItem(x,JSON.stringify({...e,locale:t}))}catch{}},setVersion:e=>{let t=e||``;if(d(t),typeof window<`u`)try{let e=r();localStorage.setItem(x,JSON.stringify({...e,version:t}))}catch{}},hasHydrated:f,setHasHydrated:p}),[s,u,f]);return typeof globalThis<`u`&&(globalThis[C]=m),c(w.Provider,{value:m,children:e})}function te(){let e=r(w);if(!e&&typeof globalThis<`u`&&globalThis[C])return globalThis[C];if(!e)throw Error(`useBoltdocsContext must be used within a BoltdocsProvider`);return e}function T(e){return e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e}function ne(){let{routes:t}=y(),n=_(),r=e(),{hasHydrated:i,currentLocale:o,currentVersion:s}=te(),c=T(r.pathname),l=t?.find?.(e=>T(e.path)===c),u=n.i18n?o||n.i18n.defaultLocale:void 0,d=n.versions?s||n.versions.defaultVersion:void 0;return{routes:a(()=>{if(!t)return[];let e=new Map,r=n.i18n?.defaultLocale||``,i=n.versions?.defaultVersion||``;for(let n of t){let t=n.locale||r,a=n.version||i,o=`${n.filePath}::${t}::${a}`;e.set(o,(e.get(o)||0)+1)}return t.filter(t=>{let a=n.i18n?(t.locale||n.i18n.defaultLocale)===u:!0,o=n.versions?(t.version||n.versions.defaultVersion)===d:!0;if(!(a&&o))return!1;let s=!!l?.locale,c=!!l?.version,f=!!t.locale,p=!!t.version,m=t.locale||r,h=t.version||i,g=`${t.filePath}::${m}::${h}`;if((e.get(g)||0)>1){let e=n.i18n&&s!==f,t=n.versions&&c!==p;if(e||t)return!1}return!0})},[t,n,u,d,l]),allRoutes:t,currentRoute:l,currentLocale:u,currentVersion:d}}var re=p({AlertCircle:()=>A,AlertTriangle:()=>k,ArrowLeft:()=>P,Check:()=>M,ChevronDown:()=>z,ChevronLeft:()=>Z,ChevronRight:()=>Y,CircleHelp:()=>I,Copy:()=>j,CornerDownLeft:()=>oe,ExternalLink:()=>R,File:()=>N,FileText:()=>ae,Hash:()=>ie,Home:()=>B,Info:()=>D,Languages:()=>G,Lightbulb:()=>O,Link:()=>J,Menu:()=>K,Monitor:()=>W,Moon:()=>U,MoreVertical:()=>X,Pencil:()=>F,Search:()=>V,Sun:()=>H,TextAlignStart:()=>L,X:()=>q});function E(e,t,n=`0 0 24 24`){let r=({size:e=24,className:r,...i})=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:n,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:r,...i,children:t});return r.displayName=e,r}const D=E(`Info`,l(s,{children:[c(`circle`,{cx:`12`,cy:`12`,r:`10`}),c(`path`,{d:`M12 16v-4`}),c(`path`,{d:`M12 8h.01`})]})),O=E(`Lightbulb`,l(s,{children:[c(`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A5 5 0 0 0 8 8c0 1 .3 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`}),c(`path`,{d:`M9 18h6`}),c(`path`,{d:`M10 22h4`})]})),k=E(`AlertTriangle`,l(s,{children:[c(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}),c(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),c(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]})),A=E(`AlertCircle`,l(s,{children:[c(`circle`,{cx:`12`,cy:`12`,r:`10`}),c(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),c(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]})),j=E(`Copy`,l(s,{children:[c(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),c(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})),M=E(`Check`,c(`path`,{d:`M20 6 9 17l-5-5`})),N=E(`File`,l(s,{children:[c(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),c(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`})]})),P=E(`ArrowLeft`,l(s,{children:[c(`path`,{d:`m12 19-7-7 7-7`}),c(`path`,{d:`M19 12H5`})]})),F=E(`Pencil`,l(s,{children:[c(`path`,{d:`M12 20h9`}),c(`path`,{d:`M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z`})]})),I=E(`CircleHelp`,l(s,{children:[c(`circle`,{cx:`12`,cy:`12`,r:`10`}),c(`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}),c(`path`,{d:`M12 17h.01`})]})),L=E(`TextAlignStart`,l(s,{children:[c(`line`,{x1:`21`,x2:`3`,y1:`6`,y2:`6`}),c(`line`,{x1:`15`,x2:`3`,y1:`12`,y2:`12`}),c(`line`,{x1:`17`,x2:`3`,y1:`18`,y2:`18`})]})),R=E(`ExternalLink`,l(s,{children:[c(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),c(`polyline`,{points:`15 3 21 3 21 9`}),c(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})),z=E(`ChevronDown`,c(`path`,{d:`m6 9 6 6 6-6`})),B=E(`Home`,l(s,{children:[c(`path`,{d:`m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`}),c(`polyline`,{points:`9 22 9 12 15 12 15 22`})]})),V=E(`Search`,l(s,{children:[c(`circle`,{cx:`11`,cy:`11`,r:`8`}),c(`path`,{d:`m21 21-4.3-4.3`})]})),H=E(`Sun`,l(s,{children:[c(`circle`,{cx:`12`,cy:`12`,r:`4`}),c(`path`,{d:`M12 2v2`}),c(`path`,{d:`M12 20v2`}),c(`path`,{d:`m4.93 4.93 1.41 1.41`}),c(`path`,{d:`m17.66 17.66 1.41 1.41`}),c(`path`,{d:`M2 12h2`}),c(`path`,{d:`M20 12h2`}),c(`path`,{d:`m6.34 17.66-1.41 1.41`}),c(`path`,{d:`m19.07 4.93-1.41 1.41`})]})),U=E(`Moon`,c(`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`})),W=E(`Monitor`,l(s,{children:[c(`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}),c(`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}),c(`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`})]})),G=E(`Languages`,l(s,{children:[c(`path`,{d:`m5 8 6 6`}),c(`path`,{d:`m4 14 6-6 2-3`}),c(`path`,{d:`M2 5h12`}),c(`path`,{d:`M7 2h1`}),c(`path`,{d:`m22 22-5-10-5 10`}),c(`path`,{d:`M14 18h6`})]})),K=E(`Menu`,l(s,{children:[c(`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`}),c(`line`,{x1:`4`,x2:`20`,y1:`6`,y2:`6`}),c(`line`,{x1:`4`,x2:`20`,y1:`18`,y2:`18`})]})),q=E(`X`,l(s,{children:[c(`path`,{d:`M18 6 6 18`}),c(`path`,{d:`m6 6 12 12`})]})),J=E(`Link`,l(s,{children:[c(`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}),c(`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`})]})),Y=E(`ChevronRight`,c(`path`,{d:`m9 18 6-6-6-6`})),X=E(`MoreVertical`,l(s,{children:[c(`circle`,{cx:`12`,cy:`12`,r:`1`}),c(`circle`,{cx:`12`,cy:`5`,r:`1`}),c(`circle`,{cx:`12`,cy:`19`,r:`1`})]})),Z=E(`ChevronLeft`,c(`path`,{d:`m15 18-6-6 6-6`})),ie=E(`Hash`,l(s,{children:[c(`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}),c(`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}),c(`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}),c(`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`})]})),ae=E(`FileText`,l(s,{children:[c(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),c(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`}),c(`path`,{d:`M10 9H8`}),c(`path`,{d:`M16 13H8`}),c(`path`,{d:`M16 17H8`})]})),oe=E(`CornerDownLeft`,l(s,{children:[c(`polyline`,{points:`9 10 4 15 9 20`}),c(`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`})]}));function Q(e){let t=_(),{currentLocale:n,currentVersion:r,allRoutes:i}=ne();if(!t||typeof e!=`string`)return e;if(e.startsWith(`http`)||e.startsWith(`//`)||e.startsWith(`#`)||e.startsWith(`site:`))return e.replace(`site:`,``);let[a,o]=e.split(/([?#].*)/s),s=a.endsWith(`/`)&&a.length>1?a.slice(0,-1):a,c=i?.some(e=>(e.path.endsWith(`/`)&&e.path.length>1?e.path.slice(0,-1):e.path)===(s||`/`)),l=t.i18n,u=t.versions,d=(t.base||`/docs`).replace(/\/$/,``),f=d.startsWith(`/`)?d.substring(1):d,p=a.split(`/`).filter(Boolean),m=f&&p.length>0&&p[0]===f||!c&&p.length>0,h=[...p],g=0;f&&h[g]===f&&g++,u&&h.length>g&&u.versions.find(e=>e.path===h[g])&&g++,l&&h.length>g&&(Array.isArray(l.locales)?l.locales.includes(h[g]):h[g]in l.locales)&&g++;let v=h.slice(g),y=[];m?(f&&y.push(f),u&&r&&y.push(r),l&&n&&y.push(n)):l&&n&&y.push(n),y.push(...v);let b=`/${y.join(`/`)}`;return a.endsWith(`/`)&&a.length>1&&!b.endsWith(`/`)&&(b+=`/`),(b||`/`)+(o||``)}function se(...e){return d(u(e))}const ce=e=>{let{href:n,onMouseEnter:r,onFocus:i,onClick:a,...o}=e,s=t(),l=Q(n??``),u=e=>{a?.(e),!e.defaultPrevented&&(l&&(l.startsWith(`http://`)||l.startsWith(`https://`)||l.startsWith(`//`))||(e.preventDefault(),s(l)))},d=e=>{r?.(e)},f=e=>{i?.(e)};return c(`a`,{...o,href:l,onClick:u,onMouseEnter:d,onFocus:f})},le=t=>{let{href:n,end:r=!1,className:i,children:a,...o}=t,s=e(),l=Q(n??``),u=r?s.pathname===l:s.pathname.startsWith(l),d=typeof i==`function`?i({isActive:u}):se(i,u&&`active`),f=typeof a==`function`?a({isActive:u}):a;return c(ce,{...o,href:n,className:d,children:f})};function $(e){let{size:t=20,...n}=e;return{...n,width:t,height:t}}const ue=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...$(e),children:[c(`title`,{children:`GitHub`}),c(`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`})]}),de=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`CSV`}),l(`mask`,{id:`a`,maskUnits:`userSpaceOnUse`,x:`3`,y:`3`,width:`18`,height:`18`,fill:`#000`,children:[c(`path`,{fill:`#fff`,d:`M3 3h18v18H3z`}),c(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.8889 5H8.11111C6.39289 5 5 6.39289 5 8.11111v7.77779C5 17.6071 6.39289 19 8.11111 19h7.77779C17.6071 19 19 17.6071 19 15.8889V8.11111C19 6.39289 17.6071 5 15.8889 5Zm0 12.4444H8.1111c-.05369 0-.10674-.0027-.15904-.008.0523.0053.10536.008.15905.008h7.77779Zm1.5555-1.5555c0 .8054-.6121 1.4679-1.3965 1.5475.7844-.0797 1.3965-.7421 1.3965-1.5475V8.11111v7.77779Z`})]}),c(`path`,{d:`M15.8889 19.4444c1.1046 0 2-.8954 2-2 0-1.1045-.8954-2-2-2v4Zm-7.7778-2 .00001-2H8.1111v2Zm-.15904-.008.20206-1.9898c-1.09891-.1115-2.08022.6888-2.19182 1.7877-.1116 1.099.68877 2.0803 1.78768 2.1919l.20208-1.9898Zm8.09584 0-.2021-1.9897c-1.0989.1116-1.8992 1.0929-1.7876 2.1918.1116 1.0989 1.0929 1.8993 2.1918 1.7877l-.2021-1.9898Zm3.3965-9.32529c0-1.10457-.8954-2-2-2-1.1045 0-2 .89543-2 2h4ZM8.11111 7h7.77779V3H8.11111v4ZM7 8.11111C7 7.49746 7.49746 7 8.11111 7V3C5.28832 3 3 5.28832 3 8.11111h4Zm0 7.77779V8.11111H3v7.77779h4ZM8.11111 17C7.49746 17 7 16.5025 7 15.8889H3C3 18.7117 5.28832 21 8.11111 21v-4Zm7.77779 0H8.11111v4h7.77779v-4ZM17 15.8889C17 16.5025 16.5025 17 15.8889 17v4C18.7117 21 21 18.7117 21 15.8889h-4Zm0-7.77779v7.77779h4V8.11111h-4ZM15.8889 7C16.5025 7 17 7.49746 17 8.11111h4C21 5.28832 18.7117 3 15.8889 3v4Zm0 8.4444H8.11111l-.00001 4h7.7778v-4Zm-7.7778 0c.01378 0 .02816.0007.04302.0022l-.40411 3.9796c.11944.0121.23994.0182.36109.0182v-4Zm-.36112 3.9818c.11935.0121.23985.0182.36113.0182v-4c.01389 0 .02828.0008.04304.0022l-.40417 3.9796Zm.36113.0182h7.77779v-4H8.11111v4Zm8.13889-.0182c1.7951-.1823 3.1944-1.6951 3.1944-3.5373h-4c0-.2314.1752-.4193.4015-.4423l.4041 3.9796Zm-.8056-3.5373c0-.2314.1752-.4193.4014-.4422l.4042 3.9795c1.795-.1823 3.1944-1.6951 3.1944-3.5373h-4Zm0-7.77779v7.77779h4V8.11111h-4Zm4 0c0-.07155-.0038-.14596-.0124-.22267-.0086-.07678-.0218-.15478-.0403-.23343-.0184-.07869-.0416-.15651-.0697-.233-.0281-.07648-.0604-.15005-.0963-.22045-.036-.07036-.0749-.13629-.1158-.1978-.0408-.06145-.0832-.11775-.1258-.16912-.085-.10251-.1704-.18478-.2468-.2495-.0383-.03245-.0749-.061-.1089-.08594-.034-.02494-.0659-.04672-.0949-.06556-.029-.01883-.0558-.03518-.0797-.04914-.0239-.01396-.0456-.02598-.0644-.03606-.0188-.01008-.0355-.01864-.0493-.02558-.0139-.00694-.0257-.01268-.0348-.01701-.009-.00429-.0163-.00769-.0207-.00971-.0022-.00104-.004-.00187-.0051-.00238-.0006-.00025-.001-.00046-.0013-.00059-.0002-.00006-.0003-.00011-.0003-.00014-.0001-.00001-.0001-.00003-.0001-.00004v-.00001c-.0006-.00027.0028.00131.0068.00316.0044.00202.0117.00541.0207.00971.0091.00433.0209.01007.0348.01701.0138.00694.0305.0155.0493.02558.0188.01008.0405.0221.0644.03606.0239.01396.0507.03031.0797.04914.029.01883.0609.04062.0949.06556.0339.02494.0706.05349.1089.08594.0764.06472.1618.14698.2468.24949.0426.05138.085.10768.1258.16913.0409.06151.0798.12744.1157.19779.036.07041.0683.14397.0964.22046.028.07648.0513.15431.0697.23299.0185.07865.0317.15665.0403.23344.0086.07671.0124.15112.0124.22267h-4c0 .07154.0039.14595.0125.22267.0086.07678.0218.15478.0402.23343.0185.07868.0417.15651.0698.233.0281.07648.0604.15005.0963.22045.036.07036.0749.13629.1158.1978.0408.06144.0832.11775.1258.16912.0849.10251.1704.18478.2468.2495.0383.03244.0749.061.1089.08594.0339.02493.0658.04672.0949.06556.029.01883.0558.03517.0797.04914.0239.01396.0456.02598.0644.03606.0188.01007.0354.01864.0493.02558.0139.00693.0257.01268.0348.01701.009.00429.0163.00769.0207.00971.0022.00104.004.00187.0051.00237.0006.00026.001.00047.0013.00059.0001.00007.0003.00012.0003.00015.0001.00001.0001.00003.0001.00004v.00001c.0006.00026-.0028-.00131-.0068-.00316-.0044-.00202-.0117-.00542-.0207-.00971-.0091-.00433-.0209-.01008-.0348-.01701-.0139-.00694-.0305-.01551-.0493-.02558-.0188-.01008-.0405-.0221-.0644-.03606-.0239-.01396-.0507-.03031-.0797-.04914-.029-.01884-.061-.04062-.0949-.06556-.034-.02494-.0706-.0535-.1089-.08594-.0764-.06472-.1619-.14699-.2468-.2495-.0426-.05137-.085-.10767-.1258-.16912-.0409-.06151-.0798-.12744-.1158-.1978-.0359-.0704-.0682-.14397-.0963-.22045-.0281-.07649-.0513-.15431-.0698-.233-.0184-.07865-.0316-.15665-.0402-.23343-.0086-.07671-.0125-.15112-.0125-.22267h4Zm0 7.77779V8.11111h-4v7.77779h4Z`,fill:`#14B8A6`,mask:`url(#a)`}),c(`rect`,{x:`7`,y:`7`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),c(`rect`,{x:`7`,y:`11`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),c(`rect`,{x:`7`,y:`15`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),c(`rect`,{x:`13`,y:`7`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),c(`rect`,{x:`13`,y:`11`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),c(`rect`,{x:`13`,y:`15`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`})]}),fe=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...$(e),children:[c(`title`,{children:`Discord`}),c(`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`})]}),pe=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...$(e),children:[c(`title`,{children:`X`}),c(`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`})]}),me=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...$(e),children:[c(`title`,{children:`Bluesky`}),c(`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`})]}),he=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`TypeScript`}),c(`path`,{fill:`#2563EB`,d:`M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z`})]}),ge=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`JavaScript`}),c(`path`,{fill:`#F59E0B`,d:`M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z`})]}),_e=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`JSON`}),c(`path`,{fill:`#F59E0B`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),ve=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`CSS`}),c(`path`,{fill:`#0EA5E9`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),ye=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`HTML`}),c(`path`,{fill:`#EA580C`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),be=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`React`}),c(`path`,{fill:`#0E8ADC`,d:`M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z`}),c(`path`,{stroke:`#0E8ADC`,d:`M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z`}),c(`path`,{stroke:`#0E8ADC`,d:`M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z`}),c(`path`,{stroke:`#0E8ADC`,d:`M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z`})]}),xe=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`Markdown`}),c(`path`,{fill:`#60A5FA`,d:`M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z`})]}),Se=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...$(e),children:[c(`title`,{children:`Shell`}),c(`path`,{stroke:`#14B8A6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M4.336 17l6-6-6-6M12.336 19h8`})]}),Ce=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`YAML`}),c(`path`,{fill:`#A78BFA`,d:`M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z`})]}),we=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...$(e),children:[c(`title`,{children:`Rust`}),c(`path`,{fill:`#EA580C`,fillRule:`evenodd`,d:`M12.58 2.136a.287.287 0 00-.488 0l-.526.85a8.974 8.974 0 00-.232.022l-.683-.73a.287.287 0 00-.478.096l-.35.935c-.075.021-.15.044-.224.067l-.812-.583a.287.287 0 00-.45.187l-.162.989a9.088 9.088 0 00-.204.11l-.913-.417a.287.287 0 00-.406.272l.036 1.005a9.099 9.099 0 00-.175.144l-.98-.231a.287.287 0 00-.345.345l.231.98a9.125 9.125 0 00-.144.175L4.27 6.316a.287.287 0 00-.271.406l.416.913a9.036 9.036 0 00-.11.203L3.317 8a.287.287 0 00-.187.45l.584.813a8.953 8.953 0 00-.068.223l-.935.35a.287.287 0 00-.095.479l.73.682a8.966 8.966 0 00-.023.233l-.85.526a.287.287 0 000 .488l.85.526c.007.078.014.156.023.233l-.73.682a.287.287 0 00.095.479l.935.35.068.223-.584.812a.287.287 0 00.187.451l.99.162c.035.068.072.135.109.203l-.416.913a.287.287 0 00.271.406l1.006-.036c.047.059.095.117.143.174l-.23.981a.287.287 0 00.344.345l.981-.23c.057.048.115.095.174.142l-.036 1.006a.287.287 0 00.406.272l.914-.417c.067.038.135.074.203.11l.161.99a.287.287 0 00.451.186l.813-.584c.074.024.148.046.223.068l.35.935a.287.287 0 00.478.095l.683-.73c.077.01.154.017.232.023l.526.85a.287.287 0 00.489 0l.526-.85c.078-.006.155-.014.232-.023l.682.73a.287.287 0 00.479-.095l.35-.935c.075-.022.15-.044.223-.068l.813.584a.287.287 0 00.45-.187l.162-.99a8.77 8.77 0 00.203-.109l.913.417a.287.287 0 00.406-.272l-.035-1.006c.058-.047.116-.094.174-.143l.98.231a.287.287 0 00.346-.345l-.231-.98.143-.175 1.006.036a.287.287 0 00.271-.406l-.416-.913a9.4 9.4 0 00.109-.203l.99-.162a.287.287 0 00.187-.45l-.584-.813a8.43 8.43 0 00.067-.223l.935-.35a.287.287 0 00.096-.479l-.73-.682c.009-.077.016-.155.023-.233l.85-.526a.287.287 0 000-.488l-.85-.526a8.844 8.844 0 00-.023-.233l.73-.682a.287.287 0 00-.096-.479l-.934-.35a9.246 9.246 0 00-.068-.223l.584-.812A.287.287 0 0021.357 8l-.99-.162a8.92 8.92 0 00-.11-.203l.417-.913a.287.287 0 00-.271-.406l-1.006.036a9.178 9.178 0 00-.143-.174l.23-.981a.287.287 0 00-.345-.345l-.98.23a9.43 9.43 0 00-.174-.142l.035-1.006a.287.287 0 00-.405-.272l-.914.417a9.11 9.11 0 00-.203-.11l-.162-.99a.287.287 0 00-.45-.186l-.813.584a9.088 9.088 0 00-.223-.068l-.35-.935a.287.287 0 00-.479-.095l-.682.73a9.062 9.062 0 00-.232-.023l-.526-.85zm-.257 1.62a.592.592 0 01.578.596.595.595 0 11-.578-.595zm1.363.98A7.324 7.324 0 0118.7 8.309l-.702 1.585a.547.547 0 00.275.717l1.352.6c.041.422.047.847.015 1.27h-.752c-.075 0-.106.05-.106.123v.344c0 .812-.457.99-.859 1.034-.383.044-.806-.161-.86-.394-.22-1.24-.583-1.526-1.152-1.975l-.041-.033c.736-.467 1.502-1.158 1.502-2.08 0-.998-.683-1.625-1.148-1.934-.655-.43-1.379-.516-1.574-.516H6.88a7.324 7.324 0 014.098-2.312l.916.96a.54.54 0 00.766.018l1.026-.978zm-8.46 4.407a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm14.192.026a.595.595 0 11-.035 1.19.595.595 0 01.035-1.19zm-13.07.096h1.037v4.678H5.291a7.324 7.324 0 01-.237-2.797l1.282-.57a.542.542 0 00.276-.716l-.264-.595zm4.33.05h2.47c.128 0 .901.147.901.727 0 .48-.593.653-1.081.653h-2.293l.002-1.38zm0 3.36h1.892c.172 0 .924.05 1.164 1.011.026.104.064.291.107.503.078.389.174.861.247 1.06.113.345.57 1.034 1.058 1.034h3.089c-.207.277-.433.54-.677.785l-1.258-.27a.544.544 0 00-.645.417l-.298 1.394a7.323 7.323 0 01-6.108-.03l-.298-1.392a.542.542 0 00-.643-.418l-1.23.264a7.32 7.32 0 01-.636-.75h5.984c.067 0 .113-.011.113-.074v-2.117c0-.061-.046-.075-.113-.075h-1.75l.001-1.341zm-2.763 4.848a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm8.814.027a.596.596 0 11-.035 1.19.596.596 0 01.035-1.19z`,clipRule:`evenodd`})]}),Te=e=>l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[c(`title`,{children:`Rust`}),c(`path`,{fill:`#F87171`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]});export{te as $,oe as A,K as B,P as C,Y as D,Z as E,B as F,V as G,U as H,D as I,q as J,H as K,G as L,N as M,ae as N,I as O,ie as P,ee as Q,O as R,k as S,z as T,X as U,W as V,F as W,ne as X,re as Y,T as Z,ce as _,de as a,Q as b,ge as c,be as d,b as et,we as f,Ce as g,pe as h,ve as i,R as j,j as k,_e as l,he as m,ye as n,_ as nt,fe as o,Se as p,L as q,Te as r,ue as s,me as t,g as tt,xe as u,le as v,M as w,A as x,se as y,J as z};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react-router-dom`),u=require(`react`);u=c(u);let d=require(`react/jsx-runtime`),f=require(`clsx`),p=require(`tailwind-merge`);const m=Symbol.for(`__BDOCS_CONFIG_CONTEXT__`),h=Symbol.for(`__BDOCS_CONFIG_INSTANCE__`),g=globalThis[m]||(globalThis[m]=(0,u.createContext)(null));function _(){let e=(0,u.use)(g);if(!e&&typeof globalThis<`u`&&globalThis[h])return globalThis[h];if(!e)throw Error(`useConfig must be used within a ConfigProvider`);return e}const v=(0,u.createContext)({routes:[]});function y(){return(0,u.use)(v)}function b({routes:e,children:t}){return(0,d.jsx)(v.Provider,{value:{routes:e},children:t})}const x=`boltdocs-user-preferences`,S=Symbol.for(`__BDOCS_BOLTDOCS_CONTEXT__`),C=Symbol.for(`__BDOCS_BOLTDOCS_INSTANCE__`),w=globalThis[S]||(globalThis[S]=(0,u.createContext)(void 0));function ee({children:e,initialLocale:t=``,initialVersion:n=``}){let r=()=>{if(typeof window>`u`)return{};try{let e=localStorage.getItem(x);return e?JSON.parse(e):{}}catch{return{}}},[i,a]=(0,u.useState)(()=>t||r().locale||``),[o,s]=(0,u.useState)(()=>n||r().version||``),[c,l]=(0,u.useState)(()=>typeof window<`u`);(0,u.useEffect)(()=>{l(!0)},[]);let f=(0,u.useMemo)(()=>({currentLocale:i,currentVersion:o,setLocale:e=>{let t=e||``;if(a(t),typeof window<`u`)try{let e=r();localStorage.setItem(x,JSON.stringify({...e,locale:t}))}catch{}},setVersion:e=>{let t=e||``;if(s(t),typeof window<`u`)try{let e=r();localStorage.setItem(x,JSON.stringify({...e,version:t}))}catch{}},hasHydrated:c,setHasHydrated:l}),[i,o,c]);return typeof globalThis<`u`&&(globalThis[C]=f),(0,d.jsx)(w.Provider,{value:f,children:e})}function te(){let e=(0,u.use)(w);if(!e&&typeof globalThis<`u`&&globalThis[C])return globalThis[C];if(!e)throw Error(`useBoltdocsContext must be used within a BoltdocsProvider`);return e}function T(e){return e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e}function ne(){let{routes:e}=y(),t=_(),n=(0,l.useLocation)(),{hasHydrated:r,currentLocale:i,currentVersion:a}=te(),o=T(n.pathname),s=e?.find?.(e=>T(e.path)===o),c=t.i18n?i||t.i18n.defaultLocale:void 0,d=t.versions?a||t.versions.defaultVersion:void 0;return{routes:(0,u.useMemo)(()=>{if(!e)return[];let n=new Map,r=t.i18n?.defaultLocale||``,i=t.versions?.defaultVersion||``;for(let t of e){let e=t.locale||r,a=t.version||i,o=`${t.filePath}::${e}::${a}`;n.set(o,(n.get(o)||0)+1)}return e.filter(e=>{let a=t.i18n?(e.locale||t.i18n.defaultLocale)===c:!0,o=t.versions?(e.version||t.versions.defaultVersion)===d:!0;if(!(a&&o))return!1;let l=!!s?.locale,u=!!s?.version,f=!!e.locale,p=!!e.version,m=e.locale||r,h=e.version||i,g=`${e.filePath}::${m}::${h}`;if((n.get(g)||0)>1){let e=t.i18n&&l!==f,n=t.versions&&u!==p;if(e||n)return!1}return!0})},[e,t,c,d,s]),allRoutes:e,currentRoute:s,currentLocale:c,currentVersion:d}}var re=o({AlertCircle:()=>A,AlertTriangle:()=>k,ArrowLeft:()=>P,Check:()=>M,ChevronDown:()=>z,ChevronLeft:()=>Z,ChevronRight:()=>Y,CircleHelp:()=>I,Copy:()=>j,CornerDownLeft:()=>oe,ExternalLink:()=>R,File:()=>N,FileText:()=>ae,Hash:()=>ie,Home:()=>B,Info:()=>D,Languages:()=>G,Lightbulb:()=>O,Link:()=>J,Menu:()=>K,Monitor:()=>W,Moon:()=>U,MoreVertical:()=>X,Pencil:()=>F,Search:()=>V,Sun:()=>H,TextAlignStart:()=>L,X:()=>q});function E(e,t,n=`0 0 24 24`){let r=({size:e=24,className:r,...i})=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:n,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:r,...i,children:t});return r.displayName=e,r}const D=E(`Info`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,d.jsx)(`path`,{d:`M12 16v-4`}),(0,d.jsx)(`path`,{d:`M12 8h.01`})]})),O=E(`Lightbulb`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A5 5 0 0 0 8 8c0 1 .3 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`}),(0,d.jsx)(`path`,{d:`M9 18h6`}),(0,d.jsx)(`path`,{d:`M10 22h4`})]})),k=E(`AlertTriangle`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}),(0,d.jsx)(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),(0,d.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]})),A=E(`AlertCircle`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,d.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,d.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]})),j=E(`Copy`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,d.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})),M=E(`Check`,(0,d.jsx)(`path`,{d:`M20 6 9 17l-5-5`})),N=E(`File`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),(0,d.jsx)(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`})]})),P=E(`ArrowLeft`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`m12 19-7-7 7-7`}),(0,d.jsx)(`path`,{d:`M19 12H5`})]})),F=E(`Pencil`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`M12 20h9`}),(0,d.jsx)(`path`,{d:`M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z`})]})),I=E(`CircleHelp`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,d.jsx)(`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}),(0,d.jsx)(`path`,{d:`M12 17h.01`})]})),L=E(`TextAlignStart`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`line`,{x1:`21`,x2:`3`,y1:`6`,y2:`6`}),(0,d.jsx)(`line`,{x1:`15`,x2:`3`,y1:`12`,y2:`12`}),(0,d.jsx)(`line`,{x1:`17`,x2:`3`,y1:`18`,y2:`18`})]})),R=E(`ExternalLink`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,d.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,d.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})),z=E(`ChevronDown`,(0,d.jsx)(`path`,{d:`m6 9 6 6 6-6`})),B=E(`Home`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`}),(0,d.jsx)(`polyline`,{points:`9 22 9 12 15 12 15 22`})]})),V=E(`Search`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,d.jsx)(`path`,{d:`m21 21-4.3-4.3`})]})),H=E(`Sun`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,d.jsx)(`path`,{d:`M12 2v2`}),(0,d.jsx)(`path`,{d:`M12 20v2`}),(0,d.jsx)(`path`,{d:`m4.93 4.93 1.41 1.41`}),(0,d.jsx)(`path`,{d:`m17.66 17.66 1.41 1.41`}),(0,d.jsx)(`path`,{d:`M2 12h2`}),(0,d.jsx)(`path`,{d:`M20 12h2`}),(0,d.jsx)(`path`,{d:`m6.34 17.66-1.41 1.41`}),(0,d.jsx)(`path`,{d:`m19.07 4.93-1.41 1.41`})]})),U=E(`Moon`,(0,d.jsx)(`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`})),W=E(`Monitor`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}),(0,d.jsx)(`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}),(0,d.jsx)(`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`})]})),G=E(`Languages`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`m5 8 6 6`}),(0,d.jsx)(`path`,{d:`m4 14 6-6 2-3`}),(0,d.jsx)(`path`,{d:`M2 5h12`}),(0,d.jsx)(`path`,{d:`M7 2h1`}),(0,d.jsx)(`path`,{d:`m22 22-5-10-5 10`}),(0,d.jsx)(`path`,{d:`M14 18h6`})]})),K=E(`Menu`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`}),(0,d.jsx)(`line`,{x1:`4`,x2:`20`,y1:`6`,y2:`6`}),(0,d.jsx)(`line`,{x1:`4`,x2:`20`,y1:`18`,y2:`18`})]})),q=E(`X`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`M18 6 6 18`}),(0,d.jsx)(`path`,{d:`m6 6 12 12`})]})),J=E(`Link`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}),(0,d.jsx)(`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`})]})),Y=E(`ChevronRight`,(0,d.jsx)(`path`,{d:`m9 18 6-6-6-6`})),X=E(`MoreVertical`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1`}),(0,d.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1`}),(0,d.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1`})]})),Z=E(`ChevronLeft`,(0,d.jsx)(`path`,{d:`m15 18-6-6 6-6`})),ie=E(`Hash`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}),(0,d.jsx)(`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}),(0,d.jsx)(`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}),(0,d.jsx)(`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`})]})),ae=E(`FileText`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),(0,d.jsx)(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`}),(0,d.jsx)(`path`,{d:`M10 9H8`}),(0,d.jsx)(`path`,{d:`M16 13H8`}),(0,d.jsx)(`path`,{d:`M16 17H8`})]})),oe=E(`CornerDownLeft`,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`polyline`,{points:`9 10 4 15 9 20`}),(0,d.jsx)(`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`})]}));function Q(e){let t=_(),{currentLocale:n,currentVersion:r,allRoutes:i}=ne();if(!t||typeof e!=`string`)return e;if(e.startsWith(`http`)||e.startsWith(`//`)||e.startsWith(`#`)||e.startsWith(`site:`))return e.replace(`site:`,``);let[a,o]=e.split(/([?#].*)/s),s=a.endsWith(`/`)&&a.length>1?a.slice(0,-1):a,c=i?.some(e=>(e.path.endsWith(`/`)&&e.path.length>1?e.path.slice(0,-1):e.path)===(s||`/`)),l=t.i18n,u=t.versions,d=(t.base||`/docs`).replace(/\/$/,``),f=d.startsWith(`/`)?d.substring(1):d,p=a.split(`/`).filter(Boolean),m=f&&p.length>0&&p[0]===f||!c&&p.length>0,h=[...p],g=0;f&&h[g]===f&&g++,u&&h.length>g&&u.versions.find(e=>e.path===h[g])&&g++,l&&h.length>g&&(Array.isArray(l.locales)?l.locales.includes(h[g]):h[g]in l.locales)&&g++;let v=h.slice(g),y=[];m?(f&&y.push(f),u&&r&&y.push(r),l&&n&&y.push(n)):l&&n&&y.push(n),y.push(...v);let b=`/${y.join(`/`)}`;return a.endsWith(`/`)&&a.length>1&&!b.endsWith(`/`)&&(b+=`/`),(b||`/`)+(o||``)}function se(...e){return(0,p.twMerge)((0,f.clsx)(e))}const ce=e=>{let{href:t,onMouseEnter:n,onFocus:r,onClick:i,...a}=e,o=(0,l.useNavigate)(),s=Q(t??``),c=e=>{i?.(e),!e.defaultPrevented&&(s&&(s.startsWith(`http://`)||s.startsWith(`https://`)||s.startsWith(`//`))||(e.preventDefault(),o(s)))},u=e=>{n?.(e)},f=e=>{r?.(e)};return(0,d.jsx)(`a`,{...a,href:s,onClick:c,onMouseEnter:u,onFocus:f})},le=e=>{let{href:t,end:n=!1,className:r,children:i,...a}=e,o=(0,l.useLocation)(),s=Q(t??``),c=n?o.pathname===s:o.pathname.startsWith(s),u=typeof r==`function`?r({isActive:c}):se(r,c&&`active`),f=typeof i==`function`?i({isActive:c}):i;return(0,d.jsx)(ce,{...a,href:t,className:u,children:f})};function $(e){let{size:t=20,...n}=e;return{...n,width:t,height:t}}const ue=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...$(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`})]}),de=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`CSV`}),(0,d.jsxs)(`mask`,{id:`a`,maskUnits:`userSpaceOnUse`,x:`3`,y:`3`,width:`18`,height:`18`,fill:`#000`,children:[(0,d.jsx)(`path`,{fill:`#fff`,d:`M3 3h18v18H3z`}),(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.8889 5H8.11111C6.39289 5 5 6.39289 5 8.11111v7.77779C5 17.6071 6.39289 19 8.11111 19h7.77779C17.6071 19 19 17.6071 19 15.8889V8.11111C19 6.39289 17.6071 5 15.8889 5Zm0 12.4444H8.1111c-.05369 0-.10674-.0027-.15904-.008.0523.0053.10536.008.15905.008h7.77779Zm1.5555-1.5555c0 .8054-.6121 1.4679-1.3965 1.5475.7844-.0797 1.3965-.7421 1.3965-1.5475V8.11111v7.77779Z`})]}),(0,d.jsx)(`path`,{d:`M15.8889 19.4444c1.1046 0 2-.8954 2-2 0-1.1045-.8954-2-2-2v4Zm-7.7778-2 .00001-2H8.1111v2Zm-.15904-.008.20206-1.9898c-1.09891-.1115-2.08022.6888-2.19182 1.7877-.1116 1.099.68877 2.0803 1.78768 2.1919l.20208-1.9898Zm8.09584 0-.2021-1.9897c-1.0989.1116-1.8992 1.0929-1.7876 2.1918.1116 1.0989 1.0929 1.8993 2.1918 1.7877l-.2021-1.9898Zm3.3965-9.32529c0-1.10457-.8954-2-2-2-1.1045 0-2 .89543-2 2h4ZM8.11111 7h7.77779V3H8.11111v4ZM7 8.11111C7 7.49746 7.49746 7 8.11111 7V3C5.28832 3 3 5.28832 3 8.11111h4Zm0 7.77779V8.11111H3v7.77779h4ZM8.11111 17C7.49746 17 7 16.5025 7 15.8889H3C3 18.7117 5.28832 21 8.11111 21v-4Zm7.77779 0H8.11111v4h7.77779v-4ZM17 15.8889C17 16.5025 16.5025 17 15.8889 17v4C18.7117 21 21 18.7117 21 15.8889h-4Zm0-7.77779v7.77779h4V8.11111h-4ZM15.8889 7C16.5025 7 17 7.49746 17 8.11111h4C21 5.28832 18.7117 3 15.8889 3v4Zm0 8.4444H8.11111l-.00001 4h7.7778v-4Zm-7.7778 0c.01378 0 .02816.0007.04302.0022l-.40411 3.9796c.11944.0121.23994.0182.36109.0182v-4Zm-.36112 3.9818c.11935.0121.23985.0182.36113.0182v-4c.01389 0 .02828.0008.04304.0022l-.40417 3.9796Zm.36113.0182h7.77779v-4H8.11111v4Zm8.13889-.0182c1.7951-.1823 3.1944-1.6951 3.1944-3.5373h-4c0-.2314.1752-.4193.4015-.4423l.4041 3.9796Zm-.8056-3.5373c0-.2314.1752-.4193.4014-.4422l.4042 3.9795c1.795-.1823 3.1944-1.6951 3.1944-3.5373h-4Zm0-7.77779v7.77779h4V8.11111h-4Zm4 0c0-.07155-.0038-.14596-.0124-.22267-.0086-.07678-.0218-.15478-.0403-.23343-.0184-.07869-.0416-.15651-.0697-.233-.0281-.07648-.0604-.15005-.0963-.22045-.036-.07036-.0749-.13629-.1158-.1978-.0408-.06145-.0832-.11775-.1258-.16912-.085-.10251-.1704-.18478-.2468-.2495-.0383-.03245-.0749-.061-.1089-.08594-.034-.02494-.0659-.04672-.0949-.06556-.029-.01883-.0558-.03518-.0797-.04914-.0239-.01396-.0456-.02598-.0644-.03606-.0188-.01008-.0355-.01864-.0493-.02558-.0139-.00694-.0257-.01268-.0348-.01701-.009-.00429-.0163-.00769-.0207-.00971-.0022-.00104-.004-.00187-.0051-.00238-.0006-.00025-.001-.00046-.0013-.00059-.0002-.00006-.0003-.00011-.0003-.00014-.0001-.00001-.0001-.00003-.0001-.00004v-.00001c-.0006-.00027.0028.00131.0068.00316.0044.00202.0117.00541.0207.00971.0091.00433.0209.01007.0348.01701.0138.00694.0305.0155.0493.02558.0188.01008.0405.0221.0644.03606.0239.01396.0507.03031.0797.04914.029.01883.0609.04062.0949.06556.0339.02494.0706.05349.1089.08594.0764.06472.1618.14698.2468.24949.0426.05138.085.10768.1258.16913.0409.06151.0798.12744.1157.19779.036.07041.0683.14397.0964.22046.028.07648.0513.15431.0697.23299.0185.07865.0317.15665.0403.23344.0086.07671.0124.15112.0124.22267h-4c0 .07154.0039.14595.0125.22267.0086.07678.0218.15478.0402.23343.0185.07868.0417.15651.0698.233.0281.07648.0604.15005.0963.22045.036.07036.0749.13629.1158.1978.0408.06144.0832.11775.1258.16912.0849.10251.1704.18478.2468.2495.0383.03244.0749.061.1089.08594.0339.02493.0658.04672.0949.06556.029.01883.0558.03517.0797.04914.0239.01396.0456.02598.0644.03606.0188.01007.0354.01864.0493.02558.0139.00693.0257.01268.0348.01701.009.00429.0163.00769.0207.00971.0022.00104.004.00187.0051.00237.0006.00026.001.00047.0013.00059.0001.00007.0003.00012.0003.00015.0001.00001.0001.00003.0001.00004v.00001c.0006.00026-.0028-.00131-.0068-.00316-.0044-.00202-.0117-.00542-.0207-.00971-.0091-.00433-.0209-.01008-.0348-.01701-.0139-.00694-.0305-.01551-.0493-.02558-.0188-.01008-.0405-.0221-.0644-.03606-.0239-.01396-.0507-.03031-.0797-.04914-.029-.01884-.061-.04062-.0949-.06556-.034-.02494-.0706-.0535-.1089-.08594-.0764-.06472-.1619-.14699-.2468-.2495-.0426-.05137-.085-.10767-.1258-.16912-.0409-.06151-.0798-.12744-.1158-.1978-.0359-.0704-.0682-.14397-.0963-.22045-.0281-.07649-.0513-.15431-.0698-.233-.0184-.07865-.0316-.15665-.0402-.23343-.0086-.07671-.0125-.15112-.0125-.22267h4Zm0 7.77779V8.11111h-4v7.77779h4Z`,fill:`#14B8A6`,mask:`url(#a)`}),(0,d.jsx)(`rect`,{x:`7`,y:`7`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,d.jsx)(`rect`,{x:`7`,y:`11`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,d.jsx)(`rect`,{x:`7`,y:`15`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,d.jsx)(`rect`,{x:`13`,y:`7`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,d.jsx)(`rect`,{x:`13`,y:`11`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,d.jsx)(`rect`,{x:`13`,y:`15`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`})]}),fe=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...$(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`})]}),pe=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...$(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`})]}),me=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...$(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`})]}),he=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`TypeScript`}),(0,d.jsx)(`path`,{fill:`#2563EB`,d:`M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z`})]}),ge=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`JavaScript`}),(0,d.jsx)(`path`,{fill:`#F59E0B`,d:`M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z`})]}),_e=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`JSON`}),(0,d.jsx)(`path`,{fill:`#F59E0B`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),ve=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`CSS`}),(0,d.jsx)(`path`,{fill:`#0EA5E9`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),ye=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`HTML`}),(0,d.jsx)(`path`,{fill:`#EA580C`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),be=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`React`}),(0,d.jsx)(`path`,{fill:`#0E8ADC`,d:`M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z`}),(0,d.jsx)(`path`,{stroke:`#0E8ADC`,d:`M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z`}),(0,d.jsx)(`path`,{stroke:`#0E8ADC`,d:`M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z`}),(0,d.jsx)(`path`,{stroke:`#0E8ADC`,d:`M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z`})]}),xe=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`Markdown`}),(0,d.jsx)(`path`,{fill:`#60A5FA`,d:`M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z`})]}),Se=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`Shell`}),(0,d.jsx)(`path`,{stroke:`#14B8A6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M4.336 17l6-6-6-6M12.336 19h8`})]}),Ce=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`YAML`}),(0,d.jsx)(`path`,{fill:`#A78BFA`,d:`M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z`})]}),we=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`Rust`}),(0,d.jsx)(`path`,{fill:`#EA580C`,fillRule:`evenodd`,d:`M12.58 2.136a.287.287 0 00-.488 0l-.526.85a8.974 8.974 0 00-.232.022l-.683-.73a.287.287 0 00-.478.096l-.35.935c-.075.021-.15.044-.224.067l-.812-.583a.287.287 0 00-.45.187l-.162.989a9.088 9.088 0 00-.204.11l-.913-.417a.287.287 0 00-.406.272l.036 1.005a9.099 9.099 0 00-.175.144l-.98-.231a.287.287 0 00-.345.345l.231.98a9.125 9.125 0 00-.144.175L4.27 6.316a.287.287 0 00-.271.406l.416.913a9.036 9.036 0 00-.11.203L3.317 8a.287.287 0 00-.187.45l.584.813a8.953 8.953 0 00-.068.223l-.935.35a.287.287 0 00-.095.479l.73.682a8.966 8.966 0 00-.023.233l-.85.526a.287.287 0 000 .488l.85.526c.007.078.014.156.023.233l-.73.682a.287.287 0 00.095.479l.935.35.068.223-.584.812a.287.287 0 00.187.451l.99.162c.035.068.072.135.109.203l-.416.913a.287.287 0 00.271.406l1.006-.036c.047.059.095.117.143.174l-.23.981a.287.287 0 00.344.345l.981-.23c.057.048.115.095.174.142l-.036 1.006a.287.287 0 00.406.272l.914-.417c.067.038.135.074.203.11l.161.99a.287.287 0 00.451.186l.813-.584c.074.024.148.046.223.068l.35.935a.287.287 0 00.478.095l.683-.73c.077.01.154.017.232.023l.526.85a.287.287 0 00.489 0l.526-.85c.078-.006.155-.014.232-.023l.682.73a.287.287 0 00.479-.095l.35-.935c.075-.022.15-.044.223-.068l.813.584a.287.287 0 00.45-.187l.162-.99a8.77 8.77 0 00.203-.109l.913.417a.287.287 0 00.406-.272l-.035-1.006c.058-.047.116-.094.174-.143l.98.231a.287.287 0 00.346-.345l-.231-.98.143-.175 1.006.036a.287.287 0 00.271-.406l-.416-.913a9.4 9.4 0 00.109-.203l.99-.162a.287.287 0 00.187-.45l-.584-.813a8.43 8.43 0 00.067-.223l.935-.35a.287.287 0 00.096-.479l-.73-.682c.009-.077.016-.155.023-.233l.85-.526a.287.287 0 000-.488l-.85-.526a8.844 8.844 0 00-.023-.233l.73-.682a.287.287 0 00-.096-.479l-.934-.35a9.246 9.246 0 00-.068-.223l.584-.812A.287.287 0 0021.357 8l-.99-.162a8.92 8.92 0 00-.11-.203l.417-.913a.287.287 0 00-.271-.406l-1.006.036a9.178 9.178 0 00-.143-.174l.23-.981a.287.287 0 00-.345-.345l-.98.23a9.43 9.43 0 00-.174-.142l.035-1.006a.287.287 0 00-.405-.272l-.914.417a9.11 9.11 0 00-.203-.11l-.162-.99a.287.287 0 00-.45-.186l-.813.584a9.088 9.088 0 00-.223-.068l-.35-.935a.287.287 0 00-.479-.095l-.682.73a9.062 9.062 0 00-.232-.023l-.526-.85zm-.257 1.62a.592.592 0 01.578.596.595.595 0 11-.578-.595zm1.363.98A7.324 7.324 0 0118.7 8.309l-.702 1.585a.547.547 0 00.275.717l1.352.6c.041.422.047.847.015 1.27h-.752c-.075 0-.106.05-.106.123v.344c0 .812-.457.99-.859 1.034-.383.044-.806-.161-.86-.394-.22-1.24-.583-1.526-1.152-1.975l-.041-.033c.736-.467 1.502-1.158 1.502-2.08 0-.998-.683-1.625-1.148-1.934-.655-.43-1.379-.516-1.574-.516H6.88a7.324 7.324 0 014.098-2.312l.916.96a.54.54 0 00.766.018l1.026-.978zm-8.46 4.407a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm14.192.026a.595.595 0 11-.035 1.19.595.595 0 01.035-1.19zm-13.07.096h1.037v4.678H5.291a7.324 7.324 0 01-.237-2.797l1.282-.57a.542.542 0 00.276-.716l-.264-.595zm4.33.05h2.47c.128 0 .901.147.901.727 0 .48-.593.653-1.081.653h-2.293l.002-1.38zm0 3.36h1.892c.172 0 .924.05 1.164 1.011.026.104.064.291.107.503.078.389.174.861.247 1.06.113.345.57 1.034 1.058 1.034h3.089c-.207.277-.433.54-.677.785l-1.258-.27a.544.544 0 00-.645.417l-.298 1.394a7.323 7.323 0 01-6.108-.03l-.298-1.392a.542.542 0 00-.643-.418l-1.23.264a7.32 7.32 0 01-.636-.75h5.984c.067 0 .113-.011.113-.074v-2.117c0-.061-.046-.075-.113-.075h-1.75l.001-1.341zm-2.763 4.848a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm8.814.027a.596.596 0 11-.035 1.19.596.596 0 01.035-1.19z`,clipRule:`evenodd`})]}),Te=e=>(0,d.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...$(e),children:[(0,d.jsx)(`title`,{children:`Rust`}),(0,d.jsx)(`path`,{fill:`#F87171`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]});Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return J}});
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./icons-dev-BlV3wWFT.cjs`);let t=require(`react`);t=e.rt(t);let n=require(`react/jsx-runtime`),r=require(`react-aria-components`);r=e.rt(r);const i=Symbol.for(`__BDOCS_THEME_CONTEXT__`),a=Symbol.for(`__BDOCS_THEME_INSTANCE__`),o=`boltdocs-theme-change`,s=globalThis[i]||(globalThis[i]=(0,t.createContext)(void 0));function c({children:e}){let[r,i]=(0,t.useState)(`system`),[c,l]=(0,t.useState)(`dark`),u=e=>{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=e===`dark`||e===`system`&&t.matches,r=window.document.documentElement;r.classList.toggle(`dark`,n),r.dataset.theme=n?`dark`:`light`,l(n?`dark`:`light`)};(0,t.useEffect)(()=>{let e=localStorage.getItem(`boltdocs-theme`);e?(i(e),u(e)):u(`system`);let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>{(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`&&u(`system`)};return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[]);let d={theme:r,resolvedTheme:c,setTheme:e=>{i(e),localStorage.setItem(`boltdocs-theme`,e),u(e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(o,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[a]=d),(0,n.jsx)(s.Provider,{value:d,children:e})}function l(){let e=(0,t.use)(s),[,n]=(0,t.useState)({});if((0,t.useEffect)(()=>{if(e)return;let t=()=>n({});return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[e]),!e&&typeof globalThis<`u`&&globalThis[a])return globalThis[a];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}const u=t.forwardRef(({level:t,id:r,children:i,className:a,showAnchor:o=!0,anchorPosition:s=`wrap`,anchorIcon:c,anchorClassName:l,...u},d)=>{let f=`h${Math.min(Math.max(Math.floor(t),1),6)}`,p=!!(r&&o),m=(0,n.jsx)(e.z,{className:e.y(`transition-all duration-200`,s===`wrap`?`opacity-0 ml-2 text-muted/50 group-hover:text-primary-500 group-hover:opacity-100`:`text-muted/50 hover:text-primary-500`),size:16}),h=c??m,g=()=>p?s===`wrap`?(0,n.jsxs)(e._,{href:`#${r}`,className:e.y(`header-anchor flex flex-row items-center no-underline text-inherit`,l),"aria-label":`Anchor`,children:[i,h]}):(0,n.jsxs)(n.Fragment,{children:[s===`before`&&(0,n.jsx)(e._,{href:`#${r}`,className:e.y(`header-anchor mr-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,l),"aria-label":`Anchor`,children:h}),i,s===`after`&&(0,n.jsx)(e._,{href:`#${r}`,className:e.y(`header-anchor ml-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,l),"aria-label":`Anchor`,children:h})]}):i;return(0,n.jsx)(f,{ref:d,id:r,className:e.y(`boltdocs-heading relative group flex items-center scroll-mt-24`,a),...u,children:g()})});u.displayName=`Heading`;const d=({children:t,className:r,plain:i=!1,...a})=>(0,n.jsx)(`div`,{className:e.y(`not-prose boltdocs-code-block`,`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-xl border border-subtle":!i},r),...a,children:t}),f=({children:t,className:r,...i})=>(0,n.jsx)(`div`,{className:e.y(`flex h-9 items-center justify-between px-4 py-1.5`,`text-[13px] font-medium text-muted`,r),...i,children:t}),p=({children:t,className:r,...i})=>(0,n.jsx)(`div`,{className:e.y(`flex items-center space-x-2`,r),...i,children:t}),m=({className:t,children:r,shouldTruncate:i=!1,...a})=>(0,n.jsx)(`div`,{className:e.y(`relative`,{"[&>pre]:max-h-[300px] [&>pre]:overflow-hidden [&>div>pre]:max-h-[300px] [&>div>pre]:overflow-hidden":i},t),...a,children:r});d.Header=f,d.Group=p,d.Content=m;const h=({className:t,children:i,...a})=>(0,n.jsx)(r.Tooltip,{...a,offset:8,className:n=>e.y(`group z-50 overflow-visible rounded-md bg-surface px-2.5 py-1.5 text-xs font-medium text-body ring-1 ring-subtle outline-hidden select-none`,`data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100`,`data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75`,`data-[placement=top]:slide-in-from-bottom-1`,`data-[placement=bottom]:slide-in-from-top-1`,`data-[placement=left]:slide-in-from-right-1`,`data-[placement=right]:slide-in-from-left-1`,typeof t==`function`?t(n):t),children:e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.OverlayArrow,{children:(0,n.jsxs)(`svg`,{width:8,height:8,viewBox:`0 0 8 8`,className:`fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90`,children:[(0,n.jsx)(`title`,{children:`Arrow`}),(0,n.jsx)(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof i==`function`?i(e):i]})}),g=({content:e,children:t,delay:i=500,closeDelay:a=0,...o})=>(0,n.jsxs)(r.TooltipTrigger,{delay:i,closeDelay:a,children:[t,(0,n.jsx)(h,{...o,children:e})]});g.Root=g,g.Content=h;function _({theme:t,className:r,...i}){let{resolvedTheme:a}=l();return t&&t!==a?null:(0,n.jsx)(`img`,{className:e.y(`max-w-full h-auto rounded-lg my-8`,r),...i})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _}});
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{_ as e,y as t,z as n}from"./icons-dev-B_RZIyxu.js";import*as r from"react";import{createContext as i,use as a,useEffect as o,useState as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"react-aria-components";const f=Symbol.for(`__BDOCS_THEME_CONTEXT__`),p=Symbol.for(`__BDOCS_THEME_INSTANCE__`),m=`boltdocs-theme-change`,h=globalThis[f]||(globalThis[f]=i(void 0));function g({children:e}){let[t,n]=s(`system`),[r,i]=s(`dark`),a=e=>{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=e===`dark`||e===`system`&&t.matches,r=window.document.documentElement;r.classList.toggle(`dark`,n),r.dataset.theme=n?`dark`:`light`,i(n?`dark`:`light`)};o(()=>{let e=localStorage.getItem(`boltdocs-theme`);e?(n(e),a(e)):a(`system`);let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>{(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`&&a(`system`)};return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]);let c={theme:t,resolvedTheme:r,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e),a(e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[p]=c),l(h.Provider,{value:c,children:e})}function _(){let e=a(h),[,t]=s({});if(o(()=>{if(e)return;let n=()=>t({});return window.addEventListener(m,n),()=>window.removeEventListener(m,n)},[e]),!e&&typeof globalThis<`u`&&globalThis[p])return globalThis[p];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}const v=r.forwardRef(({level:r,id:i,children:a,className:o,showAnchor:s=!0,anchorPosition:d=`wrap`,anchorIcon:f,anchorClassName:p,...m},h)=>{let g=`h${Math.min(Math.max(Math.floor(r),1),6)}`,_=!!(i&&s),v=l(n,{className:t(`transition-all duration-200`,d===`wrap`?`opacity-0 ml-2 text-muted/50 group-hover:text-primary-500 group-hover:opacity-100`:`text-muted/50 hover:text-primary-500`),size:16}),y=f??v,b=()=>_?d===`wrap`?u(e,{href:`#${i}`,className:t(`header-anchor flex flex-row items-center no-underline text-inherit`,p),"aria-label":`Anchor`,children:[a,y]}):u(c,{children:[d===`before`&&l(e,{href:`#${i}`,className:t(`header-anchor mr-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,p),"aria-label":`Anchor`,children:y}),a,d===`after`&&l(e,{href:`#${i}`,className:t(`header-anchor ml-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,p),"aria-label":`Anchor`,children:y})]}):a;return l(g,{ref:h,id:i,className:t(`boltdocs-heading relative group flex items-center scroll-mt-24`,o),...m,children:b()})});v.displayName=`Heading`;const y=({children:e,className:n,plain:r=!1,...i})=>l(`div`,{className:t(`not-prose boltdocs-code-block`,`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-xl border border-subtle":!r},n),...i,children:e}),b=({children:e,className:n,...r})=>l(`div`,{className:t(`flex h-9 items-center justify-between px-4 py-1.5`,`text-[13px] font-medium text-muted`,n),...r,children:e}),x=({children:e,className:n,...r})=>l(`div`,{className:t(`flex items-center space-x-2`,n),...r,children:e}),S=({className:e,children:n,shouldTruncate:r=!1,...i})=>l(`div`,{className:t(`relative`,{"[&>pre]:max-h-[300px] [&>pre]:overflow-hidden [&>div>pre]:max-h-[300px] [&>div>pre]:overflow-hidden":r},e),...i,children:n});y.Header=b,y.Group=x,y.Content=S;const C=({className:e,children:n,...r})=>l(d.Tooltip,{...r,offset:8,className:n=>t(`group z-50 overflow-visible rounded-md bg-surface px-2.5 py-1.5 text-xs font-medium text-body ring-1 ring-subtle outline-hidden select-none`,`data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100`,`data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75`,`data-[placement=top]:slide-in-from-bottom-1`,`data-[placement=bottom]:slide-in-from-top-1`,`data-[placement=left]:slide-in-from-right-1`,`data-[placement=right]:slide-in-from-left-1`,typeof e==`function`?e(n):e),children:e=>u(c,{children:[l(d.OverlayArrow,{children:u(`svg`,{width:8,height:8,viewBox:`0 0 8 8`,className:`fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90`,children:[l(`title`,{children:`Arrow`}),l(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof n==`function`?n(e):n]})}),w=({content:e,children:t,delay:n=500,closeDelay:r=0,...i})=>u(d.TooltipTrigger,{delay:n,closeDelay:r,children:[t,l(C,{...i,children:e})]});w.Root=w,w.Content=C;function T({theme:e,className:n,...r}){let{resolvedTheme:i}=_();return e&&e!==i?null:l(`img`,{className:t(`max-w-full h-auto rounded-lg my-8`,n),...r})}export{x as a,g as c,S as i,_ as l,w as n,b as o,y as r,v as s,T as t};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{I as e,M as t,R as n,S as r,_ as i,a,c as o,d as s,f as c,g as l,i as u,k as d,l as f,m as p,n as m,p as h,r as g,u as _,w as v,x as y,y as b}from"./icons-dev-B_RZIyxu.js";import{a as ee,i as x,l as S,n as C,o as w,r as te,s as T,t as E}from"./image-CqKzYD8f.js";import{isValidElement as D,useCallback as O,useEffect as k,useRef as A,useState as j}from"react";import{Fragment as M,jsx as N,jsxs as P}from"react/jsx-runtime";import{Button as F}from"react-aria-components";const I={note:{container:`bg-slate-500/5 dark:bg-slate-500/10 border-slate-500/40 text-slate-800 dark:text-slate-200`,titleText:`text-slate-900 dark:text-slate-100`,iconColor:`text-slate-500`,icon:e,defaultTitle:`Note`},info:{container:`bg-indigo-500/5 dark:bg-indigo-500/10 border-indigo-500/40 text-indigo-800 dark:text-indigo-200`,titleText:`text-indigo-900 dark:text-indigo-100`,iconColor:`text-indigo-500`,icon:e,defaultTitle:`Info`},tip:{container:`bg-green-500/5 dark:bg-green-500/10 border-green-500/40 text-green-800 dark:text-green-200`,titleText:`text-green-900 dark:text-green-100`,iconColor:`text-green-500`,icon:n,defaultTitle:`Tip`},warning:{container:`bg-amber-500/5 dark:bg-amber-500/10 border-amber-500/40 text-amber-800 dark:text-amber-200`,titleText:`text-amber-900 dark:text-amber-100`,iconColor:`text-amber-500`,icon:r,defaultTitle:`Warning`},danger:{container:`bg-rose-500/5 dark:bg-rose-500/10 border-rose-500/40 text-rose-800 dark:text-rose-200`,titleText:`text-rose-900 dark:text-rose-100`,iconColor:`text-rose-500`,icon:y,defaultTitle:`Danger`}};function L({children:e,className:t=``,variant:n=`note`,title:r,...i}){let a=I[n]||I.note,o=a.icon;return P(`div`,{className:b(`my-6 flex gap-4 p-4 rounded-xl border-2`,a.container,t),...i,children:[N(`div`,{className:b(`shrink-0 pt-0.5`,a.iconColor),children:N(o,{className:`w-5 h-5 stroke-[2]`})}),P(`div`,{className:`flex-1 text-[0.875rem] leading-[1.6]`,children:[N(`div`,{className:b(`font-bold text-sm mb-1`,a.titleText),children:r||a.defaultTitle}),N(`div`,{className:`prose prose-neutral dark:prose-invert max-w-none [&>p]:m-0 [&>p+p]:mt-2`,children:e})]})]})}const R=({children:e,name:t,type:n,description:r,required:i})=>P(`div`,{className:`my-4 border border-subtle bg-surface/50 p-4 rounded-xl flex flex-col gap-1 text-sm select-none`,children:[P(`div`,{className:`flex items-center gap-2`,children:[N(`span`,{className:`font-mono font-bold text-primary-500`,children:t}),n&&N(`span`,{className:`text-xs text-muted font-mono bg-soft px-1.5 py-0.5 rounded-md`,children:n}),i&&N(`span`,{className:`text-xs text-rose-500 font-semibold`,children:`required`})]}),r&&N(`div`,{className:`text-muted text-xs mt-1`,children:r}),e&&N(`div`,{className:`mt-2`,children:e})]}),z=({href:e,children:t,className:n,...r})=>N(i,{href:e||``,className:b(`text-primary-500 hover:text-primary-400 dark:text-primary-500 hover:underline font-medium transition-colors duration-200`,n),...r,children:t}),B={1:`text-3xl sm:text-[2.5rem] font-extrabold tracking-tight text-body mb-4 leading-tight`,2:`text-2xl sm:text-[1.75rem] font-bold tracking-tight text-body mt-14 mb-5 pb-2 border-b border-subtle scroll-mt-24`,3:`text-lg sm:text-[1.4rem] font-semibold tracking-tight text-body mt-10 mb-4 scroll-mt-24`,4:`text-base sm:text-[1.1rem] font-semibold tracking-tight text-body mt-8 mb-3 scroll-mt-24`,5:`text-sm sm:text-[0.9rem] font-semibold tracking-tight text-body mt-6 mb-2 scroll-mt-24`,6:`text-xs sm:text-[0.75rem] font-semibold tracking-tight text-body mt-6 mb-2 scroll-mt-24`},V=({level:e,className:t,...n})=>N(T,{level:e,className:b(B[e]||``,t),...n}),H={a:z,h1:e=>N(V,{level:1,...e}),h2:e=>N(V,{level:2,...e}),h3:e=>N(V,{level:3,...e}),h4:e=>N(V,{level:4,...e}),h5:e=>N(V,{level:5,...e}),h6:e=>N(V,{level:6,...e}),p:({className:e,...t})=>N(`p`,{className:b(`text-paragraph leading-relaxed my-5`,e),...t}),strong:({className:e,...t})=>N(`strong`,{className:b(`font-semibold text-body`,e),...t}),mark:({className:e,...t})=>N(`mark`,{className:b(`bg-primary-500/10 text-primary-500 font-semibold px-1.5 py-0.5 rounded-md`,e),...t}),blockquote:({className:e,...t})=>N(`blockquote`,{className:b(`border-l-4 border-primary-500 bg-soft/30 pl-4 py-2 my-6 italic text-muted rounded-r-lg`,e),...t}),hr:({className:e,...t})=>N(`hr`,{className:b(`my-8 border-t border-subtle`,e),...t}),ul:({className:e,...t})=>N(`ul`,{className:b(`list-disc pl-6 my-5 space-y-2 text-paragraph`,e),...t}),ol:({className:e,...t})=>N(`ol`,{className:b(`list-decimal pl-6 my-5 space-y-2 text-paragraph`,e),...t}),li:({className:e,...t})=>N(`li`,{className:b(`pl-1`,e),...t})},U={table:e=>N(`div`,{className:`my-6 w-full overflow-x-auto rounded-xl border border-subtle bg-surface/30`,children:N(`table`,{className:`w-full border-collapse text-left text-sm`,...e})}),thead:e=>N(`thead`,{className:b(`border-b border-subtle bg-soft/50`,e.className),...e}),tbody:e=>N(`tbody`,{...e}),tr:e=>N(`tr`,{className:b(`border-b border-subtle last:border-0 even:bg-soft/10 hover:bg-soft/20 transition-colors`,e.className),...e}),th:e=>N(`th`,{className:b(`px-4 py-3 font-semibold text-body text-xs font-mono`,e.className),...e}),td:e=>N(`td`,{className:b(`px-4 py-3 text-paragraph leading-relaxed`,e.className),...e})},W=(e,t)=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(e=>W(e,t)).join(``);if(D(e)){let n=t?.get(e.type);return n?n(e.props):W(e.props.children,t)}return``},G=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function K(e){let[t,n]=j(!1),[r,i]=j(!1),[a,o]=j(!1),s=A(null),c=O(async()=>{G(s.current?.textContent??``),n(!0),setTimeout(()=>n(!1),2e3)},[]);return k(()=>{let e=(s.current?.textContent??``).trim().split(`
7
+ `).length;o(e>6)},[e.children,e.highlightedHtml]),{copied:t,isExpanded:r,setIsExpanded:i,isExpandable:a,preRef:s,handleCopy:c,shouldTruncate:a&&!r}}const q={ts:p,tsx:s,js:o,jsx:s,json:f,css:u,html:m,md:_,mdx:_,bash:h,sh:h,yaml:l,yml:l,rs:c,rust:c,toml:g,csv:a},J=({copied:e,handleCopy:t})=>N(C,{content:e?`Copied!`:`Copy code`,children:N(F,{onPress:t,className:b(`grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2 z-10`,e?`text-emerald-400`:`text-muted hover:text-body`),"aria-label":`Copy code`,children:N(e?v:d,{size:20})})});function Y(e){let{children:n,hideCopy:r=!1,highlightedHtml:i,"data-highlighted-html":a,title:o,"data-title":s,"data-lang":c,plain:l=!1,...u}=e,d=i||a,f=typeof d==`string`?d.replace(/<span class="line">\s*(?:<span[^>]*>\s*<\/span>)?\s*<\/span>\s*(<\/code>\s*<\/pre>)/g,`$1`):d,p=o||s,m=e.lang||c||``,{copied:h,isExpanded:g,setIsExpanded:_,isExpandable:v,preRef:y,handleCopy:S,shouldTruncate:C}=K(e),T=q[m];return P(te,{plain:l,className:e.className,children:[(p||!r)&&P(w,{className:b({"absolute top-2 left-0 w-full":!p}),children:[N(ee,{children:p&&P(M,{children:[T?N(T,{size:14}):N(t,{size:14,className:`opacity-60`}),N(`span`,{children:p})]})}),N(`div`,{className:`flex items-center gap-1`,children:!r&&N(J,{copied:h,handleCopy:S})})]}),P(x,{shouldTruncate:C,children:[f?N(`div`,{ref:y,className:`shiki-wrapper overflow-x-auto [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>pre>code]:text-[0.875rem]! [&>pre>code]:leading-[1.6]! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:f}}):N(`pre`,{ref:y,className:`m-0! p-5! rounded-none! border-none! bg-inherit! font-mono text-[0.875rem] leading-[1.6] overflow-x-auto`,...u,children:W(n).trimEnd()}),v&&N(`div`,{className:b(C?`absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10`:`relative flex justify-center pb-4 pt-1 -mt-4`),children:N(F,{onPress:()=>_(!g),className:`rounded-full bg-surface border border-subtle px-5 py-2 text-[0.8125rem] font-medium text-body outline-none cursor-pointer transition-all hover:bg-soft hover:-translate-y-px backdrop-blur-md`,children:g?`Show less`:`Expand code`})})]})]})}const X=({src:e,alt:t,title:n,theme:r,className:i,...a})=>{let{theme:o}=S();if(!e||r!==o)return null;let s=n||t;return P(`figure`,{className:`my-6 sm:my-8 flex flex-col items-center justify-center group not-prose`,children:[N(`div`,{className:`relative w-full overflow-hidden rounded-lg sm:rounded-2xl border border-subtle bg-soft/30 transition-all duration-300 sm:max-w-[85%] lg:max-w-full`,children:N(E,{src:e,alt:t||``,theme:r,loading:`lazy`,decoding:`async`,className:b(`w-full h-auto object-contain transition-transform duration-500 group-hover:scale-[1.01] my-0 rounded-md sm:rounded-xl block`,i),...a})}),s&&N(`figcaption`,{className:`mt-2 sm:mt-3 text-center text-xs sm:text-sm text-muted font-medium select-none tracking-wide opacity-90 sm:opacity-80 group-hover:opacity-100 transition-opacity duration-300 px-2`,children:s})]})},Z={img:X,Image:X};function Q({className:e,title:t,icon:n,href:r,children:i,...a}){let[o,s]=j({x:0,y:0}),[c,l]=j(0),u=A(null),d=e=>{if(!u.current)return;let t=u.current.getBoundingClientRect();s({x:e.clientX-t.left,y:e.clientY-t.top})},f=()=>l(1),p=()=>l(0),m=r?`a`:`div`,h=`var(--color-primary-500, #eb5828)`;return P(m,{ref:u,href:r,onMouseMove:d,onMouseEnter:f,onMouseLeave:p,className:b(`group relative flex flex-col gap-3 rounded-2xl border p-6 overflow-hidden transition-all duration-300`,`hover:shadow-lg dark:hover:shadow-none hover:-translate-y-0.5`,`bg-surface border-subtle text-paragraph`,r&&`cursor-pointer`,e),...a,children:[N(`div`,{className:`pointer-events-none absolute inset-0 transition-opacity duration-300`,style:{opacity:c,background:`radial-gradient(600px circle at ${o.x}px ${o.y}px, color-mix(in srgb, ${h} 8%, transparent), transparent 40%)`}}),N(`div`,{className:`pointer-events-none absolute inset-0 rounded-2xl transition-opacity duration-300`,style:{opacity:c,padding:`1px`,background:`radial-gradient(400px circle at ${o.x}px ${o.y}px, color-mix(in srgb, ${h} 50%, transparent), transparent 40%)`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,maskComposite:`exclude`}}),P(`div`,{className:`relative z-10 flex items-center gap-3`,children:[n&&N(`div`,{className:b(`shrink-0 transition-transform duration-500 group-hover:rotate-[15deg] group-hover:scale-110 flex items-center justify-center text-muted group-hover:text-primary-500`,`[&>svg]:w-6 [&>svg]:h-6 [&>svg]:stroke-[1.5]`),children:n}),t&&N(`h3`,{className:`font-semibold text-base m-0 leading-none text-body`,children:t})]}),N(`div`,{className:`relative z-10 text-[0.875rem] leading-[1.6] opacity-90 prose prose-neutral dark:prose-invert max-w-none [&>p]:m-0 [&>p+p]:mt-2`,children:i})]})}function $({children:e,className:t,cols:n=2,...r}){return N(`div`,{className:b(`grid gap-4 my-6`,{"grid-cols-1":n===1,"grid-cols-1 sm:grid-cols-2":n===2,"grid-cols-1 sm:grid-cols-2 md:grid-cols-3":n===3,"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4":n===4},t),...r,children:e})}const ne={...H,...U,...Z,pre:Y,Field:R,Callout:L,Card:Q,Cards:$};export{W as a,G as i,$ as n,Q as r,ne as t};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./icons-dev-BlV3wWFT.cjs`),t=require(`./image-BHhTvQzr.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`),i=require(`react-aria-components`);const a={note:{container:`bg-slate-500/5 dark:bg-slate-500/10 border-slate-500/40 text-slate-800 dark:text-slate-200`,titleText:`text-slate-900 dark:text-slate-100`,iconColor:`text-slate-500`,icon:e.I,defaultTitle:`Note`},info:{container:`bg-indigo-500/5 dark:bg-indigo-500/10 border-indigo-500/40 text-indigo-800 dark:text-indigo-200`,titleText:`text-indigo-900 dark:text-indigo-100`,iconColor:`text-indigo-500`,icon:e.I,defaultTitle:`Info`},tip:{container:`bg-green-500/5 dark:bg-green-500/10 border-green-500/40 text-green-800 dark:text-green-200`,titleText:`text-green-900 dark:text-green-100`,iconColor:`text-green-500`,icon:e.R,defaultTitle:`Tip`},warning:{container:`bg-amber-500/5 dark:bg-amber-500/10 border-amber-500/40 text-amber-800 dark:text-amber-200`,titleText:`text-amber-900 dark:text-amber-100`,iconColor:`text-amber-500`,icon:e.S,defaultTitle:`Warning`},danger:{container:`bg-rose-500/5 dark:bg-rose-500/10 border-rose-500/40 text-rose-800 dark:text-rose-200`,titleText:`text-rose-900 dark:text-rose-100`,iconColor:`text-rose-500`,icon:e.x,defaultTitle:`Danger`}};function o({children:t,className:n=``,variant:i=`note`,title:o,...s}){let c=a[i]||a.note,l=c.icon;return(0,r.jsxs)(`div`,{className:e.y(`my-6 flex gap-4 p-4 rounded-xl border-2`,c.container,n),...s,children:[(0,r.jsx)(`div`,{className:e.y(`shrink-0 pt-0.5`,c.iconColor),children:(0,r.jsx)(l,{className:`w-5 h-5 stroke-[2]`})}),(0,r.jsxs)(`div`,{className:`flex-1 text-[0.875rem] leading-[1.6]`,children:[(0,r.jsx)(`div`,{className:e.y(`font-bold text-sm mb-1`,c.titleText),children:o||c.defaultTitle}),(0,r.jsx)(`div`,{className:`prose prose-neutral dark:prose-invert max-w-none [&>p]:m-0 [&>p+p]:mt-2`,children:t})]})]})}const s=({children:e,name:t,type:n,description:i,required:a})=>(0,r.jsxs)(`div`,{className:`my-4 border border-subtle bg-surface/50 p-4 rounded-xl flex flex-col gap-1 text-sm select-none`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,r.jsx)(`span`,{className:`font-mono font-bold text-primary-500`,children:t}),n&&(0,r.jsx)(`span`,{className:`text-xs text-muted font-mono bg-soft px-1.5 py-0.5 rounded-md`,children:n}),a&&(0,r.jsx)(`span`,{className:`text-xs text-rose-500 font-semibold`,children:`required`})]}),i&&(0,r.jsx)(`div`,{className:`text-muted text-xs mt-1`,children:i}),e&&(0,r.jsx)(`div`,{className:`mt-2`,children:e})]}),c=({href:t,children:n,className:i,...a})=>(0,r.jsx)(e._,{href:t||``,className:e.y(`text-primary-500 hover:text-primary-400 dark:text-primary-500 hover:underline font-medium transition-colors duration-200`,i),...a,children:n}),l={1:`text-3xl sm:text-[2.5rem] font-extrabold tracking-tight text-body mb-4 leading-tight`,2:`text-2xl sm:text-[1.75rem] font-bold tracking-tight text-body mt-14 mb-5 pb-2 border-b border-subtle scroll-mt-24`,3:`text-lg sm:text-[1.4rem] font-semibold tracking-tight text-body mt-10 mb-4 scroll-mt-24`,4:`text-base sm:text-[1.1rem] font-semibold tracking-tight text-body mt-8 mb-3 scroll-mt-24`,5:`text-sm sm:text-[0.9rem] font-semibold tracking-tight text-body mt-6 mb-2 scroll-mt-24`,6:`text-xs sm:text-[0.75rem] font-semibold tracking-tight text-body mt-6 mb-2 scroll-mt-24`},u=({level:n,className:i,...a})=>(0,r.jsx)(t.s,{level:n,className:e.y(l[n]||``,i),...a}),d={a:c,h1:e=>(0,r.jsx)(u,{level:1,...e}),h2:e=>(0,r.jsx)(u,{level:2,...e}),h3:e=>(0,r.jsx)(u,{level:3,...e}),h4:e=>(0,r.jsx)(u,{level:4,...e}),h5:e=>(0,r.jsx)(u,{level:5,...e}),h6:e=>(0,r.jsx)(u,{level:6,...e}),p:({className:t,...n})=>(0,r.jsx)(`p`,{className:e.y(`text-paragraph leading-relaxed my-5`,t),...n}),strong:({className:t,...n})=>(0,r.jsx)(`strong`,{className:e.y(`font-semibold text-body`,t),...n}),mark:({className:t,...n})=>(0,r.jsx)(`mark`,{className:e.y(`bg-primary-500/10 text-primary-500 font-semibold px-1.5 py-0.5 rounded-md`,t),...n}),blockquote:({className:t,...n})=>(0,r.jsx)(`blockquote`,{className:e.y(`border-l-4 border-primary-500 bg-soft/30 pl-4 py-2 my-6 italic text-muted rounded-r-lg`,t),...n}),hr:({className:t,...n})=>(0,r.jsx)(`hr`,{className:e.y(`my-8 border-t border-subtle`,t),...n}),ul:({className:t,...n})=>(0,r.jsx)(`ul`,{className:e.y(`list-disc pl-6 my-5 space-y-2 text-paragraph`,t),...n}),ol:({className:t,...n})=>(0,r.jsx)(`ol`,{className:e.y(`list-decimal pl-6 my-5 space-y-2 text-paragraph`,t),...n}),li:({className:t,...n})=>(0,r.jsx)(`li`,{className:e.y(`pl-1`,t),...n})},f={table:e=>(0,r.jsx)(`div`,{className:`my-6 w-full overflow-x-auto rounded-xl border border-subtle bg-surface/30`,children:(0,r.jsx)(`table`,{className:`w-full border-collapse text-left text-sm`,...e})}),thead:t=>(0,r.jsx)(`thead`,{className:e.y(`border-b border-subtle bg-soft/50`,t.className),...t}),tbody:e=>(0,r.jsx)(`tbody`,{...e}),tr:t=>(0,r.jsx)(`tr`,{className:e.y(`border-b border-subtle last:border-0 even:bg-soft/10 hover:bg-soft/20 transition-colors`,t.className),...t}),th:t=>(0,r.jsx)(`th`,{className:e.y(`px-4 py-3 font-semibold text-body text-xs font-mono`,t.className),...t}),td:t=>(0,r.jsx)(`td`,{className:e.y(`px-4 py-3 text-paragraph leading-relaxed`,t.className),...t})},p=(e,t)=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(e=>p(e,t)).join(``);if((0,n.isValidElement)(e)){let n=t?.get(e.type);return n?n(e.props):p(e.props.children,t)}return``},m=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function h(e){let[t,r]=(0,n.useState)(!1),[i,a]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1),c=(0,n.useRef)(null),l=(0,n.useCallback)(async()=>{m(c.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return(0,n.useEffect)(()=>{let e=(c.current?.textContent??``).trim().split(`
7
+ `).length;s(e>6)},[e.children,e.highlightedHtml]),{copied:t,isExpanded:i,setIsExpanded:a,isExpandable:o,preRef:c,handleCopy:l,shouldTruncate:o&&!i}}const g={ts:e.m,tsx:e.d,js:e.c,jsx:e.d,json:e.l,css:e.i,html:e.n,md:e.u,mdx:e.u,bash:e.p,sh:e.p,yaml:e.g,yml:e.g,rs:e.f,rust:e.f,toml:e.r,csv:e.a},_=({copied:n,handleCopy:a})=>(0,r.jsx)(t.n,{content:n?`Copied!`:`Copy code`,children:(0,r.jsx)(i.Button,{onPress:a,className:e.y(`grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2 z-10`,n?`text-emerald-400`:`text-muted hover:text-body`),"aria-label":`Copy code`,children:n?(0,r.jsx)(e.w,{size:20}):(0,r.jsx)(e.k,{size:20})})});function v(n){let{children:a,hideCopy:o=!1,highlightedHtml:s,"data-highlighted-html":c,title:l,"data-title":u,"data-lang":d,plain:f=!1,...m}=n,v=s||c,y=typeof v==`string`?v.replace(/<span class="line">\s*(?:<span[^>]*>\s*<\/span>)?\s*<\/span>\s*(<\/code>\s*<\/pre>)/g,`$1`):v,b=l||u,x=n.lang||d||``,{copied:S,isExpanded:C,setIsExpanded:w,isExpandable:T,preRef:E,handleCopy:D,shouldTruncate:O}=h(n),k=g[x];return(0,r.jsxs)(t.r,{plain:f,className:n.className,children:[(b||!o)&&(0,r.jsxs)(t.o,{className:e.y({"absolute top-2 left-0 w-full":!b}),children:[(0,r.jsx)(t.a,{children:b&&(0,r.jsxs)(r.Fragment,{children:[k?(0,r.jsx)(k,{size:14}):(0,r.jsx)(e.M,{size:14,className:`opacity-60`}),(0,r.jsx)(`span`,{children:b})]})}),(0,r.jsx)(`div`,{className:`flex items-center gap-1`,children:!o&&(0,r.jsx)(_,{copied:S,handleCopy:D})})]}),(0,r.jsxs)(t.i,{shouldTruncate:O,children:[y?(0,r.jsx)(`div`,{ref:E,className:`shiki-wrapper overflow-x-auto [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>pre>code]:text-[0.875rem]! [&>pre>code]:leading-[1.6]! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:y}}):(0,r.jsx)(`pre`,{ref:E,className:`m-0! p-5! rounded-none! border-none! bg-inherit! font-mono text-[0.875rem] leading-[1.6] overflow-x-auto`,...m,children:p(a).trimEnd()}),T&&(0,r.jsx)(`div`,{className:e.y(O?`absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10`:`relative flex justify-center pb-4 pt-1 -mt-4`),children:(0,r.jsx)(i.Button,{onPress:()=>w(!C),className:`rounded-full bg-surface border border-subtle px-5 py-2 text-[0.8125rem] font-medium text-body outline-none cursor-pointer transition-all hover:bg-soft hover:-translate-y-px backdrop-blur-md`,children:C?`Show less`:`Expand code`})})]})]})}const y=({src:n,alt:i,title:a,theme:o,className:s,...c})=>{let{theme:l}=t.l();if(!n||o!==l)return null;let u=a||i;return(0,r.jsxs)(`figure`,{className:`my-6 sm:my-8 flex flex-col items-center justify-center group not-prose`,children:[(0,r.jsx)(`div`,{className:`relative w-full overflow-hidden rounded-lg sm:rounded-2xl border border-subtle bg-soft/30 transition-all duration-300 sm:max-w-[85%] lg:max-w-full`,children:(0,r.jsx)(t.t,{src:n,alt:i||``,theme:o,loading:`lazy`,decoding:`async`,className:e.y(`w-full h-auto object-contain transition-transform duration-500 group-hover:scale-[1.01] my-0 rounded-md sm:rounded-xl block`,s),...c})}),u&&(0,r.jsx)(`figcaption`,{className:`mt-2 sm:mt-3 text-center text-xs sm:text-sm text-muted font-medium select-none tracking-wide opacity-90 sm:opacity-80 group-hover:opacity-100 transition-opacity duration-300 px-2`,children:u})]})},b={img:y,Image:y};function x({className:t,title:i,icon:a,href:o,children:s,...c}){let[l,u]=(0,n.useState)({x:0,y:0}),[d,f]=(0,n.useState)(0),p=(0,n.useRef)(null),m=e=>{if(!p.current)return;let t=p.current.getBoundingClientRect();u({x:e.clientX-t.left,y:e.clientY-t.top})},h=()=>f(1),g=()=>f(0),_=o?`a`:`div`,v=`var(--color-primary-500, #eb5828)`;return(0,r.jsxs)(_,{ref:p,href:o,onMouseMove:m,onMouseEnter:h,onMouseLeave:g,className:e.y(`group relative flex flex-col gap-3 rounded-2xl border p-6 overflow-hidden transition-all duration-300`,`hover:shadow-lg dark:hover:shadow-none hover:-translate-y-0.5`,`bg-surface border-subtle text-paragraph`,o&&`cursor-pointer`,t),...c,children:[(0,r.jsx)(`div`,{className:`pointer-events-none absolute inset-0 transition-opacity duration-300`,style:{opacity:d,background:`radial-gradient(600px circle at ${l.x}px ${l.y}px, color-mix(in srgb, ${v} 8%, transparent), transparent 40%)`}}),(0,r.jsx)(`div`,{className:`pointer-events-none absolute inset-0 rounded-2xl transition-opacity duration-300`,style:{opacity:d,padding:`1px`,background:`radial-gradient(400px circle at ${l.x}px ${l.y}px, color-mix(in srgb, ${v} 50%, transparent), transparent 40%)`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,maskComposite:`exclude`}}),(0,r.jsxs)(`div`,{className:`relative z-10 flex items-center gap-3`,children:[a&&(0,r.jsx)(`div`,{className:e.y(`shrink-0 transition-transform duration-500 group-hover:rotate-[15deg] group-hover:scale-110 flex items-center justify-center text-muted group-hover:text-primary-500`,`[&>svg]:w-6 [&>svg]:h-6 [&>svg]:stroke-[1.5]`),children:a}),i&&(0,r.jsx)(`h3`,{className:`font-semibold text-base m-0 leading-none text-body`,children:i})]}),(0,r.jsx)(`div`,{className:`relative z-10 text-[0.875rem] leading-[1.6] opacity-90 prose prose-neutral dark:prose-invert max-w-none [&>p]:m-0 [&>p+p]:mt-2`,children:s})]})}function S({children:t,className:n,cols:i=2,...a}){return(0,r.jsx)(`div`,{className:e.y(`grid gap-4 my-6`,{"grid-cols-1":i===1,"grid-cols-1 sm:grid-cols-2":i===2,"grid-cols-1 sm:grid-cols-2 md:grid-cols-3":i===3,"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4":i===4},n),...a,children:t})}const C={...d,...f,...b,pre:v,Field:s,Callout:o,Card:x,Cards:S};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return C}});
@@ -4,4 +4,4 @@
4
4
  * Copyright (c) 2026 Jesus Alcala
5
5
  * Licensed under the MIT License.
6
6
  */
7
- const e=require(`../chunk-Ds5LZdWN.cjs`),t=require(`../routes-Co1mRM58.cjs`),n=require(`../node-CinkUtxV.cjs`),r=require(`../doctor-COpf35L2.cjs`);let i=require(`vite`),a=require(`node:path`);a=e.n(a);let o=require(`cac`);o=e.n(o);let s=require(`@bdocs/ssg/node`);async function c(e=process.cwd()){try{let t=await(0,s.createServer)(await n.n(e,`development`));await t.listen(),t.printUrls(),t.bindCLIShortcuts({print:!0})}catch(e){r.u(`Failed to start dev server:`,e),process.exit(1)}}async function l(e=process.cwd()){try{let i=await n.n(e,`production`),o=await r.p(`docs`,e),c=await t.t(a.default.resolve(e,`docs`),o,i.base),l={};for(let e of c)if(e.path&&e.componentPath){l[e.path]=e.componentPath;let t=e.path.replace(/\/$/,``);l[t]=e.componentPath}await(0,s.build)({entry:`boltdocs/entry`,routeToSourceFileMap:l,cacheDir:a.default.resolve(e,`.boltdocs`)},i),r.d(`SSG build completed successfully!`)}catch(e){r.u(`Build failed:`,e),process.exit(1)}}async function u(e=process.cwd()){try{(await(0,i.preview)(await n.n(e,`production`))).printUrls()}catch(e){r.u(`Failed to start preview server:`,e),process.exit(1)}}const d=(0,o.default)(`boltdocs`);d.command(`[root]`,`Start development server`).alias(`dev`).action(c),d.command(`build [root]`,`Build for production`).action(l),d.command(`preview [root]`,`Preview production build`).action(u),d.command(`doctor [root]`,`Check the health of your documentation`).option(`--fix`,`Automatically fix broken internal links and sync translations`).option(`--check-external`,`Verify external links (slower)`).option(`--init`,`Initialize doctor.json with default configuration`).action(async(e,t)=>{let{doctorAction:n}=await Promise.resolve().then(()=>require(`../doctor-BQiQhCTl.cjs`));await n(e,t)}),d.command(`generate-changelog <file>`,`Generate changelog documentation from CHANGELOG.md`).option(`-o, --output <path>`,`Output folder (default: docs/changelog)`,{default:`docs/changelog`}).option(`-t, --title <text>`,`Title for changelog pages`,{default:`Changelog`}).option(`--infer-tab`,`Infer tab from folder name (default: true)`,{default:!0}).option(`-l, --limit <number>`,`Limit number of versions to generate`).action(async(e,t)=>{let{generateChangelog:n}=await Promise.resolve().then(()=>require(`../generator-DGW6pkCC.cjs`));await n(e,{output:t.output,title:t.title,inferTab:t.inferTab,limit:t.limit?parseInt(String(t.limit),10):void 0})}),d.help(),d.version(`2.0.0`),d.parse();
7
+ const e=require(`../chunk-Ds5LZdWN.cjs`),t=require(`../routes-Co1mRM58.cjs`),n=require(`../node-BsiWa41f.cjs`),r=require(`../doctor-COpf35L2.cjs`);let i=require(`vite`),a=require(`node:path`);a=e.n(a);let o=require(`cac`);o=e.n(o);let s=require(`@bdocs/ssg/node`);async function c(e=process.cwd()){try{let t=await(0,s.createServer)(await n.n(e,`development`));await t.listen(),t.printUrls(),t.bindCLIShortcuts({print:!0})}catch(e){r.u(`Failed to start dev server:`,e),process.exit(1)}}async function l(e=process.cwd()){try{let i=await n.n(e,`production`),o=await r.p(`docs`,e),c=await t.t(a.default.resolve(e,`docs`),o,i.base),l={};for(let e of c)if(e.path&&e.componentPath){l[e.path]=e.componentPath;let t=e.path.replace(/\/$/,``);l[t]=e.componentPath}await(0,s.build)({entry:`boltdocs/entry`,routeToSourceFileMap:l,cacheDir:a.default.resolve(e,`.boltdocs`)},i),r.d(`SSG build completed successfully!`),process.exit(0)}catch(e){r.u(`Build failed:`,e),process.exit(1)}}async function u(e=process.cwd()){try{(await(0,i.preview)(await n.n(e,`production`))).printUrls()}catch(e){r.u(`Failed to start preview server:`,e),process.exit(1)}}const d=(0,o.default)(`boltdocs`);d.command(`[root]`,`Start development server`).alias(`dev`).action(c),d.command(`build [root]`,`Build for production`).action(l),d.command(`preview [root]`,`Preview production build`).action(u),d.command(`doctor [root]`,`Check the health of your documentation`).option(`--fix`,`Automatically fix broken internal links and sync translations`).option(`--check-external`,`Verify external links (slower)`).option(`--init`,`Initialize doctor.json with default configuration`).action(async(e,t)=>{let{doctorAction:n}=await Promise.resolve().then(()=>require(`../doctor-BQiQhCTl.cjs`));await n(e,t)}),d.command(`generate-changelog <file>`,`Generate changelog documentation from CHANGELOG.md`).option(`-o, --output <path>`,`Output folder (default: docs/changelog)`,{default:`docs/changelog`}).option(`-t, --title <text>`,`Title for changelog pages`,{default:`Changelog`}).option(`--infer-tab`,`Infer tab from folder name (default: true)`,{default:!0}).option(`-l, --limit <number>`,`Limit number of versions to generate`).action(async(e,t)=>{let{generateChangelog:n}=await Promise.resolve().then(()=>require(`../generator-DGW6pkCC.cjs`));await n(e,{output:t.output,title:t.title,inferTab:t.inferTab,limit:t.limit?parseInt(String(t.limit),10):void 0})}),d.help(),d.version(`2.0.0`),d.parse();
@@ -4,4 +4,4 @@
4
4
  * Copyright (c) 2026 Jesus Alcala
5
5
  * Licensed under the MIT License.
6
6
  */
7
- import{i as e,o as t,r as n}from"../doctor-Dh1XP7Pz.mjs";import{t as r}from"../routes-CMUZGI6T.mjs";import{n as i}from"../node-C2nWXElP.mjs";import{preview as a}from"vite";import o from"node:path";import s from"cac";import{build as c,createServer as l}from"@bdocs/ssg/node";async function u(e=process.cwd()){try{let t=await l(await i(e,`development`));await t.listen(),t.printUrls(),t.bindCLIShortcuts({print:!0})}catch(e){n(`Failed to start dev server:`,e),process.exit(1)}}async function d(a=process.cwd()){try{let n=await i(a,`production`),s=await t(`docs`,a),l=await r(o.resolve(a,`docs`),s,n.base),u={};for(let e of l)if(e.path&&e.componentPath){u[e.path]=e.componentPath;let t=e.path.replace(/\/$/,``);u[t]=e.componentPath}await c({entry:`boltdocs/entry`,routeToSourceFileMap:u,cacheDir:o.resolve(a,`.boltdocs`)},n),e(`SSG build completed successfully!`)}catch(e){n(`Build failed:`,e),process.exit(1)}}async function f(e=process.cwd()){try{(await a(await i(e,`production`))).printUrls()}catch(e){n(`Failed to start preview server:`,e),process.exit(1)}}const p=s(`boltdocs`);p.command(`[root]`,`Start development server`).alias(`dev`).action(u),p.command(`build [root]`,`Build for production`).action(d),p.command(`preview [root]`,`Preview production build`).action(f),p.command(`doctor [root]`,`Check the health of your documentation`).option(`--fix`,`Automatically fix broken internal links and sync translations`).option(`--check-external`,`Verify external links (slower)`).option(`--init`,`Initialize doctor.json with default configuration`).action(async(e,t)=>{let{doctorAction:n}=await import(`../doctor-Dh1XP7Pz.mjs`).then(e=>e.t);await n(e,t)}),p.command(`generate-changelog <file>`,`Generate changelog documentation from CHANGELOG.md`).option(`-o, --output <path>`,`Output folder (default: docs/changelog)`,{default:`docs/changelog`}).option(`-t, --title <text>`,`Title for changelog pages`,{default:`Changelog`}).option(`--infer-tab`,`Infer tab from folder name (default: true)`,{default:!0}).option(`-l, --limit <number>`,`Limit number of versions to generate`).action(async(e,t)=>{let{generateChangelog:n}=await import(`../generator-Dv3wEmhZ.mjs`);await n(e,{output:t.output,title:t.title,inferTab:t.inferTab,limit:t.limit?parseInt(String(t.limit),10):void 0})}),p.help(),p.version(`2.0.0`),p.parse();export{};
7
+ import{i as e,o as t,r as n}from"../doctor-Dh1XP7Pz.mjs";import{t as r}from"../routes-CMUZGI6T.mjs";import{n as i}from"../node-DVSpPqT-.mjs";import{preview as a}from"vite";import o from"node:path";import s from"cac";import{build as c,createServer as l}from"@bdocs/ssg/node";async function u(e=process.cwd()){try{let t=await l(await i(e,`development`));await t.listen(),t.printUrls(),t.bindCLIShortcuts({print:!0})}catch(e){n(`Failed to start dev server:`,e),process.exit(1)}}async function d(a=process.cwd()){try{let n=await i(a,`production`),s=await t(`docs`,a),l=await r(o.resolve(a,`docs`),s,n.base),u={};for(let e of l)if(e.path&&e.componentPath){u[e.path]=e.componentPath;let t=e.path.replace(/\/$/,``);u[t]=e.componentPath}await c({entry:`boltdocs/entry`,routeToSourceFileMap:u,cacheDir:o.resolve(a,`.boltdocs`)},n),e(`SSG build completed successfully!`),process.exit(0)}catch(e){n(`Build failed:`,e),process.exit(1)}}async function f(e=process.cwd()){try{(await a(await i(e,`production`))).printUrls()}catch(e){n(`Failed to start preview server:`,e),process.exit(1)}}const p=s(`boltdocs`);p.command(`[root]`,`Start development server`).alias(`dev`).action(u),p.command(`build [root]`,`Build for production`).action(d),p.command(`preview [root]`,`Preview production build`).action(f),p.command(`doctor [root]`,`Check the health of your documentation`).option(`--fix`,`Automatically fix broken internal links and sync translations`).option(`--check-external`,`Verify external links (slower)`).option(`--init`,`Initialize doctor.json with default configuration`).action(async(e,t)=>{let{doctorAction:n}=await import(`../doctor-Dh1XP7Pz.mjs`).then(e=>e.t);await n(e,t)}),p.command(`generate-changelog <file>`,`Generate changelog documentation from CHANGELOG.md`).option(`-o, --output <path>`,`Output folder (default: docs/changelog)`,{default:`docs/changelog`}).option(`-t, --title <text>`,`Title for changelog pages`,{default:`Changelog`}).option(`--infer-tab`,`Infer tab from folder name (default: true)`,{default:!0}).option(`-l, --limit <number>`,`Limit number of versions to generate`).action(async(e,t)=>{let{generateChangelog:n}=await import(`../generator-Dv3wEmhZ.mjs`);await n(e,{output:t.output,title:t.title,inferTab:t.inferTab,limit:t.limit?parseInt(String(t.limit),10):void 0})}),p.help(),p.version(`2.0.0`),p.parse();export{};
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../utils-Clzu7jvb.cjs`),t=require(`../node-CinkUtxV.cjs`),n=require(`../doctor-COpf35L2.cjs`);exports.BoltdocsPluginStore=t.u,exports.PluginCompatibilityError=t.d,exports.PluginError=t.f,exports.PluginHookError=t.p,exports.PluginLifecycleManager=t.a,exports.PluginPermissionError=t.m,exports.PluginSandbox=t.o,exports.PluginValidationError=t.h,exports.SecurePluginSchema=t.s,exports.createPlugin=t.i,exports.createViteConfig=t.n,exports.default=t.t,exports.defineConfig=n.h,exports.generateEntryCode=t.r,exports.hasPermission=t.c,exports.normalizePath=e.l,exports.resolveConfig=n.p,exports.sanitizeFilename=e.d,exports.validatePlugins=t.l;
6
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../utils-Clzu7jvb.cjs`),t=require(`../node-BsiWa41f.cjs`),n=require(`../doctor-COpf35L2.cjs`);exports.BoltdocsPluginStore=t.u,exports.PluginCompatibilityError=t.d,exports.PluginError=t.f,exports.PluginHookError=t.p,exports.PluginLifecycleManager=t.a,exports.PluginPermissionError=t.m,exports.PluginSandbox=t.o,exports.PluginValidationError=t.h,exports.SecurePluginSchema=t.s,exports.createPlugin=t.i,exports.createViteConfig=t.n,exports.default=t.t,exports.defineConfig=n.h,exports.generateEntryCode=t.r,exports.hasPermission=t.c,exports.normalizePath=e.l,exports.resolveConfig=n.p,exports.sanitizeFilename=e.d,exports.validatePlugins=t.l;
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- import{c as e,o as t}from"../doctor-Dh1XP7Pz.mjs";import{d as n,l as r}from"../utils-BxNAXhZZ.mjs";import{a as i,c as a,d as o,f as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v}from"../node-C2nWXElP.mjs";export{v as BoltdocsPluginStore,o as PluginCompatibilityError,s as PluginError,m as PluginHookError,i as PluginLifecycleManager,d as PluginPermissionError,p as PluginSandbox,c as PluginValidationError,g as SecurePluginSchema,l as createPlugin,f as createViteConfig,_ as default,e as defineConfig,h as generateEntryCode,a as hasPermission,r as normalizePath,t as resolveConfig,n as sanitizeFilename,u as validatePlugins};
6
+ import{c as e,o as t}from"../doctor-Dh1XP7Pz.mjs";import{d as n,l as r}from"../utils-BxNAXhZZ.mjs";import{a as i,c as a,d as o,f as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v}from"../node-DVSpPqT-.mjs";export{v as BoltdocsPluginStore,o as PluginCompatibilityError,s as PluginError,m as PluginHookError,i as PluginLifecycleManager,d as PluginPermissionError,p as PluginSandbox,c as PluginValidationError,g as SecurePluginSchema,l as createPlugin,f as createViteConfig,_ as default,e as defineConfig,h as generateEntryCode,a as hasPermission,r as normalizePath,t as resolveConfig,n as sanitizeFilename,u as validatePlugins};
@@ -71,8 +71,7 @@ ${e.filter(e=>e.seo?.noindex||typeof e.seo?.robots==`string`&&e.seo.robots.inclu
71
71
  </body>`)),e}var R=class e extends Error{pluginName;constructor(t,n){super(`[plugin:${t}] ${n}`),this.name=`PluginError`,this.pluginName=t,Object.setPrototypeOf(this,e.prototype)}},z=class e extends R{constructor(t,n){super(t,`Validation failed: ${n}`),this.name=`PluginValidationError`,Object.setPrototypeOf(this,e.prototype)}},ue=class e extends R{constructor(t,n){super(t,`Compatibility error: ${n}`),this.name=`PluginCompatibilityError`,Object.setPrototypeOf(this,e.prototype)}},B=class e extends R{constructor(t,n){super(t,`Missing required permission: '${n}'`),this.name=`PluginPermissionError`,Object.setPrototypeOf(this,e.prototype)}},de=class e extends R{hookName;constructor(t,n,r){super(t,`Error in hook '${n}': ${r.message}`),this.name=`PluginHookError`,this.hookName=n,this.stack=r.stack,Object.setPrototypeOf(this,e.prototype)}},fe=class{data=new Map;getNamespaceKey(e,t){return`${e}:${t}`}get(e,t){let n=this.getNamespaceKey(e,t),r=this.data.get(n);if(r!==void 0)return typeof r==`object`&&r?JSON.parse(JSON.stringify(r)):r}set(e,t,n){let r=this.getNamespaceKey(e,t),i=typeof n==`object`&&n?JSON.parse(JSON.stringify(n)):n;this.data.set(r,i)}has(e,t){let n=this.getNamespaceKey(e,t);return this.data.has(n)}};const pe=i._.extend({version:u.z.string().optional(),boltdocsVersion:u.z.string().optional(),permissions:u.z.array(u.z.string()).optional(),hooks:u.z.object({beforeBuild:u.z.function().optional(),afterBuild:u.z.function().optional(),beforeDev:u.z.function().optional(),afterDev:u.z.function().optional(),configResolved:u.z.function().optional(),buildEnd:u.z.function().optional()}).optional()});function me(e,t){let n=[],r=new Set;for(let i of e){let e=pe.safeParse(i);if(!e.success)throw new z(i.name||`unknown`,e.error.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `));let a=e.data;if(r.has(a.name))throw new z(a.name,`Duplicate plugin name detected`);if(r.add(a.name),a.boltdocsVersion&&!m.default.satisfies(t,a.boltdocsVersion))throw new ue(a.name,`Plugin expects Boltdocs version ${a.boltdocsVersion}, but current is ${t}`);if(a.components){for(let[e,t]of Object.entries(a.components))if((t.includes(`..`)||h.default.isAbsolute(t))&&t.includes(`..`))throw new z(a.name,`Component '${e}' has an invalid path: traversal sequences are not allowed.`)}n.push(a)}return n}function V(e,t){return e.permissions?e.permissions.includes(t):!1}var H=class e{static checkPermission(e,t){if(!V(e,t))throw new B(e.name,t)}static getSanitizedCapabilities(e){return{remarkPlugins:V(e,`mdx:remark`)?e.remarkPlugins:[],rehypePlugins:V(e,`mdx:rehype`)?e.rehypePlugins:[],vitePlugins:V(e,`vite:config`)?e.vitePlugins:[],components:V(e,`components`)?e.components:{}}}static async executeWithIsolation(t,n,r,i){try{return e.checkPermission(t,n),await i()}catch(e){if(e instanceof B){console.warn(`[boltdocs] Skipping hook '${r}' for plugin '${t.name}': ${e.message}`);return}throw e}}},he=class{plugins;config;store;constructor(e,t){this.plugins=e,this.config=t,this.store=new fe}async runHook(e,...t){let n=this.getSortedPlugins();for(let r of n){if(!r.hooks?.[e])continue;let n=this.createContext(r),i=e.toLowerCase().includes(`build`),a=e.toLowerCase().includes(`dev`),o=i?`hooks:build`:a?`hooks:dev`:void 0;try{o?await H.executeWithIsolation(r,o,e,()=>r.hooks[e](n,...t)):await r.hooks[e](n,...t)}catch(t){let i=new de(r.name,e,t instanceof Error?t:Error(String(t)));n.logger.error(i)}}}getSortedPlugins(){let e=this.plugins.filter(e=>e.enforce===`pre`),t=this.plugins.filter(e=>!e.enforce),n=this.plugins.filter(e=>e.enforce===`post`);return[...e,...t,...n]}createContext(e){return{config:Object.freeze({...this.config}),meta:{name:e.name,version:e.version,boltdocsVersion:e.boltdocsVersion},store:{get:(e,t)=>this.store.get(e,t),set:(e,t,n)=>this.store.set(e,t,n),has:(e,t)=>this.store.has(e,t)},logger:this.createLogger(e.name)}}createLogger(e){let t=`[plugin:${e}]`;return{info:e=>console.log(`${t} INFO: ${e}`),warn:e=>console.warn(`${t} WARN: ${e}`),error:e=>{let n=e instanceof Error?e.message:e;console.error(`${t} ERROR: ${n}`)},debug:e=>console.debug(`${t} DEBUG: ${e}`)}}};function ge(e){return e}function U(e){return typeof e==`string`?[e]:Array.isArray(e)?e.flatMap(U):e&&typeof e==`object`?Object.values(e).flatMap(U):[]}const _e=new Set([`title`,`description`,`permalink`,`sidebarPosition`,`sidebarLabel`,`sidebarHidden`,`hidden`,`category`,`order`,`badge`,`icon`,`date`,`lastUpdated`,`groupTitle`,`groupPosition`,`seo`]);function ve(e){let t=[];for(let n of e){let e=``;n.frontmatter&&(e=U(Object.entries(n.frontmatter).filter(([e])=>!_e.has(e)).map(([e,t])=>t)).join(` `));let r=e?`${n._content||``} ${e}`:n._content||``;if(t.push({id:n.path,title:n.title,content:r,url:n.path,display:n.groupTitle?`${n.groupTitle} > ${n.title}`:n.title,locale:n.locale,version:n.version}),n.headings)for(let e of n.headings)t.push({id:`${n.path}#${e.id}`,title:e.text,content:`${e.text} in ${n.title}`,url:`${n.path}#${e.id}`,display:`${n.title} > ${e.text}`,locale:n.locale,version:n.version})}return t}function W(e,n,r=!1){let i=h.default.resolve(process.cwd(),`index.css`),a=l.default.existsSync(i)?`import './index.css';`:``,o=n?.plugins?.flatMap(e=>Object.entries(e.components||{}))||[],s=o.map(([e,n])=>`import * as _comp_${e} from '${t.l(n)}';
72
72
  const ${e} = _comp_${e}.default || _comp_${e}['${e}'] || _comp_${e};`).join(`
73
73
  `),c=o.map(([e])=>e).join(`, `),u=h.default.basename(e.docsDir||`docs`),d=h.default.resolve(process.cwd(),e.docsDir||`docs`),f=[`tsx`,`ts`,`jsx`,`js`].map(e=>h.default.resolve(d,`pages-external/index.${e}`)).find(e=>l.default.existsSync(e));return`
74
- import { ViteReactSSG } from '@bdocs/ssg';
75
- import { createRoutes } from 'boltdocs/client';
74
+ import { ViteReactSSG, createRoutes } from 'boltdocs/client';
76
75
  import _routes from 'virtual:boltdocs-routes.ts';
77
76
  import _config from 'virtual:boltdocs-config.ts';
78
77
  import _user_mdx_components from 'virtual:boltdocs-mdx-components.tsx';
@@ -105,7 +104,7 @@ export const createRoot = ViteReactSSG(
105
104
  const mdxComponents = components.default || components;
106
105
  export default mdxComponents;
107
106
  export * from '${e}';`}return`export default {};`}if(u===`layout`){let e=[`tsx`,`jsx`],n=null;for(let t of e){let e=c.default.resolve(a,`layout.${t}`);if(d.default.existsSync(e)){n=e;break}}if(n)return`import UserLayout from '${t.l(n)}';
108
- export default UserLayout;`;throw Error(`[Boltdocs] Layout file not found. A 'layout.tsx' or 'layout.jsx' file is mandatory in your docs directory. Please create one to define your site structure.`)}if(u===`icons`){let e=[`tsx`,`jsx`,`ts`,`js`],n=null;for(let t of e){let e=c.default.resolve(a,`icons.${t}`);if(d.default.existsSync(e)){n=e;break}}return n?`import * as icons from '${t.l(n)}';\nexport default icons;`:`export default {};`}if(u===`search`){if(!K){let e=ve(await r.t(a,l));K=`export default ${JSON.stringify(e,null,2)};`}return K}if(u===`client`){let e=__dirname,n=``;for(;e&&e!==c.default.parse(e).root;){let r=c.default.join(e,`src/client/index.ts`),i=c.default.join(e,`dist/client/index.mjs`),a=c.default.join(e,`client/index.ts`);if(d.default.existsSync(r)){n=t.l(r);break}if(d.default.existsSync(i)){n=t.l(i);break}if(d.default.existsSync(a)){n=t.l(a);break}e=c.default.dirname(e)}if(!n)throw Error(`[boltdocs] Could not resolve boltdocs/client entry point starting from ${__dirname}`);return`export * from '${n}';`}}}}const xe={"X-Content-Type-Options":`nosniff`,"X-Frame-Options":`DENY`,"X-XSS-Protection":`1; mode=block`,"Referrer-Policy":`strict-origin-when-cross-origin`,"Permissions-Policy":`camera=(), microphone=(), geolocation=()`,"Strict-Transport-Security":`max-age=31536000; includeSubDomains`};function Se(e){let t=process.env.NODE_ENV===`development`,n={"default-src":[`'self'`],"script-src":[`'self'`,`'unsafe-inline'`],"style-src":[`'self'`,`'unsafe-inline'`],"img-src":[`'self'`,`data:`,`https:`],"font-src":[`'self'`],"connect-src":[`'self'`]};return t&&(n[`script-src`]=[`'self'`,`'unsafe-eval'`,`'unsafe-inline'`],n[`style-src`]=[`'self'`,`'unsafe-inline'`]),Object.entries(n).map(([e,t])=>`${e} ${t.join(` `)}`).join(`; `)}const q=new Map;async function Ce(e){try{let{data:n}=await t.u(e),r=JSON.stringify(n);return f.default.createHash(`md5`).update(r).digest(`hex`)}catch{return``}}function we(e){return q.get(e)}function Te(e,t){q.set(e,t)}function Ee(e){q.delete(e)}function J(e,t){let n=e.moduleGraph.getModuleById(`\0virtual:boltdocs-${t}.ts`);n&&e.moduleGraph.invalidateModule(n)}function De(e,n,a,o,s){let l=new Map;return{name:`vite-plugin-boltdocs-dev-server`,apply:`serve`,async configureServer(o){let u=s();await u?.runHook(`beforeDev`),i.s(e,process.cwd(),a()).catch(e=>{console.error(`[boltdocs] Failed to generate initial link tree:`,e)}),setTimeout(async()=>{try{let{generateRoutes:t}=await Promise.resolve().then(()=>require(`./routes-CHf76Ye4.cjs`)),n=await t(e,a());for(let e of n)if(e.filePath){let t=c.default.relative(process.cwd(),e.filePath).replace(/\\/g,`/`),n=t.startsWith(`/`)?t:`/${t}`;await o.transformRequest(n).catch(()=>{}),await new Promise(e=>setTimeout(e,50))}}catch{}},1e3),o.middlewares.use((e,t,n)=>{process.env.NODE_ENV===`production`&&Object.entries(xe).forEach(([e,n])=>{t.setHeader(e,n)});let r=a();r.security?.enableCSP&&t.setHeader(`Content-Security-Policy`,Se(r)),n()}),o.middlewares.use((e,t,n)=>{if(e.url===`/robots.txt`){n();return}n()}),o.middlewares.use(async(e,t,n)=>{let r=e.url?.split(`?`)[0]||`/`,i=e.headers.accept||``,s=a(),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(r);if(i.includes(`text/html`)&&!c){let n=ce(s);n=le(n,s),n=await o.transformIndexHtml(e.url||`/`,n),t.statusCode=200,t.setHeader(`Content-Type`,`text/html`),t.end(n);return}n()});let d=i.f.map(e=>c.default.resolve(process.cwd(),e)),f=[`tsx`,`jsx`].map(t=>c.default.resolve(e,`layout.${t}`)),p=[`tsx`,`ts`,`jsx`,`js`],m=p.map(t=>c.default.resolve(e,`mdx-components.${t}`)),h=p.map(t=>c.default.resolve(e,`pages-external/index.${t}`)),g=p.map(t=>c.default.resolve(e,`icons.${t}`));o.watcher.add([...d,...m,...f,...h,...g]);let _=async(s,u)=>{try{let d=t.l(s);if(i.f.some(e=>d.endsWith(e))){o.restart();return}if(p.some(e=>d.endsWith(`mdx-components.${e}`))){i.g(a(),e),J(o,`mdx-components.tsx`),o.ws.send({type:`full-reload`});return}if(p.some(e=>d.endsWith(`icons.${e}`))){J(o,`icons.tsx`),o.ws.send({type:`full-reload`});return}if(d.endsWith(`layout.tsx`)||d.endsWith(`layout.jsx`)){J(o,`layout.tsx`),o.ws.send({type:`full-reload`});return}if(d.includes(`/pages-external/`)||d.includes(`\\pages-external\\`)){J(o,`entry`),o.ws.send({type:`full-reload`});return}if(!d.toLowerCase().startsWith(n.toLowerCase())||!t.s(d))return;if(u===`add`||u===`unlink`){u===`unlink`&&Ee(s),r.n(),ye();let t=a();i.g(t,e),J(o,`config`),J(o,`routes`),J(o,`search`),i.s(e,process.cwd(),t).catch(e=>{console.error(`[boltdocs] Failed to update link tree:`,e)}),o.ws.send({type:`custom`,event:`boltdocs:config-update`,data:{theme:t?.theme,i18n:t?.i18n,versions:t?.versions,siteUrl:t?.siteUrl}}),o.ws.send({type:`full-reload`});return}l.has(d)&&clearTimeout(l.get(d)),l.set(d,setTimeout(async()=>{l.delete(d);try{let n=we(s),i=await Ce(s);Te(s,i),r.r(s),n!==void 0&&n!==i&&(J(o,`routes`),J(o,`search`));let a=t.l(c.default.relative(e,s)),l=o.moduleGraph.getModulesByFile(d);if(l)for(let e of l)o.moduleGraph.invalidateModule(e);o.ws.send({type:`custom`,event:`boltdocs:mdx-update`,data:{file:d,relPath:a}})}catch(e){console.error(`[boltdocs] HMR error processing content change:`,e)}},150))}catch(e){console.error(`[boltdocs] HMR error during ${u} event:`,e)}};o.watcher.on(`add`,e=>_(e,`add`)),o.watcher.on(`unlink`,e=>_(e,`unlink`)),o.watcher.on(`change`,e=>_(e,`change`)),await u?.runHook(`afterDev`)},handleHotUpdate({file:e,server:r}){let i=t.l(e);if(i.toLowerCase().startsWith(n.toLowerCase())&&t.s(i))return[]}}}function Oe(e={},n){let a=c.default.resolve(process.cwd(),e.docsDir||`docs`),o=t.l(a),l=n,u,f=!1,m,h=[],g=()=>l;return[{name:`vite-plugin-boltdocs`,enforce:`pre`,async config(e,t){f=t.command===`build`;let n=e.envDir||process.cwd(),o=(0,s.loadEnv)(t.mode,n,``);Object.assign(process.env,o),l||=await i.m(a);let u=(await Promise.resolve().then(()=>require(`./package-BMYLDBBP.cjs`))).version,p=me(l.plugins||[],u);return l.plugins=p,m=new he(p,l),h=p.flatMap(e=>H.getSanitizedCapabilities(e).vitePlugins||[]),f&&await m.runHook(`beforeBuild`),{ssgOptions:{entry:`boltdocs/entry`,htmlEntry:`index.html`,dirStyle:`nested`,includeAllRoutes:!0,mock:!0,script:`async`,beastiesOptions:{preload:`media`},onFinished:async e=>{let t=oe(ae(await r.t(a,l)),l);t&&d.default.writeFileSync(c.default.join(e,`sitemap.xml`),t);let n=se(l);d.default.writeFileSync(c.default.join(e,`robots.txt`),n)}},build:{ssrManifest:f},async config(){return{optimizeDeps:{include:[`react`,`react-dom`,`react-dom/client`,`react-router-dom`,`react-helmet-async`],exclude:[`boltdocs`,`boltdocs/client`]},resolve:{dedupe:[`react`,`react-dom`]}}}}},configResolved(e){u=e,m?.runHook(`configResolved`,l)},transformIndexHtml:{order:`pre`,handler(e){return le(e,l)}},async buildEnd(){let{pool:e}=await Promise.resolve().then(()=>require(`./worker-pool-BwU8ckrg.cjs`));await e.terminate()},async closeBundle(){!f||u?.build?.ssr||(await m?.runHook(`afterBuild`),await m?.runHook(`buildEnd`))}},be(e,g,()=>u,a),De(a,o,g,e=>{l=e},()=>m),{...(0,p.ViteImageOptimizer)({includePublic:!0,png:{quality:80},jpeg:{quality:80},jpg:{quality:80},webp:{quality:80},avif:{quality:80},svg:{multipass:!0,plugins:[{name:`preset-default`}]}}),apply:`build`},...h]}const Y=new n.r(`mdx`),ke=[b.default.default||b.default,x.default.default||x.default,S.default.default||S.default,C.default.default||C.default,w.default.default||w.default,T.default.default||T.default,E.default.default||E.default],Ae=[D.default,O.default,k.default,A.default,j.default,M.default,N.default,P.default,F.default,re.default,ie.default,I.default,L.default];let je=null,X=null;const Me=()=>(je??=(0,te.createJavaScriptRegexEngine)(),je),Ne=async e=>X||(X=(0,ne.createHighlighterCore)({themes:ke,langs:Ae,engine:Me()}),X),Z={JSX_FLOW_ELEMENT:`mdxJsxFlowElement`,JSX_TEXT_ELEMENT:`mdxJsxTextElement`,JSX_ATTRIBUTE:`mdxJsxAttribute`,ELEMENT:`element`,TEXT:`text`,CODE:`code`},Pe={PRE:`pre`,CODE:`code`},Q={TITLE:`data-title`,LANG:`data-lang`,HIGHLIGHTED:`data-highlighted`,HIGHLIGHTED_HTML:`data-highlighted-html`},$={LINE_NUMBERS:`shiki-line-numbers`,WORD_WRAP:`shiki-word-wrap`,FALLBACK:`shiki-fallback`},Fe={LIGHT:`github-light`,DARK:`github-dark`},Ie={LANG:`plaintext`,MDX_DEFAULT_LANG:`text`},Le=(e={})=>{let{activateByDefault:t=!1}=e;return{name:`boltdocs:line-numbers`,pre(e){let n=this.options.meta?.lineNumbers===!0;(t||n)&&this.addClassToHast(e,$.LINE_NUMBERS)}}},Re=(e={})=>{let{activateByDefault:t=!1}=e;return{name:`boltdocs:word-wrap`,pre(e){let n=this.options.meta?.wordWrap===!0;(t||n)&&this.addClassToHast(e,$.WORD_WRAP)}}},ze=()=>({name:`AddTitleProperty`,pre(e){let t=this.options.meta?.title;t&&(e.properties[Q.TITLE]=t)}}),Be=()=>({name:`AddLanguageProperty`,pre(e){e.properties[Q.LANG]=this.options.lang||Ie.LANG}});function Ve(e){let t={};if(!e)return t;/lineNumbers|showLineNumbers/.test(e)&&(t.lineNumbers=!0),/wordWrap|word-wrap/.test(e)&&(t.wordWrap=!0);let n=e.match(/title=(["'])(.*?)\1/);return n&&(t.title=n[2]),t}var He=class{config;constructor(e){this.config=e}getTheme(){return this.config?.theme?.codeTheme||{light:Fe.LIGHT,dark:Fe.DARK}}async getHighlighter(){return await Ne(this.getTheme())}getOptions(e,t){let n=this.getTheme(),r={},i=``;typeof t==`string`?(i=t,r=Ve(t)):t&&(r=t,i=t.__raw||``);let a={lang:e||Ie.LANG,meta:{__raw:i,...r},transformers:[Le(),Re(),ze(),Be()]};return typeof n==`object`?a.themes={light:n.light,dark:n.dark}:a.theme=n,a}async render(e,t,n){try{let r=await this.getHighlighter(),i=this.getOptions(t,n);return r.codeToHtml(e,i)}catch(t){return console.error(`[ShikiAdapter] Failed to render code:`,t),`<pre class="${$.FALLBACK}"><code>${Ue(e)}</code></pre>`}}};function Ue(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`)}let We=null,Ge;function Ke(e){let t=JSON.stringify(e?.theme?.codeTheme||null);return(We===null||Ge!==t)&&(We=new He(e),Ge=t),We}function qe(e){let t=Ke(e);return async e=>{let n=await t.getHighlighter();(0,ee.visit)(e,Z.ELEMENT,e=>{if(e.tagName===Pe.PRE&&e.children?.[0]?.type===Z.ELEMENT&&e.children[0].tagName===Pe.CODE){let r=e.children[0],i=(r.properties?.className||[]).find(e=>e.startsWith(`language-`)),a=i?i.slice(9):Ie.MDX_DEFAULT_LANG;if(a===`mermaid`)return;let o=r.children?.[0]?.value||``,s=Ve(r.properties?.metastring||r.data?.meta||``),c=t.getOptions(a,s),l=``;try{l=n.codeToHtml(o,c)}catch(e){console.error(`[rehypeShiki] Failed to highlight code block:`,e),l=`<pre class="${$.FALLBACK}"><code>${Ue(o)}</code></pre>`}e.properties=e.properties||{},s.title&&(e.properties[Q.TITLE]=s.title),e.properties[Q.HIGHLIGHTED]=`true`,e.properties[Q.HIGHLIGHTED_HTML]=l,e.properties[Q.LANG]=a,e.children=[]}})}}function Je(){return e=>{(0,ee.visit)(e,Z.CODE,e=>{e.meta&&(e.data=e.data||{},e.data.hProperties=e.data.hProperties||{},e.data.hProperties.metastring=e.meta)})}}let Ye=!1;function Xe(e,t=g.default){let n=e?.plugins?.flatMap(e=>H.getSanitizedCapabilities(e).remarkPlugins||[])||[],r=e?.plugins?.flatMap(e=>H.getSanitizedCapabilities(e).rehypePlugins||[])||[],i=t({remarkPlugins:[_.default,v.default,Je,...n],rehypePlugins:[y.default,[qe,e],...r],jsxRuntime:`automatic`});return{...i,name:`vite-plugin-boltdocs-mdx`,async buildStart(){Ye||=(await Y.load(),!0),i.buildStart&&await i.buildStart.call(this)},async transform(e,t,n){let[r]=t.split(`?`);if(!r.endsWith(`.md`)&&!r.endsWith(`.mdx`))return i.transform?.call(this,e,t,n);let a=`${r}:${f.default.createHash(`md5`).update(e).digest(`hex`)}:${process.env.NODE_ENV===`production`?`prod`:`dev`}:v3`,o=await Y.getAsync(a);if(o)return{code:o,map:null};let s=await i.transform.call(this,e,r,n);return s&&typeof s==`object`&&s.code&&(process.env.NODE_ENV!==`production`&&(s.code+=`
107
+ export default UserLayout;`;throw Error(`[Boltdocs] Layout file not found. A 'layout.tsx' or 'layout.jsx' file is mandatory in your docs directory. Please create one to define your site structure.`)}if(u===`icons`){let e=[`tsx`,`jsx`,`ts`,`js`],n=null;for(let t of e){let e=c.default.resolve(a,`icons.${t}`);if(d.default.existsSync(e)){n=e;break}}return n?`import * as icons from '${t.l(n)}';\nexport default icons;`:`export default {};`}if(u===`search`){if(!K){let e=ve(await r.t(a,l));K=`export default ${JSON.stringify(e,null,2)};`}return K}if(u===`client`){let e=__dirname,n=``;for(;e&&e!==c.default.parse(e).root;){let r=c.default.join(e,`src/client/index.ts`),i=c.default.join(e,`dist/client/index.mjs`),a=c.default.join(e,`client/index.ts`);if(d.default.existsSync(r)){n=t.l(r);break}if(d.default.existsSync(i)){n=t.l(i);break}if(d.default.existsSync(a)){n=t.l(a);break}e=c.default.dirname(e)}if(!n)throw Error(`[boltdocs] Could not resolve boltdocs/client entry point starting from ${__dirname}`);return`export * from '${n}';`}}}}const xe={"X-Content-Type-Options":`nosniff`,"X-Frame-Options":`DENY`,"X-XSS-Protection":`1; mode=block`,"Referrer-Policy":`strict-origin-when-cross-origin`,"Permissions-Policy":`camera=(), microphone=(), geolocation=()`,"Strict-Transport-Security":`max-age=31536000; includeSubDomains`};function Se(e){let t=process.env.NODE_ENV===`development`,n={"default-src":[`'self'`],"script-src":[`'self'`,`'unsafe-inline'`],"style-src":[`'self'`,`'unsafe-inline'`],"img-src":[`'self'`,`data:`,`https:`],"font-src":[`'self'`],"connect-src":[`'self'`]};return t&&(n[`script-src`]=[`'self'`,`'unsafe-eval'`,`'unsafe-inline'`],n[`style-src`]=[`'self'`,`'unsafe-inline'`]),Object.entries(n).map(([e,t])=>`${e} ${t.join(` `)}`).join(`; `)}const q=new Map;async function Ce(e){try{let{data:n}=await t.u(e),r=JSON.stringify(n);return f.default.createHash(`md5`).update(r).digest(`hex`)}catch{return``}}function we(e){return q.get(e)}function Te(e,t){q.set(e,t)}function Ee(e){q.delete(e)}function J(e,t){let n=e.moduleGraph.getModuleById(`\0virtual:boltdocs-${t}.ts`);n&&e.moduleGraph.invalidateModule(n)}function De(e,n,a,o,s){let l=new Map;return{name:`vite-plugin-boltdocs-dev-server`,apply:`serve`,async configureServer(o){let u=s();await u?.runHook(`beforeDev`),i.s(e,process.cwd(),a()).catch(e=>{console.error(`[boltdocs] Failed to generate initial link tree:`,e)}),setTimeout(async()=>{try{let{generateRoutes:t}=await Promise.resolve().then(()=>require(`./routes-CHf76Ye4.cjs`)),n=await t(e,a());for(let e of n)if(e.filePath){let t=c.default.relative(process.cwd(),e.filePath).replace(/\\/g,`/`),n=t.startsWith(`/`)?t:`/${t}`;await o.transformRequest(n).catch(()=>{}),await new Promise(e=>setTimeout(e,50))}}catch{}},1e3),o.middlewares.use((e,t,n)=>{process.env.NODE_ENV===`production`&&Object.entries(xe).forEach(([e,n])=>{t.setHeader(e,n)});let r=a();r.security?.enableCSP&&t.setHeader(`Content-Security-Policy`,Se(r)),n()}),o.middlewares.use((e,t,n)=>{if(e.url===`/robots.txt`){n();return}n()}),o.middlewares.use(async(e,t,n)=>{let r=e.url?.split(`?`)[0]||`/`,i=e.headers.accept||``,s=a(),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(r);if(i.includes(`text/html`)&&!c){let n=ce(s);n=le(n,s),n=await o.transformIndexHtml(e.url||`/`,n),t.statusCode=200,t.setHeader(`Content-Type`,`text/html`),t.end(n);return}n()});let d=i.f.map(e=>c.default.resolve(process.cwd(),e)),f=[`tsx`,`jsx`].map(t=>c.default.resolve(e,`layout.${t}`)),p=[`tsx`,`ts`,`jsx`,`js`],m=p.map(t=>c.default.resolve(e,`mdx-components.${t}`)),h=p.map(t=>c.default.resolve(e,`pages-external/index.${t}`)),g=p.map(t=>c.default.resolve(e,`icons.${t}`));o.watcher.add([...d,...m,...f,...h,...g]);let _=async(s,u)=>{try{let d=t.l(s);if(i.f.some(e=>d.endsWith(e))){o.restart();return}if(p.some(e=>d.endsWith(`mdx-components.${e}`))){i.g(a(),e),J(o,`mdx-components.tsx`),o.ws.send({type:`full-reload`});return}if(p.some(e=>d.endsWith(`icons.${e}`))){J(o,`icons.tsx`),o.ws.send({type:`full-reload`});return}if(d.endsWith(`layout.tsx`)||d.endsWith(`layout.jsx`)){J(o,`layout.tsx`),o.ws.send({type:`full-reload`});return}if(d.includes(`/pages-external/`)||d.includes(`\\pages-external\\`)){J(o,`entry`),o.ws.send({type:`full-reload`});return}if(!d.toLowerCase().startsWith(n.toLowerCase())||!t.s(d))return;if(u===`add`||u===`unlink`){u===`unlink`&&Ee(s),r.n(),ye();let t=a();i.g(t,e),J(o,`config`),J(o,`routes`),J(o,`search`),i.s(e,process.cwd(),t).catch(e=>{console.error(`[boltdocs] Failed to update link tree:`,e)}),o.ws.send({type:`custom`,event:`boltdocs:config-update`,data:{theme:t?.theme,i18n:t?.i18n,versions:t?.versions,siteUrl:t?.siteUrl}}),o.ws.send({type:`full-reload`});return}l.has(d)&&clearTimeout(l.get(d)),l.set(d,setTimeout(async()=>{l.delete(d);try{let n=we(s),i=await Ce(s);Te(s,i),r.r(s),n!==void 0&&n!==i&&(J(o,`routes`),J(o,`search`));let a=t.l(c.default.relative(e,s)),l=o.moduleGraph.getModulesByFile(d);if(l)for(let e of l)o.moduleGraph.invalidateModule(e);o.ws.send({type:`custom`,event:`boltdocs:mdx-update`,data:{file:d,relPath:a}})}catch(e){console.error(`[boltdocs] HMR error processing content change:`,e)}},150))}catch(e){console.error(`[boltdocs] HMR error during ${u} event:`,e)}};o.watcher.on(`add`,e=>_(e,`add`)),o.watcher.on(`unlink`,e=>_(e,`unlink`)),o.watcher.on(`change`,e=>_(e,`change`)),await u?.runHook(`afterDev`)},handleHotUpdate({file:e,server:r}){let i=t.l(e);if(i.toLowerCase().startsWith(n.toLowerCase())&&t.s(i))return[]}}}function Oe(e={},n){let a=c.default.resolve(process.cwd(),e.docsDir||`docs`),o=t.l(a),l=n,u,f=!1,m,h=[],g=()=>l;return[{name:`vite-plugin-boltdocs`,enforce:`pre`,async config(e,t){f=t.command===`build`;let n=e.envDir||process.cwd(),o=(0,s.loadEnv)(t.mode,n,``);Object.assign(process.env,o),l||=await i.m(a);let u=(await Promise.resolve().then(()=>require(`./package-Swb4Rj3z.cjs`))).version,p=me(l.plugins||[],u);return l.plugins=p,m=new he(p,l),h=p.flatMap(e=>H.getSanitizedCapabilities(e).vitePlugins||[]),f&&await m.runHook(`beforeBuild`),{ssgOptions:{entry:`boltdocs/entry`,htmlEntry:`index.html`,dirStyle:`nested`,includeAllRoutes:!0,mock:!0,script:`async`,beastiesOptions:{preload:`media`},onFinished:async e=>{let t=oe(ae(await r.t(a,l)),l);t&&d.default.writeFileSync(c.default.join(e,`sitemap.xml`),t);let n=se(l);d.default.writeFileSync(c.default.join(e,`robots.txt`),n)}},build:{ssrManifest:f},async config(){return{optimizeDeps:{include:[`react`,`react-dom`,`react-dom/client`,`react-router-dom`,`react-helmet-async`],exclude:[`boltdocs`,`boltdocs/client`]},resolve:{dedupe:[`react`,`react-dom`]}}}}},configResolved(e){u=e,m?.runHook(`configResolved`,l)},transformIndexHtml:{order:`pre`,handler(e){return le(e,l)}},async buildEnd(){let{pool:e}=await Promise.resolve().then(()=>require(`./worker-pool-BwU8ckrg.cjs`));await e.terminate()},async closeBundle(){!f||u?.build?.ssr||(await m?.runHook(`afterBuild`),await m?.runHook(`buildEnd`))}},be(e,g,()=>u,a),De(a,o,g,e=>{l=e},()=>m),{...(0,p.ViteImageOptimizer)({includePublic:!0,png:{quality:80},jpeg:{quality:80},jpg:{quality:80},webp:{quality:80},avif:{quality:80},svg:{multipass:!0,plugins:[{name:`preset-default`}]}}),apply:`build`},...h]}const Y=new n.r(`mdx`),ke=[b.default.default||b.default,x.default.default||x.default,S.default.default||S.default,C.default.default||C.default,w.default.default||w.default,T.default.default||T.default,E.default.default||E.default],Ae=[D.default,O.default,k.default,A.default,j.default,M.default,N.default,P.default,F.default,re.default,ie.default,I.default,L.default];let je=null,X=null;const Me=()=>(je??=(0,te.createJavaScriptRegexEngine)(),je),Ne=async e=>X||(X=(0,ne.createHighlighterCore)({themes:ke,langs:Ae,engine:Me()}),X),Z={JSX_FLOW_ELEMENT:`mdxJsxFlowElement`,JSX_TEXT_ELEMENT:`mdxJsxTextElement`,JSX_ATTRIBUTE:`mdxJsxAttribute`,ELEMENT:`element`,TEXT:`text`,CODE:`code`},Pe={PRE:`pre`,CODE:`code`},Q={TITLE:`data-title`,LANG:`data-lang`,HIGHLIGHTED:`data-highlighted`,HIGHLIGHTED_HTML:`data-highlighted-html`},$={LINE_NUMBERS:`shiki-line-numbers`,WORD_WRAP:`shiki-word-wrap`,FALLBACK:`shiki-fallback`},Fe={LIGHT:`github-light`,DARK:`github-dark`},Ie={LANG:`plaintext`,MDX_DEFAULT_LANG:`text`},Le=(e={})=>{let{activateByDefault:t=!1}=e;return{name:`boltdocs:line-numbers`,pre(e){let n=this.options.meta?.lineNumbers===!0;(t||n)&&this.addClassToHast(e,$.LINE_NUMBERS)}}},Re=(e={})=>{let{activateByDefault:t=!1}=e;return{name:`boltdocs:word-wrap`,pre(e){let n=this.options.meta?.wordWrap===!0;(t||n)&&this.addClassToHast(e,$.WORD_WRAP)}}},ze=()=>({name:`AddTitleProperty`,pre(e){let t=this.options.meta?.title;t&&(e.properties[Q.TITLE]=t)}}),Be=()=>({name:`AddLanguageProperty`,pre(e){e.properties[Q.LANG]=this.options.lang||Ie.LANG}});function Ve(e){let t={};if(!e)return t;/lineNumbers|showLineNumbers/.test(e)&&(t.lineNumbers=!0),/wordWrap|word-wrap/.test(e)&&(t.wordWrap=!0);let n=e.match(/title=(["'])(.*?)\1/);return n&&(t.title=n[2]),t}var He=class{config;constructor(e){this.config=e}getTheme(){return this.config?.theme?.codeTheme||{light:Fe.LIGHT,dark:Fe.DARK}}async getHighlighter(){return await Ne(this.getTheme())}getOptions(e,t){let n=this.getTheme(),r={},i=``;typeof t==`string`?(i=t,r=Ve(t)):t&&(r=t,i=t.__raw||``);let a={lang:e||Ie.LANG,meta:{__raw:i,...r},transformers:[Le(),Re(),ze(),Be()]};return typeof n==`object`?a.themes={light:n.light,dark:n.dark}:a.theme=n,a}async render(e,t,n){try{let r=await this.getHighlighter(),i=this.getOptions(t,n);return r.codeToHtml(e,i)}catch(t){return console.error(`[ShikiAdapter] Failed to render code:`,t),`<pre class="${$.FALLBACK}"><code>${Ue(e)}</code></pre>`}}};function Ue(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`)}let We=null,Ge;function Ke(e){let t=JSON.stringify(e?.theme?.codeTheme||null);return(We===null||Ge!==t)&&(We=new He(e),Ge=t),We}function qe(e){let t=Ke(e);return async e=>{let n=await t.getHighlighter();(0,ee.visit)(e,Z.ELEMENT,e=>{if(e.tagName===Pe.PRE&&e.children?.[0]?.type===Z.ELEMENT&&e.children[0].tagName===Pe.CODE){let r=e.children[0],i=(r.properties?.className||[]).find(e=>e.startsWith(`language-`)),a=i?i.slice(9):Ie.MDX_DEFAULT_LANG;if(a===`mermaid`)return;let o=r.children?.[0]?.value||``,s=Ve(r.properties?.metastring||r.data?.meta||``),c=t.getOptions(a,s),l=``;try{l=n.codeToHtml(o,c)}catch(e){console.error(`[rehypeShiki] Failed to highlight code block:`,e),l=`<pre class="${$.FALLBACK}"><code>${Ue(o)}</code></pre>`}e.properties=e.properties||{},s.title&&(e.properties[Q.TITLE]=s.title),e.properties[Q.HIGHLIGHTED]=`true`,e.properties[Q.HIGHLIGHTED_HTML]=l,e.properties[Q.LANG]=a,e.children=[]}})}}function Je(){return e=>{(0,ee.visit)(e,Z.CODE,e=>{e.meta&&(e.data=e.data||{},e.data.hProperties=e.data.hProperties||{},e.data.hProperties.metastring=e.meta)})}}let Ye=!1;function Xe(e,t=g.default){let n=e?.plugins?.flatMap(e=>H.getSanitizedCapabilities(e).remarkPlugins||[])||[],r=e?.plugins?.flatMap(e=>H.getSanitizedCapabilities(e).rehypePlugins||[])||[],i=t({remarkPlugins:[_.default,v.default,Je,...n],rehypePlugins:[y.default,[qe,e],...r],jsxRuntime:`automatic`});return{...i,name:`vite-plugin-boltdocs-mdx`,async buildStart(){Ye||=(await Y.load(),!0),i.buildStart&&await i.buildStart.call(this)},async transform(e,t,n){let[r]=t.split(`?`);if(!r.endsWith(`.md`)&&!r.endsWith(`.mdx`))return i.transform?.call(this,e,t,n);let a=`${r}:${f.default.createHash(`md5`).update(e).digest(`hex`)}:${process.env.NODE_ENV===`production`?`prod`:`dev`}:v3`,o=await Y.getAsync(a);if(o)return{code:o,map:null};let s=await i.transform.call(this,e,r,n);return s&&typeof s==`object`&&s.code&&(process.env.NODE_ENV!==`production`&&(s.code+=`
109
108
  if (import.meta.hot) {
110
109
  import.meta.hot.accept();
111
110
  }
@@ -71,8 +71,7 @@ ${e.filter(e=>e.seo?.noindex||typeof e.seo?.robots==`string`&&e.seo.robots.inclu
71
71
  </body>`)),e}var D=class e extends Error{pluginName;constructor(t,n){super(`[plugin:${t}] ${n}`),this.name=`PluginError`,this.pluginName=t,Object.setPrototypeOf(this,e.prototype)}},O=class e extends D{constructor(t,n){super(t,`Validation failed: ${n}`),this.name=`PluginValidationError`,Object.setPrototypeOf(this,e.prototype)}},k=class e extends D{constructor(t,n){super(t,`Compatibility error: ${n}`),this.name=`PluginCompatibilityError`,Object.setPrototypeOf(this,e.prototype)}},A=class e extends D{constructor(t,n){super(t,`Missing required permission: '${n}'`),this.name=`PluginPermissionError`,Object.setPrototypeOf(this,e.prototype)}},j=class e extends D{hookName;constructor(t,n,r){super(t,`Error in hook '${n}': ${r.message}`),this.name=`PluginHookError`,this.hookName=n,this.stack=r.stack,Object.setPrototypeOf(this,e.prototype)}},M=class{data=new Map;getNamespaceKey(e,t){return`${e}:${t}`}get(e,t){let n=this.getNamespaceKey(e,t),r=this.data.get(n);if(r!==void 0)return typeof r==`object`&&r?JSON.parse(JSON.stringify(r)):r}set(e,t,n){let r=this.getNamespaceKey(e,t),i=typeof n==`object`&&n?JSON.parse(JSON.stringify(n)):n;this.data.set(r,i)}has(e,t){let n=this.getNamespaceKey(e,t);return this.data.has(n)}};const N=i.extend({version:y.string().optional(),boltdocsVersion:y.string().optional(),permissions:y.array(y.string()).optional(),hooks:y.object({beforeBuild:y.function().optional(),afterBuild:y.function().optional(),beforeDev:y.function().optional(),afterDev:y.function().optional(),configResolved:y.function().optional(),buildEnd:y.function().optional()}).optional()});function P(e,t){let n=[],r=new Set;for(let i of e){let e=N.safeParse(i);if(!e.success)throw new O(i.name||`unknown`,e.error.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`).join(`, `));let a=e.data;if(r.has(a.name))throw new O(a.name,`Duplicate plugin name detected`);if(r.add(a.name),a.boltdocsVersion&&!te.satisfies(t,a.boltdocsVersion))throw new k(a.name,`Plugin expects Boltdocs version ${a.boltdocsVersion}, but current is ${t}`);if(a.components){for(let[e,t]of Object.entries(a.components))if((t.includes(`..`)||S.isAbsolute(t))&&t.includes(`..`))throw new O(a.name,`Component '${e}' has an invalid path: traversal sequences are not allowed.`)}n.push(a)}return n}function F(e,t){return e.permissions?e.permissions.includes(t):!1}var I=class e{static checkPermission(e,t){if(!F(e,t))throw new A(e.name,t)}static getSanitizedCapabilities(e){return{remarkPlugins:F(e,`mdx:remark`)?e.remarkPlugins:[],rehypePlugins:F(e,`mdx:rehype`)?e.rehypePlugins:[],vitePlugins:F(e,`vite:config`)?e.vitePlugins:[],components:F(e,`components`)?e.components:{}}}static async executeWithIsolation(t,n,r,i){try{return e.checkPermission(t,n),await i()}catch(e){if(e instanceof A){console.warn(`[boltdocs] Skipping hook '${r}' for plugin '${t.name}': ${e.message}`);return}throw e}}},L=class{plugins;config;store;constructor(e,t){this.plugins=e,this.config=t,this.store=new M}async runHook(e,...t){let n=this.getSortedPlugins();for(let r of n){if(!r.hooks?.[e])continue;let n=this.createContext(r),i=e.toLowerCase().includes(`build`),a=e.toLowerCase().includes(`dev`),o=i?`hooks:build`:a?`hooks:dev`:void 0;try{o?await I.executeWithIsolation(r,o,e,()=>r.hooks[e](n,...t)):await r.hooks[e](n,...t)}catch(t){let i=new j(r.name,e,t instanceof Error?t:Error(String(t)));n.logger.error(i)}}}getSortedPlugins(){let e=this.plugins.filter(e=>e.enforce===`pre`),t=this.plugins.filter(e=>!e.enforce),n=this.plugins.filter(e=>e.enforce===`post`);return[...e,...t,...n]}createContext(e){return{config:Object.freeze({...this.config}),meta:{name:e.name,version:e.version,boltdocsVersion:e.boltdocsVersion},store:{get:(e,t)=>this.store.get(e,t),set:(e,t,n)=>this.store.set(e,t,n),has:(e,t)=>this.store.has(e,t)},logger:this.createLogger(e.name)}}createLogger(e){let t=`[plugin:${e}]`;return{info:e=>console.log(`${t} INFO: ${e}`),warn:e=>console.warn(`${t} WARN: ${e}`),error:e=>{let n=e instanceof Error?e.message:e;console.error(`${t} ERROR: ${n}`)},debug:e=>console.debug(`${t} DEBUG: ${e}`)}}};function je(e){return e}const R=_.dirname(ne(import.meta.url));function z(e){return typeof e==`string`?[e]:Array.isArray(e)?e.flatMap(z):e&&typeof e==`object`?Object.values(e).flatMap(z):[]}const Me=new Set([`title`,`description`,`permalink`,`sidebarPosition`,`sidebarLabel`,`sidebarHidden`,`hidden`,`category`,`order`,`badge`,`icon`,`date`,`lastUpdated`,`groupTitle`,`groupPosition`,`seo`]);function Ne(e){let t=[];for(let n of e){let e=``;n.frontmatter&&(e=z(Object.entries(n.frontmatter).filter(([e])=>!Me.has(e)).map(([e,t])=>t)).join(` `));let r=e?`${n._content||``} ${e}`:n._content||``;if(t.push({id:n.path,title:n.title,content:r,url:n.path,display:n.groupTitle?`${n.groupTitle} > ${n.title}`:n.title,locale:n.locale,version:n.version}),n.headings)for(let e of n.headings)t.push({id:`${n.path}#${e.id}`,title:e.text,content:`${e.text} in ${n.title}`,url:`${n.path}#${e.id}`,display:`${n.title} > ${e.text}`,locale:n.locale,version:n.version})}return t}function B(e,t,n=!1){let r=S.resolve(process.cwd(),`index.css`),i=v.existsSync(r)?`import './index.css';`:``,o=t?.plugins?.flatMap(e=>Object.entries(e.components||{}))||[],s=o.map(([e,t])=>`import * as _comp_${e} from '${a(t)}';
72
72
  const ${e} = _comp_${e}.default || _comp_${e}['${e}'] || _comp_${e};`).join(`
73
73
  `),c=o.map(([e])=>e).join(`, `),l=S.basename(e.docsDir||`docs`),u=S.resolve(process.cwd(),e.docsDir||`docs`),d=[`tsx`,`ts`,`jsx`,`js`].map(e=>S.resolve(u,`pages-external/index.${e}`)).find(e=>v.existsSync(e));return`
74
- import { ViteReactSSG } from '@bdocs/ssg';
75
- import { createRoutes } from 'boltdocs/client';
74
+ import { ViteReactSSG, createRoutes } from 'boltdocs/client';
76
75
  import _routes from 'virtual:boltdocs-routes.ts';
77
76
  import _config from 'virtual:boltdocs-config.ts';
78
77
  import _user_mdx_components from 'virtual:boltdocs-mdx-components.tsx';
@@ -105,7 +104,7 @@ export const createRoot = ViteReactSSG(
105
104
  const mdxComponents = components.default || components;
106
105
  export default mdxComponents;
107
106
  export * from '${e}';`}return`export default {};`}if(c===`layout`){let e=[`tsx`,`jsx`],t=null;for(let n of e){let e=_.resolve(r,`layout.${n}`);if(b.existsSync(e)){t=e;break}}if(t)return`import UserLayout from '${a(t)}';
108
- export default UserLayout;`;throw Error(`[Boltdocs] Layout file not found. A 'layout.tsx' or 'layout.jsx' file is mandatory in your docs directory. Please create one to define your site structure.`)}if(c===`icons`){let e=[`tsx`,`jsx`,`ts`,`js`],t=null;for(let n of e){let e=_.resolve(r,`icons.${n}`);if(b.existsSync(e)){t=e;break}}return t?`import * as icons from '${a(t)}';\nexport default icons;`:`export default {};`}if(c===`search`){if(!H){let e=Ne(await f(r,s));H=`export default ${JSON.stringify(e,null,2)};`}return H}if(c===`client`){let e=R,t=``;for(;e&&e!==_.parse(e).root;){let n=_.join(e,`src/client/index.ts`),r=_.join(e,`dist/client/index.mjs`),i=_.join(e,`client/index.ts`);if(b.existsSync(n)){t=a(n);break}if(b.existsSync(r)){t=a(r);break}if(b.existsSync(i)){t=a(i);break}e=_.dirname(e)}if(!t)throw Error(`[boltdocs] Could not resolve boltdocs/client entry point starting from ${R}`);return`export * from '${t}';`}}}}const U={"X-Content-Type-Options":`nosniff`,"X-Frame-Options":`DENY`,"X-XSS-Protection":`1; mode=block`,"Referrer-Policy":`strict-origin-when-cross-origin`,"Permissions-Policy":`camera=(), microphone=(), geolocation=()`,"Strict-Transport-Security":`max-age=31536000; includeSubDomains`};function Ie(e){let t=process.env.NODE_ENV===`development`,n={"default-src":[`'self'`],"script-src":[`'self'`,`'unsafe-inline'`],"style-src":[`'self'`,`'unsafe-inline'`],"img-src":[`'self'`,`data:`,`https:`],"font-src":[`'self'`],"connect-src":[`'self'`]};return t&&(n[`script-src`]=[`'self'`,`'unsafe-eval'`,`'unsafe-inline'`],n[`style-src`]=[`'self'`,`'unsafe-inline'`]),Object.entries(n).map(([e,t])=>`${e} ${t.join(` `)}`).join(`; `)}const W=new Map;async function Le(e){try{let{data:t}=await c(e),n=JSON.stringify(t);return x.createHash(`md5`).update(n).digest(`hex`)}catch{return``}}function Re(e){return W.get(e)}function ze(e,t){W.set(e,t)}function Be(e){W.delete(e)}function G(e,t){let n=e.moduleGraph.getModuleById(`\0virtual:boltdocs-${t}.ts`);n&&e.moduleGraph.invalidateModule(n)}function Ve(r,i,o,c,l){let f=new Map;return{name:`vite-plugin-boltdocs-dev-server`,apply:`serve`,async configureServer(c){let p=l();await p?.runHook(`beforeDev`),n(r,process.cwd(),o()).catch(e=>{console.error(`[boltdocs] Failed to generate initial link tree:`,e)}),setTimeout(async()=>{try{let{generateRoutes:e}=await import(`./routes-CMUZGI6T.mjs`).then(e=>e.r),t=await e(r,o());for(let e of t)if(e.filePath){let t=_.relative(process.cwd(),e.filePath).replace(/\\/g,`/`),n=t.startsWith(`/`)?t:`/${t}`;await c.transformRequest(n).catch(()=>{}),await new Promise(e=>setTimeout(e,50))}}catch{}},1e3),c.middlewares.use((e,t,n)=>{process.env.NODE_ENV===`production`&&Object.entries(U).forEach(([e,n])=>{t.setHeader(e,n)});let r=o();r.security?.enableCSP&&t.setHeader(`Content-Security-Policy`,Ie(r)),n()}),c.middlewares.use((e,t,n)=>{if(e.url===`/robots.txt`){n();return}n()}),c.middlewares.use(async(e,t,n)=>{let r=e.url?.split(`?`)[0]||`/`,i=e.headers.accept||``,a=o(),s=/\.(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(r);if(i.includes(`text/html`)&&!s){let n=T(a);n=E(n,a),n=await c.transformIndexHtml(e.url||`/`,n),t.statusCode=200,t.setHeader(`Content-Type`,`text/html`),t.end(n);return}n()});let m=e.map(e=>_.resolve(process.cwd(),e)),h=[`tsx`,`jsx`].map(e=>_.resolve(r,`layout.${e}`)),g=[`tsx`,`ts`,`jsx`,`js`],v=g.map(e=>_.resolve(r,`mdx-components.${e}`)),y=g.map(e=>_.resolve(r,`pages-external/index.${e}`)),b=g.map(e=>_.resolve(r,`icons.${e}`));c.watcher.add([...m,...v,...h,...y,...b]);let x=async(l,p)=>{try{let m=a(l);if(e.some(e=>m.endsWith(e))){c.restart();return}if(g.some(e=>m.endsWith(`mdx-components.${e}`))){t(o(),r),G(c,`mdx-components.tsx`),c.ws.send({type:`full-reload`});return}if(g.some(e=>m.endsWith(`icons.${e}`))){G(c,`icons.tsx`),c.ws.send({type:`full-reload`});return}if(m.endsWith(`layout.tsx`)||m.endsWith(`layout.jsx`)){G(c,`layout.tsx`),c.ws.send({type:`full-reload`});return}if(m.includes(`/pages-external/`)||m.includes(`\\pages-external\\`)){G(c,`entry`),c.ws.send({type:`full-reload`});return}if(!m.toLowerCase().startsWith(i.toLowerCase())||!s(m))return;if(p===`add`||p===`unlink`){p===`unlink`&&Be(l),d(),Pe();let e=o();t(e,r),G(c,`config`),G(c,`routes`),G(c,`search`),n(r,process.cwd(),e).catch(e=>{console.error(`[boltdocs] Failed to update link tree:`,e)}),c.ws.send({type:`custom`,event:`boltdocs:config-update`,data:{theme:e?.theme,i18n:e?.i18n,versions:e?.versions,siteUrl:e?.siteUrl}}),c.ws.send({type:`full-reload`});return}f.has(m)&&clearTimeout(f.get(m)),f.set(m,setTimeout(async()=>{f.delete(m);try{let e=Re(l),t=await Le(l);ze(l,t),u(l),e!==void 0&&e!==t&&(G(c,`routes`),G(c,`search`));let n=a(_.relative(r,l)),i=c.moduleGraph.getModulesByFile(m);if(i)for(let e of i)c.moduleGraph.invalidateModule(e);c.ws.send({type:`custom`,event:`boltdocs:mdx-update`,data:{file:m,relPath:n}})}catch(e){console.error(`[boltdocs] HMR error processing content change:`,e)}},150))}catch(e){console.error(`[boltdocs] HMR error during ${p} event:`,e)}};c.watcher.on(`add`,e=>x(e,`add`)),c.watcher.on(`unlink`,e=>x(e,`unlink`)),c.watcher.on(`change`,e=>x(e,`change`)),await p?.runHook(`afterDev`)},handleHotUpdate({file:e,server:t}){let n=a(e);if(n.toLowerCase().startsWith(i.toLowerCase())&&s(n))return[]}}}function He(e={},t){let n=_.resolve(process.cwd(),e.docsDir||`docs`),i=a(n),o=t,s,c=!1,l,u=[],d=()=>o;return[{name:`vite-plugin-boltdocs`,enforce:`pre`,async config(e,t){c=t.command===`build`;let i=e.envDir||process.cwd(),a=h(t.mode,i,``);Object.assign(process.env,a),o||=await r(n);let s=(await import(`./package-HegMOTL_.mjs`)).version,d=P(o.plugins||[],s);return o.plugins=d,l=new L(d,o),u=d.flatMap(e=>I.getSanitizedCapabilities(e).vitePlugins||[]),c&&await l.runHook(`beforeBuild`),{ssgOptions:{entry:`boltdocs/entry`,htmlEntry:`index.html`,dirStyle:`nested`,includeAllRoutes:!0,mock:!0,script:`async`,beastiesOptions:{preload:`media`},onFinished:async e=>{let t=ke(w(await f(n,o)),o);t&&b.writeFileSync(_.join(e,`sitemap.xml`),t);let r=Ae(o);b.writeFileSync(_.join(e,`robots.txt`),r)}},build:{ssrManifest:c},async config(){return{optimizeDeps:{include:[`react`,`react-dom`,`react-dom/client`,`react-router-dom`,`react-helmet-async`],exclude:[`boltdocs`,`boltdocs/client`]},resolve:{dedupe:[`react`,`react-dom`]}}}}},configResolved(e){s=e,l?.runHook(`configResolved`,o)},transformIndexHtml:{order:`pre`,handler(e){return E(e,o)}},async buildEnd(){let{pool:e}=await import(`./worker-pool-Bd8Y9KDv.mjs`);await e.terminate()},async closeBundle(){!c||s?.build?.ssr||(await l?.runHook(`afterBuild`),await l?.runHook(`buildEnd`))}},Fe(e,d,()=>s,n),Ve(n,i,d,e=>{o=e},()=>l),{...ee({includePublic:!0,png:{quality:80},jpeg:{quality:80},jpg:{quality:80},webp:{quality:80},avif:{quality:80},svg:{multipass:!0,plugins:[{name:`preset-default`}]}}),apply:`build`},...u]}const K=new l(`mdx`),Ue=[le.default||le,ue.default||ue,de.default||de,fe.default||fe,pe.default||pe,me.default||me,he.default||he],We=[ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe];let Ge=null,q=null;const Ke=()=>(Ge??=se(),Ge),qe=async e=>q||(q=ce({themes:Ue,langs:We,engine:Ke()}),q),J={JSX_FLOW_ELEMENT:`mdxJsxFlowElement`,JSX_TEXT_ELEMENT:`mdxJsxTextElement`,JSX_ATTRIBUTE:`mdxJsxAttribute`,ELEMENT:`element`,TEXT:`text`,CODE:`code`},Je={PRE:`pre`,CODE:`code`},Y={TITLE:`data-title`,LANG:`data-lang`,HIGHLIGHTED:`data-highlighted`,HIGHLIGHTED_HTML:`data-highlighted-html`},X={LINE_NUMBERS:`shiki-line-numbers`,WORD_WRAP:`shiki-word-wrap`,FALLBACK:`shiki-fallback`},Ye={LIGHT:`github-light`,DARK:`github-dark`},Z={LANG:`plaintext`,MDX_DEFAULT_LANG:`text`},Xe=(e={})=>{let{activateByDefault:t=!1}=e;return{name:`boltdocs:line-numbers`,pre(e){let n=this.options.meta?.lineNumbers===!0;(t||n)&&this.addClassToHast(e,X.LINE_NUMBERS)}}},Ze=(e={})=>{let{activateByDefault:t=!1}=e;return{name:`boltdocs:word-wrap`,pre(e){let n=this.options.meta?.wordWrap===!0;(t||n)&&this.addClassToHast(e,X.WORD_WRAP)}}},Qe=()=>({name:`AddTitleProperty`,pre(e){let t=this.options.meta?.title;t&&(e.properties[Y.TITLE]=t)}}),$e=()=>({name:`AddLanguageProperty`,pre(e){e.properties[Y.LANG]=this.options.lang||Z.LANG}});function et(e){let t={};if(!e)return t;/lineNumbers|showLineNumbers/.test(e)&&(t.lineNumbers=!0),/wordWrap|word-wrap/.test(e)&&(t.wordWrap=!0);let n=e.match(/title=(["'])(.*?)\1/);return n&&(t.title=n[2]),t}var tt=class{config;constructor(e){this.config=e}getTheme(){return this.config?.theme?.codeTheme||{light:Ye.LIGHT,dark:Ye.DARK}}async getHighlighter(){return await qe(this.getTheme())}getOptions(e,t){let n=this.getTheme(),r={},i=``;typeof t==`string`?(i=t,r=et(t)):t&&(r=t,i=t.__raw||``);let a={lang:e||Z.LANG,meta:{__raw:i,...r},transformers:[Xe(),Ze(),Qe(),$e()]};return typeof n==`object`?a.themes={light:n.light,dark:n.dark}:a.theme=n,a}async render(e,t,n){try{let r=await this.getHighlighter(),i=this.getOptions(t,n);return r.codeToHtml(e,i)}catch(t){return console.error(`[ShikiAdapter] Failed to render code:`,t),`<pre class="${X.FALLBACK}"><code>${nt(e)}</code></pre>`}}};function nt(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`)}let Q=null,rt;function it(e){let t=JSON.stringify(e?.theme?.codeTheme||null);return(Q===null||rt!==t)&&(Q=new tt(e),rt=t),Q}function at(e){let t=it(e);return async e=>{let n=await t.getHighlighter();C(e,J.ELEMENT,e=>{if(e.tagName===Je.PRE&&e.children?.[0]?.type===J.ELEMENT&&e.children[0].tagName===Je.CODE){let r=e.children[0],i=(r.properties?.className||[]).find(e=>e.startsWith(`language-`)),a=i?i.slice(9):Z.MDX_DEFAULT_LANG;if(a===`mermaid`)return;let o=r.children?.[0]?.value||``,s=et(r.properties?.metastring||r.data?.meta||``),c=t.getOptions(a,s),l=``;try{l=n.codeToHtml(o,c)}catch(e){console.error(`[rehypeShiki] Failed to highlight code block:`,e),l=`<pre class="${X.FALLBACK}"><code>${nt(o)}</code></pre>`}e.properties=e.properties||{},s.title&&(e.properties[Y.TITLE]=s.title),e.properties[Y.HIGHLIGHTED]=`true`,e.properties[Y.HIGHLIGHTED_HTML]=l,e.properties[Y.LANG]=a,e.children=[]}})}}function ot(){return e=>{C(e,J.CODE,e=>{e.meta&&(e.data=e.data||{},e.data.hProperties=e.data.hProperties||{},e.data.hProperties.metastring=e.meta)})}}let st=!1;function $(e,t=re){let n=e?.plugins?.flatMap(e=>I.getSanitizedCapabilities(e).remarkPlugins||[])||[],r=e?.plugins?.flatMap(e=>I.getSanitizedCapabilities(e).rehypePlugins||[])||[],i=t({remarkPlugins:[ie,ae,ot,...n],rehypePlugins:[oe,[at,e],...r],jsxRuntime:`automatic`});return{...i,name:`vite-plugin-boltdocs-mdx`,async buildStart(){st||=(await K.load(),!0),i.buildStart&&await i.buildStart.call(this)},async transform(e,t,n){let[r]=t.split(`?`);if(!r.endsWith(`.md`)&&!r.endsWith(`.mdx`))return i.transform?.call(this,e,t,n);let a=`${r}:${x.createHash(`md5`).update(e).digest(`hex`)}:${process.env.NODE_ENV===`production`?`prod`:`dev`}:v3`,o=await K.getAsync(a);if(o)return{code:o,map:null};let s=await i.transform.call(this,e,r,n);return s&&typeof s==`object`&&s.code&&(process.env.NODE_ENV!==`production`&&(s.code+=`
107
+ export default UserLayout;`;throw Error(`[Boltdocs] Layout file not found. A 'layout.tsx' or 'layout.jsx' file is mandatory in your docs directory. Please create one to define your site structure.`)}if(c===`icons`){let e=[`tsx`,`jsx`,`ts`,`js`],t=null;for(let n of e){let e=_.resolve(r,`icons.${n}`);if(b.existsSync(e)){t=e;break}}return t?`import * as icons from '${a(t)}';\nexport default icons;`:`export default {};`}if(c===`search`){if(!H){let e=Ne(await f(r,s));H=`export default ${JSON.stringify(e,null,2)};`}return H}if(c===`client`){let e=R,t=``;for(;e&&e!==_.parse(e).root;){let n=_.join(e,`src/client/index.ts`),r=_.join(e,`dist/client/index.mjs`),i=_.join(e,`client/index.ts`);if(b.existsSync(n)){t=a(n);break}if(b.existsSync(r)){t=a(r);break}if(b.existsSync(i)){t=a(i);break}e=_.dirname(e)}if(!t)throw Error(`[boltdocs] Could not resolve boltdocs/client entry point starting from ${R}`);return`export * from '${t}';`}}}}const U={"X-Content-Type-Options":`nosniff`,"X-Frame-Options":`DENY`,"X-XSS-Protection":`1; mode=block`,"Referrer-Policy":`strict-origin-when-cross-origin`,"Permissions-Policy":`camera=(), microphone=(), geolocation=()`,"Strict-Transport-Security":`max-age=31536000; includeSubDomains`};function Ie(e){let t=process.env.NODE_ENV===`development`,n={"default-src":[`'self'`],"script-src":[`'self'`,`'unsafe-inline'`],"style-src":[`'self'`,`'unsafe-inline'`],"img-src":[`'self'`,`data:`,`https:`],"font-src":[`'self'`],"connect-src":[`'self'`]};return t&&(n[`script-src`]=[`'self'`,`'unsafe-eval'`,`'unsafe-inline'`],n[`style-src`]=[`'self'`,`'unsafe-inline'`]),Object.entries(n).map(([e,t])=>`${e} ${t.join(` `)}`).join(`; `)}const W=new Map;async function Le(e){try{let{data:t}=await c(e),n=JSON.stringify(t);return x.createHash(`md5`).update(n).digest(`hex`)}catch{return``}}function Re(e){return W.get(e)}function ze(e,t){W.set(e,t)}function Be(e){W.delete(e)}function G(e,t){let n=e.moduleGraph.getModuleById(`\0virtual:boltdocs-${t}.ts`);n&&e.moduleGraph.invalidateModule(n)}function Ve(r,i,o,c,l){let f=new Map;return{name:`vite-plugin-boltdocs-dev-server`,apply:`serve`,async configureServer(c){let p=l();await p?.runHook(`beforeDev`),n(r,process.cwd(),o()).catch(e=>{console.error(`[boltdocs] Failed to generate initial link tree:`,e)}),setTimeout(async()=>{try{let{generateRoutes:e}=await import(`./routes-CMUZGI6T.mjs`).then(e=>e.r),t=await e(r,o());for(let e of t)if(e.filePath){let t=_.relative(process.cwd(),e.filePath).replace(/\\/g,`/`),n=t.startsWith(`/`)?t:`/${t}`;await c.transformRequest(n).catch(()=>{}),await new Promise(e=>setTimeout(e,50))}}catch{}},1e3),c.middlewares.use((e,t,n)=>{process.env.NODE_ENV===`production`&&Object.entries(U).forEach(([e,n])=>{t.setHeader(e,n)});let r=o();r.security?.enableCSP&&t.setHeader(`Content-Security-Policy`,Ie(r)),n()}),c.middlewares.use((e,t,n)=>{if(e.url===`/robots.txt`){n();return}n()}),c.middlewares.use(async(e,t,n)=>{let r=e.url?.split(`?`)[0]||`/`,i=e.headers.accept||``,a=o(),s=/\.(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(r);if(i.includes(`text/html`)&&!s){let n=T(a);n=E(n,a),n=await c.transformIndexHtml(e.url||`/`,n),t.statusCode=200,t.setHeader(`Content-Type`,`text/html`),t.end(n);return}n()});let m=e.map(e=>_.resolve(process.cwd(),e)),h=[`tsx`,`jsx`].map(e=>_.resolve(r,`layout.${e}`)),g=[`tsx`,`ts`,`jsx`,`js`],v=g.map(e=>_.resolve(r,`mdx-components.${e}`)),y=g.map(e=>_.resolve(r,`pages-external/index.${e}`)),b=g.map(e=>_.resolve(r,`icons.${e}`));c.watcher.add([...m,...v,...h,...y,...b]);let x=async(l,p)=>{try{let m=a(l);if(e.some(e=>m.endsWith(e))){c.restart();return}if(g.some(e=>m.endsWith(`mdx-components.${e}`))){t(o(),r),G(c,`mdx-components.tsx`),c.ws.send({type:`full-reload`});return}if(g.some(e=>m.endsWith(`icons.${e}`))){G(c,`icons.tsx`),c.ws.send({type:`full-reload`});return}if(m.endsWith(`layout.tsx`)||m.endsWith(`layout.jsx`)){G(c,`layout.tsx`),c.ws.send({type:`full-reload`});return}if(m.includes(`/pages-external/`)||m.includes(`\\pages-external\\`)){G(c,`entry`),c.ws.send({type:`full-reload`});return}if(!m.toLowerCase().startsWith(i.toLowerCase())||!s(m))return;if(p===`add`||p===`unlink`){p===`unlink`&&Be(l),d(),Pe();let e=o();t(e,r),G(c,`config`),G(c,`routes`),G(c,`search`),n(r,process.cwd(),e).catch(e=>{console.error(`[boltdocs] Failed to update link tree:`,e)}),c.ws.send({type:`custom`,event:`boltdocs:config-update`,data:{theme:e?.theme,i18n:e?.i18n,versions:e?.versions,siteUrl:e?.siteUrl}}),c.ws.send({type:`full-reload`});return}f.has(m)&&clearTimeout(f.get(m)),f.set(m,setTimeout(async()=>{f.delete(m);try{let e=Re(l),t=await Le(l);ze(l,t),u(l),e!==void 0&&e!==t&&(G(c,`routes`),G(c,`search`));let n=a(_.relative(r,l)),i=c.moduleGraph.getModulesByFile(m);if(i)for(let e of i)c.moduleGraph.invalidateModule(e);c.ws.send({type:`custom`,event:`boltdocs:mdx-update`,data:{file:m,relPath:n}})}catch(e){console.error(`[boltdocs] HMR error processing content change:`,e)}},150))}catch(e){console.error(`[boltdocs] HMR error during ${p} event:`,e)}};c.watcher.on(`add`,e=>x(e,`add`)),c.watcher.on(`unlink`,e=>x(e,`unlink`)),c.watcher.on(`change`,e=>x(e,`change`)),await p?.runHook(`afterDev`)},handleHotUpdate({file:e,server:t}){let n=a(e);if(n.toLowerCase().startsWith(i.toLowerCase())&&s(n))return[]}}}function He(e={},t){let n=_.resolve(process.cwd(),e.docsDir||`docs`),i=a(n),o=t,s,c=!1,l,u=[],d=()=>o;return[{name:`vite-plugin-boltdocs`,enforce:`pre`,async config(e,t){c=t.command===`build`;let i=e.envDir||process.cwd(),a=h(t.mode,i,``);Object.assign(process.env,a),o||=await r(n);let s=(await import(`./package-ztArRM6v.mjs`)).version,d=P(o.plugins||[],s);return o.plugins=d,l=new L(d,o),u=d.flatMap(e=>I.getSanitizedCapabilities(e).vitePlugins||[]),c&&await l.runHook(`beforeBuild`),{ssgOptions:{entry:`boltdocs/entry`,htmlEntry:`index.html`,dirStyle:`nested`,includeAllRoutes:!0,mock:!0,script:`async`,beastiesOptions:{preload:`media`},onFinished:async e=>{let t=ke(w(await f(n,o)),o);t&&b.writeFileSync(_.join(e,`sitemap.xml`),t);let r=Ae(o);b.writeFileSync(_.join(e,`robots.txt`),r)}},build:{ssrManifest:c},async config(){return{optimizeDeps:{include:[`react`,`react-dom`,`react-dom/client`,`react-router-dom`,`react-helmet-async`],exclude:[`boltdocs`,`boltdocs/client`]},resolve:{dedupe:[`react`,`react-dom`]}}}}},configResolved(e){s=e,l?.runHook(`configResolved`,o)},transformIndexHtml:{order:`pre`,handler(e){return E(e,o)}},async buildEnd(){let{pool:e}=await import(`./worker-pool-Bd8Y9KDv.mjs`);await e.terminate()},async closeBundle(){!c||s?.build?.ssr||(await l?.runHook(`afterBuild`),await l?.runHook(`buildEnd`))}},Fe(e,d,()=>s,n),Ve(n,i,d,e=>{o=e},()=>l),{...ee({includePublic:!0,png:{quality:80},jpeg:{quality:80},jpg:{quality:80},webp:{quality:80},avif:{quality:80},svg:{multipass:!0,plugins:[{name:`preset-default`}]}}),apply:`build`},...u]}const K=new l(`mdx`),Ue=[le.default||le,ue.default||ue,de.default||de,fe.default||fe,pe.default||pe,me.default||me,he.default||he],We=[ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe];let Ge=null,q=null;const Ke=()=>(Ge??=se(),Ge),qe=async e=>q||(q=ce({themes:Ue,langs:We,engine:Ke()}),q),J={JSX_FLOW_ELEMENT:`mdxJsxFlowElement`,JSX_TEXT_ELEMENT:`mdxJsxTextElement`,JSX_ATTRIBUTE:`mdxJsxAttribute`,ELEMENT:`element`,TEXT:`text`,CODE:`code`},Je={PRE:`pre`,CODE:`code`},Y={TITLE:`data-title`,LANG:`data-lang`,HIGHLIGHTED:`data-highlighted`,HIGHLIGHTED_HTML:`data-highlighted-html`},X={LINE_NUMBERS:`shiki-line-numbers`,WORD_WRAP:`shiki-word-wrap`,FALLBACK:`shiki-fallback`},Ye={LIGHT:`github-light`,DARK:`github-dark`},Z={LANG:`plaintext`,MDX_DEFAULT_LANG:`text`},Xe=(e={})=>{let{activateByDefault:t=!1}=e;return{name:`boltdocs:line-numbers`,pre(e){let n=this.options.meta?.lineNumbers===!0;(t||n)&&this.addClassToHast(e,X.LINE_NUMBERS)}}},Ze=(e={})=>{let{activateByDefault:t=!1}=e;return{name:`boltdocs:word-wrap`,pre(e){let n=this.options.meta?.wordWrap===!0;(t||n)&&this.addClassToHast(e,X.WORD_WRAP)}}},Qe=()=>({name:`AddTitleProperty`,pre(e){let t=this.options.meta?.title;t&&(e.properties[Y.TITLE]=t)}}),$e=()=>({name:`AddLanguageProperty`,pre(e){e.properties[Y.LANG]=this.options.lang||Z.LANG}});function et(e){let t={};if(!e)return t;/lineNumbers|showLineNumbers/.test(e)&&(t.lineNumbers=!0),/wordWrap|word-wrap/.test(e)&&(t.wordWrap=!0);let n=e.match(/title=(["'])(.*?)\1/);return n&&(t.title=n[2]),t}var tt=class{config;constructor(e){this.config=e}getTheme(){return this.config?.theme?.codeTheme||{light:Ye.LIGHT,dark:Ye.DARK}}async getHighlighter(){return await qe(this.getTheme())}getOptions(e,t){let n=this.getTheme(),r={},i=``;typeof t==`string`?(i=t,r=et(t)):t&&(r=t,i=t.__raw||``);let a={lang:e||Z.LANG,meta:{__raw:i,...r},transformers:[Xe(),Ze(),Qe(),$e()]};return typeof n==`object`?a.themes={light:n.light,dark:n.dark}:a.theme=n,a}async render(e,t,n){try{let r=await this.getHighlighter(),i=this.getOptions(t,n);return r.codeToHtml(e,i)}catch(t){return console.error(`[ShikiAdapter] Failed to render code:`,t),`<pre class="${X.FALLBACK}"><code>${nt(e)}</code></pre>`}}};function nt(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`)}let Q=null,rt;function it(e){let t=JSON.stringify(e?.theme?.codeTheme||null);return(Q===null||rt!==t)&&(Q=new tt(e),rt=t),Q}function at(e){let t=it(e);return async e=>{let n=await t.getHighlighter();C(e,J.ELEMENT,e=>{if(e.tagName===Je.PRE&&e.children?.[0]?.type===J.ELEMENT&&e.children[0].tagName===Je.CODE){let r=e.children[0],i=(r.properties?.className||[]).find(e=>e.startsWith(`language-`)),a=i?i.slice(9):Z.MDX_DEFAULT_LANG;if(a===`mermaid`)return;let o=r.children?.[0]?.value||``,s=et(r.properties?.metastring||r.data?.meta||``),c=t.getOptions(a,s),l=``;try{l=n.codeToHtml(o,c)}catch(e){console.error(`[rehypeShiki] Failed to highlight code block:`,e),l=`<pre class="${X.FALLBACK}"><code>${nt(o)}</code></pre>`}e.properties=e.properties||{},s.title&&(e.properties[Y.TITLE]=s.title),e.properties[Y.HIGHLIGHTED]=`true`,e.properties[Y.HIGHLIGHTED_HTML]=l,e.properties[Y.LANG]=a,e.children=[]}})}}function ot(){return e=>{C(e,J.CODE,e=>{e.meta&&(e.data=e.data||{},e.data.hProperties=e.data.hProperties||{},e.data.hProperties.metastring=e.meta)})}}let st=!1;function $(e,t=re){let n=e?.plugins?.flatMap(e=>I.getSanitizedCapabilities(e).remarkPlugins||[])||[],r=e?.plugins?.flatMap(e=>I.getSanitizedCapabilities(e).rehypePlugins||[])||[],i=t({remarkPlugins:[ie,ae,ot,...n],rehypePlugins:[oe,[at,e],...r],jsxRuntime:`automatic`});return{...i,name:`vite-plugin-boltdocs-mdx`,async buildStart(){st||=(await K.load(),!0),i.buildStart&&await i.buildStart.call(this)},async transform(e,t,n){let[r]=t.split(`?`);if(!r.endsWith(`.md`)&&!r.endsWith(`.mdx`))return i.transform?.call(this,e,t,n);let a=`${r}:${x.createHash(`md5`).update(e).digest(`hex`)}:${process.env.NODE_ENV===`production`?`prod`:`dev`}:v3`,o=await K.getAsync(a);if(o)return{code:o,map:null};let s=await i.transform.call(this,e,r,n);return s&&typeof s==`object`&&s.code&&(process.env.NODE_ENV!==`production`&&(s.code+=`
109
108
  if (import.meta.hot) {
110
109
  import.meta.hot.accept();
111
110
  }
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- var e=`2.7.0`;Object.defineProperty(exports,`version`,{enumerable:!0,get:function(){return e}});
6
+ var e=`2.7.2`;Object.defineProperty(exports,`version`,{enumerable:!0,get:function(){return e}});
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- var e=`2.7.0`;export{e as version};
6
+ var e=`2.7.2`;export{e as version};