jQuery(function(){ParallaxScroll.init()});var ParallaxScroll={showLogs:!1,round:1e3,init:function(){if(this._log("init"),this._inited)return this._log("Already Inited"),void(this._inited=!0);this._requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,e){window.setTimeout(a,1e3/60)},this._onScroll(!0)},_inited:!1,_properties:["x","y","z","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","scale"],_requestAnimationFrame:null,_log:function(a){this.showLogs&&console.log("Parallax Scroll / "+a)},_onScroll:function(a){var e=jQuery(document).scrollTop(),t=jQuery(window).height();this._log("onScroll "+e),jQuery("[data-parallax]").each(jQuery.proxy(function(l,r){var n=jQuery(r),s=[],i=!1,o=n.data("style");null==o&&(o=n.attr("style")||"",n.data("style",o));var u,c=[n.data("parallax")];for(u=2;n.data("parallax"+u);u++)c.push(n.data("parallax-"+u));var d=c.length;for(u=0;u<d;u++){var m=c[u],h=m["from-scroll"];null==h&&(h=Math.max(0,jQuery(r).offset().top-t)),h|=0;var y=m.distance,p=m["to-scroll"];null==y&&null==p&&(y=t),y=Math.max(0|y,1);var v=m.easing,w=m["easing-return"];if(null!=v&&jQuery.easing&&jQuery.easing[v]||(v=null),null!=w&&jQuery.easing&&jQuery.easing[w]||(w=v),v){var x=m.duration;null==x&&(x=y),x=Math.max(0|x,1);var g=m["duration-return"];null==g&&(g=x),y=1;var f=n.data("current-time");null==f&&(f=0)}null==p&&(p=h+y),p|=0;var _=m.smoothness;null==_&&(_=30),_|=0,(a||0==_)&&(_=1),_|=0;var j=e;j=Math.max(j,h),j=Math.min(j,p),v&&(null==n.data("sens")&&n.data("sens","back"),j>h&&("back"==n.data("sens")?(f=1,n.data("sens","go")):f++),j<p&&("go"==n.data("sens")?(f=1,n.data("sens","back")):f++),a&&(f=x),n.data("current-time",f)),this._properties.map(jQuery.proxy(function(a){var e=0,t=m[a];if(null!=t){"scale"==a||"scaleX"==a||"scaleY"==a||"scaleZ"==a?e=1:t|=0;var l=n.data("_"+a);null==l&&(l=e);var r=(j-h)/(p-h)*(t-e)+e,o=l+(r-l)/_;if(v&&f>0&&f<=x){var u=e;"back"==n.data("sens")&&(u=t,t=-t,v=w,x=g),o=jQuery.easing[v](null,f,u,t,x)}(o=Math.ceil(o*this.round)/this.round)==l&&r==t&&(o=t),s[a]||(s[a]=0),s[a]+=o,l!=s[a]&&(n.data("_"+a,s[a]),i=!0)}},this))}if(i){if(null!=s.z){var Q=m.perspective;null==Q&&(Q=800);var A=n.parent();A.data("style")||A.data("style",A.attr("style")||""),A.attr("style","perspective:"+Q+"px; -webkit-perspective:"+Q+"px; "+A.data("style"))}null==s.scaleX&&(s.scaleX=1),null==s.scaleY&&(s.scaleY=1),null==s.scaleZ&&(s.scaleZ=1),null!=s.scale&&(s.scaleX*=s.scale,s.scaleY*=s.scale,s.scaleZ*=s.scale);var X="translate3d("+(s.x?s.x:0)+"px, "+(s.y?s.y:0)+"px, "+(s.z?s.z:0)+"px)"+" "+("rotateX("+(s.rotateX?s.rotateX:0)+"deg) rotateY("+(s.rotateY?s.rotateY:0)+"deg) rotateZ("+(s.rotateZ?s.rotateZ:0)+"deg)")+" "+("scaleX("+s.scaleX+") scaleY("+s.scaleY+") scaleZ("+s.scaleZ+")")+";";this._log(X),n.attr("style","transform:"+X+" -webkit-transform:"+X+" "+o)}},this)),window.requestAnimationFrame?window.requestAnimationFrame(jQuery.proxy(this._onScroll,this,!1)):this._requestAnimationFrame(jQuery.proxy(this._onScroll,this,!1))}};
USR_PREFS_CK_NAME="undefined"!=typeof USR_PREFS_CK_NAME?USR_PREFS_CK_NAME:"lwaio_consent_preferences",ACTED_CONSENT_CK_NAME="undefined"!=typeof ACTED_CONSENT_CK_NAME?ACTED_CONSENT_CK_NAME:"lwaio_consent_acted",EXP_CK_NAME="undefined"!=typeof EXP_CK_NAME?EXP_CK_NAME:"1 Year",function(e){"use strict";let t={set:function(e,t,o,i=""){let s="";if(o){let e=new Date;e.setTime(e.getTime()+24*o*60*60*1e3),s="; expires="+e.toGMTString()}i&&(i="; domain="+i),document.cookie=e+"="+t+s+"; path=/"+i},read:function(e){let t=e+"=",o=document.cookie.split(";"),i=o.length;for(let e=0;e<i;e++){let i=o[e];for(;" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},exists:function(e){return null!==this.read(e)},getallcookies:function(){let e=document.cookie.split(";"),t={},o=e.length;for(let i=0;i<o;i++){let o=e[i].split("=");t[(o[0]+"").trim()]=unescape(o[1])}return t},erase:function(e,t){t?this.set(e,"",-10,t):this.set(e,"",-10)}},o={bar_config:{},show_config:{},allowed_categories:[],set:function(e){if("function"!=typeof JSON.parse)return void console.log("LWAIOCookieConsent requires JSON.parse but your browser doesn't support it");this.settings=JSON.parse(e.settings),EXP_CK_NAME=this.settings.cookie_expiry,this.bar_elm=jQuery(this.settings.notify_div_id),this.show_again_elm=jQuery(this.settings.show_again_div_id),this.details_elm=this.bar_elm.find(".lwaio_messagebar_detail"),this.main_button=jQuery("#cookie_action_accept"),this.main_link=jQuery("#cookie_action_link"),this.reject_button=jQuery("#cookie_action_reject"),this.settings_button=jQuery("#cookie_action_settings"),this.save_button=jQuery("#cookie_action_save"),this.confirm_button=jQuery("#cookie_action_confirm"),this.cancel_button=jQuery("#cookie_action_cancel"),this.accept_all_button=jQuery("#cookie_action_accept_all"),this.configBar(),this.toggleBar(),this.attachEvents(),this.configButtons(),this.settings.auto_scroll&&window.addEventListener("scroll",o.acceptOnScroll,!1);let i=JSON.parse(t.read(USR_PREFS_CK_NAME)),s=t.read(ACTED_CONSENT_CK_NAME),n="";n=new CustomEvent("LwAioCookieConsentOnLoad",{detail:{lwaio_consent_preferences:i,lwaio_consent_acted:s}}),window.dispatchEvent(n)},attachEvents:function(){jQuery(".lwaio_action_button").click(function(e){e.preventDefault();let i="",s="",n="",a="",c=jQuery(this).attr("data-lwaio_action");if("accept_all"==c)o.enableAllCookies(),o.accept_all_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),a=t.read(ACTED_CONSENT_CK_NAME),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAcceptAll",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i),o.logConsent(c);else if("accept"==c)o.accept_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),a=t.read(ACTED_CONSENT_CK_NAME),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAccept",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i),o.logConsent(c);else if("reject"==c){o.reject_close(),s=JSON.parse(t.read(USR_PREFS_CK_NAME)),a=t.read(ACTED_CONSENT_CK_NAME),t.erase(USR_PREFS_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnReject",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i);let e=t.getallcookies();"object"==typeof e&&null!==e&&jQuery.each(e,function(e,o){e!=ACTED_CONSENT_CK_NAME&&t.erase(e,"."+window.location.host)}),o.logConsent(c)}else"settings"==c?(o.bar_elm.slideUp(o.settings.animate_speed_hide),o.show_again_elm.slideUp(o.settings.animate_speed_hide)):"close"==c?o.displayHeader():"show_settings"==c?o.show_details():"hide_settings"==c?o.hide_details():"close_banner"==c&&(o.hideHeader(),o.accept_close(),"yes"!=(a=t.read(ACTED_CONSENT_CK_NAME))&&(s=JSON.parse(t.read(USR_PREFS_CK_NAME)),n=JSON.stringify(s),t.set(USR_PREFS_CK_NAME,n,EXP_CK_NAME),i=new CustomEvent("LwAioCookieConsentOnAccept",{detail:{lwaio_consent_preferences:s,lwaio_consent_acted:a}}),window.dispatchEvent(i)))}),jQuery(".group-switch-buttons input").each(function(){let e=jQuery(this).val(),i={},s="";if(t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME))),"necessary"==e||jQuery(this).is(":checked"))i[e]="yes",o.allowed_categories.push(e);else{i[e]="no";let t=o.allowed_categories.length;for(let i=0;i<t;i++)o.allowed_categories[i]==e&&o.allowed_categories.splice(i,1)}s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME)}),jQuery(document).on("click","#lwaio-consent-show-again",function(t){t.preventDefault(),jQuery(o.settings.notify_div_id).find("p.lwaio").show(),jQuery(o.settings.notify_div_id).find(".lwaio.group-description-buttons").show(),o.displayHeader(),e(this).hide()}),jQuery(document).on("click",".group-switch-buttons input",function(){let e=jQuery(this).val(),i={},s="";if(t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME))),jQuery(this).is(":checked"))i[e]="yes",o.allowed_categories.push(e);else{i[e]="no";let t=o.allowed_categories.length;for(let i=0;i<t;i++)o.allowed_categories[i]==e&&o.allowed_categories.splice(i,1)}s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME)}),jQuery(document).on("click","#lwaio_consent_tabs_overview",function(e){e.preventDefault();let t=jQuery(this);jQuery("#lwaio_consent_tabs").find("a").removeClass("tab_selected"),t.addClass("tab_selected"),t.css("border-bottom-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color),jQuery("#lwaio_consent_tabs_about").css("border-bottom-color",o.settings.border_color),jQuery("#lwaio_consent_tabs_about").css("background-color",o.settings.background_color),jQuery("#lwaio_consent_about").hide(),jQuery("#lwaio_consent_overview").show()}),jQuery(document).on("click","#lwaio_consent_tabs_about",function(e){e.preventDefault();let t=jQuery(this);jQuery("#lwaio_consent_tabs").find("a").removeClass("tab_selected"),t.addClass("tab_selected"),t.css("border-bottom-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color),jQuery("#lwaio_consent_tabs_overview").css("border-bottom-color",o.settings.border_color),jQuery("#lwaio_consent_tabs_overview").css("background-color",o.settings.background_color),jQuery("#lwaio_consent_overview").hide(),jQuery("#lwaio_consent_about").show()}),jQuery(document).on("click","#lwaio_consent_overview_cookie_container_types a",function(e){e.preventDefault();let t=jQuery(this),i=t.parent();i.find("a").removeClass("lwaio_consent_overview_cookie_container_type_selected"),i.find("a").css("border-right-color",o.settings.border_color),i.find("a").css("background-color",o.settings.background_color),t.addClass("lwaio_consent_overview_cookie_container_type_selected"),t.css("border-right-color",o.settings.border_active_color),t.css("background-color",o.settings.background_active_color);let s=jQuery(this).attr("data-target"),n=i.siblings("#lwaio_consent_overview_cookie_container_type_details");n.find(".lwaio_consent_cookie_type_details").hide(),n.find("#"+s).show()})},configButtons:function(){this.settings_button.attr("style",`color: ${this.settings.button_link_color} !important; background-color: ${this.settings.secondary_color} !important`),this.main_button.css("color",this.settings.button_link_color),this.main_button.css("background-color",this.settings.primary_color),this.accept_all_button.css("color",this.settings.button_link_color),this.accept_all_button.css("background-color",this.settings.primary_color),this.confirm_button.css("color",this.settings.button_link_color),this.confirm_button.css("background-color",this.settings.primary_color),this.main_link.css("color",this.settings.secondary_color),this.reject_button.css("display","inline-block"),this.reject_button.attr("style",`color: ${this.settings.button_link_color} !important; background-color: ${this.settings.secondary_color} !important`),this.cancel_button.css("color",this.settings.button_link_color),this.cancel_button.css("display","inline-block"),this.cancel_button.css("background-color",this.settings.secondary_color),this.save_button.css("color",this.settings.button_link_color),this.save_button.css("background-color",this.settings.primary_color),this.details_elm.find("table.lwaio_consent_cookie_type_table tr").css("border-color",o.settings.border_color),this.details_elm.find(".lwaio_consent_cookie_type_intro").css("border-color",o.settings.border_color),this.details_elm.find("a").each(function(){jQuery(this).css("border-color",o.settings.border_color),jQuery(this).css("background-color",o.settings.background_color)}),this.details_elm.find("a.lwaio_consent_overview_cookie_container_type_selected").css("border-right-color",o.settings.border_active_color),this.details_elm.find("a.lwaio_consent_overview_cookie_container_type_selected").css("background-color",o.settings.background_active_color),this.details_elm.find("#lwaio_consent").css("border-color",o.settings.border_color),this.details_elm.find("#lwaio_consent_tabs").css("border-color",o.settings.border_color),this.details_elm.find("#lwaio_consent_tabs .tab_selected").css("border-bottom-color",o.settings.border_active_color),this.details_elm.find("#lwaio_consent_tabs .tab_selected").css("background-color",o.settings.background_active_color)},configBar:function(){this.bar_config={"background-color":this.settings.background,color:this.settings.text,"border-top":"1px solid "+this.settings.secondary_color},this.show_config={width:"auto","background-color":this.settings.background,color:this.settings.text,position:"fixed",opacity:this.settings.opacity,bottom:"0","border-top":"1px solid "+this.settings.secondary_color},"right"==this.settings.show_again_position?this.show_config.right=this.settings.show_again_margin+"%":this.show_config.left=this.settings.show_again_margin+"%",this.bar_config.position="fixed",this.bar_config.opacity=this.settings.opacity,this.bar_elm.find(".lwaio_messagebar_content").css("max-width","800px"),"bottom"==this.settings.banner_position?this.bar_config.bottom="0":this.bar_config.top="0",this.bar_elm.css(this.bar_config).hide(),this.show_again_elm.css(this.show_config).hide()},toggleBar:function(){t.exists(ACTED_CONSENT_CK_NAME)?this.hideHeader():(this.displayHeader(),this.settings.auto_hide&&setTimeout(function(){o.accept_close()},this.settings.auto_hide_delay))},accept_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.accept_reload&&window.location.reload(!0),!1},accept_all_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.accept_reload&&window.location.reload(!0),!1},reject_close:function(){return t.set(ACTED_CONSENT_CK_NAME,"yes",EXP_CK_NAME),o.disableAllCookies(),this.settings.notify_animate_hide?this.bar_elm.slideUp(this.settings.animate_speed_hide,i.runScripts):this.bar_elm.hide(i.runScripts),this.show_again_elm.slideDown(this.settings.animate_speed_hide),1==this.settings.decline_reload&&window.location.reload(!0),!1},logConsent:function(e){this.settings.logging_on&&jQuery.ajax({url:log_obj.ajax_url,type:"POST",data:{action:"lwaio_log_consent_action",lwaio_user_action:e,cookie_list:t.getallcookies()},success:function(e){}})},disableAllCookies:function(){let i={},s="";t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME)),jQuery.each(i,function(t,s){if("necessary"!=t){i[t]="no",e('.group-switch-buttons input[value="'+t+'"]').prop("checked",!1);let s=o.allowed_categories.length;for(let e=0;e<s;e++)o.allowed_categories[e]==t&&o.allowed_categories.splice(e,1)}}),s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME))},enableAllCookies:function(){let i={},s="";t.read(USR_PREFS_CK_NAME)&&(i=JSON.parse(t.read(USR_PREFS_CK_NAME)),jQuery.each(i,function(t,s){if("necessary"!=t){i[t]="yes",e('.group-switch-buttons input[value="'+t+'"]').prop("checked",!0);let s=o.allowed_categories.length;for(let e=0;e<s;e++)o.allowed_categories[e]==t&&o.allowed_categories.splice(e,1)}}),s=JSON.stringify(i),t.set(USR_PREFS_CK_NAME,s,EXP_CK_NAME))},show_details:function(){this.details_elm.show(),this.bar_elm.css("opacity",1),this.details_elm.css("border-top-color",o.settings.border_color),this.settings_button.attr("data-lwaio_action","hide_settings")},hide_details:function(){this.details_elm.hide(),this.bar_elm.css("opacity",o.settings.opacity),this.settings_button.attr("data-lwaio_action","show_settings")},displayHeader:function(e,t){this.bar_elm.show(),e&&(jQuery(o.settings.notify_div_id).find("p.lwaio").hide(),jQuery(o.settings.notify_div_id).find(".lwaio.group-description-buttons").hide()),this.show_again_elm.slideUp(this.settings.animate_speed_hide)},hideHeader:function(e){this.bar_elm.slideUp(this.settings.animate_speed_hide),e||this.show_again_elm.slideDown(this.settings.animate_speed_hide)},acceptOnScroll:function(){let i=e(window).scrollTop()/(e(document).height()-e(window).height());Math.round(100*i)>o.settings.auto_scroll_offset&&!t.exists(ACTED_CONSENT_CK_NAME)&&(o.accept_close(),window.removeEventListener("scroll",o.acceptOnScroll,!1),1==o.settings.auto_scroll_reload&&window.location.reload())}},i={blockingStatus:!0,scriptsLoaded:!1,set:function(e){"function"==typeof JSON.parse?this.cookies=JSON.parse(e.cookies):console.log("LWAIOCookieConsent requires JSON.parse but your browser doesn't support it")},removeCookieByCategory:function(){if(1==i.blockingStatus)for(let e in i.cookies){let s=i.cookies[e],n=s.lwaio_category_slug;if(-1===o.allowed_categories.indexOf(n)){let e=s.data;if(e&&0!=e.length)for(let o in e){let i=e[o];t.erase(i.name)}}}},runScripts:function(){let e=["iframe","IFRAME","EMBED","embed","OBJECT","object","IMG","img"],s=function(e){n.renderScripts(),a.renderSrcElement(),e(),i.scriptsLoaded=!0},n={scriptsDone:function(){let e=document.createEvent("Event");e.initEvent("DOMContentLoaded",!0,!0),window.document.dispatchEvent(e)},seq:function(e,t,o){void 0===o&&(o=0),e[o](function(){++o===e.length?t():n.seq(e,t,o)})},insertScript:function(e,s){let n=["data-wpl-class","data-wpl-label","data-wpl-placeholder","data-wpl-script-type","data-wpl-src"],a=e.getAttribute("data-wpl-script-type"),c=e.getAttribute("data-wpl-element-position"),r=e.getAttribute("data-wpl-block"),l=document.createElement("script");l.type="text/plain",e.async&&(l.async=e.async),e.defer&&(l.defer=e.defer),e.src?(l.onload=s,l.onerror=s,l.src=e.src):l.textContent=e.innerText;let _=jQuery(e).prop("attributes"),d=_.length;for(let e=0;e<d;++e)"id"!==_[e].nodeName&&-1!==n.indexOf(_[e].nodeName)&&l.setAttribute(_[e].nodeName,_[e].value);!0===i.blockingStatus?("yes"==t.read(ACTED_CONSENT_CK_NAME)&&-1!==o.allowed_categories.indexOf(a)||null==t.read(ACTED_CONSENT_CK_NAME)&&"false"===r)&&(l.setAttribute("data-wpl-consent","accepted"),l.type="text/javascript"):l.type="text/javascript",e.type!=l.type&&("head"===c?(document.head.appendChild(l),e.src||s(),e.parentNode.removeChild(e)):(document.body.appendChild(l),e.src||s(),e.parentNode.removeChild(e)))},renderScripts:function(){let e=document.querySelectorAll('script[data-wpl-class="wpl-blocker-script"]');if(e.length>0){let t,o=[];Array.prototype.forEach.call(e,function(e){t=e.getAttribute("type");e.tagName;o.push(function(t){n.insertScript(e,t)})}),n.seq(o,n.scriptsDone)}}},a={renderSrcElement:function(){let s=document.querySelectorAll('[data-wpl-class="wpl-blocker-script"]'),n=s.length;for(let a=0;a<n;a++){let n=s[a],c=n.tagName;if(-1!==e.indexOf(c)){let e=n.getAttribute("data-wpl-script-type"),s=n.getAttribute("data-wpl-block");!0===i.blockingStatus?"yes"==t.read(ACTED_CONSENT_CK_NAME)&&-1!==o.allowed_categories.indexOf(e)||null!=t.read(ACTED_CONSENT_CK_NAME)&&"false"===s?this.replaceSrc(n):this.addPlaceholder(n):this.replaceSrc(n)}}},addPlaceholder:function(e){if(0===jQuery(e).prev(".wpl-iframe-placeholder").length){let t=e.getAttribute("data-wpl-placeholder"),o=e.getAttribute("width"),i=e.getAttribute("height");null==o&&(o=e.offsetWidth),null==i&&(i=e.offsetHeight);let s=/px/,n='<div style="width:'+(o=s.test(o)?o:o+"px")+"; height:"+(i=s.test(i)?i:i+"px")+';" class="wpl-iframe-placeholder"><div class="wpl-inner-text">'+t+"</div></div>";"IMG"!==e.tagName&&jQuery(n).insertBefore(e),e.removeAttribute("src"),e.style.display="none"}},replaceSrc:function(e){if(!e.hasAttribute("src")){let t=e.getAttribute("data-wpl-src");e.setAttribute("src",t),jQuery(e).prev(".wpl-iframe-placeholder").length>0&&jQuery(e).prev(".wpl-iframe-placeholder").remove(),e.style.display="block"}}};(function(){jQuery(document).on("click",".wpl_manage_current_consent",function(){o.displayHeader()})})(),s(i.removeCookieByCategory)}};e(document).ready(function(){"undefined"!=typeof lwaiobar_settings&&o.set({settings:lwaiobar_settings}),"undefined"!=typeof lwaios_list&&(i.set({cookies:lwaios_list}),i.runScripts())}),e(document).ready(function(){e(".lwaio-column").click(function(){e(".lwaio-column",this),e(this).children(".lwaio-columns").hasClass("active-group")||(e(".lwaio-columns").removeClass("active-group"),e(this).children(".lwaio-columns").addClass("active-group")),e(this).siblings(".description-container").hasClass("hide")&&(e(".description-container").addClass("hide"),e(this).siblings(".description-container").removeClass("hide"))})})}(jQuery);
function shopengine_currency_switcher(e){let t=new URL(window.location),o=new URLSearchParams(t.search);o.set("currency",e),window.location=window.location.origin+window.location.pathname+"?"+o.toString()}!function(e,t){"use strict";var o=function(e,t){let o=0;return function(...n){let i=(new Date).getTime();if(i-o<t)return!1;window.intervalID=setTimeout((function(){e(...n)}),t),o=i}},n=function(e,t){let o;return function(...n){o&&clearTimeout(o),o=setTimeout((function(){e(...n)}),t)}},i=function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},r=function(t,o){let n=t?e(t).get(0):null;if("undefined"==typeof Swiper){return elementorFrontend.utils.assetsLoader.load("script","swiper").then((()=>new Swiper(n,o)))}{const e=new Swiper(n,o);return Promise.resolve(e)}},a=function(t){var o="target"in t?t.target.closest("a"):t[0];if(o){var n=e(o).parents(".wc-tabs"),i=n.find(".shopengine-tabs-line"),r=n[0].getBoundingClientRect(),a=o.getBoundingClientRect().x-r.x;i.animate({width:`${a}px`},100,(()=>{i.animate({left:`${a}px`,width:"30px"},100)}))}},s={get_url:function(e,t){return e.wc_ajax_url.toString().replace("%%endpoint%%",t)},is_blocked:function(e){return e.is(".processing")||e.parents(".processing").length},block:function(e){this.is_blocked(e)||e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(e){e.removeClass("processing").unblock()},show_notice:function(t,o){o||(o=e(".woocommerce-notices-wrapper:first")||e(".cart-empty").closest(".woocommerce")||e(".woocommerce-cart-form")),o.prepend(t)},remove_duplicate_notices:function(t){var o=[],n=t;return t.each((function(t){var i=e(this).text();"undefined"==typeof o[i]?o[i]=!0:n.splice(t,1)})),n},update_cart_totals_div:function(t){e(".cart_totals").replaceWith(t),e(document.body).trigger("updated_cart_totals")},update_wc_div:function(t,o){var n=e.parseHTML(t),i=e(".shopengine-cart-form",n),r=e(".cart_totals",n),a=this.remove_duplicate_notices(e(".woocommerce-error, .woocommerce-message, .woocommerce-info",n));0!==e(".shopengine-cart-form").length?(o||e(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove(),0===i.length?(e(document.body).trigger("wc_cart_emptied"),window.location.reload()):(e(".woocommerce-checkout").length&&e(document.body).trigger("update_checkout"),e(".shopengine-cart-form").replaceWith(i),e(".shopengine-cart-form").find(':input[name="update_cart"]').prop("disabled",!0).attr("aria-disabled",!0),a.length>0&&this.show_notice(a),this.update_cart_totals_div(r)),e(document.body).trigger("updated_wc_div")):window.location.reload()}},c={init:function(){var o={"shopengine-archive-view-mode.default":c.Archive_View_Mode,"shopengine-related.default":c.Related_Slider,"shopengine-cross-sells.default":c.Cross_Sells_Slider,"shopengine-up-sells.default":c.Up_Sells_Slider,"shopengine-product-tabs.default":c.Product_Tabs,"shopengine-product-review.default":c.Product_Review,"shopengine-single-product-images.default":c.Single_Product_Images,"shopengine-cart-table.default":c.Cart_Table,"shopengine-cart-totals.default":c.Cart_Totals,"shopengine-filter-orderby.default":c.Filter_OrderBy,"shopengine-checkout-coupon-form.default":c.Checkout_Coupon_Form,"shopengine-checkout-review-order.default":c.Checkout_Review_Order,"shopengine-checkout-form-shipping.default":c.Checkout_Form_Shipping,"shopengine-filter-products-per-page.default":c.Filter_ProductsPerPage,"shopengine-archive-products.default":c.Archive_Products,"shopengine-advanced-search.default":c.Advanced_Search,"shopengine-add-to-cart.default":c.Add_To_Cart,"shopengine-categories.default":c.Categories,"shopengine-deal-products.default":c.Deal_Products,"shopengine-flash-sale-products.default":c.Deal_Products,"shopengine-filterable-product-list.default":c.FilterableProductList,"shopengine-checkout-form-login.default":c.CheckoutFormLogin,"shopengine-checkout-shipping-methods.default":c.ShippingMethod};e.each(o,(function(e,o){t.hooks.addAction("frontend/element_ready/"+e,o)}))},Archive_View_Mode:function(t){t.on("click",".shopengine-archive-view-mode-switch",(function(t){let o=e(this),n=o.data("view");t.preventDefault(),o.addClass("isactive"),o.siblings().removeClass("isactive"),e(document).find(".shopengine-archive-products").removeClass((function(t,o){let n=o.split(" "),i=[];return e.each(n,(function(e,t){/shopengine-archive-products--view-.*/.test(t)&&i.push(t)})),i.join(" ")})).addClass("shopengine-archive-products--view-"+n)}))},Advanced_Search:function(t){let n=t.find(".shopengine-search-form"),i=n.attr("action"),r=n.find(".shopengine-search-result-container"),a="";n.on("submit",(function(o){o.preventDefault();let s=e(this).serialize(),c=new URLSearchParams(s),l=c.get("s"),d=c.get("nonce");a=l,e(this).data("submitted-data")!=s&&null!==l&&""!=l&&e.ajax({url:i,method:"GET",data:s,dataType:"html",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",d),n.addClass("is-loading").data("submitted-data",s)},success:function(o){n.removeClass("is-loading").addClass("sr-container-opened"),r.find(".shopengine-search-result").html(o);let i=r.find(".shopengine-search-result")[0].getBoundingClientRect().height;i<=500?r.css({height:`${i}px`}):r.css({height:"500px"}),SimpleScrollbar.unbindEl(r[0]),SimpleScrollbar.initEl(r[0]),e("body").addClass("shopengine-sr-container-open-body"),t.find(".shopengine-search-product__item--title a").map((function(t,o){let n=e(o).text();return n=n.replaceAll(a,`<strong>${a}</strong>`),e(o).html(n),!0}))}})})),e(document).on("click",".shopengine-sr-container-open-body",(function(t){e(t.target).parents(".shopengine-search-form").length>0||(n.removeClass("sr-container-opened"),e("body").removeClass("shopengine-sr-container-open-body"))})),n.on("keyup change",".shopengine-advanced-search-input, .shopengine-ele-nav-search-select",o((function(){n.submit()}),500))},Archive_Products:function(t){var o={main:t.find(".shopengine-archive-products"),product:t.find(".shopengine-archive-products ul.products"),pagi:t.find(".woocommerce-pagination"),style:t.find(".shopengine-archive-products").data("pagination"),is_tooltip:t.find(".archive-product-container").data("tooltip"),tooltip_container:t.find(".archive-product-container")};function r(){if("yes"===o.is_tooltip){o.tooltip_container=t.find(".archive-product-container");var n=e(o.tooltip_container).find(".button"),i=e(o.tooltip_container).find(".shopengine-quickview-trigger"),r=e(o.tooltip_container).find(".shopengine-wishlist"),a=e(o.tooltip_container).find(".shopengine-comparison"),s=e(o.tooltip_container).find(".shopengine_direct_checkout");function c(t,o){t.each((function(t,n){e(n).find(".tooltiptext").length?e(n).find(".tooltiptext").text(o):(e("body").hasClass("theme-kadence")&&e(n).find("span").length&&e(n).find("span").remove(),n.insertAdjacentHTML("beforeend",`<p class='tooltiptext'>${o}</p>`))}))}n.length>0&&c(n,shopengineLoopProductConfig?.add_to_cart||"Add to Cart"),i.length>0&&c(i,shopengineLoopProductConfig?.quick_view||"Quick View"),r.length>0&&c(r,shopengineLoopProductConfig?.add_to_wishlist||"Add to Wishlist"),a.length>0&&c(a,shopengineLoopProductConfig?.compare||"Compare"),s.length>0&&c(s,shopengineLoopProductConfig?.direct_checkout||"Direct Checkout")}}function a(n,i,a){e.ajax({url:i,beforeSend:function(){o.main.addClass("is-loading"),"numeric"!==o.style&&"default"!==o.style||window.history.pushState({},document.title,i)},success:function(n){let i=e(n).find(".shopengine-archive-products").first(),s=(t.find(".shopengine-archive-products"),t.find(".shopengine-archive-products ul.products")),c=t.find(".woocommerce-pagination"),l=t.find(".shopengine-archive-products").data("pagination");if("numeric"===l||"default"===l)o.main.html(i.html()),t[0].scrollIntoView();else if("load-more"===l){let t=e(n).find(".shopengine-archive-products ul.products"),o=e(n).find(".woocommerce-pagination");s.append(t.html()),c.html(o.html())}else if("load-more-on-scroll"===l&&a){let t=e(n).find(".shopengine-archive-products ul.products"),o=e(n).find(".woocommerce-pagination");s.append(t.html()),c.html(o.html())}let d=e(".shopengine-archive-result-count > p");if(d.length){let e=i.find("p.woocommerce-result-count").text();e.includes("Sorted by")&&(e=e.replace("Sorted by"," - Sorted by")),d.text(e)}r()},complete:function(){o.main.removeClass("is-loading");if(!["load-more","load-more-on-scroll"].includes(n)){var i=t.offset().top;e(window).scrollTop(i)}}})}r(),"load-more-on-scroll"===o.style&&e(document).on("scroll",n((function(){if(i(o.pagi[0])){let e=t.find(".woocommerce-pagination .next").attr("href");e&&a(o.style,e,!0)}}),500)),o.pagi.length&&e(t).on("click","a.page-numbers",(function(e){e.preventDefault(),e.stopPropagation(),a(o.style,this.href,!1)}))},Categories:function(t){e(".shopengine-categories ul.children").hide(),e(".shopengine-categories li").removeClass("active opened"),t.find(".shopengine-categories li").on("click",(function(t){if("undefined"!=typeof t.target.href||!e(t.target).hasClass("cat-parent"))return;t.preventDefault(),t.stopPropagation();let o=e(t.target);o.hasClass("children-expended")?(o.removeClass("children-expended"),o.find("> .children").slideUp()):(o.addClass("children-expended"),o.find("> .children").slideDown())}))},Product_Tabs:function(e){e.find(".wc-tabs-wrapper, .woocommerce-tabs, #rating").trigger("init");let t=e.find(".tabs.wc-tabs");if(t.length){let e=document.createElement("div");e.setAttribute("class","shopengine-tabs-line"),t[0].appendChild(e),t.on("click",a),setTimeout((function(){a(t.find("li.active a"))}),250)}},Related_Slider:function(e){let t=e.find(".shopengine-related.slider-enabled");if(t.length){let o=t.data("controls"),n=Boolean(o.slider_enabled),i=parseInt(o.slides_to_show),a=parseInt(o.slides_to_show_mobile),s=parseInt(o.slides_to_show_tablet),c=Boolean(o.slider_loop),l=Boolean(o.slider_autoplay),d=parseInt(o.slider_autoplay_delay),p=parseInt(o.slider_space_between),u=e.find(".slider-enabled .related").get(0),h=e.find(".swiper-button-next").get(0),f=e.find(".swiper-button-prev").get(0),g=e.find(".swiper-pagination").get(0);r(u,{direction:"horizontal",slidesPerView:i,spaceBetween:p,loop:c,breakpoints:{270:{slidesPerView:a||1},540:{slidesPerView:s||2},770:{slidesPerView:s||3},900:{slidesPerView:i}},wrapperClass:"products",slideClass:"product",grabCursor:!0,freeMode:!0,centeredSlides:!1,allowTouchMove:n,speed:500,parallax:!0,autoplay:!!l&&{delay:d},effect:"slide",pagination:{el:g,type:"bullets",dynamicBullets:!0,clickable:!0},navigation:{nextEl:h,prevEl:f},on:{snapGridLengthChange:function(){var e=this.slidesSizesGrid[0];this.slides.each((function(){this.style.maxWidth=e-10+"px",-1!==this.className.indexOf(" last ")&&this.classList.remove("last")}))}}})}},Cross_Sells_Slider:function(e){let t=e.find(".shopengine-cross-sells.slider-enabled");if(t.length){let o=t.data("controls"),n=Boolean(o.slider_enabled),i=parseInt(o.slides_to_show),a=Boolean(o.slider_loop),s=Boolean(o.slider_autoplay),c=parseInt(o.slider_autoplay_delay),l=parseInt(o.slider_space_between),d=parseInt(o.selected_item),p=e.find(".swiper-pagination").get(0),u=e.find(".swiper-button-next").get(0),h=e.find(".swiper-button-prev").get(0),f=e.find(".shopengine-cross-sells.slider-enabled > .cross-sells").get(0);i>=d&&(a=!1),r(f,{direction:"horizontal",slidesPerView:i,spaceBetween:l,loop:a,breakpoints:{320:{slidesPerView:1},540:{slidesPerView:2},770:{slidesPerView:3},900:{slidesPerView:i}},wrapperClass:"products",slideClass:"product",grabCursor:!0,freeMode:!0,centeredSlides:!1,allowTouchMove:n,speed:500,parallax:!0,autoplay:!!s&&{delay:c},effect:"slide",pagination:{el:p,type:"bullets",dynamicBullets:!0,clickable:!0},navigation:{nextEl:u,prevEl:h},on:{snapGridLengthChange:function(){var e=this.slidesSizesGrid[0];this.slides.each((function(){this.style.maxWidth=e-10+"px;",-1!==this.className.indexOf(" last ")&&this.classList.remove("last")}))}}})}},Up_Sells_Slider:function(e){let t=e.find(".shopengine-up-sells.slider-enabled");if(t.length){let o=t.data("controls"),n=Boolean(o.slider_enabled),i=parseInt(o.slides_to_show),a=Boolean(o.slider_loop),s=Boolean(o.slider_autoplay),c=parseInt(o.slider_autoplay_delay),l=parseInt(o.slider_space_between),d=parseInt(o.selected_item),p=e.find(".swiper-pagination").get(0),u=e.find(".swiper-button-next").get(0),h=e.find(".swiper-button-prev").get(0),f=e.find(".up-sells.products").get(0);i>=d&&(a=!1);r(f,{direction:"horizontal",slidesPerView:i,spaceBetween:l,loop:a,breakpoints:{320:{slidesPerView:1},540:{slidesPerView:2},770:{slidesPerView:3},900:{slidesPerView:i}},wrapperClass:"products",slideClass:"product",grabCursor:!0,freeMode:!0,centeredSlides:!1,allowTouchMove:n,speed:500,parallax:!0,autoplay:!!s&&{delay:c},effect:"slide",pagination:{el:p,type:"bullets",dynamicBullets:!0,clickable:!0},navigation:{nextEl:u,prevEl:h},on:{snapGridLengthChange:function(){var e=this.slidesSizesGrid[0];this.slides.each((function(){this.style.maxWidth=e-10+"px",-1!==this.className.indexOf(" last ")&&this.classList.remove("last")}))}}})}},Product_Review:function(e){e.find(".stars").length||(e.find("#rating").before('<p class="stars">\t\t\t\t\t\t<span>\t\t\t\t\t\t\t<a title="One Star" class="star-1" href="javascript:void(0)">1</a>\t\t\t\t\t\t\t<a title="Two Star" class="star-2" href="javascript:void(0)">2</a>\t\t\t\t\t\t\t<a title="Three Star" class="star-3" href="javascript:void(0)">3</a>\t\t\t\t\t\t\t<a title="Four Star" class="star-4" href="javascript:void(0)">4</a>\t\t\t\t\t\t\t<a title="Five Star" class="star-5" href="javascript:void(0)">5</a>\t\t\t\t\t\t</span>\t\t\t\t\t</p>'),e.find("#rating").hide()),e.find(".stars:not(:first)").remove()},Single_Product_Images:function(t){"undefined"!=typeof e.fn.wc_product_gallery&&t.find(".woocommerce-product-gallery").wc_product_gallery(),t.find(".flex-viewport").css("height","auto"),t.on("click",".shopengine-product-image .shopengine-product-image-toggle",(function(e){e.preventDefault();let o=t.find(".woocommerce-product-gallery__trigger");o.length?o.click():t.find(".flex-active-slide a").click()})),e(".pswp__button.pswp__button--close, .pswp__container").on("click",(function(){setTimeout((()=>{e(".pswp--open").removeClass("pswp--open")}),0)}));let o=e("#shopengine-variable-onsale-badge");e(".variations_form").on("found_variation",(function(e,t){let n=t?.variation_id;if("undefined"!=typeof ShopEngineSaleVariations&&ShopEngineSaleVariations.hasOwnProperty(n)){let e=ShopEngineSaleVariations[n];e>0?(o.text(e+"% OFF"),o.show()):o.hide()}else o.hide()}));let n=e(".shopengine-product-stock"),i=n.data("variations")||{};e(".variations_form").on("found_variation",(function(e,t){let o=t?.variation_id;if(n.length&&o&&i[o]){let e=i[o],t=n.find("p.stock");if(t.length){t.removeClass("in-stock out-of-stock on-backorder"),t.addClass(e["class"]);let o="";o="onbackorder"===e.stock_status?e.availability||"On backorder":"instock"===e.stock_status?e.availability||"In Stock":e.availability||"Out of stock";let n=e.icon||"";t.html(n+o)}}})),e(".variations_form").on("reset_data",(function(){if(n.length){let e=n.find("p.stock");if(e.length){let t=n.data("default-stock")||{stock_status:"instock",availability:"","class":"in-stock",icon:""};e.removeClass("in-stock out-of-stock on-backorder"),e.addClass(t["class"]);let o="";o="onbackorder"===t.stock_status?t.availability||"On backorder":"instock"===t.stock_status?t.availability||"In Stock":t.availability||"Out of stock";let i=t.icon||"";e.html(i+o)}}}))},Cart_Table:function(t){t.find(".shopengine-cart-quantity input.qty").each((function(){let t=e(this),o=parseInt(t.val(),10),n=parseInt(t.attr("min"),10);isNaN(n)&&(n=0),!isNaN(o)&&o>n&&t.attr("min",o)})),t.on("click",".minus-button, .plus-button",(function(o){o.preventDefault();let n=e(this),i=n.closest(".shopengine-cart-quantity").find("input.qty"),r=parseInt(i.val(),10);var a=parseInt(i.attr("min"),10),s=parseInt(i.attr("max"),10),c=parseInt(i.attr("step"),10);isNaN(a)&&(a=0),(isNaN(c)||c<1)&&(c=1),n.is(".minus-button")?r-c>=a&&(r-=c):(!s||r+c<=s)&&(r+=c),i.val(r),t.find("[name=update_cart]").prop("disabled",!1)})),t.on("change",".shopengine-cart-quantity input.qty",(function(o){let n=e(this),i=parseInt(n.val(),10),r=parseInt(n.attr("min"),10),a=parseInt(n.attr("max"),10),s=parseInt(n.attr("step"),10);isNaN(r)&&(r=0),(isNaN(s)||s<1)&&(s=1),!isNaN(i)&&i<r&&n.val(r),!isNaN(a)&&!isNaN(i)&&i>a&&n.val(a),t.find("[name=update_cart]").prop("disabled",!1)})),t.on("click","[name=empty_cart]",(function(o){o.preventDefault();let n=t.find(".product-remove > a");n.length&&n.each((function(){e(this).trigger("click")}))})),t.on("click","button[name=update_cart]",(function(o){o.preventDefault();let n=t.find("form.shopengine-cart-form");if(s.is_blocked(n))return!1;s.block(n),s.block(e("div.cart_totals")),e("<input />").attr("type","hidden").attr("name","update_cart").attr("value","Update Cart").appendTo(n),e.ajax({type:n.attr("method"),url:n.attr("action"),data:n.serialize(),dataType:"html",success:function(e){s.update_wc_div(e)},complete:function(){s.unblock(n),s.unblock(e("div.cart_totals")),e.scroll_to_notices(e('[role="alert"]'))}})})),e(document).on("click",".woocommerce-cart-form .product-remove > a",(function(t){t.preventDefault(),e(document).on("wc_cart_emptied",(function(){location.reload()}))}))},Cart_Totals:function(e){var t=e.find("tr.shipping > td");t.length&&t.attr("colspan","2")},Filter_OrderBy:function(e){var t=e.find(".shopengine-filter");e.find(".orderby").on("change",(function(){t.trigger("submit")}))},Checkout_Coupon_Form:function(t){t.on("click","button.showcoupon",(function(){return e(".shopengine-checkout-coupon").slideToggle(400,(function(){e(".shopengine-checkout-coupon").find(":input:eq(0)").focus()})),!1})),t.on("click",'button[name="apply_coupon"]',(function(o){o.preventDefault();let n,i=t.find(".shopengine-checkout-coupon-form").find(".shopengine-checkout-coupon"),r=!!e(document.body).hasClass("shopengine-cart"),a=r?wc_cart_params:wc_checkout_params,c={security:r?wc_cart_params.apply_coupon_nonce:wc_checkout_params.apply_coupon_nonce,coupon_code:i.find('input[name="coupon_code"]').val()};return s.is_blocked(i)||(s.block(i),n=e(document.body).find(".shopengine-woocommerce-checkout .woocommerce-notices-wrapper, .shopengine-cart-table .woocommerce-notices-wrapper"),e.ajax({type:"POST",url:s.get_url(a,"apply_coupon"),data:c,success:function(t){e(".woocommerce-error, .woocommerce-message").remove(),n.after(t),i.slideUp(),s.unblock(e(i)),t&&(r?(s.block(e("div.cart_totals")),e.ajax({url:s.get_url(wc_cart_params,"get_cart_totals"),dataType:"html",success:function(e){s.update_cart_totals_div(e)},complete:function(){s.unblock(e("div.cart_totals")),e.scroll_to_notices(e('[role="alert"]'))}})):(e(document.body).trigger("applied_coupon_in_checkout",[c.coupon_code]),e(document.body).trigger("update_checkout",{update_shipping_method:!1})))},dataType:"html"})),!1}))},Checkout_Review_Order:function(e){},Checkout_Form_Shipping:function(e){var t=e.find("#ship-to-different-address-checkbox"),o=e.find(".shipping_address");(elementorFrontend.isWPPreviewMode()||elementorFrontend.isEditMode())&&(o.hide(),t.change((function(){this.checked?o.slideDown():o.hide()})))},ShippingMethod:function(t){let o=t.closest("form");o.find(".shopengine-checkout-review-order .woocommerce-shipping-totals").remove(),e(window).on("updated_checkout",(function(t,n){if(n&&n.fragments){o.find(".shopengine-checkout-review-order .woocommerce-shipping-totals").remove();let t=n.fragments[".woocommerce-checkout-review-order-table"],i=e(t).find(".woocommerce-shipping-totals");i.length&&e(document.body).find(".woocommerce-shipping-totals").replaceWith(i)}}))},Filter_ProductsPerPage:function(e){var t=e.find(".shopengine-products-per-page");t.on("change",(function(){t.trigger("submit")}))},Add_To_Cart:function(t){let o=t.find("form.cart");o.length&&o.on("click",".plus, .minus",(function(){let t=e(o).find('.qty:not([type="hidden"])'),n=o.hasClass("grouped_form")?e(this).parents("tr").find(".qty"):t,i=n.val()?parseFloat(n.val()):0,r=parseFloat(n.attr("max")),a=parseFloat(n.attr("min")),s=parseFloat(n.attr("step"));isNaN(a)&&(a=0),(isNaN(s)||s<1)&&(s=1),e(this).is(".plus")?(!r||i+s<=r)&&n.val(i+s):i-s>=a&&n.val(i-s)}))},Deal_Products:function(t){let o=t.find(".deal-products"),n=t.find(".deal-products__grap--line");const i=6e4,r=36e5,a=24*r;e.each(o,((t,o)=>(t=>{let o=e(t),n=JSON.parse(t.dataset.dealData),s=new Date(n.end_time.replace(/-/g,"/")).getTime(),c=o.find(".clock-days"),l=o.find(".clock-hou"),d=o.find(".clock-min"),p=o.find(".clock-sec"),u=setInterval((()=>{let e=(new Date).getTime(),o=s-e;c.text(Math.floor(o/a)),"yes"===n.show_days?l.text(Math.floor(o%a/r)):l.text(Math.floor(o/r)),d.text(Math.floor(o%r/i)),p.text(Math.floor(o%i/1e3)),o<0&&(clearInterval(u),t.css({display:"none"}))}),500)})(o)));const s=new ResizeObserver((t=>{e.each(t,((e,t)=>(e=>{const t=e.getContext("2d"),o=e.parentNode.getBoundingClientRect().width,n=e.height,i=JSON.parse(e.dataset.settings),r=i.total_sell/i.stock_qty*o;e.setAttribute("width",o+10),t.beginPath(),t.moveTo(2,n/2),t.lineTo(o,n/2),t.lineCap=i.bg_line_cap,t.lineWidth=i.bg_line_height,t.strokeStyle=i.bg_line_clr,t.stroke(),r>0&&(t.beginPath(),t.moveTo(2,n/2),t.lineTo(r,n/2),t.lineCap=i.prog_line_cap,t.lineWidth=i.prog_line_height,t.strokeStyle=i.prog_line_clr,t.stroke())})(t.target)))}));e.each(n,((e,t)=>{s.observe(t)}))},FilterableProductList:function(t){let o=t.find(".filter-nav-link"),n=t.find(".shopengine-filterable-product-wrap"),i=t.find(".filter-content"),r=JSON.parse(t.find(".shopengine-shopengine-filterable-product-list").attr("data-widget_settings"));t.on("click",".filter-nav-link",(function(t){t.preventDefault();let a=e(this),s=a.data("product-list"),c=a.data("filter-uid"),l=a.data("product-order"),d=a.data("product-order-by");o.removeClass("active"),a.addClass("active"),i.find(`.filter-${c}`).length?(i.find(".filtered-product-list").removeClass("active"),i.find(".filter-"+c).addClass("active")):jQuery.ajax({data:{products:s,order:l,order_by:d,settings:r},type:"GET",dataType:"html",url:shopEngineApiSettings.resturl+"shopengine-builder/v1/widgets_partials/filter_cat_products/",beforeSend:function(){n.addClass("is-loading")},success:function(e){i.find(".filtered-product-list").removeClass("active"),i.find(`.filter-${c}`).length||i.append('<div class="filter-content-row filtered-product-list active filter-'+c+'">'+e+"</div>")},complete:function(){n.removeClass("is-loading")}})}))},CheckoutFormLogin:function(e){let t=e.find(".woocommerce-form-login-toggle");if(0===t.length)return;t.remove();let o=e.find(".shopengine-checkout-form-login"),n=t[0].outerHTML+'<div class="shopengine-checkout-login-form" style="display:none">'+o.html()+"</div>";o.html(n),e.on("click",".showlogin",(function(t){t.preventDefault();let o=e.find(".shopengine-checkout-login-form");"none"===o.css("display")?o.slideDown():o.slideUp()})),e.on("click",".woocommerce-form-login__submit",(function(t){t.preventDefault(),t.target.disabled=!0;let o=e[0].querySelector('input[name="username"]'),n=e[0].querySelector('input[name="password"]'),i=e[0].querySelector('input[name="rememberme"]'),r=e[0].querySelector(".form-row-first"),a=e[0].querySelector(".form-row-last"),s=!0;if(0===o.value.length?(r.querySelector(".shopengine-checkout-login-required-msg")||(r.innerHTML+='<span class="shopengine-checkout-login-required-msg" style="color:red">User name or email field is required</span>'),s=!1):r.querySelector(".shopengine-checkout-login-required-msg")&&r.querySelector(".shopengine-checkout-login-required-msg").remove(),0===n.value.length?(a.querySelector(".shopengine-checkout-login-required-msg")||(a.innerHTML+='<span class="shopengine-checkout-login-required-msg" style="color:red">Password field is required</span>'),s=!1):a.querySelector(".shopengine-checkout-login-required-msg")&&a.querySelector(".shopengine-checkout-login-required-msg").remove(),!1===s)t.target.disabled=!1;else{e[0].querySelectorAll(".shopengine-checkout-login-required-msg").forEach((e=>{e.remove()})),jQuery.ajax({data:{user_login:o.value,user_password:n.value,rememberme:i.checked},type:"POST",dataType:"json",url:shopEngineApiSettings.resturl+"shopengine-builder/v1/widgets_partials/checkout_login/",success:function(){location.reload()},error:function(t){e.find(".woocommerce-NoticeGroup").remove();let o='<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout"><ul class="woocommerce-error" role="alert"><ul><li>'+t.responseJSON.message+"</li></ul></div>";jQuery(".shopengine-checkout-form-login").prepend(o)},complete:function(){e.find(".woocommerce-form-login__submit").prop("disabled",!1)}})}}))}};e(window).on("elementor/frontend/init",c.init),e(document).on("click","button.my-xs-class",(function(t){t.preventDefault();let o=e("form.checkout_coupon");o.find("#coupon_code").val(jQuery(this).closest("div").find("#shopengine_code").val()),o.trigger("submit")}))}(jQuery,window.elementorFrontend);let shopengine_wrapper=document.querySelector(".shopengine-checkout-notice");if(shopengine_wrapper){const e=document.querySelector(".shopengine-woocommerce-checkout-form");if(e){const t={childList:!0,subtree:!0};new MutationObserver((function(){let e=document.querySelector(".woocommerce-NoticeGroup");e&&""!==e.innerHTML&&(shopengine_wrapper.innerHTML=e.innerHTML,e.innerHTML="")})).observe(e,t)}};