woodmartThemeModule.$document.on("wdInstagramAjaxSuccess wdLoadDropdownsSuccess wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdShopPageInit wdRecentlyViewedProductLoaded wdQuickViewOpen300",function(){woodmartThemeModule.swiperInit()}),["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"].forEach(function(e){woodmartThemeModule.wdElementorAddAction(e,function(){woodmartThemeModule.swiperInit()})}),woodmartThemeModule.swiperInit=function(){function c(d,e=!1){if(!(d.closest(".woocommerce-product-gallery")&&!d.classList.contains("quick-view-gallery")||!e&&void 0!==d.dataset.sync_child_id&&document.querySelector(".wd-carousel[data-sync_parent_id="+d.dataset.sync_child_id+"]"))){var l,s,n,o,t,a,r=d.closest(".wd-carousel-container"),i=window.getComputedStyle(d);if(!(woodmartThemeModule.windowWidth<=1024&&r.classList.contains("wd-carousel-dis-mb")||d.classList.contains("wd-initialized")))return l=i.getPropertyValue("--wd-col"),e=woodmart_settings.carousel_breakpoints,s={},n=d.querySelectorAll(".wd-carousel-item").length,Object.entries(e).forEach(([e,t])=>{var t=i.getPropertyValue("--wd-col-"+t),a=void 0!==d.dataset.scroll_per_page&&"yes"===d.dataset.scroll_per_page;(t=t||l)&&(s[e]={slidesPerView:t||1},a=!("yes"===d.dataset.wrap&&2*parseInt(t,10)>n||"yes"===d.dataset.center_mode)&&a)&&t&&(s[e].slidesPerGroup=parseInt(t))}),e={slidesPerView:l,loop:"yes"===d.dataset.wrap&&("yes"!==d.dataset.center_mode||parseInt(l,10)+1e.classList.contains("wd-nav-pagin-wrap")).shift())&&(e.pagination={el:o.querySelector(".wd-nav-pagin"),dynamicBullets:o.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,t){var a="";return'
  • '+(a=o.classList.contains("wd-style-number-2")&&(a=e+1)<=9?"0"+a:a)+"
  • "}}),(a=Array.prototype.filter.call(r.querySelector(".wd-carousel-inner").children,e=>e.classList.contains("wd-nav-arrows")).shift())&&(e.navigation={nextEl:a.querySelector(".wd-btn-arrow.wd-next"),prevEl:a.querySelector(".wd-btn-arrow.wd-prev"),disabledClass:"wd-disabled",lockClass:"wd-lock",hiddenClass:"wd-hide"}),(t=Array.prototype.filter.call(r.children,e=>e.classList.contains("wd-nav-scroll")).shift())&&(e.scrollbar={el:t,lockClass:"wd-lock",dragClass:"wd-nav-scroll-drag",scrollbarDisabledClass:"wd-disabled",horizontalClass:"wd-horizontal",verticalClass:"wd-vertical",draggable:!0},e.on.scrollbarDragStart=function(){t.classList.add("wd-grabbing")},e.on.scrollbarDragEnd=function(){t.classList.remove("wd-grabbing")}),void 0!==d.dataset.autoplay&&"yes"===d.dataset.autoplay&&(e.autoplay={delay:d.dataset.speed||5e3,pauseOnMouseEnter:!0}),void 0!==d.dataset.sync_parent_id&&(a=document.querySelector(".wd-carousel[data-sync_child_id="+d.dataset.sync_parent_id+"]"))&&(e.thumbs={swiper:c(a,!0),slideThumbActiveClass:"wd-thumb-active",thumbsContainerClass:"wd-thumbs"}),d.querySelectorAll("link").forEach(function(e){var t=e.cloneNode(!1);r.append(t),t.addEventListener("load",function(){setTimeout(function(){e.remove()},500)},!1)}),a=new wdSwiper(d,e),r&&r.classList.contains("wd-slider")&&a.on("realIndexChange",function(e){setTimeout(function(){d.dispatchEvent(new CustomEvent("wdSlideChange",{detail:{activeIndex:e.realIndex}}))},100)}),window.addEventListener("popstate",function(){document.querySelectorAll(".wd-carousel.wd-initialized").forEach(function(e){void 0===e.swiper&&(e.classList.remove("wd-initialized"),c(e))})}),a}}"undefined"==typeof wdSwiper?console.error("Swiper is not defined"):(document.querySelectorAll(".wd-carousel:not(.scroll-init)").forEach(function(e){c(e)}),void 0!==window.Waypoint&&document.querySelectorAll(".wd-carousel.scroll-init").forEach(function(e){new Waypoint({element:e,handler:function(){e.classList.contains("wd-initialized")&&this.destroy(),c(this.element)},offset:"100%"})}))},window.addEventListener("load",function(){woodmartThemeModule.swiperInit()});