PageSourceSearch

https://velocitygrowth.com/wp-content/plugins/tutor/assets/js/tutor-front.min.js?ver=2.2.3

js velocitygrowth.com collected 2026-10-04 08:53:18 UTC 95,653 bytes, 11 lines download raw bytes

1(()=>{var n={3676:()=>{window.readyState_complete=function(e){var r=function t(e){return e()};document.addEventListener("readystatechange",function(t){return t.target.readyState==="complete"?typeof e=="function"?setTimeout(function(){return r(e)}):"":""})};window.addBodyClass=function(t){var e=new URL(t);var r=e.searchParams.get("tab_page");var n=e.searchParams.get("edit")&&"_edit";document.body.classList.add(r);document.body.classList.add(r+n)};window.selectorById=function(t){return document.getElementById(t)};window.selectorByClass=function(t){return document.getElementsByClassName(t)};window.json_download=function(t,e){var r=new Blob([t],{type:"application/json"});var n=document.createElement("a");n.href=URL.createObjectURL(r);n.download=e;n.click()}},4367:()=>{window.selectSearchField=function(t){var r=document.querySelectorAll(t);(function(){r.forEach(function(o){if(o&&!o.classList.contains("tutor-js-form-select")&&!o.hasAttribute("noDropdown")&&!o.classList.contains("no-tutor-dropdown")){var t=o.options[o.selectedIndex];o.style.display="none";var i,e,r,a,n,u,c,s;o.insertAdjacentHTML("afterend",h(o.options));i=o.nextElementSibling;e=i.querySelector(".tutor-form-select-search");r=e&&e.querySelector("input");s=i.querySelector(".tutor-form-select-dropdown");var l=i.querySelector(".tutor-form-select-label");l.innerText=t&&t.text;i.onclick=function(t){t.stopPropagation();f(document.querySelectorAll(".tutor-js-form-select"));i.classList.toggle("is-active");setTimeout(function(){r.focus()},100);s.onclick=function(t){t.stopPropagation()}};f(document.querySelectorAll(".tutor-js-form-select"));n=e.nextElementSibling;u=n&&n.querySelectorAll(".tutor-form-select-option");if(u){u.forEach(function(t){t.onclick=function(n){n.stopPropagation();var t=Array.from(o.options);t.forEach(function(t,e){if(t.value===n.target.dataset.key){i.classList.remove("is-active");l.innerText=n.target.innerText;l.dataset.value=t.value;o.value=t.value;var r=document.getElementById("save_tutor_option");if(r){r.disabled=false}}});var e=new Event("change",{bubbles:true});o.dispatchEvent(e)}})}var d=function t(e){var r=0;e.forEach(function(t){if(t.style.display!=="none"){r+=1}});return r};r.oninput=function(t){var e,r=false;a=t.target.value.toUpperCase();u.forEach(function(t){c=t.querySelector("[tutor-dropdown-item]");e=c.textContent||c.innerText;if(e.toUpperCase().indexOf(a)>-1){t.style.display="";r="false"}else{r="true";t.style.display="none"}});var n='\n                    <div class="tutor-form-select-option noItem">\n                        No item found\n                    </div>\n                    ';var o=s.querySelector(".tutor-form-select-options");if(0==d(u)){var i=false;o.querySelectorAll(".tutor-form-select-option").forEach(function(t){if(t.classList.contains("noItem")==true){i=true}});if(false==i){o.insertAdjacentHTML("beforeend",n);i=true}}else{if(null!==s.querySelector(".noItem")){s.querySelector(".noItem").remove()}}}}});var t=document.querySelectorAll(".tutor-js-form-select");t.forEach(function(t){if(t.nextElementSibling){if(t.nextElementSibling.classList.contains("tutor-js-form-select")){t.nextElementSibling.remove()}}});var e=document.querySelectorAll(".tutor-js-form-select");document.onclick=function(t){f(e)}})();function f(t){if(t){t.forEach(function(t){t.classList.remove("is-active")})}}function h(t){var e="";Array.from(t).forEach(function(t){e+='\n            <div class="tutor-form-select-option">\n\t\t\t\t<span tutor-dropdown-item data-key="'.concat(t.value,'" class="tutor-nowrap-ellipsis" title="').concat(t.text,'">').concat(t.text,"</span>\n            </div>\n            ")});var r='\n      <div class="tutor-form-control tutor-form-select tutor-js-form-select">\n\t\t\t<span class="tutor-form-select-label" tutor-dropdown-label>'.concat(window.wp.i18n.__("Select","tutor"),'</span>\n            <div class="tutor-form-select-dropdown">\n\t\t\t\t<div class="tutor-form-select-search tutor-pt-8 tutor-px-8">\n\t\t\t\t\t<div class="tutor-form-wrap">\n\t\t\t\t\t\t<span class="tutor-form-icon"><i class="tutor-icon-search" area-hidden="true"></i></span>\n\t\t\t\t\t\t<input type="search" class="tutor-form-control" placeholder="Search ..." />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n                <div class="tutor-form-select-options">\n                    ').concat(e,"\n                </div>\n            </div>\n        </div>\n        ");return r}};selectSearchField(".tutor-form-select")},1103:()=>{window.jQuery(document).ready(function(i){i("div.tutor-lesson-wrapper [data-mce-style]").each(function(){i(this).attr("style",i(this).attr("data-mce-style"));i(this).removeAttr("data-mce-style")}
1);i(document).on("click",'.tutor-single-course-lesson-comments button[type="submit"]',function(t){t.preventDefault();var e=wp.i18n.__;var r=i(this);var o=r.closest("form");var n=o.serialize();i.ajax({url:_tutorobject.ajaxurl,type:"POST",data:n,beforeSend:function t(){r.addClass("is-loading").prop("disabled",true)},complete:function t(){r.removeClass("is-loading");r.removeAttr("disabled")},success:function t(e){var r=o.attr("tutor-comment-reply");if(typeof r!=="undefined"&&r!==false){o.before(e.data.html)}else{var n=document.querySelector(".tutor-course-spotlight-comments");n.innerHTML=e.data.html}i(".tutor-comment-line").css("height","calc(100% - 308px)");i("textarea").val("")},error:function t(e){r.removeClass("is-loading").prop("disabled",false)}})})})},818:()=>{window.jQuery(document).ready(function(t){if(t.fn.ShareLink){var e=t(".tutor-social-share-wrap");if(e.length){var r=JSON.parse(e.attr("data-social-share-config"));e.find(".tutor_share").ShareLink({title:r.title,text:r.text,image:r.image,class_prefix:"s_",width:640,height:480})}}})},6470:()=>{window.jQuery(document).ready(function(f){var h=window.wp.i18n.__;if(f(".tutor-quiz-wrap").length){if(!f(".tutor-table-quiz-attempts").length&&!f(".tutor-quiz-attempt-details").length){f(".tutor-course-topic-single-footer").remove()}}var p=f("#tutor-quiz-time-update");if(p.length){var t=JSON.parse(p.attr("data-attempt-settings"));var v=JSON.parse(p.attr("data-attempt-meta"));if(v.time_limit.time_limit_seconds>0){var e,r;var m=new Date((e=t.attempt_started_at)===null||e===void 0?void 0:e.replaceAll("-","/")).getTime()+v.time_limit.time_limit_seconds*1e3;var g=new Date((r=v.date_time_now)===null||r===void 0?void 0:r.replaceAll("-","/")).getTime();var y=setInterval(function(){var t=m-g;var e=Math.floor(t/(1e3*60*60*24));var r=Math.floor(t%(1e3*60*60*24)/(1e3*60*60));var n=Math.floor(t%(1e3*60*60)/(1e3*60));var o=Math.floor(t%(1e3*60)/1e3);var i="";e?i+=e+"d ":0;i+=(r||0)+"h ";i+=(n||0)+"m ";i+=(o||0)+"s ";if(t<0){clearInterval(y);p.toggleClass("tutor-quiz-time-expired");i="EXPIRED";if(_tutorobject.quiz_options.quiz_when_time_expires==="auto_submit"){f("form#tutor-answering-quiz").submit()}else{f(".tutor-quiz-answer-next-btn, .tutor-quiz-submit-btn, .tutor-quiz-answer-previous-btn").prop("disabled",true);f(".time-remaining span").css("color","#F44337");f.ajax({url:_tutorobject.ajaxurl,type:"POST",data:{quiz_id:f("#tutor_quiz_id").val(),action:"tutor_quiz_timeout"},success:function t(e){var r=f("#tutor-quiz-time-expire-wrapper").data("attempt-allowed");var n=f("#tutor-quiz-time-expire-wrapper").data("attempt-remaining");var o="#tutor-quiz-time-expire-wrapper";f(o).addClass("tutor-alert-show");if(n>0){f("".concat(o," .tutor-quiz-alert-text")).html(h("Your time limit for this quiz has expired, please reattempt the quiz. Attempts remaining:","tutor")+" "+n+"/"+r)}else{if(f(o).hasClass("time-remaining-warning")){f(o).removeClass("time-remaining-warning");f(o).addClass("time-over")}if(f("".concat(o," .flash-info span:first-child")).hasClass("tutor-icon-circle-info")){f("".concat(o," .flash-info span:first-child")).removeClass("tutor-icon-circle-info");f("".concat(o," .flash-info span:first-child")).addClass("tutor-icon-circle-times-line")}p.toggleClass("tutor-quiz-time-expired");f("#tutor-start-quiz").hide();f("".concat(o," .tutor-quiz-alert-text")).html("".concat(h("Unfortunately, you are out of time and quiz attempts. ","tutor")))}},complete:function t(){}})}}g=g+1e3;p.html(i);if(i=="EXPIRED"){p.addClass("color-text-error")}if(t){var a=t/1e3;var u=v.time_limit.time_limit_seconds;var c=Math.ceil(a*100/u);var s=document.querySelector(".quiz-time-remaining-progress-circle");var l=document.querySelector(".quiz-time-remaining-progress-circle svg");if(l&&s){var d=44-44*(c/100);if(c<=0){c=0;s.innerHTML='<svg viewBox="0 0 50 50" width="50" height="50">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<circle cx="0" cy="0" r="11"></circle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>';s.setAttribute("class","quiz-time-remaining-expired-circle")}l.setAttribute("style","stroke-dashoffset: ".concat(d,";"))}}},1e3)}else{p.html(h("No Limit","tutor"))}}var n=f("form#tutor-start-quiz");if(n.length){if(_tutorobject.quiz_options.quiz_auto_start==1){n.submit()}}})},3419:()=>{window.jQuery(document).ready(function(l){var u=window.wp.i18n.__;var t=_tutorobject.quiz_options;function d(){return Number(_tutorobject.quiz_answer_display_time)||2e3}function f(){return"reveal"===t.feedback_mode}function c(){return _tutorobject.quiz_options.question_layout_view}function s(t){return'<span class="tutor-quiz-answer-single-info tutor-color-success tutor-mt-8">\n            <i class="tutor-icon-mark tutor-color-success" area-hidden="true"></i>\n            '.concat(t,"\n        </span>")}function h(t){var o=false;var i=JSON.parse(window.tutor_quiz_context.split("").reverse().join(""));!Array.isArray(i)?i=[]:0;if(c()!=="question_below_each_other"){l(".tutor-quiz-answer-single-info").remove()}l(".tutor-quiz-answer-single").removeClass("tutor-quiz-answer-single-correct tutor-quiz-answer-single-incorrect");var a=true;var e=t.find("input");var r=t.find('input[type="radio"]:checked, input[type="checkbox"]:checked');if(f()){r.each(function(){var t=l(this);var e=i.indexOf(t.val())>-1;if(!e){a=false}});e.each(function(){var t=l(this);var e=t.attr("type");if(e==="radio"||e==="checkbox"){var r=i.indexOf(t.val())>-1;var n=t.is(":checked");if(r){t.closest(".tutor-quiz-answer-single").addClass("tutor-quiz-answer-single-correct").append(s(u("Correct Answer","tutor"))).find(".tutor-quiz-answer-single-info:eq(1)").remove()}else{if(t.prop("checked")){t.closest(".tutor-quiz-answer-single").addClass("tutor-quiz-answer-single-incorrect")}}if(r&&!n){t.attr("disabled","disabled");a=false;o=true}}})}if(a){o=true}return o}function p(r){var n=true;var t=r.find(".quiz-answer-required");if(t.length){var e=t.find("input");if(e.length){var o=e.attr("type");if(o==="radio"){if(t.find('input[type="radio"]:checked').length==0){r.find(".answer-help-block").html('<p style="color: #dc3545">'.concat(u("Please select an option to answer","tutor"),"</p>"));n=false}}else if(o==="checkbox"){if(t.find('input[type="checkbox"]:checked').length==0){r.find(".answer-help-block").html('<p style="color: #dc3545">'.concat(u("Please select at least one option to answer.","tutor"),"</p>"));n=false}}else if(o==="text"){e.each(function(t,e){if(!l(e).val().trim().length){r.find(".answer-help-block").html('<p style="color: #dc3545">'.concat(u("The answer for this question is required","tutor"),"</p>"));n=false}})}}if(t.find("textarea").length){if(t.find("textarea").val().trim().length<1){r.find(".answer-help-block").html('<p style="color: #dc3545">'.concat(u("The answer for this question is required","tutor"),"</p>"));n=false}}}return n}
1l(".tutor-quiz-next-btn-all").prop("disabled",false);l(".quiz-attempt-single-question input").filter('[type="radio"], [type="checkbox"]').change(function(){l(".tutor-quiz-next-btn-all").prop("disabled",false)});l(document).on("click",".tutor-quiz-answer-next-btn, .tutor-quiz-answer-previous-btn",function(t){t.preventDefault();var e=l(".tutor-quiz-question-counter>span:first-child");var r=parseInt(l(this).closest("[data-question_index]").data("question_index"));if(l(this).hasClass("tutor-quiz-answer-previous-btn")){l(this).closest(".quiz-attempt-single-question").hide().prev().show();e.text(r-1);return}var n=l(this);var o=n.closest(".quiz-attempt-single-question");var i=p(o);if(!i){return}var a=h(o);if(!f()){if(!a){return}}var u=parseInt(n.closest(".quiz-attempt-single-question").attr("id").match(/\d+/)[0],10);var c=n.closest(".quiz-attempt-single-question").attr("data-next-question-id");console.log("next question ".concat(c));if(c){var s=l(c);if(s&&s.length){if(f()){setTimeout(function(){l(".quiz-attempt-single-question").hide();s.show()},d())}else{l(".quiz-attempt-single-question").hide();s.show()}if(l(".tutor-quiz-questions-pagination").length){l(".tutor-quiz-question-paginate-item").removeClass("active");l('.tutor-quiz-questions-pagination a[href="'+c+'"]').addClass("active")}e.text(r+1)}}});l(document).on("click",".tutor-quiz-question-paginate-item",function(t){t.preventDefault();var e=l(this);var r=l(e.attr("href"));l(".quiz-attempt-single-question").hide();r.show();l(".tutor-quiz-question-paginate-item").removeClass("active");e.addClass("active")});l(document).on("keyup","textarea.question_type_short_answer, textarea.question_type_open_ended",function(t){var e=l(this);var r=e.val();var n=e.hasClass("question_type_short_answer")?_tutorobject.quiz_options.short_answer_characters_limit:_tutorobject.quiz_options.open_ended_answer_characters_limit;var o=n-r.length;if(o<1){e.val(r.substr(0,n));o=0}e.closest(".tutor-quiz-answers-wrap").find(".characters_remaining").html(o)});l(document).on("submit","#tutor-answering-quiz",function(t){t.preventDefault();var e=l(".quiz-attempt-single-question");var r=document.querySelector(".tutor-quiz-submit-btn");var n=l(t.target);var o=true;var i=true;if(e.length){e.each(function(t,e){o=p(l(e));i=h(l(e))})}if(o&&i){var a=500;if(f()&&c()==="question_below_each_other"){a=d();n.find(":submit").addClass("is-loading").attr("disabled","disabled")}setTimeout(function(){t.target.submit()},a)}else{if(r){r.classList.remove("is-loading");r.disabled=false}}});l(".tutor-quiz-submit-btn").click(function(t){var e=this;t.preventDefault();if(f()){var r=l(".quiz-attempt-single-question");var n=true;if(r.length){r.each(function(t,e){n=p(l(e));n=h(l(e))})}l(this).attr("disabled","disabled");setTimeout(function(){l(e).addClass("is-loading");l("#tutor-answering-quiz").submit()},d())}else{l(this).attr("disabled","disabled").addClass("is-loading");l("#tutor-answering-quiz").submit()}});var o=l("#tutor-quiz-time-update");l(document).on("click","a",function(t){var r=l(this).attr("href");if(t.target.classList.contains("sidebar-ask-new-qna-btn")||t.target.classList.contains("tutor-quiz-question-paginate-item")){return}if(o.length>0&&o.text()!="EXPIRED"){t.preventDefault();t.stopImmediatePropagation();var n;var e={title:u("Abandon Quiz?","tutor"),description:u("Do you want to abandon this quiz? The quiz will be submitted partially up to this question if you leave this page.","tutor"),buttons:{keep:{title:u("Yes, leave quiz","tutor"),id:"leave",class:"tutor-btn tutor-btn-outline-primary",callback:function t(){var e=l("form#tutor-answering-quiz").serialize()+"&action="+"tutor_quiz_abandon";l.ajax({url:window._tutorobject.ajaxurl,type:"POST",data:e,beforeSend:function t(){document.querySelector("#tutor-popup-leave").innerHTML=u("Leaving...","tutor")},success:function t(e){if(e.success){location.href=r}else{alert(u("Something went wrong","tutor"))}},error:function t(){alert(u("Something went wrong","tutor"));n.find("[data-tutor-modal-close]").click()}})}},reset:{title:u("Stay here","tutor"),id:"reset",class:"tutor-btn tutor-btn-primary tutor-ml-20",callback:function t(){n.find("[data-tutor-modal-close]").click()}}}};n=new window.tutor_popup(l,"").popup(e)}});l("body").on("submit","form#tutor-start-quiz",function(){l(this).find("button").prop("disabled",true)})})}
1,7942:()=>{window.jQuery(document).ready(function(n){var t=wp.i18n.__;n(document).on("click",".tutor-course-wishlist-btn",function(t){t.preventDefault();var r=n(this);var e=r.attr("data-course-id");n.ajax({url:_tutorobject.ajaxurl,type:"POST",data:{course_id:e,action:"tutor_course_add_to_wishlist"},beforeSend:function t(){r.attr("disabled","disabled").addClass("is-loading")},success:function t(e){if(e.success){if(e.data.status==="added"){r.find("i").addClass("tutor-icon-bookmark-bold").removeClass("tutor-icon-bookmark-line")}else{r.find("i").addClass("tutor-icon-bookmark-line").removeClass("tutor-icon-bookmark-bold")}}else{n(".tutor-login-modal").addClass("tutor-is-active")}},complete:function t(){r.removeAttr("disabled").removeClass("is-loading")}})})})},7723:()=>{window.jQuery(document).ready(function(t){t(document).on("added_to_cart",function(t,e,r,n){n.removeClass("is-loading");n.siblings("a.added_to_cart").addClass("tutor-btn tutor-btn-outline-primary tutor-btn-md tutor-btn-block").prepend('<span class="tutor-icon-cart-line tutor-mr-8"></span>')});t(document).on("adding_to_cart",function(t,e){e.addClass("is-loading");setTimeout(function(){e.removeClass("is-loading")},4e3)})})},1626:()=>{function l(e,t){var r=typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&typeof e.length==="number"){if(r)e=r;var n=0;var o=function t(){};return{s:o,n:function t(){if(n>=e.length)return{done:true};return{done:false,value:e[n++]}},e:function t(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i=true,a=false,u;return{s:function t(){r=r.call(e)},n:function t(){var e=r.next();i=e.done;return e},e:function t(e){a=true;u=e},f:function t(){try{if(!i&&r["return"]!=null)r["return"]()}finally{if(a)throw u}}}}function c(t,e){if(!t)return;if(typeof t==="string")return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}function n(t,e){if(e==null||e>t.length)e=t.length;for(var r=0,n=new Array(e);r<e;r++){n[r]=t[r]}return n}document.addEventListener("DOMContentLoaded",function(){var t=wp.i18n,e=t.__,r=t._x,n=t._n,o=t._nx;var i=document.querySelectorAll(".tutor-export-purchase-history");var a=l(i),u;try{for(a.s();!(u=a.n()).done;){var c=u.value;if(c){c.onclick=function(t){var e=t.currentTarget;var r="order-".concat(e.dataset.order,"-purchase-history.csv");var n=[{"Order ID ":e.dataset.order,"Course Name":e.dataset.courseName,Price:e.dataset.price,Date:e.dataset.date,Status:e.dataset.status}];s(n,r)}}}}catch(t){a.e(t)}finally{a.f()}function s(t,e){var r=Object.keys(t[0]);var n=[r.join(","),t.map(function(e){return r.map(function(t){return e[t]}).join(",")}).join("\n")].join("\n");var o=new Blob([n],{type:"text/csv;charset=utf-8"});var i=URL.createObjectURL(o);var a=document.createElement("a");a.setAttribute("href",i);a.setAttribute("download",e);a.style.visibility="hidden";document.body.appendChild(a);a.click();document.body.removeChild(a)}})},6966:()=>{document.addEventListener("DOMContentLoaded",function(){var e=window.jQuery;e(".tutor-dashboard .tutor-dashboard-menu-toggler").click(function(){var t=e(".tutor-dashboard-left-menu");t.closest(".tutor-dashboard").toggleClass("is-sidebar-expanded");if(t.css("display")!=="none"){t.get(0).scrollIntoView({block:"start"})}})})},6344:(t,e,r)=>{var n=r(3632),i=n.get_response_message;window.jQuery(document).ready(function(o){o('.tutor-settings-pass-field [name="confirm_new_password"]').on("input",function(){var t=o('[name="new_password"]');var e=(t.val()||"").trim();var r=e&&o(this).val()===e;o(this).parent().find(".tutor-validation-icon")[r?"show":"hide"]()});o(".tutor-profile-password-reset").click(function(t){t.preventDefault();var e=o(this);var r=e.closest("form");var n=r.serializeObject();n.action="tutor_profile_password_reset";o.ajax({url:_tutorobject.ajaxurl,type:"POST",data:n,beforeSend:function t(){e.addClass("is-loading")},success:function t(e){var t=e.success;if(t){window.tutor_toast("Success",i(e),"success");window.location.reload()}else{window.tutor_toast("Error",i(e),"error")}},complete:function t(){e.removeClass("is-loading")}})})})},1974:(t,e,r)=>{var n=r(3632),i=n.get_response_message;var o=function t(e){var r=new RegExp("^(https?:\\/\\/)?"+"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|"+"((\\d{1,3}\\.){3}\\d{1,3}))"+"(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*"+"(\\?[;&a-z\\d%_.~+=-]*)?"+"(\\#[-a-z\\d_]*)?$","i");return!!r.test(e)};var c=function t(d,f,h){var e=new FileReader;e.addEventListener("load",function(){var l=new Image;l.addEventListener("load",function(){var t=l.width,e=l.height;var r=0;var n=0;var o=t;var i=e;if(f.width==f.height){r=t>e?(t-e)/2:0;n=e>t?(e-t)/2:0;o=t>e?e:t;i=e>t?t:e}f.height=f.height||e/t*f.width;var a=f.width>t?t:f.width;var u=f.width>t?e:f.height;var c=document.createElement("canvas");c.width=a;c.height=u;var s=c.getContext("2d");s.drawImage(l,r,n,o,i,0,0,c.width,c.height);c.toBlob(function(t){t.name=d.name;t.lastModified=d.lastModified;var e=new FileReader;e.addEventListener("load",function(){h(t,e.result)});
1e.readAsDataURL(t)},"image/jpeg")});l.src=e.result});e.readAsDataURL(d)};window.jQuery(document).ready(function(a){var u=wp.i18n.__;var t=function t(o){this.dialogue_box=o.find("#tutor_photo_dialogue_box");this.open_dialogue_box=function(t){this.dialogue_box.attr("name",t);this.dialogue_box.trigger("click")};this.upload_selected_image=function(o,t){var e=tutor_get_nonce_data(true);var r=this;r.toggle_loader(o,true);var n=new FormData;n.append("action","tutor_user_photo_upload");n.append("photo_type",o);n.append("photo_file",t,t.name);n.append(e.key,e.value);var i=this;a.ajax({url:window._tutorobject.ajaxurl,data:n,type:"POST",processData:false,contentType:false,error:r.error_alert,success:function t(){var e=i.title_capitalize(o.replace("_"," "));var r=u("Success","tutor");var n=e+" Changed Successfully!";if("Profile Photo"===e){n=u("Profile Photo Changed Successfully!","tutor")}if("Cover Photo"===e){n=u("Cover Photo Changed Successfully!","tutor")}tutor_toast(r,n,"success")},complete:function t(){r.toggle_loader(o,false)}})};this.title_capitalize=function(t){var e=t.split(" ");for(var r=0;r<e.length;r++){e[r]=e[r].charAt(0).toUpperCase()+e[r].slice(1)}return e.join(" ")};this.accept_upload_image=function(e,r){var t=r.currentTarget.files[0]||null;e.update_preview(r.currentTarget.name,t);c(t,{width:1200},function(t){e.upload_selected_image(r.currentTarget.name,t)});a(r.currentTarget).val("")};this.delete_image=function(e){var r=this;r.toggle_loader(e,true);a.ajax({url:window._tutorobject.ajaxurl,data:{action:"tutor_user_photo_remove",photo_type:e},type:"POST",error:r.error_alert,complete:function t(){r.toggle_loader(e,false)}})};this.update_preview=function(t,e){var r=o.find(t=="cover_photo"?"#tutor_cover_area":"#tutor_profile_area");if(!e){r.css("background-image","url("+r.data("fallback")+")");this.delete_image(t);return}var n=new FileReader;n.onload=function(t){r.css("background-image","url("+t.target.result+")")};n.readAsDataURL(e)};this.toggle_profile_pic_action=function(t){var e=t===undefined?"toggleClass":t?"addClass":"removeClass";o[e]("pop-up-opened")};this.error_alert=function(){tutor_toast("Error","Maximum file size exceeded!","error")};this.toggle_loader=function(t,e){o.find("#tutor_photo_meta_area .loader-area").css("display",e?"block":"none")};this.initialize=function(){var e=this;this.dialogue_box.change(function(t){e.accept_upload_image(e,t)});o.find("#tutor_profile_area .tutor_overlay, #tutor_pp_option>div:last-child").click(function(){e.toggle_profile_pic_action()});o.find(".tutor_cover_uploader").click(function(){e.open_dialogue_box("cover_photo")});o.find(".tutor_pp_uploader").click(function(){e.open_dialogue_box("profile_photo")});o.find(".tutor_cover_deleter").click(function(){e.update_preview("cover_photo",null)});o.find(".tutor_pp_deleter").click(function(){e.update_preview("profile_photo",null)})}};var e=a("#tutor_profile_cover_photo_editor");e.length>0?new t(e).initialize():0;a(".tutor-profile-settings-save").click(function(t){t.preventDefault();var e=a(this);var r=e.closest("form");var n=r.serializeObject();var o=document.querySelector("[name=phone_number]");if(n.phone_number&&!n.phone_number.match(/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im)){o.classList.add("invalid");tutor_toast("Invalid","Invalid phone number","error");o.focus();return false}else{o.classList.remove("invalid")}n.action="tutor_update_profile";a.ajax({url:_tutorobject.ajaxurl,type:"POST",data:n,beforeSend:function t(){e.addClass("is-loading")},success:function t(e){var t=e.success;if(t){window.tutor_toast("Success",i(e),"success")}else{window.tutor_toast("Error",i(e),"error")}},complete:function t(){e.removeClass("is-loading")}})})})},787:()=>{document.addEventListener("DOMContentLoaded",function(){var n=window.jQuery;n('.tutor-dashboard-setting-withdraw input[name="tutor_selected_withdraw_method"]').on("change",function(t){var e=n(this);var r=e.closest("form");r.find(".withdraw-method-form").hide();r.find(".withdraw-method-form").hide().filter('[data-withdraw-form="'+e.val()+'"]').show()})})},9834:()=>{window.jQuery(document).ready(function(o){var i=window.wp.i18n.__;
1o(".tutor-course-retake-button").prop("disabled",false).click(function(t){t.preventDefault();var e=o(this).attr("href");var r=o(this).data("course_id");var n={title:i("Override Previous Progress","tutor"),description:i("Before continue, please decide whether to keep progress or reset.","tutor"),buttons:{reset:{title:i("Reset Data","tutor"),class:"tutor-btn tutor-btn-primary",callback:function t(e){o.ajax({url:window._tutorobject.ajaxurl,type:"POST",data:{action:"tutor_reset_course_progress",course_id:r},beforeSend:function t(){e.prop("disabled",true).addClass("is-loading")},success:function t(e){if(e.success){window.location.assign(e.data.redirect_to)}else{alert((e.data||{}).message||i("Something went wrong","tutor"))}},complete:function t(){e.prop("disabled",false).removeClass("is-loading")}})}},keep:{title:i("Keep Data","tutor"),class:"tutor-btn tutor-btn-outline-primary tutor-ml-20",attr:"data-tutor-modal-close",callback:function t(){window.location.assign(e)}}}};new window.tutor_popup(o,"icon-gear").popup(n)})});readyState_complete(function(){var t=document.querySelector(".tutor-video-player .loading-spinner");if(null!==t){t.remove()}})},1033:()=>{function d(e,t){var r=typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&typeof e.length==="number"){if(r)e=r;var n=0;var o=function t(){};return{s:o,n:function t(){if(n>=e.length)return{done:true};return{done:false,value:e[n++]}},e:function t(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i=true,a=false,u;return{s:function t(){r=r.call(e)},n:function t(){var e=r.next();i=e.done;return e},e:function t(e){a=true;u=e},f:function t(){try{if(!i&&r["return"]!=null)r["return"]()}finally{if(a)throw u}}}}function c(t,e){if(!t)return;if(typeof t==="string")return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}function n(t,e){if(e==null||e>t.length)e=t.length;for(var r=0,n=new Array(e);r<e;r++){n[r]=t[r]}return n}jQuery(document).ready(function(c){var t=wp.i18n,u=t.__,e=t._x,r=t._n,n=t._nx;c("[tutor-instructors]").each(function(){var a=c(this);var u={};var e;var t=document.querySelector(".tutor-ratings-stars i.is-active");var r=0;if(t){r=t.dataset.value}function i(t,e,r){var n=a.find("[tutor-instructors-content]");var o=n.html();var i=a.data();i.current_page=r||1;t?u[t]=e:u={};u.attributes=i;u.action="load_filtered_instructor";n.html('<div class="tutor-spinner-wrap"><span class="tutor-spinner" area-hidden="true"></span></div>');c.ajax({url:window._tutorobject.ajaxurl,data:u,type:"POST",success:function t(e){n.html((e.data||{}).html)},error:function t(){n.html(o);tutor_toast("Failed","Request Error","error")}})}a.on("change",'[tutor-instructors-filter-category] [type="checkbox"]',function(){var t={};c(this).closest("[tutor-instructors-filter-category]").find("input:checked").each(function(){t[c(this).val()]=c(this).parent().text()});var e=Object.keys(t);i(c(this).attr("name"),e)}).on("click","[tutor-instructors-filter-rating]",function(t){var e=t.target.dataset.value;if(e!=r){i("rating_filter",e)}r=e}).on("change","[tutor-instructors-filter-sort]",function(t){var e=t.target.value;i("short_by",e)}).on("input","[tutor-instructors-filter-search]",function(){var t=c(this).val();e?window.clearTimeout(e):0;e=window.setTimeout(function(){i("keyword",t);e=null},500)}).on("click","[data-page_number]",function(t){t.preventDefault();i(null,null,c(this).data("page_number"))}).on("click","[tutor-instructors-filter-clear]",function(){var t=c(this).closest("[tutor-instructors-filters]");t.find('input[type="checkbox"]').prop("checked",false);t.find("[tutor-instructors-filter-search]").val("");var e=document.querySelectorAll("[tutor-instructors-filter-rating]");var r=d(e),n;try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.classList.contains("active")){o.classList.remove("active")}if(o.classList.contains("tutor-icon-star-bold")){o.classList.remove("tutor-icon-star-bold");o.classList.add("tutor-icon-star-line")}}}catch(t){r.e(t)}finally{r.f()}l.innerHTML="";i()})});var s=document.querySelectorAll("[tutor-instructors-filter-rating]");var l=document.querySelector("[tutor-instructors-filter-rating-count]");var o=d(s),i;try{for(o.s();!(i=o.n()).done;){var a=i.value;a.onclick=function(t){var e=t.currentTarget;var r=d(s),n;try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.classList.contains("is-active")){o.classList.remove("is-active")}if(o.classList.contains("tutor-icon-star-bold")){o.classList.remove("tutor-icon-star-bold");o.classList.add("tutor-icon-star-line")}}}catch(t){r.e(t)}finally{r.f()}var i=Number(t.target.dataset.value);var a=u("star","tutor");
1if(i>1){a=u("stars","tutor")}if(!e.classList.contains("is-active")){e.classList.add("is-active")}if(!e.classList.contains("tutor-icon-star-bold")){e.classList.remove("tutor-icon-star-line");e.classList.add("tutor-icon-star-bold")}l.innerHTML="".concat(i," ").concat(a)}}}catch(t){o.e(t)}finally{o.f()}})},3632:(t,e,r)=>{"use strict";r.r(e);r.d(e,{get_response_message:()=>n});var n=function t(e,r){var n=wp.i18n.__;var o=e||{},i=o.data,a=i===void 0?{}:i;var u=a.message,c=u===void 0?r||n("Something Went Wrong!","tutor"):u;return c}}};var o={};function ft(t){var e=o[t];if(e!==undefined){return e.exports}var r=o[t]={exports:{}};n[t](r,r.exports,ft);return r.exports}(()=>{ft.d=(t,e)=>{for(var r in e){if(ft.o(e,r)&&!ft.o(t,r)){Object.defineProperty(t,r,{enumerable:true,get:e[r]})}}}})();(()=>{ft.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{ft.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();var t={};(()=>{"use strict";var S=ft(3676);function j(t){"@babel/helpers - typeof";return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function E(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */E=function t(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function t(e,r,n){return e[r]=n}}function u(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(i,a,u){var c="suspendedStart";return function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return S()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=b(r,u);if(n){if(n===s)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if("suspendedStart"===c)throw c="completed",u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c="executing";var o=d(i,a,u);if("normal"===o.type){if(c=u.done?"completed":"suspendedYield",o.arg===s)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c="completed",u.method="throw",u.arg=o.arg)}}}(t,r,a),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var s={};function c(){}function f(){}function h(){}var p={};i(p,o,function(){return this});var v=Object.getPrototypeOf,m=v&&v(v(L([])));m&&m!==t&&l.call(m,o)&&(p=m);var g=h.prototype=c.prototype=Object.create(p);function y(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function w(u,c){function s(t,e,r,n){var o=d(u[t],u,e);if("throw"!==o.type){var i=o.arg,a=i.value;return a&&"object"==j(a)&&l.call(a,"__await")?c.resolve(a.__await).then(function(t){s("next",t,r,n)},function(t){s("throw",t,r,n)}):c.resolve(a).then(function(t){i.value=t,r(i)},function(t){return s("throw",t,r,n)})}n(o.arg)}var e;this._invoke=function(r,n){function t(){return new c(function(t,e){s(r,n,t,e)})}return e=e?e.then(t,t):t()}}function b(t,e){var r=t.iterator[e.method];if(undefined===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=undefined,b(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=d(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=undefined),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(e){if(e){var t=e[o];if(t)return t.call(e);
1if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;){if(l.call(e,r))return t.value=e[r],t.done=!1,t}return t.value=undefined,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:undefined,done:!0}}return f.prototype=h,i(g,"constructor",h),i(h,"constructor",f),f.displayName=i(h,n,"GeneratorFunction"),a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,i(t,n,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},y(w.prototype),i(w.prototype,r,function(){return this}),a.AsyncIterator=w,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new w(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},y(g),i(g,n,"Generator"),i(g,o,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),a.keys=function(r){var n=[];for(var t in r){n.push(t)}return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=L,k.prototype={constructor:k,reset:function t(e){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(x),!e)for(var r in this){"t"===r.charAt(0)&&l.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=undefined)}},stop:function t(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function e(t,e){return a.type="throw",a.arg=r,n.next=t,e&&(n.method="next",n.arg=undefined),!!e}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=l.call(i,"catchLoc"),c=l.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function t(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&l.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function t(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),s},finish:function t(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function t(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function t(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=undefined),s}},a}function c(t,e,r,n,o,i,a){try{var u=t[i](a);var c=u.value}catch(t){r(t);return}if(u.done){e(c)}else{Promise.resolve(c).then(n,o)}}function w(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){c(n,e,r,o,i,"next",t)}function i(t){c(n,e,r,o,i,"throw",t)}o(undefined)})}}function b(e,t){var r=typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&typeof e.length==="number"){if(r)e=r;var n=0;var o=function t(){};return{s:o,n:function t(){if(n>=e.length)return{done:true};return{done:false,value:e[n++]}},e:function t(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i=true,a=false,u;return{s:function t(){r=r.call(e)},n:function t(){var e=r.next();i=e.done;return e},e:function t(e){a=true;u=e},f:function t(){try{if(!i&&r["return"]!=null)r["return"]()}finally{if(a)throw u}}}}function s(t,e){if(!t)return;if(typeof t==="string")return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}function n(t,e){if(e==null||e>t.length)e=t.length;for(var r=0,n=new Array(e);r<e;r++){n[r]=t[r]}return n}var t=wp.i18n,_=t.__,N=t._x,M=t._n,F=t._nx;document.addEventListener("DOMContentLoaded",function(){var u=document.getElementById("tutor-common-confirmation-modal");var c=document.getElementById("tutor-common-confirmation-form");var t=document.getElementById("tutor-backend-filter-course");if(t){t.addEventListener("change",function(t){window.location=l("course-id",t.target.value)},{once:true})}var e=document.getElementById("tutor-backend-filter-category");if(e){e.addEventListener("change",function(t){window.location=l("category",t.target.value)},{once:true})}
1var r=document.getElementById("tutor-backend-filter-order");if(r){r.addEventListener("change",function(t){window.location=l("order",t.target.value)},{once:true})}var n=document.getElementById("tutor-admin-search-filter-form");var o=document.getElementById("tutor-backend-filter-search");if(n){o.addEventListener("search",function(t){var e=t.currentTarget||{},r=e.value;if(/\S+/.test(r)==false){window.location=l("search","")}});n.onsubmit=function(t){t.preventDefault();var e=o.value;window.location=l("search",e)}}var i=document.getElementById("tutor-admin-bulk-action-btn");var a=document.querySelector(".tutor-bulk-modal-disabled");if(i){i.onclick=function(){var t=[];var e=document.querySelectorAll(".tutor-bulk-checkbox");var r=b(e),n;try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.checked){t.push(o.value)}}}catch(t){r.e(t)}finally{r.f()}if(t.length){a.setAttribute("id","tutor-bulk-confirm-popup")}else{tutor_toast(_("Warning","tutor"),_("Nothing was selected for bulk action.","tutor"),"error");if(a.hasAttribute("id")){a.removeAttribute("id")}}}}var v=document.getElementById("tutor-admin-bulk-action-form");if(v){v.onsubmit=function(){var e=w(E().mark(function t(r){var n,o,i,a,u,c,s,l,d,f,h,p;return E().wrap(function t(e){while(1){switch(e.prev=e.next){case 0:r.preventDefault();r.stopPropagation();n=new FormData(v);o=[];i=document.querySelectorAll(".tutor-bulk-checkbox");a=b(i);try{for(a.s();!(u=a.n()).done;){c=u.value;if(c.checked){o.push(c.value)}}}catch(t){a.e(t)}finally{a.f()}if(o.length){e.next=10;break}alert(_("Select checkbox for action","tutor"));return e.abrupt("return");case 10:n.set("bulk-ids",o);n.set(window.tutor_get_nonce_data(true).key,window.tutor_get_nonce_data(true).value);e.prev=12;s=document.querySelector("#tutor-confirm-bulk-action[data-tutor-modal-submit]");s.classList.add("is-loading");e.next=17;return fetch(window._tutorobject.ajaxurl,{method:"POST",body:n});case 17:l=e.sent;s.classList.remove("is-loading");if(!l.ok){e.next=24;break}e.next=22;return l.json();case 22:d=e.sent;if(d.success){location.reload()}else{f=d.data||{},h=f.message,p=h===void 0?_("Something went wrong, please try again ","tutor"):h;tutor_toast(_("Failed","tutor"),p,"error")}case 24:e.next=29;break;case 26:e.prev=26;e.t0=e["catch"](12);console.log(e.t0);case 29:case"end":return e.stop()}}},t,null,[[12,26]])}));return function(t){return e.apply(this,arguments)}}()}var s=document.getElementById("tutor-confirm-bulk-action");if(s){s.onclick=function(){var t=document.createElement("input");t.type="submit";
1v.appendChild(t);t.click();t.remove()}}function l(t,e){var r=new URL(window.location.href);var n=r.searchParams;n.set(t,e);n.set("paged",1);return r}var d=document.querySelector("#tutor-bulk-checkbox-all");if(d){d.addEventListener("click",function(){var t=document.querySelectorAll(".tutor-bulk-checkbox");t.forEach(function(t){if(d.checked){t.checked=true}else{t.checked=false}})})}var f=document.querySelectorAll(".tutor-admin-course-delete");var h=b(f),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;m.onclick=function(t){var e=t.currentTarget.dataset.id;if(c){console.log(c);c.elements.action.value="tutor_course_delete";c.elements.id.value=e}}}}catch(t){h.e(t)}finally{h.f()}if(c){c.onsubmit=function(){var e=w(E().mark(function t(r){var n,o,i,a;return E().wrap(function t(e){while(1){switch(e.prev=e.next){case 0:r.preventDefault();n=new FormData(c);o=c.querySelector("[data-tutor-modal-submit]");o.classList.add("is-loading");e.next=6;return g(n);case 6:i=e.sent;if(u.classList.contains("tutor-is-active")){u.classList.remove("tutor-is-active")}if(!i.ok){e.next=14;break}e.next=11;return i.json();case 11:a=e.sent;o.classList.remove("is-loading");if(a){if(j(a)==="object"&&a.success){tutor_toast(_("Delete","tutor"),a.data,"success");location.reload()}else if(j(a)==="object"&&a.success===false){tutor_toast(_("Failed","tutor"),a.data,"error")}else{tutor_toast(_("Delete","tutor"),_("Succefully deleted ","tutor"),"success");location.reload()}}else{tutor_toast(_("Failed","tutor"),_("Delete failed ","tutor"),"error")}case 14:case"end":return e.stop()}}},t)}));return function(t){return e.apply(this,arguments)}}()}function g(t){return y.apply(this,arguments)}function y(){y=w(E().mark(function t(r){var n;return E().wrap(function t(e){while(1){switch(e.prev=e.next){case 0:e.prev=0;e.next=3;return fetch(window._tutorobject.ajaxurl,{method:"POST",body:r});case 3:n=e.sent;return e.abrupt("return",n);case 7:e.prev=7;e.t0=e["catch"](0);tutor_toast(_("Operation failed","tutor"),e.t0,"error");case 10:case"end":return e.stop()}}},t,null,[[0,7]])}));return y.apply(this,arguments)}});function q(t){return e.apply(this,arguments)}function e(){e=w(E().mark(function t(r){var n;return E().wrap(function t(e){while(1){switch(e.prev=e.next){case 0:e.prev=0;e.next=3;return fetch(window._tutorobject.ajaxurl,{method:"POST",body:r});case 3:n=e.sent;return e.abrupt("return",n);case 7:e.prev=7;e.t0=e["catch"](0);tutor_toast(_("Operation failed","tutor"),e.t0,"error");case 10:case"end":return e.stop()}}},t,null,[[0,7]])}));return e.apply(this,arguments)}function C(t){"@babel/helpers - typeof";return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function O(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */O=function t(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function t(e,r,n){return e[r]=n}}function u(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(i,a,u){var c="suspendedStart";return function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return S()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=b(r,u);if(n){if(n===s)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if("suspendedStart"===c)throw c="completed",u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c="executing";var o=d(i,a,u);if("normal"===o.type){if(c=u.done?"completed":"suspendedYield",o.arg===s)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c="completed",u.method="throw",u.arg=o.arg)}}}(t,r,a),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var s={};function c(){}function f(){}function h(){}var p={};
vendor: 4,749 bytes, line 1
1i(p,o,function(){return this});var v=Object.getPrototypeOf,m=v&&v(v(L([])));m&&m!==t&&l.call(m,o)&&(p=m);var g=h.prototype=c.prototype=Object.create(p);function y(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function w(u,c){function s(t,e,r,n){var o=d(u[t],u,e);if("throw"!==o.type){var i=o.arg,a=i.value;return a&&"object"==C(a)&&l.call(a,"__await")?c.resolve(a.__await).then(function(t){s("next",t,r,n)},function(t){s("throw",t,r,n)}):c.resolve(a).then(function(t){i.value=t,r(i)},function(t){return s("throw",t,r,n)})}n(o.arg)}var e;this._invoke=function(r,n){function t(){return new c(function(t,e){s(r,n,t,e)})}return e=e?e.then(t,t):t()}}function b(t,e){var r=t.iterator[e.method];if(undefined===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=undefined,b(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=d(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=undefined),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;){if(l.call(e,r))return t.value=e[r],t.done=!1,t}return t.value=undefined,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:undefined,done:!0}}return f.prototype=h,i(g,"constructor",h),i(h,"constructor",f),f.displayName=i(h,n,"GeneratorFunction"),a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,i(t,n,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},y(w.prototype),i(w.prototype,r,function(){return this}),a.AsyncIterator=w,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new w(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},y(g),i(g,n,"Generator"),i(g,o,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),a.keys=function(r){var n=[];for(var t in r){n.push(t)}return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=L,k.prototype={constructor:k,reset:function t(e){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(x),!e)for(var r in this){"t"===r.charAt(0)&&l.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=undefined)}},stop:function t(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function e(t,e){return a.type="throw",a.arg=r,n.next=t,e&&(n.method="next",n.arg=undefined),!!e}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=l.call(i,"catchLoc"),c=l.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function t(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&l.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function t(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),s},finish:function t(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),s}}
1,catch:function t(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function t(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=undefined),s}},a}function l(t,e,r,n,o,i,a){try{var u=t[i](a);var c=u.value}catch(t){r(t);return}if(u.done){e(c)}else{Promise.resolve(c).then(n,o)}}function z(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){l(n,e,r,o,i,"next",t)}function i(t){l(n,e,r,o,i,"throw",t)}o(undefined)})}}function A(t){return a(t)||i(t)||o(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(!t)return;if(typeof t==="string")return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}function i(t){if(typeof Symbol!=="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function a(t){if(Array.isArray(t))return u(t)}function u(t,e){if(e==null||e>t.length)e=t.length;for(var r=0,n=new Array(e);r<e;r++){n[r]=t[r]}return n}jQuery(document).ready(function(t){t(".tutor-sortable-list").sortable()});document.addEventListener("DOMContentLoaded",function(t){var e=wp.i18n,h=e.__,r=e._x,n=e._n,o=e._nx;var i=document.querySelector(".tutor-lesson-sidebar.tutor-desktop-sidebar");var a=document.querySelector(".tutor-sidebar-toggle-anchor");if(i&&a){a.addEventListener("click",function(){if(getComputedStyle(i).flex==="0 0 400px"){i.style.flex="0 0 0px";i.style.display="none"}else{i.style.display="block";i.style.flex="0 0 400px"}})}var u=document.querySelector(".tutor-sidebar-tabs-content");if(u){var c=u.getBoundingClientRect().top;u.style.height="calc(100vh - ".concat(c,"px)")}var s=function t(i){var e=document.querySelector(".tutor-desktop-sidebar-area");if(null!==e&&e.children.length<2){return}i.forEach(function(t){t.addEventListener("click",function(t){var e=t.currentTarget.parentNode.nextElementSibling;a(e);t.currentTarget.classList.add("active");var r=t.currentTarget.getAttribute("data-sidebar-tab");var n=e.querySelector("#"+r);n.classList.add("active");var o=document.querySelector(".tutor-lessons-tab-area");var i=o.offsetHeight;if(r=="sidebar-qna-tab-content"){n.style.height="calc(100% - ".concat(i,"px)")}})});var a=function t(e){for(var r=0;r<i.length;r++){i[r].classList.remove("active")}var n=e.querySelectorAll(".tutor-lesson-sidebar-tab-item");for(var o=0;o<n.length;o++){n[o].classList.remove("active")}}};var l=document.querySelectorAll(".tutor-desktop-sidebar-area .tutor-sidebar-tab-item");var d=document.querySelectorAll(".tutor-mobile-sidebar-area .tutor-sidebar-tab-item");if(l){s(l)}if(d){s(d)}var f=document.querySelectorAll(".tutor-comment-textarea textarea");if(f){f.forEach(function(t){t.addEventListener("focus",function(){t.parentElement.classList.add("is-focused")});t.addEventListener("blur",function(){t.parentElement.classList.remove("is-focused")})})}function p(){var t=document.querySelectorAll(".tutor-comments-list.tutor-parent-comment");var a=document.querySelector(".tutor-comment-box.tutor-reply-box");if(t){A(t).forEach(function(t){var e=t.querySelectorAll(".tutor-comments-list.tutor-child-comment");var r=t.querySelector(".tutor-comment-line");var n=e.length;if(e[n-1]){var o=e[n-1].clientHeight;var i=o+a.clientHeight+20-25+50;r.style.setProperty("height","calc(100% - ".concat(i,"px)"))}})}}p();window.addEventListener(_tutorobject.content_change_event,p);var v=document.querySelectorAll(".tutor-draggable > div");var m=document.querySelectorAll(".tutor-dropzone");v.forEach(function(t){t.addEventListener("dragstart",y);t.addEventListener("dragend",w)});v.forEach(function(e){["touchstart","touchmove","touchend"].forEach(function(t){e.addEventListener(t,g)})});m.forEach(function(t){t.addEventListener("dragover",b);t.addEventListener("dragenter",_);t.addEventListener("dragleave",x);t.addEventListener("drop",k)});function g(t){t.preventDefault();var e=t.type;if(e==="touchstart"){this.classList.add("tutor-dragging")}else if(e==="touchmove"){var r=document.querySelector(".tutor-drag-copy");if(t.target.classList.contains("tutor-dragging")){var n=t.target.getBoundingClientRect();if(!r){r=t.target.cloneNode(true);r.classList.add("tutor-drag-copy");t.target.parentNode.appendChild(r)}r.style.position="fixed";r.style.left=t.touches[0].clientX-r.clientWidth/2+"px";r.style.top=t.touches[0].clientY-r.clientHeight/2+"px";r.style.zIndex="9999";r.style.opacity="0.5";r.style.width=n.width+"px";r.style.height=n.height+"px"}}else if(e==="touchend"){var o=document.querySelector(".tutor-drag-copy");if(o){o.remove();var i=typeof t.originalEvent==="undefined"?t:t.originalEvent;var a=i.touches[0]||i.changedTouches[0];var u=[a.clientX,a.clientY],c=u[0],s=u[1];var l=document.elementFromPoint(c,s);if(l.classList.contains("tutor-dropzone")||l.closest(".tutor-dropzone")){if(!l.classList.contains("tutor-dropzone")){l=l.closest(".tutor-dropzone")}var d=o.querySelector("input");var f=d.dataset.name;var h=document.createElement("input");h.type="text";h.setAttribute("value",d.value);h.setAttribute("name",f);l.appendChild(h);var p=o.querySelector(".tutor-dragging-text-conent").textContent;l.querySelector(".tutor-dragging-text-conent").textContent=p;this.classList.remove("tutor-dragging")}}}}function y(){this.classList.add("tutor-dragging")}function w(){this.classList.remove("tutor-dragging")}function b(t){this.classList.add("tutor-drop-over");t.preventDefault()}function _(){}function x(){this.classList.remove("tutor-drop-over")}function k(){var t=document.querySelector(".tutor-quiz-border-box.tutor-dragging");if(this.querySelector("input")){this.querySelector("input").remove()}var e=t.querySelector("input");var r=e.dataset.name;var n=document.createElement("input");n.type="text";n.setAttribute("value",e.value);n.setAttribute("name",r);this.appendChild(n);var o=t.querySelector(".tutor-dragging-text-conent").textContent;this.querySelector(".tutor-dragging-text-conent").textContent=o;this.classList.remove("tutor-drop-over")}var L=document.getElementById("tutor-assignment-file-upload");if(L){L.addEventListener("change",S)}function S(){var t;var e=A(L.files).reduce(function(t,e){return t+e.size},0);var r=parseInt((t=document.querySelector('input[name="tutor_assignment_upload_limit"]'))===null||t===void 0?void 0:t.value)||0;var n="";var o=window._tutorobject.assignment_max_file_allowed;var i=document.querySelectorAll("#tutor-student-assignment-edit-file-preview .tutor-instructor-card").length;var a=o-i;
1if(L.files.length>a){L.value=null;tutor_toast(h("Warning","tutor"),h("Max ".concat(o," file allowed to upload"),"tutor"),"error");return}if(e>r){L.value=null;tutor_toast(h("Warning","tutor"),h("File size exceeds maximum limit ".concat(Math.floor(r/1e6)," MB."),"tutor"),"error");return}if("files"in L){if(L&&L.files.length==0){n="Select one or more files."}else{if(L.files.length>a){tutor_toast(h("Warning","tutor"),h("Max ".concat(o," file allowed to upload"),"tutor"),"error")}var u="";var c=document.querySelector(".tutor-asisgnment-upload-file-preview");var s=document.getElementById("tutor-student-assignment-edit-file-preview");for(var l=0;l<a;l++){var d=L.files[l];if(!d){continue}var f=s?"tutor-col-sm-5 tutor-py-16 tutor-mr-16":"";u+='<div class="tutor-instructor-card '.concat(f,'">\n                                    <div class="tutor-icard-content">\n                                        <div class="tutor-fs-6 tutor-color-secondary">\n                                            ').concat(d.name,'\n                                        </div>\n                                        <div class="tutor-fs-7">Size: ').concat(d.size,'</div>\n                                    </div>\n                                    <div onclick="(() =>
1 {\n\t\t\t\t\t\t\t\t\t\tthis.closest(\'.tutor-instructor-card\').remove();\n\t\t\t\t\t\t\t\t\t})()" class="tutor-attachment-file-close tutor-iconic-btn tutor-iconic-btn-outline flex-center">\n                                        <span class="tutor-icon-times"></span>\n                                    </div>\n                                </div>')}if(c){c.innerHTML=u}if(s){s.insertAdjacentHTML("beforeend",u)}}}}var j=document.querySelectorAll(".tutor-attachment-file-close a");j.forEach(function(t){t.onclick=function(){var e=z(O().mark(function t(r){var n,o,i,a,u,c,s;return O().wrap(function t(e){while(1){switch(e.prev=e.next){case 0:r.preventDefault();n=r.currentTarget;o=n.dataset.name;i=n.dataset.id;a=new FormData;a.set("action","tutor_remove_assignment_attachment");a.set("assignment_comment_id",i);a.set("file_name",o);a.set(window.tutor_get_nonce_data(true).key,window.tutor_get_nonce_data(true).value);u=n.querySelector("span");r.target.classList.add("is-loading");e.next=13;return q(a);case 13:c=e.sent;if(!c.ok){e.next=21;break}e.next=17;return c.json();case 17:s=e.sent;if(!s){tutor_toast(h("Warning","tutor"),h("Attachment remove failed","tutor"),"error")}else{n.closest(".tutor-instructor-card").remove()}e.next=23;break;case 21:alert(c.statusText);r.target.classList.remove("is-loading");case 23:case"end":return e.stop()}}},t)}));return function(t){return e.apply(this,arguments)}}()})});var G=ft(7942);var B=ft(818);var Q=ft(3419);var R=ft(6470);var U=ft(1103);var Y=ft(7723);function d(t,e){return H(t)||v(t,e)||h(t,e)||f()}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(t,e){if(!t)return;if(typeof t==="string")return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(t,e)}function p(t,e){if(e==null||e>t.length)e=t.length;for(var r=0,n=new Array(e);r<e;r++){n[r]=t[r]}return n}function v(t,e){var r=t==null?null:typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r==null)return;var n=[];var o=true;var i=false;var a,u;try{for(r=r.call(t);!(o=(a=r.next()).done);o=true){n.push(a.value);if(e&&n.length===e)break}}catch(t){i=true;u=t}finally{try{if(!o&&r["return"]!=null)r["return"]()}finally{if(i)throw u}}return n}function H(t){if(Array.isArray(t))return t}function W(t,e,r){if(e in t){Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true})}else{t[e]=r}return t}if(!window.tutor_get_nonce_data){window.tutor_get_nonce_data=function(t){var e=window._tutorobject||{};var r=e.nonce_key||"";var n=e[r]||"";if(t){return{key:r,value:n}}return W({},r,n)}}function $(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var a=new FormData;t.forEach(function(t){for(var e=0,r=Object.entries(t);e<r.length;e++){var n=d(r[e],2),o=n[0],i=n[1];a.set(o,i)}});a.set(window.tutor_get_nonce_data(true).key,window.tutor_get_nonce_data(true).value);return a}const X=$;function T(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */T=function t(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function t(e,r,n){return e[r]=n}}function u(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(i,a,u){var c="suspendedStart";return function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return S()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=b(r,u);if(n){if(n===s)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if("suspendedStart"===c)throw c="completed",u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c="executing";var o=d(i,a,u);if("normal"===o.type){if(c=u.done?"completed":"suspendedYield",o.arg===s)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c="completed",u.method="throw",u.arg=o.arg)}}}(t,r,a),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var s={};function c(){}function f(){}function h(){}var p={};
vendor: 4,749 bytes, line 1
1i(p,o,function(){return this});var v=Object.getPrototypeOf,m=v&&v(v(L([])));m&&m!==t&&l.call(m,o)&&(p=m);var g=h.prototype=c.prototype=Object.create(p);function y(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function w(u,c){function s(t,e,r,n){var o=d(u[t],u,e);if("throw"!==o.type){var i=o.arg,a=i.value;return a&&"object"==P(a)&&l.call(a,"__await")?c.resolve(a.__await).then(function(t){s("next",t,r,n)},function(t){s("throw",t,r,n)}):c.resolve(a).then(function(t){i.value=t,r(i)},function(t){return s("throw",t,r,n)})}n(o.arg)}var e;this._invoke=function(r,n){function t(){return new c(function(t,e){s(r,n,t,e)})}return e=e?e.then(t,t):t()}}function b(t,e){var r=t.iterator[e.method];if(undefined===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=undefined,b(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=d(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=undefined),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;){if(l.call(e,r))return t.value=e[r],t.done=!1,t}return t.value=undefined,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:undefined,done:!0}}return f.prototype=h,i(g,"constructor",h),i(h,"constructor",f),f.displayName=i(h,n,"GeneratorFunction"),a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,i(t,n,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},y(w.prototype),i(w.prototype,r,function(){return this}),a.AsyncIterator=w,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new w(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},y(g),i(g,n,"Generator"),i(g,o,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),a.keys=function(r){var n=[];for(var t in r){n.push(t)}return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=L,k.prototype={constructor:k,reset:function t(e){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(x),!e)for(var r in this){"t"===r.charAt(0)&&l.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=undefined)}},stop:function t(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function e(t,e){return a.type="throw",a.arg=r,n.next=t,e&&(n.method="next",n.arg=undefined),!!e}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=l.call(i,"catchLoc"),c=l.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function t(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&l.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function t(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),s},finish:function t(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),s}}
1,catch:function t(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function t(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=undefined),s}},a}function m(t,e,r,n,o,i,a){try{var u=t[i](a);var c=u.value}catch(t){r(t);return}if(u.done){e(c)}else{Promise.resolve(c).then(n,o)}}function J(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){m(n,e,r,o,i,"next",t)}function i(t){m(n,e,r,o,i,"throw",t)}o(undefined)})}}function P(t){"@babel/helpers - typeof";return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}var V=wp.i18n.__;var K=["keyword","course_order","tutor-course-filter-level","tutor-course-filter-tag","tutor-course-filter-category","tutor-course-filter-price","course_filter","supported_filters","current_page","action"];var Z=function t(i){var a=new URL(window.location.origin+window.location.pathname);var e=g();for(var r in e){if(K.indexOf(r)==-1){a.searchParams.append(r,e[r])}}var n=function t(e){var r=Array.isArray(i[e]);var n=r?e+"[]":e;var o=r?i[e]:[i[e]];o.forEach(function(t){if(P(t)!="object"){a.searchParams.append(n,t)}})};for(var o in i){n(o)}window.history.pushState({},"",a)};var g=function t(){var n={};new URL(window.location).searchParams.forEach(function(t,e){if(e.slice(-2)=="[]"){var r=e.slice(0,-2);!n[r]?n[r]=[]:0;!Array.isArray(n[r])?n[r]=[n[r]]:0;n[r].push(t)}else{n[e]=t}});return n};var y=function t(e){var r=g();e.find('[type="checkbox"]').prop("checked",false);e.find('[type="text"], select').val("");for(var n in r){var o=r[n];var i=e.find('[name="'+n+'"]');if(i.eq(0).attr("type")=="checkbox"){(function(){var e=!Array.isArray(o)?[o]:o;i.each(function(){var t=e.indexOf(window.jQuery(this).attr("value"))>-1;window.jQuery(this).prop("checked",t)})})()}else{i.val(o)}}};window.jQuery(document).ready(function(i){var d=window.wp.i18n.__;var a=i("[tutor-course-filter] form");if(!a.length){return}var u=i("[tutor-course-list-container]");var c=i(".tutor-courses-wrap").data("tutor_courses_meta")||{};var s={};a.on("submit",function(t){t.preventDefault()}).find("input,select").on("change",function(t){e()});y(a);window.addEventListener("popstate",function(){y(a);e(false,true)});var e=function t(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var n=g();var o=Object.assign(a.serializeObject(),s,c);o.current_page=r&&n.current_page?n.current_page:1;o.action="tutor_course_filter_ajax";if(e){Z(o)}u.html('<div class="tutor-spinner-wrap"><span class="tutor-spinner" area-hidden="true"></span></div>');a.find("[action-tutor-clear-filter]").closest(".tutor-widget-course-filter").removeClass("tutor-d-none");i.ajax({url:window._tutorobject.ajaxurl,type:"POST",data:o,success:function t(e){if(!e.success){u.html(d("Could not load courses","tutor"));return}u.html(e.data.html).find("nav").css("display","flex")}})};i("[tutor-toggle-course-filter]").on("click",function(t){t.preventDefault();i("body").toggleClass("tutor-course-filter-open");if(i(".tutor-course-filter-backdrop").length==0){i("body").append(i('<div class="tutor-course-filter-backdrop" area-hidden="true"></div>').hide().fadeIn(150))}});i("[tutor-hide-course-filter]").on("click",function(t){t.preventDefault();i("body").removeClass("tutor-course-filter-open")});var t=document.querySelectorAll(".tutor-course-list-enroll");t.forEach(function(t){t.onclick=function(){var e=J(T().mark(function t(r){var n,o,i,a,u,c,s,l;return T().wrap(function t(e){while(1){switch(e.prev=e.next){case 0:r.preventDefault();n=d("Something went wrong, please try again!","tutor");o=r.target;i=[{action:"tutor_course_enrollment"},{course_id:o.dataset.courseId}];a=X(i);o.classList.add("is-loading");o.setAttribute("disabled",true);e.next=9;return q(a);case 9:u=e.sent;if(!u.ok){e.next=19;break}e.next=13;return u.json();case 13:c=e.sent;console.log(c);s=c.success,l=c.data;if(s){tutor_toast(d("Success","tutor-pro"),l,"success");window.location.href=o.href}else{tutor_toast(d("Failed","tutor-pro"),l?l:n,"error")}e.next=20;break;case 19:tutor_toast(d("Error","tutor-pro"),d(n),"error");case 20:o.classList.remove("is-loading");o.removeAttribute("disabled");case 22:case"end":return e.stop()}}},t)}));return function(t){return e.apply(this,arguments)}}()})});window.jQuery(document).ready(function(r){r(document).on("click",".tutor-course-entry-box-login button, .tutor-course-entry-box-login a, .tutor-open-login-modal",function(t){t.preventDefault();var e=r(this).data("login_url")||r(this).closest(".tutor-course-entry-box-login").data("login_url");
1if(e){window.location.assign(e)}else{r(".tutor-login-modal").addClass("tutor-is-active")}})});var tt=ft(6966);var et=ft(787);var rt=ft(1974);var nt=ft(6344);function D(t){"@babel/helpers - typeof";return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function I(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */I=function t(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function t(e,r,n){return e[r]=n}}function u(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(i,a,u){var c="suspendedStart";return function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return S()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=b(r,u);if(n){if(n===s)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if("suspendedStart"===c)throw c="completed",u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c="executing";var o=d(i,a,u);if("normal"===o.type){if(c=u.done?"completed":"suspendedYield",o.arg===s)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c="completed",u.method="throw",u.arg=o.arg)}}}(t,r,a),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var s={};function c(){}function f(){}function h(){}var p={};i(p,o,function(){return this});var v=Object.getPrototypeOf,m=v&&v(v(L([])));m&&m!==t&&l.call(m,o)&&(p=m);var g=h.prototype=c.prototype=Object.create(p);function y(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function w(u,c){function s(t,e,r,n){var o=d(u[t],u,e);if("throw"!==o.type){var i=o.arg,a=i.value;return a&&"object"==D(a)&&l.call(a,"__await")?c.resolve(a.__await).then(function(t){s("next",t,r,n)},function(t){s("throw",t,r,n)}):c.resolve(a).then(function(t){i.value=t,r(i)},function(t){return s("throw",t,r,n)})}n(o.arg)}var e;this._invoke=function(r,n){function t(){return new c(function(t,e){s(r,n,t,e)})}return e=e?e.then(t,t):t()}}function b(t,e){var r=t.iterator[e.method];if(undefined===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=undefined,b(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=d(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=undefined),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;){if(l.call(e,r))return t.value=e[r],t.done=!1,t}return t.value=undefined,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:undefined,done:!0}}return f.prototype=h,i(g,"constructor",h),i(h,"constructor",f),f.displayName=i(h,n,"GeneratorFunction"),a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,i(t,
1n,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},y(w.prototype),i(w.prototype,r,function(){return this}),a.AsyncIterator=w,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new w(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},y(g),i(g,n,"Generator"),i(g,o,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),a.keys=function(r){var n=[];for(var t in r){n.push(t)}return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=L,k.prototype={constructor:k,reset:function t(e){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(x),!e)for(var r in this){"t"===r.charAt(0)&&l.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=undefined)}},stop:function t(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function t(r){if(this.done)throw r;var n=this;function e(t,e){return a.type="throw",a.arg=r,n.next=t,e&&(n.method="next",n.arg=undefined),!!e}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=l.call(i,"catchLoc"),c=l.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function t(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&l.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function t(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),s},finish:function t(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function t(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function t(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=undefined),s}},a}function x(t,e,r,n,o,i,a){try{var u=t[i](a);var c=u.value}catch(t){r(t);return}if(u.done){e(c)}else{Promise.resolve(c).then(n,o)}}function ot(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){x(n,e,r,o,i,"next",t)}function i(t){x(n,e,r,o,i,"throw",t)}o(undefined)})}}var k=wp.i18n,L=k.__,it=k._x,at=k._n,ut=k._nx;document.addEventListener("DOMContentLoaded",function(){var u=document.getElementById("tutor-create-new-course");if(u){u.onclick=function(){var e=ot(I().mark(function t(r){var n,o,i,a;return I().wrap(function t(e){while(1){switch(e.prev=e.next){case 0:r.preventDefault();u.setAttribute("disabled","disabled");u.classList.add("is-loading");n=L("Something went wrong, please try again","tutor");o=new FormData;o.set("action","tutor_create_new_draft_course");o.set(window.tutor_get_nonce_data(true).key,window.tutor_get_nonce_data(true).value);e.next=9;return q(o);case 9:i=e.sent;if(!i.ok){e.next=18;break}u.classList.remove("is-loading");e.next=14;return i.json();case 14:a=e.sent;if(a.success){window.location=a.data.url}else{if(a.data.error_message){tutor_toast(L("Failed","tutor"),a.data.error_message,"error")}else{tutor_toast(L("Failed","tutor"),n,"error")}}e.next=19;break;case 18:tutor_toast(L("Failed","tutor"),n,"error");case 19:case"end":return e.stop()}}},t)}));return function(t){return e.apply(this,arguments)}}()}var e=document.getElementById("tutor-course-save-draft");if(e){e.onclick=function(t){t.preventDefault();e.setAttribute("disabled","disabled");e.classList.add("is-loading");document.getElementById("tutor-frontend-course-builder").submit()}}});var ct=ft(1626);var st=ft(9834);var lt=ft(1033);var dt=ft(4367);readyState_complete(function(){Object.entries(document.getElementsByTagName("a")).forEac
1h(function(t){var e=t[1].getAttribute("href");if(e!==null&&e!==void 0&&e.includes("/logout")||e!==null&&e!==void 0&&e.includes("logout")){t[1].setAttribute("data-no-instant","")}})});jQuery(document).ready(function(a){"use strict";var t=wp.i18n,i=t.__,e=t._x,r=t._n,n=t._nx;if(jQuery().select2){a(".tutor_select2").select2({escapeMarkup:function t(e){return e}})}
2/*!
3   * jQuery UI Touch Punch 0.2.3
4   *
5   * Copyright 2011–2014, Dave Furfero
6   * Dual licensed under the MIT or GPL Version 2 licenses.
7   *
8   * Depends:
9   *  jquery.ui.widget.js
10   *  jquery.ui.mouse.js
11   */!function(e){function r(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var r=t.originalEvent.changedTouches[0],n=document.createEvent("MouseEvents");n.initMouseEvent(e,!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(n)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,t=e.ui.mouse.prototype,o=t._mouseInit,i=t._mouseDestroy;t._touchStart=function(t){var e=this;!n&&e._mouseCapture(t.originalEvent.changedTouches[0])&&(n=!0,e._touchMoved=!1,r(t,"mouseover"),r(t,"mousemove"),r(t,"mousedown"))},t._touchMove=function(t){n&&(this._touchMoved=!0,r(t,"mousemove"))},t._touchEnd=function(t){n&&(r(t,"mouseup"),r(t,"mouseout"),this._touchMoved||r(t,"click"),n=!1)},t._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),o.call(t)},t._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),i.call(t)}}}(jQuery);var o={ajaxurl:window._tutorobject.ajaxurl,nonce_key:window._tutorobject.nonce_key,played_once:false,video_data:function t(){var e=a("#tutor_video_tracking_information").val();return e?JSON.parse(e):{}},track_player:function t(){var i=this;if(typeof Plyr!=="undefined"){var e=new Plyr(this.player_DOM);var a=i.video_data();e.on("ready",function(t){var e=t.detail.plyr;var r=a||{},n=r.best_watch_time,o=n===void 0?0:n;if(o>0&&e.duration>Math.round(o)){e.media.currentTime=o}i.sync_time(e)});var n=0;var o=30;e.on("timeupdate",function(t){var e=t.detail.plyr;var r=n/4;if(r>=o){i.sync_time(e);n=0}n++});e.on("play",function(){i.played_once=true});e.on("ended",function(t){var e=i.video_data();var r=t.detail.plyr;var n={is_ended:true};i.sync_time(r,n);console.log(e.autoload_next_course_content,i.played_once);if(e.autoload_next_course_content&&i.played_once){i.autoload_content()}})}},sync_time:function t(e,r){var n=this.video_data().post_id;var o={action:"sync_video_playback",currentTime:e.currentTime,duration:e.duration,post_id:n};o[this.nonce_key]=_tutorobject[this.nonce_key];var i=o;if(r){i=Object.assign(o,r)}a.post(this.ajaxurl,i)},autoload_content:function t(){console.log("Autoloader called");var e=this.video_data().post_id;var r={action:"autoload_next_course_content",post_id:e};r[this.nonce_key]=_tutorobject[this.nonce_key];a.post(this.ajaxurl,r).done(function(t){console.log(t);if(t.success&&t.data.next_url){location.href=t.data.next_url}})},init:function t(e){this.player_DOM=e;this.track_player()}};a(".tutorPlayer").each(function(){o.init(this)});a(document).on("change keyup paste",".tutor_user_name",function(){a(this).val(u(a(this).val()))});function u(t){return t.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}a(document).on("click",".tutor_question_cancel",function(t){t.preventDefault();a(".tutor-add-question-wrap").toggle()});a(".tooltip-btn").on("hover",function(t){a(this).toggleClass("active")});a(".tutor-course-title h4 .toggle-information-icon").on("click",function(t){a(this).closest(".tutor-topics-in-single-lesson").find(".tutor-topics-summery").slideToggle();t.stopPropagation()});a(".tutor-course-topic.tutor-active").find(".tutor-course-lessons").slideDown();a(".tutor-course-title").on("click",function(){var t=a(this).siblings(".tutor-course-lessons");a(this).closest(".tutor-course-topic").toggleClass("tutor-active");t.slideToggle()});a(document).on("click",".tutor-topics-title h3 .toggle-information-icon",function(t){a(this).closest(".tutor-topics-in-single-lesson").find(".tutor-topics-summery").slideToggle();t.stopPropagation()});a(document).on("click","[tutor-course-topics-sidebar-toggler]",function(t){t.preventDefault();a(".tutor-course-single-content-wrapper").toggleClass("tutor-course-single-sidebar-hidden")});a("[tutor-course-topics-sidebar-offcanvas-toggler]").on("click",function(t){t.preventDefault();a(".tutor-course-single-content-wrapper").toggleClass("tutor-course-single-sidebar-open");a("body").toggleClass("tutor-overflow-hidden")});a("[tutor-hide-course-single-sidebar]").on("click",function(t){t.preventDefault();console.log("Hello");a(".tutor-course-single-content-wrapper").removeClass("tutor-course-single-sidebar-open");a("body").removeClass("tutor-overflow-hidden")});a(".tutor-tabs-btn-group a").on("click touchstart",function(t){t.preventDefault();var e=a(this);var r=e.attr("href");a(".tutor-lesson-sidebar-tab-item").hide();a(r).show();a(".tutor-tabs-btn-group a").removeClass("active");e.addClass("active")});var c=a(".quiz-draggable-rand-answers").length;if(c){a(".quiz-draggable-rand-answers").each(function(){var t=a(this);var e=t.height();t.css({height:e})})}if(jQuery.datepicker){a(".tutor_report_datepicker").datepicker({dateFormat:"yy-mm-dd"})}a(document).on("submit","#tutor-withdraw-account-set-form",function(t){if(!t.detail||t.detail==1){t.preventDefault();var e=a(this);var r=e.find(".tutor_set_withdraw_account_btn");var n=e.serializeObject();r.prop("disabled",true);a.ajax({url:_tutorobject.ajaxurl,type:"POST",data:n,beforeSend:function t(){r.addClass("is-loading")},success:function t(e){if(e.success){tutor_toast("Success!",e.data.msg,"success")}},complete:function t(){r.removeClass("is-loading");
11setTimeout(function(){r.prop("disabled",false)},2e3)}})}});a(document).on("submit","#tutor-earning-withdraw-form",function(t){t.preventDefault();var e=a(this);var r=a("#tutor-earning-withdraw-btn");var n=a(".tutor-withdraw-form-response");var o=e.serializeObject();a.ajax({url:_tutorobject.ajaxurl,type:"POST",data:o,beforeSend:function t(){e.find(".tutor-success-msg").remove();r.attr("disabled","disabled").addClass("is-loading")},success:function t(e){var r;a(".tutor-earning-withdraw-form-wrap").hide();if(e.success){console.log(e.data.available_balance);if(e.data.available_balance!=="undefined"){a(".withdraw-balance-col .available_balance").html(e.data.available_balance)}tutor_toast(i("Request Successful","tutor"),i("Your request has been submitted. Please wait for the administrator's response.","tutor"),"success");setTimeout(function(){location.reload()},500)}else{tutor_toast("Error",e.data.msg,"error");r='<div class="tutor-error-msg inline-image-text is-inline-block">                            <img src="'+window._tutorobject.tutor_url+'assets/images/icon-cross.svg"/>                             <div>                                <b>Error</b><br/>                                <span>'+e.data.msg+"</span>                            </div>                        </div>";setTimeout(function(){n.html("")},5e3);return false}},complete:function t(){r.removeAttr("disabled").removeClass("is-loading")}})});a(document).on("click",".tutor-dashboard-element-delete-btn",function(t){t.preventDefault();var e=a(this).attr("data-id");a("#tutor-dashboard-delete-element-id").val(e)});a(document).on("submit","#tutor-dashboard-delete-element-form",function(t){t.preventDefault();var r=a("#tutor-dashboard-delete-element-id").val();var e=a(".tutor-modal-element-delete-btn");var n=a(this).serializeObject();a.ajax({url:_tutorobject.ajaxurl,type:"POST",data:n,beforeSend:function t(){e.addClass("is-loading")},success:function t(e){if(e.success){a("#tutor-dashboard-"+e.data.element+"-"+r).remove()}},complete:function t(){e.removeClass("is-loading")}})});a(document).on("submit","#tutor_assignment_start_form",function(t){t.preventDefault();var e=a(this);var r=e.serializeObject();r.action="tutor_start_assignment";a.ajax({url:_tutorobject.ajaxurl,type:"POST",data:r,beforeSend:function t(){a("#tutor_assignment_start_btn").addClass("is-loading")},success:function t(e){if(e.success){location.reload(true)}},error:function t(e,r,n){console.log("assignment start error: "+n)},complete:function t(){a("#tutor_assignment_start_btn").removeClass("is-loading")}})});a(document).on("submit","#tutor_assignment_submit_form",function(t){var e=tinymce.activeEditor.getContent();if(e.trim().length<1){t.preventDefault();tutor_toast(i("Warning","tutor"),i("Assignment answer is required.","tutor"),"error");setTimeout(function(){jQuery("button#tutor_assignment_submit_btn").removeClass("is-loading").removeAttr("disabled")},500)}});a("form").on("change",".tutor-assignment-file-upload",function(){a(this).siblings("label").find("span").html(a(this).val().replace(/.*(\/|\\)/,""))});if(a(".tutor-accordion-item-header.is-active").length===0){a(".tutor-accordion-item-header").first().trigger("click")}a(".tutor-course-builder-section-title").on("click",function(){if(a(this).find("i").hasClass("tutor-icon-angle-up")){a(this).find("i").removeClass("tutor-icon-angle-up").addClass("tutor-icon-angle-down")}else{a(this).find("i").removeClass("tutor-icon-angle-down").addClass("tutor-icon-angle-up")}a(this).next("div").slideToggle()});a(document).on("click","#tutor_profile_photo_button",function(t){t.preventDefault();a("#tutor_profile_photo_file").trigger("click")});a(document).on("change","#tutor_profile_photo_file",function(t){t.preventDefault();var e=this;if(e.files&&e.files[0]){var r=new FileReader;r.onload=function(t){a(".tutor-profile-photo-upload-wrap").find("img").attr("src",t.target.result)};r.readAsDataURL(e.files[0])}});a(document).on("click",".thread-content .subject",function(t){var e=a(this);var r=parseInt(e.closest(".thread-content").attr("data-thread-id"));var n=_tutorobject.nonce_key;var o={thread_id:r,action:"tutor_bp_retrieve_user_records_for_thread"};o[n]=_tutorobject[n];a.ajax({type:"POST",url:window._tutorobject.ajaxurl,data:o,beforeSend:function t(){a("#tutor-bp-thread-wrap").html("")},success:function t(e){if(e.success){a("#tutor-bp-thread-wrap").html(e.data.thread_head_html);s()}}})});function s(){a("ul.tutor-bp-enrolled-course-list").each(function(){var t=a(this);var e=t.find(" > li");var n=3;if(e.length>n){var r=e.length-n;e.each(function(t,e){var r=a(this);if(t>=n){r.hide()}});var o='<a href="javascript:;" class="tutor_bp_plus_courses"><strong>+'+r+" More </strong></a> Courses";t.closest(".tutor-bp-enrolled-courses-wrap").find(".thread-participant-enrolled-info").html(o)}t.show()})}s();a(document).on("click","a.tutor_bp_plus_courses",function(t){t.preventDefault();var e=a(this);e.closest(".tutor-bp-enrolled-courses-wrap").find(".tutor-bp-enrolled-course-list li").show();e.closest(".thread-participant-enrolled-info").html("")});a(".tutor-dropbtn").click(function(){var t=a(this).parent().find(".tutor-dropdown-content");t.slideToggle(100)});a(document).on("click",function(t){var e=a(".tutor-dropdown");var r=e.find(".tutor-dropdown-content");
11if(!e.is(t.target)&&e.has(t.target).length===0){r.slideUp(100)}});var l=a('.tutor-frontend-builder-course-price [name="tutor_course_price_type"]');if(l.length==0){a("#_tutor_is_course_public_meta_checkbox").show()}else{l.change(function(){if(a(this).prop("checked")){var t=a(this).val()=="paid"?"hide":"show";a("#_tutor_is_course_public_meta_checkbox")[t]()}}).trigger("change")}(function(e){e.fn.tutor_tooltip=function(){this.on("mouseenter click",".tooltip",function(t){t.stopPropagation();e(this).removeClass("isVisible")}).on("mouseenter focus",":has(>.tooltip)",function(t){if(!e(this).prop("disabled")){e(this).find(".tooltip").addClass("isVisible")}}).on("mouseleave blur keydown",":has(>.tooltip)",function(t){if(t.type==="keydown"){if(t.which===27){e(this).find(".tooltip").removeClass("isVisible")}}else{e(this).find(".tooltip").removeClass("isVisible")}});return this}})(jQuery);jQuery(".tutor-tooltip-inside").tutor_tooltip();jQuery(".tutor-static-loader").click(function(){var t=this;setTimeout(function(){jQuery(t).addClass("is-loading").attr("disabled","disabled")},100)});var d=document.getElementById("tutor-reuseable-snackbar");if(d){setTimeout(function(){d.classList.add("tutor-snackbar-show")},1e3)}})})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.