scorm-again 3.1.4 → 3.1.5

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.
Files changed (32) hide show
  1. package/dist/esm/scorm-again.js +1080 -187
  2. package/dist/esm/scorm-again.js.map +1 -1
  3. package/dist/esm/scorm-again.min.js +1 -1
  4. package/dist/esm/scorm-again.min.js.map +1 -1
  5. package/dist/esm/scorm12.js +14 -3
  6. package/dist/esm/scorm12.js.map +1 -1
  7. package/dist/esm/scorm12.min.js +1 -1
  8. package/dist/esm/scorm12.min.js.map +1 -1
  9. package/dist/esm/scorm2004.js +1080 -187
  10. package/dist/esm/scorm2004.js.map +1 -1
  11. package/dist/esm/scorm2004.min.js +1 -1
  12. package/dist/esm/scorm2004.min.js.map +1 -1
  13. package/dist/scorm-again.js +1406 -410
  14. package/dist/scorm-again.js.map +1 -1
  15. package/dist/scorm-again.min.js +1 -1
  16. package/dist/scorm12.js +54 -14
  17. package/dist/scorm12.js.map +1 -1
  18. package/dist/scorm12.min.js +1 -1
  19. package/dist/scorm2004.js +1401 -405
  20. package/dist/scorm2004.js.map +1 -1
  21. package/dist/scorm2004.min.js +1 -1
  22. package/dist/types/Scorm2004API.d.ts +11 -0
  23. package/dist/types/cmi/scorm2004/sequencing/activity.d.ts +47 -5
  24. package/dist/types/cmi/scorm2004/sequencing/handlers/rte_data_transfer.d.ts +1 -0
  25. package/dist/types/cmi/scorm2004/sequencing/objectives/global_objective_synchronizer.d.ts +17 -1
  26. package/dist/types/cmi/scorm2004/sequencing/sequencing_rules.d.ts +6 -1
  27. package/dist/types/cmi/scorm2004/sequencing/traversal/flow_traversal_service.d.ts +5 -2
  28. package/dist/types/constants/regex.d.ts +1 -0
  29. package/dist/types/types/api_types.d.ts +12 -0
  30. package/dist/types/types/sequencing_types.d.ts +7 -0
  31. package/dist/types/utilities/core.d.ts +4 -1
  32. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  (function () {
2
2
  'use strict';
3
3
 
4
- function _array_like_to_array$g(arr, len) {
4
+ function _array_like_to_array$h(arr, len) {
5
5
  if (len == null || len > arr.length) len = arr.length;
6
6
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7
7
  return arr2;
@@ -9,10 +9,10 @@
9
9
  function _array_with_holes$7(arr) {
10
10
  if (Array.isArray(arr)) return arr;
11
11
  }
12
- function _array_without_holes$a(arr) {
13
- if (Array.isArray(arr)) return _array_like_to_array$g(arr);
12
+ function _array_without_holes$b(arr) {
13
+ if (Array.isArray(arr)) return _array_like_to_array$h(arr);
14
14
  }
15
- function _iterable_to_array$a(iter) {
15
+ function _iterable_to_array$b(iter) {
16
16
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
17
17
  }
18
18
  function _iterable_to_array_limit$7(arr, i) {
@@ -42,22 +42,22 @@
42
42
  function _non_iterable_rest$7() {
43
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.");
44
44
  }
45
- function _non_iterable_spread$a() {
45
+ function _non_iterable_spread$b() {
46
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.");
47
47
  }
48
48
  function _sliced_to_array$7(arr, i) {
49
- return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$7();
49
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$7();
50
50
  }
51
- function _to_consumable_array$a(arr) {
52
- return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$a();
51
+ function _to_consumable_array$b(arr) {
52
+ return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$h(arr) || _non_iterable_spread$b();
53
53
  }
54
- function _unsupported_iterable_to_array$g(o, minLen) {
54
+ function _unsupported_iterable_to_array$h(o, minLen) {
55
55
  if (!o) return;
56
- if (typeof o === "string") return _array_like_to_array$g(o, minLen);
56
+ if (typeof o === "string") return _array_like_to_array$h(o, minLen);
57
57
  var n = Object.prototype.toString.call(o).slice(8, -1);
58
58
  if (n === "Object" && o.constructor) n = o.constructor.name;
59
59
  if (n === "Map" || n === "Set") return Array.from(n);
60
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
60
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
61
61
  }
62
62
  var SECONDS_PER_SECOND = 1;
63
63
  var SECONDS_PER_MINUTE = 60;
@@ -267,15 +267,21 @@
267
267
  }
268
268
  return new RegExp(tester).test(str);
269
269
  }
270
- function memoize(fn, keyFn) {
270
+ function memoize(fn, keyFn, options) {
271
271
  var cache = /* @__PURE__ */ new Map();
272
272
  return function() {
273
273
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
274
274
  args[_key] = arguments[_key];
275
275
  }
276
- var key = keyFn ? keyFn.apply(void 0, _to_consumable_array$a(args)) : JSON.stringify(args);
276
+ var key = keyFn ? keyFn.apply(void 0, _to_consumable_array$b(args)) : JSON.stringify(args);
277
+ if ((options === null || options === void 0 ? void 0 : options.maxKeyLength) !== void 0 && key.length > options.maxKeyLength) {
278
+ return fn.apply(void 0, _to_consumable_array$b(args));
279
+ }
277
280
  return cache.has(key) ? cache.get(key) : function() {
278
- var result = fn.apply(void 0, _to_consumable_array$a(args));
281
+ var result = fn.apply(void 0, _to_consumable_array$b(args));
282
+ if ((options === null || options === void 0 ? void 0 : options.maxEntries) !== void 0 && cache.size >= options.maxEntries) {
283
+ cache.delete(cache.keys().next().value);
284
+ }
279
285
  cache.set(key, result);
280
286
  return result;
281
287
  }();
@@ -1096,7 +1102,7 @@
1096
1102
  }
1097
1103
  return target;
1098
1104
  }
1099
- function ownKeys$4(object, enumerableOnly) {
1105
+ function ownKeys$5(object, enumerableOnly) {
1100
1106
  var keys = Object.keys(object);
1101
1107
  if (Object.getOwnPropertySymbols) {
1102
1108
  var symbols = Object.getOwnPropertySymbols(object);
@@ -1104,12 +1110,12 @@
1104
1110
  }
1105
1111
  return keys;
1106
1112
  }
1107
- function _object_spread_props$4(target, source) {
1113
+ function _object_spread_props$5(target, source) {
1108
1114
  source = source != null ? source : {};
1109
1115
  if (Object.getOwnPropertyDescriptors) {
1110
1116
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1111
1117
  } else {
1112
- ownKeys$4(Object(source)).forEach(function(key) {
1118
+ ownKeys$5(Object(source)).forEach(function(key) {
1113
1119
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1114
1120
  });
1115
1121
  }
@@ -1145,7 +1151,7 @@
1145
1151
  VALUE_OUT_OF_RANGE: 101,
1146
1152
  DEPENDENCY_NOT_ESTABLISHED: 101
1147
1153
  };
1148
- var scorm12_errors = _object_spread_props$4(_object_spread$g({}, global_errors), {
1154
+ var scorm12_errors = _object_spread_props$5(_object_spread$g({}, global_errors), {
1149
1155
  RETRIEVE_BEFORE_INIT: 301,
1150
1156
  STORE_BEFORE_INIT: 301,
1151
1157
  COMMIT_BEFORE_INIT: 301,
@@ -1165,7 +1171,7 @@
1165
1171
  VALUE_OUT_OF_RANGE: 405,
1166
1172
  DEPENDENCY_NOT_ESTABLISHED: 408
1167
1173
  });
1168
- var scorm2004_errors = _object_spread_props$4(_object_spread$g({}, global_errors), {
1174
+ var scorm2004_errors = _object_spread_props$5(_object_spread$g({}, global_errors), {
1169
1175
  INITIALIZATION_FAILED: 102,
1170
1176
  INITIALIZED: 103,
1171
1177
  TERMINATED: 104,
@@ -1855,6 +1861,7 @@
1855
1861
  * Subtag: 2-8 alphanumeric characters
1856
1862
  */ CMILang: "^([a-zA-Z]{1,8}|i|x)(-[a-zA-Z0-9-]{2,8})?$|^$",
1857
1863
  /** CMILangString250 - String with optional language tag, max 250 chars (RTE C.1.3) */ CMILangString250: "^({lang=([a-zA-Z]{1,8}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).{0,250}$)?$",
1864
+ /** CMILangString - Optional language tag, no length cap; RTE C.1.3 SPM is a floor and is deliberately not enforced */ CMILangString: "^({lang=([a-zA-Z]{1,8}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).*$)?$",
1858
1865
  /** CMILangcr - Language tag pattern with content */ CMILangcr: "^(({lang=([a-zA-Z]{1,8}|i|x)?(-[a-zA-Z0-9-]{2,8})?}))(.*?)$",
1859
1866
  /** CMILangString250cr - String with optional language tag (carriage return variant) */ CMILangString250cr: "^(({lang=([a-zA-Z]{1,8}|i|x)?(-[a-zA-Z0-9-]{2,8})?})?(.{0,250})?)?$",
1860
1867
  /** CMILangString4000 - String with optional language tag, max 4000 chars (RTE C.1.3) */ CMILangString4000: "^({lang=([a-zA-Z]{1,8}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).{0,4000}$)?$",
@@ -2890,12 +2897,6 @@
2890
2897
  var __publicField$19 = function __publicField(obj, key, value) {
2891
2898
  return __defNormalProp$19(obj, (typeof key === "undefined" ? "undefined" : _type_of$1a(key)) !== "symbol" ? key + "" : key, value);
2892
2899
  };
2893
- var RuleConditionOperator = /* @__PURE__ */ function(RuleConditionOperator2) {
2894
- RuleConditionOperator2["NOT"] = "not";
2895
- RuleConditionOperator2["AND"] = "and";
2896
- RuleConditionOperator2["OR"] = "or";
2897
- return RuleConditionOperator2;
2898
- }(RuleConditionOperator || {});
2899
2900
  var RuleActionType = /* @__PURE__ */ function(RuleActionType2) {
2900
2901
  RuleActionType2["SKIP"] = "skip";
2901
2902
  RuleActionType2["DISABLED"] = "disabled";
@@ -2910,6 +2911,82 @@
2910
2911
  RuleActionType2["EXIT"] = "exit";
2911
2912
  return RuleActionType2;
2912
2913
  }(RuleActionType || {});
2914
+ function kleeneNot(value) {
2915
+ if (value === "unknown") {
2916
+ return "unknown";
2917
+ }
2918
+ return !value;
2919
+ }
2920
+ function kleeneAnd(values) {
2921
+ var hasUnknown = false;
2922
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2923
+ try {
2924
+ for(var _iterator = values[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2925
+ var value = _step.value;
2926
+ if (value === false) {
2927
+ return false;
2928
+ }
2929
+ if (value === "unknown") {
2930
+ hasUnknown = true;
2931
+ }
2932
+ }
2933
+ } catch (err) {
2934
+ _didIteratorError = true;
2935
+ _iteratorError = err;
2936
+ } finally{
2937
+ try {
2938
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2939
+ _iterator.return();
2940
+ }
2941
+ } finally{
2942
+ if (_didIteratorError) {
2943
+ throw _iteratorError;
2944
+ }
2945
+ }
2946
+ }
2947
+ return hasUnknown ? "unknown" : true;
2948
+ }
2949
+ function kleeneOr(values) {
2950
+ var hasUnknown = false;
2951
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2952
+ try {
2953
+ for(var _iterator = values[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2954
+ var value = _step.value;
2955
+ if (value === true) {
2956
+ return true;
2957
+ }
2958
+ if (value === "unknown") {
2959
+ hasUnknown = true;
2960
+ }
2961
+ }
2962
+ } catch (err) {
2963
+ _didIteratorError = true;
2964
+ _iteratorError = err;
2965
+ } finally{
2966
+ try {
2967
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2968
+ _iterator.return();
2969
+ }
2970
+ } finally{
2971
+ if (_didIteratorError) {
2972
+ throw _iteratorError;
2973
+ }
2974
+ }
2975
+ }
2976
+ return hasUnknown ? "unknown" : false;
2977
+ }
2978
+ function combineRuleConditionResults(values, conditionCombination) {
2979
+ if (values.length === 0) {
2980
+ return false;
2981
+ }
2982
+ if (conditionCombination === "all" || conditionCombination === "and" /* AND */ ) {
2983
+ return kleeneAnd(values);
2984
+ }
2985
+ if (conditionCombination === "any" || conditionCombination === "or" /* OR */ ) {
2986
+ return kleeneOr(values);
2987
+ }
2988
+ return false;
2989
+ }
2913
2990
  var _RuleCondition = /*#__PURE__*/ function(BaseCMI) {
2914
2991
  _inherits$t(_RuleCondition, BaseCMI);
2915
2992
  function _RuleCondition() {
@@ -3015,53 +3092,74 @@
3015
3092
  /**
3016
3093
  * Evaluate the condition for an activity
3017
3094
  * @param {Activity} activity - The activity to evaluate the condition for
3018
- * @return {boolean} - True if the condition is met, false otherwise
3095
+ * @return {RuleConditionEvaluation} - True, false, or unknown per SCORM 2004 4th Ed.
3019
3096
  */ key: "evaluate",
3020
3097
  value: function evaluate(activity) {
3021
3098
  var result;
3099
+ var hasReferencedObjective = this._referencedObjective !== null;
3022
3100
  var referencedObjective = this.resolveReferencedObjective(activity);
3023
3101
  switch(this._condition){
3024
3102
  case "satisfied" /* SATISFIED */ :
3025
3103
  case "objectiveSatisfied" /* OBJECTIVE_SATISFIED */ :
3026
- if (referencedObjective) {
3027
- result = referencedObjective.satisfiedStatus === true;
3104
+ if (hasReferencedObjective && !referencedObjective) {
3105
+ result = false;
3106
+ } else if (referencedObjective) {
3107
+ result = referencedObjective.satisfiedStatusKnown || referencedObjective.progressStatus ? referencedObjective.satisfiedStatus === true : "unknown";
3108
+ } else if (activity.objectiveSatisfiedStatusKnown) {
3109
+ result = activity.objectiveSatisfiedStatus === true;
3110
+ } else if (activity.successStatus !== SuccessStatus.UNKNOWN) {
3111
+ result = activity.successStatus === SuccessStatus.PASSED;
3028
3112
  } else {
3029
- result = activity.successStatus === SuccessStatus.PASSED || activity.objectiveSatisfiedStatus === true;
3113
+ result = "unknown";
3030
3114
  }
3031
3115
  break;
3032
3116
  case "objectiveStatusKnown" /* OBJECTIVE_STATUS_KNOWN */ :
3033
- result = referencedObjective ? !!referencedObjective.measureStatus : !!activity.objectiveMeasureStatus;
3117
+ result = hasReferencedObjective && !referencedObjective ? false : referencedObjective ? !!referencedObjective.satisfiedStatusKnown : !!activity.objectiveSatisfiedStatusKnown;
3034
3118
  break;
3035
3119
  case "objectiveMeasureKnown" /* OBJECTIVE_MEASURE_KNOWN */ :
3036
- result = referencedObjective ? !!referencedObjective.measureStatus : !!activity.objectiveMeasureStatus;
3120
+ result = hasReferencedObjective && !referencedObjective ? false : referencedObjective ? !!referencedObjective.measureStatus : !!activity.objectiveMeasureStatus;
3037
3121
  break;
3038
3122
  case "objectiveMeasureGreaterThan" /* OBJECTIVE_MEASURE_GREATER_THAN */ :
3039
3123
  {
3124
+ if (hasReferencedObjective && !referencedObjective) {
3125
+ result = false;
3126
+ break;
3127
+ }
3040
3128
  var greaterThanValue = this._parameters.get("threshold") || 0;
3041
3129
  var measureStatus = referencedObjective ? referencedObjective.measureStatus : activity.objectiveMeasureStatus;
3042
3130
  var measureValue = referencedObjective ? referencedObjective.normalizedMeasure : activity.objectiveNormalizedMeasure;
3043
- result = !!measureStatus && measureValue > greaterThanValue;
3131
+ result = measureStatus ? measureValue > greaterThanValue : "unknown";
3044
3132
  break;
3045
3133
  }
3046
3134
  case "objectiveMeasureLessThan" /* OBJECTIVE_MEASURE_LESS_THAN */ :
3047
3135
  {
3136
+ if (hasReferencedObjective && !referencedObjective) {
3137
+ result = false;
3138
+ break;
3139
+ }
3048
3140
  var lessThanValue = this._parameters.get("threshold") || 0;
3049
3141
  var measureStatus1 = referencedObjective ? referencedObjective.measureStatus : activity.objectiveMeasureStatus;
3050
3142
  var measureValue1 = referencedObjective ? referencedObjective.normalizedMeasure : activity.objectiveNormalizedMeasure;
3051
- result = !!measureStatus1 && measureValue1 < lessThanValue;
3143
+ result = measureStatus1 ? measureValue1 < lessThanValue : "unknown";
3052
3144
  break;
3053
3145
  }
3054
3146
  case "completed" /* COMPLETED */ :
3055
3147
  case "activityCompleted" /* ACTIVITY_COMPLETED */ :
3056
- if (referencedObjective) {
3057
- result = referencedObjective.completionStatus === CompletionStatus.COMPLETED;
3148
+ if (hasReferencedObjective && !referencedObjective) {
3149
+ result = false;
3150
+ } else if (referencedObjective) {
3151
+ result = referencedObjective.completionStatus === CompletionStatus.UNKNOWN ? "unknown" : referencedObjective.completionStatus === CompletionStatus.COMPLETED;
3152
+ } else if (activity.completionStatus === CompletionStatus.UNKNOWN) {
3153
+ result = "unknown";
3058
3154
  } else {
3059
- result = activity.isCompleted;
3155
+ result = activity.completionStatus === CompletionStatus.COMPLETED;
3060
3156
  }
3061
3157
  break;
3062
3158
  case "progressKnown" /* PROGRESS_KNOWN */ :
3063
3159
  case "activityProgressKnown" /* ACTIVITY_PROGRESS_KNOWN */ :
3064
- if (referencedObjective) {
3160
+ if (hasReferencedObjective && !referencedObjective) {
3161
+ result = false;
3162
+ } else if (referencedObjective) {
3065
3163
  result = referencedObjective.completionStatus !== CompletionStatus.UNKNOWN;
3066
3164
  } else {
3067
3165
  result = activity.completionStatus !== "unknown";
@@ -3090,7 +3188,7 @@
3090
3188
  break;
3091
3189
  }
3092
3190
  if (this._operator === "not" /* NOT */ ) {
3093
- result = !result;
3191
+ result = kleeneNot(result);
3094
3192
  }
3095
3193
  return result;
3096
3194
  }
@@ -3339,19 +3437,9 @@
3339
3437
  * @return {boolean} - True if the rule conditions are met, false otherwise
3340
3438
  */ key: "evaluate",
3341
3439
  value: function evaluate(activity) {
3342
- if (this._conditions.length === 0) {
3343
- return true;
3344
- }
3345
- if (this._conditionCombination === "all" || this._conditionCombination === "and" /* AND */ ) {
3346
- return this._conditions.every(function(condition) {
3347
- return condition.evaluate(activity);
3348
- });
3349
- } else if (this._conditionCombination === "any" || this._conditionCombination === "or" /* OR */ ) {
3350
- return this._conditions.some(function(condition) {
3351
- return condition.evaluate(activity);
3352
- });
3353
- }
3354
- return false;
3440
+ return combineRuleConditionResults(this._conditions.map(function(condition) {
3441
+ return condition.evaluate(activity);
3442
+ }), this._conditionCombination) === true;
3355
3443
  }
3356
3444
  },
3357
3445
  {
@@ -4585,23 +4673,10 @@
4585
4673
  * Evaluates individual sequencing rule conditions
4586
4674
  * @param {Activity} activity - The activity to evaluate the rule for
4587
4675
  * @param {SequencingRule} rule - The rule to evaluate
4588
- * @return {boolean} - True if all rule conditions are met
4676
+ * @return {boolean} - True only when the rule evaluates to definite true
4589
4677
  */ key: "checkRuleSubprocess",
4590
4678
  value: function checkRuleSubprocess(activity, rule) {
4591
- if (rule.conditions.length === 0) {
4592
- return true;
4593
- }
4594
- var conditionCombination = rule.conditionCombination;
4595
- if (conditionCombination === "all" || conditionCombination === RuleConditionOperator.AND) {
4596
- return rule.conditions.every(function(condition) {
4597
- return condition.evaluate(activity);
4598
- });
4599
- } else if (conditionCombination === "any" || conditionCombination === RuleConditionOperator.OR) {
4600
- return rule.conditions.some(function(condition) {
4601
- return condition.evaluate(activity);
4602
- });
4603
- }
4604
- return false;
4679
+ return rule.evaluate(activity);
4605
4680
  }
4606
4681
  },
4607
4682
  {
@@ -5442,13 +5517,13 @@
5442
5517
  return SequencingControls;
5443
5518
  }(BaseCMI);
5444
5519
 
5445
- function _array_like_to_array$f(arr, len) {
5520
+ function _array_like_to_array$g(arr, len) {
5446
5521
  if (len == null || len > arr.length) len = arr.length;
5447
5522
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5448
5523
  return arr2;
5449
5524
  }
5450
- function _array_without_holes$9(arr) {
5451
- if (Array.isArray(arr)) return _array_like_to_array$f(arr);
5525
+ function _array_without_holes$a(arr) {
5526
+ if (Array.isArray(arr)) return _array_like_to_array$g(arr);
5452
5527
  }
5453
5528
  function _class_call_check$18(instance, Constructor) {
5454
5529
  if (!(instance instanceof Constructor)) {
@@ -5468,22 +5543,22 @@
5468
5543
  if (staticProps) _defineProperties$18(Constructor, staticProps);
5469
5544
  return Constructor;
5470
5545
  }
5471
- function _iterable_to_array$9(iter) {
5546
+ function _iterable_to_array$a(iter) {
5472
5547
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5473
5548
  }
5474
- function _non_iterable_spread$9() {
5549
+ function _non_iterable_spread$a() {
5475
5550
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5476
5551
  }
5477
- function _to_consumable_array$9(arr) {
5478
- return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$9();
5552
+ function _to_consumable_array$a(arr) {
5553
+ return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$a();
5479
5554
  }
5480
- function _unsupported_iterable_to_array$f(o, minLen) {
5555
+ function _unsupported_iterable_to_array$g(o, minLen) {
5481
5556
  if (!o) return;
5482
- if (typeof o === "string") return _array_like_to_array$f(o, minLen);
5557
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
5483
5558
  var n = Object.prototype.toString.call(o).slice(8, -1);
5484
5559
  if (n === "Object" && o.constructor) n = o.constructor.name;
5485
5560
  if (n === "Map" || n === "Set") return Array.from(n);
5486
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
5561
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
5487
5562
  }
5488
5563
  var SelectionRandomization = /*#__PURE__*/ function() {
5489
5564
  function SelectionRandomization() {
@@ -5499,7 +5574,7 @@
5499
5574
  * @return {Activity[]} - The selected child activities
5500
5575
  */ function selectChildrenProcess(activity) {
5501
5576
  var controls = activity.sequencingControls;
5502
- var children = _to_consumable_array$9(activity.children);
5577
+ var children = _to_consumable_array$a(activity.children);
5503
5578
  if (controls.selectionTiming === SelectionTiming.NEVER) {
5504
5579
  return children;
5505
5580
  }
@@ -5568,7 +5643,7 @@
5568
5643
  */ function randomizeChildrenProcess(activity) {
5569
5644
  var _activity_children;
5570
5645
  var controls = activity.sequencingControls;
5571
- var children = _to_consumable_array$9(activity.children);
5646
+ var children = _to_consumable_array$a(activity.children);
5572
5647
  if (controls.randomizationTiming === RandomizationTiming.NEVER) {
5573
5648
  return children;
5574
5649
  }
@@ -5578,7 +5653,7 @@
5578
5653
  if (!controls.randomizeChildren) {
5579
5654
  return children;
5580
5655
  }
5581
- var randomizedChildren = _to_consumable_array$9(children);
5656
+ var randomizedChildren = _to_consumable_array$a(children);
5582
5657
  for(var i = randomizedChildren.length - 1; i > 0; i--){
5583
5658
  var j = Math.floor(Math.random() * (i + 1));
5584
5659
  var tempI = randomizedChildren[i];
@@ -5592,7 +5667,7 @@
5592
5667
  controls.reorderChildren = true;
5593
5668
  }
5594
5669
  activity.children.length = 0;
5595
- (_activity_children = activity.children).push.apply(_activity_children, _to_consumable_array$9(randomizedChildren));
5670
+ (_activity_children = activity.children).push.apply(_activity_children, _to_consumable_array$a(randomizedChildren));
5596
5671
  return randomizedChildren;
5597
5672
  }
5598
5673
  },
@@ -5727,13 +5802,17 @@
5727
5802
  * @param {Activity} fromActivity - The activity to flow from
5728
5803
  * @param {FlowSubprocessMode} direction - The flow direction
5729
5804
  * @return {FlowSubprocessResult} - Result containing the deliverable activity
5805
+ * @spec SN Book: SB.2.3 (Flow Subprocess) - preserves the SB.2.1 effective traversal direction for SB.2.2.
5806
+ * @spec SN Book: SB.2.2 (Flow Activity Traversal Subprocess) - evaluates candidates using the effective direction returned by SB.2.1.
5730
5807
  */ key: "flowSubprocess",
5731
5808
  value: function flowSubprocess(fromActivity, direction) {
5732
5809
  var candidateActivity = fromActivity;
5733
5810
  var firstIteration = true;
5734
5811
  var lastCandidateHadNoChildren = false;
5812
+ var currentDirection = direction;
5813
+ var forwardOnlyCluster = null;
5735
5814
  while(candidateActivity){
5736
- var traversalResult = this.flowTreeTraversalSubprocess(candidateActivity, direction, firstIteration);
5815
+ var traversalResult = this.flowTreeTraversalSubprocess(candidateActivity, currentDirection, firstIteration, forwardOnlyCluster);
5737
5816
  if (!traversalResult.activity) {
5738
5817
  var exceptionCode = null;
5739
5818
  if (traversalResult.exception) {
@@ -5745,12 +5824,17 @@
5745
5824
  }
5746
5825
  return new FlowSubprocessResult(candidateActivity, false, exceptionCode, traversalResult.endSequencingSession);
5747
5826
  }
5827
+ var effectiveDirection = traversalResult.direction || currentDirection;
5828
+ if (traversalResult.forwardOnlyCluster) {
5829
+ forwardOnlyCluster = traversalResult.forwardOnlyCluster;
5830
+ }
5748
5831
  lastCandidateHadNoChildren = traversalResult.activity.children.length > 0 && traversalResult.activity.getAvailableChildren().length === 0;
5749
- var deliverable = this.flowActivityTraversalSubprocess(traversalResult.activity, direction === FlowSubprocessMode.FORWARD, true, direction);
5832
+ var deliverable = this.flowActivityTraversalSubprocess(traversalResult.activity, effectiveDirection === FlowSubprocessMode.FORWARD, true, effectiveDirection);
5750
5833
  if (deliverable) {
5751
5834
  return new FlowSubprocessResult(deliverable, true, null, false);
5752
5835
  }
5753
5836
  candidateActivity = traversalResult.activity;
5837
+ currentDirection = effectiveDirection;
5754
5838
  firstIteration = false;
5755
5839
  }
5756
5840
  return new FlowSubprocessResult(null, false, null, false);
@@ -5763,12 +5847,14 @@
5763
5847
  * @param {Activity} fromActivity - The activity to traverse from
5764
5848
  * @param {FlowSubprocessMode} direction - The traversal direction
5765
5849
  * @param {boolean} skipChildren - Whether to skip checking children
5850
+ * @param {Activity | null} forwardTraversalBoundary - Cluster boundary for an SB.2.1 forwardOnly direction reversal
5766
5851
  * @return {FlowTreeTraversalResult} - The next activity and flags
5852
+ * @spec SN Book: SB.2.1 (Flow Tree Traversal Subprocess) - backward traversal into a forwardOnly cluster selects the first available child and reverses traversal direction to Forward.
5767
5853
  */ key: "flowTreeTraversalSubprocess",
5768
5854
  value: function flowTreeTraversalSubprocess(fromActivity, direction) {
5769
- var skipChildren = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
5855
+ var skipChildren = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, forwardTraversalBoundary = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
5770
5856
  if (direction === FlowSubprocessMode.FORWARD) {
5771
- return this.traverseForward(fromActivity, skipChildren);
5857
+ return this.traverseForward(fromActivity, skipChildren, forwardTraversalBoundary);
5772
5858
  } else {
5773
5859
  return this.traverseBackward(fromActivity);
5774
5860
  }
@@ -5779,10 +5865,19 @@
5779
5865
  * Traverse forward in the activity tree
5780
5866
  * @param {Activity} fromActivity - Starting activity
5781
5867
  * @param {boolean} skipChildren - Whether to skip children
5868
+ * @param {Activity | null} forwardTraversalBoundary - Cluster boundary for an SB.2.1 forwardOnly direction reversal
5782
5869
  * @return {FlowTreeTraversalResult}
5870
+ * @spec SN Book: SB.2.1 (Flow Tree Traversal Subprocess) - a reversed Forward traversal from a forwardOnly cluster remains within that cluster.
5783
5871
  */ key: "traverseForward",
5784
5872
  value: function traverseForward(fromActivity, skipChildren) {
5785
- if (skipChildren && this.isActivityLastOverall(fromActivity)) {
5873
+ var forwardTraversalBoundary = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
5874
+ if (forwardTraversalBoundary && !this.isDescendantOfOrSelf(fromActivity, forwardTraversalBoundary)) {
5875
+ return {
5876
+ activity: null,
5877
+ endSequencingSession: false
5878
+ };
5879
+ }
5880
+ if (!forwardTraversalBoundary && skipChildren && this.isActivityLastOverall(fromActivity)) {
5786
5881
  if (this.activityTree.root) {
5787
5882
  this.terminateDescendentAttempts(this.activityTree.root);
5788
5883
  }
@@ -5810,6 +5905,12 @@
5810
5905
  endSequencingSession: false
5811
5906
  };
5812
5907
  }
5908
+ if (forwardTraversalBoundary && (current === forwardTraversalBoundary || current.parent === forwardTraversalBoundary)) {
5909
+ return {
5910
+ activity: null,
5911
+ endSequencingSession: false
5912
+ };
5913
+ }
5813
5914
  current = current.parent;
5814
5915
  }
5815
5916
  if (this.activityTree.root) {
@@ -5826,6 +5927,7 @@
5826
5927
  * Traverse backward in the activity tree
5827
5928
  * @param {Activity} fromActivity - Starting activity
5828
5929
  * @return {FlowTreeTraversalResult}
5930
+ * @spec SN Book: SB.2.1 (Flow Tree Traversal Subprocess) - backward traversal into a forwardOnly cluster selects the first available child and reverses traversal direction to Forward.
5829
5931
  */ key: "traverseBackward",
5830
5932
  value: function traverseBackward(fromActivity) {
5831
5933
  if (fromActivity.parent && fromActivity.parent.sequencingControls.forwardOnly) {
@@ -5837,10 +5939,7 @@
5837
5939
  }
5838
5940
  var previousSibling = this.activityTree.getPreviousSibling(fromActivity);
5839
5941
  if (previousSibling) {
5840
- return {
5841
- activity: this.getLastDescendant(previousSibling),
5842
- endSequencingSession: false
5843
- };
5942
+ return this.getBackwardTraversalEntry(previousSibling);
5844
5943
  }
5845
5944
  var current = fromActivity;
5846
5945
  var ancestorIterations = 0;
@@ -5851,10 +5950,7 @@
5851
5950
  }
5852
5951
  var parentPreviousSibling = this.activityTree.getPreviousSibling(current.parent);
5853
5952
  if (parentPreviousSibling) {
5854
- return {
5855
- activity: this.getLastDescendant(parentPreviousSibling),
5856
- endSequencingSession: false
5857
- };
5953
+ return this.getBackwardTraversalEntry(parentPreviousSibling);
5858
5954
  }
5859
5955
  current = current.parent;
5860
5956
  }
@@ -5866,28 +5962,59 @@
5866
5962
  },
5867
5963
  {
5868
5964
  /**
5869
- * Get the last descendant of an activity
5965
+ * Get the activity entered by backward traversal.
5870
5966
  * @param {Activity} activity - The activity
5871
- * @return {Activity} - The last descendant
5872
- */ key: "getLastDescendant",
5873
- value: function getLastDescendant(activity) {
5874
- var lastDescendant = activity;
5967
+ * @return {FlowTreeTraversalResult} - The entered activity and effective direction
5968
+ * @spec SN Book: SB.2.1 (Flow Tree Traversal Subprocess) - entering a forwardOnly cluster while moving Backward uses the first available child and changes direction to Forward.
5969
+ */ key: "getBackwardTraversalEntry",
5970
+ value: function getBackwardTraversalEntry(activity) {
5971
+ var enteredActivity = activity;
5875
5972
  var iterations = 0;
5876
5973
  var maxIterations = 1e4;
5877
5974
  while(true){
5878
5975
  if (++iterations > maxIterations) {
5879
- throw new Error("Infinite loop detected while getting last descendant");
5976
+ throw new Error("Infinite loop detected while getting backward traversal entry");
5880
5977
  }
5881
- this.ensureSelectionAndRandomization(lastDescendant);
5882
- var children = lastDescendant.getAvailableChildren();
5978
+ this.ensureSelectionAndRandomization(enteredActivity);
5979
+ var children = enteredActivity.getAvailableChildren();
5883
5980
  if (children.length === 0) {
5884
5981
  break;
5885
5982
  }
5983
+ if (enteredActivity.sequencingControls.forwardOnly) {
5984
+ return {
5985
+ activity: children[0] || null,
5986
+ endSequencingSession: false,
5987
+ direction: FlowSubprocessMode.FORWARD,
5988
+ forwardOnlyCluster: enteredActivity
5989
+ };
5990
+ }
5886
5991
  var lastChild = children[children.length - 1];
5887
5992
  if (!lastChild) break;
5888
- lastDescendant = lastChild;
5993
+ enteredActivity = lastChild;
5889
5994
  }
5890
- return lastDescendant;
5995
+ return {
5996
+ activity: enteredActivity,
5997
+ endSequencingSession: false
5998
+ };
5999
+ }
6000
+ },
6001
+ {
6002
+ /**
6003
+ * Check whether an activity is the same as or beneath an ancestor.
6004
+ * @param {Activity} activity - The activity to check
6005
+ * @param {Activity} ancestor - The expected ancestor
6006
+ * @return {boolean} - True when activity is within ancestor
6007
+ * @spec SN Book: SB.2.1 (Flow Tree Traversal Subprocess) - bounds Forward traversal after a forwardOnly direction reversal to the entered cluster.
6008
+ */ key: "isDescendantOfOrSelf",
6009
+ value: function isDescendantOfOrSelf(activity, ancestor) {
6010
+ var current = activity;
6011
+ while(current){
6012
+ if (current === ancestor) {
6013
+ return true;
6014
+ }
6015
+ current = current.parent;
6016
+ }
6017
+ return false;
5891
6018
  }
5892
6019
  },
5893
6020
  {
@@ -7529,7 +7656,7 @@
7529
7656
  }
7530
7657
  return target;
7531
7658
  }
7532
- function ownKeys$3(object, enumerableOnly) {
7659
+ function ownKeys$4(object, enumerableOnly) {
7533
7660
  var keys = Object.keys(object);
7534
7661
  if (Object.getOwnPropertySymbols) {
7535
7662
  var symbols = Object.getOwnPropertySymbols(object);
@@ -7537,12 +7664,12 @@
7537
7664
  }
7538
7665
  return keys;
7539
7666
  }
7540
- function _object_spread_props$3(target, source) {
7667
+ function _object_spread_props$4(target, source) {
7541
7668
  source = source != null ? source : {};
7542
7669
  if (Object.getOwnPropertyDescriptors) {
7543
7670
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
7544
7671
  } else {
7545
- ownKeys$3(Object(source)).forEach(function(key) {
7672
+ ownKeys$4(Object(source)).forEach(function(key) {
7546
7673
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
7547
7674
  });
7548
7675
  }
@@ -7826,7 +7953,7 @@
7826
7953
  method: "POST",
7827
7954
  mode: this.settings.fetchMode,
7828
7955
  body: body,
7829
- headers: _object_spread_props$3(_object_spread$d({}, this.settings.xhrHeaders), {
7956
+ headers: _object_spread_props$4(_object_spread$d({}, this.settings.xhrHeaders), {
7830
7957
  "Content-Type": contentType
7831
7958
  }),
7832
7959
  keepalive: true
@@ -9227,7 +9354,7 @@
9227
9354
  }
9228
9355
  return target;
9229
9356
  }
9230
- function ownKeys$2(object, enumerableOnly) {
9357
+ function ownKeys$3(object, enumerableOnly) {
9231
9358
  var keys = Object.keys(object);
9232
9359
  if (Object.getOwnPropertySymbols) {
9233
9360
  var symbols = Object.getOwnPropertySymbols(object);
@@ -9235,12 +9362,12 @@
9235
9362
  }
9236
9363
  return keys;
9237
9364
  }
9238
- function _object_spread_props$2(target, source) {
9365
+ function _object_spread_props$3(target, source) {
9239
9366
  source = source != null ? source : {};
9240
9367
  if (Object.getOwnPropertyDescriptors) {
9241
9368
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
9242
9369
  } else {
9243
- ownKeys$2(Object(source)).forEach(function(key) {
9370
+ ownKeys$3(Object(source)).forEach(function(key) {
9244
9371
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
9245
9372
  });
9246
9373
  }
@@ -9713,7 +9840,7 @@
9713
9840
  method: "POST",
9714
9841
  mode: this.settings.fetchMode,
9715
9842
  body: JSON.stringify(processedData),
9716
- headers: _object_spread_props$2(_object_spread$c({}, this.settings.xhrHeaders), {
9843
+ headers: _object_spread_props$3(_object_spread$c({}, this.settings.xhrHeaders), {
9717
9844
  "Content-Type": this.settings.commitRequestDataType
9718
9845
  })
9719
9846
  };
@@ -9902,6 +10029,10 @@
9902
10029
  function(CMIElement, value, regexPattern, errorCode, _errorClass, allowEmptyString) {
9903
10030
  var valueKey = typeof value === "string" ? value : "[".concat(typeof value === "undefined" ? "undefined" : _type_of$T(value), "]");
9904
10031
  return "".concat(CMIElement, ":").concat(valueKey, ":").concat(regexPattern, ":").concat(errorCode, ":").concat(allowEmptyString || false);
10032
+ }, // Normal capped CMI values and regexes fit within 2000 characters; large uncapped values bypass caching.
10033
+ {
10034
+ maxEntries: 1e3,
10035
+ maxKeyLength: 2e3
9905
10036
  });
9906
10037
  var checkValidRange = memoize(function(CMIElement, value, rangePattern, errorCode, errorClass) {
9907
10038
  var ranges = rangePattern.split("#");
@@ -9924,6 +10055,8 @@
9924
10055
  // since it can't be stringified and doesn't affect the validation result
9925
10056
  function(CMIElement, value, rangePattern, errorCode, _errorClass) {
9926
10057
  return "".concat(CMIElement, ":").concat(value, ":").concat(rangePattern, ":").concat(errorCode);
10058
+ }, {
10059
+ maxEntries: 1e3
9927
10060
  });
9928
10061
 
9929
10062
  function check2004ValidFormat(CMIElement, value, regexPattern, allowEmptyString) {
@@ -10592,13 +10725,13 @@
10592
10725
  return RollupRules;
10593
10726
  }(BaseCMI);
10594
10727
 
10595
- function _array_like_to_array$e(arr, len) {
10728
+ function _array_like_to_array$f(arr, len) {
10596
10729
  if (len == null || len > arr.length) len = arr.length;
10597
10730
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
10598
10731
  return arr2;
10599
10732
  }
10600
- function _array_without_holes$8(arr) {
10601
- if (Array.isArray(arr)) return _array_like_to_array$e(arr);
10733
+ function _array_without_holes$9(arr) {
10734
+ if (Array.isArray(arr)) return _array_like_to_array$f(arr);
10602
10735
  }
10603
10736
  function _assert_this_initialized$q(self) {
10604
10737
  if (self === void 0) {
@@ -10685,10 +10818,10 @@
10685
10818
  return left instanceof right;
10686
10819
  }
10687
10820
  }
10688
- function _iterable_to_array$8(iter) {
10821
+ function _iterable_to_array$9(iter) {
10689
10822
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
10690
10823
  }
10691
- function _non_iterable_spread$8() {
10824
+ function _non_iterable_spread$9() {
10692
10825
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10693
10826
  }
10694
10827
  function _object_spread$b(target) {
@@ -10726,20 +10859,20 @@
10726
10859
  }
10727
10860
  return object;
10728
10861
  }
10729
- function _to_consumable_array$8(arr) {
10730
- return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$8();
10862
+ function _to_consumable_array$9(arr) {
10863
+ return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$9();
10731
10864
  }
10732
10865
  function _type_of$R(obj) {
10733
10866
  "@swc/helpers - typeof";
10734
10867
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
10735
10868
  }
10736
- function _unsupported_iterable_to_array$e(o, minLen) {
10869
+ function _unsupported_iterable_to_array$f(o, minLen) {
10737
10870
  if (!o) return;
10738
- if (typeof o === "string") return _array_like_to_array$e(o, minLen);
10871
+ if (typeof o === "string") return _array_like_to_array$f(o, minLen);
10739
10872
  var n = Object.prototype.toString.call(o).slice(8, -1);
10740
10873
  if (n === "Object" && o.constructor) n = o.constructor.name;
10741
10874
  if (n === "Map" || n === "Set") return Array.from(n);
10742
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
10875
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
10743
10876
  }
10744
10877
  function _is_native_reflect_construct$q() {
10745
10878
  try {
@@ -10778,6 +10911,12 @@
10778
10911
  // objectives. It serves as a validity gate for other synced properties.
10779
10912
  __publicField$R(this, "_measureStatus", false);
10780
10913
  __publicField$R(this, "_normalizedMeasure", 0);
10914
+ __publicField$R(this, "_rawScore", "");
10915
+ __publicField$R(this, "_rawScoreKnown", false);
10916
+ __publicField$R(this, "_minScore", "");
10917
+ __publicField$R(this, "_minScoreKnown", false);
10918
+ __publicField$R(this, "_maxScore", "");
10919
+ __publicField$R(this, "_maxScoreKnown", false);
10781
10920
  __publicField$R(this, "_progressMeasure", 0);
10782
10921
  __publicField$R(this, "_progressMeasureStatus", false);
10783
10922
  __publicField$R(this, "_completionStatus", CompletionStatus.UNKNOWN);
@@ -10787,11 +10926,14 @@
10787
10926
  __publicField$R(this, "_normalizedMeasureDirty", false);
10788
10927
  __publicField$R(this, "_completionStatusDirty", false);
10789
10928
  __publicField$R(this, "_progressMeasureDirty", false);
10929
+ __publicField$R(this, "_rawScoreDirty", false);
10930
+ __publicField$R(this, "_minScoreDirty", false);
10931
+ __publicField$R(this, "_maxScoreDirty", false);
10790
10932
  this._id = id;
10791
10933
  this._description = (_options_description = options.description) !== null && _options_description !== void 0 ? _options_description : null;
10792
10934
  this._satisfiedByMeasure = (_options_satisfiedByMeasure = options.satisfiedByMeasure) !== null && _options_satisfiedByMeasure !== void 0 ? _options_satisfiedByMeasure : false;
10793
10935
  this._minNormalizedMeasure = (_options_minNormalizedMeasure = options.minNormalizedMeasure) !== null && _options_minNormalizedMeasure !== void 0 ? _options_minNormalizedMeasure : null;
10794
- this._mapInfo = options.mapInfo ? _to_consumable_array$8(options.mapInfo) : [];
10936
+ this._mapInfo = options.mapInfo ? _to_consumable_array$9(options.mapInfo) : [];
10795
10937
  this._isPrimary = (_options_isPrimary = options.isPrimary) !== null && _options_isPrimary !== void 0 ? _options_isPrimary : false;
10796
10938
  }
10797
10939
  _create_class$V(ActivityObjective, [
@@ -10831,7 +10973,7 @@
10831
10973
  return this._mapInfo;
10832
10974
  },
10833
10975
  set: function set(mapInfo) {
10834
- this._mapInfo = _to_consumable_array$8(mapInfo);
10976
+ this._mapInfo = _to_consumable_array$9(mapInfo);
10835
10977
  }
10836
10978
  },
10837
10979
  {
@@ -10852,6 +10994,8 @@
10852
10994
  if (this._satisfiedStatus !== value) {
10853
10995
  this._satisfiedStatus = value;
10854
10996
  this._satisfiedStatusDirty = true;
10997
+ this._satisfiedStatusKnown = true;
10998
+ this._progressStatus = true;
10855
10999
  }
10856
11000
  }
10857
11001
  },
@@ -10885,6 +11029,120 @@
10885
11029
  }
10886
11030
  }
10887
11031
  },
11032
+ {
11033
+ key: "rawScore",
11034
+ get: /**
11035
+ * Return the known raw score value held for ADLSEQ objective score mapping.
11036
+ *
11037
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw score mapInfo
11038
+ */ function get() {
11039
+ return this._rawScore;
11040
+ },
11041
+ set: /**
11042
+ * Store the RTE raw score associated with this objective.
11043
+ *
11044
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 / ADLSEQ objectives extension - raw score mapInfo
11045
+ */ function set(value) {
11046
+ if (this._rawScore !== value) {
11047
+ this._rawScore = value;
11048
+ this._rawScoreDirty = true;
11049
+ }
11050
+ this._rawScoreKnown = value !== "";
11051
+ }
11052
+ },
11053
+ {
11054
+ key: "rawScoreKnown",
11055
+ get: /**
11056
+ * Return whether this objective's raw score is known.
11057
+ *
11058
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw score known state
11059
+ */ function get() {
11060
+ return this._rawScoreKnown;
11061
+ },
11062
+ set: /**
11063
+ * Set whether this objective's raw score is known.
11064
+ *
11065
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw score known state
11066
+ */ function set(value) {
11067
+ this._rawScoreKnown = value;
11068
+ }
11069
+ },
11070
+ {
11071
+ key: "minScore",
11072
+ get: /**
11073
+ * Return the known minimum score value held for ADLSEQ objective score mapping.
11074
+ *
11075
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - min score mapInfo
11076
+ */ function get() {
11077
+ return this._minScore;
11078
+ },
11079
+ set: /**
11080
+ * Store the RTE minimum score associated with this objective.
11081
+ *
11082
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 / ADLSEQ objectives extension - min score mapInfo
11083
+ */ function set(value) {
11084
+ if (this._minScore !== value) {
11085
+ this._minScore = value;
11086
+ this._minScoreDirty = true;
11087
+ }
11088
+ this._minScoreKnown = value !== "";
11089
+ }
11090
+ },
11091
+ {
11092
+ key: "minScoreKnown",
11093
+ get: /**
11094
+ * Return whether this objective's minimum score is known.
11095
+ *
11096
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - min score known state
11097
+ */ function get() {
11098
+ return this._minScoreKnown;
11099
+ },
11100
+ set: /**
11101
+ * Set whether this objective's minimum score is known.
11102
+ *
11103
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - min score known state
11104
+ */ function set(value) {
11105
+ this._minScoreKnown = value;
11106
+ }
11107
+ },
11108
+ {
11109
+ key: "maxScore",
11110
+ get: /**
11111
+ * Return the known maximum score value held for ADLSEQ objective score mapping.
11112
+ *
11113
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - max score mapInfo
11114
+ */ function get() {
11115
+ return this._maxScore;
11116
+ },
11117
+ set: /**
11118
+ * Store the RTE maximum score associated with this objective.
11119
+ *
11120
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 / ADLSEQ objectives extension - max score mapInfo
11121
+ */ function set(value) {
11122
+ if (this._maxScore !== value) {
11123
+ this._maxScore = value;
11124
+ this._maxScoreDirty = true;
11125
+ }
11126
+ this._maxScoreKnown = value !== "";
11127
+ }
11128
+ },
11129
+ {
11130
+ key: "maxScoreKnown",
11131
+ get: /**
11132
+ * Return whether this objective's maximum score is known.
11133
+ *
11134
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - max score known state
11135
+ */ function get() {
11136
+ return this._maxScoreKnown;
11137
+ },
11138
+ set: /**
11139
+ * Set whether this objective's maximum score is known.
11140
+ *
11141
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - max score known state
11142
+ */ function set(value) {
11143
+ this._maxScoreKnown = value;
11144
+ }
11145
+ },
10888
11146
  {
10889
11147
  key: "progressMeasure",
10890
11148
  get: function get() {
@@ -10928,7 +11186,11 @@
10928
11186
  }
10929
11187
  },
10930
11188
  {
10931
- key: "isDirty",
11189
+ /**
11190
+ * Report whether a local objective field has changed since the last global write.
11191
+ *
11192
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 / ADLSEQ objectives extension - write maps use known local objective data
11193
+ */ key: "isDirty",
10932
11194
  value: function isDirty(property) {
10933
11195
  switch(property){
10934
11196
  case "satisfiedStatus":
@@ -10939,11 +11201,21 @@
10939
11201
  return this._completionStatusDirty;
10940
11202
  case "progressMeasure":
10941
11203
  return this._progressMeasureDirty;
11204
+ case "rawScore":
11205
+ return this._rawScoreDirty;
11206
+ case "minScore":
11207
+ return this._minScoreDirty;
11208
+ case "maxScore":
11209
+ return this._maxScoreDirty;
10942
11210
  }
10943
11211
  }
10944
11212
  },
10945
11213
  {
10946
- key: "clearDirty",
11214
+ /**
11215
+ * Clear a local objective dirty flag after a successful global write.
11216
+ *
11217
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 / ADLSEQ objectives extension - write maps update global objective state
11218
+ */ key: "clearDirty",
10947
11219
  value: function clearDirty(property) {
10948
11220
  switch(property){
10949
11221
  case "satisfiedStatus":
@@ -10958,16 +11230,33 @@
10958
11230
  case "progressMeasure":
10959
11231
  this._progressMeasureDirty = false;
10960
11232
  break;
11233
+ case "rawScore":
11234
+ this._rawScoreDirty = false;
11235
+ break;
11236
+ case "minScore":
11237
+ this._minScoreDirty = false;
11238
+ break;
11239
+ case "maxScore":
11240
+ this._maxScoreDirty = false;
11241
+ break;
10961
11242
  }
10962
11243
  }
10963
11244
  },
10964
11245
  {
10965
- key: "clearAllDirty",
11246
+ /**
11247
+ * Clear all write-map dirty flags for this objective.
11248
+ *
11249
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - objective mapInfo writes are field-specific
11250
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - score mapInfo writes are field-specific
11251
+ */ key: "clearAllDirty",
10966
11252
  value: function clearAllDirty() {
10967
11253
  this._satisfiedStatusDirty = false;
10968
11254
  this._normalizedMeasureDirty = false;
10969
11255
  this._completionStatusDirty = false;
10970
11256
  this._progressMeasureDirty = false;
11257
+ this._rawScoreDirty = false;
11258
+ this._minScoreDirty = false;
11259
+ this._maxScoreDirty = false;
10971
11260
  }
10972
11261
  },
10973
11262
  {
@@ -10979,6 +11268,8 @@
10979
11268
  * @param satisfiedStatus - The satisfied status from CMI
10980
11269
  * @param normalizedMeasure - The normalized measure from CMI
10981
11270
  * @param measureStatus - Whether measure is valid
11271
+ *
11272
+ * @spec SCORM 2004 4th Ed. RTE-to-SN Data Transfer - objective satisfaction and measure transfer
10982
11273
  */ key: "initializeFromCMI",
10983
11274
  value: function initializeFromCMI(satisfiedStatus, normalizedMeasure, measureStatus) {
10984
11275
  this._satisfiedStatus = satisfiedStatus;
@@ -10989,12 +11280,86 @@
10989
11280
  }
10990
11281
  },
10991
11282
  {
10992
- key: "resetState",
11283
+ /**
11284
+ * Initialize raw/min/max objective score values from RTE data transfer.
11285
+ *
11286
+ * @spec SCORM 2004 4th Ed. RTE-to-SN Data Transfer - objective score transfer
11287
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score mapInfo writes
11288
+ */ key: "initializeScoreFromCMI",
11289
+ value: function initializeScoreFromCMI(score) {
11290
+ if (score.rawScore !== void 0 && score.rawScore !== "") {
11291
+ this._rawScore = score.rawScore;
11292
+ this._rawScoreKnown = true;
11293
+ this._rawScoreDirty = true;
11294
+ }
11295
+ if (score.minScore !== void 0 && score.minScore !== "") {
11296
+ this._minScore = score.minScore;
11297
+ this._minScoreKnown = true;
11298
+ this._minScoreDirty = true;
11299
+ }
11300
+ if (score.maxScore !== void 0 && score.maxScore !== "") {
11301
+ this._maxScore = score.maxScore;
11302
+ this._maxScoreKnown = true;
11303
+ this._maxScoreDirty = true;
11304
+ }
11305
+ }
11306
+ },
11307
+ {
11308
+ /**
11309
+ * Apply read-mapped global objective state without marking the values dirty.
11310
+ *
11311
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - read maps provide access to global objective state
11312
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - score read maps are access-only
11313
+ */ key: "applyReadMappedState",
11314
+ value: function applyReadMappedState(state) {
11315
+ if (state.satisfiedStatus !== void 0) {
11316
+ this._satisfiedStatus = state.satisfiedStatus;
11317
+ this._satisfiedStatusKnown = true;
11318
+ this._progressStatus = true;
11319
+ }
11320
+ if (state.normalizedMeasure !== void 0) {
11321
+ this._normalizedMeasure = state.normalizedMeasure;
11322
+ this._measureStatus = true;
11323
+ }
11324
+ if (state.completionStatus !== void 0) {
11325
+ this._completionStatus = state.completionStatus;
11326
+ }
11327
+ if (state.progressMeasure !== void 0) {
11328
+ this._progressMeasure = state.progressMeasure;
11329
+ this._progressMeasureStatus = true;
11330
+ }
11331
+ if (state.rawScore !== void 0) {
11332
+ this._rawScore = state.rawScore;
11333
+ this._rawScoreKnown = true;
11334
+ }
11335
+ if (state.minScore !== void 0) {
11336
+ this._minScore = state.minScore;
11337
+ this._minScoreKnown = true;
11338
+ }
11339
+ if (state.maxScore !== void 0) {
11340
+ this._maxScore = state.maxScore;
11341
+ this._maxScoreKnown = true;
11342
+ }
11343
+ }
11344
+ },
11345
+ {
11346
+ /**
11347
+ * Reset local objective state for a fresh activity attempt.
11348
+ *
11349
+ * @spec SCORM 2004 4th Ed. SN 3.10 Objective Description - unknown objective state before tracking data exists
11350
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - score map fields are unknown until transferred or read
11351
+ */ key: "resetState",
10993
11352
  value: function resetState() {
10994
11353
  this._satisfiedStatus = false;
10995
11354
  this._satisfiedStatusKnown = false;
10996
11355
  this._measureStatus = false;
10997
11356
  this._normalizedMeasure = 0;
11357
+ this._rawScore = "";
11358
+ this._rawScoreKnown = false;
11359
+ this._minScore = "";
11360
+ this._minScoreKnown = false;
11361
+ this._maxScore = "";
11362
+ this._maxScoreKnown = false;
10998
11363
  this._progressMeasure = 0;
10999
11364
  this._progressMeasureStatus = false;
11000
11365
  this._completionStatus = CompletionStatus.UNKNOWN;
@@ -11003,7 +11368,11 @@
11003
11368
  }
11004
11369
  },
11005
11370
  {
11006
- key: "updateFromActivity",
11371
+ /**
11372
+ * Copy primary activity objective state back into the primary objective model.
11373
+ *
11374
+ * @spec SCORM 2004 4th Ed. RTE-to-SN Data Transfer - primary objective state is available to sequencing
11375
+ */ key: "updateFromActivity",
11007
11376
  value: function updateFromActivity(activity) {
11008
11377
  if (this._satisfiedStatus !== activity.objectiveSatisfiedStatus) {
11009
11378
  this._satisfiedStatus = activity.objectiveSatisfiedStatus;
@@ -11027,12 +11396,16 @@
11027
11396
  }
11028
11397
  },
11029
11398
  {
11030
- key: "applyToActivity",
11399
+ /**
11400
+ * Apply primary objective state to the owning activity for sequencing rules and rollup.
11401
+ *
11402
+ * @spec SCORM 2004 4th Ed. SN 3.10 Objective Description - primary objective contributes activity state
11403
+ */ key: "applyToActivity",
11031
11404
  value: function applyToActivity(activity) {
11032
11405
  if (!this._isPrimary) {
11033
11406
  return;
11034
11407
  }
11035
- activity.setPrimaryObjectiveState(this._satisfiedStatus, this._measureStatus, this._normalizedMeasure, this._progressMeasure, this._progressMeasureStatus, this._completionStatus);
11408
+ activity.setPrimaryObjectiveState(this._satisfiedStatus, this._measureStatus, this._normalizedMeasure, this._progressMeasure, this._progressMeasureStatus, this._completionStatus, this._progressStatus || this._satisfiedStatusKnown);
11036
11409
  }
11037
11410
  }
11038
11411
  ]);
@@ -11384,7 +11757,7 @@
11384
11757
  (_this__children = this._children).splice.apply(_this__children, [
11385
11758
  0,
11386
11759
  this._children.length
11387
- ].concat(_to_consumable_array$8(reordered)));
11760
+ ].concat(_to_consumable_array$9(reordered)));
11388
11761
  }
11389
11762
  }
11390
11763
  },
@@ -12269,7 +12642,7 @@
12269
12642
  set: /**
12270
12643
  * Setter for primary objective
12271
12644
  * @param {ActivityObjective | null} objective
12272
- */ function set(objective) {
12645
+ */ function set(objective) {
12273
12646
  this._primaryObjective = objective;
12274
12647
  if (this._primaryObjective) {
12275
12648
  this._primaryObjective.isPrimary = true;
@@ -12297,8 +12670,8 @@
12297
12670
  set: /**
12298
12671
  * Replace objectives collection
12299
12672
  * @param {ActivityObjective[]} objectives
12300
- */ function set(objectives) {
12301
- this._objectives = _to_consumable_array$8(objectives);
12673
+ */ function set(objectives) {
12674
+ this._objectives = _to_consumable_array$9(objectives);
12302
12675
  this.syncPrimaryObjectiveCollection();
12303
12676
  }
12304
12677
  },
@@ -12337,7 +12710,7 @@
12337
12710
  }
12338
12711
  this._objectives = [
12339
12712
  this._primaryObjective
12340
- ].concat(_to_consumable_array$8(this._objectives));
12713
+ ].concat(_to_consumable_array$9(this._objectives));
12341
12714
  }
12342
12715
  },
12343
12716
  {
@@ -12432,11 +12805,12 @@
12432
12805
  {
12433
12806
  key: "setPrimaryObjectiveState",
12434
12807
  value: function setPrimaryObjectiveState(satisfiedStatus, measureStatus, normalizedMeasure, progressMeasure, progressMeasureStatus, completionStatus) {
12808
+ var objectiveProgressStatus = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : true;
12435
12809
  if (this._objectiveSatisfiedStatus !== satisfiedStatus) {
12436
12810
  this._objectiveSatisfiedStatus = satisfiedStatus;
12437
12811
  this._objectiveSatisfiedStatusDirty = true;
12438
12812
  }
12439
- this._objectiveSatisfiedStatusKnown = true;
12813
+ this._objectiveSatisfiedStatusKnown = objectiveProgressStatus;
12440
12814
  if (this._objectiveMeasureStatus !== measureStatus) {
12441
12815
  this._objectiveMeasureStatus = measureStatus;
12442
12816
  this._objectiveMeasureStatusDirty = true;
@@ -12455,11 +12829,18 @@
12455
12829
  this._primaryObjective.progressMeasure = progressMeasure;
12456
12830
  this._primaryObjective.progressMeasureStatus = progressMeasureStatus;
12457
12831
  this._primaryObjective.completionStatus = completionStatus;
12832
+ this._primaryObjective.satisfiedStatusKnown = objectiveProgressStatus;
12833
+ this._primaryObjective.progressStatus = objectiveProgressStatus;
12458
12834
  }
12459
12835
  }
12460
12836
  },
12461
12837
  {
12462
- key: "getObjectiveStateSnapshot",
12838
+ /**
12839
+ * Snapshot objective state for sequencing persistence.
12840
+ *
12841
+ * @spec SCORM 2004 4th Ed. SN 3.10 Objective Description - objective state persists across attempts
12842
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - score-map state persists with objective state
12843
+ */ key: "getObjectiveStateSnapshot",
12463
12844
  value: function getObjectiveStateSnapshot() {
12464
12845
  var _this_progressMeasure;
12465
12846
  var primarySnapshot = this._primaryObjective ? {
@@ -12467,6 +12848,12 @@
12467
12848
  satisfiedStatus: this.objectiveSatisfiedStatus,
12468
12849
  measureStatus: this.objectiveMeasureStatus,
12469
12850
  normalizedMeasure: this.objectiveNormalizedMeasure,
12851
+ rawScore: this._primaryObjective.rawScore,
12852
+ rawScoreKnown: this._primaryObjective.rawScoreKnown,
12853
+ minScore: this._primaryObjective.minScore,
12854
+ minScoreKnown: this._primaryObjective.minScoreKnown,
12855
+ maxScore: this._primaryObjective.maxScore,
12856
+ maxScoreKnown: this._primaryObjective.maxScoreKnown,
12470
12857
  progressMeasure: (_this_progressMeasure = this.progressMeasure) !== null && _this_progressMeasure !== void 0 ? _this_progressMeasure : 0,
12471
12858
  progressMeasureStatus: this.progressMeasureStatus,
12472
12859
  progressStatus: this._primaryObjective.progressStatus,
@@ -12480,6 +12867,12 @@
12480
12867
  satisfiedStatus: objective.satisfiedStatus,
12481
12868
  measureStatus: objective.measureStatus,
12482
12869
  normalizedMeasure: objective.normalizedMeasure,
12870
+ rawScore: objective.rawScore,
12871
+ rawScoreKnown: objective.rawScoreKnown,
12872
+ minScore: objective.minScore,
12873
+ minScoreKnown: objective.minScoreKnown,
12874
+ maxScore: objective.maxScore,
12875
+ maxScoreKnown: objective.maxScoreKnown,
12483
12876
  progressMeasure: objective.progressMeasure,
12484
12877
  progressMeasureStatus: objective.progressMeasureStatus,
12485
12878
  progressStatus: objective.progressStatus,
@@ -12495,7 +12888,12 @@
12495
12888
  }
12496
12889
  },
12497
12890
  {
12498
- key: "applyObjectiveStateSnapshot",
12891
+ /**
12892
+ * Restore objective state from a sequencing persistence snapshot.
12893
+ *
12894
+ * @spec SCORM 2004 4th Ed. SN 3.10 Objective Description - persisted objective state restores sequencing state
12895
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - persisted score-map state restores objective score fields
12896
+ */ key: "applyObjectiveStateSnapshot",
12499
12897
  value: function applyObjectiveStateSnapshot(snapshot) {
12500
12898
  if (snapshot.primary) {
12501
12899
  var primary = this.getObjectiveById(snapshot.primary.id);
@@ -12504,7 +12902,8 @@
12504
12902
  var state = snapshot.primary;
12505
12903
  primary.objective.satisfiedByMeasure = (_state_satisfiedByMeasure = state.satisfiedByMeasure) !== null && _state_satisfiedByMeasure !== void 0 ? _state_satisfiedByMeasure : primary.objective.satisfiedByMeasure;
12506
12904
  primary.objective.minNormalizedMeasure = state.minNormalizedMeasure !== void 0 ? state.minNormalizedMeasure : primary.objective.minNormalizedMeasure;
12507
- this.setPrimaryObjectiveState(state.satisfiedStatus, state.measureStatus, state.normalizedMeasure, state.progressMeasure, state.progressMeasureStatus, state.completionStatus);
12905
+ this.setPrimaryObjectiveState(state.satisfiedStatus, state.measureStatus, state.normalizedMeasure, state.progressMeasure, state.progressMeasureStatus, state.completionStatus, state.progressStatus);
12906
+ this.applyObjectiveScoreSnapshot(primary.objective, state);
12508
12907
  }
12509
12908
  }
12510
12909
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -12521,6 +12920,7 @@
12521
12920
  objective.progressMeasure = state1.progressMeasure;
12522
12921
  objective.progressMeasureStatus = state1.progressMeasureStatus;
12523
12922
  objective.completionStatus = state1.completionStatus;
12923
+ this.applyObjectiveScoreSnapshot(objective, state1);
12524
12924
  objective.satisfiedByMeasure = (_state_satisfiedByMeasure1 = state1.satisfiedByMeasure) !== null && _state_satisfiedByMeasure1 !== void 0 ? _state_satisfiedByMeasure1 : objective.satisfiedByMeasure;
12525
12925
  objective.minNormalizedMeasure = state1.minNormalizedMeasure !== void 0 ? state1.minNormalizedMeasure : objective.minNormalizedMeasure;
12526
12926
  }
@@ -12543,6 +12943,26 @@
12543
12943
  },
12544
12944
  {
12545
12945
  /**
12946
+ * Restore known raw/min/max score fields from an objective state snapshot.
12947
+ *
12948
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score known flags restore independently
12949
+ */ key: "applyObjectiveScoreSnapshot",
12950
+ value: function applyObjectiveScoreSnapshot(objective, state) {
12951
+ var scoreState = {};
12952
+ if (state.rawScoreKnown) {
12953
+ scoreState.rawScore = state.rawScore;
12954
+ }
12955
+ if (state.minScoreKnown) {
12956
+ scoreState.minScore = state.minScore;
12957
+ }
12958
+ if (state.maxScoreKnown) {
12959
+ scoreState.maxScore = state.maxScore;
12960
+ }
12961
+ objective.applyReadMappedState(scoreState);
12962
+ }
12963
+ },
12964
+ {
12965
+ /**
12546
12966
  * Get available children with selection and randomization applied
12547
12967
  * @return {Activity[]}
12548
12968
  */ key: "getAvailableChildren",
@@ -12903,7 +13323,7 @@
12903
13323
  minProgressMeasure: this._minProgressMeasure,
12904
13324
  progressWeight: this._progressWeight,
12905
13325
  attemptCompletionAmountStatus: this._attemptCompletionAmountStatus,
12906
- hideLmsUi: _to_consumable_array$8(this._hideLmsUi),
13326
+ hideLmsUi: _to_consumable_array$9(this._hideLmsUi),
12907
13327
  auxiliaryResources: this._auxiliaryResources.map(function(resource) {
12908
13328
  return _object_spread$b({}, resource);
12909
13329
  }),
@@ -12961,7 +13381,7 @@
12961
13381
  {
12962
13382
  key: "addAuxiliaryResource",
12963
13383
  value: function addAuxiliaryResource(resource) {
12964
- this.auxiliaryResources = _to_consumable_array$8(this._auxiliaryResources).concat([
13384
+ this.auxiliaryResources = _to_consumable_array$9(this._auxiliaryResources).concat([
12965
13385
  resource
12966
13386
  ]);
12967
13387
  }
@@ -12989,7 +13409,7 @@
12989
13409
  * Getter for hideLmsUi directives
12990
13410
  * @return {HideLmsUiItem[]}
12991
13411
  */ function get() {
12992
- return _to_consumable_array$8(this._hideLmsUi);
13412
+ return _to_consumable_array$9(this._hideLmsUi);
12993
13413
  },
12994
13414
  set: /**
12995
13415
  * Setter for hideLmsUi directives
@@ -14542,6 +14962,7 @@
14542
14962
  }
14543
14963
  function _create_class$N(Constructor, protoProps, staticProps) {
14544
14964
  if (protoProps) _defineProperties$N(Constructor.prototype, protoProps);
14965
+ if (staticProps) _defineProperties$N(Constructor, staticProps);
14545
14966
  return Constructor;
14546
14967
  }
14547
14968
  function _instanceof$9(left, right) {
@@ -14689,8 +15110,14 @@
14689
15110
  *
14690
15111
  * @param activity - The activity to process
14691
15112
  * @param globalObjectives - Global objective map
15113
+ *
15114
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - write mapInfo transfers local objective state to global objectives
15115
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score write maps
14692
15116
  */ key: "syncGlobalObjectivesWritePhase",
14693
15117
  value: function syncGlobalObjectivesWritePhase(activity, globalObjectives) {
15118
+ if (!this.canWriteGlobalObjectives(activity)) {
15119
+ return;
15120
+ }
14694
15121
  var objectives = activity.getAllObjectives();
14695
15122
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
14696
15123
  try {
@@ -14699,38 +15126,54 @@
14699
15126
  var mapInfos = objective.mapInfo.length > 0 ? objective.mapInfo : [
14700
15127
  this.createDefaultMapInfo(objective)
14701
15128
  ];
15129
+ var dirtyFieldsToClear = /* @__PURE__ */ new Set();
14702
15130
  var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
14703
15131
  try {
14704
15132
  for(var _iterator1 = mapInfos[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
14705
15133
  var mapInfo = _step1.value;
14706
15134
  var targetId = mapInfo.targetObjectiveID || objective.id;
14707
15135
  var globalObjective = this.ensureGlobalObjectiveEntry(globalObjectives, targetId, objective);
14708
- if (mapInfo.writeSatisfiedStatus && objective.measureStatus && objective.isDirty("satisfiedStatus")) {
15136
+ if (mapInfo.writeSatisfiedStatus && this.hasKnownSatisfiedStatus(objective) && objective.isDirty("satisfiedStatus")) {
14709
15137
  globalObjective.satisfiedStatus = objective.satisfiedStatus;
14710
15138
  globalObjective.satisfiedStatusKnown = true;
14711
- objective.clearDirty("satisfiedStatus");
15139
+ dirtyFieldsToClear.add("satisfiedStatus");
14712
15140
  }
14713
15141
  if (mapInfo.writeNormalizedMeasure && objective.measureStatus && objective.isDirty("normalizedMeasure")) {
14714
15142
  globalObjective.normalizedMeasure = objective.normalizedMeasure;
14715
15143
  globalObjective.normalizedMeasureKnown = true;
14716
- objective.clearDirty("normalizedMeasure");
14717
- if (globalObjective.satisfiedByMeasure || objective.satisfiedByMeasure) {
15144
+ dirtyFieldsToClear.add("normalizedMeasure");
15145
+ if (mapInfo.writeSatisfiedStatus && objective.satisfiedByMeasure) {
14718
15146
  var _ref, _objective_minNormalizedMeasure;
14719
15147
  var threshold = (_ref = (_objective_minNormalizedMeasure = objective.minNormalizedMeasure) !== null && _objective_minNormalizedMeasure !== void 0 ? _objective_minNormalizedMeasure : activity.scaledPassingScore) !== null && _ref !== void 0 ? _ref : 0.7;
14720
15148
  globalObjective.satisfiedStatus = objective.normalizedMeasure >= threshold;
14721
15149
  globalObjective.satisfiedStatusKnown = true;
14722
- objective.clearDirty("satisfiedStatus");
15150
+ dirtyFieldsToClear.add("satisfiedStatus");
14723
15151
  }
14724
15152
  }
14725
15153
  if (mapInfo.writeCompletionStatus && objective.completionStatus !== CompletionStatus.UNKNOWN && objective.isDirty("completionStatus")) {
14726
15154
  globalObjective.completionStatus = objective.completionStatus;
14727
15155
  globalObjective.completionStatusKnown = true;
14728
- objective.clearDirty("completionStatus");
15156
+ dirtyFieldsToClear.add("completionStatus");
15157
+ }
15158
+ if (mapInfo.writeRawScore && objective.rawScoreKnown && objective.isDirty("rawScore")) {
15159
+ globalObjective.rawScore = objective.rawScore;
15160
+ globalObjective.rawScoreKnown = true;
15161
+ dirtyFieldsToClear.add("rawScore");
15162
+ }
15163
+ if (mapInfo.writeMinScore && objective.minScoreKnown && objective.isDirty("minScore")) {
15164
+ globalObjective.minScore = objective.minScore;
15165
+ globalObjective.minScoreKnown = true;
15166
+ dirtyFieldsToClear.add("minScore");
15167
+ }
15168
+ if (mapInfo.writeMaxScore && objective.maxScoreKnown && objective.isDirty("maxScore")) {
15169
+ globalObjective.maxScore = objective.maxScore;
15170
+ globalObjective.maxScoreKnown = true;
15171
+ dirtyFieldsToClear.add("maxScore");
14729
15172
  }
14730
15173
  if (mapInfo.writeProgressMeasure && objective.progressMeasureStatus && objective.isDirty("progressMeasure")) {
14731
15174
  globalObjective.progressMeasure = objective.progressMeasure;
14732
15175
  globalObjective.progressMeasureKnown = true;
14733
- objective.clearDirty("progressMeasure");
15176
+ dirtyFieldsToClear.add("progressMeasure");
14734
15177
  }
14735
15178
  if (mapInfo.updateAttemptData) {
14736
15179
  this.updateActivityAttemptData(activity, globalObjective, objective);
@@ -14750,6 +15193,26 @@
14750
15193
  }
14751
15194
  }
14752
15195
  }
15196
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
15197
+ try {
15198
+ for(var _iterator2 = dirtyFieldsToClear[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
15199
+ var property = _step2.value;
15200
+ objective.clearDirty(property);
15201
+ }
15202
+ } catch (err) {
15203
+ _didIteratorError2 = true;
15204
+ _iteratorError2 = err;
15205
+ } finally{
15206
+ try {
15207
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
15208
+ _iterator2.return();
15209
+ }
15210
+ } finally{
15211
+ if (_didIteratorError2) {
15212
+ throw _iteratorError2;
15213
+ }
15214
+ }
15215
+ }
14753
15216
  }
14754
15217
  } catch (err) {
14755
15218
  _didIteratorError = true;
@@ -14773,6 +15236,9 @@
14773
15236
  *
14774
15237
  * @param activity - The activity to process
14775
15238
  * @param globalObjectives - Global objective map
15239
+ *
15240
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - read mapInfo transfers global objective state into the local view
15241
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score read maps
14776
15242
  */ key: "syncGlobalObjectivesReadPhase",
14777
15243
  value: function syncGlobalObjectivesReadPhase(activity, globalObjectives) {
14778
15244
  var objectives = activity.getAllObjectives();
@@ -14792,26 +15258,8 @@
14792
15258
  var globalObjective = globalObjectives.get(targetId);
14793
15259
  if (!globalObjective) continue;
14794
15260
  var isPrimary = objective.isPrimary;
14795
- if (mapInfo.readSatisfiedStatus && globalObjective.satisfiedStatusKnown) {
14796
- objective.satisfiedStatus = globalObjective.satisfiedStatus;
14797
- objective.measureStatus = true;
14798
- }
14799
- if (mapInfo.readNormalizedMeasure && globalObjective.normalizedMeasureKnown) {
14800
- objective.normalizedMeasure = globalObjective.normalizedMeasure;
14801
- objective.measureStatus = true;
14802
- if (globalObjective.satisfiedByMeasure || objective.satisfiedByMeasure) {
14803
- var _ref, _objective_minNormalizedMeasure;
14804
- var threshold = (_ref = (_objective_minNormalizedMeasure = objective.minNormalizedMeasure) !== null && _objective_minNormalizedMeasure !== void 0 ? _objective_minNormalizedMeasure : activity.scaledPassingScore) !== null && _ref !== void 0 ? _ref : 0.7;
14805
- objective.satisfiedStatus = globalObjective.normalizedMeasure >= threshold;
14806
- }
14807
- }
14808
- if (mapInfo.readProgressMeasure && globalObjective.progressMeasureKnown) {
14809
- objective.progressMeasure = globalObjective.progressMeasure;
14810
- objective.progressMeasureStatus = true;
14811
- }
14812
- if (mapInfo.readCompletionStatus && globalObjective.completionStatusKnown) {
14813
- objective.completionStatus = globalObjective.completionStatus;
14814
- }
15261
+ var readState = GlobalObjectiveSynchronizer.getGlobalObjectiveReadState(activity, objective, mapInfo, globalObjective);
15262
+ this.applyGlobalObjectiveReadState(objective, readState);
14815
15263
  if (isPrimary) {
14816
15264
  objective.applyToActivity(activity);
14817
15265
  }
@@ -14918,59 +15366,58 @@
14918
15366
  * @param objective - The objective to sync
14919
15367
  * @param mapInfo - Map info for this objective
14920
15368
  * @param globalObjective - The global objective
15369
+ *
15370
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - objective mapInfo read/write synchronization
15371
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - score mapInfo synchronization
14921
15372
  */ key: "syncObjectiveState",
14922
15373
  value: function syncObjectiveState(activity, objective, mapInfo, globalObjective) {
14923
15374
  try {
14924
15375
  var _this_eventCallback, _this;
14925
15376
  var isPrimary = objective.isPrimary;
14926
15377
  var localObjective = this.getLocalObjectiveState(activity, objective, isPrimary);
14927
- if (mapInfo.readSatisfiedStatus && globalObjective.satisfiedStatusKnown) {
14928
- objective.satisfiedStatus = globalObjective.satisfiedStatus;
14929
- objective.measureStatus = true;
14930
- }
14931
- if (mapInfo.readNormalizedMeasure && globalObjective.normalizedMeasureKnown) {
14932
- objective.normalizedMeasure = globalObjective.normalizedMeasure;
14933
- objective.measureStatus = true;
14934
- if (globalObjective.satisfiedByMeasure || objective.satisfiedByMeasure) {
14935
- var _ref, _objective_minNormalizedMeasure;
14936
- var threshold = (_ref = (_objective_minNormalizedMeasure = objective.minNormalizedMeasure) !== null && _objective_minNormalizedMeasure !== void 0 ? _objective_minNormalizedMeasure : activity.scaledPassingScore) !== null && _ref !== void 0 ? _ref : 0.7;
14937
- objective.satisfiedStatus = globalObjective.normalizedMeasure >= threshold;
14938
- }
14939
- }
14940
- if (mapInfo.readProgressMeasure && globalObjective.progressMeasureKnown) {
14941
- objective.progressMeasure = globalObjective.progressMeasure;
14942
- objective.progressMeasureStatus = true;
14943
- }
14944
- if (mapInfo.readCompletionStatus && globalObjective.completionStatusKnown) {
14945
- objective.completionStatus = globalObjective.completionStatus;
14946
- }
15378
+ var readState = GlobalObjectiveSynchronizer.getGlobalObjectiveReadState(activity, objective, mapInfo, globalObjective);
15379
+ this.applyGlobalObjectiveReadState(objective, readState);
14947
15380
  if (objective.isPrimary) {
14948
15381
  objective.applyToActivity(activity);
14949
15382
  }
14950
- if (mapInfo.writeSatisfiedStatus && objective.measureStatus) {
14951
- globalObjective.satisfiedStatus = objective.satisfiedStatus;
14952
- globalObjective.satisfiedStatusKnown = true;
14953
- }
14954
- if (mapInfo.writeNormalizedMeasure && objective.measureStatus) {
14955
- globalObjective.normalizedMeasure = objective.normalizedMeasure;
14956
- globalObjective.normalizedMeasureKnown = true;
14957
- if (globalObjective.satisfiedByMeasure || objective.satisfiedByMeasure) {
14958
- var _ref1, _objective_minNormalizedMeasure1;
14959
- var threshold1 = (_ref1 = (_objective_minNormalizedMeasure1 = objective.minNormalizedMeasure) !== null && _objective_minNormalizedMeasure1 !== void 0 ? _objective_minNormalizedMeasure1 : activity.scaledPassingScore) !== null && _ref1 !== void 0 ? _ref1 : 0.7;
14960
- globalObjective.satisfiedStatus = objective.normalizedMeasure >= threshold1;
15383
+ if (this.canWriteGlobalObjectives(activity)) {
15384
+ if (mapInfo.writeSatisfiedStatus && this.hasKnownSatisfiedStatus(objective)) {
15385
+ globalObjective.satisfiedStatus = objective.satisfiedStatus;
14961
15386
  globalObjective.satisfiedStatusKnown = true;
14962
15387
  }
14963
- }
14964
- if (mapInfo.writeCompletionStatus && objective.completionStatus !== CompletionStatus.UNKNOWN) {
14965
- globalObjective.completionStatus = objective.completionStatus;
14966
- globalObjective.completionStatusKnown = true;
14967
- }
14968
- if (mapInfo.writeProgressMeasure && objective.progressMeasureStatus) {
14969
- globalObjective.progressMeasure = objective.progressMeasure;
14970
- globalObjective.progressMeasureKnown = true;
14971
- }
14972
- if (mapInfo.updateAttemptData) {
14973
- this.updateActivityAttemptData(activity, globalObjective, objective);
15388
+ if (mapInfo.writeNormalizedMeasure && objective.measureStatus) {
15389
+ globalObjective.normalizedMeasure = objective.normalizedMeasure;
15390
+ globalObjective.normalizedMeasureKnown = true;
15391
+ if (mapInfo.writeSatisfiedStatus && objective.satisfiedByMeasure) {
15392
+ var _ref, _objective_minNormalizedMeasure;
15393
+ var threshold = (_ref = (_objective_minNormalizedMeasure = objective.minNormalizedMeasure) !== null && _objective_minNormalizedMeasure !== void 0 ? _objective_minNormalizedMeasure : activity.scaledPassingScore) !== null && _ref !== void 0 ? _ref : 0.7;
15394
+ globalObjective.satisfiedStatus = objective.normalizedMeasure >= threshold;
15395
+ globalObjective.satisfiedStatusKnown = true;
15396
+ }
15397
+ }
15398
+ if (mapInfo.writeCompletionStatus && objective.completionStatus !== CompletionStatus.UNKNOWN) {
15399
+ globalObjective.completionStatus = objective.completionStatus;
15400
+ globalObjective.completionStatusKnown = true;
15401
+ }
15402
+ if (mapInfo.writeRawScore && objective.rawScoreKnown) {
15403
+ globalObjective.rawScore = objective.rawScore;
15404
+ globalObjective.rawScoreKnown = true;
15405
+ }
15406
+ if (mapInfo.writeMinScore && objective.minScoreKnown) {
15407
+ globalObjective.minScore = objective.minScore;
15408
+ globalObjective.minScoreKnown = true;
15409
+ }
15410
+ if (mapInfo.writeMaxScore && objective.maxScoreKnown) {
15411
+ globalObjective.maxScore = objective.maxScore;
15412
+ globalObjective.maxScoreKnown = true;
15413
+ }
15414
+ if (mapInfo.writeProgressMeasure && objective.progressMeasureStatus) {
15415
+ globalObjective.progressMeasure = objective.progressMeasure;
15416
+ globalObjective.progressMeasureKnown = true;
15417
+ }
15418
+ if (mapInfo.updateAttemptData) {
15419
+ this.updateActivityAttemptData(activity, globalObjective, objective);
15420
+ }
14974
15421
  }
14975
15422
  (_this_eventCallback = (_this = this).eventCallback) === null || _this_eventCallback === void 0 ? void 0 : _this_eventCallback.call(_this, "objective_synchronized", {
14976
15423
  activityId: activity.id,
@@ -14992,25 +15439,47 @@
14992
15439
  },
14993
15440
  {
14994
15441
  /**
15442
+ * Apply read-mapped state to an objective without marking those fields dirty.
15443
+ *
15444
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - read maps are access to global state, not local writes
15445
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - score read maps do not imply score writes
15446
+ */ key: "applyGlobalObjectiveReadState",
15447
+ value: function applyGlobalObjectiveReadState(objective, readState) {
15448
+ objective.applyReadMappedState(readState);
15449
+ }
15450
+ },
15451
+ {
15452
+ /**
14995
15453
  * Ensure global objective entry exists
14996
15454
  *
14997
15455
  * @param globalObjectives - Global objectives map
14998
15456
  * @param targetId - Target objective ID
14999
15457
  * @param objective - Source objective
15000
15458
  * @returns The global objective entry
15459
+ *
15460
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - global objective entries hold mapped objective state
15461
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - global entries hold score-map state
15001
15462
  */ key: "ensureGlobalObjectiveEntry",
15002
15463
  value: function ensureGlobalObjectiveEntry(globalObjectives, targetId, objective) {
15003
15464
  if (!globalObjectives.has(targetId)) {
15004
15465
  globalObjectives.set(targetId, {
15005
15466
  id: targetId,
15006
- satisfiedStatus: objective.satisfiedStatus,
15007
- satisfiedStatusKnown: objective.satisfiedStatusKnown,
15008
- normalizedMeasure: objective.normalizedMeasure,
15009
- normalizedMeasureKnown: objective.measureStatus,
15010
- progressMeasure: objective.progressMeasure,
15011
- progressMeasureKnown: objective.progressMeasureStatus,
15012
- completionStatus: objective.completionStatus,
15013
- completionStatusKnown: objective.completionStatus !== CompletionStatus.UNKNOWN,
15467
+ satisfiedStatus: false,
15468
+ satisfiedStatusKnown: false,
15469
+ normalizedMeasure: 0,
15470
+ normalizedMeasureKnown: false,
15471
+ // @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - score fields
15472
+ // remain unknown until their corresponding write map explicitly writes them.
15473
+ rawScore: "",
15474
+ rawScoreKnown: false,
15475
+ minScore: "",
15476
+ minScoreKnown: false,
15477
+ maxScore: "",
15478
+ maxScoreKnown: false,
15479
+ progressMeasure: 0,
15480
+ progressMeasureKnown: false,
15481
+ completionStatus: CompletionStatus.UNKNOWN,
15482
+ completionStatusKnown: false,
15014
15483
  satisfiedByMeasure: objective.satisfiedByMeasure,
15015
15484
  minNormalizedMeasure: objective.minNormalizedMeasure
15016
15485
  });
@@ -15027,6 +15496,9 @@
15027
15496
  *
15028
15497
  * @param objective - The objective to create default map info for
15029
15498
  * @returns Default map info
15499
+ *
15500
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - mapInfo defaults are applied before objective synchronization
15501
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - score maps require explicit read/write flags
15030
15502
  */ key: "createDefaultMapInfo",
15031
15503
  value: function createDefaultMapInfo(objective) {
15032
15504
  return {
@@ -15039,18 +15511,50 @@
15039
15511
  writeCompletionStatus: true,
15040
15512
  readProgressMeasure: false,
15041
15513
  writeProgressMeasure: true,
15514
+ readRawScore: false,
15515
+ writeRawScore: false,
15516
+ readMinScore: false,
15517
+ writeMinScore: false,
15518
+ readMaxScore: false,
15519
+ writeMaxScore: false,
15042
15520
  updateAttemptData: objective.isPrimary
15043
15521
  };
15044
15522
  }
15045
15523
  },
15046
15524
  {
15047
15525
  /**
15526
+ * Return whether the local objective has known satisfaction state to write.
15527
+ *
15528
+ * @spec SCORM 2004 4th Ed. SN 4.2.1 Tracking Model - Objective Progress
15529
+ * Status identifies whether Objective Satisfied Status is known; Objective
15530
+ * Measure Status is independent measure knowledge.
15531
+ */ key: "hasKnownSatisfiedStatus",
15532
+ value: function hasKnownSatisfiedStatus(objective) {
15533
+ return objective.progressStatus || objective.satisfiedStatusKnown;
15534
+ }
15535
+ },
15536
+ {
15537
+ /**
15538
+ * Return whether this activity is allowed to write tracked state to globals.
15539
+ *
15540
+ * @spec SCORM 2004 4th Ed. SN 3.13.1 Tracked - when False, the LMS
15541
+ * "does not initialize, manage or access any tracking status information".
15542
+ */ key: "canWriteGlobalObjectives",
15543
+ value: function canWriteGlobalObjectives(activity) {
15544
+ return activity.sequencingControls.tracked !== false;
15545
+ }
15546
+ },
15547
+ {
15548
+ /**
15048
15549
  * Get local objective state
15049
15550
  *
15050
15551
  * @param activity - The activity
15051
15552
  * @param objective - The objective
15052
15553
  * @param isPrimary - Whether this is the primary objective
15053
15554
  * @returns Local objective state
15555
+ *
15556
+ * @spec SCORM 2004 4th Ed. SN 3.10 Objective Description - local objective state used for synchronization
15557
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - local score fields are part of mapped objective state
15054
15558
  */ key: "getLocalObjectiveState",
15055
15559
  value: function getLocalObjectiveState(activity, objective, isPrimary) {
15056
15560
  if (isPrimary) {
@@ -15059,6 +15563,12 @@
15059
15563
  satisfiedStatus: activity.objectiveSatisfiedStatus,
15060
15564
  measureStatus: activity.objectiveMeasureStatus,
15061
15565
  normalizedMeasure: activity.objectiveNormalizedMeasure,
15566
+ rawScore: objective.rawScore,
15567
+ rawScoreKnown: objective.rawScoreKnown,
15568
+ minScore: objective.minScore,
15569
+ minScoreKnown: objective.minScoreKnown,
15570
+ maxScore: objective.maxScore,
15571
+ maxScoreKnown: objective.maxScoreKnown,
15062
15572
  progressMeasure: activity.progressMeasure,
15063
15573
  progressMeasureStatus: activity.progressMeasureStatus,
15064
15574
  completionStatus: activity.completionStatus,
@@ -15070,6 +15580,12 @@
15070
15580
  satisfiedStatus: objective.satisfiedStatus,
15071
15581
  measureStatus: objective.measureStatus,
15072
15582
  normalizedMeasure: objective.normalizedMeasure,
15583
+ rawScore: objective.rawScore,
15584
+ rawScoreKnown: objective.rawScoreKnown,
15585
+ minScore: objective.minScore,
15586
+ minScoreKnown: objective.minScoreKnown,
15587
+ maxScore: objective.maxScore,
15588
+ maxScoreKnown: objective.maxScoreKnown,
15073
15589
  progressMeasure: objective.progressMeasure,
15074
15590
  progressMeasureStatus: objective.progressMeasureStatus,
15075
15591
  completionStatus: objective.completionStatus,
@@ -15094,7 +15610,7 @@
15094
15610
  return rule.action === "completed" || rule.action === "incomplete";
15095
15611
  });
15096
15612
  if (globalObjective.satisfiedStatusKnown && globalObjective.satisfiedStatus) {
15097
- if (!hasCompletionRollupRules && (activity.completionStatus === CompletionStatus.UNKNOWN || activity.completionStatus === CompletionStatus.INCOMPLETE)) {
15613
+ if (!hasCompletionRollupRules && !activity.sequencingControls.completionSetByContent && !activity.attemptProgressStatus && (activity.completionStatus === CompletionStatus.UNKNOWN || activity.completionStatus === CompletionStatus.INCOMPLETE)) {
15098
15614
  activity.completionStatus = CompletionStatus.COMPLETED;
15099
15615
  }
15100
15616
  if (activity.successStatus === "unknown") {
@@ -15135,17 +15651,56 @@
15135
15651
  }
15136
15652
  }
15137
15653
  }
15654
+ ], [
15655
+ {
15656
+ key: "getGlobalObjectiveReadState",
15657
+ value: /**
15658
+ * Project a global objective through one local objective's read mapInfo.
15659
+ *
15660
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - read maps provide access to mapped global objective fields
15661
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score read maps are independent fields
15662
+ */ function getGlobalObjectiveReadState(activity, objective, mapInfo, globalObjective) {
15663
+ var readState = {};
15664
+ if (mapInfo.readSatisfiedStatus && globalObjective.satisfiedStatusKnown) {
15665
+ readState.satisfiedStatus = globalObjective.satisfiedStatus;
15666
+ }
15667
+ if (mapInfo.readNormalizedMeasure && globalObjective.normalizedMeasureKnown) {
15668
+ readState.normalizedMeasure = globalObjective.normalizedMeasure;
15669
+ if (objective.satisfiedByMeasure) {
15670
+ var _ref, _objective_minNormalizedMeasure;
15671
+ var threshold = (_ref = (_objective_minNormalizedMeasure = objective.minNormalizedMeasure) !== null && _objective_minNormalizedMeasure !== void 0 ? _objective_minNormalizedMeasure : activity.scaledPassingScore) !== null && _ref !== void 0 ? _ref : 0.7;
15672
+ readState.satisfiedStatus = globalObjective.normalizedMeasure >= threshold;
15673
+ }
15674
+ }
15675
+ if (mapInfo.readCompletionStatus && globalObjective.completionStatusKnown) {
15676
+ readState.completionStatus = globalObjective.completionStatus;
15677
+ }
15678
+ if (mapInfo.readProgressMeasure && globalObjective.progressMeasureKnown) {
15679
+ readState.progressMeasure = globalObjective.progressMeasure;
15680
+ }
15681
+ if (mapInfo.readRawScore && globalObjective.rawScoreKnown) {
15682
+ readState.rawScore = globalObjective.rawScore;
15683
+ }
15684
+ if (mapInfo.readMinScore && globalObjective.minScoreKnown) {
15685
+ readState.minScore = globalObjective.minScore;
15686
+ }
15687
+ if (mapInfo.readMaxScore && globalObjective.maxScoreKnown) {
15688
+ readState.maxScore = globalObjective.maxScore;
15689
+ }
15690
+ return readState;
15691
+ }
15692
+ }
15138
15693
  ]);
15139
15694
  return GlobalObjectiveSynchronizer;
15140
15695
  }();
15141
15696
 
15142
- function _array_like_to_array$d(arr, len) {
15697
+ function _array_like_to_array$e(arr, len) {
15143
15698
  if (len == null || len > arr.length) len = arr.length;
15144
15699
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
15145
15700
  return arr2;
15146
15701
  }
15147
- function _array_without_holes$7(arr) {
15148
- if (Array.isArray(arr)) return _array_like_to_array$d(arr);
15702
+ function _array_without_holes$8(arr) {
15703
+ if (Array.isArray(arr)) return _array_like_to_array$e(arr);
15149
15704
  }
15150
15705
  function _class_call_check$M(instance, Constructor) {
15151
15706
  if (!(instance instanceof Constructor)) {
@@ -15173,26 +15728,26 @@
15173
15728
  return left instanceof right;
15174
15729
  }
15175
15730
  }
15176
- function _iterable_to_array$7(iter) {
15731
+ function _iterable_to_array$8(iter) {
15177
15732
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
15178
15733
  }
15179
- function _non_iterable_spread$7() {
15734
+ function _non_iterable_spread$8() {
15180
15735
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15181
15736
  }
15182
- function _to_consumable_array$7(arr) {
15183
- return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$7();
15737
+ function _to_consumable_array$8(arr) {
15738
+ return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$8();
15184
15739
  }
15185
15740
  function _type_of$J(obj) {
15186
15741
  "@swc/helpers - typeof";
15187
15742
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
15188
15743
  }
15189
- function _unsupported_iterable_to_array$d(o, minLen) {
15744
+ function _unsupported_iterable_to_array$e(o, minLen) {
15190
15745
  if (!o) return;
15191
- if (typeof o === "string") return _array_like_to_array$d(o, minLen);
15746
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
15192
15747
  var n = Object.prototype.toString.call(o).slice(8, -1);
15193
15748
  if (n === "Object" && o.constructor) n = o.constructor.name;
15194
15749
  if (n === "Map" || n === "Set") return Array.from(n);
15195
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
15750
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
15196
15751
  }
15197
15752
  var __defProp$J = Object.defineProperty;
15198
15753
  var __defNormalProp$J = function __defNormalProp(obj, key, value) {
@@ -15343,7 +15898,7 @@
15343
15898
  * @returns Array of rollup state log entries
15344
15899
  */ key: "getRollupStateLog",
15345
15900
  value: function getRollupStateLog() {
15346
- return _to_consumable_array$7(this.rollupStateLog);
15901
+ return _to_consumable_array$8(this.rollupStateLog);
15347
15902
  }
15348
15903
  },
15349
15904
  {
@@ -15711,6 +16266,9 @@
15711
16266
  * Transfer primary objective data from CMI to activity
15712
16267
  * @param {Activity} activity - The activity to transfer data to
15713
16268
  * @param {CMIDataForTransfer} cmiData - CMI data from runtime
16269
+ *
16270
+ * @spec SCORM 2004 4th Ed. RTE-to-SN Data Transfer - primary objective status and score data
16271
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score write-map source data
15714
16272
  */ key: "transferPrimaryObjective",
15715
16273
  value: function transferPrimaryObjective(activity, cmiData) {
15716
16274
  var hasProgressMeasure = false;
@@ -15757,9 +16315,10 @@
15757
16315
  activity.objectiveSatisfiedStatus = successStatus;
15758
16316
  activity.objectiveSatisfiedStatusKnown = true;
15759
16317
  activity.successStatus = validatedSuccessStatus;
15760
- activity.objectiveMeasureStatus = true;
15761
16318
  }
15762
16319
  if (cmiData.score) {
16320
+ var _activity_primaryObjective;
16321
+ (_activity_primaryObjective = activity.primaryObjective) === null || _activity_primaryObjective === void 0 ? void 0 : _activity_primaryObjective.initializeScoreFromCMI(this.getObjectiveScoreState(cmiData.score));
15763
16322
  var normalized = this.normalizeScore(cmiData.score);
15764
16323
  if (normalized !== null) {
15765
16324
  normalizedScore = normalized;
@@ -15771,7 +16330,7 @@
15771
16330
  if (activity.primaryObjective && (hasSuccessStatus || hasNormalizedMeasure)) {
15772
16331
  var finalStatus = hasSuccessStatus ? successStatus : activity.primaryObjective.satisfiedStatus;
15773
16332
  var finalMeasure = hasNormalizedMeasure ? normalizedScore : activity.primaryObjective.normalizedMeasure;
15774
- var measureStatus = hasSuccessStatus || hasNormalizedMeasure;
16333
+ var measureStatus = hasNormalizedMeasure;
15775
16334
  activity.primaryObjective.initializeFromCMI(finalStatus, finalMeasure, measureStatus);
15776
16335
  if (hasSuccessStatus) {
15777
16336
  activity.primaryObjective.satisfiedStatusKnown = true;
@@ -15782,10 +16341,16 @@
15782
16341
  },
15783
16342
  {
15784
16343
  /**
15785
- * Transfer non-primary objective data from CMI to activity objectives
15786
- * Only transfers changed values to protect global objectives
16344
+ * Transfer objective-array data from CMI to matching activity objectives.
16345
+ * Only transfers changed values to protect global objectives.
15787
16346
  * @param {Activity} activity - The activity to transfer data to
15788
16347
  * @param {CMIDataForTransfer} cmiData - CMI data from runtime
16348
+ *
16349
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17 - cmi.objectives.n data, including
16350
+ * the primary objective entry, is part of the RTE objective data model.
16351
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 and ADLSEQ objectives extension -
16352
+ * mapped objective status and raw/min/max score data transfer through
16353
+ * objective maps to sequencing state.
15789
16354
  */ key: "transferNonPrimaryObjectives",
15790
16355
  value: function transferNonPrimaryObjectives(activity, cmiData) {
15791
16356
  if (!cmiData.objectives || cmiData.objectives.length === 0) {
@@ -15799,14 +16364,17 @@
15799
16364
  continue;
15800
16365
  }
15801
16366
  var activityObjectiveMatch = activity.getObjectiveById(cmiObjective.id);
15802
- if (!activityObjectiveMatch || activityObjectiveMatch.isPrimary) {
16367
+ if (!activityObjectiveMatch) {
15803
16368
  continue;
15804
16369
  }
15805
16370
  var activityObjective = activityObjectiveMatch.objective;
16371
+ var isPrimaryObjective = activityObjectiveMatch.isPrimary;
15806
16372
  var hasSuccessStatus = false;
15807
16373
  var successStatus = false;
15808
16374
  var hasNormalizedMeasure = false;
15809
16375
  var normalizedScore = 0;
16376
+ var hasCompletionStatus = false;
16377
+ var hasProgressMeasure = false;
15810
16378
  var validatedObjSuccessStatus = validateSuccessStatus(cmiObjective.success_status);
15811
16379
  if (validatedObjSuccessStatus && validatedObjSuccessStatus !== SuccessStatus.UNKNOWN) {
15812
16380
  successStatus = validatedObjSuccessStatus === SuccessStatus.PASSED;
@@ -15816,8 +16384,10 @@
15816
16384
  var validatedObjCompletionStatus = validateCompletionStatus(cmiObjective.completion_status);
15817
16385
  if (validatedObjCompletionStatus && validatedObjCompletionStatus !== CompletionStatus.UNKNOWN) {
15818
16386
  activityObjective.completionStatus = validatedObjCompletionStatus;
16387
+ hasCompletionStatus = true;
15819
16388
  }
15820
16389
  if (cmiObjective.score) {
16390
+ activityObjective.initializeScoreFromCMI(this.getObjectiveScoreState(cmiObjective.score));
15821
16391
  var normalized = this.normalizeScore(cmiObjective.score);
15822
16392
  if (normalized !== null) {
15823
16393
  normalizedScore = normalized;
@@ -15829,12 +16399,29 @@
15829
16399
  var finalMeasure = hasNormalizedMeasure ? normalizedScore : activityObjective.normalizedMeasure;
15830
16400
  var measureStatus = hasNormalizedMeasure;
15831
16401
  activityObjective.initializeFromCMI(finalStatus, finalMeasure, measureStatus);
16402
+ if (hasSuccessStatus) {
16403
+ activityObjective.satisfiedStatusKnown = true;
16404
+ }
15832
16405
  }
15833
16406
  if (cmiObjective.progress_measure && cmiObjective.progress_measure !== "") {
15834
16407
  var progressMeasure = parseFloat(cmiObjective.progress_measure);
15835
16408
  if (!isNaN(progressMeasure)) {
15836
16409
  activityObjective.progressMeasure = progressMeasure;
15837
16410
  activityObjective.progressMeasureStatus = true;
16411
+ hasProgressMeasure = true;
16412
+ }
16413
+ }
16414
+ if (isPrimaryObjective && (hasSuccessStatus || hasNormalizedMeasure || hasCompletionStatus || hasProgressMeasure)) {
16415
+ activityObjective.applyToActivity(activity);
16416
+ if (validatedObjSuccessStatus && validatedObjSuccessStatus !== SuccessStatus.UNKNOWN) {
16417
+ activity.successStatus = validatedObjSuccessStatus;
16418
+ }
16419
+ if (hasCompletionStatus) {
16420
+ activity.attemptProgressStatus = true;
16421
+ }
16422
+ if (hasProgressMeasure) {
16423
+ activity.attemptCompletionAmount = activityObjective.progressMeasure;
16424
+ activity.attemptCompletionAmountStatus = true;
15838
16425
  }
15839
16426
  }
15840
16427
  }
@@ -15879,6 +16466,27 @@
15879
16466
  }
15880
16467
  return null;
15881
16468
  }
16469
+ },
16470
+ {
16471
+ /**
16472
+ * Convert RTE score data into objective score-map state without numeric reformatting.
16473
+ *
16474
+ * @spec SCORM 2004 4th Ed. RTE-to-SN Data Transfer - score values transfer from RTE to sequencing state
16475
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score map fields are independent
16476
+ */ key: "getObjectiveScoreState",
16477
+ value: function getObjectiveScoreState(score) {
16478
+ var scoreState = {};
16479
+ if (score.raw !== void 0) {
16480
+ scoreState.rawScore = score.raw;
16481
+ }
16482
+ if (score.min !== void 0) {
16483
+ scoreState.minScore = score.min;
16484
+ }
16485
+ if (score.max !== void 0) {
16486
+ scoreState.maxScore = score.max;
16487
+ }
16488
+ return scoreState;
16489
+ }
15882
16490
  }
15883
16491
  ]);
15884
16492
  return RteDataTransferService;
@@ -16341,17 +16949,7 @@
16341
16949
  try {
16342
16950
  for(var _iterator = exitRules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
16343
16951
  var rule = _step.value;
16344
- var conditionsMet = void 0;
16345
- if (rule.conditionCombination === "all") {
16346
- conditionsMet = rule.conditions.every(function(condition) {
16347
- return condition.evaluate(activity);
16348
- });
16349
- } else {
16350
- conditionsMet = rule.conditions.some(function(condition) {
16351
- return condition.evaluate(activity);
16352
- });
16353
- }
16354
- if (conditionsMet) {
16952
+ if (rule.evaluate(activity)) {
16355
16953
  if (rule.action === RuleActionType.EXIT) {
16356
16954
  return {
16357
16955
  action: "EXIT",
@@ -16645,17 +17243,7 @@
16645
17243
  try {
16646
17244
  for(var _iterator = exitRules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
16647
17245
  var rule = _step.value;
16648
- var conditionsMet = void 0;
16649
- if (rule.conditionCombination === "all") {
16650
- conditionsMet = rule.conditions.every(function(condition) {
16651
- return condition.evaluate(activity);
16652
- });
16653
- } else {
16654
- conditionsMet = rule.conditions.some(function(condition) {
16655
- return condition.evaluate(activity);
16656
- });
16657
- }
16658
- if (conditionsMet) {
17246
+ if (rule.evaluate(activity)) {
16659
17247
  if (rule.action === RuleActionType.EXIT) {
16660
17248
  return "EXIT";
16661
17249
  } else if (rule.action === RuleActionType.EXIT_PARENT) {
@@ -16789,13 +17377,13 @@
16789
17377
  return TerminationHandler;
16790
17378
  }();
16791
17379
 
16792
- function _array_like_to_array$c(arr, len) {
17380
+ function _array_like_to_array$d(arr, len) {
16793
17381
  if (len == null || len > arr.length) len = arr.length;
16794
17382
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
16795
17383
  return arr2;
16796
17384
  }
16797
- function _array_without_holes$6(arr) {
16798
- if (Array.isArray(arr)) return _array_like_to_array$c(arr);
17385
+ function _array_without_holes$7(arr) {
17386
+ if (Array.isArray(arr)) return _array_like_to_array$d(arr);
16799
17387
  }
16800
17388
  function _class_call_check$I(instance, Constructor) {
16801
17389
  if (!(instance instanceof Constructor)) {
@@ -16828,10 +17416,10 @@
16828
17416
  }
16829
17417
  return obj;
16830
17418
  }
16831
- function _iterable_to_array$6(iter) {
17419
+ function _iterable_to_array$7(iter) {
16832
17420
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
16833
17421
  }
16834
- function _non_iterable_spread$6() {
17422
+ function _non_iterable_spread$7() {
16835
17423
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16836
17424
  }
16837
17425
  function _object_spread$a(target) {
@@ -16849,20 +17437,20 @@
16849
17437
  }
16850
17438
  return target;
16851
17439
  }
16852
- function _to_consumable_array$6(arr) {
16853
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$6();
17440
+ function _to_consumable_array$7(arr) {
17441
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$7();
16854
17442
  }
16855
17443
  function _type_of$F(obj) {
16856
17444
  "@swc/helpers - typeof";
16857
17445
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
16858
17446
  }
16859
- function _unsupported_iterable_to_array$c(o, minLen) {
17447
+ function _unsupported_iterable_to_array$d(o, minLen) {
16860
17448
  if (!o) return;
16861
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
17449
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
16862
17450
  var n = Object.prototype.toString.call(o).slice(8, -1);
16863
17451
  if (n === "Object" && o.constructor) n = o.constructor.name;
16864
17452
  if (n === "Map" || n === "Set") return Array.from(n);
16865
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
17453
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
16866
17454
  }
16867
17455
  var __defProp$F = Object.defineProperty;
16868
17456
  var __defNormalProp$F = function __defNormalProp(obj, key, value) {
@@ -16912,7 +17500,7 @@
16912
17500
  this.now = (options === null || options === void 0 ? void 0 : options.now) || function() {
16913
17501
  return /* @__PURE__ */ new Date();
16914
17502
  };
16915
- this.defaultHideLmsUi = (options === null || options === void 0 ? void 0 : options.defaultHideLmsUi) ? _to_consumable_array$6(options.defaultHideLmsUi) : [];
17503
+ this.defaultHideLmsUi = (options === null || options === void 0 ? void 0 : options.defaultHideLmsUi) ? _to_consumable_array$7(options.defaultHideLmsUi) : [];
16916
17504
  this.defaultAuxiliaryResources = (options === null || options === void 0 ? void 0 : options.defaultAuxiliaryResources) ? options.defaultAuxiliaryResources.map(function(resource) {
16917
17505
  return _object_spread$a({}, resource);
16918
17506
  }) : [];
@@ -17356,7 +17944,7 @@
17356
17944
  ]);
17357
17945
  return _DeliveryHandler;
17358
17946
  }();
17359
- __publicField$F(_DeliveryHandler, "HIDE_LMS_UI_ORDER", _to_consumable_array$6(HIDE_LMS_UI_TOKENS));
17947
+ __publicField$F(_DeliveryHandler, "HIDE_LMS_UI_ORDER", _to_consumable_array$7(HIDE_LMS_UI_TOKENS));
17360
17948
  var DeliveryHandler = _DeliveryHandler;
17361
17949
 
17362
17950
  function _class_call_check$H(instance, Constructor) {
@@ -18727,7 +19315,7 @@
18727
19315
  return NavigationValidityService;
18728
19316
  }();
18729
19317
 
18730
- function _array_like_to_array$b(arr, len) {
19318
+ function _array_like_to_array$c(arr, len) {
18731
19319
  if (len == null || len > arr.length) len = arr.length;
18732
19320
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
18733
19321
  return arr2;
@@ -18816,7 +19404,7 @@
18816
19404
  }
18817
19405
  return target;
18818
19406
  }
18819
- function ownKeys$1(object, enumerableOnly) {
19407
+ function ownKeys$2(object, enumerableOnly) {
18820
19408
  var keys = Object.keys(object);
18821
19409
  if (Object.getOwnPropertySymbols) {
18822
19410
  var symbols = Object.getOwnPropertySymbols(object);
@@ -18824,31 +19412,31 @@
18824
19412
  }
18825
19413
  return keys;
18826
19414
  }
18827
- function _object_spread_props$1(target, source) {
19415
+ function _object_spread_props$2(target, source) {
18828
19416
  source = source != null ? source : {};
18829
19417
  if (Object.getOwnPropertyDescriptors) {
18830
19418
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
18831
19419
  } else {
18832
- ownKeys$1(Object(source)).forEach(function(key) {
19420
+ ownKeys$2(Object(source)).forEach(function(key) {
18833
19421
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
18834
19422
  });
18835
19423
  }
18836
19424
  return target;
18837
19425
  }
18838
19426
  function _sliced_to_array$6(arr, i) {
18839
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$6();
19427
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$6();
18840
19428
  }
18841
19429
  function _type_of$C(obj) {
18842
19430
  "@swc/helpers - typeof";
18843
19431
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
18844
19432
  }
18845
- function _unsupported_iterable_to_array$b(o, minLen) {
19433
+ function _unsupported_iterable_to_array$c(o, minLen) {
18846
19434
  if (!o) return;
18847
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
19435
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
18848
19436
  var n = Object.prototype.toString.call(o).slice(8, -1);
18849
19437
  if (n === "Object" && o.constructor) n = o.constructor.name;
18850
19438
  if (n === "Map" || n === "Set") return Array.from(n);
18851
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
19439
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
18852
19440
  }
18853
19441
  var __defProp$C = Object.defineProperty;
18854
19442
  var __defNormalProp$C = function __defNormalProp(obj, key, value) {
@@ -18899,6 +19487,9 @@
18899
19487
  * Collect Global Objectives
18900
19488
  * Recursively collects global objectives from the activity tree
18901
19489
  * @param {Activity} activity - Activity to collect objectives from
19490
+ *
19491
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - global objective map contains mapped objective state
19492
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score fields are unknown until written
18902
19493
  */ key: "collectObjectives",
18903
19494
  value: function collectObjectives(activity) {
18904
19495
  var objectives = activity.getAllObjectives();
@@ -18908,9 +19499,15 @@
18908
19499
  this.globalObjectiveMap.set(defaultId, {
18909
19500
  id: defaultId,
18910
19501
  satisfiedStatus: activity.objectiveSatisfiedStatus,
18911
- satisfiedStatusKnown: activity.objectiveMeasureStatus,
19502
+ satisfiedStatusKnown: activity.objectiveSatisfiedStatusKnown,
18912
19503
  normalizedMeasure: activity.objectiveNormalizedMeasure,
18913
19504
  normalizedMeasureKnown: activity.objectiveMeasureStatus,
19505
+ rawScore: "",
19506
+ rawScoreKnown: false,
19507
+ minScore: "",
19508
+ minScoreKnown: false,
19509
+ maxScore: "",
19510
+ maxScoreKnown: false,
18914
19511
  progressMeasure: activity.progressMeasure,
18915
19512
  progressMeasureKnown: activity.progressMeasureStatus,
18916
19513
  completionStatus: activity.completionStatus,
@@ -18923,6 +19520,12 @@
18923
19520
  writeCompletionStatus: true,
18924
19521
  readProgressMeasure: true,
18925
19522
  writeProgressMeasure: true,
19523
+ readRawScore: false,
19524
+ writeRawScore: false,
19525
+ readMinScore: false,
19526
+ writeMinScore: false,
19527
+ readMaxScore: false,
19528
+ writeMaxScore: false,
18926
19529
  satisfiedByMeasure: activity.scaledPassingScore !== null,
18927
19530
  minNormalizedMeasure: activity.scaledPassingScore,
18928
19531
  updateAttemptData: true
@@ -18957,9 +19560,15 @@
18957
19560
  this.globalObjectiveMap.set(targetId, {
18958
19561
  id: targetId,
18959
19562
  satisfiedStatus: objective.satisfiedStatus,
18960
- satisfiedStatusKnown: objective.measureStatus,
19563
+ satisfiedStatusKnown: objective.satisfiedStatusKnown || objective.progressStatus,
18961
19564
  normalizedMeasure: objective.normalizedMeasure,
18962
19565
  normalizedMeasureKnown: objective.measureStatus,
19566
+ rawScore: "",
19567
+ rawScoreKnown: false,
19568
+ minScore: "",
19569
+ minScoreKnown: false,
19570
+ maxScore: "",
19571
+ maxScoreKnown: false,
18963
19572
  progressMeasure: objective.progressMeasure,
18964
19573
  progressMeasureKnown: objective.progressMeasureStatus,
18965
19574
  completionStatus: objective.completionStatus,
@@ -19074,7 +19683,7 @@
19074
19683
  */ key: "updateObjective",
19075
19684
  value: function updateObjective(objectiveId, objectiveData) {
19076
19685
  try {
19077
- this.globalObjectiveMap.set(objectiveId, _object_spread_props$1(_object_spread$9({}, this.globalObjectiveMap.get(objectiveId), objectiveData), {
19686
+ this.globalObjectiveMap.set(objectiveId, _object_spread_props$2(_object_spread$9({}, this.globalObjectiveMap.get(objectiveId), objectiveData), {
19078
19687
  lastUpdated: /* @__PURE__ */ new Date().toISOString()
19079
19688
  }));
19080
19689
  this.fireEvent("onGlobalObjectiveUpdated", {
@@ -19727,13 +20336,13 @@
19727
20336
  return SequencingStateManager;
19728
20337
  }();
19729
20338
 
19730
- function _array_like_to_array$a(arr, len) {
20339
+ function _array_like_to_array$b(arr, len) {
19731
20340
  if (len == null || len > arr.length) len = arr.length;
19732
20341
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
19733
20342
  return arr2;
19734
20343
  }
19735
- function _array_without_holes$5(arr) {
19736
- if (Array.isArray(arr)) return _array_like_to_array$a(arr);
20344
+ function _array_without_holes$6(arr) {
20345
+ if (Array.isArray(arr)) return _array_like_to_array$b(arr);
19737
20346
  }
19738
20347
  function _class_call_check$D(instance, Constructor) {
19739
20348
  if (!(instance instanceof Constructor)) {
@@ -19753,26 +20362,26 @@
19753
20362
  if (protoProps) _defineProperties$D(Constructor.prototype, protoProps);
19754
20363
  return Constructor;
19755
20364
  }
19756
- function _iterable_to_array$5(iter) {
20365
+ function _iterable_to_array$6(iter) {
19757
20366
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
19758
20367
  }
19759
- function _non_iterable_spread$5() {
20368
+ function _non_iterable_spread$6() {
19760
20369
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19761
20370
  }
19762
- function _to_consumable_array$5(arr) {
19763
- return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$5();
20371
+ function _to_consumable_array$6(arr) {
20372
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$6();
19764
20373
  }
19765
20374
  function _type_of$A(obj) {
19766
20375
  "@swc/helpers - typeof";
19767
20376
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
19768
20377
  }
19769
- function _unsupported_iterable_to_array$a(o, minLen) {
20378
+ function _unsupported_iterable_to_array$b(o, minLen) {
19770
20379
  if (!o) return;
19771
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
20380
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
19772
20381
  var n = Object.prototype.toString.call(o).slice(8, -1);
19773
20382
  if (n === "Object" && o.constructor) n = o.constructor.name;
19774
20383
  if (n === "Map" || n === "Set") return Array.from(n);
19775
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
20384
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
19776
20385
  }
19777
20386
  var __defProp$A = Object.defineProperty;
19778
20387
  var __defNormalProp$A = function __defNormalProp(obj, key, value) {
@@ -20370,7 +20979,7 @@
20370
20979
  }
20371
20980
  if (activity.prerequisiteActivities) {
20372
20981
  var _prerequisites;
20373
- (_prerequisites = prerequisites).push.apply(_prerequisites, _to_consumable_array$5(activity.prerequisiteActivities));
20982
+ (_prerequisites = prerequisites).push.apply(_prerequisites, _to_consumable_array$6(activity.prerequisiteActivities));
20374
20983
  }
20375
20984
  return Array.from(new Set(prerequisites));
20376
20985
  }
@@ -20422,7 +21031,7 @@
20422
21031
  }
20423
21032
  }
20424
21033
  if (activity.sequencingRules) {
20425
- var allRules = _to_consumable_array$5(activity.sequencingRules.preConditionRules || []).concat(_to_consumable_array$5(activity.sequencingRules.exitConditionRules || []), _to_consumable_array$5(activity.sequencingRules.postConditionRules || []));
21034
+ var allRules = _to_consumable_array$6(activity.sequencingRules.preConditionRules || []).concat(_to_consumable_array$6(activity.sequencingRules.exitConditionRules || []), _to_consumable_array$6(activity.sequencingRules.postConditionRules || []));
20426
21035
  var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
20427
21036
  try {
20428
21037
  for(var _iterator1 = allRules[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
@@ -21239,13 +21848,13 @@
21239
21848
  return OverallSequencingProcess;
21240
21849
  }();
21241
21850
 
21242
- function _array_like_to_array$9(arr, len) {
21851
+ function _array_like_to_array$a(arr, len) {
21243
21852
  if (len == null || len > arr.length) len = arr.length;
21244
21853
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
21245
21854
  return arr2;
21246
21855
  }
21247
- function _array_without_holes$4(arr) {
21248
- if (Array.isArray(arr)) return _array_like_to_array$9(arr);
21856
+ function _array_without_holes$5(arr) {
21857
+ if (Array.isArray(arr)) return _array_like_to_array$a(arr);
21249
21858
  }
21250
21859
  function _class_call_check$B(instance, Constructor) {
21251
21860
  if (!(instance instanceof Constructor)) {
@@ -21278,10 +21887,10 @@
21278
21887
  }
21279
21888
  return obj;
21280
21889
  }
21281
- function _iterable_to_array$4(iter) {
21890
+ function _iterable_to_array$5(iter) {
21282
21891
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
21283
21892
  }
21284
- function _non_iterable_spread$4() {
21893
+ function _non_iterable_spread$5() {
21285
21894
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
21286
21895
  }
21287
21896
  function _object_spread$8(target) {
@@ -21299,20 +21908,20 @@
21299
21908
  }
21300
21909
  return target;
21301
21910
  }
21302
- function _to_consumable_array$4(arr) {
21303
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$4();
21911
+ function _to_consumable_array$5(arr) {
21912
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$5();
21304
21913
  }
21305
21914
  function _type_of$y(obj) {
21306
21915
  "@swc/helpers - typeof";
21307
21916
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
21308
21917
  }
21309
- function _unsupported_iterable_to_array$9(o, minLen) {
21918
+ function _unsupported_iterable_to_array$a(o, minLen) {
21310
21919
  if (!o) return;
21311
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
21920
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
21312
21921
  var n = Object.prototype.toString.call(o).slice(8, -1);
21313
21922
  if (n === "Object" && o.constructor) n = o.constructor.name;
21314
21923
  if (n === "Map" || n === "Set") return Array.from(n);
21315
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
21924
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
21316
21925
  }
21317
21926
  var __defProp$y = Object.defineProperty;
21318
21927
  var __defNormalProp$y = function __defNormalProp(obj, key, value) {
@@ -21404,7 +22013,7 @@
21404
22013
  this.sequencingProcess = new SequencingProcess(this.sequencing.activityTree, this.sequencing.sequencingRules, this.sequencing.sequencingControls, this.adl.nav, seqOptions);
21405
22014
  var overallOptions = {};
21406
22015
  if (this.configuration.now) overallOptions.now = this.configuration.now;
21407
- overallOptions.defaultHideLmsUi = _to_consumable_array$4(this.sequencing.hideLmsUi);
22016
+ overallOptions.defaultHideLmsUi = _to_consumable_array$5(this.sequencing.hideLmsUi);
21408
22017
  if (this.sequencing.auxiliaryResources.length > 0) {
21409
22018
  overallOptions.defaultAuxiliaryResources = this.sequencing.auxiliaryResources.map(function(resource) {
21410
22019
  return {
@@ -21711,6 +22320,9 @@
21711
22320
  {
21712
22321
  /**
21713
22322
  * Update activity properties from current CMI values
22323
+ *
22324
+ * @spec SCORM 2004 4th Ed. RTE-to-SN Data Transfer - current CMI values update activity objective state
22325
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max scores are available to objective write maps
21714
22326
  */ key: "updateActivityFromCMI",
21715
22327
  value: function updateActivityFromCMI(activity) {
21716
22328
  var hasProgressMeasure = false;
@@ -21742,7 +22354,6 @@
21742
22354
  if (this.cmi.success_status !== "unknown") {
21743
22355
  activity.successStatus = this.cmi.success_status;
21744
22356
  activity.objectiveSatisfiedStatus = this.cmi.success_status === "passed";
21745
- activity.objectiveMeasureStatus = true;
21746
22357
  if (activity.primaryObjective) {
21747
22358
  activity.primaryObjective.progressStatus = true;
21748
22359
  }
@@ -21757,6 +22368,17 @@
21757
22368
  }
21758
22369
  }
21759
22370
  }
22371
+ if (activity.primaryObjective && this.cmi.score) {
22372
+ if (this.cmi.score.raw !== "") {
22373
+ activity.primaryObjective.rawScore = this.cmi.score.raw;
22374
+ }
22375
+ if (this.cmi.score.min !== "") {
22376
+ activity.primaryObjective.minScore = this.cmi.score.min;
22377
+ }
22378
+ if (this.cmi.score.max !== "") {
22379
+ activity.primaryObjective.maxScore = this.cmi.score.max;
22380
+ }
22381
+ }
21760
22382
  if (activity.primaryObjective) {
21761
22383
  activity.primaryObjective.updateFromActivity(activity);
21762
22384
  }
@@ -21919,7 +22541,7 @@
21919
22541
  var listener = this.eventListeners[eventType];
21920
22542
  if (listener && typeof listener === "function") {
21921
22543
  try {
21922
- listener.apply(void 0, _to_consumable_array$4(args));
22544
+ listener.apply(void 0, _to_consumable_array$5(args));
21923
22545
  this.log("debug", "Internal listener for ".concat(eventType, " executed successfully"));
21924
22546
  } catch (listenerError) {
21925
22547
  this.log("error", "Internal listener for ".concat(eventType, " failed: ").concat(listenerError));
@@ -21930,7 +22552,7 @@
21930
22552
  (_this_eventService = this.eventService).processListeners.apply(_this_eventService, [
21931
22553
  "Sequencing.".concat(eventType),
21932
22554
  args[0]
21933
- ].concat(_to_consumable_array$4(args.slice(1))));
22555
+ ].concat(_to_consumable_array$5(args.slice(1))));
21934
22556
  this.log("debug", "Event service listeners for ".concat(eventType, " processed"));
21935
22557
  } catch (eventServiceError) {
21936
22558
  this.log("warn", "Event service failed for ".concat(eventType, ": ").concat(eventServiceError));
@@ -21940,7 +22562,7 @@
21940
22562
  var globalListeners = window.scormSequencingEvents;
21941
22563
  if (globalListeners[eventType] && typeof globalListeners[eventType] === "function") {
21942
22564
  var _globalListeners;
21943
- (_globalListeners = globalListeners)[eventType].apply(_globalListeners, _to_consumable_array$4(args));
22565
+ (_globalListeners = globalListeners)[eventType].apply(_globalListeners, _to_consumable_array$5(args));
21944
22566
  this.log("debug", "Global listener for ".concat(eventType, " executed"));
21945
22567
  }
21946
22568
  }
@@ -22378,7 +23000,7 @@
22378
23000
  return SerializationService;
22379
23001
  }();
22380
23002
 
22381
- function _array_like_to_array$8(arr, len) {
23003
+ function _array_like_to_array$9(arr, len) {
22382
23004
  if (len == null || len > arr.length) len = arr.length;
22383
23005
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
22384
23006
  return arr2;
@@ -22440,19 +23062,19 @@
22440
23062
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
22441
23063
  }
22442
23064
  function _sliced_to_array$5(arr, i) {
22443
- return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$5();
23065
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$5();
22444
23066
  }
22445
23067
  function _type_of$x(obj) {
22446
23068
  "@swc/helpers - typeof";
22447
23069
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
22448
23070
  }
22449
- function _unsupported_iterable_to_array$8(o, minLen) {
23071
+ function _unsupported_iterable_to_array$9(o, minLen) {
22450
23072
  if (!o) return;
22451
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
23073
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
22452
23074
  var n = Object.prototype.toString.call(o).slice(8, -1);
22453
23075
  if (n === "Object" && o.constructor) n = o.constructor.name;
22454
23076
  if (n === "Map" || n === "Set") return Array.from(n);
22455
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
23077
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
22456
23078
  }
22457
23079
  var __defProp$x = Object.defineProperty;
22458
23080
  var __defNormalProp$x = function __defNormalProp(obj, key, value) {
@@ -22721,13 +23343,13 @@
22721
23343
  }();
22722
23344
  var validationService = new ValidationService();
22723
23345
 
22724
- function _array_like_to_array$7(arr, len) {
23346
+ function _array_like_to_array$8(arr, len) {
22725
23347
  if (len == null || len > arr.length) len = arr.length;
22726
23348
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
22727
23349
  return arr2;
22728
23350
  }
22729
- function _array_without_holes$3(arr) {
22730
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
23351
+ function _array_without_holes$4(arr) {
23352
+ if (Array.isArray(arr)) return _array_like_to_array$8(arr);
22731
23353
  }
22732
23354
  function _class_call_check$x(instance, Constructor) {
22733
23355
  if (!(instance instanceof Constructor)) {
@@ -22768,10 +23390,10 @@
22768
23390
  return left instanceof right;
22769
23391
  }
22770
23392
  }
22771
- function _iterable_to_array$3(iter) {
23393
+ function _iterable_to_array$4(iter) {
22772
23394
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
22773
23395
  }
22774
- function _non_iterable_spread$3() {
23396
+ function _non_iterable_spread$4() {
22775
23397
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
22776
23398
  }
22777
23399
  function _object_spread$7(target) {
@@ -22789,7 +23411,7 @@
22789
23411
  }
22790
23412
  return target;
22791
23413
  }
22792
- function ownKeys(object, enumerableOnly) {
23414
+ function ownKeys$1(object, enumerableOnly) {
22793
23415
  var keys = Object.keys(object);
22794
23416
  if (Object.getOwnPropertySymbols) {
22795
23417
  var symbols = Object.getOwnPropertySymbols(object);
@@ -22797,31 +23419,31 @@
22797
23419
  }
22798
23420
  return keys;
22799
23421
  }
22800
- function _object_spread_props(target, source) {
23422
+ function _object_spread_props$1(target, source) {
22801
23423
  source = source != null ? source : {};
22802
23424
  if (Object.getOwnPropertyDescriptors) {
22803
23425
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
22804
23426
  } else {
22805
- ownKeys(Object(source)).forEach(function(key) {
23427
+ ownKeys$1(Object(source)).forEach(function(key) {
22806
23428
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
22807
23429
  });
22808
23430
  }
22809
23431
  return target;
22810
23432
  }
22811
- function _to_consumable_array$3(arr) {
22812
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$3();
23433
+ function _to_consumable_array$4(arr) {
23434
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$4();
22813
23435
  }
22814
23436
  function _type_of$w(obj) {
22815
23437
  "@swc/helpers - typeof";
22816
23438
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
22817
23439
  }
22818
- function _unsupported_iterable_to_array$7(o, minLen) {
23440
+ function _unsupported_iterable_to_array$8(o, minLen) {
22819
23441
  if (!o) return;
22820
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
23442
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
22821
23443
  var n = Object.prototype.toString.call(o).slice(8, -1);
22822
23444
  if (n === "Object" && o.constructor) n = o.constructor.name;
22823
23445
  if (n === "Map" || n === "Set") return Array.from(n);
22824
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
23446
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
22825
23447
  }
22826
23448
  var __defProp$w = Object.defineProperty;
22827
23449
  var __defNormalProp$w = function __defNormalProp(obj, key, value) {
@@ -23907,20 +24529,20 @@
23907
24529
  if (immediate && this.settings.terminateCommitPayloadField) {
23908
24530
  var field = this.settings.terminateCommitPayloadField;
23909
24531
  if (Array.isArray(finalParams)) {
23910
- finalParams = _to_consumable_array$3(finalParams).concat([
24532
+ finalParams = _to_consumable_array$4(finalParams).concat([
23911
24533
  "".concat(encodeURIComponent(field), "=true")
23912
24534
  ]);
23913
24535
  } else if (finalParams && (typeof finalParams === "undefined" ? "undefined" : _type_of$w(finalParams)) === "object") {
23914
- finalParams = _object_spread_props(_object_spread$7({}, finalParams), _define_property$7({}, field, true));
24536
+ finalParams = _object_spread_props$1(_object_spread$7({}, finalParams), _define_property$7({}, field, true));
23915
24537
  }
23916
24538
  }
23917
24539
  if (this.settings.includeCommitSequence === true) {
23918
24540
  if (Array.isArray(finalParams)) {
23919
- finalParams = _to_consumable_array$3(finalParams).concat([
24541
+ finalParams = _to_consumable_array$4(finalParams).concat([
23920
24542
  "commitSequence=".concat(sequence)
23921
24543
  ]);
23922
24544
  } else if (finalParams && (typeof finalParams === "undefined" ? "undefined" : _type_of$w(finalParams)) === "object") {
23923
- finalParams = _object_spread_props(_object_spread$7({}, finalParams), {
24545
+ finalParams = _object_spread_props$1(_object_spread$7({}, finalParams), {
23924
24546
  commitSequence: sequence
23925
24547
  });
23926
24548
  }
@@ -26536,7 +27158,7 @@
26536
27158
  return NAV;
26537
27159
  }(BaseCMI);
26538
27160
 
26539
- function _array_like_to_array$6(arr, len) {
27161
+ function _array_like_to_array$7(arr, len) {
26540
27162
  if (len == null || len > arr.length) len = arr.length;
26541
27163
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
26542
27164
  return arr2;
@@ -26661,19 +27283,19 @@
26661
27283
  return _set_prototype_of$h(o, p);
26662
27284
  }
26663
27285
  function _sliced_to_array$4(arr, i) {
26664
- return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$4();
27286
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$4();
26665
27287
  }
26666
27288
  function _type_of$n(obj) {
26667
27289
  "@swc/helpers - typeof";
26668
27290
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
26669
27291
  }
26670
- function _unsupported_iterable_to_array$6(o, minLen) {
27292
+ function _unsupported_iterable_to_array$7(o, minLen) {
26671
27293
  if (!o) return;
26672
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
27294
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
26673
27295
  var n = Object.prototype.toString.call(o).slice(8, -1);
26674
27296
  if (n === "Object" && o.constructor) n = o.constructor.name;
26675
27297
  if (n === "Map" || n === "Set") return Array.from(n);
26676
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
27298
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
26677
27299
  }
26678
27300
  function _is_native_reflect_construct$h() {
26679
27301
  try {
@@ -27518,7 +28140,7 @@
27518
28140
  ];
27519
28141
  }
27520
28142
 
27521
- function _array_like_to_array$5(arr, len) {
28143
+ function _array_like_to_array$6(arr, len) {
27522
28144
  if (len == null || len > arr.length) len = arr.length;
27523
28145
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
27524
28146
  return arr2;
@@ -27630,7 +28252,7 @@
27630
28252
  return _set_prototype_of$f(o, p);
27631
28253
  }
27632
28254
  function _sliced_to_array$3(arr, i) {
27633
- return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$3();
28255
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$3();
27634
28256
  }
27635
28257
  function _super_prop_base$6(object, property) {
27636
28258
  while(!Object.prototype.hasOwnProperty.call(object, property)){
@@ -27643,13 +28265,13 @@
27643
28265
  "@swc/helpers - typeof";
27644
28266
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
27645
28267
  }
27646
- function _unsupported_iterable_to_array$5(o, minLen) {
28268
+ function _unsupported_iterable_to_array$6(o, minLen) {
27647
28269
  if (!o) return;
27648
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
28270
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
27649
28271
  var n = Object.prototype.toString.call(o).slice(8, -1);
27650
28272
  if (n === "Object" && o.constructor) n = o.constructor.name;
27651
28273
  if (n === "Map" || n === "Set") return Array.from(n);
27652
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
28274
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
27653
28275
  }
27654
28276
  function _is_native_reflect_construct$f() {
27655
28277
  try {
@@ -27974,7 +28596,7 @@
27974
28596
  if (this.initialized && this._id === "") {
27975
28597
  throw new Scorm2004ValidationError(this._cmi_element + ".description", scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);
27976
28598
  } else {
27977
- if (check2004ValidFormat(this._cmi_element + ".description", description, scorm2004_regex.CMILangString250, true)) {
28599
+ if (check2004ValidFormat(this._cmi_element + ".description", description, scorm2004_regex.CMILangString, true)) {
27978
28600
  this._description = description;
27979
28601
  }
27980
28602
  }
@@ -29005,7 +29627,7 @@
29005
29627
  if (this.initialized && this._id === "") {
29006
29628
  throw new Scorm2004ValidationError(this._cmi_element + ".description", scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);
29007
29629
  } else {
29008
- if (check2004ValidFormat(this._cmi_element + ".description", description, scorm2004_regex.CMILangString250, true)) {
29630
+ if (check2004ValidFormat(this._cmi_element + ".description", description, scorm2004_regex.CMILangString, true)) {
29009
29631
  this._description = description;
29010
29632
  }
29011
29633
  }
@@ -32247,13 +32869,13 @@
32247
32869
  return ActivityTree;
32248
32870
  }(BaseCMI);
32249
32871
 
32250
- function _array_like_to_array$4(arr, len) {
32872
+ function _array_like_to_array$5(arr, len) {
32251
32873
  if (len == null || len > arr.length) len = arr.length;
32252
32874
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
32253
32875
  return arr2;
32254
32876
  }
32255
- function _array_without_holes$2(arr) {
32256
- if (Array.isArray(arr)) return _array_like_to_array$4(arr);
32877
+ function _array_without_holes$3(arr) {
32878
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
32257
32879
  }
32258
32880
  function _assert_this_initialized$1(self) {
32259
32881
  if (self === void 0) {
@@ -32339,10 +32961,10 @@
32339
32961
  return left instanceof right;
32340
32962
  }
32341
32963
  }
32342
- function _iterable_to_array$2(iter) {
32964
+ function _iterable_to_array$3(iter) {
32343
32965
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
32344
32966
  }
32345
- function _non_iterable_spread$2() {
32967
+ function _non_iterable_spread$3() {
32346
32968
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
32347
32969
  }
32348
32970
  function _object_spread$4(target) {
@@ -32380,20 +33002,20 @@
32380
33002
  }
32381
33003
  return object;
32382
33004
  }
32383
- function _to_consumable_array$2(arr) {
32384
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$2();
33005
+ function _to_consumable_array$3(arr) {
33006
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
32385
33007
  }
32386
33008
  function _type_of$7(obj) {
32387
33009
  "@swc/helpers - typeof";
32388
33010
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
32389
33011
  }
32390
- function _unsupported_iterable_to_array$4(o, minLen) {
33012
+ function _unsupported_iterable_to_array$5(o, minLen) {
32391
33013
  if (!o) return;
32392
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
33014
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
32393
33015
  var n = Object.prototype.toString.call(o).slice(8, -1);
32394
33016
  if (n === "Object" && o.constructor) n = o.constructor.name;
32395
33017
  if (n === "Map" || n === "Set") return Array.from(n);
32396
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
33018
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
32397
33019
  }
32398
33020
  function _is_native_reflect_construct$1() {
32399
33021
  try {
@@ -32521,10 +33143,10 @@
32521
33143
  {
32522
33144
  key: "hideLmsUi",
32523
33145
  get: function get() {
32524
- return _to_consumable_array$2(this._hideLmsUi);
33146
+ return _to_consumable_array$3(this._hideLmsUi);
32525
33147
  },
32526
33148
  set: function set(items) {
32527
- this._hideLmsUi = _to_consumable_array$2(items);
33149
+ this._hideLmsUi = _to_consumable_array$3(items);
32528
33150
  }
32529
33151
  },
32530
33152
  {
@@ -33104,7 +33726,7 @@
33104
33726
  return Scorm2004CMIHandler;
33105
33727
  }();
33106
33728
 
33107
- function _array_like_to_array$3(arr, len) {
33729
+ function _array_like_to_array$4(arr, len) {
33108
33730
  if (len == null || len > arr.length) len = arr.length;
33109
33731
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
33110
33732
  return arr2;
@@ -33112,8 +33734,8 @@
33112
33734
  function _array_with_holes$2(arr) {
33113
33735
  if (Array.isArray(arr)) return arr;
33114
33736
  }
33115
- function _array_without_holes$1(arr) {
33116
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
33737
+ function _array_without_holes$2(arr) {
33738
+ if (Array.isArray(arr)) return _array_like_to_array$4(arr);
33117
33739
  }
33118
33740
  function _class_call_check$5(instance, Constructor) {
33119
33741
  if (!(instance instanceof Constructor)) {
@@ -33146,7 +33768,7 @@
33146
33768
  }
33147
33769
  return obj;
33148
33770
  }
33149
- function _iterable_to_array$1(iter) {
33771
+ function _iterable_to_array$2(iter) {
33150
33772
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
33151
33773
  }
33152
33774
  function _iterable_to_array_limit$2(arr, i) {
@@ -33176,7 +33798,7 @@
33176
33798
  function _non_iterable_rest$2() {
33177
33799
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
33178
33800
  }
33179
- function _non_iterable_spread$1() {
33801
+ function _non_iterable_spread$2() {
33180
33802
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
33181
33803
  }
33182
33804
  function _object_spread$3(target) {
@@ -33195,18 +33817,18 @@
33195
33817
  return target;
33196
33818
  }
33197
33819
  function _sliced_to_array$2(arr, i) {
33198
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$2();
33820
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$2();
33199
33821
  }
33200
- function _to_consumable_array$1(arr) {
33201
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$1();
33822
+ function _to_consumable_array$2(arr) {
33823
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$2();
33202
33824
  }
33203
- function _unsupported_iterable_to_array$3(o, minLen) {
33825
+ function _unsupported_iterable_to_array$4(o, minLen) {
33204
33826
  if (!o) return;
33205
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
33827
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
33206
33828
  var n = Object.prototype.toString.call(o).slice(8, -1);
33207
33829
  if (n === "Object" && o.constructor) n = o.constructor.name;
33208
33830
  if (n === "Map" || n === "Set") return Array.from(n);
33209
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
33831
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
33210
33832
  }
33211
33833
  var SequencingConfigurationBuilder = /*#__PURE__*/ function() {
33212
33834
  function SequencingConfigurationBuilder() {
@@ -33285,6 +33907,9 @@
33285
33907
  if (settings.objectiveSetByContent !== void 0) {
33286
33908
  target.objectiveSetByContent = settings.objectiveSetByContent;
33287
33909
  }
33910
+ if (settings.tracked !== void 0) {
33911
+ target.tracked = settings.tracked;
33912
+ }
33288
33913
  }
33289
33914
  },
33290
33915
  {
@@ -33744,7 +34369,7 @@
33744
34369
  if (!additional || additional.length === 0) {
33745
34370
  return current;
33746
34371
  }
33747
- return this.sanitizeHideLmsUi(_to_consumable_array$1(current).concat(_to_consumable_array$1(additional)));
34372
+ return this.sanitizeHideLmsUi(_to_consumable_array$2(current).concat(_to_consumable_array$2(additional)));
33748
34373
  }
33749
34374
  },
33750
34375
  {
@@ -33812,7 +34437,7 @@
33812
34437
  var seen = /* @__PURE__ */ new Set();
33813
34438
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
33814
34439
  try {
33815
- for(var _iterator = _to_consumable_array$1(existing !== null && existing !== void 0 ? existing : []).concat(_to_consumable_array$1(additions !== null && additions !== void 0 ? additions : []))[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
34440
+ for(var _iterator = _to_consumable_array$2(existing !== null && existing !== void 0 ? existing : []).concat(_to_consumable_array$2(additions !== null && additions !== void 0 ? additions : []))[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
33816
34441
  var resource = _step.value;
33817
34442
  if (!resource) {
33818
34443
  continue;
@@ -33854,13 +34479,13 @@
33854
34479
  value: function cloneSelectionRandomizationState(state) {
33855
34480
  var clone = {};
33856
34481
  if (state.childOrder) {
33857
- clone.childOrder = _to_consumable_array$1(state.childOrder);
34482
+ clone.childOrder = _to_consumable_array$2(state.childOrder);
33858
34483
  }
33859
34484
  if (state.selectedChildIds) {
33860
- clone.selectedChildIds = _to_consumable_array$1(state.selectedChildIds);
34485
+ clone.selectedChildIds = _to_consumable_array$2(state.selectedChildIds);
33861
34486
  }
33862
34487
  if (state.hiddenFromChoiceChildIds) {
33863
- clone.hiddenFromChoiceChildIds = _to_consumable_array$1(state.hiddenFromChoiceChildIds);
34488
+ clone.hiddenFromChoiceChildIds = _to_consumable_array$2(state.hiddenFromChoiceChildIds);
33864
34489
  }
33865
34490
  if (state.selectionCountStatus !== void 0) {
33866
34491
  clone.selectionCountStatus = state.selectionCountStatus;
@@ -33941,13 +34566,13 @@
33941
34566
  return SequencingConfigurationBuilder;
33942
34567
  }();
33943
34568
 
33944
- function _array_like_to_array$2(arr, len) {
34569
+ function _array_like_to_array$3(arr, len) {
33945
34570
  if (len == null || len > arr.length) len = arr.length;
33946
34571
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
33947
34572
  return arr2;
33948
34573
  }
33949
- function _array_without_holes(arr) {
33950
- if (Array.isArray(arr)) return _array_like_to_array$2(arr);
34574
+ function _array_without_holes$1(arr) {
34575
+ if (Array.isArray(arr)) return _array_like_to_array$3(arr);
33951
34576
  }
33952
34577
  function _class_call_check$4(instance, Constructor) {
33953
34578
  if (!(instance instanceof Constructor)) {
@@ -33967,26 +34592,26 @@
33967
34592
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
33968
34593
  return Constructor;
33969
34594
  }
33970
- function _iterable_to_array(iter) {
34595
+ function _iterable_to_array$1(iter) {
33971
34596
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
33972
34597
  }
33973
- function _non_iterable_spread() {
34598
+ function _non_iterable_spread$1() {
33974
34599
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
33975
34600
  }
33976
- function _to_consumable_array(arr) {
33977
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread();
34601
+ function _to_consumable_array$1(arr) {
34602
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$1();
33978
34603
  }
33979
34604
  function _type_of$4(obj) {
33980
34605
  "@swc/helpers - typeof";
33981
34606
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
33982
34607
  }
33983
- function _unsupported_iterable_to_array$2(o, minLen) {
34608
+ function _unsupported_iterable_to_array$3(o, minLen) {
33984
34609
  if (!o) return;
33985
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
34610
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
33986
34611
  var n = Object.prototype.toString.call(o).slice(8, -1);
33987
34612
  if (n === "Object" && o.constructor) n = o.constructor.name;
33988
34613
  if (n === "Map" || n === "Set") return Array.from(n);
33989
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
34614
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
33990
34615
  }
33991
34616
  var __defProp$4 = Object.defineProperty;
33992
34617
  var __defNormalProp$4 = function __defNormalProp(obj, key, value) {
@@ -34128,6 +34753,9 @@
34128
34753
  if (activitySettings.sequencingControls) {
34129
34754
  this.sequencingConfigBuilder.applySequencingControlsSettings(activity.sequencingControls, activitySettings.sequencingControls);
34130
34755
  }
34756
+ if (activitySettings.deliveryControls) {
34757
+ this.sequencingConfigBuilder.applySequencingControlsSettings(activity.sequencingControls, activitySettings.deliveryControls);
34758
+ }
34131
34759
  if (activitySettings.sequencingRules) {
34132
34760
  this.sequencingConfigBuilder.applySequencingRulesSettings(activity.sequencingRules, activitySettings.sequencingRules);
34133
34761
  }
@@ -34228,7 +34856,7 @@
34228
34856
  for(var _iterator = activity.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
34229
34857
  var child = _step.value;
34230
34858
  var _ids;
34231
- (_ids = ids).push.apply(_ids, _to_consumable_array(this.extractActivityIds(child)));
34859
+ (_ids = ids).push.apply(_ids, _to_consumable_array$1(this.extractActivityIds(child)));
34232
34860
  }
34233
34861
  } catch (err) {
34234
34862
  _didIteratorError = true;
@@ -34260,19 +34888,19 @@
34260
34888
  var _info_readSatisfiedStatus, _info_readNormalizedMeasure, _info_writeSatisfiedStatus, _info_writeNormalizedMeasure, _info_readCompletionStatus, _info_writeCompletionStatus, _info_readProgressMeasure, _info_writeProgressMeasure, _info_readRawScore, _info_writeRawScore, _info_readMinScore, _info_writeMinScore, _info_readMaxScore, _info_writeMaxScore, _info_updateAttemptData;
34261
34889
  return {
34262
34890
  targetObjectiveID: info.targetObjectiveID,
34263
- readSatisfiedStatus: (_info_readSatisfiedStatus = info.readSatisfiedStatus) !== null && _info_readSatisfiedStatus !== void 0 ? _info_readSatisfiedStatus : false,
34264
- readNormalizedMeasure: (_info_readNormalizedMeasure = info.readNormalizedMeasure) !== null && _info_readNormalizedMeasure !== void 0 ? _info_readNormalizedMeasure : false,
34891
+ readSatisfiedStatus: (_info_readSatisfiedStatus = info.readSatisfiedStatus) !== null && _info_readSatisfiedStatus !== void 0 ? _info_readSatisfiedStatus : true,
34892
+ readNormalizedMeasure: (_info_readNormalizedMeasure = info.readNormalizedMeasure) !== null && _info_readNormalizedMeasure !== void 0 ? _info_readNormalizedMeasure : true,
34265
34893
  writeSatisfiedStatus: (_info_writeSatisfiedStatus = info.writeSatisfiedStatus) !== null && _info_writeSatisfiedStatus !== void 0 ? _info_writeSatisfiedStatus : false,
34266
34894
  writeNormalizedMeasure: (_info_writeNormalizedMeasure = info.writeNormalizedMeasure) !== null && _info_writeNormalizedMeasure !== void 0 ? _info_writeNormalizedMeasure : false,
34267
- readCompletionStatus: (_info_readCompletionStatus = info.readCompletionStatus) !== null && _info_readCompletionStatus !== void 0 ? _info_readCompletionStatus : false,
34895
+ readCompletionStatus: (_info_readCompletionStatus = info.readCompletionStatus) !== null && _info_readCompletionStatus !== void 0 ? _info_readCompletionStatus : true,
34268
34896
  writeCompletionStatus: (_info_writeCompletionStatus = info.writeCompletionStatus) !== null && _info_writeCompletionStatus !== void 0 ? _info_writeCompletionStatus : false,
34269
- readProgressMeasure: (_info_readProgressMeasure = info.readProgressMeasure) !== null && _info_readProgressMeasure !== void 0 ? _info_readProgressMeasure : false,
34897
+ readProgressMeasure: (_info_readProgressMeasure = info.readProgressMeasure) !== null && _info_readProgressMeasure !== void 0 ? _info_readProgressMeasure : true,
34270
34898
  writeProgressMeasure: (_info_writeProgressMeasure = info.writeProgressMeasure) !== null && _info_writeProgressMeasure !== void 0 ? _info_writeProgressMeasure : false,
34271
- readRawScore: (_info_readRawScore = info.readRawScore) !== null && _info_readRawScore !== void 0 ? _info_readRawScore : false,
34899
+ readRawScore: (_info_readRawScore = info.readRawScore) !== null && _info_readRawScore !== void 0 ? _info_readRawScore : true,
34272
34900
  writeRawScore: (_info_writeRawScore = info.writeRawScore) !== null && _info_writeRawScore !== void 0 ? _info_writeRawScore : false,
34273
- readMinScore: (_info_readMinScore = info.readMinScore) !== null && _info_readMinScore !== void 0 ? _info_readMinScore : false,
34901
+ readMinScore: (_info_readMinScore = info.readMinScore) !== null && _info_readMinScore !== void 0 ? _info_readMinScore : true,
34274
34902
  writeMinScore: (_info_writeMinScore = info.writeMinScore) !== null && _info_writeMinScore !== void 0 ? _info_writeMinScore : false,
34275
- readMaxScore: (_info_readMaxScore = info.readMaxScore) !== null && _info_readMaxScore !== void 0 ? _info_readMaxScore : false,
34903
+ readMaxScore: (_info_readMaxScore = info.readMaxScore) !== null && _info_readMaxScore !== void 0 ? _info_readMaxScore : true,
34276
34904
  writeMaxScore: (_info_writeMaxScore = info.writeMaxScore) !== null && _info_writeMaxScore !== void 0 ? _info_writeMaxScore : false,
34277
34905
  updateAttemptData: (_info_updateAttemptData = info.updateAttemptData) !== null && _info_updateAttemptData !== void 0 ? _info_updateAttemptData : false
34278
34906
  };
@@ -34290,7 +34918,7 @@
34290
34918
  return ActivityTreeBuilder;
34291
34919
  }();
34292
34920
 
34293
- function _array_like_to_array$1(arr, len) {
34921
+ function _array_like_to_array$2(arr, len) {
34294
34922
  if (len == null || len > arr.length) len = arr.length;
34295
34923
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
34296
34924
  return arr2;
@@ -34372,19 +35000,19 @@
34372
35000
  return target;
34373
35001
  }
34374
35002
  function _sliced_to_array$1(arr, i) {
34375
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
35003
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
34376
35004
  }
34377
35005
  function _type_of$3(obj) {
34378
35006
  "@swc/helpers - typeof";
34379
35007
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
34380
35008
  }
34381
- function _unsupported_iterable_to_array$1(o, minLen) {
35009
+ function _unsupported_iterable_to_array$2(o, minLen) {
34382
35010
  if (!o) return;
34383
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
35011
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
34384
35012
  var n = Object.prototype.toString.call(o).slice(8, -1);
34385
35013
  if (n === "Object" && o.constructor) n = o.constructor.name;
34386
35014
  if (n === "Map" || n === "Set") return Array.from(n);
34387
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
35015
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
34388
35016
  }
34389
35017
  var __defProp$3 = Object.defineProperty;
34390
35018
  var __defNormalProp$3 = function __defNormalProp(obj, key, value) {
@@ -34531,9 +35159,12 @@
34531
35159
  *
34532
35160
  * @param {string} objectiveId - The global objective ID
34533
35161
  * @param {CMIObjectivesObject} objective - The CMI objective object with updated values
35162
+ *
35163
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - global objectives synchronize CMI objective data
35164
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score fields synchronize independently
34534
35165
  */ key: "updateGlobalObjectiveFromCMI",
34535
35166
  value: function updateGlobalObjectiveFromCMI(objectiveId, objective) {
34536
- var _objective_score;
35167
+ var _objective_score, _objective_score1, _objective_score2, _objective_score3;
34537
35168
  if (!objectiveId || !this.context.sequencingService) {
34538
35169
  return;
34539
35170
  }
@@ -34557,6 +35188,18 @@
34557
35188
  updatePayload.normalizedMeasure = normalizedMeasure;
34558
35189
  updatePayload.normalizedMeasureKnown = true;
34559
35190
  }
35191
+ if (((_objective_score1 = objective.score) === null || _objective_score1 === void 0 ? void 0 : _objective_score1.raw) !== void 0 && objective.score.raw !== "") {
35192
+ updatePayload.rawScore = objective.score.raw;
35193
+ updatePayload.rawScoreKnown = true;
35194
+ }
35195
+ if (((_objective_score2 = objective.score) === null || _objective_score2 === void 0 ? void 0 : _objective_score2.min) !== void 0 && objective.score.min !== "") {
35196
+ updatePayload.minScore = objective.score.min;
35197
+ updatePayload.minScoreKnown = true;
35198
+ }
35199
+ if (((_objective_score3 = objective.score) === null || _objective_score3 === void 0 ? void 0 : _objective_score3.max) !== void 0 && objective.score.max !== "") {
35200
+ updatePayload.maxScore = objective.score.max;
35201
+ updatePayload.maxScoreKnown = true;
35202
+ }
34560
35203
  var progressMeasure = this.parseObjectiveNumber(objective.progress_measure);
34561
35204
  if (progressMeasure !== null) {
34562
35205
  updatePayload.progressMeasure = progressMeasure;
@@ -34578,13 +35221,22 @@
34578
35221
  *
34579
35222
  * @param {CMIObjectivesObject} objective - The CMI objectives object containing data about a specific learning objective.
34580
35223
  * @return {GlobalObjectiveMapEntry} An object containing mapped properties and their values based on the provided objective.
35224
+ *
35225
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - global objective map entries capture objective state
35226
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score entries carry per-field known flags
34581
35227
  */ key: "buildObjectiveMapEntryFromCMI",
34582
35228
  value: function buildObjectiveMapEntryFromCMI(objective) {
34583
- var _objective_score;
35229
+ var _objective_score, _objective_score1, _objective_score2, _objective_score3;
34584
35230
  var entry = {
34585
35231
  id: objective.id,
34586
35232
  satisfiedStatusKnown: false,
34587
35233
  normalizedMeasureKnown: false,
35234
+ rawScore: "",
35235
+ rawScoreKnown: false,
35236
+ minScore: "",
35237
+ minScoreKnown: false,
35238
+ maxScore: "",
35239
+ maxScoreKnown: false,
34588
35240
  progressMeasureKnown: false,
34589
35241
  completionStatusKnown: false,
34590
35242
  readSatisfiedStatus: true,
@@ -34594,7 +35246,13 @@
34594
35246
  readCompletionStatus: true,
34595
35247
  writeCompletionStatus: true,
34596
35248
  readProgressMeasure: true,
34597
- writeProgressMeasure: true
35249
+ writeProgressMeasure: true,
35250
+ readRawScore: true,
35251
+ writeRawScore: true,
35252
+ readMinScore: true,
35253
+ writeMinScore: true,
35254
+ readMaxScore: true,
35255
+ writeMaxScore: true
34598
35256
  };
34599
35257
  if (objective.success_status && objective.success_status !== SuccessStatus.UNKNOWN) {
34600
35258
  entry.satisfiedStatus = objective.success_status === SuccessStatus.PASSED;
@@ -34605,6 +35263,18 @@
34605
35263
  entry.normalizedMeasure = normalizedMeasure;
34606
35264
  entry.normalizedMeasureKnown = true;
34607
35265
  }
35266
+ if (((_objective_score1 = objective.score) === null || _objective_score1 === void 0 ? void 0 : _objective_score1.raw) !== void 0 && objective.score.raw !== "") {
35267
+ entry.rawScore = objective.score.raw;
35268
+ entry.rawScoreKnown = true;
35269
+ }
35270
+ if (((_objective_score2 = objective.score) === null || _objective_score2 === void 0 ? void 0 : _objective_score2.min) !== void 0 && objective.score.min !== "") {
35271
+ entry.minScore = objective.score.min;
35272
+ entry.minScoreKnown = true;
35273
+ }
35274
+ if (((_objective_score3 = objective.score) === null || _objective_score3 === void 0 ? void 0 : _objective_score3.max) !== void 0 && objective.score.max !== "") {
35275
+ entry.maxScore = objective.score.max;
35276
+ entry.maxScoreKnown = true;
35277
+ }
34608
35278
  var progressMeasure = this.parseObjectiveNumber(objective.progress_measure);
34609
35279
  if (progressMeasure !== null) {
34610
35280
  entry.progressMeasure = progressMeasure;
@@ -34627,6 +35297,9 @@
34627
35297
  * @return {CMIObjectivesObject[]} An array of `CMIObjectivesObject` instances built
34628
35298
  * from the provided snapshot map. Returns an empty array
34629
35299
  * if the snapshot is invalid or no valid objectives can be created.
35300
+ *
35301
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - global objective snapshots restore CMI objective state
35302
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score known fields restore independently
34630
35303
  */ key: "buildCMIObjectivesFromMap",
34631
35304
  value: function buildCMIObjectivesFromMap(snapshot) {
34632
35305
  var objectives = [];
@@ -34650,6 +35323,18 @@
34650
35323
  if (entry.normalizedMeasureKnown === true && normalizedMeasure !== null) {
34651
35324
  objective.score.scaled = String(normalizedMeasure);
34652
35325
  }
35326
+ if (entry.rawScoreKnown === true) {
35327
+ var _entry_rawScore;
35328
+ objective.score.raw = String((_entry_rawScore = entry.rawScore) !== null && _entry_rawScore !== void 0 ? _entry_rawScore : "");
35329
+ }
35330
+ if (entry.minScoreKnown === true) {
35331
+ var _entry_minScore;
35332
+ objective.score.min = String((_entry_minScore = entry.minScore) !== null && _entry_minScore !== void 0 ? _entry_minScore : "");
35333
+ }
35334
+ if (entry.maxScoreKnown === true) {
35335
+ var _entry_maxScore;
35336
+ objective.score.max = String((_entry_maxScore = entry.maxScore) !== null && _entry_maxScore !== void 0 ? _entry_maxScore : "");
35337
+ }
34653
35338
  var progressMeasure = this.parseObjectiveNumber(entry.progressMeasure);
34654
35339
  if (entry.progressMeasureKnown === true && progressMeasure !== null) {
34655
35340
  objective.progress_measure = String(progressMeasure);
@@ -34818,6 +35503,9 @@
34818
35503
  * @param {CompletionStatus} completionStatus
34819
35504
  * @param {SuccessStatus} successStatus
34820
35505
  * @param {ScoreObject} scoreObject
35506
+ *
35507
+ * @spec SCORM 2004 4th Ed. RTE-to-SN Data Transfer - CMI score data updates the current primary objective
35508
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score data is available for write maps
34821
35509
  */ key: "syncCmiToSequencingActivity",
34822
35510
  value: function syncCmiToSequencingActivity(completionStatus, successStatus, scoreObject) {
34823
35511
  if (!this.context.sequencing) {
@@ -34843,6 +35531,15 @@
34843
35531
  primaryObjective.normalizedMeasure = scoreObject.scaled;
34844
35532
  primaryObjective.measureStatus = true;
34845
35533
  }
35534
+ if ((scoreObject === null || scoreObject === void 0 ? void 0 : scoreObject.raw) !== void 0 && scoreObject.raw !== null) {
35535
+ primaryObjective.rawScore = String(scoreObject.raw);
35536
+ }
35537
+ if ((scoreObject === null || scoreObject === void 0 ? void 0 : scoreObject.min) !== void 0 && scoreObject.min !== null) {
35538
+ primaryObjective.minScore = String(scoreObject.min);
35539
+ }
35540
+ if ((scoreObject === null || scoreObject === void 0 ? void 0 : scoreObject.max) !== void 0 && scoreObject.max !== null) {
35541
+ primaryObjective.maxScore = String(scoreObject.max);
35542
+ }
34846
35543
  }
34847
35544
  },
34848
35545
  {
@@ -35406,7 +36103,7 @@
35406
36103
  return SequencingStatePersistence;
35407
36104
  }();
35408
36105
 
35409
- function _array_like_to_array(arr, len) {
36106
+ function _array_like_to_array$1(arr, len) {
35410
36107
  if (len == null || len > arr.length) len = arr.length;
35411
36108
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
35412
36109
  return arr2;
@@ -35460,19 +36157,19 @@
35460
36157
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
35461
36158
  }
35462
36159
  function _sliced_to_array(arr, i) {
35463
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
36160
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest();
35464
36161
  }
35465
36162
  function _type_of$1(obj) {
35466
36163
  "@swc/helpers - typeof";
35467
36164
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
35468
36165
  }
35469
- function _unsupported_iterable_to_array(o, minLen) {
36166
+ function _unsupported_iterable_to_array$1(o, minLen) {
35470
36167
  if (!o) return;
35471
- if (typeof o === "string") return _array_like_to_array(o, minLen);
36168
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
35472
36169
  var n = Object.prototype.toString.call(o).slice(8, -1);
35473
36170
  if (n === "Object" && o.constructor) n = o.constructor.name;
35474
36171
  if (n === "Map" || n === "Set") return Array.from(n);
35475
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
36172
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
35476
36173
  }
35477
36174
  var __defProp$1 = Object.defineProperty;
35478
36175
  var __defNormalProp$1 = function __defNormalProp(obj, key, value) {
@@ -35649,6 +36346,14 @@
35649
36346
  return Scorm2004DataSerializer;
35650
36347
  }();
35651
36348
 
36349
+ function _array_like_to_array(arr, len) {
36350
+ if (len == null || len > arr.length) len = arr.length;
36351
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
36352
+ return arr2;
36353
+ }
36354
+ function _array_without_holes(arr) {
36355
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
36356
+ }
35652
36357
  function _assert_this_initialized(self) {
35653
36358
  if (self === void 0) {
35654
36359
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -35746,6 +36451,12 @@
35746
36451
  return left instanceof right;
35747
36452
  }
35748
36453
  }
36454
+ function _iterable_to_array(iter) {
36455
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
36456
+ }
36457
+ function _non_iterable_spread() {
36458
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
36459
+ }
35749
36460
  function _object_spread(target) {
35750
36461
  for(var i = 1; i < arguments.length; i++){
35751
36462
  var source = arguments[i] != null ? arguments[i] : {};
@@ -35761,6 +36472,25 @@
35761
36472
  }
35762
36473
  return target;
35763
36474
  }
36475
+ function ownKeys(object, enumerableOnly) {
36476
+ var keys = Object.keys(object);
36477
+ if (Object.getOwnPropertySymbols) {
36478
+ var symbols = Object.getOwnPropertySymbols(object);
36479
+ keys.push.apply(keys, symbols);
36480
+ }
36481
+ return keys;
36482
+ }
36483
+ function _object_spread_props(target, source) {
36484
+ source = source != null ? source : {};
36485
+ if (Object.getOwnPropertyDescriptors) {
36486
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
36487
+ } else {
36488
+ ownKeys(Object(source)).forEach(function(key) {
36489
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
36490
+ });
36491
+ }
36492
+ return target;
36493
+ }
35764
36494
  function _possible_constructor_return(self, call) {
35765
36495
  if (call && (_type_of(call) === "object" || typeof call === "function")) {
35766
36496
  return call;
@@ -35774,10 +36504,21 @@
35774
36504
  };
35775
36505
  return _set_prototype_of(o, p);
35776
36506
  }
36507
+ function _to_consumable_array(arr) {
36508
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
36509
+ }
35777
36510
  function _type_of(obj) {
35778
36511
  "@swc/helpers - typeof";
35779
36512
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
35780
36513
  }
36514
+ function _unsupported_iterable_to_array(o, minLen) {
36515
+ if (!o) return;
36516
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
36517
+ var n = Object.prototype.toString.call(o).slice(8, -1);
36518
+ if (n === "Object" && o.constructor) n = o.constructor.name;
36519
+ if (n === "Map" || n === "Set") return Array.from(n);
36520
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
36521
+ }
35781
36522
  function _is_native_reflect_construct() {
35782
36523
  try {
35783
36524
  var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
@@ -36048,18 +36789,240 @@
36048
36789
  /**
36049
36790
  * Apply launch-static activity data to CMI while the new SCO is pre-initialize.
36050
36791
  *
36051
- * @spec SCORM 2004 4th Ed. RTE 4.2.9 - cmi.completion_threshold
36792
+ * @spec SCORM 2004 4th Ed. RTE 4.2.5, Table 4.2.5a - cmi.completion_threshold
36793
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives
36052
36794
  */ key: "applyCurrentActivityLaunchData",
36053
36795
  value: function applyCurrentActivityLaunchData() {
36054
- var _ref, _ref1;
36055
- var _this__sequencing, _this__sequencing_overallSequencingProcess, _currentActivity_completionThreshold;
36796
+ var _this__sequencing;
36056
36797
  var currentActivity = (_this__sequencing = this._sequencing) === null || _this__sequencing === void 0 ? void 0 : _this__sequencing.getCurrentActivity();
36057
- if (!this.cmi || !currentActivity) {
36798
+ if (!currentActivity) {
36799
+ return;
36800
+ }
36801
+ this.applyActivityLaunchData(currentActivity);
36802
+ }
36803
+ },
36804
+ {
36805
+ /**
36806
+ * Apply launch-static CMI data when sequencing delivers a new activity before SCO Initialize.
36807
+ *
36808
+ * @spec SCORM 2004 4th Ed. SN DB.2 - Content Delivery Environment Process establishes the delivered activity.
36809
+ * @spec SCORM 2004 4th Ed. RTE 4.2.5, Table 4.2.5a - cmi.completion_threshold is initialized before SCO access.
36810
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives is initialized before SCO access.
36811
+ */ key: "applyDeliveredActivityLaunchData",
36812
+ value: function applyDeliveredActivityLaunchData(activity) {
36813
+ if (!this.isNotInitialized()) {
36814
+ return;
36815
+ }
36816
+ this.applyActivityLaunchData(activity);
36817
+ }
36818
+ },
36819
+ {
36820
+ /**
36821
+ * Copy the delivered activity's static launch data into the fresh CMI model.
36822
+ *
36823
+ * @spec SCORM 2004 4th Ed. RTE 4.2.5, Table 4.2.5a - cmi.completion_threshold
36824
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives
36825
+ */ key: "applyActivityLaunchData",
36826
+ value: function applyActivityLaunchData(currentActivity) {
36827
+ var _ref, _ref1;
36828
+ var _this__sequencing_overallSequencingProcess, _currentActivity_completionThreshold;
36829
+ if (!this.cmi) {
36058
36830
  return;
36059
36831
  }
36060
36832
  var contentActivityData = (_this__sequencing_overallSequencingProcess = this._sequencing.overallSequencingProcess) === null || _this__sequencing_overallSequencingProcess === void 0 ? void 0 : _this__sequencing_overallSequencingProcess.getContentActivityData(currentActivity);
36061
36833
  var completionThreshold = (_ref = (_ref1 = contentActivityData === null || contentActivityData === void 0 ? void 0 : contentActivityData.completionThreshold) !== null && _ref1 !== void 0 ? _ref1 : (_currentActivity_completionThreshold = currentActivity.completionThreshold) === null || _currentActivity_completionThreshold === void 0 ? void 0 : _currentActivity_completionThreshold.toString()) !== null && _ref !== void 0 ? _ref : "";
36062
36834
  this.cmi.completion_threshold = completionThreshold;
36835
+ this.seedCurrentActivityObjectives(currentActivity);
36836
+ }
36837
+ },
36838
+ {
36839
+ /**
36840
+ * Seed CMI objective ids after Initialize when automatic sequencing starts during Initialize.
36841
+ *
36842
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives
36843
+ */ key: "applyCurrentActivityObjectiveData",
36844
+ value: function applyCurrentActivityObjectiveData() {
36845
+ var _this__sequencing;
36846
+ var currentActivity = (_this__sequencing = this._sequencing) === null || _this__sequencing === void 0 ? void 0 : _this__sequencing.getCurrentActivity();
36847
+ if (!this.cmi || !currentActivity) {
36848
+ return;
36849
+ }
36850
+ this.seedCurrentActivityObjectives(currentActivity);
36851
+ }
36852
+ },
36853
+ {
36854
+ /**
36855
+ * Seed CMI objectives from primary and secondary activity objectives.
36856
+ *
36857
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17 - Initialization of Run-Time Objectives from Sequencing Information
36858
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives.n.id and success_status
36859
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 / ADLSEQ objectives extension - objective read maps seed the RTE view
36860
+ */ key: "seedCurrentActivityObjectives",
36861
+ value: function seedCurrentActivityObjectives(currentActivity) {
36862
+ var _activityObjectives;
36863
+ var activityObjectives = [];
36864
+ if (currentActivity.primaryObjective) {
36865
+ activityObjectives.push(currentActivity.primaryObjective);
36866
+ }
36867
+ (_activityObjectives = activityObjectives).push.apply(_activityObjectives, _to_consumable_array(currentActivity.objectives));
36868
+ var seededObjectiveIds = /* @__PURE__ */ new Set();
36869
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
36870
+ try {
36871
+ for(var _iterator = activityObjectives[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
36872
+ var activityObjective = _step.value;
36873
+ var objectiveId = this.getSeedableObjectiveId(activityObjective);
36874
+ if (!objectiveId || seededObjectiveIds.has(objectiveId)) {
36875
+ continue;
36876
+ }
36877
+ seededObjectiveIds.add(objectiveId);
36878
+ var index = this.findOrSeedCMIObjective(objectiveId);
36879
+ if (index === null) {
36880
+ continue;
36881
+ }
36882
+ var cmiObjective = this.cmi.objectives.findObjectiveByIndex(index);
36883
+ if (cmiObjective && this.cmi.objectives.initialized && !cmiObjective.initialized) {
36884
+ cmiObjective.initialize();
36885
+ }
36886
+ var successStatus = this.getActivityObjectiveSuccessStatus(activityObjective);
36887
+ if (successStatus) {
36888
+ this._commonSetCMIValue("SeedActivityObjective", true, "cmi.objectives.".concat(index, ".success_status"), successStatus);
36889
+ }
36890
+ this.seedObjectiveReadMapValues(currentActivity, activityObjective, index);
36891
+ }
36892
+ } catch (err) {
36893
+ _didIteratorError = true;
36894
+ _iteratorError = err;
36895
+ } finally{
36896
+ try {
36897
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
36898
+ _iterator.return();
36899
+ }
36900
+ } finally{
36901
+ if (_didIteratorError) {
36902
+ throw _iteratorError;
36903
+ }
36904
+ }
36905
+ }
36906
+ }
36907
+ },
36908
+ {
36909
+ /**
36910
+ * Seed CMI objective fields from this objective's read-mapped global objectives.
36911
+ *
36912
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17 - Run-Time Objectives are initialized from sequencing information
36913
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - read mapInfo grants access to mapped global objective state
36914
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score read maps seed RTE score fields
36915
+ */ key: "seedObjectiveReadMapValues",
36916
+ value: function seedObjectiveReadMapValues(currentActivity, activityObjective, objectiveIndex) {
36917
+ var _this__sequencing_overallSequencingProcess;
36918
+ var globalObjectiveMap = (_this__sequencing_overallSequencingProcess = this._sequencing.overallSequencingProcess) === null || _this__sequencing_overallSequencingProcess === void 0 ? void 0 : _this__sequencing_overallSequencingProcess.getGlobalObjectiveMap();
36919
+ if (!globalObjectiveMap || activityObjective.mapInfo.length === 0) {
36920
+ return;
36921
+ }
36922
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
36923
+ try {
36924
+ for(var _iterator = activityObjective.mapInfo[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
36925
+ var mapInfo = _step.value;
36926
+ var targetObjectiveId = mapInfo.targetObjectiveID || activityObjective.id;
36927
+ var globalObjective = globalObjectiveMap.get(targetObjectiveId);
36928
+ if (!globalObjective) {
36929
+ continue;
36930
+ }
36931
+ var readState = GlobalObjectiveSynchronizer.getGlobalObjectiveReadState(currentActivity, activityObjective, mapInfo, globalObjective);
36932
+ this.applyObjectiveReadStateToCMI(objectiveIndex, readState);
36933
+ }
36934
+ } catch (err) {
36935
+ _didIteratorError = true;
36936
+ _iteratorError = err;
36937
+ } finally{
36938
+ try {
36939
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
36940
+ _iterator.return();
36941
+ }
36942
+ } finally{
36943
+ if (_didIteratorError) {
36944
+ throw _iteratorError;
36945
+ }
36946
+ }
36947
+ }
36948
+ }
36949
+ },
36950
+ {
36951
+ /**
36952
+ * Copy mapped global objective state into the seeded CMI objective entry.
36953
+ *
36954
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives launch-time initialization
36955
+ * @spec SCORM 2004 4th Ed. SN 3.10.3 - read maps populate the RTE view without creating local writes
36956
+ * @spec SCORM 2004 4th Ed. ADLSEQ objectives extension - raw/min/max score read maps populate CMI objective scores
36957
+ */ key: "applyObjectiveReadStateToCMI",
36958
+ value: function applyObjectiveReadStateToCMI(objectiveIndex, readState) {
36959
+ if (readState.satisfiedStatus !== void 0) {
36960
+ this._commonSetCMIValue("SeedActivityObjectiveReadMap", true, "cmi.objectives.".concat(objectiveIndex, ".success_status"), readState.satisfiedStatus ? SuccessStatus.PASSED : SuccessStatus.FAILED);
36961
+ }
36962
+ if (readState.normalizedMeasure !== void 0) {
36963
+ this._commonSetCMIValue("SeedActivityObjectiveReadMap", true, "cmi.objectives.".concat(objectiveIndex, ".score.scaled"), String(readState.normalizedMeasure));
36964
+ }
36965
+ if (readState.completionStatus !== void 0) {
36966
+ this._commonSetCMIValue("SeedActivityObjectiveReadMap", true, "cmi.objectives.".concat(objectiveIndex, ".completion_status"), readState.completionStatus);
36967
+ }
36968
+ if (readState.progressMeasure !== void 0) {
36969
+ this._commonSetCMIValue("SeedActivityObjectiveReadMap", true, "cmi.objectives.".concat(objectiveIndex, ".progress_measure"), String(readState.progressMeasure));
36970
+ }
36971
+ if (readState.rawScore !== void 0) {
36972
+ this._commonSetCMIValue("SeedActivityObjectiveReadMap", true, "cmi.objectives.".concat(objectiveIndex, ".score.raw"), readState.rawScore);
36973
+ }
36974
+ if (readState.minScore !== void 0) {
36975
+ this._commonSetCMIValue("SeedActivityObjectiveReadMap", true, "cmi.objectives.".concat(objectiveIndex, ".score.min"), readState.minScore);
36976
+ }
36977
+ if (readState.maxScore !== void 0) {
36978
+ this._commonSetCMIValue("SeedActivityObjectiveReadMap", true, "cmi.objectives.".concat(objectiveIndex, ".score.max"), readState.maxScore);
36979
+ }
36980
+ }
36981
+ },
36982
+ {
36983
+ /**
36984
+ * Return a manifest-defined objective id that can initialize cmi.objectives.n.id.
36985
+ *
36986
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives.n.id
36987
+ */ key: "getSeedableObjectiveId",
36988
+ value: function getSeedableObjectiveId(activityObjective) {
36989
+ var objectiveId = activityObjective.id;
36990
+ if (typeof objectiveId !== "string" || objectiveId.trim() === "") {
36991
+ return null;
36992
+ }
36993
+ return objectiveId;
36994
+ }
36995
+ },
36996
+ {
36997
+ /**
36998
+ * Find an existing CMI objective id or create the next CMI objective array entry.
36999
+ *
37000
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives._count
37001
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives.n.id
37002
+ */ key: "findOrSeedCMIObjective",
37003
+ value: function findOrSeedCMIObjective(objectiveId) {
37004
+ var existingIndex = this.cmi.objectives.childArray.findIndex(function(objective) {
37005
+ return objective.id === objectiveId;
37006
+ });
37007
+ if (existingIndex >= 0) {
37008
+ return existingIndex;
37009
+ }
37010
+ var index = this.cmi.objectives.childArray.length;
37011
+ var result = this._commonSetCMIValue("SeedActivityObjective", true, "cmi.objectives.".concat(index, ".id"), objectiveId);
37012
+ return result === global_constants.SCORM_TRUE ? index : null;
37013
+ }
37014
+ },
37015
+ {
37016
+ /**
37017
+ * Translate a known activity objective satisfied status to cmi.objectives.n.success_status.
37018
+ *
37019
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives.n.success_status
37020
+ */ key: "getActivityObjectiveSuccessStatus",
37021
+ value: function getActivityObjectiveSuccessStatus(activityObjective) {
37022
+ if (activityObjective.progressStatus || activityObjective.satisfiedStatusKnown) {
37023
+ return activityObjective.satisfiedStatus ? SuccessStatus.PASSED : SuccessStatus.FAILED;
37024
+ }
37025
+ return null;
36063
37026
  }
36064
37027
  },
36065
37028
  {
@@ -36149,6 +37112,7 @@
36149
37112
  var result = this.initialize("Initialize", "LMS was already initialized!", "LMS is already finished!");
36150
37113
  if (result === global_constants.SCORM_TRUE && this._sequencingService) {
36151
37114
  this._sequencingService.initialize();
37115
+ this.applyCurrentActivityObjectiveData();
36152
37116
  }
36153
37117
  if (result === global_constants.SCORM_TRUE) {
36154
37118
  this._globalObjectiveManager.restoreGlobalObjectivesToCMI();
@@ -36428,7 +37392,7 @@
36428
37392
  objective_id = objective ? objective.id : void 0;
36429
37393
  }
36430
37394
  var is_global = objective_id && ((_this_settings_globalObjectiveIds = this.settings.globalObjectiveIds) === null || _this_settings_globalObjectiveIds === void 0 ? void 0 : _this_settings_globalObjectiveIds.includes(objective_id));
36431
- if (is_global) {
37395
+ if (is_global && this.currentActivityAllowsGlobalObjectiveWrites()) {
36432
37396
  var _this__globalObjectiveManager_findOrCreateGlobalObjective = this._globalObjectiveManager.findOrCreateGlobalObjective(objective_id), global_index = _this__globalObjectiveManager_findOrCreateGlobalObjective.index;
36433
37397
  var global_element = CMIElement.replace(element_base, "_globalObjectives.".concat(global_index));
36434
37398
  this._commonSetCMIValue("SetGlobalObjectiveValue", true, global_element, value);
@@ -36443,6 +37407,18 @@
36443
37407
  },
36444
37408
  {
36445
37409
  /**
37410
+ * Return whether the current activity can update shared global objectives.
37411
+ *
37412
+ * @spec SCORM 2004 4th Ed. SN 3.13.1 Tracked - when False, the LMS
37413
+ * "does not initialize, manage or access any tracking status information".
37414
+ */ key: "currentActivityAllowsGlobalObjectiveWrites",
37415
+ value: function currentActivityAllowsGlobalObjectiveWrites() {
37416
+ var _this__sequencing_getCurrentActivity, _this__sequencing;
37417
+ return ((_this__sequencing = this._sequencing) === null || _this__sequencing === void 0 ? void 0 : (_this__sequencing_getCurrentActivity = _this__sequencing.getCurrentActivity()) === null || _this__sequencing_getCurrentActivity === void 0 ? void 0 : _this__sequencing_getCurrentActivity.sequencingControls.tracked) !== false;
37418
+ }
37419
+ },
37420
+ {
37421
+ /**
36446
37422
  * Gets or builds a new child element to add to the array
36447
37423
  * @param {string} CMIElement
36448
37424
  * @param {any} value
@@ -36784,9 +37760,7 @@
36784
37760
  logLevel: (_ref4 = settings === null || settings === void 0 ? void 0 : (_settings_sequencing4 = settings.sequencing) === null || _settings_sequencing4 === void 0 ? void 0 : _settings_sequencing4.logLevel) !== null && _ref4 !== void 0 ? _ref4 : "info"
36785
37761
  };
36786
37762
  this._sequencingService = new SequencingService(this._sequencing, this.cmi, this.adl, this.eventService || this, this.loggingService, sequencingConfig);
36787
- if (settings === null || settings === void 0 ? void 0 : (_settings_sequencing5 = settings.sequencing) === null || _settings_sequencing5 === void 0 ? void 0 : _settings_sequencing5.eventListeners) {
36788
- this._sequencingService.setEventListeners(settings.sequencing.eventListeners);
36789
- }
37763
+ this._sequencingService.setEventListeners(this.buildSequencingEventListeners(settings === null || settings === void 0 ? void 0 : (_settings_sequencing5 = settings.sequencing) === null || _settings_sequencing5 === void 0 ? void 0 : _settings_sequencing5.eventListeners));
36790
37764
  this._globalObjectiveManager.updateSequencingService(this._sequencingService);
36791
37765
  this._dataSerializer.updateSequencingService(this._sequencingService);
36792
37766
  if (settings === null || settings === void 0 ? void 0 : settings.sequencingStatePersistence) {
@@ -36811,6 +37785,25 @@
36811
37785
  },
36812
37786
  {
36813
37787
  /**
37788
+ * Wrap LMS-provided sequencing listeners with API-owned delivery bookkeeping.
37789
+ *
37790
+ * @spec SCORM 2004 4th Ed. SN DB.2 - Content Delivery Environment Process
37791
+ * @spec SCORM 2004 4th Ed. RTE 4.2.5, Table 4.2.5a - cmi.completion_threshold
37792
+ * @spec SCORM 2004 4th Ed. RTE 4.2.17, Table 4.2.17a - cmi.objectives
37793
+ */ key: "buildSequencingEventListeners",
37794
+ value: function buildSequencingEventListeners(listeners) {
37795
+ var _this = this;
37796
+ return _object_spread_props(_object_spread({}, listeners), {
37797
+ onActivityDelivery: function onActivityDelivery(activity) {
37798
+ var _listeners_onActivityDelivery;
37799
+ _this.applyDeliveredActivityLaunchData(activity);
37800
+ listeners === null || listeners === void 0 ? void 0 : (_listeners_onActivityDelivery = listeners.onActivityDelivery) === null || _listeners_onActivityDelivery === void 0 ? void 0 : _listeners_onActivityDelivery.call(listeners, activity);
37801
+ }
37802
+ });
37803
+ }
37804
+ },
37805
+ {
37806
+ /**
36814
37807
  * Get the sequencing service
36815
37808
  * @return {SequencingService | null}
36816
37809
  */ key: "getSequencingService",
@@ -36822,10 +37815,13 @@
36822
37815
  /**
36823
37816
  * Set sequencing event listeners
36824
37817
  * @param {SequencingEventListeners} listeners
37818
+ *
37819
+ * @spec SCORM 2004 4th Ed. SN DB.2 - Content Delivery Environment Process
37820
+ * @spec SCORM 2004 4th Ed. RTE 4.2.5 / 4.2.17 - launch-static CMI data
36825
37821
  */ key: "setSequencingEventListeners",
36826
37822
  value: function setSequencingEventListeners(listeners) {
36827
37823
  if (this._sequencingService) {
36828
- this._sequencingService.setEventListeners(listeners);
37824
+ this._sequencingService.setEventListeners(this.buildSequencingEventListeners(listeners));
36829
37825
  }
36830
37826
  }
36831
37827
  },