"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["77235"],{37793:function(e,t,n){n.r(t),n.d(t,{metadata:()=>l,contentTitle:()=>d,default:()=>p,assets:()=>u,toc:()=>v,frontMatter:()=>s});var l=JSON.parse('{"id":"toc/toc-test-bad","title":"toc-test-bad","description":"Test the TOC behavior of a real-world MD doc with invalid headings","source":"@site/_dogfooding/_docs tests/toc/toc-test-bad.mdx","sourceDirName":"toc","slug":"/toc/toc-test-bad","permalink":"/tests/docs/toc/toc-test-bad","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedBy":"Kamil Moska\u0142a","lastUpdatedAt":1729244075000,"frontMatter":{"toc_min_heading_level":2,"toc_max_heading_level":6},"sidebar":"sidebar","previous":{"title":"toc-_-_","permalink":"/tests/docs/toc/toc-_-_"},"next":{"title":"toc-test-good","permalink":"/tests/docs/toc/toc-test-good"}}'),r=n("24246"),o=n("80980"),i=n("14522"),a=n("78596"),c=n("57589");let s={toc_min_heading_level:2,toc_max_heading_level:6},d=void 0,u={},v=[{value:"lvl 6",id:"lvl-6",level:6},{value:"lvl 5",id:"lvl-5",level:5},{value:"lvl 4",id:"lvl-4",level:4},{value:"lvl 5",id:"lvl-5-1",level:5},{value:"lvl 4",id:"lvl-4-1",level:4},{value:"lvl 3",id:"lvl-3",level:3},{value:"lvl 2",id:"lvl-2",level:2},{value:"lvl 2",id:"lvl-2-1",level:2},{value:"lvl 3",id:"lvl-3-1",level:3},{value:"lvl 4",id:"lvl-4-2",level:4},{value:"lvl 5",id:"lvl-5-2",level:5},{value:"lvl 6",id:"lvl-6-1",level:6},{value:"lvl 2",id:"lvl-2-2",level:2},{value:"lvl 3",id:"lvl-3-2",level:3},{value:"lvl 4",id:"lvl-4-3",level:4},{value:"lvl 5",id:"lvl-5-3",level:5},{value:"lvl 6",id:"lvl-6-2",level:6}];function f(e){let t={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",hr:"hr",p:"p",...(0,o.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"Test the TOC behavior of a real-world MD doc with invalid headings"}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.p,{children:"BAD HEADINGS:"}),"\n",(0,r.jsx)(t.h6,{id:"lvl-6",children:"lvl 6"}),"\n",(0,r.jsx)(t.h5,{id:"lvl-5",children:"lvl 5"}),"\n",(0,r.jsx)(t.h4,{id:"lvl-4",children:"lvl 4"}),"\n",(0,r.jsx)(t.h5,{id:"lvl-5-1",children:"lvl 5"}),"\n",(0,r.jsx)(t.h4,{id:"lvl-4-1",children:"lvl 4"}),"\n",(0,r.jsx)(t.h3,{id:"lvl-3",children:"lvl 3"}),"\n",(0,r.jsx)(t.h2,{id:"lvl-2",children:"lvl 2"}),"\n",(0,r.jsx)(t.h1,{id:"lvl-1",children:"lvl 1"}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.p,{children:"GOOD HEADINGS:"}),"\n",(0,r.jsx)(t.h2,{id:"lvl-2-1",children:"lvl 2"}),"\n",(0,r.jsx)(t.h3,{id:"lvl-3-1",children:"lvl 3"}),"\n",(0,r.jsx)(t.h4,{id:"lvl-4-2",children:"lvl 4"}),"\n",(0,r.jsx)(t.h5,{id:"lvl-5-2",children:"lvl 5"}),"\n",(0,r.jsx)(t.h6,{id:"lvl-6-1",children:"lvl 6"}),"\n",(0,r.jsx)(t.h2,{id:"lvl-2-2",children:"lvl 2"}),"\n",(0,r.jsx)(t.h3,{id:"lvl-3-2",children:"lvl 3"}),"\n",(0,r.jsx)(t.h4,{id:"lvl-4-3",children:"lvl 4"}),"\n",(0,r.jsx)(t.h5,{id:"lvl-5-3",children:"lvl 5"}),"\n",(0,r.jsx)(t.h6,{id:"lvl-6-2",children:"lvl 6"}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.p,{children:"INLINE:"}),"\n","\n","\n",(0,r.jsx)(i.Z,{children:(0,r.jsx)(a.Z,{toc:v,minHeadingLevel:2,maxHeadingLevel:6})}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.p,{children:"COLLAPSIBLE:"}),"\n","\n",(0,r.jsx)(i.Z,{children:(0,r.jsx)(c.Z,{toc:v,minHeadingLevel:2,maxHeadingLevel:6})})]})}function p(e={}){let{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(f,{...e})}):f(e)}p.displayName="MDXContent(_dogfooding/_docs tests/toc/toc-test-bad.mdx)"},57589:function(e,t,n){n.d(t,{Z:()=>u});var l=n("24246");n("27378");var r=n("90496"),o=n("97812"),i=n("89477"),a=n("77827");let c={tocCollapsibleButton:"tocCollapsibleButton_IbtT",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_Nor3"};function s(e){var t,n,o=e.collapsed,i=function(e,t){if(null==e)return{};var n,l,r=function(e,t){if(null==e)return{};var n,l,r={},o=Object.keys(e);for(l=0;l=0)&&(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}}return r}(e,["collapsed"]);return(0,l.jsx)("button",(t=function(e){for(var t=1;ti});var l=n("24246");n("27378");var r=n("89477");let o="tableOfContentsInline_2sru";function i(e){var t=e.toc,n=e.minHeadingLevel,i=e.maxHeadingLevel;return(0,l.jsx)("div",{className:o,children:(0,l.jsx)(r.Z,{toc:t,minHeadingLevel:n,maxHeadingLevel:i,className:"table-of-contents",linkClassName:null})})}},89477:function(e,t,n){n.d(t,{Z:()=>v});var l=n("24246"),r=n("27378"),o=n("26378");function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=Array(t);n=0)&&(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}}return r}(e,["toc","className","linkClassName","linkActiveClassName","minHeadingLevel","maxHeadingLevel"]),P=(0,o.L)(),H=null!=C?C:P.tableOfContents.minHeadingLevel,_=null!=L?L:P.tableOfContents.maxHeadingLevel;var S=(n=(t={toc:g,minHeadingLevel:H,maxHeadingLevel:_}).toc,d=t.minHeadingLevel,v=t.maxHeadingLevel,(0,r.useMemo)(function(){var e,t,l;return function e(t){var n=t.toc,l=t.minHeadingLevel,r=t.maxHeadingLevel;return n.flatMap(function(t){var n,o=e({toc:t.children,minHeadingLevel:l,maxHeadingLevel:r});return(n=t).level>=l&&n.level<=r?[c(a({},t),{children:o})]:o})}({toc:(e=n.map(function(e){return c(a({},e),{parentIndex:-1,children:[]})}),t=Array(7).fill(-1),e.forEach(function(e,n){var l,r,o=t.slice(2,e.level);e.parentIndex=(r=Math).max.apply(r,function(e){if(Array.isArray(e))return i(e)}(l=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}(l)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),t[e.level]=n}),l=[],e.forEach(function(t){var n=t.parentIndex,r=function(e,t){if(null==e)return{};var n,l,r=function(e,t){if(null==e)return{};var n,l,r={},o=Object.keys(e);for(l=0;l=0)&&(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}}return r}(t,["parentIndex"]);n>=0?e[n].children.push(r):l.push(r)}),l),minHeadingLevel:d,maxHeadingLevel:v})},[n,d,v]));return f=(0,r.useMemo)(function(){if(O&&w)return{linkClassName:O,linkActiveClassName:w,minHeadingLevel:H,maxHeadingLevel:_}},[O,w,H,_]),p=(0,r.useRef)(void 0),h=(b=(0,r.useRef)(0),m=(0,o.L)().navbar.hideOnScroll,(0,r.useEffect)(function(){b.current=m?0:document.querySelector(".navbar").clientHeight},[m]),b),(0,r.useEffect)(function(){var e=function(e,t){t?(p.current&&p.current!==e&&p.current.classList.remove(l),e.classList.add(l),p.current=e):e.classList.remove(l)},t=function(){var t,l=(t=n,Array.from(document.getElementsByClassName(t))),i=function(e,t){var n,l,r,o=t.anchorTopOffset,i=e.find(function(e){return s(e).top>=o});if(i){;return(l=s(i)).top>0&&l.bottomf});var l=n("24246");n("27378");var r=n("90496");let o="browserWindow_my1Q",i="browserWindowHeader_jXSR",a="buttons_uHc7",c="browserWindowAddressBar_Pd8y",s="dot_giz1",d="browserWindowMenuIcon_Vhuh",u="bar_rrRL",v="browserWindowBody_Idgs";function f(e){var t,n,f=e.children,p=e.minHeight,b=e.url,m=e.style,h=e.bodyStyle;return(0,l.jsxs)("div",{className:o,style:(t=function(e){for(var t=1;t