????

Your IP : 18.224.184.62


Current Path : /home/multihiv/www/store/wp-content/themes/js/scripts/wc/
Upload File :
Current File : //home/multihiv/www/store/wp-content/themes/js/scripts/wc/productReviews.min.js

!function(r){woodmartThemeModule.singleProdReviews=function(){let s=r("#reviews");function n(){var e=r(".wd-rating-summary-cont").find(".wd-active");return 0<e.length?e.find(".wd-rating-label").data("rating").toString():""}function t(e=!1,t=!1){var i=r(".commentlist"),i=0<i.length?i.data("reviews-columns"):{};let o={action:"woodmart_filter_review",rating:n(),product_id:s.data("product-id"),order_by:0<s.find(".wd-reviews-sorting-select :checked").length?s.find(".wd-reviews-sorting-select :checked").val():"newest",only_images:r("#wd-with-image-checkbox").is(":checked"),summary_criteria_ids:woodmart_settings.summary_criteria_ids};i.hasOwnProperty("reviews_columns")&&(o.reviews_columns=i.reviews_columns),i.hasOwnProperty("reviews_columns_tablet")&&(o.reviews_columns_tablet=i.reviews_columns_tablet),i.hasOwnProperty("reviews_columns_mobile")&&(o.reviews_columns_mobile=i.reviews_columns_mobile),e&&(o.rating="",o.only_images=!1),r.ajax({url:woodmart_settings.ajaxurl,method:"GET",data:o,beforeSend:function(){var e=s.find("#comments .commentlist");s.find("#comments .wd-loader-overlay").addClass("wd-loading"),t&&s.find(".wd-rating-summary-wrap .wd-loader-overlay").addClass("wd-loading"),e.removeClass("wd-active"),e.removeClass("wd-in")},complete:function(){s.find("#comments .wd-loader-overlay").removeClass("wd-loading"),t&&s.find(".wd-rating-summary-wrap .wd-loader-overlay").removeClass("wd-loading"),setTimeout(function(){s.find("#comments .commentlist").addClass("wd-active")},50),setTimeout(function(){s.find("#comments .commentlist").addClass("wd-in")},100)},success:function(e){(!o.rating??!o.only_images)&&r(".wd-reviews-sorting-clear").addClass("wd-hide"),e.title&&s.find(".woocommerce-Reviews-title").html(e.title),r(document).trigger("woodmart_reviews_sorting_clear",o),e.content&&s.find("#comments .wd-reviews-content").html(e.content),woodmartThemeModule.hasOwnProperty("photoswipeImages")&&"function"==typeof woodmartThemeModule.photoswipeImages&&woodmartThemeModule.photoswipeImages()},error:function(e){console.error(e)}})}s.on("click",".wd-rating-summary-item",function(){if(woodmart_settings.is_rating_summary_filter_enabled&&!r(this).hasClass("wd-empty")){r(this).siblings().removeClass("wd-active"),r(this).toggleClass("wd-active");let i=n();r(document).on("woodmart_reviews_sorting_clear",function(e,t){i?r(".wd-reviews-sorting-clear").removeClass("wd-hide"):r(".wd-reviews-sorting-clear").addClass("wd-hide")}),t(!1,!0)}}).on("click",".wd-reviews-sorting-clear",function(e){e.preventDefault(),r(".wd-rating-summary-item").each(function(){r(this).removeClass("wd-active")}),r(document).on("woodmart_reviews_sorting_clear",function(e,t){r(".wd-reviews-sorting-clear").addClass("wd-hide")}),r("#wd-with-image-checkbox").prop("checked",!1),t(!0,!0)}).on("click","#wd-with-image-checkbox",function(){let i=r(this).is(":checked");r(document).on("woodmart_reviews_sorting_clear",function(e,t){i?r(".wd-reviews-sorting-clear").removeClass("wd-hide"):0===t.rating.length&&r(".wd-reviews-sorting-clear").addClass("wd-hide")}),t()}).on("change",".wd-reviews-sorting-select",function(){t()})},r(document).ready(function(){woodmartThemeModule.singleProdReviews()})}(jQuery);