1(() => { 2 "use strict"; 3 window.tutor_get_nonce_data || 4 (window.tutor_get_nonce_data = function (t) { 5 var e = window._tutorobject || {}, 6 r = e.nonce_key || "", 7 e = e[r] || ""; 8 return t ? { key: r, value: e } : { [r]: e }; 9 }); 10 const s = function (t = []) { 11 const n = new FormData(); 12 return ( 13 t.forEach((t) => { 14 for (var [e, r] of Object.entries(t)) n.set(e, r); 15 }), 16 n.set( 17 window.tutor_get_nonce_data(!0).key, 18 window.tutor_get_nonce_data(!0).value 19 ), 20 n 21 ); 22 }; 23 function E(t) { 24 return (E = 25 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 26 ? function (t) { 27 return typeof t; 28 } 29 : function (t) { 30 return t && 31 "function" == typeof Symbol && 32 t.constructor === Symbol && 33 t !== Symbol.prototype 34 ? "symbol" 35 : typeof t; 36 })(t); 37 } 38 function j() { 39 j = function () { 40 return a; 41 }; 42 var a = {}, 43 t = Object.prototype, 44 u = t.hasOwnProperty, 45 s = 46 Object.defineProperty || 47 function (t, e, r) { 48 t[e] = r.value; 49 }, 50 e = "function" == typeof Symbol ? Symbol : {}, 51 n = e.iterator || "@@iterator", 52 r = e.asyncIterator || "@@asyncIterator", 53 o = e.toStringTag || "@@toStringTag"; 54 function i(t, e, r) { 55 return ( 56 Object.defineProperty(t, e, { 57 value: r, 58 enumerable: !0, 59 configurable: !0, 60 writable: !0, 61 }), 62 t[e] 63 ); 64 } 65 try { 66 i({}, ""); 67 } catch (t) { 68 i = function (t, e, r) { 69 return (t[e] = r); 70 }; 71 } 72 function c(t, e, r, n) { 73 var o, 74 i, 75 a, 76 c, 77 e = e && e.prototype instanceof h ? e : h, 78 e = Object.create(e.prototype), 79 n = new L(n || []); 80 return ( 81 s(e, "_invoke", { 82 value: 83 ((o = t), 84 (i = r), 85 (a = n), 86 (c = "suspendedStart"), 87 function (t, e) { 88 if ("executing" === c) 89 throw new Error("Generator is already running"); 90 if ("completed" === c) { 91 if ("throw" === t) throw e; 92 return x(); 93 } 94 for (a.method = t, a.arg = e; ; ) { 95 var r = a.delegate; 96 if (r) { 97 r = (function t(e, r) { 98 var n = r.method, 99 o = e.iterator[n]; 100 if (void 0 === o) 101 return ( 102 (r.delegate = null), 103 ("throw" === n && 104 e.iterator.return && 105 ((r.method = "return"), 106 (r.arg = void 0), 107 t(e, r), 108 "throw" === r.method)) || 109 ("return" !== n && 110 ((r.method = "throw"), 111 (r.arg = new TypeError( 112 "The iterator does not provide a '" + 113 n + 114 "' method" 115 )))), 116 f 117 ); 118 n = l(o, e.iterator, r.arg); 119 if ("throw" === n.type) 120 return ( 121 (r.method = "throw"), 122 (r.arg = n.arg), 123 (r.delegate = null), 124 f 125 ); 126 o = n.arg; 127 return o 128 ? o.done 129 ? ((r[e.resultName] = o.value), 130 (r.next = e.nextLoc), 131 "return" !== r.method && 132 ((r.method = "next"), (r.arg = void 0)), 133 (r.delegate = null), 134 f) 135 : o 136 : ((r.method = "throw"), 137 (r.arg = new TypeError( 138 "iterator result is not an object" 139 )), 140 (r.delegate = null),
141 f); 142 })(r, a); 143 if (r) { 144 if (r === f) continue; 145 return r; 146 } 147 } 148 if ("next" === a.method) a.sent = a._sent = a.arg; 149 else if ("throw" === a.method) { 150 if ("suspendedStart" === c) throw ((c = "completed"), a.arg); 151 a.dispatchException(a.arg); 152 } else "return" === a.method && a.abrupt("return", a.arg); 153 c = "executing"; 154 r = l(o, i, a); 155 if ("normal" === r.type) { 156 if ( 157 ((c = a.done ? "completed" : "suspendedYield"), r.arg === f) 158 ) 159 continue; 160 return { value: r.arg, done: a.done }; 161 } 162 "throw" === r.type && 163 ((c = "completed"), (a.method = "throw"), (a.arg = r.arg)); 164 } 165 }), 166 }), 167 e 168 ); 169 } 170 function l(t, e, r) { 171 try { 172 return { type: "normal", arg: t.call(e, r) }; 173 } catch (t) { 174 return { type: "throw", arg: t }; 175 } 176 } 177 a.wrap = c; 178 var f = {}; 179 function h() {} 180 function d() {} 181 function p() {} 182 var e = {}, 183 y = 184 (i(e, n, function () { 185 return this; 186 }), 187 Object.getPrototypeOf), 188 y = y && y(y(_([]))), 189 v = 190 (y && y !== t && u.call(y, n) && (e = y), 191 (p.prototype = h.prototype = Object.create(e))); 192 function g(t) { 193 ["next", "throw", "return"].forEach(function (e) { 194 i(t, e, function (t) { 195 return this._invoke(e, t); 196 }); 197 }); 198 } 199 function m(a, c) { 200 var e; 201 s(this, "_invoke", { 202 value: function (r, n) { 203 function t() { 204 return new c(function (t, e) { 205 !(function e(t, r, n, o) { 206 var i, 207 t = l(a[t], a, r); 208 if ("throw" !== t.type) 209 return (r = (i = t.arg).value) && 210 "object" == E(r) && 211 u.call(r, "__await") 212 ? c.resolve(r.__await).then( 213 function (t) { 214 e("next", t, n, o); 215 }, 216 function (t) { 217 e("throw", t, n, o); 218 } 219 ) 220 : c.resolve(r).then( 221 function (t) { 222 (i.value = t), n(i); 223 }, 224 function (t) { 225 return e("throw", t, n, o); 226 } 227 ); 228 o(t.arg); 229 })(r, n, t, e); 230 }); 231 } 232 return (e = e ? e.then(t, t) : t()); 233 }, 234 }); 235 } 236 function w(t) { 237 var e = { tryLoc: t[0] }; 238 1 in t && (e.catchLoc = t[1]), 239 2 in t && ((e.finallyLoc = t[2]), (e.afterLoc = t[3])), 240 this.tryEntries.push(e); 241 } 242 function b(t) { 243 var e = t.completion || {}; 244 (e.type = "normal"), delete e.arg, (t.completion = e); 245 } 246 function L(t) { 247 (this.tryEntries = [{ tryLoc: "root" }]), 248 t.forEach(w, this), 249 this.reset(!0); 250 } 251 function _(e) { 252 if (e) { 253 var r, 254 t = e[n]; 255 if (t) return t.call(e); 256 if ("function" == typeof e.next) return e; 257 if (!isNaN(e.length)) 258 return ( 259 (r = -1), 260 ((t = function t() { 261 for (; ++r < e.length; ) 262 if (u.call(e, r)) return (t.value = e[r]), (t.done = !1), t; 263 return (t.value = void 0), (t.done = !0), t; 264 }).next = t) 265 ); 266 } 267 return { next: x }; 268 } 269 function x() { 270 return { value: void 0, done: !0 }; 271 } 272 return ( 273 s(v, "constructor", { value: (d.prototype = p), configurable: !0 }), 274 s(p, "constructor", { value: d, configurable: !0 }), 275 (d.displayName = i(p, o, "GeneratorFunction")), 276 (a.isGeneratorFunction = function (t) { 277 t = "function" == typeof t && t.constructor; 278 return ( 279 !!t && (t === d || "GeneratorFunction" === (t.displayName || t.name)) 280 ); 281 }), 282 (a.mark = function (t) { 283 return ( 284 Object.setPrototypeOf 285 ? Object.setPrototypeOf(t, p) 286 : ((t.__proto__ = p), i(t, o, "GeneratorFunction")), 287 (t.prototype = Object.create(v)), 288 t 289 ); 290 }), 291 (a.awrap = function (t) { 292 return { __await: t }; 293 }), 294 g(m.prototype), 295 i(m.prototype, r, function () { 296 return this; 297 }), 298 (a.AsyncIterator = m), 299 (a.async = function (t, e, r, n, o) { 300 void 0 === o && (o = Promise); 301 var i = new m(c(t, e, r, n), o); 302 return a.isGeneratorFunction(e) 303 ? i 304 : i.next().then(function (t) { 305 return t.done ? t.value : i.next(); 306 }); 307 }), 308 g(v), 309 i(v, o, "Generator"), 310 i(v, n, function () { 311 return this; 312 }), 313 i(v, "toString", function () { 314 return "[object Generator]"; 315 }), 316 (a.keys = function (t) { 317 var e, 318 r = Object(t), 319 n = []; 320 for (e in r) n.push(e); 321 return ( 322 n.reverse(), 323 function t() { 324 for (; n.length; ) { 325 var e = n.pop(); 326 if (e in r) return (t.value = e), (t.done = !1), t; 327 } 328 return (t.done = !0), t; 329 } 330 ); 331 }), 332 (a.values = _), 333 (L.prototype = { 334 constructor: L, 335 reset: function (t) { 336 if ( 337 ((this.prev = 0), 338 (this.next = 0), 339 (this.sent = this._sent = void 0), 340 (this.done = !1), 341 (this.delegate = null),
342 (this.method = "next"), 343 (this.arg = void 0), 344 this.tryEntries.forEach(b), 345 !t) 346 ) 347 for (var e in this) 348 "t" === e.charAt(0) && 349 u.call(this, e) && 350 !isNaN(+e.slice(1)) && 351 (this[e] = void 0); 352 }, 353 stop: function () { 354 this.done = !0; 355 var t = this.tryEntries[0].completion; 356 if ("throw" === t.type) throw t.arg; 357 return this.rval; 358 }, 359 dispatchException: function (r) { 360 if (this.done) throw r; 361 var n = this; 362 function t(t, e) { 363 return ( 364 (i.type = "throw"), 365 (i.arg = r), 366 (n.next = t), 367 e && ((n.method = "next"), (n.arg = void 0)), 368 !!e 369 ); 370 } 371 for (var e = this.tryEntries.length - 1; 0 <= e; --e) { 372 var o = this.tryEntries[e], 373 i = o.completion; 374 if ("root" === o.tryLoc) return t("end"); 375 if (o.tryLoc <= this.prev) { 376 var a = u.call(o, "catchLoc"), 377 c = u.call(o, "finallyLoc"); 378 if (a && c) { 379 if (this.prev < o.catchLoc) return t(o.catchLoc, !0); 380 if (this.prev < o.finallyLoc) return t(o.finallyLoc); 381 } else if (a) { 382 if (this.prev < o.catchLoc) return t(o.catchLoc, !0); 383 } else { 384 if (!c) 385 throw new Error("try statement without catch or finally"); 386 if (this.prev < o.finallyLoc) return t(o.finallyLoc); 387 } 388 } 389 } 390 }, 391 abrupt: function (t, e) { 392 for (var r = this.tryEntries.length - 1; 0 <= r; --r) { 393 var n = this.tryEntries[r]; 394 if ( 395 n.tryLoc <= this.prev && 396 u.call(n, "finallyLoc") && 397 this.prev < n.finallyLoc 398 ) { 399 var o = n; 400 break; 401 } 402 } 403 var i = (o = 404 o && 405 ("break" === t || "continue" === t) && 406 o.tryLoc <= e && 407 e <= o.finallyLoc 408 ? null 409 : o) 410 ? o.completion 411 : {}; 412 return ( 413 (i.type = t), 414 (i.arg = e), 415 o 416 ? ((this.method = "next"), (this.next = o.finallyLoc), f) 417 : this.complete(i) 418 ); 419 }, 420 complete: function (t, e) { 421 if ("throw" === t.type) throw t.arg; 422 return ( 423 "break" === t.type || "continue" === t.type 424 ? (this.next = t.arg) 425 : "return" === t.type 426 ? ((this.rval = this.arg = t.arg), 427 (this.method = "return"), 428 (this.next = "end")) 429 : "normal" === t.type && e && (this.next = e), 430 f 431 ); 432 }, 433 finish: function (t) { 434 for (var e = this.tryEntries.length - 1; 0 <= e; --e) { 435 var r = this.tryEntries[e]; 436 if (r.finallyLoc === t) 437 return this.complete(r.completion, r.afterLoc), b(r), f; 438 } 439 }, 440 catch: function (t) { 441 for (var e = this.tryEntries.length - 1; 0 <= e; --e) { 442 var r, 443 n, 444 o = this.tryEntries[e]; 445 if (o.tryLoc === t) 446 return ( 447 "throw" === (r = o.completion).type && ((n = r.arg), b(o)), n 448 ); 449 } 450 throw new Error("illegal catch attempt"); 451 }, 452 delegateYield: function (t, e, r) { 453 return ( 454 (this.delegate = { iterator: _(t), resultName: e, nextLoc: r }), 455 "next" === this.method && (this.arg = void 0), 456 f 457 ); 458 }, 459 }), 460 a 461 ); 462 } 463 function u(t, e, r, n, o, i, a) { 464 try { 465 var c = t[i](a), 466 u = c.value; 467 } catch (t) { 468 return void r(t); 469 } 470 c.done ? e(u) : Promise.resolve(u).then(n, o); 471 } 472 function l() { 473 return t.apply(this, arguments); 474 } 475 function t() { 476 var c; 477 return ( 478 (c = j().mark(function t(e) { 479 var r; 480 return j().wrap( 481 function (t) { 482 for (;;) 483 switch ((t.prev = t.next)) { 484 case 0: 485 return ( 486 (t.prev = 0), 487 (t.next = 3), 488 fetch(window._tutorobject.ajaxurl, { 489 method: "POST", 490 body: e, 491 }) 492 ); 493 case 3: 494 return (r = t.sent), t.abrupt("return", r); 495 case 7: 496 (t.prev = 7), 497 (t.t0 = t.catch(0)), 498 tutor_toast(__("Operation failed", "tutor"), t.t0, "error"); 499 case 10: 500 case "end": 501 return t.stop(); 502 } 503 }, 504 t, 505 null, 506 [[0, 7]] 507 ); 508 })), 509 (t = function () { 510 var t = this, 511 a = arguments; 512 return new Promise(function (e, r) { 513 var n = c.apply(t, a); 514 function o(t) { 515 u(n, e, r, o, i, "next", t); 516 } 517 function i(t) { 518 u(n, e, r, o, i, "throw", t); 519 } 520 o(void 0); 521 }); 522 }).apply(this, arguments) 523 ); 524 } 525 function k(t) { 526 return (k = 527 "function" == typeof Symbol && "symbol" == typeof Symbol.iterator 528 ? function (t) { 529 return typeof t; 530 } 531 : function (t) { 532 return t && 533 "function" == typeof Symbol && 534 t.constructor === Symbol && 535 t !== Symbol.prototype 536 ? "symbol" 537 : typeof t; 538 })(t); 539 } 540 function O() { 541 O = function () { 542 return a; 543 }; 544 var a = {}, 545 t = Object.prototype, 546 u = t.hasOwnProperty, 547 s = 548 Object.defineProperty || 549 function (t, e, r) { 550 t[e] = r.value; 551 }, 552 e = "function" == typeof Symbol ? Symbol : {}, 553 n = e.iterator || "@@iterator", 554 r = e.asyncIterator || "@@asyncIterator", 555 o = e.toStringTag || "@@toStringTag"; 556 function i(t, e, r) { 557 return ( 558 Object.defineProperty(t, e, { 559 value: r, 560 enumerable: !0, 561 configurable: !0, 562 writable: !0, 563 }), 564 t[e] 565 ); 566 } 567 try { 568 i({}, ""); 569 } catch (t) { 570 i = function (t, e, r) { 571 return (t[e] = r); 572 }; 573 } 574 function c(t, e, r, n) { 575 var o, 576 i, 577 a, 578 c, 579 e = e && e.prototype instanceof h ? e : h, 580 e = Object.create(e.prototype), 581 n = new L(n || []); 582 return ( 583 s(e, "_invoke", { 584 value: 585 ((o = t), 586 (i = r), 587 (a = n), 588 (c = "suspendedStart"), 589 function (t, e) { 590 if ("executing" === c) 591 throw new Error("Generator is already running"); 592 if ("completed" === c) { 593 if ("throw" === t) throw e; 594 return x(); 595 } 596 for (a.method = t, a.arg = e; ; ) { 597 var r = a.delegate; 598 if (r) { 599 r = (function t(e, r) { 600 var n = r.method, 601 o = e.iterator[n]; 602 if (void 0 === o) 603 return ( 604 (r.delegate = null),
605 ("throw" === n && 606 e.iterator.return && 607 ((r.method = "return"), 608 (r.arg = void 0), 609 t(e, r), 610 "throw" === r.method)) || 611 ("return" !== n && 612 ((r.method = "throw"), 613 (r.arg = new TypeError( 614 "The iterator does not provide a '" + 615 n + 616 "' method" 617 )))), 618 f 619 ); 620 n = l(o, e.iterator, r.arg); 621 if ("throw" === n.type) 622 return ( 623 (r.method = "throw"), 624 (r.arg = n.arg), 625 (r.delegate = null), 626 f 627 ); 628 o = n.arg; 629 return o 630 ? o.done 631 ? ((r[e.resultName] = o.value), 632 (r.next = e.nextLoc), 633 "return" !== r.method && 634 ((r.method = "next"), (r.arg = void 0)), 635 (r.delegate = null), 636 f) 637 : o 638 : ((r.method = "throw"), 639 (r.arg = new TypeError( 640 "iterator result is not an object" 641 )), 642 (r.delegate = null), 643 f); 644 })(r, a); 645 if (r) { 646 if (r === f) continue; 647 return r; 648 } 649 } 650 if ("next" === a.method) a.sent = a._sent = a.arg; 651 else if ("throw" === a.method) { 652 if ("suspendedStart" === c) throw ((c = "completed"), a.arg); 653 a.dispatchException(a.arg); 654 } else "return" === a.method && a.abrupt("return", a.arg); 655 c = "executing"; 656 r = l(o, i, a); 657 if ("normal" === r.type) { 658 if ( 659 ((c = a.done ? "completed" : "suspendedYield"), r.arg === f) 660 ) 661 continue; 662 return { value: r.arg, done: a.done }; 663 } 664 "throw" === r.type && 665 ((c = "completed"), (a.method = "throw"), (a.arg = r.arg)); 666 } 667 }), 668 }), 669 e 670 ); 671 } 672 function l(t, e, r) { 673 try { 674 return { type: "normal", arg: t.call(e, r) }; 675 } catch (t) { 676 return { type: "throw", arg: t }; 677 } 678 } 679 a.wrap = c; 680 var f = {}; 681 function h() {} 682 function d() {} 683 function p() {} 684 var e = {}, 685 y = 686 (i(e, n, function () { 687 return this; 688 }), 689 Object.getPrototypeOf), 690 y = y && y(y(_([]))), 691 v = 692 (y && y !== t && u.call(y, n) && (e = y), 693 (p.prototype = h.prototype = Object.create(e))); 694 function g(t) { 695 ["next", "throw", "return"].forEach(function (e) { 696 i(t, e, function (t) { 697 return this._invoke(e, t); 698 }); 699 }); 700 } 701 function m(a, c) { 702 var e; 703 s(this, "_invoke", { 704 value: function (r, n) { 705 function t() { 706 return new c(function (t, e) { 707 !(function e(t, r, n, o) { 708 var i, 709 t = l(a[t], a, r); 710 if ("throw" !== t.type) 711 return (r = (i = t.arg).value) && 712 "object" == k(r) && 713 u.call(r, "__await") 714 ? c.resolve(r.__await).then( 715 function (t) { 716 e("next", t, n, o); 717 }, 718 function (t) { 719 e("throw", t, n, o); 720 } 721 ) 722 : c.resolve(r).then( 723 function (t) { 724 (i.value = t), n(i); 725 }, 726 function (t) { 727 return e("throw", t, n, o); 728 } 729 ); 730 o(t.arg); 731 })(r, n, t, e); 732 }); 733 } 734 return (e = e ? e.then(t, t) : t()); 735 }, 736 }); 737 } 738 function w(t) { 739 var e = { tryLoc: t[0] }; 740 1 in t && (e.catchLoc = t[1]), 741 2 in t && ((e.finallyLoc = t[2]), (e.afterLoc = t[3])), 742 this.tryEntries.push(e); 743 } 744 function b(t) { 745 var e = t.completion || {}; 746 (e.type = "normal"), delete e.arg, (t.completion = e); 747 } 748 function L(t) { 749 (this.tryEntries = [{ tryLoc: "root" }]), 750 t.forEach(w, this), 751 this.reset(!0); 752 } 753 function _(e) { 754 if (e) { 755 var r, 756 t = e[n]; 757 if (t) return t.call(e); 758 if ("function" == typeof e.next) return e; 759 if (!isNaN(e.length)) 760 return ( 761 (r = -1), 762 ((t = function t() { 763 for (; ++r < e.length; ) 764 if (u.call(e, r)) return (t.value = e[r]), (t.done = !1), t; 765 return (t.value = void 0), (t.done = !0), t; 766 }).next = t) 767 ); 768 } 769 return { next: x }; 770 } 771 function x() { 772 return { value: void 0, done: !0 }; 773 } 774 return ( 775 s(v, "constructor", { value: (d.prototype = p), configurable: !0 }), 776 s(p, "constructor", { value: d, configurable: !0 }), 777 (d.displayName = i(p, o, "GeneratorFunction")), 778 (a.isGeneratorFunction = function (t) { 779 t = "function" == typeof t && t.constructor; 780 return ( 781 !!t && (t === d || "GeneratorFunction" === (t.displayName || t.name)) 782 ); 783 }), 784 (a.mark = function (t) { 785 return ( 786 Object.setPrototypeOf 787 ? Object.setPrototypeOf(t, p) 788 : ((t.__proto__ = p), i(t, o, "GeneratorFunction")), 789 (t.prototype = Object.create(v)), 790 t 791 ); 792 }), 793 (a.awrap = function (t) { 794 return { __await: t }; 795 }), 796 g(m.prototype), 797 i(m.prototype, r, function () { 798 return this; 799 }), 800 (a.AsyncIterator = m), 801 (a.async = function (t, e, r, n, o) { 802 void 0 === o && (o = Promise); 803 var i = new m(c(t, e, r, n), o); 804 return a.isGeneratorFunction(e) 805 ? i 806 : i.next().then(function (t) { 807 return t.done ? t.value : i.next(); 808 }); 809 }), 810 g(v), 811 i(v, o, "Generator"), 812 i(v, n, function () { 813 return this; 814 }), 815 i(v, "toString", function () { 816 return "[object Generator]"; 817 }), 818 (a.keys = function (t) { 819 var e, 820 r = Object(t), 821 n = []; 822 for (e in r) n.push(e); 823 return ( 824 n.reverse(), 825 function t() { 826 for (; n.length; ) { 827 var e = n.pop(); 828 if (e in r) return (t.value = e), (t.done = !1), t; 829 } 830 return (t.done = !0), t; 831 } 832 ); 833 }), 834 (a.values = _), 835 (L.prototype = { 836 constructor: L, 837 reset: function (t) { 838 if ( 839 ((this.prev = 0), 840 (this.next = 0), 841 (this.sent = this._sent = void 0), 842 (this.done = !1), 843 (this.delegate = null),
844 (this.method = "next"), 845 (this.arg = void 0), 846 this.tryEntries.forEach(b), 847 !t) 848 ) 849 for (var e in this) 850 "t" === e.charAt(0) && 851 u.call(this, e) && 852 !isNaN(+e.slice(1)) && 853 (this[e] = void 0); 854 }, 855 stop: function () { 856 this.done = !0; 857 var t = this.tryEntries[0].completion; 858 if ("throw" === t.type) throw t.arg; 859 return this.rval; 860 }, 861 dispatchException: function (r) { 862 if (this.done) throw r; 863 var n = this; 864 function t(t, e) { 865 return ( 866 (i.type = "throw"), 867 (i.arg = r), 868 (n.next = t), 869 e && ((n.method = "next"), (n.arg = void 0)), 870 !!e 871 ); 872 } 873 for (var e = this.tryEntries.length - 1; 0 <= e; --e) { 874 var o = this.tryEntries[e], 875 i = o.completion; 876 if ("root" === o.tryLoc) return t("end"); 877 if (o.tryLoc <= this.prev) { 878 var a = u.call(o, "catchLoc"), 879 c = u.call(o, "finallyLoc"); 880 if (a && c) { 881 if (this.prev < o.catchLoc) return t(o.catchLoc, !0); 882 if (this.prev < o.finallyLoc) return t(o.finallyLoc); 883 } else if (a) { 884 if (this.prev < o.catchLoc) return t(o.catchLoc, !0); 885 } else { 886 if (!c) 887 throw new Error("try statement without catch or finally"); 888 if (this.prev < o.finallyLoc) return t(o.finallyLoc); 889 } 890 } 891 } 892 }, 893 abrupt: function (t, e) { 894 for (var r = this.tryEntries.length - 1; 0 <= r; --r) { 895 var n = this.tryEntries[r]; 896 if ( 897 n.tryLoc <= this.prev && 898 u.call(n, "finallyLoc") && 899 this.prev < n.finallyLoc 900 ) { 901 var o = n; 902 break; 903 } 904 } 905 var i = (o = 906 o && 907 ("break" === t || "continue" === t) && 908 o.tryLoc <= e && 909 e <= o.finallyLoc 910 ? null 911 : o) 912 ? o.completion 913 : {}; 914 return ( 915 (i.type = t), 916 (i.arg = e), 917 o 918 ? ((this.method = "next"), (this.next = o.finallyLoc), f) 919 : this.complete(i) 920 ); 921 }, 922 complete: function (t, e) { 923 if ("throw" === t.type) throw t.arg; 924 return ( 925 "break" === t.type || "continue" === t.type 926 ? (this.next = t.arg) 927 : "return" === t.type 928 ? ((this.rval = this.arg = t.arg), 929 (this.method = "return"), 930 (this.next = "end")) 931 : "normal" === t.type && e && (this.next = e), 932 f 933 ); 934 }, 935 finish: function (t) { 936 for (var e = this.tryEntries.length - 1; 0 <= e; --e) { 937 var r = this.tryEntries[e]; 938 if (r.finallyLoc === t) 939 return this.complete(r.completion, r.afterLoc), b(r), f; 940 } 941 }, 942 catch: function (t) { 943 for (var e = this.tryEntries.length - 1; 0 <= e; --e) { 944 var r, 945 n, 946 o = this.tryEntries[e]; 947 if (o.tryLoc === t) 948 return ( 949 "throw" === (r = o.completion).type && ((n = r.arg), b(o)), n 950 ); 951 } 952 throw new Error("illegal catch attempt"); 953 }, 954 delegateYield: function (t, e, r) { 955 return ( 956 (this.delegate = { iterator: _(t), resultName: e, nextLoc: r }), 957 "next" === this.method && (this.arg = void 0), 958 f 959 ); 960 }, 961 }), 962 a 963 ); 964 } 965 function f(t, e, r, n, o, i, a) { 966 try { 967 var c = t[i](a), 968 u = c.value; 969 } catch (t) { 970 return void r(t); 971 } 972 c.done ? e(u) : Promise.resolve(u).then(n, o); 973 } 974 function r(c) { 975 return function () { 976 var t = this, 977 a = arguments; 978 return new Promise(function (e, r) { 979 var n = c.apply(t, a); 980 function o(t) { 981 f(n, e, r, o, i, "next", t); 982 } 983 function i(t) { 984 f(n, e, r, o, i, "throw", t); 985 } 986 o(void 0); 987 }); 988 }; 989 }
990 var h = wp.i18n.__, 991 o = 992 (window.tutor_toast || 993 (window.tutor_toast = function (t, e, r) { 994 var n = 995 !(3 < arguments.length && void 0 !== arguments[3]) || 996 arguments[3], 997 o = 998 (jQuery(".tutor-toast-parent").length || 999 jQuery("body").append( 1000 '<div class="tutor-toast-parent tutor-toast-right"></div>' 1001 ), 1002 "success" == r 1003 ? "success" 1004 : "error" == r 1005 ? "danger" 1006 : "warning" == r 1007 ? "warning" 1008 : "primary"), 1009 r = 1010 "success" == r 1011 ? "tutor-icon-mark" 1012 : "error" == r 1013 ? "tutor-icon-times" 1014 : "tutor-icon-circle-info-o", 1015 i = null != e && "" !== e.trim(), 1016 a = jQuery( 1017 '\n <div class="tutor-notification tutor-is-' 1018 .concat( 1019 o, 1020 ' tutor-mb-16">\n <div class="tutor-notification-icon">\n <i class="' 1021 ) 1022 .concat( 1023 r, 1024 '"></i>\n </div>\n <div class="tutor-notification-content">\n <h5>' 1025 ) 1026 .concat(t, '</h5>\n <p class="') 1027 .concat(i ? "" : "tutor-d-none", '">') 1028 .concat( 1029 e, 1030 '</p>\n </div>\n <button class="tutor-notification-close">\n <i class="fas fa-times"></i>\n </button>\n </div>\n ' 1031 ) 1032 ); 1033 a.find(".tutor-noti-close").click(function () { 1034 a.remove(); 1035 }), 1036 jQuery(".tutor-toast-parent").append(a), 1037 n && 1038 setTimeout(function () { 1039 a && 1040 a.fadeOut("fast", function () { 1041 jQuery(this).remove(); 1042 }); 1043 }, 5e3); 1044 }), 1045 document.addEventListener("DOMContentLoaded", function () { 1046 "settings" === (window._tutorobject ? _tutorobject : "").current_page && 1047 document 1048 .querySelectorAll(".tutor-device-sign-out") 1049 .forEach(function (t) { 1050 t.onclick = (function () { 1051 var e = r( 1052 O().mark(function t(e) { 1053 var r, n, o, i; 1054 return O().wrap( 1055 function (t) { 1056 for (;;) 1057 switch ((t.prev = t.next)) { 1058 case 0: 1059 return ( 1060 (r = e.target), 1061 (n = e.target.dataset.umetaId), 1062 (n = s([ 1063 { 1064 umeta_id: n, 1065 action: "tutor_remove_device_manually", 1066 }, 1067 ])), 1068 (t.prev = 3), 1069 r.classList.add("is-loading"), 1070 r.setAttribute("disabled", !0), 1071 (t.next = 8), 1072 l(n) 1073 ); 1074 case 8: 1075 return (n = t.sent), (t.next = 11), n.json(); 1076 case 11: 1077 (i = t.sent), 1078 (o = i.success), 1079 (i = i.data), 1080 o 1081 ? (tutor_toast( 1082 h("Success", "tutor-pro"), 1083 i.msg, 1084 "success" 1085 ), 1086 i.redirect_to 1087 ? (window.location.href = i.redirect_to) 1088 : r.closest(".tutor-col-md-6").remove()) 1089 : tutor_toast( 1090 h("Failed", "tutor-pro"),
1091 i.msg, 1092 "error" 1093 ), 1094 (t.next = 19); 1095 break; 1096 case 16: 1097 (t.prev = 16), 1098 (t.t0 = t.catch(3)), 1099 tutor_toast( 1100 h("Something went wrong", "tutor-pro"), 1101 h("Please try again after reloading page!"), 1102 "error" 1103 ); 1104 case 19: 1105 return ( 1106 (t.prev = 19), 1107 r.classList.remove("is-loading"), 1108 r.removeAttribute("disabled"), 1109 t.finish(19) 1110 ); 1111 case 23: 1112 case "end": 1113 return t.stop(); 1114 } 1115 }, 1116 t, 1117 null, 1118 [[3, 16, 19, 23]] 1119 ); 1120 }) 1121 ); 1122 return function (t) { 1123 return e.apply(this, arguments); 1124 }; 1125 })(); 1126 }); 1127 var u = document.querySelector( 1128 ".tutor-login-form-wrapper, .tutor-login-modal, #login_error, .woocommerce-error" 1129 ); 1130 u && 1131 (u.onclick = (function () { 1132 var e = r( 1133 O().mark(function t(e) { 1134 var r, n, o, i, a, c; 1135 return O().wrap( 1136 function (t) { 1137 for (;;) 1138 switch ((t.prev = t.next)) { 1139 case 0: 1140 if ( 1141 ((i = e.target), 1142 (r = i).hasAttribute("id") && 1143 "tutor-remove-active-logins" === 1144 i.getAttribute("id")) 1145 ) 1146 return ( 1147 e.preventDefault(), 1148 (n = document.getElementById( 1149 "tutor-remove-logins-wrapper" 1150 )), 1151 (o = 1152 (o = 1153 (o = n.closest(".tutor-alert")) || 1154 document.getElementById("login_error")) || 1155 document.querySelector("ul.woocommerce-error")), 1156 (i = s([ 1157 { action: "tutor_remove_all_active_logins" }, 1158 ])), 1159 (t.prev = 9), 1160 (n.innerHTML = 1161 '<span class="tutor-color-subdued">'.concat( 1162 h("Please wait...", "tutor-pro"), 1163 "</span>" 1164 )), 1165 (t.next = 13), 1166 l(i) 1167 ); 1168 t.next = 38; 1169 break; 1170 case 13: 1171 return (i = t.sent), (t.next = 16), i.json(); 1172 case 16: 1173 (a = t.sent), 1174 (c = a.success), 1175 (a = a.data), 1176 c 1177 ? (o.classList.contains("tutor-warning") && 1178 (o.classList.remove("tutor-warning"), 1179 o.classList.add("tutor-success")), 1180 o.hasAttribute("id") && 1181 (o.style.borderLeftColor = "#6eea98"), 1182 o.classList.contains("woocommerce-error") && 1183 o.classList.add("woocommerce-message"), 1184 (o.innerHTML = h( 1185 "All of your active login sessions have been removed. You can login now." 1186 )), 1187 (t.next = 32)) 1188 : (t.next = 25); 1189 break; 1190 case 25: 1191 if (Array.isArray(a)) 1192 if ((c = a[0]) && "tutor_login_limit" === c.code) 1193 return ( 1194 u.insertAdjacentHTML("afterbegin", c.message), 1195 t.abrupt("return") 1196 ); 1197 t.next = 30; 1198 break; 1199 case 30: 1200 tutor_toast(h("Failed", "tutor-pro"), a, "error"), 1201 (n.innerHTML = r); 1202 case 32: 1203 t.next = 38; 1204 break; 1205 case 34: 1206 (t.prev = 34), 1207 (t.t0 = t.catch(9)), 1208 console.log(t.t0), 1209 tutor_toast( 1210 h("Something went wrong", "tutor-pro"),
1211 h("Please try again after reloading page!"), 1212 "error" 1213 ); 1214 case 38: 1215 case "end": 1216 return t.stop(); 1217 } 1218 }, 1219 t, 1220 null, 1221 [[9, 34]] 1222 ); 1223 }) 1224 ); 1225 return function (t) { 1226 return e.apply(this, arguments); 1227 }; 1228 })()); 1229 }), 1230 !1); 1231 window.addEventListener("DOMContentLoaded", function () { 1232 var e, t, r, n; 1233 document.querySelector(".tutor-course-details-page") && 1234 (e = document.querySelector(".tutor-single-course-sidebar")).hasAttribute( 1235 "data-tutor-sticky-sidebar" 1236 ) && 1237 ((t = document.getElementsByTagName("header")[0]), 1238 (r = "".concat(t.offsetHeight, "px")), 1239 (n = t.classList.value.includes("sticky")), 1240 window.addEventListener("scroll", function () { 1241 var t = window.scrollY; 1242 1200 <= window.innerWidth && 1243 (200 <= t 1244 ? o || 1245 (e.classList.add("tutor-sidebar-sticky"), 1246 (t = "max-height: 80vh; overflow-y: scroll; top: ".concat( 1247 n ? r : "" 1248 )), 1249 e.setAttribute("style", t), 1250 (e.scrollTop = 0), 1251 (o = !0)) 1252 : (e.classList.remove("tutor-sidebar-sticky"), 1253 e.removeAttribute("style"), 1254 (o = !1))); 1255 })); 1256 }); 1257})();
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.