var astraGetParents=function(elem, selector){
var parents=[];
for(; elem&&elem!==document; elem=elem.parentNode){
if(selector){
if(elem.matches(selector) ){
parents.push(elem);
}}else{
parents.push(elem);
}}
return parents;
};
var astraToggleClass=function(el, className){
if(el.classList.contains(className) ){
el.classList.remove(className);
}else{
el.classList.add(className);
}};
var astraTriggerEvent=function astraTriggerEvent(el, typeArg){
var customEventInit =
arguments.length > 2&&arguments[2]!==undefined ? arguments[2]:{};
var event=new CustomEvent(typeArg, customEventInit);
el.dispatchEvent(event);
};
astraSmoothScroll=function astraSmoothScroll(e, top){
e.preventDefault();
window.scrollTo({
top: top,
left: 0,
behavior: 'smooth'
});
};
astScrollToTopHandler=function(masthead, astScrollTop){
var content=getComputedStyle(astScrollTop).content,
device=astScrollTop.dataset.onDevices;
content=content.replace(/[^0-9]/g, '');
if('both'==device||('desktop'==device&&'769'==content)||('mobile'==device&&''==content) ){
var  scrollTop=window.pageYOffset||document.body.scrollTop;
if(masthead&&masthead.length){
if(scrollTop > masthead.offsetHeight + 100){
astScrollTop.style.display="block";
}else{
astScrollTop.style.display="none";
}}else{
if(window.pageYOffset > 300){
astScrollTop.style.display="block";
}else{
astScrollTop.style.display="none";
}}
}else{
astScrollTop.style.display="none";
}};
(function(){
var menu_toggle_all=document.querySelectorAll('#masthead .main-header-menu-toggle'),
main_header_masthead=document.getElementById('masthead'),
menu_click_listeners_nav={},
mobileHeaderType='',
body=document.body,
mobileHeader='';
if(undefined!==main_header_masthead&&null!==main_header_masthead){
mobileHeader=main_header_masthead.querySelector("#ast-mobile-header");
}
if(''!==mobileHeader&&null!==mobileHeader){
mobileHeaderType=mobileHeader.dataset.type;
}
document.addEventListener('astMobileHeaderTypeChange', updateHeaderType, false);
function updateHeaderType(e){
mobileHeaderType=e.detail.type;
var popupTrigger=document.querySelectorAll('.menu-toggle');
if('dropdown'===mobileHeaderType){
document.getElementById('ast-mobile-popup').classList.remove('active', 'show');
updateTrigger('updateHeader');
}
if('off-canvas'===mobileHeaderType){
popupTrigger.forEach(function (trigger){
if(trigger&&trigger.classList.contains('toggled')){
trigger.click();
}});
}
init(mobileHeaderType);
}
function syncToggledClass(){
const buttons=document.querySelectorAll('.menu-toggle');
const allToggled=Array.from(buttons).every(button=> button.classList.contains('toggled'));
buttons.forEach(button=> {
if(allToggled){
button.classList.remove('toggled');
button.setAttribute('aria-expanded', 'false');
}else{
button.classList.add('toggled');
button.setAttribute('aria-expanded', 'true');
}});
}
document.addEventListener('click', function (e){
const button=e.target.closest('.menu-toggle');
if(button&&mobileHeaderType==='dropdown'){
if(typeof astraAddon==='undefined'){
button.classList.toggle('toggled');
syncToggledClass();
}
const isToggled=button.classList.contains('toggled');
button.setAttribute('aria-expanded', isToggled ? 'true':'false');
}});
popupTriggerClick=function(event){
var triggerType=event.currentTarget.trigger_type;
var popupWrap=document.getElementById('ast-mobile-popup');
if(! body.classList.contains('ast-popup-nav-open') ){
body.classList.add('ast-popup-nav-open');
}
if(! body.classList.contains('ast-main-header-nav-open')&&'mobile'!==triggerType){
body.classList.add('ast-main-header-nav-open');
}
if(! document.documentElement.classList.contains('ast-off-canvas-active') ){
document.documentElement.classList.add('ast-off-canvas-active');
}
if('desktop'===triggerType){
popupWrap.querySelector('.ast-mobile-popup-content').style.display='none';
popupWrap.querySelector('.ast-desktop-popup-content').style.display='block';
}
if('mobile'===triggerType){
popupWrap.querySelector('.ast-desktop-popup-content').style.display='none';
popupWrap.querySelector('.ast-mobile-popup-content').style.display='block';
}
if(event&&event.currentTarget&&event.currentTarget.style){
event.currentTarget.style.display='none';
}
popupWrap.classList.add('active', 'show');
const menuToggleClose=document.getElementById('menu-toggle-close');
menuToggleClose?.focus();
}
function updateTrigger(currentElement){
mobileHeader=main_header_masthead.querySelector("#ast-mobile-header");
var parent_li_sibling='';
if(undefined!==mobileHeader&&null!==mobileHeader&&'dropdown'===mobileHeader.dataset.type&&'updateHeader'!==currentElement){
return;
}
if(undefined!==currentElement&&'updateHeader'!==currentElement){
parent_li_sibling=currentElement.closest('.ast-mobile-popup-inner').querySelectorAll('.menu-item-has-children');
}else{
var popup=document.querySelector('#ast-mobile-popup');
parent_li_sibling=popup.querySelectorAll('.menu-item-has-children');
}
parent_li_sibling.forEach((li_sibling)=> {
li_sibling.classList.remove('ast-submenu-expanded');
const all_sub_menu=Array.from(li_sibling.querySelectorAll('.sub-menu'));
all_sub_menu.forEach((sub_menu)=> {
if(!sub_menu.hasAttribute('data-initial-display')){
sub_menu.setAttribute('data-initial-display', window.getComputedStyle(sub_menu).display);
}
if(sub_menu.getAttribute('data-initial-display')==='block'){
sub_menu.style.display='block';
}else{
sub_menu.style.display='none';
}});
});
var popupTrigger=document.querySelectorAll('.menu-toggle');
document.body.classList.remove('ast-main-header-nav-open', 'ast-popup-nav-open');
document.documentElement.classList.remove('ast-off-canvas-active');
for(var item=0;  item < popupTrigger.length; item++){
popupTrigger[item].classList.remove('toggled');
popupTrigger[item].setAttribute('aria-expanded', 'false');
popupTrigger[item].style.display='flex';
}}
function init(mobileHeaderType){
var popupTriggerMobile=document.querySelectorAll('#ast-mobile-header .menu-toggle');
var popupTriggerDesktop=document.querySelectorAll('#ast-desktop-header .menu-toggle');
if(undefined===mobileHeaderType&&null!==main_header_masthead){
mobileHeader=main_header_masthead.querySelector("#ast-mobile-header");
if(mobileHeader){
mobileHeaderType=mobileHeader.dataset.type;
}else{
var desktopHeader=main_header_masthead.querySelector("#ast-desktop-header");
if(desktopHeader){
mobileHeaderType=desktopHeader.dataset.toggleType;
}else{
return;
}}
}
if('off-canvas'===mobileHeaderType){
var popupClose=document.getElementById('menu-toggle-close'),
popupInner=document.querySelector('.ast-mobile-popup-inner');
if(undefined===popupInner||null===popupInner){
return;
}
popupLinks=popupInner.getElementsByTagName('a');
document.removeEventListener('keydown', astraOffcanvasTrapTabKey);
function astraOffcanvasTrapTabKey(e){
let popup=document.getElementById('ast-mobile-popup');
if(! popup||! popup.classList.contains('active')||e.key!=='Tab'){
return;
}
let focusableElements=popupInner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
);
focusableElements=Array.prototype.filter.call(focusableElements, function(element){
return (
element.offsetWidth > 0&&element.offsetHeight > 0&&window.getComputedStyle(element).visibility!=='hidden'
);
});
if(focusableElements.length===0) return;
let firstElement=focusableElements[ 0 ];
let lastElement=focusableElements[ focusableElements.length - 1 ];
if(e.shiftKey&&document.activeElement===firstElement){
e.preventDefault();
lastElement.focus();
}else if(! e.shiftKey&&document.activeElement===lastElement){
e.preventDefault();
firstElement.focus();
}}
document.addEventListener('keydown', astraOffcanvasTrapTabKey);
function removeAstraOffcanvasTrap(){
document.removeEventListener('keydown', astraOffcanvasTrapTabKey);
}
if(popupClose){
popupClose.addEventListener('click', removeAstraOffcanvasTrap);
}
document.addEventListener('keyup', function(event){
if(event.key==='Escape'){
removeAstraOffcanvasTrap();
}});
document.addEventListener('click', function(event){
let target=event.target;
let modal=document.querySelector('.ast-mobile-popup-drawer.active .ast-mobile-popup-overlay');
if(target===modal){
removeAstraOffcanvasTrap();
}});
for(var item=0; item < popupTriggerMobile.length; item++){
popupTriggerMobile[ item ].removeEventListener('click', astraNavMenuToggle, false);
popupTriggerMobile[ item ].removeEventListener('click', popupTriggerClick);
popupTriggerMobile[ item ].addEventListener('click', function(event){
event.currentTarget.setAttribute('aria-expanded', 'true');
popupTriggerClick(event);
const menu=document.querySelector('.ast-mobile-popup-drawer.active');
if(!menu){
removeAstraOffcanvasTrap();
}}, false);
popupTriggerMobile[ item ].trigger_type='mobile';
}
for(var item=0; item < popupTriggerDesktop.length; item++){
popupTriggerDesktop[ item ].removeEventListener('click', astraNavMenuToggle, false);
popupTriggerDesktop[ item ].removeEventListener('click', popupTriggerClick);
popupTriggerDesktop[ item ].addEventListener('click', function(event){
event.currentTarget.setAttribute('aria-expanded', 'true');
popupTriggerClick(event);
}, false);
popupTriggerDesktop[ item ].trigger_type='desktop';
}
const menuToggleButton=document.querySelector('.ast-button-wrap .menu-toggle');
popupClose.addEventListener('click', function(e){
document.getElementById('ast-mobile-popup').classList.remove('active', 'show');
updateTrigger(this);
if(window.self===window.top){
menuToggleButton?.focus();
}});
document.addEventListener('keyup', function(event){
if(event.key==='Escape'){
event.preventDefault();
document.getElementById('ast-mobile-popup').classList.remove('active', 'show');
updateTrigger();
menuToggleButton?.focus();
}});
document.addEventListener('click', function(event){
var target=event.target;
var modal=document.querySelector('.ast-mobile-popup-drawer.active .ast-mobile-popup-overlay');
if(target===modal){
document.getElementById('ast-mobile-popup').classList.remove('active', 'show');
updateTrigger();
menuToggleButton?.focus();
}});
for(let link=0, len=popupLinks.length; link < len; link++){
if(null!==popupLinks[ link ].getAttribute('href') &&
(popupLinks[ link ].getAttribute('href').startsWith('#') ||
-1!==popupLinks[ link ].getAttribute('href').search('#') ) &&
(! popupLinks[ link ].parentElement.classList.contains('menu-item-has-children') ||
(popupLinks[ link ].parentElement.classList.contains('menu-item-has-children') &&
document.querySelector('header.site-header').classList.contains('ast-builder-menu-toggle-icon') ))
){
popupLinks[ link ].addEventListener('click', triggerToggleClose, true);
popupLinks[ link ].headerType='off-canvas';
}}
AstraToggleSetup();
}else if('dropdown'===mobileHeaderType){
var mobileDropdownContent=document.querySelectorAll('.ast-mobile-header-content')||false,
desktopDropdownContent=document.querySelector('.ast-desktop-header-content')||false;
if(mobileDropdownContent.length > 0){
for(let index=0; index < mobileDropdownContent.length; index++){
var mobileLinks=mobileDropdownContent[ index ].getElementsByTagName('a');
for(link=0, len=mobileLinks.length; link < len; link++){
const isNotInsideTabsContainer=mobileLinks[ link ].closest('.wp-block-uagb-tabs')===null;
if(null!==mobileLinks[ link ].getAttribute('href') &&
(mobileLinks[ link ].getAttribute('href').startsWith('#') ||
-1!==mobileLinks[ link ].getAttribute('href').search('#') ) &&
(! mobileLinks[ link ].parentElement.classList.contains('menu-item-has-children') ||
(mobileLinks[ link ].parentElement.classList.contains('menu-item-has-children') &&
document.querySelector('header.site-header').classList.contains('ast-builder-menu-toggle-icon') )) &&
isNotInsideTabsContainer
){
mobileLinks[ link ].addEventListener('click', triggerToggleClose, true);
mobileLinks[ link ].headerType='dropdown';
}}
}}
if(desktopDropdownContent){
var desktopLinks=desktopDropdownContent.getElementsByTagName('a');
for(link=0, len=desktopLinks.length; link < len; link++){
desktopLinks[ link ].addEventListener('click', triggerToggleClose, true);
desktopLinks[ link ].headerType='dropdown';
}}
for(var item=0; item < popupTriggerMobile.length; item++){
popupTriggerMobile[ item ].removeEventListener('click', popupTriggerClick, false);
popupTriggerMobile[ item ].removeEventListener('click', astraNavMenuToggle);
popupTriggerMobile[ item ].addEventListener('click', astraNavMenuToggle, false);
popupTriggerMobile[ item ].trigger_type='mobile';
}
for(var item=0; item < popupTriggerDesktop.length; item++){
popupTriggerDesktop[ item ].removeEventListener('click', popupTriggerClick, false);
popupTriggerDesktop[ item ].removeEventListener('click', astraNavMenuToggle);
popupTriggerDesktop[ item ].addEventListener('click', astraNavMenuToggle, false);
popupTriggerDesktop[ item ].trigger_type='desktop';
}
AstraToggleSetup();
}}
function triggerToggleClose(event){
var headerType=event.currentTarget.headerType;
switch(headerType){
case 'dropdown':
var popupTrigger=document.querySelectorAll('.menu-toggle.toggled');
for(var item=0;  item < popupTrigger.length; item++){
popupTrigger[item].click();
}
break;
case 'off-canvas':
var popupClose=document.getElementById('menu-toggle-close');
popupClose.click();
break;
default:
break;
}}
window.addEventListener('load', function(){
init();
});
document.addEventListener('astLayoutWidthChanged', function(){
init();
});
document.addEventListener('astPartialContentRendered', function(){
menu_toggle_all=document.querySelectorAll('.main-header-menu-toggle');
body.classList.remove("ast-main-header-nav-open");
document.addEventListener('astMobileHeaderTypeChange', updateHeaderType, false);
init();
});
var mobile_width=(null!==navigator.userAgent.match(/Android/i)&&'Android'===navigator.userAgent.match(/Android/i)[0]) ? window.visualViewport.width:window.innerWidth;
function AstraHandleResizeEvent(){
var menu_offcanvas_close=document.getElementById('menu-toggle-close');
var menu_dropdown_close=document.querySelector('.menu-toggle.toggled');
var desktop_header_content=document.querySelector('#masthead > #ast-desktop-header .ast-desktop-header-content');
var elementor_editor=document.querySelector('.elementor-editor-active');
if(desktop_header_content){
desktop_header_content.style.display='none';
}
var mobileResizeWidth=(null!==navigator.userAgent.match(/Android/i)&&'Android'===navigator.userAgent.match(/Android/i)[0]) ? window.visualViewport.width:window.innerWidth;
if(mobileResizeWidth!==mobile_width){
if(menu_dropdown_close&&null===elementor_editor){
menu_dropdown_close.click();
}
document.body.classList.remove('ast-main-header-nav-open', 'ast-popup-nav-open');
if(menu_offcanvas_close&&null==elementor_editor){
menu_offcanvas_close.click();
}}
updateHeaderBreakPoint();
AstraToggleSetup();
}
window.addEventListener('resize', function(){
if('INPUT'!==document.activeElement.tagName){
AstraHandleResizeEvent();
}});
document.addEventListener('DOMContentLoaded', function (){
AstraToggleSetup();
var containerButton;
if(body.classList.contains('ast-header-break-point')){
containerButton=document.getElementById('ast-mobile-header');
}else{
containerButton=document.getElementById('ast-desktop-header');
}
if(null!==containerButton){
var containerMenu=containerButton.querySelector('.navigation-accessibility');
navigation_accessibility(containerMenu, containerButton);
}});
var get_window_width=function (){
return document.documentElement.clientWidth;
}
var updateHeaderBreakPoint=function (){
var ww=get_window_width();
var break_point=astra.break_point;
if(ww > break_point||0===ww){
if(menu_toggle_all.length > 0){
for (var i=0; i < menu_toggle_all.length; i++){
if(null!==menu_toggle_all[i]){
menu_toggle_all[i].classList.remove('toggled');
}}
}
body.classList.remove("ast-header-break-point");
body.classList.add("ast-desktop");
astraTriggerEvent(body, "astra-header-responsive-enabled");
}else{
body.classList.add("ast-header-break-point");
body.classList.remove("ast-desktop");
astraTriggerEvent(body, "astra-header-responsive-disabled")
}}
updateHeaderBreakPoint();
body.classList.add('ast-header-loaded');
AstraToggleSubMenu=function(event){
event.preventDefault();
if('false'===event.target.getAttribute('aria-expanded')||! event.target.getAttribute('aria-expanded')){
event.target.setAttribute('aria-expanded', 'true');
}else{
event.target.setAttribute('aria-expanded', 'false');
}
var parent_li=this.parentNode;
if(parent_li.classList.contains('ast-submenu-expanded')&&document.querySelector('header.site-header').classList.contains('ast-builder-menu-toggle-link')){
if(!this.classList.contains('ast-menu-toggle')){
var link=parent_li.querySelector('a').getAttribute('href');
if(''!==link&&'#'!==link){
window.location=link;
}}
}
var parent_li_child=parent_li.querySelectorAll('.menu-item-has-children');
for (var j=0; j < parent_li_child.length; j++){
parent_li_child[j].classList.remove('ast-submenu-expanded');
var parent_li_child_sub_menu=parent_li_child[j].querySelector('.sub-menu, .children');
if(null!==parent_li_child_sub_menu){
parent_li_child_sub_menu.style.display='none';
}}
var parent_li_sibling=parent_li.parentNode.querySelectorAll('.menu-item-has-children');
for (var j=0; j < parent_li_sibling.length; j++){
if(parent_li_sibling[j]!=parent_li){
parent_li_sibling[j].classList.remove('ast-submenu-expanded');
var all_sub_menu=parent_li_sibling[j].querySelectorAll('.sub-menu');
for (var k=0; k < all_sub_menu.length; k++){
all_sub_menu[k].style.display='none';
}}
}
if(parent_li.classList.contains('menu-item-has-children')){
astraToggleClass(parent_li, 'ast-submenu-expanded');
if(parent_li.classList.contains('ast-submenu-expanded')){
parent_li.querySelector('.sub-menu').style.display='block';
}else{
parent_li.querySelector('.sub-menu').style.display='none';
}}
};
AstraToggleSetup=function (){
if(typeof astraAddon!='undefined'&&typeof astraToggleSetupPro==="function"){
astraToggleSetupPro(mobileHeaderType, body, menu_click_listeners_nav);
}else{
var flag=false;
var menuToggleAllLength;
if('off-canvas'===mobileHeaderType||'full-width'===mobileHeaderType){
var __main_header_all=document.querySelectorAll('#ast-mobile-popup, #ast-mobile-header');
var menu_toggle_all=document.querySelectorAll('#ast-mobile-header .main-header-menu-toggle');
menuToggleAllLength=menu_toggle_all.length;
}else{
var __main_header_all=document.querySelectorAll('#ast-mobile-header'),
menu_toggle_all=document.querySelectorAll('#ast-mobile-header .main-header-menu-toggle');
menuToggleAllLength=menu_toggle_all.length;
flag=menuToggleAllLength > 0 ? false:true;
menuToggleAllLength=flag ? 1:menuToggleAllLength;
}
if(menuToggleAllLength > 0||flag){
for (var i=0; i < menuToggleAllLength; i++){
if(! flag){
menu_toggle_all[i].setAttribute('data-index', i);
if(! menu_click_listeners_nav[i]){
menu_click_listeners_nav[i]=menu_toggle_all[i];
menu_toggle_all[i].removeEventListener('click', astraNavMenuToggle);
menu_toggle_all[i].addEventListener('click', astraNavMenuToggle, false);
}}
if('undefined'!==typeof __main_header_all[i]){
for(var mainHeaderCount=0; mainHeaderCount  < __main_header_all.length; mainHeaderCount++){
if(document.querySelector('header.site-header').classList.contains('ast-builder-menu-toggle-link')){
var astra_menu_toggle=__main_header_all[mainHeaderCount].querySelectorAll('ul.main-header-menu .menu-item-has-children > .menu-link, ul.main-header-menu .ast-menu-toggle');
}else{
var astra_menu_toggle=__main_header_all[mainHeaderCount].querySelectorAll('ul.main-header-menu .ast-menu-toggle');
}
if(astra_menu_toggle.length > 0){
for (var j=0; j < astra_menu_toggle.length; j++){
astra_menu_toggle[j].removeEventListener('click', AstraToggleSubMenu);
astra_menu_toggle[j].addEventListener('click', AstraToggleSubMenu, false);
}}
}}
}}
}};
astraNavMenuToggle=function(event){
if(typeof astraAddon!='undefined'){
astraNavMenuTogglePro(event, body, mobileHeaderType, this);
}else{
event.preventDefault();
var __main_header_all=document.querySelectorAll('#masthead > #ast-mobile-header .main-header-bar-navigation');
menu_toggle_all=document.querySelectorAll('#masthead > #ast-mobile-header .main-header-menu-toggle')
var event_index='0';
if(null!==this.closest('#ast-fixed-header') ){
__main_header_all=document.querySelectorAll('#ast-fixed-header > #ast-mobile-header .main-header-bar-navigation');
menu_toggle_all=document.querySelectorAll('#ast-fixed-header .main-header-menu-toggle')
event_index='0';
}
if('undefined'===typeof __main_header_all[event_index]){
return false;
}
var menuHasChildren=__main_header_all[event_index].querySelectorAll('.menu-item-has-children');
for (var i=0; i < menuHasChildren.length; i++){
menuHasChildren[i].classList.remove('ast-submenu-expanded');
var menuHasChildrenSubMenu=menuHasChildren[i].querySelectorAll('.sub-menu');
for (var j=0; j < menuHasChildrenSubMenu.length; j++){
menuHasChildrenSubMenu[j].style.display='none';
}}
var menu_class=this.getAttribute('class')||'';
if(menu_class.indexOf('main-header-menu-toggle')!==-1){
astraToggleClass(__main_header_all[event_index], 'toggle-on');
astraToggleClass(menu_toggle_all[event_index], 'toggled');
if(__main_header_all[event_index].classList.contains('toggle-on')){
__main_header_all[event_index].style.display='block';
body.classList.add("ast-main-header-nav-open");
}else{
__main_header_all[event_index].style.display='';
body.classList.remove("ast-main-header-nav-open");
}}
}};
body.addEventListener("astra-header-responsive-enabled", function (){
var __main_header_all=document.querySelectorAll('.main-header-bar-navigation');
if(__main_header_all.length > 0){
for (var i=0; i < __main_header_all.length; i++){
if(null!=__main_header_all[i]){
__main_header_all[i].classList.remove('toggle-on');
__main_header_all[i].style.display='';
}
var sub_menu=__main_header_all[i].getElementsByClassName('sub-menu');
for (var j=0; j < sub_menu.length; j++){
sub_menu[j].style.display='';
}
var child_menu=__main_header_all[i].getElementsByClassName('children');
for (var k=0; k < child_menu.length; k++){
child_menu[k].style.display='';
}
var searchIcons=__main_header_all[i].getElementsByClassName('ast-search-menu-icon');
for (var l=0; l < searchIcons.length; l++){
searchIcons[l].classList.remove('ast-dropdown-active');
searchIcons[l].style.display='';
}}
}}, false);
var SearchIcons=document.getElementsByClassName('astra-search-icon');
for (var i=0; i < SearchIcons.length; i++){
SearchIcons[i].onclick=function(event){
if(this.classList.contains('slide-search') ){
event.preventDefault();
var sibling=this.parentNode.parentNode.parentNode.querySelector('.ast-search-menu-icon');
if(! sibling.classList.contains('ast-dropdown-active') ){
sibling.classList.add('ast-dropdown-active');
sibling.querySelector('.search-field').setAttribute('autocomplete','off');
setTimeout(function(){
sibling.querySelector('.search-field').focus();
},200);
}else{
var searchTerm=sibling.querySelector('.search-field').value||'';
if(''!==searchTerm){
sibling.querySelector('.search-form').submit();
}
sibling.classList.remove('ast-dropdown-active');
}}
}}
var SearchInputs=document.querySelectorAll('.search-field');
SearchInputs.forEach(input=> {
input.addEventListener('focus', function (e){
var sibling=this.parentNode.parentNode.parentNode.querySelector('.ast-search-menu-icon');
if(sibling){
astraToggleClass(sibling, 'ast-dropdown-active');
}});
input.addEventListener('blur', function (e){
var sibling=this.parentNode.parentNode.parentNode.querySelector('.ast-search-menu-icon');
if(sibling){
sibling.classList.remove('ast-dropdown-active');
astraToggleClass(sibling, 'ast-dropdown-active');
}});
});
body.onclick=function(event){
if(typeof event.target.classList!=='undefined'){
if(! event.target.classList.contains('ast-search-menu-icon')&&! event.target.closest('.ast-search-menu-icon')&&! event.target.closest('.ast-search-icon') ){
var dropdownSearchWrap=document.getElementsByClassName('ast-search-menu-icon');
for (var i=0; i < dropdownSearchWrap.length; i++){
dropdownSearchWrap[i].classList.remove('ast-dropdown-active');
}}
}}
function navigation_accessibility(containerMenu, containerButton){
if(!containerMenu||!containerButton){
return;
}
var button=containerButton.getElementsByTagName('button')[0]||containerButton.getElementsByTagName('a')[0];
if(!button||(button.classList.contains('astra-search-icon'))){
return;
}
var menu=containerMenu.getElementsByTagName('ul')[0];
if(!menu){
if(!button.classList.contains('custom-logo-link')){
button.style.display='none';
}
return;
}
if(!menu.className.includes('nav-menu')){
menu.className +=' nav-menu';
}
document.addEventListener('DOMContentLoaded', function (){
if('off-canvas'===mobileHeaderType){
var popupClose=document.getElementById('menu-toggle-close');
if(popupClose){
popupClose.onclick=function (){
var toggled=containerMenu.className.includes('toggled');
containerMenu.className=toggled ? containerMenu.className.replace(' toggled', ''):containerMenu.className + ' toggled';
button.setAttribute('aria-expanded', toggled ? 'false':'true');
menu.setAttribute('aria-expanded', toggled ? 'false':'true');
};}}
});
button.onclick=function (){
var toggled=containerMenu.className.includes('toggled');
containerMenu.className=toggled ? containerMenu.className.replace(' toggled', ''):containerMenu.className + ' toggled';
button.setAttribute('aria-expanded', toggled ? 'false':'true');
menu.setAttribute('aria-expanded', toggled ? 'false':'true');
};
if(!astra.is_header_footer_builder_active){
var links=menu.getElementsByTagName('a');
var subMenus=menu.getElementsByTagName('ul');
for (var i=0, len=subMenus.length; i < len; i++){
subMenus[i].parentNode.setAttribute('aria-haspopup', 'true');
}
for (var i=0, len=links.length; i < len; i++){
links[i].addEventListener('focus', toggleFocus, true);
links[i].addEventListener('blur', toggleFocus, true);
links[i].addEventListener('click', toggleClose, true);
}}
if(astra.is_header_footer_builder_active){
tabNavigation();
}}
function tabNavigation(){
const dropdownToggleLinks=document.querySelectorAll('nav.site-navigation .menu-item-has-children > a .ast-header-navigation-arrow');
const siteNavigationSubMenu=document.querySelectorAll('nav.site-navigation .sub-menu');
const menuLi=document.querySelectorAll('nav.site-navigation .menu-item-has-children');
const megaMenuFullWidth=document.querySelectorAll('.astra-full-megamenu-wrapper');
if(dropdownToggleLinks){
dropdownToggleLinks.forEach(element=> {
element.addEventListener('keydown', function (e){
if('Enter'===e.key||' '===e.key){
if(/Mobi|Android|iPad|iPhone/i.test(navigator.userAgent) ){
e.preventDefault();
e.stopPropagation();
}
const closestLi=e.target.closest('li');
const subMenu=closestLi.querySelector('.sub-menu');
const isMegaMenu=subMenu&&subMenu.classList.contains('astra-megamenu');
setTimeout(()=> {
if(!isMegaMenu){
subMenu.classList.toggle('toggled-on');
closestLi.classList.toggle('ast-menu-hover');
}else{
const fullMegaMenuWrapper=closestLi.querySelector('.astra-full-megamenu-wrapper');
if(subMenu) subMenu.classList.toggle('astra-megamenu-focus');
if(fullMegaMenuWrapper) fullMegaMenuWrapper.classList.toggle('astra-megamenu-wrapper-focus');
closestLi.classList.toggle('ast-menu-hover');
}
const ariaExpanded=e.target.getAttribute('aria-expanded');
e.target.setAttribute('aria-expanded', ariaExpanded==='false'||!ariaExpanded ? 'true':'false');
}, 10);
}});
});
if(siteNavigationSubMenu||menuLi){
document.addEventListener('click', function (e){
closeNavigationMenu(siteNavigationSubMenu, dropdownToggleLinks, menuLi, megaMenuFullWidth);
}, false);
document.addEventListener('keydown', function (e){
if('Escape'===e.key){
closeNavigationMenu(siteNavigationSubMenu, dropdownToggleLinks, menuLi, megaMenuFullWidth);
}}, false);
}}
const allParentMenu=document.querySelectorAll('nav.site-navigation .ast-nav-menu > .menu-item-has-children > a .ast-header-navigation-arrow');
if(allParentMenu){
allParentMenu.forEach(element=> {
element.addEventListener('keydown', function (e){
if(!e.target.closest('li').classList.contains('ast-menu-hover')&&'Enter'===e.key){
closeNavigationMenu(siteNavigationSubMenu, dropdownToggleLinks, menuLi, megaMenuFullWidth);
}}, false);
});
}
const desktopMenu=document.querySelectorAll('#ast-desktop-header .ast-builder-layout-element.ast-builder-menu');
desktopMenu.forEach(menu=> {
const desktopMenuItems=menu.querySelectorAll('.main-header-menu .menu-item > a');
desktopMenuItems.forEach(( item)=> {
item.addEventListener('focusout', function(e){
const nextFocus=e.relatedTarget;
const nextFocusMenuItem=nextFocus ? nextFocus.closest('.menu-item'):null;
const currentFocus=e.target;
const currentMenuItem=currentFocus.closest('.menu-item');
const subMenuOpened=currentMenuItem.classList.contains('ast-menu-hover');
const subMenu=currentMenuItem.querySelector('.sub-menu');
const wrapperSubmenu=currentMenuItem.closest('.sub-menu')
const parentMenuItem=currentMenuItem.closest('.sub-menu')?.closest('.menu-item-has-children');
const childMenuItem=currentMenuItem.querySelector('.menu-item');
if(currentMenuItem==nextFocusMenuItem ||
(childMenuItem&&childMenuItem==nextFocusMenuItem)
){
return;
}
if(nextFocusMenuItem==null){
if(wrapperSubmenu)
recursiveMenuCloseOnblur(wrapperSubmenu);
if(subMenu)
recursiveMenuCloseOnblur(subMenu);
return;
}
if(currentMenuItem.nextElementSibling==nextFocusMenuItem ||
currentMenuItem.previousElementSibling==nextFocusMenuItem
){
if(subMenuOpened){
recursiveMenuCloseOnblur(subMenu, false);
currentMenuItem.classList.remove('ast-menu-hover');
}
return;
}
if(parentMenuItem&&parentMenuItem==nextFocusMenuItem){
childSubMenu=currentMenuItem.querySelector('.sub-menu');
recursiveMenuCloseOnblur(childSubMenu, false);
return;
}
let tempParent=parentMenuItem;
let subMenuCloseEnd=null;
while(tempParent!=null){
if(tempParent.nextElementSibling==nextFocusMenuItem){
subMenuCloseEnd=tempParent.querySelector('.sub-menu');
break;
}
tempParent=tempParent.closest('.sub-menu')?.closest('.menu-item-has-children');
}
if(wrapperSubmenu)
recursiveMenuCloseOnblur(wrapperSubmenu, true, subMenuCloseEnd);
});
});
});
}
function recursiveMenuCloseOnblur(submenu, recursive=true, bubblingEnd=null){
submenu.classList.remove('toggled-on');
submenu.classList.remove('astra-megamenu-focus');
const toggle=submenu.closest('.menu-item-has-children').querySelector('.ast-header-navigation-arrow');
if(toggle){
toggle.setAttribute('aria-expanded', 'false');
}
if(bubblingEnd){
recursive=true;
}
if(! recursive){
return;
}
const parentSubmenu=submenu.parentElement.closest('.sub-menu');
if(null!==parentSubmenu&&submenu!==bubblingEnd){
recursiveMenuCloseOnblur(parentSubmenu, true, bubblingEnd);
}}
function closeNavigationMenu(siteNavigationSubMenu, dropdownToggleLinks, menuLi, megaMenuFullWidth){
if(siteNavigationSubMenu){
siteNavigationSubMenu.forEach(element=> {
element.classList.remove('astra-megamenu-focus');
element.classList.remove('toggled-on');
});
}
if(menuLi){
menuLi.forEach(element=> {
element.classList.remove('ast-menu-hover');
});
}
if(megaMenuFullWidth){
megaMenuFullWidth.forEach(element=> {
element.classList.remove('astra-megamenu-wrapper-focus')
});
}
if(dropdownToggleLinks){
dropdownToggleLinks.forEach(element=> {
element.setAttribute('aria-expanded', 'false');
});
}}
function toggleClose(){
var self=this||'',
hash='#';
if(self&&! self.classList.contains('astra-search-icon')&&null===self.closest('.ast-builder-menu')){
var link=String(self);
if(link.indexOf(hash)!==-1){
var link_parent=self.parentNode;
if(body.classList.contains('ast-header-break-point')){
if(!(document.querySelector('header.site-header').classList.contains('ast-builder-menu-toggle-link')&&link_parent.classList.contains('menu-item-has-children')) ){
var builder_header_menu_toggle=document.querySelector('.main-header-menu-toggle');
builder_header_menu_toggle.classList.remove('toggled');
var main_header_bar_navigation=document.querySelector('.main-header-bar-navigation');
main_header_bar_navigation.classList.remove('toggle-on');
main_header_bar_navigation.style.display='none';
astraTriggerEvent(document.querySelector('body'), 'astraMenuHashLinkClicked');
}}else{
while(-1===self.className.indexOf('nav-menu') ){
if('li'===self.tagName.toLowerCase()){
if(-1!==self.className.indexOf('focus') ){
self.className=self.className.replace(' focus', '');
}}
self=self.parentElement;
}}
}}
}
function toggleFocus(){
var self=this;
while(-1===self.className.indexOf('navigation-accessibility') ){
if('li'===self.tagName.toLowerCase()){
self.classList.toggle('focus');
}
self=self.parentElement;
}}
if(! astra.is_header_footer_builder_active){
if('querySelector' in document&&'addEventListener' in window){
body.addEventListener('mousedown', function(){
body.classList.add('ast-mouse-clicked');
});
body.addEventListener('keydown', function(){
body.classList.remove('ast-mouse-clicked');
});
}}
if(astra.is_scroll_to_id){
const getOffsetTop=(element)=> {
let offsetTop=0;
while (element){
offsetTop +=element.offsetTop;
element=element.offsetParent;
}
return offsetTop;
}
const scrollToIDHandler=(e, hash=null)=> {
let offset=0;
const siteHeader=document.querySelector('.site-header');
if(siteHeader){
const stickyHeaders=siteHeader.querySelectorAll('div[data-stick-support]'
);
if(stickyHeaders.length > 0){
stickyHeaders.forEach(( header)=>(offset +=header.clientHeight) );
}else if(typeof astraAddon!=='undefined'&&!(Number(astraAddon.sticky_hide_on_scroll)&&! document?.querySelector('.ast-header-sticked') )){
const fixedHeader=document.querySelector('#ast-fixed-header');
if(fixedHeader){
offset=fixedHeader?.clientHeight;
if(Number(astraAddon?.header_main_shrink) ){
const headers=fixedHeader?.querySelectorAll('.ast-above-header-wrap, .ast-below-header-wrap'
);
headers?.forEach(()=>(offset -=10) );
}}
}
const href=hash ? hash:e.target?.closest('a').hash;
if(href){
const scrollId=document.querySelector(href);
if(scrollId){
const elementOffsetTop=getOffsetTop(scrollId);
if(typeof astraAddon!=='undefined'&&Number(astraAddon.sticky_hide_on_scroll)&&window?.scrollY  < elementOffsetTop){
offset=0;
}
const scrollOffsetTop=elementOffsetTop - offset;
if(scrollOffsetTop){
astraSmoothScroll(e, scrollOffsetTop);
}}
}}
}
let hashLinks=[];
const links=document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger):not(.skip-link):not(.nav-links a):not([href*="tab-"])'
);
if(links){
for (const link of links){
if(link.href.split("#")[0]!==location.href.split("#")[0]){
hashLinks.push({
hash: link.hash,
url: link.href.split("#")[0],
});
}else if(link.hash!==""){
link.addEventListener("click", scrollToIDHandler);
}}
}
window.addEventListener('DOMContentLoaded', (event)=> {
for (let link of hashLinks){
if(window.location.href.split('#')[0]===link.url){
const siteHeader=document.querySelector('.site-header');
let offset=0;
const headerHeight=siteHeader.querySelectorAll('div[data-stick-support]');
if(headerHeight){
headerHeight.forEach(single=> {
offset +=single.clientHeight;
});
}
const scrollId=document.querySelector(link.hash);
if(scrollId){
const scrollOffsetTop=getOffsetTop(scrollId) - offset;
if(scrollOffsetTop){
astraSmoothScroll(event, scrollOffsetTop);
}}
}}
if(location.hash){
setTimeout(()=> scrollToIDHandler(new Event('click'), location.hash), 750);
}});
}
if(astra.is_scroll_to_top){
var masthead=document.querySelector('#page header');
var astScrollTop=document.getElementById('ast-scroll-top');
astScrollToTopHandler(masthead, astScrollTop);
window.addEventListener('scroll', function (){
astScrollToTopHandler(masthead, astScrollTop);
});
astScrollTop.onclick=function(e){
astraSmoothScroll(e, 0);
};
astScrollTop.addEventListener('keydown' , function(e){
if(e.key==='Enter'){
astraSmoothScroll(e, 0);
}});
}
if(astra?.is_dark_palette){
document.documentElement.classList.add("astra-dark-mode-enable");
}else{
document.documentElement.classList.remove("astra-dark-mode-enable");
}
window.addEventListener('DOMContentLoaded', (event)=> {
const isHangOverTopNotice=document.querySelector('.ast-woocommerce-store-notice-hanged');
const adjustBodyHeight=()=> {
const storeNotice=document.querySelector('.woocommerce-store-notice[data-position="hang-over-top"]');
document.body.style.paddingTop=`${storeNotice?.clientHeight||0}px`;
}
if(isHangOverTopNotice){
window.addEventListener('resize', adjustBodyHeight);
setTimeout(()=> adjustBodyHeight(), 0);
}
document
.querySelector('.woocommerce-store-notice__dismiss-link')
?.addEventListener('click', ()=> {
if(typeof wp==='undefined'||! wp?.customize){
document.body.classList.remove('ast-woocommerce-store-notice-hanged');
window.removeEventListener('resize', adjustBodyHeight);
document.body.style.paddingTop=0;
}});
});
})();
document.addEventListener('DOMContentLoaded', function (){
const submenuToggles=document.querySelectorAll('.menu-link .dropdown-menu-toggle');
const menuItemsWithSubmenu=document.querySelectorAll('.menu-item-has-children > a');
menuItemsWithSubmenu.forEach(item=> {
item.addEventListener('keydown', function(event){
if(event.key==='Enter'){
const submenu=item.nextElementSibling;
if(submenu&&submenu.classList.contains('sub-menu')){
submenu.classList.toggle('ast-visible');
const ariaExpanded=item.getAttribute('aria-expanded')==='false' ? 'true':'false';
item.setAttribute('aria-expanded', ariaExpanded);
}}
});
});
submenuToggles.forEach(toggle=> {
toggle.addEventListener('focus', ()=> updateAriaExpanded(toggle));
toggle.addEventListener('blur', ()=> updateAriaExpanded(toggle));
toggle.addEventListener('keydown', event=> {
if(event.key==='Enter'||event.key===' '){
event.preventDefault();
toggleAriaExpanded(toggle);
}});
});
document.addEventListener('keydown', event=> {
if(event.key==='Escape'){
closeAllSubmenus();
}});
function updateAriaExpanded(toggle){
const menuItemLink=toggle.closest('.menu-link');
const submenu=menuItemLink.nextElementSibling;
const isSubmenuVisible=submenu.classList.contains('toggled-on');
menuItemLink.setAttribute('aria-expanded', isSubmenuVisible ? 'true':'false');
}
function toggleAriaExpanded(toggle){
const menuItemLink=toggle.closest('.menu-link');
const currentState=menuItemLink.getAttribute('aria-expanded');
menuItemLink.setAttribute('aria-expanded', currentState==='true' ? 'false':'true');
}
function closeAllSubmenus(){
submenuToggles.forEach(toggle=> updateAriaExpanded(toggle));
}
window.addEventListener('orientationchange', ()=> {
setTimeout(()=> window.dispatchEvent(new Event('resize') ), 50);
});
});
document.addEventListener('DOMContentLoaded', ()=> {
const thumbnailWraps=document.querySelectorAll('.astra-shop-thumbnail-wrap');
thumbnailWraps.forEach(wrap=> {
const focusableElements=wrap.querySelectorAll('a, span');
focusableElements.forEach(el=> {
el.addEventListener('focus', ()=> {
wrap.querySelectorAll('.ast-on-card-button, .ast-quick-view-trigger').forEach(btn=> {
btn.style.opacity='1';
btn.style.visibility='visible';
btn.style.borderStyle='none';
});
});
el.addEventListener('blur', ()=> {
const isAnyFocused=Array.from(focusableElements).some(child=> child===document.activeElement);
if(!isAnyFocused){
wrap.querySelectorAll('.ast-on-card-button, .ast-quick-view-trigger').forEach(btn=> {
btn.style.opacity='';
btn.style.visibility='';
});
}});
});
});
});
!function(){function e(e){var n,t=null===(n=e.get("settings"))||void 0===n?void 0:n.get("form_list");if(t&&"0"!==t){var o=document.querySelector("#elementor-panel");if(o){var i=o.querySelectorAll(".fluentform-edit-link"),r=function(e){var n,t=(null===(n=window.fluentformElementor)||void 0===n?void 0:n.adminUrl)||"/wp-admin/admin.php",o=new URLSearchParams({page:"fluent_forms",route:"editor",form_id:e});return t+"?"+o.toString()}(t);i.forEach(function(e){e.href=r,e.setAttribute("data-form-id",t)})}}}document.addEventListener("DOMContentLoaded",function(){window.elementor&&elementor.hooks&&elementor.hooks.addAction("panel/open_editor/widget/fluent-form-widget",function(n,t){e(t),t.get("settings").on("change:form_list",function(){e(t)})})})}();
(function(){
"use strict";
var wp;
(wp||={}).domReady=(()=> {
var __defProp=Object.defineProperty;
var __getOwnPropDesc=Object.getOwnPropertyDescriptor;
var __getOwnPropNames=Object.getOwnPropertyNames;
var __hasOwnProp=Object.prototype.hasOwnProperty;
var __export=(target, all)=> {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps=(to, from, except, desc)=> {
if(from&&typeof from==="object"||typeof from==="function"){
for (let key of __getOwnPropNames(from))
if(!__hasOwnProp.call(to, key)&&key!==except)
__defProp(to, key, { get: ()=> from[key], enumerable: !(desc=__getOwnPropDesc(from, key))||desc.enumerable });
}
return to;
};
var __toCommonJS=(mod)=> __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var index_exports={};
__export(index_exports, {
default: ()=> domReady
});
function domReady(callback){
if(typeof document==="undefined"){
return;
}
if(document.readyState==="complete" ||
document.readyState==="interactive"){
return void callback();
}
document.addEventListener("DOMContentLoaded", callback);
}
return __toCommonJS(index_exports);
})();
if(typeof wp.domReady==='object'&&wp.domReady.default){ wp.domReady=wp.domReady.default; }
(window.wp||={}).domReady=wp.domReady;
})();
(()=>{var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var o in a)e.o(a,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:a[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};(()=>{"use strict";const t=window.wp.domReady;var a=e.n(t);const o=()=>{try{return window.self!==window.top}catch(e){return!0}},n="starter-templates-iframe-preview-data",r=()=>{let e="";const t=document.querySelector(".site-logo-img img");return t&&(e=t.src),e};let s=r();const l=(e,t)=>{if(!e)return"";if(e){const a=e.match(/'([^']+)'/);return a?a[1]:"inherit"===e?t:e}return t||void 0},i=e=>{switch(e.value.param){case"siteLogo":const t=document.querySelectorAll(".site-logo-img img");""===s&&(s=r());let a=e.value.data.url||s;if(a=e.value.data.dataUri||a,0===t.length&&""!==a){const t=document.createElement("span");t.classList.add("site-logo-img");const o=document.createElement("a");o.setAttribute("class","custom-logo-link"),o.setAttribute("href","#"),o.setAttribute("aria-current","page"),t.appendChild(o);const n=document.createElement("img");n.classList.add("custom-logo"),n.setAttribute("src",a),o.appendChild(n);const r=document.getElementById("ast-desktop-header").querySelectorAll(".ast-site-identity")[0],s=r.querySelectorAll(".ast-site-title-wrap")[0];r.insertBefore(t,s);const l=e.value.data.width||"";""!==l&&(n.style.width=l+"px",n.style.maxWidth=l+"px")}else if(""!==a)for(const[o,n]of Object.entries(t)){n.removeAttribute("srcset"),n.setAttribute("src",a);const t=e.value.data.width;""!==t&&(n.style.width=t+"px",n.style.maxWidth=t+"px")}break;case"colorPalette":const o=e.value.data.colors||[],n=starter_templates_zip_preview.AstColorPaletteVarPrefix,i=starter_templates_zip_preview.AstEleColorPaletteVarPrefix;if(0===o.length){document.querySelector("body").classList.remove("starter-templates-preview-palette");const e=document.getElementsByClassName("starter-templates-preview-palette");return void(e.length>0&&e[0].remove())}document.querySelector("body").classList.add("starter-templates-preview-palette");const d=Object.entries(o).map((e,t)=>[`--e-global-color-${i[t].replace(/-/g,"")}: ${e[1]};`,`${n}${t}: ${e[1]};`]).map(e=>e.join("")).join("");let c=document.getElementById("starter-templates-preview-palette-css");c||(c=document.createElement("style"),c.id="starter-templates-preview-palette-css",c.setAttribute("rel","stylesheet"),document.head.appendChild(c)),c.innerHTML=`.starter-templates-preview-palette{ ${d}}`;break;case"siteTypography":if(!Object.keys(e.value.data).length){const e=document.getElementById("starter-templates-typography");return void(e&&e.remove())}(e=>{if(!e)return;if(!document.getElementById("google-fonts-domain")){const e=document.createElement("link");e.id="google-fonts-domain",e.setAttribute("rel","preconnect"),e.setAttribute("href","https://fonts.gstatic.com"),document.head.appendChild(e)}let t=document.getElementById("st-previw-google-fonts-url");t||(t=document.createElement("link"),t.id="st-previw-google-fonts-url",t.setAttribute("rel","stylesheet"),document.head.appendChild(t));const a=[];let o=e["body-font-family"]||"",n=parseInt(e["body-font-weight"])||"";n&&(n=`:wght@${n}`),o&&(o=l(o),o=o.replace(" ","+"),a.push(`family=${o}${n}`));let r=e["headings-font-family"]||"",s=parseInt(e["headings-font-weight"])||"";s&&(s=`:wght@${s}`),r&&(r=l(r,o),r=r.replace(" ","+"),a.push(`family=${r}${s}`));const i=`https://fonts.googleapis.com/css2?${a.join("&")}&display=swap`;t.setAttribute("href",i)})(e.value.data),(e=>{if(!e)return;let t=document.getElementById("starter-templates-typography");t||(t=document.createElement("style"),t.id="starter-templates-typography",t.setAttribute("rel","stylesheet"),document.head.appendChild(t));let a="";a+="body, button, input, select, textarea, .ast-button, .ast-custom-button {",a+="\tfont-family: "+e["body-font-family"]+";",a+="\tfont-weight: "+e["body-font-weight"]+";",a+="\tfont-size: "+e["font-size-body"].desktop+e["font-size-body"]["desktop-unit"]+";",a+="\tline-height: "+e["body-line-height"]+";",a+="}",a+="h1, .entry-content h1, h2, .entry-content h2, h3, .entry-content h3, h4, .entry-content h4, h5, .entry-content h5, h6, .entry-content h6, .site-title, .site-title a {",a+="\tfont-family: "+e["headings-font-family"]+";",a+="\tline-height: "+e["headings-line-height"]+";",a+="\tfont-weight: "+e["headings-font-weight"]+";",a+="}",["h1","h2","h3","h4","h5","h6"].forEach(t=>{const o="inherit"===e["font-family-"+t]?e["headings-font-family"]:e["font-family-"+t],n="inherit"===e["font-weight-"+t]?e["headings-font-weight"]:e["font-weight-"+t];let r="";void 0!==o&&""!==o&&(r+=`${t}, .entry-content ${t} {`,r+="\tfont-family: "+o+";"),void 0!==e["line-height-"+t]&&""!==e["line-height-"+t]&&(r+="\tline-height: "+e["line-height-"+t]+";"),void 0!==n&&""!==n&&(r+="\tfont-weight: "+n+";"),a+=""!==r?r+"}":""}),t.innerHTML=a})(e.value.data);break;case"siteTitle":(e=>{const t=document.getElementById("ast-desktop-header"),a=t&&t.querySelectorAll(".ast-site-identity")[0],o=a&&a.querySelectorAll(".ast-site-title-wrap")[0];o&&(o.style.display=e?"block":"none")})(e.value.data);break;case"clearPreviewAssets":const m=document.getElementById("starter-templates-typography");m&&m.remove(),document.querySelector("body").classList.remove("starter-templates-preview-palette");const p=document.getElementsByClassName("starter-templates-preview-palette");p.length>0&&p[0].remove();break;case"completeOnboarding":localStorage.removeItem("starter-templates-iframe-preview-data")}};window.addEventListener("message",function(e){if(o()&&(console.log("addEventListener message: ",e),"object"==typeof e.data&&"starterTemplatePreviewDispatch"===e.data.call)){const t=e.data;let a=JSON.parse(localStorage.getItem(n));null===a&&(a={},a.data={}),a.data[t.value.param]=t.value.data,delete a.data.clearPreviewAssets,t.url=window.location.origin,a.url=window.location.origin,"cleanStorage"===t.value.param?(delete a.data.cleanStorage,a.data.siteLogo=t.value.data,a.data.colorPalette={},a.data.siteTypography={},Object.keys(a.data).map(e=>i({value:{param:e,data:a.data[e]}}))):i(t),localStorage.setItem(n,JSON.stringify(a))}},!1),a()(()=>{if(!o())return;const e=document.createElement("style");e.id="starter-templates-logo-css",document.getElementsByTagName("head")[0].appendChild(e),e.innerHTML=".site-logo-img img { transition: unset; } #wpadminbar { display: none; } html{  margin-top: 0 !important; }}";const t=(a=n,JSON.parse(localStorage.getItem(a)));var a;t&&Object.keys(t.data).map(e=>i({value:{param:e,data:t.data[e]}}))})})()})();
astraSyncMobileMenuState=function(isOpen){
var containers=document.querySelectorAll('#masthead #ast-mobile-header, #ast-fixed-header #ast-mobile-header');
for(var i=0; i < containers.length; i++){
var nav=containers[i].querySelector('.main-header-bar-navigation');
var btn=containers[i].querySelector('.main-header-menu-toggle');
if(nav){
nav.classList.toggle('toggle-on', isOpen);
nav.style.display=isOpen ? 'block':'';
}
if(btn){
btn.classList.toggle('toggled', isOpen);
btn.setAttribute('aria-expanded', isOpen ? 'true':'false');
}}
document.body.classList.toggle('ast-main-header-nav-open', isOpen);
};
astraToggleSetupPro=function(mobileHeaderType, body, menu_click_listeners){
var flag=false;
var menuToggleAllLength;
if('off-canvas'===mobileHeaderType||'full-width'===mobileHeaderType){
var __main_header_all=document.querySelectorAll('#ast-mobile-popup, #ast-mobile-header');
if(body.classList.contains('ast-header-break-point')){
var menu_toggle_all=document.querySelectorAll('#ast-mobile-header .main-header-menu-toggle');
}else{
menu_toggle_all=document.querySelectorAll('#ast-desktop-header .main-header-menu-toggle');
}
menuToggleAllLength=menu_toggle_all.length;
}else{
if(body.classList.contains('ast-header-break-point')){
var __main_header_all=document.querySelectorAll('#ast-mobile-header'),
menu_toggle_all=document.querySelectorAll('#ast-mobile-header .main-header-menu-toggle');
menuToggleAllLength=menu_toggle_all.length;
flag=menuToggleAllLength > 0 ? false:true;
menuToggleAllLength=flag ? 1:menuToggleAllLength;
}else{
var __main_header_all=document.querySelectorAll('#ast-desktop-header'),
menu_toggle_all=document.querySelectorAll('#ast-desktop-header .main-header-menu-toggle');
menuToggleAllLength=menu_toggle_all.length;
}}
if(menuToggleAllLength > 0||flag){
for (var i=0; i < menuToggleAllLength; i++){
if(!flag){
menu_toggle_all[i].setAttribute('data-index', i);
if(!menu_click_listeners[i]){
menu_click_listeners[i]=menu_toggle_all[i];
menu_toggle_all[i].removeEventListener('click', astraNavMenuToggle);
menu_toggle_all[i].addEventListener('click', astraNavMenuToggle, false);
}}
if('undefined'!==typeof __main_header_all[i]){
for(var mainHeaderCount=0; mainHeaderCount  < __main_header_all.length; mainHeaderCount++){
if(document.querySelector('header.site-header').classList.contains('ast-builder-menu-toggle-link')){
var astra_menu_toggle=__main_header_all[mainHeaderCount].querySelectorAll('ul.main-header-menu .menu-item-has-children > .menu-link, ul.main-header-menu .ast-menu-toggle');
}else{
var astra_menu_toggle=__main_header_all[mainHeaderCount].querySelectorAll('ul.main-header-menu .ast-menu-toggle');
}
if(astra_menu_toggle.length > 0){
for (var j=0; j < astra_menu_toggle.length; j++){
astra_menu_toggle[j].removeEventListener('click', AstraToggleSubMenu);
astra_menu_toggle[j].addEventListener('click', AstraToggleSubMenu, false);
}}
}}
}}
}
astraNavMenuTogglePro=function(event, body, mobileHeaderType, thisObj){
event.preventDefault();
var desktop_header=event.target.closest('#ast-desktop-header');
var desktop_header_content=document.querySelector('#masthead > #ast-desktop-header .ast-desktop-header-content');
if(null!==desktop_header&&undefined!==desktop_header&&''!==desktop_header){
var desktop_toggle=desktop_header.querySelector('.main-header-menu-toggle');
}else{
var desktop_toggle=document.querySelector('#masthead > #ast-desktop-header .main-header-menu-toggle');
}
var desktop_menu=document.querySelector('#masthead > #ast-desktop-header .ast-desktop-header-content .main-header-bar-navigation');
if('desktop'===event.currentTarget.trigger_type){
if(null!==desktop_menu&&''!==desktop_menu&&undefined!==desktop_menu){
astraToggleClass(desktop_menu, 'toggle-on');
if(desktop_menu.classList.contains('toggle-on')){
desktop_menu.style.display='block';
}else{
desktop_menu.style.display='';
}}
astraToggleClass(desktop_toggle, 'toggled');
if(desktop_toggle.classList.contains('toggled') ){
body.classList.add("ast-main-header-nav-open");
if('dropdown'===mobileHeaderType){
desktop_header_content.style.display='block';
}}else{
body.classList.remove("ast-main-header-nav-open");
desktop_header_content.style.display='none';
}
return;
}
var clickedHeader=thisObj.closest('#ast-fixed-header')||document.getElementById('masthead');
if(clickedHeader){
var menuHasChildren=clickedHeader.querySelectorAll('#ast-mobile-header .main-header-bar-navigation .menu-item-has-children');
for(var i=0; i < menuHasChildren.length; i++){
menuHasChildren[i].classList.remove('ast-submenu-expanded');
var subMenus=menuHasChildren[i].querySelectorAll('.sub-menu');
for(var j=0; j < subMenus.length; j++){
subMenus[j].style.display='none';
}}
}
var menu_class=thisObj.getAttribute('class')||'';
if(menu_class.indexOf('main-header-menu-toggle')!==-1){
var nextOpen = ! thisObj.classList.contains('toggled');
astraSyncMobileMenuState(nextOpen);
}}
const accountMenuToggle=function (){
const checkAccountActionTypeCondition=astraAddon.hf_account_action_type&&'menu'===astraAddon.hf_account_action_type;
const accountMenuClickCondition=checkAccountActionTypeCondition&&astraAddon.hf_account_show_menu_on&&'click'===astraAddon.hf_account_show_menu_on;
const headerAccountContainer=document.querySelectorAll('.ast-header-account-wrap');
if(headerAccountContainer){
headerAccountContainer.forEach(element=> {
const accountMenu=element.querySelector('.ast-account-nav-menu');
const handlePointerUp=function(e){
const condition=(accountMenuClickCondition)||(checkAccountActionTypeCondition&&document.querySelector('body').classList.contains('ast-header-break-point'));
if(condition){
if(accountMenu&&!element.contains(e.target) ){
accountMenu.style.right='';
accountMenu.style.left='';
}}
};
if(! element._accountPointerUpHandler){
element._accountPointerUpHandler=handlePointerUp;
document.addEventListener('pointerup', handlePointerUp);
}
const headerAccountTrigger=element.querySelector('.ast-header-account-link');
if(headerAccountTrigger){
const handleAccountClick=function(e){
const condition=(accountMenuClickCondition)||(checkAccountActionTypeCondition&&document.querySelector('body').classList.contains('ast-header-break-point'));
if(condition){
headerSelectionPosition=e.target.closest('.site-header-section');
if(headerSelectionPosition){
if(headerSelectionPosition.classList.contains('site-header-section-left')){
accountMenu.style.left=accountMenu.style.left==='' ? '-100%':'';
accountMenu.style.right=accountMenu.style.right==='' ? 'auto':'';
}else{
accountMenu.style.right=accountMenu.style.right==='' ? '-100%':'';
accountMenu.style.left=accountMenu.style.left==='' ? 'auto':'';
}}
}};
if(! headerAccountTrigger._accountClickHandler){
headerAccountTrigger._accountClickHandler=handleAccountClick;
headerAccountTrigger.addEventListener('click', handleAccountClick);
}}
});
}}
const astraColorSwitcher={
...astraAddon?.colorSwitcher,
init: function (){
if(! this?.isInit){
return;
}
this.switcherButtons=document.querySelectorAll('.ast-builder-color-switcher .ast-switcher-button');
if(! this.switcherButtons?.length){
return;
}
this.switcherButtons?.forEach(( switcherButton)=> {
switcherButton?.addEventListener('click', this.toggle);
});
if(this.isDarkPalette&&this.defaultMode==='system'){
this.detectSystemColorScheme();
}
if(this.isSwitched){
this.switchLogo();
}},
detectSystemColorScheme: function (){
const storedPreference=this.getCookie('astraColorSwitcherState');
if(storedPreference!==null){
return;
}
const prefersDark=window.matchMedia('(prefers-color-scheme: dark)').matches;
if(prefersDark&&! this.isSwitched){
this.toggle();
}},
toggle: function(e){
e?.preventDefault();
const switcher=astraColorSwitcher;
switcher.isSwitched = ! switcher.isSwitched;
switcher.setCookie('astraColorSwitcherState', switcher.isSwitched, 90);
if(switcher?.forceReload){
window.location.reload();
return;
}
switcher.switchPaletteColors();
switcher.switchIcon();
switcher.switchLogo();
if(switcher.isDarkPalette){
switcher.handleDarkModeCompatibility();
}},
switchPaletteColors: function (){
const currentPalette=this.isSwitched ? this?.palettes?.switched:this?.palettes?.default;
currentPalette?.forEach(( color, index)=> {
document.documentElement.style.setProperty(`--ast-global-color-${ index }`, color);
if(astraAddon?.is_elementor_active){
document.documentElement.style.setProperty(`--e-global-color-astglobalcolor${ index }`, color);
}});
},
switchIcon: function (){
this.switcherButtons?.forEach(( switcherButton)=> {
const [ defaultIcon, switchedIcon ]=switcherButton?.querySelectorAll('.ast-switcher-icon');
if(defaultIcon&&switchedIcon){
const [ first, second ]=this.isSwitched ? [ switchedIcon, defaultIcon ]:[ defaultIcon, switchedIcon ];
switcherButton?.classList.add('ast-animate');
setTimeout(()=> {
first?.classList.add('ast-current');
second?.classList.remove('ast-current');
}, 100);
setTimeout(()=> switcherButton?.classList.remove('ast-animate'), 200);
}
const ariaLabelTextKey=this.isSwitched ? 'defaultText':'switchedText';
switcherButton?.setAttribute('aria-label',
switcherButton?.dataset?.[ ariaLabelTextKey ]||'Switch color palette.'
);
});
},
switchLogo: function (){
if(this.isDarkPalette&&this?.logos?.switched&&this?.logos?.default){
this.switchColorSwitcherLogo();
}},
switchColorSwitcherLogo: function (){
const logoSelectors=[
'.custom-logo-link:not(.sticky-custom-logo):not(.transparent-custom-logo) .custom-logo',
'.site-branding .site-logo-img img:not(.ast-sticky-header-logo)',
'.ast-site-identity .site-logo-img img:not(.ast-sticky-header-logo)',
];
let logoImages=[];
for(const selector of logoSelectors){
const foundImages=document.querySelectorAll(selector);
if(foundImages.length > 0){
logoImages=Array.from(foundImages).filter(( img)=> {
return ! img.closest('.ast-sticky-header-logo') &&
! img.closest('.sticky-custom-logo') &&
! img.closest('.transparent-custom-logo') &&
! img.classList.contains('ast-sticky-header-logo');
});
if(logoImages.length > 0){
break;
}}
}
if(! logoImages.length){
return;
}
const targetSrc=this.isSwitched ? this.logos.switched:this.logos.default;
if(! targetSrc){
return;
}
this.updateLogoImages(logoImages, targetSrc);
},
updateLogoImages: function(logoImages, targetSrc){
logoImages.forEach(( logoImg)=> {
if(logoImg&&logoImg.src!==targetSrc){
const newImg=new Image();
newImg.onload=function(){
logoImg.src=targetSrc;
if(logoImg.hasAttribute('srcset') ){
logoImg.removeAttribute('srcset');
}
if(logoImg.hasAttribute('data-src') ){
logoImg.setAttribute('data-src', targetSrc);
}};
newImg.onerror=function(){
logoImg.src=targetSrc;
};
newImg.src=targetSrc;
}});
},
handleDarkModeCompatibility: function (){
document.body.classList.toggle('astra-dark-mode-enable');
},
setCookie:(name, value, days)=> {
const expires=new Date();
expires.setTime(expires.getTime() + days * 24 * 60 * 60 * 1000);
document.cookie=`${ name }=${ value }; expires=${ expires.toUTCString() }; path=/`;
},
getCookie:(name)=> {
const cookies=document.cookie.split('; ');
for(let cookie of cookies){
const [ key, val ]=cookie.split('=');
if(key===name) return val;
}
return null;
},
};
var accountPopupTrigger=function (){
if(typeof astraAddon==='undefined'||'login'!==astraAddon.hf_account_logout_action){
return;
}
var header_account_trigger=document.querySelectorAll('.ast-account-action-login');
if(!header_account_trigger.length){
return;
}
const formWrapper=document.querySelector('#ast-hb-account-login-wrap');
if(!formWrapper){
return;
}
const formCloseBtn=document.querySelector('#ast-hb-login-close');
header_account_trigger.forEach(function(_trigger){
_trigger.addEventListener('click', function(e){
e.preventDefault();
formWrapper.classList.add('show');
});
});
if(formCloseBtn){
formCloseBtn.addEventListener('click', function(e){
e.preventDefault();
formWrapper.classList.remove('show');
});
}};
document.addEventListener('astPartialContentRendered', function(){
accountMenuToggle();
accountPopupTrigger();
});
window.addEventListener('load', function(){
accountMenuToggle();
accountPopupTrigger();
astraColorSwitcher.init();
});
document.addEventListener('astLayoutWidthChanged', function(){
accountMenuToggle();
accountPopupTrigger();
});
document.addEventListener('click', function(e){
var target=e.target.closest('a');
if(! target){
return;
}
var href=target.getAttribute('href');
if(! href||href.indexOf('#')===-1){
return;
}
if(! target.closest('#masthead #ast-mobile-header, #ast-fixed-header #ast-mobile-header') ){
return;
}
setTimeout(function(){
astraSyncMobileMenuState(false);
}, 20);
});
;(function($, window, undefined){
var pluginName='astHookExtSticky',
document=window.document,
windowWidth=jQuery(window).outerWidth(),
viewPortWidth=jQuery(window).width(),
defaults={
dependent:[],
max_width:'',
site_layout:'',
break_point:920,
admin_bar_height_lg:32,
admin_bar_height_sm:46,
admin_bar_height_xs:0,
stick_upto_scroll:0,
gutter:0,
wrap:'<div></div>',
body_padding_support:true,
html_padding_support:true,
active_shrink:false,
shrink:{
padding_top:'',
padding_bottom:'',
},
sticky_on_device:'desktop',
header_style:'none',
hide_on_scroll:'no',
},
lastScrollTop=0,
delta=5,
navbarHeight=0,
should_stick=true,
hideScrollInterval;
function astHookExtSticky(element, options){
this.element=element;
this.options=$.extend({}, defaults, options);
this._defaults=defaults;
this._name=pluginName;
if('1'==this.options.hide_on_scroll){
this.navbarHeight=$(element).outerHeight();
}
this.lastScrollTop=0;
this.delta=5;
this.should_stick=true;
this.hideScrollInterval='';
this.init();
}
astHookExtSticky.prototype.stick_me=function(self, type){
var selector=jQuery(self.element),
windowWidth=jQuery(window).outerWidth(),
stick_upto_scroll=parseInt(self.options.stick_upto_scroll),
max_width=parseInt(selector.parent().attr('data-stick-maxwidth') ),
gutter=parseInt(selector.parent().attr('data-stick-gutter') );
var hook_sticky_header=astraAddon.hook_sticky_header||'';
if('enabled'==hook_sticky_header){
if(( 'desktop'==self.options.sticky_on_device&&astraAddon.hook_custom_header_break_point > windowWidth) ||
('mobile'==self.options.sticky_on_device&&astraAddon.hook_custom_header_break_point <=windowWidth) ){
self.stickRelease(self);
}else{
if(jQuery(window).scrollTop() > stick_upto_scroll){
if('none'==self.options.header_style){
if('enabled'==self.options.active_shrink){
self.hasShrink(self, 'stick');
var topValue='none';
if(!selector.hasClass('ast-custom-header') ){
topValue=gutter;
}
selector.parent().css('min-height', selector.outerHeight());
selector.addClass('ast-header-sticky-active').stop().css({
'max-width': max_width,
'top': topValue,
'padding-top': self.options.shrink.padding_top,
'padding-bottom': self.options.shrink.padding_bottom,
});
selector.addClass('ast-sticky-shrunk').stop();
}else{
self.hasShrink(self, 'stick');
selector.parent().css('min-height', selector.outerHeight());
selector.addClass('ast-header-sticky-active').stop().css({
'max-width': max_width,
'top': gutter,
'padding-top': self.options.shrink.padding_top,
'padding-bottom': self.options.shrink.padding_bottom,
});
selector.addClass('ast-sticky-shrunk').stop();
}}
}else{
self.stickRelease(self);
}}
}
var hook_sticky_footer=astraAddon.hook_sticky_footer||'';
if('enabled'==hook_sticky_footer){
if(('desktop'==self.options.sticky_on_device&&astraAddon.hook_custom_footer_break_point > windowWidth) ||
('mobile'==self.options.sticky_on_device&&astraAddon.hook_custom_footer_break_point <=windowWidth)
){
self.stickRelease(self);
}else{
jQuery('body').addClass('ast-footer-sticky-active');
selector.parent().css('min-height', selector.outerHeight());
selector.stop().css({
'max-width':max_width,
});
}}
}
astHookExtSticky.prototype.update_attrs=function (){
var self=this,
selector=jQuery(self.element),
gutter=parseInt(self.options.gutter),
max_width=self.options.max_width;
if('none'==self.options.header_style){
var stick_upto_scroll=selector.offset().top||0;
}
if('ast-box-layout'!=self.options.site_layout){
max_width=jQuery('body').width();
}
if(self.options.dependent){
jQuery.each(self.options.dependent, function(index, val){
if((jQuery(val).length) &&
(jQuery(val).parent().attr('data-stick-support')=='on')
){
dependent_height=jQuery(val).outerHeight();
gutter            +=parseInt(dependent_height);
stick_upto_scroll -=parseInt(dependent_height);
}});
}
if(self.options.admin_bar_height_lg&&jQuery('#wpadminbar').length&&viewPortWidth > 782){
gutter            +=parseInt(self.options.admin_bar_height_lg);
stick_upto_scroll -=parseInt(self.options.admin_bar_height_lg);
}
if(self.options.admin_bar_height_sm&&jQuery('#wpadminbar').length&&(viewPortWidth >=600&&viewPortWidth <=782) ){
gutter            +=parseInt(self.options.admin_bar_height_sm);
stick_upto_scroll -=parseInt(self.options.admin_bar_height_sm);
}
if(self.options.admin_bar_height_xs&&jQuery('#wpadminbar').length){
gutter            +=parseInt(self.options.admin_bar_height_xs);
stick_upto_scroll -=parseInt(self.options.admin_bar_height_xs);
}
if(self.options.body_padding_support){
gutter            +=parseInt(jQuery('body').css('padding-top'), 10);
stick_upto_scroll -=parseInt(jQuery('body').css('padding-top'), 10);
}
if(self.options.html_padding_support){
gutter            +=parseInt(jQuery('html').css('padding-top'), 10);
stick_upto_scroll -=parseInt(jQuery('html').css('padding-top'), 10);
}
self.options.stick_upto_scroll=stick_upto_scroll;
if('none'==self.options.header_style){
selector.parent()
.css('min-height', selector.outerHeight())
.attr('data-stick-gutter', parseInt(gutter) )
.attr('data-stick-maxwidth', parseInt(max_width) );
}}
astHookExtSticky.prototype.hasShrink=function(self, method){
var st=$(window).scrollTop();
var fixed_header=jQuery(self.element);
if(st > fixed_header.outerHeight()){
jQuery('body').addClass('ast-shrink-custom-header');
}else{
jQuery('body').removeClass('ast-shrink-custom-header');
}}
astHookExtSticky.prototype.stickRelease=function(self){
var selector=jQuery(self.element);
var hook_sticky_header=astraAddon.hook_sticky_header||'';
if('enabled'==hook_sticky_header){
if('none'==self.options.header_style){
selector.removeClass('ast-header-sticky-active').stop().css({
'max-width':'',
'top':'',
'padding':'',
});
selector.parent().css('min-height', '');
selector.removeClass('ast-sticky-shrunk').stop();
}}
var hook_sticky_footer=astraAddon.hook_sticky_footer||'';
if('enabled'==hook_sticky_footer){
jQuery('body').removeClass('ast-footer-sticky-active');
}}
astHookExtSticky.prototype.init=function (){
if(jQuery(this.element) ){
var self=this,
selector=jQuery(self.element),
gutter=parseInt(self.options.gutter),
stick_upto_scroll=selector.position().top||0,
dependent_height=0;
if('none'==self.options.header_style){
selector.wrap(self.options.wrap)
.parent().css('min-height', selector.outerHeight())
.attr('data-stick-support', 'on')
.attr('data-stick-maxwidth', parseInt(self.options.max_width) );
}
self.update_attrs();
jQuery(window).on('resize', function(){
self.stickRelease(self);
self.update_attrs();
self.stick_me(self);
});
jQuery(window).on('scroll', function(){
self.stick_me(self, 'scroll');
});
jQuery(document).ready(function($){
self.stick_me(self);
});
}};
$.fn[pluginName]=function(options){
return this.each(function (){
if(! $.data(this, 'plugin_' + pluginName)){
$.data(this, 'plugin_' + pluginName, new astHookExtSticky(this, options) );
}});
}
var $body=jQuery('body'),
layout_width=$body.width(),
site_layout=astraAddon.site_layout||'',
hook_sticky_header=astraAddon.hook_sticky_header||'',
hook_shrink_header=astraAddon.hook_shrink_header||'';
sticky_header_on_devices=astraAddon.hook_sticky_header_on_devices||'desktop',
site_layout_box_width=astraAddon.site_layout_box_width||1200,
hook_sticky_footer=astraAddon.hook_sticky_footer||'',
sticky_footer_on_devices=astraAddon.hook_sticky_footer_on_devices||'desktop';
switch(site_layout){
case 'ast-box-layout':
layout_width=parseInt(site_layout_box_width);
break;
}
jQuery(document).ready(function($){
if('enabled'==hook_sticky_header){
jQuery('.ast-custom-header').astHookExtSticky({
sticky_on_device: sticky_header_on_devices,
header_style: 'none',
site_layout: site_layout,
max_width: layout_width,
active_shrink: hook_shrink_header,
});
}
if('enabled'==hook_sticky_footer){
jQuery('.ast-custom-footer').astHookExtSticky({
sticky_on_device: sticky_footer_on_devices,
max_width: layout_width,
site_layout: site_layout,
header_style: 'none',
});
}});
}(jQuery, window));
;(function($, window, undefined){
var pluginName='astExtSticky',
document=window.document,
windowWidth=window.innerWidth,
viewPortWidth=jQuery(window).width(),
header_builder_active=astraAddon.header_builder_active,
defaults={
dependent:[],
max_width:'',
site_layout:'',
break_point:920,
admin_bar_height_lg:32,
admin_bar_height_sm:46,
admin_bar_height_xs:0,
stick_upto_scroll:0,
gutter:0,
wrap:'<div></div>',
body_padding_support:true,
html_padding_support:true,
shrink:{
padding_top:'',
padding_bottom:'',
},
sticky_on_device:'desktop',
header_style:'none',
hide_on_scroll:'no',
},
lastScrollTop=0,
delta=5,
navbarHeight=0,
loginPopup=document.querySelector('#ast-hb-account-login-wrap')!==null,
should_stick=true,
hideScrollInterval;
function astExtSticky(element, options){
this.element=element;
this.options=$.extend({}, defaults, options);
this._defaults=defaults;
this._name=pluginName;
if('1'==this.options.hide_on_scroll){
this.navbarHeight=$(element).outerHeight();
}
this.lastScrollTop=0;
this.delta=5;
this.should_stick=true;
this.hideScrollInterval='';
this.init();
}
astExtSticky.prototype.stick_me=function(self, type){
var selector=jQuery(self.element),
windowWidth=window.innerWidth;
stick_upto_scroll=parseInt(self.options.stick_upto_scroll),
max_width=parseInt(selector.parent().attr('data-stick-maxwidth') ),
gutter=parseInt(selector.parent().attr('data-stick-gutter') ),
aboveHeaderSelectorValue=gutter;
if(header_builder_active&&astraAddon.header_main_shrink){
if(( selector.hasClass('ast-stick-primary-below-wrapper')||(selector.hasClass('ast-primary-header') ))&&1==astraAddon.header_above_stick&&gutter > 0){
gutter=gutter - 10;
}
const aboveHeaderBar=document.querySelector('.ast-above-header-bar');
if(astraAddon.header_above_stick==='1'&&aboveHeaderBar!==null){
const aboveHeaderBarHeight=aboveHeaderBar.getBoundingClientRect().height + parseInt(aboveHeaderBar.parentNode.getAttribute('data-stick-gutter') );
if(( selector.hasClass('ast-stick-primary-below-wrapper')||(selector.hasClass('ast-primary-header') ))&&gutter > 0){
gutter=aboveHeaderBarHeight;
}}
}
if((self.options.sticky_on_device==='desktop'&&jQuery('body').hasClass('ast-header-break-point')) ||
(self.options.sticky_on_device==='mobile'&&!jQuery('body').hasClass('ast-header-break-point'))
){
self.stickRelease(self);
}else{
if(stick_upto_scroll < 0){
stick_upto_scroll=0;
}
var stcikyHeaderElementor=document.getElementsByClassName('elementor-motion-effects-parent');
var stickyHeaderFlag=stcikyHeaderElementor.length > 0 ? true:false;
if(jQuery(window).scrollTop() > stick_upto_scroll){
var fixed_header=selector;
if(header_builder_active){
var mobile_parent=selector.closest('.ast-mobile-header-wrap');
var desktop_parent=selector.closest('#ast-desktop-header');
mobile_parent=(0===mobile_parent.length) ? selector.find('.ast-mobile-header-wrap'):mobile_parent;
desktop_parent=(0===desktop_parent.length) ? selector.find('#ast-desktop-header'):desktop_parent;
mobile_parent.find('.ast-mobile-header-content').css('top', selector.outerHeight() + gutter);
if('ast-box-layout'==self.options.site_layout){
var max_width_mobile=jQuery('body').width();
mobile_parent.find('.ast-mobile-header-content').css('width', max_width_mobile);
}else{
mobile_parent.find('.ast-mobile-header-content').css('width', max_width);
}
desktop_parent.find('.ast-desktop-header-content').css('top', selector.outerHeight() + gutter);
desktop_parent.find('.ast-desktop-header-content').css('width', max_width);
}
if('1'===self.options.hide_on_scroll){
self.hasScrolled(self, 'stick');
}else if('none'==self.options.header_style){
if(! stickyHeaderFlag){
selector.parent().css('min-height', selector.outerHeight());
}
if(! document.querySelector('body').classList.contains('fl-builder-edit') ){
selector.addClass('ast-sticky-active').stop().css({
'top': gutter,
});
}
selector.addClass('ast-sticky-active').stop().css({
'max-width':max_width,
'padding-top':self.options.shrink.padding_top,
'padding-bottom':self.options.shrink.padding_bottom,
});
if(( selector.hasClass('ast-stick-primary-below-wrapper')||selector.hasClass('ast-primary-header') )&&1==astraAddon.header_above_stick&&70 > selector.closest('#ast-desktop-header').find('.ast-above-header-bar').outerHeight()){
selector.parent().css("min-height", selector.outerHeight());
}
selector.addClass('ast-sticky-shrunk').stop();
$(document).trigger("addStickyClass");
fixed_header.addClass('ast-header-sticked');
}else if('slide'==self.options.header_style){
fixed_header.css({
'top':gutter,
});
fixed_header.addClass('ast-header-slide');
fixed_header.css('visibility', 'visible');
fixed_header.addClass('ast-sticky-active').stop().css({
'transform': loginPopup ? 'none':'translateY(0)',
});
$('html').addClass('ast-header-stick-slide-active');
$(document).trigger("addStickyClass");
fixed_header.addClass('ast-header-sticked');
}else if('fade'==self.options.header_style){
fixed_header.css({
'top':gutter,
});
fixed_header.addClass('ast-header-fade');
fixed_header.css('visibility', 'visible');
fixed_header.addClass('ast-sticky-active').stop().css({
'opacity':'1',
});
$('html').addClass('ast-header-stick-fade-active');
$(document).trigger("addStickyClass");
fixed_header.addClass('ast-header-sticked');
}}else{
self.stickRelease(self);
if(header_builder_active){
var mobile_parent=selector.closest('.ast-mobile-header-wrap');
mobile_parent=(0===mobile_parent.length) ? selector.find('.ast-mobile-header-wrap'):mobile_parent;
if(!jQuery('body').hasClass('ast-primary-sticky-header-active')||!jQuery('body').hasClass('ast-above-sticky-header-active')||!jQuery('body').hasClass('ast-below-sticky-header-active') ){
mobile_parent.find('.ast-mobile-header-content').removeAttr('style');
}}
}}
}
astExtSticky.prototype.update_attrs=function (){
var self=this,
selector=jQuery(self.element),
gutter=parseInt(self.options.gutter),
max_width=self.options.max_width;
if('none'==self.options.header_style&&! jQuery('body').hasClass('ast-sticky-toggled-off') ){
var stick_upto_scroll=selector.offset().top||0;
}else{
if($('#masthead').length){
var masthead=$('#masthead');
var masthead_bottom='none'==self.options.header_style
? masthead.offset().top
: masthead.offset().top + masthead.outerHeight() + 100;
var stick_upto_scroll=masthead_bottom||0;
}}
if('ast-box-layout'!=self.options.site_layout){
max_width=jQuery('body').width();
}
if(self.options.dependent){
jQuery.each(self.options.dependent, function(index, val){
if((jQuery(val).length) &&
(jQuery(val).parent().attr('data-stick-support')=='on')
){
dependent_height=jQuery(val).outerHeight();
gutter            +=parseInt(dependent_height);
stick_upto_scroll -=parseInt(dependent_height);
}});
}
if(self.options.admin_bar_height_lg&&jQuery('#wpadminbar').length&&viewPortWidth > 782){
gutter            +=parseInt(self.options.admin_bar_height_lg);
stick_upto_scroll -=parseInt(self.options.admin_bar_height_lg);
}
if(self.options.admin_bar_height_sm&&jQuery('#wpadminbar').length&&(viewPortWidth >=600&&viewPortWidth <=782) ){
gutter            +=parseInt(self.options.admin_bar_height_sm);
stick_upto_scroll -=parseInt(self.options.admin_bar_height_sm);
}
if(self.options.admin_bar_height_xs&&jQuery('#wpadminbar').length){
gutter            +=parseInt(self.options.admin_bar_height_xs);
stick_upto_scroll -=parseInt(self.options.admin_bar_height_xs);
}
if(self.options.body_padding_support){
gutter            +=parseInt(jQuery('body').css('padding-top'), 10);
stick_upto_scroll -=parseInt(jQuery('body').css('padding-top'), 10);
}
if(self.options.html_padding_support){
gutter            +=parseInt(jQuery('html').css('padding-top'), 10);
stick_upto_scroll -=parseInt(jQuery('html').css('padding-top'), 10);
}
if(stick_origin_position){
stick_upto_scroll--;
}
self.options.stick_upto_scroll=stick_upto_scroll;
if('none'==self.options.header_style){
selector.parent()
.css('min-height', selector.outerHeight())
.attr('data-stick-gutter', parseInt(gutter) )
.attr('data-stick-maxwidth', parseInt(max_width) );
}else{
selector.parent()
.attr('data-stick-gutter', parseInt(gutter) )
.attr('data-stick-maxwidth', parseInt(max_width) );
if('ast-padded-layout'===self.options.site_layout){
selector.css('max-width', parseInt(max_width) );
}}
}
astExtSticky.prototype.hasScrolled=function(self, method){
var st=$(window).scrollTop();
if(Math.abs(lastScrollTop - st) <=delta)
return;
var fixed_header=jQuery(self.element);
if(st > lastScrollTop&&st > navbarHeight){
jQuery(self.element).removeClass('ast-nav-down').addClass('ast-nav-up');
}else{
if(st + $(window).height() < $(document).height()){
jQuery(self.element).removeClass('ast-nav-up').addClass('ast-nav-down');
}}
lastScrollTop=st;
if(!$(self.element).hasClass('ast-nav-up')&&'stick'==method){
fixed_header.css({
'top':gutter,
});
fixed_header.addClass('ast-header-sticked');
fixed_header.addClass('ast-header-slide');
fixed_header.css('visibility', 'visible');
fixed_header.addClass('ast-sticky-active').stop().css({
'transform':'translateY(0)',
});
$(document).trigger("addStickyClass");
$('html').addClass('ast-header-stick-scroll-active');
}else{
fixed_header.css({
'transform':'translateY(-100%)',
}).stop();
setTimeout(function(){
fixed_header.removeClass('ast-sticky-active');
}, 300);
fixed_header.css({
'visibility':'hidden',
'top':'',
});
$(document).trigger("removeStickyClass");
$('html').removeClass('ast-header-stick-scroll-active');
fixed_header.removeClass('ast-header-sticked');
}}
astExtSticky.prototype.stickRelease=function(self){
var selector=jQuery(self.element);
var fixed_header=selector;
if('1'===self.options.hide_on_scroll){
self.hasScrolled(self, 'release');
}else{
if('none'==self.options.header_style){
selector.removeClass('ast-sticky-active').stop().css({
'max-width':'',
'top':'',
'padding':'',
});
selector.parent().css('min-height', '');
$(document).trigger("removeStickyClass");
fixed_header.removeClass('ast-header-sticked');
selector.removeClass('ast-sticky-shrunk').stop();
}else if('slide'==self.options.header_style){
fixed_header.removeClass('ast-sticky-active').stop().css({
'transform': loginPopup ? 'translateY(-100vh)':'translateY(-100%)',
});
fixed_header.css({
'visibility':'hidden',
'top':'',
});
$('html').removeClass('ast-header-stick-slide-active');
$(document).trigger("removeStickyClass");
fixed_header.removeClass('ast-header-sticked');
}else if('fade'==self.options.header_style){
fixed_header.removeClass('ast-sticky-active').stop().css({
'opacity':'0',
});
fixed_header.css({
'visibility':'hidden',
});
fixed_header.removeClass('ast-header-sticked');
$(document).trigger("removeStickyClass");
$('html').removeClass('ast-header-stick-fade-active');
}}
}
astExtSticky.prototype.init=function (){
if(jQuery(this.element) ){
var self=this,
selector=jQuery(self.element);
if('none'==self.options.header_style){
selector.wrap(self.options.wrap)
.parent().css('min-height', selector.outerHeight())
.attr('data-stick-support', 'on')
.attr('data-stick-maxwidth', parseInt(self.options.max_width) );
}else{
selector.wrap(self.options.wrap)
.attr('data-stick-support', 'on')
.attr('data-stick-maxwidth', parseInt(self.options.max_width) );
}
self.update_attrs();
jQuery(window).on('resize', function(){
self.stickRelease(self);
self.update_attrs();
self.stick_me(self);
});
jQuery(window).on('scroll', function(){
self.stick_me(self, 'scroll');
if(jQuery('body').hasClass('ast-sticky-toggled-off') ){
self.update_attrs();
self.stick_me(self, 'scroll');
}});
jQuery(document).ready(function($){
self.stick_me(self);
setTimeout(()=> self.stick_me(self), 0);
});
}};
$.fn[pluginName]=function(options){
return this.each(function (){
if(! $.data(this, 'plugin_' + pluginName)){
$.data(this, 'plugin_' + pluginName, new astExtSticky(this, options) );
}});
}
var $body=jQuery('body'),
layout_width=$body.width(),
stick_header_meta=astraAddon.stick_header_meta||'default',
stick_main=astraAddon.header_main_stick||'',
main_shrink=astraAddon.header_main_shrink||'',
stick_above=astraAddon.header_above_stick||'',
stick_below=astraAddon.header_below_stick||'',
header_main_stick_meta=astraAddon.header_main_stick_meta||'',
header_above_stick_meta=astraAddon.header_above_stick_meta||'',
header_below_stick_meta=astraAddon.header_below_stick_meta||'',
site_layout=astraAddon.site_layout||'',
site_layout_box_width=astraAddon.site_layout_box_width||1200,
sticky_header_on_devices=astraAddon.sticky_header_on_devices||'desktop',
sticky_header_style=astraAddon.sticky_header_style||'none',
sticky_hide_on_scroll=astraAddon.sticky_hide_on_scroll||'',
header_logo_width=astraAddon.header_logo_width||'',
responsive_header_logo_width=astraAddon.responsive_header_logo_width||'',
stick_origin_position=astraAddon.stick_origin_position||'',
tablet_break_point=astraAddon.tablet_break_point||768,
mobile_break_point=astraAddon.mobile_break_point||544;
if('disabled'==stick_header_meta){
return;
}
if('enabled'===stick_header_meta){
stick_main=header_main_stick_meta;
stick_above=header_above_stick_meta;
stick_below=header_below_stick_meta;
}
if($('header .site-logo-img img').length > 0){
var id_img=$('header .site-logo-img img');
var id_height=id_img.attr('height');
if(typeof id_height==='undefined'){
id_height=id_img.height();
}
if(id_height==0){
id_height='';
}
if(-1===id_height.toString().indexOf('%')){
id_height +='px';
}
if(''!=responsive_header_logo_width.desktop||''!=responsive_header_logo_width.tablet||''!=responsive_header_logo_width.mobile){
var output="<style type='text/css' id='ast-site-identity-img' class='ast-site-identity-img' > #masthead .ast-header-sticked .site-logo-img .astra-logo-svg { width: " + responsive_header_logo_width.desktop + "px; } @media (max-width: " + tablet_break_point + "px){ #masthead .ast-header-sticked .site-logo-img .astra-logo-svg { width: " + responsive_header_logo_width.tablet + "px; }} @media (max-width: " + mobile_break_point + "px){ #masthead .ast-header-sticked .site-logo-img .astra-logo-svg{ width: " + responsive_header_logo_width.mobile + "px; }} </style>";
}else if(''!=header_logo_width){
var output="<style type='text/css' id='ast-site-identity-img' class='ast-site-identity-img' > #masthead .ast-header-sticked .site-logo-img .astra-logo-svg { width: " + header_logo_width + "px; } #masthead .ast-header-sticked .site-logo-img img { max-height: " + id_height + "; width: auto; } </style>";
}
$("head").append(output);
}
if(stick_main||stick_above||stick_below){
$(document).on("addStickyClass", function(){
var bodyClass='';
if('1'==stick_main||'on'==stick_main||'disabled'==stick_main){
bodyClass +=" ast-primary-sticky-header-active";
}
if('1'==stick_above||'on'==stick_above||'disabled'==stick_above){
bodyClass +=" ast-above-sticky-header-active";
}
if('1'==stick_below||'on'==stick_below||'disabled'==stick_below){
bodyClass +=" ast-below-sticky-header-active";
}
$('body').addClass(bodyClass);
});
$(document).on("removeStickyClass", function(){
var bodyClass='';
if('1'==stick_main||'on'==stick_main||'disabled'==stick_main){
bodyClass +=" ast-primary-sticky-header-active";
}
if('1'==stick_above||'on'==stick_above||'disabled'==stick_above){
bodyClass +=" ast-above-sticky-header-active";
}
if('1'==stick_below||'on'==stick_below||'disabled'==stick_below){
bodyClass +=" ast-below-sticky-header-active";
}
$('body').removeClass(bodyClass);
});
switch(site_layout){
case 'ast-box-layout':
layout_width=parseInt(site_layout_box_width);
break;
}
function astStickyHeaderInit(){
if('1'==sticky_hide_on_scroll){
if('1'==main_shrink){
jQuery('#ast-fixed-header').addClass('ast-sticky-shrunk').stop();
}
if(!('1'==stick_above||'on'==stick_above||'disabled'==stick_above) ){
jQuery('#ast-fixed-header .ast-above-header').hide();
}
if(!('1'==stick_main||'on'==stick_main||'disabled'==stick_main) ){
jQuery('#ast-fixed-header .main-header-bar').hide();
}
if(!('1'==stick_below||'on'==stick_below||'disabled'==stick_below) ){
jQuery('#ast-fixed-header .ast-below-header').hide();
}
jQuery('#ast-fixed-header').astExtSticky({
max_width: layout_width,
site_layout: site_layout,
sticky_on_device: sticky_header_on_devices,
header_style: 'slide',
hide_on_scroll: sticky_hide_on_scroll,
});
}else{
if('none'==sticky_header_style){
if(header_builder_active){
var headers='both'===sticky_header_on_devices ? ['desktop', 'mobile']:[sticky_header_on_devices];
headers.forEach(function (header){
if('1'==stick_above||'on'==stick_above||'disabled'==stick_above){
jQuery('#masthead #ast-' + header + '-header .ast-above-header').astExtSticky({
max_width: layout_width,
site_layout: site_layout,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}
if(('1'==stick_main||'on'==stick_main||'disabled'==stick_main) &&
('1'==stick_below||'on'==stick_below||'disabled'==stick_below)
){
var selector=jQuery('#masthead #ast-' + header + '-header .main-header-bar-wrap').length ?
jQuery('#masthead #ast-' + header + '-header .main-header-bar-wrap') :
jQuery('#masthead #ast-' + header + '-header .ast-below-header-wrap');
selector.wrap('<div class="ast-stick-primary-below-wrapper"></div>')
jQuery('#masthead #ast-' + header + '-header .ast-below-header-wrap').prependTo('#masthead #ast-' + header + '-header .ast-stick-primary-below-wrapper');
jQuery('#masthead #ast-' + header + '-header .main-header-bar-wrap').prependTo('#masthead #ast-' + header + '-header .ast-stick-primary-below-wrapper');
jQuery('#masthead #ast-' + header + '-header .ast-stick-primary-below-wrapper').astExtSticky({
dependent: ['#masthead #ast-' + header + '-header .ast-above-header'],
max_width: layout_width,
site_layout: site_layout,
shrink: shrink_options,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}else{
if('1'==stick_main||'on'==stick_main||'disabled'==stick_main){
var shrink_options='';
if(main_shrink){
shrink_options={
padding_top: '',
padding_bottom: '',
}}
jQuery('#masthead #ast-' + header + '-header .main-header-bar').astExtSticky({
dependent: ['#masthead #ast-' + header + '-header .ast-above-header'],
max_width: layout_width,
site_layout: site_layout,
shrink: shrink_options,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
jQuery('#masthead #ast-' + header + '-header .ast-custom-header').astExtSticky({
max_width: layout_width,
site_layout: site_layout,
shrink: shrink_options,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}
if(('1'==stick_below||'on'==stick_below||'disabled'==stick_below)){
jQuery('#masthead #ast-' + header + '-header .ast-below-header').astExtSticky({
dependent: ['#masthead #ast-' + header + '-header .main-header-bar', '#masthead #ast-' + header + '-header .ast-above-header'],
max_width: layout_width,
site_layout: site_layout,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}}
});
}else{
if('1'==stick_above||'on'==stick_above||'disabled'==stick_above){
jQuery('#masthead .ast-above-header').astExtSticky({
max_width: layout_width,
site_layout: site_layout,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}
if(('1'==stick_main||'on'==stick_main||'disabled'==stick_main) &&
('1'==stick_below||'on'==stick_below||'disabled'==stick_below)
){
jQuery('#masthead .main-header-bar-wrap').wrap('<div class="ast-stick-primary-below-wrapper"></div>')
jQuery('#masthead .ast-below-header-wrap').prependTo('.ast-stick-primary-below-wrapper');
jQuery('#masthead .main-header-bar-wrap').prependTo('.ast-stick-primary-below-wrapper');
jQuery('#masthead .ast-stick-primary-below-wrapper').astExtSticky({
dependent: ['#masthead .ast-above-header'],
max_width: layout_width,
site_layout: site_layout,
shrink: shrink_options,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}else{
if('1'==stick_main||'on'==stick_main||'disabled'==stick_main){
var shrink_options='';
if(main_shrink){
shrink_options={
padding_top: '',
padding_bottom: '',
}}
jQuery('#masthead .main-header-bar').astExtSticky({
dependent: ['#masthead .ast-above-header'],
max_width: layout_width,
site_layout: site_layout,
shrink: shrink_options,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
jQuery('#masthead .ast-custom-header').astExtSticky({
max_width: layout_width,
site_layout: site_layout,
shrink: shrink_options,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}
if(('1'==stick_below||'on'==stick_below||'disabled'==stick_below)){
jQuery('#masthead .ast-below-header').astExtSticky({
dependent: ['#masthead .main-header-bar', '#masthead .ast-above-header'],
max_width: layout_width,
site_layout: site_layout,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}}
}}else{
jQuery('#ast-fixed-header').addClass('ast-sticky-shrunk').stop();
if(!('1'==stick_above||'on'==stick_above||'disabled'==stick_above) ){
jQuery('#ast-fixed-header .ast-above-header').hide();
}
if(!('1'==stick_main||'on'==stick_main||'disabled'==stick_main) ){
jQuery('#ast-fixed-header .main-header-bar').hide();
}
if(!('1'==stick_below||'on'==stick_below||'disabled'==stick_below)){
jQuery('#ast-fixed-header .ast-below-header').hide();
}
if('1'==stick_above||'on'==stick_above||'disabled'==stick_above
|| '1'==stick_main||'on'==stick_main||'disabled'==stick_main
|| '1'==stick_below||'on'==stick_below||'disabled'==stick_below
){
var shrink_options='';
if(main_shrink){
shrink_options={
padding_top: '',
padding_bottom: '',
}}
jQuery('#ast-fixed-header').astExtSticky({
max_width: layout_width,
site_layout: site_layout,
shrink: shrink_options,
sticky_on_device: sticky_header_on_devices,
header_style: sticky_header_style,
hide_on_scroll: sticky_hide_on_scroll,
});
}}
}
if('mobile'==sticky_header_on_devices||'both'==sticky_header_on_devices){
jQuery('#masthead .main-header-menu-toggle').click(function(event){
if(jQuery('#masthead .main-header-menu-toggle').hasClass('toggled') ){
$body.addClass('ast-sticky-toggled-off');
if('none'==defaults['header_style'] &&
(jQuery('#masthead .main-header-bar').hasClass('ast-sticky-active') ||
jQuery('#masthead .ast-stick-primary-below-wrapper').hasClass('ast-sticky-active'))
){
var windowHeight=jQuery(window).height(),
headerSectionHeight=0;
if(jQuery('#masthead .ast-above-header')&&jQuery('#masthead .ast-above-header').length){
headerSectionHeight=jQuery('#masthead .ast-above-header').height();
}
if('1'==sticky_hide_on_scroll){
jQuery('html').css({
'overflow':'hidden',
});
}
if('1'==main_shrink &&
('1'==stick_main||'on'==stick_main||'disabled'==stick_main) &&
('1'==stick_below||'on'==stick_below||'disabled'==stick_below)
){
jQuery('#masthead .ast-stick-primary-below-wrapper').css({
'max-height':(windowHeight - headerSectionHeight) +'px',
'overflow-y':'auto',
});
}else{
jQuery('#masthead .main-header-bar.ast-sticky-active').css({
'max-height':(windowHeight - headerSectionHeight) +'px',
'overflow-y':'auto',
});
}}
}else{
$body.addClass('ast-sticky-toggled-off');
jQuery('html').css({
'overflow':'',
});
if('1'==main_shrink &&
('1'==stick_main||'on'==stick_main||'disabled'==stick_main) &&
('1'==stick_below||'on'==stick_below||'disabled'==stick_below)
){
jQuery('#masthead .ast-stick-primary-below-wrapper').css({
'max-height':'',
'overflow-y':'',
});
}else{
jQuery('#masthead .main-header-bar.ast-sticky-active').css({
'max-height':'',
'overflow-y':'',
});
}}
});
jQuery('#ast-fixed-header .main-header-menu-toggle').click(function(event){
if(jQuery('#ast-fixed-header .main-header-menu-toggle').hasClass('toggled') ){
var windowHeight=jQuery(window).height();
if('1'==sticky_hide_on_scroll){
jQuery('html').css({
'overflow':'auto',
});
}
jQuery('#ast-fixed-header').css({
'max-height':(windowHeight) +'px',
'overflow-y':'auto',
});
}else{
jQuery('html').css({
'overflow':'',
});
jQuery('#ast-fixed-header').css({
'max-height':'',
'overflow-y':'',
});
}});
}}
jQuery(function($){
astStickyHeaderInit();
});
jQuery(document).on('astLayoutWidthChanged', function(e){
if(!(parseInt(stick_main)||parseInt(stick_below)||parseInt(stick_above))){
return;
}
jQuery('div.ast-stick-primary-below-wrapper').children().unwrap();
jQuery('div[data-stick-support="on"]').children().unwrap();
astStickyHeaderInit();
});
}}(jQuery, window));
document.addEventListener("DOMContentLoaded", display_mega_menu_on_load);
document.addEventListener("astPartialContentRendered",
display_mega_menu_on_load
);
function display_mega_menu_on_load(){
var menu_content=document.querySelectorAll(".content-width-mega");
if(menu_content.length > 0){
for (var i=0; i < menu_content.length; i++){
if((menu_content[i].getAttribute('data-megamenu-trigger')||'hover')==='hover'){
menu_content[i].addEventListener("mouseenter", function (event){
var mega_menu_container=event.target.querySelector(".astra-mega-menu-width-content"
);
if(null!==mega_menu_container){
mega_menu_container.classList.remove("ast-hidden");
}});
}}
}
var menu_container=document.querySelectorAll(".menu-container-width-mega");
if(menu_container.length > 0){
for (var i=0; i < menu_container.length; i++){
if((menu_container[i].getAttribute('data-megamenu-trigger')||'hover')==='hover'){
menu_container[i].addEventListener("mouseenter", function (event){
var mega_menu_container=event.target.querySelector(".astra-mega-menu-width-menu-container"
);
if(null!==mega_menu_container){
mega_menu_container.classList.remove("ast-hidden");
}});
}}
}
var menu_full_width=document.querySelectorAll(".full-width-mega");
if(menu_full_width.length > 0){
for (var i=0; i < menu_full_width.length; i++){
if((menu_full_width[i].getAttribute('data-megamenu-trigger')||'hover')==='hover'){
menu_full_width[i].addEventListener("mouseenter", function (event){
var mega_menu_container=event.target.querySelector(".astra-full-megamenu-wrapper"
);
var mega_menu_submenu=event.target.querySelector(".astra-mega-menu-width-full"
);
if(null!==mega_menu_container){
mega_menu_container.classList.remove("ast-hidden");
}
if(null!==mega_menu_submenu){
mega_menu_submenu.classList.remove("ast-hidden");
}});
}}
}
var menu_full_width_stretched=document.querySelectorAll(".full-stretched-width-mega"
);
if(menu_full_width_stretched.length > 0){
for (var i=0; i < menu_full_width_stretched.length; i++){
if((menu_full_width_stretched[i].getAttribute('data-megamenu-trigger')||'hover')==='hover'){
menu_full_width_stretched[i].addEventListener("mouseenter",
function (event){
var mega_menu_container=event.target.querySelector(".astra-full-megamenu-wrapper"
);
var mega_menu_submenu=event.target.querySelector(".astra-mega-menu-width-full-stretched"
);
if(null!==mega_menu_container){
mega_menu_container.classList.remove("ast-hidden");
}
if(null!==mega_menu_submenu){
mega_menu_submenu.classList.remove("ast-hidden");
}}
);
}}
}
var customWidthStretched=document.querySelectorAll(".custom-width-mega");
if(customWidthStretched.length > 0){
for (var i=0; i < customWidthStretched.length; i++){
if((customWidthStretched[i].getAttribute('data-megamenu-trigger')||'hover')==='hover'){
customWidthStretched[i].addEventListener("mouseenter", function (event){
var megaMenuSubmenu=event.target.querySelector(".astra-mega-menu-width-custom"
);
if(null!==megaMenuSubmenu){
megaMenuSubmenu.classList.remove("ast-hidden");
}});
}}
}}
var items=document.getElementsByClassName("astra-megamenu-li");
function apply_megamenu_width_styles(){
[].slice.call(items).forEach(container=> {
var calculateMegamenuWidth=function (){
var ast_container=jQuery(container).parents(".ast-container"),
$main_container=ast_container.children(),
$full_width_main_container=ast_container.parent(),
$this=jQuery(container);
if($this.hasClass("full-width-mega") ||
$this.hasClass("full-stretched-width-mega")
){
$main_container=jQuery($main_container).closest(".ast-container");
}
if(parseInt(window.innerWidth) > parseInt(astra.break_point) &&
"ast-hf-mobile-menu"!==$this.parent().attr("id") &&
"ast-desktop-toggle-menu"!==$this.parent().attr("id")
){
var $menuWidth=$main_container.width(),
$menuPosition=$main_container.offset(),
$menuItemPosition=$this.offset(),
positionLeft =
$menuItemPosition.left -
($menuPosition.left +
parseFloat($main_container.css("paddingLeft"))),
positionRight=$menuWidth - ($menuItemPosition.left + $menuPosition.left) + 130;
var $fullMenuWidth=$full_width_main_container.width(),
$fullMenuPosition=$full_width_main_container.offset(),
fullPositionLeft =
$menuItemPosition.left -
($fullMenuPosition.left +
parseFloat($full_width_main_container.css("paddingLeft")));
if($this.hasClass("custom-width-mega")){
var customMegaMenuWidth =
window
.getComputedStyle($this.find(".astra-mega-menu-width-custom")[0],
"::before"
)
.getPropertyValue("content")||1200;
customMegaMenuWidth=customMegaMenuWidth.replace(/[^0-9]/g, "");
customMegaMenuWidth=parseInt(customMegaMenuWidth);
if(customMegaMenuWidth <=$menuWidth){
var extra_width=parseInt($menuWidth - customMegaMenuWidth),
customWithPositionLeft=parseInt(positionLeft - extra_width),
customWithPositionRight =
$menuPosition.left - customWithPositionLeft;
}else{
var extra_width=parseInt(customMegaMenuWidth - $menuWidth),
customWithPositionLeft=parseInt(positionLeft + extra_width),
customWithPositionRight =
$menuPosition.left + customWithPositionLeft;
}}
if($this.hasClass("menu-container-width-mega")){
var menu_width_container =
jQuery(container).parents(".main-navigation");
if($full_width_main_container.hasClass("ast-above-header")){
menu_width_container=jQuery(".ast-above-header-navigation");
}else if($full_width_main_container.hasClass("ast-below-header")){
menu_width_container=jQuery(".ast-below-header-actual-nav");
}
if(menu_width_container.length){
$target_container=menu_width_container;
}else{
$target_container=$this.parent("ul");
}
$menuWidth=$target_container.width() + "px";
var $offset_right =
jQuery(window).width() -
($target_container.offset().left + $target_container.outerWidth());
var $current_offset=$this.offset();
var $width =
jQuery(window).width() - $offset_right - $current_offset.left,
positionLeft=parseInt($target_container.width() - $width),
positionRight =
parseInt($menuWidth) -
$this.outerWidth() -
parseInt($target_container.width() - $width);
}
if($this.hasClass("full-width-mega")){
$this
.find(".astra-full-megamenu-wrapper")
.css({
left: "-" + fullPositionLeft + "px",
width: $fullMenuWidth,
});
$this.find(".astra-megamenu").css({ width: $menuWidth });
}else if($this.hasClass("full-stretched-width-mega")){
$this
.find(".astra-full-megamenu-wrapper")
.css({
left: "-" + fullPositionLeft + "px",
width: $fullMenuWidth,
});
}else if($this.hasClass("custom-width-mega")){
if(astra.isRtl){
$this
.find(".astra-mega-menu-width-custom")
.css({
width: customMegaMenuWidth + "px",
});
}else{
$this
.find(".astra-mega-menu-width-custom")
.css({
left: "-" + customWithPositionLeft + "px",
width: customMegaMenuWidth + "px",
});
}}else if($this.hasClass("content-width-mega")){
if(astra.isRtl){
var menuItemRight=$menuPosition.left + $menuWidth - ($menuItemPosition.left + $this.outerWidth());
$this
.find(".astra-megamenu")
.css({ right: "-" + menuItemRight + "px", width: $menuWidth })
.data("astra-hover-right", menuItemRight);
}else{
$this
.find(".astra-megamenu")
.css({ left: "-" + positionLeft + "px", width: $menuWidth });
}}else{
if(astra.isRtl){
$this
.find(".astra-megamenu")
.css({ right: "-" + positionRight + "px", width: $menuWidth });
$this.data("astra-hover-right", positionRight);
}else{
$this
.find(".astra-megamenu")
.css({ left: "-" + positionLeft + "px", width: $menuWidth });
}}
}else{
if(astra.isRtl){
$this
.find(".astra-megamenu")
.css({ right: "", width: "", "background-image": "" });
$this
.find(".astra-full-megamenu-wrapper")
.css({ right: "", width: "", "background-image": "" });
}else{
$this
.find(".astra-megamenu")
.css({ left: "", width: "", "background-image": "" });
$this
.find(".astra-full-megamenu-wrapper")
.css({ left: "", width: "", "background-image": "" });
}}
};
if((jQuery(container).data('megamenu-trigger')||'hover')==='click'){
jQuery(container).find('> a').on('click', function (e){
var $this=jQuery(container);
var isOpen=$this.hasClass('megamenu-active');
jQuery('.astra-megamenu-li.megamenu-active').removeClass('megamenu-active');
if(!isOpen){
e.preventDefault();
$this.addClass('megamenu-active');
$this.find('.ast-hidden').removeClass('ast-hidden');
calculateMegamenuWidth();
}});
jQuery(document).on('click', function (e){
if(!jQuery(e.target).closest('.astra-megamenu-li').length){
jQuery('.astra-megamenu-li.megamenu-active').removeClass('megamenu-active');
}});
}else{
jQuery(container).hover(calculateMegamenuWidth);
jQuery(container).mouseenter(function (){
document.dispatchEvent(new CustomEvent("astra_mega_menu_on_hover", { detail: {}})
);
});
}});
}
apply_megamenu_width_styles();
document.addEventListener("astMenuHoverStyleChanged", function (){
apply_megamenu_width_styles();
});
[].slice.call(items).forEach(function (container){
var ast_container=jQuery(container).parents(".ast-container"),
$main_container=ast_container.children(),
$full_width_main_container=ast_container.parent(),
$this=jQuery(container);
if($this.hasClass("full-width-mega") ||
$this.hasClass("full-stretched-width-mega")
){
$main_container=jQuery($main_container).closest(".ast-container");
$this.find(".astra-full-megamenu-wrapper").removeClass("ast-hidden");
}
$this.find(".menu-link").focusin(function (e){
if(!astra.is_header_footer_builder_active){
$this.find(".sub-menu").addClass("astra-megamenu-focus");
$this
.find(".astra-full-megamenu-wrapper")
.addClass("astra-megamenu-wrapper-focus");
}
$this.find(".sub-menu").removeClass("ast-hidden");
if(parseInt(jQuery(window).width()) > parseInt(astra.break_point) &&
"ast-hf-mobile-menu"!==$this.parent().attr("id") &&
"ast-desktop-toggle-menu"!==$this.parent().attr("id")
){
var $menuWidth=$main_container.width(),
$menuPosition=$main_container.offset(),
$menuItemPosition=$this.offset(),
positionLeft =
$menuItemPosition.left -
($menuPosition.left + parseFloat($main_container.css("paddingLeft"))),
positionRight=$menuWidth - ($menuItemPosition.left + $menuPosition.left) + 130;
var $fullMenuWidth=$full_width_main_container.width(),
$fullMenuPosition=$full_width_main_container.offset(),
fullPositionLeft =
$menuItemPosition.left -
($fullMenuPosition.left +
parseFloat($full_width_main_container.css("paddingLeft")));
if($this.hasClass("custom-width-mega")){
var customMegaMenuWidth =
window
.getComputedStyle($this.find(".astra-mega-menu-width-custom")[0],
"::before"
)
.getPropertyValue("content")||1200;
customMegaMenuWidth=customMegaMenuWidth.replace(/[^0-9]/g, "");
customMegaMenuWidth=parseInt(customMegaMenuWidth);
if(customMegaMenuWidth <=$menuWidth){
var extra_width=parseInt($menuWidth - customMegaMenuWidth),
customWithPositionLeft=parseInt(positionLeft - extra_width),
customWithPositionRight =
$menuPosition.left - customWithPositionLeft;
}else{
var extra_width=parseInt(customMegaMenuWidth - $menuWidth),
customWithPositionLeft=parseInt(positionLeft + extra_width),
customWithPositionRight =
$menuPosition.left + customWithPositionLeft;
}}
if($this.hasClass("menu-container-width-mega")){
var menu_width_container =
jQuery(container).parents(".main-navigation");
if($full_width_main_container.hasClass("ast-above-header")){
menu_width_container=jQuery(".ast-above-header-navigation");
}else if($full_width_main_container.hasClass("ast-below-header")){
menu_width_container=jQuery(".ast-below-header-actual-nav");
}
if(menu_width_container.length){
$target_container=menu_width_container;
}else{
$target_container=$this.parent("ul");
}
$menuWidth=$target_container.width() + "px";
var $offset_right =
jQuery(window).width() -
($target_container.offset().left + $target_container.outerWidth());
var $current_offset=$this.offset();
var $width =
jQuery(window).width() - $offset_right - $current_offset.left,
positionLeft=parseInt($target_container.width() - $width),
positionRight =
parseInt($menuWidth) -
$this.outerWidth() -
parseInt($target_container.width() - $width);
}
if($this.hasClass("full-width-mega")){
$this
.find(".astra-full-megamenu-wrapper")
.css({ left: "-" + fullPositionLeft + "px", width: $fullMenuWidth });
$this.find(".astra-megamenu").css({ width: $menuWidth });
}else if($this.hasClass("full-stretched-width-mega")){
$this
.find(".astra-full-megamenu-wrapper")
.css({ left: "-" + fullPositionLeft + "px", width: $fullMenuWidth });
}else if($this.hasClass("custom-width-mega")){
if(astra.isRtl){
$this
.find(".astra-mega-menu-width-custom")
.css({
right: "-" + customWithPositionRight + "px",
width: customMegaMenuWidth + "px",
});
}else{
$this
.find(".astra-mega-menu-width-custom")
.css({
left: "-" + customWithPositionLeft + "px",
width: customMegaMenuWidth + "px",
});
}}else if($this.hasClass("content-width-mega")){
if(astra.isRtl){
var menuItemRight=$menuPosition.left + $menuWidth - ($menuItemPosition.left + $this.outerWidth());
$this
.find(".astra-megamenu")
.css({ right: "-" + menuItemRight + "px", width: $menuWidth })
.data("astra-hover-right", menuItemRight);
}else{
$this
.find(".astra-megamenu")
.css({ left: "-" + positionLeft + "px", width: $menuWidth });
}}else{
var hoverRight=$this.data("astra-hover-right");
var finalRight=typeof hoverRight!=="undefined" ? hoverRight:positionRight;
if(astra.isRtl){
$this
.find(".astra-megamenu")
.css({ right: "-" + finalRight + "px", width: $menuWidth })
.data("astra-hover-right", finalRight);
}else{
$this
.find(".astra-megamenu")
.css({ left: "-" + positionLeft + "px", width: $menuWidth });
}}
}else{
if(astra.isRtl){
$this
.find(".astra-megamenu")
.css({ right: "", width: "", "background-image": "" });
$this
.find(".astra-full-megamenu-wrapper")
.css({ right: "", width: "", "background-image": "" });
}else{
$this
.find(".astra-megamenu")
.css({ left: "", width: "", "background-image": "" });
$this
.find(".astra-full-megamenu-wrapper")
.css({ left: "", width: "", "background-image": "" });
}}
});
if(!astra.is_header_footer_builder_active){
$this.find(".menu-link").keydown(function (e){
if(e.which==9&&e.shiftKey){
$this.find(".sub-menu").removeClass("astra-megamenu-focus");
$this
.find(".astra-full-megamenu-wrapper")
.removeClass("astra-megamenu-wrapper-focus");
}});
jQuery(container)
.find(".sub-menu .menu-item")
.last()
.focusout(function (){
$this.find(".sub-menu").removeClass("astra-megamenu-focus");
$this
.find(".astra-full-megamenu-wrapper")
.removeClass("astra-megamenu-wrapper-focus");
});
jQuery(window).click(function (){
$this.find(".sub-menu").removeClass("astra-megamenu-focus");
$this
.find(".astra-full-megamenu-wrapper")
.removeClass("astra-megamenu-wrapper-focus");
});
}
$this.click(function (event){
if(!jQuery(event.target).hasClass("menu-item")){
return;
}
event.stopImmediatePropagation();
});
});
(function(){
function body_iphone_classes(){
var iphone=(navigator.userAgent.match(/iPhone/i)=='iPhone') ? 'iphone':'';
var ipod=(navigator.userAgent.match(/iPod/i)=='iPod') ? 'ipod':'';
document.body.className +=' ' + iphone;
document.body.className +=' ' + ipod;
}
body_iphone_classes();
function remove_style_class(style){
var allClasses=document.body.className;
allClasses=allClasses.replace(style, '');
document.body.className=allClasses;
}
function add_style_class(style){
document.body.className +=' ' + style;
}
function fade_in(element){
element.style.display='block';
setTimeout(function(){
element.style.opacity=1;
}, 1);
}
function fade_out(element){
element.style.opacity='';
setTimeout(function(){
element.style.display='';
}, 200);
}
function header_cover_form_height(current_header_cover_form){
if(document.body.classList.contains('ast-header-break-point')){
var site_navigation=document.querySelector('.main-navigation');
var main_header_bar=document.querySelector('.main-header-bar');
if(null!==main_header_bar&&null!==site_navigation){
var site_navigation_outer_height=site_navigation.offsetHeight;
var main_header_outer_height=main_header_bar.offsetHeight;
if(site_navigation_outer_height&&(! document.body.classList.contains('ast-no-toggle-menu-enable')) ){
var search_height=parseFloat(site_navigation_outer_height) - parseFloat(main_header_outer_height);
}else{
var search_height=parseFloat(main_header_outer_height);
}
current_header_cover_form.style.maxHeight=Math.abs(search_height) + "px";
}}
}
function header_builder_cover_form_height(current_header_cover_form){
if(document.body.classList.contains('ast-header-break-point')){
var site_navigation=document.querySelector('.main-navigation');
var main_header_bar=document.querySelector('.main-header-bar');
var mobile_header_bar=document.querySelector('.ast-mobile-header-wrap');
if(null!==main_header_bar&&null!==site_navigation){
var site_navigation_outer_height=site_navigation.offsetHeight;
var main_header_outer_height=main_header_bar.offsetHeight;
var mobile_header_outer_height=mobile_header_bar.offsetHeight;
if(site_navigation_outer_height&&(! document.body.classList.contains('ast-no-toggle-menu-enable')) ){
var search_height=parseFloat(site_navigation_outer_height) - parseFloat(main_header_outer_height);
}else{
var search_height=parseFloat(main_header_outer_height);
}
if(current_header_cover_form.parentNode.classList.contains('ast-mobile-header-wrap') ){
var search_height=parseFloat(mobile_header_outer_height);
}
current_header_cover_form.style.maxHeight=Math.abs(search_height) + "px";
}}
}
var searchIcons=document.querySelectorAll('a.astra-search-icon:not(.slide-search)');
for(var i=0; searchIcons.length > i; i++){
searchIcons[i].onclick=function(evt){
evt.preventDefault();
if(! evt){
evt=window.event;
}
if(this.classList.contains('header-cover') ){
var header_cover=document.querySelectorAll('.ast-search-box.header-cover'),
header_builder_active=astraAddon.is_header_builder_active||false;
for (var j=0; j < header_cover.length; j++){
var header_cover_icon=header_cover[j].parentNode.querySelectorAll('a.astra-search-icon');
for (var k=0; k < header_cover_icon.length; k++){
if(header_cover_icon[k]==this){
fade_in(header_cover[j]);
header_cover[j].querySelector('input.search-field').focus();
if(header_builder_active){
header_builder_cover_form_height(header_cover[j]);
}else{
header_cover_form_height(header_cover[j]);
}}
};};
}else if(this.classList.contains('full-screen') ){
var fullScreen=document.getElementById('ast-seach-full-screen-form');
if(fullScreen.classList.contains('full-screen') ){
fade_in(fullScreen);
add_style_class('full-screen');
fullScreen.querySelector('input.search-field').focus();
}}
};};
var closes=document.querySelectorAll('.ast-search-box .close');
for (var i=0, len=closes.length; i < len; ++i){
closes[i].onclick=function(evt){
if(! evt){ evt=window.event;
}
var self=this;
while(1){
if(self.parentNode.classList.contains('ast-search-box') ){
fade_out(self.parentNode);
remove_style_class('full-screen');
break;
}else if(self.parentNode.classList.contains('site-header') ){
break;
}
self=self.parentNode;
}};}
document.onkeydown=function(evt){
if(evt.keyCode==27){
var fullScreenForm=document.getElementById('ast-seach-full-screen-form');
if(null!=fullScreenForm){
fade_out(fullScreenForm);
remove_style_class('full-screen');
}
var header_cover=document.querySelectorAll('.ast-search-box.header-cover');
for (var j=0; j < header_cover.length; j++){
fade_out(header_cover[j]);
}}
}
window.addEventListener("resize", function(){
if('BODY'!==document.activeElement.tagName){
return;
}
if('INPUT'!=document.activeElement.tagName){
var header_cover=document.querySelectorAll('.ast-search-box.header-cover');
if(! document.body.classList.contains('ast-header-break-point') ){
for (var j=0; j < header_cover.length; j++){
header_cover[j].style.maxHeight='';
header_cover[j].style.opacity='';
header_cover[j].style.display='';
}}
}});
let closeIcon=document.getElementById("close");
if(closeIcon){
closeIcon.addEventListener("keydown", function (event){
if(event.key==="Enter"){
event.preventDefault();
this.click();
}else if(event.key==="Tab"){
event.preventDefault();
}});
}})();
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),s||(s=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const u=D(Array.prototype.forEach),m=D(Array.prototype.lastIndexOf),p=D(Array.prototype.pop),f=D(Array.prototype.push),d=D(Array.prototype.splice),h=D(String.prototype.toLowerCase),g=D(String.prototype.toString),T=D(String.prototype.match),y=D(String.prototype.replace),E=D(String.prototype.indexOf),A=D(String.prototype.trim),_=D(Object.prototype.hasOwnProperty),b=D(RegExp.prototype.test),S=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function D(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function R(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function w(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function C(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=w(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=C(r):n[o]=r)}return n}function O(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return D(n.get);if("function"==typeof n.value)return D(n.value)}e=o(e)}return function(){return null}}const v=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=a(/<%[\w\W]*|[\w\W]*%>/gm),W=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:G,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:W});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.3.2",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:D,Element:w,NodeFilter:B,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Y,trustedTypes:j}=n,q=w.prototype,$=O(q,"cloneNode"),V=O(q,"remove"),re=O(q,"nextSibling"),ie=O(q,"childNodes"),ae=O(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:be}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const De=R({},[...v,...k,...x,...I,...U]);let Re=null;const we=R({},[...z,...P,...F,...H]);let Ce=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,ve=null;const ke=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let xe=!0,Le=!0,Ie=!1,Me=!0,Ue=!1,ze=!0,Pe=!1,Fe=!1,He=!1,Be=!1,Ge=!1,We=!1,Ye=!0,je=!1,Xe=!0,qe=!1,$e={},Ke=null;const Ve=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=R({},["audio","video","img","source","image","track"]);let Qe=null;const et=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let rt=ot,it=!1,at=null;const lt=R({},[tt,nt,ot],g);let ct=R({},["mi","mo","mn","ms","mtext"]),st=R({},["annotation-xml"]);const ut=R({},["title","style","font","a","script"]);let mt=null;const pt=["application/xhtml+xml","text/html"];let ft=null,dt=null;const ht=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),mt=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===mt?g:h,Ne=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ft):De,Re=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ft):we,at=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):lt,Qe=_(e,"ADD_URI_SAFE_ATTR")?R(C(et),e.ADD_URI_SAFE_ATTR,ft):et,Ze=_(e,"ADD_DATA_URI_TAGS")?R(C(Je),e.ADD_DATA_URI_TAGS,ft):Je,Ke=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ft):Ve,Oe=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ft):C({}),ve=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ft):C({}),$e=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,xe=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ue=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ge=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ye=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,Xe=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,rt=e.NAMESPACE||ot,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,st=e.HTML_INTEGRATION_POINTS||st,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ue&&(Le=!1),Ge&&(Be=!0),$e&&(Ne=R({},U),Re=l(null),!0===$e.html&&(R(Ne,v),R(Re,z)),!0===$e.svg&&(R(Ne,k),R(Re,P),R(Re,H)),!0===$e.svgFilters&&(R(Ne,x),R(Re,P),R(Re,H)),!0===$e.mathMl&&(R(Ne,I),R(Re,F),R(Re,H))),_(e,"ADD_TAGS")||(ke.tagCheck=null),_(e,"ADD_ATTR")||(ke.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?ke.tagCheck=e.ADD_TAGS:(Ne===De&&(Ne=C(Ne)),R(Ne,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?ke.attributeCheck=e.ADD_ATTR:(Re===we&&(Re=C(Re)),R(Re,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&R(Qe,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.FORBID_CONTENTS,ft)),e.ADD_FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.ADD_FORBID_CONTENTS,ft)),Xe&&(Ne["#text"]=!0),Pe&&R(Ne,["html","head","body"]),Ne.table&&(R(Ne,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),dt=e}},yt=R({},[...k,...x,...L]),Et=R({},[...I,...M]),At=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},_t=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||Ge)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===mt&&rt===ot&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(rt===ot)try{t=(new Y).parseFromString(o,mt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(rt,"template",null);try{t.documentElement.innerHTML=it?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===ot?pe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Dt=function(e){return"function"==typeof D&&e instanceof D};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,dt)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),Nt(e))return At(e),!0;const n=ft(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),ze&&e.hasChildNodes()&&!Dt(e.firstElementChild)&&b(/<[/\w!]/g,e.innerHTML)&&b(/<[/\w!]/g,e.textContent))return At(e),!0;if(e.nodeType===ee)return At(e),!0;if(ze&&e.nodeType===te&&b(/<[/\w]/g,e.data))return At(e),!0;if(!(ke.tagCheck instanceof Function&&ke.tagCheck(n))&&(!Ne[n]||Oe[n])){if(!Oe[n]&&Ot(n)){if(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Xe&&!Ke[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return At(e),!0}return e instanceof w&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===ot?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===ot?"math"===n:t.namespaceURI===nt?"math"===n&&st[o]:Boolean(Et[n]):e.namespaceURI===ot?!(t.namespaceURI===nt&&!st[o])&&!(t.namespaceURI===tt&&!ct[o])&&!Et[n]&&(ut[n]||!yt[n]):!("application/xhtml+xml"!==mt||!at[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(At(e),!0)},Ct=function(e,t,n){if(ve[t])return!1;if(Ye&&("id"===t||"name"===t)&&(n in r||n in ht))return!1;if(Le&&!ve[t]&&b(ye,t));else if(xe&&b(Ee,t));else if(ke.attributeCheck instanceof Function&&ke.attributeCheck(t,e));else if(!Re[t]||ve[t]){if(!(Ot(e)&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&b(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Qe[t]);else if(b(Se,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ze[e]){if(Ie&&!b(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Ot=function(e){return"annotation-xml"!==e&&T(e,be)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Nt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ft(a),m=c;let f="value"===a?m:A(m);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),f=n.attrValue,!je||"id"!==s&&"name"!==s||(_t(a,e),f="user-content-"+f),ze&&b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){_t(a,e);continue}if("attributename"===s&&T(f,"href")){_t(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){_t(a,e);continue}if(!Me&&b(/\/>/i,f)){_t(a,e);continue}Ue&&u([he,ge,Te],(e=>{f=y(f,e," ")}));const d=ft(e.nodeName);if(Ct(d,s,f)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":f=le.createHTML(f);break;case"TrustedScriptURL":f=le.createScriptURL(f)}if(f!==m)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Nt(e)?At(e):p(o.removed)}catch(t){_t(a,e)}}else _t(a,e)}Rt(de.afterSanitizeAttributes,e,null)},kt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(it=!e,it&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Dt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Fe||Tt(t),o.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=ft(e.nodeName);if(!Ne[t]||Oe[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof D)n=bt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Be&&!Ue&&!Pe&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=bt(e),!n)return Be?null:We?ce:""}n&&He&&At(n.firstChild);const c=St(qe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&kt(i.content);if(qe)return e;if(Be){if(Ge)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=Pe?n.outerHTML:n.innerHTML;return Pe&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ue&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){Tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Fe=!0},o.clearConfig=function(){dt=null,Fe=!1},o.isValidAttribute=function(e,t,n){dt||Tt({});const o=ft(e),r=ft(t);return Ct(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).fadin=e()}(this,function(){"use strict";var n=function(){return(n=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=function(){function t(t){this.stack=t.items,this.userFunction=t.func,this.delay=t.delay}return t.prototype.pause=function(){clearInterval(this._interval)},t.prototype.start=function(){this.isDone()||(this._interval=window.setInterval(this.fire.bind(this),this.delay))},t.prototype.reset=function(){this.stack=[],this.pause()},t.prototype.fire=function(){this.check(),this.userFunction(this.stack.shift()),this.check()},t.prototype.check=function(){if(!this.stack.length)return clearInterval(this._interval)},t.prototype.isDone=function(){return this.stack.length<=0},t}(),i=function(){function t(t){this.query=t,this.toAnimate=Array.from(document.querySelectorAll(t))}return t.prototype.animateItems=function(t,e){var n=this,i=this.getItemsToAnimate();i&&new o({items:i,delay:t,func:function(t){return e?e(t):n.assignDelayAndOpacity(t)}}).start()},t.prototype.getItemsToAnimate=function(){if(!this.isDone()){var t=this.getVisibleAndHiddenItems(),e=t.visible,n=t.hidden;return this.toAnimate=n,e}},t.prototype.reset=function(){this.toAnimate=Array.from(document.querySelectorAll(this.query)),this.getVisibleAndHiddenItems().hidden.forEach(function(t){return t.style.opacity="0",t.style.transform="translate3d(0px, 100px, 0px)",t})},t.prototype.isDone=function(){return this.toAnimate.length<=0},t.prototype.assignDelayAndOpacity=function(t){if(t){var e=this.getDelay(t);Object.assign(t.style,{opacity:1}),Object.assign(t.style,{transform:"translate3d(0,0,0)"}),e&&Object.assign(t.style,{transitionDelay:e})}},t.prototype.getVisibleAndHiddenItems=function(){var i=this;return this.toAnimate.reduce(function(t,e){var n=i.shouldBeVisible(e)?"visible":"hidden";return t[n]=t[n].concat(e),t},{visible:[],hidden:[]})},t.prototype.getDelay=function(t){if(t&&t.dataset&&t.dataset.delay)return t.dataset.delay},t.prototype.shouldBeVisible=function(t){var e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||0<=e.top-n)&&"1"!==t.style.opacity},t}(),r={delay:200,selector:".fadin",noInitalScrollEvent:!1,animationFunction:void 0},s=function(){function t(t){void 0===t&&(t=r);var e=this,n=Object.assign({},r,t);this.animationService=new i(n.selector),this._detach=this.setUpEventListener("scroll",function(){e.animationService.animateItems(n.delay,n.animationFunction)}),n.noInitalScrollEvent||this.sendScroll()}return t.prototype.isDone=function(){return this.animationService.isDone()},t.prototype.detach=function(){return this._detach()},t.prototype.reset=function(){this.animationService.reset(),this.sendScroll()},t.prototype.sendScroll=function(){window.dispatchEvent(new Event("scroll"))},t.prototype.setUpEventListener=function(t,e){var n=this,i=function(){n.isDone()&&window.removeEventListener(t,i,!0),e()};return window.addEventListener(t,i.bind(this)),function(){return window.removeEventListener(t,i,!0)}},t}();return function(t,e){return new s(n({selector:t},e))}});
document.addEventListener("DOMContentLoaded", ()=> {
const fadeInElements=()=> fadin(".ast-fade-up", { delay: 200 });
fadeInElements();
document.addEventListener("change", ()=> {
setTimeout(fadeInElements, 1000);
});
document.addEventListener("scroll", fadeInElements);
});
(function (){
var pagination=astra.pagination||'',
masonryEnabled=astra.masonryEnabled||false,
revealEffectEnable=astra.revealEffectEnable||false,
loadStatus=true,
infinite_event=astra.infinite_scroll_event||'';
if(typeof pagination==='string'&&pagination=='infinite'){
var in_customizer=false;
if(typeof wp!=='undefined'){
in_customizer=typeof wp.customize!=='undefined' ? true:false;
if(in_customizer){
return;
}}
if(typeof infinite_event==='string'){
switch(infinite_event){
case 'click':
document.addEventListener('DOMContentLoaded', function(){
var loadMoreLinks=document.querySelectorAll('.ast-load-more.active');
loadMoreLinks.forEach(function(link){
link.setAttribute('tabindex', '0');
link.setAttribute('role', 'button');
link.addEventListener('keydown', function(e){
if(e.key==='Enter'||e.keyCode===13){
e.preventDefault();
var infinitePagination=document.querySelector('.ast-pagination-infinite');
if(infinitePagination){
var total=parseInt(infinitePagination.getAttribute('data-total'))||'';
var count=parseInt(infinitePagination.getAttribute('data-page'))||'';
if(count!='undefined'&&count!=''&&total!='undefined'&&total!=''){
if(count <=total){
NextloadArticles(count);
infinitePagination.setAttribute('data-page', count + 1);
}}
}}
});
});
});
document.addEventListener('click',function(event){
if(event.target.classList.contains('ast-load-more')){
event.preventDefault();
const infinitePagination=document.querySelector('.ast-pagination-infinite');
if(infinitePagination){
let total=parseInt(document.querySelector('.ast-pagination-infinite').getAttribute('data-total'))||'';
let count=parseInt(document.querySelector('.ast-pagination-infinite').getAttribute('data-page'))||'';
if(count!='undefined'&&count!=''&&total!='undefined'&&total!=''){
if(count <=total){
NextloadArticles(count);
document.querySelector('.ast-pagination-infinite').setAttribute('data-page', count + 1);
}}
}}
});
break;
case 'scroll':
const astLoadMore=document.querySelector('.ast-load-more');
var mainSelector=document.getElementById('main');
var rect=mainSelector.getBoundingClientRect();
var offset={
top: rect.top + window.scrollY,
left: rect.left + window.scrollX,
};
if(astLoadMore){
astLoadMore.classList.remove('active');
}
if(mainSelector.querySelectorAll('article:last-child').length > 0){
var windowHeight50=window.outerHeight / 1.25;
window.addEventListener('scroll', function(){
if((window.scrollY + windowHeight50) >=(offset.top) ){
const infinitePagination=document.querySelector('.ast-pagination-infinite');
if(infinitePagination){
const total=parseInt(infinitePagination.getAttribute('data-total'))||'';
let count=parseInt(infinitePagination.getAttribute('data-page'))||'';
if(count <=total){
if(loadStatus==true){
NextloadArticles(count);
infinitePagination.setAttribute('data-page', count + 1);
loadStatus=false;
}}
}}
});
}
break;
}}
const NextloadArticles=(pageNumber)=> {
const loader=document.querySelector('.ast-pagination-infinite .ast-loader');
const astLoadMore=document.querySelector('.ast-load-more');
if(astLoadMore){
astLoadMore.classList.remove('active');
}
var pageUrlSelector=document.querySelector('a.next.page-numbers');
var nextDestUrl=pageUrlSelector.getAttribute('href');
loader.style.display='block';
var request=new XMLHttpRequest();
request.open('GET', nextDestUrl, true);
request.send();
request.onload=function(){
var string=request.response;
var data=new DOMParser().parseFromString(string, 'text/html');
var boxes=data.querySelectorAll('article.ast-article-post');
loader.style.display='none';
if(astLoadMore){
astLoadMore.classList.add('active');
astLoadMore.setAttribute('tabindex', '0');
astLoadMore.setAttribute('role', 'button');
}
for (var boxCount=0; boxCount < boxes.length; boxCount++){
document.querySelector('#main > .ast-row').append(boxes[boxCount]);
}
const gridLayout=astra.grid_layout;
if(1==masonryEnabled&&(gridLayout.desktop > 1||gridLayout.tablet > 1||gridLayout.mobile > 1) ){
var grid=document.querySelector('#main > .ast-row');
var msnry=new Masonry(grid, {});
imagesLoaded(document.querySelector('#main > .ast-row'), function(){
msnry.appended(boxes);
msnry.reloadItems();
msnry.layout();
});
}
var msg=astra.no_more_post_message||'';
const infinitePagination=document.querySelector('.ast-pagination-infinite');
if(infinitePagination){
const total=parseInt(infinitePagination.getAttribute('data-total'))||'';
let count=parseInt(infinitePagination.getAttribute('data-page'))||'';
if(count > total){
infinitePagination.innerHTML='<span class="ast-load-more no-more active" style="display: inline-block;">' + msg + "</span>";
}else{
var newNextTargetUrl=nextDestUrl.replace(/\/page\/[0-9]+/, '/page/' + (pageNumber + 1));
pageUrlSelector.setAttribute('href', newNextTargetUrl);
}}
if(revealEffectEnable){
fadin('.ast-fade-up', { delay: 200 });
}
loadStatus=true;
}}
}})();