!function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=100)}({100:function(e,t){for(var i=[{label:"xs",value:0},{label:"sm",value:580},{label:"md",value:768},{label:"lg",value:992},{label:"xl",value:1200},{label:"xxl",value:3e3}],n=[],o=0;o<i.length;o++)n.push(i[o].label);var s=window.innerWidth;function r(e,t){clearTimeout(e.timeId),e.timeId=setTimeout((function(){e()}),t)}function a(e){this.selector=e,this.isMinified=!1,this.isSticky=!1,this.element=document.getElementById(e),this.header=document.getElementById("hdr"),this.wrapper=document.getElementById("header"),this.inner=document.getElementById("header-inner"),this.customTopOffest=200}function c(){var e=document.getElementById("header-top-region"),t=e?e.offsetHeight:0,i=document.getElementsByClassName("header-inner"),n=i.length>0?i[0].offsetHeight:0,o=document.getElementById("offcanvas-content"),s=document.getElementById("header");if(s&&s.classList.contains("header-minify")&&o)o.style.marginTop="".concat(n,"px");else{var r=t+n;o&&(o.style.marginTop="".concat(r,"px"))}}a.prototype.handleScroll=function(){var e=document.body.classList.contains("page-no-scrolling");if(!document.body.classList.contains("page-overlay-on")&&!e){var t=this.wrapper.offsetHeight+this.wrapper.offsetTop;window.scrollY>t?this.minify():this.unminify(),window.scrollY>t+this.customTopOffest?this.sticky():this.unsticky()}},a.prototype.handleResize=function(){this.setWrapper();var e=window.innerWidth;e!==s&&(this.setState(),this.handleScroll(),s=e)},a.prototype.minify=function(){this.isMinified||(this.isMinified=!0,this.element.dataset.isMinified=!0,this.wrapper.classList.add("header-minify"))},a.prototype.unminify=function(){this.isMinified&&(this.isMinified=!1,this.element.dataset.isMinified=!1,this.wrapper.classList.remove("header-minify"))},a.prototype.sticky=function(){this.isSticky||(this.isSticky=!0,this.element.dataset.isSticky=!0,this.wrapper.classList.add("header-sticky"))},a.prototype.unsticky=function(){this.isSticky&&(this.isSticky=!1,this.element.dataset.isSticky=!1,this.wrapper.classList.remove("header-sticky"))},a.prototype.setState=function(){var e=function(){for(var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=0;t<i.length;t++){var n=i[t].value,o=1e4;if(i[t+1]&&(o=i[t+1].value),e>=n&&e<o)return i[t].label}return!1}();this.isTablet=!1,this.isMobile=!1,this.isDesktop=!1,"lg"===e||"xl"===e||"xxl"===e?this.isDesktop=!0:"md"===e?this.isTablet=!0:"sm"!==e&&"xs"!==e||(this.isMobile=!0)},a.prototype.setListeners=function(){var e=this;window.addEventListener("scroll",(function(){r((function(){e.handleScroll()}),100)})),window.addEventListener("resize",(function(){r((function(){e.handleResize()}),100)}))},a.prototype.setWrapper=function(){this.wrapper.style.height="".concat(this.header.offsetHeight,"px"),this.wrapper.style.maxHeight="".concat(this.header.offsetHeight,"px")},a.prototype.constructMe=function(){this.setWrapper(),this.setState(),this.setListeners()},document.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("offcanvas-content"),t=document.getElementById("ham"),i=document.querySelector(".hd-offc-open"),n=document.querySelector("#mmright-upper a[href='/loginregister']");e&&t&&(e.addEventListener("show.bs.offcanvas",(function(){var e=t.querySelector("i"),o=null==i?void 0:i.querySelector("i");e&&(e.className="far fa-times-circle"),n&&(n.style.opacity=0),o&&(o.style.opacity=0)})),e.addEventListener("hide.bs.offcanvas",(function(){var e=t.querySelector("i"),o=null==i?void 0:i.querySelector("i");e&&(e.className="fas fa-bars"),n&&(n.style.opacity=100),o&&(o.style.opacity=100)})))})),function(e,t){e.behaviors.pageMinfier={attach:function(e){c(),window.addEventListener("resize",c),window.addEventListener("click",c),console.log("Loaded -- Page minifier"),t("headerMinifier","html",document).forEach((function(e){document.getElementById("hdr")&&new a("hdr").constructMe()}))}}}(Drupal,once)}});
//# sourceMappingURL=minifier.js.map