PATH:
home
/
thebhoeo
/
public_html
/
wp-content
/
themes
/
woodmart
/
js
/
scripts
var woodmartThemeModule={};function updateGiftsTable(){var e=document.querySelector(".wd-fg");if(e){var t=!!e.dataset.hasOwnProperty("settings")&&JSON.parse(e.dataset.settings),o=e.querySelector(".wd-loader-overlay");o&&o.classList.add("wd-loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_gifts_table"},method:"POST",success:function(o){if(o&&e&&o.hasOwnProperty("html")){let d=document.createElement("div");if(d.innerHTML=o.html,t&&"no"===t.show_title){var a=d.querySelector(".wd-el-title");a&&a.remove()}childNodes=d.childNodes,0===childNodes.length?e.classList.add("wd-hide"):e.classList.remove("wd-hide"),e.replaceChildren(...childNodes)}},error:function(){console.log("ajax update gifts table error")},complete:function(){o&&o.classList.remove("wd-loading")}})}}function ShaderX(e){this.options=jQuery.extend({},{container:null,sizeContainer:null,autoPlay:!0,vertexShader:"",fragmentShader:"",width:0,height:0,mouseMove:!1,distImage:!1},e),this.container=this.options.container,this.pixelRatio=window.devicePixelRatio,this.uniforms={},this.time=0,this.progress=0,this.empty=!0,this.images={},this.texture1=null,this.texture2=null,this.resizing=!1,this.resizingTimeout=0,this.border=0,this.scale=1,this.drawn=!1,this.runned=!1,this.mouseX=0,this.mouseY=0,this.loadedTextures={},this.options.autoPlay&&this.init()}function openMobileNavEvent(e){e.preventDefault();var t=document.querySelector(".wd-side-hidden-nav");t.classList.contains("wd-opened")?woodmartThemeModule.closeMobileNavigation():(this.parentNode.classList.add("wd-opened"),woodmartThemeModule.openMobileNavigation(t))}!function(e){"use strict";woodmartThemeModule.supports_html5_storage=!1;try{woodmartThemeModule.supports_html5_storage="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wd","test"),window.sessionStorage.removeItem("wd")}catch(o){woodmartThemeModule.supports_html5_storage=!1}woodmartThemeModule.$window=e(window),woodmartThemeModule.$document=e(document),woodmartThemeModule.$body=e("body"),woodmartThemeModule.windowWidth=woodmartThemeModule.$window.width(),woodmartThemeModule.removeDuplicatedStylesFromHTML=function(t,o,a=""){var d=e('<div class="temp-wrapper"></div>').append(t),n=e("head"),i=d.find("link"),r=0,s=!1,l=0;function c(){var t=i.length+l;r>=t&&!s&&(o(e(d.html())),s=!0)}a&&a.find("link").each(function(){l++;var t=e(this).clone();t.on("load error",function(){r++,c()}),n.append(t)}),0!==i.length||0!==l?(i.each(function(){void 0!==e(this).attr("id")&&-1!==e(this).attr("id").indexOf("theme_settings_")&&n.find('link[id*="theme_settings_"]:not([id*="theme_settings_default"])').remove()}),i.each(function(){var t=e(this),o=t.attr("id"),a=t.attr("href");if(void 0===o)return r++,void c();var d=-1!==o.indexOf("theme_settings_"),i=-1!==o.indexOf("theme_settings_default");t.remove(),void 0!==woodmart_page_css[o]||i?(r++,c()):(d||(woodmart_page_css[o]=a),n.append(t.on("load error",function(){r++,c()})))})):o(t)},woodmartThemeModule.debounce=function(e,t,o){var a;return function(){var d=this,n=arguments,i=o&&!a;clearTimeout(a),a=setTimeout(function(){a=null,o||e.apply(d,n)},t),i&&e.apply(d,n)}},woodmartThemeModule.wdElementorAddAction=function(e,t){woodmartThemeModule.$window.on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&elementorFrontend.hooks.addAction(e,t)})},woodmartThemeModule.slideUp=function(e,t){t=t||400,e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.boxSizing="border-box",e.style.height=e.offsetHeight+"px",window.getComputedStyle(e).height,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout(function(){e.style.display="none",e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},t)},woodmartThemeModule.slideDown=function(e,t){t=t||400,e.style.removeProperty("display");var o=window.getComputedStyle(e).display;"none"===o&&(o="block"),e.style.display=o;var a=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.getComputedStyle(e).height,e.style.boxSizing="border-box",e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=a+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(function(){e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},t)},woodmartThemeModule.googleMapsCallback=function(){return""};var t=null;woodmartThemeModule.$document.on("wdOpenSide wdOpenSearch",".wd-side-hidden, .wd-fs-menu, [class*=wd-search-full-screen]",function(){var o=e(this);t=document.activeElement,o.attr("tabindex")||o.attr("tabindex","-1"),o.trigger("focus"),e(document).on("focusin.wd",function(t){t.target===o[0]||o[0].contains(t.target)||e(t.target).closest(".mfp-wrap").length||o.trigger("focus")})}).on("wdCloseSide wdCloseSearch",".wd-side-hidden, .wd-fs-menu, [class*=wd-search-full-screen]",function(){e(document).off("focusin.wd"),t&&document.contains(t)&&(t.closest(".wd-quick-shop, .wd-quick-shop-2")&&(t=t.closest(".wd-product").querySelector(".wd-product-img-link")),e(t).trigger("focus"),t=null)}),woodmartThemeModule.$document.on("keyup",".wd-role-btn[tabindex]",function(t){13===t.which&&(e(this).trigger("click"),t.preventDefault())})}(jQuery),window.addEventListener("load",function(){var e=["keydown","scroll","mouseover","touchmove","touchstart","mousedown","mousemove"],t=function(){window.dispatchEvent(new CustomEvent("wdEventStarted")),o()},o=function(){e.forEach(function(e){window.removeEventListener(e,t)})};setTimeout(function(){e.forEach(function(e){!function(e){window.addEventListener(e,t)}(e)})},100)}),function(e){woodmartThemeModule.$document.on("wdShopPageInit wdUpdateWishlist wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.woodmartCompare()}),woodmartThemeModule.woodmartCompare=function(){var t=woodmartThemeModule.$body,o="woodmart_compare_list",a="";function d(t){var a=e(this),d=a.data("id"),n=e(`.wd-compare-btn a[data-id='${d}']`),i=e(".wd-header-compare");if(n.hasClass("added"))return!0;if(t.preventDefault(),!i.find(".wd-dropdown-compare").length){var r=[],s=Cookies.get(o);return void 0!==s&&s&&(r=Object.values(JSON.parse(s))),r.length&&-1!==r.indexOf(d.toString())||r.push(d.toString()),c(r.length),Cookies.set(o,JSON.stringify(r),{expires:parseInt(woodmart_settings.cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),void l(n)}a.addClass("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_to_compare",id:d},dataType:"json",method:"GET",success:function(t){if(t.count){var a=e(".wd-header-compare");a.length>0&&a.find(".wd-tools-count").text(t.count),l(n)}else console.log("something wrong loading compare data ",t);t.fragments&&(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),sessionStorage.setItem(o+"_fragments",JSON.stringify(t.fragments)))},error:function(){console.log("We cant add to compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){n.removeClass("loading")}})}function n(t){t.stopImmediatePropagation(),t.preventDefault();var i=e(this).data("id").toString(),r=e(`.wd-compare-btn a[data-id='${i}']`),s=[];a&&(s=Object.values(JSON.parse(a))),s=s.filter(function(e){return e!==i}),Cookies.set(o,JSON.stringify(s),{expires:parseInt(woodmart_settings.cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),a=Cookies.get(o),r.removeClass("added"),r.find(".wd-action-text").length>0?r.find(".wd-action-text").text(woodmart_settings.compare_origin_button_text):r.text(woodmart_settings.compare_origin_button_text),r.off("click",n),r.on("click",d),woodmartThemeModule.$document.trigger("wdUpdateTooltip",r),c(s.length)}function i(t,a){var d=a.find(".wd-loader-overlay");d.addClass("wd-loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_category_from_compare",category_id:t,key:woodmart_settings.compare_page_nonce},dataType:"json",method:"GET",success:function(t){t.table?(r(t),t.fragments&&(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),sessionStorage.setItem(o+"_fragments",JSON.stringify(t.fragments)))):console.log("something wrong loading compare data ",t)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){d.removeClass("wd-loading");var t=e(".wd-compare-table").first();setTimeout(function(){t.addClass("wd-active")},100),setTimeout(function(){t.addClass("wd-in"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200)}})}function r(t){var o=e(".wd-header-compare"),a=e(".wd-compare-table, .wd-compare-page");o.length>0&&o.find(".wd-tools-count").text(t.count),woodmartThemeModule.removeDuplicatedStylesFromHTML(t.table,function(e){a.replaceWith(e)},a),void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category&&woodmartThemeModule.$document.trigger("wdTabsInit")}function s(){jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_get_fragment_product_category_compare"},dataType:"json",method:"GET",success:function(t){t.fragments?(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),sessionStorage.setItem(o+"_fragments",JSON.stringify(t.fragments))):console.log("something wrong loading compare data ",t)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")}})}function l(e){var t=woodmart_settings.compare_added_button_text;e.find(".wd-action-text").length>0?e.find(".wd-action-text").text(t):e.text(t),e.addClass("added"),woodmartThemeModule.$document.trigger("added_to_compare"),woodmartThemeModule.$document.trigger("wdUpdateTooltip",e)}function c(t){var o=e(".wd-header-compare");o.length>0&&o.find(".wd-tools-count").text(t)}woodmart_settings.is_multisite&&(o+="_"+woodmart_settings.current_blog_id),"undefined"!=typeof Cookies&&(a=Cookies.get(o),function(){if(void 0!==woodmart_settings.compare_save_button_state&&"yes"===woodmart_settings.compare_save_button_state&&"undefined"!=typeof Cookies){var t=a?Object.values(JSON.parse(a)):[],o=t.length?e(t.map(e=>`.wd-compare-btn a[data-id='${e}']`).join(", ")):[];o.length&&e.each(o,function(t,o){var a=e(o);a.length&&!a.hasClass("added")&&(a.addClass("added"),a.find(".wd-action-text").length>0?a.find(".wd-action-text").text(woodmart_settings.compare_removed_button_text):a.text(woodmart_settings.compare_removed_button_text),a.off("click.wdCompareSaved").on("click.wdCompareSaved",n),woodmartThemeModule.$document.trigger("wdUpdateTooltip",a))})}}(),function(){var t=e(".wd-header-compare");if(!(t.length<=0)){if(void 0!==a)try{var d=JSON.parse(a);t.find(".wd-tools-count").text(d.length)}catch(n){console.log("cant parse cookies json")}else t.find(".wd-tools-count").text(0);if(void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category)try{!function(){if(woodmartThemeModule.supports_html5_storage){var t=JSON.parse(sessionStorage.getItem(o+"_fragments"));"undefined"==typeof actions||"1"!==actions.is_lang_switched&&"1"!==actions.force_reset||(t=""),t?e.each(t,function(t,o){e(t).replaceWith(o)}):s()}else s()}()}catch(n){s()}}}(),t.off(".wdCompare"),t.on("click.wdCompare",".wd-compare-btn a",d),t.on("click.wdCompare",".wd-compare-remove",function(t){t.preventDefault();var a=e(this),d=a.data("id"),n="";void 0!==woodmart_settings.compare_by_category&&"yes"===woodmart_settings.compare_by_category&&(n=a.parents(".wd-compare-table").data("category-id"))&&1>=a.parents(".compare-value").siblings().length?i(n,a.parents(".wd-compare-page")):(a.addClass("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_compare",id:d,category_id:n,key:woodmart_settings.compare_page_nonce},dataType:"json",method:"GET",success:function(t){t.table?(r(t),t.fragments&&(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),sessionStorage.setItem(o+"_fragments",JSON.stringify(t.fragments)))):console.log("something wrong loading compare data ",t)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){a.removeClass("loading")}}))}),t.on("change.wdCompare",".wd-compare-select",function(t){t.preventDefault();var o=e(this),a=o.parents(".wd-compare-page"),d=a.find(".wd-compare-table[data-category-id="+o.val()+"]"),n=a.find(".wd-compare-table.wd-active");a.find(".wd-compare-cat-link").attr("href",d.data("category-url")),n.removeClass("wd-in"),setTimeout(function(){n.removeClass("wd-active")},100),setTimeout(function(){d.addClass("wd-active")},100),setTimeout(function(){d.addClass("wd-in"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200)}),t.on("click.wdCompare",".wd-compare-remove-cat",function(t){t.preventDefault();var o=e(this);i(o.parents(".wd-compare-header").find(".wd-compare-select").val(),o.parents(".wd-compare-page"))}))},e(document).ready(function(){woodmartThemeModule.woodmartCompare()})}(jQuery),function(e){woodmartThemeModule.woocommerceWrappTable=function(){e(".shop_table:not(.shop_table_responsive):not(.woocommerce-checkout-review-order-table)").wrap("<div class='responsive-table'></div>")},e(document).ready(function(){woodmartThemeModule.woocommerceWrappTable()})}(jQuery),function(e){woodmartThemeModule.woocommerceQuantity=function(){String.prototype.getDecimals||Object.defineProperty(String.prototype,"getDecimals",{value:function(){var e=(""+this).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0},enumerable:!1}),woodmartThemeModule.$document.on("click",".plus, .minus",function(t){t.preventDefault();var o=e(this),a=o.closest(".quantity").find(".qty"),d=parseFloat(a.val()),n=parseFloat(a.attr("max")),i=parseFloat(a.attr("min")),r=a.attr("step");d&&""!==d&&"NaN"!==d||(d=0),""!==n&&"NaN"!==n||(n=""),""!==i&&"NaN"!==i||(i=0),"any"!==r&&""!==r&&void 0!==r&&"NaN"!=parseFloat(r)||(r="1"),o.is(".plus")?n&&(d+parseFloat(r)).toFixed(r.getDecimals())>=n?a.val(n):a.val((d+parseFloat(r)).toFixed(r.getDecimals())):i&&(d-parseFloat(r)).toFixed(r.getDecimals())<=i?a.val(i):d>0&&a.val((d-parseFloat(r)).toFixed(r.getDecimals())),a.trigger("change")})},e(document).ready(function(){woodmartThemeModule.woocommerceQuantity()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdBackHistory wdShopPageInit",function(){woodmartThemeModule.woocommercePriceSlider()}),woodmartThemeModule.woocommercePriceSlider=function(){var t=e(".price_slider_amount"),o=e(".price_slider_amount #min_price"),a=e(".price_slider_amount #max_price"),d=e(".products"),n=new URL(window.location.href);if("undefined"==typeof woocommerce_price_slider_params||o.length<1||!e.fn.slider)return!1;var i=e(".price_slider");if(void 0===i.slider("instance")){e("input#min_price, input#max_price").hide(),e(".price_slider, .price_label").show();var r=parseInt(o.data("min")),s=parseInt(a.data("max")),l=t.data("step")||1,c=parseInt(n.searchParams.has("min_price")?n.searchParams.get("min_price"):r,10),u=parseInt(n.searchParams.has("max_price")?n.searchParams.get("max_price"):s,10);d.attr("data-min_price")&&d.attr("data-min_price").length>0&&(c=parseInt(d.attr("data-min_price"),10)),d.attr("data-max_price")&&d.attr("data-max_price").length>0&&(u=parseInt(d.attr("data-max_price"),10)),i.slider({range:!0,animate:!0,min:r,max:s,step:l,values:[c,u],create:function(){o.val(c),a.val(u),woodmartThemeModule.$body.trigger("price_slider_create",[c,u])},slide:function(e,t){o.val(t.values[0]),a.val(t.values[1]),woodmartThemeModule.$body.trigger("price_slider_slide",[t.values[0],t.values[1]])},change:function(e,t){woodmartThemeModule.$body.trigger("price_slider_change",[t.values[0],t.values[1]])}}),setTimeout(function(){woodmartThemeModule.$body.trigger("price_slider_create",[c,u]),i.find(".ui-slider-range").length>1&&i.find(".ui-slider-range").first().remove()},10)}},e(document).ready(function(){woodmartThemeModule.woocommercePriceSlider()})}(jQuery),function(e){woodmartThemeModule.woocommerceComments=function(){var t=window.location.hash,o=window.location.href;!document.querySelector(".wd-hidden-tab-title")&&(t.toLowerCase().indexOf("comment-")>=0||"#reviews"===t||"#tab-reviews"===t||o.indexOf("comment-page-")>0||o.indexOf("cpage=")>0||"#tab-wd_additional_tab"===t||"#tab-wd_custom_tab"===t)&&(setTimeout(function(){window.scrollTo(0,0)},1),e(".single-product-page").hasClass("reviews-location-separate")&&("#reviews"===t||"#tab-reviews"===t||t.toLowerCase().indexOf("comment-")>=0||o.indexOf("comment-page-")>0||o.indexOf("cpage=")>0)&&woodmartThemeModule.$body.find(".wc-tabs, ul.tabs").first().find("li:first a").click(),setTimeout(function(){if(e(t).length>0){var o=e(".woocommerce-tabs a[href="+t+"]");o.length&&o.trigger("click"),setTimeout(function(){e("html, body").stop().animate({scrollTop:e(t).offset().top-woodmart_settings.ajax_scroll_offset},400)},400)}},10)),e(".wd-builder-on .woocommerce-review-link").on("click",function(){var t=e(".wd-single-tabs .wd-accordion:not(.tabs-layout-accordion) .wd-accordion-title.tab-title-reviews");t.length&&(t.trigger("click"),setTimeout(function(){e("html, body").stop().animate({scrollTop:t.offset().top-woodmart_settings.ajax_scroll_offset},400)},400))})},e(document).ready(function(){woodmartThemeModule.woocommerceComments()})}(jQuery),function(e){woodmartThemeModule.wishlistGroup=function(){if(void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded){var t=woodmart_settings.wishlist_fragment_name,o="woodmart_wishlist_hash";woodmart_settings.is_multisite&&(o+="_"+woodmart_settings.current_blog_id);try{i()}catch(s){r()}woodmartThemeModule.$body.on("keyup",".wd-wishlist-group-name",function(t){"Enter"===t.key&&e(".btn.wd-wishlist-save-btn").trigger("click")}),woodmartThemeModule.$body.on("keyup",".wd-wishlist-input-rename",function(t){"Enter"===t.key&&e(".btn.wd-wishlist-rename-save").trigger("click")}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove-group",function(t){t.preventDefault();var o=e(this),d=o.parents(".wd-wishlist-group").data("group-id"),n=o.parents(".wd-wishlist-group").find(".wd-loader-overlay");confirm(woodmart_settings.wishlist_remove_notice)&&(n.addClass("wd-loading"),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_group_from_wishlist",group_id:d,key:woodmart_settings.wishlist_page_nonce},dataType:"json",method:"GET",success:function(e){e.wishlist_content?woodmartThemeModule.$document.trigger("wdUpdateWishlistContent",e,"something"):console.log("something wrong loading wishlist data ",e),e.fragments&&a(e.fragments,e.hash)},error:function(){console.log("We cant remove from wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){n.removeClass("wd-loading")}}))}),woodmartThemeModule.$body.on("click",".wd-wishlist-edit-title",function(t){t.preventDefault();var o=e(this).parents(".wd-wishlist-group-head").find(".wd-wishlist-group-title"),a=o.find(".wd-wishlist-input-rename"),d=a.val();o.addClass("wd-edit"),a.val("").val(d).trigger("focus"),woodmartThemeModule.$body.on("mouseup",function(t){var o=e(this),a=e(".wd-wishlist-group-title.wd-edit");if(a.length){var d=a.parents(".wd-wishlist-group-head");d.is(t.target)||0!==d.has(t.target).length||(a.removeClass("wd-edit"),o.off(t))}else o.off(t)})}),woodmartThemeModule.$body.on("click",".wd-wishlist-rename-cancel",function(t){t.preventDefault(),e(this).parents(".wd-wishlist-group-title").removeClass("wd-edit")}),woodmartThemeModule.$body.on("click",".wd-wishlist-rename-save",function(t){t.preventDefault();var o=e(this),d=o.parents(".wd-wishlist-group-title"),n=o.parents(".wd-wishlist-group"),i=o.siblings(".wd-wishlist-input-rename"),r=i.val(),s=n.data("group-id");r?i.data("title")!==r?(o.addClass("loading"),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_rename_wishlist_group",title:r,group_id:s,key:woodmart_settings.wishlist_page_nonce},dataType:"json",method:"GET",success:function(e){e?(d.find(">.title").text(r),i.data("title",r)):console.log("something wrong loading wishlist data ",e),e.fragments&&a(e.fragments,e.hash)},error:function(){console.log("We cant add to wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){d.removeClass("wd-edit"),o.removeClass("loading")}})):d.removeClass("wd-edit"):alert(woodmart_settings.wishlist_rename_group_notice)}),woodmartThemeModule.$body.on("click",".wd-wishlist-create-group-btn",function(e){e.preventDefault(),n("",""," wd-create-group-on-page")}),woodmartThemeModule.$body.on("click",".wd-wishlist-move-action > a",function(t){t.preventDefault();var o=e(this),a=o.parents(".wd-wishlist-group").find(".product.wd-current-product"),d=[];a.length&&(o.addClass("wd-loading"),a.each(function(){d.push(e(this).data("id"))}),n(d,""," wd-move-action"))}),woodmartThemeModule.$body.on("click",".wd-wishlist-group-list li",function(t){var o=e(this);if("add_new"===o.data("group-id")){t.preventDefault();var a=o.parents(".wd-popup-wishlist");return a.addClass("wd-create-group"),void a.find(".wd-wishlist-group-name").trigger("focus")}o.siblings().removeClass("wd-current").find("input").prop("checked",!1),o.addClass("wd-current"),o.find("input").prop("checked",!0)}),woodmartThemeModule.$body.on("click",".wd-wishlist-save-btn",function(t){t.preventDefault();var o=e(this),d=o.parents(".wd-popup-wishlist"),n=o.siblings(".wd-wishlist-group-list"),i=e(".wd-wishlist-move-action > a.wd-loading"),r=n.data("product-id"),s="";if(d.hasClass("wd-create-group"))s=d.find(".wd-wishlist-group-name").val();else{if(d.parents(".wd-create-group-on-page").length)return void function(t,o,d=!1){t&&(o.addClass("loading"),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_save_wishlist_group",group:t,key:woodmart_settings.wishlist_page_nonce},dataType:"json",method:"GET",success:function(t){if(t){t.wishlist_content&&woodmartThemeModule.$document.trigger("wdUpdateWishlistContent",t),t.fragments&&a(t.fragments,t.hash),(d||o.parents(".wd-create-group-on-page").length)&&e.magnificPopup.close();var n=e(".wd-wishlist-content").find(".wd-wishlist-group");if(n.length){var i=n.last().offset().top-woodmart_settings.ajax_scroll_offset;e("html, body").stop().animate({scrollTop:i},500)}}else console.log("something wrong loading wishlist data ",t)},error:function(){console.log("We cant add to wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){o.removeClass("loading"),o.siblings(".wd-wishlist-create-group").find(".wd-wishlist-group-name").val("")}}))}(s=d.find(".wd-wishlist-group-name").val(),o,i.length);s=n.find("li.wd-current").data("group-id")}if(s)if(o.addClass("loading"),i.length){var l=i.parents(".wd-wishlist-group").data("group-id");e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_move_products_from_wishlist",products_id:r,group_id:s,group_id_old:l,key:woodmart_settings.wishlist_page_nonce},dataType:"json",method:"GET",success:function(e){e.wishlist_content?woodmartThemeModule.$document.trigger("wdUpdateWishlistContent",e):console.log("something wrong loading wishlist data ",e),e.fragments&&a(e.fragments,e.hash)},error:function(){console.log("We cant remove from wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){o.removeClass("wd-loading"),e.magnificPopup.close(),i.removeClass("wd-loading")}})}else woodmartThemeModule.$document.trigger("wdAddProductToWishlist",[r,s,n.data("nonce"),function(){(d=e(".wd-popup-wishlist")).addClass("wd-added"),d.addClass("wd-in"),d.removeClass("wd-create-group"),o.removeClass("loading")}])}),woodmartThemeModule.$body.on("click",".wd-wishlist-back-btn",function(t){t.preventDefault(),e(this).parents(".wd-popup-wishlist").removeClass("wd-create-group")}),woodmartThemeModule.$body.on("click",".wd-wishlist-back-to-shop",function(t){t.preventDefault(),void 0!==e.fn.magnificPopup&&e.magnificPopup.close()}),woodmartThemeModule.$document.on("wdShowWishlistGroupPopup",function(e,t,o){n(t,o)}),woodmartThemeModule.$document.on("wdUpdateWishlistFragments",function(e,t,o){a(t,o)}),woodmartThemeModule.$document.on("wdWishlistSaveFragments",function(e,t,o){d(t,o)})}function a(t,o=""){setTimeout(function(){e.each(t,function(t,o){var a=e(t);woodmartThemeModule.removeDuplicatedStylesFromHTML(o,function(e){a.replaceWith(e)},a)})},600),d(t,o)}function d(e,a){localStorage.setItem(t,JSON.stringify(e)),sessionStorage.setItem(t,JSON.stringify(e)),localStorage.setItem(woodmart_settings.wishlist_hash_name,a),sessionStorage.setItem(woodmart_settings.wishlist_hash_name,a),Cookies.set(o,a,{expires:parseInt(woodmart_settings.wishlist_cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param})}function n(t,o,a=""){if(void 0!==e.fn.magnificPopup){var d=e(".wd-popup-wishlist").find("ul"),n=e(".wd-wishlist-move-action > a.wd-loading");void 0!==woodmart_settings.wishlist_show_popup&&"more_one"===woodmart_settings.wishlist_show_popup&&2>d.data("group-count")&&!n.length&&!a?woodmartThemeModule.$document.trigger("wdAddProductToWishlist",[t,"",o,""]):(e.magnificPopup?.instance?.isOpen&&(e.magnificPopup.instance.st.removalDelay=0,e.magnificPopup.close()),e.magnificPopup.open({removalDelay:600,closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,fixedContentPos:!0,callbacks:{beforeOpen:function(){this.wrap.addClass("wd-popup-wishlist-wrap"+a)},open:function(){var d=e(this.content[0]),n=d.find(".wd-wishlist-save-btn");d.find("ul").attr("data-product-id",t).attr("data-nonce",o),d.find("ul").find("li").first().trigger("click")," wd-create-group-on-page"===a&&(n.html(n.data("create-text")),setTimeout(function(){d.find(".wd-wishlist-group-name").trigger("focus")},500))," wd-move-action"===a&&n.html(n.data("move-text"))},close:function(){o&&e("a[data-product-id="+t+"]").removeClass("loading");var d=e(this.content[0]);if(" wd-create-group-on-page"===a&&d.find(".wd-wishlist-save-btn").hasClass("loading")){var r=e(".wd-wishlist-content").find(".wd-wishlist-group").last();setTimeout(function(){e("html, body").animate({scrollTop:r.offset().top-100},500)},50)}d.removeClass("wd-create-group"),d.removeClass("wd-added"),d.find(".wd-wishlist-save-btn").removeClass("loading"),d.find(".wd-wishlist-group-name").val(""),d.find(".wd-wishlist-group-list li.wd-current").removeClass("wd-current").find("input").prop("checked",!1),n.removeClass("loading"),setTimeout(function(){i()},600)}},items:{src:".wd-popup-wishlist"}}))}}function i(){if(woodmartThemeModule.supports_html5_storage){var a=JSON.parse(sessionStorage.getItem(t));sessionStorage.getItem(woodmart_settings.wishlist_hash_name)!==Cookies.get(o)&&(a=""),sessionStorage.getItem(t)!==localStorage.getItem(t)&&(a=""),"undefined"==typeof actions||"1"!==actions.is_lang_switched&&"1"!==actions.force_reset||(a=""),a?e.each(a,function(t,o){var a=e(t);woodmartThemeModule.removeDuplicatedStylesFromHTML(o,function(e){a.replaceWith(e)},a)}):r()}else r()}function r(){e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_get_wishlist_fragments",key:woodmart_settings.wishlist_fragments_nonce},dataType:"json",method:"GET",success:function(e){e.fragments?a(e.fragments,e.hash):console.log("something wrong loading compare data ",e)},error:function(){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")}})}},e(document).ready(function(){woodmartThemeModule.wishlistGroup()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.updateWishlistButtonState()}),woodmartThemeModule.wishlist=function(){var t="woodmart_wishlist_count",o="woodmart_wishlist_products";if(woodmart_settings.is_multisite&&(t+="_"+woodmart_settings.current_blog_id,o+="_"+woodmart_settings.current_blog_id),"undefined"!=typeof Cookies){var a=Cookies.get(t),d=0;if(void 0!==a)try{d=JSON.parse(a)}catch(l){console.log("cant parse cookies json")}void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded||n(d),woodmartThemeModule.$body.on("click",".wd-wishlist-btn a",function(a){var d=e(this);a.preventDefault();var r=d.data("product-id"),l=e(`.wd-wishlist-btn a[data-product-id='${r}']`),c=d.data("key");if(woodmartThemeModule.$body.hasClass("logged-in")||"undefined"==typeof Cookies){if(l.addClass("loading"),!l.hasClass("added")&&void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded&&"disable"!==woodmart_settings.wishlist_show_popup&&woodmartThemeModule.$body.hasClass("logged-in"))return void woodmartThemeModule.$document.trigger("wdShowWishlistGroupPopup",[r,c]);l.hasClass("added")?e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_wishlist",product_id:r,key:woodmart_settings.wishlist_page_nonce},dataType:"json",method:"GET",success:function(t){void 0!==t.count&&n(t.count),t.fragments&&(woodmartThemeModule.$document.trigger("wdWishlistSaveFragments",[t.fragments,t.hash]),e.each(t.fragments,function(t,o){var a=e(t);woodmartThemeModule.removeDuplicatedStylesFromHTML(o,function(e){a.replaceWith(e)},a)})),s(l,!1)},error:function(){console.log("We cant remove from wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){l.removeClass("loading")}}):i(r,"",c)}else{var u=!0,m={},w=Cookies.get(o);if(void 0!==w&&w){var h=JSON.parse(w);Object.keys(h).length&&(m=h)}l.hasClass("added")&&void 0!==m[r]?(u=!1,delete m[r]):m[r]={product_id:r};var p=Object.keys(m).length;n(p),Cookies.set(o,JSON.stringify(m),{expires:parseInt(woodmart_settings.wishlist_cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),Cookies.set(t,p,{expires:parseInt(woodmart_settings.wishlist_cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),s(l,u)}}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove",function(a){a.preventDefault();var d=e(this),i="";if(d.parents(".wd-wishlist-group").length&&(i=d.parents(".wd-wishlist-group").data("group-id")),d.addClass("loading"),woodmartThemeModule.$body.hasClass("logged-in")||"undefined"==typeof Cookies||1===d.parents(".wd-products").find(".wd-product").length)r(d.data("product-id"),i,d.parents(".wd-products"),function(){d.removeClass("loading")});else{d.parents(".wd-product").find("link").appendTo("head"),d.parents(".wd-product").remove();var s=Cookies.get(o),l={};void 0!==s&&s&&(l=JSON.parse(s),Object.keys(l).length&&delete l[d.data("product-id")]);var c=Object.keys(l).length;n(c),Cookies.set(o,JSON.stringify(l),{expires:parseInt(woodmart_settings.wishlist_cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),Cookies.set(t,c,{expires:parseInt(woodmart_settings.wishlist_cookie_expires),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param})}}),woodmartThemeModule.$body.on("click",".wd-wishlist-checkbox",function(t){var o=e(this),a=o.parents(".wd-product"),d=o.parents(".wd-products-element").siblings(".wd-wishlist-bulk-action"),n=d.find(".wd-wishlist-select-all");a.toggleClass("wd-current-product"),n.hasClass("wd-selected")&&d.hasClass("wd-visible")&&!a.hasClass("wd-current-product")&&n.removeClass("wd-selected"),a.siblings(".product").length===a.siblings(".wd-current-product").length&&a.hasClass("wd-current-product")&&n.addClass("wd-selected"),a.siblings(".wd-current-product").length||!d.hasClass("wd-visible")||a.hasClass("wd-current-product")?d.addClass("wd-visible"):d.removeClass("wd-visible")}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove-action > a",function(t){t.preventDefault();var o=e(this),a=o.parents(".wd-wishlist-bulk-action").siblings(".wd-products-element").find(".products"),d=a.find(".wd-current-product"),n=[],i="";d.length&&confirm(woodmart_settings.wishlist_remove_notice)&&(o.addClass("loading"),o.parents(".wd-wishlist-group").length&&(i=o.parents(".wd-wishlist-group").data("group-id")),d.each(function(){n.push(e(this).data("id"))}),r(n,i,a,function(){o.parents(".wd-wishlist-bulk-action").removeClass("wd-visible"),o.removeClass("loading")}))}),woodmartThemeModule.$body.on("click",".wd-wishlist-select-all > a",function(t){t.preventDefault();var o=e(this).parent(),a=o.parents(".wd-wishlist-bulk-action").siblings(".wd-products-element").find(".products");o.hasClass("wd-selected")?(a.find(".product").removeClass("wd-current-product").find(".wd-wishlist-checkbox").prop("checked",!1),o.removeClass("wd-selected"),o.parents(".wd-wishlist-bulk-action").removeClass("wd-visible")):(a.find(".product").addClass("wd-current-product").find(".wd-wishlist-checkbox").prop("checked",!0),o.addClass("wd-selected"))}),woodmartThemeModule.$document.on("wdAddProductToWishlist",function(e,t,o,a,d){i(t,o,a,d)}),woodmartThemeModule.$document.on("wdRemoveProductToWishlist",function(e,t,o,a,d){r(t,o,a,d)}),woodmartThemeModule.$document.on("wdUpdateWishlistContent",function(t,o){var a,d;a=o,d=e(".wd-wishlist-content"),n(a.count),d.length>0&&!d.hasClass("wd-wishlist-preview")&&woodmartThemeModule.removeDuplicatedStylesFromHTML(a.wishlist_content,function(e){d.replaceWith(e),woodmartThemeModule.$document.trigger("wdUpdateWishlist")},d)})}function n(t){var o=e(".wd-header-wishlist");o.length>0&&o.find(".wd-tools-count").text(t)}function i(t,o,a,d=""){var i=e(".wd-wishlist-btn a[data-product-id="+t+"]");e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_to_wishlist",product_id:t,group:o,key:a},dataType:"json",method:"GET",success:function(t){t?(t.count&&n(t.count),t.fragments&&(woodmartThemeModule.$document.trigger("wdWishlistSaveFragments",[t.fragments,t.hash]),e.each(t.fragments,function(t,o){var a=e(t);woodmartThemeModule.removeDuplicatedStylesFromHTML(o,function(e){a.replaceWith(e)},a)})),s(i)):console.log("something wrong loading wishlist data ",t),d&&d()},error:function(){console.log("We cant add to wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){i.removeClass("loading")}})}function r(t,o,a,d=""){var i="";a&&void 0!==a.data("atts")&&((i=a.data("atts")).ajax_page=a.attr("data-paged")),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_wishlist",product_id:t,group_id:o,key:woodmart_settings.wishlist_page_nonce,atts:i},dataType:"json",method:"GET",success:function(t){if(t.wishlist_content){var o=a.parents(".wd-products-element"),i=o.parents(".wd-wishlist-content");n(t.count),r=t,(s=o).length&&!e(".wd-wishlist-content").hasClass("wd-wishlist-preview")&&woodmartThemeModule.removeDuplicatedStylesFromHTML(r.wishlist_content,function(e){s.replaceWith(e),woodmartThemeModule.$document.trigger("wdUpdateWishlist")},s),setTimeout(function(){var t=e(".wd-wishlist-content .wd-pagination").find("a.page-numbers");t.length&&t.each(function(){var t=e(this),o=t.attr("href").split("product-page=")[1],a=parseInt(o);t.attr("href",window.location.origin+window.location.pathname+"?product-page="+a)})},500),t.hasOwnProperty("count")&&0===t.count&&i.find(".wd-wishlist-head, .wd-wishlist-bulk-action").remove()}else console.log("something wrong loading wishlist data ",t);var r,s;t.fragments&&woodmartThemeModule.$document.trigger("wdUpdateWishlistFragments",[t.fragments,t.hash]),d&&d()},error:function(){console.log("We cant remove from wishlist. Something wrong with AJAX response. Probably some PHP conflict.")}})}function s(e,t=!0){var o=woodmart_settings.wishlist_remove_button_text;t||(o=woodmart_settings.wishlist_add_button_text),e.find(".wd-action-text").length>0?e.find(".wd-action-text").text(o):e.text(o),t?e.addClass("added"):e.removeClass("added"),woodmartThemeModule.$document.trigger("added_to_wishlist"),setTimeout(function(){woodmartThemeModule.$document.trigger("wdUpdateTooltip",e)})}},woodmartThemeModule.updateWishlistButtonState=function(){if(void 0!==woodmart_settings.wishlist_save_button_state&&"yes"===woodmart_settings.wishlist_save_button_state&&"undefined"!=typeof Cookies&&!woodmartThemeModule.$body.hasClass("logged-in")){var t="woodmart_wishlist_products",o={};woodmart_settings.is_multisite&&(t+="_"+woodmart_settings.current_blog_id);var a=Cookies.get(t);void 0!==a&&a&&(o=Object.values(JSON.parse(a))),o.length&&e.each(o,function(t,o){var a=e(".wd-wishlist-btn a[data-product-id="+o.product_id+"]");if(a.length&&!a.hasClass("added")){a.addClass("added");var d=woodmart_settings.wishlist_remove_button_text;a.find(".wd-action-text").length>0?a.find(".wd-action-text").text(d):a.text(d)}})}},e(document).ready(function(){woodmartThemeModule.wishlist(),woodmartThemeModule.updateWishlistButtonState()})}(jQuery),woodmartThemeModule.waitlistTable=function(){var e=document.querySelector(".wd-wtl-table");e&&e.querySelectorAll(".wd-wtl-unsubscribe").forEach(function(t){t.addEventListener("click",function(t){t.preventDefault();var o=this;e.parentNode.querySelector(".wd-loader-overlay").classList.add("wd-loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_waitlist_in_my_account",product_id:o.dataset.productId},method:"POST",success:function(t){if(t&&(t.success&&o.closest("tr").remove(),t.data.content)){tempDiv=document.createElement("div"),tempDiv.innerHTML=t.data.content;var a=tempDiv.querySelector(".wd-wtl-content").childNodes;e.parentNode.replaceChildren(...a)}},error:function(){console.error("ajax remove from waitlist error")},complete:function(){e.parentNode.querySelector(".wd-loader-overlay").classList.remove("wd-loading")}})})})},window.addEventListener("load",function(){woodmartThemeModule.waitlistTable()}),function(e){woodmartThemeModule.waitlistSubscribeForm=function(){function t(e){return wtl_form_data.hasOwnProperty(e)&&wtl_form_data[e].hasOwnProperty("state")?wtl_form_data[e].state:wtl_form_data.hasOwnProperty("state")?wtl_form_data.state:"not-signed"}function o(t,o,a="not-signed"){var d=e(t);if(!wtl_form_data.global.is_user_logged_in){var r="woodmart_waitlist_unsubscribe_tokens",s=Cookies.get(r)?JSON.parse(Cookies.get(r)):{};s&&s.hasOwnProperty(o)&&(a="signed")}var l=e(`.wd-wtl-form.wd-wtl-is-template[data-state="${a}"]`).first();if(l.length&&d.length){var c=d.parent().find(".wd-wtl-form:not(.wd-wtl-is-template)").first(),u=l.clone();if("not-signed"===a){var m="";u.find(".wd-wtl-subscribe").attr("data-product-id",o),wtl_form_data.hasOwnProperty("global")&&wtl_form_data.global.email?m=wtl_form_data.global.email:wtl_form_data.hasOwnProperty("email")&&(m=wtl_form_data.email),u.find('[name="wd-wtl-user-subscribe-email"]').val(m),u.on("click",n)}else u.find(".wd-wtl-unsubscribe").attr("data-product-id",o),u.on("click",i);return u.find('[for$="-tmpl"]').each(function(){var t=e(this);t.attr("for",t.attr("for").replace("-tmpl",""))}),u.find('[id$="-tmpl"]').each(function(){var t=e(this);t.attr("id",t.attr("id").replace("-tmpl",""))}),u.removeClass("wd-wtl-is-template wd-hide"),c.length?c.replaceWith(u):d.after(u),wtl_form_data.hasOwnProperty(o)?wtl_form_data[o].state=a:wtl_form_data.hasOwnProperty("product_id")&&(wtl_form_data.product_id=a),u}}function a(t=null){var o,a=!!(o=(e("body").attr("class")||"").match(/(?:^|\s)postid-([^\s]+)/))&&o[1];if(!a)return null;c(),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_form_data",product_id:a},dataType:"json",method:"GET",success:function(e){e.hasOwnProperty("data")&&(e.data.hasOwnProperty("global")&&(wtl_form_data.global=e.data.global),e.data.hasOwnProperty("signed_ids")&&e.data.signed_ids.forEach(function(e){wtl_form_data.hasOwnProperty(e)?wtl_form_data[e].state="signed":wtl_form_data.hasOwnProperty("state")&&(wtl_form_data.state="signed")}),"function"==typeof t&&t())},error:function(){console.error("Something wrong with AJAX response. Probably some PHP conflict")},complete:function(){u()}})}function d(t){var o=e(t.target),a=o.closest(".wd-wtl-subscribe"),d=o.closest(".wd-wtl-unsubscribe");a.length?n(t):d.length&&i(t)}function n(t){var o=e(t.target).closest(".wd-wtl-subscribe");if(o.length){t.preventDefault();var a=o.closest(".wd-wtl-form"),d=a.find('[name="wd-wtl-policy-check"]'),n=a.find('[name="wd-wtl-user-subscribe-email"]'),i={action:"woodmart_add_to_waitlist",user_email:n.length?n.val():"",product_id:o.data("productId")};if(!d.length||d.prop("checked"))r(a,i);else{var l="";if(wtl_form_data.hasOwnProperty("global")&&wtl_form_data.global.policy_check_notice?l=wtl_form_data.global.policy_check_notice:wtl_form_data.hasOwnProperty("policy_check_notice")&&(l=wtl_form_data.policy_check_notice),!l)return;s(a,l,"warning")}}}function i(t){var o=e(t.target).closest(".wd-wtl-unsubscribe");if(o.length){t.preventDefault();var a="woodmart_waitlist_unsubscribe_tokens",d=o.closest(".wd-wtl-form"),n={action:"woodmart_remove_from_waitlist",product_id:o.data("productId")},i=parseInt(n.product_id,10),s=Cookies.get(a)?JSON.parse(Cookies.get(a)):{};s&&s.hasOwnProperty(i)&&(n.unsubscribe_token=s[i]),r(d,n)}}function r(t,a){var d=e(t);c(),jQuery.ajax({url:woodmart_settings.ajaxurl,data:a,method:"POST",success:function(t){if(t){if(t.success){var n=d.parent().find(".variations_form").first();n.length?(o(n,a.product_id,t.data.state),d=n.parent().find(".wd-wtl-form:not(.wd-wtl-is-template)").first()):t.data.hasOwnProperty("content")&&(i=t.data.content,r=e(".wd-wtl-form:not(.wd-wtl-is-template)").filter(function(){return!e(this).closest(".wd-sticky-spacer").length}),l=e("<div>").html(i).find(".wd-wtl-form").first(),r.each(function(){var t=e(this),o=l.clone();t.empty().append(o.contents())}))}var i,r,l;if(t.data.hasOwnProperty("notice")){var c=t.success?"success":"warning";t.data.hasOwnProperty("notice_status")&&(c=t.data.notice_status),s(d,t.data.notice,c)}}},error:function(){console.error("ajax adding to waitlist error")},complete:function(){u()}})}function s(t,o,a){var d=e(t);d.length&&(d.find(".wd-notice").first().remove(),e("<div>").addClass(`wd-notice wd-${a}`).append(o).appendTo(d))}function l(){return e(".wd-wtl-form:not(.wd-hide) .wd-loader-overlay")}function c(){l().addClass("wd-loading")}function u(){l().removeClass("wd-loading")}!function(){if("undefined"!=typeof wtl_form_data){var n=e(".wd-content-layout").hasClass("wd-builder-on")?".wd-single-add-cart":".summary-inner",i=e(`${n} .variations_form`);if(i.length){var r=e(".wd-single-add-cart .wd-active"),s=!1,l=!1;i.on("show_variation",function(d,n){if(n.is_in_stock){var i=e(this).parent().find(".wd-wtl-form:not(.wd-wtl-is-template)");i.length&&i.remove()}else if(!s&&wtl_form_data.global.fragments_enable&&wtl_form_data.global.is_user_logged_in){const e=this,d=n.variation_id;a(()=>{o(e,d,t(d)),s=!0})}else o(this,n.variation_id,t(n.variation_id))}).on("click",".reset_variations",function(t){var o=e(t.target).closest(".variations_form").parent().find(".wd-wtl-form:not(.wd-wtl-is-template)").first();o.length&&o.remove()}),!l&&e(".single-product-page").hasClass("has-default-attributes")&&r.length&&(i.trigger("reload_product_variations"),l=!0)}else{wtl_form_data.hasOwnProperty("fragments_enable")&&wtl_form_data.fragments_enable&&wtl_form_data.is_user_logged_in&&a();var c=e(".wd-wtl-form:not(.wd-wtl-is-template)");c.length&&c.on("click",d)}}}()},e(document).ready(function(){woodmartThemeModule.waitlistSubscribeForm()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdQuickViewOpen",function(){woodmartThemeModule.variationsPrice()}),e.each(["frontend/element_ready/wd_single_product_add_to_cart.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.variationsPrice()})}),woodmartThemeModule.variationsPrice=function(){"no"!==woodmart_settings.single_product_variations_price&&e(".variations_form").each(function(){var t=e(this),o=t.parents(".product-quick-view").length,a=function(){return e(".wd-content-layout").hasClass("wd-builder-on")&&!o?t.parents(".single-product-page").find(".wd-single-price .price:not(.price-unit)").first():t.parent().find("> .price:not(.price-unit), > div > .price:not(.price-unit)").first()},d=a(),n=d.clone();t.on("found_variation",function(e,t){t.price_html.length>1&&(d.replaceWith(t.price_html),d=a())}),t.on("reset_data",function(){d.replaceWith(n.clone()),d=a()})})},e(document).ready(function(){woodmartThemeModule.variationsPrice()})}(jQuery),function(e){e(document).ready(function(){e("body").on("added_to_cart removed_from_cart",function(t,o){o&&e.each(o,function(t,o){e(t.replace("_wd","")).replaceWith(o)})})}),e("body").on("wc_fragments_refreshed wc_fragments_loaded",function(){if("undefined"!=typeof wd_cart_fragments_params&&"undefined"!=typeof Cookies){var t=JSON.parse(sessionStorage.getItem(wd_cart_fragments_params.fragment_name)),o=wd_cart_fragments_params.cart_hash_key,a=sessionStorage.getItem(o),d=Cookies.get("woocommerce_cart_hash"),n=sessionStorage.getItem("wc_cart_created");if(null!=a&&""!==a||(a=""),null!=d&&""!==d||(d=""),a&&(null==n||""===n))throw"No cart_created";if(n&&1*n+864e5<(new Date).getTime())throw"Fragment expired";t&&t["div.widget_shopping_cart_content"]&&a===d&&e.each(t,function(t,o){e(t.replace("_wd","")).replaceWith(o)})}})}(jQuery),woodmartThemeModule.updateAjaxDeliveryDates=function(){var e=document.querySelector(".wd-est-del");e&&jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_delivery_dates",product_id:e.dataset.productId},dataType:"json",method:"GET",success:function(e){e.hasOwnProperty("fragments")&&Object.keys(e.fragments).forEach(function(t){var o=e.fragments[t];document.querySelectorAll(t).forEach(function(e){e.innerHTML=o,o?e.parentNode.classList.remove("wd-hide"):e.parentNode.classList.add("wd-hide")})})},error:function(){console.error("Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){e.classList.add("wd-loaded")}})},window.addEventListener("load",function(){woodmartThemeModule.updateAjaxDeliveryDates()}),woodmartThemeModule.trackProductViewed=function(){if("visible"===document.visibilityState){var e=document.querySelector(".single-product-page"),t="woodmart_recently_viewed_products",o=parseInt(woodmart_settings.max_recently_viewed_products,10);if(e&&"undefined"!=typeof Cookies){var a=e.id.replace("product-",""),d=Cookies.get(t);if(d){var n=(d=d.split("|")).indexOf(a);-1!==n&&d.splice(n,1),d.unshift(a),d.length>o&&(d=d.slice(0,o)),d=d.join("|")}else d=a;Cookies.set(t,d,{expires:parseInt(woodmart_settings.cookie_expires,10),path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param})}}},window.addEventListener("load",function(){woodmartThemeModule.trackProductViewed()}),function(e){woodmartThemeModule.$document.on("wdQuickShopSuccess wdQuickViewOpen wdUpdateWishlist",function(){woodmartThemeModule.swatchesVariations()}),e.each(["frontend/element_ready/wd_single_product_add_to_cart.default"],function(t,o){woodmartThemeModule.wdElementorAddAction(o,function(t){t.find(".variations_form").each(function(){e(this).wc_variation_form()}),woodmartThemeModule.swatchesVariations()})}),woodmartThemeModule.swatchesVariations=function(){var t=e(".variations_form"),o=!1,a=!1===t.data("product_variations"),d=[];e(".variations_form .label").on("click",function(t){e(this).siblings(".value").hasClass("with-swatches")&&t.preventDefault()}),t.each(function(){var t=e(this);if(!t.data("swatches")&&!t.hasClass("wd-quick-shop-2")){t.data("swatches",!0),t.data("product_variations")||t.find(".wd-swatches-product").find("> .wd-swatch").addClass("wd-enabled"),e(".wd-swatches-product > div").hasClass("wd-active")&&(t.addClass("variation-swatch-selected"),f(t));var o=t.find("select.wd-changes-variation-image");o.on("change",function(){var o=e(this),a=o.attr("name"),n=o.val(),i=t.data("product_variations"),r=!1;if(t.find("select").each(function(){if(!e(this).val())return r=!0,!1}),r&&n&&i){var s=t.parents(".product, .wd-page-content"),l=s.find(".wd-gallery-thumb .wd-carousel-item img").first(),c=s.find(".wd-gallery-images .wd-carousel-item img").first(),u=s.find(".woocommerce-product-gallery .woocommerce-product-gallery__image > a .wp-post-image").first();void 0===d.src&&(d.src=c.attr("src"),d.srcset=c.attr("srcset"),d.size=c.attr("srcset")),e.each(i,function(e,o){if(o.attributes[a]===n)return setTimeout(function(){t.wc_variations_image_update(o),w(o.variation_id,t)||l.attr("src")===o.image.thumb_src&&l.attr("srcset")===o.image.thumb_src||((l=s.find(".wd-gallery-thumb .wd-carousel-item img").first()).wc_set_variation_attr("src",o.image.src),l.wc_set_variation_attr("srcset",o.image.src),u.attr("data-o_src",o.image.src),u.attr("data-o_srcset",o.image.src),l.siblings("source").length&&l.siblings("source").attr("srcset",o.image.src),woodmartThemeModule.$document.trigger("wdResetVariation"))}),!1})}}),o.val()&&o.trigger("change"),t.on("click keydown",".wd-swatches-single > .wd-swatch",function(o){var a=e(this);if("keydown"!==o.type){var d=a.data("value"),i=a.parent().data("id"),r=t.find("select#"+CSS.escape(i));if(n(t),a.parents(".wd-swatches-limited").length&&a.parents(".wd-swatches-limited").find(".wd-swatch-divider").trigger("click"),a.parents(".variations_form.wd-clear-double").length&&a.hasClass("wd-active"))return r.val("").trigger("change"),void a.removeClass("wd-active");a.hasClass("wd-active")||a.hasClass("wd-disabled")||(r.val(d).trigger("change"),a.parent().find(".wd-active").removeClass("wd-active"),a.addClass("wd-active"),n(t),g(t))}else"Enter"!==o.key&&" "!==o.key||(o.preventDefault(),e(this).trigger("click"))}).on("woocommerce_update_variation_values",function(){g(t),n(t)}).on("click",".reset_variations",function(){t.find(".wd-active").removeClass("wd-active"),("yes"===woodmart_settings.swatches_labels_name&&woodmartThemeModule.$window.width()>=769||woodmartThemeModule.$window.width()<=768)&&t.find(".wd-attr-selected").html("")}).on("reset_data",function(){var o=e(this),a=!0,d=!0;t.find(".variations select").each(function(){var t=e(this);0!==(o.val()||"").length||(a=!1),t.has("wd-changes-variation-image")&&t.val()&&(d=!1)}),a&&o.parent().find(".wd-active").removeClass("wd-active"),t.removeClass("variation-swatch-selected"),t.find(".woocommerce-variation").removeClass("wd-show");var i=document.querySelector(".woocommerce-product-gallery__wrapper.wd-carousel");n(t),d&&w("default",t),i&&void 0!==i.swiper&&("yes"===woodmart_settings.product_slider_auto_height&&i.swiper.update(),i.swiper.slideTo(0)),woodmartThemeModule.$document.trigger("wdResetVariation")}).on("found_variation",function(e,o){if(a&&w(o.variation_id,t,o),void 0!==o&&o.image.src){var n=t.parents(".product, .wd-page-content"),s=n.find('.wd-gallery-thumb .wd-carousel-item img[data-o_src="'+o.image.thumb_src+'"]').length>0,l=n.find(".wd-gallery-thumb .wd-carousel-item img, .quick-view-gallery.wd-carousel .wd-carousel-item img").first(),c=l.siblings("source"),m=n.find(".woocommerce-product-gallery .woocommerce-product-gallery__image > a").first().data("o_href");s&&l.wc_reset_variation_attr("src"),r(t)||w(o.variation_id,t)||(l.attr("src")!==o.image.thumb_src&&(l.wc_set_variation_attr("src",o.image.src),o.image.srcset.length&&l.wc_set_variation_attr("srcset",o.image.srcset),c.length&&(o.image.srcset.length?c.wc_set_variation_attr("srcset",o.image.srcset):c.wc_set_variation_attr("srcset",o.image.src))),woodmartThemeModule.$document.trigger("wdShowVariationNotQuickView")),f(t),r(t)||i()||m===o.image.full_src||u();var h=document.querySelector(".woocommerce-product-gallery__wrapper");if(h&&(h.classList.contains("wd-carousel")&&void 0!==h.swiper&&(h.swiper.update(),h.swiper.slideTo(0)),void 0!==d.src)){var p=n.find(".woocommerce-product-gallery .woocommerce-product-gallery__image > a .wp-post-image").first(),g=d.src,v=g;g!==p.attr("data-o_src")&&(void 0!==d.srcset&&(v=d.srcset),void 0!==d.size&&p.attr("data-o_size",d.size),p.attr("data-o_src",g),p.attr("data-o_srcset",v))}}}).on("reset_image",function(){var o=e(".wd-gallery-thumb .wd-carousel-item img").first();if(!i()&&!r(t)){o.wc_reset_variation_attr("src"),o.wc_reset_variation_attr("srcset");var a=o.siblings("source");a.length&&a.wc_reset_variation_attr("srcset"),!o.attr("data-o_srcset")&&o.attr("data-srcset")&&o.attr("data-srcset",null)}}).on("show_variation",function(o,a){t.find(".wd-swatch").length&&!t.find(".wd-swatch.wd-active").length&&t.find("select").each(function(){var t=e(this),o=t.val();o&&t.siblings(".wd-swatches-product").find('.wd-swatch[data-value="'+o+'"]').addClass("wd-active")}),g(t),t.addClass("variation-swatch-selected")})}});var n=function(t){t.data("product_variations")&&t.find(".variations select").each(function(){var t=e(this),o=t.parent().find(".wd-swatches-product"),a=t.html();a=e(a),o.find(".wd-swatch").removeClass("wd-enabled").addClass("wd-disabled"),a.each(function(){var t=e(this).val();e(this).hasClass("enabled")?o.find('div[data-value="'+t+'"]').removeClass("wd-disabled").addClass("wd-enabled"):o.find('div[data-value="'+t+'"]').addClass("wd-disabled").removeClass("wd-enabled")})})},i=function(){return e(".single-product-content").hasClass("product-quick-view")},r=function(e){return e.parent().hasClass("quick-shop-form")},s=function(e,t){return"old"===woodmart_settings.variation_gallery_storage_method?l(e):c(e,t)},l=function(e){if("undefined"!=typeof woodmart_variation_gallery_data||"undefined"!=typeof woodmart_qv_variation_gallery_data){var t=i()?woodmart_qv_variation_gallery_data:woodmart_variation_gallery_data;return void 0!==t&&t&&t[e]}},c=function(e,t){var o=m(t);return void 0!==o&&o&&o[e]&&o[e].length>1||"default"===e},u=function(){if(0!==e(".woocommerce-product-gallery__wrapper").length&&("yes"===woodmart_settings.swatches_scroll_top_desktop&&woodmartThemeModule.$window.width()>=1024||"yes"===woodmart_settings.swatches_scroll_top_mobile&&woodmartThemeModule.$window.width()<=1024)){var t=e("html, body");t.stop(!0),t.animate({scrollTop:e(".woocommerce-product-gallery__wrapper").offset().top-150},800),void 0!==e.fn.tooltip&&e(".wd-swatch").tooltip("hide")}},m=function(e,t){void 0===t&&(t=!1);var o=e.data("product_variations");t&&(o=t),o||(o=e.data("wd_product_variations"));var a=[];return o?("object"!=typeof o||Array.isArray(o)?("string"==typeof o&&(o=JSON.parse(o)),o.forEach(function(e){a[e.variation_id]=e.additional_variation_images,a.default=e.additional_variation_images_default})):(a[o.variation_id]=o.additional_variation_images,a.default=o.additional_variation_images_default,e.data("wd_product_variations",JSON.stringify([{additional_variation_images_default:o.additional_variation_images_default}]))),a):a},w=function(t,a,d){if(void 0===d&&(d=!1),"old"===woodmart_settings.variation_gallery_storage_method){if(!s(t,a)||r(a)||"default"===t&&!o)return!1;h(t,a)}else{if(!s(t,a)&&!d||d&&!function(e,t){return void 0!==t&&t&&t.additional_variation_images&&t.additional_variation_images.length>1||"default"===e}(t,d)||r(a)||"default"===t&&!o)return!1;var n=m(a,d);p(n[t],a,t)}return e(".woocommerce-product-gallery__image").trigger("zoom.destroy"),woodmartThemeModule.$document.trigger("wdReplaceMainGallery"),i()||woodmartThemeModule.$document.trigger("wdReplaceMainGalleryNotQuickView"),o="default"!==t,woodmartThemeModule.$window.trigger("resize"),!0},h=function(e,t){var o=(i()?woodmart_qv_variation_gallery_data:woodmart_variation_gallery_data)[e],a=t.parents(".product, .wd-page-content"),d=a.find(".woocommerce-product-gallery__wrapper");d.hasClass("wd-carousel")&&(d=d.find(".wd-carousel-wrap")),o&&o.length>1?a.find(".woocommerce-product-gallery").addClass("wd-has-thumb"):a.find(".woocommerce-product-gallery").removeClass("wd-has-thumb"),d.empty();for(var n=0;n<o.length;n++){var r="";i()||"default"!==e||void 0===o[n].video||void 0===o[n].video.classes||(r+=o[n].video.classes);var s='<div class="wd-carousel-item'+r+'">';s+='<figure data-thumb="'+o[n].data_thumb+'" class="woocommerce-product-gallery__image">',i()||"default"!==e||void 0===o[n].video||void 0===o[n].video.controls||(s+=o[n].video.controls),i()||(s+='<a href="'+o[n].href+'">'),s+=o[n].image,i()||(s+="</a>"),i()||"default"!==e||void 0===o[n].video||void 0===o[n].video.content||(s+=o[n].video.content),s+="</figure></div>",d.append(s)}},p=function(e,t,o=""){var a=t.parents(".product, .wd-page-content"),d=a.find(".woocommerce-product-gallery__wrapper");for(var n in d.hasClass("wd-carousel")&&(d=d.find(".wd-carousel-wrap")),d.empty(),e&&e.length>1?a.find(".woocommerce-product-gallery").addClass("wd-has-thumb"):a.find(".woocommerce-product-gallery").removeClass("wd-has-thumb"),e)if(e.hasOwnProperty(n)){var r="";i()||"default"!==o||void 0===e[n].video||void 0===e[n].video.classes||(r+=e[n].video.classes);var s='<div class="wd-carousel-item'+r+'">';i()||"default"!==o||void 0===e[n].video||void 0===e[n].video.controls||(s+=e[n].video.controls),s+='<figure class="woocommerce-product-gallery__image" data-thumb="'+e[n].thumbnail_src+'">',i()||(s+='<a href="'+e[n].full_src+'" data-elementor-open-lightbox="no">');var l=e[n].srcset?'srcset="'+e[n].srcset+'"':"";s+='<img width="'+e[n].width+'" height="'+e[n].height+'" src="'+e[n].src+'" class="'+e[n].class+'" alt="'+e[n].alt+'" title="'+e[n].title+'" data-caption="'+e[n].data_caption+'" data-src="'+e[n].data_src+'" data-large_image="'+e[n].data_large_image+'" data-large_image_width="'+e[n].data_large_image_width+'" data-large_image_height="'+e[n].data_large_image_height+'" '+l+' sizes="'+e[n].sizes+'" />',i()||(s+="</a>"),i()||"default"!==o||void 0===e[n].video||void 0===e[n].video.content||(s+=e[n].video.content),s+="</figure></div>",d.append(s)}};function f(t){var o=t.find(".woocommerce-variation"),a=!1;o.length&&(o.find("> *").each(function(){e(this).is(":empty")||(a=!0)}),a&&o.addClass("wd-show"))}function g(t){("yes"===woodmart_settings.swatches_labels_name&&woodmartThemeModule.$window.width()>=769||woodmartThemeModule.$window.width()<=768)&&t.find(".wd-active").each(function(){var t=e(this),o=t.find(".wd-swatch-text").text(),a=t.parents("tr").find(".wd-attr-selected");a.length?a.html(o):t.parents("tr").find(" > th").append('<span class="wd-attr-selected">'+o+"</span>")})}},e(document).ready(function(){woodmartThemeModule.swatchesVariations()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.swatchesOnGrid()})}),woodmartThemeModule.swatchesOnGrid=function(){woodmartThemeModule.$body.on("click",".wd-swatches-grid .wd-swatch",function(){var t,o,a,d=e(this),n=d.data("image-src"),i=d.data("image-srcset"),r=d.data("image-sizes");if(void 0!==n&&""!==n){var s=d.parents(".wd-product"),l=s.find(".wd-product-img-link > img, .wd-product-img-link > picture > img"),c=s.find(".wd-product-img-link picture source"),u=l.data("original-src"),m=l.data("original-srcset"),w=l.data("original-sizes");void 0===u&&l.data("original-src",l.attr("src")),void 0===m&&l.data("original-srcset",l.attr("srcset")),void 0===w&&l.data("original-sizes",l.attr("sizes")),d.hasClass("wd-active")?(t=u,o=m,a=w,d.removeClass("wd-active"),s.removeClass("product-swatched"),s.trigger("wdImagesGalleryInLoopOn",s)):(d.parent().find(".wd-active").removeClass("wd-active"),d.addClass("wd-active"),s.addClass("product-swatched"),t=n,o=i,a=r,s.trigger("wdImagesGalleryInLoopOff",s)),l.attr("src")!==t&&(s.addClass("wd-loading-image"),l.attr("src",t).attr("srcset",o).attr("image_sizes",a).one("load",function(){s.removeClass("wd-loading-image")}),c.length>0&&c.attr("srcset",o).attr("image_sizes",a))}})},e(document).ready(function(){woodmartThemeModule.swatchesOnGrid()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdRecentlyViewedProductLoaded wdQuickViewOpen",function(){woodmartThemeModule.swatchesLimit()}),woodmartThemeModule.swatchesLimit=function(){e(".wd-swatch-divider, .wd-product .wd-swatches-product:not(.wd-all-shown) .wd-swatch").on("click",function(){var t=e(this).parent();if(t.parents(".wd-swatches-single").length||t.hasClass("wd-swatches-single")){var o=t.parents(".variations_form");o.find(".wd-swatches-single").removeClass("wd-swatches-limited").addClass("wd-all-shown"),o.find(".wd-swatch").removeClass("wd-hidden")}else t.addClass("wd-all-shown"),t.find(".wd-swatch").removeClass("wd-hidden");t.parents(".wd-products.grid-masonry").length&&void 0!==e.fn.isotope&&t.parents(".wd-products.grid-masonry").isotope("layout"),woodmartThemeModule.$document.trigger("wdProductHoverContentRecalc",[t.parents(".wd-hover-with-fade")]),woodmartThemeModule.$document.trigger("wood-images-loaded")})},e(document).ready(function(){woodmartThemeModule.swatchesLimit()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.stickySidebarBtn()}),woodmartThemeModule.stickySidebarBtn=function(){var t=e(".wd-show-sidebar-btn,.wd-off-canvas-btn"),o=e(".wd-sidebar-opener.wd-show-on-scroll");if(!(o.length<=0||t.length<=0)){var a=function(){t.offset().top+t.outerHeight()<woodmartThemeModule.$window.scrollTop()?o.addClass("wd-shown"):o.removeClass("wd-shown")};a(),woodmartThemeModule.$window.on("scroll",a),woodmartThemeModule.$window.on("resize",a)}},e(document).ready(function(){woodmartThemeModule.stickySidebarBtn()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdHeaderBuilderInited",function(){woodmartThemeModule.stickyDetails()}),woodmartThemeModule.stickyDetails=function(){!e(".single-product-page").hasClass("wd-sticky-on")||woodmartThemeModule.$window.width()<=1024||e(".entry-summary").each(function(){var t=e(this),o=parseInt(woodmart_settings.sticky_product_details_offset),a=t.find(".summary-inner"),d=t.parent().find(".woocommerce-product-gallery");a.trigger("sticky_kit:detach"),d.trigger("sticky_kit:detach"),d.imagesLoaded(function(){var e=a.outerHeight()-d.outerHeight(),t=parseInt(woodmart_settings.sticky_product_details_different);e<-t?a.stick_in_parent({offset_top:o}):e>t&&d.stick_in_parent({offset_top:o}),woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){woodmartThemeModule.$window.width()<=1024?(a.trigger("sticky_kit:detach"),d.trigger("sticky_kit:detach")):a.outerHeight()<d.outerHeight()?a.stick_in_parent({offset_top:o}):d.stick_in_parent({offset_top:o})},300))})})},e(document).ready(function(){woodmartThemeModule.stickyDetails()})}(jQuery),function(e){woodmartThemeModule.stickyAddToCart=function(){var t=e("form.cart, .out-of-stock"),o=e(".wd-sticky-btn");if(!(o.length<=0||t.length<=0||woodmartThemeModule.$window.width()<=768&&!woodmartThemeModule.$body.hasClass("wd-sticky-btn-on-mb"))){var a=function(){woodmartThemeModule.$window.width()<=768&&woodmartThemeModule.$body.hasClass("wd-sticky-btn-on-mb")?o.addClass("wd-quantity-overlap"):o.removeClass("wd-quantity-overlap")};a(),woodmartThemeModule.$window.on("resize",a);var d=t.offset().top+t.outerHeight(),n=e(".scrollToTop"),i=function(){var e=woodmartThemeModule.$window.scrollTop();d<e?(o.addClass("wd-sticky-btn-shown"),n.addClass("wd-sticky-btn-shown")):d>e&&(o.removeClass("wd-sticky-btn-shown"),n.removeClass("wd-sticky-btn-shown"))};i(),woodmartThemeModule.$window.on("scroll",i),e(".wd-sticky-add-to-cart, .wd-sticky-btn-cart > .wd-buy-now-btn").on("click",function(t){t.preventDefault();var o=e(".whb-header .whb-row.whb-sticky-row").length>0?e(".whb-header .whb-main-header").outerHeight():0,a=e(".whb-sticky-header"),d=a.length?a.outerHeight():o,n=e(".summary-inner .variations_form, .wd-single-add-cart .variations_form, .cart.grouped_form");if(0!==n.length){var i=n.offset().top-d-woodmart_settings.sticky_add_to_cart_offset;e("html, body").animate({scrollTop:i},800)}}),e(".wd-sticky-btn-cart .qty").on("change",function(){e(".summary-inner .qty, .wd-single-add-cart .qty").val(e(this).val())}),e(".summary-inner .qty, .wd-single-add-cart .qty").on("change",function(){e(".wd-sticky-btn-cart .qty").val(e(this).val())})}},e(document).ready(function(){woodmartThemeModule.stickyAddToCart()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.sortByWidget()}),woodmartThemeModule.sortByWidget=function(){if(woodmartThemeModule.$body.hasClass("woodmart-ajax-shop-on")&&void 0!==e.fn.pjax){var t=e(".woocommerce-ordering");t.on("change","select.orderby",function(){var t=e(this).closest("form");t.find('[name="_pjax"]').remove(),e.pjax({container:".wd-page-content",timeout:woodmart_settings.pjax_timeout,url:"?"+t.serialize(),scrollTo:!1,renderCallback:function(e,t,o){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){e.html(t),o(),woodmartThemeModule.$document.trigger("wdShopPageInit"),woodmartThemeModule.$document.trigger("wood-images-loaded")},e)}})}),t.on("submit",function(e){e.preventDefault(e)})}},e(document).ready(function(){woodmartThemeModule.sortByWidget()})}(jQuery),window.jQuery.each(["frontend/element_ready/wd_single_product_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){jQuery.magnificPopup.close(),woodmartThemeModule.singleProductTabsDescHidden()})}),woodmartThemeModule.singleProductTabsDescHidden=function(){var e=window.location.hash,t=window.location.href,o=document.querySelectorAll(".wd-hidden-tab-title"),a=document.querySelector(".tab-title-reviews");o.forEach(function(e){var t=!1;jQuery(e).magnificPopup({type:"inline",removalDelay:600,showCloseBtn:!1,tLoading:woodmart_settings.loading,fixedContentPos:!1,callbacks:{beforeOpen:function(){jQuery(this.ev[0].dataset.mfpSrc).find("link").appendTo("head")},open:function(){var o=this,a=this.content[0],d=a.querySelector(".close-side-hidden");a.classList.contains("wd-opened")||setTimeout(function(){a.classList.add("wd-opened"),e.classList.add("wd-active"),window.dispatchEvent(new Event("wdOpenDescHiddenTab")),woodmartThemeModule.$document.trigger("wood-images-loaded")},10),t||(t=!0,d&&d.addEventListener("click",function(e){e.preventDefault(),o.close()}))},beforeClose:function(){var e=document.querySelector(".wd-hidden-tab-title.wd-active"),t=document.querySelector(".wd-side-hidden.wd-opened");e&&e.classList.remove("wd-active"),t&&t.classList.remove("wd-opened")}}})}),a&&((e.toLowerCase().indexOf("comment-")>=0||"#reviews"===e||"#tab-reviews"===e||t.indexOf("comment-page-")>0||t.indexOf("cpage=")>0)&&a.click(),document.querySelectorAll(".woocommerce-review-link").forEach(function(e){e.addEventListener("click",function(){a.click()})}))},window.addEventListener("load",function(){woodmartThemeModule.singleProductTabsDescHidden()}),function(e){woodmartThemeModule.singleProductTabsAccordion=function(){var t=e(".woocommerce-tabs"),o=t.find(".wd-accordion-item .entry-content"),a=t.closest(".wd-single-tabs").length>0;t.length<=0||"accordion"===t.data("layout")||e(".wd-content-layout").hasClass("wd-builder-on")&&!a||(woodmartThemeModule.$window.width()<=1024?t.hasClass("tabs-layout-accordion")||(t.removeClass("tabs-layout-tabs wc-tabs-wrapper").addClass("tabs-layout-accordion wd-accordion wd-style-default"),o.addClass("wd-accordion-content wd-scroll").find(".wc-tab-inner").addClass("wd-scroll-content"),e(".single-product-page").removeClass("tabs-type-tabs").addClass("tabs-type-accordion"),"first"!==t.data("state")&&(setTimeout(function(){o.first().hide()},500),o.first().siblings(".wd-active").removeClass("wd-active"))):t.hasClass("tabs-layout-tabs")||(t.addClass("tabs-layout-tabs wc-tabs-wrapper").removeClass("tabs-layout-accordion wd-accordion wd-style-default"),o.removeClass("wd-accordion-content wd-scroll").find(".wc-tab-inner").removeClass("wd-scroll-content"),e(".single-product-page").addClass("tabs-type-tabs").removeClass("tabs-type-accordion"),t.find(".wd-nav a").first().trigger("click")))},woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){woodmartThemeModule.singleProductTabsAccordion(),woodmartThemeModule.accordion(),woodmartThemeModule.$document.trigger("resize.vcRowBehaviour")},300)),e(document).ready(function(){woodmartThemeModule.singleProductTabsAccordion()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.shopPageInit()}),woodmartThemeModule.shopPageInit=function(){woodmartThemeModule.clickOnScrollButton(".wd-products-load-more.load-on-scroll",!1,woodmart_settings.infinit_scroll_offset),e("body > .tooltip").remove(),woodmartThemeModule.$body.on("updated_wc_div",function(){woodmartThemeModule.$document.trigger("wood-images-loaded")}),woodmartThemeModule.$document.trigger("resize.vcRowBehaviour")}}(jQuery),function(e){woodmartThemeModule.$document.on("wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdShopPageInit wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.shopMasonry()}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_product_categories.default","frontend/element_ready/wd_products_tabs.default","frontend/element_ready/wd_products_brands.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.shopMasonry()})}),woodmartThemeModule.shopMasonry=function(){if(void 0!==e.fn.isotope&&void 0!==e.fn.packery&&void 0!==e.fn.imagesLoaded){var t=e(".wd-products.grid-masonry");t.imagesLoaded(function(){t.isotope({isOriginLeft:!woodmartThemeModule.$body.hasClass("rtl"),itemSelector:".product-category.product, .wd-product, .wd-products > .element-title",masonry:{columnWidth:".product-category.product, .wd-product:not(.wd-wider)"}})}),woodmartThemeModule.$window.on("resize",function(){o()}),o()}function o(){var t=e(".wd-cats-element .wd-masonry");t.imagesLoaded(function(){t.packery({resizable:!1,isOriginLeft:!woodmartThemeModule.$body.hasClass("rtl"),packery:{gutter:0,columnWidth:".product-category.product"},itemSelector:".product-category.product"})})}},e(document).ready(function(){woodmartThemeModule.shopMasonry()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdFiltersOpened wdShopPageInit wdPjaxStart",function(){woodmartThemeModule.shopLoader()}),woodmartThemeModule.shopLoader=function(){woodmartThemeModule.$window.off("scroll.loaderVerticalPosition"),woodmartThemeModule.$window.on("scroll.loaderVerticalPosition",function(){var t=e('.products[data-source="main_loop"], .wd-projects[data-source="main_loop"]'),o=t.parent().find(".wd-sticky-loader");if(!(t.length<1)){var a=woodmartThemeModule.$window.height()/2,d=woodmartThemeModule.$window.scrollTop(),n=t.offset().top-a+45,i=n+t.height()-170;d<n?(o.addClass("wd-position-top"),o.removeClass("wd-position-stick")):d>i?(o.addClass("wd-position-bottom"),o.removeClass("wd-position-stick")):(o.addClass("wd-position-stick"),o.removeClass("wd-position-top wd-position-bottom"))}})},e(document).ready(function(){woodmartThemeModule.shopLoader()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.searchByFilters()}),woodmartThemeModule.searchByFilters=function(){e(".wd-filter-search input").on("keyup",function(){var t=e(this),o=t.val().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");0<o.length?t.parent().addClass("wd-active"):t.parent().removeClass("wd-active"),t.parents(".wd-filter-wrapper").find("ul > li").each(function(){var t=e(this);t.find(".wd-filter-lable").text().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").indexOf(o)>-1?t.show():t.hide()})}),e(".wd-filter-search-clear a").on("click",function(t){t.preventDefault();var o=e(this);o.parents(".wd-filter-search").removeClass("wd-active"),o.parent().siblings("input").val(""),o.parents(".wd-filter-wrapper").find("ul li").each(function(){e(this).show()})})},e(document).ready(function(){woodmartThemeModule.searchByFilters()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.quickViewInit()})}),woodmartThemeModule.quickViewInit=function(){woodmartThemeModule.$document.on("click",".open-quick-view",function(t){if(t.preventDefault(),e(".open-quick-view").hasClass("loading"))return!0;var o=e(this),a=o.data("id"),d=o.data("loop-name"),n=o.data("loop"),i="",r="",s=e(".quick-view").find('[data-loop-name="'+d+'"]');o.addClass("loading"),void 0!==s[n-1]&&(i=s.eq(n-1).addClass("quick-view-prev"),i=e("<div>").append(i.clone()).html()),void 0!==s[n+1]&&(r=s.eq(n+1).addClass("quick-view-next"),r=e("<div>").append(r.clone()).html()),woodmartThemeModule.quickViewLoad(a,o,i,r)})},woodmartThemeModule.quickViewLoad=function(t,o){var a={id:t,action:"woodmart_quick_view"};void 0!==o.data("attribute")&&e.extend(a,o.data("attribute"));var d=function(t){var o=e(t);e.magnificPopup?.instance?.isOpen&&(e.magnificPopup.instance.st.removalDelay=0,e.magnificPopup.close()),e.magnificPopup.open({items:{src:o,type:"inline"},closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,removalDelay:600,fixedContentPos:!0,callbacks:{beforeOpen:function(){this.wrap.addClass("wd-popup-quick-view-wrap")},open:function(){var t=e(this.content[0]).find(".variations_form");t.each(function(){e(this).wc_variation_form().find(".variations select:eq(0)").trigger("change")}),t.trigger("wc_variation_form"),woodmartThemeModule.$body.trigger("woodmart-quick-view-displayed"),woodmartThemeModule.$document.trigger("wdQuickViewOpen"),setTimeout(function(){woodmartThemeModule.$document.trigger("wdQuickViewOpen300")},300)}}})};e.ajax({url:woodmart_settings.ajaxurl,data:a,method:"get",success:function(t){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){woodmart_settings.quickview_in_popup_fix?(e.magnificPopup.close(),setTimeout(function(){d(t)},500)):d(t)})},complete:function(){o.removeClass("loading")}})},e(document).ready(function(){woodmartThemeModule.quickViewInit()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.quickShopVariationForm()})}),woodmartThemeModule.quickShopVariationForm=function(){function t(t){!1===t.data("product_variations")&&(t.addClass("wd-loading"),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_load_available_variations",id:t.data("product_id")},method:"get",dataType:"json",success:function(e){e.length>0&&t.data("product_variations",e).trigger("reload_product_variations")},complete:function(){t.removeClass("wd-loading");var e=t.find("select.wd-changes-variation-image");e.length&&e.first().val().length&&e.first().trigger("change")},error:function(){console.log("ajax error")}}))}woodmartThemeModule.$document.on("mouseenter touchstart mousemove",".wd-product.product-type-variable",function(){var o=e(this),a=o.find(".variations_form"),d=o.find(".button.product_type_variable"),n=o.find(".price:not(.price-unit)"),i=o.find(".wd-product-img-link > img, .wd-product-img-link > picture > img"),r=o.find(".wd-product-img-link picture source"),s=i.attr("src"),l=i.attr("srcset")?i.attr("srcset"):null,c=i.attr("sizes")?i.attr("sizes"):null,u=d.first().text(),m=woodmart_settings.add_to_cart_text,w=n.first().clone(),h=o.find(".wd-product-stock"),p=o.find(".wd-product-sku").find("span").not(".wd-label"),f=d.siblings(".quantity").find("input[name=quantity]"),g=f.first().attr("max"),v=f.first().attr("min");if(!(!a.length||a.hasClass("wd-variations-inited")||"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode())){if(h.length)var _=h.first().text(),y=h.attr("class");if(p.length)var b=p.first().text();a.wc_variation_form(),a.addClass("wd-variations-inited"),a.on("click",".wd-swatch",function(){var o=e(this),d=o.parents(".wd-product"),n=o.data("value"),i=o.parent().siblings("select");if(a.hasClass("wd-form-inited")||(a.addClass("wd-form-inited"),t(a)),T(a),o.parents(".variations_form.wd-clear-double").length&&o.hasClass("wd-active")){i.val("").trigger("change"),o.removeClass("wd-active");var r=!1;return d.find(".wd-swatch").each(function(t,o){if(e(o).hasClass("wd-active"))return r=!0}),void(r||d.trigger("wdImagesGalleryInLoopOn",d))}o.hasClass("wd-active")||o.hasClass("wd-disabled")||(i.val(n).trigger("change"),o.parent().find(".wd-active").removeClass("wd-active"),o.addClass("wd-active"),d.trigger("wdImagesGalleryInLoopOff",d),T(a))}),a.on("change","select",function(){if(a.parents(".wd-products.grid-masonry").length&&void 0!==e.fn.isotope&&setTimeout(function(){a.parents(".wd-products.grid-masonry").isotope("layout")},100),a.hasClass("wd-form-inited"))return!1;a.addClass("wd-form-inited"),t(a)}),a.on("found_variation",function(e,t){!woodmartThemeModule.$body.hasClass("login-see-prices")&&t.price_html.length>1&&(n.replaceWith(t.price_html),n=o.find(".price:not(.price-unit)")),C(t),h.length&&(t.availability_html?(h.removeClass("in-stock available-on-backorder out-of-stock"),0<t.availability_html.search("available-on-backorder")?h.addClass("available-on-backorder"):0<t.availability_html.search("out-of-stock")?h.addClass("out-of-stock"):h.addClass("in-stock"),h.text(t.availability_html.replace(/<\/?[^>]+(>|$)/g,""))):(h.attr("class",y),h.text(_))),p.length&&(t.sku?p.text(t.sku):p.text(b)),f.length&&(f.val(v),f.attr("max",t.max_qty).attr("min",t.min_qty))}),a.on("show_variation",function(){a.find(".wd-swatch").length&&!a.find(".wd-swatch.wd-active").length&&a.find("select").each(function(){var t=e(this),o=t.val();o&&t.siblings(".wd-swatches-product").find('.wd-swatch[data-value="'+o+'"]').addClass("wd-active")}),a.addClass("variation-swatch-selected"),woodmartThemeModule.$document.trigger("wdProductHoverContentRecalc",[o])}),a.on("woocommerce_update_variation_values",function(){T(a)}),a.on("hide_variation",function(){n.replaceWith(w),n=o.find(".price:not(.price-unit)"),d.find("span.wd-action-text").text(u),i.attr("src")!==s&&(i.attr("src",s),i.attr("srcset",l),i.attr("sizes",c),r.length>0&&r.attr("srcset")!==l&&(r.attr("srcset",l),r.attr("image_sizes",c))),h.length&&(h.attr("class",y),h.text(_)),p.length&&p.text(b),f.length&&f.attr("max",g).attr("min",v)}),a.on("click",".reset_variations",function(){a.find(".wd-active").removeClass("wd-active"),a.removeClass("wd-form-inited"),o.trigger("wdImagesGalleryInLoopOn",o)}),a.on("reset_data",function(){var t=e(this),o=!0;a.find(".variations select").each(function(){0===(t.val()||"").length&&(o=!1)}),o&&a.find(".wd-active").removeClass("wd-active"),a.removeClass("variation-swatch-selected"),T(a)}),a.find("select.wd-changes-variation-image").on("change",function(){var t=e(this),o=t.attr("name"),d=t.val(),n=a.data("product_variations"),i=!1;a.find("select").each(function(){if(!e(this).val())return i=!0,!1}),i&&d&&n&&e.each(n,function(e,t){if(t.attributes[o]===d)return setTimeout(function(){C(t)}),!1})}),d.on("click",function(t){var o=a.find(".single_add_to_cart_button");if(e(this).data("purchasable")&&o.length)if(t.preventDefault(),"undefined"!=typeof wc_add_to_cart_variation_params&&o.hasClass("disabled"))o.hasClass("wc-variation-is-unavailable")?alert(wc_add_to_cart_variation_params.i18n_unavailable_text):o.hasClass("wc-variation-selection-needed")&&alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text);else{if(f.length){var n=f.val();n&&a.find(".single_variation_wrap .variations_button input[name=quantity]").val(n)}a.trigger("submit"),d.addClass("loading"),woodmartThemeModule.$body.one("added_to_cart not_added_to_cart",function(){d.removeClass("loading")}),woodmartThemeModule.$body.one("added_to_cart",function(){d.addClass("added")})}})}function T(t){t.data("product_variations")&&(d.find("span.wd-action-text").text(u),d.data("purchasable",!1),o.removeClass("wd-variation-active"),t.find(".variations select").each(function(){var t=e(this),a=t.parent().find(".wd-swatches-product"),n=t.html();n=e(n),t.val()&&(d.find("span.wd-action-text").text(m),d.data("purchasable",!0),o.addClass("wd-variation-active")),a.find(".wd-swatch").removeClass("wd-enabled").addClass("wd-disabled"),n.each(function(){var t=e(this).val();e(this).hasClass("enabled")?a.find('div[data-value="'+t+'"]').removeClass("wd-disabled").addClass("wd-enabled"):a.find('div[data-value="'+t+'"]').addClass("wd-disabled").removeClass("wd-enabled")})}),setTimeout(function(){woodmartThemeModule.$document.trigger("wdProductHoverContentRecalc",[o])}))}function C(e){e.image&&(e.image.thumb_src&&e.image.thumb_src.length>1&&(o.addClass("wd-loading-image"),i.attr("src",e.image.thumb_src),i.attr("srcset")&&!e.image.srcset&&i.attr("srcset",e.image.thumb_src),i.one("load",function(){o.removeClass("wd-loading-image")})),e.image.srcset.length>1&&(i.attr("srcset",e.image.srcset),r.length>0&&r.attr("srcset",e.image.srcset)),e.image.sizes.length>1&&(i.attr("sizes",e.image.sizes),r.length>0&&r.attr("image_sizes",e.image.sizes)))}})},e(document).ready(function(){woodmartThemeModule.quickShopVariationForm()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.quickShop()})}),woodmartThemeModule.quickShop=function(){"no"!==woodmart_settings.quick_shop&&(woodmartThemeModule.$document.on("click",".wd-product.product-type-variable .add_to_cart_button",function(t){var o=e(this);if(!o.parents(".wd-loop-prod-btn").length){t.preventDefault();var a=o.parents(".product").first(),d=a.find(".wd-quick-shop"),n=a.data("id"),i="btn-loading";if(!o.hasClass(i)){if(a.hasClass("quick-shop-loaded"))return a.addClass("quick-shop-shown"),void woodmartThemeModule.$body.trigger("woodmart-quick-view-displayed");o.addClass(i),a.addClass("wd-loading-quick-shop"),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_quick_shop",id:n},method:"get",success:function(e){woodmartThemeModule.removeDuplicatedStylesFromHTML(e,function(e){d.append(e),function(e){e.find(".variations_form").wc_variation_form().find(".variations select:eq(0)").trigger("change"),e.find(".variations_form").trigger("wc_variation_form")}(a),woodmartThemeModule.$document.trigger("wdQuickShopSuccess"),o.removeClass(i),a.removeClass("wd-loading-quick-shop"),a.addClass("quick-shop-shown quick-shop-loaded"),woodmartThemeModule.$body.trigger("woodmart-quick-view-displayed")})}})}}}).on("click",".quick-shop-close",function(t){t.preventDefault(),e(this).parents(".product").removeClass("quick-shop-shown")}),woodmartThemeModule.$body.on("added_to_cart",function(){e(".product").removeClass("quick-shop-shown")}))},e(document).ready(function(){woodmartThemeModule.quickShop()})}(jQuery),woodmartThemeModule.ptTable=function(){var e=document.querySelector(".wd-pt-table");if(e){var t=e.querySelectorAll(".wd-pt-remove"),o=e.querySelectorAll(".wd-desired-price-opener"),a=e.querySelectorAll(".wd-desired-price-cancel"),d=e.querySelectorAll(".wd-desired-price-save");t.forEach(function(t){t.addEventListener("click",function(t){t.preventDefault();var o=this;e.parentNode.querySelector(".wd-loader-overlay").classList.add("wd-loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_price_tracker_in_my_account",security:woodmart_settings.pt_remove_button_nonce,product_id:o.dataset.productId,variation_id:o.dataset.variationId},method:"POST",success:function(t){if(t&&(t.success&&o.closest("tr").remove(),t.data.content)){tempDiv=document.createElement("div"),tempDiv.innerHTML=t.data.content;var a=tempDiv.querySelector(".wd-pt-content").childNodes;e.parentNode.replaceChildren(...a)}},error:function(){console.error("ajax remove from waitlist error")},complete:function(){e.parentNode.querySelector(".wd-loader-overlay").classList.remove("wd-loading")}})})}),o.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault();var t=this.closest("td").querySelector(".wd-desired-price-edit"),o=this.closest("td").querySelector(".amount"),a=this.closest("td").querySelector(".wd-cell-empty");t&&(t.classList.toggle("wd-hide"),this.classList.toggle("wd-hide")),o&&o.classList.add("wd-hide"),a&&a.classList.add("wd-hide")})}),a.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault();var t=this.closest(".wd-desired-price-edit"),o=t.closest("td").querySelector(".amount"),a=t.closest("td").querySelector(".wd-cell-empty");t&&(t.classList.add("wd-hide"),t.parentNode.querySelector(".wd-desired-price-opener").classList.remove("wd-hide")),o&&o.classList.remove("wd-hide"),a&&a.classList.remove("wd-hide")})}),d.forEach(function(t){t.addEventListener("click",function(t){t.preventDefault();var o=this.closest(".wd-desired-price-edit"),a=o.querySelector('[name="wd-desired-price-change"]'),d=document.querySelector(".woocommerce-notices-wrapper");if(a){var n=a.value;e.parentNode.querySelector(".wd-loader-overlay").classList.add("wd-loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_price_tracker_desired_price",security:woodmart_settings.pt_update_desired_price_nonce,product_id:o.dataset.productId,variation_id:o.dataset.variationId,desired_price:n},method:"POST",success:function(e){if(e){if(e.data.notice){var t=d.querySelectorAll(".wd-notice"),a=document.createElement("div"),n=e.success?"success":"warning";t.forEach(e=>{e.remove()}),a.classList.add("wd-notice",`wd-${n}`),a.append(e.data.notice),d.append(a)}if(e.success){var i=o.parentNode.querySelector(".amount"),r=o.parentNode.querySelector(".wd-cell-empty");if(i&&i.remove(),r&&r.remove(),e.data.desired_price_html){var s=document.createElement("div");s.innerHTML=e.data.desired_price_html,o.parentNode.prepend(s.firstElementChild)}o.classList.add("wd-hide"),o.parentNode.querySelector(".wd-desired-price-opener").classList.remove("wd-hide")}}},error:function(){console.error("ajax update desired price error")},complete:function(){e.parentNode.querySelector(".wd-loader-overlay").classList.remove("wd-loading")}})}})})}},window.addEventListener("load",function(){woodmartThemeModule.ptTable()}),woodmartThemeModule.ptSubscribeForm=function(){var e=[];function t(t){const o=l();o.variationId&&e.includes(o.variationId)&&t.classList.remove("wd-hide")}function o(e,t){var o=u(),a=m();o&&(a&&r(t.variation_id),i(t.variation_id),t.is_in_stock?o.classList.remove("wd-hide"):o.classList.add("wd-hide"),p())}function a(){u().classList.add("wd-hide"),p()}function d(e){if(!this.classList.contains("wd-pt-remove")&&(e.preventDefault(),!m()||function(){var e=m();if(!e)return!1;var t=e.querySelector('[name="wd-pt-policy-check"]'),o=e.querySelector('[name="wd-pt-desired-price-check"]'),a=e.querySelector('[name="wd-pt-user-desired-price"]'),d=h();return t&&!t.checked&&d?(c(d,woodmart_settings.pt_policy_check_msg,"warning"),!1):!(o&&a&&o.checked&&!parseFloat(a.value))||(c(d,woodmart_settings.pt_desired_price_check_msg,"warning"),!1)}())){var t=l(),o=function(){var e="",t=document.querySelector('[name="wd-pt-user-subscribe-email"]');return t&&(e=t.value),e}(),a=function(){var e="",t=document.querySelector('[name="wd-pt-user-desired-price"]');return t&&(e=t.value),e}();s({action:"woodmart_add_to_price_tracker",security:woodmart_settings.pt_add_button_nonce,user_email:o,product_id:t.productId,variation_id:t.variationId,desired_price:a})}}function n(e){if(this.classList.contains("wd-pt-remove")){e.preventDefault();var t=l(),o=parseInt(t.productId),a=parseInt(t.variationId);s({action:"woodmart_remove_from_price_tracker",security:woodmart_settings.pt_remove_button_nonce,product_id:o,variation_id:a})}}function i(t){var o=u(),a=m(),i=o.querySelector("a"),r=i.querySelector(".wd-action-text");e.includes(t)?(r.innerText=woodmart_settings.pt_button_text_stop_tracking,i.href="#",i.classList.remove("added"),o.classList.add("wd-pt-remove"),o.classList.remove("wd-pt-add"),o.addEventListener("click",n),i.classList.remove("wd-open-popup")):(r.innerText=woodmart_settings.pt_button_text_not_tracking,o.classList.remove("wd-pt-remove"),i.classList.remove("wd-open-popup"),i.classList.remove("added"),a?(i.href="#wd-popup-pt",i.classList.add("wd-open-popup")):(i.href="#",o.classList.add("wd-pt-add"),o.addEventListener("click",d)))}function r(t){var o=m();e.includes(t)?(o.querySelector(".wd-pt-signed").classList.remove("wd-hide"),o.querySelector(".wd-pt-not-signed").classList.add("wd-hide")):(o.querySelector(".wd-pt-signed").classList.add("wd-hide"),o.querySelector(".wd-pt-not-signed").classList.remove("wd-hide"))}function s(t){var o=m(),a=h(),d=u().querySelector("a"),n=l(),s=n.variationId?n.variationId:n.productId;if(p(),o){var w=o.querySelector(".wd-loader-overlay");w.classList.add("wd-loading")}d.classList.add("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:t,method:"POST",success:function(t){if(t&&t.hasOwnProperty("data")){if(t.data.notice&&a){var d=t.data.success?"success":"warning";c(a,t.data.notice,d)}t.data.state&&function(t,o){"signed"===t?e.includes(o)||e.push(o):"not-signed"===t&&e.includes(o)&&(e=e.filter(function(e){return e!==o}))}(t.data.state,s),o&&r(s),i(s)}},error:function(){console.error("ajax adding to price tracker error")},complete:function(){o&&(w=o.querySelector(".wd-loader-overlay")).classList.remove("wd-loading"),d.classList.remove("loading")}})}function l(){var e=!1;document.querySelector('body[class*="postid-"]').classList.forEach(function(t){t.includes("postid-")&&(e=t.replace("postid-",""))});var t=w(),o=0;if(t){var a=t.querySelector("input.variation_id");o=a.value?parseInt(a.value):0}return{productId:parseInt(e),variationId:parseInt(o)}}function c(e,t,o){if(e){p();var a=document.createElement("div");a.classList.add("wd-notice",`wd-${o}`),a.append(t),e.append(a)}}function u(){return document.querySelector(".wd-pt-btn")}function m(){return document.querySelector("#wd-popup-pt")}function w(){return document.querySelector(".variations_form")}function h(){var e=m();return e&&e.closest(".mfp-ready")?e:document.querySelector(".woocommerce-notices-wrapper")}function p(e=""){var t=h();if(t){var o=t.querySelectorAll(".wd-notice");0!==o.length&&o.forEach(t=>{(!e||e&&t.innerText.includes(e))&&t.remove()})}}!async function(){var i=u();if(i){if("yes"===woodmart_settings.pt_fragments_enable){const o=l(),a=await async function(e){try{return await jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_price_tracker_form",product_id:e},dataType:"json",method:"GET"})}catch(t){console.error("Error updating form data:",t)}}(o.productId);a&&(a.signed_variations&&a.signed_variations.length>0?e=a.signed_variations:a.is_signed&&e.push(o.productId),i.classList.remove("wd-disabled")),t(i)}else w()&&(e=JSON.parse(i.dataset.signedVariations||"[]")),t(i);!function(){var e=u(),t=m(),i=w();if(e){if(e.classList.contains("wd-pt-remove")&&e.addEventListener("click",n),t){var r=t.querySelector(".wd-pt-add"),s=t.querySelector('[name="wd-pt-policy-check"]'),l=t.querySelector('[name="wd-pt-desired-price-check"]'),c=t.querySelector('[name="wd-pt-user-desired-price"]'),h=t.querySelector(".wd-close-popup");if(r.addEventListener("click",d),jQuery(document).one("mfpClose",function(){p()}),s){const e=function(){s.checked&&p(woodmart_settings.pt_policy_check_msg)};s.addEventListener("change",e)}l&&c&&(c.addEventListener("click",function(){l.checked=!0}),l.addEventListener("change",function(){l.checked?c.focus():c.value=""})),h.addEventListener("click",function(e){e.preventDefault(),jQuery.magnificPopup.close()})}else e.classList.contains("wd-pt-add")&&e.addEventListener("click",d);i&&jQuery(".variations_form").off("show_variation",o).on("show_variation",o).off("click",".reset_variations",a).on("click",".reset_variations",a)}}()}}()},window.addEventListener("load",function(){woodmartThemeModule.ptSubscribeForm()}),function(e){e.each(["frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.productsTabs()})}),woodmartThemeModule.productsTabs=function(){var t=!1;e(".wd-products-tabs").each(function(){var a=e(this),d=a.find(".wd-tabs-content-wrapper"),n=[],i=d.find(".wd-products-element").clone().removeClass("wd-active wd-in");i.find(".wd-carousel")&&i.find(".wd-carousel").removeClass("wd-initialized"),n[0]={html:i.prop("outerHTML")},a.find(".products-tabs-title li").on("click",function(a){a.preventDefault();var i=e(this),r=i.data("atts"),s=i.index();t||i.hasClass("wd-active")||(t=!0,d.find(".wd-products-element").removeClass("wd-in"),setTimeout(function(){d.find(".wd-products-element").addClass("wd-active")},100),o(r,s,d,i,n,function(e){e.html&&woodmartThemeModule.removeDuplicatedStylesFromHTML(e.html,function(e){d.find(".wd-products-element").length?d.find(".wd-products-element").replaceWith(e):d.append(e),d.find(".wd-products-element").addClass("wd-active"),setTimeout(function(){d.find(".wd-products-element").addClass("wd-in"),woodmartThemeModule.$document.trigger("wdProductsTabsLoaded"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200),i.removeClass("loading")},d)}))}),setTimeout(function(){a.find(".products-tabs-title li.wd-active").length||a.find(".products-tabs-title li").first().addClass("wd-active"),a.addClass("wd-inited")},200)});var o=function(o,a,d,n,i,r){var s=d.find("> .wd-sticky-loader");n.parent().find(".wd-active").removeClass("wd-active"),n.addClass("wd-active"),i[a]?setTimeout(function(){t=!1,r(i[a])},300):(s.addClass("wd-loading"),n.addClass("loading"),e.ajax({url:woodmart_settings.ajaxurl,data:{atts:o,action:"woodmart_get_products_tab_shortcode"},dataType:"json",method:"POST",success:function(e){t=!1,i[a]=e,r(e)},error:function(){console.log("ajax error")},complete:function(){t=!1,s.removeClass("wd-loading")}}))}},e(document).ready(function(){woodmartThemeModule.productsTabs()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdUpdateWishlist wdRecentlyViewedProductLoaded wdShopPageInit",function(){woodmartThemeModule.productsLoadMore()}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default","frontend/element_ready/wd_archive_products.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.productsLoadMore()})}),woodmartThemeModule.productsLoadMore=function(){var t,o=!1;e(".wd-products-element").each(function(){var d=e(this),n=[],i=d.find(".wd-products");i.hasClass("pagination-arrows")&&(n[parseInt(i.data("paged"))]={items:i.html(),status:"have-posts"},d.find(".wd-ajax-arrows .wd-btn-arrow.wd-prev .wd-arrow-inner, .wd-ajax-arrows .wd-btn-arrow.wd-next .wd-arrow-inner").on("click",function(d){d.preventDefault();var i=e(this).parent(".wd-btn-arrow");if(!o&&!i.hasClass("wd-disabled")){o=!0,clearInterval(t);var r=i.parent().prev(),s=i.parent().find(".wd-btn-arrow.wd-next"),l=i.parent().find(".wd-btn-arrow.wd-prev"),c=r.data("atts"),u=woodmart_settings.ajaxurl,m=r.attr("data-paged");if(m++,i.hasClass("wd-prev")){if(m<2)return;m-=2}a("arrows",c,u,"woodmart_get_products_shortcode","json","POST",m,r,i,n,function(o){var a=r.hasClass("products-bordered-grid")||r.hasClass("products-bordered-grid-ins")||r.hasClass("products-bordered-grid-bottom");if(r.siblings(".wd-sticky-loader").removeClass("wd-loading"),a||r.addClass("wd-animated-products"),o.items.length&&(r.html(o.items).attr("data-paged",m),r.imagesLoaded().progress(function(){r.parent().trigger("recalc")}),woodmartThemeModule.$document.trigger("wood-images-loaded"),woodmartThemeModule.$document.trigger("wdArrowsLoadProducts")),woodmartThemeModule.$window.width()<768&&e("html, body").stop().animate({scrollTop:r.offset().top-150},400),!a){var d=0;t=setInterval(function(){r.find(".wd-product").eq(d).addClass("wd-animated"),d++},100)}m>1?l.removeClass("wd-disabled"):l.addClass("wd-disabled"),"no-more-posts"===o.status?s.addClass("wd-disabled"):s.removeClass("wd-disabled")})}}))}),woodmartThemeModule.clickOnScrollButton(".wd-products-load-more.load-on-scroll",!1,woodmart_settings.infinit_scroll_offset),woodmartThemeModule.$document.off("click",".wd-products-load-more").on("click",".wd-products-load-more",function(t){if(t.preventDefault(),!o){o=!0;var n=e(this),i=n.parents(".wd-products-element").find(".wd-products"),r=i.data("source"),s="woodmart_get_products_"+r,l=woodmart_settings.ajaxurl,c="POST",u=i.data("atts"),m=i.data("paged");m++,"main_loop"===r&&(l=e(this).attr("href"),c="GET"),a("load-more",u,l,s,"json",c,m,i,n,[],function(e){e.items.length&&(i.hasClass("grid-masonry")?d(i,e.items):i.append(e.items),"no-more-posts"!==e.status&&i.imagesLoaded().progress(function(){woodmartThemeModule.clickOnScrollButton(".wd-products-load-more.load-on-scroll",!0,woodmart_settings.infinit_scroll_offset)}),woodmartThemeModule.$document.trigger("wood-images-loaded"),woodmartThemeModule.$document.trigger("wdLoadMoreLoadProducts"),i.data("paged",m)),"main_loop"===r&&(n.attr("href",e.nextPage),"no-more-posts"===e.status&&n.parent().hide().remove()),"no-more-posts"===e.status&&n.parent().hide()})}});var a=function(t,a,d,i,r,s,l,c,u,m,w){var h={atts:a,paged:l,action:i,woo_ajax:1};if("GET"===s&&(d=n(d,"loop")),m[l])return c.addClass("wd-loading"),void setTimeout(function(){w(m[l]),c.removeClass("wd-loading"),o=!1},300);"arrows"===t&&(c.addClass("wd-loading").parent().addClass("wd-loading"),c.siblings(".wd-sticky-loader").addClass("wd-loading")),u.addClass("loading"),"woodmart_get_products_main_loop"===i&&(h={loop:c.find(".product").last().data("loop"),woo_ajax:1,atts:a}),e.ajax({url:d,data:h,dataType:r,method:s,success:function(o){woodmartThemeModule.removeDuplicatedStylesFromHTML(o.items,function(t){var a=e(".woocommerce-result-count");if(o.items=t,m[l]=o,w(o),"yes"===woodmart_settings.load_more_button_page_url_opt&&"no"!==woodmart_settings.load_more_button_page_url&&o.currentPage){var d="",n=o.currentPage+window.location.search;window.history.state&&window.history.state.hasOwnProperty("url")&&(window.history.state.url=n,d=window.history.state),window.history.replaceState(d,"",n),e(".woocommerce-breadcrumb").replaceWith(o.breadcrumbs)}a.length>0&&o.hasOwnProperty("resultCount")&&a.replaceWith(o.resultCount)},"arrows"===t?c:"")},error:function(){console.log("ajax error")},complete:function(){"arrows"===t&&c.removeClass("wd-loading").parent().removeClass("wd-loading"),u.removeClass("loading"),o=!1}})},d=function(t,o){var a=e(o);t.append(a).isotope("appended",a),t.imagesLoaded().progress(function(){t.isotope("layout")})},n=function(e,t){var o=e.split("?");if(o.length>=2){for(var a=encodeURIComponent(t)+"=",d=o[1].split(/[&;]/g),n=d.length;n-- >0;)-1!==d[n].lastIndexOf(a,0)&&d.splice(n,1);return o[0]+(d.length>0?"?"+d.join("&"):"")}return e}},e(document).ready(function(){woodmartThemeModule.productsLoadMore()})}(jQuery),function(e){woodmartThemeModule.productVideo=function(){void 0!==e.fn.magnificPopup&&e(".product-video-button a").magnificPopup({tLoading:woodmart_settings.loading,type:"iframe",removalDelay:600,iframe:{markup:woodmart_settings.close_markup+'<div class="wd-popup wd-with-video wd-scroll-content"><iframe class="mfp-iframe" src="//about:blank" allowfullscreen></iframe></div>',patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?rel=0&autoplay=1"}}},preloader:!1,fixedContentPos:!0,callbacks:{beforeOpen:function(){this.wrap.addClass("wd-video-popup-wrap")}}})},e(document).ready(function(){woodmartThemeModule.productVideo()})}(jQuery),function(e){woodmartThemeModule.singleProdReviewsLike=function(){e("#reviews").on("click",".wd-review-likes .wd-like, .wd-review-likes .wd-dislike",function(t){if(t.preventDefault(),!e("body").hasClass("logged-in"))return;let o,a=e(this),d=a.closest(".wd-review-likes"),n=a.closest(".comment_container").attr("id"),i=parseInt(n.substring(n.indexOf("-")+1));a.hasClass("wd-active")||(a.siblings().removeClass("wd-active"),a.addClass("wd-active"),a.hasClass("wd-like")?o="like":a.hasClass("wd-dislike")&&(o="dislike"),e.ajax({url:woodmart_settings.ajaxurl,method:"POST",data:{action:"woodmart_comments_likes",comment_id:i,vote:o},beforeSend:function(){d.addClass("wd-adding")},complete:function(){d.removeClass("wd-adding")},success:function(e){let t=a.closest(".wd-review-likes");e.hasOwnProperty("likes")&&t.find(".wd-like .wd-action-text").text(e.likes),e.hasOwnProperty("dislikes")&&t.find(".wd-dislike .wd-action-text").text(e.dislikes)},error:function(e){console.error(e)}}))})},e(document).ready(function(){woodmartThemeModule.singleProdReviewsLike()})}(jQuery),function(e){woodmartThemeModule.singleProdReviewsCriteria=function(){woodmart_settings.is_criteria_enabled&&e("#reviews").on("click",".wd-review-criteria div.stars a",function(t){t.preventDefault();let o=e(this),a=o.closest(".comment-form-rating").data("criteria-id"),d=e(`#${a}`),n=o.closest(".stars");d.val(o.text()),o.siblings("a").removeClass("active"),o.addClass("active"),n.addClass("selected")}).on("click","#respond #submit",function(){if("yes"===woodmart_settings.reviews_criteria_rating_required){let t=!1,o=e("#review_form").find(".wd-review-criteria");if(o.each(function(){let a=e(this).data("criteria-id"),d=o.find(`#${a}`);e(d).val()||(t=!0)}),t)return window.alert(wc_single_product_params.i18n_required_rating_text),!1}})},e(document).ready(function(){woodmartThemeModule.singleProdReviewsCriteria()})}(jQuery),function(e){woodmartThemeModule.singleProdReviews=function(){let t=e("#reviews");function o(){let t=e(".wd-rating-summary-cont").find(".wd-active");return t.length>0?t.find(".wd-rating-label").data("rating").toString():""}function a(a=!1,d=!1){let n=e(".commentlist"),i=n.length>0?n.data("reviews-columns"):{},r={action:"woodmart_filter_review",rating:o(),product_id:t.data("product-id"),order_by:0<t.find(".wd-reviews-sorting-select :checked").length?t.find(".wd-reviews-sorting-select :checked").val():"newest",only_images:e("#wd-with-image-checkbox").is(":checked"),summary_criteria_ids:woodmart_settings.summary_criteria_ids};i.hasOwnProperty("reviews_columns")&&(r.reviews_columns=i.reviews_columns),i.hasOwnProperty("reviews_columns_tablet")&&(r.reviews_columns_tablet=i.reviews_columns_tablet),i.hasOwnProperty("reviews_columns_mobile")&&(r.reviews_columns_mobile=i.reviews_columns_mobile),a&&(r.rating="",r.only_images=!1),e.ajax({url:woodmart_settings.ajaxurl,method:"GET",data:r,beforeSend:function(){let e=t.find("#comments .commentlist");t.find("#comments .wd-loader-overlay").addClass("wd-loading"),d&&t.find(".wd-rating-summary-wrap .wd-loader-overlay").addClass("wd-loading"),e.removeClass("wd-active"),e.removeClass("wd-in")},complete:function(){t.find("#comments .wd-loader-overlay").removeClass("wd-loading"),d&&t.find(".wd-rating-summary-wrap .wd-loader-overlay").removeClass("wd-loading"),setTimeout(function(){t.find("#comments .commentlist").addClass("wd-active")},50),setTimeout(function(){t.find("#comments .commentlist").addClass("wd-in")},100)},success:function(o){(!r.rating??!r.only_images)&&e(".wd-reviews-sorting-clear").addClass("wd-hide"),o.title&&t.find(".woocommerce-Reviews-title").html(o.title),e(document).trigger("woodmart_reviews_sorting_clear",r),o.content&&t.find("#comments .wd-reviews-content").html(o.content),woodmartThemeModule.hasOwnProperty("photoswipeImages")&&"function"==typeof woodmartThemeModule.photoswipeImages&&woodmartThemeModule.photoswipeImages()},error:function(e){console.error(e)}})}t.off("click",".wd-rating-summary-item").on("click",".wd-rating-summary-item",function(){if(!woodmart_settings.is_rating_summary_filter_enabled||e(this).hasClass("wd-empty"))return;e(this).siblings().removeClass("wd-active"),e(this).toggleClass("wd-active");let t=o();e(document).on("woodmart_reviews_sorting_clear",function(o,a){t?e(".wd-reviews-sorting-clear").removeClass("wd-hide"):e(".wd-reviews-sorting-clear").addClass("wd-hide")}),a(!1,!0)}).off("click",".wd-reviews-sorting-clear").on("click",".wd-reviews-sorting-clear",function(t){t.preventDefault(),e(".wd-rating-summary-item").each(function(){e(this).removeClass("wd-active")}),e(document).on("woodmart_reviews_sorting_clear",function(t,o){e(".wd-reviews-sorting-clear").addClass("wd-hide")}),e("#wd-with-image-checkbox").prop("checked",!1),a(!0,!0)}).off("click","#wd-with-image-checkbox").on("click","#wd-with-image-checkbox",function(){let t=e(this).is(":checked");e(document).on("woodmart_reviews_sorting_clear",function(o,a){t?e(".wd-reviews-sorting-clear").removeClass("wd-hide"):0===a.rating.length&&e(".wd-reviews-sorting-clear").addClass("wd-hide")}),a()}).off("change",".wd-reviews-sorting-select").on("change",".wd-reviews-sorting-select",function(){a()})},e(document).ready(function(){woodmartThemeModule.singleProdReviews()}),window.addEventListener("wdOpenDescHiddenTab",function(e){woodmartThemeModule.hasOwnProperty("singleProdReviews")&&woodmartThemeModule.singleProdReviews()})}(jQuery),function(e){woodmartThemeModule.productRecentlyViewed=function(){e(".wd-products-element .products, .wd-carousel-container.products .wd-carousel").each(function(){var t=e(this),o=t.data("atts");void 0!==o&&void 0!==o.post_type&&"recently_viewed"===o.post_type&&void 0!==o.ajax_recently_viewed&&"yes"===o.ajax_recently_viewed&&e.ajax({url:woodmart_settings.ajaxurl,data:{attr:o,action:"woodmart_get_recently_viewed_products"},dataType:"json",method:"POST",success:function(o){o.items&&woodmartThemeModule.removeDuplicatedStylesFromHTML(o.items,function(o){var a=0!==e("<div>").html(o).find(".wd-product").length;t.hasClass("wd-carousel")&&t.parents(".wd-products-element").length?(a?t.parents(".wd-products-element").removeClass("wd-hide"):t.parents(".wd-products-element").addClass("wd-hide"),t.parent().replaceWith(o)):(a?t.parent().removeClass("wd-hide"):t.parent().addClass("wd-hide"),t.html(o)),woodmartThemeModule.$document.trigger("wdRecentlyViewedProductLoaded"),woodmartThemeModule.$document.trigger("wood-images-loaded")},t.parent())},error:function(){console.log("ajax error")}})})},e(document).ready(function(){woodmartThemeModule.productRecentlyViewed()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit wdLoadMoreLoadProducts wdArrowsLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdUpdateWishlist wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.productMoreDescription()}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.productMoreDescription()})}),woodmartThemeModule.productMoreDescription=function(){e(".wd-hover-with-fade, .wd-image-hotspot.hotspot-type-product, .wd-spot:has(.wd-spot-product)").on("mouseenter touchstart",function(){var t=e(this).find(".wd-more-desc"),o=t.find(".wd-more-desc-inner"),a=t.find(".wd-more-desc-btn");if(!t.hasClass("wd-more-desc-calculated")){var d=t.outerHeight(),n=o.outerHeight()-d;n>30?a.addClass("wd-shown"):n>0&&t.css("max-height",d+n),t.addClass("wd-more-desc-calculated")}}),woodmartThemeModule.$body.on("click",".wd-more-desc-btn",function(t){t.preventDefault();var o=e(this);o.parent().addClass("wd-more-desc-full"),woodmartThemeModule.$document.trigger("wdProductHoverContentRecalc",[o.parents(".wd-hover-with-fade")])})},e(document).ready(function(){woodmartThemeModule.productMoreDescription()})}(jQuery),woodmartThemeModule.$document.on("wdReplaceMainGallery",function(){woodmartThemeModule.productImagesGallery(!0)}),["frontend/element_ready/wd_single_product_gallery.default"].forEach(function(e){woodmartThemeModule.wdElementorAddAction(e,function(e){woodmartThemeModule.productImagesGallery(),e.find(".woocommerce-product-gallery").css("opacity","1")})}),woodmartThemeModule.productImagesGallery=function(e=!1){document.querySelectorAll(".woocommerce-product-gallery").forEach(function(t){var o=t.querySelector(".wd-carousel-container"),a=t.querySelector(".woocommerce-product-gallery__wrapper:not(.quick-view-gallery)"),d=t.querySelector(".wd-gallery-thumb .wd-carousel");if(a){var n,i=window.getComputedStyle(a),r=i.getPropertyValue("--wd-col-lg")?i.getPropertyValue("--wd-col-lg"):i.getPropertyValue("--wd-col"),s=i.getPropertyValue("--wd-col-md")?i.getPropertyValue("--wd-col-md"):i.getPropertyValue("--wd-col"),l=i.getPropertyValue("--wd-col-sm")?i.getPropertyValue("--wd-col-sm"):i.getPropertyValue("--wd-col"),c={slidesPerView:r,loop:woodmart_settings.product_slider_autoplay,centeredSlides:"yes"===a.dataset.center_mode,autoHeight:"yes"===woodmart_settings.product_slider_auto_height,grabCursor:!0,a11y:{enabled:!0,prevSlideMessage:woodmart_settings.swiper_prev_slide_msg,nextSlideMessage:woodmart_settings.swiper_next_slide_msg,firstSlideMessage:woodmart_settings.swiper_first_slide_msg,lastSlideMessage:woodmart_settings.swiper_last_slide_msg,paginationBulletMessage:woodmart_settings.swiper_pagination_bullet_msg,slideLabelMessage:woodmart_settings.swiper_slide_label_msg},breakpoints:{1025:{slidesPerView:r,initialSlide:"yes"===a.dataset.center_mode&&r?1:0},768.98:{slidesPerView:s,initialSlide:"yes"===a.dataset.center_mode&&s?1:0},0:{slidesPerView:l,initialSlide:"yes"===a.dataset.center_mode&&l?1:0}},slideClass:"wd-carousel-item",slideActiveClass:"wd-active",slideVisibleClass:"wd-slide-visible",slideNextClass:"wd-slide-next",slidePrevClass:"wd-slide-prev",slideFullyVisibleClass:"wd-full-visible",slideBlankClass:"wd-slide-blank",lazyPreloaderClass:"wd-lazy-preloader",containerModifierClass:"wd-",wrapperClass:"wd-carousel-wrap",on:{slideChange:function(){a.dispatchEvent(new CustomEvent("wdSlideChange",{activeIndex:this.activeIndex})),woodmartThemeModule.$document.trigger("wood-images-loaded")}}};if(a.parentElement.querySelector(".wd-btn-arrow.wd-next")&&(c.navigation={nextEl:a.parentElement.querySelector(".wd-btn-arrow.wd-next"),prevEl:a.parentElement.querySelector(".wd-btn-arrow.wd-prev"),disabledClass:"wd-disabled",lockClass:"wd-lock",hiddenClass:"wd-hide"}),woodmart_settings.product_slider_autoplay&&(c.autoplay={delay:3e3,pauseOnMouseEnter:!0}),t.querySelector(".wd-nav-pagin")&&(c.pagination={el:t.querySelector(".wd-nav-pagin"),dynamicBullets:t.querySelector(".wd-nav-pagin-wrap").classList.contains("wd-dynamic"),type:"bullets",clickable:!0,bulletClass:"wd-nav-pagin-item",bulletActiveClass:"wd-active",modifierClass:"wd-type-",lockClass:"wd-lock",currentClass:"wd-current",totalClass:"wd-total",hiddenClass:"wd-hidden",clickableClass:"wd-clickable",horizontalClass:"wd-horizontal",verticalClass:"wd-vertical",paginationDisabledClass:"wd-disabled",renderBullet:function(e,o){var a="",d=woodmart_settings.swiper_pagination_bullet_msg.replace("{{index}}",e+1);return t.querySelector(".wd-nav-pagin-wrap").classList.contains("wd-style-number-2")&&9>=(a=e+1)&&(a="0"+a),'<li class="'+o+'" tabindex="0" aria-label="'+d+'"><span>'+a+"</span></li>"}}),d){var u=t.querySelector(".wd-gallery-thumb"),m=t.classList.contains("thumbs-position-left")&&(woodmartThemeModule.$body.width()>1024||!t.classList.contains("wd-thumbs-wrap"))?"vertical":"horizontal";if(d.children.length){e&&(n="",a.querySelectorAll(".woocommerce-product-gallery__image").forEach(function(e,t){var o=e.dataset.thumb,a=e.querySelector("a img"),d=a.getAttribute("alt"),i=a.getAttribute("title"),r="";if(!i&&e.querySelector("a picture")&&(i=e.querySelector("a picture").getAttribute("title")),e.querySelector(".wd-product-video")&&(r+=" wd-with-video"),n+='<div class="wd-carousel-item'+r+'">',n+='<img src="'+o+'"',d&&(n+=' alt="'+d+'"'),i&&(n+=' title="'+i+'"'),0===t){var s=a.getAttribute("data-o_src");s&&(n+=' data-o_src="'+s+'"')}n+="/>",n+="</div>"}),d.firstElementChild.innerHTML=n),"vertical"===m&&!window.getComputedStyle(t).getPropertyValue("--wd-thumbs-height")&&u.offsetHeight&&t.style.setProperty("--wd-thumbs-height",u.offsetHeight+"px");var w=window.getComputedStyle(d),h=w.getPropertyValue("--wd-col-lg")?w.getPropertyValue("--wd-col-lg"):2,p=w.getPropertyValue("--wd-col-md")?w.getPropertyValue("--wd-col-md"):2,f=w.getPropertyValue("--wd-col-sm")?w.getPropertyValue("--wd-col-sm"):2;c.thumbs={swiper:{el:d,slidesPerView:h,direction:m,autoHeight:"horizontal"===m&&"yes"===woodmart_settings.product_slider_auto_height,id:"wd-carousel-thumbnails",slideClass:"wd-carousel-item",slideActiveClass:"wd-active",slideVisibleClass:"wd-slide-visible",slideNextClass:"wd-slide-next",slidePrevClass:"wd-slide-prev",slideFullyVisibleClass:"wd-full-visible",slideBlankClass:"wd-slide-blank",lazyPreloaderClass:"wd-lazy-preloader",containerModifierClass:"wd-",wrapperClass:"wd-carousel-wrap",grabCursor:!0,a11y:{enabled:!0,prevSlideMessage:woodmart_settings.swiper_prev_slide_msg,nextSlideMessage:woodmart_settings.swiper_next_slide_msg,firstSlideMessage:woodmart_settings.swiper_first_slide_msg,lastSlideMessage:woodmart_settings.swiper_last_slide_msg,paginationBulletMessage:woodmart_settings.swiper_pagination_bullet_msg,slideLabelMessage:woodmart_settings.swiper_slide_label_msg},breakpoints:{1025:{slidesPerView:h},768.98:{slidesPerView:p},0:{slidesPerView:f}},navigation:{nextEl:d.nextElementSibling.querySelector(".wd-btn-arrow.wd-next"),prevEl:d.nextElementSibling.querySelector(".wd-btn-arrow.wd-prev"),disabledClass:"wd-disabled",lockClass:"wd-lock",hiddenClass:"wd-hide"},on:{slideChange:function(){woodmartThemeModule.$document.trigger("wood-images-loaded")},resize:function(e){t.classList.contains("thumbs-position-left")&&t.classList.contains("wd-thumbs-wrap")&&(e.currentBreakpoint>1024&&!e.isVertical()?e.changeDirection("vertical"):e.currentBreakpoint<=1024&&!e.isHorizontal()&&e.changeDirection("horizontal"))}}},slideThumbActiveClass:"wd-thumb-active",thumbsContainerClass:"wd-thumbs"}}}(t.classList.contains("thumbs-position-without")||t.classList.contains("thumbs-position-bottom")||t.classList.contains("thumbs-position-left")||(!o.classList.contains("wd-off-md")&&woodmartThemeModule.$window.width()<=1024&&woodmartThemeModule.$window.width()>768||!o.classList.contains("wd-off-sm")&&woodmartThemeModule.$window.width()<=768)&&(t.classList.contains("thumbs-grid-bottom_combined")||t.classList.contains("thumbs-grid-bottom_combined_2")||t.classList.contains("thumbs-grid-bottom_combined_3")||t.classList.contains("thumbs-grid-bottom_column")||t.classList.contains("thumbs-grid-bottom_grid")))&&("yes"===woodmart_settings.product_slider_auto_height?imagesLoaded(t,function(){g()}):g())}function g(){"undefined"!=typeof wdSwiper?(d&&void 0!==d.swiper&&d.swiper.destroy(!0,!1),void 0!==a.swiper&&a.swiper.destroy(!0,!1),a.classList.add("wd-carousel"),woodmartThemeModule.$document.trigger("wood-images-loaded"),new wdSwiper(a,c)):console.error("Swiper is not defined")}})},woodmartThemeModule.$window.on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){woodmartThemeModule.productImagesGallery()},300))}),window.addEventListener("load",function(){woodmartThemeModule.productImagesGallery()}),function(e){woodmartThemeModule.productImages=function(){var t=e(".woocommerce-product-gallery"),o=e(".woocommerce-product-gallery__wrapper"),a=".wd-show-product-gallery-wrap > a";t.hasClass("image-action-popup")&&(a+=", .woocommerce-product-gallery__image > a"),t.on("click",".woocommerce-product-gallery__image > a",function(e){e.preventDefault()}),t.on("click",a,function(t){t.preventDefault(),e(this).attr("href");var o=n();woodmartThemeModule.callPhotoSwipe(d(t),o)});var d=function(t){var o=0,a=e(t.currentTarget);if(a.parents(".wd-carousel-item").length)o=a.parents(".wd-carousel-item").index();else if(a.hasClass("woodmart-show-product-gallery")){var d=a.parents(".woocommerce-product-gallery");(d.hasClass("thumbs-position-left")||d.hasClass("thumbs-position-bottom")||d.hasClass("thumbs-position-without"))&&(o=a.parents(".wd-gallery-images").find(".wd-carousel-item.wd-active").index())}return o},n=function(){var t=[];return o.find("figure a img").each(function(){var o=e(this),a=o.attr("data-large_image"),d=o.attr("data-large_image_width"),n=o.attr("data-large_image_height"),i=o.attr("data-caption");if(o.parents(".wd-carousel-item.wd-with-video").length){var r=o.parents(".wd-with-video")[0].outerHTML;-1!==r.indexOf("wd-inited")&&(r=r.replace("wd-inited","wd-loaded").replace("wd-video-playing","")),t.push({html:r,mainElement:o.parents(".wd-with-video")})}else t.push({src:a,w:d,h:n,title:"yes"===woodmart_settings.product_images_captions&&i})}),t}},e(document).ready(function(){woodmartThemeModule.productImages()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit wdUpdateWishlist wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdArrowsLoadProducts wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.productHover()}),woodmartThemeModule.wcTabsHoverFix=function(){e(".wc-tabs > li").on("click",function(){woodmartThemeModule.productHover()})},woodmartThemeModule.$document.on("wdProductHoverContentRecalc",function(e,t){woodmartThemeModule.productHoverRecalc(t)}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.productHover()})}),woodmartThemeModule.productHoverRecalc=function(e){if(!e.hasClass("wd-fade-off")){var t=e.find(".wd-product-card-hover").outerHeight();e.find(".wd-product-card-bg").css({marginBottom:-t}),e.addClass("hover-ready")}},woodmartThemeModule.productHover=function(){var t=e(".wd-hover-with-fade"),o=t.closest(".wd-carousel");function a(e){if(!e.data("column_width")){var t=e.outerWidth()/e.data("columns");e.data("column_width",t)}}woodmartThemeModule.windowWidth<=1024&&(o.length>0&&t.hasClass("wd-hover-fw-button")&&t.addClass("wd-fade-off"),t.on("click",function(t){var o=e(this),a="state-hover";o.hasClass("wp-block-wd-li-product-card")||o.hasClass(a)||o.hasClass("wd-fade-off")||"no"!==woodmart_settings.base_hover_mobile_click||(t.preventDefault(),e("."+a).removeClass(a),o.addClass(a))}),woodmartThemeModule.$document.on("click touchstart",function(t){0===e(t.target).closest(".state-hover").length&&e(".state-hover").removeClass("state-hover")})),t.on("mouseenter mousemove touchstart",function(){var t=e(this);t.hasClass("wd-height-calculated")||(t.imagesLoaded(function(){woodmartThemeModule.productHoverRecalc(t)}),t.addClass("wd-height-calculated"))}),e(".wd-products").on("mouseenter mousemove touchstart",function(){a(e(this))}),t.on("mouseenter mousemove touchstart",function(){if(woodmart_settings.hover_width_small){var t=e(this);if(!t.hasClass("wd-hover-fw-button")&&!t.hasClass("wp-block-wd-li-product-card")){a(t.parent(".wd-products"));var o=t.parent(".wd-products").data("column_width");o&&(255>o||woodmartThemeModule.windowWidth<=1024?(t.find(".wd-add-btn").parent().addClass("wd-add-small-btn"),t.find(".wd-add-btn").removeClass("wd-add-btn-replace").addClass("wd-action-btn wd-style-icon wd-add-cart-icon")):(woodmartThemeModule.$body.hasClass("catalog-mode-on")||woodmartThemeModule.$body.hasClass("login-see-prices"))&&t.find(".wd-bottom-actions .wd-action-btn").removeClass("wd-style-icon").addClass("wd-style-text"),woodmartThemeModule.$document.trigger("wdProductBaseHoverIconsResize"))}}})},e(document).ready(function(){woodmartThemeModule.productHover(),woodmartThemeModule.wcTabsHoverFix()})}(jQuery),function(e){"use strict";woodmartThemeModule.$document.on("wdReplaceMainGallery",function(){woodmartThemeModule.productVideoGallery()}),e.each(["frontend/element_ready/wd_single_product_gallery.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.productVideoGallery()})}),woodmartThemeModule.productVideoGallery=function(){var t=e(".woocommerce-product-gallery__wrapper:not(.quick-view-gallery)"),o=t.parents(".woocommerce-product-gallery"),a=e(".variations_form");function d(e){var t,o=e.find("iframe"),a=e.find(".wd-play-video"),d=new YT.Player(o[0],{events:{onReady:function(){e.hasClass("wd-video-muted")?d.mute():d.unMute(),d.setLoop(!0),e.removeClass("wd-loading"),!e.hasClass("wd-video-playing")||woodmartThemeModule.$window.width()<=768&&o.attr("src").indexOf("autoplay=1")&&o.attr("src").indexOf("mute=1")?(e.addClass("wd-video-playing"),d.playVideo()):(e.removeClass("wd-video-playing"),d.pauseVideo())},onStateChange:function(o){e.hasClass("wd-overlay-hidden")&&(o.data===YT.PlayerState.PLAYING?i("hide"):o.data!==YT.PlayerState.PAUSED||e.hasClass("wd-video-design-native")||i("show")),t=o.data}}});a.on("click",function(){t!==YT.PlayerState.UNSTARTED?e.hasClass("wd-video-playing")?(e.removeClass("wd-video-playing"),"function"==typeof d.pauseVideo&&d.pauseVideo()):(e.addClass("wd-video-playing"),"function"==typeof d.playVideo&&d.playVideo()):"function"==typeof d.playVideo&&d.playVideo()})}function n(e){var t,o=e.find("iframe"),a=e.find(".wd-play-video"),d=new Vimeo.Player(o);d.setLoop(!0),e.hasClass("wd-video-muted")?d.setVolume(0):d.setVolume(1),d.on("play",function(){clearInterval(t),e.addClass("wd-video-playing"),e.removeClass("wd-loading"),e.hasClass("wd-overlay-hidden")&&i("hide")}),!e.hasClass("wd-video-design-native")&&e.hasClass("wd-overlay-hidden")&&d.on("pause",function(){i("show")}),e.hasClass("wd-video-playing")?(d.pause(),e.removeClass("wd-video-playing")):d.ready().then(function(){t=setInterval(function(){d.play()},2e3)}),e.hasClass("wd-loaded")&&(e.addClass("wd-video-playing"),e.removeClass("wd-loading"),e.hasClass("wd-overlay-hidden")&&i("hide"),e.removeClass("wd-loaded")),a.on("click",function(){e.hasClass("wd-video-playing")?(e.removeClass("wd-video-playing"),d.pause()):(e.addClass("wd-video-playing"),d.play())})}function i(e){t.hasClass("wd-carousel")&&("hide"===e?o.addClass("wd-hide-overlay-info"):"show"===e&&o.removeClass("wd-hide-overlay-info"))}woodmartThemeModule.$document.on("click",".wd-carousel-item.wd-with-video .wd-play-video",function(t){t.preventDefault();var o=e(this).parents(".wd-carousel-item"),a=o.find("iframe");if(a.length||(a=o.find("video")),!o.hasClass("wd-inited")&&a.length){var r=a.attr("src");r||(r=a.data("lazy-load"),a.attr("src",r)),r&&(o.hasClass("wd-video-playing")||o.addClass("wd-loading"),function(t,o){if(o.addClass("wd-inited"),t.indexOf("vimeo.com")+1)"undefined"==typeof Vimeo||void 0===Vimeo.Player?e.getScript(woodmart_settings.vimeo_library_url,function(){a=setInterval(function(){"undefined"!=typeof Vimeo&&(clearInterval(a),n(o))},100)}):n(o);else if(t.indexOf("youtube.com")+1){var a;"undefined"==typeof YT||void 0===YT.Player?(o.hasClass("wd-video-playing")&&o.find(".wd-video-actions").addClass("wd-loading"),e.getScript("https://www.youtube.com/player_api",function(){a=setInterval(function(){void 0!==YT.Player&&(clearInterval(a),d(o),o.find(".wd-video-actions").removeClass("wd-loading"))},100)})):d(o)}else!function(e){var t=e.find("video"),o=e.find(".wd-play-video");t.on("loadedmetadata",function(){e.removeClass("wd-loading"),t[0].play(),e.addClass("wd-video-playing")}),e.hasClass("wd-overlay-hidden")&&(t.on("play",function(){i("hide")}),e.hasClass("wd-video-design-native")||t.on("pause",function(){i("show")})),e.hasClass("wd-video-muted")?t.prop("muted",!0):t.prop("muted",!1),e.hasClass("wd-video-playing")?(t[0].pause(),e.removeClass("wd-video-playing")):e.hasClass("wd-loaded")&&(e.removeClass("wd-loading"),t[0].play(),e.addClass("wd-video-playing")),o.on("click",function(){e.hasClass("wd-video-playing")?(t[0].pause(),e.removeClass("wd-video-playing")):(e.addClass("wd-video-playing"),t[0].play())})}(o)}(r,o))}}),woodmartThemeModule.$document.on("wdPhotoSwipeBeforeInited",function(t,o){o.listen("initialLayout",function(){void 0!==o.items&&o.items&&e.each(o.items,function(e,t){void 0!==t.mainElement&&t.mainElement.hasClass("wd-video-playing")&&t.mainElement.hasClass("wd-inited")&&t.mainElement.find(".wd-play-video").trigger("click")})}),o.listen("close",function(){void 0!==o.currItem.container&&e(o.currItem.container).parents(".pswp__container").find(".pswp__item").each(function(){var t=e(this).find(".wd-with-video.wd-video-playing");t.length&&t.find(".wd-play-video").trigger("click")})})}),t.find(".wd-carousel-item.wd-with-video").length&&document.querySelector(".woocommerce-product-gallery__wrapper:not(.quick-view-gallery)").addEventListener("wdSlideChange",function(e){var t=e.target.swiper.slides[e.target.swiper.activeIndex];t.classList.contains("wd-overlay-hidden")&&(t.classList.contains("wd-video-playing")||t.classList.contains("wd-video-design-native")&&t.classList.contains("wd-video-hide-thumb"))?i("hide"):!o.hasClass("wd-hide-overlay-info")||t.classList.contains("wd-overlay-hidden")&&t.classList.contains("wd-video-playing")||i("show")}),a.length&&a.on("show_variation",function(o,a){t.find(".wd-carousel-item.wd-video-playing").each(function(){var t=e(this);(t.find(".wp-post-image").length||t.hasClass("wd-inited"))&&t.find(".wd-play-video").trigger("click")})})},e(document).ready(function(){woodmartThemeModule.productVideoGallery()})}(jQuery),window.addEventListener("load",function(){if((document.querySelector("script[src*='googletagmanager.com']")||document.querySelector("#www-widgetapi-script"))&&document.querySelector(".woocommerce-product-gallery .wd-carousel-item.wd-with-video")){const e=document.createElement("script");e.src="//www.youtube.com/iframe_api";const t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}}),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.productFilters()}),e.each(["frontend/element_ready/wd_product_filters.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.productFilters()})}),woodmartThemeModule.productFilters=function(){woodmartThemeModule.$body.on("filter_price_slider_create filter_price_slider_slide",function(e,t,o,a,d,n){if("undefined"!=typeof accounting){var i=accounting.formatMoney(t,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format}),r=accounting.formatMoney(o,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format});n.siblings(".filter_price_slider_amount").find("span.from").html(i),n.siblings(".filter_price_slider_amount").find("span.to").html(r);var s=n.parents(".wd-pf-checkboxes").find(".wd-pf-results"),l=s.find(".selected-value");t===a&&o===d?l.remove():0===l.length?s.prepend('<li class="selected-value" data-title="price-filter" data-min="'+a+'" data-max="'+d+'">'+i+" - "+r+"</li>"):l.html(i+" - "+r),woodmartThemeModule.$body.trigger("price_slider_updated",[t,o])}}),e(".wd-pf-price-range .price_slider_widget").each(function(){var t=e(this),o=t.siblings(".filter_price_slider_amount").find(".min_price"),a=t.siblings(".filter_price_slider_amount").find(".max_price"),d=parseInt(o.data("min")),n=parseInt(a.data("max")),i=new URL(window.location.href),r=parseInt(i.searchParams.has("min_price")?i.searchParams.get("min_price"):o.val()),s=parseInt(i.searchParams.has("max_price")?i.searchParams.get("max_price"):a.val());e(".price_slider_widget, .price_label").show(),isNaN(r)&&(r=d),isNaN(s)&&(s=n),t.slider({range:!0,animate:!0,min:d,max:n,values:[r,s],create:function(){r===d&&s===n&&(o.val(""),a.val("")),woodmartThemeModule.$body.trigger("filter_price_slider_create",[r,s,d,n,t]),t.closest(".wd-pf-price-range").on("click",".wd-pf-results li",function(t){var o=e(this),a=o.closest(".wd-pf-checkboxes"),d=a.find(".pf-value");if(a.find(".min_price").val(""),a.find(".max_price").val(""),a.find(".price_slider_widget").slider("values",[a.find(".min_price").data("min"),a.find(".max_price").data("max")]),o.remove(),0!==d.length){var n=new URL(d.attr("href"));n.searchParams.delete("min_price"),n.searchParams.delete("max_price"),d.attr("href",n.href),d&&d.trigger("click")}})},slide:function(e,i){i.values[0]===d&&i.values[1]===n?(o.val(""),a.val("")):(o.val(i.values[0]),a.val(i.values[1])),woodmartThemeModule.$body.trigger("filter_price_slider_slide",[i.values[0],i.values[1],d,n,t])},change:function(e,t){woodmartThemeModule.$body.trigger("price_slider_change",[t.values[0],t.values[1]])}})});var t=e("form.wd-product-filters"),o=function(e,t){if(0!==e.length){var o=e.val();o.indexOf(",")>0?e.val(o.replace(","+t,"").replace(t+",","")):e.val(o.replace(t,""))}},a={container:".wd-page-content",timeout:woodmart_settings.pjax_timeout,scrollTo:!1,renderCallback:function(e,t,o){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){e.html(t),o(),woodmartThemeModule.$document.trigger("wdShopPageInit"),woodmartThemeModule.$document.trigger("wood-images-loaded")},e)}};t.each(function(t,d){var n=(d=e(d)).find(".wd-pf-btn button, .wp-block-wd-button"),i=d.find(".wd-pf-checkboxes");d.on("click",".wd-pf-results li",function(t){var a=e(this),d=a.data("title"),i=a.closest(".wd-pf-checkboxes"),r=i.find(`.pf-value[data-val="${d}"]`);if(!i.hasClass("wd-pf-price-range"))if(0===n.length)r.trigger("click");else{var s=i.find(".result-input");i.hasClass("wd-pf-categories")&&i.closest("form.wd-product-filters").attr("action",woodmart_settings.shop_url),o(s,d),r.closest("li").removeClass("wd-active"),a.remove()}}),i.each(function(){var t=e(this),o=t.find(".wd-pf-title"),a=t.hasClass("multi_select");o.on("click keyup",function(a){if("keyup"!==a.type||13===a.keyCode){var n=a.target;e(n).is(o.find(".selected-value"))||(t.hasClass("wd-opened")?d():(t.addClass("wd-opened"),setTimeout(function(){woodmartThemeModule.$document.trigger("wdProductFiltersOpened")},300)))}}),woodmartThemeModule.$document.on("click",function(n){var i=n.target;(t.hasClass("wd-opened")&&a&&!e(i).is(t)&&!e(i).parents().is(t)||!a&&!e(i).is(o)&&!e(i).parents().is(o))&&d()});var d=function(){t.removeClass("wd-opened")}}),0===n.length?d.on("click",".wd-pf-checkboxes li > .pf-value, .filter_price_slider_amount .pf-value",function(t){var o=d.find(".filter_price_slider_amount");if(o.length>0){var n=o.find(".pf-value"),i=n.siblings(".min_price"),r=n.siblings(".max_price"),s=n.attr("href"),l=new URL(s);i.length&&r.length&&(i.val()?l.searchParams.set(i.attr("name"),i.val()):l.searchParams.delete(i.attr("name")),r.val()?l.searchParams.set(r.attr("name"),r.val()):l.searchParams.delete(r.attr("name")),n.attr("href",l.href)),i.val(""),r.val("")}"1"===woodmart_settings.ajax_shop&&void 0!==e.fn.pjax&&e.pjax.click(t,a)}):(d.on("click",".wd-pf-checkboxes li > .pf-value",function(t){t.preventDefault();var a=e(this),d=a.closest("form.wd-product-filters"),n=a.parent(),i=a.parents(".wd-pf-checkboxes"),r=i.find(".result-input"),s=i.find(".wd-pf-results"),l=i.hasClass("multi_select"),c=r.val(),u=a.data("title"),m=a.data("val");if(l?n.hasClass("wd-active")?(o(r,m),s.find('li[data-title="'+m+'"]').remove(),n.removeClass("wd-active")):(""===c?r.val(m):r.val(c+","+m),s.prepend('<li class="selected-value" data-title="'+m+'">'+u+"</li>"),n.addClass("wd-active")):n.hasClass("wd-active")?(r.val(""),s.find(".selected-value").remove(),n.removeClass("wd-active")):(r.val(m),s.find(".selected-value").remove(),s.prepend('<li class="selected-value" data-title="'+m+'">'+u+"</li>"),n.parents(".wd-scroll-content").find(".wd-active").removeClass("wd-active"),n.addClass("wd-active")),i.hasClass("wd-pf-categories")){var w=new URL(a.attr("href")),h=woodmart_settings.shop_url;n.hasClass("wd-active")&&(h=w.origin+w.pathname),d.attr("action",h)}}),"1"===woodmart_settings.ajax_shop&&void 0!==e.fn.pjax?e(document).off("submit","form.wd-product-filters").on("submit","form.wd-product-filters",function(t){t.preventDefault(),d=e(this),a.url=d.attr("action"),a.data=d.find(':input[value!=""]').serialize(),e.pjax(a)}):e(document).off("submit","form.wd-product-filters").on("submit","form.wd-product-filters",function(t){e(":input",this).each(function(){this.disabled=!e(this).val()})}))}),woodmartThemeModule.$document.on("click",".wd-product-filters > a.btn",function(t){t.preventDefault(),e(this).parent("form").trigger("submit")})},e(document).ready(function(){woodmartThemeModule.productFilters()})}(jQuery),function(e){woodmartThemeModule.product360Button=function(){void 0!==e.fn.magnificPopup&&e(".product-360-button a").magnificPopup({type:"inline",mainClass:"mfp-fade",preloader:!1,closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,fixedContentPos:!0,removalDelay:600,callbacks:{beforeOpen:function(){this.wrap.addClass("wd-product-360-view-wrap")},open:function(){woodmartThemeModule.$window.trigger("resize")}}})},e(document).ready(function(){woodmartThemeModule.product360Button()})}(jQuery),function(e){woodmartThemeModule.onRemoveFromCart=function(){"no"!==woodmart_settings.woocommerce_ajax_add_to_cart&&woodmartThemeModule.$document.on("click",".widget_shopping_cart .remove",function(t){t.preventDefault(),e(this).parent().addClass("removing-process")})},e(document).ready(function(){woodmartThemeModule.onRemoveFromCart()})}(jQuery),function(e){woodmartThemeModule.miniCartQuantity=function(){var t;woodmartThemeModule.$document.on("change input",".woocommerce-mini-cart .quantity .qty",function(){var o=e(this),a=o.val(),d=o.parents(".woocommerce-mini-cart-item").data("key"),n=o.attr("max"),i=woodmart_settings.cart_hash_key,r=woodmart_settings.fragment_name;clearTimeout(t),parseInt(a)>parseInt(n)&&(a=n),t=setTimeout(function(){o.parents(".mini_cart_item").addClass("wd-loading"),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_cart_item",item_id:d,qty:a},success:function(t){t&&t.fragments&&(e.each(t.fragments,function(o,a){if(e(o).hasClass("widget_shopping_cart_content")){var n=e(a).find('.woocommerce-mini-cart-item[data-key="'+d+'"]'),i=e(a).find(".shopping-cart-widget-footer"),r=e(o).find('.woocommerce-mini-cart-item[data-key="'+d+'"]');t.cart_hash&&n.length?(r.replaceWith(n),e(".shopping-cart-widget-footer").replaceWith(i)):e(o).replaceWith(a)}else e(o.replace("_wd","")).replaceWith(a)}),woodmartThemeModule.supports_html5_storage&&(sessionStorage.setItem(r,JSON.stringify(t.fragments)),localStorage.setItem(i,t.cart_hash),sessionStorage.setItem(i,t.cart_hash),t.cart_hash&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())),woodmartThemeModule.$body.trigger("wc_fragments_refreshed"))},dataType:"json",method:"GET"})},500)})},e(document).ready(function(){woodmartThemeModule.miniCartQuantity()})}(jQuery),function(e){woodmartThemeModule.loginTabs=function(){var t=e(".wd-register-tabs"),o=t.find(".wd-switch-to-register"),a=e(".col-register-text h2"),d=t.find(".login-info"),n="active-register",i=o.data("login"),r=o.data("register"),s=o.data("login-title"),l=o.data("reg-title");o.on("click",function(o){o.preventDefault(),m()?u():c(),woodmartThemeModule.$window.width()<769&&e("html, body").stop().animate({scrollTop:t.offset().top-90},400)});var c=function(){t.addClass(n),o.text(i),d.length>0&&a.text(s)},u=function(){t.removeClass(n),o.text(r),d.length>0&&a.text(l)},m=function(){return t.hasClass(n)}},e(document).ready(function(){woodmartThemeModule.loginTabs()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.loginSidebar()}),woodmartThemeModule.loginSidebar=function(){var t=woodmartThemeModule.$body,o=e(".login-form-side"),a=e(".wd-close-side");woodmartThemeModule.$document.on("click",".login-side-opener",function(e){o.length&&(e.preventDefault(),i()?d():setTimeout(function(){n()},10))}),t.on("click touchstart",".wd-close-side",function(){i()&&d()}),t.on("click",".close-side-widget",function(e){e.preventDefault(),i()&&d()}),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&i()&&d()});var d=function(){o.trigger("wdCloseSide"),o.removeClass("wd-opened"),a.removeClass("wd-close-side-opened")},n=function(){o.trigger("wdOpenSide"),o.find("form").removeClass("hidden-form"),o.addClass("wd-opened"),a.addClass("wd-close-side-opened")};o.find(".woocommerce-notices-wrapper > ul").length>0&&n();var i=function(){return o.hasClass("wd-opened")}},e(document).ready(function(){woodmartThemeModule.loginSidebar()})}(jQuery),function(e){woodmartThemeModule.loginDropdown=function(){woodmartThemeModule.windowWidth<=1024||e(".wd-dropdown-register").each(function(){var t=e(this),o=t.find(".login-dropdown-inner");o.find('input[id="username"]').on("click",function(){t.addClass("wd-active-login").removeClass("wd-active-link")}),o.find('input[id="username"]').on("input",function(){t.hasClass("wd-active-login")&&t.removeClass("wd-active-login").addClass("wd-active-link")}),o.find("input").not('[id="username"]').on("click",function(){t.removeClass("wd-active-login").removeClass("wd-active-link")}),woodmartThemeModule.$document.click(function(e){void 0!==e.target.className.length&&-1===e.target.className.indexOf("wd-dropdown-register")&&-1===e.target.className.indexOf("input-text")&&t.removeClass("wd-active-login").removeClass("wd-active-link")}),e(".wd-dropdown-register").on("mouseout",function(){t.hasClass("wd-active-link")&&t.removeClass("wd-active-link")}).on("mouseleave",function(){t.hasClass("wd-active-link")&&t.removeClass("wd-active-link")})})},e(document).ready(function(){woodmartThemeModule.loginDropdown()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdReplaceMainGalleryNotQuickView wdShowVariationNotQuickView wdResetVariation",function(){setTimeout(function(){woodmartThemeModule.initZoom()},300)}),e.each(["frontend/element_ready/wd_single_product_gallery.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.initZoom()})}),woodmartThemeModule.initZoom=function(){var t=e(".woocommerce-product-gallery__wrapper:not(.quick-view-gallery)");if("yes"!==woodmart_settings.zoom_enable)return!1;var o={touch:!1};"ontouchstart"in window&&(o.on="click");var a=e(".woocommerce-product-gallery");function d(e){e.find("img").data("large_image_width")>e.width()&&(e.trigger("zoom.destroy"),e.zoom(o))}a.hasClass("thumbs-position-bottom")||a.hasClass("thumbs-position-left")?(document.querySelector(".woocommerce-product-gallery__wrapper:not(.quick-view-gallery)").addEventListener("wdSlideChange",function(e){d(t.find(".wd-carousel-item").eq(e.target.swiper.activeIndex).find(".woocommerce-product-gallery__image"))}),d(t.find(".wd-carousel-item").eq(0).find(".woocommerce-product-gallery__image"))):t.find(".wd-carousel-item").each(function(){d(e(this).find(".woocommerce-product-gallery__image"))})},e(document).ready(function(){woodmartThemeModule.initZoom()})}(jQuery),function(e){woodmartThemeModule.$document.on("pjax:complete wdProductsTabsLoaded wdShopPageInit wdLoadMoreLoadProducts wdArrowsLoadProducts",function(){woodmartThemeModule.imagesGalleryInLoop()}),woodmartThemeModule.$document.on("wdRecentlyViewedProductLoaded",function(){e(".wd-products-element .products, .wd-carousel-container.products .wd-product").each(function(t,o){let a=e(this);a.trigger("wdImagesGalleryInLoopOn",a)})}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default","frontend/element_ready/wd_archive_products.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.imagesGalleryInLoop()})}),woodmartThemeModule.imagesGalleryInLoop=function(){function t(t){e(t).on("mouseover mouseout",".wd-product-grid-slide",function(t){let o=e(this),a=o.closest(".wd-product");if(woodmartThemeModule.$window.width()<=1024)return;let d,n,i,r=a.find(".wd-product-grid-slider-pagin"),s=a.find(".wd-product-img-link > img, .wd-product-img-link > picture > img"),l=a.find(".wd-product-img-link > picture source");if("mouseover"===t.type){let e=o.data("image-id");d=o.data("image-url"),n=o.data("image-srcset"),i=r.find(`[data-image-id="${e}"]`)}else d=a.find('.wd-product-grid-slide[data-image-id="0"]').data("image-url"),n=a.find('.wd-product-grid-slide[data-image-id="0"]').data("image-srcset"),i=r.find('[data-image-id="0"]');i.siblings().removeClass("wd-active"),i.addClass("wd-active"),s.attr("src",d),n?(s.attr("srcset",n),l.attr("srcset",n)):s.attr("srcset")&&(s.attr("srcset",null),l.attr("srcset",null))}).on("click",".wd-prev, .wd-next",function(t){t.preventDefault();let o=e(this).closest(".wd-product"),a=o.find(".wd-product-img-link > img, .wd-product-img-link > picture > img"),d=o.find(".wd-product-img-link > picture source"),n=o.find(".wd-product-grid-slide"),i=n.hasClass("wd-active")?o.find(".wd-product-grid-slide.wd-active").data("image-id"):0;e(this).hasClass("wd-prev")?i--:e(this).hasClass("wd-next")&&i++,-1===i?i=n.length-1:n.length===i&&(i=0);let r=o.find(`.wd-product-grid-slide[data-image-id="${i}"]`),s=r.data("image-url"),l=r.data("image-srcset");n.removeClass("wd-active"),r.addClass("wd-active"),a.attr("src",s),l?(a.attr("srcset",l),d.attr("srcset",l)):a.attr("srcset")&&(a.attr("srcset",null),d.attr("srcset",null))})}function o(t){e(t).off("mouseover mouseout",".wd-product-grid-slide").off("click",".wd-prev, .wd-next")}e(".wd-product").each(function(e,a){o(a),t(a)}),woodmartThemeModule.$document.on("wdImagesGalleryInLoopOff",".wd-product",function(e,t=this){o(t)}).on("wdImagesGalleryInLoopOn",".wd-product",function(e,o=this){t(o)})},e(document).ready(function(){woodmartThemeModule.imagesGalleryInLoop()})}(jQuery),function(e){woodmartThemeModule.headerCategoriesMenu=function(){if(!(woodmartThemeModule.windowWidth>1024)){var t=e(".wd-header-cats"),o=t.find(".categories-menu-dropdown"),a=t.find(".menu-item-has-children"),d=(t.find(".menu-opener"),200);a.find("> a").before('<span class="drop-category"></span>'),o.on("click",".drop-category",function(){var t=e(this),o=t.parent().find("> .wd-dropdown-menu, >.sub-sub-menu");o.hasClass("child-open")?(t.removeClass("act-icon"),o.slideUp(d).removeClass("child-open")):(t.addClass("act-icon"),o.slideDown(d).addClass("child-open"))}),t.on("click",".menu-opener",function(e){e.preventDefault(),n()?r():i()}),o.on("click","a",function(){r(),o.stop().attr("style","")});var n=function(){return o.hasClass("categories-opened")},i=function(){o.addClass("categories-opened").stop().slideDown(d)},r=function(){o.removeClass("categories-opened").stop().slideUp(d)}}},e(document).ready(function(){woodmartThemeModule.headerCategoriesMenu()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdArrowsLoadProducts wdLoadMoreLoadProducts wdUpdateWishlist wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.gridQuantity()}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.gridQuantity()})}),woodmartThemeModule.gridQuantity=function(){e(".wd-product").on("change input",".quantity .qty",function(){var t=e(this),o=t.parent().parent().find(".add_to_cart_button");o.attr("data-quantity",t.val()),o.attr("href","?add-to-cart="+o.attr("data-product_id")+"&quantity="+t.val())})},e(document).ready(function(){woodmartThemeModule.gridQuantity()})}(jQuery),function(e){woodmartThemeModule.frequentlyBoughtTogether=function(){function t(t){var o={};return t.find(".wd-fbt-product").each(function(){var a=e(this),d=e(this).find("input"),n=a.data("id"),i=t.parents(".wd-fbt");d.length?d.is(":checked")?(a.find(".wd-fbt-product-variation").length?o[n]=a.find(".wd-fbt-product-variation select").val():o[n]="",i.find(".product.post-"+n).removeClass("wd-disabled-fbt")):d.parents(".wd-fbt-form").hasClass("wd-checkbox-uncheck")||i.find(".product.post-"+n).addClass("wd-disabled-fbt"):a.find(".wd-fbt-product-variation").length?o[n]=a.find(".wd-fbt-product-variation select").val():o[n]=""}),o}e("form.wd-fbt-form").each(function(){var o="",a=e(this);a.on("change",".wd-fbt-product input, .wd-fbt-product select",function(){var d=e(this),n=t(a),i=a.find("input[name=wd-fbt-main-product]").val(),r=a.find(".wd-fbt-purchase-btn");if(n&&void 0!==n[i]){2>Object.keys(n).length?r.addClass("wd-disabled"):r.removeClass("wd-disabled");var s=a.parents(".wd-fbt").find(".wd-carousel"),l=d.parents(".wd-fbt-product").index();void 0===s[0].swiper||e(s.find(".wd-carousel-item")[l]).hasClass("wd-active")||(1===l&&1<s[0].swiper.slides.length&&(l=0),void 0!==s[0].swiper.slideTo&&s[0].swiper.slideTo(l,500)),clearTimeout(o),o=setTimeout(function(){!function(t,o){var a=t.find("input[name=wd-fbt-main-product]").val(),d=t.find("input[name=wd-fbt-bundle-id]").val();t.find(".wd-loader-overlay").addClass("wd-loading"),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_frequently_bought_price",products_id:o,main_product:a,bundle_id:d},method:"POST",success:function(t){t.fragments&&e.each(t.fragments,function(t,o){e(t).replaceWith(o)})},error:function(){console.log("ajax error")},complete:function(){t.find(".wd-loader-overlay").removeClass("wd-loading")}})}(a,n)},1e3)}}),a.on("change",".wd-fbt-product select",function(){var t=e(this),o=t.parents(".wd-fbt-product").data("id"),a=t.parents(".wd-fbt").find(".wd-product[data-id="+o+"]").find(".wd-product-img-link > img, .wd-product-img-link > picture > img"),d=t.find("option:selected").data("image-src"),n=t.find("option:selected").data("image-srcset");a.attr("srcset")&&(n||(n=d),a.attr("srcset",n)),a.attr("src",d)}),a.on("click",".wd-fbt-purchase-btn",function(d){d.preventDefault();var n=e(this);if(!n.hasClass("wd-disabled")){var i=t(a),r=a.find("input[name=wd-fbt-main-product]").val(),s=a.find("input[name=wd-fbt-bundle-id]").val();i&&void 0!==i[r]&&(clearTimeout(o),n.addClass("loading"),e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_purchasable_fbt_products",products_id:i,main_product:r,bundle_id:s},method:"POST",success:function(t){var o=e(".woocommerce-notices-wrapper");if(o.empty(),t.notices&&t.notices.indexOf("error")>0){o.append(t.notices);var a=o.offset().top-woodmart_settings.ajax_scroll_offset;e("html, body").stop().animate({scrollTop:a},400)}else void 0!==t.fragments&&(void 0!==e.fn.magnificPopup&&"widget"===woodmart_settings.add_to_cart_action&&e.magnificPopup.close(),n.addClass("added"),woodmartThemeModule.$body.trigger("added_to_cart",[t.fragments,t.cart_hash,jQuery()]))},error:function(){console.log("ajax error")},complete:function(){n.removeClass("loading")}}))}})})},e(document).ready(function(){woodmartThemeModule.frequentlyBoughtTogether()})}(jQuery),jQuery.each(["frontend/element_ready/wd_cart_table.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(e){woodmartThemeModule.addGiftProduct()})}),jQuery(document.body).on("updated_cart_totals",updateGiftsTable),jQuery(document.body).on("updated_checkout",updateGiftsTable),woodmartThemeModule.addGiftProduct=function(){var e=!!document.querySelector(".woocommerce-checkout"),t=document.querySelector(".site-content .woocommerce");t&&t.addEventListener("click",function(t){var o=t.target.closest(".wd-add-gift-product");if(o){t.preventDefault();var a=o.closest(".wd-fg").querySelector(".wd-loader-overlay"),d=o.dataset.productId;if(o.classList.contains("wd-disabled"))return;a.classList.add("wd-loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_gift_product",product_id:d,security:o.dataset.security,is_checkout:e?"1":"0"},method:"POST",success:function(t){t&&(triggerEvent=e?"update_checkout":"wc_update_cart",jQuery(document.body).trigger(triggerEvent))},error:function(){console.log("ajax adding gift to cart error")},complete:function(){a.classList.remove("wd-loading")}})}})},window.addEventListener("load",function(){woodmartThemeModule.addGiftProduct()}),function(e){woodmartThemeModule.filtersArea=function(){var t=e(".filters-area");woodmartThemeModule.$body.on("click",".open-filters",function(e){e.preventDefault(),o()?a():(woodmartThemeModule.openFilters(200),setTimeout(function(){woodmartThemeModule.$document.trigger("wdFiltersOpened")},200))}),"no"===woodmart_settings.shop_filters_close&&woodmartThemeModule.$body.on("click",woodmart_settings.ajax_links,function(){o()&&a()});var o=function(){return(t=e(".filters-area")).hasClass("filters-opened")},a=function(){(t=e(".filters-area")).removeClass("filters-opened"),t.stop().slideUp(200)}},woodmartThemeModule.openFilters=function(t){var o=e(".filters-area");o.stop().slideDown(t),setTimeout(function(){o.addClass("filters-opened"),woodmartThemeModule.$document.trigger("wdFiltersOpened"),woodmartThemeModule.$body.removeClass("body-filters-opened"),woodmartThemeModule.$document.trigger("wood-images-loaded")},t)},e(document).ready(function(){woodmartThemeModule.filtersArea()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.filterDropdowns()}),woodmartThemeModule.filterDropdowns=function(){function t(t){var o=t.parent(".wd-widget-layered-nav-dropdown-form, .wd-product-category-filter-form");woodmartThemeModule.$body.hasClass("woodmart-ajax-shop-on")&&void 0!==e.fn.pjax&&e.pjax({container:".wd-page-content",timeout:woodmart_settings.pjax_timeout,url:o.attr("action"),data:o.serialize(),scrollTo:!1,renderCallback:function(e,t,o){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){e.html(t),o(),woodmartThemeModule.$document.trigger("wdShopPageInit"),woodmartThemeModule.$document.trigger("wood-images-loaded")},e)}})}function o(t){var o=t.params.args.data,a=e(this).find('option[value="'+o.id+'"]'),d=(a.attr("class")||"").match(/level-(\d+)/);if(d){var n=parseInt(d[1]);if(a.nextAll("option").each(function(){var t=(e(this).attr("class")||"").match(/level-(\d+)/);if(t){var o=parseInt(t[1]);if(o>n)e(this).prop("selected",!1);else if(o<=n)return!1}}),n>0){for(var i=[],r=a.prevAll("option"),s=n-1;s>=0;){var l=!1;if(r.each(function(){var t=(e(this).attr("class")||"").match(/level-(\d+)/);if(t&&parseInt(t[1])===s)return i.unshift(e(this)),l=!0,!1}),!l)break;s--}var c=!1;if(i.length>0){var u=i[i.length-1];c=u.prop("selected")}i.forEach(function(e){c?e===i[i.length-1]&&e.prop("selected",!1):e.prop("selected",!1)})}}}e(".wd-widget-layered-nav-dropdown-form, .wd-product-category-filter-form").each(function(){var t=e(this).find("select"),a=t.data("slug");t.hasClass("select2-hidden-accessible")&&(t.next(".select2-container").remove(),t.removeClass("select2-hidden-accessible"),t.removeAttr("data-select2-id aria-hidden tabindex"),t.removeData("select2"),t.find("option").removeAttr("data-select2-id")),t.on("change",function(){var t=e(this).val();e("input[name=filter_"+a+"]").val(t)}),e().selectWoo&&(t.selectWoo({placeholder:t.data("placeholder"),minimumResultsForSearch:5,width:"100%",allowClear:!t.attr("multiple"),language:{noResults:function(){return t.data("noResults")}}}).on("select2:unselecting",function(){e(this).data("unselecting",!0)}).on("select2:opening",function(t){var o=e(this);o.data("unselecting")&&(o.removeData("unselecting"),t.preventDefault())}),t.on("select2:selecting",o))}),e(".wd-widget-layered-nav-dropdown__submit, .wd-product-category-filter-submit").on("click",function(){var o=e(this);o.siblings("select").attr("multiple")&&woodmartThemeModule.$body.hasClass("woodmart-ajax-shop-on")&&(t(o),o.prop("disabled",!0))}),e(".wd-widget-layered-nav-dropdown-form select, .wd-product-category-filter-form select").on("change",function(){var o=e(this);woodmartThemeModule.$body.hasClass("woodmart-ajax-shop-on")?o.attr("multiple")||t(o):o.parent().submit()})},e(document).ready(function(){woodmartThemeModule.filterDropdowns()})}(jQuery),jQuery(document).on("updated_shipping_method",function(){jQuery(document.body).trigger("wc_update_cart")}),woodmartThemeModule.emailSubscriptionCheckboxes=function(){let e=document.querySelector("#wd_email_subscription_consent");function t(){this.checked?(e.checked=!0,e.value="1"):function(){let e=!1;return document.querySelectorAll(".wd-email-individual-consent").forEach(function(t){t.checked&&(e=!0)}),e}()||(e.checked=!1,e.value="0")}e&&(e.addEventListener("change",function(){document.querySelectorAll(".wd-email-individual-consent").forEach(function(t){t.checked=e.checked,e.checked?(t.disabled=!1,t.value="1"):(t.disabled=!0,t.value="0")})}),document.querySelectorAll(".wd-email-individual-consent").forEach(function(e){e.addEventListener("change",t)}))},window.addEventListener("load",function(){woodmartThemeModule.emailSubscriptionCheckboxes()}),function(e){e.each(["frontend/element_ready/wd_dynamic_discounts_table.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.renderDynamicDiscountsTable()})}),woodmartThemeModule.renderDynamicDiscountsTable=function(){let t=e(".variations_form"),o=e(".wd-dynamic-discounts"),a=o.html();function d(){e(".wd-dynamic-discounts tbody tr").each(function(){let t=e(this),o=t.data("min");t.off("click").on("click",function(){e('.quantity input.qty[name="quantity"]').val(o).trigger("change")})})}function n(t,o){t.find("tbody tr").each(function(){let t=e(this),a=t.data("min"),d=t.data("max");!d&&a<=o||a<=o&&o<=d?t.addClass("wd-active"):t.removeClass("wd-active")})}t.each(function(){e(this).on("show_variation",function(t,a){e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_discount_dynamic_discounts_table",variation_id:a.variation_id},beforeSend:function(){o.find(".wd-loader-overlay").addClass("wd-loading")},success:t=>{var a=o.attr("class");woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){o.replaceWith(t),o=e(".wd-dynamic-discounts"),o.attr("class",a),d(),n(o,e(this).find('[name="quantity"]').val()),o.find(".wd-loader-overlay").removeClass("wd-loading")},o)},dataType:"json",method:"GET"})}).on("click",".reset_variations",function(){o.html(a),d(),n(e(".wd-dynamic-discounts"),e(this).closest("form").find('.quantity input.qty[name="quantity"]').val())})}),d(),e('.quantity input.qty[name="quantity"]').off("change").on("change",function(){n(o,e(this).val())})},e(document).ready(()=>{woodmartThemeModule.renderDynamicDiscountsTable()})}(jQuery),function(e){woodmartThemeModule.countProductVisits=function(){var e=1e4;void 0!==woodmart_settings.counter_visitor_live_duration&&(e=woodmart_settings.counter_visitor_live_duration),"yes"===woodmart_settings.counter_visitor_ajax_update?woodmartThemeModule.updateCountProductVisits():"yes"===woodmart_settings.counter_visitor_live_mode&&setInterval(woodmartThemeModule.updateCountProductVisits,e)},woodmartThemeModule.updateCountProductVisits=function(){e(".wd-visits-count").each(function(){var t=e(this),o=t.data("product-id"),a=t.find(".wd-info-number");o&&e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_count_product_visits",product_id:o,count:a.text()},method:"POST",success:function(e){e&&(a.text(e.count),e.message&&t.find(".wd-count-msg").text(e.message),e.count?t.removeClass("wd-hide"):t.addClass("wd-hide"))},error:function(){console.log("ajax error")},complete:function(){}})})},e(document).ready(function(){woodmartThemeModule.countProductVisits()})}(jQuery),function(e){woodmartThemeModule.commentImage=function(){e("form.comment-form").attr("enctype","multipart/form-data");var t=e(".comment-form"),o=t.find("#wd-add-img-btn"),a=[];function d(e){t.prepend('<ul class="woocommerce-error" role="alert"><li>'+e+"</li></ul>")}0!==o.length&&(e.each(woodmart_settings.comment_images_upload_mimes,function(e,t){a.push(String(t))}),t.find("#wd-add-img-btn").on("change",function(){t.find(".wd-add-img-count").text(woodmart_settings.comment_images_added_count_text.replace("%s",this.files.length))}),t.on("submit",function(n){t.find(".woocommerce-error").remove();var i=!1,r=!1;o[0].files.length>woodmart_settings.comment_images_count&&(d(woodmart_settings.comment_images_count_text),n.preventDefault()),o[0].files.length<=0&&"yes"===woodmart_settings.single_product_comment_images_required&&(d(woodmart_settings.comment_required_images_error_text),n.preventDefault()),Array.prototype.forEach.call(o[0].files,function(t){var o=t.size,d=String(t.type);o>woodmart_settings.comment_images_upload_size&&(i=!0),e.inArray(d,a)<0&&(r=!0)}),i&&(d(woodmart_settings.comment_images_upload_size_text),n.preventDefault()),r&&(d(woodmart_settings.comment_images_upload_mimes_text),n.preventDefault())}))},e(document).ready(function(){woodmartThemeModule.commentImage()})}(jQuery),function(e){woodmartThemeModule.checkoutRemove=function(){woodmartThemeModule.$document.on("click",".wd-checkout-remove-btn",function(){e(this).closest(".woocommerce-checkout-review-order-table").append('<div class="wd-loader-overlay wd-fill wd-loading"></div>')})},e(document).ready(function(){woodmartThemeModule.checkoutRemove()})}(jQuery),function(e){woodmartThemeModule.checkoutQuantity=function(){var t;woodmartThemeModule.$document.on("change input",".woocommerce-checkout-review-order-table .quantity .qty",function(){var o=e(this),a=o.val(),d=o.attr("name"),n=d.substring(d.indexOf("[")+1,d.indexOf("]")),i=o.attr("max"),r=woodmart_settings.cart_hash_key,s=woodmart_settings.fragment_name;clearTimeout(t),parseInt(a)>parseInt(i)&&(a=i),t=setTimeout(function(){e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_cart_item",item_id:n,qty:a},success:function(t){t&&t.fragments&&(e.each(t.fragments,function(t,o){e(t).replaceWith(o)}),woodmartThemeModule.supports_html5_storage&&(sessionStorage.setItem(s,JSON.stringify(t.fragments)),localStorage.setItem(r,t.cart_hash),sessionStorage.setItem(r,t.cart_hash),t.cart_hash&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())),woodmartThemeModule.$body.trigger("wc_fragments_refreshed")),t.cart_hash?e("form.checkout").trigger("update"):window.location.reload()},dataType:"json",method:"GET"})},500)})},e(document).ready(function(){woodmartThemeModule.checkoutQuantity()})}(jQuery),function(e){if("undefined"==typeof wc_address_i18n_params)return!1;e(document).on("country_to_state_changing",function(t,o,a){if(0===woodmart_checkout_fields.length)return;let d=a,n=JSON.parse(wc_address_i18n_params.locale_fields);e.each(n,function(e,t){let o=d.find(t),a=o.find("[name]").attr("name");woodmart_checkout_fields.hasOwnProperty(a)&&woodmart_checkout_fields[a].hasOwnProperty("required")&&function(e,t){t?(e.find("label .optional").remove(),e.addClass("validate-required"),0===e.find("label .required").length&&e.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')):(e.find("label .required").remove(),e.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field"),0===e.find("label .optional").length&&e.find("label").append(' <span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}(o,woodmart_checkout_fields[a].required)})})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.categoriesDropdowns()}),woodmartThemeModule.categoriesDropdowns=function(){e(".dropdown_product_cat").on("change",function(){var t=e(this);if(""!==t.val()){var o,a=woodmart_settings.home_url;o=a.indexOf("?")>0?a+"&product_cat="+t.val():a+"?product_cat="+t.val(),location.href=o}else location.href=woodmart_settings.shop_url}),e(".widget_product_categories").each(function(){var t=e(this).find("select");e().selectWoo&&t.selectWoo({minimumResultsForSearch:5,width:"100%",allowClear:!0,placeholder:woodmart_settings.product_categories_placeholder,language:{noResults:function(){return woodmart_settings.product_categories_no_results}}})})},e(document).ready(function(){woodmartThemeModule.categoriesDropdowns()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdBackHistory wdShopPageInit",function(){woodmartThemeModule.categoriesAccordion()}),woodmartThemeModule.categoriesAccordion=function(){if("no"!==woodmart_settings.categories_toggle){var t=e(".widget_product_categories, .wd-product-category-filter").find(".product-categories");t.find(".wd-active-parent").each(function(){var t=e(this);t.find(" > .wd-cats-toggle").length>0||0!==t.find(" > .children").length&&0!==t.find(" > .children > *").length&&(t.hasClass("wd-active")||t.hasClass("wd-current-active-parent")?(t.children().eq(0).after('<div class="wd-cats-toggle toggle-active wd-role-btn" tabindex="0"></div>'),t.find("> .children").addClass("list-shown")):t.children().eq(0).after('<div class="wd-cats-toggle wd-role-btn" tabindex="0"></div>'))}),t.on("click",".wd-cats-toggle",function(){var t=e(this),o=t.parent().find("> .children");o.hasClass("list-shown")?(t.removeClass("toggle-active"),o.stop().slideUp(300).removeClass("list-shown")):(o.parent().parent().find("> li > .list-shown").slideUp().removeClass("list-shown"),o.parent().parent().find("> li > .toggle-active").removeClass("toggle-active"),t.addClass("toggle-active"),o.stop().slideDown(300).addClass("list-shown"))})}},e(document).ready(function(){woodmartThemeModule.categoriesAccordion()})}(jQuery),function(e){woodmartThemeModule.cartWidget=function(){var t=woodmartThemeModule.$body,o=e(".cart-widget-side"),a=e(".wd-close-side");t.on("click wdOpenWidgetCart",".cart-widget-opener",function(e){r()||s()||e.preventDefault(),i()?d():setTimeout(function(){n()},10)}),t.on("click touchstart",".wd-close-side",function(){i()&&d()}),t.on("click",".close-side-widget",function(e){e.preventDefault(),i()&&d()}),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&i()&&d()});var d=function(){o.trigger("wdCloseSide"),o.removeClass("wd-opened"),a.removeClass("wd-close-side-opened")},n=function(){if(r()||s())return!1;o.trigger("wdOpenSide"),o.addClass("wd-opened"),a.addClass("wd-close-side-opened")},i=function(){return o.hasClass("wd-opened")},r=function(){return woodmartThemeModule.$body.hasClass("woocommerce-cart")},s=function(){return woodmartThemeModule.$body.hasClass("woocommerce-checkout")}},e(document).ready(function(){woodmartThemeModule.cartWidget()}),window.addEventListener("wdUpdatedHeader",function(){woodmartThemeModule.cartWidget()})}(jQuery),function(e){woodmartThemeModule.cartQuantity=function(){var t;woodmartThemeModule.$document.on("change input",".woocommerce-cart-form__cart-item .quantity .qty",function(o){var a=e(this);clearTimeout(t),""!==a.val().trim()&&(t=setTimeout(function(){a.parents(".woocommerce-cart-form").find("button[name=update_cart]").trigger("click")},500))})},e(document).ready(function(){woodmartThemeModule.cartQuantity()})}(jQuery),function(e){woodmartThemeModule.ajaxFilters=function(){if(woodmartThemeModule.$body.hasClass("woodmart-ajax-shop-on")&&void 0!==e.fn.pjax&&!woodmartThemeModule.$body.hasClass("single-product")&&!woodmartThemeModule.$body.hasClass("elementor-editor-active")&&0!==e('.products[data-source="main_loop"]').length){var t=!1,o=!1;woodmartThemeModule.$document.on("pjax:popstate",function(e){o=!0}),woodmartThemeModule.$document.on("pjax:end",function(){o&&(woodmartThemeModule.$document.trigger("wdShopPageInit"),o=!1)}),woodmartThemeModule.$body.on("click",".post-type-archive-product .products-footer .woocommerce-pagination a",function(){a(!0)}),woodmartThemeModule.$document.pjax(woodmart_settings.ajax_links,".wd-page-content",{timeout:woodmart_settings.pjax_timeout,scrollTo:!1,renderCallback:function(e,t,o){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){e.html(t),o(),woodmartThemeModule.$document.trigger("wdShopPageInit"),woodmartThemeModule.$document.trigger("wood-images-loaded")},e)}}),"click"===woodmart_settings.price_filter_action?woodmartThemeModule.$document.on("click",".widget_price_filter form .button",function(){var t=e(".widget_price_filter form");return e.pjax({container:".wd-page-content",timeout:woodmart_settings.pjax_timeout,url:t.attr("action"),data:t.serialize(),scrollTo:!1,renderCallback:function(e,t,o){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){e.html(t),o(),woodmartThemeModule.$document.trigger("wdShopPageInit"),woodmartThemeModule.$document.trigger("wood-images-loaded")},e)}}),!1}):"submit"===woodmart_settings.price_filter_action&&woodmartThemeModule.$document.on("submit",".widget_price_filter form",function(t){e.pjax.submit(t,".wd-page-content")}),woodmartThemeModule.$document.on("pjax:error",function(e,t,o){console.log("pjax error "+o)}),woodmartThemeModule.$document.on("pjax:start",function(){var t=e(".wd-content-layout");t.removeClass("wd-loaded"),t.addClass("wd-loading"),woodmartThemeModule.$document.trigger("wdPjaxStart"),woodmartThemeModule.$window.trigger("scroll.loaderVerticalPosition")}),woodmartThemeModule.$document.on("pjax:complete",function(){woodmartThemeModule.$window.off("scroll.loaderVerticalPosition"),a(!1),woodmartThemeModule.$document.trigger("wood-images-loaded"),e(".wd-scroll-content").on("scroll",function(){woodmartThemeModule.$document.trigger("wood-images-loaded")}),"undefined"!=typeof woodmart_wpml_js_data&&woodmart_wpml_js_data.languages&&e.each(woodmart_wpml_js_data.languages,function(t,o){e(".wpml-ls-item-"+o.code+" > :is(.woodmart-nav-link, .wpml-ls-link)").attr("href",o.url)})}),woodmartThemeModule.$document.on("pjax:beforeReplace",function(){e(".filters-area").hasClass("filters-opened")&&"yes"===woodmart_settings.shop_filters_close&&(t=!0,woodmartThemeModule.$body.addClass("body-filters-opened"))}),woodmartThemeModule.$document.on("wdShopPageInit",function(){var o=e(".wd-content-layout");t&&(e(".filters-area").css("display","block"),woodmartThemeModule.openFilters(200),t=!1),o.removeClass("wd-loading"),o.addClass("wd-loaded")});var a=function(t){if("no"===woodmart_settings.ajax_scroll&&!1===t)return!1;var o=e(woodmart_settings.ajax_scroll_class).offset().top-woodmart_settings.ajax_scroll_offset;e("html, body").stop().animate({scrollTop:o},400)}}},e(document).ready(function(){woodmartThemeModule.ajaxFilters()})}(jQuery),function(e){woodmartThemeModule.addToCartAllTypes=function(){0!=woodmart_settings.ajax_add_to_cart&&(woodmartThemeModule.$body.on("submit","form.cart",function(t){var o=e(this),a=o.parents(".single-product-page");if(0===a.length&&(a=o.parents(".product-quick-view")),!(a.hasClass("product-type-external")||a.hasClass("product-type-zakeke")||a.hasClass("product-type-gift-card")||void 0!==t.originalEvent&&e(t.originalEvent.submitter).hasClass("wd-buy-now-btn"))){if(o.parents(".wd-sticky-btn-cart").length>0&&o.parents(".wd-sticky-btn-cart").hasClass("wd-product-type-external"))return;t.preventDefault();var d=o.find(".single_add_to_cart_button"),n=o.serialize();n+="&action=woodmart_ajax_add_to_cart",d.val()&&(n+="&add-to-cart="+d.val()),d.removeClass("added not-added"),d.addClass("loading"),woodmartThemeModule.$body.trigger("adding_to_cart",[d,n]),e.ajax({url:woodmart_settings.ajaxurl,data:n,method:"POST",success:function(t){if(t)if(window.location.toString().replace("add-to-cart","added-to-cart"),t.error&&t.product_url)window.location=t.product_url;else if("yes"===woodmart_settings.cart_redirect_after_add)window.location=woodmart_settings.cart_url;else{d.removeClass("loading");var o=t.fragments||{},a=t.cart_hash;o&&(e.each(o,function(t){e(t).addClass("updating")}),e.each(o,function(t,o){e(t).replaceWith(o)}));var n=e(".woocommerce-notices-wrapper");n.empty(),t.notices&&t.notices.indexOf("error")>0?(n.append(t.notices),d.addClass("not-added"),woodmartThemeModule.$body.trigger("not_added_to_cart",[o,a,d])):(void 0!==e.fn.magnificPopup&&"widget"===woodmart_settings.add_to_cart_action&&e.magnificPopup.close(),d.addClass("added"),woodmartThemeModule.$body.trigger("added_to_cart",[o,a,d]))}},error:function(){console.log("ajax adding to cart error")},complete:function(){}})}}),woodmartThemeModule.$body.on("click",".variations_form .wd-buy-now-btn",function(t){var o=e(this).siblings(".single_add_to_cart_button");"undefined"!=typeof wc_add_to_cart_variation_params&&o.hasClass("disabled")&&(t.preventDefault(),o.hasClass("wc-variation-is-unavailable")?alert(wc_add_to_cart_variation_params.i18n_unavailable_text):o.hasClass("wc-variation-selection-needed")&&alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))}))},e(document).ready(function(){woodmartThemeModule.addToCartAllTypes()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.addToCart()})}),woodmartThemeModule.addToCart=function(){var t,o=0;woodmartThemeModule.$body.on("added_to_cart",function(t,d){if(d&&(d.stop_reload||d.e_manually_triggered))return!1;if("popup"===woodmart_settings.add_to_cart_action){var n=['<div class="added-to-cart">',"<h3>"+woodmart_settings.added_to_cart+"</h3>",'<a href="#" class="btn btn-default close-popup">'+woodmart_settings.continue_shopping+"</a>",'<a href="'+woodmart_settings.cart_url+'" class="btn btn-accent view-cart">'+woodmart_settings.view_cart+"</a>","</div>"].join("");e.magnificPopup?.instance?.isOpen&&(e.magnificPopup.instance.st.removalDelay=0,e.magnificPopup.close()),e.magnificPopup.open({removalDelay:600,closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,fixedContentPos:!0,callbacks:{beforeOpen:function(){this.wrap.addClass("wd-popup-added-cart-wrap")}},items:{src:'<div class="wd-popup wd-popup-added-cart wd-scroll-content">'+n+"</div>",type:"inline"}}),e(".wd-popup-added-cart").on("click",".close-popup",function(t){t.preventDefault(),e.magnificPopup.close()}),a()}else if("widget"===woodmart_settings.add_to_cart_action){clearTimeout(o);var i=e(".whb-sticked .wd-header-cart .wd-dropdown-cart");i.length>0?i.addClass("wd-opened"):e(".whb-header .wd-header-cart .wd-dropdown-cart").addClass("wd-opened");var r=e(".cart-widget-opener");r.length>0&&r.first().trigger("wdOpenWidgetCart"),o=setTimeout(function(){e(".wd-dropdown-cart").removeClass("wd-opened")},3500),a()}woodmartThemeModule.$document.trigger("wdActionAfterAddToCart")});var a=function(){if("yes"!==woodmart_settings.add_to_cart_action_timeout)return!1;clearTimeout(t),t=setTimeout(function(){e(".wd-close-side").trigger("click"),e.magnificPopup.close()},1e3*parseInt(woodmart_settings.add_to_cart_action_timeout_number))}},e(document).ready(function(){woodmartThemeModule.addToCart()})}(jQuery),woodmartThemeModule.abandonedCart=function(){var e=function(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)},t=function(){if("no"===woodmart_settings.abandoned_cart_needs_privacy)return!0;var e=document.querySelector("#_wd_recover_guest_cart_consent");return e&&e.checked};!function(){var o=document.querySelector("#billing_email");if(o){var a=document.querySelector("#_wd_recover_guest_cart_consent");a&&a.addEventListener("change",function(t){if(t.stopPropagation(),t.currentTarget.checked&&o.value.length&&e(o.value)){var a=new Event("change");o.dispatchEvent(a)}}),o.addEventListener("change",function(o){var a=o.target.value;if(t()&&e(a)){var d=document.querySelector("#billing_first_name"),n=document.querySelector("#billing_last_name"),i=document.querySelector("#billing_phone");jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_recover_guest_cart",security:woodmart_settings.abandoned_cart_security,email:a,phone:i?i.value:"",first_name:d?d.value:"",last_name:n?n.value:"",currency:woodmart_settings.abandoned_cart_currency,language:woodmart_settings.abandoned_cart_language},method:"POST",error:function(){console.log("Ajax error of capturing the abandoned basket of the guest")}})}})}}()},window.addEventListener("load",function(){woodmartThemeModule.abandonedCart()}),woodmartThemeModule.$document.on("wdSwiperCarouselInited",function(){woodmartThemeModule.sliderDistortion()}),woodmartThemeModule.sliderDistortion=function(){function e(e){var t=e.dataset.imageUrl;return woodmartThemeModule.$window.width()<=1024&&e.dataset.imageUrlMd&&(t=e.dataset.imageUrlMd),woodmartThemeModule.$window.width()<=767&&e.dataset.imageUrlSm&&(t=e.dataset.imageUrlSm),t}void 0!==ShaderX&&!woodmartThemeModule.$body.hasClass("single-woodmart_slide")&&document.querySelector(".wd-slider.wd-anim-distortion .wd-carousel.wd-initialized")&&document.querySelectorAll(".wd-slider.wd-anim-distortion").forEach(function(t){var o=t.querySelectorAll(".wd-carousel .wd-slide");if(!(o.length<2)){var a=e(o[0]),d=e(o[1]);if(!t.classList.contains("webgl-inited")&&a&&d){t.classList.add("webgl-inited");var n=new ShaderX({container:t.querySelector(".wd-carousel"),sizeContainer:t,vertexShader:woodmartThemeModule.shaders.matrixVertex,fragmentShader:woodmartThemeModule.shaders[woodmart_settings.slider_distortion_effect]?woodmartThemeModule.shaders[woodmart_settings.slider_distortion_effect]:woodmartThemeModule.shaders.sliderWithWave,width:t.offsetWidth,height:t.offsetHeight,distImage:"sliderPattern"===woodmart_settings.slider_distortion_effect&&woodmart_settings.theme_url+"/images/dist11.jpg"});n.loadImage(a,0,function(){t.classList.add("wd-canvas-loaded")}),n.loadImage(a,1),n.loadImage(d,0,void 0,!0),t.querySelector(".wd-carousel").addEventListener("wdSlideChange",function(t){var o=t.target.swiper.visibleSlides[0];(a=e(o))&&(n.replaceImage(a),o.nextElementSibling&&(d=e(o.nextElementSibling))&&n.loadImage(d,0,void 0,!0))})}}})},window.addEventListener("load",function(){woodmartThemeModule.sliderDistortion()}),woodmartThemeModule.shaders={matrixVertex:"attribute vec2 a_texCoord;attribute vec2 a_position;uniform mat3 u_matrix;void main() {\tgl_Position = vec4( ( u_matrix * vec3(a_position, 1) ).xy, 0, 1);\ta_texCoord;}",sliderWithNoise:"precision mediump float;uniform float u_time;uniform float u_progress;uniform sampler2D u_image0;uniform vec2 u_image0_size;uniform sampler2D u_image1;uniform vec2 u_image1_size;uniform vec2 u_pixels;uniform vec2 u_mouse;uniform vec2 u_uvRate;uniform float u_scale;float rand(vec2 seed) {\treturn fract(sin(dot(seed, vec2(1.29898,7.8233))) * 4.37585453123);}float noise(vec2 position) {\tvec2 block_position = floor(position);\tfloat top_left_value = rand(block_position);\tfloat top_right_value = rand(block_position + vec2(1.0, 0.0));\tfloat bottom_left_value = rand(block_position + vec2(0.0, 1.0));\tfloat bottom_right_value = rand(block_position + vec2(1.0, 1.0));\tvec2 computed_value = smoothstep(0.0, 1.0, fract(position));\treturn mix(top_left_value, top_right_value, computed_value.x)\t\t+ (bottom_left_value - top_left_value) * computed_value.y * (1.0 - computed_value.x)\t\t+ (bottom_right_value - top_right_value) * computed_value.x * computed_value.y\t\t- 0.5;}void main() {\tvec2 uv = gl_FragCoord.xy/u_pixels.xy;\tuv.y = 1.0 - uv.y;\tvec2 uv2 = uv;\tvec2 s = u_pixels.xy/10.;\tvec2 i = u_image0_size/10.;\tfloat rs = s.x / s.y;\tfloat ri = i.x / i.y;\tvec2 new = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x);\tvec2 offset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new;\tuv = uv * s / new + offset;\ti = u_image1_size/10.;\tri = i.x / i.y;\tnew = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x);\toffset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new;\tuv2 = uv2 * s / new + offset;\tfloat delayValue = clamp(u_progress, 0., 1.); float d = distance(u_mouse*u_uvRate, uv*u_uvRate);\tfloat ppp = ((u_progress - .5) * (u_progress - .5) - .25 );\tvec2 uv_offset = ppp * 1.1 * vec2( noise(uv * 10.0 + sin(u_time + uv.x * 5.0)) / 10.0, noise(uv * 10.0 + cos(u_time + uv.y * 5.0)) / 10.0);\tuv += uv_offset;\tuv2 += uv_offset;\tuv = (uv - vec2(.5, .5)) * u_scale + 0.5;\tvec4 rgba1 = texture2D( u_image0, uv );\tvec4 rgba2 = texture2D( u_image1, uv2 );\tvec4 rgba = mix(rgba1, rgba2, delayValue);\tgl_FragColor = rgba;}",sliderPattern:"precision mediump float;uniform float u_time;uniform float u_progress;uniform sampler2D u_image0;uniform vec2 u_image0_size;uniform sampler2D u_image1;uniform vec2 u_image1_size;uniform sampler2D u_image2;uniform vec2 u_image2_size;uniform vec2 u_pixels;void main() {\tvec2 uv = gl_FragCoord.xy/u_pixels.xy;\tuv.y = 1.0 - uv.y;\tvec2 uv2 = uv;\tvec2 s = u_pixels.xy/10.;\tvec2 i = u_image0_size/10.;\tfloat rs = s.x / s.y;\tfloat ri = i.x / i.y;\tvec2 new = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x);\tvec2 offset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new;\tuv = uv * s / new + offset;\ti = u_image1_size/10.;\tri = i.x / i.y;\tnew = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x);\toffset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new;\tuv2 = uv2 * s / new + offset;vec4 disp = texture2D(u_image2, uv);float effectFactor = 0.4;vec2 distortedPosition = vec2(uv.x + u_progress * (disp.r*effectFactor), uv.y);vec2 distortedPosition2 = vec2(uv.x - (1.0 - u_progress) * (disp.r*effectFactor), uv.y);vec4 _texture = texture2D(u_image0, distortedPosition);vec4 _texture2 = texture2D(u_image1, distortedPosition2);vec4 finalTexture = mix(_texture, _texture2, u_progress);gl_FragColor = finalTexture;}",sliderWithWave:"precision mediump float;uniform float u_time;uniform float u_progress;uniform sampler2D u_image0;uniform vec2 u_image0_size;uniform sampler2D u_image1;uniform vec2 u_image1_size;uniform vec2 u_pixels;uniform vec2 u_mouse;uniform vec2 u_uvRate;uniform float u_scale; vec2 mirrored(vec2 v) { vec2 m = mod(v,2.); return mix(m,2.0 - m, step(1.0 ,m)); } float tri(float p) { return mix(p,1.0 - p, step(0.5 ,p))*2.; }void main() {\tvec2 uv = gl_FragCoord.xy/u_pixels.xy;\tuv.y = 1.0 - uv.y;\tvec2 uv2 = uv;\tvec2 s = u_pixels.xy/10.;\tvec2 i = u_image0_size.xy/10.;\tfloat rs = s.x / s.y;\tfloat ri = i.x / i.y;\tvec2 new = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, (i.y * s.x) / i.x);\tvec2 offset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new;\tuv = uv * s / new + offset;\ti = u_image1_size.xy/10.;\tri = i.x / i.y;\tnew = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x);\toffset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new;\tuv2 = uv2 * s / new + offset; float delayValue = u_progress*6.5 - uv.y*2. + uv.x - 3.0; vec2 accel = vec2(0.5,2.); delayValue = clamp(delayValue,0.,1.); vec2 translateValue = u_progress + delayValue*accel; vec2 translateValue1 = vec2(-0.5,1.)* translateValue; vec2 translateValue2 = vec2(-0.5,1.)* (translateValue - 1. - accel); vec2 w = sin( sin(u_time) * vec2(0,0.3) + uv.yx*vec2(0,4.))*vec2(0,0.5); vec2 xy = w*(tri(u_progress)*0.5 + tri(delayValue)*0.5); vec2 uv1 = uv + translateValue1 + xy; uv2 = uv2 + translateValue2 + xy; vec4 rgba1 = texture2D(u_image0,mirrored(uv1)); vec4 rgba2 = texture2D(u_image1,mirrored(uv2)); vec4 rgba = mix(rgba1,rgba2,delayValue);\tgl_FragColor = rgba;}",hoverWave:"precision mediump float;uniform float u_time;uniform float u_progress;uniform sampler2D u_image;uniform vec2 u_pixels;uniform vec2 u_mouse;uniform vec2 u_uvRate;uniform float u_scale;void main() {\tvec2 uv = gl_FragCoord.xy/u_pixels.xy;\tuv.y = 1.0 - uv.y;\tfloat d = distance(u_mouse*u_uvRate, uv*u_uvRate);\tfloat ppp = ((u_progress - .5) * (u_progress - .5) - .25 );\tfloat dY = sin(uv.y * 44.005 + u_time * 4.5) * 0.02 * ppp;\tfloat dX = sin(uv.x * 30.005 + u_time * 3.2) * 0.02 * ppp;\tif( u_progress > 0. && d < .1 ) {\t dX *= smoothstep( 0., .15, (.15 - d) ) * 5.;\t dY *= smoothstep( 0., .15, (.15 - d) ) * 5.;\t}\tuv.y += dY;\tuv.x += dX;\tgl_FragColor = texture2D(u_image, uv);}"},ShaderX.prototype={init:function(){var e=this;window.addEventListener("resize",function(){e.resize()}),this.options.autoPlay&&(this.runned=!0,this.render(),this.raf())},render:function(){this.container.classList.contains("wd-with-webgl")||(this.createCanvas(),this.container.append(this.canvas),this.container.classList.add("wd-with-webgl")),this.gl&&(this.progress>0&&this.progress<1||!this.drawn)&&(this.renderCanvas(),this.drawn=!0)},createCanvas:function(){if(this.canvas=document.createElement("CANVAS"),this.gl=this.canvas.getContext("webgl"),this.gl){this.canvas.width=this.options.width*this.pixelRatio,this.canvas.height=this.options.height*this.pixelRatio;var e=this.createShader(this.gl.VERTEX_SHADER,this.options.vertexShader),t=this.createShader(this.gl.FRAGMENT_SHADER,this.options.fragmentShader);this.program=this.createProgram(e,t);var o=this.gl.getAttribLocation(this.program,"a_position"),a=this.gl.createBuffer();this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a);var d=this.options.width*this.pixelRatio,n=this.options.height*this.pixelRatio,i=[0,0,d,0,0,n,0,n,d,0,d,n];this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array(i),this.gl.STATIC_DRAW),this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.gl.clearColor(0,0,0,0),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.gl.useProgram(this.program);var r=[2/this.gl.canvas.width,0,0,0,-2/this.gl.canvas.height,0,-1,1,1];this.addUniform("3fv","u_matrix",r),this.addUniform("1f","u_flipY",1),this.addUniform("1f","u_time",0),this.addUniform("2f","u_pixels",[this.options.width*this.pixelRatio,this.options.height*this.pixelRatio]),this.addUniform("1f","u_progress",0),this.addUniform("2f","u_resolution",[this.gl.canvas.width,this.gl.canvas.height]),this.addUniform("2f","u_uvRate",[1,1]),this.addUniform("1f","u_scale",this.scale),this.options.mouseMove&&this.addUniform("2f","u_mouse",[.5,0]),this.gl.enableVertexAttribArray(o);var s=this.gl.FLOAT;this.gl.vertexAttribPointer(o,2,s,!1,0,0);var l=this.gl.getAttribLocation(this.program,"a_texCoord"),c=this.gl.createBuffer();if(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,c),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),this.gl.STATIC_DRAW),this.gl.enableVertexAttribArray(l),this.gl.vertexAttribPointer(l,2,this.gl.FLOAT,!1,0,0),this.texture1&&this.loadImageTexture(this.texture1,0),this.options.distImage){var u=new Image;this.requestCORSIfNotSameOrigin(u,this.options.distImage),u.src=this.options.distImage;var m=this;u.onload=function(){m.loadImageTexture(u,2)}}}else console.log("WebGL is not supported")},raf:function(){if(this.canvas){var e=this;!function t(){if(e.time+=.03,e.updateUniform("u_time",e.time),e.options.mouseMove){var o=e.getUniform("u_mouse"),a=o[0],d=o[1],n=a?a+.05*(e.mouseX-a):e.mouseX,i=d?d+.05*(e.mouseY-d):e.mouseY;e.updateUniform("u_mouse",[n,i])}e.progress<0&&(e.progress=0),e.progress>1&&(e.progress=1),e.updateUniform("u_progress",e.progress),e.updateUniform("u_scale",e.scale),e.render(),e.requestID=window.requestAnimationFrame(t)}()}},resize:function(){var e=this;clearTimeout(this.resizingTimeout),this.resizingTimeout=setTimeout(function(){if(e.canvas){var t=Math.floor(e.options.sizeContainer.offsetWidth*e.pixelRatio),o=Math.floor(e.options.sizeContainer.offsetHeight*e.pixelRatio);e.gl.canvas.width===t&&e.gl.canvas.height===o||(e.gl.canvas.width=t,e.gl.canvas.height=o),e.updateUniform("u_resolution",[t,o]),e.updateUniform("u_pixels",[t,o]),e.updateUniform("u_uvRate",[1,o/t]),e.gl.viewport(0,0,t,o),e.drawn=!1}},500)},run:function(){this.runned||(this.runned=!0,this.render(),this.raf())},stop:function(){this.runned&&(window.cancelAnimationFrame(this.requestID),this.destroyCanvas(),this.container.find("canvas").remove(),this.container.removeClass("wd-with-webgl"),this.runned=!1)},renderCanvas:function(){if(this.empty)return!1;this.gl.drawArrays(this.gl.TRIANGLES,0,6)},destroyCanvas:function(){this.gl&&(this.canvas=null,this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null)},createShader:function(e,t){var o=this.gl.createShader(e);if(this.gl.shaderSource(o,t),this.gl.compileShader(o),this.gl.getShaderParameter(o,this.gl.COMPILE_STATUS))return o;console.log(this.gl.getShaderInfoLog(o)),this.gl.deleteShader(o)},createProgram:function(e,t){var o=this.gl.createProgram();if(this.gl.attachShader(o,e),this.gl.attachShader(o,t),this.gl.linkProgram(o),this.gl.getProgramParameter(o,this.gl.LINK_STATUS))return o;console.log(this.gl.getProgramInfoLog(o)),this.gl.deleteProgram(o)},addUniform:function(e,t,o){var a=this.gl.getUniformLocation(this.program,t);this.uniforms[t]={location:a,type:e},!1!==o&&this.updateUniform(t,o)},updateUniform:function(e,t){if(this.gl){var o=this.uniforms[e];switch(o.type){case"1f":this.gl.uniform1f(o.location,t);break;case"2f":this.gl.uniform2f(o.location,t[0],t[1]);break;case"1i":this.gl.uniform1i(o.location,t);break;case"3fv":this.gl.uniformMatrix3fv(o.location,!1,t)}}},getUniform:function(e,t){if(this.gl){var o=this.uniforms[e];return this.gl.getUniform(this.program,o.location)}},getImageId:function(e){var t=e.split("/");return t[t.length-3]+"-"+t[t.length-2]+"-"+t[t.length-1]},loadImage:function(e,t,o,a){var d,n=this.getImageId(e);if(this.images[n]){if(d=this.images[n],a)return;return 0===t?this.texture1=d:1===t&&(this.texture2=d),this.loadImageTexture(d,t),this.empty=!1,this.drawn=!1,void(o&&o())}d=new Image,this.requestCORSIfNotSameOrigin(d,e),d.src=e;var i=this;d.onload=function(){i.images[n]=d,a||(0===t?i.texture1=d:i.texture2=d,i.loadImageTexture(d,t),i.empty=!1,i.drawn=!1,o&&o())}},requestCORSIfNotSameOrigin:function(e,t){new URL(t,window.location.href).origin!==window.location.origin&&(e.crossOrigin="")},loadImageTexture:function(e,t){var o;if(this.gl)if(this.loadedTextures[t]){o=this.loadedTextures[t];var a=this.gl.TEXTURE0+t;this.gl.activeTexture(a),this.gl.bindTexture(this.gl.TEXTURE_2D,o),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,e),this.addUniform("1i","u_image"+t,t),this.addUniform("2f","u_image"+t+"_size",[e.width,e.height])}else o=this.gl.createTexture(),a=this.gl.TEXTURE0+t,this.gl.activeTexture(a),this.gl.bindTexture(this.gl.TEXTURE_2D,o),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,e),this.addUniform("1i","u_image"+t,t),this.addUniform("2f","u_image"+t+"_size",[e.width,e.height]),this.updateUniform("u_flipY",-1)},replaceImage:function(e){var t=this;this.getImageId(e),this.texture2&&(t.loadImageTexture(this.texture2,0),t.loadImageTexture(this.texture2,1)),this.loadImage(e,1,function(){var e,o=1/78,a=0;t.progress=0,function d(){a+=o,t.progress=function(e){return e*(2-e)}(a),t.progress>=1?window.cancelAnimationFrame(e):e=window.requestAnimationFrame(d)}()})}},function(e){woodmartThemeModule.$document.on("wdPortfolioPjaxComplete",function(){woodmartThemeModule.portfolioPhotoSwipe()}),e.each(["frontend/element_ready/wd_portfolio.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.portfolioPhotoSwipe()})}),woodmartThemeModule.portfolioPhotoSwipe=function(){woodmartThemeModule.$document.on("click",".portfolio-enlarge",function(o){o.preventDefault();var a=e(this),d=a.parents(".wd-carousel-item");0===d.length&&(d=a.parents(".portfolio-entry"));var n=d.index(),i=t();woodmartThemeModule.callPhotoSwipe(n,i)});var t=function(){var t=[];return e(".portfolio-entry").find("figure a img").each(function(){var o=e(this);t.push({src:o.attr("src"),w:o.attr("width")?o.attr("width"):"300",h:o.attr("height")?o.attr("height"):"300"})}),t}},e(document).ready(function(){woodmartThemeModule.portfolioPhotoSwipe()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdPortfolioPjaxComplete",function(){woodmartThemeModule.portfolioMasonryFilters()}),e.each(["frontend/element_ready/wd_portfolio.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.portfolioMasonryFilters()})}),woodmartThemeModule.portfolioMasonryFilters=function(){var t=e(".wd-nav-portfolio");t.on("click","li",function(o){o.preventDefault();var a=e(this),d=a.attr("data-filter");setTimeout(function(){woodmartThemeModule.$document.trigger("wood-images-loaded")},300),t.find(".wd-active").removeClass("wd-active"),a.addClass("wd-active");var n=a.parents(".portfolio-filter").siblings(".wd-masonry.wd-projects");n.length||(n=e(".wd-portfolio-archive .wd-masonry.wd-projects")),n.length&&n.isotope({filter:d})})},e(document).ready(function(){woodmartThemeModule.portfolioMasonryFilters()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdPortfolioPjaxComplete",function(){woodmartThemeModule.portfolioLoadMore()}),e.each(["frontend/element_ready/wd_portfolio.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.portfolioLoadMore()})}),woodmartThemeModule.portfolioLoadMore=function(){if("function"==typeof e.fn.waypoint){e(".wd-portfolio-load-more.load-on-scroll").waypoint(function(){e(".wd-portfolio-load-more.load-on-scroll").trigger("click")},{offset:"100%"});var t=!1;e(".wd-portfolio-load-more").on("click",function(o){o.preventDefault();var a=e(this);if(!t&&!a.hasClass("no-more-posts")){t=!0;var d,n=a.parent().parent().find(".wd-projects"),i=n.data("source"),r="woodmart_get_portfolio_"+i,s=woodmart_settings.ajaxurl,l="POST",c=n.data("atts"),u=n.data("paged");a.addClass("loading"),n.addClass("wd-loading");var m={atts:c,paged:u,action:r};"main_loop"===i&&(s=a.attr("href"),l="GET",m=c?{atts:c}:{}),m.woo_ajax=1,e.ajax({url:s,data:m,dataType:"json",method:l,success:function(t){woodmartThemeModule.removeDuplicatedStylesFromHTML(t.items,function(o){var i=e(o);i&&(n.hasClass("wd-masonry")?(n.append(i).isotope("appended",i),n.imagesLoaded().progress(function(){n.isotope("layout"),clearTimeout(d),d=setTimeout(function(){e(".wd-portfolio-load-more.load-on-scroll").waypoint(function(){e(".wd-portfolio-load-more.load-on-scroll").trigger("click")},{offset:"100%"})},1e3)})):n.append(i),n.data("paged",u+1),a.attr("href",t.nextPage),"yes"===woodmart_settings.load_more_button_page_url_opt&&"no"!==woodmart_settings.load_more_button_page_url&&t.currentPage&&window.history.pushState("","",t.currentPage)),woodmartThemeModule.$document.trigger("wdPortfolioLoadMoreLoaded"),woodmartThemeModule.$document.trigger("wood-images-loaded"),"no-more-posts"===t.status&&(a.addClass("no-more-posts"),a.parent().hide())})},error:function(){console.log("ajax error")},complete:function(){a.removeClass("loading"),n.removeClass("wd-loading"),t=!1}})}})}},e(document).ready(function(){woodmartThemeModule.portfolioLoadMore()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdPortfolioLoadMoreLoaded wdPortfolioPjaxComplete",function(){woodmartThemeModule.portfolioEffects()}),e.each(["frontend/element_ready/wd_portfolio.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.portfolioEffects()})}),woodmartThemeModule.portfolioEffects=function(){void 0!==e.fn.panr&&e(".wd-projects .portfolio-parallax").panr({sensitivity:15,scale:!1,scaleOnHover:!0,scaleTo:1.12,scaleDuration:.45,panY:!0,panX:!0,panDuration:.5,resetPanOnMouseLeave:!0})},e(document).ready(function(){woodmartThemeModule.portfolioEffects()})}(jQuery),function(e){woodmartThemeModule.ajaxPortfolio=function(){if("no"!==woodmart_settings.ajax_portfolio&&void 0!==e.fn.pjax&&!woodmartThemeModule.$body.hasClass("elementor-editor-active")){woodmartThemeModule.$body.on("click",".tax-project-cat .wd-pagination a, .post-type-archive-portfolio .wd-pagination a",function(){t(!0)}),woodmartThemeModule.$document.pjax(".wd-type-links .wd-nav-portfolio a, .tax-project-cat .wd-pagination a, .post-type-archive-portfolio .wd-pagination a",".wd-page-content",{timeout:woodmart_settings.pjax_timeout,scrollTo:!1,renderCallback:function(e,t,o){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){e.html(t),o(),woodmartThemeModule.$document.trigger("wdPortfolioPjaxComplete"),woodmartThemeModule.$document.trigger("wood-images-loaded")},e)}}),woodmartThemeModule.$document.on("pjax:start",function(){var t=e(".wd-content-layout");t.removeClass("wd-loaded"),t.addClass("wd-loading"),woodmartThemeModule.$document.trigger("wdPortfolioPjaxStart"),woodmartThemeModule.$window.trigger("scroll.loaderVerticalPosition")}),woodmartThemeModule.$document.on("pjax:end",function(){e(".wd-content-layout").removeClass("wd-loading")}),woodmartThemeModule.$document.on("pjax:complete",function(){(woodmartThemeModule.$body.hasClass("tax-project-cat")||woodmartThemeModule.$body.hasClass("post-type-archive-portfolio"))&&(woodmartThemeModule.$document.trigger("wood-images-loaded"),t(!1),e(".wd-ajax-content").removeClass("wd-loading"))});var t=function(t){if("no"===woodmart_settings.ajax_scroll&&!1===t)return!1;var o=e(woodmart_settings.ajax_scroll_class).offset().top-woodmart_settings.ajax_scroll_offset;e("html, body").stop().animate({scrollTop:o},400)}}},e(document).ready(function(){woodmartThemeModule.ajaxPortfolio()})}(jQuery),function(e){woodmartThemeModule.simpleDropdown=function(){e(".wd-search-cat").each(function(){var t=e(this),o=t.find(".wd-search-cat-btn"),a=t.find("> input"),d=t.find("> .wd-dropdown"),n=t.parent().parent().find(".s");function i(){if(!(woodmartThemeModule.$window.width()<=768||n.hasClass("wd-padding-inited")||"yes"!==woodmart_settings.search_input_padding)){var e=t.innerWidth()+t.parent().siblings(".searchsubmit").innerWidth()+17,o="padding-right";woodmartThemeModule.$body.hasClass("rtl")&&(o="padding-left"),n.css(o,e),n.addClass("wd-padding-inited")}}n.on("focus",function(){i()}),o.on("click",function(o){o.preventDefault(),void 0!==e.fn.devbridgeAutocomplete&&t.siblings('[type="text"]').devbridgeAutocomplete("hide")}),d.on("click","a",function(n){n.preventDefault();var r=e(this),s=r.data("val"),l=r.text();d.find(".current-item").removeClass("current-item"),r.parent().addClass("current-item"),0!==s?(d.find("ul:not(.children) > li:first-child").show(),a.attr("disabled",null)):0===s&&(d.find("ul:not(.children) > li:first-child").hide(),a.attr("disabled","disabled")),o.find("span").text(l),a.val(s),a.closest("form.woodmart-ajax-search").find('[type="text"]').trigger("cat_selected"),t.removeClass("wd-opened"),i()})})},e(document).ready(function(){woodmartThemeModule.simpleDropdown()}),window.addEventListener("wdUpdatedHeader",function(){woodmartThemeModule.simpleDropdown()})}(jQuery),function(e){woodmartThemeModule.onePageMenu=function(){var t=function(t){var a=e("html, body"),d=e("#"+t+', .wd-menu-anchor[data-id="'+t+'"]'),n=d.data("offset")?parseInt(d.data("offset"),10):woodmart_settings.one_page_menu_offset;if(a.stop(!0),!(d.length<1)){var i=d.offset().top;a.animate({scrollTop:i-n},800),setTimeout(function(){o(t)},800)}},o=function(t){e(".onepage-link").each(function(){var o=e(this);o.find("> a").attr("href").split("#")[1]===t&&(o.siblings().removeClass("current-menu-item"),o.parents(".whb-row").find(".onepage-link").removeClass("current-menu-item"),o.addClass("current-menu-item"))})};if(woodmartThemeModule.$body.on("click",".onepage-link > a",function(o){var a=e(this).attr("href").split("#")[1];e("#"+a).length<1&&e('.wd-menu-anchor[data-id="'+a+'"]').length<1||(o.stopPropagation(),o.preventDefault(),t(a),e(".wd-close-side").trigger("click"),e(".wd-fs-close").trigger("click"))}),woodmartThemeModule.$window.scroll(function(){var t=woodmartThemeModule.$window.scrollTop(),a=e(".onepage-link:first");t<50&&a.length&&o(a.find("> a").attr("href").split("#")[1])}),e(".onepage-link").length>0&&(e(".wpb-content-wrapper > :is(.vc_row, .vc_section)").waypoint(function(){var t=e(e(this)[0].element).attr("id");o(t)},{offset:150}),e(".wd-menu-anchor").waypoint(function(){o(e(e(this)[0].element).data("id"))},{offset:function(){return e(e(this)[0].element).data("offset")}}),e("body").is('[class*="elementor-"]'))){var a=window.location.hash.split("#")[1];window.location.hash.length>1&&setTimeout(function(){t(a)},500)}},e(document).ready(function(){woodmartThemeModule.onePageMenu()})}(jQuery),function(e){woodmartThemeModule.moreCategoriesButton=function(){e(".wd-more-cat").each(function(){var t=e(this);t.find(".wd-more-cat-btn a").on("click",function(e){e.preventDefault(),t.toggleClass("wd-show-cat"),woodmartThemeModule.$document.trigger("wood-images-loaded")})})},e(document).ready(function(){woodmartThemeModule.moreCategoriesButton()})}(jQuery),woodmartThemeModule.$document.on("wdCloseMobileMenu wdPjaxStart",function(){woodmartThemeModule.closeMobileNavigation()}),woodmartThemeModule.mobileNavigationClickAction=function(e){e&&e.addEventListener("click",function(e){var t=e.target.closest(".wd-nav");if(t){var o,a,d=t.classList.contains("wd-layout-dropdown"),n=t.classList.contains("wd-layout-drilldown"),i=t.classList.contains("wd-drilldown-slide"),r=e.target.closest(".wd-nav-mob-tab li"),s=e.target.closest(".menu-item-has-children > a"),l=e.target.closest(".menu-item-has-children > .wd-nav-opener"),c=e.target.closest(".mobile-nav"),u="arrow";if(this.classList.contains("wd-opener-item")&&(u="item"),woodmartThemeModule.$document.trigger("wood-images-loaded"),r){if(e.preventDefault(),r.classList.contains("wd-active"))return;var m=r.dataset.menu,w=null!==c&&c.querySelector(".wd-active");w&&w.classList.remove("wd-active"),r.classList.add("wd-active"),null!==c&&(c.querySelectorAll(".wd-nav-mobile").forEach(function(e){e.classList.remove("wd-active")}),void 0!==m&&c.querySelectorAll(`.mobile-${m}-menu`).forEach(function(e){e.classList.add("wd-active")}))}if(d){if("item"===u&&(s||l)||"arrow"===u&&l){e.preventDefault(),o=("item"===u&&s||l).parentNode;var h=(a=Array.from(o.children)).find(function(e){return e.classList.contains("wd-nav-opener")}),p=a.filter(function(e){return"UL"===e.tagName||e.classList.contains("wd-sub-menu")});o.classList.contains("opener-page")?(o.classList.remove("opener-page"),0!==p.length&&p.forEach(function(e){woodmartThemeModule.slideUp(e,200)}),[".wd-dropdown-menu .container > ul",".wd-dropdown-menu > ul"].forEach(function(e){var t=o.querySelectorAll(e);0!==t.length&&t.forEach(function(e){woodmartThemeModule.slideUp(e,200)})}),void 0!==h&&h.classList.remove("wd-active")):(o.classList.add("opener-page"),0!==p.length&&p.forEach(function(e){woodmartThemeModule.slideDown(e,200)}),[".wd-dropdown-menu .container > ul",".wd-dropdown-menu > ul"].forEach(function(e){var t=o.querySelectorAll(e);0!==t.length&&t.forEach(function(e){woodmartThemeModule.slideDown(e,200)})}),void 0!==h&&h.classList.add("wd-active"))}}else if(n){var f,g,v=e.target.closest(".menu-item-has-children .wd-drilldown-back a"),_=e.target.closest(".menu-item-has-children .wd-drilldown-back .wd-nav-opener");if(("item"===u&&(s||l)||"arrow"===u&&l)&&(f=(o=("item"===u&&s||l).parentNode).closest("ul"),void 0!==(g=(a=Array.from(o.children)).find(function(e){return e.classList.contains("wd-sub-menu")||e.classList.contains("sub-sub-menu")})))){e.preventDefault(),o.setAttribute("aria-expanded",!0),f.classList.add("wd-drilldown-hide"),f.classList.remove("wd-drilldown-show"),g.classList.add("wd-drilldown-show"),g.setAttribute("aria-expanded",!1);var y=g.querySelector(".wd-drilldown-back a"),b=y.textContent;if(b=(b=b.replaceAll("\t","")).replaceAll("\n",""),o.classList.contains("item-level-0")){var T=null;if(null!==c&&(T=c.querySelector(".wd-nav-mob-tab li.wd-active .nav-link-text")),null!==T){var C=T.textContent;C=(C=C.replaceAll("\t","")).replaceAll("\n",""),!b.includes(C)&&C.length>0&&(y.textContent=woodmart_settings.mobile_navigation_drilldown_back_to.replace("%s",C))}else o.classList.contains("cat-item")?y.textContent=woodmart_settings.mobile_navigation_drilldown_back_to_categories:b.includes(woodmart_settings.mobile_navigation_drilldown_back_to_main_menu)||(y.textContent=woodmart_settings.mobile_navigation_drilldown_back_to_main_menu)}else{var M,k=f.closest("li").querySelector(".woodmart-nav-link");M=null!==k.querySelector(".nav-link-text")?k.querySelector(".nav-link-text").textContent:null!==k.querySelector("span")?k.querySelector("span").textContent:k.textContent,!b.includes(M)&&M.length>0&&(y.textContent=woodmart_settings.mobile_navigation_drilldown_back_to.replace("%s",M))}i&&(this.querySelector("ul.wd-active").style.height=`${g.offsetHeight}px`)}(v||_)&&(e.preventDefault(),f=(o=(v||_).closest(".menu-item")).closest("ul"),g=(a=Array.from(o.children)).find(function(e){return e.classList.contains("wd-sub-menu")||e.classList.contains("sub-sub-menu")}),o.setAttribute("aria-expanded",!1),o.classList.contains("item-level-0")||f.classList.add("wd-drilldown-show"),f.classList.remove("wd-drilldown-hide"),g.classList.remove("wd-drilldown-show"),g.setAttribute("aria-expanded",!0),i&&(o.classList.contains("item-level-0")?this.querySelector("ul.wd-active").style.height="":this.querySelector("ul.wd-active").style.height=`${f.offsetHeight}px`))}}})},woodmartThemeModule.mobileNavigationAddOpeners=function(e){e.forEach(function(e){if(!e.querySelector(":scope > .wd-nav-opener")&&!e.closest(".widget_nav_mega_menu")){var t=document.createElement("span");t.classList.add("wd-nav-opener"),e.appendChild(t)}})},woodmartThemeModule.mobileNavigationCloseSideWidgets=function(e){e&&e.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),woodmartThemeModule.closeMobileNavigation()})})},woodmartThemeModule.openMobileNavigation=function(e){var t=document.querySelector(".wd-close-side");e&&(e.classList.add("wd-opened"),jQuery(e).trigger("wdOpenSide")),t&&t.classList.add("wd-close-side-opened"),woodmartThemeModule.$document.trigger("wood-images-loaded")},woodmartThemeModule.closeMobileNavigation=function(){var e=document.querySelector(".wd-header-mobile-nav.wd-opened"),t=document.querySelector(".mobile-nav.wd-opened"),o=document.querySelector(".wd-close-side.wd-close-side-opened"),a=document.querySelector(".mobile-nav .searchform input[type=text]");e&&e.classList.remove("wd-opened"),t&&(t.classList.remove("wd-opened"),jQuery(t).trigger("wdCloseSide")),t&&o&&o.classList.remove("wd-close-side-opened"),a&&a.blur()},woodmartThemeModule.mobileNavigation=function(){var e=document.querySelectorAll(".wd-side-hidden-nav .wd-nav-mobile .menu-item-has-children"),t=document.querySelectorAll(".wd-side-hidden-nav"),o=document.querySelector(".wd-close-side"),a=document.querySelectorAll(".mobile-nav .login-side-opener, .mobile-nav .close-side-widget");woodmartThemeModule.mobileNavigationAddOpeners(e),t.forEach(function(e){woodmartThemeModule.mobileNavigationClickAction(e)}),document.querySelectorAll(".wd-header-mobile-nav > a").forEach(function(e){e.addEventListener("click",openMobileNavEvent)}),o&&(o.addEventListener("click",function(e){e.preventDefault(),woodmartThemeModule.closeMobileNavigation()}),o.addEventListener("touchstart",function(e){e.preventDefault(),woodmartThemeModule.closeMobileNavigation()},{passive:!1})),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&document.querySelector(".wd-side-hidden-nav").classList.contains("wd-opened")&&woodmartThemeModule.closeMobileNavigation()}),woodmartThemeModule.mobileNavigationCloseSideWidgets(a)},window.addEventListener("load",function(){woodmartThemeModule.mobileNavigation()}),window.addEventListener("wdUpdatedHeader",function(){woodmartThemeModule.mobileNavigation()}),window.addEventListener("wdHeaderBuilderCloneCreated",function(){var e=document.querySelector(".whb-clone .wd-header-mobile-nav > a");e&&e.addEventListener("click",openMobileNavEvent)}),function(e){woodmartThemeModule.menuStickyOffsets=function(){var t=e(".wd-sticky-nav"),o=e(".wd-close-side");function a(e,a=!0){e.addClass("wd-opened"),t.addClass("wd-opened"),o.trigger("wdCloseSideAction",["show","click","wd-location-sticky-nav"]),a&&t.on("mouseout",function(){d(),t.off("mouseout")})}function d(){e(".wd-header-sticky-nav").removeClass("wd-opened"),t.removeClass("wd-opened"),o.trigger("wdCloseSideAction",["hide","click","wd-location-sticky-nav"])}e(".wd-sticky-nav .wd-nav-sticky.wd-nav-vertical").each(function(){var t=e(this);t.on("mouseenter mousemove",function(){t.hasClass("wd-offsets-calculated")||(t.find("> .menu-item-has-children").each(function(){var t=e(this);t.find("> .wd-dropdown.wd-design-full-height").length||(o(t),t.find("> .wd-dropdown").length&&t.find(".menu-item.menu-item-has-children").each(function(){o(e(this))}))}),t.addClass("wd-offsets-calculated"))}),void 0!==woodmart_settings.clear_menu_offsets_on_resize&&"yes"!==woodmart_settings.clear_menu_offsets_on_resize||setTimeout(function(){woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){t.removeClass("wd-offsets-calculated"),t.find(" > .menu-item-has-children > .wd-dropdown-menu").attr("style","")},300))},2e3);var o=function(e){var t=e.find(" > .wd-dropdown"),o=t.innerHeight(),a=t.offset().top-woodmartThemeModule.$window.scrollTop(),d=woodmartThemeModule.$window.height(),n=0;t.attr("style",""),o&&a&&a+o>=d&&(n=a+o-d,t.css({top:-n}))}}),woodmartThemeModule.$document.on("click",".wd-header-sticky-nav",function(t){t.preventDefault();var o=e(this);a(o,o.hasClass("wd-close-menu-mouseout"))}),woodmartThemeModule.$document.on("mouseenter mousemove",".wd-header-sticky-nav.wd-event-hover",function(){a(e(this))}),woodmartThemeModule.$document.on("click touchstart",".wd-close-side.wd-location-sticky-nav",function(){d()})},window.addEventListener("wdEventStarted",function(){setTimeout(function(){woodmartThemeModule.menuStickyOffsets()},100)})}(jQuery),function(e){woodmartThemeModule.menuSetUp=function(){var t=e(".wd-nav, .wd-header-cats, .wd-search-cat"),o="wd-opened";if(e(".mobile-nav").find("ul.wd-nav-mobile").find(" > li").has(".wd-dropdown-menu").addClass("menu-item-has-children"),woodmartThemeModule.$document.on("click",".wd-nav .wd-event-click > a, .wd-header-cats.wd-event-click > span, .wd-search-cat-btn",function(t){t.preventDefault();var a=e(this);a.parent().siblings().hasClass(o)&&a.parent().siblings().removeClass(o),a.parent().toggleClass(o)}),woodmartThemeModule.$document.on("click",function(a){var d=a.target;if(!(!(e("."+o).length>0)||e(d).is(".wd-event-hover")||e(d).parents().is(".wd-event-hover")||e(d).parents().is("."+o)||e(d).is("."+o)||e(d).is(".wd-sticky-nav")||d.closest(".wd-cookies-popup")||d.closest(".wd-fb-holder")||0!==e(".mfp-ready").length||0!==e(".pswp--open").length)){if(t.find(".wd-event-click."+o).removeClass(o),t.hasClass("wd-event-click")&&t.removeClass(o),e(d).closest(".wd-with-overlay").length)return;e(".wd-close-side").trigger("wdCloseSideAction",["hide","click"])}}),"yes"===woodmart_settings.menu_item_hover_to_click_on_responsive){function a(){woodmartThemeModule.$window.width()<=1024?t.find(" > .menu-item-has-children.wd-event-hover").each(function(){e(this).data("original-event","hover").removeClass("wd-event-hover").addClass("wd-event-click")}):t.find(" > .wd-event-click").each(function(){var t=e(this);"hover"===t.data("original-event")&&t.removeClass("wd-event-click").addClass("wd-event-hover")})}a(),woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){a()},300))}},["wdEventStarted","wdUpdatedHeader"].forEach(e=>{window.addEventListener(e,function(){woodmartThemeModule.menuSetUp()})})}(jQuery),function(e){woodmartThemeModule.menuOverlay=function(){var t=".wd-header-nav.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-hover, .wd-header-cats.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-hover, .wd-sticky-nav:not(.wd-opened), .wd-header-cats.wd-with-overlay.wd-event-hover, .wd-header-my-account.wd-with-overlay, .wd-header-cart.wd-with-overlay, .wd-header-search.wd-display-dropdown.wd-with-overlay",o="",a=e(".wd-close-side");woodmartThemeModule.$document.on("mouseleave",t,function(){e(this).parents(".wd-header-cats.wd-with-overlay.wd-event-click.wd-opened").length||a.trigger("wdCloseSideAction",["hide","hover","wd-location-header-sticky wd-location-header wd-location-header-cats wd-location-sticky-nav"])}),woodmartThemeModule.$document.on("mouseenter mousemove",t,function(){var t=e(this);if(!(a.hasClass("wd-close-side-opened")||woodmartThemeModule.$window.width()<768)){var o=t.parents(".whb-header").length,d=t.parents(".whb-clone").length,n=t.hasClass("wd-sticky-nav"),i=t.parents(".wd-header-cats").length,r="";o?(r=t.parents(".whb-sticked").length?"wd-location-header-sticky":"wd-location-header",i&&(r+=" wd-location-header-cats")):d?r="wd-location-header-sticky":n&&(r="wd-location-sticky-nav"),a.trigger("wdCloseSideAction",["show","hover",r])}}),woodmartThemeModule.$document.on("click",".wd-header-nav.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-click, .wd-header-cats.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-click, .wd-header-cats.wd-with-overlay.wd-event-click, .wd-search-form.wd-with-overlay .wd-search-cat",function(t){var o=e(this);o.parents(".wd-header-cats.wd-with-overlay.wd-event-click.wd-opened").length||o.parents(".wd-header-cats.wd-with-overlay.wd-event-hover").length||setTimeout(function(){var e=o.hasClass("wd-opened")?"show":"hide";a.trigger("wdCloseSideAction",[e,"click"])})}),woodmartThemeModule.$document.on("click touchstart",".wd-close-side.wd-location-header",function(){e(this).removeClass("wd-location-header wd-close-side-opened")}),a.on("wdCloseSideAction",function(e,t,d,n="wd-location-header"){"hover"===d&&"click"===o||(o="click"===d&&"hide"===t?"":d,"show"===t?a.addClass("wd-close-side-opened").addClass(n):a.removeClass("wd-close-side-opened").removeClass(n))})},["wdEventStarted","wdUpdatedHeader"].forEach(e=>{window.addEventListener(e,function(){woodmartThemeModule.menuOverlay()})})}(jQuery),function(e){woodmartThemeModule.menuOffsets=function(){e(".wd-header-main-nav ul.menu > li, .wd-header-secondary-nav ul.menu > li, .widget_nav_mega_menu ul.menu:not(.wd-nav-vertical) > li, .wd-header-main-nav .wd-dropdown.wd-design-aside ul > li").each(function(){var t=e(this);function o(){t.hasClass("wd-offsets-calculated")||t.parents(".wd-design-aside").length||(t.find(" > .menu-item-has-children").each(function(){!function(t){var o,a,d,n=t.find(" > .wd-dropdown-menu"),i=n.outerWidth(),r=n.offset();if(n.attr("style",""),i&&r)if(n.hasClass("wd-design-full-width")||n.hasClass("wd-design-aside"))a=woodmartThemeModule.$window.width(),woodmartThemeModule.$body.hasClass("rtl")?(d=a-r.left-i)+i>=a&&(o=d+i-a,n.css({right:-o})):r.left+i>=a&&(o=r.left+i-a,n.css({left:-o}));else if(n.hasClass("wd-design-sized")||n.hasClass("wd-design-full-height")){a=woodmart_settings.site_width,(woodmartThemeModule.$window.width()<a||!a||t.parents(".whb-header").hasClass("whb-full-width"))&&(a=woodmartThemeModule.$window.width()),d=a-r.left-i;var s,l=15,c=(woodmartThemeModule.$window.width()-a)/2,u=e(".wd-sticky-nav");woodmartThemeModule.$body.hasClass("wd-sticky-nav-enabled")&&u.length&&(l-=u.width()/2),woodmartThemeModule.$body.hasClass("rtl")?(s=c+d)+i>=a&&(o=s+i-a,n.css({right:-o-l})):(s=r.left-c)+i>=a&&(o=s+i-a,n.css({left:-o-l}))}}(e(this))}),woodmartThemeModule.$document.trigger("resize.vcRowBehaviour"),t.addClass("wd-offsets-calculated"))}t.hasClass("menu-item")&&(t=e(this).parent()),t.on("mouseenter mousemove",function(){o()}),woodmartThemeModule.$window.on("wdHeaderBuilderStickyChanged",o),"yes"===woodmart_settings.clear_menu_offsets_on_resize&&setTimeout(function(){woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){t.removeClass("wd-offsets-calculated"),t.find(" > .menu-item-has-children > .wd-dropdown-menu").attr("style","")},300))},2e3)})},woodmartThemeModule.menuDropdownAside=function(){e(".wd-nav .wd-design-aside, .wd-header-cats.wd-open-dropdown .wd-nav").each(function(){var t=e(this).find(".menu-item");if(t.length){var o=t.first();o.hasClass("menu-item-has-children")||o.parents(".wd-sub-menu-wrapp").addClass("wd-empty-item"),o.addClass("wd-opened").find(".wd-dropdown").addClass("wd-opened"),t.on("mouseover",function(){var t=e(this),o=t.parents(".wd-sub-menu-wrapp");t.hasClass("wd-opened")||(t.hasClass("item-level-1")&&(t.hasClass("menu-item-has-children")?o.removeClass("wd-empty-item"):o.addClass("wd-empty-item")),t.siblings().removeClass("wd-opened").find(".wd-dropdown").removeClass("wd-opened"),t.addClass("wd-opened").find(".wd-dropdown").addClass("wd-opened"))})}})},window.addEventListener("wdEventStarted",function(){setTimeout(function(){woodmartThemeModule.menuDropdownAside(),woodmartThemeModule.menuOffsets()},100)}),window.addEventListener("wdUpdatedHeader",function(){e(".whb-header .wd-offsets-calculated").removeClass("wd-offsets-calculated"),e(".whb-header .menu-item.wd-opened, .whb-header .wd-dropdown.wd-opened").removeClass("wd-opened"),e(".whb-header .wd-dropdown-menu").attr("style",""),woodmartThemeModule.menuDropdownAside(),woodmartThemeModule.menuOffsets()})}(jQuery),function(e){woodmartThemeModule.menuDropdownsAJAX=function(){function t(t){t.addClass("dropdowns-loading");var o=woodmart_settings.menu_storage_key+"_"+t.attr("id"),a=!1,d=t.find(".dropdown-load-ajax"),n=[];if(d.each(function(){var t=e(this).find(".dropdown-html-placeholder");t.length>0&&n.push(t.data("id"))}),woodmart_settings.ajax_dropdowns_save&&woodmartThemeModule.supports_html5_storage){var i=localStorage.getItem(o);try{a=JSON.parse(i)}catch(s){console.log("cant parse Json",s)}}if(a)r(a);else{if(0===n.length)return t.addClass("dropdowns-loaded"),void t.removeClass("dropdowns-loading");e.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_load_html_dropdowns",ids:n},dataType:"json",method:"POST",success:function(e){if("success"===e.status){if(r(e.data),woodmart_settings.ajax_dropdowns_save&&woodmartThemeModule.supports_html5_storage&&!localStorage.getItem(o))try{localStorage.setItem(o,JSON.stringify(e.data))}catch(s){}}else console.log("loading html dropdowns returns wrong data - ",e.message)},error:function(){console.log("loading html dropdowns ajax error")}})}function r(e){Object.keys(e).forEach(function(o){var a=t.find('[data-id="'+o+'"]');woodmartThemeModule.removeDuplicatedStylesFromHTML(e[o],function(e){a.replaceWith(e),t.addClass("dropdowns-loaded"),setTimeout(function(){t.removeClass("dropdowns-loading")},1e3)},a)}),setTimeout(function(){woodmartThemeModule.$document.trigger("wdLoadDropdownsSuccess")},500)}}window.addEventListener("wdEventStarted",function(){e(".menu").has(".dropdown-load-ajax").each(function(){var o=e(this);o.hasClass("dropdowns-loading")||o.hasClass("dropdowns-loaded")||(woodmartThemeModule.windowWidth<=1024?setTimeout(function(){t(o)},500):t(o))})})},e(document).ready(function(){woodmartThemeModule.menuDropdownsAJAX()})}(jQuery),function(e){woodmartThemeModule.fullScreenMenu=function(){e(".wd-header-fs-nav > a").on("click",function(t){t.preventDefault();var o=e(".wd-fs-menu");o.addClass("wd-opened"),o.trigger("wdOpenSide")}),woodmartThemeModule.$document.on("keyup",function(t){27===t.keyCode&&e(".wd-fs-close").trigger("click")}),e(".wd-fs-close").on("click",function(){var t=e(".wd-fs-menu");t.removeClass("wd-opened"),t.trigger("wdCloseSide"),setTimeout(function(){e(".wd-nav-fs .menu-item-has-children").removeClass("sub-menu-open"),e(".wd-nav-fs .menu-item-has-children .wd-nav-opener").removeClass("wd-active")},200)}),e(".wd-nav-fs > .menu-item-has-children > a, .wd-nav-fs .wd-dropdown-fs-menu.wd-design-default .menu-item-has-children > a").append('<span class="wd-nav-opener"></span>'),e(".wd-nav-fs").on("click",".wd-nav-opener",function(t){t.preventDefault();var o=e(this),a=o.parent().parent();a.hasClass("sub-menu-open")?(a.removeClass("sub-menu-open"),o.removeClass("wd-active")):(a.siblings(".sub-menu-open").find(".wd-nav-opener").removeClass("wd-active"),a.siblings(".sub-menu-open").removeClass("sub-menu-open"),a.addClass("sub-menu-open"),o.addClass("wd-active"))})},e(document).ready(function(){woodmartThemeModule.fullScreenMenu()}),window.addEventListener("wdUpdatedHeader",function(){woodmartThemeModule.fullScreenMenu()})}(jQuery),woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.categoriesMenuSideHidden()}),jQuery.each(["frontend/element_ready/wd_product_categories.default","frontend/element_ready/wd_page_title.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){"function"==typeof woodmartThemeModule.closeMobileNavigation&&woodmartThemeModule.closeMobileNavigation(),woodmartThemeModule.categoriesMenuSideHidden()})}),woodmartThemeModule.showHideMobileTollBarButton=function(){var e=document.querySelector(".wd-nav-product-cat-wrap .wd-nav-product-cat, .page-title .wd-nav-product-cat"),t=document.querySelector(".wd-toolbar-shop-cat");t&&(battonSettings="settings"in t.dataset?JSON.parse(t.dataset.settings):{},battonSettings.hasOwnProperty("shop_categories_ancestors")&&"0"!==battonSettings.shop_categories_ancestors&&"no"!==battonSettings.shop_categories_ancestors&&(e?t.classList.contains("wd-hide")&&t.classList.remove("wd-hide"):t.classList.add("wd-hide")))},woodmartThemeModule.$document.on("pjax:beforeSend",function(){var e=document.querySelector(".wd-side-hidden-cat"),t=e?e.childNodes:null,o=document.querySelector(".wd-nav-product-cat-wrap .wd-btn-show-cat, .page-title .wd-btn-show-cat"),a=o?o.parentNode:null;if(t&&a)for(var d=0;d<t.length;d++)a.appendChild(t[d].cloneNode(!0))}),woodmartThemeModule.categoriesMenuSideHidden=function(){var e=document.querySelectorAll(".wd-btn-show-cat, .wd-toolbar-shop-cat");woodmartThemeModule.showHideMobileTollBarButton(),e.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault();var t=document.querySelector(".wd-side-hidden-cat"),o=document.querySelector(".wd-nav-product-cat"),a=!1;if(o&&"sideCategories"in o.dataset){t&&(t.remove(),t=document.querySelector(".wd-side-hidden-cat"));var d=JSON.parse(o.dataset.sideCategories);if(d.hasOwnProperty("shop_categories_ancestors")&&d.shop_categories_ancestors&&"0"!==d.shop_categories_ancestors&&"no"!==d.shop_categories_ancestors&&(a=!0),o&&!t){var n=document.createElement("div");n.classList.add("mobile-nav","wd-side-hidden","wd-side-hidden-cat","wd-"+d.mobile_categories_position),"default"!==d.mobile_categories_color_scheme&&n.classList.add("color-scheme-"+d.mobile_categories_color_scheme),"only_arrow"===d.mobile_categories_submenu_opening_action?n.classList.add("wd-opener-arrow"):"item_and_arrow"===d.mobile_categories_submenu_opening_action&&n.classList.add("wd-opener-item"),"side-hidden"===d.mobile_categories_layout&&(o.classList.contains("wd-style-underline")&&o.classList.remove("wd-style-underline"),o.classList.contains("wd-style-bg")&&o.classList.remove("wd-style-bg"),o.querySelectorAll(".wd-dropdown.wd-dropdown-menu").forEach(function(e){e.classList.remove("wd-dropdown","wd-dropdown-menu")}),o.classList.add("wd-nav-mobile","wd-layout-"+d.mobile_categories_menu_layout),"drilldown"===d.mobile_categories_menu_layout&&o.classList.add("wd-drilldown-"+d.mobile_categories_drilldown_animation)),o.previousElementSibling&&o.previousElementSibling.classList.contains("wd-heading")&&n.appendChild(o.previousElementSibling),n.appendChild(o),document.body.appendChild(n);var i=(t=document.querySelector(".wd-side-hidden-cat")).querySelectorAll(".wd-nav-mobile .menu-item-has-children"),r=t.querySelectorAll(".login-side-opener, .close-side-widget");"function"!=typeof woodmartThemeModule.mobileNavigationAddOpeners||a||woodmartThemeModule.mobileNavigationAddOpeners(i),"function"!=typeof woodmartThemeModule.mobileNavigationClickAction||a||woodmartThemeModule.mobileNavigationClickAction(t),"function"==typeof woodmartThemeModule.mobileNavigationCloseSideWidgets&&woodmartThemeModule.mobileNavigationCloseSideWidgets(r)}t.classList.contains("wd-opened")&&"function"==typeof woodmartThemeModule.closeMobileNavigation?woodmartThemeModule.closeMobileNavigation():"function"==typeof woodmartThemeModule.openMobileNavigation&&setTimeout(function(){woodmartThemeModule.openMobileNavigation(t)},10)}})})},window.addEventListener("load",function(){woodmartThemeModule.categoriesMenuSideHidden()}),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.categoriesMenuBtns(),woodmartThemeModule.categoriesMenu()}),jQuery.each(["frontend/element_ready/wd_product_categories.default","frontend/element_ready/wd_page_title.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.categoriesMenuBtns(),woodmartThemeModule.categoriesMenu()})}),woodmartThemeModule.categoriesMenu=function(){var t=e(".wd-nav-product-cat"),o=!1;woodmartThemeModule.$window.width()>1024&&t.stop().attr("style","");var a=200;t.each(function(){var t=e(this),d=t.parents(".wd-nav-accordion-mb-on"),n=d.find("wd-btn-show-cat"),i=d.hasClass("wd-nav-accordion-mb-on"),r=function(){n.removeClass("wd-active"),t.removeClass("categories-opened").stop().slideUp(a)};d.find(".wd-nav-opener").off("click").on("click",function(t){var d=e(this);t.preventDefault(),o||(o=!0,setTimeout(()=>{o=!1},a),d.closest(".has-sub").find("> ul").hasClass("child-open")?d.removeClass("wd-active").closest(".has-sub").find("> ul").slideUp(a).removeClass("child-open"):d.addClass("wd-active").closest(".has-sub").find("> ul").slideDown(a).addClass("child-open")),woodmartThemeModule.$document.trigger("wood-images-loaded")}),d.find(".wd-btn-show-cat > a").off("click").on("click",function(e){e.preventDefault(),!o&&i&&(o=!0,setTimeout(()=>{o=!1},a),d.find(".wd-dropdown, .wd-dropdown-menu, .wd-design-default").removeClass("wd-dropdown wd-dropdown-menu wd-design-default"),t.hasClass("categories-opened")?r():(n.addClass("wd-active"),t.addClass("categories-opened").stop().slideDown(a),woodmartThemeModule.$document.trigger("wood-images-loaded"),woodmartThemeModule.$document.trigger("wood-images-loaded")))}),d.find(".wd-nav-product-cat a").off("click").on("click",function(o){e(o.target).hasClass("wd-nav-opener")||(r(),t.stop().attr("style",""))})})},woodmartThemeModule.categoriesMenuBtns=function(){e(".wd-nav-product-cat.wd-mobile-accordion").each(function(){var t=e(this).find("li > ul").parent(),o=t.find(".wd-nav-opener");"undefined"!=typeof elementor&&elementor.hasOwnProperty("$preview")&&elementor.$preview.width()>1024||woodmartThemeModule.windowWidth>1024?o.remove():(o.remove(),t.addClass("has-sub").append('<span class="wd-nav-opener"></span>'))})},woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){woodmartThemeModule.categoriesMenuBtns(),woodmartThemeModule.categoriesMenu()},300)),e(document).ready(function(){woodmartThemeModule.categoriesMenuBtns(),woodmartThemeModule.categoriesMenu()})}(jQuery),function(e){woodmartThemeModule.mobileSearchIcon=function(){woodmartThemeModule.$body.on("click",".wd-header-search-mobile:not(.wd-display-full-screen, .wd-display-full-screen-2)",function(t){t.preventDefault();var o=e(".mobile-nav");o.hasClass("wd-opened")||(e(this).addClass("wd-opened"),o.addClass("wd-opened"),e(".wd-close-side").addClass("wd-close-side-opened"),e(".mobile-nav .searchform").find('input[type="text"]').trigger("focus"))})},e(document).ready(function(){woodmartThemeModule.mobileSearchIcon()})}(jQuery),function(e){woodmartThemeModule.headerBuilder=function(){var t,o=e(".whb-header"),a=e(".wd-hb"),d=e(".whb-sticky-row"),n="",i=woodmartThemeModule.$window,r=!1,s=300,l="",c=o.hasClass("whb-hide-on-scroll");if(d.each(function(){var t=e(this);if(t[0].offsetHeight>10)return n=t,!1}),o.hasClass("whb-sticky-real")||o.hasClass("whb-scroll-slide")){var u=e("#wpadminbar"),m=o.find(".whb-main-header")[0].offsetHeight,w=u.length>0?u[0].offsetHeight:0;if(o.hasClass("whb-sticky-real")){if(0===n.length||n[0].offsetHeight<10||"undefined"!=typeof elementorFrontend&&elementorFrontend.isEditMode())return;o.addClass("whb-sticky-prepared"),s=Math.ceil(n.offset().top)-w}o.hasClass("whb-scroll-slide")&&(s=m+w)}if(o.hasClass("whb-sticky-clone")){var h=[];h.cloneClass=o.find(".whb-general-header").attr("class"),c&&(h.wrapperClasses="whb-hide-on-scroll"),e(".whb-clone").length&&e(".whb-clone").remove(),l=(l=(l=(l=(l=woodmart_settings.whb_header_clone).replace(/<%([^%>]+)?%>|{{([^{}]+)}}/g,function(t){var a=t.slice(2,-2);return o.find(a).length?e("<div>").append(o.find(a).first().clone()).html():void 0!==h[a]?h[a]:""})).replace(/<link[^>]*>/g,"")).replace("whb-col-1","")).replace("dropdowns-loading",""),o.after(l),(o=o.parent().find(".whb-clone")).find(".whb-row").removeClass("whb-flex-equal-sides").addClass("whb-flex-flex-middle"),window.dispatchEvent(new CustomEvent("wdHeaderBuilderCloneCreated"))}function p(){o.hasClass("whb-boxed")&&(e(".wd-offsets-calculated .wd-dropdown-menu").attr("style",""),e(".wd-offsets-calculated").removeClass("wd-offsets-calculated"),woodmartThemeModule.$window.trigger("wdHeaderBuilderStickyChanged"))}i.on("scroll",function(){var d=s,n=woodmartThemeModule.$window.scrollTop(),i=woodmartThemeModule.$window.height(),l=woodmartThemeModule.$document.height();a.length>0&&a.hasClass("wd-display")&&(d+=a[0].offsetHeight),!e(".wd-hb-close").length&&o.hasClass("whb-scroll-stick")&&(d=s),n>d?r||(r=!0,o.addClass("whb-sticked"),p()):r&&(r=!1,o.removeClass("whb-sticked"),p());var u=100;o.hasClass("whb-scroll-stick")&&(u=500),c&&(t-n>0&&n>d?(o.addClass("whb-scroll-up"),o.removeClass("whb-scroll-down")):n-t>0&&n+i!==l&&n>d+u?(o.addClass("whb-scroll-down"),o.removeClass("whb-scroll-up")):n<=d?(o.removeClass("whb-scroll-down"),o.removeClass("whb-scroll-up")):n+i>=l-5&&(o.addClass("whb-scroll-up"),o.removeClass("whb-scroll-down"))),t=n}),woodmartThemeModule.$document.trigger("wdHeaderBuilderInited")},["wdEventStarted","wdUpdatedHeader"].forEach(e=>{window.addEventListener(e,function(){woodmartThemeModule.headerBuilder()})})}(jQuery),function(e){woodmartThemeModule.headerBanner=function(){var t=woodmart_settings.header_banner_version;"undefined"!=typeof Cookies&&"closed"!==Cookies.get("woodmart_tb_banner_"+t)&&"no"!==woodmart_settings.header_banner_close_btn&&"no"!==woodmart_settings.header_banner_enabled&&($banner=e(".wd-hb-wrapp"),!woodmartThemeModule.$body.hasClass("page-template-maintenance")&&$banner.length>0&&$banner.addClass("wd-display"),$banner.on("click",".wd-hb-close",function(o){o.preventDefault(),$thisBanner=e(this).closest(".wd-hb-wrapp"),$thisBanner.removeClass("wd-display"),Cookies.set("woodmart_tb_banner_"+t,"closed",{expires:parseInt(woodmart_settings.banner_version_cookie_expires),path:"/",secure:woodmart_settings.cookie_secure_param})}))},e(document).ready(function(){woodmartThemeModule.headerBanner()})}(jQuery),function(e){woodmartThemeModule.widgetsHidable=function(){woodmartThemeModule.$document.on("click",".widget-hidable .widget-title",function(){var t=e(this),o=t.siblings("ul, div, form, label, select");t.parent().toggleClass("widget-hidden"),o.stop().slideToggle(200)})},e(document).ready(function(){woodmartThemeModule.widgetsHidable()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.widgetCollapse()}),woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){woodmartThemeModule.widgetCollapse()},300)),woodmartThemeModule.widgetCollapse=function(){var t=e(".main-footer .footer-widget");"yes"===woodmart_settings.collapse_footer_widgets&&0<t.length&&(woodmartThemeModule.$window.innerWidth()<=575?t.addClass("wd-widget-collapse"):(t.removeClass("wd-widget-collapse"),t.find("> *:not(.widget-title, style, link)").show())),e(".wd-widget-collapse .widget-title").off("click").on("click",function(){var t=e(this).parent(),o=t.find("> *:not(.widget-title, style, link)");t.hasClass("wd-opened")?(t.removeClass("wd-opened"),o.stop().slideUp(200)):(t.addClass("wd-opened"),o.stop().slideDown(200),woodmartThemeModule.$document.trigger("wood-images-loaded"))})},e(document).ready(function(){woodmartThemeModule.widgetCollapse()})}(jQuery),woodmartThemeModule.$document.on("wdInstagramAjaxSuccess wdLoadDropdownsSuccess wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdShopPageInit wdRecentlyViewedProductLoaded wdQuickViewOpen300",function(){woodmartThemeModule.carouselsInit()}),["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default","frontend/element_ready/wd_product_categories.default","frontend/element_ready/wd_products_brands.default","frontend/element_ready/wd_blog.default","frontend/element_ready/wd_portfolio.default","frontend/element_ready/wd_images_gallery.default","frontend/element_ready/wd_product_categories.default","frontend/element_ready/wd_banner_carousel.default","frontend/element_ready/wd_infobox_carousel.default","frontend/element_ready/wd_instagram.default","frontend/element_ready/wd_testimonials.default","frontend/element_ready/wd_nested_carousel.default","frontend/element_ready/wd_single_product_fbt_products.default","frontend/element_ready/wd_slider.default"].forEach(function(e){woodmartThemeModule.wdElementorAddAction(e,function(){woodmartThemeModule.carouselsInit()})}),woodmartThemeModule.carouselsInit=function(){if("undefined"==typeof wdSwiper)return void console.error("Swiper is not defined");document.querySelectorAll(".wd-carousel-container > .wd-carousel-inner > .wd-carousel:not(.scroll-init)").forEach(function(e){woodmartThemeModule.swiperInit(e)});const e=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){let o=t.target;o&&!o.classList.contains("wd-initialized")&&woodmartThemeModule.swiperInit(o),e.unobserve(o)}})},{rootMargin:"200px 0px 200px 0px"});document.querySelectorAll(".wd-carousel-container > .wd-carousel-inner > .wd-carousel.scroll-init:not(.wd-initialized)").forEach(t=>{e.observe(t)}),window.addEventListener("popstate",function(){document.querySelectorAll(".wd-carousel.wd-initialized").forEach(function(e){void 0===e.swiper&&(e.classList.remove("wd-initialized"),woodmartThemeModule.swiperInit(e))})})},woodmartThemeModule.swiperInit=function(e,t=!1){if("undefined"==typeof wdSwiper)return void console.error("Swiper is not defined");if(e.closest(".woocommerce-product-gallery")&&!e.classList.contains("quick-view-gallery")||!t&&void 0!==e.dataset.sync_child_id&&document.querySelector(".wd-carousel[data-sync_parent_id="+e.dataset.sync_child_id+"]"))return;var o=e.closest(".wd-carousel-container"),a=window.getComputedStyle(e);if(woodmartThemeModule.windowWidth<=1024&&o.classList.contains("wd-carousel-dis-mb")||e.classList.contains("wd-initialized"))return;var d=a.getPropertyValue("--wd-col"),n=woodmart_settings.carousel_breakpoints,i={},r=e.querySelectorAll(".wd-carousel-item").length;Object.entries(n).forEach(([t,o])=>{var n=a.getPropertyValue("--wd-col-"+o),s=void 0!==e.dataset.scroll_per_page&&"yes"===e.dataset.scroll_per_page;n||(n=d),n&&(i[t]={slidesPerView:n||1},("yes"===e.dataset.wrap&&2*parseInt(n,10)>r||"yes"===e.dataset.center_mode)&&(s=!1),s&&n&&(i[t].slidesPerGroup=parseInt(n)))});var s={slidesPerView:d,loop:"yes"===e.dataset.wrap&&(1===parseInt(d,10)||parseInt(d,10)+1<r),loopAddBlankSlides:!1,centeredSlides:"yes"===e.dataset.center_mode,autoHeight:"yes"===e.dataset.autoheight,grabCursor:!0,a11y:{enabled:!0,prevSlideMessage:woodmart_settings.swiper_prev_slide_msg,nextSlideMessage:woodmart_settings.swiper_next_slide_msg,firstSlideMessage:woodmart_settings.swiper_first_slide_msg,lastSlideMessage:woodmart_settings.swiper_last_slide_msg,paginationBulletMessage:woodmart_settings.swiper_pagination_bullet_msg,slideLabelMessage:woodmart_settings.swiper_slide_label_msg},breakpoints:i,watchSlidesProgress:!0,slideClass:"wd-carousel-item",slideActiveClass:"wd-active",slideVisibleClass:"wd-slide-visible",slideNextClass:"wd-slide-next",slidePrevClass:"wd-slide-prev",slideFullyVisibleClass:"wd-full-visible",slideBlankClass:"wd-slide-blank",lazyPreloaderClass:"wd-lazy-preloader",containerModifierClass:"wd-",wrapperClass:"wd-carousel-wrap",simulateTouch:!e.closest(".block-editor-block-list__layout"),on:{init:function(){setTimeout(function(){woodmartThemeModule.$document.trigger("wdSwiperCarouselInited")},100)},slideChange:function(){woodmartThemeModule.$document.trigger("wood-images-loaded")}}};if(void 0!==e.dataset.effect){var l=e.dataset.effect;"distortion"===l&&(l="fade"),s.effect=l,"parallax"===l&&(s.parallax={enabled:!0},e.querySelectorAll(".wd-slide-bg").forEach(function(e){e.setAttribute("data-swiper-parallax","50%")}))}void 0!==e.dataset.sliding_speed&&e.dataset.sliding_speed&&(s.speed=e.dataset.sliding_speed);var c=Array.prototype.filter.call(o.children,e=>e.classList.contains("wd-nav-pagin-wrap")).shift();c&&(s.pagination={el:c.querySelector(".wd-nav-pagin"),dynamicBullets:c.classList.contains("wd-dynamic"),type:"bullets",clickable:!0,bulletClass:"wd-nav-pagin-item",bulletActiveClass:"wd-active",modifierClass:"wd-type-",lockClass:"wd-lock",currentClass:"wd-current",totalClass:"wd-total",hiddenClass:"wd-hidden",clickableClass:"wd-clickable",horizontalClass:"wd-horizontal",verticalClass:"wd-vertical",paginationDisabledClass:"wd-disabled",renderBullet:(e,t)=>{const a=woodmart_settings.swiper_pagination_bullet_msg.replace("{{index}}",e+1);if(!c.classList.contains("wd-style-number-2")&&!c.classList.contains("wd-style-text-1"))return`<li class="${t}" tabindex="0" aria-label="${a}"><span></span></li>`;const d=e+1;let n=d<=9?`0${d}`:d;c.classList.contains("wd-style-text-1")&&(n=`Slide ${d}`);const i=o.querySelectorAll(".wd-slide"),r=i[e]?.getAttribute("data-pagination-text");return r&&(n=r),`<li class="${t}" tabindex="0" aria-label="${a}"><span>${n}</span></li>`}});var u=Array.prototype.filter.call(o.querySelector(".wd-carousel-inner").children,e=>e.classList.contains("wd-nav-arrows")).shift();u&&(s.navigation={nextEl:u.querySelector(".wd-btn-arrow.wd-next"),prevEl:u.querySelector(".wd-btn-arrow.wd-prev"),disabledClass:"wd-disabled",lockClass:"wd-lock",hiddenClass:"wd-hide"});var m=Array.prototype.filter.call(o.children,e=>e.classList.contains("wd-nav-scroll")).shift();if(m&&(s.scrollbar={el:m,lockClass:"wd-lock",dragClass:"wd-nav-scroll-drag",scrollbarDisabledClass:"wd-disabled",horizontalClass:"wd-horizontal",verticalClass:"wd-vertical",draggable:!0},s.on.scrollbarDragStart=function(){m.classList.add("wd-grabbing")},s.on.scrollbarDragEnd=function(){m.classList.remove("wd-grabbing")}),void 0!==e.dataset.autoplay&&"yes"===e.dataset.autoplay&&(s.autoplay={delay:e.dataset.speed?parseInt(e.dataset.speed,10):5e3,pauseOnMouseEnter:!0},c&&c.classList.contains("wd-style-text-1")&&(s.on.autoplayStart=()=>{c.classList.remove("wd-progress-stop")},s.on.autoplayStop=()=>{c.classList.add("wd-progress-stop")},s.on.autoplayPause=()=>{c.classList.add("wd-progress-stop")},s.on.autoplayResume=()=>{c.classList.remove("wd-progress-stop")})),void 0!==e.dataset.sync_parent_id){var w=document.querySelector(".wd-carousel[data-sync_child_id="+e.dataset.sync_parent_id+"]");w&&(window.getComputedStyle(w).getPropertyValue("--wd-col")===d?s.controller={control:[woodmartThemeModule.swiperInit(w,!0)]}:s.thumbs={swiper:woodmartThemeModule.swiperInit(w,!0),slideThumbActiveClass:"wd-thumb-active",thumbsContainerClass:"wd-thumbs"})}if(void 0!==e.dataset.sync_group_id&&!t){var h=document.querySelectorAll(`.wd-carousel[data-sync_group_id="${e.dataset.sync_group_id}"]`);if(h.length>0){var p=[];h.forEach(t=>{if(t!==e&&!t.classList.contains("wd-initialized")){var o=woodmartThemeModule.swiperInit(t,!0);o&&p.push(o)}}),p.length&&(s.controller={control:p})}}e.querySelectorAll("link").forEach(function(e){var t=e.cloneNode(!1);o.append(t),t.addEventListener("load",function(){setTimeout(function(){e.remove()},500)},!1)});const f=new wdSwiper(e,s);return s.controller&&f.controller.control.forEach(e=>{e.controller.control=f}),o&&o.classList.contains("wd-slider")&&f.on("realIndexChange",function(t){setTimeout(function(){e.dispatchEvent(new CustomEvent("wdSlideChange",{detail:{activeIndex:t.realIndex}}))},100)}),f},window.addEventListener("load",function(){woodmartThemeModule.carouselsInit()}),function(e){woodmartThemeModule.stickySocialButtons=function(){e(".wd-sticky-social").addClass("wd-loaded")},e(document).ready(function(){woodmartThemeModule.stickySocialButtons()})}(jQuery),woodmartThemeModule.wdElementorAddAction("frontend/element_ready/container",function(){woodmartThemeModule.stickyContainer()}),woodmartThemeModule.stickyContainer=function(){let e=woodmartThemeModule.windowWidth;function t(){return document.querySelector("html").hasAttributes("dir")&&"rtl"===document.querySelector("html").getAttribute("dir")}function o(e,t){let o=Object.keys(t);0!==o.length&&o.forEach(function(o){e.style[o]=t[o]})}function a(e,o){let a=window.getComputedStyle(e),d={position:"fixed",width:a.width,marginTop:a.marginTop,marginBottom:a.marginBottom,top:`${o}px`,bottom:"",zIndex:99};return t()?d.insetInlineEnd=`${e.getBoundingClientRect().left}px`:d.insetInlineStart=`${e.getBoundingClientRect().left}px`,d}function d(e){let o={position:"absolute",top:"",bottom:"0px"};return t()?o.insetInlineEnd=`${e.offsetLeft}px`:o.insetInlineStart=`${e.offsetLeft}px`,o}function n(e,t){e.parentNode.removeChild(t),e.style=""}document.querySelectorAll(".wd-sticky-container-yes, .wd-sticky-container-tablet-yes, .wd-sticky-container-mobile-yes").forEach(function(e){let t=e.dataset.id,o=document.querySelector(`.elementor-element-${t}.wd-sticky-spacer`);o&&o.remove(),document.querySelector(`.elementor-element-${t}`).style=""}),window.addEventListener("scroll",function(){let t=document.querySelectorAll(".wd-sticky-container-yes:not(.wd-sticky-spacer), .wd-sticky-container-tablet-yes:not(.wd-sticky-spacer), .wd-sticky-container-mobile-yes:not(.wd-sticky-spacer)"),i={is_desktop:e>1024,is_tablet:e>768&&e<1024,is_mobile:e<=768};t.forEach(function(e){!function(e,t){let i=e.dataset.id;if(void 0===i)return;let r=document.querySelector(`.elementor-element-${i}.wd-sticky-spacer`);if(t.is_mobile&&!e.classList.contains("wd-sticky-container-mobile-yes")||t.is_tablet&&!e.classList.contains("wd-sticky-container-tablet-yes")||t.is_desktop&&!e.classList.contains("wd-sticky-container-yes"))return void(null!==r&&n(e,r));let s=Array.from(e.classList).find(function(e){return-1!==e.indexOf("wd-sticky-offset")}),l=void 0!==s?parseInt(s.substring(s.lastIndexOf("-")+1)):150,c=woodmartThemeModule.$window.scrollTop(),u=e.offsetHeight,m=e.getBoundingClientRect().top+window.scrollY-l,w=e.parentNode.parentNode.classList.contains("entry-content"),h=e.parentNode.getBoundingClientRect().top+window.scrollY-l+e.parentNode.offsetHeight;if(!w&&null===r&&c>m){let t="fixed";c>h&&(t="absolute"),r=function(e,t,n="fixed"){let i=a(e,t);"absolute"===n&&(i=d(e));let r=e.cloneNode(!0);r.classList.add("wd-sticky-spacer"),o(r,{visibility:"hidden"});var s=r.querySelector("#wd-wtl-policy-check");return s&&(s.id=s.id+"-clone"),e.parentNode.insertBefore(r,e),o(e,i),r}(e,l,t)}if(null===r)return;let p=r.parentNode.getBoundingClientRect().top+window.scrollY-l+r.parentNode.offsetHeight;c<r.getBoundingClientRect().top+window.scrollY-l?n(e,r):"fixed"!==e.style.position&&c<p-u?(void 0===function(e){let t=[];if(!e.parentNode)return t;let o=e.parentNode.firstChild;for(;o;)1===o.nodeType&&o!==e&&t.push(o),o=o.nextSibling;return t}(e).find(function(e){return"absolute"===e.style.position})&&o(e.parentNode,{position:""}),o(e,a(r,l))):"absolute"!==e.style.position&&m+u>p&&(o(e.parentNode,{position:"relative"}),o(e,d(r)))}(e,i)})}),window.addEventListener("resize",function(){"undefined"!=typeof elementor&&(e=isNaN(parseInt(elementor.$preview.css("--e-editor-preview-width")))?1025:parseInt(elementor.$preview.css("--e-editor-preview-width")))})},window.addEventListener("load",function(){woodmartThemeModule.stickyContainer()}),function(e){woodmartThemeModule.$document.on("wdElementorColumnReady pjax:complete wdShopPageInit",function(){woodmartThemeModule.stickyColumn()}),woodmartThemeModule.$window.on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&elementorFrontend.hooks.addAction("frontend/element_ready/container",function(e){var t=e.data("model-cid");void 0!==elementorFrontend.config.elements.data[t]&&(elementorFrontend.config.elements.data[t].attributes.container_sticky?e.addClass("wd-sticky-container-lg"):e.removeClass("wd-sticky-container-lg"),elementorFrontend.config.elements.data[t].attributes.container_sticky_tablet?e.addClass("wd-sticky-container-md-sm"):e.removeClass("wd-sticky-container-md-sm"),elementorFrontend.config.elements.data[t].attributes.container_sticky_mobile?e.addClass("wd-sticky-container-sm"):e.removeClass("wd-sticky-container-sm"))})}),woodmartThemeModule.stickyColumn=function(){e(".woodmart-sticky-column").each(function(){for(var t=e(this),o=150,a=t.attr("class").split(" "),d=0;d<a.length;d++)if(a[d].indexOf("wd_sticky_offset_")>=0){var n=a[d].split("_");o=parseInt(n[3])}t.find(" > .vc_column-inner > .wpb_wrapper").trigger("sticky_kit:detach"),t.find(" > .vc_column-inner > .wpb_wrapper").stick_in_parent({offset_top:o})}),e(".wd-elementor-sticky-column").each(function(){for(var t=e(this),o=150,a=t.attr("class").split(" "),d=0;d<a.length;d++)if(a[d].indexOf("wd_sticky_offset_")>=0){var n=a[d].split("_");o=parseInt(n[3])}var i=t.find(" > .elementor-widget-wrap");i.length<=0&&(i=t.find("> .elementor-widget-wrap")),i.stick_in_parent({offset_top:o})}),e(':is(.wp-block-wd-column, .wp-block-wd-off-sidebar, .wp-block-wd-off-content)[class*="wd-sticky-on-"]').each(function(){for(var t=e(this),o=150,a=t.attr("class").split(" "),d=0;d<a.length;d++)if(a[d].indexOf("wd_sticky_offset_")>=0){var n=a[d].split("_");o=parseInt(n[3])}function i(){var e=woodmartThemeModule.$window.width();t.trigger("sticky_kit:detach"),!t.hasClass("wd-sticky-on-lg")&&e>1024||!t.hasClass("wd-sticky-on-md-sm")&&e<=1024&&e>768||!t.hasClass("wd-sticky-on-sm")&&e<=768||t.stick_in_parent({offset_top:o})}i(),woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){i()},300))}),e('[class*="wd-sticky-container-"]').each(function(){var t=e(this);function o(){var e=woodmartThemeModule.$window.width();if(t.trigger("sticky_kit:detach"),!(!t.hasClass("wd-sticky-container-lg")&&e>1024||!t.hasClass("wd-sticky-container-md-sm")&&e<=1024&&e>768||!t.hasClass("wd-sticky-container-sm")&&e<=768)){var o=window.getComputedStyle(t[0]),a=parseInt(o.getPropertyValue("--wd-sticky-offset"),10);t.stick_in_parent({offset_top:a})}}o(),woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){o()},300))})},e(document).ready(function(){woodmartThemeModule.stickyColumn()})}(jQuery),woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.searchHistory()}),jQuery.each(["frontend/element_ready/wd_search.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.searchHistory()})}),woodmartThemeModule.searchHistory=function(){var e="woodmart_search_history",t=woodmart_settings.search_history_items_limit;woodmart_settings.is_multisite&&(e+="_"+woodmart_settings.current_blog_id);var o,a=function(e){var t=e.target.querySelector('[type="text"]');m(t.value)},d=function(e){var t=this.textContent;m(t)},n=function(e){var t=this.parentNode,o=t.parentNode.querySelector(".wd-search-history");o&&i(t,o)},i=function(e,t){var o=u().reverse();if(t.innerHTML="",o.length>0){var a=r(),d=document.createElement("ul");t.appendChild(a),t.appendChild(d),o.forEach(function(o){o=o.replaceAll("%20"," ");var a=e.hasAttribute("data-post_type")?e.getAttribute("data-post_type"):null,d=new URL(woodmart_settings.home_url);d.searchParams.set("s",o),a||(a=e.querySelector('[name="post_type"]')?e.querySelector('[name="post_type"]').value:null),null!==a&&d.searchParams.set("post_type",a);var n=s(o,d.href);t.querySelector("ul").appendChild(n)})}},r=function(){var e=document.createElement("span"),t=document.createElement("span"),o=document.createElement("div");return e.textContent=woodmart_settings.search_history_title,e.classList.add("wd-search-title","title"),o.appendChild(e),t.classList.add("wd-sh-clear"),t.classList.add("wd-role-btn"),t.setAttribute("tabindex","0"),t.textContent=woodmart_settings.search_history_clear_all,t.addEventListener("click",l),o.appendChild(t),o.classList.add("wd-sh-head"),o},s=function(e,t){var o=document.createElement("span"),a=document.createElement("a"),n=document.createElement("li");return o.classList.add("wd-sh-clear"),o.classList.add("wd-role-btn"),o.setAttribute("tabindex","0"),o.addEventListener("click",c),a.textContent=e,a.setAttribute("href",t),a.classList.add("wd-sh-link"),a.addEventListener("click",d),n.appendChild(a),n.appendChild(o),n},l=function(t){t.preventDefault(),localStorage.removeItem(e),this.closest(".wd-search-history").innerHTML=""},c=function(t){t.preventDefault();var o=this.previousSibling.textContent.replaceAll("%20"," "),a=u().filter(function(e){return e!==o});localStorage.setItem(e,JSON.stringify(a));var d=this.closest("ul");this.closest("li").remove(),0===d.childElementCount&&(d.closest(".wd-search-history").innerHTML="")},u=function(){var o=localStorage.getItem(e)?JSON.parse(localStorage.getItem(e)):[];return o=o.filter(function(e){return""!==e&&null!=e}),t>0&&o.length>t&&(o=o.slice(-t)),o.map(function(e){return e.replaceAll("%20"," ")})},m=function(t){var o=u();o=o.filter(function(e){return e.toLowerCase().trim()!==t.toLowerCase().trim()}),t=t.replace("%20"," "),o.push(t.trim()),localStorage.setItem(e,JSON.stringify(o))};0!==(o=document.querySelectorAll("form.searchform")).length&&"undefined"!=typeof localStorage&&o.forEach(function(e){var t=e.querySelector('[type="text"]'),o=e.parentNode.querySelector(".wd-search-history");o&&(e.addEventListener("submit",a),t.addEventListener("wdOpenBeforeSearchContent",n),function(e){return e.closest(".wd-search-full-screen")||e.closest(".wd-search-full-screen-2")}(e)&&i(e,o),o.addEventListener("mousedown",function(e){e.preventDefault()}))})},window.addEventListener("load",function(){woodmartThemeModule.searchHistory()}),function(e){woodmartThemeModule.searchFullScreen=function(){woodmartThemeModule.$body.on("click",".wd-header-search.wd-display-full-screen > a, .wd-header-search.wd-display-full-screen-2 > a, .wd-search-form.wd-display-full-screen, .wd-search-form.wd-display-full-screen-2",function(t){t.preventDefault();var i=e(this),r=e(".wd-search-full-screen-2");i.parent().find(".wd-search-dropdown").length>0||woodmartThemeModule.$body.hasClass("global-search-dropdown")||(n()?o():(i.hasClass("wd-display-full-screen-2")||i.parent().hasClass("wd-display-full-screen-2")||(r=e(".wd-search-full-screen"),a()),setTimeout(function(){d(r)},10)))}),woodmartThemeModule.$body.on("click",".wd-close-search a, .wd-page-wrapper, .wd-hb",function(t){var a=e(t.target).closest(".wd-close-search a").length,d=e(t.target).closest(".wd-search-full-screen").length;!a&&d||(a&&t.preventDefault(),n()&&o())});var t=function(e){27===e.keyCode&&(o(),woodmartThemeModule.$body.unbind("keyup",t))},o=function(){var t=e("[class*=wd-search-full-screen]");e("html").removeClass("wd-search-opened"),t.removeClass("wd-opened"),t.removeClass("wd-searched"),t.trigger("wdCloseSearch")},a=function(){var t,o=e("#wpadminbar"),a=o.length>0?o.outerHeight():0,d=e(".whb-sticked"),n=e(".whb-main-header");d.length>0?t=e(".whb-clone").length>0?d.outerHeight()+a:n.outerHeight()+a:(t=n.outerHeight()+a,$headerBanner=e(".wd-hb-wrapp"),$headerBanner.length>0&&$headerBanner.hasClass("wd-display")&&(t+=$headerBanner.outerHeight())),e(".wd-search-full-screen").css("top",t)},d=function(o){woodmartThemeModule.$body.on("keyup",t),e("html").addClass("wd-search-opened"),o.addClass("wd-opened"),o.trigger("wdOpenSearch"),setTimeout(function(){var e=o.find('input[type="text"]'),t=e.val().length;e[0].setSelectionRange(t,t),e.trigger("focus")},500)},n=function(){return e("html").hasClass("wd-search-opened")}},e(document).ready(function(){woodmartThemeModule.searchFullScreen()})}(jQuery),function(e){woodmartThemeModule.scrollTop=function(){var t=e(".scrollToTop");woodmartThemeModule.$window.on("scroll",function(){e(this).scrollTop()>100?t.addClass("button-show"):t.removeClass("button-show")}),t.on("click",function(){return e("html, body").animate({scrollTop:0},800),!1})},e(document).ready(function(){woodmartThemeModule.scrollTop()})}(jQuery);const htmlElement=document.getElementsByTagName("html")[0],windowWidth=window.innerWidth,htmlOffsetWidth=htmlElement.offsetWidth,userAgent=navigator.userAgent;let shouldCalculateScrollbar=windowWidth>1024&&windowWidth>htmlOffsetWidth;if(userAgent.includes("Chrome")){const e=userAgent.match(/Chrome\/(\d+)/);e&&parseInt(e[1],10)>=145&&(shouldCalculateScrollbar=!1)}if(shouldCalculateScrollbar){const e=windowWidth-htmlOffsetWidth,t=document.createElement("style");t.textContent=`:root {--wd-scroll-w: ${e}px;}`,document.head.appendChild(t)}!function(e){"use strict";woodmartThemeModule.preloader=function(){var t=parseInt(woodmart_settings.preloader_delay,10);e(".wd-preloader").delay(t).addClass("preloader-hide"),e(".wd-preloader-style").remove(),setTimeout(function(){e(".wd-preloader").remove()},200)},woodmartThemeModule.$window.on("load",function(){woodmartThemeModule.preloader()})}(jQuery),function(e){woodmartThemeModule.photoswipeImages=function(){e(".photoswipe-images, .wp-block-wd-gallery:has(.photoswipe-images)").each(function(){var o=e(this);o.on("click","a",function(a){a.preventDefault();var d=e(a.currentTarget).parents(".wd-gallery-item, .wp-block-wd-gallery-item").index(),n=t(o,[]);woodmartThemeModule.callPhotoSwipe(d,n)})});var t=function(t,a){var d,n,i,r;return t.find("a").each(function(){var t=e(this);d=t.attr("href"),n=t.data("width"),i=t.data("height"),r=t.attr("title"),o(a,d)||a.push({src:d,w:n,h:i,title:r})}),a},o=function(e,t){var o;for(o=0;o<e.length;o++)if(e[o].src===t)return!0;return!1}},e(document).ready(function(){woodmartThemeModule.photoswipeImages()})}(jQuery),function(e){woodmartThemeModule.parallax=function(){woodmartThemeModule.windowWidth<=1024||e(".wd-parallax").each(function(){var t=e(this);if(t.hasClass("wpb_column")){var o=t.find("> .vc_column-inner");t.removeClass("wd-parallax"),o.addClass("wd-parallax"),o.parallax("50%",.3)}else t.parallax("50%",.3)})},e(document).ready(function(){woodmartThemeModule.parallax()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdPortfolioLoadMoreLoaded",function(){woodmartThemeModule.mfpPopup()}),woodmartThemeModule.mfpPopup=function(){void 0!==e.fn.magnificPopup&&e(".gallery").off("click").on("click","a:not([data-elementor-open-lightbox]), a[data-elementor-open-lightbox=no]",function(t){t.preventDefault(),setTimeout(()=>{e.magnificPopup?.instance?.isOpen&&(e.magnificPopup.instance.st.removalDelay=0,e.magnificPopup.close());const t=e(this),o=t.closest(".gallery").find("a:not([data-elementor-open-lightbox]), a[data-elementor-open-lightbox=no]"),a=o.index(t),d=[];o.each(function(){d.push({src:e(this).attr("href")})}),e.magnificPopup.open({items:d,type:"image",removalDelay:600,closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,fixedContentPos:!0,callbacks:{beforeOpen:function(){this.wrap.addClass("wd-popup-gallery-wrap")},change:function(){setTimeout(()=>{this.wrap.find(".wd-popup-wrap").addClass("wd-in wd-animated")},16)}},image:{verticalFit:!0,markup:'<div class="mfp-figure wd-popup wd-popup-gallery">'+woodmart_settings.close_markup+'<figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>'},gallery:{enabled:!0,navigateByImgClick:!0}},a)})})},e(document).ready(function(){woodmartThemeModule.mfpPopup()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdPortfolioPjaxComplete",function(){woodmartThemeModule.masonryLayout()}),e.each(["frontend/element_ready/wd_blog.default","frontend/element_ready/wd_blog_archive.default","frontend/element_ready/wd_portfolio.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.masonryLayout()})}),woodmartThemeModule.masonryLayout=function(){if(void 0!==e.fn.isotope&&void 0!==e.fn.imagesLoaded){var t=e(".wd-masonry:not(.wd-cats)");t.imagesLoaded(function(){t.isotope({gutter:0,isOriginLeft:!woodmartThemeModule.$body.hasClass("rtl"),itemSelector:".blog-design-masonry, .blog-design-mask, .masonry-item"})})}},e(document).ready(function(){woodmartThemeModule.masonryLayout()})}(jQuery),function(){const e=[];new PerformanceObserver(t=>{for(const o of t.getEntries())"largest-contentful-paint"===o.entryType&&e.push(o)}).observe({type:"largest-contentful-paint",buffered:!0}),window.addEventListener("load",()=>{const t=document.querySelector(".wd-lcp-loader");function o(e="",t=!1,o=!0){return new Promise(a=>{const d=document.querySelector(".wd-lcp-admin-bar"),n=d.querySelector(".wd-lcp-desc"),i=d.querySelector(".wd-confirm"),r=d.querySelector(".wd-cancel"),s=d.querySelector(".wd-done");function l(){i.removeEventListener("click",c),r.removeEventListener("click",u)}function c(e){e.preventDefault(),l(),a(!0)}function u(e){e.preventDefault(),l(),a(!1)}e&&(n.textContent=e),d.classList.add("wd-opened"),!t&&(o||t||woodmart_settings.lcp_has_image)||(i.classList.add("wd-hide"),r.classList.add("wd-hide"),s.classList.remove("wd-hide")),o||t||woodmart_settings.lcp_has_image||s.addEventListener("click",u),i.addEventListener("click",c),r.addEventListener("click",u)})}t&&0!==e.length&&(t.classList.add("wd-loading"),setTimeout(()=>{if(t.classList.remove("wd-loading"),0===e.length)return;let a=null,d="",n=!1,i="",r="";const s=document.body.className.split(/\s+/),l=e[e.length-1].element,c=document.querySelector(".wd-lcp-admin-bar"),u=c.querySelector(".wd-loader-overlay");if(s.forEach(function(e){const t=e.match(/(?:page-id|postid)-(\d+)/);t&&(a=parseInt(t[1],10))}),a){if(["IMG","PICTURE"].includes(l.tagName))d=l.currentSrc||l.src,i="image",n="high"===l.getAttribute("fetchpriority");else{const e=getComputedStyle(l).backgroundImage;if(e&&e.includes("url")){const t=e.match(/url\(["']?(.*?)["']?\)/);t&&(d=t[1],i="background")}}if(d){l.classList.add("wd-lcp-highlight"),l.scrollIntoView({behavior:"smooth",block:"center"});const e=document.createElement("div"),t=document.createElement("img");t.src=d,e.appendChild(t),e.className="wd-lcp-thumb",c.querySelector(".wd-lcp-content").prepend(e),n?(r=woodmart_settings.lcp_image_with_fetchpriority,d=""):r=woodmart_settings.lcp_image_confirmed}else r=woodmart_settings.lcp_without_image_confirmed;o(r,!1,d).then(e=>{if(!e){l.classList.remove("wd-lcp-highlight");const e=window.location.origin+window.location.pathname;return window.history.replaceState({},document.title,e),c.classList.remove("wd-opened"),void c.classList.remove("hover")}u.classList.add("wd-loading");const t=new URLSearchParams(window.location.search).get("security");jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_lcp_image",image_url:d,image_type:i,post_id:a,security:t,device:768<=woodmartThemeModule.windowWidth?"desktop":"mobile"},dataType:"json",method:"GET",success:function(e){e.hasOwnProperty("data")&&(c.classList.add("wd-saved"),o(e.data.message,!0))},error:function(){console.error("Something wrong with AJAX response.")},complete:function(){const e=window.location.origin+window.location.pathname;window.history.replaceState({},document.title,e);const t=Array.from(c.children).filter(e=>e.classList&&e.classList.contains("ab-item"))[0];if(t){t.remove();const e=document.createElement("div");e.className="ab-item ab-empty-item",e.setAttribute("role","menuitem"),e.setAttribute("aria-expanded","false"),e.textContent="LCP Image",c.prepend(e)}u.classList.remove("wd-loading"),l.classList.remove("wd-lcp-highlight"),c.querySelector(".wd-done").addEventListener("click",e=>{e.preventDefault(),location.reload(),c.classList.remove("wd-saved"),c.classList.remove("wd-opened"),c.classList.remove("hover")})}})})}},2500))})}(),function(e){woodmartThemeModule.$document.on("wdHiddenSidebarsInited",function(){woodmartThemeModule.lazyLoading()}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default","frontend/element_ready/wd_product_categories.default","frontend/element_ready/wd_products_brands.default","frontend/element_ready/wd_blog.default","frontend/element_ready/wd_images_gallery.default","frontend/element_ready/wd_product_categories.default","frontend/element_ready/wd_slider.default","frontend/element_ready/wd_banner_carousel.default","frontend/element_ready/wd_banner.default","frontend/element_ready/wd_infobox_carousel.default","frontend/element_ready/wd_infobox.default","frontend/element_ready/wd_instagram.default","frontend/element_ready/wd_testimonials.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.lazyLoading()})}),woodmartThemeModule.lazyLoading=function(){if(window.addEventListener&&window.requestAnimationFrame&&document.getElementsByClassName){var t,o,a=document.querySelectorAll("img[data-src], source[data-srcset]"),d=document.querySelectorAll(".wd-lazy-bg"),n=document.querySelectorAll("video[data-poster]");woodmartThemeModule.$document.on("wood-images-loaded added_to_cart updated_cart_totals updated_checkout wc_fragments_refreshed",function(){a=document.querySelectorAll("img[data-src], source[data-srcset]"),d=document.querySelectorAll(".wd-lazy-bg"),n=document.querySelectorAll("video[data-poster]"),r()}),woodmartThemeModule.$body.on("click",".wd-header-mobile-nav > a, .wd-nav-opener, .wd-btn-show-cat",function(){woodmartThemeModule.$document.trigger("wood-images-loaded")}),e(".wd-scroll-content, .wd-side-hidden, .wp-block-wd-off-sidebar.wd-side-hidden > .wd-content").on("scroll",function(){woodmartThemeModule.$document.trigger("wood-images-loaded")}),e(".wc-tabs > li").on("click",function(){woodmartThemeModule.$document.trigger("wood-images-loaded")}),window.addEventListener("scroll",i,!1),window.addEventListener("resize",i,!1),MutationObserver&&new MutationObserver(function(){a.length!==t&&r()}).observe(document.body,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),r()}function i(){o=o||setTimeout(function(){o=null,r()},100)}function r(){(a.length||d.length||n.length)&&requestAnimationFrame(function(){var e,o,i=parseInt(woodmart_settings.lazy_loading_offset),r=window.pageYOffset,l=r+window.innerHeight+i,c=0,u=0;if(a.length){for(;c<a.length;)r<(o=r+(e=a[c].getBoundingClientRect()).top)+e.height&&l>o&&!a[c].loaded?s(a[c]):c++;t=a.length}if(d.length){for(;u<d.length;)r<(o=r+(e=d[u].getBoundingClientRect()).top)+e.height&&l>o&&d[u].classList.contains("wd-lazy-bg")?d[u].classList.remove("wd-lazy-bg"):u++;d.length}if(n.length)for(var m=0;m<n.length;)r<(o=r+(e=n[m].getBoundingClientRect()).top)+e.height&&l>o&&!n[m].loaded?(n[m].poster=n[m].dataset.poster,n[m].loaded=!0):m++})}function s(e){function t(){requestAnimationFrame(function(){(e.classList.contains("wd-lazy-fade")||e.classList.contains("wd-lazy-blur"))&&e.classList.add("wd-loaded");var t=e.closest("picture");t&&(t.classList.contains("wd-lazy-fade")||t.classList.contains("wd-lazy-blur"))&&t.classList.add("wd-loaded");var o=jQuery(e).parents(".grid-masonry, .wd-masonry");o.length>0&&o.data("isotope")&&o.isotope("layout");var a=jQuery(e).parents(".wd-cats-element .wd-masonry");a.length>0&&a.packery()})}e.onload=t,null!==e.querySelector("img")&&(e.querySelector("img").onload=t,e.querySelector("img").src=e.dataset.src,e.querySelector("source").srcset=e.dataset.src,void 0!==e.dataset.srcset&&(e.querySelector("img").srcset=e.dataset.srcset)),void 0!==e.dataset.src&&(e.src=e.dataset.src),void 0!==e.dataset.srcset&&(e.srcset=e.dataset.srcset),e.loaded=!0}},e(document).ready(function(){woodmartThemeModule.lazyLoading()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdPjaxStart wdBackHistory wdShopPageInit",function(){woodmartThemeModule.hideShopSidebar()}),woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.hiddenSidebar()}),woodmartThemeModule.hiddenSidebar=function(){var t=woodmartThemeModule.$body.hasClass("rtl")?"right":"left",o=e(".wd-content-layout"),a=woodmartThemeModule.windowWidth;"undefined"!=typeof elementor&&elementor.hasOwnProperty("$preview")&&elementor.$preview.width()&&(a=elementor.$preview.width()),(o.hasClass("wd-sidebar-hidden-lg")&&a>1024||o.hasClass("wd-sidebar-hidden-md-sm")&&a<=1024&&a>768||o.hasClass("wd-sidebar-hidden-sm")&&a<=768)&&(e(".wd-sidebar").addClass("wd-side-hidden wd-"+t+" wd-scroll"),e(".wd-sidebar .widget-area").addClass("wd-scroll-content")),woodmartThemeModule.$body.off("click",".wd-show-sidebar-btn, .wd-sidebar-opener, .wd-toolbar-sidebar").on("click",".wd-show-sidebar-btn, .wd-sidebar-opener, .wd-toolbar-sidebar",function(t){t.preventDefault();var o=e(".wd-show-sidebar-btn, .wd-sidebar-opener"),a=e(".wd-sidebar");a.length&&(a.hasClass("wd-opened")?(o.removeClass("wd-opened"),woodmartThemeModule.hideShopSidebar()):(e(this).addClass("wd-opened"),d()))}),woodmartThemeModule.$body.on("click touchstart",".wd-close-side",function(){woodmartThemeModule.hideShopSidebar()}),woodmartThemeModule.$body.on("click",".close-side-widget",function(e){e.preventDefault(),woodmartThemeModule.hideShopSidebar()}),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&woodmartThemeModule.hideShopSidebar()});var d=function(){var t=e(".wd-sidebar");t.addClass("wd-opened"),t.trigger("wdOpenSide"),e(".wd-close-side").addClass("wd-close-side-opened")};woodmartThemeModule.$document.trigger("wdHiddenSidebarsInited")},woodmartThemeModule.hideShopSidebar=function(){var t=e(".wd-sidebar");t.hasClass("wd-opened")&&(t.trigger("wdCloseSide"),t.removeClass("wd-opened"),e(".wd-close-side").removeClass("wd-close-side-opened"),e(".wd-show-sidebar-btn, .wd-sidebar-opener, .wd-toolbar-sidebar").removeClass("wd-opened"))},e(document).ready(function(){woodmartThemeModule.hiddenSidebar()})}(jQuery),function(e){woodmartThemeModule.floatingBlocks=function(){if(woodmartThemeModule.$body.hasClass("page-template-maintenance"))return;let t=[],o={};const a={get(e){let t=Cookies.get(e);if(t&&"string"==typeof t)try{t=JSON.parse(t)}catch(o){t=[]}return t||[]},set(e,t){Cookies.set(e,JSON.stringify(t),{expires:parseInt(woodmart_settings.cookie_expires),path:"/",secure:woodmart_settings.cookie_secure_param})}},d={after_page_views:"onPageViews",after_sessions:"onSessions",time_to_show:"onTime",scroll_value:"onScroll",scroll_to_selector:"onScrollToSelector",inactivity_time:"onInactivity",click_times:"onClicks",selector:"onSelectorClick",parameters:"onUrlParam",hashtags:"onUrlHashtag",exit_intent:"onExitIntent"},n={onTime:function(e,t,o){setTimeout(()=>{c(e,"time_to_show")||o(e)},parseInt(t,10))},onScrollToSelector:function(e,t,o){let a=!1;woodmartThemeModule.$window.on("scroll",function(){if(a)return;const d=woodmartThemeModule.$window.scrollTop(),n=woodmartThemeModule.$window.height();if(t){const i=woodmartThemeModule.$document.find(t);if(!i.length)return;const r=i.offset().top,s=r+i.outerHeight();if(d+n>=r&&d<=s){if(a=!0,c(e,"scroll_to_selector"))return;o(e)}}})},onScroll:function(e,t,o){let a=!1;woodmartThemeModule.$window.on("scroll",function(){if(a)return;const d=woodmartThemeModule.$window.scrollTop(),n=d/(woodmartThemeModule.$document.height()-woodmartThemeModule.$window.height())*100;if(t){let i=!1;if(i="string"==typeof t&&t.endsWith("%")?n>=parseFloat(t):d>=parseInt(t),i){if(a=!0,c(e,"scroll_value"))return;o(e)}}})},onClicks:function(e,t,o){let a=0;woodmartThemeModule.$document.on("mousedown",function(){if(a++,a>=parseInt(t,10)){a=0;const t=e.find(".wd-fb-wrap");if(t.length&&!t.hasClass("wd-hide"))return;if(c(e,"click_times"))return;o(e)}})},onSelectorClick:function(e,t,o){e.hasClass("wd-hide")||woodmartThemeModule.$document.on("click",t,function(t){t.preventDefault(),c(e,"selector")||o(e)})},onUrlParam:function(e,t,o){const a=new URLSearchParams(window.location.search);if(t.split(",").filter(Boolean).some(e=>{const[t,o]=e.trim().split("=");return t&&o?a.get(t)===o:a.has(e.trim())})){if(c(e,"parameters"))return;o(e)}},onUrlHashtag:function(e,t,o){if(!t)return;const a=t.split(",").map(e=>e.trim()).filter(Boolean);function d(){const t=window.location.hash.trim();if(a.some(e=>e===t)){if(c(e,"hashtags"))return;o(e)}}d(),window.addEventListener("hashchange",d)},onPageViews:function(e,t,o){const a="woodmart_page_views_"+e.attr("id");let d=parseInt(localStorage.getItem(a),10)||0;if(d++,localStorage.setItem(a,d),d>=parseInt(t,10)){if(localStorage.removeItem(a),c(e,"after_page_views"))return;o(e)}},onSessions:function(e,t,o){const a=e.attr("id"),d="woodmart_session_"+a,n="woodmart_sessions_"+a;let i=parseInt(localStorage.getItem(n),10)||0;if(sessionStorage.getItem(d)||(sessionStorage.setItem(d,"1"),i++,localStorage.setItem(n,i)),i>=parseInt(t,10)){if(localStorage.removeItem(n),c(e,"after_sessions"))return;o(e)}},onInactivity:function(e,t,o){let a;const d=parseInt(t,10);function n(){clearTimeout(a),a=setTimeout(()=>{c(e,"inactivity_time")||o(e)},d)}woodmartThemeModule.$document.on("mousemove keydown scroll",n),n()},onExitIntent:function(e,t){let o=!1;woodmartThemeModule.$document.on("mouseleave",function(a){o||c(e,"exit_intent")||a.clientY<=0&&(o=!0,t(e))})}};function i(e){const a=e.attr("id");o[a]||(o[a]=!0,t.push(e),1===t.length&&r(e))}function r(d){if(e.magnificPopup?.instance?.isOpen||"yes"===woodmart_settings.age_verify&&"confirmed"!==Cookies.get("woodmart_age_verify")){const t=e.magnificPopup.instance;if(!t.isOpen||!t.wrap?.find(".wd-popup-builder, .wd-promo-popup").length)return void e(document).one("mfpClose",()=>setTimeout(()=>r(d),600))}const n=d.data("options")||{},i=d.attr("id"),s="1"===n?.close_btn,l=d.data("options")?.version||1,c="woodmart_"+i+"_"+l;if("1"===n?.persistent_close){if(a.get(c).includes("persistent_closed"))return void t.shift();woodmartThemeModule.$document.on("mfpClose",function(){const e=a.get(c);e.includes("persistent_closed")||(e.push("persistent_closed"),a.set(c,e))})}const u="1"===n?.enable_page_scrolling,m="1"===n?.close_by_overlay,w="1"===n?.close_by_esc;let h=" wd-mfp-popup-wrap-"+i.replace("popup-",""),p=" wd-mfp-popup-bg-"+i.replace("popup-",""),f="wd-popup-close wd-action-btn wd-cross-icon";n?.close_btn_display&&(f+=" wd-style-"+n.close_btn_display);let g="";n?.animation&&(g="wd-animation-"+n.animation),e.magnificPopup.open({items:{src:d},type:"inline",removalDelay:600,fixedContentPos:!u,tClose:woodmart_settings.close,closeMarkup:s?'<div class="'+f+'"><a title="'+woodmart_settings.close+'" href="#" rel="nofollow"><span class="wd-action-icon"></span><span class="wd-action-text">'+woodmart_settings.close+"</span></a></div>":"",enableEscapeKey:w,closeOnBgClick:m,callbacks:{beforeOpen:function(){d.find("link").appendTo("head")},open:function(){this.wrap.find(".wd-popup-wrap").addClass(g),this.wrap.find(".wd-promo-popup").length?this.wrap.addClass(h+" wd-promo-popup-wrap"):this.wrap.addClass(h+" wd-popup-builder-wrap"),e(".mfp-bg").addClass(p),n?.close_by_selector&&d.find(n.close_by_selector).on("click",function(t){t.preventDefault(),e.magnificPopup.close()}),woodmartThemeModule.$document.trigger("wood-images-loaded"),woodmartThemeModule.$document.trigger("wdOpenPopup"),woodmartThemeModule.$document.trigger("wdPopupOpened."+i)},close:function(){o[i]=!1,function(){if(t.shift(),t.length>0){const e=t[0];setTimeout(()=>r(e),0)}}()}}})}function s(e){const t=e.find(".wd-fb-wrap");t.hasClass("wd-out")||(t.removeClass("wd-hide"),t.hasClass("wd-animation")&&(t.removeClass("wd-out"),setTimeout(()=>{t.addClass("wd-in")},100)))}function l(e){const t=e.closest(".wd-fb-wrap");t.length&&(t.trigger("fbClose"),t.hasClass("wd-animation")?(t.removeClass("wd-in"),t.addClass("wd-out"),setTimeout(()=>{t.addClass("wd-hide"),t.removeClass("wd-out")},600)):setTimeout(()=>{t.addClass("wd-hide")}))}function c(e,t){const o=e.attr("id"),d=e.data("options")||{},n=d?.version||1,i=e.data("triggers")||{};if("0"===i[t]?.show_once)return!1;const r="woodmart_"+o+"_"+n,s=a.get(r);return!!s.includes(t)||(e.hasClass("wd-popup")?(woodmartThemeModule.$document.one("wdPopupOpened."+o,function(){const e=a.get(r);e.includes(t)||(e.push(t),a.set(r,e))}),!1):(s.push(t),a.set(r,s),!1))}function u(e,t,o){for(const[a,i]of Object.entries(d))if(t[a]?.value){if("selector"===a&&e.hasClass("wd-popup"))continue;"exit_intent"===a?n[i](e,o):n[i](e,t[a].value,o)}}woodmartThemeModule.$document.on("click",".wd-fb-close",function(t){t.preventDefault(),l(e(this))}),e(".wd-fb-holder").each(function(){const t=e(this),o=t.data("triggers"),d=t.data("options")||{},n=t.find(".wd-fb-wrap"),i="woodmart_"+t.attr("id")+"_"+(t.data("options")?.version||1);if("1"===d?.persistent_close){if(a.get(i).includes("persistent_closed"))return void n.addClass("wd-hide");woodmartThemeModule.$document.on("fbClose",function(){const e=a.get(i);e.includes("persistent_closed")||(e.push("persistent_closed"),a.set(i,e))})}if(d?.close_by_selector&&woodmartThemeModule.$document.on("click",d.close_by_selector,function(e){n.hasClass("wd-hide")||(e.preventDefault(),l(n))}),!o||"object"!=typeof o)return"1"===d?.persistent_close&&n.removeClass("wd-hide"),void(n.hasClass("wd-animation")&&("1"===d?.persistent_close?setTimeout(()=>{n.addClass("wd-in")},16):n.addClass("wd-in")));u(t,o,s)}),e(".wd-popup-builder, .wd-promo-popup").each(function(){const t=e(this),o=t.data("triggers")||{};if(!function(e){const t=e.data("options")||{},o=woodmartThemeModule.$window.width();return o<=768?"1"===t.hide_popup_mobile:o>768&&o<=1024?"1"===t.hide_popup_tablet:"1"===t.hide_popup}(t)&&(t.find(".mc4wp-form .mc4wp-response").length&&t.find(".mc4wp-form .mc4wp-response").children().length&&i(t),o&&"object"==typeof o)){if(o.selector?.value&&n.onSelectorClick(t,o.selector.value,i),t.hasClass("wd-promo-popup")){let e=Cookies.get("woodmart_shown_pages");if(e||(e=0),e<o.popup_pages)return e++,void Cookies.set("woodmart_shown_pages",e,{expires:parseInt(woodmart_settings.cookie_expires),path:"/",secure:woodmart_settings.cookie_secure_param})}u(t,o,i)}})},woodmartThemeModule.$document.ready(function(){woodmartThemeModule.floatingBlocks()})}(jQuery),function(e){"use strict";woodmartThemeModule.wdElementorAddAction("frontend/element_ready/global",function(e){e.removeClass("wd-animation-ready wd-animated wd-in"),woodmartThemeModule.$document.trigger("wdElementorGlobalReady")}),e.each(["frontend/element_ready/column","frontend/element_ready/container"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(e){e.removeClass("wd-animation-ready wd-animated wd-in"),setTimeout(function(){woodmartThemeModule.$document.trigger("wdElementorColumnReady")},100)})}),woodmartThemeModule.$window.on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&"enabled"===woodmart_settings.elementor_no_gap&&(e.each(["frontend/element_ready/section","frontend/element_ready/container"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(e){e.removeClass("wd-animation-ready wd-animated wd-in"),woodmartThemeModule.$document.trigger("wdElementorSectionReady")}),elementorFrontend.hooks.addAction(t,function(e){var t,o,a=e.data("model-cid");void 0!==elementorFrontend.config.elements.data[a]&&(t=elementorFrontend.config.elements.data[a],o="",void 0!==t.attributes.elType&&("container"===t.attributes.elType?o="boxed"!==t.attributes.content_width||t.attributes.boxed_width.size:"section"===t.attributes.elType&&(o=t.attributes.content_width.size)),o||e.addClass("wd-negative-gap"))})}),elementor.channels.editor.on("change:section change:container",function(t){!function(t){var o=t.elementSettingsModel.changed;if(void 0!==o.content_width||void 0!==o.boxed_width){var a=[];"container"===t.elementSettingsModel.attributes.elType?void 0!==o.boxed_width&&(a=o.boxed_width.size):void 0!==o.content_width&&(a=o.content_width.size);var d=t._parent.model.id,n=e(".elementor-element-"+d);a?n.removeClass("wd-negative-gap"):n.addClass("wd-negative-gap")}}(t)}))})}(jQuery),woodmartThemeModule.$document.on("wdElementorSectionReady wdElementorColumnReady wdElementorGlobalReady wdShopPageInit",function(){woodmartThemeModule.cssAnimations()}),woodmartThemeModule.cssAnimations=function(){var e={root:null,rootMargin:"0px",threshold:0},t=document.querySelectorAll(".wd-animation"),o=function(e,t){e.forEach(function(e){e.isIntersecting&&(a(e.target),t.unobserve(e.target))})},a=function(e){if(!e.classList.contains("wd-animation-ready")){var t=32;e.classList.forEach(e=>{e.includes("wd_delay_")&&(t=e.split("_")[2])}),e.classList.add("wd-animation-ready"),setTimeout(function(){e.classList.add("wd-animated"),e.classList.add("wd-in")},t)}};t.forEach(function(t){t.closest(".wd-slider")||new IntersectionObserver(o,e).observe(t)})},document.addEventListener("DOMContentLoaded",function(){woodmartThemeModule.cssAnimations()}),function(e){woodmartThemeModule.cookiesPopup=function(){var t=woodmart_settings.cookies_version;if("undefined"!=typeof Cookies&&"accepted"!==Cookies.get("woodmart_cookies_"+t)){var o=e(".wd-cookies-popup");setTimeout(function(){o.addClass("popup-display"),o.on("click",".cookies-accept-btn",function(e){e.preventDefault(),a()})},2500);var a=function(){o.removeClass("popup-display").addClass("popup-hide"),Cookies.set("woodmart_cookies_"+t,"accepted",{expires:60,path:"/",secure:woodmart_settings.cookie_secure_param})}}},e(document).ready(function(){woodmartThemeModule.cookiesPopup()})}(jQuery),function(e){woodmartThemeModule.clickOnScrollButton=function(t,o,a){if("function"==typeof e.fn.waypoint){var d=e(t);if(0!==d.length){d.trigger("wd-waypoint-destroy"),a||(a=0);var n=new Waypoint({element:d[0],handler:function(){d.trigger("click")},offset:function(){return woodmartThemeModule.$window.outerHeight()+parseInt(a)}});d.data("waypoint-inited",!0).off("wd-waypoint-destroy").on("wd-waypoint-destroy",function(){d.data("waypoint-inited")&&(n.destroy(),d.data("waypoint-inited",!1))})}}}}(jQuery),woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.clearSearch()}),jQuery.each(["frontend/element_ready/wd_search.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.clearSearch()})}),woodmartThemeModule.clearSearch=function(){function e(e,t){e.value.length?t.classList.remove("wd-hide"):t.classList.add("wd-hide")}document.querySelectorAll("form .wd-clear-search").forEach(function(t){var o=t.closest("form").querySelector("input");o&&(e(o,t),o.addEventListener("keyup",function(){e(o,t)})),t.addEventListener("click",function(o){o.preventDefault();var a=t.parentNode.querySelector("input");a.value="",e(a,t);var d=a.closest(".wd-search-form.wd-display-form.wd-with-overlay"),n=d?d.querySelector(".wd-dropdown-results"):null;if(n){var i=n.querySelector(".wd-search-history"),r=n.querySelector(".wd-search-requests"),s=n.querySelector(".wd-search-area");i&&0!==i.childElementCount||r&&0!==r.childElementCount||s&&(0!==s.childElementCount||0!==s.textContent.length)||document.querySelectorAll(".wd-close-side").forEach(function(e){var t=new CustomEvent("wdCloseSideAction",{detail:["hide","click"]});e.dispatchEvent(t)})}})})},window.addEventListener("wdEventStarted",function(){woodmartThemeModule.clearSearch()}),function(e){woodmartThemeModule.callPhotoSwipe=function(t,o){woodmartThemeModule.$body.hasClass("rtl")&&(t=o.length-t-1,o=o.reverse());var a={index:t,shareButtons:[{id:"facebook",label:woodmart_settings.share_fb,url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:woodmart_settings.tweet,url:"https://x.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:woodmart_settings.pin_it,url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:woodmart_settings.download_image,url:"{{raw_image_url}}",download:!0}],closeOnScroll:woodmart_settings.photoswipe_close_on_scroll,isClickableElement:function(t){return"A"===t.tagName||e(t).hasClass("wd-play-video")||e(t).hasClass("wd-product-video")},getDoubleTapZoom:function(e,t){return e||void 0!==t.html||t.initialZoomLevel<.7?1:1.33}};woodmartThemeModule.$body.find(".pswp").remove(),woodmartThemeModule.$body.append(woodmart_settings.photoswipe_template);var d=document.querySelectorAll(".pswp")[0],n=new PhotoSwipe(d,PhotoSwipeUI_Default,o,a);woodmartThemeModule.$document.trigger("wdPhotoSwipeBeforeInited",n),n.init()}}(jQuery),function(e){woodmartThemeModule.$document.on("wdBackHistory wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdActionAfterAddToCart wdShopPageInit wdArrowsLoadProducts wdLoadMoreLoadProducts wdUpdateWishlist wdQuickViewOpen wdQuickShopSuccess wdProductBaseHoverIconsResize wdRecentlyViewedProductLoaded updated_checkout updated_cart_totals",function(){woodmartThemeModule.btnsToolTips()}),woodmartThemeModule.$document.on("wdUpdateTooltip",function(e,t){woodmartThemeModule.updateTooltip(t)}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default","frontend/element_ready/wd_single_product_nav.default","frontend/element_ready/wd_single_product_size_guide_button.default","frontend/element_ready/wd_single_product_compare_button.default","frontend/element_ready/wd_single_product_wishlist_button.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.btnsToolTips()})}),woodmartThemeModule.btnsToolTips=function(){function t(t,o){!t.hasClass("wd-hint")&&!t.closest(".wd-review-likes").length&&woodmartThemeModule.windowWidth<=1024||t.hasClass("wd-tooltip-inited")||t.hasClass("wd-with-html")||(t.tooltip({animation:!1,container:"body",trigger:"hover",boundary:"window",placement:o,title:function(){var t=e(this);return t.find(".added_to_cart").length>0||t.find(".add_to_cart_button").length>0?t.find(".add_to_cart_button").text():t.find(".wd-swatch-text").length>0?t.find(".wd-swatch-text").text():t.closest(".wd-review-likes").length?woodmart_settings.review_likes_tooltip:t.text()}}),t.tooltip("show"),t.addClass("wd-tooltip-inited"))}function o(e){if(!e.is('[class*="wd-tooltip-"]'))return"top";let t="top";const o=e.attr("class").split(" ");for(let a=0;a<o.length;a++)0===o[a].indexOf("wd-tooltip-")&&(t=o[a].replace("wd-tooltip-",""));return"start"===t?t=woodmartThemeModule.$body.hasClass("rtl")?"right":"left":"end"===t&&(t=woodmartThemeModule.$body.hasClass("rtl")?"left":"right"),t}e(woodmart_settings.tooltip_top_selector).on("mouseenter",function(){var a=e(this);t(a,o(a))}),document.querySelectorAll(woodmart_settings.tooltip_top_selector).forEach(a=>{a.addEventListener("touchstart",function(a){var d=e(this);t(d,o(d))},{passive:!0})}),e(woodmart_settings.tooltip_left_selector).on("mouseenter",function(){t(e(this),woodmartThemeModule.$body.hasClass("rtl")?"right":"left")}),document.querySelectorAll(woodmart_settings.tooltip_left_selector).forEach(o=>{o.addEventListener("touchstart",function(o){t(e(this),woodmartThemeModule.$body.hasClass("rtl")?"right":"left")},{passive:!0})}),e(".wd-tooltip.wd-with-html").each(function(){var t,o=e(this);o.on("mouseenter touchstart",{passive:!0},function(){var a;e(this).hasClass("wd-tooltip-inited")||((a=o).tooltip({animation:!1,container:"body",trigger:"manual",boundary:"window",placement:"top",sanitize:!1,html:!0,title:function(){return e(this).html()}}),a.addClass("wd-tooltip-inited")),o.tooltip("show"),e("#"+o.attr("aria-describedby")).on("mouseenter touchstart",{passive:!0},function(){clearTimeout(t)}).on("mouseleave touchend",{passive:!0},function(){clearTimeout(t),t=setTimeout(function(){o.tooltip("hide")},100)})}),o.on("mouseleave touchend",{passive:!0},function(){clearTimeout(t),t=setTimeout(function(){o.tooltip("hide"),e("#"+o.attr("aria-describedby")).off("mouseenter mouseleave touchstart touchend")},100)})})},woodmartThemeModule.updateTooltip=function(t){var o=e(t);o.hasClass("wd-tooltip-inited")||(o=o.parent(".wd-tooltip-inited")),woodmartThemeModule.windowWidth<=1024||!o.hasClass("wd-tooltip-inited")||void 0===e.fn.tooltip||!o.is(":hover")||o.tooltip("show")},e(document).ready(function(){woodmartThemeModule.btnsToolTips()})}(jQuery),woodmartThemeModule.beforeSearchcontent=function(){var e,t,o=function(e,t){t.classList.remove("wd-opened"),n(e,"close"),setTimeout(function(){e.parentNode.classList.remove("wd-searched")},400)},a=function(e){var t=this.closest("form"),a=t.parentNode.querySelector(".wd-dropdown-results");o(t,a)},d=function(e){var t=this,a=t.closest("form"),d=a.parentNode.querySelector(".wd-dropdown-results"),i=e.keyCode||e.charCode;"Tab"===e.key||e.shiftKey&&"Tab"===e.key||(0!==t.value.length||8!==i&&46!==i?(t.dispatchEvent(new Event("wdOpenBeforeSearchContent")),setTimeout(function(){var e=!0,t=d.querySelector(".wd-search-history"),o=d.querySelector(".wd-search-requests"),i=d.querySelector(".wd-search-area");t&&0!==t.childElementCount||o&&0!==o.childElementCount||i&&(0!==i.childElementCount||0!==i.textContent.length)||(e=!1),e&&(d.classList.add("wd-opened"),n(a,"open"))},100)):o(a,d))},n=function(e,t){e.closest(".wd-search-form.wd-display-form.wd-with-overlay")&&jQuery(".wd-close-side").trigger("wdCloseSideAction",["open"===t?"show":"hide","click"])};e=document.querySelectorAll("form.searchform"),t=!1,document.addEventListener("keydown",function(e){("Tab"===e.key||e.shiftKey&&"Tab"===e.key)&&(t=!0)}),document.addEventListener("mousedown",function(){t=!1}),e.forEach(function(e){var n=e.parentNode.querySelector(".wd-dropdown-results");if(n){var i=e.querySelector('[type="text"]'),r=e.querySelector(".wd-search-cat-btn");i.addEventListener("focus",d),i.addEventListener("keydown",d),r&&r.addEventListener("click",a),[e,n].forEach(function(a){a.addEventListener("focusout",function(){setTimeout(function(){!t||e.contains(document.activeElement)||n.contains(document.activeElement)||o(e,n)},10)})})}}),document.addEventListener("click",function(e){var t=e.target.closest("form.searchform");document.querySelectorAll(".wd-dropdown-results.wd-opened").forEach(function(e){var a=e.closest(".wd-search-form, .wd-search-dropdown");if(a){var d=a.querySelector("form.searchform");t&&d===t||o(d,e)}})},{passive:!0})},window.addEventListener("load",function(){woodmartThemeModule.beforeSearchcontent()}),function(e){woodmartThemeModule.$document.on("wdShopPageInit wdBackHistory",function(){woodmartThemeModule.backHistory()}),woodmartThemeModule.backHistory=function(){e(".wd-back-btn > a").off("click").on("click",function(t){t.preventDefault(),history.go(-1),setTimeout(function(){e(".filters-area").removeClass("filters-opened").stop().hide(),woodmartThemeModule.$window.width()<=1024&&e(".wd-nav-product-cat").removeClass("categories-opened").stop().hide(),woodmartThemeModule.$document.trigger("wdBackHistory")},20)})},e(document).ready(function(){woodmartThemeModule.backHistory()})}(jQuery),function(e){woodmartThemeModule.animationsOffset=function(){void 0!==e.fn.waypoint&&e(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").waypoint(function(){e(e(this)[0].element).addClass("wpb_start_animation animated")},{offset:"100%"})},e(document).ready(function(){woodmartThemeModule.animationsOffset()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.animations()}),woodmartThemeModule.animations=function(){void 0!==e.fn.waypoint&&e('[class*="wd-animation"]').each(function(){var t=e(this),o=t.attr("class").split(" ");"inited"===t.data("wd-waypoint")||t.parents(".wd-slider .wd-carousel").length>0||o.indexOf("wp-block-")>=0||(t.data("wd-waypoint","inited"),t.waypoint(function(){for(var t=e(e(this)[0].element),o=t.attr("class").split(" "),a=0,d=0;d<o.length;d++)o[d].indexOf("wd_delay_")>=0&&(a=o[d].split("_")[2]);t.addClass("wd-animation-ready"),setTimeout(function(){t.addClass("wd-animated")},a)},{offset:"90%"}))})},e(document).ready(function(){woodmartThemeModule.animations()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.ajaxSearch()}),e.each(["frontend/element_ready/wd_search.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.ajaxSearch()})}),woodmartThemeModule.ajaxSearch=function(){void 0!==e.fn.devbridgeAutocomplete&&(e("form.woodmart-ajax-search").each(function(){var t=e(this),o=parseInt(t.data("count")),a=parseInt(t.data("thumbnail")),d=parseInt(t.data("symbols_count")),n=t.find('[name="product_cat"]'),i=t.parent(),r=t.data("post_type"),s=woodmart_settings.ajaxurl+"?action=woodmart_ajax_search",l=parseInt(t.data("price")),c=t.data("sku"),u=t.parents(".wd-search-full-screen").length,m=t.parents(".wd-search-full-screen-2").length,w=t.parents(".wd-search-dropdown").length,h=i.find(`.wd-search-results${u||m?"":" > "}.wd-scroll-content`),p=i.find(".wd-search-results"),f=t.data("include_cat_search");function g(o){0!==t.parents(".wd-search-form.wd-display-form.wd-with-overlay").length&&e(".wd-close-side").trigger("wdCloseSideAction",["open"===o?"show":"hide","click"])}o>0&&(s+="&number="+o),s+="&post_type="+r,n.length&&""!==n.val()&&(s+="&product_cat="+n.val()),f&&"yes"===f&&(s+="&include_cat_search="+f),t.find('[type="text"]').on("focus keyup cat_selected",function(i){let v=e(this),_={action:"woodmart_ajax_search",number:o>0?o:void 0,post_type:r};if(v.hasClass("wd-search-inited")||(v.devbridgeAutocomplete({serviceUrl:s,appendTo:h,minChars:d,deferRequestBy:woodmart_settings.ajax_search_delay,onHide:function(e,o){m&&p.removeClass("wd-no-results");var a=m?t.parent().parent():t.parent(),d="function"==typeof woodmartThemeModule.beforeSearchcontent&&a.find(".wd-search-history, .wd-search-requests, .wd-search-area").length;o||d||g("close"),d||a.find(".wd-search-results").removeClass("wd-opened"),o||m||u?a.removeClass("wd-searched"):d||setTimeout(function(){a.removeClass("wd-searched")},400)},onSearchStart:function(){t.addClass("wd-search-loading")},beforeRender:function(o){w||g("open"),e(o).find(".wd-not-found-msg").parent().addClass("wd-not-found");var a=e(o).find(".wd-suggestion:not(.wd-not-found)").length>0;if(e(o).find('[class*="wd-type-"]')||(a=o[0].childElementCount>2),a){var d=t.serializeArray(),n=t.attr("action")+"?"+e.param(d);e(o).append('<a class="wd-all-results" href="'+n+'">'+woodmart_settings.all_results+"</a>")}e(o).removeAttr("style")},onSelect:function(e){e.permalink.length>0&&(window.location.href=e.permalink),t.parent().find(".wd-search-results").removeClass("wd-opened")},onSearchComplete:function(){t.removeClass("wd-search-loading"),woodmartThemeModule.$document.trigger("wood-images-loaded")},formatResult:function(e,o){"&"===o&&(o="&");var d="("+o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+")",n="";if(e.divider&&(n+=' <div class="suggestion-divider-title title">'+e.divider+"</div>"),a&&e.thumbnail&&(n+=' <div class="wd-suggestion-thumb">'+e.thumbnail+"</div>"),e.value&&(n+=' <div class="wd-suggestion-content wd-set-mb reset-last-child">',n+='<div class="wd-entities-title">'+e.value.replace(new RegExp(d,"gi"),"<strong>$1</strong>").replace(/<(\/?strong)>/g,"<$1>")+"</div>"),c&&e.sku&&(n+=' <p class="wd-suggestion-sku">'+e.sku+"</p>"),l&&e.price&&(n+=' <p class="price">'+e.price+"</p>"),e.value&&(n+=" </div>"),e.permalink){var i="";e.value&&(i=`aria-label="${e.value.replace(/(<([^>]+)>)/gi,"")}"`),n+=` <a class="wd-fill" href="${e.permalink}" ${i}></a>`}return e.products_not_found&&(n='<span class="wd-not-found-msg">'+e.value+"</span>"),m&&(e.no_results?p.addClass("wd-no-results"):p.removeClass("wd-no-results")),u||m||p.addClass("wd-opened"),m?t.parent().parent().addClass("wd-searched"):t.parent().addClass("wd-searched"),n}}),v.addClass("wd-search-inited")),n.length&&"cat_selected"===i.type){""!==n.val()&&(_.product_cat=n.val());let e=t.find('[type="text"]').devbridgeAutocomplete(),o=woodmart_settings.ajaxurl+"?"+new URLSearchParams(_).toString();f&&"yes"===f&&(o+="&include_cat_search="+f),e.setOptions({serviceUrl:o}),e.hide(),e.onValueChange()}}),woodmartThemeModule.$document.on("click",function(o){var a=o.target;e(a).is(".wd-search-form")||e(a).parents().is(".wd-search-form")||e(a).is(".wd-search-full-screen")||e(a).parents().is(".wd-search-full-screen")||e(a).is(".wd-clear-search")||t.find('[type="text"]').devbridgeAutocomplete("hide")}),e(".wd-search-results > .wd-scroll-content").on("click",function(e){e.stopPropagation()})}),e(".wd-header-search.wd-display-dropdown > a").on("click",function(e){e.preventDefault()}))},e(document).ready(function(){woodmartThemeModule.ajaxSearch()}),window.addEventListener("wdUpdatedHeader",function(){woodmartThemeModule.ajaxSearch()})}(jQuery),function(e){woodmartThemeModule.ageVerify=function(){"undefined"!=typeof Cookies&&"yes"===woodmart_settings.age_verify&&"confirmed"!==Cookies.get("woodmart_age_verify")&&(e.magnificPopup.open({items:{src:".wd-age-verify"},type:"inline",closeOnBgClick:!1,closeBtnInside:!1,showCloseBtn:!1,enableEscapeKey:!1,removalDelay:600,closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,fixedContentPos:!0,callbacks:{beforeOpen:function(){this.wrap.addClass("wd-age-verify-wrap")}}}),e(".wd-age-verify-allowed").on("click",function(t){t.preventDefault(),Cookies.set("woodmart_age_verify","confirmed",{expires:parseInt(woodmart_settings.age_verify_expires),path:"/",secure:woodmart_settings.cookie_secure_param}),e.magnificPopup.close()}),e(".wd-age-verify-forbidden").on("click",function(t){t.preventDefault(),e(".wd-age-verify").addClass("wd-forbidden")}))},e(document).ready(function(){woodmartThemeModule.ageVerify()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_3d_view.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.view3d()})}),woodmartThemeModule.view3d=function(){function t(e){var t=e.data("args");if(!t||e.hasClass("wd-threed-view-inited"))return!1;e.ThreeSixty({totalFrames:t.frames_count,endFrame:t.frames_count,currentFrame:1,imgList:".threed-view-images",progress:".spinner",imgArray:t.images,height:t.height,width:t.width,responsive:!0,navigation:!0,prevNextFrames:woodmart_settings.three_sixty_prev_next_frames,framerate:woodmart_settings.three_sixty_framerate}),e.addClass("wd-threed-view-inited")}e(".wd-threed-view:not(.wd-product-threed)").each(function(){t(e(this))}),e(".product-360-button a").on("click",function(o){o.preventDefault(),t(e(".wd-threed-view.wd-product-threed"))})},e(document).ready(function(){woodmartThemeModule.view3d()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdLoadDropdownsSuccess",function(){woodmartThemeModule.videoElementPopup()}),woodmartThemeModule.wdElementorAddAction("frontend/element_ready/wd_video.default",function(){woodmartThemeModule.videoElementPopup()}),woodmartThemeModule.videoElementPopup=function(){void 0!==e.fn.magnificPopup&&(e(".wd-el-video-btn:not(.wd-el-video-hosted), .wd-el-video-btn-overlay.wd-el-video-lightbox:not(.wd-el-video-hosted), .wd-el-video.wd-action-button:not(.wd-video-hosted) a:not(.wp-block-wd-button), .wd-el-video.wd-action-action_button:not(.wd-video-hosted) a:not(.wp-block-wd-button)").off("click").on("click",function(t){t.preventDefault();var o=e(this);setTimeout(()=>{e.magnificPopup?.instance?.isOpen&&(e.magnificPopup.instance.st.removalDelay=0,e.magnificPopup.close()),e.magnificPopup.open({items:{src:o.attr("href"),type:"iframe"},closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,removalDelay:600,preloader:!1,fixedContentPos:!0,iframe:{markup:woodmart_settings.close_markup+'<div class="wd-popup wd-video-popup wd-with-video wd-scroll-content"><iframe class="mfp-iframe" src="//about:blank" allowfullscreen frameborder="0"></iframe></div>',patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?rel=0&autoplay=1&mute=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?transparent=0&autoplay=1&muted=1"}}},callbacks:{beforeOpen:function(){this.wrap.addClass("wd-video-popup-wrap")}}})})}),e(".wd-el-video-btn-overlay.wd-el-video-lightbox.wd-el-video-hosted,.wd-el-video-btn.wd-el-video-hosted, .wd-el-video.wd-action-button.wd-video-hosted a:not(.wp-block-wd-button), .wd-el-video.wd-action-action_button.wd-video-hosted a:not(.wp-block-wd-button)").off("click").on("click",function(t){t.preventDefault();var o=e(this).closest(".wd-el-video").find(".wd-popup.wd-video-popup");setTimeout(()=>{e.magnificPopup?.instance?.isOpen&&(e.magnificPopup.instance.st.removalDelay=0,e.magnificPopup.close()),e.magnificPopup.open({items:{src:o,type:"inline"},closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,removalDelay:600,preloader:!1,fixedContentPos:!0,callbacks:{beforeOpen:function(){this.wrap.addClass("wd-video-popup-wrap")},elementParse:function(t){var o=e(t.src).find("video");o.attr("src")||o.attr("src",o.data("lazy-load")),o[0].play()},open:function(){woodmartThemeModule.$document.trigger("wood-images-loaded"),woodmartThemeModule.$window.resize()},close:function(t){var o=e(this.content[0]).find("video");o.length&&o[0].pause()}}})})}),e(".wd-el-video.wd-action-button .wp-block-wd-button").off("click").on("click",function(t){t.preventDefault();var o,a=e(this).parent();o=a.hasClass("wd-video-hosted")?a.find(".wd-popup.wd-video-popup"):e('<div class="wd-popup wd-video-popup wd-with-video wd-scroll-content"><iframe class="mfp-iframe" src="'+a.data("src")+'" allowfullscreen allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" width="100%" height="100%"></iframe></div>'),setTimeout(()=>{e.magnificPopup?.instance?.isOpen&&(e.magnificPopup.instance.st.removalDelay=0,e.magnificPopup.close()),e.magnificPopup.open({items:{src:o,type:"inline"},closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,removalDelay:500,preloader:!1,callbacks:{beforeOpen:function(){this.st.mainClass="mfp-move-horizontal"},elementParse:function(t){var o=e(t.src).find("video");o.length&&(o.attr("src")||o.attr("src",o.data("lazy-load")),o[0].play())},open:function(){woodmartThemeModule.$document.trigger("wood-images-loaded"),woodmartThemeModule.$window.resize()},close:function(t){var o=e(this.content[0]).parents(".wd-el-video").find("video");o.length&&o[0].pause()}}})})}))},e(document).ready(function(){woodmartThemeModule.videoElementPopup()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdLoadDropdownsSuccess",function(){woodmartThemeModule.videoElementClick()}),woodmartThemeModule.wdElementorAddAction("frontend/element_ready/wd_video.default",function(){woodmartThemeModule.videoElementClick()}),woodmartThemeModule.videoElementClick=function(){e(".wd-el-video-btn-overlay:not(.wd-el-video-lightbox):not(.wd-el-video-hosted)").on("click",function(t){t.preventDefault();var o=e(this),a=o.parents(".wd-el-video").find("iframe"),d=a.data("lazy-load"),n=d+"&autoplay=1&rel=0&mute=1";d.indexOf("vimeo.com")+1&&(n=d.replace("#t=","")+"&autoplay=1"),a.attr("src",n),o.parents(".wd-el-video").addClass("wd-playing")}),e(".wd-el-video-btn-overlay.wd-el-video-hosted:not(.wd-el-video-lightbox)").on("click",function(t){t.preventDefault();var o=e(this),a=o.parents(".wd-el-video").find("video"),d=a.data("lazy-load");a.attr("src",d),a[0].play(),o.parents(".wd-el-video").addClass("wd-playing")})},e(document).ready(function(){woodmartThemeModule.videoElementClick()})}(jQuery),woodmartThemeModule.$document.on("wdLoadDropdownsSuccess wdSearchFullScreenContentLoaded wdShopPageInit",function(){woodmartThemeModule.elToggle()}),["frontend/element_ready/wd_toggle.default"].forEach(function(e){woodmartThemeModule.wdElementorAddAction(e,function(){woodmartThemeModule.elToggle()})}),woodmartThemeModule.elToggle=function(){document.querySelectorAll(".wd-toggle, .wd-el-toggle").forEach(function(e){if(!e.classList.contains("wd-inited")){var t=e.querySelector(".wd-toggle-content, .wd-el-toggle-content"),o=e.classList.contains("wd-wpb");e.classList.add("wd-inited"),e.querySelector(".wd-toggle-head, .wd-el-toggle-head").addEventListener("click",function(){if(!e.classList.contains("wd-opening")){var a=woodmartThemeModule.$window.width();if(a<=768&&!o||a<=767&&o){if(e.classList.contains("wd-state-static-sm"))return;e.classList.contains("wd-active-sm")?(e.classList.remove("wd-active-sm"),woodmartThemeModule.slideUp(t)):(e.classList.add("wd-active-sm"),woodmartThemeModule.slideDown(t))}else if(a<=1024&&!o||a<1200&&o){if(e.classList.contains("wd-state-static-md-sm"))return;e.classList.contains("wd-active-md-sm")?(e.classList.remove("wd-active-md-sm"),woodmartThemeModule.slideUp(t)):(e.classList.add("wd-active-md-sm"),woodmartThemeModule.slideDown(t))}else{if(e.classList.contains("wd-state-static-lg"))return;e.classList.contains("wd-active-lg")?(e.classList.remove("wd-active-lg"),woodmartThemeModule.slideUp(t)):(e.classList.add("wd-active-lg"),woodmartThemeModule.slideDown(t))}e.classList.add("wd-opening"),setTimeout(function(){e.classList.remove("wd-opening")},400)}})}})},window.addEventListener("load",function(){woodmartThemeModule.elToggle()}),function(e){e.each(["frontend/element_ready/wd_tabs.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.tabs()})}),woodmartThemeModule.$document.on("wdTabsInit",function(){woodmartThemeModule.tabs()}),woodmartThemeModule.tabs=function(){e(".wd-tabs:not(.wd-products-tabs)").each(function(){var t=e(this),o=t.find("> .wd-tabs-header > .wd-nav-wrapper > .wd-nav-tabs > li"),a=t.find("> .wd-tabs-content-wrapper > .wd-tab-content"),d="wd-in";o.on("click",function(t){t.preventDefault();var o=e(this),n=o.index(),i=a.eq(n);i.siblings().removeClass(d),setTimeout(function(){o.siblings().removeClass("wd-active"),i.siblings().removeClass("wd-active")},100),setTimeout(function(){o.addClass("wd-active"),i.siblings().removeClass("wd-active"),i.addClass("wd-active")},100),setTimeout(function(){i.addClass(d),woodmartThemeModule.$document.trigger("resize.vcRowBehaviour"),woodmartThemeModule.$document.trigger("wood-images-loaded")},200)}),e(o[0]).hasClass("wd-active")||t.hasClass("wd-inited")||e(o[0]).trigger("click"),setTimeout(function(){t.addClass("wd-inited")},200)})},e(document).ready(function(){woodmartThemeModule.tabs()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_single_product_stock_status.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.stockStatus()})}),woodmartThemeModule.stockStatus=function(){e(".variations_form").on("show_variation",".woocommerce-variation",function(t,o){e(".wd-single-stock-status").each(function(){let t=e(this);0!==t.find(".elementor-widget-container").length&&(t=t.find(".elementor-widget-container")),o.hasOwnProperty("availability_html")&&t.html(o.availability_html)})}).on("click",".reset_variations",function(){e(".wd-single-stock-status").each(function(){let t=e(this);0!==t.find(".elementor-widget-container").length&&(t=t.find(".elementor-widget-container")),t.html("")})})},e(document).ready(function(){woodmartThemeModule.stockStatus()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdHeaderBuilderInited",function(){woodmartThemeModule.stickyColumns()}),e.each(["frontend/element_ready/container","frontend/element_ready/wd_sticky_columns.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.stickyColumns()})}),woodmartThemeModule.stickyColumns=function(){function t(e,t){var o=woodmartThemeModule.$window.width(),a=e.closest(".wd-sticky-columns");e.trigger("sticky_kit:detach"),e.siblings().trigger("sticky_kit:detach"),!a.hasClass("wd-sticky-on-lg")&&o>1024||!a.hasClass("wd-sticky-on-md-sm")&&o<=1024&&o>768||!a.hasClass("wd-sticky-on-sm")&&o<=768||e.stick_in_parent({offset_top:t})}e('.wd-sticky-columns[class*="wd-sticky-on-"]').each(function(){for(var o=e(this),a=o.find(".wd-sticky-columns-inner > .wd-col:first-child > div"),d=o.find(".wd-sticky-columns-inner > .wd-col:last-child > div"),n=o.attr("class").split(" "),i=150,r=0;r<n.length;r++)if(n[r].indexOf("wd_sticky_offset_")>=0){var s=n[r].split("_");i=parseInt(s[3])}var l=a.outerHeight()-d.outerHeight();l<-100?t(a,i):l>100&&t(d,i),woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){var e=a.outerHeight()-d.outerHeight();e<-100?t(a,i):e>100&&t(d,i)},300))})},e(document).ready(function(){woodmartThemeModule.stickyColumns()})}(jQuery),woodmartThemeModule.$document.on("wdShopPageInit wdElementorSectionReady wdElementorColumnReady wdElementorGlobalReady",function(){woodmartThemeModule.sliderAnimations(),woodmartThemeModule.sliderLazyLoad()}),["frontend/element_ready/wd_slider.default"].forEach(function(e){woodmartThemeModule.wdElementorAddAction(e,function(){woodmartThemeModule.sliderAnimations(),woodmartThemeModule.sliderLazyLoad()})}),woodmartThemeModule.sliderClearAnimations=function(e,t){t&&e.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var t,o=Array.from(e.classList),a=0;a<o.length;a++)o[a].indexOf("wd-anim-name_")>=0&&(t=o[a].split("_")[1]);e.classList.contains("wpb_start_animation")&&e.classList.remove("wpb_start_animation"),e.classList.contains("animated")&&e.classList.remove("animated"),e.classList.contains(t)&&e.classList.remove(t)}),e.parentNode.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var t,o=Array.from(e.classList),a=0,d=0;d<o.length;d++)o[d].indexOf("wd-anim-delay_")>=0&&(a=parseInt(o[d].split("_")[1])),o[d].indexOf("wd-anim-name_")>=0&&(t=o[d].split("_")[1]);setTimeout(function(){e.classList.contains("wpb_start_animation")&&e.classList.remove("wpb_start_animation"),e.classList.contains("animated")&&e.classList.remove("animated"),e.classList.contains(t)&&e.classList.remove(t)},a)})},woodmartThemeModule.sliderAnimations=function(){document.querySelectorAll(".wd-slider > .wd-carousel-inner > .wd-carousel").forEach(function(e){function t(e,t=!1){woodmartThemeModule.sliderClearAnimations(e,t),woodmartThemeModule.runAnimations(e,t)}e.querySelectorAll('[class*="wd-animation"]').forEach(function(e){e.classList.add("wd-animation-ready")}),t(e.querySelector(".wd-slide"),!0),e.addEventListener("wdSlideChange",function(e){var o=Array.prototype.filter.call(e.target.swiper.wrapperEl.children,t=>e.detail.activeIndex==t.dataset.swiperSlideIndex).shift();o||(o=e.target.swiper.wrapperEl.children[e.detail.activeIndex]),t(o),woodmartThemeModule.$document.trigger("wood-images-loaded")})})},woodmartThemeModule.runAnimations=function(e,t){e.parentElement.querySelectorAll('[class*="wd-animation"]').forEach(function(e){e.classList.remove("wd-animated"),e.classList.remove("wd-in")}),e.querySelectorAll('[class*="wd-animation"]').forEach(function(e){var t=0;e.classList.forEach(e=>{e.includes("wd_delay_")&&(t=parseInt(e.split("_")[2]))}),setTimeout(function(){e.classList.add("wd-animated"),e.classList.add("wd-in")},t)}),e.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var t=e.classList,o=0,a=0;a<t.length;a++)t[a].indexOf("wd-anim-delay_")>=0&&(o=parseInt(t[a].split("_")[1])),t[a].indexOf("wd-anim-name_")>=0&&t[a].split("_")[1];setTimeout(function(){e.classList.remove("wd-off-anim"),e.classList.add("wpb_start_animation"),e.classList.add("animated")},o)})},woodmartThemeModule.sliderLazyLoad=function(){const e=document.querySelectorAll(".wd-slider > .wd-carousel-inner > .wd-carousel");function t(e){e&&e.nextElementSibling&&e.nextElementSibling.classList.add("woodmart-loaded"),e.classList.add("woodmart-loaded"),e.closest(".wd-carousel").querySelectorAll('[id="'+e.id+'"]').forEach(function(e){e.classList.add("woodmart-loaded")})}window.addEventListener("wdEventStarted",function(){e.forEach(function(e){t(e.querySelector(".wd-carousel-wrap").firstElementChild)})}),e.forEach(function(e){e.addEventListener("wdSlideChange",function(e){var o=Array.prototype.filter.call(e.target.swiper.wrapperEl.children,t=>e.detail.activeIndex==t.dataset.swiperSlideIndex).shift();o||(o=Array.prototype.filter.call(e.target.swiper.wrapperEl.children,e=>e.classList.contains("woodmart-loaded")&&e.nextElementSibling?e.nextElementSibling:null).shift()),t(o)})})},window.addEventListener("load",function(){woodmartThemeModule.sliderLazyLoad(),woodmartThemeModule.sliderAnimations()}),function(e){e.each(["frontend/element_ready/wd_open_street_map.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.wdOpenStreetMap()})}),woodmartThemeModule.wdOpenStreetMap=function(){if("undefined"==typeof leaflet)return;const t=function(t,o){let a=t.attr("id"),d=o.hasOwnProperty("center")?o.center:null,n=o.hasOwnProperty("markers")?o.markers:[];void 0!==L.DomUtil.get(a)&&L.DomUtil.get(a)&&(L.DomUtil.get(a)._leaflet_id=null);const i=L.map(a,{scrollWheelZoom:o.hasOwnProperty("scrollWheelZoom")&&"yes"===o.scrollWheelZoom,zoomControl:o.hasOwnProperty("zoomControl")&&"yes"===o.zoomControl,dragging:o.hasOwnProperty("dragging")&&"yes"===o.dragging});if(d&&i.setView(d.split(","),o.zoom),o.hasOwnProperty("geoapify_tile")&&"osm-carto"!==o.geoapify_tile&&("custom-tile"!==o.geoapify_tile||o.hasOwnProperty("geoapify_custom_tile")&&0!==o.geoapify_custom_tile.length)){if("stamen-toner"===o.geoapify_tile)L.tileLayer("https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}{r}.png",{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',maxZoom:18}).addTo(i);else if("stamen-terrain"===o.geoapify_tile)L.tileLayer("https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png",{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',maxZoom:18}).addTo(i);else if("stamen-watercolor"===o.geoapify_tile)L.tileLayer("https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg",{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.',maxZoom:18}).addTo(i);else if("custom-tile"===o.geoapify_tile&&o.hasOwnProperty("geoapify_custom_tile")&&0!==o.geoapify_custom_tile.length){let e=o.geoapify_custom_tile;e=e.replaceAll("$",""),L.tileLayer(e,{attribution:`<a href="${o.osm_custom_attribution_url?o.osm_custom_attribution_url:null}" target="_blank"> ${o.osm_custom_attribution?o.osm_custom_attribution:null} </a> | © OpenStreetMap <a href="https://www.openstreetmap.org/copyright" target="_blank">contributors</a>`,maxZoom:18}).addTo(i)}}else L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:18}).addTo(i);if(!function(e){return!!e&&e.filter(function(e){return!isNaN(e.lat)&&!isNaN(e.lng)}).length>0}(n)){let e=51.50735,t=-.12776;n.push({lat:e,lng:t,marker:{button_text:"",button_url:"",marker_coords:{lat:e,lng:t},marker_description:"",marker_title:"",show_button:"no"}}),i.setView([e,t],o.zoom)}e.each(n,function(){let e=this.marker;if(e.hasOwnProperty("image")&&e.hasOwnProperty("image_size")&&(e.image.hasOwnProperty("url")&&e.image.url.length>0||"string"==typeof e.image&&e.image.length>0)){let t=null;e.image.hasOwnProperty("url")&&e.image.url.length>0?t=e.image.url:"string"==typeof e.image&&e.image.length>0&&(t=e.image),e.markerOptions={icon:L.icon({iconUrl:t,iconSize:e.image_size})}}else e.markerOptions={icon:L.icon({iconUrl:o.hasOwnProperty("iconUrl")?o.iconUrl:null,iconSize:o.hasOwnProperty("iconSize")?o.iconSize:[25,41]})}}),function(t,o){e.each(o,function(){let e=this.marker,o=e.hasOwnProperty("markerOptions")?e.markerOptions:{},a=L.marker([this.lat,this.lng],o);a.addTo(t);let d='<div class="marker-tooltip">';if(this.marker.marker_title&&(d+=`<div class="marker-title"><h5 class="title">${this.marker.marker_title}</h5></div>`),d+='<div class="marker-content">',this.marker.marker_description&&(d+=`<div class="marker-description">${this.marker.marker_description}</div>`),"yes"===this.marker.show_button&&this.marker.button_text&&(d+=`<div class="marker-button">\n <a class="btn" target="${this.marker.hasOwnProperty("button_url_target")&&this.marker.button_url_target?this.marker.button_url_target:"_blank"}" href='${this.marker.button_url}' role="button">\n ${this.marker.button_text}\n </a>\n </div>`),d+="</div>",d+="</div>",this.marker.marker_title||this.marker.marker_description||this.marker.button_text&&this.marker.show_button)switch(this.marker.hasOwnProperty("marker_behavior")?this.marker.marker_behavior:null){case"popup":a.bindPopup(d);break;case"static_close_on":a.bindPopup(d,{closeOnClick:!1,autoClose:!1,closeOnEscapeKey:!1}).openPopup();break;case"static_close_off":a.bindPopup(d,{closeOnClick:!1,autoClose:!1,closeButton:!1,closeOnEscapeKey:!1}).openPopup();break;case"tooltip":let e={};a.bindTooltip(d,e)}}),setTimeout(function(){t.invalidateSize()},100)}(i,n)};e(".wd-osm-map-container").each(function(){let o=e(this),a=o.find(".wd-osm-map-wrapper"),d=a.data("settings");d&&(o.closest(".wd-popup").length>0&&!o.hasClass("wd-map-inited")?woodmartThemeModule.$document.on("wdOpenPopup",function(){o.hasClass("wd-map-inited")||(o.addClass("wd-map-inited"),t(a,d))}):d.hasOwnProperty("init_type")&&"button"===d.init_type?o.find(".wd-init-map").on("click",function(e){e.preventDefault(),o.hasClass("wd-map-inited")||(o.addClass("wd-map-inited"),t(a,d))}):d.hasOwnProperty("init_type")&&"scroll"===d.init_type?woodmartThemeModule.$window.on("scroll",function(){if(d.hasOwnProperty("init_offset")&&window.innerHeight+woodmartThemeModule.$window.scrollTop()+parseInt(d.init_offset)>o.offset().top){if(o.hasClass("wd-map-inited"))return;o.addClass("wd-map-inited"),t(a,d)}}):d.hasOwnProperty("init_type")&&"interaction"===d.init_type?window.addEventListener("wdEventStarted",function(){o.hasClass("wd-map-inited")||(o.addClass("wd-map-inited"),t(a,d))}):t(a,d))})},e(document).ready(function(){woodmartThemeModule.wdOpenStreetMap()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.offCanvasColumnBtn()}),e.each(["frontend/element_ready/column","frontend/element_ready/container","frontend/element_ready/wd_builder_off_canvas_column_btn.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.offCanvasColumnBtn()})}),woodmartThemeModule.offCanvasColumnBtn=function(){var t=e(".wd-close-side"),o=e('[class*="wd-col-offcanvas"], .wp-block-wd-off-sidebar'),a=o.hasClass("wd-alignment-left")||o.hasClass("wd-left")?"left":"right",d=e(".wd-off-canvas-btn, .wd-off-canvas-btn ~ .wd-sidebar-opener, .wd-toolbar-sidebar"),n=woodmartThemeModule.$window.width();function i(){o.trigger("wdCloseSide"),o.removeClass("wd-opened"),t.removeClass("wd-close-side-opened"),d.removeClass("wd-opened")}o.hasClass("wp-block-wd-off-sidebar")&&(o.hasClass("wd-hide-lg")&&n>=1024||o.hasClass("wd-hide-md-sm")&&768<=n&&n<=1024||o.hasClass("wd-hide-sm")&&n<=767)||"elementor"===woodmart_settings.current_page_builder&&(o.hasClass("wd-col-offcanvas-lg")&&n>=1024||o.hasClass("wd-col-offcanvas-md-sm")&&768<=n&&n<=1024||o.hasClass("wd-col-offcanvas-sm")&&n<=767)||"wpb"===woodmart_settings.current_page_builder&&(o.hasClass("wd-col-offcanvas-lg")&&n>=1200||o.hasClass("wd-col-offcanvas-md-sm")&&769<=n&&n<=1199||o.hasClass("wd-col-offcanvas-sm")&&n<=768)?(o.hasClass("wp-block-wd-off-sidebar")||o.removeClass("wd-left wd-right").addClass("wd-"+a),o.addClass("wd-side-hidden wd-inited"),0===o.find(".wd-heading").length&&o.prepend('<div class="wd-heading"><div class="close-side-widget wd-action-btn wd-style-text wd-cross-icon"><a href="#" rel="nofollow"><span class="wd-action-icon"></span><span class="wd-action-text">'+woodmart_settings.off_canvas_column_close_btn_text+"</span></a></div></div>"),d.on("click",function(e){e.preventDefault(),o.length&&(o.trigger("wdOpenSide"),o.addClass("wd-scroll wd-opened"),t.addClass("wd-close-side-opened"),d.addClass("wd-opened"),o.find(" .elementor-widget-wrap").first().addClass("wd-scroll-content"),o.hasClass("wp-block-wd-off-sidebar")&&o.find("> .widget-area").addClass("wd-scroll-content"))})):o.hasClass("wd-side-hidden")&&(d.off("click"),e(".wp-block-wd-off-sidebar").removeClass("wd-side-hidden wd-inited wd-scroll wd-opened"),e(".elementor-column, .e-con").removeClass("wd-side-hidden wd-inited wd-scroll wd-opened wd-left wd-right"),e(".wpb_column").removeClass("wd-side-hidden wd-inited wd-scroll wd-opened wd-left wd-right"),t.removeClass("wd-close-side-opened"),d.removeClass("wd-opened"),o.find(" .elementor-widget-wrap").first().removeClass("wd-scroll-content"),o.find(".wd-heading").remove()),d.on("click",function(e){e.preventDefault()}),woodmartThemeModule.$body.on("pjax:beforeSend",function(){e(".wd-close-side, .close-side-widget").trigger("click")}),woodmartThemeModule.$body.on("click touchstart",".wd-close-side",function(e){e.preventDefault(),i()}),woodmartThemeModule.$body.on("click",".close-side-widget",function(e){e.preventDefault(),i()}),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&o.hasClass("wd-opened")&&i()})},woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){woodmartThemeModule.offCanvasColumnBtn()},300)),e(document).ready(function(){woodmartThemeModule.offCanvasColumnBtn()})}(jQuery),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&elementorFrontend.hooks.addFilter("frontend/handlers/menu_anchor/scroll_top_distance",function(e){var t=0,o=jQuery(".whb-sticky-row");return 0===o.length?e:(o.each(function(){t+=jQuery(this).height()}),e-t)})}),function(e){e.each(["frontend/element_ready/wd_infobox_carousel.default","frontend/element_ready/wd_infobox.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.infoboxSvg()})}),woodmartThemeModule.infoboxSvg=function(){e(".wd-info-box.with-animation").each(function(){var t=e(this);t.find(".info-svg-wrapper > svg").length>0&&new Vivus(t.find(".info-svg-wrapper > svg")[0],{type:"delayed",duration:200,start:"inViewport",animTimingFunction:Vivus.EASE_OUT},function(){})})},e(document).ready(function(){woodmartThemeModule.infoboxSvg()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_images_gallery.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.imagesGalleryMasonry(),woodmartThemeModule.imagesGalleryJustified()})}),woodmartThemeModule.imagesGalleryMasonry=function(){if(void 0!==e.fn.isotope&&void 0!==e.fn.imagesLoaded){var t=e(".wd-images-gallery .wd-masonry, .wp-block-wd-gallery.wd-masonry");t.imagesLoaded(function(){t.isotope({gutter:0,isOriginLeft:!woodmartThemeModule.$body.hasClass("rtl"),itemSelector:'[class*="wd-gallery-item"]'})})}},woodmartThemeModule.imagesGalleryJustified=function(){e(".wd-images-gallery .wd-justified").each(function(){e(this).justifiedGallery({margins:1,cssAnimation:!0})})},e(document).ready(function(){woodmartThemeModule.imagesGalleryMasonry(),woodmartThemeModule.imagesGalleryJustified()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_image_hotspot.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.imageHotspot()})}),woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.imageHotspot()}),woodmartThemeModule.imageHotspot=function(){e(".wd-image-hotspot, .wd-spot").each(function(){var t=e(this),o=t.find(".hotspot-btn, .wd-spot-icon");!t.parents(".wd-spots").hasClass("wd-event-click")&&woodmartThemeModule.$window.width()>1024||(o.on("click",function(){return t.hasClass("wd-opened")?t.removeClass("wd-opened"):(t.addClass("wd-opened"),t.siblings().removeClass("wd-opened")),e(".wd-image-hotspot .hotspot-content, .wd-spot .wd-spot-dropdown").each(function(){var t=e(this),o=t.parents(".wp-block-wd-hotspot").length;t.removeClass("hotspot-overflow-right hotspot-overflow-left"),t.attr("style","");var a=t.offset().left,d=woodmartThemeModule.$window.width()-(a+t.outerWidth());woodmartThemeModule.windowWidth>768&&!o&&(a<=0&&t.addClass("hotspot-overflow-right"),d<=0&&t.addClass("hotspot-overflow-left")),(woodmartThemeModule.windowWidth<=768||o&&woodmartThemeModule.windowWidth<=1024)&&(a<=0&&t.css("marginLeft",Math.abs(a-15)+"px"),d<=0&&t.css("marginLeft",d-15+"px"))}),woodmartThemeModule.$document.trigger("wood-images-loaded"),!1}),woodmartThemeModule.$document.on("click",function(o){var a=o.target;if(t.hasClass("wd-opened")&&(!e(a).is(".wd-image-hotspot")||!e(a).is(".wd-spot"))&&!e(a).parents().is(".wd-image-hotspot")&&!e(a).parents().is(".wd-spot"))return t.removeClass("wd-opened"),!1}))}),e(".wd-spots").each(function(){var t=e(this);t.imagesLoaded(function(){t.addClass("wd-loaded")})})},e(document).ready(function(){woodmartThemeModule.imageHotspot()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_google_map.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.googleMapInit()})}),woodmartThemeModule.googleMapInit=function(){e(".google-map-container").each(function(){var t=e(this),o=t.data("map-args"),a={controls_on_map:!1,map_div:"#"+o.selector,start:1,map_options:{zoom:parseInt(o.zoom),scrollwheel:"yes"===o.mouse_zoom}};"yes"===o.multiple_markers?(a.locations=o.markers.map(e=>{var t={lat:e.marker_lat,lon:e.marker_lon,image:e.marker_icon?e.marker_icon:o.marker_icon,image_w:40,image_h:40,animation:google.maps.Animation.DROP};return e.marker_icon_size?(t.image_w=e.marker_icon_size[0],t.image_h=e.marker_icon_size[1]):o.marker_icon_size&&(t.image_w=o.marker_icon_size[0],t.image_h=o.marker_icon_size[1]),(e.marker_title||e.marker_description)&&(t.html=`<h3 style="min-width:300px; text-align:center; margin:15px;">${e.marker_title}</h3>${e.marker_description}`),t}),o.hasOwnProperty("center")&&(a.start=0,a.map_options.set_center=o.center.split(",").map(function(e){return parseFloat(e)}))):(a.locations=[{lat:o.latitude,lon:o.longitude,image:o.marker_icon,image_w:o.marker_icon_size&&o.marker_icon_size[0]?o.marker_icon_size[0]:40,image_h:o.marker_icon_size&&o.marker_icon_size[1]?o.marker_icon_size[1]:40,animation:google.maps.Animation.DROP}],"yes"===o.marker_text_needed&&(a.locations[0].html=o.marker_text)),o.json_style&&!o.elementor?(a.styles={},a.styles[woodmart_settings.google_map_style_text]=JSON.parse(o.json_style)):o.json_style&&o.elementor&&(a.styles={},a.styles[woodmart_settings.google_map_style_text]=JSON.parse(atob(o.json_style))),"button"===o.init_type?t.find(".wd-init-map").on("click",function(e){e.preventDefault(),t.hasClass("wd-map-inited")||(t.addClass("wd-map-inited"),new Maplace(a).Load())}):"scroll"===o.init_type?woodmartThemeModule.$window.on("scroll",function(){if(window.innerHeight+woodmartThemeModule.$window.scrollTop()+parseInt(o.init_offset)>t.offset().top){if(t.hasClass("wd-map-inited"))return;t.addClass("wd-map-inited"),new Maplace(a).Load()}}):"interaction"===o.init_type?window.addEventListener("wdEventStarted",function(){t.hasClass("wd-map-inited")||(t.addClass("wd-map-inited"),new Maplace(a).Load())}):new Maplace(a).Load()});var t=e(".google-map-container-with-content");woodmartThemeModule.$window.on("resize",function(){t.css({height:t.find(".wd-google-map.with-content").outerHeight()})})},e(document).ready(function(){woodmartThemeModule.googleMapInit()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_counter.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.visibleElements()})}),woodmartThemeModule.counterShortcode=function(e){"done"!==e.attr("data-state")&&"process"!==e.attr("data-state")&&e.prop("Counter",e.text()).animate({Counter:e.data("final")},{duration:parseInt(woodmart_settings.animated_counter_speed),easing:"swing",step:function(t){t>=e.data("final")?e.attr("data-state","done"):e.attr("data-state","process"),e.text(Math.ceil(t))}})},woodmartThemeModule.visibleElements=function(){e(".woodmart-counter .counter-value, .wp-block-wd-animated-counter span").each(function(){var t=e(this);t.waypoint(function(){woodmartThemeModule.counterShortcode(t)},{offset:"100%"})})},e(document).ready(function(){woodmartThemeModule.visibleElements()})}(jQuery),function(e){woodmartThemeModule.$document.on("wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdUpdateWishlist wdShopPageInit wdArrowsLoadProducts wdLoadMoreLoadProducts wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.countDownTimer()}),e.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default","frontend/element_ready/wd_countdown_timer.default","frontend/element_ready/wd_single_product_countdown.default","frontend/element_ready/wd_banner.default","frontend/element_ready/wd_banner_carousel.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.countDownTimer()})}),woodmartThemeModule.countDownTimer=function(){e(".wd-timer").each(function(){var t=e(this),o=t.data("timezone")?t.data("timezone"):woodmart_settings.countdown_timezone;dayjs.extend(window.dayjs_plugin_utc),dayjs.extend(window.dayjs_plugin_timezone);var a=dayjs.tz(t.data("end-date"),o);t.countdown(a.toDate(),function(e){"yes"===t.data("hide-on-finish")&&"finish"===e.type&&t.parent().addClass("wd-hide"),t.find(".wd-timer-days .wd-timer-value").text(e.strftime("%-D")),t.find(".wd-timer-hours .wd-timer-value").text(e.strftime("%H")),t.find(".wd-timer-min .wd-timer-value").text(e.strftime("%M")),t.find(".wd-timer-sec .wd-timer-value").text(e.strftime("%S"))})})},e(document).ready(function(){woodmartThemeModule.countDownTimer()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_popup.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.contentPopup()})}),woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.contentPopup()}),woodmartThemeModule.contentPopup=function(){if(void 0!==e.fn.magnificPopup){woodmartThemeModule.$document.on("click",".wd-open-popup, .wp-block-wd-popup > a",function(t){t.preventDefault(),e.magnificPopup?.instance?.isOpen&&(e.magnificPopup.instance.st.removalDelay=0,e.magnificPopup.close());var o=e(this),a=o.parent().siblings(".wd-popup");o.parents().hasClass("wd-popup-builder")||(o.hasClass("wp-block-wd-button")?a=o.siblings(".wd-popup"):o.attr("href")&&(a=e(o.attr("href"))),e.magnificPopup.open({items:{src:a,type:"inline"},removalDelay:600,closeMarkup:woodmart_settings.close_markup,tLoading:woodmart_settings.loading,fixedContentPos:!0,closeOnContentClick:!1,callbacks:{beforeOpen:function(){a.find("link").appendTo("head")},open:function(){var e=this.wrap.find(".wd-popup").data("wrap-class");if(e)setTimeout(()=>this.wrap.addClass(e));else{setTimeout(()=>this.wrap.addClass("wd-popup-element-wrap"));var t=getComputedStyle(a[0]).getPropertyValue("--wd-popup-width");this.wrap.css("--wd-popup-width",t)}woodmartThemeModule.$document.trigger("wood-images-loaded"),woodmartThemeModule.$document.trigger("wdOpenPopup")}}}))});var t=e(".wd-popup-element .mc4wp-form .mc4wp-response");t.length&&t.children().length&&t.parents(".wd-popup-element").siblings().find(".wd-open-popup").trigger("click")}},e(document).ready(function(){woodmartThemeModule.contentPopup()})}(jQuery),jQuery.each(["frontend/element_ready/wd_compare_img.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.compareImages()})}),woodmartThemeModule.compareImages=function(){function e(e,t){var o=t.getBoundingClientRect(),a=e.clientX-o.left;a<0&&(a=0),a>o.width&&(a=o.width);var d=(a/o.width*100).toFixed(3);t.style.setProperty("--wd-compare-handle-pos",`${d}%`)}document.querySelectorAll(".wd-compare-img").forEach(function(t){!function(t){var o=!1;t.addEventListener("mousedown",function(a){o=!0,e(a,t)}),document.addEventListener("mouseup",function(){o=!1}),t.addEventListener("mousemove",function(a){o&&e(a,t)}),t.addEventListener("touchstart",function(a){o=!0,e(a.touches[0],t)},{passive:!0}),document.addEventListener("touchend",function(){o=!1},{passive:!0}),t.addEventListener("touchmove",function(a){o&&e(a.touches[0],t)},{passive:!0})}(t)})},window.addEventListener("load",function(){woodmartThemeModule.compareImages()}),function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.buttonShowMore()}),e.each(["frontend/element_ready/wd_button.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.buttonShowMore()})}),woodmartThemeModule.buttonShowMore=function(){e(".wd-collapsible-content, .wp-block-wd-collapsible-content").each(function(){var t=e(this),o=t.find(".wd-collapsible-button, > .wp-block-wd-button");o.on("click",function(e){if(e.preventDefault(),t.toggleClass("wd-opened"),t.data("alt-text")){var a=o.find("span"),d=a.text();a.text(t.data("alt-text")),t.data("alt-text",d)}t.parents(".wd-hover-with-fade").length&&woodmartThemeModule.$document.trigger("wdProductHoverContentRecalc",[t.parents(".wd-hover-with-fade")])})})},e(document).ready(function(){woodmartThemeModule.buttonShowMore()})}(jQuery),function(e){woodmartThemeModule.buttonSmoothScroll=function(){e(".wd-button-wrapper.wd-smooth-scroll a").on("click",function(t){t.stopPropagation(),t.preventDefault();var o=e(this),a=o.parent().data("smooth-time"),d=o.parent().data("smooth-offset"),n=o.attr("href").split("#")[1],i=e("#"+n);if(!(i.length<1)){var r=i.offset().top;e("html, body").animate({scrollTop:r-d},a)}})},e(document).ready(function(){woodmartThemeModule.buttonSmoothScroll()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_banner_carousel.default","frontend/element_ready/wd_banner.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.bannersHover()})}),woodmartThemeModule.bannersHover=function(){void 0!==e.fn.panr&&e(".promo-banner.banner-hover-parallax, .wp-block-wd-banner.wd-hover-parallax").panr({sensitivity:20,scale:!1,scaleOnHover:!0,scaleTo:1.15,scaleDuration:.34,panY:!0,panX:!0,panDuration:.5,resetPanOnMouseLeave:!0})},e(document).ready(function(){woodmartThemeModule.bannersHover()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_accordion.default","frontend/element_ready/wd_single_product_tabs.default","frontend/element_ready/wd_single_product_reviews.default"],function(t,o){woodmartThemeModule.wdElementorAddAction(o,function(t){woodmartThemeModule.accordion(),e(".wc-tabs-wrapper, .woocommerce-tabs").trigger("init"),t.find("#rating").parent().find("> .stars").remove(),t.find("#rating").trigger("init")})});var t=function(){e(".tabs-layout-accordion .wd-accordion-title.tab-title-reviews:not(.active)").click()};woodmartThemeModule.accordion=function(){var o=window.location.hash,a=window.location.href;e(".woocommerce-review-link").off("click",t).on("click",t),e(".wd-accordion").each(function(){var t=e(this),d=t.find("> .wd-accordion-item > .wd-accordion-title"),n=t.find("> .wd-accordion-item > .wd-accordion-content"),i="wd-active",r=t.data("state"),s=300;if(!t.hasClass("wd-inited")){var l=function(e){var o=d.filter('[data-accordion-index="'+e+'"]'),a=n.filter('[data-accordion-index="'+e+'"]');o.addClass(i),a.stop(!0,!0).slideDown(s).addClass(i),"first"!==r||t.hasClass("wd-inited")||(a.length||(a=n.first()),a.stop(!0,!0).show().css("display","block")),t.addClass("wd-inited"),woodmartThemeModule.$document.trigger("resize.vcRowBehaviour"),woodmartThemeModule.$document.trigger("wood-images-loaded")},c=function(){var e=d.filter("."+i),t=n.filter("."+i);e.removeClass(i),t.stop(!0,!0).slideUp(s).removeClass(i)};"first"===r&&l(d.first().data("accordion-index")),d.off("click").on("click",function(){var t=e(this),o=e(this).data("accordion-index"),a=function(e){return d.filter('[data-accordion-index="'+e+'"]').hasClass(i)}(o),n=t.parent().index(),r=t.parent().siblings().find(".wd-active").parent(".wd-tab-wrapper").index();(t.hasClass("wd-active")||-1===n)&&(r=n),a||t.hasClass(i)?c():(c(),l(o),d.filter('[data-accordion-index="'+o+'"]').length||(t.addClass(i),t.siblings(".wd-accordion-content").stop(!0,!0).slideDown(s).addClass(i))),(t.parents(".tabs-layout-accordion").length||t.parents(".wd-single-tabs").length)&&setTimeout(function(){if(woodmartThemeModule.$window.width()<1024&&n>r){var o=e(".whb-sticky-header"),a=o.length>0?o.outerHeight():0;e("html, body").animate({scrollTop:t.offset().top-t.outerHeight()-a-50},500)}},s)}),(o.toLowerCase().indexOf("comment-")>=0||"#reviews"===o||"#tab-reviews"===o||a.indexOf("comment-page-")>0||a.indexOf("cpage=")>0)&&t.find(".tab-title-reviews").trigger("click")}})},e(document).ready(function(){woodmartThemeModule.accordion()})}(jQuery),function(e){e.each(["frontend/element_ready/wd_blog.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(){woodmartThemeModule.blogLoadMore()})}),woodmartThemeModule.blogLoadMore=function(){var t=".wd-blog-load-more.load-on-scroll",o=!1;woodmartThemeModule.clickOnScrollButton(t,!1,!1),e(".wd-blog-load-more").on("click",function(a){a.preventDefault();var d=e(this);if(!o&&!d.hasClass("no-more-posts")){o=!0;var n=d.parent().siblings(".wd-blog-holder"),i=n.data("source"),r="woodmart_get_blog_"+i,s=woodmart_settings.ajaxurl,l="POST",c=n.data("atts"),u=n.data("paged");d.addClass("loading");var m={atts:c,paged:u,action:r};"main_loop"===i&&(s=d.attr("href"),l="GET",m=c?{atts:c}:{}),m.woo_ajax=1,e.ajax({url:s,data:m,dataType:"json",method:l,success:function(o){woodmartThemeModule.removeDuplicatedStylesFromHTML(o.items,function(a){var r=e(a);r&&(n.hasClass("wd-masonry")?(n.append(r).isotope("appended",r),n.imagesLoaded().progress(function(){n.isotope("layout"),woodmartThemeModule.clickOnScrollButton(t,!0,!1)})):(n.append(r),n.imagesLoaded().progress(function(){woodmartThemeModule.clickOnScrollButton(t,!0,!1)})),"yes"===woodmart_settings.load_more_button_page_url_opt&&"no"!==woodmart_settings.load_more_button_page_url&&o.currentPage&&window.history.pushState("","",o.currentPage),n.data("paged",u+1),"main_loop"===i&&(d.attr("href",o.nextPage),"no-more-posts"===o.status&&d.parent().hide().remove())),"no-more-posts"===o.status&&(d.addClass("no-more-posts"),d.parent().hide())})},error:function(){console.log("ajax error")},complete:function(){d.removeClass("loading"),o=!1}})}})},e(document).ready(function(){woodmartThemeModule.blogLoadMore()})}(jQuery),function(e){woodmartThemeModule.adminBarSliderMenu=function(){var t=e(".wd-slider > .wd-carousel-inner > .wd-carousel"),o=e("#wpadminbar");t.length>0&&o.length>0&&t.each(function(){var t=e(this),o=t.parents(".wd-slider").data("id"),a=t.data("slider"),d=e("#wp-admin-bar-xts_sliders > .ab-sub-wrapper > .ab-submenu");a&&(d.find(".xts-admin-bar-separator").length||d.append(`<li class="xts-admin-bar-separator"><div class="ab-item ab-empty-item">${woodmart_settings.on_this_page}</div></li>`),d.append('<li id="'+o+'" class="menupop"><a href="'+a.url+'" class="ab-item" target="_blank">'+a.title+'<span class="wp-admin-bar-arrow" aria-hidden="true"></span></a><div class="ab-sub-wrapper"><ul class="ab-submenu"></ul></div></li>'),t.find(".wd-slide").each(function(){var t=e(this).data("slide");d.find("#"+o+" > .ab-sub-wrapper > .ab-submenu").append('<li><a href="'+t.url+'" class="ab-item" target="_blank">'+t.title+"</a></li>")}))}),"undefined"!=typeof woodmart_editable_posts_data&&woodmart_editable_posts_data.length&&o.length>0&&woodmart_editable_posts_data.forEach(t=>{var o=e("#wp-admin-bar-xts_dashboard ."+t.type+"-post-type");o.length&&(o.find(".ab-submenu").length||(o.append('<div class="ab-sub-wrapper"><ul class="ab-submenu"></ul></div>'),o.find(".ab-item").prepend('<span class="wp-admin-bar-arrow" aria-hidden="true"></span>'),o.addClass("menupop")),o.find(".xts-admin-bar-separator").length||o.find(".ab-submenu").append(`<li class="xts-admin-bar-separator"><div class="ab-item ab-empty-item">${woodmart_settings.on_this_page}</div></li>`),o.find('.ab-submenu a[data-id="'+t.id+'"]').length||o.find(".ab-submenu").append(`<li><a href="${t.edit_url}" class="ab-item" data-id="${t.id}" target="_blank">${t.title}</a></li>`))})},woodmartThemeModule.adminBarSliderMenu()}(jQuery);
[+]
header
[+]
shaders
[-] combine.min.js
[edit]
[+]
blog
[+]
wc
[-] combine.js
[edit]
[+]
menu
[+]
admin
[+]
..
[+]
global
[+]
elements
[+]
portfolio