scorm-again 3.1.5 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/scorm12.js CHANGED
@@ -13,7 +13,9 @@ this.Scorm12API = (function () {
13
13
  if (Array.isArray(arr)) return _array_like_to_array$5(arr);
14
14
  }
15
15
  function _iterable_to_array$3(iter) {
16
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
16
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
17
+ return Array.from(iter);
18
+ }
17
19
  }
18
20
  function _iterable_to_array_limit$2(arr, i) {
19
21
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
@@ -40,10 +42,10 @@ this.Scorm12API = (function () {
40
42
  return _arr;
41
43
  }
42
44
  function _non_iterable_rest$2() {
43
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
45
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
44
46
  }
45
47
  function _non_iterable_spread$3() {
46
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
48
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
47
49
  }
48
50
  function _sliced_to_array$2(arr, i) {
49
51
  return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$2();
@@ -61,6 +63,24 @@ this.Scorm12API = (function () {
61
63
  }
62
64
  var SECONDS_PER_MINUTE = 60;
63
65
  var SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE;
66
+ var CORS_SAFELISTED_CONTENT_TYPES = [
67
+ "text/plain",
68
+ "application/x-www-form-urlencoded",
69
+ "multipart/form-data"
70
+ ];
71
+ function isCorsSafelistedContentType(contentType) {
72
+ var _split_;
73
+ var essence = ((_split_ = (contentType || "").split(";")[0]) !== null && _split_ !== void 0 ? _split_ : "").trim().toLowerCase();
74
+ return CORS_SAFELISTED_CONTENT_TYPES.includes(essence);
75
+ }
76
+ function isCrossOriginUrl(url) {
77
+ if (typeof location === "undefined" || !location || !location.origin) return false;
78
+ try {
79
+ return new URL(url, location.href).origin !== location.origin;
80
+ } catch (unused) {
81
+ return false;
82
+ }
83
+ }
64
84
  var getSecondsAsHHMMSS = function getSecondsAsHHMMSS(totalSeconds) {
65
85
  if (!totalSeconds || totalSeconds <= 0) {
66
86
  return "00:00:00";
@@ -248,9 +268,7 @@ this.Scorm12API = (function () {
248
268
  };
249
269
 
250
270
  function _assert_this_initialized$d(self) {
251
- if (self === void 0) {
252
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
253
- }
271
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
254
272
  return self;
255
273
  }
256
274
  function _call_super$d(_this, derived, args) {
@@ -258,9 +276,7 @@ this.Scorm12API = (function () {
258
276
  return _possible_constructor_return$d(_this, _is_native_reflect_construct$d() ? Reflect.construct(derived, args || [], _get_prototype_of$d(_this).constructor) : derived.apply(_this, args));
259
277
  }
260
278
  function _class_call_check$q(instance, Constructor) {
261
- if (!(instance instanceof Constructor)) {
262
- throw new TypeError("Cannot call a class as a function");
263
- }
279
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
264
280
  }
265
281
  function _defineProperties$p(target, props) {
266
282
  for(var i = 0; i < props.length; i++){
@@ -294,10 +310,16 @@ this.Scorm12API = (function () {
294
310
  });
295
311
  if (superClass) _set_prototype_of$d(subClass, superClass);
296
312
  }
313
+ function _is_native_reflect_construct$d() {
314
+ try {
315
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
316
+ } catch (_) {}
317
+ return (_is_native_reflect_construct$d = function() {
318
+ return !!result;
319
+ })();
320
+ }
297
321
  function _possible_constructor_return$d(self, call) {
298
- if (call && (_type_of$o(call) === "object" || typeof call === "function")) {
299
- return call;
300
- }
322
+ if (call && (_type_of$o(call) === "object" || typeof call === "function")) return call;
301
323
  return _assert_this_initialized$d(self);
302
324
  }
303
325
  function _set_prototype_of$d(o, p) {
@@ -311,14 +333,6 @@ this.Scorm12API = (function () {
311
333
  "@swc/helpers - typeof";
312
334
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
313
335
  }
314
- function _is_native_reflect_construct$d() {
315
- try {
316
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
317
- } catch (_) {}
318
- return (_is_native_reflect_construct$d = function() {
319
- return !!result;
320
- })();
321
- }
322
336
  var __defProp$m = Object.defineProperty;
323
337
  var __defNormalProp$m = function __defNormalProp(obj, key, value) {
324
338
  return key in obj ? __defProp$m(obj, key, {
@@ -390,7 +404,7 @@ this.Scorm12API = (function () {
390
404
  */ key: "setStartTime",
391
405
  value: function setStartTime() {
392
406
  if (this._start_time === void 0) {
393
- this._start_time = /* @__PURE__ */ new Date().getTime();
407
+ this._start_time = (/* @__PURE__ */ new Date()).getTime();
394
408
  } else {
395
409
  throw new Error("Start time has already been set.");
396
410
  }
@@ -401,9 +415,7 @@ this.Scorm12API = (function () {
401
415
  }(BaseCMI);
402
416
 
403
417
  function _assert_this_initialized$c(self) {
404
- if (self === void 0) {
405
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
406
- }
418
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
407
419
  return self;
408
420
  }
409
421
  function _call_super$c(_this, derived, args) {
@@ -411,14 +423,11 @@ this.Scorm12API = (function () {
411
423
  return _possible_constructor_return$c(_this, _is_native_reflect_construct$c() ? Reflect.construct(derived, args || [], _get_prototype_of$c(_this).constructor) : derived.apply(_this, args));
412
424
  }
413
425
  function _class_call_check$p(instance, Constructor) {
414
- if (!(instance instanceof Constructor)) {
415
- throw new TypeError("Cannot call a class as a function");
416
- }
426
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
417
427
  }
418
428
  function _construct(Parent, args, Class) {
419
- if (_is_native_reflect_construct$c()) {
420
- _construct = Reflect.construct;
421
- } else {
429
+ if (_is_native_reflect_construct$c()) _construct = Reflect.construct;
430
+ else {
422
431
  _construct = function construct(Parent, args, Class) {
423
432
  var a = [
424
433
  null
@@ -467,10 +476,16 @@ this.Scorm12API = (function () {
467
476
  function _is_native_function(fn) {
468
477
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
469
478
  }
479
+ function _is_native_reflect_construct$c() {
480
+ try {
481
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
482
+ } catch (_) {}
483
+ return (_is_native_reflect_construct$c = function() {
484
+ return !!result;
485
+ })();
486
+ }
470
487
  function _possible_constructor_return$c(self, call) {
471
- if (call && (_type_of$n(call) === "object" || typeof call === "function")) {
472
- return call;
473
- }
488
+ if (call && (_type_of$n(call) === "object" || typeof call === "function")) return call;
474
489
  return _assert_this_initialized$c(self);
475
490
  }
476
491
  function _set_prototype_of$c(o, p) {
@@ -486,11 +501,9 @@ this.Scorm12API = (function () {
486
501
  }
487
502
  function _wrap_native_super(Class) {
488
503
  var _cache = typeof Map === "function" ? new Map() : undefined;
489
- _wrap_native_super = function wrapNativeSuper(Class) {
504
+ _wrap_native_super = function(Class) {
490
505
  if (Class === null || !_is_native_function(Class)) return Class;
491
- if (typeof Class !== "function") {
492
- throw new TypeError("Super expression must either be null or a function");
493
- }
506
+ if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
494
507
  if (typeof _cache !== "undefined") {
495
508
  if (_cache.has(Class)) return _cache.get(Class);
496
509
  _cache.set(Class, Wrapper);
@@ -510,14 +523,6 @@ this.Scorm12API = (function () {
510
523
  };
511
524
  return _wrap_native_super(Class);
512
525
  }
513
- function _is_native_reflect_construct$c() {
514
- try {
515
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
516
- } catch (_) {}
517
- return (_is_native_reflect_construct$c = function() {
518
- return !!result;
519
- })();
520
- }
521
526
  var __defProp$l = Object.defineProperty;
522
527
  var __defNormalProp$l = function __defNormalProp(obj, key, value) {
523
528
  return key in obj ? __defProp$l(obj, key, {
@@ -672,9 +677,7 @@ this.Scorm12API = (function () {
672
677
  };
673
678
 
674
679
  function _assert_this_initialized$b(self) {
675
- if (self === void 0) {
676
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
677
- }
680
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
678
681
  return self;
679
682
  }
680
683
  function _call_super$b(_this, derived, args) {
@@ -682,9 +685,7 @@ this.Scorm12API = (function () {
682
685
  return _possible_constructor_return$b(_this, _is_native_reflect_construct$b() ? Reflect.construct(derived, args || [], _get_prototype_of$b(_this).constructor) : derived.apply(_this, args));
683
686
  }
684
687
  function _class_call_check$o(instance, Constructor) {
685
- if (!(instance instanceof Constructor)) {
686
- throw new TypeError("Cannot call a class as a function");
687
- }
688
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
688
689
  }
689
690
  function _get_prototype_of$b(o) {
690
691
  _get_prototype_of$b = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
@@ -705,10 +706,16 @@ this.Scorm12API = (function () {
705
706
  });
706
707
  if (superClass) _set_prototype_of$b(subClass, superClass);
707
708
  }
709
+ function _is_native_reflect_construct$b() {
710
+ try {
711
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
712
+ } catch (_) {}
713
+ return (_is_native_reflect_construct$b = function() {
714
+ return !!result;
715
+ })();
716
+ }
708
717
  function _possible_constructor_return$b(self, call) {
709
- if (call && (_type_of$m(call) === "object" || typeof call === "function")) {
710
- return call;
711
- }
718
+ if (call && (_type_of$m(call) === "object" || typeof call === "function")) return call;
712
719
  return _assert_this_initialized$b(self);
713
720
  }
714
721
  function _set_prototype_of$b(o, p) {
@@ -722,14 +729,6 @@ this.Scorm12API = (function () {
722
729
  "@swc/helpers - typeof";
723
730
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
724
731
  }
725
- function _is_native_reflect_construct$b() {
726
- try {
727
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
728
- } catch (_) {}
729
- return (_is_native_reflect_construct$b = function() {
730
- return !!result;
731
- })();
732
- }
733
732
  var scorm12_errors$1 = scorm12_constants.error_descriptions;
734
733
  var Scorm12ValidationError = /*#__PURE__*/ function(ValidationError) {
735
734
  _inherits$b(Scorm12ValidationError, ValidationError);
@@ -768,9 +767,7 @@ this.Scorm12API = (function () {
768
767
  configurable: true,
769
768
  writable: true
770
769
  });
771
- } else {
772
- obj[key] = value;
773
- }
770
+ } else obj[key] = value;
774
771
  return obj;
775
772
  }
776
773
  function _object_spread$6(target) {
@@ -798,9 +795,8 @@ this.Scorm12API = (function () {
798
795
  }
799
796
  function _object_spread_props$3(target, source) {
800
797
  source = source != null ? source : {};
801
- if (Object.getOwnPropertyDescriptors) {
802
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
803
- } else {
798
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
799
+ else {
804
800
  ownKeys$3(Object(source)).forEach(function(key) {
805
801
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
806
802
  });
@@ -886,9 +882,7 @@ this.Scorm12API = (function () {
886
882
  });
887
883
 
888
884
  function _assert_this_initialized$a(self) {
889
- if (self === void 0) {
890
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
891
- }
885
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
892
886
  return self;
893
887
  }
894
888
  function _call_super$a(_this, derived, args) {
@@ -896,9 +890,7 @@ this.Scorm12API = (function () {
896
890
  return _possible_constructor_return$a(_this, _is_native_reflect_construct$a() ? Reflect.construct(derived, args || [], _get_prototype_of$a(_this).constructor) : derived.apply(_this, args));
897
891
  }
898
892
  function _class_call_check$n(instance, Constructor) {
899
- if (!(instance instanceof Constructor)) {
900
- throw new TypeError("Cannot call a class as a function");
901
- }
893
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
902
894
  }
903
895
  function _defineProperties$n(target, props) {
904
896
  for(var i = 0; i < props.length; i++){
@@ -932,10 +924,16 @@ this.Scorm12API = (function () {
932
924
  });
933
925
  if (superClass) _set_prototype_of$a(subClass, superClass);
934
926
  }
927
+ function _is_native_reflect_construct$a() {
928
+ try {
929
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
930
+ } catch (_) {}
931
+ return (_is_native_reflect_construct$a = function() {
932
+ return !!result;
933
+ })();
934
+ }
935
935
  function _possible_constructor_return$a(self, call) {
936
- if (call && (_type_of$l(call) === "object" || typeof call === "function")) {
937
- return call;
938
- }
936
+ if (call && (_type_of$l(call) === "object" || typeof call === "function")) return call;
939
937
  return _assert_this_initialized$a(self);
940
938
  }
941
939
  function _set_prototype_of$a(o, p) {
@@ -949,14 +947,6 @@ this.Scorm12API = (function () {
949
947
  "@swc/helpers - typeof";
950
948
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
951
949
  }
952
- function _is_native_reflect_construct$a() {
953
- try {
954
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
955
- } catch (_) {}
956
- return (_is_native_reflect_construct$a = function() {
957
- return !!result;
958
- })();
959
- }
960
950
  var __defProp$k = Object.defineProperty;
961
951
  var __defNormalProp$k = function __defNormalProp(obj, key, value) {
962
952
  return key in obj ? __defProp$k(obj, key, {
@@ -1082,11 +1072,8 @@ this.Scorm12API = (function () {
1082
1072
  reject(error);
1083
1073
  return;
1084
1074
  }
1085
- if (info.done) {
1086
- resolve(value);
1087
- } else {
1088
- Promise.resolve(value).then(_next, _throw);
1089
- }
1075
+ if (info.done) resolve(value);
1076
+ else Promise.resolve(value).then(_next, _throw);
1090
1077
  }
1091
1078
  function _async_to_generator$3(fn) {
1092
1079
  return function() {
@@ -1211,8 +1198,10 @@ this.Scorm12API = (function () {
1211
1198
  lmsCommitUrl: false,
1212
1199
  dataCommitFormat: "json",
1213
1200
  commitRequestDataType: "application/json;charset=UTF-8",
1201
+ terminationCommitContentType: "text/plain;charset=UTF-8",
1214
1202
  autoProgress: false,
1215
1203
  logLevel: LogLevelEnum.ERROR,
1204
+ uninitializedGetLogLevel: LogLevelEnum.WARN,
1216
1205
  selfReportSessionTime: false,
1217
1206
  alwaysSendTotalTime: false,
1218
1207
  renderCommonCommitFields: false,
@@ -1594,9 +1583,7 @@ this.Scorm12API = (function () {
1594
1583
  configurable: true,
1595
1584
  writable: true
1596
1585
  });
1597
- } else {
1598
- obj[key] = value;
1599
- }
1586
+ } else obj[key] = value;
1600
1587
  return obj;
1601
1588
  }
1602
1589
  function _object_spread$5(target) {
@@ -1716,11 +1703,8 @@ this.Scorm12API = (function () {
1716
1703
  reject(error);
1717
1704
  return;
1718
1705
  }
1719
- if (info.done) {
1720
- resolve(value);
1721
- } else {
1722
- Promise.resolve(value).then(_next, _throw);
1723
- }
1706
+ if (info.done) resolve(value);
1707
+ else Promise.resolve(value).then(_next, _throw);
1724
1708
  }
1725
1709
  function _async_to_generator$2(fn) {
1726
1710
  return function() {
@@ -1738,9 +1722,7 @@ this.Scorm12API = (function () {
1738
1722
  };
1739
1723
  }
1740
1724
  function _class_call_check$m(instance, Constructor) {
1741
- if (!(instance instanceof Constructor)) {
1742
- throw new TypeError("Cannot call a class as a function");
1743
- }
1725
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1744
1726
  }
1745
1727
  function _defineProperties$m(target, props) {
1746
1728
  for(var i = 0; i < props.length; i++){
@@ -1755,10 +1737,6 @@ this.Scorm12API = (function () {
1755
1737
  if (protoProps) _defineProperties$m(Constructor.prototype, protoProps);
1756
1738
  return Constructor;
1757
1739
  }
1758
- function _type_of$k(obj) {
1759
- "@swc/helpers - typeof";
1760
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1761
- }
1762
1740
  function _ts_generator$2(thisArg, body) {
1763
1741
  var f, y, t, _ = {
1764
1742
  label: 0,
@@ -1858,6 +1836,10 @@ this.Scorm12API = (function () {
1858
1836
  };
1859
1837
  }
1860
1838
  }
1839
+ function _type_of$k(obj) {
1840
+ "@swc/helpers - typeof";
1841
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1842
+ }
1861
1843
  var __defProp$j = Object.defineProperty;
1862
1844
  var __defNormalProp$j = function __defNormalProp(obj, key, value) {
1863
1845
  return key in obj ? __defProp$j(obj, key, {
@@ -1938,9 +1920,7 @@ this.Scorm12API = (function () {
1938
1920
  ];
1939
1921
 
1940
1922
  function _assert_this_initialized$9(self) {
1941
- if (self === void 0) {
1942
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1943
- }
1923
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1944
1924
  return self;
1945
1925
  }
1946
1926
  function _call_super$9(_this, derived, args) {
@@ -1948,9 +1928,7 @@ this.Scorm12API = (function () {
1948
1928
  return _possible_constructor_return$9(_this, _is_native_reflect_construct$9() ? Reflect.construct(derived, args || [], _get_prototype_of$9(_this).constructor) : derived.apply(_this, args));
1949
1929
  }
1950
1930
  function _class_call_check$l(instance, Constructor) {
1951
- if (!(instance instanceof Constructor)) {
1952
- throw new TypeError("Cannot call a class as a function");
1953
- }
1931
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
1954
1932
  }
1955
1933
  function _defineProperties$l(target, props) {
1956
1934
  for(var i = 0; i < props.length; i++){
@@ -1985,10 +1963,16 @@ this.Scorm12API = (function () {
1985
1963
  });
1986
1964
  if (superClass) _set_prototype_of$9(subClass, superClass);
1987
1965
  }
1966
+ function _is_native_reflect_construct$9() {
1967
+ try {
1968
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1969
+ } catch (_) {}
1970
+ return (_is_native_reflect_construct$9 = function() {
1971
+ return !!result;
1972
+ })();
1973
+ }
1988
1974
  function _possible_constructor_return$9(self, call) {
1989
- if (call && (_type_of$j(call) === "object" || typeof call === "function")) {
1990
- return call;
1991
- }
1975
+ if (call && (_type_of$j(call) === "object" || typeof call === "function")) return call;
1992
1976
  return _assert_this_initialized$9(self);
1993
1977
  }
1994
1978
  function _set_prototype_of$9(o, p) {
@@ -2002,14 +1986,6 @@ this.Scorm12API = (function () {
2002
1986
  "@swc/helpers - typeof";
2003
1987
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2004
1988
  }
2005
- function _is_native_reflect_construct$9() {
2006
- try {
2007
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
2008
- } catch (_) {}
2009
- return (_is_native_reflect_construct$9 = function() {
2010
- return !!result;
2011
- })();
2012
- }
2013
1989
  var __defProp$i = Object.defineProperty;
2014
1990
  var __defNormalProp$i = function __defNormalProp(obj, key, value) {
2015
1991
  return key in obj ? __defProp$i(obj, key, {
@@ -2394,9 +2370,7 @@ this.Scorm12API = (function () {
2394
2370
  if (Array.isArray(arr)) return _array_like_to_array$4(arr);
2395
2371
  }
2396
2372
  function _class_call_check$k(instance, Constructor) {
2397
- if (!(instance instanceof Constructor)) {
2398
- throw new TypeError("Cannot call a class as a function");
2399
- }
2373
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
2400
2374
  }
2401
2375
  function _defineProperties$k(target, props) {
2402
2376
  for(var i = 0; i < props.length; i++){
@@ -2412,10 +2386,12 @@ this.Scorm12API = (function () {
2412
2386
  return Constructor;
2413
2387
  }
2414
2388
  function _iterable_to_array$2(iter) {
2415
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2389
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
2390
+ return Array.from(iter);
2391
+ }
2416
2392
  }
2417
2393
  function _non_iterable_spread$2() {
2418
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2394
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2419
2395
  }
2420
2396
  function _to_consumable_array$2(arr) {
2421
2397
  return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$2();
@@ -2630,11 +2606,8 @@ this.Scorm12API = (function () {
2630
2606
  reject(error);
2631
2607
  return;
2632
2608
  }
2633
- if (info.done) {
2634
- resolve(value);
2635
- } else {
2636
- Promise.resolve(value).then(_next, _throw);
2637
- }
2609
+ if (info.done) resolve(value);
2610
+ else Promise.resolve(value).then(_next, _throw);
2638
2611
  }
2639
2612
  function _async_to_generator$1(fn) {
2640
2613
  return function() {
@@ -2652,9 +2625,7 @@ this.Scorm12API = (function () {
2652
2625
  };
2653
2626
  }
2654
2627
  function _class_call_check$j(instance, Constructor) {
2655
- if (!(instance instanceof Constructor)) {
2656
- throw new TypeError("Cannot call a class as a function");
2657
- }
2628
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
2658
2629
  }
2659
2630
  function _defineProperties$j(target, props) {
2660
2631
  for(var i = 0; i < props.length; i++){
@@ -2677,18 +2648,14 @@ this.Scorm12API = (function () {
2677
2648
  configurable: true,
2678
2649
  writable: true
2679
2650
  });
2680
- } else {
2681
- obj[key] = value;
2682
- }
2651
+ } else obj[key] = value;
2683
2652
  return obj;
2684
2653
  }
2685
2654
  function _instanceof$5(left, right) {
2686
2655
  "@swc/helpers - instanceof";
2687
2656
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
2688
2657
  return !!right[Symbol.hasInstance](left);
2689
- } else {
2690
- return left instanceof right;
2691
- }
2658
+ } else return left instanceof right;
2692
2659
  }
2693
2660
  function _object_spread$4(target) {
2694
2661
  for(var i = 1; i < arguments.length; i++){
@@ -2715,19 +2682,14 @@ this.Scorm12API = (function () {
2715
2682
  }
2716
2683
  function _object_spread_props$2(target, source) {
2717
2684
  source = source != null ? source : {};
2718
- if (Object.getOwnPropertyDescriptors) {
2719
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2720
- } else {
2685
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2686
+ else {
2721
2687
  ownKeys$2(Object(source)).forEach(function(key) {
2722
2688
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2723
2689
  });
2724
2690
  }
2725
2691
  return target;
2726
2692
  }
2727
- function _type_of$i(obj) {
2728
- "@swc/helpers - typeof";
2729
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2730
- }
2731
2693
  function _ts_generator$1(thisArg, body) {
2732
2694
  var f, y, t, _ = {
2733
2695
  label: 0,
@@ -2827,6 +2789,10 @@ this.Scorm12API = (function () {
2827
2789
  };
2828
2790
  }
2829
2791
  }
2792
+ function _type_of$i(obj) {
2793
+ "@swc/helpers - typeof";
2794
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2795
+ }
2830
2796
  var __defProp$h = Object.defineProperty;
2831
2797
  var __defNormalProp$h = function __defNormalProp(obj, key, value) {
2832
2798
  return key in obj ? __defProp$h(obj, key, {
@@ -3028,14 +2994,16 @@ this.Scorm12API = (function () {
3028
2994
  * @private
3029
2995
  */ function performBeacon(url, params) {
3030
2996
  return _async_to_generator$1(function() {
3031
- var _this, _this__prepareRequestBody, body, contentType, beaconSuccess;
2997
+ var _this, _this__prepareRequestBody, body, contentType, beaconContentType, beaconSuccess;
3032
2998
  return _ts_generator$1(this, function(_state) {
3033
2999
  _this = this;
3034
3000
  _this__prepareRequestBody = this._prepareRequestBody(params), body = _this__prepareRequestBody.body, contentType = _this__prepareRequestBody.contentType;
3001
+ beaconContentType = Array.isArray(params) ? contentType : this.settings.terminationCommitContentType;
3002
+ this._warnIfBeaconContentTypeUnsafe(url, beaconContentType);
3035
3003
  beaconSuccess = navigator.sendBeacon(url, new Blob([
3036
3004
  body
3037
3005
  ], {
3038
- type: contentType
3006
+ type: beaconContentType
3039
3007
  }));
3040
3008
  return [
3041
3009
  2,
@@ -3074,6 +3042,15 @@ this.Scorm12API = (function () {
3074
3042
  }).call(this);
3075
3043
  }
3076
3044
  },
3045
+ {
3046
+ key: "_warnIfBeaconContentTypeUnsafe",
3047
+ value: function _warnIfBeaconContentTypeUnsafe(url, contentType) {
3048
+ if (isCrossOriginUrl(url) && !isCorsSafelistedContentType(contentType)) {
3049
+ var _this_settings_onLogMessage, _this_settings;
3050
+ (_this_settings_onLogMessage = (_this_settings = this.settings).onLogMessage) === null || _this_settings_onLogMessage === void 0 ? void 0 : _this_settings_onLogMessage.call(_this_settings, LogLevelEnum.WARN, 'sendBeacon to cross-origin URL with non-CORS-safelisted Content-Type "'.concat(contentType, '" may be silently dropped by the browser (Beacon cannot preflight). Use fetch (useAsynchronousCommits + asyncModeBeaconBehavior:"never") for cross-origin JSON/auth on terminate.'));
3051
+ }
3052
+ }
3053
+ },
3077
3054
  {
3078
3055
  key: "transformResponse",
3079
3056
  value: /**
@@ -3195,9 +3172,7 @@ this.Scorm12API = (function () {
3195
3172
  }();
3196
3173
 
3197
3174
  function _class_call_check$i(instance, Constructor) {
3198
- if (!(instance instanceof Constructor)) {
3199
- throw new TypeError("Cannot call a class as a function");
3200
- }
3175
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
3201
3176
  }
3202
3177
  function _defineProperties$i(target, props) {
3203
3178
  for(var i = 0; i < props.length; i++){
@@ -3216,9 +3191,7 @@ this.Scorm12API = (function () {
3216
3191
  "@swc/helpers - instanceof";
3217
3192
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3218
3193
  return !!right[Symbol.hasInstance](left);
3219
- } else {
3220
- return left instanceof right;
3221
- }
3194
+ } else return left instanceof right;
3222
3195
  }
3223
3196
  function _type_of$h(obj) {
3224
3197
  "@swc/helpers - typeof";
@@ -3609,9 +3582,7 @@ this.Scorm12API = (function () {
3609
3582
  }();
3610
3583
 
3611
3584
  function _class_call_check$h(instance, Constructor) {
3612
- if (!(instance instanceof Constructor)) {
3613
- throw new TypeError("Cannot call a class as a function");
3614
- }
3585
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
3615
3586
  }
3616
3587
  function _defineProperties$h(target, props) {
3617
3588
  for(var i = 0; i < props.length; i++){
@@ -3830,9 +3801,7 @@ this.Scorm12API = (function () {
3830
3801
  }
3831
3802
 
3832
3803
  function _class_call_check$g(instance, Constructor) {
3833
- if (!(instance instanceof Constructor)) {
3834
- throw new TypeError("Cannot call a class as a function");
3835
- }
3804
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
3836
3805
  }
3837
3806
  function _defineProperties$g(target, props) {
3838
3807
  for(var i = 0; i < props.length; i++){
@@ -3851,9 +3820,7 @@ this.Scorm12API = (function () {
3851
3820
  "@swc/helpers - instanceof";
3852
3821
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3853
3822
  return !!right[Symbol.hasInstance](left);
3854
- } else {
3855
- return left instanceof right;
3856
- }
3823
+ } else return left instanceof right;
3857
3824
  }
3858
3825
  function _type_of$f(obj) {
3859
3826
  "@swc/helpers - typeof";
@@ -3923,13 +3890,14 @@ this.Scorm12API = (function () {
3923
3890
  * @throws {ValidationError} - If throwException is true, throws a ValidationError
3924
3891
  */ key: "throwSCORMError",
3925
3892
  value: function throwSCORMError(CMIElement, errorNumber, message) {
3893
+ var messageLevel = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : LogLevelEnum.ERROR;
3926
3894
  this._lastDiagnostic = message || "";
3927
3895
  if (!message) {
3928
3896
  message = this._getLmsErrorMessageDetails(errorNumber, true);
3929
3897
  }
3930
3898
  var formattedMessage = "SCORM Error ".concat(errorNumber, ": ").concat(message).concat(CMIElement ? " [Element: ".concat(CMIElement, "]") : "");
3931
- this._apiLog("throwSCORMError", errorNumber + ": " + message, LogLevelEnum.ERROR, CMIElement);
3932
- this._loggingService.error(formattedMessage);
3899
+ this._apiLog("throwSCORMError", errorNumber + ": " + message, messageLevel, CMIElement);
3900
+ this._loggingService.log(messageLevel, formattedMessage);
3933
3901
  this._lastErrorCode = String(errorNumber);
3934
3902
  }
3935
3903
  },
@@ -4035,9 +4003,7 @@ this.Scorm12API = (function () {
4035
4003
  }
4036
4004
 
4037
4005
  function _class_call_check$f(instance, Constructor) {
4038
- if (!(instance instanceof Constructor)) {
4039
- throw new TypeError("Cannot call a class as a function");
4040
- }
4006
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
4041
4007
  }
4042
4008
  function _defineProperties$f(target, props) {
4043
4009
  for(var i = 0; i < props.length; i++){
@@ -4328,11 +4294,8 @@ this.Scorm12API = (function () {
4328
4294
  reject(error);
4329
4295
  return;
4330
4296
  }
4331
- if (info.done) {
4332
- resolve(value);
4333
- } else {
4334
- Promise.resolve(value).then(_next, _throw);
4335
- }
4297
+ if (info.done) resolve(value);
4298
+ else Promise.resolve(value).then(_next, _throw);
4336
4299
  }
4337
4300
  function _async_to_generator(fn) {
4338
4301
  return function() {
@@ -4350,9 +4313,7 @@ this.Scorm12API = (function () {
4350
4313
  };
4351
4314
  }
4352
4315
  function _class_call_check$e(instance, Constructor) {
4353
- if (!(instance instanceof Constructor)) {
4354
- throw new TypeError("Cannot call a class as a function");
4355
- }
4316
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
4356
4317
  }
4357
4318
  function _defineProperties$e(target, props) {
4358
4319
  for(var i = 0; i < props.length; i++){
@@ -4375,18 +4336,14 @@ this.Scorm12API = (function () {
4375
4336
  configurable: true,
4376
4337
  writable: true
4377
4338
  });
4378
- } else {
4379
- obj[key] = value;
4380
- }
4339
+ } else obj[key] = value;
4381
4340
  return obj;
4382
4341
  }
4383
4342
  function _instanceof$2(left, right) {
4384
4343
  "@swc/helpers - instanceof";
4385
4344
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
4386
4345
  return !!right[Symbol.hasInstance](left);
4387
- } else {
4388
- return left instanceof right;
4389
- }
4346
+ } else return left instanceof right;
4390
4347
  }
4391
4348
  function _object_spread$3(target) {
4392
4349
  for(var i = 1; i < arguments.length; i++){
@@ -4413,19 +4370,14 @@ this.Scorm12API = (function () {
4413
4370
  }
4414
4371
  function _object_spread_props$1(target, source) {
4415
4372
  source = source != null ? source : {};
4416
- if (Object.getOwnPropertyDescriptors) {
4417
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
4418
- } else {
4373
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
4374
+ else {
4419
4375
  ownKeys$1(Object(source)).forEach(function(key) {
4420
4376
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
4421
4377
  });
4422
4378
  }
4423
4379
  return target;
4424
4380
  }
4425
- function _type_of$d(obj) {
4426
- "@swc/helpers - typeof";
4427
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4428
- }
4429
4381
  function _ts_generator(thisArg, body) {
4430
4382
  var f, y, t, _ = {
4431
4383
  label: 0,
@@ -4525,6 +4477,10 @@ this.Scorm12API = (function () {
4525
4477
  };
4526
4478
  }
4527
4479
  }
4480
+ function _type_of$d(obj) {
4481
+ "@swc/helpers - typeof";
4482
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4483
+ }
4528
4484
  var __defProp$c = Object.defineProperty;
4529
4485
  var __defNormalProp$c = function __defNormalProp(obj, key, value) {
4530
4486
  return key in obj ? __defProp$c(obj, key, {
@@ -5117,9 +5073,7 @@ this.Scorm12API = (function () {
5117
5073
  if (Array.isArray(arr)) return _array_like_to_array$3(arr);
5118
5074
  }
5119
5075
  function _class_call_check$d(instance, Constructor) {
5120
- if (!(instance instanceof Constructor)) {
5121
- throw new TypeError("Cannot call a class as a function");
5122
- }
5076
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
5123
5077
  }
5124
5078
  function _defineProperties$d(target, props) {
5125
5079
  for(var i = 0; i < props.length; i++){
@@ -5142,16 +5096,16 @@ this.Scorm12API = (function () {
5142
5096
  configurable: true,
5143
5097
  writable: true
5144
5098
  });
5145
- } else {
5146
- obj[key] = value;
5147
- }
5099
+ } else obj[key] = value;
5148
5100
  return obj;
5149
5101
  }
5150
5102
  function _iterable_to_array$1(iter) {
5151
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5103
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
5104
+ return Array.from(iter);
5105
+ }
5152
5106
  }
5153
5107
  function _non_iterable_spread$1() {
5154
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5108
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5155
5109
  }
5156
5110
  function _object_spread$2(target) {
5157
5111
  for(var i = 1; i < arguments.length; i++){
@@ -5314,7 +5268,7 @@ this.Scorm12API = (function () {
5314
5268
  value: function processDeliveryRequest(activity) {
5315
5269
  this.fireEvent("onDeliveryRequestProcessing", {
5316
5270
  activity: activity.id,
5317
- timestamp: /* @__PURE__ */ new Date().toISOString()
5271
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
5318
5272
  });
5319
5273
  if (activity.children.length > 0) {
5320
5274
  return new DeliveryRequest(false, null, "DB.1.1-1");
@@ -5678,9 +5632,7 @@ this.Scorm12API = (function () {
5678
5632
  __publicField$b(_DeliveryHandler, "HIDE_LMS_UI_ORDER", _to_consumable_array$1(HIDE_LMS_UI_TOKENS));
5679
5633
 
5680
5634
  function _class_call_check$c(instance, Constructor) {
5681
- if (!(instance instanceof Constructor)) {
5682
- throw new TypeError("Cannot call a class as a function");
5683
- }
5635
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
5684
5636
  }
5685
5637
  function _defineProperties$c(target, props) {
5686
5638
  for(var i = 0; i < props.length; i++){
@@ -5960,9 +5912,7 @@ this.Scorm12API = (function () {
5960
5912
  if (Array.isArray(arr)) return arr;
5961
5913
  }
5962
5914
  function _class_call_check$b(instance, Constructor) {
5963
- if (!(instance instanceof Constructor)) {
5964
- throw new TypeError("Cannot call a class as a function");
5965
- }
5915
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
5966
5916
  }
5967
5917
  function _defineProperties$b(target, props) {
5968
5918
  for(var i = 0; i < props.length; i++){
@@ -5981,9 +5931,7 @@ this.Scorm12API = (function () {
5981
5931
  "@swc/helpers - instanceof";
5982
5932
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
5983
5933
  return !!right[Symbol.hasInstance](left);
5984
- } else {
5985
- return left instanceof right;
5986
- }
5934
+ } else return left instanceof right;
5987
5935
  }
5988
5936
  function _iterable_to_array_limit$1(arr, i) {
5989
5937
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
@@ -6010,7 +5958,7 @@ this.Scorm12API = (function () {
6010
5958
  return _arr;
6011
5959
  }
6012
5960
  function _non_iterable_rest$1() {
6013
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5961
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6014
5962
  }
6015
5963
  function _sliced_to_array$1(arr, i) {
6016
5964
  return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
@@ -6088,10 +6036,12 @@ this.Scorm12API = (function () {
6088
6036
  var handledPayload = metadata === void 0 ? this.settings.requestHandler(params) : this.settings.requestHandler(params, metadata);
6089
6037
  var requestPayload = handledPayload !== null && handledPayload !== void 0 ? handledPayload : params;
6090
6038
  var body = this._prepareRequestBody(requestPayload).body;
6039
+ var beaconContentType = this.settings.terminationCommitContentType;
6040
+ this._warnIfBeaconContentTypeUnsafe(url, beaconContentType);
6091
6041
  var beaconSuccess = navigator.sendBeacon(url, new Blob([
6092
6042
  body
6093
6043
  ], {
6094
- type: "text/plain;charset=UTF-8"
6044
+ type: beaconContentType
6095
6045
  }));
6096
6046
  return {
6097
6047
  result: beaconSuccess ? "true" : "false",
@@ -6099,6 +6049,15 @@ this.Scorm12API = (function () {
6099
6049
  };
6100
6050
  }
6101
6051
  },
6052
+ {
6053
+ key: "_warnIfBeaconContentTypeUnsafe",
6054
+ value: function _warnIfBeaconContentTypeUnsafe(url, contentType) {
6055
+ if (isCrossOriginUrl(url) && !isCorsSafelistedContentType(contentType)) {
6056
+ var _this_settings_onLogMessage, _this_settings;
6057
+ (_this_settings_onLogMessage = (_this_settings = this.settings).onLogMessage) === null || _this_settings_onLogMessage === void 0 ? void 0 : _this_settings_onLogMessage.call(_this_settings, LogLevelEnum.WARN, 'sendBeacon to cross-origin URL with non-CORS-safelisted Content-Type "'.concat(contentType, '" may be silently dropped by the browser (Beacon cannot preflight). Use fetch (useAsynchronousCommits + asyncModeBeaconBehavior:"never") for cross-origin JSON/auth on terminate.'));
6058
+ }
6059
+ }
6060
+ },
6102
6061
  {
6103
6062
  /**
6104
6063
  * Performs a synchronous XMLHttpRequest
@@ -6177,9 +6136,7 @@ this.Scorm12API = (function () {
6177
6136
  }
6178
6137
 
6179
6138
  function _class_call_check$a(instance, Constructor) {
6180
- if (!(instance instanceof Constructor)) {
6181
- throw new TypeError("Cannot call a class as a function");
6182
- }
6139
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
6183
6140
  }
6184
6141
  function _defineProperties$a(target, props) {
6185
6142
  for(var i = 0; i < props.length; i++){
@@ -6303,9 +6260,7 @@ this.Scorm12API = (function () {
6303
6260
  if (Array.isArray(arr)) return _array_like_to_array$1(arr);
6304
6261
  }
6305
6262
  function _class_call_check$9(instance, Constructor) {
6306
- if (!(instance instanceof Constructor)) {
6307
- throw new TypeError("Cannot call a class as a function");
6308
- }
6263
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
6309
6264
  }
6310
6265
  function _defineProperties$9(target, props) {
6311
6266
  for(var i = 0; i < props.length; i++){
@@ -6328,24 +6283,22 @@ this.Scorm12API = (function () {
6328
6283
  configurable: true,
6329
6284
  writable: true
6330
6285
  });
6331
- } else {
6332
- obj[key] = value;
6333
- }
6286
+ } else obj[key] = value;
6334
6287
  return obj;
6335
6288
  }
6336
6289
  function _instanceof(left, right) {
6337
6290
  "@swc/helpers - instanceof";
6338
6291
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
6339
6292
  return !!right[Symbol.hasInstance](left);
6340
- } else {
6341
- return left instanceof right;
6342
- }
6293
+ } else return left instanceof right;
6343
6294
  }
6344
6295
  function _iterable_to_array(iter) {
6345
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6296
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
6297
+ return Array.from(iter);
6298
+ }
6346
6299
  }
6347
6300
  function _non_iterable_spread() {
6348
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6301
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6349
6302
  }
6350
6303
  function _object_spread$1(target) {
6351
6304
  for(var i = 1; i < arguments.length; i++){
@@ -6372,9 +6325,8 @@ this.Scorm12API = (function () {
6372
6325
  }
6373
6326
  function _object_spread_props(target, source) {
6374
6327
  source = source != null ? source : {};
6375
- if (Object.getOwnPropertyDescriptors) {
6376
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
6377
- } else {
6328
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
6329
+ else {
6378
6330
  ownKeys(Object(source)).forEach(function(key) {
6379
6331
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
6380
6332
  });
@@ -7322,8 +7274,8 @@ this.Scorm12API = (function () {
7322
7274
  * // Throw a "not initialized" error
7323
7275
  * this.throwSCORMError(301, "The API must be initialized before calling GetValue");
7324
7276
  */ key: "throwSCORMError",
7325
- value: function throwSCORMError(CMIElement, errorNumber, message) {
7326
- this._errorHandlingService.throwSCORMError(CMIElement, errorNumber !== null && errorNumber !== void 0 ? errorNumber : 0, message);
7277
+ value: function throwSCORMError(CMIElement, errorNumber, message, messageLevel) {
7278
+ this._errorHandlingService.throwSCORMError(CMIElement, errorNumber !== null && errorNumber !== void 0 ? errorNumber : 0, message, messageLevel);
7327
7279
  }
7328
7280
  },
7329
7281
  {
@@ -7706,9 +7658,7 @@ this.Scorm12API = (function () {
7706
7658
  }();
7707
7659
 
7708
7660
  function _assert_this_initialized$8(self) {
7709
- if (self === void 0) {
7710
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7711
- }
7661
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7712
7662
  return self;
7713
7663
  }
7714
7664
  function _call_super$8(_this, derived, args) {
@@ -7716,9 +7666,7 @@ this.Scorm12API = (function () {
7716
7666
  return _possible_constructor_return$8(_this, _is_native_reflect_construct$8() ? Reflect.construct(derived, args || [], _get_prototype_of$8(_this).constructor) : derived.apply(_this, args));
7717
7667
  }
7718
7668
  function _class_call_check$8(instance, Constructor) {
7719
- if (!(instance instanceof Constructor)) {
7720
- throw new TypeError("Cannot call a class as a function");
7721
- }
7669
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
7722
7670
  }
7723
7671
  function _defineProperties$8(target, props) {
7724
7672
  for(var i = 0; i < props.length; i++){
@@ -7752,10 +7700,16 @@ this.Scorm12API = (function () {
7752
7700
  });
7753
7701
  if (superClass) _set_prototype_of$8(subClass, superClass);
7754
7702
  }
7703
+ function _is_native_reflect_construct$8() {
7704
+ try {
7705
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
7706
+ } catch (_) {}
7707
+ return (_is_native_reflect_construct$8 = function() {
7708
+ return !!result;
7709
+ })();
7710
+ }
7755
7711
  function _possible_constructor_return$8(self, call) {
7756
- if (call && (_type_of$8(call) === "object" || typeof call === "function")) {
7757
- return call;
7758
- }
7712
+ if (call && (_type_of$8(call) === "object" || typeof call === "function")) return call;
7759
7713
  return _assert_this_initialized$8(self);
7760
7714
  }
7761
7715
  function _set_prototype_of$8(o, p) {
@@ -7769,14 +7723,6 @@ this.Scorm12API = (function () {
7769
7723
  "@swc/helpers - typeof";
7770
7724
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
7771
7725
  }
7772
- function _is_native_reflect_construct$8() {
7773
- try {
7774
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
7775
- } catch (_) {}
7776
- return (_is_native_reflect_construct$8 = function() {
7777
- return !!result;
7778
- })();
7779
- }
7780
7726
  var __defProp$8 = Object.defineProperty;
7781
7727
  var __defNormalProp$8 = function __defNormalProp(obj, key, value) {
7782
7728
  return key in obj ? __defProp$8(obj, key, {
@@ -7954,9 +7900,7 @@ this.Scorm12API = (function () {
7954
7900
  }(BaseCMI);
7955
7901
 
7956
7902
  function _assert_this_initialized$7(self) {
7957
- if (self === void 0) {
7958
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7959
- }
7903
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7960
7904
  return self;
7961
7905
  }
7962
7906
  function _call_super$7(_this, derived, args) {
@@ -7964,9 +7908,7 @@ this.Scorm12API = (function () {
7964
7908
  return _possible_constructor_return$7(_this, _is_native_reflect_construct$7() ? Reflect.construct(derived, args || [], _get_prototype_of$7(_this).constructor) : derived.apply(_this, args));
7965
7909
  }
7966
7910
  function _class_call_check$7(instance, Constructor) {
7967
- if (!(instance instanceof Constructor)) {
7968
- throw new TypeError("Cannot call a class as a function");
7969
- }
7911
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
7970
7912
  }
7971
7913
  function _defineProperties$7(target, props) {
7972
7914
  for(var i = 0; i < props.length; i++){
@@ -7982,16 +7924,13 @@ this.Scorm12API = (function () {
7982
7924
  return Constructor;
7983
7925
  }
7984
7926
  function _get$2(target, property, receiver) {
7985
- if (typeof Reflect !== "undefined" && Reflect.get) {
7986
- _get$2 = Reflect.get;
7987
- } else {
7927
+ if (typeof Reflect !== "undefined" && Reflect.get) _get$2 = Reflect.get;
7928
+ else {
7988
7929
  _get$2 = function get(target, property, receiver) {
7989
7930
  var base = _super_prop_base$2(target, property);
7990
7931
  if (!base) return;
7991
7932
  var desc = Object.getOwnPropertyDescriptor(base, property);
7992
- if (desc.get) {
7993
- return desc.get.call(receiver || target);
7994
- }
7933
+ if (desc.get) return desc.get.call(receiver || target);
7995
7934
  return desc.value;
7996
7935
  };
7997
7936
  }
@@ -8016,10 +7955,16 @@ this.Scorm12API = (function () {
8016
7955
  });
8017
7956
  if (superClass) _set_prototype_of$7(subClass, superClass);
8018
7957
  }
7958
+ function _is_native_reflect_construct$7() {
7959
+ try {
7960
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
7961
+ } catch (_) {}
7962
+ return (_is_native_reflect_construct$7 = function() {
7963
+ return !!result;
7964
+ })();
7965
+ }
8019
7966
  function _possible_constructor_return$7(self, call) {
8020
- if (call && (_type_of$7(call) === "object" || typeof call === "function")) {
8021
- return call;
8022
- }
7967
+ if (call && (_type_of$7(call) === "object" || typeof call === "function")) return call;
8023
7968
  return _assert_this_initialized$7(self);
8024
7969
  }
8025
7970
  function _set_prototype_of$7(o, p) {
@@ -8040,14 +7985,6 @@ this.Scorm12API = (function () {
8040
7985
  "@swc/helpers - typeof";
8041
7986
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
8042
7987
  }
8043
- function _is_native_reflect_construct$7() {
8044
- try {
8045
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
8046
- } catch (_) {}
8047
- return (_is_native_reflect_construct$7 = function() {
8048
- return !!result;
8049
- })();
8050
- }
8051
7988
  var __defProp$7 = Object.defineProperty;
8052
7989
  var __defNormalProp$7 = function __defNormalProp(obj, key, value) {
8053
7990
  return key in obj ? __defProp$7(obj, key, {
@@ -8400,7 +8337,7 @@ this.Scorm12API = (function () {
8400
8337
  value: function getCurrentTotalTime(start_time) {
8401
8338
  var sessionTime = this._session_time;
8402
8339
  if (typeof start_time !== "undefined") {
8403
- var seconds = /* @__PURE__ */ new Date().getTime() - start_time;
8340
+ var seconds = (/* @__PURE__ */ new Date()).getTime() - start_time;
8404
8341
  sessionTime = getSecondsAsHHMMSS(seconds / 1e3);
8405
8342
  }
8406
8343
  return addHHMMSSTimeStrings(this._total_time, sessionTime, new RegExp(scorm12_regex.CMITimespan));
@@ -8448,9 +8385,7 @@ this.Scorm12API = (function () {
8448
8385
  }(BaseCMI);
8449
8386
 
8450
8387
  function _assert_this_initialized$6(self) {
8451
- if (self === void 0) {
8452
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8453
- }
8388
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8454
8389
  return self;
8455
8390
  }
8456
8391
  function _call_super$6(_this, derived, args) {
@@ -8458,9 +8393,7 @@ this.Scorm12API = (function () {
8458
8393
  return _possible_constructor_return$6(_this, _is_native_reflect_construct$6() ? Reflect.construct(derived, args || [], _get_prototype_of$6(_this).constructor) : derived.apply(_this, args));
8459
8394
  }
8460
8395
  function _class_call_check$6(instance, Constructor) {
8461
- if (!(instance instanceof Constructor)) {
8462
- throw new TypeError("Cannot call a class as a function");
8463
- }
8396
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
8464
8397
  }
8465
8398
  function _defineProperties$6(target, props) {
8466
8399
  for(var i = 0; i < props.length; i++){
@@ -8494,10 +8427,16 @@ this.Scorm12API = (function () {
8494
8427
  });
8495
8428
  if (superClass) _set_prototype_of$6(subClass, superClass);
8496
8429
  }
8430
+ function _is_native_reflect_construct$6() {
8431
+ try {
8432
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
8433
+ } catch (_) {}
8434
+ return (_is_native_reflect_construct$6 = function() {
8435
+ return !!result;
8436
+ })();
8437
+ }
8497
8438
  function _possible_constructor_return$6(self, call) {
8498
- if (call && (_type_of$6(call) === "object" || typeof call === "function")) {
8499
- return call;
8500
- }
8439
+ if (call && (_type_of$6(call) === "object" || typeof call === "function")) return call;
8501
8440
  return _assert_this_initialized$6(self);
8502
8441
  }
8503
8442
  function _set_prototype_of$6(o, p) {
@@ -8511,14 +8450,6 @@ this.Scorm12API = (function () {
8511
8450
  "@swc/helpers - typeof";
8512
8451
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
8513
8452
  }
8514
- function _is_native_reflect_construct$6() {
8515
- try {
8516
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
8517
- } catch (_) {}
8518
- return (_is_native_reflect_construct$6 = function() {
8519
- return !!result;
8520
- })();
8521
- }
8522
8453
  var __defProp$6 = Object.defineProperty;
8523
8454
  var __defNormalProp$6 = function __defNormalProp(obj, key, value) {
8524
8455
  return key in obj ? __defProp$6(obj, key, {
@@ -8656,9 +8587,7 @@ this.Scorm12API = (function () {
8656
8587
  }(BaseCMI);
8657
8588
 
8658
8589
  function _assert_this_initialized$5(self) {
8659
- if (self === void 0) {
8660
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8661
- }
8590
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8662
8591
  return self;
8663
8592
  }
8664
8593
  function _call_super$5(_this, derived, args) {
@@ -8666,9 +8595,7 @@ this.Scorm12API = (function () {
8666
8595
  return _possible_constructor_return$5(_this, _is_native_reflect_construct$5() ? Reflect.construct(derived, args || [], _get_prototype_of$5(_this).constructor) : derived.apply(_this, args));
8667
8596
  }
8668
8597
  function _class_call_check$5(instance, Constructor) {
8669
- if (!(instance instanceof Constructor)) {
8670
- throw new TypeError("Cannot call a class as a function");
8671
- }
8598
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
8672
8599
  }
8673
8600
  function _defineProperties$5(target, props) {
8674
8601
  for(var i = 0; i < props.length; i++){
@@ -8702,10 +8629,16 @@ this.Scorm12API = (function () {
8702
8629
  });
8703
8630
  if (superClass) _set_prototype_of$5(subClass, superClass);
8704
8631
  }
8632
+ function _is_native_reflect_construct$5() {
8633
+ try {
8634
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
8635
+ } catch (_) {}
8636
+ return (_is_native_reflect_construct$5 = function() {
8637
+ return !!result;
8638
+ })();
8639
+ }
8705
8640
  function _possible_constructor_return$5(self, call) {
8706
- if (call && (_type_of$5(call) === "object" || typeof call === "function")) {
8707
- return call;
8708
- }
8641
+ if (call && (_type_of$5(call) === "object" || typeof call === "function")) return call;
8709
8642
  return _assert_this_initialized$5(self);
8710
8643
  }
8711
8644
  function _set_prototype_of$5(o, p) {
@@ -8719,14 +8652,6 @@ this.Scorm12API = (function () {
8719
8652
  "@swc/helpers - typeof";
8720
8653
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
8721
8654
  }
8722
- function _is_native_reflect_construct$5() {
8723
- try {
8724
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
8725
- } catch (_) {}
8726
- return (_is_native_reflect_construct$5 = function() {
8727
- return !!result;
8728
- })();
8729
- }
8730
8655
  var __defProp$5 = Object.defineProperty;
8731
8656
  var __defNormalProp$5 = function __defNormalProp(obj, key, value) {
8732
8657
  return key in obj ? __defProp$5(obj, key, {
@@ -8896,9 +8821,7 @@ this.Scorm12API = (function () {
8896
8821
  }(BaseCMI);
8897
8822
 
8898
8823
  function _assert_this_initialized$4(self) {
8899
- if (self === void 0) {
8900
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8901
- }
8824
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
8902
8825
  return self;
8903
8826
  }
8904
8827
  function _call_super$4(_this, derived, args) {
@@ -8906,9 +8829,7 @@ this.Scorm12API = (function () {
8906
8829
  return _possible_constructor_return$4(_this, _is_native_reflect_construct$4() ? Reflect.construct(derived, args || [], _get_prototype_of$4(_this).constructor) : derived.apply(_this, args));
8907
8830
  }
8908
8831
  function _class_call_check$4(instance, Constructor) {
8909
- if (!(instance instanceof Constructor)) {
8910
- throw new TypeError("Cannot call a class as a function");
8911
- }
8832
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
8912
8833
  }
8913
8834
  function _defineProperties$4(target, props) {
8914
8835
  for(var i = 0; i < props.length; i++){
@@ -8942,10 +8863,16 @@ this.Scorm12API = (function () {
8942
8863
  });
8943
8864
  if (superClass) _set_prototype_of$4(subClass, superClass);
8944
8865
  }
8866
+ function _is_native_reflect_construct$4() {
8867
+ try {
8868
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
8869
+ } catch (_) {}
8870
+ return (_is_native_reflect_construct$4 = function() {
8871
+ return !!result;
8872
+ })();
8873
+ }
8945
8874
  function _possible_constructor_return$4(self, call) {
8946
- if (call && (_type_of$4(call) === "object" || typeof call === "function")) {
8947
- return call;
8948
- }
8875
+ if (call && (_type_of$4(call) === "object" || typeof call === "function")) return call;
8949
8876
  return _assert_this_initialized$4(self);
8950
8877
  }
8951
8878
  function _set_prototype_of$4(o, p) {
@@ -8959,14 +8886,6 @@ this.Scorm12API = (function () {
8959
8886
  "@swc/helpers - typeof";
8960
8887
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
8961
8888
  }
8962
- function _is_native_reflect_construct$4() {
8963
- try {
8964
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
8965
- } catch (_) {}
8966
- return (_is_native_reflect_construct$4 = function() {
8967
- return !!result;
8968
- })();
8969
- }
8970
8889
  var __defProp$4 = Object.defineProperty;
8971
8890
  var __defNormalProp$4 = function __defNormalProp(obj, key, value) {
8972
8891
  return key in obj ? __defProp$4(obj, key, {
@@ -9127,9 +9046,7 @@ this.Scorm12API = (function () {
9127
9046
  }(BaseCMI);
9128
9047
 
9129
9048
  function _assert_this_initialized$3(self) {
9130
- if (self === void 0) {
9131
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9132
- }
9049
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9133
9050
  return self;
9134
9051
  }
9135
9052
  function _call_super$3(_this, derived, args) {
@@ -9137,9 +9054,7 @@ this.Scorm12API = (function () {
9137
9054
  return _possible_constructor_return$3(_this, _is_native_reflect_construct$3() ? Reflect.construct(derived, args || [], _get_prototype_of$3(_this).constructor) : derived.apply(_this, args));
9138
9055
  }
9139
9056
  function _class_call_check$3(instance, Constructor) {
9140
- if (!(instance instanceof Constructor)) {
9141
- throw new TypeError("Cannot call a class as a function");
9142
- }
9057
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
9143
9058
  }
9144
9059
  function _defineProperties$3(target, props) {
9145
9060
  for(var i = 0; i < props.length; i++){
@@ -9155,16 +9070,13 @@ this.Scorm12API = (function () {
9155
9070
  return Constructor;
9156
9071
  }
9157
9072
  function _get$1(target, property, receiver) {
9158
- if (typeof Reflect !== "undefined" && Reflect.get) {
9159
- _get$1 = Reflect.get;
9160
- } else {
9073
+ if (typeof Reflect !== "undefined" && Reflect.get) _get$1 = Reflect.get;
9074
+ else {
9161
9075
  _get$1 = function get(target, property, receiver) {
9162
9076
  var base = _super_prop_base$1(target, property);
9163
9077
  if (!base) return;
9164
9078
  var desc = Object.getOwnPropertyDescriptor(base, property);
9165
- if (desc.get) {
9166
- return desc.get.call(receiver || target);
9167
- }
9079
+ if (desc.get) return desc.get.call(receiver || target);
9168
9080
  return desc.value;
9169
9081
  };
9170
9082
  }
@@ -9189,10 +9101,16 @@ this.Scorm12API = (function () {
9189
9101
  });
9190
9102
  if (superClass) _set_prototype_of$3(subClass, superClass);
9191
9103
  }
9104
+ function _is_native_reflect_construct$3() {
9105
+ try {
9106
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
9107
+ } catch (_) {}
9108
+ return (_is_native_reflect_construct$3 = function() {
9109
+ return !!result;
9110
+ })();
9111
+ }
9192
9112
  function _possible_constructor_return$3(self, call) {
9193
- if (call && (_type_of$3(call) === "object" || typeof call === "function")) {
9194
- return call;
9195
- }
9113
+ if (call && (_type_of$3(call) === "object" || typeof call === "function")) return call;
9196
9114
  return _assert_this_initialized$3(self);
9197
9115
  }
9198
9116
  function _set_prototype_of$3(o, p) {
@@ -9213,14 +9131,6 @@ this.Scorm12API = (function () {
9213
9131
  "@swc/helpers - typeof";
9214
9132
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
9215
9133
  }
9216
- function _is_native_reflect_construct$3() {
9217
- try {
9218
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
9219
- } catch (_) {}
9220
- return (_is_native_reflect_construct$3 = function() {
9221
- return !!result;
9222
- })();
9223
- }
9224
9134
  var __defProp$3 = Object.defineProperty;
9225
9135
  var __defNormalProp$3 = function __defNormalProp(obj, key, value) {
9226
9136
  return key in obj ? __defProp$3(obj, key, {
@@ -9622,9 +9532,7 @@ this.Scorm12API = (function () {
9622
9532
  }(BaseCMI);
9623
9533
 
9624
9534
  function _assert_this_initialized$2(self) {
9625
- if (self === void 0) {
9626
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9627
- }
9535
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9628
9536
  return self;
9629
9537
  }
9630
9538
  function _call_super$2(_this, derived, args) {
@@ -9632,9 +9540,7 @@ this.Scorm12API = (function () {
9632
9540
  return _possible_constructor_return$2(_this, _is_native_reflect_construct$2() ? Reflect.construct(derived, args || [], _get_prototype_of$2(_this).constructor) : derived.apply(_this, args));
9633
9541
  }
9634
9542
  function _class_call_check$2(instance, Constructor) {
9635
- if (!(instance instanceof Constructor)) {
9636
- throw new TypeError("Cannot call a class as a function");
9637
- }
9543
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
9638
9544
  }
9639
9545
  function _defineProperties$2(target, props) {
9640
9546
  for(var i = 0; i < props.length; i++){
@@ -9650,16 +9556,13 @@ this.Scorm12API = (function () {
9650
9556
  return Constructor;
9651
9557
  }
9652
9558
  function _get(target, property, receiver) {
9653
- if (typeof Reflect !== "undefined" && Reflect.get) {
9654
- _get = Reflect.get;
9655
- } else {
9559
+ if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get;
9560
+ else {
9656
9561
  _get = function get(target, property, receiver) {
9657
9562
  var base = _super_prop_base(target, property);
9658
9563
  if (!base) return;
9659
9564
  var desc = Object.getOwnPropertyDescriptor(base, property);
9660
- if (desc.get) {
9661
- return desc.get.call(receiver || target);
9662
- }
9565
+ if (desc.get) return desc.get.call(receiver || target);
9663
9566
  return desc.value;
9664
9567
  };
9665
9568
  }
@@ -9684,10 +9587,16 @@ this.Scorm12API = (function () {
9684
9587
  });
9685
9588
  if (superClass) _set_prototype_of$2(subClass, superClass);
9686
9589
  }
9590
+ function _is_native_reflect_construct$2() {
9591
+ try {
9592
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
9593
+ } catch (_) {}
9594
+ return (_is_native_reflect_construct$2 = function() {
9595
+ return !!result;
9596
+ })();
9597
+ }
9687
9598
  function _possible_constructor_return$2(self, call) {
9688
- if (call && (_type_of$2(call) === "object" || typeof call === "function")) {
9689
- return call;
9690
- }
9599
+ if (call && (_type_of$2(call) === "object" || typeof call === "function")) return call;
9691
9600
  return _assert_this_initialized$2(self);
9692
9601
  }
9693
9602
  function _set_prototype_of$2(o, p) {
@@ -9708,14 +9617,6 @@ this.Scorm12API = (function () {
9708
9617
  "@swc/helpers - typeof";
9709
9618
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
9710
9619
  }
9711
- function _is_native_reflect_construct$2() {
9712
- try {
9713
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
9714
- } catch (_) {}
9715
- return (_is_native_reflect_construct$2 = function() {
9716
- return !!result;
9717
- })();
9718
- }
9719
9620
  var __defProp$2 = Object.defineProperty;
9720
9621
  var __defNormalProp$2 = function __defNormalProp(obj, key, value) {
9721
9622
  return key in obj ? __defProp$2(obj, key, {
@@ -9958,9 +9859,7 @@ this.Scorm12API = (function () {
9958
9859
  }(BaseRootCMI);
9959
9860
 
9960
9861
  function _assert_this_initialized$1(self) {
9961
- if (self === void 0) {
9962
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9963
- }
9862
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
9964
9863
  return self;
9965
9864
  }
9966
9865
  function _call_super$1(_this, derived, args) {
@@ -9968,9 +9867,7 @@ this.Scorm12API = (function () {
9968
9867
  return _possible_constructor_return$1(_this, _is_native_reflect_construct$1() ? Reflect.construct(derived, args || [], _get_prototype_of$1(_this).constructor) : derived.apply(_this, args));
9969
9868
  }
9970
9869
  function _class_call_check$1(instance, Constructor) {
9971
- if (!(instance instanceof Constructor)) {
9972
- throw new TypeError("Cannot call a class as a function");
9973
- }
9870
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
9974
9871
  }
9975
9872
  function _defineProperties$1(target, props) {
9976
9873
  for(var i = 0; i < props.length; i++){
@@ -10004,10 +9901,16 @@ this.Scorm12API = (function () {
10004
9901
  });
10005
9902
  if (superClass) _set_prototype_of$1(subClass, superClass);
10006
9903
  }
9904
+ function _is_native_reflect_construct$1() {
9905
+ try {
9906
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
9907
+ } catch (_) {}
9908
+ return (_is_native_reflect_construct$1 = function() {
9909
+ return !!result;
9910
+ })();
9911
+ }
10007
9912
  function _possible_constructor_return$1(self, call) {
10008
- if (call && (_type_of$1(call) === "object" || typeof call === "function")) {
10009
- return call;
10010
- }
9913
+ if (call && (_type_of$1(call) === "object" || typeof call === "function")) return call;
10011
9914
  return _assert_this_initialized$1(self);
10012
9915
  }
10013
9916
  function _set_prototype_of$1(o, p) {
@@ -10021,14 +9924,6 @@ this.Scorm12API = (function () {
10021
9924
  "@swc/helpers - typeof";
10022
9925
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
10023
9926
  }
10024
- function _is_native_reflect_construct$1() {
10025
- try {
10026
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
10027
- } catch (_) {}
10028
- return (_is_native_reflect_construct$1 = function() {
10029
- return !!result;
10030
- })();
10031
- }
10032
9927
  var __defProp$1 = Object.defineProperty;
10033
9928
  var __defNormalProp$1 = function __defNormalProp(obj, key, value) {
10034
9929
  return key in obj ? __defProp$1(obj, key, {
@@ -10118,9 +10013,7 @@ this.Scorm12API = (function () {
10118
10013
  if (Array.isArray(arr)) return arr;
10119
10014
  }
10120
10015
  function _assert_this_initialized(self) {
10121
- if (self === void 0) {
10122
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10123
- }
10016
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10124
10017
  return self;
10125
10018
  }
10126
10019
  function _call_super(_this, derived, args) {
@@ -10128,9 +10021,7 @@ this.Scorm12API = (function () {
10128
10021
  return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10129
10022
  }
10130
10023
  function _class_call_check(instance, Constructor) {
10131
- if (!(instance instanceof Constructor)) {
10132
- throw new TypeError("Cannot call a class as a function");
10133
- }
10024
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
10134
10025
  }
10135
10026
  function _defineProperties(target, props) {
10136
10027
  for(var i = 0; i < props.length; i++){
@@ -10154,9 +10045,7 @@ this.Scorm12API = (function () {
10154
10045
  configurable: true,
10155
10046
  writable: true
10156
10047
  });
10157
- } else {
10158
- obj[key] = value;
10159
- }
10048
+ } else obj[key] = value;
10160
10049
  return obj;
10161
10050
  }
10162
10051
  function _get_prototype_of(o) {
@@ -10178,6 +10067,14 @@ this.Scorm12API = (function () {
10178
10067
  });
10179
10068
  if (superClass) _set_prototype_of(subClass, superClass);
10180
10069
  }
10070
+ function _is_native_reflect_construct() {
10071
+ try {
10072
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
10073
+ } catch (_) {}
10074
+ return (_is_native_reflect_construct = function() {
10075
+ return !!result;
10076
+ })();
10077
+ }
10181
10078
  function _iterable_to_array_limit(arr, i) {
10182
10079
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
10183
10080
  if (_i == null) return;
@@ -10203,7 +10100,7 @@ this.Scorm12API = (function () {
10203
10100
  return _arr;
10204
10101
  }
10205
10102
  function _non_iterable_rest() {
10206
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10103
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10207
10104
  }
10208
10105
  function _object_spread(target) {
10209
10106
  for(var i = 1; i < arguments.length; i++){
@@ -10221,9 +10118,7 @@ this.Scorm12API = (function () {
10221
10118
  return target;
10222
10119
  }
10223
10120
  function _possible_constructor_return(self, call) {
10224
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
10225
- return call;
10226
- }
10121
+ if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
10227
10122
  return _assert_this_initialized(self);
10228
10123
  }
10229
10124
  function _set_prototype_of(o, p) {
@@ -10248,14 +10143,6 @@ this.Scorm12API = (function () {
10248
10143
  if (n === "Map" || n === "Set") return Array.from(n);
10249
10144
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
10250
10145
  }
10251
- function _is_native_reflect_construct() {
10252
- try {
10253
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
10254
- } catch (_) {}
10255
- return (_is_native_reflect_construct = function() {
10256
- return !!result;
10257
- })();
10258
- }
10259
10146
  var __defProp = Object.defineProperty;
10260
10147
  var __defNormalProp = function __defNormalProp(obj, key, value) {
10261
10148
  return key in obj ? __defProp(obj, key, {