(()=>{var e={32:()=>{var e;0!==(e=jQuery)(".learndash-course-reviews-stars-input").length&&e(document).on("change",".learndash-course-reviews-stars-input .review-star input",function(){let s=-1;e(this).prop("checked")&&(s=parseInt(e(this).val())-1),e(this).closest(".learndash-course-reviews-stars-input").find(" .review-star").each(function(r,a){r>s?e(a).removeClass("active"):e(a).addClass("active")})})}},s={};function r(a){var t=s[a];if(void 0!==t)return t.exports;var i=s[a]={exports:{}};return e[a](i,i.exports,r),i.exports}(()=>{"use strict";var e,s;r(32),e=jQuery,s=learndashCourseReviews,e('form[name="learndash_course_reviews"]').length<1||e(document).on("submit",'form[name="learndash_course_reviews"]',function(r){r.preventDefault();const a=function(e){const s={};for(const r in e)s[e[r].name]=e[r].value;return s}(e(this).serializeArray()),t=this,i=e(t).find('input[type="submit"]'),n=i.val();i.val(i.data("saving_text")).attr("disabled",!0).addClass("disabled"),e.ajax({method:"POST",url:s.restURL+"addReview/"+a.course_id,data:a,cache:!1,success(s){i.val(n).attr("disabled",!1).removeClass("disabled"),t.reset(),e(t).find(".learndash-course-reviews-stars-input input").trigger("change"),window.location.href=window.location.href.replace(/#.*?$/g,"")+"#ld-review-"+s.comment_id,window.location.reload(!0)},error(s){const r=JSON.parse(s.responseText);if(void 0!==r.html){const s=e(t).closest(".learndash-course-reviews-form").find(".notices-container");s.append(r.html),s[0].scrollIntoView({behavior:"smooth"})}else void 0!==r.message&&console.error(r.message);i.val(n).attr("disabled",!1).removeClass("disabled")}})})})()})();