File: /home/salamatk/takarzan.ir/wp-content/themes/xts-luman/js/scripts/productsTabs.min.js
(i=>{XTSThemeModule.xtsElementorAddAction("frontend/element_ready/xts_product_tabs.default",function(){XTSThemeModule.productsTabs(),XTSThemeModule.$document.trigger("xtsElementorProductTabsReady"),XTSThemeModule.$document.trigger("xts_countDownTimer")}),XTSThemeModule.productsTabs=function(){var d=!1,o=(i(".xts-products-tabs").each(function(){var t=i(this),n=t.find(".xts-products-tab-content"),s=[];s[0]={html:n.html()},t.find(".xts-products-tab-title").on("click",function(t){t.preventDefault();var t=i(this),e=t.data("atts"),a=t.index();d||t.hasClass("xts-active")||(d=!0,o(e,a,n,t,s,function(t){var a,s=[];t.html&&(n.html(t.html),0<n.find(".xts-products.xts-in-view-animation").length&&(n.find(".xts-products").removeClass("xts-inited xts-loaded"),void 0!==i.fn.waypoint)&&n.find(".xts-col").each(function(){var t=i(this);t.data("xts-waypoint","inited"),t.waypoint(function(){var t=i(i(this)[0].element),e=t.parents(".xts-in-view-animation").data("animation-delay");t.addClass("xts-animation-ready"),s.push(t),function t(e){a=a||window.setInterval(function(){s.length?(i(s.shift()).addClass("xts-animated"),t(e)):(window.clearInterval(a),a=null)},e)}(e)},{offset:"90%"})}),XTSThemeModule.$document.trigger("xtsProductTabLoaded"),XTSThemeModule.$document.trigger("xtsImagesLoaded"))}))})}),function(t,e,a,s,n,o){s.parent().find(".xts-active").removeClass("xts-active"),s.addClass("xts-active"),n[e]?(a.addClass("xts-loading"),setTimeout(function(){o(n[e]),a.removeClass("xts-loading"),d=!1},300)):(a.addClass("xts-loading").parent().addClass("xts-loading"),s.addClass("xts-loading"),i.ajax({url:xts_settings.ajaxurl,data:{atts:t,action:"xts_get_products_tab_element"},dataType:"json",method:"POST",success:function(t){n[e]=t,o(t)},error:function(){console.log("ajax error")},complete:function(){a.removeClass("xts-loading").parent().removeClass("xts-loading"),s.removeClass("xts-loading"),d=!1}}))})},i(document).ready(function(){XTSThemeModule.productsTabs()})})(jQuery);