import{s as e}from"./rolldown-runtime-Bjp52BOI.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{Lr as t,dr as n,ur as r}from"./initial-vendor-CbfHqnih.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{i}from"./clsx-Chpd8_tJ.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{a,i as o}from"./dist-CdcB7h9h.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{B as s,D as c,G as l,H as u,J as d,L as f,V as p,W as m,Y as h,bn as g,ct as _,lt as v,un as y,z as b}from"./index-DiVFqI9q.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";import{r as x,t as S}from"./AssistantPageLink-D4Q3xuF7.js?dpl=dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ";/* empty css */var C=e(r()),w=({className:e,children:t,codeBlockTheme:n,...r})=>{let i=s(t,e),a=b({codeString:i,codeBlockTheme:n,className:e,opts:{structure:`inline`}});return a?(0,C.jsx)(`code`,{...r,dangerouslySetInnerHTML:{__html:a}}):(0,C.jsx)(`code`,{...r,className:e,children:t})},T=({markdownLinks:e,handleClose:t})=>{let{threadId:n}=x(),r=g(`docs.assistant.suggestion_click`),i=e.split(` `).map(e=>{let t=e.match(/\(([^)]*)\)\[([^\]]*)\]/);if(t&&t[1]&&t[2])return{text:t[1],url:t[2],threadId:n}}).filter(e=>e!==void 0);return(0,C.jsx)(`div`,{className:`flex flex-col gap-3 not-prose`,children:i.map(e=>(0,C.jsx)(S,{href:e.url,onInternalLinkClick:t,onClick:()=>{r({text:e.text,url:e.url}).catch(console.error)},title:e.text},e.url))})},E=e(t(),1),D={...i,protocols:{...i.protocols,href:[...i.protocols?.href??[],`tel`,`sms`]}},O=Array.isArray(o.sanitize)?o.sanitize[0]:o.sanitize,k=[o.raw,o.katex,[O,D],o.harden];function A({children:e,className:t,components:r,showCopyButton:i=!1,onInternalLinkClick:o,...s}){let g=d(),b=h(),x=(0,E.useMemo)(()=>({a:e=>(0,C.jsx)(v,{...e,onInternalLinkClick:o}),input:({"aria-label":e,checked:t,node:n,type:r,...i})=>(0,C.jsx)(`input`,{...i,"aria-label":e??(r===`checkbox`?t?`Completed task`:`Incomplete task`:void 0),checked:t,type:r}),p:({children:e})=>(0,C.jsx)(`p`,{className:`whitespace-pre-line`,children:e}),pre:({children:e,...t})=>{if(typeof e==`object`&&e&&`props`in e&&typeof e.props==`object`&&e.props!==null&&`className`in e.props&&e.props.className===`language-suggestions`)return e;let r=_(e);return(0,C.jsxs)(`div`,{className:`relative`,children:[(0,C.jsx)(`pre`,{...t,className:n(y,`p-0 overflow-visible text-sm rounded-xl`,g===`system`&&`text-gray-950 bg-white codeblock-light dark:codeblock-dark dark:bg-codeblock dark:text-gray-50 border border-gray-200/70 dark:border-white/[0.14]`,g===`dark`&&`text-gray-50 bg-[#0F1117] dark:codeblock-dark dark:bg-codeblock border border-transparent dark:border-white/[0.14] codeblock-dark`,t.className),children:(0,C.jsxs)(p,{className:`rounded-[inherit]`,children:[(0,C.jsx)(l,{className:`p-3 overflow-y-hidden!`,children:(0,C.jsx)(u,{children:e})}),(0,C.jsx)(m,{orientation:`horizontal`})]})}),i&&(0,C.jsx)(`div`,{className:`absolute top-2 right-2 z-20`,children:(0,C.jsx)(f,{textToCopy:r,showTooltip:!1})})]})},code:({children:e,...t})=>{if(`className`in t){let n=/language-(\w+)/.exec(t.className||``);if((n?n[1]:void 0)===`suggestions`&&typeof e==`string`)return(0,C.jsx)(T,{markdownLinks:e,handleClose:o})}return(0,C.jsx)(w,{suppressHydrationWarning:!0,codeBlockTheme:b,...t,children:e})},table:c,...r}),[r,o,i,g,b]);return(0,C.jsx)(a,{components:x,className:t,rehypePlugins:k,...s,children:e})}var j=`text-base font-medium`,M={h1:({children:e})=>(0,C.jsx)(`h1`,{className:j,children:e}),h2:({children:e})=>(0,C.jsx)(`h2`,{className:j,children:e}),h3:({children:e})=>(0,C.jsx)(`h3`,{className:j,children:e}),h4:({children:e})=>(0,C.jsx)(`h4`,{className:j,children:e}),h5:({children:e})=>(0,C.jsx)(`h5`,{className:j,children:e}),h6:({children:e})=>(0,C.jsx)(`h6`,{className:j,children:e})},N=({children:e,className:t,...n})=>(0,C.jsx)(A,{components:M,className:t,...n,children:e});export{A as Markdown,N as MarkdownWithoutHeaders};