芝麻web文件管理V1.00
'),"success"==r?"success":"error"==r?"danger":"warning"==r?"warning":"primary"),r="success"==r?"tutor-icon-mark":"error"==r?"tutor-icon-times":"tutor-icon-circle-info-o",i=null!=e&&""!==e.trim(),a=jQuery('\n \n
\n \n
\n
\n
').concat(t,'
\n
').concat(e,'
\n
\n
\n
\n '));a.find(".tutor-noti-close").click(function(){a.remove()}),jQuery(".tutor-toast-parent").append(a),n&&setTimeout(function(){a&&a.fadeOut("fast",function(){jQuery(this).remove()})},5e3)}),document.addEventListener("DOMContentLoaded",function(){"settings"===(window._tutorobject?_tutorobject:"").current_page&&document.querySelectorAll(".tutor-device-sign-out").forEach(function(t){t.onclick=function(){var e=r(O().mark(function t(e){var r,n,o,i;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.target,n=e.target.dataset.umetaId,n=s([{umeta_id:n,action:"tutor_remove_device_manually"}]),t.prev=3,r.classList.add("is-loading"),r.setAttribute("disabled",!0),t.next=8,l(n);case 8:return n=t.sent,t.next=11,n.json();case 11:i=t.sent,o=i.success,i=i.data,o?(tutor_toast(h("Success","tutor-pro"),i.msg,"success"),i.redirect_to?window.location.href=i.redirect_to:r.closest(".tutor-col-md-6").remove()):tutor_toast(h("Failed","tutor-pro"),i.msg,"error"),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(3),tutor_toast(h("Something went wrong","tutor-pro"),h("Please try again after reloading page!"),"error");case 19:return t.prev=19,r.classList.remove("is-loading"),r.removeAttribute("disabled"),t.finish(19);case 23:case"end":return t.stop()}},t,null,[[3,16,19,23]])}));return function(t){return e.apply(this,arguments)}}()});var u=document.querySelector(".tutor-login-form-wrapper, .tutor-login-modal, #login_error, .woocommerce-error");u&&(u.onclick=function(){var e=r(O().mark(function t(e){var r,n,o,i,a,c;return O().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.target,(r=i).hasAttribute("id")&&"tutor-remove-active-logins"===i.getAttribute("id"))return e.preventDefault(),n=document.getElementById("tutor-remove-logins-wrapper"),o=(o=(o=n.closest(".tutor-alert"))||document.getElementById("login_error"))||document.querySelector("ul.woocommerce-error"),i=s([{action:"tutor_remove_all_active_logins"}]),t.prev=9,n.innerHTML=''.concat(h("Please wait...","tutor-pro"),""),t.next=13,l(i);t.next=38;break;case 13:return i=t.sent,t.next=16,i.json();case 16:a=t.sent,c=a.success,a=a.data,c?(o.classList.contains("tutor-warning")&&(o.classList.remove("tutor-warning"),o.classList.add("tutor-success")),o.hasAttribute("id")&&(o.style.borderLeftColor="#6eea98"),o.classList.contains("woocommerce-error")&&o.classList.add("woocommerce-message"),o.innerHTML=h("All of your active login sessions have been removed. You can login now."),t.next=32):t.next=25;break;case 25:if(Array.isArray(a))if((c=a[0])&&"tutor_login_limit"===c.code)return u.insertAdjacentHTML("afterbegin",c.message),t.abrupt("return");t.next=30;break;case 30:tutor_toast(h("Failed","tutor-pro"),a,"error"),n.innerHTML=r;case 32:t.next=38;break;case 34:t.prev=34,t.t0=t.catch(9),console.log(t.t0),tutor_toast(h("Something went wrong","tutor-pro"),h("Please try again after reloading page!"),"error");case 38:case"end":return t.stop()}},t,null,[[9,34]])}));return function(t){return e.apply(this,arguments)}}())}),!1);window.addEventListener("DOMContentLoaded",function(){var e,t,r,n;document.querySelector(".tutor-course-details-page")&&(e=document.querySelector(".tutor-single-course-sidebar")).hasAttribute("data-tutor-sticky-sidebar")&&(t=document.getElementsByTagName("header")[0],r="".concat(t.offsetHeight,"px"),n=t.classList.value.includes("sticky"),window.addEventListener("scroll",function(){var t=window.scrollY;1200<=window.innerWidth&&(200<=t?o||(e.classList.add("tutor-sidebar-sticky"),t="max-height: 80vh; overflow-y: scroll; top: ".concat(n?r:""),e.setAttribute("style",t),e.scrollTop=0,o=!0):(e.classList.remove("tutor-sidebar-sticky"),e.removeAttribute("style"),o=!1))}))})})();