Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),function(){var e=function(e){return e.replace(/^\s+|\s+$/g,"")},t=function(e){return RegExp("(^|\\s+)"+e+"(\\s+|$)")},o=function(e,t,o){for(var s=0;s{e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.boxSizing="border-box",e.style.height=e.offsetHeight+"px",e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout(()=>{e.style.display=null,e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},t)},bloghashSlideDown=(e,t=500)=>{e.style.removeProperty("display");let o=window.getComputedStyle(e).display;"none"===o&&(o="block"),e.style.display=o;let s=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.boxSizing="border-box",e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=s+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},t)},bloghashScrollTo=function(){var e={tolerance:0,duration:800,easing:"easeOutQuart",container:window,callback:function e(){}};function t(e,t,o,s){return e/=s,-o*(--e*e*e*e-1)+t}function o(e,t){var o={};return Object.keys(e).forEach(function(t){o[t]=e[t]}),Object.keys(t).forEach(function(e){o[e]=t[e]}),o}function s(e){return e instanceof HTMLElement?e.scrollTop:e.pageYOffset}function n(){var s=0h||0>l&&t{Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;0<=--o&&t.item(o)!==this;);return -1{var e,t,o;!document.body.classList.contains("bloghash-is-mobile")&&(o=window.innerWidth,document.querySelectorAll(".sub-menu").forEach(s=>{s.style.visibility="visible";let n=s.getBoundingClientRect();e=(t=n.left+window.pageXOffset)+n.width,s.removeAttribute("style"),e>o?s.closest("li").classList.add("opens-left"):0>t&&s.closest("li").classList.add("opens-right")}))},r=e=>{var t;return function(){var o=arguments;t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(function(){e.apply(this,o)})}},l=()=>{null!==e&&(450{if(bloghash_vars["sticky-header"].enabled){var e,t,o=document.getElementById("bloghash-header"),s=document.getElementById("bloghash-header-inner"),n=document.getElementById("wpadminbar");if((document.body.classList.contains("bloghash-header-layout-3")||document.body.classList.contains("bloghash-header-layout-4")||document.body.classList.contains("bloghash-header-layout-6"))&&(o=document.querySelector("#bloghash-header .bloghash-nav-container"),s=document.querySelector("#bloghash-header .bloghash-nav-container .bloghash-container")),window.outerWidth<=bloghash_vars["responsive-breakpoint"])var o=document.getElementById("bloghash-header"),s=document.getElementById("bloghash-header-inner");if(null!==o&&null!==s){var l=o.getBoundingClientRect().bottom,a=0>=l-e;e=null===n?0:600>=window.outerWidth?0:n.getBoundingClientRect().height;var i=function(){e=null===n?0:600>=window.outerWidth?0:n.getBoundingClientRect().height,a=0>=(l=o.getBoundingClientRect().bottom)-e,c()},c=function(){let e=bloghash_vars["sticky-header"].hide_on;e.includes("desktop")&&992<=window.innerWidth&&(a=!1),e.includes("tablet")&&481<=window.innerWidth&&992>window.innerWidth&&(a=!1),e.includes("mobile")&&481>window.innerWidth&&(a=!1),a?document.body.classList.contains("bloghash-sticky-header")||((t=document.createElement("div")).setAttribute("id","bloghash-sticky-placeholder"),t.style.height=s.getBoundingClientRect().height+"px",o.appendChild(t),document.body.classList.add("bloghash-sticky-header"),document.body.style.setProperty("--bloghash-sticky-h-offset",o.offsetHeight+20+"px")):(document.body.classList.contains("bloghash-sticky-header")&&(document.body.classList.remove("bloghash-sticky-header"),document.getElementById("bloghash-sticky-placeholder").remove()),document.body.style.removeProperty("--bloghash-sticky-h-offset"))};"true"!==o.getAttribute("data-scroll-listener")&&(window.addEventListener("scroll",function(){r(i())}),o.setAttribute("data-scroll-listener","true")),"true"!==o.getAttribute("data-resize-listener")&&(window.addEventListener("resize",function(){r(i())}),o.setAttribute("data-resize-listener","true")),bloghashTriggerEvent(window,"scroll")}}},i=()=>{let e=new bloghashScrollTo({tolerance:null===document.getElementById("wpadminbar")?0:document.getElementById("wpadminbar").getBoundingClientRect().height}),t=document.getElementsByClassName("bloghash-smooth-scroll");for(var o=0;o{document.body.classList.contains("bloghash-menu-accessibility")&&document.querySelectorAll(".bloghash-nav").forEach(e=>{e.querySelectorAll("ul").forEach(e=>{e.parentNode.setAttribute("aria-haspopup","true")}),e.querySelectorAll("a").forEach(e=>{e.addEventListener("focus",h,!0),e.addEventListener("blur",h,!0)})})};function h(){for(var e=this;!e.classList.contains("bloghash-nav");)"li"===e.tagName.toLowerCase()&&(e.classList.contains("hovered")?e.classList.remove("hovered"):e.classList.add("hovered")),e=e.parentElement}var d=()=>{document.body.addEventListener("keydown",function(e){document.body.classList.add("using-keyboard")}),document.body.addEventListener("mousedown",function(e){document.body.classList.remove("using-keyboard")})},u=()=>{document.body.style.setProperty("--bloghash-screen-width",document.body.clientWidth+"px")},g=()=>{var e=null;document.querySelectorAll(".bloghash-nav .menu-item-has-children").forEach(e=>{e.addEventListener("mouseenter",function(){document.querySelectorAll(".menu-item-has-children").forEach(e=>{e.classList.remove("hovered")})})}),document.querySelectorAll(".bloghash-nav .menu-item-has-children").forEach(t=>{t.addEventListener("mouseleave",function(){t.classList.add("hovered"),null!==e&&(clearTimeout(e),e=null),e=setTimeout(()=>{t.classList.remove("hovered"),t.querySelectorAll(".menu-item-has-children").forEach(e=>{e.classList.remove("hovered")})},700)})})},b=()=>{var e=null;document.querySelectorAll(".bloghash-header-widget__cart .bloghash-widget-wrapper").forEach(e=>{e.addEventListener("mouseenter",function(){e.classList.remove("dropdown-visible")})}),document.querySelectorAll(".bloghash-header-widget__cart .bloghash-widget-wrapper").forEach(t=>{t.addEventListener("mouseleave",function(){t.classList.add("dropdown-visible"),null!==e&&(clearTimeout(e),e=null),e=setTimeout(()=>{t.classList.remove("dropdown-visible")},700)})})},m=()=>{var e=document.querySelectorAll(".bloghash-search");if(0!==e.length){e.forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),e.classList.contains("bloghash-active")?s(e):o(e)})}),document.querySelectorAll(".bloghash-search-close").forEach(e=>e.addEventListener("click",function(t){t.preventDefault(),e.classList.contains("bloghash-active")||(s(document.querySelector(".bloghash-search")),document.querySelector(".bloghash-search").focus())}));var o=function(e){document.querySelectorAll(".bloghash-search-form").forEach(function(e){if(!e)return!1;document.addEventListener("keydown",function(t){var o,s,n,r,l,a;s="input, a, button",r=(n=e.querySelectorAll(s))[n.length-1],o=n[0],l=9===t.keyCode,(a=t.shiftKey)||!l||r!==document.activeElement||(t.preventDefault(),o.focus()),a&&l&&o===document.activeElement&&(t.preventDefault(),r.focus())})}),document.body.classList.add("bloghash-search-visible"),setTimeout(function(){e.classList.add("bloghash-active"),null!==e.nextElementSibling&&null!==e.nextElementSibling.querySelector("input")&&(e.nextElementSibling.querySelector("input").focus(),e.nextElementSibling.querySelector("input").select())},100),document.addEventListener("keydown",n),t.addEventListener("click",r)},s=function(e){document.body.classList.remove("bloghash-search-visible"),e.classList.remove("bloghash-active"),document.removeEventListener("keydown",n),t.removeEventListener("click",r)},n=function(e){27==e.keyCode&&document.querySelectorAll(".bloghash-search").forEach(e=>{s(e)})},r=function(e){null===e.target.closest(".bloghash-search-container")&&null===e.target.closest(".bloghash-search")&&document.querySelectorAll(".bloghash-search").forEach(e=>{s(e)})}}},y=()=>{var e=t,o=document.querySelector("#bloghash-header-inner .bloghash-nav");document.querySelectorAll(".bloghash-mobile-nav > button").forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),document.body.parentNode.classList.contains("is-mobile-menu-active")?n():s()},!1)});var s=function(t){var s=document.querySelectorAll(".site-header");document.body.classList.contains("bloghash-is-mobile")&&s.forEach(function(e){if(!e)return!1;document.addEventListener("keydown",function(t){var o,s,n,r,l,a,i;s=".bloghash-nav a, .bloghash-nav button",r=(n=e.querySelectorAll(s))[n.length-1],o=n[0],l=9===t.keyCode,a=t.shiftKey,i=document.querySelector(".bloghash-hamburger-bloghash-primary-nav"),!a&&l&&r===document.activeElement&&(t.preventDefault(),i.focus()),a&&l&&o===document.activeElement&&(t.preventDefault(),i.focus()),l&&o===r&&t.preventDefault()})}),document.body.parentNode.classList.add("is-mobile-menu-active"),document.addEventListener("keyup",l),null!==e&&e.addEventListener("click",r),document.querySelectorAll("#bloghash-header .bloghash-nav").forEach(e=>{e.addEventListener("click",a)}),bloghashSlideDown(o,350)},n=function(t){document.body.parentNode.classList.remove("is-mobile-menu-active"),document.removeEventListener("keyup",l),null!==e&&e.removeEventListener("click",r),document.querySelectorAll("#bloghash-header .bloghash-nav > ul > .bloghash-open").forEach(e=>{i(e)}),o.querySelectorAll(".hovered").forEach(e=>{e.classList.remove("hovered")}),document.body.classList.contains("bloghash-is-mobile")?(document.querySelectorAll("#bloghash-header .bloghash-nav").forEach(e=>{e.removeEventListener("click",a)}),bloghashSlideUp(o,250)):o.style.display=null},r=function(e){null===e.target.closest(".bloghash-hamburger")&&null===e.target.closest(".site-navigation")&&n()},l=function(e){27==e.keyCode&&n()},a=function(e){e.target.parentElement.querySelectorAll(".sub-menu").length&&(e.preventDefault(),"button"===e.target.type&&i(e.target.parentElement))},i=e=>{e.classList.contains("bloghash-open")?(e.classList.remove("bloghash-open"),e.querySelectorAll(".sub-menu").forEach(e=>{bloghashSlideUp(e,350)}),e.querySelectorAll("li").forEach(e=>{e.classList.remove("bloghash-open"),e.querySelectorAll(".sub-menu").forEach(e=>{bloghashSlideUp(e,350)})})):(e.querySelectorAll(".sub-menu").forEach(t=>{e===t.parentElement&&bloghashSlideDown(t,350)}),e.classList.add("bloghash-open"))};document.addEventListener("bloghash-close-mobile-menu",n)},p=(e=0)=>{if(null!==document.getElementById("bloghash-preloader")){var t=()=>{!document.body.classList.contains("bloghash-loaded")&&(document.body.classList.add("bloghash-loading"),setTimeout(function(){document.body.classList.replace("bloghash-loading","bloghash-loaded"),bloghashTriggerEvent(document.body,"bloghash-preloader-done")},250))};return 0{if(document.body.classList.contains("bloghash-has-comments-toggle")&&null!=document.getElementById("bloghash-comments-toggle")){var e=e=>{void 0!==e&&e.preventDefault(),document.body.classList.contains("comments-visible")?(document.body.classList.remove("comments-visible"),document.getElementById("bloghash-comments-toggle").querySelector("span").innerHTML=bloghash_vars.strings.comments_toggle_show):(document.body.classList.add("comments-visible"),document.getElementById("bloghash-comments-toggle").querySelector("span").innerHTML=bloghash_vars.strings.comments_toggle_hide)};null!==document.getElementById("bloghash-comments-toggle")&&(-1!==location.href.indexOf("#comment")||-1!==location.href.indexOf("respond"))&&e(),document.getElementById("bloghash-comments-toggle").addEventListener("click",e)}},f=()=>{var e=document.querySelector(".single .comments-link");null!==e&&e.addEventListener("click",function(e){document.body.classList.contains("bloghash-has-comments-toggle")&&!document.body.classList.contains("comments-visible")&&document.getElementById("bloghash-comments-toggle").click()})},E=()=>{window.innerWidth<=bloghash_vars["responsive-breakpoint"]?document.body.classList.add("bloghash-is-mobile"):document.body.classList.contains("bloghash-is-mobile")&&(document.body.classList.remove("bloghash-is-mobile"),bloghashTriggerEvent(document,"bloghash-close-mobile-menu"))},L=e=>{if(!e)return;let t=JSON.parse(e.dataset.swiperOptions);if(e.classList.contains("swiper-top")){let o=document.querySelector(".swiper-bottom");if(o){let s=JSON.parse(o.dataset.swiperOptions),n=new Swiper(o,s);t.thumbs={swiper:n}}}new Swiper(e,t)},$=()=>{document.getElementById("bloghash-time")&&(document.getElementById("bloghash-time").textContent=new Date().toLocaleTimeString()),document.getElementById("bloghash-date")&&(document.getElementById("bloghash-date").textContent=new Date().toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric"}))},S=()=>{let e=document.body.classList.contains("rtl")?"right":"left",t=document.querySelector(".bloghash-ticker.one-ticker");if(t){let o=new Marquee(t.querySelector(".ticker-slider-wrap"),{speed:50,duration:14e3,gap:0,delayBeforeStart:0,direction:e,duplicated:!0,startVisible:!0,pauseOnHover:!0});t.addEventListener("click",e=>{let t=e.target.closest(".ticker-slider-pause")?.querySelector("i");t&&(t.classList.toggle("fa-pause"),t.classList.toggle("fa-play"),o.toggle())})}};document.addEventListener("DOMContentLoaded",function(){p(5e3),c(),d(),l(),i(),g(),v(),m(),y(),E(),n(),f(),b(),a(),u(),document.querySelectorAll(".bloghash-swiper:not(.swiper-bottom)").forEach(L),document.querySelectorAll(".bloghash-swiper.swiper-bottom").forEach(L),setInterval($,1e3),$(),S()}),window.addEventListener("load",function(){p()}),window.addEventListener("scroll",function(){r(l())}),window.addEventListener("resize",function(){r(n()),r(E()),r(u())}),bloghashTriggerEvent(document.body,"bloghash-ready"),window.bloghash=window.bloghash||{},window.bloghash.preloader=p,window.bloghash.stickyHeader=a,window.App={},App.config={headroom:{enabled:!0,options:{classes:{initial:"headroom",pinned:"is-pinned",unpinned:"is-unpinned",top:"is-top",notTop:"is-not-top",bottom:"is-bottom",notBottom:"is-not-bottom",frozen:"is-frozen"}}},ajax:{enabled:!0},cursorFollower:{enabled:!0,disableBreakpoint:"992"}},App.html=document.querySelector("html"),App.body=document.querySelector("body"),window.onload=()=>{App.config.cursorFollower?.enabled&&k.init()};let k=(()=>{let e=document.querySelector(".bloghash-js-cursor"),t,o,s,n=-100,r=-100,l,a,i,c=!1,h=()=>{e&&([t,o,s]=[".bloghash-js-follower",".bloghash-js-label",".bloghash-js-icon"].map(t=>e.querySelector(t)),[l,a]=[e.offsetWidth/2,e.offsetHeight/2])},d=()=>{document.addEventListener("mousedown",()=>e.classList.add("is-mouse-down")),document.addEventListener("mouseup",()=>e.classList.remove("is-mouse-down")),document.addEventListener("mousemove",({clientX:e,clientY:t})=>([n,r]=[e,t]))},u=()=>{e.style.transform=`translate(${n-l}px, ${r-a}px)`,requestAnimationFrame(u)},g=({target:t})=>{let n=(o,s,n)=>{if(t.getAttribute(n))return App.body.classList.add(o),e.classList.add(s),t.getAttribute(n)};e.classList.add("is-active"),o.innerHTML=n("is-cursor-active","has-label","data-cursor-label")||"",s.innerHTML=n("is-cursor-active","has-icon","data-cursor-icon")||""},b=()=>{["is-cursor-active","is-active","has-label","has-icon"].forEach(t=>e.classList.remove(t)),[o.innerHTML,s.innerHTML]=["",""]},m=()=>{i?.forEach(e=>e.removeEventListener("mouseenter",g)),(i=document.querySelectorAll("button, a, input, [data-cursor], [data-cursor-label], [data-cursor-icon], textarea")).forEach(e=>{e.addEventListener("mouseenter",g),e.addEventListener("mouseleave",b)})},y=()=>{let t=()=>{c=(window.innerWidth||screen.width)>=App.config.cursorFollower?.disableBreakpoint,e.classList.toggle("is-enabled",c),c?m():i.forEach(e=>e.removeEventListener("mouseenter",g))};t(),window.addEventListener("resize",t)};return{init(){e&&(h(),c=!0,e.classList.add("is-enabled"),d(),requestAnimationFrame(u),m(),y())},update:m,clear:()=>i?.forEach(e=>e.removeEventListener("mouseenter",g)),hide:()=>e?.classList.add("is-hidden"),show:()=>e?.classList.remove("is-hidden")}})();document.querySelectorAll(".bloghash-darkmode").forEach(e=>{let t="dark"===localStorage.getItem("darkmode");document.documentElement.setAttribute("data-darkmode",t?"dark":"light"),t&&e.classList.add("active"),e.addEventListener("click",()=>{let t=e.classList.contains("active");document.documentElement.setAttribute("data-darkmode",t?"light":"dark"),localStorage.setItem("darkmode",t?"light":"dark"),e.classList.toggle("active")})})}();