$(document).ready((function(){"use strict";let e=$(".sidebar-shop"),s=$(".shop-content-overlay"),o=$(".shop-sidebar-toggler"),t=$(".grid-view-btn"),i=$(".list-view-btn"),n=$("#ecommerce-products"),a=$(".cart");o.on("click",(function(){e.toggleClass("show"),s.toggleClass("show")})),$(".shop-content-overlay, .sidebar-close-icon").on("click",(function(){e.removeClass("show"),s.removeClass("show")})),t.on("click",(function(){n.removeClass("list-view").addClass("grid-view"),i.removeClass("active"),t.addClass("active")})),i.on("click",(function(){n.removeClass("grid-view").addClass("list-view"),t.removeClass("active"),i.addClass("active")})),a.on("click",(function(){let e=$(this),s=e.find(".add-to-cart"),o=e.find(".view-in-cart");s.is(":visible")?(s.addClass("d-none"),o.addClass("d-inline-block")):window.location.href=o.attr("href")})),$(".view-in-cart").on("click",(function(e){e.preventDefault()}));let r=$(".checkout-tab-steps"),l=r.show();r.length>0&&($(r).steps({headerTag:"h6",bodyTag:"fieldset",transitionEffect:"fade",titleTemplate:'<span class="step">#index#</span> #title#',enablePagination:!1,onStepChanging:function(e,s,o){return s>o||(s<o&&(l.find(".body:eq("+o+") label.error").remove(),l.find(".body:eq("+o+") .error").removeClass("error")),1===s&&Number($(".form-control.required").val().length)<1&&toastr.warning("Error","Please Enter Valid Details",{positionClass:"toast-top-right"}),l.validate().settings.ignore=":disabled,:hidden",l.valid())}}),$(".place-order, .delivery-address").on("click",(function(){$(".checkout-tab-steps").steps("next",{})})))})),$(window).on("resize",(function(){$(window).outerWidth()>=991&&($(".sidebar-shop").removeClass("show"),$(".shop-content-overlay").removeClass("show"))}));
