"}),"): use regular link syntax instead (",(0,o.jsx)(n.code,{children:"[http://localhost:3000](http://localhost:3000)"}),")"]}),"\n",(0,o.jsxs)(n.li,{children:["HTML syntax (",(0,o.jsx)(n.code,{children:''}),"): use JSX instead (",(0,o.jsx)(n.code,{children:"
"}),")"]}),"\n",(0,o.jsxs)(n.li,{children:["Unescaped ",(0,o.jsx)(n.code,{children:"{"})," and ",(0,o.jsx)(n.code,{children:"<"}),": escape them with ",(0,o.jsx)(n.code,{children:"\\"})," instead (",(0,o.jsx)(n.code,{children:"\\{"})," and ",(0,o.jsx)(n.code,{children:"\\<"}),")"]}),"\n"]}),"\n",(0,o.jsxs)(n.admonition,{title:"Experimental CommonMark support",type:"danger",children:[(0,o.jsxs)(n.p,{children:["Docusaurus v3 makes it possible to opt-in for a less strict, standard ",(0,o.jsx)(n.a,{href:"https://commonmark.org/",children:"CommonMark"})," support with the following options:"]}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.code,{children:"mdx.format: md"})," front matter"]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.code,{children:".md"})," file extension combined with the ",(0,o.jsx)(n.code,{children:'siteConfig.markdown.format: "detect"'})," configuration"]}),"\n"]}),(0,o.jsxs)(n.p,{children:["This feature is ",(0,o.jsx)(n.strong,{children:"experimental"})," and currently has a few ",(0,o.jsx)(n.a,{href:"https://github.com/facebook/docusaurus/issues/9092",children:"limitations"}),"."]})]}),"\n",(0,o.jsx)(n.h2,{id:"importing-code-snippets",children:"Importing code snippets"}),"\n",(0,o.jsxs)(n.p,{children:["You can not only import a file containing a component definition, but also import any code file as raw text, and then insert it in a code block, thanks to ",(0,o.jsx)(n.a,{href:"https://webpack.js.org/loaders/raw-loader/",children:"Webpack raw-loader"}),". In order to use ",(0,o.jsx)(n.code,{children:"raw-loader"}),", you first need to install it in your project:"]}),"\n",(0,o.jsxs)(a.Z,{groupId:"npm2yarn",children:[(0,o.jsx)(l.Z,{value:"npm",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"npm install --save raw-loader\n"})})}),(0,o.jsx)(l.Z,{value:"yarn",label:"Yarn",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"yarn add raw-loader\n"})})}),(0,o.jsx)(l.Z,{value:"pnpm",label:"pnpm",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"pnpm add raw-loader\n"})})}),(0,o.jsx)(l.Z,{value:"bun",label:"Bun",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"bun add raw-loader\n"})})})]}),"\n",(0,o.jsx)(n.p,{children:"Now you can import code snippets from another file as it is:"}),"\n","\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-jsx",metastring:'title="myMarkdownFile.mdx"',children:"import CodeBlock from '@theme/CodeBlock';\nimport MyComponentSource from '!!raw-loader!./myComponent';\n\n{MyComponentSource}\n"})}),"\n","\n",(0,o.jsx)(i.Z,{children:(0,o.jsx)(c.Z,{language:"jsx",children:d.Z})}),"\n",(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/markdown-features/code-blocks#usage-in-jsx",children:"using code blocks in JSX"})," for more details of the ",(0,o.jsx)(n.code,{children:""})," component."]}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["You have to use ",(0,o.jsx)(n.code,{children:""})," rather than the Markdown triple-backtick ",(0,o.jsx)(n.code,{children:"```"}),", because the latter will ship out any of its content as-is, but you want to interpolate the imported text here."]})}),"\n",(0,o.jsx)(n.admonition,{type:"warning",children:(0,o.jsx)(n.p,{children:"This feature is experimental and might be subject to breaking API changes in the future."})}),"\n",(0,o.jsx)(n.h2,{id:"importing-markdown",children:"Importing Markdown"}),"\n",(0,o.jsxs)(n.p,{children:["You can use Markdown files as components and import them elsewhere, either in Markdown files or in React pages. Each MDX file default-exports its page content as a React component. In the ",(0,o.jsx)(n.code,{children:"import"})," statement, you can default-import this component with any name, but it must be capitalized following React's naming rules."]}),"\n",(0,o.jsxs)(n.p,{children:["By convention, using the ",(0,o.jsxs)(n.strong,{children:[(0,o.jsx)(n.code,{children:"_"})," filename prefix"]})," will not create any doc page and means the Markdown file is a ",(0,o.jsx)(n.strong,{children:'"partial"'}),", to be imported by other files."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-md",metastring:'title="_markdown-partial-example.mdx"',children:"Hello {props.name}\n\nThis is text some content from `_markdown-partial-example.mdx`.\n"})}),"\n","\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-jsx",metastring:'title="someOtherDoc.mdx"',children:"import PartialExample from './_markdown-partial-example.mdx';\n\n\n"})}),"\n","\n",(0,o.jsx)(i.Z,{children:(0,o.jsx)(h,{name:"Sebastien"})}),"\n",(0,o.jsx)(n.p,{children:"This way, you can reuse content among multiple pages and avoid duplicating materials."}),"\n",(0,o.jsx)(n.h2,{id:"available-exports",children:"Available exports"}),"\n",(0,o.jsx)(n.p,{children:"Within the MDX page, the following variables are available as globals:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"frontMatter"}),": the front matter as a record of string keys and values;"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"toc"}),": the table of contents, as a tree of headings. See also ",(0,o.jsx)(n.a,{href:"/docs/markdown-features/toc#inline-table-of-contents",children:"Inline TOC"})," for a more concrete use-case."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"contentTitle"}),": the Markdown title, which is the first ",(0,o.jsx)(n.code,{children:"h1"})," heading in the Markdown text. It's ",(0,o.jsx)(n.code,{children:"undefined"})," if there isn't one (e.g. title specified in the front matter)."]}),"\n"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-jsx",children:"import TOCInline from '@theme/TOCInline';\nimport CodeBlock from '@theme/CodeBlock';\n\nThe table of contents for this page, serialized:\n\n{JSON.stringify(toc, null, 2)}\n\nThe front matter of this page:\n\n\n {Object.entries(frontMatter).map(([key, value]) => - {key}: {value}
)}\n
\n\nThe title of this page is: {contentTitle}
\n"})}),"\n","\n",(0,o.jsxs)(i.Z,{children:[(0,o.jsx)(n.p,{children:"The table of contents for this page, serialized:"}),(0,o.jsx)(c.Z,{className:"language-json",children:JSON.stringify(g,null,2)}),(0,o.jsx)(n.p,{children:"The front matter of this page:"}),(0,o.jsx)("ul",{children:Object.entries(m).map(([e,n])=>(0,o.jsxs)("li",{children:[(0,o.jsx)("b",{children:e}),": ",n]},e))}),(0,o.jsxs)("p",{children:["The title of this page is: ",(0,o.jsx)("b",{children:p})]})]})]})}function b(e={}){let{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(j,{...e})}):j(e)}},78596:function(e,n,t){t.d(n,{Z:()=>s});var r=t(85893);t(67294);var o=t(89477);function s(e){let{toc:n,minHeadingLevel:t,maxHeadingLevel:s}=e;return(0,r.jsx)("div",{className:"tableOfContentsInline_2sru",children:(0,r.jsx)(o.Z,{toc:n,minHeadingLevel:t,maxHeadingLevel:s,className:"table-of-contents",linkClassName:null})})}},89477:function(e,n,t){t.d(n,{Z:()=>c});var r=t(85893),o=t(67294),s=t(26378);function i(e){let n=e.getBoundingClientRect();return n.top===n.bottom?i(e.parentNode):n}var a=t(35363);let l=o.memo(function e(n){let{toc:t,className:o,linkClassName:s,isChild:i}=n;return t.length?(0,r.jsx)("ul",{className:i?void 0:o,children:t.map(n=>(0,r.jsxs)("li",{children:[(0,r.jsx)(a.Z,{to:`#${n.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:n.value}}),(0,r.jsx)(e,{isChild:!0,toc:n.children,className:o,linkClassName:s})]},n.id))}):null});function c(e){let{toc:n,className:t="table-of-contents table-of-contents__left-border",linkClassName:a="table-of-contents__link",linkActiveClassName:c,minHeadingLevel:d,maxHeadingLevel:u,...h}=e,m=(0,s.L)(),p=d??m.tableOfContents.minHeadingLevel,x=u??m.tableOfContents.maxHeadingLevel,f=function(e){let{toc:n,minHeadingLevel:t,maxHeadingLevel:r}=e;return(0,o.useMemo)(()=>(function e(n){let{toc:t,minHeadingLevel:r,maxHeadingLevel:o}=n;return t.flatMap(n=>{let t=e({toc:n.children,minHeadingLevel:r,maxHeadingLevel:o});return n.level>=r&&n.level<=o?[{...n,children:t}]:t})})({toc:function(e){let n=e.map(e=>({...e,parentIndex:-1,children:[]})),t=Array(7).fill(-1);n.forEach((e,n)=>{let r=t.slice(2,e.level);e.parentIndex=Math.max(...r),t[e.level]=n});let r=[];return n.forEach(e=>{let{parentIndex:t,...o}=e;t>=0?n[t].children.push(o):r.push(o)}),r}(n),minHeadingLevel:t,maxHeadingLevel:r}),[n,t,r])}({toc:n,minHeadingLevel:p,maxHeadingLevel:x});return!function(e){let n=(0,o.useRef)(void 0),t=function(){let e=(0,o.useRef)(0),{navbar:{hideOnScroll:n}}=(0,s.L)();return(0,o.useEffect)(()=>{e.current=n?0:document.querySelector(".navbar").clientHeight},[n]),e}();(0,o.useEffect)(()=>{if(!e)return()=>{};let{linkClassName:r,linkActiveClassName:o,minHeadingLevel:s,maxHeadingLevel:a}=e;function l(){let e=Array.from(document.getElementsByClassName(r)),l=function(e,n){let{anchorTopOffset:t}=n,r=e.find(e=>i(e).top>=t);if(r){var o;return(o=i(r)).top>0&&o.bottoml&&l.id===decodeURIComponent(e.href.substring(e.href.indexOf("#")+1)));e.forEach(e=>{e===c?(n.current&&n.current!==e&&n.current.classList.remove(o),e.classList.add(o),n.current=e):e.classList.remove(o)})}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}},[e,t])}((0,o.useMemo)(()=>{if(a&&c)return{linkClassName:a,linkActiveClassName:c,minHeadingLevel:p,maxHeadingLevel:x}},[a,c,p,x])),(0,r.jsx)(l,{toc:f,className:t,linkClassName:a,...h})}},58636:function(e,n,t){t.d(n,{Z:()=>s});var r=t(85893);t(67294);var o=t(90496);function s(e){let{children:n,hidden:t,className:s}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,o.Z)("tabItem_pnkT",s),hidden:t,children:n})}},15398:function(e,n,t){t.d(n,{Z:()=>j});var r=t(85893),o=t(67294),s=t(90496),i=t(54947),a=t(3620),l=t(844),c=t(97486),d=t(32263),u=t(16971);function h(e){return o.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||o.isValidElement(e)&&function(e){let{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function m(e){let{value:n,tabValues:t}=e;return t.some(e=>e.value===n)}var p=t(71607);function x(e){let{className:n,block:t,selectedValue:o,selectValue:a,tabValues:l}=e,c=[],{blockElementScrollPositionUntilNextRender:d}=(0,i.o5)(),u=e=>{let n=e.currentTarget,t=l[c.indexOf(n)].value;t!==o&&(d(n),a(t))},h=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{let t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{let t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1]}}n?.focus()};return(0,r.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":t},n),children:l.map(e=>{let{value:n,label:t,attributes:i}=e;return(0,r.jsx)("li",{role:"tab",tabIndex:o===n?0:-1,"aria-selected":o===n,ref:e=>{c.push(e)},onKeyDown:h,onClick:u,...i,className:(0,s.Z)("tabs__item","tabItem_AQgk",i?.className,{"tabs__item--active":o===n}),children:t??n},n)})})}function f(e){let{lazy:n,children:t,selectedValue:i}=e,a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){let e=a.find(e=>e.props.value===i);return e?(0,o.cloneElement)(e,{className:(0,s.Z)("margin-top--md",e.props.className)}):null}return(0,r.jsx)("div",{className:"margin-top--md",children:a.map((e,n)=>(0,o.cloneElement)(e,{key:n,hidden:e.props.value!==i}))})}function g(e){let n=function(e){let{defaultValue:n,queryString:t=!1,groupId:r}=e,s=function(e){let{values:n,children:t}=e;return(0,o.useMemo)(()=>{let e=n??h(t).map(e=>{let{props:{value:n,label:t,attributes:r,default:o}}=e;return{value:n,label:t,attributes:r,default:o}});return!function(e){let n=(0,d.lx)(e,(e,n)=>e.value===n.value);if(n.length>0)throw Error(`Docusaurus error: Duplicate values "${n.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[n,t])}(e),[i,p]=(0,o.useState)(()=>(function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:t}))throw Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}let r=t.find(e=>e.default)??t[0];if(!r)throw Error("Unexpected error: 0 tabValues");return r.value})({defaultValue:n,tabValues:s})),[x,f]=function(e){let{queryString:n=!1,groupId:t}=e,r=(0,a.k6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c._X)(s),(0,o.useCallback)(e=>{if(!s)return;let n=new URLSearchParams(r.location.search);n.set(s,e),r.replace({...r.location,search:n.toString()})},[s,r])]}({queryString:t,groupId:r}),[g,j]=function(e){let{groupId:n}=e,t=n?`docusaurus.tab.${n}`:null,[r,s]=(0,u.Nk)(t);return[r,(0,o.useCallback)(e=>{t&&s.set(e)},[t,s])]}({groupId:r}),b=(()=>{let e=x??g;return m({value:e,tabValues:s})?e:null})();return(0,l.Z)(()=>{b&&p(b)},[b]),{selectedValue:i,selectValue:(0,o.useCallback)(e=>{if(!m({value:e,tabValues:s}))throw Error(`Can't select invalid tab value=${e}`);p(e),f(e),j(e)},[f,j,s]),tabValues:s}}(e);return(0,r.jsxs)("div",{className:(0,s.Z)("tabs-container","tabList_Qoir"),children:[(0,r.jsx)(x,{...n,...e}),(0,r.jsx)(f,{...n,...e})]})}function j(e){let n=(0,p.Z)();return(0,r.jsx)(g,{...e,children:h(e.children)},String(n))}},56497:function(e,n,t){t.d(n,{Z:()=>s});var r=t(85893);t(67294);var o=t(71607);function s(e){let{children:n,fallback:t}=e;return(0,o.Z)()?(0,r.jsx)(r.Fragment,{children:n?.()}):t??null}},14522:function(e,n,t){t.d(n,{Z:()=>a});var r=t(85893);t(67294);var o=t(90496);let s="dot_giz1",i="bar_rrRL";function a(e){let{children:n,minHeight:t,url:a="http://localhost:3000",style:l,bodyStyle:c}=e;return(0,r.jsxs)("div",{className:"browserWindow_my1Q",style:{...l,minHeight:t},children:[(0,r.jsxs)("div",{className:"browserWindowHeader_jXSR",children:[(0,r.jsxs)("div",{className:"buttons_uHc7",children:[(0,r.jsx)("span",{className:s,style:{background:"#f25f58"}}),(0,r.jsx)("span",{className:s,style:{background:"#fbbe3c"}}),(0,r.jsx)("span",{className:s,style:{background:"#58cb42"}})]}),(0,r.jsx)("div",{className:(0,o.Z)("browserWindowAddressBar_Pd8y","text--truncate"),children:a}),(0,r.jsx)("div",{className:"browserWindowMenuIcon_Vhuh",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:i}),(0,r.jsx)("span",{className:i}),(0,r.jsx)("span",{className:i})]})})]}),(0,r.jsx)("div",{className:"browserWindowBody_Idgs",style:c,children:n})]})}},95998:function(e,n,t){t.d(n,{Z:()=>en});var r,o={};t.r(o),t.d(o,{ButtonExample:()=>M});var s=t(85893),i=t(67294),a=t(90496),l=t(71607),c=t(10075),d=t(77827),u=t(8156),h=t(56497),m=t(85108),p=t(45245),x=t(26378);function f(){let{prism:e}=(0,x.L)(),{colorMode:n}=(0,p.I)(),t=e.theme,r=e.darkTheme||t;return"dark"===n?r:t}var g=t(67490);function j(e){let{children:n}=e;return(0,s.jsx)("div",{className:(0,a.Z)("playgroundHeader_Tvsk"),children:n})}function b(){return(0,s.jsx)("div",{children:"Loading..."})}function y(){return(0,s.jsx)(h.Z,{fallback:(0,s.jsx)(b,{}),children:()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.Z,{fallback:e=>(0,s.jsx)(m.Ac,{...e}),children:(0,s.jsx)(c.i5,{})}),(0,s.jsx)(c.IF,{})]})})}function v(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j,{children:(0,s.jsx)(d.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,s.jsx)("div",{className:"playgroundPreview_mApW",children:(0,s.jsx)(y,{})})]})}function w(){let e=(0,l.Z)();return(0,s.jsx)(c.uz,{className:"playgroundEditor_TySg"},String(e))}function k(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j,{children:(0,s.jsx)(d.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,s.jsx)(w,{})]})}let C=e=>`${e};`;function N(e){let{children:n,transformCode:t,...r}=e,{siteConfig:{themeConfig:o}}=(0,u.Z)(),{liveCodeBlock:{playgroundPosition:i}}=o,a=f(),l=r.metastring?.includes("noInline")??!1;return(0,s.jsx)("div",{className:"playgroundContainer_6Ior",children:(0,s.jsx)(c.nu,{code:n?.replace(/\n$/,""),noInline:l,transformCode:t??C,theme:a,...r,children:"top"===i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v,{}),(0,s.jsx)(k,{})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{}),(0,s.jsx)(v,{})]})})})}function M(e){return(0,s.jsx)("button",{type:"button",...e,style:{backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer",...e.style}})}let B={React:i,...i,...o};var D=t(55951),I=t(6324),T=t.n(I);let L=/title=(?["'])(?.*?)\1/,X=/\{(?[\d,-]+)\}/,E={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},S={...E,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},H=Object.keys(E);function _(e,n){let t=e.map(e=>{let{start:t,end:r}=S[e];return`(?:${t}\\s*(${n.flatMap(e=>[e.line,e.block?.start,e.block?.end].filter(Boolean)).join("|")})\\s*${r})`}).join("|");return RegExp(`^\\s*(?:${t})\\s*$`)}function Z(e){let{as:n,...t}=e,r=function(e){let n={color:"--prism-color",backgroundColor:"--prism-background-color"},t={};return Object.entries(e.plain).forEach(e=>{let[r,o]=e,s=n[r];s&&"string"==typeof o&&(t[s]=o)}),t}(f());return(0,s.jsx)(n,{...t,style:r,className:(0,a.Z)(t.className,"codeBlockContainer_jDV4",D.k.common.codeBlock)})}let R={codeBlockContent:"codeBlockContent_vx7S",codeBlockTitle:"codeBlockTitle_bdru",codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q",buttonGroup:"buttonGroup_cUGO"};function A(e){let{children:n,className:t}=e;return(0,s.jsx)(Z,{as:"pre",tabIndex:0,className:(0,a.Z)(R.codeBlockStandalone,"thin-scrollbar",t),children:(0,s.jsx)("code",{className:R.codeBlockLines,children:n})})}var O=t(50923);let F={attributes:!0,characterData:!0,childList:!0,subtree:!0};var W=t(7316);let z={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"};function $(e){let{line:n,classNames:t,showLineNumbers:r,getLineProps:o,getTokenProps:i}=e,l=function(e){let n=1===e.length&&"\n"===e[0].content?e[0]:void 0;return n?[{...n,content:""}]:e}(n),c=o({line:l,className:(0,a.Z)(t,r&&z.codeLine)}),d=l.map((e,n)=>(0,s.jsx)("span",{...i({token:e})},n));return(0,s.jsxs)("span",{...c,children:[r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:z.codeLineNumber}),(0,s.jsx)("span",{className:z.codeLineContent,children:d})]}):d,(0,s.jsx)("br",{})]})}var J=t(44771);function U(e){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function q(e){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}let P={copyButtonCopied:"copyButtonCopied_OkN_",copyButtonIcons:"copyButtonIcons_OqsO",copyButtonIcon:"copyButtonIcon_PgCn",copyButtonSuccessIcon:"copyButtonSuccessIcon_bsQG"};function V(e){let{code:n,className:t}=e,[r,o]=(0,i.useState)(!1),l=(0,i.useRef)(void 0),c=(0,i.useCallback)(()=>{(0,J.Z)(n),o(!0),l.current=window.setTimeout(()=>{o(!1)},1e3)},[n]);return(0,i.useEffect)(()=>()=>window.clearTimeout(l.current),[]),(0,s.jsx)("button",{type:"button","aria-label":r?(0,d.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,d.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,d.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,a.Z)("clean-btn",t,P.copyButton,r&&P.copyButtonCopied),onClick:c,children:(0,s.jsxs)("span",{className:P.copyButtonIcons,"aria-hidden":"true",children:[(0,s.jsx)(U,{className:P.copyButtonIcon}),(0,s.jsx)(q,{className:P.copyButtonSuccessIcon})]})})}function Q(e){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}let Y={wordWrapButtonIcon:"wordWrapButtonIcon_MQXS",wordWrapButtonEnabled:"wordWrapButtonEnabled_TBIH"};function G(e){let{className:n,onClick:t,isEnabled:r}=e,o=(0,d.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,s.jsx)("button",{type:"button",onClick:t,className:(0,a.Z)("clean-btn",n,r&&Y.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,s.jsx)(Q,{className:Y.wordWrapButtonIcon,"aria-hidden":"true"})})}function K(e){var n;let{children:t,className:r="",metastring:o,title:c,showLineNumbers:d,language:u}=e,{prism:{defaultLanguage:h,magicComments:m}}=(0,x.L)(),p=(n=u??function(e){let n=e.split(" ").find(e=>e.startsWith("language-"));return n?.replace(/language-/,"")}(r)??h,n?.toLowerCase()),g=f(),j=function(){let[e,n]=(0,i.useState)(!1),[t,r]=(0,i.useState)(!1),o=(0,i.useRef)(null),s=(0,i.useCallback)(()=>{let t=o.current.querySelector("code");e?t.removeAttribute("style"):(t.style.whiteSpace="pre-wrap",t.style.overflowWrap="anywhere"),n(e=>!e)},[o,e]),a=(0,i.useCallback)(()=>{let{scrollWidth:e,clientWidth:n}=o.current;r(e>n||o.current.querySelector("code").hasAttribute("style"))},[o]);return!function(e,n){let[t,r]=(0,i.useState)(),o=(0,i.useCallback)(()=>{r(e.current?.closest("[role=tabpanel][hidden]"))},[e,r]);(0,i.useEffect)(()=>{o()},[o]),function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:F,r=(0,O.zX)(n),o=(0,O.Ql)(t);(0,i.useEffect)(()=>{let n=new MutationObserver(r);return e&&n.observe(e,o),()=>n.disconnect()},[e,r,o])}(t,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(n(),o())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1})}(o,a),(0,i.useEffect)(()=>{a()},[e,a]),(0,i.useEffect)(()=>(window.addEventListener("resize",a,{passive:!0}),()=>{window.removeEventListener("resize",a)}),[a]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:t,toggle:s}}(),b=(0,l.Z)(),y=(o?.match(L)?.groups.title??"")||c,{lineClassNames:v,code:w}=function(e,n){let t=e.replace(/\n$/,""),{language:r,magicComments:o,metastring:s}=n;if(s&&X.test(s)){let e=s.match(X).groups.range;if(0===o.length)throw Error(`A highlight range has been given in code block's metastring (\`\`\` ${s}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);let n=o[0].className;return{lineClassNames:Object.fromEntries(T()(e).filter(e=>e>0).map(e=>[e-1,[n]])),code:t}}if(void 0===r)return{lineClassNames:{},code:t};let i=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return _(["js","jsBlock"],n);case"jsx":case"tsx":return _(["js","jsBlock","jsx"],n);case"html":return _(["js","jsBlock","html"],n);case"python":case"py":case"bash":return _(["bash"],n);case"markdown":case"md":return _(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return _(["tex"],n);case"lua":case"haskell":return _(["lua"],n);case"sql":return _(["lua","jsBlock"],n);case"wasm":return _(["wasm"],n);case"vb":case"vba":case"visual-basic":return _(["vb","rem"],n);case"vbnet":return _(["vbnet","rem"],n);case"batch":return _(["rem"],n);case"basic":return _(["rem","f90"],n);case"fsharp":return _(["js","ml"],n);case"ocaml":case"sml":return _(["ml"],n);case"fortran":return _(["f90"],n);case"cobol":return _(["cobol"],n);default:return _(H,n)}}(r,o),a=t.split("\n"),l=Object.fromEntries(o.map(e=>[e.className,{start:0,range:""}])),c=Object.fromEntries(o.filter(e=>e.line).map(e=>{let{className:n,line:t}=e;return[t,n]})),d=Object.fromEntries(o.filter(e=>e.block).map(e=>{let{className:n,block:t}=e;return[t.start,n]})),u=Object.fromEntries(o.filter(e=>e.block).map(e=>{let{className:n,block:t}=e;return[t.end,n]}));for(let e=0;evoid 0!==e);c[t]?l[c[t]].range+=`${e},`:d[t]?l[d[t]].start=e:u[t]&&(l[u[t]].range+=`${l[u[t]].start}-${e-1},`),a.splice(e,1)}t=a.join("\n");let h={};return Object.entries(l).forEach(e=>{let[n,{range:t}]=e;T()(t).forEach(e=>{h[e]??=[],h[e].push(n)})}),{lineClassNames:h,code:t}}(t,{metastring:o,language:p,magicComments:m}),k=function(e){let{showLineNumbers:n,metastring:t}=e;return"boolean"==typeof n?n?1:void 0:"number"==typeof n?n:function(e){let n=e?.split(" ").find(e=>e.startsWith("showLineNumbers"));if(n)return n.startsWith("showLineNumbers=")?parseInt(n.replace("showLineNumbers=",""),10):1}(t)}({showLineNumbers:d,metastring:o});return(0,s.jsxs)(Z,{as:"div",className:(0,a.Z)(r,p&&!r.includes(`language-${p}`)&&`language-${p}`),children:[y&&(0,s.jsx)("div",{className:R.codeBlockTitle,children:y}),(0,s.jsxs)("div",{className:R.codeBlockContent,children:[(0,s.jsx)(W.y$,{theme:g,code:w,language:p??"text",children:e=>{let{className:n,style:t,tokens:r,getLineProps:o,getTokenProps:i}=e;return(0,s.jsx)("pre",{tabIndex:0,ref:j.codeBlockRef,className:(0,a.Z)(n,R.codeBlock,"thin-scrollbar"),style:t,children:(0,s.jsx)("code",{className:(0,a.Z)(R.codeBlockLines,void 0!==k&&R.codeBlockLinesWithNumbering),style:void 0===k?void 0:{counterReset:`line-count ${k-1}`},children:r.map((e,n)=>(0,s.jsx)($,{line:e,getLineProps:o,getTokenProps:i,classNames:v[n],showLineNumbers:void 0!==k},n))})})}}),b?(0,s.jsxs)("div",{className:R.buttonGroup,children:[(j.isEnabled||j.isCodeScrollable)&&(0,s.jsx)(G,{className:R.codeButton,onClick:()=>j.toggle(),isEnabled:j.isEnabled}),(0,s.jsx)(V,{className:R.codeButton,code:w})]}):null]})]})}let ee=(r=function(e){let{children:n,...t}=e,r=(0,l.Z)(),o=i.Children.toArray(n).some(e=>(0,i.isValidElement)(e))?n:Array.isArray(n)?n.join(""):n;return(0,s.jsx)("string"==typeof o?K:A,{...t,children:o},String(r))},function(e){return e.live?(0,s.jsx)(N,{scope:B,...e}):(0,s.jsx)(r,{...e})});function en(e){return(0,s.jsx)(ee,{...e})}}}]);