"}),"): 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"})})})]}),"\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)}},86411:function(e,n,t){t.d(n,{Z:()=>i});var r=t("24246");t("27378");var o=t("9763");let s="tableOfContentsInline_2sru";function i(e){let{toc:n,minHeadingLevel:t,maxHeadingLevel:i}=e;return(0,r.jsx)("div",{className:s,children:(0,r.jsx)(o.Z,{toc:n,minHeadingLevel:t,maxHeadingLevel:i,className:"table-of-contents",linkClassName:null})})}},9763:function(e,n,t){t.d(n,{Z:()=>c});var r=t("24246"),o=t("27378"),s=t("70341");function i(e){let n=e.getBoundingClientRect();return n.top===n.bottom?i(e.parentNode):n}var a=t("64152");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=>{var t;let s=e({toc:n.children,minHeadingLevel:r,maxHeadingLevel:o});return(t=n).level>=r&&t.level<=o?[{...n,children:s}]:s})})({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(){var e;let l=(e=r,Array.from(document.getElementsByClassName(e))),c=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.bottom{var n;return c&&c.id===decodeURIComponent((n=e).href.substring(n.href.indexOf("#")+1))});l.forEach(e=>{var t;t=e,e===d?(n.current&&n.current!==t&&n.current.classList.remove(o),t.classList.add(o),n.current=t):t.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})}},67860:function(e,n,t){t.d(n,{Z:()=>i});var r=t("24246");t("27378");var o=t("90496");let s="tabItem_pnkT";function i(e){let{children:n,hidden:t,className:i}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,o.Z)(s,i),hidden:t,children:n})}},46291:function(e,n,t){t.d(n,{Z:()=>v});var r=t("24246"),o=t("27378"),s=t("90496"),i=t("12451"),a=t("3620"),l=t("89637"),c=t("74417"),d=t("46918"),u=t("58247");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("8903");let x="tabList_Qoir",f="tabItem_AQgk";function g(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",f,i?.className,{"tabs__item--active":o===n}),children:t??n},n)})})}function j(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 b(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}),i=(0,c._X)(s);return[i,(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){var n;let{groupId:t}=e;let r=(n=t)?`docusaurus.tab.${n}`:null,[s,i]=(0,u.Nk)(r);return[s,(0,o.useCallback)(e=>{if(!!r)i.set(e)},[r,i])]}({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",x),children:[(0,r.jsx)(g,{...n,...e}),(0,r.jsx)(j,{...n,...e})]})}function v(e){let n=(0,p.Z)();return(0,r.jsx)(b,{...e,children:h(e.children)},String(n))}},82234:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(24246);t(27378);var o=t(8903);function s(e){let{children:n,fallback:t}=e;return(0,o.Z)()?(0,r.jsx)(r.Fragment,{children:n?.()}):t??null}},11678:function(e,n,t){t.d(n,{Z:()=>m});var r=t("24246");t("27378");var o=t("90496");let s="browserWindow_my1Q",i="browserWindowHeader_jXSR",a="buttons_uHc7",l="browserWindowAddressBar_Pd8y",c="dot_giz1",d="browserWindowMenuIcon_Vhuh",u="bar_rrRL",h="browserWindowBody_Idgs";function m(e){let{children:n,minHeight:t,url:m="http://localhost:3000",style:p,bodyStyle:x}=e;return(0,r.jsxs)("div",{className:s,style:{...p,minHeight:t},children:[(0,r.jsxs)("div",{className:i,children:[(0,r.jsxs)("div",{className:a,children:[(0,r.jsx)("span",{className:c,style:{background:"#f25f58"}}),(0,r.jsx)("span",{className:c,style:{background:"#fbbe3c"}}),(0,r.jsx)("span",{className:c,style:{background:"#58cb42"}})]}),(0,r.jsx)("div",{className:(0,o.Z)(l,"text--truncate"),children:m}),(0,r.jsx)("div",{className:d,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:u}),(0,r.jsx)("span",{className:u}),(0,r.jsx)("span",{className:u})]})})]}),(0,r.jsx)("div",{className:h,style:x,children:n})]})}},45960:function(e,n,t){t.d(n,{Z:()=>ei});var r,o={};t.r(o),t.d(o,{ButtonExample:()=>T});var s=t("24246"),i=t("27378"),a=t("90496"),l=t("8903"),c=t("10075"),d=t("80661"),u=t("30056"),h=t("82234"),m=t("22687"),p=t("31058"),x=t("70341");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("18605");let j="playgroundContainer_6Ior",b="playgroundHeader_Tvsk",v="playgroundEditor_TySg",y="playgroundPreview_mApW";function w(e){let{children:n}=e;return(0,s.jsx)("div",{className:(0,a.Z)(b),children:n})}function k(){return(0,s.jsx)("div",{children:"Loading..."})}function C(){return(0,s.jsx)(h.Z,{fallback:(0,s.jsx)(k,{}),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 M(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w,{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:y,children:(0,s.jsx)(C,{})})]})}function N(){let e=(0,l.Z)();return(0,s.jsx)(c.uz,{className:v},String(e))}function B(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w,{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)(N,{})]})}let D=e=>`${e};`;function I(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:j,children:(0,s.jsx)(c.nu,{code:n?.replace(/\n$/,""),noInline:l,transformCode:t??D,theme:a,...r,children:"top"===i?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(M,{}),(0,s.jsx)(B,{})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(B,{}),(0,s.jsx)(M,{})]})})})}function T(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 X={React:i,...i,...o};var E=t("2235"),L=t("6324"),H=t.n(L);let S=/title=(?["'])(?.*?)\1/,_=/\{(?[\d,-]+)\}/,Z={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},R={...Z,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:""}},A=Object.keys(Z);function O(e,n){let t=e.map(e=>{let{start:t,end:r}=R[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*$`)}let F="codeBlockContainer_jDV4";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,F,E.k.common.codeBlock)})}let W={codeBlockContent:"codeBlockContent_vx7S",codeBlockTitle:"codeBlockTitle_bdru",codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q",buttonGroup:"buttonGroup_cUGO"};function $(e){let{children:n,className:t}=e;return(0,s.jsx)(z,{as:"pre",tabIndex:0,className:(0,a.Z)(W.codeBlockStandalone,"thin-scrollbar",t),children:(0,s.jsx)("code",{className:W.codeBlockLines,children:n})})}var J=t("31008");let U={attributes:!0,characterData:!0,childList:!0,subtree:!0};var q=t("7316");let P={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"};function V(e){let{line:n,classNames:t,showLineNumbers:r,getLineProps:o,getTokenProps:i}=e;1===n.length&&"\n"===n[0].content&&(n[0].content="");let l=o({line:n,className:(0,a.Z)(t,r&&P.codeLine)}),c=n.map((e,n)=>(0,s.jsx)("span",{...i({token:e})},n));return(0,s.jsxs)("span",{...l,children:[r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:P.codeLineNumber}),(0,s.jsx)("span",{className:P.codeLineContent,children:c})]}):c,(0,s.jsx)("br",{})]})}var Q=t("84171");function Y(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 G(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 K={copyButtonCopied:"copyButtonCopied_OkN_",copyButtonIcons:"copyButtonIcons_OqsO",copyButtonIcon:"copyButtonIcon_PgCn",copyButtonSuccessIcon:"copyButtonSuccessIcon_bsQG"};function ee(e){let{code:n,className:t}=e,[r,o]=(0,i.useState)(!1),l=(0,i.useRef)(void 0),c=(0,i.useCallback)(()=>{(0,Q.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,K.copyButton,r&&K.copyButtonCopied),onClick:c,children:(0,s.jsxs)("span",{className:K.copyButtonIcons,"aria-hidden":"true",children:[(0,s.jsx)(Y,{className:K.copyButtonIcon}),(0,s.jsx)(G,{className:K.copyButtonSuccessIcon})]})})}function en(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 et={wordWrapButtonIcon:"wordWrapButtonIcon_MQXS",wordWrapButtonEnabled:"wordWrapButtonEnabled_TBIH"};function er(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&&et.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,s.jsx)(en,{className:et.wordWrapButtonIcon,"aria-hidden":"true"})})}function eo(e){var n,t,r;let{children:o,className:l="",metastring:c,title:d,showLineNumbers:u,language:h}=e,{prism:{defaultLanguage:m,magicComments:p}}=(0,x.L)();let g=(n=h??function(e){let n=e.split(" ").find(e=>e.startsWith("language-"));return n?.replace(/language-/,"")}(l)??m,n?.toLowerCase()),j=f(),b=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]:U,r=(0,J.zX)(n),o=(0,J.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}}();let v=(t=c,(t?.match(S)?.groups.title??"")||d),{lineClassNames:y,code:w}=function(e,n){let t=e.replace(/\n$/,""),{language:r,magicComments:o,metastring:s}=n;if(s&&_.test(s)){let e=s.match(_).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(H()(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 O(["js","jsBlock"],n);case"jsx":case"tsx":return O(["js","jsBlock","jsx"],n);case"html":return O(["js","jsBlock","html"],n);case"python":case"py":case"bash":return O(["bash"],n);case"markdown":case"md":return O(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return O(["tex"],n);case"lua":case"haskell":case"sql":return O(["lua"],n);case"wasm":return O(["wasm"],n);case"vb":case"vba":case"visual-basic":return O(["vb","rem"],n);case"vbnet":return O(["vbnet","rem"],n);case"batch":return O(["rem"],n);case"basic":return O(["rem","f90"],n);case"fsharp":return O(["js","ml"],n);case"ocaml":case"sml":return O(["ml"],n);case"fortran":return O(["f90"],n);case"cobol":return O(["cobol"],n);default:return O(A,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;H()(t).forEach(e=>{h[e]??=[],h[e].push(n)})}),{lineClassNames:h,code:t}}(o,{metastring:c,language:g,magicComments:p});let k=u??(r=c,!!r?.includes("showLineNumbers"));return(0,s.jsxs)(z,{as:"div",className:(0,a.Z)(l,g&&!l.includes(`language-${g}`)&&`language-${g}`),children:[v&&(0,s.jsx)("div",{className:W.codeBlockTitle,children:v}),(0,s.jsxs)("div",{className:W.codeBlockContent,children:[(0,s.jsx)(q.y$,{theme:j,code:w,language:g??"text",children:e=>{let{className:n,style:t,tokens:r,getLineProps:o,getTokenProps:i}=e;return(0,s.jsx)("pre",{tabIndex:0,ref:b.codeBlockRef,className:(0,a.Z)(n,W.codeBlock,"thin-scrollbar"),style:t,children:(0,s.jsx)("code",{className:(0,a.Z)(W.codeBlockLines,k&&W.codeBlockLinesWithNumbering),children:r.map((e,n)=>(0,s.jsx)(V,{line:e,getLineProps:o,getTokenProps:i,classNames:y[n],showLineNumbers:k},n))})})}}),(0,s.jsxs)("div",{className:W.buttonGroup,children:[(b.isEnabled||b.isCodeScrollable)&&(0,s.jsx)(er,{className:W.codeButton,onClick:()=>b.toggle(),isEnabled:b.isEnabled}),(0,s.jsx)(ee,{className:W.codeButton,code:w})]})]})]})}let es=(r=function(e){var n;let{children:t,...r}=e,o=(0,l.Z)();let a=(n=t,i.Children.toArray(n).some(e=>(0,i.isValidElement)(e))?n:Array.isArray(n)?n.join(""):n),c="string"==typeof a?eo:$;return(0,s.jsx)(c,{...r,children:a},String(o))},function(e){return e.live?(0,s.jsx)(I,{scope:X,...e}):(0,s.jsx)(r,{...e})});function ei(e){return(0,s.jsx)(es,{...e})}}}]);