text: "use strict";App.loadPlugins=(e,t)=>{const a=[...document.head.querySelectorAll("link[href]")].map((e=>e.getAttribute("href"))),n=[...document.head.querySelectorAll("script[data-src]")].map((e=>e.getAttribute("data-src"))),r=e=>"css"===e.substring(e.lastIndexOf(".")+1).split("?")[0];function s(e,t,a=!1){let n=document.createElement("script");n.text=t,n.dataset.src=e,a?document.head.appendChild(n).parentNode.removeChild(n):document.head.appendChild(n)}let o=[],l=[],i=[],c=[];return e?(e.filter((e=>r(e)&&!a.includes(e))).map((e=>{return o.push((t=e,new Promise(((e,a)=>{let n=document.createElement("link");n.rel="stylesheet",n.href=t,n.onload=()=>e(),n.onerror=()=>a("Failed to load: "+t),document.getElementById("main-css").before(n)}))));var t})),c=e.filter((e=>!r(e)&&!n.includes(e))),c.map((e=>l.push(fetch(e).then((e=>e.text())))))):(o.push(Promise.resolve()),l.push(Promise.resolve())),t?t.map((e=>i.push(fetch(App.addTimestamp(e)).then((e=>e.text()))))):i.push(Promise.resolve()),Promise.all(o).then((()=>Promise.all(l))).then((e=>c.map(((t,a)=>s(t,e[a]))))).then((()=>Promise.all(i))).then((e=>t&&t.map(((t,a)=>s(t,e[a],!0)))))},App.startLoading=()=>{ajaxloader.classList.add("loading"),setTimeout((()=>{ajaxloader.classList.contains("loading")&&(ajaxloader.style.display="",setTimeout((()=>ajaxloader.classList.add("show")),10))}),500)},App.stopLoading=()=>{ajaxloader.style.display="none",ajaxloader.classList.remove("loading","show")},App.cleanScraps=()=>{let e=document.getElementById("ajax-js"),t=[];for(;e=e.nextElementSibling;)"script"!=e.tagName.toLowerCase()&&t.push(e);t.map((e=>e.parentNode.removeChild(e)))},App.contentEval=e=>{const t=document.createElement("div");t.innerHTML=e;for(let e of t.querySelectorAll("script")){let t=a("script",e);document.head.appendChild(t).parentNode.removeChild(t)}function a(e,t){const a=document.createElement(e);t.text&&(a.text=t.text);const n=t.attributes;if(n.length)for(let e of n)a.setAttribute(e.nodeName,e.nodeValue);return a}return e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")},App.addTimestamp=e=>{if(-1!==e.indexOf("_="))return e;{const t=-1!==e.indexOf("?")?"&":"?";return e+t+"_="+Date.now()}},App.loadURL=(e,t,a)=>{const n=document.querySelector(a.container);App.startLoading(),fetch(App.addTimestamp(e)).then((e=>{e.text().then((r=>{if(document.querySelector(".main-navbar")&&App.lgUp()){const e=document.querySelector(".main-header").getBoundingClientRect().height;window.scrollY>=e&&window.scrollTo(0,e)}else window.scrollTo(0,0);if(e.ok){if(App.cleanScraps(),a.breadcrumb){let e=App.generateBreadcrumb(t,a);e&&(r=e+r)}n.innerHTML=App.contentEval(r),document.body.classList.remove("inner-expand");const e=n.querySelector("[autofocus]");e&&e.focus()}else App.stopLoading(),n.innerHTML='<div class="alert alert-danger alert-error-load" role="alert">'+r+"</div>"}))}))},App.currentLinkParents=e=>{let t=e,a=[];for(;t&&(t.classList.contains("nav-item")&&a.unshift(t.querySelector(".nav-link")),!t.classList.contains("treeview"));)t=t.parentNode;return a},App.updateMenu=e=>{document.querySelectorAll("#menu .active").forEach((e=>e.classList.remove("active","show")));for(const t of App.currentLinkParents(e))t.classList.add("active"),t.classList.contains("treeview-toggle")&&t.classList.add("show");App.mdDown()&&document.body.classList.contains("sidebar-expand")&&document.querySelector('[data-toggle="sidebar"]').click()},App.updateMenuTop=e=>{document.querySelector(".main-navbar").querySelectorAll(".active").forEach((e=>e.classList.remove("active"))),e.classList.add("active"),e.classList.contains("nav-link")||e.closest(".nav-item").querySelector(".nav-link").classList.add("active")},App.originalMenuName=e=>e.replace(/<i.*>.*?<\/i>/gi,"").replace(/<span.*>.*?<\/span>/gi,"").replace(/<svg.*>.*?<\/svg>/gi,"").trim(),App.generateBreadcrumb=(e,t)=>{if("false"!==e.dataset.breadcrumb){let a=[`<li class="breadcrumb-item"><a href="#${t.default}">Home</a></li>`];const n=App.currentLinkParents(e);for(const e of n){const t=App.originalMenuName(e.innerHTML);e.classList.contains("treeview-toggle")?a.push(`<li class="breadcrumb-item"><a href="javascript:void(0)">${t}</a></li>`):a.push(`<li class="breadcrumb-item active" aria-current="page">${t}</li>`)}return`\n      <nav aria-label="breadcrumb" class="main-breadcrumb">\n        <ol class="breadcrumb">\n          ${a.join("\n")}\n        </ol>\n      </nav>`}},App.ajax=e=>{const t=location.href.split("#").splice(1).join("#");if(t){const a=menu.querySelector('a[href="#'+t.split("?")[0].split("/")[0]+'"]');if(App.loadURL(t+window.location.search,a,e),a&&App.updateMenu(a),document.querySelector(".main-navbar")){const e=document.querySelector('.main-navbar a[href="#'+t.split("?")[0].split("/")[0]+'"]');e&&App.updateMenuTop(e)}document.title=a?App.originalMenuName(a.innerHTML):document.title}else window.location.hash=menu.querySelector('a[href="#'+e.default+'"]').getAttribute("href");window.onhashchange=()=>App.ajax(e),App.ajaxReload=()=>{App.ajax(e)},document.querySelector("#refreshPage")&&(refreshPage.onclick=e=>{App.ajaxReload(),e.preventDefault()})};