From d1ba46b96979a566e50095eb0e725089ea8cd147 Mon Sep 17 00:00:00 2001 From: ezynda3 Date: Fri, 29 May 2026 13:43:01 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20mark3lab?= =?UTF-8?q?s/kit@67722b0c24178d264f6ce96d0c0d4e6726382148=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- advanced/json-output/index.html | 2 +- advanced/subagents/index.html | 2 +- advanced/testing/index.html | 2 +- .../{index-BL_hbuji.js => index-x9KNE3Ca.js} | 22 +++++++++---------- cli/commands/index.html | 2 +- cli/flags/index.html | 2 +- configuration/index.html | 2 +- development/index.html | 2 +- extensions/capabilities/index.html | 2 +- extensions/examples/index.html | 2 +- extensions/loading/index.html | 2 +- extensions/overview/index.html | 2 +- extensions/testing/index.html | 2 +- index.html | 2 +- installation/index.html | 2 +- providers/index.html | 2 +- quick-start/index.html | 2 +- sdk/callbacks/index.html | 2 +- sdk/options/index.html | 2 +- sdk/overview/index.html | 2 +- sdk/sessions/index.html | 2 +- sessions/index.html | 2 +- themes/index.html | 2 +- 23 files changed, 33 insertions(+), 33 deletions(-) rename assets/{index-BL_hbuji.js => index-x9KNE3Ca.js} (97%) diff --git a/advanced/json-output/index.html b/advanced/json-output/index.html index 4715652e..759805b2 100644 --- a/advanced/json-output/index.html +++ b/advanced/json-output/index.html @@ -7,7 +7,7 @@ - + diff --git a/advanced/subagents/index.html b/advanced/subagents/index.html index bdf32da1..805fc7a9 100644 --- a/advanced/subagents/index.html +++ b/advanced/subagents/index.html @@ -7,7 +7,7 @@ - + diff --git a/advanced/testing/index.html b/advanced/testing/index.html index d4360636..88f1f049 100644 --- a/advanced/testing/index.html +++ b/advanced/testing/index.html @@ -7,7 +7,7 @@ - + diff --git a/assets/index-BL_hbuji.js b/assets/index-x9KNE3Ca.js similarity index 97% rename from assets/index-BL_hbuji.js rename to assets/index-x9KNE3Ca.js index 7e779c75..80c66bd5 100644 --- a/assets/index-BL_hbuji.js +++ b/assets/index-x9KNE3Ca.js @@ -51,11 +51,11 @@ Error generating stack: `+a.message+` [Documentation truncated...]`:u;h+=` Documentation: -${d}`}return h}async function Gh(u,h,d,c){var A,O,C;const v=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${h}`},body:JSON.stringify({model:d,messages:[{role:"system",content:um(c)},...u.map(y=>({role:y.role,content:y.content}))]})});if(!v.ok){const y=await v.text();throw new Error(`OpenAI API error (${v.status}): ${y}`)}return((C=(O=(A=(await v.json()).choices)==null?void 0:A[0])==null?void 0:O.message)==null?void 0:C.content)||"No response."}async function Yh(u,h,d,c){var A,O;const v=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":h,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify({model:d,max_tokens:1024,system:um(c),messages:u.map(C=>({role:C.role,content:C.content}))})});if(!v.ok){const C=await v.text();throw new Error(`Anthropic API error (${v.status}): ${C}`)}return((O=(A=(await v.json()).content)==null?void 0:A[0])==null?void 0:O.text)||"No response."}function Kh(u){return u==="openai"?"gpt-4o-mini":"claude-sonnet-4-20250514"}function Xh({provider:u,model:h,apiKey:d,context:c}){const[v,E]=w.useState(!1),[A,O]=w.useState([]),[C,y]=w.useState(""),[G,R]=w.useState(!1),[K,nt]=w.useState(null),xt=w.useRef(null),Dt=w.useRef(null),Mt=d||(typeof window<"u"?window.__TOME_AI_API_KEY__:void 0),W=h||Kh(u);w.useEffect(()=>{var Q;(Q=xt.current)==null||Q.scrollIntoView({behavior:"smooth"})},[A]),w.useEffect(()=>{v&&setTimeout(()=>{var Q;return(Q=Dt.current)==null?void 0:Q.focus()},100)},[v]);const I=w.useCallback(async()=>{const Q=C.trim();if(!Q||G||!Mt)return;const Y={role:"user",content:Q},H=[...A,Y];O(H),y(""),R(!0),nt(null);try{let U;u==="openai"?U=await Gh(H,Mt,W,c):U=await Yh(H,Mt,W,c),O(at=>[...at,{role:"assistant",content:U}])}catch(U){nt(U instanceof Error?U.message:"Failed to get response")}finally{R(!1)}},[C,G,A,u,Mt,W,c]),ct=w.useCallback(Q=>{Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),I())},[I]);return v?s.jsxs("div",{"data-testid":"ai-chat-panel",style:{position:"fixed",bottom:24,right:24,zIndex:900,width:380,maxWidth:"calc(100vw - 48px)",height:520,maxHeight:"calc(100vh - 48px)",background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,boxShadow:"0 16px 64px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column",overflow:"hidden",fontFamily:"var(--font-body)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid var(--bd)",flexShrink:0},children:[s.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--tx)"},children:"Ask AI"}),s.jsx("button",{"data-testid":"ai-chat-close",onClick:()=>E(!1),"aria-label":"Close AI chat",style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex",padding:4},children:s.jsx(qh,{})})]}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:"12px 16px"},children:[!Mt&&s.jsxs("div",{"data-testid":"ai-chat-no-key",style:{textAlign:"center",color:"var(--txM)",fontSize:13,padding:"24px 8px",lineHeight:1.6},children:[s.jsx("p",{style:{marginBottom:8,fontWeight:500,color:"var(--tx)"},children:"AI not configured"}),s.jsxs("p",{style:{marginBottom:8},children:["To enable AI chat, set the ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"apiKeyEnv"})," in ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"tome.config.js"})," and provide the environment variable at build time."]}),s.jsxs("p",{style:{fontSize:11.5,color:"var(--txM)"},children:["Example: ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"TOME_AI_KEY=sk-... tome build"})]})]}),A.map((Q,Y)=>s.jsx("div",{"data-testid":`ai-chat-message-${Q.role}`,style:{marginBottom:12,display:"flex",justifyContent:Q.role==="user"?"flex-end":"flex-start"},children:s.jsx("div",{style:{maxWidth:"85%",padding:"8px 12px",borderRadius:10,fontSize:13,lineHeight:1.55,whiteSpace:"pre-wrap",wordBreak:"break-word",background:Q.role==="user"?"var(--ac)":"var(--cdBg)",color:Q.role==="user"?"#fff":"var(--tx)"},children:Q.content})},Y)),G&&s.jsx("div",{"data-testid":"ai-chat-loading",style:{display:"flex",justifyContent:"flex-start",marginBottom:12},children:s.jsx("div",{style:{padding:"8px 12px",borderRadius:10,fontSize:13,background:"var(--cdBg)",color:"var(--txM)"},children:"Thinking..."})}),K&&s.jsx("div",{"data-testid":"ai-chat-error",style:{padding:"8px 12px",borderRadius:8,fontSize:12,background:"rgba(220,50,50,0.1)",color:"#d44",marginBottom:12},children:K}),s.jsx("div",{ref:xt})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderTop:"1px solid var(--bd)",flexShrink:0},children:[s.jsx("input",{ref:Dt,"data-testid":"ai-chat-input",value:C,onChange:Q=>y(Q.target.value),onKeyDown:ct,placeholder:Mt?"Ask a question...":"API key required",disabled:!Mt,style:{flex:1,background:"var(--cdBg)",border:"1px solid var(--bd)",borderRadius:8,padding:"8px 12px",color:"var(--tx)",fontSize:13,fontFamily:"var(--font-body)",outline:"none"}}),s.jsx("button",{"data-testid":"ai-chat-send",onClick:I,disabled:!Mt||!C.trim()||G,"aria-label":"Send message",style:{width:34,height:34,borderRadius:8,background:Mt&&C.trim()?"var(--ac)":"var(--cdBg)",color:Mt&&C.trim()?"#fff":"var(--txM)",border:"none",cursor:Mt&&C.trim()?"pointer":"default",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:s.jsx(Lh,{})})]})]}):s.jsx("button",{"data-testid":"ai-chat-button",onClick:()=>E(!0),"aria-label":"Open AI chat",style:{position:"fixed",bottom:24,right:24,zIndex:900,width:48,height:48,borderRadius:"50%",background:"var(--ac)",color:"#fff",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 16px rgba(0,0,0,0.25)",transition:"transform 0.15s"},children:s.jsx(Nh,{})})}function Qh(u){const h=/^#([0-9a-f]{6})$/i.exec(u.trim());if(!h)return null;const d=parseInt(h[1],16);return[d>>16&255,d>>8&255,d&255]}function Vh(u,h){const d=Qh(u);if(!d)return null;const[c,v,E]=d,A=`rgba(${c},${v},${E},${h?.12:.08})`,O=h?1.15:.85,C=Math.min(255,Math.round(c*O)),y=Math.min(255,Math.round(v*O)),G=Math.min(255,Math.round(E*O)),R=`rgb(${C},${y},${G})`;return{ac:u,acD:A,acT:R}}const je=({d:u,size:h=16})=>s.jsx("svg",{width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:u})}),rm=()=>s.jsx(je,{d:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21 21l-4.3-4.3"}),Pd=()=>s.jsx(je,{d:"M9 18l6-6-6-6",size:14}),Vu=()=>s.jsx(je,{d:"M6 9l6 6 6-6",size:14}),Zh=()=>s.jsx(je,{d:"M3 12h18M3 6h18M3 18h18",size:20}),Jh=()=>s.jsx(je,{d:"M18 6L6 18M6 6l12 12",size:18}),tm=()=>s.jsx(je,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}),em=()=>s.jsx(je,{d:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0-4a1 1 0 0 1 1-1v-1a1 1 0 0 1-2 0v1a1 1 0 0 1 1 1Zm0 16a1 1 0 0 1 1 1v1a1 1 0 0 1-2 0v-1a1 1 0 0 1 1-1ZM4 12a1 1 0 0 1-1 1H2a1 1 0 0 1 0-2h1a1 1 0 0 1 1 1Zm18-1h-1a1 1 0 0 1 0 2h1a1 1 0 0 1 0-2ZM6.34 6.34a1 1 0 0 1-1.41 0l-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1 0 1.41Zm12.73-2.12-.71.71a1 1 0 0 1-1.41-1.41l.71-.71a1 1 0 1 1 1.41 1.41ZM6.34 17.66l-.71.71a1 1 0 0 1-1.41-1.41l.71-.71a1 1 0 0 1 1.41 1.41Zm12.73 2.12-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1-1.41 1.41Z"}),nm=()=>s.jsx(je,{d:"M19 12H5M12 19l-7-7 7-7",size:14}),am=()=>s.jsx(je,{d:"M5 12h14M12 5l7 7-7 7",size:14}),Wh=()=>s.jsx(je,{d:"M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",size:13});function Fh(u){const h=new Date(u),c=new Date().getTime()-h.getTime();if(isNaN(c))return"";const v=Math.floor(c/1e3),E=Math.floor(v/60),A=Math.floor(E/60),O=Math.floor(A/24),C=Math.floor(O/30),y=Math.floor(O/365);return v<60?"just now":E<60?`${E} minute${E===1?"":"s"} ago`:A<24?`${A} hour${A===1?"":"s"} ago`:O<30?`${O} day${O===1?"":"s"} ago`:C<12?`${C} month${C===1?"":"s"} ago`:y>=1?`${y} year${y===1?"":"s"} ago`:h.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}let ul=null;const $h="/_pagefind/pagefind.js";async function Ih(){if(ul)return ul;try{return ul=await import($h),await ul.init(),ul}catch{return null}}let ko=null;function Ph(){return ko||(ko=Lt(()=>import("./theme-BIHI7g3E.js"),[]).catch(()=>null),ko)}function t0({appId:u,apiKey:h,indexName:d,onNavigate:c,onClose:v,basePath:E=""}){const[A,O]=w.useState(null),[C,y]=w.useState(!1);w.useEffect(()=>{Ph().then(R=>{R&&R.DocSearch?O(()=>R.DocSearch):R&&R.default?O(()=>R.default):y(!0)})},[]);const G=w.useCallback(R=>{try{let nt=new URL(R,"http://localhost").pathname;if(E){const xt=E.replace(/\/$/,"");nt.startsWith(xt)&&(nt=nt.slice(xt.length))}return nt.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index"}catch{return"index"}},[E]);return C?s.jsx("div",{onClick:v,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"12vh"},children:s.jsx("div",{onClick:R=>R.stopPropagation(),style:{background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,width:"100%",maxWidth:520,boxShadow:"0 24px 80px rgba(0,0,0,0.4)",padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"Algolia DocSearch is not available. Install @docsearch/react to enable it."})}):A?s.jsx("div",{"data-testid":"algolia-search-modal",children:s.jsx(A,{appId:u,apiKey:h,indexName:d,navigator:{navigate({itemUrl:R}){const K=G(R);c(K)}},hitComponent:({hit:R,children:K})=>s.jsx("a",{href:R.url,onClick:nt=>{nt.preventDefault();const xt=G(R.url);c(xt)},children:K})})}):s.jsx("div",{onClick:v,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"12vh"},children:s.jsx("div",{style:{background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,width:"100%",maxWidth:520,boxShadow:"0 24px 80px rgba(0,0,0,0.4)",padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"Loading search..."})})}const e0=()=>s.jsx(je,{d:"M12 8v4l3 3m6-3a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z",size:14}),n0=()=>s.jsx(je,{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM3.6 9h16.8M3.6 15h16.8M12 3a15 15 0 0 1 4 9 15 15 0 0 1-4 9 15 15 0 0 1-4-9 15 15 0 0 1 4-9Z",size:14}),a0=()=>s.jsx(je,{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3",size:11}),l0={github:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z",twitter:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865l8.875 11.633Z",discord:"M13.545 2.907a13.227 13.227 0 00-3.257-1.011.05.05 0 00-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 00-3.658 0 8.258 8.258 0 00-.412-.833.051.051 0 00-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 00-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 003.995 2.02.05.05 0 00.056-.019c.308-.42.582-.863.818-1.329a.05.05 0 00-.028-.07 8.735 8.735 0 01-1.248-.595.05.05 0 01-.005-.083c.084-.063.168-.129.248-.195a.05.05 0 01.051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 01.053.007c.08.066.164.132.248.195a.051.051 0 01-.004.085c-.399.232-.813.431-1.249.594a.05.05 0 00-.03.07c.24.465.515.909.817 1.329a.05.05 0 00.056.019 13.235 13.235 0 004.001-2.02.049.049 0 00.021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 00-.02-.019z",linkedin:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 01.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z",youtube:"M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 011.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 01-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 01-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 010 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 011.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 017.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z",mastodon:"M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765 2.79.765.504 1.783.504 5.253c-.005.995-.01 2.19.013 3.44.075 4.21.56 8.354 3.383 9.386 1.302.476 2.418.576 3.317.507 1.628-.125 2.541-.8 2.541-.8l-.054-1.182s-1.163.366-2.47.322c-1.293-.044-2.658-.138-2.867-1.716a3.23 3.23 0 01-.028-.465s1.27.31 2.879.384c.984.045 1.905-.058 2.842-.17zM13 8.59V5.319c0-.67-.17-1.2-.507-1.592-.348-.4-.806-.605-1.373-.605-.656 0-1.154.252-1.486.756L9.2 4.595l-.434-.717c-.332-.504-.83-.756-1.486-.756-.567 0-1.025.204-1.373.605-.338.392-.507.923-.507 1.592V8.59h1.69V5.468c0-.67.285-1.012.855-1.012.63 0 .946.404.946 1.204V7.11h1.682V5.66c0-.8.316-1.204.946-1.204.57 0 .855.342.855 1.012V8.59H13z",bluesky:"M3.468 1.948C5.303 3.325 7.276 6.118 8 7.616c.724-1.498 2.697-4.29 4.532-5.668C13.855 1.013 16 .638 16 3.14c0 .5-.286 4.2-.454 4.8-.585 2.093-2.716 2.628-4.544 2.305 3.195.564 4.007 2.433 2.25 4.302-3.337 3.548-4.8-1.244-5.252-2.547 0 0-.116-.334-.166-.334h.332C8.166 11.666 8.05 12 8.05 12c-.452 1.303-1.916 6.095-5.252 2.547-1.756-1.869-.946-3.738 2.25-4.302-1.829.323-3.96-.212-4.544-2.305C.336 7.34.05 3.64.05 3.14.05.638 2.195 1.013 3.468 1.948z"},i0=({platform:u,customIcon:h})=>{const d=u==="custom"&&h?h:l0[u];return d?s.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",children:s.jsx("path",{d})}):null},o0={Added:"#22c55e",Changed:"#3b82f6",Deprecated:"#f59e0b",Removed:"#ef4444",Fixed:"#8b5cf6",Security:"#f97316"};function s0({entries:u}){const[h,d]=w.useState(u.length<=5),c=h?u:u.slice(0,5);return s.jsxs("div",{"data-testid":"changelog-timeline",style:{position:"relative"},children:[s.jsx("div",{style:{position:"absolute",left:15,top:8,bottom:8,width:2,background:"var(--bd)"}}),c.map((v,E)=>s.jsxs("div",{"data-testid":`changelog-entry-${v.version}`,style:{position:"relative",paddingLeft:44,paddingBottom:E{const O=o0[A.type]||"#6b7280";return s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginBottom:8},children:[s.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:O}}),s.jsx("span",{style:{fontSize:12,fontWeight:600,textTransform:"uppercase",letterSpacing:".06em",color:O,fontFamily:"var(--font-code, monospace)"},children:A.type})]}),s.jsx("ul",{style:{margin:0,paddingLeft:18,listStyleType:"disc",color:"var(--tx2)"},children:A.items.map((C,y)=>s.jsx("li",{style:{fontSize:14,lineHeight:1.7,color:"var(--tx2)",marginBottom:2},children:C},y))})]},A.type)})]},v.version)),!h&&u.length>5&&s.jsx("div",{style:{textAlign:"center",marginTop:24},children:s.jsxs("button",{"data-testid":"changelog-show-more",onClick:()=>d(!0),style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 20px",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body, inherit)",cursor:"pointer"},children:["Show all ",u.length," releases"]})})]})}function u0(u,h,d){if(h==="index")return[];for(const c of u)if(c.pages.find(E=>E.id===h)){const E=[],A=c.pages[0];return E.push({label:c.section,href:A?A.urlPath:null}),E.push({label:d,href:null}),E}return[]}function r0({config:u,navigation:h,currentPageId:d,pageHtml:c,pageComponent:v,mdxComponents:E,pageTitle:A,pageDescription:O,headings:C,tocEnabled:y=!0,editUrl:G,lastUpdated:R,changelogEntries:K,apiManifest:nt,apiBaseUrl:xt,apiPlayground:Dt,apiAuth:Mt,ApiReferenceComponent:W,onNavigate:I,allPages:ct,versioning:Q,currentVersion:Y,i18n:H,currentLocale:U,docContext:at,basePath:lt="",isDraft:P,dir:mt,overrides:tt}){var za,En,fi,dl,ml,pl,Ca,ja,hl,gl,qe,Qt,ne,tn,Ma,di,mi,vl,zn;const At=U||(H==null?void 0:H.defaultLocale)||"en",$t=mt||((za=H==null?void 0:H.localeDirs)==null?void 0:za[At])||"ltr",ft=$t==="rtl",j=((En=u.theme)==null?void 0:En.mode)||"auto",[B,Z]=w.useState(()=>{var b;return j==="dark"?!0:j==="light"?!1:((b=window.matchMedia)==null?void 0:b.call(window,"(prefers-color-scheme: dark)").matches)??!1}),[J,Tt]=w.useState(()=>typeof window<"u"&&window.innerWidth<768),[m,_]=w.useState(()=>typeof window<"u"&&window.innerWidth>=768),[N,L]=w.useState(!1),[it,rt]=w.useState(!1),[Et,It]=w.useState(!1),[Ut,Ze]=w.useState(null),[pa,ha]=w.useState({}),[rl,Je]=w.useState(()=>{var b;if(!((b=u.banner)!=null&&b.text))return!0;try{const q=Array.from(u.banner.text).reduce((et,dt)=>(et<<5)-et+dt.charCodeAt(0)|0,0).toString(36);return localStorage.getItem("tome-banner-dismissed")===q}catch{return!1}}),cl=Q&&Y&&Y!==Q.current,[ga,Do]=w.useState(h.map(b=>b.section)),We=w.useRef(null),Fn=w.useRef(null),fl=w.useRef(""),[va,Oo]=w.useState(()=>typeof window<"u"&&window.innerWidth>1100),si=((fi=u.theme)==null?void 0:fi.preset)||"amber",se=((dl=Ao[si])==null?void 0:dl[B?"dark":"light"])||Ao.amber.dark,ui=(ml=u.theme)!=null&&ml.accent?Vh(u.theme.accent,B):null,te=ui?{...se,...ui}:se,ya=((pl=Ao[si])==null?void 0:pl.fonts)||Ao.amber.fonts,xn={heading:((ja=(Ca=u.theme)==null?void 0:Ca.fonts)==null?void 0:ja.heading)||ya.heading,body:((gl=(hl=u.theme)==null?void 0:hl.fonts)==null?void 0:gl.body)||ya.body,code:((Qt=(qe=u.theme)==null?void 0:qe.fonts)==null?void 0:Qt.code)||ya.code};w.useEffect(()=>{if(j!=="auto")return;const b=window.matchMedia("(prefers-color-scheme: dark)"),q=et=>Z(et.matches);return b.addEventListener("change",q),()=>b.removeEventListener("change",q)},[j]),w.useEffect(()=>{document.documentElement.classList.toggle("dark",B)},[B]),w.useEffect(()=>{const b=()=>{const q=window.innerWidth;Oo(q>1100),Tt(q<768)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),w.useEffect(()=>{if(J&&m)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[J,m]),w.useEffect(()=>{var b;(b=We.current)==null||b.scrollTo(0,0)},[d]),w.useEffect(()=>{const b=We.current;if(!b)return;const q=et=>{const dt=et.target;dt.tagName==="IMG"&&dt.closest(".tome-content")&&Ze(dt.src)};return b.addEventListener("click",q),()=>b.removeEventListener("click",q)},[]),w.useEffect(()=>{const b=We.current;if(!b)return;const q=et=>{const dt=et.target.closest("a");if(!dt)return;const St=dt.getAttribute("href");if(!St||St.startsWith("http://")||St.startsWith("https://")||St.startsWith("mailto:")||St.startsWith("tel:")||St.startsWith("//")||St.startsWith("#"))return;et.preventDefault();let yt=St.replace(/^\.\//,"").replace(/^\//,"").replace(/\.mdx?$/,"").replace(/\/$/,"");if(lt){const ce=lt.replace(/^\//,"").replace(/\/$/,"");ce&&yt.startsWith(ce+"/")?yt=yt.slice(ce.length+1):ce&&yt===ce&&(yt="index")}yt||(yt="index"),I(yt)};return b.addEventListener("click",q),()=>b.removeEventListener("click",q)},[I,lt]),w.useEffect(()=>{if(!Ut)return;const b=q=>{q.key==="Escape"&&Ze(null)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[Ut]);const Sn=u.toc,ri=(Sn==null?void 0:Sn.depth)??3,ba=(Sn==null?void 0:Sn.enabled)!==!1&&y,ye=C.filter(b=>b.depth<=ri),[ue,Me]=w.useState("");w.useEffect(()=>{if(!ba||ye.length<2)return;const b=We.current;if(!b)return;const q=setTimeout(()=>{const et=[];for(const St of ye){const yt=b.querySelector(`#${CSS.escape(St.id)}`);yt&&et.push(yt)}if(et.length===0)return;const dt=new IntersectionObserver(St=>{const yt=St.filter(ce=>ce.isIntersecting).sort((ce,pi)=>ce.boundingClientRect.top-pi.boundingClientRect.top);yt.length>0&&Me(yt[0].target.id)},{root:b,rootMargin:"0px 0px -80% 0px",threshold:0});for(const St of et)dt.observe(St);ee.current=dt},100);return()=>{var et;clearTimeout(q),(et=ee.current)==null||et.disconnect(),ee.current=null}},[d,ba,ye.map(b=>b.id).join(",")]);const ee=w.useRef(null);w.useEffect(()=>{Me("")},[d]),w.useLayoutEffect(()=>{if(!Fn.current||!c)return;const b=c.replace(/]*>[\s\S]*?<\/h1>\s*/,"");Fn.current.innerHTML=b,fl.current=b},[c,d]);const ci=w.useCallback((b,q)=>{b.preventDefault();const et=We.current;if(!et)return;const dt=et.querySelector(`#${CSS.escape(q)}`);dt&&(dt.scrollIntoView({behavior:"smooth",block:"start"}),Me(q))},[]);w.useEffect(()=>{const b=q=>{(q.metaKey||q.ctrlKey)&&q.key==="k"&&(q.preventDefault(),L(!0)),q.key==="Escape"&&L(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[]);const xa=h.flatMap(b=>b.pages),Sa=xa.findIndex(b=>b.id===d),Fe=Sa>0?xa[Sa-1]:null,$e=SaDo(q=>q.includes(b)?q.filter(et=>et!==b):[...q,b]),Ta={"--bg":te.bg,"--sf":te.sf,"--sfH":te.sfH,"--bd":te.bd,"--tx":te.tx,"--tx2":te.tx2,"--txM":te.txM,"--ac":te.ac,"--acD":te.acD,"--acT":te.acT,"--cdBg":te.cdBg,"--cdTx":te.cdTx,"--sbBg":te.sbBg,"--hdBg":te.hdBg,"--font-heading":`"${xn.heading}", serif`,"--font-body":`"${xn.body}", sans-serif`,"--font-code":`"${xn.code}", monospace`},Tn=v,Ne=(ne=u.banner)==null?void 0:ne.link,Ea=Ne?Ne.startsWith("#")||lt&&Ne.startsWith(lt+"/"):!1;return s.jsxs("div",{dir:$t,className:"tome-grain",style:{...Ta,color:"var(--tx)",background:"var(--bg)",fontFamily:"var(--font-body)",height:"100vh",overflow:"clip"},children:[((tn=u.banner)==null?void 0:tn.text)&&!rl&&s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:12,background:"var(--ac)",color:"#fff",padding:"8px 16px",fontSize:13,fontFamily:"var(--font-body)",fontWeight:500,textAlign:"center",width:"100vw",boxSizing:"border-box"},children:[u.banner.link?s.jsx("a",{href:Ea&&Ne.startsWith("#")?lt+"/"+Ne.slice(1):Ne,...Ea?{}:{target:"_blank",rel:"noopener noreferrer"},style:{color:"#fff",textDecoration:"underline"},onClick:Ea?b=>{b.preventDefault();const q=lt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),et=Ne.startsWith("#")?Ne.slice(1):Ne.replace(new RegExp("^"+q+"/?"),"");I(et||"index")}:void 0,children:u.banner.text}):s.jsx("span",{children:u.banner.text}),u.banner.dismissible!==!1&&s.jsx("button",{onClick:()=>{Je(!0);try{const b=Array.from(u.banner.text).reduce((q,et)=>(q<<5)-q+et.charCodeAt(0)|0,0).toString(36);localStorage.setItem("tome-banner-dismissed",b)}catch{}},"aria-label":"Dismiss banner",style:{background:"none",border:"none",color:"#fff",cursor:"pointer",fontSize:16,lineHeight:1,padding:0,opacity:.8},children:"×"})]}),N&&((Ma=u.search)==null?void 0:Ma.provider)==="algolia"&&u.search.appId&&u.search.apiKey&&u.search.indexName?s.jsx(t0,{appId:u.search.appId,apiKey:u.search.apiKey,indexName:u.search.indexName,onNavigate:b=>{I(b),L(!1)},onClose:()=>L(!1),basePath:lt}):N?s.jsx(c0,{allPages:ct,onNavigate:b=>{I(b),L(!1)},onClose:()=>L(!1),mobile:J}):null,s.jsxs("div",{style:{display:"flex",flexDirection:ft?"row-reverse":"row",flex:1,height:(di=u.banner)!=null&&di.text&&!rl?"calc(100vh - 32px)":"100vh"},children:[J&&m&&s.jsx("div",{onClick:()=>_(!1),style:{position:"fixed",inset:0,zIndex:200,background:"rgba(0,0,0,0.4)",backdropFilter:"blur(2px)"}}),tt!=null&&tt.Sidebar?s.jsx(tt.Sidebar,{config:u,navigation:h,currentPageId:d,onNavigate:I,mobile:J,sbOpen:m,setSbOpen:_,versioning:Q,currentVersion:Y}):s.jsxs("aside",{style:{width:m?270:0,minWidth:m?270:0,background:"var(--sbBg)",[ft?"borderLeft":"borderRight"]:"1px solid var(--bd)",display:"flex",flexDirection:"column",transition:"width .2s, min-width .2s",overflow:"hidden",...J?{position:"fixed",top:0,[ft?"right":"left"]:0,bottom:0,zIndex:201}:{}},children:[s.jsxs("a",{href:"/",style:{padding:"18px 20px",display:"flex",alignItems:"baseline",gap:6,borderBottom:"1px solid var(--bd)",textDecoration:"none",color:"inherit"},children:[s.jsx("span",{style:{fontFamily:"var(--font-heading)",fontSize:22,fontWeight:700,fontStyle:"italic"},children:u.name}),s.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"var(--ac)",display:"inline-block"}})]}),s.jsx("div",{style:{padding:"12px 14px"},children:s.jsxs("button",{onClick:()=>{L(!0),J&&_(!1)},style:{display:"flex",alignItems:"center",gap:8,width:"100%",background:"var(--cdBg)",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 12px",cursor:"pointer",color:"var(--txM)",fontSize:12.5,fontFamily:"var(--font-body)"},children:[s.jsx(rm,{}),s.jsx("span",{style:{flex:1,textAlign:ft?"right":"left"},children:"Search..."}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:9,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"2px 6px"},children:"⌘K"})]})}),s.jsx("nav",{style:{flex:1,overflow:"auto",padding:"4px 10px 20px"},children:h.map(b=>s.jsxs("div",{style:{marginBottom:8},children:[s.jsxs("button",{onClick:()=>Pe(b.section),style:{display:"flex",alignItems:"center",gap:6,width:"100%",background:"none",border:"none",padding:"8px 10px",cursor:"pointer",borderRadius:2,color:"var(--txM)",fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:".1em",fontFamily:"var(--font-code)"},children:[ga.includes(b.section)?s.jsx(Vu,{}):s.jsx(Pd,{}),b.section]}),ga.includes(b.section)&&s.jsx("div",{style:{[ft?"marginRight":"marginLeft"]:8,[ft?"borderRight":"borderLeft"]:"1px solid var(--bd)",[ft?"paddingRight":"paddingLeft"]:0},children:b.pages.map(q=>{const et=d===q.id;return s.jsxs("button",{onClick:()=>{I(q.id),J&&_(!1)},style:{display:"flex",alignItems:"center",gap:10,width:"100%",textAlign:ft?"right":"left",background:"none",border:"none",borderRadius:0,[ft?"borderRight":"borderLeft"]:et?"2px solid var(--ac)":"2px solid transparent",padding:"7px 14px",cursor:"pointer",color:et?"var(--ac)":"var(--tx2)",fontSize:13,fontWeight:et?500:400,fontFamily:"var(--font-body)",transition:"all .12s"},children:[q.title,q.badge&&(()=>{const dt={default:{bg:"var(--sf)",text:"var(--tx2)"},info:{bg:"rgba(59,130,246,0.15)",text:"rgb(59,130,246)"},success:{bg:"rgba(34,197,94,0.15)",text:"rgb(34,197,94)"},warning:{bg:"rgba(234,179,8,0.15)",text:"rgb(202,138,4)"},danger:{bg:"rgba(239,68,68,0.15)",text:"rgb(239,68,68)"}},St=dt[q.badge.variant||"default"]||dt.default;return s.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 6px",borderRadius:4,marginLeft:6,whiteSpace:"nowrap",background:St.bg,color:St.text},children:q.badge.text})})()]},q.id)})})]},b.section))}),Q&&J&&s.jsx("div",{style:{padding:"8px 16px",borderTop:"1px solid var(--bd)",display:"flex",gap:6},children:Q.versions.map(b=>s.jsxs("button",{onClick:()=>{const q=b===Q.current?"index":`${b}/index`;I(q)},style:{flex:1,padding:"3px 0",textAlign:"center",background:b===(Y||Q.current)?"var(--acD)":"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,cursor:"pointer",color:b===(Y||Q.current)?"var(--ac)":"var(--tx2)",fontSize:11,fontFamily:"var(--font-code)",fontWeight:b===Q.current?600:400},children:[b,b===Q.current?" (latest)":""]},b))}),s.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--bd)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[j==="auto"?s.jsx("button",{"aria-label":B?"Switch to light mode":"Switch to dark mode",onClick:()=>Z(b=>!b),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex"},children:B?s.jsx(em,{}):s.jsx(tm,{})}):s.jsx("div",{}),s.jsxs("span",{style:{fontSize:11,color:"var(--txM)",letterSpacing:.2},children:["Built with ","♡"," by Tome"]}),s.jsx("span",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)"},children:"v0.5.0"})]})]}),s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[tt!=null&&tt.Header?s.jsx(tt.Header,{config:u,navigation:h,currentPageId:d,onNavigate:I,mobile:J,sbOpen:m,setSbOpen:_,isDark:B,setDark:Z,versioning:Q,currentVersion:Y,i18n:H,currentLocale:U,onSearchOpen:()=>L(!0),basePath:lt}):s.jsxs("header",{style:{display:"flex",alignItems:"center",gap:J?8:12,padding:J?"8px 12px":"10px 24px",borderBottom:"1px solid var(--bd)",background:"var(--hdBg)",backdropFilter:"blur(12px)",maxWidth:"100vw",overflow:"visible",position:"relative",zIndex:200},children:[s.jsx("button",{"aria-label":m?"Close sidebar":"Open sidebar",onClick:()=>_(!m),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex"},children:m?s.jsx(Jh,{}):s.jsx(Zh,{})}),J?s.jsx("span",{style:{fontSize:13,color:"var(--ac)",fontFamily:"var(--font-code)",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:((mi=h.flatMap(b=>b.pages).find(b=>b.id===d))==null?void 0:mi.title)||""}):s.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--font-code)",fontSize:11,color:"var(--txM)",letterSpacing:".03em",flex:1},children:h.map(b=>{const q=b.pages.find(et=>et.id===d);return q?s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{children:b.section}),s.jsx(Pd,{}),s.jsx("span",{style:{color:"var(--ac)"},children:q.title})]},b.section):null})}),u.topNav&&u.topNav.length>0&&!J&&s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[u.topNav.map(b=>{const q=b.href.startsWith("#")||lt&&b.href.startsWith(lt+"/"),et=!q;return s.jsxs("a",{href:q&&b.href.startsWith("#")?lt+"/"+b.href.slice(1):b.href,...et?{target:"_blank",rel:"noopener noreferrer"}:{},onClick:q?dt=>{dt.preventDefault();const St=b.href.startsWith("#")?b.href.slice(1):b.href.replace(new RegExp("^"+lt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"/?"),"");I(St)}:void 0,style:{display:"flex",alignItems:"center",gap:4,color:"var(--txM)",textDecoration:"none",fontSize:12,fontFamily:"var(--font-body)",fontWeight:500,transition:"color .15s"},onMouseOver:dt=>dt.currentTarget.style.color="var(--ac)",onMouseOut:dt=>dt.currentTarget.style.color="var(--txM)",children:[b.label,et&&s.jsx(a0,{})]},b.label)}),s.jsx("span",{style:{width:1,height:16,background:"var(--bd)"}})]}),u.socialLinks&&u.socialLinks.length>0&&!J&&s.jsx("div",{style:{display:"flex",alignItems:"center",gap:8},children:u.socialLinks.map(b=>s.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer","aria-label":b.label||b.platform,"data-testid":`social-link-${b.platform}`,style:{display:"flex",alignItems:"center",justifyContent:"center",color:"var(--tx2)",cursor:"pointer",transition:"color .15s"},onMouseOver:q=>q.currentTarget.style.color="var(--tx)",onMouseOut:q=>q.currentTarget.style.color="var(--tx2)",children:s.jsx(i0,{platform:b.platform,customIcon:b.icon})},b.url))}),J&&j==="auto"&&s.jsx("button",{"aria-label":B?"Switch to light mode":"Switch to dark mode",onClick:()=>Z(b=>!b),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex",flexShrink:0},children:B?s.jsx(em,{}):s.jsx(tm,{})}),Q&&!J&&s.jsxs("div",{style:{position:"relative"},children:[s.jsxs("button",{"data-testid":"version-switcher",onClick:()=>rt(b=>!b),style:{display:"flex",alignItems:"center",gap:6,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"5px 10px",cursor:"pointer",color:"var(--tx2)",fontSize:12,fontFamily:"var(--font-code)"},children:[s.jsx(e0,{}),Y||Q.current,s.jsx(Vu,{})]}),it&&s.jsx("div",{"data-testid":"version-dropdown",style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,boxShadow:"0 8px 32px rgba(0,0,0,0.2)",overflow:"hidden",zIndex:100,minWidth:120},children:Q.versions.map(b=>s.jsxs("button",{onClick:()=>{rt(!1);const q=b===Q.current?"index":`${b}/index`;I(q)},style:{display:"block",width:"100%",textAlign:"left",background:b===(Y||Q.current)?"var(--acD)":"none",border:"none",padding:"8px 14px",cursor:"pointer",color:b===(Y||Q.current)?"var(--ac)":"var(--tx2)",fontSize:12,fontFamily:"var(--font-code)",fontWeight:b===Q.current?600:400},children:[b,b===Q.current?" (latest)":""]},b))})]}),H&&H.locales.length>1&&!J&&s.jsxs("div",{style:{position:"relative"},children:[s.jsxs("button",{"data-testid":"language-switcher",onClick:()=>It(b=>!b),style:{display:"flex",alignItems:"center",gap:6,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"5px 10px",cursor:"pointer",color:"var(--tx2)",fontSize:12,fontFamily:"var(--font-body)"},children:[s.jsx(n0,{}),((vl=H.localeNames)==null?void 0:vl[U||H.defaultLocale])||U||H.defaultLocale,s.jsx(Vu,{})]}),Et&&s.jsx("div",{"data-testid":"language-dropdown",style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,boxShadow:"0 8px 32px rgba(0,0,0,0.2)",overflow:"hidden",zIndex:100,minWidth:120},children:H.locales.map(b=>{var ce;const q=b===(U||H.defaultLocale),et=((ce=H.localeNames)==null?void 0:ce[b])||b,dt=U||H.defaultLocale;let St=d;dt!==H.defaultLocale&&d.startsWith(`${dt}/`)&&(St=d.slice(dt.length+1));const yt=b===H.defaultLocale?St:`${b}/${St}`;return s.jsx("button",{onClick:()=>{It(!1),I(yt)},style:{display:"block",width:"100%",textAlign:"left",background:q?"var(--acD)":"none",border:"none",padding:"8px 14px",cursor:"pointer",color:q?"var(--ac)":"var(--tx2)",fontSize:12,fontFamily:"var(--font-body)",fontWeight:q?600:400},children:et},b)})})]})]}),cl&&s.jsxs("div",{"data-testid":"old-version-banner",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:"var(--acD)",borderBottom:"1px solid var(--bd)",padding:"8px 24px",fontSize:13,color:"var(--tx2)"},children:[s.jsxs("span",{children:["You're viewing docs for ",Y,"."]}),s.jsx("button",{onClick:()=>{I("index")},style:{background:"none",border:"none",color:"var(--ac)",cursor:"pointer",fontWeight:600,fontSize:13,fontFamily:"var(--font-body)",textDecoration:"underline"},children:"Switch to latest."})]}),s.jsxs("div",{ref:We,style:{flex:1,overflow:"auto",display:"flex"},children:[s.jsxs("main",{style:{flex:1,maxWidth:J?"100%":nt?1100:760,padding:J?"24px 16px 60px":"40px 48px 80px",margin:"0 auto",minWidth:0},children:[Ie.length>0&&s.jsx("nav",{"aria-label":"Breadcrumbs","data-testid":"breadcrumbs",style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:"var(--tx2)",marginBottom:8},children:Ie.map((b,q)=>s.jsxs(sm.Fragment,{children:[q>0&&s.jsx("span",{style:{color:"var(--tx2)",opacity:.5},children:"›"}),q{et.preventDefault();const dt=h.flatMap(St=>St.pages).find(St=>St.urlPath===b.href);dt&&I(dt.id)},style:{color:"var(--tx2)",textDecoration:"none",cursor:"pointer"},children:b.label}):s.jsx("span",{style:q===Ie.length-1?{color:"var(--tx)"}:void 0,children:b.label})]},q))}),s.jsx("h1",{style:{fontFamily:"var(--font-heading)",fontSize:J?26:38,fontWeight:400,fontStyle:"italic",lineHeight:1.15,marginBottom:8},children:A}),P&&s.jsx("div",{"data-testid":"draft-banner",style:{background:"#fef3c7",color:"#92400e",padding:"8px 16px",borderRadius:6,fontSize:13,marginBottom:16},children:"Draft — This page is only visible in development"}),O&&s.jsx("p",{style:{fontSize:16,color:"var(--tx2)",lineHeight:1.6,marginBottom:32},children:O}),s.jsx("div",{style:{borderTop:"1px solid var(--bd)",paddingTop:28},children:nt&&W?s.jsx(W,{manifest:nt,baseUrl:xt,showPlayground:Dt,playgroundAuth:Mt}):K&&K.length>0?s.jsx(s0,{entries:K}):Tn?s.jsx("div",{className:"tome-content",children:s.jsx(Tn,{components:E||{}})}):s.jsx("div",{className:"tome-content",ref:Fn},d)}),tt!=null&&tt.PageFooter?s.jsx(tt.PageFooter,{editUrl:G,lastUpdated:R,currentPageId:d,prev:Fe,next:$e,onNavigate:I,mobile:J}):s.jsxs(s.Fragment,{children:[(G||R)&&s.jsxs("div",{style:{marginTop:40,display:"flex",flexDirection:J?"column":"row",alignItems:J?"flex-start":"center",justifyContent:"space-between",gap:J?8:16},children:[G&&s.jsx("div",{"data-testid":"edit-page-link",children:s.jsxs("a",{href:G,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--txM)",textDecoration:"none",fontSize:13,fontFamily:"var(--font-body)",transition:"color .15s"},onMouseOver:b=>b.currentTarget.style.color="var(--ac)",onMouseOut:b=>b.currentTarget.style.color="var(--txM)",children:[s.jsx(Wh,{})," Edit this page on GitHub"]})}),R&&s.jsxs("div",{"data-testid":"last-updated",style:{fontSize:12,color:"var(--txM)",fontFamily:"var(--font-body)"},children:["Last updated ",Fh(R)]})]}),s.jsx("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:24,padding:"12px 0"},children:pa[d]?s.jsx("span",{style:{fontSize:13,color:"var(--txM)",fontFamily:"var(--font-body)"},children:"Thanks for your feedback!"}):s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{fontSize:13,color:"var(--txM)",fontFamily:"var(--font-body)"},children:"Was this helpful?"}),s.jsx("button",{onClick:()=>{ha(b=>({...b,[d]:!0}));try{localStorage.setItem(`tome-feedback-${d}`,"up")}catch{}},style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"4px 10px",cursor:"pointer",fontSize:13,color:"var(--txM)",transition:"border-color .15s"},children:"👍"}),s.jsx("button",{onClick:()=>{ha(b=>({...b,[d]:!0}));try{localStorage.setItem(`tome-feedback-${d}`,"down")}catch{}},style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"4px 10px",cursor:"pointer",fontSize:13,color:"var(--txM)",transition:"border-color .15s"},children:"👎"})]})}),s.jsxs("div",{style:{display:"flex",flexDirection:J?"column":"row",justifyContent:"space-between",marginTop:16,paddingTop:24,borderTop:"1px solid var(--bd)",gap:J?12:16},children:[Fe?s.jsxs("button",{onClick:()=>I(Fe.id),style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"10px 16px",cursor:"pointer",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body)",transition:"border-color .15s, color .15s"},children:[ft?s.jsx(am,{}):s.jsx(nm,{})," ",Fe.title]}):s.jsx("div",{}),$e?s.jsxs("button",{onClick:()=>I($e.id),style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"10px 16px",cursor:"pointer",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body)",transition:"border-color .15s, color .15s"},children:[$e.title," ",ft?s.jsx(nm,{}):s.jsx(am,{})]}):s.jsx("div",{})]})]})]}),tt!=null&&tt.Toc?ba&&ye.length>=2&&va&&s.jsx(tt.Toc,{headings:ye,activeHeadingId:ue,onScrollToHeading:ci}):ba&&ye.length>=2&&va&&s.jsxs("aside",{"data-testid":"toc-sidebar",style:{width:200,padding:ft?"40px 0 40px 16px":"40px 16px 40px 0",position:"sticky",top:0,alignSelf:"flex-start",flexShrink:0},children:[s.jsx("div",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:".1em",color:"var(--txM)",marginBottom:12,fontFamily:"var(--font-code)"},children:"On this page"}),s.jsx("nav",{"aria-label":"Table of contents",style:{[ft?"borderRight":"borderLeft"]:"1px solid var(--bd)",[ft?"paddingRight":"paddingLeft"]:0},children:ye.map((b,q)=>{const et=ue===b.id;return s.jsx("a",{href:`#${b.id}`,onClick:dt=>ci(dt,b.id),"data-testid":`toc-link-${b.id}`,style:{display:"block",fontSize:12,color:et?"var(--ac)":"var(--txM)",fontWeight:et?500:400,textDecoration:"none",padding:"4px 12px",[ft?"paddingRight":"paddingLeft"]:12+(b.depth-2)*12,lineHeight:1.4,transition:"color .15s, font-weight .15s",[ft?"borderRight":"borderLeft"]:et?"2px solid var(--ac)":"2px solid transparent",[ft?"marginRight":"marginLeft"]:-1},children:b.text},q)})})]})]})]})]}),(tt==null?void 0:tt.Footer)&&s.jsx(tt.Footer,{config:u,navigation:h,currentPageId:d,onNavigate:I}),((zn=u.ai)==null?void 0:zn.enabled)&&s.jsx(Xh,{provider:u.ai.provider||"anthropic",model:u.ai.model,apiKey:typeof __TOME_AI_API_KEY__<"u"&&__TOME_AI_API_KEY__?__TOME_AI_API_KEY__:void 0,context:(at==null?void 0:at.map(b=>`## ${b.title} +${d}`}return h}async function Gh(u,h,d,c){var A,O,C;const v=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${h}`},body:JSON.stringify({model:d,messages:[{role:"system",content:um(c)},...u.map(y=>({role:y.role,content:y.content}))]})});if(!v.ok){const y=await v.text();throw new Error(`OpenAI API error (${v.status}): ${y}`)}return((C=(O=(A=(await v.json()).choices)==null?void 0:A[0])==null?void 0:O.message)==null?void 0:C.content)||"No response."}async function Yh(u,h,d,c){var A,O;const v=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":h,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify({model:d,max_tokens:1024,system:um(c),messages:u.map(C=>({role:C.role,content:C.content}))})});if(!v.ok){const C=await v.text();throw new Error(`Anthropic API error (${v.status}): ${C}`)}return((O=(A=(await v.json()).content)==null?void 0:A[0])==null?void 0:O.text)||"No response."}function Kh(u){return u==="openai"?"gpt-4o-mini":"claude-sonnet-4-20250514"}function Xh({provider:u,model:h,apiKey:d,context:c}){const[v,E]=w.useState(!1),[A,O]=w.useState([]),[C,y]=w.useState(""),[G,R]=w.useState(!1),[K,nt]=w.useState(null),xt=w.useRef(null),Dt=w.useRef(null),Mt=d||(typeof window<"u"?window.__TOME_AI_API_KEY__:void 0),W=h||Kh(u);w.useEffect(()=>{var Q;(Q=xt.current)==null||Q.scrollIntoView({behavior:"smooth"})},[A]),w.useEffect(()=>{v&&setTimeout(()=>{var Q;return(Q=Dt.current)==null?void 0:Q.focus()},100)},[v]);const I=w.useCallback(async()=>{const Q=C.trim();if(!Q||G||!Mt)return;const Y={role:"user",content:Q},H=[...A,Y];O(H),y(""),R(!0),nt(null);try{let U;u==="openai"?U=await Gh(H,Mt,W,c):U=await Yh(H,Mt,W,c),O(at=>[...at,{role:"assistant",content:U}])}catch(U){nt(U instanceof Error?U.message:"Failed to get response")}finally{R(!1)}},[C,G,A,u,Mt,W,c]),ct=w.useCallback(Q=>{Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),I())},[I]);return v?s.jsxs("div",{"data-testid":"ai-chat-panel",style:{position:"fixed",bottom:24,right:24,zIndex:900,width:380,maxWidth:"calc(100vw - 48px)",height:520,maxHeight:"calc(100vh - 48px)",background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,boxShadow:"0 16px 64px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column",overflow:"hidden",fontFamily:"var(--font-body)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid var(--bd)",flexShrink:0},children:[s.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--tx)"},children:"Ask AI"}),s.jsx("button",{"data-testid":"ai-chat-close",onClick:()=>E(!1),"aria-label":"Close AI chat",style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex",padding:4},children:s.jsx(qh,{})})]}),s.jsxs("div",{style:{flex:1,overflow:"auto",padding:"12px 16px"},children:[!Mt&&s.jsxs("div",{"data-testid":"ai-chat-no-key",style:{textAlign:"center",color:"var(--txM)",fontSize:13,padding:"24px 8px",lineHeight:1.6},children:[s.jsx("p",{style:{marginBottom:8,fontWeight:500,color:"var(--tx)"},children:"AI not configured"}),s.jsxs("p",{style:{marginBottom:8},children:["To enable AI chat, set the ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"apiKeyEnv"})," in ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"tome.config.js"})," and provide the environment variable at build time."]}),s.jsxs("p",{style:{fontSize:11.5,color:"var(--txM)"},children:["Example: ",s.jsx("code",{style:{fontFamily:"var(--font-code)",fontSize:"0.88em",background:"var(--cdBg)",padding:"0.15em 0.4em",borderRadius:4},children:"TOME_AI_KEY=sk-... tome build"})]})]}),A.map((Q,Y)=>s.jsx("div",{"data-testid":`ai-chat-message-${Q.role}`,style:{marginBottom:12,display:"flex",justifyContent:Q.role==="user"?"flex-end":"flex-start"},children:s.jsx("div",{style:{maxWidth:"85%",padding:"8px 12px",borderRadius:10,fontSize:13,lineHeight:1.55,whiteSpace:"pre-wrap",wordBreak:"break-word",background:Q.role==="user"?"var(--ac)":"var(--cdBg)",color:Q.role==="user"?"#fff":"var(--tx)"},children:Q.content})},Y)),G&&s.jsx("div",{"data-testid":"ai-chat-loading",style:{display:"flex",justifyContent:"flex-start",marginBottom:12},children:s.jsx("div",{style:{padding:"8px 12px",borderRadius:10,fontSize:13,background:"var(--cdBg)",color:"var(--txM)"},children:"Thinking..."})}),K&&s.jsx("div",{"data-testid":"ai-chat-error",style:{padding:"8px 12px",borderRadius:8,fontSize:12,background:"rgba(220,50,50,0.1)",color:"#d44",marginBottom:12},children:K}),s.jsx("div",{ref:xt})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderTop:"1px solid var(--bd)",flexShrink:0},children:[s.jsx("input",{ref:Dt,"data-testid":"ai-chat-input",value:C,onChange:Q=>y(Q.target.value),onKeyDown:ct,placeholder:Mt?"Ask a question...":"API key required",disabled:!Mt,style:{flex:1,background:"var(--cdBg)",border:"1px solid var(--bd)",borderRadius:8,padding:"8px 12px",color:"var(--tx)",fontSize:13,fontFamily:"var(--font-body)",outline:"none"}}),s.jsx("button",{"data-testid":"ai-chat-send",onClick:I,disabled:!Mt||!C.trim()||G,"aria-label":"Send message",style:{width:34,height:34,borderRadius:8,background:Mt&&C.trim()?"var(--ac)":"var(--cdBg)",color:Mt&&C.trim()?"#fff":"var(--txM)",border:"none",cursor:Mt&&C.trim()?"pointer":"default",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:s.jsx(Lh,{})})]})]}):s.jsx("button",{"data-testid":"ai-chat-button",onClick:()=>E(!0),"aria-label":"Open AI chat",style:{position:"fixed",bottom:24,right:24,zIndex:900,width:48,height:48,borderRadius:"50%",background:"var(--ac)",color:"#fff",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 16px rgba(0,0,0,0.25)",transition:"transform 0.15s"},children:s.jsx(Nh,{})})}function Qh(u){const h=/^#([0-9a-f]{6})$/i.exec(u.trim());if(!h)return null;const d=parseInt(h[1],16);return[d>>16&255,d>>8&255,d&255]}function Vh(u,h){const d=Qh(u);if(!d)return null;const[c,v,E]=d,A=`rgba(${c},${v},${E},${h?.12:.08})`,O=h?1.15:.85,C=Math.min(255,Math.round(c*O)),y=Math.min(255,Math.round(v*O)),G=Math.min(255,Math.round(E*O)),R=`rgb(${C},${y},${G})`;return{ac:u,acD:A,acT:R}}const je=({d:u,size:h=16})=>s.jsx("svg",{width:h,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:u})}),rm=()=>s.jsx(je,{d:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21 21l-4.3-4.3"}),Pd=()=>s.jsx(je,{d:"M9 18l6-6-6-6",size:14}),Vu=()=>s.jsx(je,{d:"M6 9l6 6 6-6",size:14}),Zh=()=>s.jsx(je,{d:"M3 12h18M3 6h18M3 18h18",size:20}),Jh=()=>s.jsx(je,{d:"M18 6L6 18M6 6l12 12",size:18}),tm=()=>s.jsx(je,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"}),em=()=>s.jsx(je,{d:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0-4a1 1 0 0 1 1-1v-1a1 1 0 0 1-2 0v1a1 1 0 0 1 1 1Zm0 16a1 1 0 0 1 1 1v1a1 1 0 0 1-2 0v-1a1 1 0 0 1 1-1ZM4 12a1 1 0 0 1-1 1H2a1 1 0 0 1 0-2h1a1 1 0 0 1 1 1Zm18-1h-1a1 1 0 0 1 0 2h1a1 1 0 0 1 0-2ZM6.34 6.34a1 1 0 0 1-1.41 0l-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1 0 1.41Zm12.73-2.12-.71.71a1 1 0 0 1-1.41-1.41l.71-.71a1 1 0 1 1 1.41 1.41ZM6.34 17.66l-.71.71a1 1 0 0 1-1.41-1.41l.71-.71a1 1 0 0 1 1.41 1.41Zm12.73 2.12-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 1-1.41 1.41Z"}),nm=()=>s.jsx(je,{d:"M19 12H5M12 19l-7-7 7-7",size:14}),am=()=>s.jsx(je,{d:"M5 12h14M12 5l7 7-7 7",size:14}),Wh=()=>s.jsx(je,{d:"M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",size:13});function Fh(u){const h=new Date(u),c=new Date().getTime()-h.getTime();if(isNaN(c))return"";const v=Math.floor(c/1e3),E=Math.floor(v/60),A=Math.floor(E/60),O=Math.floor(A/24),C=Math.floor(O/30),y=Math.floor(O/365);return v<60?"just now":E<60?`${E} minute${E===1?"":"s"} ago`:A<24?`${A} hour${A===1?"":"s"} ago`:O<30?`${O} day${O===1?"":"s"} ago`:C<12?`${C} month${C===1?"":"s"} ago`:y>=1?`${y} year${y===1?"":"s"} ago`:h.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}let ul=null;const $h="/_pagefind/pagefind.js";async function Ih(){if(ul)return ul;try{return ul=await import($h),await ul.init(),ul}catch{return null}}let ko=null;function Ph(){return ko||(ko=Lt(()=>import("./theme-BIHI7g3E.js"),[]).catch(()=>null),ko)}function tg({appId:u,apiKey:h,indexName:d,onNavigate:c,onClose:v,basePath:E=""}){const[A,O]=w.useState(null),[C,y]=w.useState(!1);w.useEffect(()=>{Ph().then(R=>{R&&R.DocSearch?O(()=>R.DocSearch):R&&R.default?O(()=>R.default):y(!0)})},[]);const G=w.useCallback(R=>{try{let nt=new URL(R,"http://localhost").pathname;if(E){const xt=E.replace(/\/$/,"");nt.startsWith(xt)&&(nt=nt.slice(xt.length))}return nt.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index"}catch{return"index"}},[E]);return C?s.jsx("div",{onClick:v,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"12vh"},children:s.jsx("div",{onClick:R=>R.stopPropagation(),style:{background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,width:"100%",maxWidth:520,boxShadow:"0 24px 80px rgba(0,0,0,0.4)",padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"Algolia DocSearch is not available. Install @docsearch/react to enable it."})}):A?s.jsx("div",{"data-testid":"algolia-search-modal",children:s.jsx(A,{appId:u,apiKey:h,indexName:d,navigator:{navigate({itemUrl:R}){const K=G(R);c(K)}},hitComponent:({hit:R,children:K})=>s.jsx("a",{href:R.url,onClick:nt=>{nt.preventDefault();const xt=G(R.url);c(xt)},children:K})})}):s.jsx("div",{onClick:v,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"12vh"},children:s.jsx("div",{style:{background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:12,width:"100%",maxWidth:520,boxShadow:"0 24px 80px rgba(0,0,0,0.4)",padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"Loading search..."})})}const eg=()=>s.jsx(je,{d:"M12 8v4l3 3m6-3a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z",size:14}),ng=()=>s.jsx(je,{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM3.6 9h16.8M3.6 15h16.8M12 3a15 15 0 0 1 4 9 15 15 0 0 1-4 9 15 15 0 0 1-4-9 15 15 0 0 1 4-9Z",size:14}),ag=()=>s.jsx(je,{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3",size:11}),lg={github:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z",twitter:"M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865l8.875 11.633Z",discord:"M13.545 2.907a13.227 13.227 0 00-3.257-1.011.05.05 0 00-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 00-3.658 0 8.258 8.258 0 00-.412-.833.051.051 0 00-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 00-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 003.995 2.02.05.05 0 00.056-.019c.308-.42.582-.863.818-1.329a.05.05 0 00-.028-.07 8.735 8.735 0 01-1.248-.595.05.05 0 01-.005-.083c.084-.063.168-.129.248-.195a.05.05 0 01.051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 01.053.007c.08.066.164.132.248.195a.051.051 0 01-.004.085c-.399.232-.813.431-1.249.594a.05.05 0 00-.03.07c.24.465.515.909.817 1.329a.05.05 0 00.056.019 13.235 13.235 0 004.001-2.02.049.049 0 00.021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 00-.02-.019z",linkedin:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 01.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z",youtube:"M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 011.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.007 2.007 0 01-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.007 2.007 0 01-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31.4 31.4 0 010 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.007 2.007 0 011.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A99.788 99.788 0 017.858 2h.193zM6.4 5.209v4.818l4.157-2.408L6.4 5.209z",mastodon:"M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765 2.79.765.504 1.783.504 5.253c-.005.995-.01 2.19.013 3.44.075 4.21.56 8.354 3.383 9.386 1.302.476 2.418.576 3.317.507 1.628-.125 2.541-.8 2.541-.8l-.054-1.182s-1.163.366-2.47.322c-1.293-.044-2.658-.138-2.867-1.716a3.23 3.23 0 01-.028-.465s1.27.31 2.879.384c.984.045 1.905-.058 2.842-.17zM13 8.59V5.319c0-.67-.17-1.2-.507-1.592-.348-.4-.806-.605-1.373-.605-.656 0-1.154.252-1.486.756L9.2 4.595l-.434-.717c-.332-.504-.83-.756-1.486-.756-.567 0-1.025.204-1.373.605-.338.392-.507.923-.507 1.592V8.59h1.69V5.468c0-.67.285-1.012.855-1.012.63 0 .946.404.946 1.204V7.11h1.682V5.66c0-.8.316-1.204.946-1.204.57 0 .855.342.855 1.012V8.59H13z",bluesky:"M3.468 1.948C5.303 3.325 7.276 6.118 8 7.616c.724-1.498 2.697-4.29 4.532-5.668C13.855 1.013 16 .638 16 3.14c0 .5-.286 4.2-.454 4.8-.585 2.093-2.716 2.628-4.544 2.305 3.195.564 4.007 2.433 2.25 4.302-3.337 3.548-4.8-1.244-5.252-2.547 0 0-.116-.334-.166-.334h.332C8.166 11.666 8.05 12 8.05 12c-.452 1.303-1.916 6.095-5.252 2.547-1.756-1.869-.946-3.738 2.25-4.302-1.829.323-3.96-.212-4.544-2.305C.336 7.34.05 3.64.05 3.14.05.638 2.195 1.013 3.468 1.948z"},ig=({platform:u,customIcon:h})=>{const d=u==="custom"&&h?h:lg[u];return d?s.jsx("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",children:s.jsx("path",{d})}):null},og={Added:"#22c55e",Changed:"#3b82f6",Deprecated:"#f59e0b",Removed:"#ef4444",Fixed:"#8b5cf6",Security:"#f97316"};function sg({entries:u}){const[h,d]=w.useState(u.length<=5),c=h?u:u.slice(0,5);return s.jsxs("div",{"data-testid":"changelog-timeline",style:{position:"relative"},children:[s.jsx("div",{style:{position:"absolute",left:15,top:8,bottom:8,width:2,background:"var(--bd)"}}),c.map((v,E)=>s.jsxs("div",{"data-testid":`changelog-entry-${v.version}`,style:{position:"relative",paddingLeft:44,paddingBottom:E{const O=og[A.type]||"#6b7280";return s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginBottom:8},children:[s.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:O}}),s.jsx("span",{style:{fontSize:12,fontWeight:600,textTransform:"uppercase",letterSpacing:".06em",color:O,fontFamily:"var(--font-code, monospace)"},children:A.type})]}),s.jsx("ul",{style:{margin:0,paddingLeft:18,listStyleType:"disc",color:"var(--tx2)"},children:A.items.map((C,y)=>s.jsx("li",{style:{fontSize:14,lineHeight:1.7,color:"var(--tx2)",marginBottom:2},children:C},y))})]},A.type)})]},v.version)),!h&&u.length>5&&s.jsx("div",{style:{textAlign:"center",marginTop:24},children:s.jsxs("button",{"data-testid":"changelog-show-more",onClick:()=>d(!0),style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 20px",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body, inherit)",cursor:"pointer"},children:["Show all ",u.length," releases"]})})]})}function ug(u,h,d){if(h==="index")return[];for(const c of u)if(c.pages.find(E=>E.id===h)){const E=[],A=c.pages[0];return E.push({label:c.section,href:A?A.urlPath:null}),E.push({label:d,href:null}),E}return[]}function rg({config:u,navigation:h,currentPageId:d,pageHtml:c,pageComponent:v,mdxComponents:E,pageTitle:A,pageDescription:O,headings:C,tocEnabled:y=!0,editUrl:G,lastUpdated:R,changelogEntries:K,apiManifest:nt,apiBaseUrl:xt,apiPlayground:Dt,apiAuth:Mt,ApiReferenceComponent:W,onNavigate:I,allPages:ct,versioning:Q,currentVersion:Y,i18n:H,currentLocale:U,docContext:at,basePath:lt="",isDraft:P,dir:mt,overrides:tt}){var za,En,fi,dl,ml,pl,Ca,ja,hl,gl,qe,Qt,ne,tn,Ma,di,mi,vl,zn;const At=U||(H==null?void 0:H.defaultLocale)||"en",$t=mt||((za=H==null?void 0:H.localeDirs)==null?void 0:za[At])||"ltr",ft=$t==="rtl",j=((En=u.theme)==null?void 0:En.mode)||"auto",[B,Z]=w.useState(()=>{var b;return j==="dark"?!0:j==="light"?!1:((b=window.matchMedia)==null?void 0:b.call(window,"(prefers-color-scheme: dark)").matches)??!1}),[J,Tt]=w.useState(()=>typeof window<"u"&&window.innerWidth<768),[m,_]=w.useState(()=>typeof window<"u"&&window.innerWidth>=768),[N,L]=w.useState(!1),[it,rt]=w.useState(!1),[Et,It]=w.useState(!1),[Ut,Ze]=w.useState(null),[pa,ha]=w.useState({}),[rl,Je]=w.useState(()=>{var b;if(!((b=u.banner)!=null&&b.text))return!0;try{const q=Array.from(u.banner.text).reduce((et,dt)=>(et<<5)-et+dt.charCodeAt(0)|0,0).toString(36);return localStorage.getItem("tome-banner-dismissed")===q}catch{return!1}}),cl=Q&&Y&&Y!==Q.current,[ga,Do]=w.useState(h.map(b=>b.section)),We=w.useRef(null),Fn=w.useRef(null),fl=w.useRef(""),[va,Oo]=w.useState(()=>typeof window<"u"&&window.innerWidth>1100),si=((fi=u.theme)==null?void 0:fi.preset)||"amber",se=((dl=Ao[si])==null?void 0:dl[B?"dark":"light"])||Ao.amber.dark,ui=(ml=u.theme)!=null&&ml.accent?Vh(u.theme.accent,B):null,te=ui?{...se,...ui}:se,ya=((pl=Ao[si])==null?void 0:pl.fonts)||Ao.amber.fonts,xn={heading:((ja=(Ca=u.theme)==null?void 0:Ca.fonts)==null?void 0:ja.heading)||ya.heading,body:((gl=(hl=u.theme)==null?void 0:hl.fonts)==null?void 0:gl.body)||ya.body,code:((Qt=(qe=u.theme)==null?void 0:qe.fonts)==null?void 0:Qt.code)||ya.code};w.useEffect(()=>{if(j!=="auto")return;const b=window.matchMedia("(prefers-color-scheme: dark)"),q=et=>Z(et.matches);return b.addEventListener("change",q),()=>b.removeEventListener("change",q)},[j]),w.useEffect(()=>{document.documentElement.classList.toggle("dark",B)},[B]),w.useEffect(()=>{const b=()=>{const q=window.innerWidth;Oo(q>1100),Tt(q<768)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),w.useEffect(()=>{if(J&&m)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[J,m]),w.useEffect(()=>{var b;(b=We.current)==null||b.scrollTo(0,0)},[d]),w.useEffect(()=>{const b=We.current;if(!b)return;const q=et=>{const dt=et.target;dt.tagName==="IMG"&&dt.closest(".tome-content")&&Ze(dt.src)};return b.addEventListener("click",q),()=>b.removeEventListener("click",q)},[]),w.useEffect(()=>{const b=We.current;if(!b)return;const q=et=>{const dt=et.target.closest("a");if(!dt)return;const St=dt.getAttribute("href");if(!St||St.startsWith("http://")||St.startsWith("https://")||St.startsWith("mailto:")||St.startsWith("tel:")||St.startsWith("//")||St.startsWith("#"))return;et.preventDefault();let yt=St.replace(/^\.\//,"").replace(/^\//,"").replace(/\.mdx?$/,"").replace(/\/$/,"");if(lt){const ce=lt.replace(/^\//,"").replace(/\/$/,"");ce&&yt.startsWith(ce+"/")?yt=yt.slice(ce.length+1):ce&&yt===ce&&(yt="index")}yt||(yt="index"),I(yt)};return b.addEventListener("click",q),()=>b.removeEventListener("click",q)},[I,lt]),w.useEffect(()=>{if(!Ut)return;const b=q=>{q.key==="Escape"&&Ze(null)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[Ut]);const Sn=u.toc,ri=(Sn==null?void 0:Sn.depth)??3,ba=(Sn==null?void 0:Sn.enabled)!==!1&&y,ye=C.filter(b=>b.depth<=ri),[ue,Me]=w.useState("");w.useEffect(()=>{if(!ba||ye.length<2)return;const b=We.current;if(!b)return;const q=setTimeout(()=>{const et=[];for(const St of ye){const yt=b.querySelector(`#${CSS.escape(St.id)}`);yt&&et.push(yt)}if(et.length===0)return;const dt=new IntersectionObserver(St=>{const yt=St.filter(ce=>ce.isIntersecting).sort((ce,pi)=>ce.boundingClientRect.top-pi.boundingClientRect.top);yt.length>0&&Me(yt[0].target.id)},{root:b,rootMargin:"0px 0px -80% 0px",threshold:0});for(const St of et)dt.observe(St);ee.current=dt},100);return()=>{var et;clearTimeout(q),(et=ee.current)==null||et.disconnect(),ee.current=null}},[d,ba,ye.map(b=>b.id).join(",")]);const ee=w.useRef(null);w.useEffect(()=>{Me("")},[d]),w.useLayoutEffect(()=>{if(!Fn.current||!c)return;const b=c.replace(/]*>[\s\S]*?<\/h1>\s*/,"");Fn.current.innerHTML=b,fl.current=b},[c,d]);const ci=w.useCallback((b,q)=>{b.preventDefault();const et=We.current;if(!et)return;const dt=et.querySelector(`#${CSS.escape(q)}`);dt&&(dt.scrollIntoView({behavior:"smooth",block:"start"}),Me(q))},[]);w.useEffect(()=>{const b=q=>{(q.metaKey||q.ctrlKey)&&q.key==="k"&&(q.preventDefault(),L(!0)),q.key==="Escape"&&L(!1)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[]);const xa=h.flatMap(b=>b.pages),Sa=xa.findIndex(b=>b.id===d),Fe=Sa>0?xa[Sa-1]:null,$e=SaDo(q=>q.includes(b)?q.filter(et=>et!==b):[...q,b]),Ta={"--bg":te.bg,"--sf":te.sf,"--sfH":te.sfH,"--bd":te.bd,"--tx":te.tx,"--tx2":te.tx2,"--txM":te.txM,"--ac":te.ac,"--acD":te.acD,"--acT":te.acT,"--cdBg":te.cdBg,"--cdTx":te.cdTx,"--sbBg":te.sbBg,"--hdBg":te.hdBg,"--font-heading":`"${xn.heading}", serif`,"--font-body":`"${xn.body}", sans-serif`,"--font-code":`"${xn.code}", monospace`},Tn=v,Ne=(ne=u.banner)==null?void 0:ne.link,Ea=Ne?Ne.startsWith("#")||lt&&Ne.startsWith(lt+"/"):!1;return s.jsxs("div",{dir:$t,className:"tome-grain",style:{...Ta,color:"var(--tx)",background:"var(--bg)",fontFamily:"var(--font-body)",height:"100vh",overflow:"clip"},children:[((tn=u.banner)==null?void 0:tn.text)&&!rl&&s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:12,background:"var(--ac)",color:"#fff",padding:"8px 16px",fontSize:13,fontFamily:"var(--font-body)",fontWeight:500,textAlign:"center",width:"100vw",boxSizing:"border-box"},children:[u.banner.link?s.jsx("a",{href:Ea&&Ne.startsWith("#")?lt+"/"+Ne.slice(1):Ne,...Ea?{}:{target:"_blank",rel:"noopener noreferrer"},style:{color:"#fff",textDecoration:"underline"},onClick:Ea?b=>{b.preventDefault();const q=lt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),et=Ne.startsWith("#")?Ne.slice(1):Ne.replace(new RegExp("^"+q+"/?"),"");I(et||"index")}:void 0,children:u.banner.text}):s.jsx("span",{children:u.banner.text}),u.banner.dismissible!==!1&&s.jsx("button",{onClick:()=>{Je(!0);try{const b=Array.from(u.banner.text).reduce((q,et)=>(q<<5)-q+et.charCodeAt(0)|0,0).toString(36);localStorage.setItem("tome-banner-dismissed",b)}catch{}},"aria-label":"Dismiss banner",style:{background:"none",border:"none",color:"#fff",cursor:"pointer",fontSize:16,lineHeight:1,padding:0,opacity:.8},children:"×"})]}),N&&((Ma=u.search)==null?void 0:Ma.provider)==="algolia"&&u.search.appId&&u.search.apiKey&&u.search.indexName?s.jsx(tg,{appId:u.search.appId,apiKey:u.search.apiKey,indexName:u.search.indexName,onNavigate:b=>{I(b),L(!1)},onClose:()=>L(!1),basePath:lt}):N?s.jsx(cg,{allPages:ct,onNavigate:b=>{I(b),L(!1)},onClose:()=>L(!1),mobile:J}):null,s.jsxs("div",{style:{display:"flex",flexDirection:ft?"row-reverse":"row",flex:1,height:(di=u.banner)!=null&&di.text&&!rl?"calc(100vh - 32px)":"100vh"},children:[J&&m&&s.jsx("div",{onClick:()=>_(!1),style:{position:"fixed",inset:0,zIndex:200,background:"rgba(0,0,0,0.4)",backdropFilter:"blur(2px)"}}),tt!=null&&tt.Sidebar?s.jsx(tt.Sidebar,{config:u,navigation:h,currentPageId:d,onNavigate:I,mobile:J,sbOpen:m,setSbOpen:_,versioning:Q,currentVersion:Y}):s.jsxs("aside",{style:{width:m?270:0,minWidth:m?270:0,background:"var(--sbBg)",[ft?"borderLeft":"borderRight"]:"1px solid var(--bd)",display:"flex",flexDirection:"column",transition:"width .2s, min-width .2s",overflow:"hidden",...J?{position:"fixed",top:0,[ft?"right":"left"]:0,bottom:0,zIndex:201}:{}},children:[s.jsxs("a",{href:"/",style:{padding:"18px 20px",display:"flex",alignItems:"baseline",gap:6,borderBottom:"1px solid var(--bd)",textDecoration:"none",color:"inherit"},children:[s.jsx("span",{style:{fontFamily:"var(--font-heading)",fontSize:22,fontWeight:700,fontStyle:"italic"},children:u.name}),s.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"var(--ac)",display:"inline-block"}})]}),s.jsx("div",{style:{padding:"12px 14px"},children:s.jsxs("button",{onClick:()=>{L(!0),J&&_(!1)},style:{display:"flex",alignItems:"center",gap:8,width:"100%",background:"var(--cdBg)",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 12px",cursor:"pointer",color:"var(--txM)",fontSize:12.5,fontFamily:"var(--font-body)"},children:[s.jsx(rm,{}),s.jsx("span",{style:{flex:1,textAlign:ft?"right":"left"},children:"Search..."}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:9,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"2px 6px"},children:"⌘K"})]})}),s.jsx("nav",{style:{flex:1,overflow:"auto",padding:"4px 10px 20px"},children:h.map(b=>s.jsxs("div",{style:{marginBottom:8},children:[s.jsxs("button",{onClick:()=>Pe(b.section),style:{display:"flex",alignItems:"center",gap:6,width:"100%",background:"none",border:"none",padding:"8px 10px",cursor:"pointer",borderRadius:2,color:"var(--txM)",fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:".1em",fontFamily:"var(--font-code)"},children:[ga.includes(b.section)?s.jsx(Vu,{}):s.jsx(Pd,{}),b.section]}),ga.includes(b.section)&&s.jsx("div",{style:{[ft?"marginRight":"marginLeft"]:8,[ft?"borderRight":"borderLeft"]:"1px solid var(--bd)",[ft?"paddingRight":"paddingLeft"]:0},children:b.pages.map(q=>{const et=d===q.id;return s.jsxs("button",{onClick:()=>{I(q.id),J&&_(!1)},style:{display:"flex",alignItems:"center",gap:10,width:"100%",textAlign:ft?"right":"left",background:"none",border:"none",borderRadius:0,[ft?"borderRight":"borderLeft"]:et?"2px solid var(--ac)":"2px solid transparent",padding:"7px 14px",cursor:"pointer",color:et?"var(--ac)":"var(--tx2)",fontSize:13,fontWeight:et?500:400,fontFamily:"var(--font-body)",transition:"all .12s"},children:[q.title,q.badge&&(()=>{const dt={default:{bg:"var(--sf)",text:"var(--tx2)"},info:{bg:"rgba(59,130,246,0.15)",text:"rgb(59,130,246)"},success:{bg:"rgba(34,197,94,0.15)",text:"rgb(34,197,94)"},warning:{bg:"rgba(234,179,8,0.15)",text:"rgb(202,138,4)"},danger:{bg:"rgba(239,68,68,0.15)",text:"rgb(239,68,68)"}},St=dt[q.badge.variant||"default"]||dt.default;return s.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 6px",borderRadius:4,marginLeft:6,whiteSpace:"nowrap",background:St.bg,color:St.text},children:q.badge.text})})()]},q.id)})})]},b.section))}),Q&&J&&s.jsx("div",{style:{padding:"8px 16px",borderTop:"1px solid var(--bd)",display:"flex",gap:6},children:Q.versions.map(b=>s.jsxs("button",{onClick:()=>{const q=b===Q.current?"index":`${b}/index`;I(q)},style:{flex:1,padding:"3px 0",textAlign:"center",background:b===(Y||Q.current)?"var(--acD)":"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,cursor:"pointer",color:b===(Y||Q.current)?"var(--ac)":"var(--tx2)",fontSize:11,fontFamily:"var(--font-code)",fontWeight:b===Q.current?600:400},children:[b,b===Q.current?" (latest)":""]},b))}),s.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--bd)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[j==="auto"?s.jsx("button",{"aria-label":B?"Switch to light mode":"Switch to dark mode",onClick:()=>Z(b=>!b),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex"},children:B?s.jsx(em,{}):s.jsx(tm,{})}):s.jsx("div",{}),s.jsxs("span",{style:{fontSize:11,color:"var(--txM)",letterSpacing:.2},children:["Built with ","♡"," by Tome"]}),s.jsx("span",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)"},children:"v0.5.0"})]})]}),s.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[tt!=null&&tt.Header?s.jsx(tt.Header,{config:u,navigation:h,currentPageId:d,onNavigate:I,mobile:J,sbOpen:m,setSbOpen:_,isDark:B,setDark:Z,versioning:Q,currentVersion:Y,i18n:H,currentLocale:U,onSearchOpen:()=>L(!0),basePath:lt}):s.jsxs("header",{style:{display:"flex",alignItems:"center",gap:J?8:12,padding:J?"8px 12px":"10px 24px",borderBottom:"1px solid var(--bd)",background:"var(--hdBg)",backdropFilter:"blur(12px)",maxWidth:"100vw",overflow:"visible",position:"relative",zIndex:200},children:[s.jsx("button",{"aria-label":m?"Close sidebar":"Open sidebar",onClick:()=>_(!m),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex"},children:m?s.jsx(Jh,{}):s.jsx(Zh,{})}),J?s.jsx("span",{style:{fontSize:13,color:"var(--ac)",fontFamily:"var(--font-code)",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:((mi=h.flatMap(b=>b.pages).find(b=>b.id===d))==null?void 0:mi.title)||""}):s.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--font-code)",fontSize:11,color:"var(--txM)",letterSpacing:".03em",flex:1},children:h.map(b=>{const q=b.pages.find(et=>et.id===d);return q?s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{children:b.section}),s.jsx(Pd,{}),s.jsx("span",{style:{color:"var(--ac)"},children:q.title})]},b.section):null})}),u.topNav&&u.topNav.length>0&&!J&&s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[u.topNav.map(b=>{const q=b.href.startsWith("#")||lt&&b.href.startsWith(lt+"/"),et=!q;return s.jsxs("a",{href:q&&b.href.startsWith("#")?lt+"/"+b.href.slice(1):b.href,...et?{target:"_blank",rel:"noopener noreferrer"}:{},onClick:q?dt=>{dt.preventDefault();const St=b.href.startsWith("#")?b.href.slice(1):b.href.replace(new RegExp("^"+lt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"/?"),"");I(St)}:void 0,style:{display:"flex",alignItems:"center",gap:4,color:"var(--txM)",textDecoration:"none",fontSize:12,fontFamily:"var(--font-body)",fontWeight:500,transition:"color .15s"},onMouseOver:dt=>dt.currentTarget.style.color="var(--ac)",onMouseOut:dt=>dt.currentTarget.style.color="var(--txM)",children:[b.label,et&&s.jsx(ag,{})]},b.label)}),s.jsx("span",{style:{width:1,height:16,background:"var(--bd)"}})]}),u.socialLinks&&u.socialLinks.length>0&&!J&&s.jsx("div",{style:{display:"flex",alignItems:"center",gap:8},children:u.socialLinks.map(b=>s.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer","aria-label":b.label||b.platform,"data-testid":`social-link-${b.platform}`,style:{display:"flex",alignItems:"center",justifyContent:"center",color:"var(--tx2)",cursor:"pointer",transition:"color .15s"},onMouseOver:q=>q.currentTarget.style.color="var(--tx)",onMouseOut:q=>q.currentTarget.style.color="var(--tx2)",children:s.jsx(ig,{platform:b.platform,customIcon:b.icon})},b.url))}),J&&j==="auto"&&s.jsx("button",{"aria-label":B?"Switch to light mode":"Switch to dark mode",onClick:()=>Z(b=>!b),style:{background:"none",border:"none",color:"var(--txM)",cursor:"pointer",display:"flex",flexShrink:0},children:B?s.jsx(em,{}):s.jsx(tm,{})}),Q&&!J&&s.jsxs("div",{style:{position:"relative"},children:[s.jsxs("button",{"data-testid":"version-switcher",onClick:()=>rt(b=>!b),style:{display:"flex",alignItems:"center",gap:6,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"5px 10px",cursor:"pointer",color:"var(--tx2)",fontSize:12,fontFamily:"var(--font-code)"},children:[s.jsx(eg,{}),Y||Q.current,s.jsx(Vu,{})]}),it&&s.jsx("div",{"data-testid":"version-dropdown",style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,boxShadow:"0 8px 32px rgba(0,0,0,0.2)",overflow:"hidden",zIndex:100,minWidth:120},children:Q.versions.map(b=>s.jsxs("button",{onClick:()=>{rt(!1);const q=b===Q.current?"index":`${b}/index`;I(q)},style:{display:"block",width:"100%",textAlign:"left",background:b===(Y||Q.current)?"var(--acD)":"none",border:"none",padding:"8px 14px",cursor:"pointer",color:b===(Y||Q.current)?"var(--ac)":"var(--tx2)",fontSize:12,fontFamily:"var(--font-code)",fontWeight:b===Q.current?600:400},children:[b,b===Q.current?" (latest)":""]},b))})]}),H&&H.locales.length>1&&!J&&s.jsxs("div",{style:{position:"relative"},children:[s.jsxs("button",{"data-testid":"language-switcher",onClick:()=>It(b=>!b),style:{display:"flex",alignItems:"center",gap:6,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,padding:"5px 10px",cursor:"pointer",color:"var(--tx2)",fontSize:12,fontFamily:"var(--font-body)"},children:[s.jsx(ng,{}),((vl=H.localeNames)==null?void 0:vl[U||H.defaultLocale])||U||H.defaultLocale,s.jsx(Vu,{})]}),Et&&s.jsx("div",{"data-testid":"language-dropdown",style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--sf)",border:"1px solid var(--bd)",borderRadius:2,boxShadow:"0 8px 32px rgba(0,0,0,0.2)",overflow:"hidden",zIndex:100,minWidth:120},children:H.locales.map(b=>{var ce;const q=b===(U||H.defaultLocale),et=((ce=H.localeNames)==null?void 0:ce[b])||b,dt=U||H.defaultLocale;let St=d;dt!==H.defaultLocale&&d.startsWith(`${dt}/`)&&(St=d.slice(dt.length+1));const yt=b===H.defaultLocale?St:`${b}/${St}`;return s.jsx("button",{onClick:()=>{It(!1),I(yt)},style:{display:"block",width:"100%",textAlign:"left",background:q?"var(--acD)":"none",border:"none",padding:"8px 14px",cursor:"pointer",color:q?"var(--ac)":"var(--tx2)",fontSize:12,fontFamily:"var(--font-body)",fontWeight:q?600:400},children:et},b)})})]})]}),cl&&s.jsxs("div",{"data-testid":"old-version-banner",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:"var(--acD)",borderBottom:"1px solid var(--bd)",padding:"8px 24px",fontSize:13,color:"var(--tx2)"},children:[s.jsxs("span",{children:["You're viewing docs for ",Y,"."]}),s.jsx("button",{onClick:()=>{I("index")},style:{background:"none",border:"none",color:"var(--ac)",cursor:"pointer",fontWeight:600,fontSize:13,fontFamily:"var(--font-body)",textDecoration:"underline"},children:"Switch to latest."})]}),s.jsxs("div",{ref:We,style:{flex:1,overflow:"auto",display:"flex"},children:[s.jsxs("main",{style:{flex:1,maxWidth:J?"100%":nt?1100:760,padding:J?"24px 16px 60px":"40px 48px 80px",margin:"0 auto",minWidth:0},children:[Ie.length>0&&s.jsx("nav",{"aria-label":"Breadcrumbs","data-testid":"breadcrumbs",style:{display:"flex",alignItems:"center",gap:6,fontSize:13,color:"var(--tx2)",marginBottom:8},children:Ie.map((b,q)=>s.jsxs(sm.Fragment,{children:[q>0&&s.jsx("span",{style:{color:"var(--tx2)",opacity:.5},children:"›"}),q{et.preventDefault();const dt=h.flatMap(St=>St.pages).find(St=>St.urlPath===b.href);dt&&I(dt.id)},style:{color:"var(--tx2)",textDecoration:"none",cursor:"pointer"},children:b.label}):s.jsx("span",{style:q===Ie.length-1?{color:"var(--tx)"}:void 0,children:b.label})]},q))}),s.jsx("h1",{style:{fontFamily:"var(--font-heading)",fontSize:J?26:38,fontWeight:400,fontStyle:"italic",lineHeight:1.15,marginBottom:8},children:A}),P&&s.jsx("div",{"data-testid":"draft-banner",style:{background:"#fef3c7",color:"#92400e",padding:"8px 16px",borderRadius:6,fontSize:13,marginBottom:16},children:"Draft — This page is only visible in development"}),O&&s.jsx("p",{style:{fontSize:16,color:"var(--tx2)",lineHeight:1.6,marginBottom:32},children:O}),s.jsx("div",{style:{borderTop:"1px solid var(--bd)",paddingTop:28},children:nt&&W?s.jsx(W,{manifest:nt,baseUrl:xt,showPlayground:Dt,playgroundAuth:Mt}):K&&K.length>0?s.jsx(sg,{entries:K}):Tn?s.jsx("div",{className:"tome-content",children:s.jsx(Tn,{components:E||{}})}):s.jsx("div",{className:"tome-content",ref:Fn},d)}),tt!=null&&tt.PageFooter?s.jsx(tt.PageFooter,{editUrl:G,lastUpdated:R,currentPageId:d,prev:Fe,next:$e,onNavigate:I,mobile:J}):s.jsxs(s.Fragment,{children:[(G||R)&&s.jsxs("div",{style:{marginTop:40,display:"flex",flexDirection:J?"column":"row",alignItems:J?"flex-start":"center",justifyContent:"space-between",gap:J?8:16},children:[G&&s.jsx("div",{"data-testid":"edit-page-link",children:s.jsxs("a",{href:G,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--txM)",textDecoration:"none",fontSize:13,fontFamily:"var(--font-body)",transition:"color .15s"},onMouseOver:b=>b.currentTarget.style.color="var(--ac)",onMouseOut:b=>b.currentTarget.style.color="var(--txM)",children:[s.jsx(Wh,{})," Edit this page on GitHub"]})}),R&&s.jsxs("div",{"data-testid":"last-updated",style:{fontSize:12,color:"var(--txM)",fontFamily:"var(--font-body)"},children:["Last updated ",Fh(R)]})]}),s.jsx("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:24,padding:"12px 0"},children:pa[d]?s.jsx("span",{style:{fontSize:13,color:"var(--txM)",fontFamily:"var(--font-body)"},children:"Thanks for your feedback!"}):s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{fontSize:13,color:"var(--txM)",fontFamily:"var(--font-body)"},children:"Was this helpful?"}),s.jsx("button",{onClick:()=>{ha(b=>({...b,[d]:!0}));try{localStorage.setItem(`tome-feedback-${d}`,"up")}catch{}},style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"4px 10px",cursor:"pointer",fontSize:13,color:"var(--txM)",transition:"border-color .15s"},children:"👍"}),s.jsx("button",{onClick:()=>{ha(b=>({...b,[d]:!0}));try{localStorage.setItem(`tome-feedback-${d}`,"down")}catch{}},style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"4px 10px",cursor:"pointer",fontSize:13,color:"var(--txM)",transition:"border-color .15s"},children:"👎"})]})}),s.jsxs("div",{style:{display:"flex",flexDirection:J?"column":"row",justifyContent:"space-between",marginTop:16,paddingTop:24,borderTop:"1px solid var(--bd)",gap:J?12:16},children:[Fe?s.jsxs("button",{onClick:()=>I(Fe.id),style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"10px 16px",cursor:"pointer",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body)",transition:"border-color .15s, color .15s"},children:[ft?s.jsx(am,{}):s.jsx(nm,{})," ",Fe.title]}):s.jsx("div",{}),$e?s.jsxs("button",{onClick:()=>I($e.id),style:{display:"flex",alignItems:"center",gap:8,background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"10px 16px",cursor:"pointer",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body)",transition:"border-color .15s, color .15s"},children:[$e.title," ",ft?s.jsx(nm,{}):s.jsx(am,{})]}):s.jsx("div",{})]})]})]}),tt!=null&&tt.Toc?ba&&ye.length>=2&&va&&s.jsx(tt.Toc,{headings:ye,activeHeadingId:ue,onScrollToHeading:ci}):ba&&ye.length>=2&&va&&s.jsxs("aside",{"data-testid":"toc-sidebar",style:{width:200,padding:ft?"40px 0 40px 16px":"40px 16px 40px 0",position:"sticky",top:0,alignSelf:"flex-start",flexShrink:0},children:[s.jsx("div",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:".1em",color:"var(--txM)",marginBottom:12,fontFamily:"var(--font-code)"},children:"On this page"}),s.jsx("nav",{"aria-label":"Table of contents",style:{[ft?"borderRight":"borderLeft"]:"1px solid var(--bd)",[ft?"paddingRight":"paddingLeft"]:0},children:ye.map((b,q)=>{const et=ue===b.id;return s.jsx("a",{href:`#${b.id}`,onClick:dt=>ci(dt,b.id),"data-testid":`toc-link-${b.id}`,style:{display:"block",fontSize:12,color:et?"var(--ac)":"var(--txM)",fontWeight:et?500:400,textDecoration:"none",padding:"4px 12px",[ft?"paddingRight":"paddingLeft"]:12+(b.depth-2)*12,lineHeight:1.4,transition:"color .15s, font-weight .15s",[ft?"borderRight":"borderLeft"]:et?"2px solid var(--ac)":"2px solid transparent",[ft?"marginRight":"marginLeft"]:-1},children:b.text},q)})})]})]})]})]}),(tt==null?void 0:tt.Footer)&&s.jsx(tt.Footer,{config:u,navigation:h,currentPageId:d,onNavigate:I}),((zn=u.ai)==null?void 0:zn.enabled)&&s.jsx(Xh,{provider:u.ai.provider||"anthropic",model:u.ai.model,apiKey:typeof __TOME_AI_API_KEY__<"u"&&__TOME_AI_API_KEY__?__TOME_AI_API_KEY__:void 0,context:(at==null?void 0:at.map(b=>`## ${b.title} ${b.content}`).join(` `))??ct.map(b=>`- ${b.title}${b.description?": "+b.description:""}`).join(` -`)}),Ut&&s.jsx("div",{onClick:()=>Ze(null),style:{position:"fixed",inset:0,zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.7)",backdropFilter:"blur(8px)",cursor:"zoom-out"},children:s.jsx("img",{src:Ut,alt:"",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4,boxShadow:"0 16px 64px rgba(0,0,0,0.4)"}})})]})}function c0({allPages:u,onNavigate:h,onClose:d,mobile:c}){const[v,E]=w.useState(""),[A,O]=w.useState([]),[C,y]=w.useState(0),[G,R]=w.useState(null),K=w.useRef(null),nt=w.useRef(void 0);w.useEffect(()=>{Ih().then(W=>R(!!W)),setTimeout(()=>{var W;return(W=K.current)==null?void 0:W.focus()},50)},[]);const xt=w.useCallback(W=>{if(!W.trim())return[];const I=W.toLowerCase();return u.filter(ct=>ct.title.toLowerCase().includes(I)||(ct.description||"").toLowerCase().includes(I)).slice(0,8).map(ct=>({id:ct.id,title:ct.title,excerpt:ct.description}))},[u]),Dt=w.useCallback(async W=>{var ct;if(!W.trim()){O([]),y(0);return}const I=ul;if(I)try{const Q=await I.search(W),Y=[];for(const H of Q.results.slice(0,8)){const U=await H.data(),lt=(U.url||"").replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index";Y.push({id:lt,title:((ct=U.meta)==null?void 0:ct.title)||lt,excerpt:U.excerpt||void 0})}O(Y),y(0);return}catch{}O(xt(W)),y(0)},[xt]);w.useEffect(()=>(nt.current&&clearTimeout(nt.current),nt.current=setTimeout(()=>Dt(v),120),()=>{nt.current&&clearTimeout(nt.current)}),[v,Dt]);const Mt=w.useCallback(W=>{W.key==="ArrowDown"?(W.preventDefault(),y(I=>Math.min(I+1,A.length-1))):W.key==="ArrowUp"?(W.preventDefault(),y(I=>Math.max(I-1,0))):W.key==="Enter"&&A.length>0&&(W.preventDefault(),h(A[C].id))},[A,C,h]);return s.jsx("div",{onClick:d,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:c?"stretch":"flex-start",justifyContent:"center",paddingTop:c?0:"12vh"},children:s.jsxs("div",{onClick:W=>W.stopPropagation(),style:{background:"var(--sf)",border:c?"none":"1px solid var(--bd)",borderRadius:c?0:2,width:"100%",maxWidth:c?"100%":520,boxShadow:c?"none":"0 24px 80px rgba(0,0,0,0.4)",overflow:"hidden",display:"flex",flexDirection:"column",...c?{height:"100%"}:{}},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--bd)"},children:[s.jsx(rm,{}),s.jsx("input",{ref:K,value:v,onChange:W=>E(W.target.value),onKeyDown:Mt,placeholder:"Search documentation...",style:{flex:1,background:"none",border:"none",outline:"none",color:"var(--tx)",fontSize:15,fontFamily:"var(--font-body)"}}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)",background:"var(--cdBg)",padding:"2px 6px",borderRadius:2,border:"1px solid var(--bd)"},children:"ESC"})]}),A.length>0&&s.jsx("div",{style:{padding:6,maxHeight:c?"none":360,overflow:"auto",flex:c?1:void 0},children:A.map((W,I)=>s.jsxs("button",{onClick:()=>h(W.id),style:{display:"block",width:"100%",textAlign:"left",background:I===C?"var(--acD)":"none",border:"none",borderRadius:2,padding:"10px 14px",cursor:"pointer",color:"var(--tx)",fontFamily:"var(--font-body)"},onMouseEnter:()=>y(I),children:[s.jsx("div",{style:{fontWeight:500,fontSize:14,marginBottom:2},children:W.title}),W.excerpt&&s.jsx("div",{style:{fontSize:12,color:"var(--txM)",lineHeight:1.3},dangerouslySetInnerHTML:{__html:W.excerpt}})]},W.id+I))}),v&&!A.length&&s.jsx("div",{style:{padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No results found"}),G===!1&&v&&A.length>0&&s.jsx("div",{style:{padding:"6px 18px 10px",fontSize:11,color:"var(--txM)",textAlign:"center"},children:"Showing title matches. Build your site for full-text search."})]})})}function cm(u,h,d){let c=u;h&&c.startsWith(h)&&(c=c.slice(h.length));const v=c.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"").replace(/\/$/,"")||"index";return d.find(A=>A.id===v)?v:null}function f0(u,h,d){const c=d.find(v=>v.id===u);return c?h+c.urlPath:h+"/"+u}class d0 extends Error{constructor(h){super(`Page not found: ${h}`),this.code="PAGE_NOT_FOUND",this.name="PageNotFoundError"}}class m0 extends Error{constructor(h,d){super(`Failed to load page: ${h}`),this.code="PAGE_LOAD_ERROR",this.name="PageLoadError",d&&(this.cause=d)}}function p0(u,h){if(!u||!h)return;const{repo:d,branch:c="main",dir:v=""}=u,E=v?`${v.replace(/\/$/,"")}/`:"";return`https://github.com/${d}/edit/${c}/${E}${h}`}function h0(u,h,d,c,v){var O;const E=v(u,c,d);if(E)return E;const A=h.startsWith("#")?h.slice(1):h;return A&&d.some(C=>C.id===A)?A:((O=d[0])==null?void 0:O.id)||"index"}async function fm(u,h,d){const c=h.find(E=>E.id===u);let v;try{v=await d(u)}catch(E){throw new m0(u,E)}if(c!=null&&c.isMdx&&v.meta)return{isMdx:!0,component:v.default,frontmatter:v.meta.frontmatter,headings:v.meta.headings};if(!v.default)throw new d0(u);return v.isApiReference&&v.apiManifest?{isMdx:!1,isApiReference:!0,...v.default,apiManifest:v.apiManifest}:v.isChangelog&&v.changelogEntries?{isMdx:!1,...v.default,changelogEntries:v.changelogEntries}:{isMdx:!1,...v.default}}function g0(u,h){return(u==null?void 0:u.version)||void 0}const Jn={name:"Kit",logo:"/logo.jpg",favicon:"/logo.jpg",baseUrl:"https://go-kit.dev",theme:{preset:"cipher",accent:"#e03030",mode:"dark",fonts:{heading:"Space Grotesk",body:"Space Grotesk",code:"Source Code Pro"}},navigation:[{group:"Getting Started",pages:["index","installation","quick-start"]},{group:"Configuration",pages:["configuration","providers","themes"]},{group:"CLI Reference",pages:["cli/flags","cli/commands"]},{group:"Extensions",pages:["extensions/overview","extensions/capabilities","extensions/examples","extensions/loading","extensions/testing"]},{group:"Sessions",pages:["sessions"]},{group:"Go SDK",pages:["sdk/overview","sdk/options","sdk/callbacks","sdk/sessions"]},{group:"Advanced",pages:["advanced/subagents","advanced/json-output","advanced/testing"]},{group:"Development",pages:["development"]}],search:{provider:"local"},toc:{enabled:!0,depth:3},math:!1,strictLinks:!1,lastUpdated:!0,redirects:[],socialLinks:[{platform:"github",url:"https://github.com/mark3labs/kit"},{platform:"discord",url:"https://discord.gg/RqSS2NQVsY"}]},Wn=[{id:"advanced/json-output",filePath:"advanced/json-output.md",urlPath:"/advanced/json-output",frontmatter:{title:"JSON Output",description:"Machine-readable JSON output for scripting and automation.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"advanced/subagents",filePath:"advanced/subagents.md",urlPath:"/advanced/subagents",frontmatter:{title:"Subagents",description:"Multi-agent orchestration with Kit subagents.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"advanced/testing",filePath:"advanced/testing.md",urlPath:"/advanced/testing",frontmatter:{title:"Testing with tmux",description:"Test Kit's TUI non-interactively using tmux.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"cli/commands",filePath:"cli/commands.md",urlPath:"/cli/commands",frontmatter:{title:"Commands",description:"Complete reference for all Kit CLI subcommands.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"cli/flags",filePath:"cli/flags.md",urlPath:"/cli/flags",frontmatter:{title:"Global Flags",description:"Complete reference for all Kit CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"configuration",filePath:"configuration.md",urlPath:"/configuration",frontmatter:{title:"Configuration",description:"Configure Kit using config files, environment variables, and CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"development",filePath:"development.md",urlPath:"/development",frontmatter:{title:"Development",description:"Build, test, and contribute to Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"extensions/capabilities",filePath:"extensions/capabilities.md",urlPath:"/extensions/capabilities",frontmatter:{title:"Capabilities",description:"All extension capabilities — lifecycle events, tools, commands, widgets, and more.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"extensions/examples",filePath:"extensions/examples.md",urlPath:"/extensions/examples",frontmatter:{title:"Examples",description:"Catalog of example extensions included with Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"extensions/loading",filePath:"extensions/loading.md",urlPath:"/extensions/loading",frontmatter:{title:"Loading Extensions",description:"How Kit discovers and loads extensions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"extensions/overview",filePath:"extensions/overview.md",urlPath:"/extensions/overview",frontmatter:{title:"Extension System",description:"Overview of Kit's Go-based extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"extensions/testing",filePath:"extensions/testing.md",urlPath:"/extensions/testing",frontmatter:{title:"Testing Extensions",description:"Write unit tests for your Kit extensions using the test package.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"index",filePath:"index.md",urlPath:"/",frontmatter:{title:"Kit",description:"Kit is a powerful, extensible AI coding agent CLI with multi-provider support, built-in tools, and a rich extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"installation",filePath:"installation.md",urlPath:"/installation",frontmatter:{title:"Installation",description:"Install Kit using npm, bun, pnpm, Go, or build from source.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"providers",filePath:"providers.md",urlPath:"/providers",frontmatter:{title:"Providers",description:"Supported LLM providers and model configuration.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"quick-start",filePath:"quick-start.md",urlPath:"/quick-start",frontmatter:{title:"Quick Start",description:"Get up and running with Kit in minutes.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"sdk/callbacks",filePath:"sdk/callbacks.md",urlPath:"/sdk/callbacks",frontmatter:{title:"Callbacks",description:"Monitor tool calls and streaming output with the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"sdk/options",filePath:"sdk/options.md",urlPath:"/sdk/options",frontmatter:{title:"SDK Options",description:"Configuration options for the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"sdk/overview",filePath:"sdk/overview.md",urlPath:"/sdk/overview",frontmatter:{title:"Go SDK",description:"Embed Kit in your Go applications.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"sdk/sessions",filePath:"sdk/sessions.md",urlPath:"/sdk/sessions",frontmatter:{title:"SDK Sessions",description:"Session management in the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"sessions",filePath:"sessions.md",urlPath:"/sessions",frontmatter:{title:"Session Management",description:"How Kit persists and manages conversation sessions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"},{id:"themes",filePath:"themes.md",urlPath:"/themes",frontmatter:{title:"Themes",description:"Customize Kit's appearance with built-in themes, custom theme files, and the extension theme API.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T15:09:26+03:00"}],v0=[{section:"Getting Started",pages:[{title:"Kit",id:"index",urlPath:"/"},{title:"Installation",id:"installation",urlPath:"/installation"},{title:"Quick Start",id:"quick-start",urlPath:"/quick-start"}]},{section:"Configuration",pages:[{title:"Configuration",id:"configuration",urlPath:"/configuration"},{title:"Providers",id:"providers",urlPath:"/providers"},{title:"Themes",id:"themes",urlPath:"/themes"}]},{section:"CLI Reference",pages:[{title:"Global Flags",id:"cli/flags",urlPath:"/cli/flags"},{title:"Commands",id:"cli/commands",urlPath:"/cli/commands"}]},{section:"Extensions",pages:[{title:"Extension System",id:"extensions/overview",urlPath:"/extensions/overview"},{title:"Capabilities",id:"extensions/capabilities",urlPath:"/extensions/capabilities"},{title:"Examples",id:"extensions/examples",urlPath:"/extensions/examples"},{title:"Loading Extensions",id:"extensions/loading",urlPath:"/extensions/loading"},{title:"Testing Extensions",id:"extensions/testing",urlPath:"/extensions/testing"}]},{section:"Sessions",pages:[{title:"Session Management",id:"sessions",urlPath:"/sessions"}]},{section:"Go SDK",pages:[{title:"Go SDK",id:"sdk/overview",urlPath:"/sdk/overview"},{title:"SDK Options",id:"sdk/options",urlPath:"/sdk/options"},{title:"Callbacks",id:"sdk/callbacks",urlPath:"/sdk/callbacks"},{title:"SDK Sessions",id:"sdk/sessions",urlPath:"/sdk/sessions"}]},{section:"Advanced",pages:[{title:"Subagents",id:"advanced/subagents",urlPath:"/advanced/subagents"},{title:"JSON Output",id:"advanced/json-output",urlPath:"/advanced/json-output"},{title:"Testing with tmux",id:"advanced/testing",urlPath:"/advanced/testing"}]},{section:"Development",pages:[{title:"Development",id:"development",urlPath:"/development"}]}],Zu=null,y0={"advanced/json-output":()=>Lt(()=>import("./json-output-BiSiIPM0.js"),[]),"advanced/subagents":()=>Lt(()=>import("./subagents-lghAXYlk.js"),[]),"advanced/testing":()=>Lt(()=>import("./testing-COLNxuKj.js"),[]),"cli/commands":()=>Lt(()=>import("./commands-CjvM1xle.js"),[]),"cli/flags":()=>Lt(()=>import("./flags-DBc7n5J6.js"),[]),configuration:()=>Lt(()=>import("./configuration-BBLRnNLZ.js"),[]),development:()=>Lt(()=>import("./development-E-EC7CAm.js"),[]),"extensions/capabilities":()=>Lt(()=>import("./capabilities-VpEmfPck.js"),[]),"extensions/examples":()=>Lt(()=>import("./examples-Dd5WMq-L.js"),[]),"extensions/loading":()=>Lt(()=>import("./loading-CfdMbwrl.js"),[]),"extensions/overview":()=>Lt(()=>import("./overview-BRtZenVZ.js"),[]),"extensions/testing":()=>Lt(()=>import("./testing-BjX63Hnw.js"),[]),index:()=>Lt(()=>import("./index-DjkHYQxg.js"),[]),installation:()=>Lt(()=>import("./installation-CkjlJXwY.js"),[]),providers:()=>Lt(()=>import("./providers-C6IbA7eV.js"),[]),"quick-start":()=>Lt(()=>import("./quick-start-YzNijQyU.js"),[]),"sdk/callbacks":()=>Lt(()=>import("./callbacks-DurHXbkP.js"),[]),"sdk/options":()=>Lt(()=>import("./options-CYJU835f.js"),[]),"sdk/overview":()=>Lt(()=>import("./overview-Vqa08j9l.js"),[]),"sdk/sessions":()=>Lt(()=>import("./sessions-CeADaXnR.js"),[]),sessions:()=>Lt(()=>import("./sessions-BR7Y7dXm.js"),[]),themes:()=>Lt(()=>import("./themes-Chyvu6J4.js"),[])};function dm(u){const h=y0[u];if(!h)throw new Error("Unknown page: "+u);return h()}const b0=[{id:"advanced/json-output",title:"JSON Output",content:` +`)}),Ut&&s.jsx("div",{onClick:()=>Ze(null),style:{position:"fixed",inset:0,zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.7)",backdropFilter:"blur(8px)",cursor:"zoom-out"},children:s.jsx("img",{src:Ut,alt:"",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4,boxShadow:"0 16px 64px rgba(0,0,0,0.4)"}})})]})}function cg({allPages:u,onNavigate:h,onClose:d,mobile:c}){const[v,E]=w.useState(""),[A,O]=w.useState([]),[C,y]=w.useState(0),[G,R]=w.useState(null),K=w.useRef(null),nt=w.useRef(void 0);w.useEffect(()=>{Ih().then(W=>R(!!W)),setTimeout(()=>{var W;return(W=K.current)==null?void 0:W.focus()},50)},[]);const xt=w.useCallback(W=>{if(!W.trim())return[];const I=W.toLowerCase();return u.filter(ct=>ct.title.toLowerCase().includes(I)||(ct.description||"").toLowerCase().includes(I)).slice(0,8).map(ct=>({id:ct.id,title:ct.title,excerpt:ct.description}))},[u]),Dt=w.useCallback(async W=>{var ct;if(!W.trim()){O([]),y(0);return}const I=ul;if(I)try{const Q=await I.search(W),Y=[];for(const H of Q.results.slice(0,8)){const U=await H.data(),lt=(U.url||"").replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index";Y.push({id:lt,title:((ct=U.meta)==null?void 0:ct.title)||lt,excerpt:U.excerpt||void 0})}O(Y),y(0);return}catch{}O(xt(W)),y(0)},[xt]);w.useEffect(()=>(nt.current&&clearTimeout(nt.current),nt.current=setTimeout(()=>Dt(v),120),()=>{nt.current&&clearTimeout(nt.current)}),[v,Dt]);const Mt=w.useCallback(W=>{W.key==="ArrowDown"?(W.preventDefault(),y(I=>Math.min(I+1,A.length-1))):W.key==="ArrowUp"?(W.preventDefault(),y(I=>Math.max(I-1,0))):W.key==="Enter"&&A.length>0&&(W.preventDefault(),h(A[C].id))},[A,C,h]);return s.jsx("div",{onClick:d,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:c?"stretch":"flex-start",justifyContent:"center",paddingTop:c?0:"12vh"},children:s.jsxs("div",{onClick:W=>W.stopPropagation(),style:{background:"var(--sf)",border:c?"none":"1px solid var(--bd)",borderRadius:c?0:2,width:"100%",maxWidth:c?"100%":520,boxShadow:c?"none":"0 24px 80px rgba(0,0,0,0.4)",overflow:"hidden",display:"flex",flexDirection:"column",...c?{height:"100%"}:{}},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--bd)"},children:[s.jsx(rm,{}),s.jsx("input",{ref:K,value:v,onChange:W=>E(W.target.value),onKeyDown:Mt,placeholder:"Search documentation...",style:{flex:1,background:"none",border:"none",outline:"none",color:"var(--tx)",fontSize:15,fontFamily:"var(--font-body)"}}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)",background:"var(--cdBg)",padding:"2px 6px",borderRadius:2,border:"1px solid var(--bd)"},children:"ESC"})]}),A.length>0&&s.jsx("div",{style:{padding:6,maxHeight:c?"none":360,overflow:"auto",flex:c?1:void 0},children:A.map((W,I)=>s.jsxs("button",{onClick:()=>h(W.id),style:{display:"block",width:"100%",textAlign:"left",background:I===C?"var(--acD)":"none",border:"none",borderRadius:2,padding:"10px 14px",cursor:"pointer",color:"var(--tx)",fontFamily:"var(--font-body)"},onMouseEnter:()=>y(I),children:[s.jsx("div",{style:{fontWeight:500,fontSize:14,marginBottom:2},children:W.title}),W.excerpt&&s.jsx("div",{style:{fontSize:12,color:"var(--txM)",lineHeight:1.3},dangerouslySetInnerHTML:{__html:W.excerpt}})]},W.id+I))}),v&&!A.length&&s.jsx("div",{style:{padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No results found"}),G===!1&&v&&A.length>0&&s.jsx("div",{style:{padding:"6px 18px 10px",fontSize:11,color:"var(--txM)",textAlign:"center"},children:"Showing title matches. Build your site for full-text search."})]})})}function cm(u,h,d){let c=u;h&&c.startsWith(h)&&(c=c.slice(h.length));const v=c.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"").replace(/\/$/,"")||"index";return d.find(A=>A.id===v)?v:null}function fg(u,h,d){const c=d.find(v=>v.id===u);return c?h+c.urlPath:h+"/"+u}class dg extends Error{constructor(h){super(`Page not found: ${h}`),this.code="PAGE_NOT_FOUND",this.name="PageNotFoundError"}}class mg extends Error{constructor(h,d){super(`Failed to load page: ${h}`),this.code="PAGE_LOAD_ERROR",this.name="PageLoadError",d&&(this.cause=d)}}function pg(u,h){if(!u||!h)return;const{repo:d,branch:c="main",dir:v=""}=u,E=v?`${v.replace(/\/$/,"")}/`:"";return`https://github.com/${d}/edit/${c}/${E}${h}`}function hg(u,h,d,c,v){var O;const E=v(u,c,d);if(E)return E;const A=h.startsWith("#")?h.slice(1):h;return A&&d.some(C=>C.id===A)?A:((O=d[0])==null?void 0:O.id)||"index"}async function fm(u,h,d){const c=h.find(E=>E.id===u);let v;try{v=await d(u)}catch(E){throw new mg(u,E)}if(c!=null&&c.isMdx&&v.meta)return{isMdx:!0,component:v.default,frontmatter:v.meta.frontmatter,headings:v.meta.headings};if(!v.default)throw new dg(u);return v.isApiReference&&v.apiManifest?{isMdx:!1,isApiReference:!0,...v.default,apiManifest:v.apiManifest}:v.isChangelog&&v.changelogEntries?{isMdx:!1,...v.default,changelogEntries:v.changelogEntries}:{isMdx:!1,...v.default}}function gg(u,h){return(u==null?void 0:u.version)||void 0}const Jn={name:"Kit",logo:"/logo.jpg",favicon:"/logo.jpg",baseUrl:"https://go-kit.dev",theme:{preset:"cipher",accent:"#e03030",mode:"dark",fonts:{heading:"Space Grotesk",body:"Space Grotesk",code:"Source Code Pro"}},navigation:[{group:"Getting Started",pages:["index","installation","quick-start"]},{group:"Configuration",pages:["configuration","providers","themes"]},{group:"CLI Reference",pages:["cli/flags","cli/commands"]},{group:"Extensions",pages:["extensions/overview","extensions/capabilities","extensions/examples","extensions/loading","extensions/testing"]},{group:"Sessions",pages:["sessions"]},{group:"Go SDK",pages:["sdk/overview","sdk/options","sdk/callbacks","sdk/sessions"]},{group:"Advanced",pages:["advanced/subagents","advanced/json-output","advanced/testing"]},{group:"Development",pages:["development"]}],search:{provider:"local"},toc:{enabled:!0,depth:3},math:!1,strictLinks:!1,lastUpdated:!0,redirects:[],socialLinks:[{platform:"github",url:"https://github.com/mark3labs/kit"},{platform:"discord",url:"https://discord.gg/RqSS2NQVsY"}]},Wn=[{id:"advanced/json-output",filePath:"advanced/json-output.md",urlPath:"/advanced/json-output",frontmatter:{title:"JSON Output",description:"Machine-readable JSON output for scripting and automation.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"advanced/subagents",filePath:"advanced/subagents.md",urlPath:"/advanced/subagents",frontmatter:{title:"Subagents",description:"Multi-agent orchestration with Kit subagents.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"advanced/testing",filePath:"advanced/testing.md",urlPath:"/advanced/testing",frontmatter:{title:"Testing with tmux",description:"Test Kit's TUI non-interactively using tmux.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"cli/commands",filePath:"cli/commands.md",urlPath:"/cli/commands",frontmatter:{title:"Commands",description:"Complete reference for all Kit CLI subcommands.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"cli/flags",filePath:"cli/flags.md",urlPath:"/cli/flags",frontmatter:{title:"Global Flags",description:"Complete reference for all Kit CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"configuration",filePath:"configuration.md",urlPath:"/configuration",frontmatter:{title:"Configuration",description:"Configure Kit using config files, environment variables, and CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"development",filePath:"development.md",urlPath:"/development",frontmatter:{title:"Development",description:"Build, test, and contribute to Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"extensions/capabilities",filePath:"extensions/capabilities.md",urlPath:"/extensions/capabilities",frontmatter:{title:"Capabilities",description:"All extension capabilities — lifecycle events, tools, commands, widgets, and more.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"extensions/examples",filePath:"extensions/examples.md",urlPath:"/extensions/examples",frontmatter:{title:"Examples",description:"Catalog of example extensions included with Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"extensions/loading",filePath:"extensions/loading.md",urlPath:"/extensions/loading",frontmatter:{title:"Loading Extensions",description:"How Kit discovers and loads extensions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"extensions/overview",filePath:"extensions/overview.md",urlPath:"/extensions/overview",frontmatter:{title:"Extension System",description:"Overview of Kit's Go-based extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"extensions/testing",filePath:"extensions/testing.md",urlPath:"/extensions/testing",frontmatter:{title:"Testing Extensions",description:"Write unit tests for your Kit extensions using the test package.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"index",filePath:"index.md",urlPath:"/",frontmatter:{title:"Kit",description:"Kit is a powerful, extensible AI coding agent CLI with multi-provider support, built-in tools, and a rich extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"installation",filePath:"installation.md",urlPath:"/installation",frontmatter:{title:"Installation",description:"Install Kit using npm, bun, pnpm, Go, or build from source.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"providers",filePath:"providers.md",urlPath:"/providers",frontmatter:{title:"Providers",description:"Supported LLM providers and model configuration.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"quick-start",filePath:"quick-start.md",urlPath:"/quick-start",frontmatter:{title:"Quick Start",description:"Get up and running with Kit in minutes.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"sdk/callbacks",filePath:"sdk/callbacks.md",urlPath:"/sdk/callbacks",frontmatter:{title:"Callbacks",description:"Monitor tool calls and streaming output with the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"sdk/options",filePath:"sdk/options.md",urlPath:"/sdk/options",frontmatter:{title:"SDK Options",description:"Configuration options for the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"sdk/overview",filePath:"sdk/overview.md",urlPath:"/sdk/overview",frontmatter:{title:"Go SDK",description:"Embed Kit in your Go applications.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"sdk/sessions",filePath:"sdk/sessions.md",urlPath:"/sdk/sessions",frontmatter:{title:"SDK Sessions",description:"Session management in the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"sessions",filePath:"sessions.md",urlPath:"/sessions",frontmatter:{title:"Session Management",description:"How Kit persists and manages conversation sessions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"},{id:"themes",filePath:"themes.md",urlPath:"/themes",frontmatter:{title:"Themes",description:"Customize Kit's appearance with built-in themes, custom theme files, and the extension theme API.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-05-29T16:42:28+03:00"}],vg=[{section:"Getting Started",pages:[{title:"Kit",id:"index",urlPath:"/"},{title:"Installation",id:"installation",urlPath:"/installation"},{title:"Quick Start",id:"quick-start",urlPath:"/quick-start"}]},{section:"Configuration",pages:[{title:"Configuration",id:"configuration",urlPath:"/configuration"},{title:"Providers",id:"providers",urlPath:"/providers"},{title:"Themes",id:"themes",urlPath:"/themes"}]},{section:"CLI Reference",pages:[{title:"Global Flags",id:"cli/flags",urlPath:"/cli/flags"},{title:"Commands",id:"cli/commands",urlPath:"/cli/commands"}]},{section:"Extensions",pages:[{title:"Extension System",id:"extensions/overview",urlPath:"/extensions/overview"},{title:"Capabilities",id:"extensions/capabilities",urlPath:"/extensions/capabilities"},{title:"Examples",id:"extensions/examples",urlPath:"/extensions/examples"},{title:"Loading Extensions",id:"extensions/loading",urlPath:"/extensions/loading"},{title:"Testing Extensions",id:"extensions/testing",urlPath:"/extensions/testing"}]},{section:"Sessions",pages:[{title:"Session Management",id:"sessions",urlPath:"/sessions"}]},{section:"Go SDK",pages:[{title:"Go SDK",id:"sdk/overview",urlPath:"/sdk/overview"},{title:"SDK Options",id:"sdk/options",urlPath:"/sdk/options"},{title:"Callbacks",id:"sdk/callbacks",urlPath:"/sdk/callbacks"},{title:"SDK Sessions",id:"sdk/sessions",urlPath:"/sdk/sessions"}]},{section:"Advanced",pages:[{title:"Subagents",id:"advanced/subagents",urlPath:"/advanced/subagents"},{title:"JSON Output",id:"advanced/json-output",urlPath:"/advanced/json-output"},{title:"Testing with tmux",id:"advanced/testing",urlPath:"/advanced/testing"}]},{section:"Development",pages:[{title:"Development",id:"development",urlPath:"/development"}]}],Zu=null,yg={"advanced/json-output":()=>Lt(()=>import("./json-output-BiSiIPM0.js"),[]),"advanced/subagents":()=>Lt(()=>import("./subagents-lghAXYlk.js"),[]),"advanced/testing":()=>Lt(()=>import("./testing-COLNxuKj.js"),[]),"cli/commands":()=>Lt(()=>import("./commands-CjvM1xle.js"),[]),"cli/flags":()=>Lt(()=>import("./flags-DBc7n5J6.js"),[]),configuration:()=>Lt(()=>import("./configuration-BBLRnNLZ.js"),[]),development:()=>Lt(()=>import("./development-E-EC7CAm.js"),[]),"extensions/capabilities":()=>Lt(()=>import("./capabilities-VpEmfPck.js"),[]),"extensions/examples":()=>Lt(()=>import("./examples-Dd5WMq-L.js"),[]),"extensions/loading":()=>Lt(()=>import("./loading-CfdMbwrl.js"),[]),"extensions/overview":()=>Lt(()=>import("./overview-BRtZenVZ.js"),[]),"extensions/testing":()=>Lt(()=>import("./testing-BjX63Hnw.js"),[]),index:()=>Lt(()=>import("./index-DjkHYQxg.js"),[]),installation:()=>Lt(()=>import("./installation-CkjlJXwY.js"),[]),providers:()=>Lt(()=>import("./providers-C6IbA7eV.js"),[]),"quick-start":()=>Lt(()=>import("./quick-start-YzNijQyU.js"),[]),"sdk/callbacks":()=>Lt(()=>import("./callbacks-DurHXbkP.js"),[]),"sdk/options":()=>Lt(()=>import("./options-CYJU835f.js"),[]),"sdk/overview":()=>Lt(()=>import("./overview-Vqa08j9l.js"),[]),"sdk/sessions":()=>Lt(()=>import("./sessions-CeADaXnR.js"),[]),sessions:()=>Lt(()=>import("./sessions-BR7Y7dXm.js"),[]),themes:()=>Lt(()=>import("./themes-Chyvu6J4.js"),[])};function dm(u){const h=yg[u];if(!h)throw new Error("Unknown page: "+u);return h()}const bg=[{id:"advanced/json-output",title:"JSON Output",content:` # JSON Output Use the \`--json\` flag to get structured output for scripting and automation: @@ -1081,18 +1081,18 @@ available := ctx.CheckModelAvailable("anthropic/claude-sonnet-4") // bool provider := ctx.GetCurrentProvider() // "anthropic" modelID := ctx.GetCurrentModelID() // "claude-sonnet-4" \`\`\` -`},{id:"extensions/examples",title:"Examples",content:"\n# Extension Examples\n\nKit ships with a rich set of example extensions in the `examples/extensions/` directory. These serve as both documentation and starting points for your own extensions.\n\n## UI and display\n\n| Extension | Description |\n|-----------|-------------|\n| [`minimal.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/minimal.go) | Clean UI with custom footer |\n| [`branded-output.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/branded-output.go) | Branded output rendering |\n| [`header-footer-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/header-footer-demo.go) | Custom headers and footers |\n| [`widget-status.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/widget-status.go) | Persistent status widgets |\n| [`overlay-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/overlay-demo.go) | Modal dialogs |\n| [`tool-renderer-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/tool-renderer-demo.go) | Custom tool call rendering |\n| [`custom-editor-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/custom-editor-demo.go) | Vim-like modal editor |\n| [`pirate.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/pirate.go) | Pirate-themed personality |\n\n## Workflow and automation\n\n| Extension | Description |\n|-----------|-------------|\n| [`auto-commit.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/auto-commit.go) | Auto-commit changes on shutdown |\n| [`plan-mode.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/plan-mode.go) | Read-only planning mode |\n| [`permission-gate.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/permission-gate.go) | Permission gating for destructive tools |\n| [`confirm-destructive.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/confirm-destructive.go) | Confirm destructive operations |\n| [`protected-paths.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/protected-paths.go) | Path protection for sensitive files |\n| [`project-rules.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/project-rules.go) | Project-specific rules injection |\n| [`compact-notify.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/compact-notify.go) | Notification on conversation compaction |\n\n## Interactive features\n\n| Extension | Description |\n|-----------|-------------|\n| [`prompt-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/prompt-demo.go) | Interactive prompts (select/confirm/input) |\n| [`bookmark.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/bookmark.go) | Bookmark conversations |\n| [`inline-bash.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/inline-bash.go) | Inline bash execution |\n| [`interactive-shell.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/interactive-shell.go) | Interactive shell integration |\n| [`notify.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/notify.go) | Desktop notifications |\n\n## Agent and context\n\n| Extension | Description |\n|-----------|-------------|\n| [`tool-logger.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/tool-logger.go) | Log all tool calls |\n| [`context-inject.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/context-inject.go) | Inject context into conversations |\n| [`summarize.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/summarize.go) | Conversation summarization |\n| [`lsp-diagnostics.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/lsp-diagnostics.go) | LSP diagnostic integration |\n\n## Bridged SDK APIs\n\nThese examples demonstrate the new bridged SDK APIs that give extensions access to internal Kit capabilities:\n\n| Extension | Description |\n|-----------|-------------|\n| [`bridge-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/bridge_demo.go) | Comprehensive demo of all bridged APIs — tree navigation, skill loading, template parsing, and model resolution |\n| [`conversation-manager.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/conversation-manager.go) | Tree navigation (`GetTreeNode`, `GetCurrentBranch`, `NavigateTo`), branch summarization (`SummarizeBranch`), and fresh context loops (`CollapseBranch`) |\n| [`prompt-templates.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/prompt-templates.go) | Frontmatter-driven templates with model fallback chains (`ResolveModelChain`), skill injection (`InjectSkillAsContext`), and template parsing (`ParseTemplate`, `RenderTemplate`) |\n\n## Themes\n\n| Extension | Description |\n|-----------|-------------|\n| [`neon-theme.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/neon-theme.go) | Custom theme registration and switching |\n\n## Multi-agent\n\n| Extension | Description |\n|-----------|-------------|\n| [`kit-kit.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/kit-kit.go) | Kit-in-Kit sub-agent spawning |\n| [`subagent-widget.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/subagent-widget.go) | Multi-agent orchestration with status widget |\n| [`subagent-test.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/subagent-tes"}],x0={};function S0(u){return u>=200&&u<300?"#22c55e":u>=400&&u<500?"#f59e0b":u>=500?"#ef4444":"#6b7280"}function T0(u,h,d,c){let v=h;for(const[A,O]of Object.entries(d))v=v.replace(`{${A}}`,encodeURIComponent(O));const E=new URL(v,u);for(const[A,O]of Object.entries(c))O&&E.searchParams.set(A,O);return E.toString()}function E0(u){return u==="bearer"?"Authorization":"X-API-Key"}const Fu={width:"100%",padding:"6px 10px",border:"1px solid var(--bd)",borderRadius:4,background:"var(--bg)",color:"var(--tx)",fontSize:13,fontFamily:"var(--font-code, monospace)",boxSizing:"border-box"};function Ju({param:u,value:h,onChange:d}){return s.jsxs("div",{style:{marginBottom:10},children:[s.jsxs("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:[u.name,u.required&&s.jsx("span",{style:{color:"#ef4444",marginLeft:2},children:"*"}),s.jsxs("span",{style:{fontWeight:400,color:"var(--txM)",marginLeft:6,fontSize:11},children:[u.in," · ",u.type]})]}),s.jsx("input",{"data-testid":`param-input-${u.name}`,style:Fu,placeholder:u.description||u.name,value:h,onChange:c=>d(c.target.value)})]})}function z0({endpoint:u,baseUrl:h,auth:d}){var lt;const[c,v]=w.useState(!1),[E,A]=w.useState({}),[O,C]=w.useState((lt=u.requestBody)!=null&<.schema?JSON.stringify(u.requestBody.schema,null,2):""),[y,G]=w.useState(""),[R,K]=w.useState(!1),[nt,xt]=w.useState(null),[Dt,Mt]=w.useState(null),[W,I]=w.useState(!1),ct=(P,mt)=>A(tt=>({...tt,[P]:mt})),Q=u.parameters.filter(P=>P.in==="path"),Y=u.parameters.filter(P=>P.in==="query"),H=u.parameters.filter(P=>P.in==="header"),U=u.requestBody!=null,at=async()=>{K(!0),xt(null),Mt(null);const P={};for(const At of Q)P[At.name]=E[At.name]||"";const mt={};for(const At of Y)E[At.name]&&(mt[At.name]=E[At.name]);const tt={};for(const At of H)E[At.name]&&(tt[At.name]=E[At.name]);if(U&&(tt["Content-Type"]="application/json"),d&&y){const At=d.header||E0(d.type);tt[At]=d.type==="bearer"?`Bearer ${y}`:y}try{const At=T0(h,u.path,P,mt),$t=Date.now(),ft=await fetch(At,{method:u.method.toUpperCase(),headers:tt,body:U&&O?O:void 0}),j=Date.now()-$t,B={};ft.headers.forEach((Tt,m)=>{B[m]=Tt});let Z;if((ft.headers.get("content-type")||"").includes("json")){const Tt=await ft.json();Z=JSON.stringify(Tt,null,2)}else Z=await ft.text();xt({status:ft.status,statusText:ft.statusText,headers:B,body:Z,time:j})}catch(At){Mt(At instanceof Error?At.message:"Network error")}finally{K(!1)}};return s.jsxs("div",{"data-testid":"api-playground",style:{border:"1px solid var(--bd)",borderRadius:6,overflow:"hidden",marginTop:8},children:[s.jsxs("button",{"data-testid":"playground-toggle",onClick:()=>v(!c),style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"10px 14px",background:"var(--sf)",border:"none",cursor:"pointer",fontFamily:"inherit",fontSize:13,fontWeight:600,color:"var(--ac)"},children:[s.jsx("span",{style:{fontSize:14},children:c?"▼":"▶"}),"Try it out"]}),c&&s.jsxs("div",{style:{padding:"14px 16px",borderTop:"1px solid var(--bd)"},children:[d&&s.jsxs("div",{style:{marginBottom:12},children:[s.jsx("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:d.type==="bearer"?"Bearer Token":"API Key"}),s.jsx("input",{"data-testid":"auth-input",type:"password",style:Fu,placeholder:d.type==="bearer"?"Enter bearer token":"Enter API key",value:y,onChange:P=>G(P.target.value)})]}),Q.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Path Parameters"}),Q.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),Y.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Query Parameters"}),Y.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),H.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Header Parameters"}),H.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),U&&s.jsxs("div",{style:{marginBottom:12},children:[s.jsx("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:"Request Body"}),s.jsx("textarea",{"data-testid":"request-body",style:{...Fu,minHeight:100,resize:"vertical",lineHeight:1.5},value:O,onChange:P=>C(P.target.value)})]}),s.jsx("button",{"data-testid":"send-request",onClick:at,disabled:R,style:{padding:"8px 20px",borderRadius:4,border:"none",background:"var(--ac)",color:"#fff",fontWeight:600,fontSize:13,cursor:R?"wait":"pointer",opacity:R?.7:1,fontFamily:"inherit"},children:R?"Sending...":"Send Request"}),Dt&&s.jsx("div",{"data-testid":"playground-error",style:{marginTop:12,padding:"10px 14px",borderRadius:4,background:"#ef444418",border:"1px solid #ef444444",color:"#ef4444",fontSize:13},children:Dt}),nt&&s.jsxs("div",{"data-testid":"playground-response",style:{marginTop:12},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[s.jsxs("span",{"data-testid":"response-status",style:{padding:"2px 10px",borderRadius:4,fontSize:13,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:"#fff",background:S0(nt.status)},children:[nt.status," ",nt.statusText]}),s.jsxs("span",{style:{fontSize:12,color:"var(--txM)"},children:[nt.time,"ms"]})]}),s.jsxs("button",{"data-testid":"toggle-headers",onClick:()=>I(!W),style:{display:"flex",alignItems:"center",gap:4,background:"none",border:"none",cursor:"pointer",fontSize:12,color:"var(--txM)",padding:"4px 0",fontFamily:"inherit",marginBottom:4},children:[s.jsx("span",{style:{transform:W?"rotate(90deg)":"rotate(0)",transition:"transform 0.15s"},children:"▶"}),"Response Headers"]}),W&&s.jsx("pre",{style:{background:"var(--sf)",padding:10,borderRadius:4,fontSize:11,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.5,marginBottom:8,color:"var(--tx2)",margin:"0 0 8px 0"},children:Object.entries(nt.headers).map(([P,mt])=>`${P}: ${mt}`).join(` -`)}),s.jsx("pre",{"data-testid":"response-body",style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:14,borderRadius:6,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0,maxHeight:400},children:nt.body})]})]})]})}function mm({samples:u}){var c;const[h,d]=w.useState(0);return u.length===0?null:s.jsxs("div",{"data-testid":"code-samples",style:{border:"1px solid var(--bd)",borderRadius:8,overflow:"hidden"},children:[s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--bd)",background:"var(--sf)",overflowX:"auto",WebkitOverflowScrolling:"touch"},children:u.map((v,E)=>s.jsx("button",{onClick:()=>d(E),style:{padding:"8px 16px",fontSize:13,fontWeight:500,background:E===h?"var(--cdBg)":"transparent",color:E===h?"var(--tx)":"var(--tx2)",border:"none",borderBottom:E===h?"2px solid var(--ac)":"2px solid transparent",cursor:"pointer",fontFamily:"var(--font-body)",whiteSpace:"nowrap"},children:v.label},v.language))}),s.jsx("pre",{style:{margin:0,padding:16,background:"var(--cdBg)",overflow:"auto"},children:s.jsx("code",{style:{fontSize:13,fontFamily:"var(--font-code)"},children:(c=u[h])==null?void 0:c.code})})]})}const pm={get:"#22c55e",post:"#3b82f6",put:"#f59e0b",delete:"#ef4444",patch:"#a78bfa",head:"#6b7280",options:"#6b7280"};function C0({method:u}){const h=pm[u.toLowerCase()]||"#6b7280";return s.jsx("span",{"data-testid":"method-badge",style:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-code, monospace)",textTransform:"uppercase",color:"#fff",background:h,letterSpacing:"0.05em"},children:u.toUpperCase()})}function j0({parameters:u}){return u.length===0?null:s.jsx("div",{style:{overflowX:"auto",marginBottom:16},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,lineHeight:1.5},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{borderBottom:"2px solid var(--bd)",textAlign:"left"},children:[s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Name"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Type"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"In"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Required"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Description"})]})}),s.jsx("tbody",{children:u.map((h,d)=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--bd)"},children:[s.jsx("td",{style:{padding:"8px 12px",fontFamily:"var(--font-code, monospace)",fontWeight:500,color:h.in==="path"?"var(--ac)":"var(--tx)"},children:h.name}),s.jsx("td",{style:{padding:"8px 12px",fontFamily:"var(--font-code, monospace)",color:"var(--tx2)"},children:h.type}),s.jsx("td",{style:{padding:"8px 12px",color:"var(--txM)"},children:s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:11,background:h.in==="path"?"var(--ac)22":"var(--sf)",color:h.in==="path"?"var(--ac)":"var(--txM)"},children:h.in})}),s.jsx("td",{style:{padding:"8px 12px"},children:h.required?s.jsx("span",{"data-testid":"required-badge",style:{padding:"1px 6px",borderRadius:3,fontSize:11,fontWeight:600,background:"#ef444422",color:"#ef4444"},children:"required"}):s.jsx("span",{style:{color:"var(--txM)",fontSize:12},children:"optional"})}),s.jsx("td",{style:{padding:"8px 12px",color:"var(--tx2)"},children:h.description||"—"})]},`${h.name}-${d}`))})]})})}function M0({requestBody:u}){return s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[s.jsx("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,fontFamily:"var(--font-code, monospace)",background:"var(--sf)",color:"var(--tx2)"},children:u.contentType}),u.required&&s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:11,fontWeight:600,background:"#ef444422",color:"#ef4444"},children:"required"})]}),u.description&&s.jsx("p",{style:{fontSize:13,color:"var(--tx2)",marginBottom:8,marginTop:0},children:u.description}),u.schema&&s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:16,borderRadius:6,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0},children:JSON.stringify(u.schema,null,2)})]})}function A0(u){return u.startsWith("2")?"#22c55e":u.startsWith("4")?"#f59e0b":u.startsWith("5")?"#ef4444":"#6b7280"}function k0({responses:u}){return u.length===0?null:s.jsx("div",{style:{marginBottom:16},children:u.map((h,d)=>{const c=A0(h.statusCode);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 14px",background:"var(--sf)"},children:[s.jsx("span",{"data-testid":"status-badge",style:{padding:"2px 8px",borderRadius:4,fontSize:12,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:"#fff",background:c},children:h.statusCode}),s.jsx("span",{style:{fontSize:13,color:"var(--tx2)"},children:h.description})]}),h.schema&&s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:14,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0,borderTop:"1px solid var(--bd)"},children:JSON.stringify(h.schema,null,2)})]},`${h.statusCode}-${d}`)})})}function _0(u,h){const d=h+u.path,c=[`curl -X ${u.method.toUpperCase()} "${d}"`],v=u.parameters.filter(E=>E.in==="header");for(const E of v)c.push(` -H "${E.name}: "`);return u.requestBody&&(c.push(` -H "Content-Type: ${u.requestBody.contentType}"`),u.requestBody.schema&&c.push(` -d '${JSON.stringify(u.requestBody.schema,null,2)}'`)),c.join(` \\ -`)}function D0(u,h){var A;const d=h+u.path,c=[];c.push(` method: "${u.method.toUpperCase()}",`);const v={},E=u.parameters.filter(O=>O.in==="header");for(const O of E)v[O.name]="";return u.requestBody&&(v["Content-Type"]=u.requestBody.contentType),Object.keys(v).length>0&&c.push(` headers: ${JSON.stringify(v,null,4).replace(/\n/g,` +`},{id:"extensions/examples",title:"Examples",content:"\n# Extension Examples\n\nKit ships with a rich set of example extensions in the `examples/extensions/` directory. These serve as both documentation and starting points for your own extensions.\n\n## UI and display\n\n| Extension | Description |\n|-----------|-------------|\n| [`minimal.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/minimal.go) | Clean UI with custom footer |\n| [`branded-output.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/branded-output.go) | Branded output rendering |\n| [`header-footer-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/header-footer-demo.go) | Custom headers and footers |\n| [`widget-status.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/widget-status.go) | Persistent status widgets |\n| [`overlay-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/overlay-demo.go) | Modal dialogs |\n| [`tool-renderer-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/tool-renderer-demo.go) | Custom tool call rendering |\n| [`custom-editor-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/custom-editor-demo.go) | Vim-like modal editor |\n| [`pirate.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/pirate.go) | Pirate-themed personality |\n\n## Workflow and automation\n\n| Extension | Description |\n|-----------|-------------|\n| [`auto-commit.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/auto-commit.go) | Auto-commit changes on shutdown |\n| [`plan-mode.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/plan-mode.go) | Read-only planning mode |\n| [`permission-gate.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/permission-gate.go) | Permission gating for destructive tools |\n| [`confirm-destructive.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/confirm-destructive.go) | Confirm destructive operations |\n| [`protected-paths.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/protected-paths.go) | Path protection for sensitive files |\n| [`project-rules.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/project-rules.go) | Project-specific rules injection |\n| [`compact-notify.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/compact-notify.go) | Notification on conversation compaction |\n\n## Interactive features\n\n| Extension | Description |\n|-----------|-------------|\n| [`prompt-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/prompt-demo.go) | Interactive prompts (select/confirm/input) |\n| [`bookmark.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/bookmark.go) | Bookmark conversations |\n| [`inline-bash.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/inline-bash.go) | Inline bash execution |\n| [`interactive-shell.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/interactive-shell.go) | Interactive shell integration |\n| [`notify.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/notify.go) | Desktop notifications |\n\n## Agent and context\n\n| Extension | Description |\n|-----------|-------------|\n| [`tool-logger.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/tool-logger.go) | Log all tool calls |\n| [`context-inject.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/context-inject.go) | Inject context into conversations |\n| [`summarize.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/summarize.go) | Conversation summarization |\n| [`lsp-diagnostics.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/lsp-diagnostics.go) | LSP diagnostic integration |\n\n## Bridged SDK APIs\n\nThese examples demonstrate the new bridged SDK APIs that give extensions access to internal Kit capabilities:\n\n| Extension | Description |\n|-----------|-------------|\n| [`bridge-demo.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/bridge_demo.go) | Comprehensive demo of all bridged APIs — tree navigation, skill loading, template parsing, and model resolution |\n| [`conversation-manager.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/conversation-manager.go) | Tree navigation (`GetTreeNode`, `GetCurrentBranch`, `NavigateTo`), branch summarization (`SummarizeBranch`), and fresh context loops (`CollapseBranch`) |\n| [`prompt-templates.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/prompt-templates.go) | Frontmatter-driven templates with model fallback chains (`ResolveModelChain`), skill injection (`InjectSkillAsContext`), and template parsing (`ParseTemplate`, `RenderTemplate`) |\n\n## Themes\n\n| Extension | Description |\n|-----------|-------------|\n| [`neon-theme.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/neon-theme.go) | Custom theme registration and switching |\n\n## Multi-agent\n\n| Extension | Description |\n|-----------|-------------|\n| [`kit-kit.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/kit-kit.go) | Kit-in-Kit sub-agent spawning |\n| [`subagent-widget.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/subagent-widget.go) | Multi-agent orchestration with status widget |\n| [`subagent-test.go`](https://github.com/mark3labs/kit/blob/master/examples/extensions/subagent-tes"}],xg={};function Sg(u){return u>=200&&u<300?"#22c55e":u>=400&&u<500?"#f59e0b":u>=500?"#ef4444":"#6b7280"}function Tg(u,h,d,c){let v=h;for(const[A,O]of Object.entries(d))v=v.replace(`{${A}}`,encodeURIComponent(O));const E=new URL(v,u);for(const[A,O]of Object.entries(c))O&&E.searchParams.set(A,O);return E.toString()}function Eg(u){return u==="bearer"?"Authorization":"X-API-Key"}const Fu={width:"100%",padding:"6px 10px",border:"1px solid var(--bd)",borderRadius:4,background:"var(--bg)",color:"var(--tx)",fontSize:13,fontFamily:"var(--font-code, monospace)",boxSizing:"border-box"};function Ju({param:u,value:h,onChange:d}){return s.jsxs("div",{style:{marginBottom:10},children:[s.jsxs("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:[u.name,u.required&&s.jsx("span",{style:{color:"#ef4444",marginLeft:2},children:"*"}),s.jsxs("span",{style:{fontWeight:400,color:"var(--txM)",marginLeft:6,fontSize:11},children:[u.in," · ",u.type]})]}),s.jsx("input",{"data-testid":`param-input-${u.name}`,style:Fu,placeholder:u.description||u.name,value:h,onChange:c=>d(c.target.value)})]})}function zg({endpoint:u,baseUrl:h,auth:d}){var lt;const[c,v]=w.useState(!1),[E,A]=w.useState({}),[O,C]=w.useState((lt=u.requestBody)!=null&<.schema?JSON.stringify(u.requestBody.schema,null,2):""),[y,G]=w.useState(""),[R,K]=w.useState(!1),[nt,xt]=w.useState(null),[Dt,Mt]=w.useState(null),[W,I]=w.useState(!1),ct=(P,mt)=>A(tt=>({...tt,[P]:mt})),Q=u.parameters.filter(P=>P.in==="path"),Y=u.parameters.filter(P=>P.in==="query"),H=u.parameters.filter(P=>P.in==="header"),U=u.requestBody!=null,at=async()=>{K(!0),xt(null),Mt(null);const P={};for(const At of Q)P[At.name]=E[At.name]||"";const mt={};for(const At of Y)E[At.name]&&(mt[At.name]=E[At.name]);const tt={};for(const At of H)E[At.name]&&(tt[At.name]=E[At.name]);if(U&&(tt["Content-Type"]="application/json"),d&&y){const At=d.header||Eg(d.type);tt[At]=d.type==="bearer"?`Bearer ${y}`:y}try{const At=Tg(h,u.path,P,mt),$t=Date.now(),ft=await fetch(At,{method:u.method.toUpperCase(),headers:tt,body:U&&O?O:void 0}),j=Date.now()-$t,B={};ft.headers.forEach((Tt,m)=>{B[m]=Tt});let Z;if((ft.headers.get("content-type")||"").includes("json")){const Tt=await ft.json();Z=JSON.stringify(Tt,null,2)}else Z=await ft.text();xt({status:ft.status,statusText:ft.statusText,headers:B,body:Z,time:j})}catch(At){Mt(At instanceof Error?At.message:"Network error")}finally{K(!1)}};return s.jsxs("div",{"data-testid":"api-playground",style:{border:"1px solid var(--bd)",borderRadius:6,overflow:"hidden",marginTop:8},children:[s.jsxs("button",{"data-testid":"playground-toggle",onClick:()=>v(!c),style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"10px 14px",background:"var(--sf)",border:"none",cursor:"pointer",fontFamily:"inherit",fontSize:13,fontWeight:600,color:"var(--ac)"},children:[s.jsx("span",{style:{fontSize:14},children:c?"▼":"▶"}),"Try it out"]}),c&&s.jsxs("div",{style:{padding:"14px 16px",borderTop:"1px solid var(--bd)"},children:[d&&s.jsxs("div",{style:{marginBottom:12},children:[s.jsx("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:d.type==="bearer"?"Bearer Token":"API Key"}),s.jsx("input",{"data-testid":"auth-input",type:"password",style:Fu,placeholder:d.type==="bearer"?"Enter bearer token":"Enter API key",value:y,onChange:P=>G(P.target.value)})]}),Q.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Path Parameters"}),Q.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),Y.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Query Parameters"}),Y.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),H.length>0&&s.jsxs("div",{style:{marginBottom:4},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:6,letterSpacing:"0.05em"},children:"Header Parameters"}),H.map(P=>s.jsx(Ju,{param:P,value:E[P.name]||"",onChange:mt=>ct(P.name,mt)},P.name))]}),U&&s.jsxs("div",{style:{marginBottom:12},children:[s.jsx("label",{style:{display:"block",fontSize:12,fontWeight:600,marginBottom:3,color:"var(--tx)"},children:"Request Body"}),s.jsx("textarea",{"data-testid":"request-body",style:{...Fu,minHeight:100,resize:"vertical",lineHeight:1.5},value:O,onChange:P=>C(P.target.value)})]}),s.jsx("button",{"data-testid":"send-request",onClick:at,disabled:R,style:{padding:"8px 20px",borderRadius:4,border:"none",background:"var(--ac)",color:"#fff",fontWeight:600,fontSize:13,cursor:R?"wait":"pointer",opacity:R?.7:1,fontFamily:"inherit"},children:R?"Sending...":"Send Request"}),Dt&&s.jsx("div",{"data-testid":"playground-error",style:{marginTop:12,padding:"10px 14px",borderRadius:4,background:"#ef444418",border:"1px solid #ef444444",color:"#ef4444",fontSize:13},children:Dt}),nt&&s.jsxs("div",{"data-testid":"playground-response",style:{marginTop:12},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8},children:[s.jsxs("span",{"data-testid":"response-status",style:{padding:"2px 10px",borderRadius:4,fontSize:13,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:"#fff",background:Sg(nt.status)},children:[nt.status," ",nt.statusText]}),s.jsxs("span",{style:{fontSize:12,color:"var(--txM)"},children:[nt.time,"ms"]})]}),s.jsxs("button",{"data-testid":"toggle-headers",onClick:()=>I(!W),style:{display:"flex",alignItems:"center",gap:4,background:"none",border:"none",cursor:"pointer",fontSize:12,color:"var(--txM)",padding:"4px 0",fontFamily:"inherit",marginBottom:4},children:[s.jsx("span",{style:{transform:W?"rotate(90deg)":"rotate(0)",transition:"transform 0.15s"},children:"▶"}),"Response Headers"]}),W&&s.jsx("pre",{style:{background:"var(--sf)",padding:10,borderRadius:4,fontSize:11,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.5,marginBottom:8,color:"var(--tx2)",margin:"0 0 8px 0"},children:Object.entries(nt.headers).map(([P,mt])=>`${P}: ${mt}`).join(` +`)}),s.jsx("pre",{"data-testid":"response-body",style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:14,borderRadius:6,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0,maxHeight:400},children:nt.body})]})]})]})}function mm({samples:u}){var c;const[h,d]=w.useState(0);return u.length===0?null:s.jsxs("div",{"data-testid":"code-samples",style:{border:"1px solid var(--bd)",borderRadius:8,overflow:"hidden"},children:[s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--bd)",background:"var(--sf)",overflowX:"auto",WebkitOverflowScrolling:"touch"},children:u.map((v,E)=>s.jsx("button",{onClick:()=>d(E),style:{padding:"8px 16px",fontSize:13,fontWeight:500,background:E===h?"var(--cdBg)":"transparent",color:E===h?"var(--tx)":"var(--tx2)",border:"none",borderBottom:E===h?"2px solid var(--ac)":"2px solid transparent",cursor:"pointer",fontFamily:"var(--font-body)",whiteSpace:"nowrap"},children:v.label},v.language))}),s.jsx("pre",{style:{margin:0,padding:16,background:"var(--cdBg)",overflow:"auto"},children:s.jsx("code",{style:{fontSize:13,fontFamily:"var(--font-code)"},children:(c=u[h])==null?void 0:c.code})})]})}const pm={get:"#22c55e",post:"#3b82f6",put:"#f59e0b",delete:"#ef4444",patch:"#a78bfa",head:"#6b7280",options:"#6b7280"};function Cg({method:u}){const h=pm[u.toLowerCase()]||"#6b7280";return s.jsx("span",{"data-testid":"method-badge",style:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-code, monospace)",textTransform:"uppercase",color:"#fff",background:h,letterSpacing:"0.05em"},children:u.toUpperCase()})}function jg({parameters:u}){return u.length===0?null:s.jsx("div",{style:{overflowX:"auto",marginBottom:16},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,lineHeight:1.5},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{borderBottom:"2px solid var(--bd)",textAlign:"left"},children:[s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Name"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Type"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"In"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Required"}),s.jsx("th",{style:{padding:"8px 12px",fontWeight:600,color:"var(--tx)"},children:"Description"})]})}),s.jsx("tbody",{children:u.map((h,d)=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--bd)"},children:[s.jsx("td",{style:{padding:"8px 12px",fontFamily:"var(--font-code, monospace)",fontWeight:500,color:h.in==="path"?"var(--ac)":"var(--tx)"},children:h.name}),s.jsx("td",{style:{padding:"8px 12px",fontFamily:"var(--font-code, monospace)",color:"var(--tx2)"},children:h.type}),s.jsx("td",{style:{padding:"8px 12px",color:"var(--txM)"},children:s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:11,background:h.in==="path"?"var(--ac)22":"var(--sf)",color:h.in==="path"?"var(--ac)":"var(--txM)"},children:h.in})}),s.jsx("td",{style:{padding:"8px 12px"},children:h.required?s.jsx("span",{"data-testid":"required-badge",style:{padding:"1px 6px",borderRadius:3,fontSize:11,fontWeight:600,background:"#ef444422",color:"#ef4444"},children:"required"}):s.jsx("span",{style:{color:"var(--txM)",fontSize:12},children:"optional"})}),s.jsx("td",{style:{padding:"8px 12px",color:"var(--tx2)"},children:h.description||"—"})]},`${h.name}-${d}`))})]})})}function Mg({requestBody:u}){return s.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[s.jsx("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,fontFamily:"var(--font-code, monospace)",background:"var(--sf)",color:"var(--tx2)"},children:u.contentType}),u.required&&s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:11,fontWeight:600,background:"#ef444422",color:"#ef4444"},children:"required"})]}),u.description&&s.jsx("p",{style:{fontSize:13,color:"var(--tx2)",marginBottom:8,marginTop:0},children:u.description}),u.schema&&s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:16,borderRadius:6,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0},children:JSON.stringify(u.schema,null,2)})]})}function Ag(u){return u.startsWith("2")?"#22c55e":u.startsWith("4")?"#f59e0b":u.startsWith("5")?"#ef4444":"#6b7280"}function kg({responses:u}){return u.length===0?null:s.jsx("div",{style:{marginBottom:16},children:u.map((h,d)=>{const c=Ag(h.statusCode);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 14px",background:"var(--sf)"},children:[s.jsx("span",{"data-testid":"status-badge",style:{padding:"2px 8px",borderRadius:4,fontSize:12,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:"#fff",background:c},children:h.statusCode}),s.jsx("span",{style:{fontSize:13,color:"var(--tx2)"},children:h.description})]}),h.schema&&s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:14,fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0,borderTop:"1px solid var(--bd)"},children:JSON.stringify(h.schema,null,2)})]},`${h.statusCode}-${d}`)})})}function _g(u,h){const d=h+u.path,c=[`curl -X ${u.method.toUpperCase()} "${d}"`],v=u.parameters.filter(E=>E.in==="header");for(const E of v)c.push(` -H "${E.name}: "`);return u.requestBody&&(c.push(` -H "Content-Type: ${u.requestBody.contentType}"`),u.requestBody.schema&&c.push(` -d '${JSON.stringify(u.requestBody.schema,null,2)}'`)),c.join(` \\ +`)}function Dg(u,h){var A;const d=h+u.path,c=[];c.push(` method: "${u.method.toUpperCase()}",`);const v={},E=u.parameters.filter(O=>O.in==="header");for(const O of E)v[O.name]="";return u.requestBody&&(v["Content-Type"]=u.requestBody.contentType),Object.keys(v).length>0&&c.push(` headers: ${JSON.stringify(v,null,4).replace(/\n/g,` `)},`),(A=u.requestBody)!=null&&A.schema&&c.push(` body: JSON.stringify(${JSON.stringify(u.requestBody.schema,null,4).replace(/\n/g,` `)}),`),`fetch("${d}", { ${c.join(` `)} -});`}function O0(u,h){var O,C;const d=h+u.path,c=["import requests",""],v={},E=u.parameters.filter(y=>y.in==="header");for(const y of E)v[y.name]="";u.requestBody&&(v["Content-Type"]=u.requestBody.contentType),Object.keys(v).length>0&&(c.push(`headers = ${JSON.stringify(v,null,4)}`),c.push("")),(O=u.requestBody)!=null&&O.schema&&(c.push(`data = ${JSON.stringify(u.requestBody.schema,null,4)}`),c.push(""));const A=[`"${d}"`];return Object.keys(v).length>0&&A.push("headers=headers"),(C=u.requestBody)!=null&&C.schema&&A.push("json=data"),c.push(`response = requests.${u.method}(${A.join(", ")})`),c.push("print(response.json())"),c.join(` -`)}function R0(u,h){var E,A;const d=h+u.path,c=["package main","","import (",' "fmt"',' "net/http"'];(E=u.requestBody)!=null&&E.schema&&c.push(' "bytes"',' "encoding/json"'),c.push(' "io"',")",""),c.push("func main() {"),(A=u.requestBody)!=null&&A.schema?(c.push(` body, _ := json.Marshal(${JSON.stringify(u.requestBody.schema)})`),c.push(` req, _ := http.NewRequest("${u.method.toUpperCase()}", "${d}", bytes.NewBuffer(body))`)):c.push(` req, _ := http.NewRequest("${u.method.toUpperCase()}", "${d}", nil)`);const v=u.parameters.filter(O=>O.in==="header");for(const O of v)c.push(` req.Header.Set("${O.name}", "")`);return u.requestBody&&c.push(` req.Header.Set("Content-Type", "${u.requestBody.contentType}")`),c.push(" resp, _ := http.DefaultClient.Do(req)"),c.push(" defer resp.Body.Close()"),c.push(" data, _ := io.ReadAll(resp.Body)"),c.push(" fmt.Println(string(data))"),c.push("}"),c.join(` -`)}function w0(u,h){var E;const d=h+u.path,c=["import java.net.http.*;","import java.net.URI;","","var client = HttpClient.newHttpClient();"];(E=u.requestBody)!=null&&E.schema?(c.push(`var body = ${JSON.stringify(JSON.stringify(u.requestBody.schema))};`),c.push("var request = HttpRequest.newBuilder()"),c.push(` .uri(URI.create("${d}"))`),c.push(` .method("${u.method.toUpperCase()}", HttpRequest.BodyPublishers.ofString(body))`)):(c.push("var request = HttpRequest.newBuilder()"),c.push(` .uri(URI.create("${d}"))`),c.push(` .method("${u.method.toUpperCase()}", HttpRequest.BodyPublishers.noBody())`));const v=u.parameters.filter(A=>A.in==="header");for(const A of v)c.push(` .header("${A.name}", "")`);return u.requestBody&&c.push(` .header("Content-Type", "${u.requestBody.contentType}")`),c.push(" .build();"),c.push(""),c.push("var response = client.send(request, HttpResponse.BodyHandlers.ofString());"),c.push("System.out.println(response.body());"),c.join(` -`)}function B0(u,h){var E;const d=h+u.path,c=["using var client = new HttpClient();","",`var request = new HttpRequestMessage(HttpMethod.${u.method.charAt(0).toUpperCase()+u.method.slice(1)}, "${d}");`],v=u.parameters.filter(A=>A.in==="header");for(const A of v)c.push(`request.Headers.Add("${A.name}", "");`);return(E=u.requestBody)!=null&&E.schema&&(c.push("request.Content = new StringContent("),c.push(` ${JSON.stringify(JSON.stringify(u.requestBody.schema))},`),c.push(" System.Text.Encoding.UTF8,"),c.push(` "${u.requestBody.contentType}");`)),c.push(""),c.push("var response = await client.SendAsync(request);"),c.push("var body = await response.Content.ReadAsStringAsync();"),c.push("Console.WriteLine(body);"),c.join(` -`)}function U0({endpoint:u,baseUrl:h="https://api.example.com"}){const[d,c]=w.useState(0),v=["cURL","JavaScript","Python","Go","Java","C#"],E=[_0(u,h),D0(u,h),O0(u,h),R0(u,h),w0(u,h),B0(u,h)];return s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--bd)",overflowX:"auto",WebkitOverflowScrolling:"touch"},children:v.map((A,O)=>s.jsx("button",{onClick:()=>c(O),style:{padding:"6px 14px",background:"none",border:"none",borderBottom:d===O?"2px solid var(--ac)":"2px solid transparent",color:d===O?"var(--ac)":"var(--txM)",fontWeight:d===O?600:400,fontSize:12,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"},children:A},A))}),s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:16,borderRadius:"0 0 6px 6px",fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0},children:E[d]})]})}function H0({endpoint:u,baseUrl:h,defaultExpanded:d=!1,showPlayground:c,playgroundAuth:v}){const[E,A]=w.useState(d),O=(u.operationId||`${u.method}-${u.path}`).toLowerCase().replace(/[^a-z0-9]+/g,"-"),C=u.parameters.length>0||u.requestBody!=null||u.responses.length>0;return s.jsxs("div",{id:O,style:{border:"1px solid var(--bd)",borderRadius:8,marginBottom:12,overflow:"hidden",scrollMarginTop:24},children:[s.jsxs("button",{onClick:()=>C&&A(!E),style:{display:"flex",alignItems:"center",gap:10,width:"100%",padding:"14px 18px",background:"var(--sf)",border:"none",cursor:C?"pointer":"default",textAlign:"left",fontFamily:"inherit",color:"var(--tx)"},children:[s.jsx(C0,{method:u.method}),s.jsx("span",{style:{fontFamily:"var(--font-code, monospace)",fontSize:14,fontWeight:500},children:u.path}),u.deprecated&&s.jsx("span",{"data-testid":"deprecated-badge",style:{padding:"1px 6px",borderRadius:3,fontSize:10,fontWeight:700,background:"#f59e0b33",color:"#f59e0b",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Deprecated"}),u.tags.map(y=>s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:10,background:"var(--bd)",color:"var(--txM)"},children:y},y)),s.jsx("span",{style:{flex:1}}),u.summary&&s.jsx("span",{style:{fontSize:13,color:"var(--tx2)",marginRight:8},children:u.summary}),C&&s.jsx("span",{style:{transform:E?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s",fontSize:12,color:"var(--txM)"},children:"▾"})]}),E&&s.jsxs("div",{style:{padding:"16px 18px",borderTop:"1px solid var(--bd)"},children:[u.description&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0,marginBottom:16},children:u.description}),u.parameters.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Parameters"}),s.jsx(j0,{parameters:u.parameters})]}),u.requestBody&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Request Body"}),s.jsx(M0,{requestBody:u.requestBody})]}),u.responses.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Responses"}),s.jsx(k0,{responses:u.responses})]}),s.jsxs("div",{children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Code Examples"}),u.codeSamples&&u.codeSamples.length>0?s.jsx(mm,{samples:u.codeSamples}):s.jsx(U0,{endpoint:u,baseUrl:h})]}),c&&s.jsx("div",{style:{marginTop:16},children:s.jsx(z0,{endpoint:u,baseUrl:h||"https://api.example.com",auth:v})})]})]})}function N0({manifest:u,baseUrl:h,showPlayground:d,playgroundAuth:c}){const v=h||(u.servers.length>0?u.servers[0].url:"https://api.example.com"),E=new Map;for(const C of u.endpoints){const y=C.tags.length>0?C.tags[0]:"Other";E.has(y)||E.set(y,[]),E.get(y).push(C)}const A=[];for(const C of u.tags)E.has(C.name)&&A.push(C.name);for(const C of E.keys())A.includes(C)||A.push(C);const O=new Map;for(const C of u.tags)O.set(C.name,C.description);return s.jsxs("div",{style:{display:"flex",gap:32},children:[s.jsxs("nav",{"data-testid":"api-toc",style:{width:200,flexShrink:0,position:"sticky",top:24,alignSelf:"flex-start",maxHeight:"calc(100vh - 48px)",overflowY:"auto"},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:12,letterSpacing:"0.05em"},children:"Endpoints"}),A.map(C=>{const y=C.toLowerCase().replace(/\s+/g,"-");return s.jsxs("div",{style:{marginBottom:14},children:[s.jsx("a",{href:`#${y}`,onClick:G=>{var R;G.preventDefault(),(R=document.getElementById(y))==null||R.scrollIntoView({behavior:"smooth",block:"start"})},style:{display:"block",fontSize:13,fontWeight:600,color:"var(--tx)",textDecoration:"none",marginBottom:4},children:C}),(E.get(C)||[]).map(G=>{const R=(G.operationId||`${G.method}-${G.path}`).toLowerCase().replace(/[^a-z0-9]+/g,"-");return s.jsxs("a",{href:`#${R}`,onClick:K=>{var nt;K.preventDefault(),(nt=document.getElementById(R))==null||nt.scrollIntoView({behavior:"smooth",block:"start"})},style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--tx2)",textDecoration:"none",padding:"3px 0"},children:[s.jsx("span",{style:{fontSize:9,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:pm[G.method]||"#6b7280",width:36,textTransform:"uppercase"},children:G.method}),s.jsx("span",{style:{fontFamily:"var(--font-code, monospace)"},children:G.path})]},`${G.method}-${G.path}`)})]},C)})]}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{marginBottom:32},children:[s.jsx("h1",{style:{fontSize:28,fontWeight:700,marginBottom:4},children:u.title}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[s.jsxs("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,background:"var(--sf)",color:"var(--txM)"},children:["v",u.version]}),u.servers.length>0&&s.jsx("span",{style:{fontSize:12,fontFamily:"var(--font-code, monospace)",color:"var(--tx2)"},children:u.servers[0].url})]}),u.description&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0},children:u.description})]}),A.map(C=>s.jsxs("section",{id:C.toLowerCase().replace(/\s+/g,"-"),"data-testid":"tag-section",style:{marginBottom:40},children:[s.jsx("h2",{style:{fontSize:20,fontWeight:700,marginBottom:4},children:C}),O.get(C)&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0,marginBottom:16},children:O.get(C)}),(E.get(C)||[]).map(y=>s.jsx(H0,{endpoint:y,baseUrl:v,showPlayground:d,playgroundAuth:c},`${y.method}-${y.path}`))]},C))]})]})}function q0({href:u,title:h,description:d,icon:c,external:v}){const E=v??u.startsWith("http");return s.jsxs("a",{href:u,target:E?"_blank":void 0,rel:E?"noopener noreferrer":void 0,style:{display:"block",padding:"16px 20px",border:"1px solid var(--bd)",borderRadius:8,textDecoration:"none",color:"inherit",background:"var(--sf)",transition:"border-color 0.15s, background 0.15s",cursor:"pointer"},onMouseEnter:A=>{A.currentTarget.style.borderColor="var(--ac)",A.currentTarget.style.background="var(--sfH)"},onMouseLeave:A=>{A.currentTarget.style.borderColor="var(--bd)",A.currentTarget.style.background="var(--sf)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c&&s.jsx("span",{style:{fontSize:18},children:c}),s.jsx("span",{style:{fontWeight:600,fontSize:15,color:"var(--tx)"},children:h}),s.jsx("span",{style:{marginLeft:"auto",color:"var(--tx2)",fontSize:14},children:E?"↗":"→"})]}),d&&s.jsx("p",{style:{margin:"6px 0 0",fontSize:13,color:"var(--tx2)",lineHeight:1.5},children:d})]})}function L0({columns:u=2,children:h}){return s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gap:12,marginTop:16,marginBottom:16},children:h})}const G0={Added:"#22c55e",Changed:"#3b82f6",Deprecated:"#f59e0b",Removed:"#ef4444",Fixed:"#8b5cf6",Security:"#f97316"};function lm(u){return G0[u]||"#6b7280"}function Y0({entries:u,initialLimit:h}){const[d,c]=w.useState(!h),v=d?u:u.slice(0,h||u.length);return u.length===0?s.jsx("div",{"data-testid":"changelog-empty",style:{padding:"40px 0",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No changelog entries found."}):s.jsxs("div",{"data-testid":"changelog-timeline",style:{position:"relative"},children:[s.jsx("div",{style:{position:"absolute",left:15,top:8,bottom:8,width:2,background:"var(--bd)"}}),v.map((E,A)=>s.jsxs("div",{"data-testid":`changelog-entry-${E.version}`,style:{position:"relative",paddingLeft:44,paddingBottom:As.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginBottom:8},children:[s.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:lm(O.type)}}),s.jsx("span",{style:{fontSize:12,fontWeight:600,textTransform:"uppercase",letterSpacing:".06em",color:lm(O.type),fontFamily:"var(--font-code, monospace)"},children:O.type})]}),s.jsx("ul",{style:{margin:0,paddingLeft:18,listStyleType:"disc",color:"var(--tx2)"},children:O.items.map((C,y)=>s.jsx("li",{style:{fontSize:14,lineHeight:1.7,color:"var(--tx2)",marginBottom:2},children:C},y))})]},O.type))]},E.version)),!d&&u.length>(h||0)&&s.jsx("div",{style:{textAlign:"center",marginTop:24},children:s.jsxs("button",{"data-testid":"changelog-show-more",onClick:()=>c(!0),style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 20px",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body, inherit)",cursor:"pointer",transition:"border-color .15s, color .15s"},children:["Show all ",u.length," releases"]})})]})}const im={info:{color:"#3b82f6",label:"INFO"},warning:{color:"#f59e0b",label:"WARNING"},tip:{color:"var(--ac, #a78bfa)",label:"TIP"},danger:{color:"#ef4444",label:"DANGER"}};function K0({type:u="info",title:h,children:d}){const c=im[u]||im.info;return s.jsxs("div",{style:{borderLeft:`3px solid ${c.color}`,background:`${c.color}11`,borderRadius:"0 2px 2px 0",padding:"14px 18px",marginBottom:20},children:[h?s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[s.jsx("span",{style:{fontWeight:700,fontSize:10,letterSpacing:".08em",color:c.color,fontFamily:"var(--font-code, monospace)"},children:c.label}),s.jsx("span",{style:{fontWeight:600,fontSize:13,color:c.color},children:h})]}):s.jsx("div",{style:{marginBottom:4},children:s.jsx("span",{style:{fontWeight:700,fontSize:10,letterSpacing:".08em",color:c.color,fontFamily:"var(--font-code, monospace)"},children:c.label})}),s.jsx("div",{style:{fontSize:14,lineHeight:1.65,color:"var(--tx2)"},children:d})]})}function X0({items:u,children:h}){const[d,c]=w.useState(0);return s.jsxs("div",{style:{marginBottom:20},children:[s.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--bd)"},children:u.map((v,E)=>s.jsx("button",{onClick:()=>c(E),style:{padding:"8px 16px",background:"none",border:"none",borderBottom:d===E?"2px solid var(--ac)":"2px solid transparent",color:d===E?"var(--ac)":"var(--txM)",fontWeight:d===E?600:400,fontSize:13,cursor:"pointer",fontFamily:"inherit"},children:v},E))}),s.jsx("div",{style:{padding:"16px 0"},children:h[d]})]})}function Q0({title:u,icon:h,href:d,children:c}){const v=s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,padding:"20px",transition:"border-color 0.15s",cursor:d?"pointer":"default"},children:[h&&s.jsx("span",{style:{fontSize:24,marginBottom:8,display:"block"},children:h}),s.jsx("div",{style:{fontWeight:600,fontSize:14,marginBottom:4},children:u}),c&&s.jsx("div",{style:{fontSize:13,color:"var(--txM)",lineHeight:1.5},children:c})]});return d?s.jsx("a",{href:d,style:{textDecoration:"none",color:"inherit"},children:v}):v}function V0({cols:u=2,children:h}){return s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gap:12,marginBottom:20},children:h})}function Z0({children:u}){return s.jsx("div",{style:{paddingLeft:24,borderLeft:"2px solid var(--bd)",marginBottom:20},children:sm.Children.map(u,(h,d)=>s.jsxs("div",{style:{position:"relative",paddingBottom:20},children:[s.jsx("div",{style:{position:"absolute",left:-33,top:0,width:20,height:20,borderRadius:"50%",background:"var(--ac)",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700},children:d+1}),s.jsx("div",{style:{paddingLeft:8},children:h})]}))})}function J0({title:u,children:h}){const[d,c]=w.useState(!1);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,marginBottom:8,overflow:"hidden"},children:[s.jsxs("button",{onClick:()=>c(!d),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px 16px",background:"var(--sf)",border:"none",cursor:"pointer",fontWeight:500,fontSize:14,color:"var(--tx)",fontFamily:"inherit"},children:[u,s.jsx("span",{style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s"},children:"▾"})]}),d&&s.jsx("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--bd)",fontSize:14,color:"var(--tx2)",lineHeight:1.65},children:h})]})}const W0={install:{npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},"install -D":{npm:"npm install -D",yarn:"yarn add -D",pnpm:"pnpm add -D",bun:"bun add -d"},uninstall:{npm:"npm uninstall",yarn:"yarn remove",pnpm:"pnpm remove",bun:"bun remove"},run:{npm:"npm run",yarn:"yarn",pnpm:"pnpm",bun:"bun run"},exec:{npm:"npx",yarn:"yarn dlx",pnpm:"pnpm dlx",bun:"bunx"},init:{npm:"npm init",yarn:"yarn init",pnpm:"pnpm init",bun:"bun init"},create:{npm:"npm create",yarn:"yarn create",pnpm:"pnpm create",bun:"bun create"}};function F0(u,h){for(const[d,c]of Object.entries(W0))if(u.startsWith(d+" ")||u===d){const v=u.slice(d.length);return(c[h]||d)+v}return`${h} ${u}`}function $0({command:u}){const[h,d]=w.useState(0),[c,v]=w.useState(!1),E=["npm","yarn","pnpm","bun"],A=F0(u,E[h]);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,marginBottom:16,overflow:"hidden"},children:[s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--bd)",background:"var(--sf)",overflowX:"auto"},children:E.map((O,C)=>s.jsx("button",{onClick:()=>{d(C),v(!1)},style:{padding:"8px 14px",background:"none",border:"none",cursor:"pointer",fontSize:12,fontFamily:"var(--font-code)",fontWeight:C===h?600:400,color:C===h?"var(--ac)":"var(--txM)",borderBottom:C===h?"2px solid var(--ac)":"2px solid transparent",whiteSpace:"nowrap"},children:O},O))}),s.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"10px 14px",background:"var(--cdBg)",gap:8},children:[s.jsx("code",{style:{flex:1,fontFamily:"var(--font-code)",fontSize:13,color:"var(--cdTx)",whiteSpace:"pre",overflowX:"auto"},children:A}),s.jsx("button",{onClick:()=>{var O;(O=navigator.clipboard)==null||O.writeText(A),v(!0),setTimeout(()=>v(!1),2e3)},style:{background:"none",border:"none",cursor:"pointer",color:"var(--txM)",fontSize:12,fontFamily:"var(--font-code)",flexShrink:0},children:c?"✓":"Copy"})]})]})}function I0({name:u,fields:h}){return s.jsxs("div",{style:{marginBottom:16},children:[u&&s.jsx("h4",{style:{fontFamily:"var(--font-code)",fontSize:15,marginBottom:8,color:"var(--tx)"},children:u}),s.jsx("div",{style:{overflowX:"auto",WebkitOverflowScrolling:"touch"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,fontFamily:"var(--font-body)"},children:[s.jsx("thead",{children:s.jsx("tr",{style:{borderBottom:"2px solid var(--bd)"},children:["Property","Type","Required","Default","Description"].map(d=>s.jsx("th",{style:{textAlign:"left",padding:"8px 10px",color:"var(--txM)",fontWeight:600,fontSize:11,textTransform:"uppercase",letterSpacing:".05em",whiteSpace:"nowrap"},children:d},d))})}),s.jsx("tbody",{children:h.map(d=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--bd)"},children:[s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontWeight:500,color:"var(--tx)"},children:d.name}),s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontSize:12,color:"var(--ac)"},children:d.type}),s.jsx("td",{style:{padding:"8px 10px"},children:d.required&&s.jsx("span",{style:{fontSize:10,fontWeight:600,color:"#e04040",background:"rgba(224,64,64,0.1)",padding:"2px 6px",borderRadius:2},children:"required"})}),s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontSize:12,color:"var(--txM)"},children:d.default||"—"}),s.jsx("td",{style:{padding:"8px 10px",color:"var(--tx2)"},children:d.description||""})]},d.name))})]})})]})}function P0({name:u}){return s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0",fontFamily:"var(--font-code)",fontSize:13,color:"var(--tx2)"},children:[s.jsx("span",{style:{opacity:.6},children:"📄"})," ",u]})}function tg({name:u,defaultOpen:h,children:d}){const[c,v]=w.useState(h??!1);return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>v(!c),style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0",background:"none",border:"none",cursor:"pointer",fontFamily:"var(--font-code)",fontSize:13,color:"var(--tx)",fontWeight:500},children:[s.jsx("span",{children:c?"📂":"📁"})," ",u]}),c&&s.jsx("div",{style:{paddingLeft:18,borderLeft:"1px solid var(--bd)",marginLeft:8},children:d})]})}function Iu({children:u}){return s.jsx("div",{style:{border:"1px solid var(--bd)",borderRadius:2,padding:"12px 16px",background:"var(--cdBg)",marginBottom:16},children:u})}Iu.File=P0;Iu.Folder=tg;const eg={Callout:K0,Tabs:X0,Card:Q0,CardGroup:V0,Steps:Z0,Accordion:J0,ChangelogTimeline:Y0,PackageManager:$0,TypeTable:I0,FileTree:Iu,CodeSamples:mm,LinkCard:q0,CardGrid:L0},ng=` +});`}function Og(u,h){var O,C;const d=h+u.path,c=["import requests",""],v={},E=u.parameters.filter(y=>y.in==="header");for(const y of E)v[y.name]="";u.requestBody&&(v["Content-Type"]=u.requestBody.contentType),Object.keys(v).length>0&&(c.push(`headers = ${JSON.stringify(v,null,4)}`),c.push("")),(O=u.requestBody)!=null&&O.schema&&(c.push(`data = ${JSON.stringify(u.requestBody.schema,null,4)}`),c.push(""));const A=[`"${d}"`];return Object.keys(v).length>0&&A.push("headers=headers"),(C=u.requestBody)!=null&&C.schema&&A.push("json=data"),c.push(`response = requests.${u.method}(${A.join(", ")})`),c.push("print(response.json())"),c.join(` +`)}function Rg(u,h){var E,A;const d=h+u.path,c=["package main","","import (",' "fmt"',' "net/http"'];(E=u.requestBody)!=null&&E.schema&&c.push(' "bytes"',' "encoding/json"'),c.push(' "io"',")",""),c.push("func main() {"),(A=u.requestBody)!=null&&A.schema?(c.push(` body, _ := json.Marshal(${JSON.stringify(u.requestBody.schema)})`),c.push(` req, _ := http.NewRequest("${u.method.toUpperCase()}", "${d}", bytes.NewBuffer(body))`)):c.push(` req, _ := http.NewRequest("${u.method.toUpperCase()}", "${d}", nil)`);const v=u.parameters.filter(O=>O.in==="header");for(const O of v)c.push(` req.Header.Set("${O.name}", "")`);return u.requestBody&&c.push(` req.Header.Set("Content-Type", "${u.requestBody.contentType}")`),c.push(" resp, _ := http.DefaultClient.Do(req)"),c.push(" defer resp.Body.Close()"),c.push(" data, _ := io.ReadAll(resp.Body)"),c.push(" fmt.Println(string(data))"),c.push("}"),c.join(` +`)}function wg(u,h){var E;const d=h+u.path,c=["import java.net.http.*;","import java.net.URI;","","var client = HttpClient.newHttpClient();"];(E=u.requestBody)!=null&&E.schema?(c.push(`var body = ${JSON.stringify(JSON.stringify(u.requestBody.schema))};`),c.push("var request = HttpRequest.newBuilder()"),c.push(` .uri(URI.create("${d}"))`),c.push(` .method("${u.method.toUpperCase()}", HttpRequest.BodyPublishers.ofString(body))`)):(c.push("var request = HttpRequest.newBuilder()"),c.push(` .uri(URI.create("${d}"))`),c.push(` .method("${u.method.toUpperCase()}", HttpRequest.BodyPublishers.noBody())`));const v=u.parameters.filter(A=>A.in==="header");for(const A of v)c.push(` .header("${A.name}", "")`);return u.requestBody&&c.push(` .header("Content-Type", "${u.requestBody.contentType}")`),c.push(" .build();"),c.push(""),c.push("var response = client.send(request, HttpResponse.BodyHandlers.ofString());"),c.push("System.out.println(response.body());"),c.join(` +`)}function Bg(u,h){var E;const d=h+u.path,c=["using var client = new HttpClient();","",`var request = new HttpRequestMessage(HttpMethod.${u.method.charAt(0).toUpperCase()+u.method.slice(1)}, "${d}");`],v=u.parameters.filter(A=>A.in==="header");for(const A of v)c.push(`request.Headers.Add("${A.name}", "");`);return(E=u.requestBody)!=null&&E.schema&&(c.push("request.Content = new StringContent("),c.push(` ${JSON.stringify(JSON.stringify(u.requestBody.schema))},`),c.push(" System.Text.Encoding.UTF8,"),c.push(` "${u.requestBody.contentType}");`)),c.push(""),c.push("var response = await client.SendAsync(request);"),c.push("var body = await response.Content.ReadAsStringAsync();"),c.push("Console.WriteLine(body);"),c.join(` +`)}function Ug({endpoint:u,baseUrl:h="https://api.example.com"}){const[d,c]=w.useState(0),v=["cURL","JavaScript","Python","Go","Java","C#"],E=[_g(u,h),Dg(u,h),Og(u,h),Rg(u,h),wg(u,h),Bg(u,h)];return s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--bd)",overflowX:"auto",WebkitOverflowScrolling:"touch"},children:v.map((A,O)=>s.jsx("button",{onClick:()=>c(O),style:{padding:"6px 14px",background:"none",border:"none",borderBottom:d===O?"2px solid var(--ac)":"2px solid transparent",color:d===O?"var(--ac)":"var(--txM)",fontWeight:d===O?600:400,fontSize:12,cursor:"pointer",fontFamily:"inherit",whiteSpace:"nowrap"},children:A},A))}),s.jsx("pre",{style:{background:"var(--cdBg)",color:"var(--cdTx)",padding:16,borderRadius:"0 0 6px 6px",fontSize:12,fontFamily:"var(--font-code, monospace)",overflow:"auto",lineHeight:1.6,margin:0},children:E[d]})]})}function Hg({endpoint:u,baseUrl:h,defaultExpanded:d=!1,showPlayground:c,playgroundAuth:v}){const[E,A]=w.useState(d),O=(u.operationId||`${u.method}-${u.path}`).toLowerCase().replace(/[^a-z0-9]+/g,"-"),C=u.parameters.length>0||u.requestBody!=null||u.responses.length>0;return s.jsxs("div",{id:O,style:{border:"1px solid var(--bd)",borderRadius:8,marginBottom:12,overflow:"hidden",scrollMarginTop:24},children:[s.jsxs("button",{onClick:()=>C&&A(!E),style:{display:"flex",alignItems:"center",gap:10,width:"100%",padding:"14px 18px",background:"var(--sf)",border:"none",cursor:C?"pointer":"default",textAlign:"left",fontFamily:"inherit",color:"var(--tx)"},children:[s.jsx(Cg,{method:u.method}),s.jsx("span",{style:{fontFamily:"var(--font-code, monospace)",fontSize:14,fontWeight:500},children:u.path}),u.deprecated&&s.jsx("span",{"data-testid":"deprecated-badge",style:{padding:"1px 6px",borderRadius:3,fontSize:10,fontWeight:700,background:"#f59e0b33",color:"#f59e0b",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Deprecated"}),u.tags.map(y=>s.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:10,background:"var(--bd)",color:"var(--txM)"},children:y},y)),s.jsx("span",{style:{flex:1}}),u.summary&&s.jsx("span",{style:{fontSize:13,color:"var(--tx2)",marginRight:8},children:u.summary}),C&&s.jsx("span",{style:{transform:E?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s",fontSize:12,color:"var(--txM)"},children:"▾"})]}),E&&s.jsxs("div",{style:{padding:"16px 18px",borderTop:"1px solid var(--bd)"},children:[u.description&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0,marginBottom:16},children:u.description}),u.parameters.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Parameters"}),s.jsx(jg,{parameters:u.parameters})]}),u.requestBody&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Request Body"}),s.jsx(Mg,{requestBody:u.requestBody})]}),u.responses.length>0&&s.jsxs("div",{style:{marginBottom:16},children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Responses"}),s.jsx(kg,{responses:u.responses})]}),s.jsxs("div",{children:[s.jsx("h4",{style:{fontSize:13,fontWeight:600,marginBottom:8,color:"var(--tx)"},children:"Code Examples"}),u.codeSamples&&u.codeSamples.length>0?s.jsx(mm,{samples:u.codeSamples}):s.jsx(Ug,{endpoint:u,baseUrl:h})]}),c&&s.jsx("div",{style:{marginTop:16},children:s.jsx(zg,{endpoint:u,baseUrl:h||"https://api.example.com",auth:v})})]})]})}function Ng({manifest:u,baseUrl:h,showPlayground:d,playgroundAuth:c}){const v=h||(u.servers.length>0?u.servers[0].url:"https://api.example.com"),E=new Map;for(const C of u.endpoints){const y=C.tags.length>0?C.tags[0]:"Other";E.has(y)||E.set(y,[]),E.get(y).push(C)}const A=[];for(const C of u.tags)E.has(C.name)&&A.push(C.name);for(const C of E.keys())A.includes(C)||A.push(C);const O=new Map;for(const C of u.tags)O.set(C.name,C.description);return s.jsxs("div",{style:{display:"flex",gap:32},children:[s.jsxs("nav",{"data-testid":"api-toc",style:{width:200,flexShrink:0,position:"sticky",top:24,alignSelf:"flex-start",maxHeight:"calc(100vh - 48px)",overflowY:"auto"},children:[s.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--txM)",marginBottom:12,letterSpacing:"0.05em"},children:"Endpoints"}),A.map(C=>{const y=C.toLowerCase().replace(/\s+/g,"-");return s.jsxs("div",{style:{marginBottom:14},children:[s.jsx("a",{href:`#${y}`,onClick:G=>{var R;G.preventDefault(),(R=document.getElementById(y))==null||R.scrollIntoView({behavior:"smooth",block:"start"})},style:{display:"block",fontSize:13,fontWeight:600,color:"var(--tx)",textDecoration:"none",marginBottom:4},children:C}),(E.get(C)||[]).map(G=>{const R=(G.operationId||`${G.method}-${G.path}`).toLowerCase().replace(/[^a-z0-9]+/g,"-");return s.jsxs("a",{href:`#${R}`,onClick:K=>{var nt;K.preventDefault(),(nt=document.getElementById(R))==null||nt.scrollIntoView({behavior:"smooth",block:"start"})},style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--tx2)",textDecoration:"none",padding:"3px 0"},children:[s.jsx("span",{style:{fontSize:9,fontWeight:700,fontFamily:"var(--font-code, monospace)",color:pm[G.method]||"#6b7280",width:36,textTransform:"uppercase"},children:G.method}),s.jsx("span",{style:{fontFamily:"var(--font-code, monospace)"},children:G.path})]},`${G.method}-${G.path}`)})]},C)})]}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{marginBottom:32},children:[s.jsx("h1",{style:{fontSize:28,fontWeight:700,marginBottom:4},children:u.title}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[s.jsxs("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,background:"var(--sf)",color:"var(--txM)"},children:["v",u.version]}),u.servers.length>0&&s.jsx("span",{style:{fontSize:12,fontFamily:"var(--font-code, monospace)",color:"var(--tx2)"},children:u.servers[0].url})]}),u.description&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0},children:u.description})]}),A.map(C=>s.jsxs("section",{id:C.toLowerCase().replace(/\s+/g,"-"),"data-testid":"tag-section",style:{marginBottom:40},children:[s.jsx("h2",{style:{fontSize:20,fontWeight:700,marginBottom:4},children:C}),O.get(C)&&s.jsx("p",{style:{fontSize:14,color:"var(--tx2)",lineHeight:1.65,marginTop:0,marginBottom:16},children:O.get(C)}),(E.get(C)||[]).map(y=>s.jsx(Hg,{endpoint:y,baseUrl:v,showPlayground:d,playgroundAuth:c},`${y.method}-${y.path}`))]},C))]})]})}function qg({href:u,title:h,description:d,icon:c,external:v}){const E=v??u.startsWith("http");return s.jsxs("a",{href:u,target:E?"_blank":void 0,rel:E?"noopener noreferrer":void 0,style:{display:"block",padding:"16px 20px",border:"1px solid var(--bd)",borderRadius:8,textDecoration:"none",color:"inherit",background:"var(--sf)",transition:"border-color 0.15s, background 0.15s",cursor:"pointer"},onMouseEnter:A=>{A.currentTarget.style.borderColor="var(--ac)",A.currentTarget.style.background="var(--sfH)"},onMouseLeave:A=>{A.currentTarget.style.borderColor="var(--bd)",A.currentTarget.style.background="var(--sf)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c&&s.jsx("span",{style:{fontSize:18},children:c}),s.jsx("span",{style:{fontWeight:600,fontSize:15,color:"var(--tx)"},children:h}),s.jsx("span",{style:{marginLeft:"auto",color:"var(--tx2)",fontSize:14},children:E?"↗":"→"})]}),d&&s.jsx("p",{style:{margin:"6px 0 0",fontSize:13,color:"var(--tx2)",lineHeight:1.5},children:d})]})}function Lg({columns:u=2,children:h}){return s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gap:12,marginTop:16,marginBottom:16},children:h})}const Gg={Added:"#22c55e",Changed:"#3b82f6",Deprecated:"#f59e0b",Removed:"#ef4444",Fixed:"#8b5cf6",Security:"#f97316"};function lm(u){return Gg[u]||"#6b7280"}function Yg({entries:u,initialLimit:h}){const[d,c]=w.useState(!h),v=d?u:u.slice(0,h||u.length);return u.length===0?s.jsx("div",{"data-testid":"changelog-empty",style:{padding:"40px 0",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No changelog entries found."}):s.jsxs("div",{"data-testid":"changelog-timeline",style:{position:"relative"},children:[s.jsx("div",{style:{position:"absolute",left:15,top:8,bottom:8,width:2,background:"var(--bd)"}}),v.map((E,A)=>s.jsxs("div",{"data-testid":`changelog-entry-${E.version}`,style:{position:"relative",paddingLeft:44,paddingBottom:As.jsxs("div",{style:{marginBottom:16},children:[s.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:6,marginBottom:8},children:[s.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:lm(O.type)}}),s.jsx("span",{style:{fontSize:12,fontWeight:600,textTransform:"uppercase",letterSpacing:".06em",color:lm(O.type),fontFamily:"var(--font-code, monospace)"},children:O.type})]}),s.jsx("ul",{style:{margin:0,paddingLeft:18,listStyleType:"disc",color:"var(--tx2)"},children:O.items.map((C,y)=>s.jsx("li",{style:{fontSize:14,lineHeight:1.7,color:"var(--tx2)",marginBottom:2},children:C},y))})]},O.type))]},E.version)),!d&&u.length>(h||0)&&s.jsx("div",{style:{textAlign:"center",marginTop:24},children:s.jsxs("button",{"data-testid":"changelog-show-more",onClick:()=>c(!0),style:{background:"none",border:"1px solid var(--bd)",borderRadius:2,padding:"8px 20px",color:"var(--tx2)",fontSize:13,fontFamily:"var(--font-body, inherit)",cursor:"pointer",transition:"border-color .15s, color .15s"},children:["Show all ",u.length," releases"]})})]})}const im={info:{color:"#3b82f6",label:"INFO"},warning:{color:"#f59e0b",label:"WARNING"},tip:{color:"var(--ac, #a78bfa)",label:"TIP"},danger:{color:"#ef4444",label:"DANGER"}};function Kg({type:u="info",title:h,children:d}){const c=im[u]||im.info;return s.jsxs("div",{style:{borderLeft:`3px solid ${c.color}`,background:`${c.color}11`,borderRadius:"0 2px 2px 0",padding:"14px 18px",marginBottom:20},children:[h?s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[s.jsx("span",{style:{fontWeight:700,fontSize:10,letterSpacing:".08em",color:c.color,fontFamily:"var(--font-code, monospace)"},children:c.label}),s.jsx("span",{style:{fontWeight:600,fontSize:13,color:c.color},children:h})]}):s.jsx("div",{style:{marginBottom:4},children:s.jsx("span",{style:{fontWeight:700,fontSize:10,letterSpacing:".08em",color:c.color,fontFamily:"var(--font-code, monospace)"},children:c.label})}),s.jsx("div",{style:{fontSize:14,lineHeight:1.65,color:"var(--tx2)"},children:d})]})}function Xg({items:u,children:h}){const[d,c]=w.useState(0);return s.jsxs("div",{style:{marginBottom:20},children:[s.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--bd)"},children:u.map((v,E)=>s.jsx("button",{onClick:()=>c(E),style:{padding:"8px 16px",background:"none",border:"none",borderBottom:d===E?"2px solid var(--ac)":"2px solid transparent",color:d===E?"var(--ac)":"var(--txM)",fontWeight:d===E?600:400,fontSize:13,cursor:"pointer",fontFamily:"inherit"},children:v},E))}),s.jsx("div",{style:{padding:"16px 0"},children:h[d]})]})}function Qg({title:u,icon:h,href:d,children:c}){const v=s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,padding:"20px",transition:"border-color 0.15s",cursor:d?"pointer":"default"},children:[h&&s.jsx("span",{style:{fontSize:24,marginBottom:8,display:"block"},children:h}),s.jsx("div",{style:{fontWeight:600,fontSize:14,marginBottom:4},children:u}),c&&s.jsx("div",{style:{fontSize:13,color:"var(--txM)",lineHeight:1.5},children:c})]});return d?s.jsx("a",{href:d,style:{textDecoration:"none",color:"inherit"},children:v}):v}function Vg({cols:u=2,children:h}){return s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gap:12,marginBottom:20},children:h})}function Zg({children:u}){return s.jsx("div",{style:{paddingLeft:24,borderLeft:"2px solid var(--bd)",marginBottom:20},children:sm.Children.map(u,(h,d)=>s.jsxs("div",{style:{position:"relative",paddingBottom:20},children:[s.jsx("div",{style:{position:"absolute",left:-33,top:0,width:20,height:20,borderRadius:"50%",background:"var(--ac)",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700},children:d+1}),s.jsx("div",{style:{paddingLeft:8},children:h})]}))})}function Jg({title:u,children:h}){const[d,c]=w.useState(!1);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,marginBottom:8,overflow:"hidden"},children:[s.jsxs("button",{onClick:()=>c(!d),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px 16px",background:"var(--sf)",border:"none",cursor:"pointer",fontWeight:500,fontSize:14,color:"var(--tx)",fontFamily:"inherit"},children:[u,s.jsx("span",{style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s"},children:"▾"})]}),d&&s.jsx("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--bd)",fontSize:14,color:"var(--tx2)",lineHeight:1.65},children:h})]})}const Wg={install:{npm:"npm install",yarn:"yarn add",pnpm:"pnpm add",bun:"bun add"},"install -D":{npm:"npm install -D",yarn:"yarn add -D",pnpm:"pnpm add -D",bun:"bun add -d"},uninstall:{npm:"npm uninstall",yarn:"yarn remove",pnpm:"pnpm remove",bun:"bun remove"},run:{npm:"npm run",yarn:"yarn",pnpm:"pnpm",bun:"bun run"},exec:{npm:"npx",yarn:"yarn dlx",pnpm:"pnpm dlx",bun:"bunx"},init:{npm:"npm init",yarn:"yarn init",pnpm:"pnpm init",bun:"bun init"},create:{npm:"npm create",yarn:"yarn create",pnpm:"pnpm create",bun:"bun create"}};function Fg(u,h){for(const[d,c]of Object.entries(Wg))if(u.startsWith(d+" ")||u===d){const v=u.slice(d.length);return(c[h]||d)+v}return`${h} ${u}`}function $g({command:u}){const[h,d]=w.useState(0),[c,v]=w.useState(!1),E=["npm","yarn","pnpm","bun"],A=Fg(u,E[h]);return s.jsxs("div",{style:{border:"1px solid var(--bd)",borderRadius:2,marginBottom:16,overflow:"hidden"},children:[s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--bd)",background:"var(--sf)",overflowX:"auto"},children:E.map((O,C)=>s.jsx("button",{onClick:()=>{d(C),v(!1)},style:{padding:"8px 14px",background:"none",border:"none",cursor:"pointer",fontSize:12,fontFamily:"var(--font-code)",fontWeight:C===h?600:400,color:C===h?"var(--ac)":"var(--txM)",borderBottom:C===h?"2px solid var(--ac)":"2px solid transparent",whiteSpace:"nowrap"},children:O},O))}),s.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"10px 14px",background:"var(--cdBg)",gap:8},children:[s.jsx("code",{style:{flex:1,fontFamily:"var(--font-code)",fontSize:13,color:"var(--cdTx)",whiteSpace:"pre",overflowX:"auto"},children:A}),s.jsx("button",{onClick:()=>{var O;(O=navigator.clipboard)==null||O.writeText(A),v(!0),setTimeout(()=>v(!1),2e3)},style:{background:"none",border:"none",cursor:"pointer",color:"var(--txM)",fontSize:12,fontFamily:"var(--font-code)",flexShrink:0},children:c?"✓":"Copy"})]})]})}function Ig({name:u,fields:h}){return s.jsxs("div",{style:{marginBottom:16},children:[u&&s.jsx("h4",{style:{fontFamily:"var(--font-code)",fontSize:15,marginBottom:8,color:"var(--tx)"},children:u}),s.jsx("div",{style:{overflowX:"auto",WebkitOverflowScrolling:"touch"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,fontFamily:"var(--font-body)"},children:[s.jsx("thead",{children:s.jsx("tr",{style:{borderBottom:"2px solid var(--bd)"},children:["Property","Type","Required","Default","Description"].map(d=>s.jsx("th",{style:{textAlign:"left",padding:"8px 10px",color:"var(--txM)",fontWeight:600,fontSize:11,textTransform:"uppercase",letterSpacing:".05em",whiteSpace:"nowrap"},children:d},d))})}),s.jsx("tbody",{children:h.map(d=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--bd)"},children:[s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontWeight:500,color:"var(--tx)"},children:d.name}),s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontSize:12,color:"var(--ac)"},children:d.type}),s.jsx("td",{style:{padding:"8px 10px"},children:d.required&&s.jsx("span",{style:{fontSize:10,fontWeight:600,color:"#e04040",background:"rgba(224,64,64,0.1)",padding:"2px 6px",borderRadius:2},children:"required"})}),s.jsx("td",{style:{padding:"8px 10px",fontFamily:"var(--font-code)",fontSize:12,color:"var(--txM)"},children:d.default||"—"}),s.jsx("td",{style:{padding:"8px 10px",color:"var(--tx2)"},children:d.description||""})]},d.name))})]})})]})}function Pg({name:u}){return s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0",fontFamily:"var(--font-code)",fontSize:13,color:"var(--tx2)"},children:[s.jsx("span",{style:{opacity:.6},children:"📄"})," ",u]})}function t0({name:u,defaultOpen:h,children:d}){const[c,v]=w.useState(h??!1);return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>v(!c),style:{display:"flex",alignItems:"center",gap:6,padding:"3px 0",background:"none",border:"none",cursor:"pointer",fontFamily:"var(--font-code)",fontSize:13,color:"var(--tx)",fontWeight:500},children:[s.jsx("span",{children:c?"📂":"📁"})," ",u]}),c&&s.jsx("div",{style:{paddingLeft:18,borderLeft:"1px solid var(--bd)",marginLeft:8},children:d})]})}function Iu({children:u}){return s.jsx("div",{style:{border:"1px solid var(--bd)",borderRadius:2,padding:"12px 16px",background:"var(--cdBg)",marginBottom:16},children:u})}Iu.File=Pg;Iu.Folder=t0;const e0={Callout:Kg,Tabs:Xg,Card:Qg,CardGroup:Vg,Steps:Zg,Accordion:Jg,ChangelogTimeline:Yg,PackageManager:$g,TypeTable:Ig,FileTree:Iu,CodeSamples:mm,LinkCard:qg,CardGrid:Lg},n0=` @import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Bricolage+Grotesque:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,700&family=Fira+Code:wght@400;500;600&family=Bodoni+Moda:ital,wght@0,400;0,700;0,900;1,400&family=Space+Grotesk:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap'); html, body { margin: 0; padding: 0; height: 100%; overflow: clip; } @@ -1308,4 +1308,4 @@ ${c.join(` border-color: var(--bd); box-shadow: 0 4px 12px rgba(0,0,0,0.3); } -`,_o=(Jn.basePath||"/").replace(/\/$/,"");function ag(u){return cm(u,_o,Wn)}function Wu(u){return f0(u,_o,Wn)}const hm=h0(window.location.pathname,window.location.hash,Wn,_o,cm),lg=fm(hm,Wn,dm);function ig(){var W,I,ct,Q;const[u,h]=w.useState(hm),[d,c]=w.useState(null),[v,E]=w.useState(!0),A=w.useRef(0),O=w.useCallback(async(Y,H)=>{const U=++A.current;E(!0);let at;try{at=await fm(Y,Wn,dm)}catch(P){if(A.current!==U)return;console.error(`[tome] Navigation failed for page: ${Y}`,P),at=null}if(A.current!==U)return;const lt=Wu(Y);if(H!=null&&H.replace?window.history.replaceState(null,"",lt):window.history.pushState(null,"",lt),h(Y),c(at),E(!1),!(H!=null&&H.skipScroll)){const P=window.location.hash.slice(1);P?requestAnimationFrame(()=>{const mt=document.getElementById(P);mt&&mt.scrollIntoView({behavior:"smooth",block:"start"})}):window.scrollTo(0,0)}},[]);w.useEffect(()=>{const Y=window.location.hash.slice(1);if(Y&&Wn.some(H=>H.id===Y)){const H=Wu(Y);window.history.replaceState(null,"",H),O(Y,{replace:!0})}else{const H=Wu(u);window.history.replaceState(null,"",H),lg.then(U=>{c(U),E(!1)})}},[]),w.useEffect(()=>{const Y=()=>{const H=ag(window.location.pathname);H&&H!==u&&O(H,{replace:!0,skipScroll:!0})};return window.addEventListener("popstate",Y),()=>window.removeEventListener("popstate",Y)},[u,O]);const C=w.useRef(null),[y,G]=w.useState(()=>{var H,U;if(typeof document>"u")return"light";if(document.documentElement.classList.contains("dark"))return"dark";const Y=((H=Jn.theme)==null?void 0:H.mode)||"auto";return Y==="dark"?"dark":Y==="light"?"light":(U=window.matchMedia)!=null&&U.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"});w.useEffect(()=>{const Y=new MutationObserver(()=>{const H=document.documentElement.classList.contains("dark");G(H?"dark":"light")});return Y.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>Y.disconnect()},[]),w.useEffect(()=>{const Y=document.querySelectorAll(".tome-mermaid[data-mermaid]");if(Y.length===0)return;let H=!1;const U="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";return(async()=>{try{C.current||(C.current=(await import(U)).default);const at=C.current;if(H)return;const lt=y==="dark",P=getComputedStyle(document.documentElement).getPropertyValue("--font-body").trim()||"sans-serif";at.initialize({startOnLoad:!1,theme:lt?"dark":"default",fontFamily:P,flowchart:{padding:15,nodeSpacing:30,rankSpacing:40}});for(let mt=0;mt{lt.textContent="Failed to load diagram renderer",lt.style.cssText="padding:16px;color:var(--txM);font-size:13px;border:1px dashed var(--bd);border-radius:2px;text-align:center;"})}})(),()=>{H=!0}},[d,v,y]),w.useEffect(()=>{if(v)return;const Y=document.querySelectorAll(".tome-content pre"),H=[];return Y.forEach(U=>{if(U.querySelector(".tome-copy-btn"))return;const at=document.createElement("button");at.className="tome-copy-btn",at.textContent="Copy",at.addEventListener("click",async()=>{const lt=U.querySelector("code");if(lt)try{await navigator.clipboard.writeText(lt.textContent||""),at.textContent="Copied!",setTimeout(()=>{at.textContent="Copy"},2e3)}catch{at.textContent="Failed",setTimeout(()=>{at.textContent="Copy"},2e3)}}),U.appendChild(at),H.push(at)}),()=>{H.forEach(U=>U.remove())}},[d,v]);const R=Wn.map(Y=>({id:Y.id,title:Y.frontmatter.title,description:Y.frontmatter.description})),K=Wn.find(Y=>Y.id===u),nt=g0(K),xt=p0(Jn.editLink,K==null?void 0:K.filePath),Dt=(K==null?void 0:K.locale)||(Zu==null?void 0:Zu.defaultLocale)||"en",Mt="ltr";return w.useEffect(()=>{const Y=document.querySelectorAll(".tome-math[data-math]").length>0;if(!Jn.math&&!Y)return;const H="tome-katex-css";if(document.getElementById(H))return;const U=document.createElement("link");U.id=H,U.rel="stylesheet",U.href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css",U.crossOrigin="anonymous",document.head.appendChild(U)},[d,v]),w.useEffect(()=>{const Y=document.querySelectorAll(".tome-math[data-math]");if(Y.length===0)return;let H=!1;const U="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.mjs";return(async()=>{try{const at=(await import(U)).default;if(H)return;for(const lt of Y){const P=lt.getAttribute("data-math");if(P)try{const mt=atob(P),tt=lt.classList.contains("tome-math-block");at.render(mt,lt,{displayMode:tt,throwOnError:!1})}catch(mt){console.warn("[tome] KaTeX render failed:",mt)}}}catch(at){console.warn("[tome] Failed to load KaTeX from CDN:",at)}})(),()=>{H=!0}},[d,v]),s.jsxs(s.Fragment,{children:[s.jsx("style",{children:ng}),s.jsx(r0,{config:Jn,navigation:v0,currentPageId:u,pageHtml:d!=null&&d.isMdx?void 0:v?"":(d==null?void 0:d.html)||"

Page not found

",pageComponent:d!=null&&d.isMdx?d.component:void 0,mdxComponents:eg,pageTitle:(d==null?void 0:d.frontmatter.title)||(v?"":"Not Found"),pageDescription:d==null?void 0:d.frontmatter.description,headings:(d==null?void 0:d.headings)||[],tocEnabled:(d==null?void 0:d.frontmatter.toc)!==!1,editUrl:xt,lastUpdated:K==null?void 0:K.lastUpdated,changelogEntries:d!=null&&d.isMdx||d==null?void 0:d.changelogEntries,apiManifest:!(d!=null&&d.isMdx)&&(d!=null&&d.isApiReference)?d.apiManifest:void 0,apiBaseUrl:(W=Jn.api)==null?void 0:W.baseUrl,apiPlayground:(I=Jn.api)==null?void 0:I.playground,apiAuth:(ct=Jn.api)==null?void 0:ct.auth,ApiReferenceComponent:N0,onNavigate:O,allPages:R,docContext:b0,versioning:void 0,currentVersion:nt,basePath:_o,isDraft:((Q=K==null?void 0:K.frontmatter)==null?void 0:Q.draft)===!0,dir:Mt,i18n:void 0,currentLocale:Dt,overrides:x0})]})}const om=document.getElementById("tome-root");om&&Bh.createRoot(om).render(s.jsx(ig,{})); +`,_o=(Jn.basePath||"/").replace(/\/$/,"");function a0(u){return cm(u,_o,Wn)}function Wu(u){return fg(u,_o,Wn)}const hm=hg(window.location.pathname,window.location.hash,Wn,_o,cm),l0=fm(hm,Wn,dm);function i0(){var W,I,ct,Q;const[u,h]=w.useState(hm),[d,c]=w.useState(null),[v,E]=w.useState(!0),A=w.useRef(0),O=w.useCallback(async(Y,H)=>{const U=++A.current;E(!0);let at;try{at=await fm(Y,Wn,dm)}catch(P){if(A.current!==U)return;console.error(`[tome] Navigation failed for page: ${Y}`,P),at=null}if(A.current!==U)return;const lt=Wu(Y);if(H!=null&&H.replace?window.history.replaceState(null,"",lt):window.history.pushState(null,"",lt),h(Y),c(at),E(!1),!(H!=null&&H.skipScroll)){const P=window.location.hash.slice(1);P?requestAnimationFrame(()=>{const mt=document.getElementById(P);mt&&mt.scrollIntoView({behavior:"smooth",block:"start"})}):window.scrollTo(0,0)}},[]);w.useEffect(()=>{const Y=window.location.hash.slice(1);if(Y&&Wn.some(H=>H.id===Y)){const H=Wu(Y);window.history.replaceState(null,"",H),O(Y,{replace:!0})}else{const H=Wu(u);window.history.replaceState(null,"",H),l0.then(U=>{c(U),E(!1)})}},[]),w.useEffect(()=>{const Y=()=>{const H=a0(window.location.pathname);H&&H!==u&&O(H,{replace:!0,skipScroll:!0})};return window.addEventListener("popstate",Y),()=>window.removeEventListener("popstate",Y)},[u,O]);const C=w.useRef(null),[y,G]=w.useState(()=>{var H,U;if(typeof document>"u")return"light";if(document.documentElement.classList.contains("dark"))return"dark";const Y=((H=Jn.theme)==null?void 0:H.mode)||"auto";return Y==="dark"?"dark":Y==="light"?"light":(U=window.matchMedia)!=null&&U.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"});w.useEffect(()=>{const Y=new MutationObserver(()=>{const H=document.documentElement.classList.contains("dark");G(H?"dark":"light")});return Y.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>Y.disconnect()},[]),w.useEffect(()=>{const Y=document.querySelectorAll(".tome-mermaid[data-mermaid]");if(Y.length===0)return;let H=!1;const U="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";return(async()=>{try{C.current||(C.current=(await import(U)).default);const at=C.current;if(H)return;const lt=y==="dark",P=getComputedStyle(document.documentElement).getPropertyValue("--font-body").trim()||"sans-serif";at.initialize({startOnLoad:!1,theme:lt?"dark":"default",fontFamily:P,flowchart:{padding:15,nodeSpacing:30,rankSpacing:40}});for(let mt=0;mt{lt.textContent="Failed to load diagram renderer",lt.style.cssText="padding:16px;color:var(--txM);font-size:13px;border:1px dashed var(--bd);border-radius:2px;text-align:center;"})}})(),()=>{H=!0}},[d,v,y]),w.useEffect(()=>{if(v)return;const Y=document.querySelectorAll(".tome-content pre"),H=[];return Y.forEach(U=>{if(U.querySelector(".tome-copy-btn"))return;const at=document.createElement("button");at.className="tome-copy-btn",at.textContent="Copy",at.addEventListener("click",async()=>{const lt=U.querySelector("code");if(lt)try{await navigator.clipboard.writeText(lt.textContent||""),at.textContent="Copied!",setTimeout(()=>{at.textContent="Copy"},2e3)}catch{at.textContent="Failed",setTimeout(()=>{at.textContent="Copy"},2e3)}}),U.appendChild(at),H.push(at)}),()=>{H.forEach(U=>U.remove())}},[d,v]);const R=Wn.map(Y=>({id:Y.id,title:Y.frontmatter.title,description:Y.frontmatter.description})),K=Wn.find(Y=>Y.id===u),nt=gg(K),xt=pg(Jn.editLink,K==null?void 0:K.filePath),Dt=(K==null?void 0:K.locale)||(Zu==null?void 0:Zu.defaultLocale)||"en",Mt="ltr";return w.useEffect(()=>{const Y=document.querySelectorAll(".tome-math[data-math]").length>0;if(!Jn.math&&!Y)return;const H="tome-katex-css";if(document.getElementById(H))return;const U=document.createElement("link");U.id=H,U.rel="stylesheet",U.href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css",U.crossOrigin="anonymous",document.head.appendChild(U)},[d,v]),w.useEffect(()=>{const Y=document.querySelectorAll(".tome-math[data-math]");if(Y.length===0)return;let H=!1;const U="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.mjs";return(async()=>{try{const at=(await import(U)).default;if(H)return;for(const lt of Y){const P=lt.getAttribute("data-math");if(P)try{const mt=atob(P),tt=lt.classList.contains("tome-math-block");at.render(mt,lt,{displayMode:tt,throwOnError:!1})}catch(mt){console.warn("[tome] KaTeX render failed:",mt)}}}catch(at){console.warn("[tome] Failed to load KaTeX from CDN:",at)}})(),()=>{H=!0}},[d,v]),s.jsxs(s.Fragment,{children:[s.jsx("style",{children:n0}),s.jsx(rg,{config:Jn,navigation:vg,currentPageId:u,pageHtml:d!=null&&d.isMdx?void 0:v?"":(d==null?void 0:d.html)||"

Page not found

",pageComponent:d!=null&&d.isMdx?d.component:void 0,mdxComponents:e0,pageTitle:(d==null?void 0:d.frontmatter.title)||(v?"":"Not Found"),pageDescription:d==null?void 0:d.frontmatter.description,headings:(d==null?void 0:d.headings)||[],tocEnabled:(d==null?void 0:d.frontmatter.toc)!==!1,editUrl:xt,lastUpdated:K==null?void 0:K.lastUpdated,changelogEntries:d!=null&&d.isMdx||d==null?void 0:d.changelogEntries,apiManifest:!(d!=null&&d.isMdx)&&(d!=null&&d.isApiReference)?d.apiManifest:void 0,apiBaseUrl:(W=Jn.api)==null?void 0:W.baseUrl,apiPlayground:(I=Jn.api)==null?void 0:I.playground,apiAuth:(ct=Jn.api)==null?void 0:ct.auth,ApiReferenceComponent:Ng,onNavigate:O,allPages:R,docContext:bg,versioning:void 0,currentVersion:nt,basePath:_o,isDraft:((Q=K==null?void 0:K.frontmatter)==null?void 0:Q.draft)===!0,dir:Mt,i18n:void 0,currentLocale:Dt,overrides:xg})]})}const om=document.getElementById("tome-root");om&&Bh.createRoot(om).render(s.jsx(i0,{})); diff --git a/cli/commands/index.html b/cli/commands/index.html index 1dc91fb9..44f6b358 100644 --- a/cli/commands/index.html +++ b/cli/commands/index.html @@ -7,7 +7,7 @@ - + diff --git a/cli/flags/index.html b/cli/flags/index.html index 34cbcc34..11b3a06b 100644 --- a/cli/flags/index.html +++ b/cli/flags/index.html @@ -7,7 +7,7 @@ - + diff --git a/configuration/index.html b/configuration/index.html index 94d4a493..7a687093 100644 --- a/configuration/index.html +++ b/configuration/index.html @@ -7,7 +7,7 @@ - + diff --git a/development/index.html b/development/index.html index 0658f958..6a408288 100644 --- a/development/index.html +++ b/development/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/capabilities/index.html b/extensions/capabilities/index.html index 514b2121..1a5a00d7 100644 --- a/extensions/capabilities/index.html +++ b/extensions/capabilities/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/examples/index.html b/extensions/examples/index.html index 67286596..fbee99e3 100644 --- a/extensions/examples/index.html +++ b/extensions/examples/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/loading/index.html b/extensions/loading/index.html index a5ca43f4..368041c7 100644 --- a/extensions/loading/index.html +++ b/extensions/loading/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/overview/index.html b/extensions/overview/index.html index 39461092..69e8a530 100644 --- a/extensions/overview/index.html +++ b/extensions/overview/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/testing/index.html b/extensions/testing/index.html index 9259d54b..0f71ce23 100644 --- a/extensions/testing/index.html +++ b/extensions/testing/index.html @@ -7,7 +7,7 @@ - + diff --git a/index.html b/index.html index 4b8ccb29..767efd25 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; } - + diff --git a/installation/index.html b/installation/index.html index 0c0fd516..1042cb20 100644 --- a/installation/index.html +++ b/installation/index.html @@ -7,7 +7,7 @@ - + diff --git a/providers/index.html b/providers/index.html index 4b0949f5..254d11f5 100644 --- a/providers/index.html +++ b/providers/index.html @@ -7,7 +7,7 @@ - + diff --git a/quick-start/index.html b/quick-start/index.html index a1f360be..4e399665 100644 --- a/quick-start/index.html +++ b/quick-start/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/callbacks/index.html b/sdk/callbacks/index.html index 32c55b57..08088418 100644 --- a/sdk/callbacks/index.html +++ b/sdk/callbacks/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/options/index.html b/sdk/options/index.html index 1947f382..f1eab970 100644 --- a/sdk/options/index.html +++ b/sdk/options/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/overview/index.html b/sdk/overview/index.html index e5e355c5..48ce6167 100644 --- a/sdk/overview/index.html +++ b/sdk/overview/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/sessions/index.html b/sdk/sessions/index.html index 6b456f65..924d5f8f 100644 --- a/sdk/sessions/index.html +++ b/sdk/sessions/index.html @@ -7,7 +7,7 @@ - + diff --git a/sessions/index.html b/sessions/index.html index 3930847c..a41beaa6 100644 --- a/sessions/index.html +++ b/sessions/index.html @@ -7,7 +7,7 @@ - + diff --git a/themes/index.html b/themes/index.html index f56dd253..26184fd8 100644 --- a/themes/index.html +++ b/themes/index.html @@ -7,7 +7,7 @@ - +