"use strict";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code"),c=b[b.length-1],d=c?c.className.toLowerCase():"";a.className+=" "+d}),this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function(a){var b=document.createElement("div");b.className="table-wrapper",a.parentElement.replaceChild(b,a),b.appendChild(a)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll(".content > h"+a),function(a){a.classList.add("headerLink"),a.innerHTML="").concat(a.innerHTML)})}},{key:"_refactorToc",value:function _refactorToc(a){this.util.forEach(a.querySelectorAll("a:first-child"),function(a){a.classList.add("toc-link")})}},{key:"_initTocState",value:function _initTocState(a){var b=this;if("none"!==window.getComputedStyle(a,null).display){var c="normal"!==window.desktopHeaderMode,d=document.getElementById("header-desktop").getBoundingClientRect().height,e=20+(c?d:0),f=a.offsetTop,g=f-e+(c?0:d),h=document.getElementById("post-footer").offsetTop,j=a.getElementsByClassName("toc-link"),k=document.getElementsByClassName("headerLink")||[],l=a.querySelectorAll(".post-toc-content li"),m=5+(c?d:0),n=function(){var n=b.util.getScrollTop(),o=h-a.getBoundingClientRect().height,p=o-e+(c?0:d);np?(a.style.position="absolute",a.style.top="".concat(o,"px")):(a.style.position="fixed",a.style.top="".concat(e,"px")),b.util.forEach(j,function(a){a.classList.remove("active")}),b.util.forEach(l,function(a){a.classList.remove("has-active")});for(var q=k.length-1,r=0;rm||s<=m&&t>m){q=r;break}}if(-1!==q){j[q].classList.add("active");for(var u=j[q].parentElement;"NAV"!==u.tagName;)u.classList.add("has-active"),u=u.parentElement.parentElement}};n(),this._initTocOnce||(this.scrollEvents.push(n),this._initTocOnce=!0)}}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("post-toc");if(null!==b){var c=b.getElementById("TableOfContents");null===c?b.parentElement.removeChild(b):(this._refactorToc(c),this._initTocState(b),window.addEventListener("resize",function(){window.setTimeout(function(){a._initTocState(b)},0)},!1))}}},{key:"initMermaid",value:function initMermaid(){window.mermaidMap&&(mermaid.initialize({startOnLoad:!1,theme:null}),Object.keys(mermaidMap).forEach(function(a){var b=document.getElementById(a);mermaid.mermaidAPI.render("d"+a,mermaidMap[a],function(a){b.innerHTML=a;var c=b.firstChild;c.style.width="100%"},b)}))}},{key:"initEcharts",value:function initEcharts(){if(window.echartsMap){for(var a=0;a