!function(l){l.each(["frontend/element_ready/wd_accordion.default","frontend/element_ready/wd_single_product_tabs.default","frontend/element_ready/wd_single_product_reviews.default"],function(e,t){woodmartThemeModule.wdElementorAddAction(t,function(e){woodmartThemeModule.accordion(),l(".wc-tabs-wrapper, .woocommerce-tabs").trigger("init"),e.find("#rating").parent().find("> .stars").remove(),e.find("#rating").trigger("init")})});function o(){l(".tabs-layout-accordion .wd-accordion-title.tab-title-reviews:not(.active)").click()}woodmartThemeModule.accordion=function(){var e=window.location.hash,t=window.location.href;l(".woocommerce-review-link").off("click",o).on("click",o),l(".wd-accordion").each(function(){var a,n,o=l(this),r=o.find("> .wd-accordion-item > .wd-accordion-title"),i=o.find("> .wd-accordion-item > .wd-accordion-content"),c="wd-active",d=o.data("state"),s=300;!o.hasClass("wd-inited")&&(a=function(e){var t=r.filter('[data-accordion-index="'+e+'"]'),e=i.filter('[data-accordion-index="'+e+'"]');t.addClass(c),e.stop(!0,!0).slideDown(s).addClass(c),"first"!==d||o.hasClass("wd-inited")||(e=e.length?e:i.first()).stop(!0,!0).show().css("display","block"),o.addClass("wd-inited"),woodmartThemeModule.$document.trigger("resize.vcRowBehaviour"),woodmartThemeModule.$document.trigger("wood-images-loaded")},n=function(){var e=r.filter("."+c),t=i.filter("."+c);e.removeClass(c),t.stop(!0,!0).slideUp(s).removeClass(c)},"first"===d&&a(r.first().data("accordion-index")),r.off("click").on("click",function(){var t=l(this),e=l(this).data("accordion-index"),o=r.filter('[data-accordion-index="'+e+'"]').hasClass(c),i=t.parent().index(),d=t.parent().siblings().find(".wd-active").parent(".wd-tab-wrapper").index();!t.hasClass("wd-active")&&-1!==i||(d=i),o||t.hasClass(c)?n():(n(),a(e),r.filter('[data-accordion-index="'+e+'"]').length||(t.addClass(c),t.siblings(".wd-accordion-content").stop(!0,!0).slideDown(s).addClass(c))),(t.parents(".tabs-layout-accordion").length||t.parents(".wd-single-tabs").length)&&setTimeout(function(){var e;woodmartThemeModule.$window.width()<1024&&d<i&&(e=0<(e=l(".whb-sticky-header")).length?e.outerHeight():0,l("html, body").animate({scrollTop:t.offset().top-t.outerHeight()-e-50},500))},s)}),0<=e.toLowerCase().indexOf("comment-")||"#reviews"===e||"#tab-reviews"===e||0<t.indexOf("comment-page-")||0<t.indexOf("cpage="))&&o.find(".tab-title-reviews").trigger("click")})},l(document).ready(function(){woodmartThemeModule.accordion()})}(jQuery);