1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
|
(()=>{var e={163:e=>{e.exports=function(e){var t,n=[].forEach,l=[].some,o=document.body,i=!0,r=" ";function s(t,l){var o,i,c,d=l.appendChild((o=t,i=document.createElement("li"),c=document.createElement("a"),e.listItemClass&&i.setAttribute("class",e.listItemClass),e.onClick&&(c.onclick=e.onClick),e.includeTitleTags&&c.setAttribute("title",o.textContent),e.includeHtml&&o.childNodes.length?n.call(o.childNodes,(function(e){c.appendChild(e.cloneNode(!0))})):c.textContent=o.textContent,c.setAttribute("href",e.basePath+"#"+o.id),c.setAttribute("class",e.linkClass+r+"node-name--"+o.nodeName+r+e.extraLinkClasses),i.appendChild(c),i));if(t.children.length){var u=a(t.isCollapsed);t.children.forEach((function(e){s(e,u)})),d.appendChild(u)}}function a(t){var n=e.orderedList?"ol":"ul",l=document.createElement(n),o=e.listClass+r+e.extraListClasses;return t&&(o+=r+e.collapsibleClass,o+=r+e.isCollapsedClass),l.setAttribute("class",o),l}function c(t){var n=0;return null!==t&&(n=t.offsetTop,e.hasInnerContainers&&(n+=c(t.offsetParent))),n}function d(t){return t&&-1!==t.className.indexOf(e.collapsibleClass)&&-1!==t.className.indexOf(e.isCollapsedClass)?(t.className=t.className.split(r+e.isCollapsedClass).join(""),d(t.parentNode.parentNode)):t}return{enableTocAnimation:function(){i=!0},disableTocAnimation:function(t){var n=t.target||t.srcElement;"string"==typeof n.className&&-1!==n.className.indexOf(e.linkClass)&&(i=!1)},render:function(e,n){var l=a(!1);if(n.forEach((function(e){s(e,l)})),null!==(t=e||t))return t.firstChild&&t.removeChild(t.firstChild),0===n.length?t:t.appendChild(l)},updateToc:function(s){var a;a=e.scrollContainer&&document.querySelector(e.scrollContainer)?document.querySelector(e.scrollContainer).scrollTop:document.documentElement.scrollTop||o.scrollTop,e.positionFixedSelector&&function(){var n;n=e.scrollContainer&&document.querySelector(e.scrollContainer)?document.querySelector(e.scrollContainer).scrollTop:document.documentElement.scrollTop||o.scrollTop;var l=document.querySelector(e.positionFixedSelector);"auto"===e.fixedSidebarOffset&&(e.fixedSidebarOffset=t.offsetTop),n>e.fixedSidebarOffset?-1===l.className.indexOf(e.positionFixedClass)&&(l.className+=r+e.positionFixedClass):l.className=l.className.split(r+e.positionFixedClass).join("")}();var u,f=s;if(i&&null!==t&&f.length>0){l.call(f,(function(t,n){return c(t)>a+e.headingsOffset+10?(u=f[0===n?n:n-1],!0):n===f.length-1?(u=f[f.length-1],!0):void 0}));var m=t.querySelectorAll("."+e.linkClass);n.call(m,(function(t){t.className=t.className.split(r+e.activeLinkClass).join("")}));var h=t.querySelectorAll("."+e.listItemClass);n.call(h,(function(t){t.className=t.className.split(r+e.activeListItemClass).join("")}));var p=t.querySelector("."+e.linkClass+".node-name--"+u.nodeName+'[href="'+e.basePath+"#"+u.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/@])/g,"\\$1")+'"]');p&&-1===p.className.indexOf(e.activeLinkClass)&&(p.className+=r+e.activeLinkClass);var C=p&&p.parentNode;C&&-1===C.className.indexOf(e.activeListItemClass)&&(C.className+=r+e.activeListItemClass);var g=t.querySelectorAll("."+e.listClass+"."+e.collapsibleClass);n.call(g,(function(t){-1===t.className.indexOf(e.isCollapsedClass)&&(t.className+=r+e.isCollapsedClass)})),p&&p.nextSibling&&-1!==p.nextSibling.className.indexOf(e.isCollapsedClass)&&(p.nextSibling.className=p.nextSibling.className.split(r+e.isCollapsedClass).join("")),d(p&&p.parentNode.parentNode)}}}}},547:e=>{e.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(e){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags
|