var Site=Site||{},metaKeys;Site.Header=function(){const u=document.querySelectorAll(".header-approach-list-item");let t,n;const f=n=>n.toLowerCase().replace(/^\/|\/$/g,""),s=()=>{const n=f(location.pathname),t=document.querySelectorAll(".header-menu-items a");t.forEach(t=>{const i=f(t.getAttribute("href"));n.startsWith(i)&&t.classList.add("selected")})},e=function(n){n.target!==t&&o(!1)},i=function(){if(n.classList.contains("active")){const i=t.getBoundingClientRect();n.style.top=i.top+i.height+"px";n.style.left=i.left+"px"}},o=r=>{t.classList.toggle("active",r),n.classList.toggle("active",r),i(),r?(document.addEventListener("click",e),window.addEventListener("resize",i)):(document.removeEventListener("click",e),window.removeEventListener("resize",i))},h=()=>{(t=document.getElementById("select-approach"),n=document.getElementById("approach-list"),t&&n)&&t.addEventListener("click",t=>{t.stopPropagation();const i=n.classList.contains("active");o(!i)})},c=()=>{const n=document.getElementById("header-drawer-toggle"),t=document.getElementById("header-drawer");n&&t&&(n.onclick=()=>{const i=n.classList.toggle("active"),r="dx-icon "+(i?"dx-icon-close":"dx-icon-menu");n.querySelector("i").className=r;t.classList.toggle("active")})},r=()=>{const n=window.location.hash;u.forEach(t=>{const i=new URL(t.href);i.hash=n;t.href=i})},l=()=>{const n=JSON.parse(document.getElementById("header-links").innerText);u.forEach(t=>{const i=t.dataset.framework,r=n[i];t.href=r})};this.updateState=()=>{l(),r()};this.init=()=>{h(),c(),r(),setTimeout(()=>{s()},300),window.addEventListener("hashchange",r)}};document.addEventListener("DOMContentLoaded",()=>{Site.header=Site.header||new Site.Header,Site.header.init()});Site=Site||{};metaKeys=["Alt","AltGraph","AltLeft","AltRight","Control","ControlLeft","ControlRight","Meta","MetaLeft","MetaRight","Shift","ShiftLeft","ShiftRight"];Site.Search=function(){const t=".search-item-conteiner",n=document.querySelector(t),e=document.querySelector(t+" .search"),s=document.querySelector(t+" .found-content"),i=document.querySelector(t+" .search-content"),r=()=>i.value!=="",o=t=>{n.classList.toggle("active",t)},u=()=>document.body.clientWidth<=700,f=()=>n.classList.contains("expand");(()=>{s.onclick=t=>{u()&&(f()?f()&&i.value===""&&n.classList.toggle("expand",!1):n.classList.toggle("expand",!0),t.stopPropagation())},i.oninput=n=>{o(r()),n.stopPropagation()},e.onsubmit=n=>{const t=()=>{n.preventDefault(),n.returnValue=!1};if(u()){if(i.value!=="")return;(f()||!r())&&t()}r()||t()},e.onreset=t=>{o(!1),u()&&n.classList.toggle("expand",!1),t.stopPropagation()}})()}