"use strict";if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;} if(!Element.prototype.closest){Element.prototype.closest=function(s){var el=this;do{if(el.matches(s))return el;el=el.parentElement||el.parentNode;}while(el!==null&&el.nodeType===1);return null;};} function ub_hashHeaderScroll(){var scrollType=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"auto";var target=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";var offset=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;if(window.location.hash){var targetHeading=document.getElementById(window.location.hash.slice(1));var probableHeaders;try{probableHeaders=document.elementsFromPoint(window.innerWidth/2,0);}catch(e){probableHeaders=document.msElementsFromPoint(window.innerWidth/2,0);} var stickyHeaders=Array.prototype.slice.call(probableHeaders).filter(function(e){return["fixed","sticky"].includes(window.getComputedStyle(e).position);});var stickyHeaderHeights=stickyHeaders.map(function(h){return h.offsetHeight;});var deficit=targetHeading.getBoundingClientRect().y||targetHeading.getBoundingClientRect().top;switch(scrollType){default:window.scrollBy(0,deficit);break;case "off":window.scrollBy(0,deficit);break;case "auto":window.scrollBy(0,deficit-(stickyHeaders.length?Math.max.apply(Math,stickyHeaderHeights):0));break;case "fixedamount":window.scrollBy(0,deficit-offset);break;case "namedelement":window.scrollBy(0,deficit-(document.querySelector(target)?document.querySelector(target).offsetHeight:0));break;}}} document.addEventListener("DOMContentLoaded",function(){var instances=[];if(document.getElementById("ub_table-of-contents-toggle-link")){instances.push(document.getElementById("ub_table-of-contents-toggle-link"));}else{instances=Array.prototype.slice.call(document.getElementsByClassName("ub_table-of-contents-toggle-link"));} instances.forEach(function(instance){var block=instance.closest(".ub_table-of-contents");var tocContainer=block.querySelector(".ub_table-of-contents-container");var containerStyle=tocContainer.style;var tocExtraContainer=block.querySelector(".ub_table-of-contents-extra-container");var extraContainerStyle=tocExtraContainer.style;var tocMain=tocExtraContainer.parentNode;var mainStyle=block.style;var showButton=block.getAttribute("data-showtext")||"show";var hideButton=block.getAttribute("data-hidetext")||"hide";tocContainer.removeAttribute("style");var padding=60;function mobileEvent(mql){if(mql.matches){if(!tocMain.classList.contains("ub_table-of-contents-collapsed")){tocMain.classList.add("ub_table-of-contents-collapsed");instance.innerHTML=showButton;tocContainer.classList.add("ub-hide");}}else{if(JSON.parse(tocMain.dataset.initiallyshow)){tocMain.classList.remove("ub_table-of-contents-collapsed");instance.innerHTML=hideButton;tocContainer.classList.remove("ub-hide");}}} var mobileQuery=window.matchMedia("(max-width: 800px)");if(JSON.parse(block.getAttribute("data-initiallyhideonmobile"))){mobileQuery.addListener(mobileEvent);} instance.addEventListener("click",function(event){event.preventDefault();var curWidth=block.offsetWidth;if(block.classList.contains("ub_table-of-contents-collapsed")){tocExtraContainer.classList.remove("ub-hide");tocContainer.classList.remove("ub-hide");var targetHeight=tocExtraContainer.offsetHeight+padding/2;tocContainer.classList.add("ub-hiding");tocExtraContainer.classList.add("ub-hiding");mainStyle.width="".concat(curWidth,"px");setTimeout(function(){mainStyle.width="auto";block.classList.remove("ub_table-of-contents-collapsed");var fullWidth=getComputedStyle(block).width.slice(0,-2);mainStyle.width="".concat(curWidth,"px");setTimeout(function(){Object.assign(containerStyle,{height:"".concat(targetHeight,"px"),width:"100px"});Object.assign(extraContainerStyle,{height:"".concat(targetHeight,"px"),width:"100px"});tocContainer.classList.remove("ub-hiding");tocExtraContainer.classList.remove("ub-hiding");mainStyle.width="".concat(fullWidth,"px");setTimeout(function(){tocContainer.style.width="".concat(fullWidth-padding,"px");tocExtraContainer.style.width="".concat(fullWidth-padding,"px");},50);},50);},50);}else{mainStyle.width="".concat(block.offsetWidth,"px");Object.assign(containerStyle,{height:"".concat(tocContainer.offsetHeight,"px"),width:"".concat(tocContainer.offsetWidth,"px")});Object.assign(extraContainerStyle,{height:"".concat(tocExtraContainer.offsetHeight,"px"),width:"".concat(tocExtraContainer.offsetWidth,"px")});setTimeout(function(){tocContainer.classList.add("ub-hiding");Object.assign(containerStyle,{height:"0",width:"0"});Object.assign(extraContainerStyle,{height:"0",width:"0"});block.classList.add("ub_table-of-contents-collapsed");padding=parseInt(getComputedStyle(tocExtraContainer).paddingLeft.slice(0,-2))+parseInt(getComputedStyle(tocExtraContainer).paddingRight.slice(0,-2));mainStyle.width="".concat(5+padding+instance.closest(".ub_table-of-contents-header-container").scrollWidth,"px");},50);} instance.innerHTML=tocContainer.classList.contains("ub-hiding")?hideButton:showButton;mobileQuery.removeListener(mobileEvent);});tocContainer.addEventListener("transitionend",function(){if(tocContainer.offsetHeight===0){tocContainer.classList.remove("ub-hiding");tocContainer.classList.add("ub-hide");tocExtraContainer.classList.remove("ub-hiding");tocExtraContainer.classList.add("ub-hide");if(containerStyle.display==="block"){containerStyle.display="";} if(extraContainerStyle.display==="block"){extraContainerStyle.display="";} mainStyle.minWidth="";} Object.assign(containerStyle,{height:"",width:""});Object.assign(extraContainerStyle,{height:"",width:""});mainStyle.width="";});});if(window.location.hash){var sourceToC=document.querySelector(".ub_table-of-contents");if(sourceToC){var type=sourceToC.dataset.scrolltype;var offset=type==="fixedamount"?sourceToC.dataset.scrollamount:0;var target=type==="namedelement"?sourceToC.dataset.scrolltarget:"";setTimeout(function(){return ub_hashHeaderScroll(type,target,offset);},50);}}});window.onhashchange=function(){var sourceToC=document.querySelector(".ub_table-of-contents");if(sourceToC){var type=sourceToC.dataset.scrolltype;var offset=type==="fixedamount"?sourceToC.dataset.scrollamount:0;var target=type==="namedelement"?sourceToC.dataset.scrolltarget:"";ub_hashHeaderScroll(type,target,offset);}};Array.prototype.slice.call(document.querySelectorAll(".ub_table-of-contents-container li > a")).forEach(function(link){link.addEventListener("click",function(e){var hashlessLink=link.href.replace(link.hash,"");var targetPageNumber=/[?&]page=\d+/g.exec(hashlessLink);var currentPageNumber=/[?&]page=\d+/g.exec(window.location.search);if(window.location.href.includes(hashlessLink)&&(currentPageNumber===null||targetPageNumber&¤tPageNumber[0]===targetPageNumber[0])){var tocData=link.closest(".ub_table-of-contents").dataset;var type=tocData.scrolltype;var offset=type==="fixedamount"?tocData.scrollamount:0;var target=type==="namedelement"?tocData.scrolltarget:"";e.preventDefault();history.pushState(null,"",link.hash);ub_hashHeaderScroll(type,target,offset);}});});;/*!js-cookie v3.0.1 | MIT*/!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});;"use strict";(function($){"use strict";var combinators=[" ",">","+","~"];var fraternisers=["+","~"];var complexTypes=["ATTR","PSEUDO","ID","CLASS"];function grok(msobserver){if(!$.find.tokenize){msobserver.isCombinatorial=true;msobserver.isFraternal=true;msobserver.isComplex=true;return;} msobserver.isCombinatorial=false;msobserver.isFraternal=false;msobserver.isComplex=false;var token=$.find.tokenize(msobserver.selector);for(var i=0;i=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]();}finally{if(didErr)throw err;}}};} function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);} function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i").concat(message,"");this.elementRef.find('.hurrytimer-campaign-message').remove();var stickyBar=this.elementRef.closest('.hurrytimer-sticky');if(stickyBar.length){this.elementRef.addClass('hurryt-loading');stickyBar.find('.hurrytimer-sticky-inner').append(messageHtml);}else{this.elementRef.addClass('hurryt-loading');this.elementRef.after(messageHtml);}}},{key:"expireCoupon",value:function expireCoupon(code,message){jQuery.ajaxPrefilter(function(opts,originOpts,jqXHR){if(opts.url.indexOf('wc-ajax=apply_coupon')===-1)return;if(typeof originOpts.data.coupon_code!=='string'||typeof code!=='string'||originOpts.data.coupon_code.toLowerCase()!==code.toLowerCase())return;jqXHR.abort();jQuery('.woocommerce-error').remove();var $target=jQuery('.woocommerce-notices-wrapper:first')||jQuery('.cart-empty').closest('.woocommerce')||jQuery('.woocommerce-cart-form');$target.prepend("
  • ".concat(message,"
"));jQuery('.checkout_coupon').removeClass('processing').unblock();jQuery('.woocommerce-cart-form').removeClass('processing').unblock();});}}],[{key:"redirect",value:function redirect(url){document.body.style.opacity='0';document.body.style.display='none';if(url.trim().length===0){return;} if(hurrytimer_ajax_object.redirect_no_back){window.location.replace(url);}else{window.location.href=url;}}}]);return HurrytimerAction;}();"use strict";function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]();}finally{if(didErr)throw err;}}};} function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);} function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i=this.config.restart_duration;}},{key:"allowRestartAfterReload",value:function allowRestartAfterReload(){return parseInt(this.config.restart)===parseInt(this.restartOptions.afterReload);}},{key:"allowRestartImmediately",value:function allowRestartImmediately(){return parseInt(this.config.restart)===parseInt(this.restartOptions.immediately);}},{key:"shouldRestartAfterDuration",value:function shouldRestartAfterDuration(){return this.config.restart==this.restartOptions.after_duration;}},{key:"hasAction",value:function hasAction(){return this.config.actions.length;}},{key:"calculateDate",value:function calculateDate(){var date=new Date();date.setSeconds(date.getSeconds()+this.config.duration);return date;}},{key:"executeActions",value:function executeActions(){if(parseInt(hurrytimer_ajax_object.disable_actions)===1){return false;} if(this.hasAction()){var _iterator=_createForOfIteratorHelper(this.config.actions),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var action=_step.value;var actionManager=new HurrytimerAction(this.elementRef,this.config);switch(action['id']){case this.actionsOptions.redirect:HurrytimerAction.redirect(action['redirectUrl']);break;case this.actionsOptions.displayMessage:actionManager.displayMessage(action['message']);break;case this.actionsOptions.hideAddToCartButton:actionManager.hideAddToCartButton();break;case this.actionsOptions.stockStatus:if(this.config.isRegular){actionManager.changeStockStatus(this.config.id,action['wcStockStatus']);} break;case this.actionsOptions.hide:actionManager.hide();break;case this.actionsOptions.expire_coupon:actionManager.expireCoupon(action['coupon'],hurrytimer_ajax_object.expire_coupon_message);break;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}}},{key:"maybeShowCampaign",value:function maybeShowCampaign(){if(this.elementRef.length&&!this.config.run_in_background){var $message=this.elementRef.parent().find(".hurrytimer-campaign-message[data-id=\"".concat(this.config.id,"\"]"));if($message.length){$message.remove();} this.elementRef.removeClass('hurryt-loading');} var stickyBar=this.elementRef.closest('.hurrytimer-sticky');if(stickyBar.length){var _$message=this.elementRef.find('.hurrytimer-campaign-message');if(_$message.length){_$message.remove();} stickyBar.removeClass('hurryt-loading');}}},{key:"waitThenRun",value:function waitThenRun(){var _this=this;this.restartIntervalId=setInterval(function(){if(_this.durationSinceExpiryIsOver()){clearInterval(_this.restartIntervalId);_this.run();}},1000);}},{key:"run",value:function run(){var _this2=this;this.triggerInitEvent();this.elementRef.countdown(this.getEndDate(),function(e){return _this2.onCountdownUpdate(e);});var stickyBar=this.elementRef.closest('.hurrytimer-sticky');this.handleStickyBar(stickyBar);}},{key:"handleStickyBar",value:function handleStickyBar(stickyBar){var _this3=this;if(stickyBar.length===0)return;var dismissCookie=Cookies.get("_ht_CDT-".concat(this.config.id,"_dismissed"));if(dismissCookie==undefined){stickyBar.on('click','.hurrytimer-sticky-close',function(){return _this3.onStickyBarDismiss(stickyBar);});}else{this.hideStickyBar(stickyBar);}}},{key:"hideStickyBar",value:function hideStickyBar(stickyBar){if(stickyBar.length===0)return;var isTopPinned=stickyBar.css('top')==='0px';stickyBar.remove();if(isTopPinned){jQuery('body').css('margin-top',0);}else{jQuery('body').css('margin-bottom',0);}}},{key:"onStickyBarDismiss",value:function onStickyBarDismiss(stickyBar){this.hideStickyBar(stickyBar);Cookies.set("_ht_CDT-".concat(this.config.id,"_dismissed"),'1',{expires:+this.config.sticky_bar_hide_timeout});}},{key:"onCountdownUpdate",value:function onCountdownUpdate(event){this.render(event);this.maybeShowCampaign();if(event.elapsed&&event.type==='finish'){this.executeActions();this.triggerFinishEvent();this.maybeRecur();if(this.allowRestartImmediately()){this.run();} if(this.shouldRestartAfterDuration()){this.waitThenRun();}}}},{key:"triggerFinishEvent",value:function triggerFinishEvent(){var params={id:this.config.id,mode:this.config.mode,endAt:this.config.endDate};this.elementRef.trigger('hurryt:finished',params);}},{key:"triggerInitEvent",value:function triggerInitEvent(){var params={id:this.config.id,mode:this.config.mode,endAt:this.config.endDate};jQuery('.hurrytimer-campaign').trigger('hurryt:init',params);}},{key:"triggerStartEvent",value:function triggerStartEvent(){if(!this.startEventDispatched){var params={id:this.config.id,mode:this.config.mode,endAt:this.config.endDate};this.elementRef.trigger('hurryt:started',params);this.startEventDispatched=true;}}},{key:"render",value:function render(event){if(hurrytimer_ajax_object.run_in_background){this.elementRef.html('');}else{this.elementRef.find('.hurrytimer-timer').html(event.strftime(this.config.template));} this.triggerStartEvent();}},{key:"willRecurNow",value:function willRecurNow(){var now=new Date();var prev_recurrence_time=this.getEndDate().getTime()+this.config.timeToNextRecurrence*1000;return now.getTime()>=prev_recurrence_time;}},{key:"maybeRecur",value:function maybeRecur(){var _this4=this;if(!this.config.recurr)return;if(jQuery.ajax===undefined)return;clearTimeout(this.recurTimeoutId);clearInterval(this.recurIntervalId);this.recurIntervalId=setInterval(function(){if(!_this4.willRecurNow()){return;} clearInterval(_this4.recurIntervalId);jQuery.ajax({url:hurrytimer_ajax_object.ajax_url,data:{action:'next_recurrence',nonce:hurrytimer_ajax_object.ajax_nonce,id:_this4.config.id},error:function error(){if(_this4.retryCount===10)return;_this4.retryCount++;setTimeout(function(){_this4.maybeRecur();},1000);},success:function success(_ref){var data=_ref.data;_this4.retryCount=0;if(!data)return;if(isNaN(data.endTimestamp)){return;} _this4.config.endDate=data.endTimestamp;_this4.run();}});},1000);}}]);return HurrytimerCampaign;}();'use strict';function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj;}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;},_typeof(obj);} (function($){var state={reseting:[]};var $body=$('body');$.initialize('.hurrytimer-campaign',function(){if($(this).parents('div[data-elementor-type=popup]').length===0){runCampaign($(this));}});$(document).on('elementor/popup/show',function(event,id){$(".elementor-".concat(id," .hurrytimer-campaign")).each(function(){runCampaign($(this));});});function runCampaign($campaign){var config=$campaign.data('config');if(config===undefined)return;if(_typeof(config)!=='object'){config=JSON.parse(config.replace(/\s+/g," "));} $campaign.removeAttr('data-config');$campaign.trigger('hurryt:pre-init',{id:config.id,mode:config.mode,endAt:config.endAt});var $sticky=$campaign.closest('.hurrytimer-sticky');if($sticky.length){$body.append($sticky);$(window).resize(function(){if($sticky.css('top')==='0px'){$body.css('margin-top',$sticky.outerHeight());}else{$body.css('margin-bottom',$sticky.outerHeight());}});setTimeout(function(){$(window).trigger('resize');});} new HurrytimerCampaign($campaign,config,state).run();}})(jQuery);;function loadDisqusDynamic(t,e,a,i){if(window.DISQUS){document.getElementById('disqus_thread').after(t) DISQUS.reset({reload:!0,config:function(){;(this.page.identifier=e),(this.page.url=a),(this.page.title=i)},})} else{document.getElementById('disqus_thread').after(t) disqus_identifier=e disqus_url=a disqus_title=i var n=document.createElement('script') n.async=true n.src='https://twinfinite.disqus.com/embed.js' n.id='disqusScript' document.getElementsByTagName('head')[0].append(n)} console.log('disqus load')};document.getElementById('sweetDreams').onclick=function(){if(document.getElementById('sweetDreams').checked){setDarkTheme()}else{setLightTheme()}} document.getElementById('mobile-sweetDreams').onclick=function(){if(document.getElementById('mobile-sweetDreams').checked){setDarkTheme()}else{setLightTheme()}} function setDarkTheme(){document.body.classList.add('theme-dark') document.body.classList.remove('theme-light') document.getElementById('site-header').classList.add('theme-dark') document.getElementById('site-header').classList.remove('theme-light') document.getElementById('site-footer').classList.add('theme-dark') document.getElementById('site-footer').classList.remove('theme-light') setTheme('theme-dark')} function setLightTheme(){document.body.classList.add('theme-light') document.body.classList.remove('theme-dark') document.getElementById('site-header').classList.add('theme-light') document.getElementById('site-header').classList.remove('theme-dark') document.getElementById('site-footer').classList.add('theme-light') document.getElementById('site-footer').classList.remove('theme-dark') setTheme('theme-light')} function setTheme(themeName){localStorage.setItem('theme',themeName)} if(localStorage.getItem('theme')==='theme-dark'){document.getElementById('sweetDreams').checked=true setDarkTheme()}else{document.getElementById('sweetDreams').checked=false setLightTheme()} document.getElementById('mobile-menu-header-toggle-btn').addEventListener('click',function(){document.getElementById('mobile-nav-wrap').classList.toggle('visible') if(document.getElementById('mobile-nav-wrap').classList.contains('visible')){document.body.classList.add('no-scroll') if(document.getElementById('mobile-header-search').classList.contains('visible')){document.getElementById('mobile-header-search').classList.remove('visible')}}else{document.body.classList.remove('no-scroll') let primis=document.querySelector('body .primis-player div[id*="primis_playerSekindoSPlayer"][style*="overflow: hidden"][style*="position: fixed"]');if(primis){primis.style['transition-delay']='0.5s';primis.style['transition-property']='all';setTimeout(()=>{primis.style['transition-delay']='';primis.style['transition-property']='';},500);}}}) document.getElementById('mobile-search-toggle').addEventListener('click',function(){document.getElementById('mobile-header-search').classList.toggle('visible') if(document.getElementById('mobile-header-search').classList.contains('visible')){document.body.classList.add('search-active') document.querySelector('.mobile-header-search.visible form.search-form label input.search-field').focus() if(document.getElementById('mobile-nav-wrap').classList.contains('visible')){document.getElementById('mobile-nav-wrap').classList.remove('visible')}}else{document.body.classList.remove('search-active')}});(function(){var isIe=/(trident|msie)/i.test(navigator.userAgent);if(isIe&&document.getElementById&&window.addEventListener){window.addEventListener('hashchange',function(){var id=location.hash.substring(1),element;if(!(/^[A-z0-9_-]+$/.test(id))){return;} element=document.getElementById(id);if(element){if(!(/^(?:a|select|input|button|textarea)$/i.test(element.tagName))){element.tabIndex=-1;} element.focus();}},false);}})();;