woodmartThemeModule.$document.on("wdShopPageInit",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,a){a&&e.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var a,t=Array.from(e.classList),i=0;i<t.length;i++)0<=t[i].indexOf("wd-anim-name_")&&(a=t[i].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(a)&&e.classList.remove(a)}),e.parentNode.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var a,t=Array.from(e.classList),i=0,o=0;o<t.length;o++)0<=t[o].indexOf("wd-anim-delay_")&&(i=parseInt(t[o].split("_")[1])),0<=t[o].indexOf("wd-anim-name_")&&(a=t[o].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(a)&&e.classList.remove(a)},i)})},woodmartThemeModule.sliderAnimations=function(){document.querySelectorAll(".wd-slider > .wd-carousel-inner > .wd-carousel").forEach(function(e){function t(e,a=!1){woodmartThemeModule.sliderClearAnimations(e,a),woodmartThemeModule.runAnimations(e,a)}e.querySelectorAll('[class*="wd-animation"]').forEach(function(e){e.classList.add("wd-animation-ready")}),t(e.querySelector(".wd-slide"),!0),e.addEventListener("wdSlideChange",function(a){t(Array.prototype.filter.call(a.target.swiper.wrapperEl.children,e=>a.detail.activeIndex==e.dataset.swiperSlideIndex).shift()),woodmartThemeModule.$document.trigger("wood-images-loaded")})})},woodmartThemeModule.runAnimations=function(e,a){e.parentElement.querySelectorAll('[class*="wd-animation"]').forEach(function(e){e.classList.remove("wd-animated")}),e.querySelectorAll('[class*="wd-animation"]').forEach(function(e){var a=0;e.classList.forEach(e=>{e.includes("wd_delay_")&&(a=parseInt(e.split("_")[2]))}),setTimeout(function(){e.classList.add("wd-animated")},a)}),e.querySelectorAll('[class*="wpb_animate"]').forEach(function(e){for(var a=e.classList,t=0,i=0;i<a.length;i++)0<=a[i].indexOf("wd-anim-delay_")&&(t=parseInt(a[i].split("_")[1])),0<=a[i].indexOf("wd-anim-name_")&&a[i].split("_")[1];setTimeout(function(){e.classList.remove("wd-off-anim"),e.classList.add("wpb_start_animation"),e.classList.add("animated")},t)})},woodmartThemeModule.sliderLazyLoad=function(){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")})}document.querySelectorAll(".wd-slider > .wd-carousel-inner > .wd-carousel").forEach(function(e){t(e.querySelector(".wd-carousel-wrap").firstElementChild),e.addEventListener("wdSlideChange",function(a){t(Array.prototype.filter.call(a.target.swiper.wrapperEl.children,e=>a.detail.activeIndex==e.dataset.swiperSlideIndex).shift())})})},window.addEventListener("load",function(){woodmartThemeModule.sliderAnimations(),woodmartThemeModule.sliderLazyLoad()});