scorm-again 2.5.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aicc.js +657 -489
- package/dist/aicc.js.map +1 -1
- package/dist/aicc.min.js +1 -1
- package/dist/aicc.min.js.map +1 -1
- package/dist/esm/aicc.js +670 -489
- package/dist/esm/aicc.js.map +1 -1
- package/dist/esm/aicc.min.js +1 -1
- package/dist/esm/aicc.min.js.map +1 -1
- package/dist/esm/scorm-again.js +1113 -729
- package/dist/esm/scorm-again.js.map +1 -1
- package/dist/esm/scorm-again.min.js +1 -1
- package/dist/esm/scorm-again.min.js.map +1 -1
- package/dist/esm/scorm12.js +512 -394
- package/dist/esm/scorm12.js.map +1 -1
- package/dist/esm/scorm12.min.js +1 -1
- package/dist/esm/scorm12.min.js.map +1 -1
- package/dist/esm/scorm2004.js +678 -452
- package/dist/esm/scorm2004.js.map +1 -1
- package/dist/esm/scorm2004.min.js +1 -1
- package/dist/esm/scorm2004.min.js.map +1 -1
- package/dist/scorm-again.js +1100 -728
- package/dist/scorm-again.js.map +1 -1
- package/dist/scorm-again.min.js +1 -1
- package/dist/scorm-again.min.js.map +1 -1
- package/dist/scorm12.js +500 -394
- package/dist/scorm12.js.map +1 -1
- package/dist/scorm12.min.js +1 -1
- package/dist/scorm12.min.js.map +1 -1
- package/dist/scorm2004.js +665 -452
- package/dist/scorm2004.js.map +1 -1
- package/dist/scorm2004.min.js +1 -1
- package/dist/scorm2004.min.js.map +1 -1
- package/dist_test.html +208 -0
- package/package.json +14 -14
- package/src/AICC.ts +6 -3
- package/src/BaseAPI.ts +43 -37
- package/src/Scorm12API.ts +17 -23
- package/src/Scorm2004API.ts +99 -42
- package/src/ScormAgain.ts +3 -7
- package/src/cmi/aicc/attempts.ts +22 -12
- package/src/cmi/aicc/cmi.ts +2 -2
- package/src/cmi/aicc/core.ts +44 -26
- package/src/cmi/aicc/evaluation.ts +31 -12
- package/src/cmi/aicc/paths.ts +29 -15
- package/src/cmi/aicc/student_data.ts +14 -5
- package/src/cmi/aicc/student_demographics.ts +31 -24
- package/src/cmi/aicc/student_preferences.ts +11 -11
- package/src/cmi/aicc/tries.ts +24 -14
- package/src/cmi/aicc/validation.ts +3 -4
- package/src/cmi/common/array.ts +17 -5
- package/src/cmi/common/base_cmi.ts +3 -1
- package/src/cmi/common/score.ts +16 -13
- package/src/cmi/scorm12/cmi.ts +25 -10
- package/src/cmi/scorm12/interactions.ts +62 -28
- package/src/cmi/scorm12/nav.ts +13 -5
- package/src/cmi/scorm12/objectives.ts +28 -18
- package/src/cmi/scorm12/student_data.ts +15 -8
- package/src/cmi/scorm12/student_preference.ts +20 -13
- package/src/cmi/scorm12/validation.ts +7 -7
- package/src/cmi/scorm2004/adl.ts +141 -25
- package/src/cmi/scorm2004/cmi.ts +50 -55
- package/src/cmi/scorm2004/comments.ts +21 -20
- package/src/cmi/scorm2004/interactions.ts +73 -32
- package/src/cmi/scorm2004/learner_preference.ts +20 -13
- package/src/cmi/scorm2004/objectives.ts +41 -16
- package/src/cmi/scorm2004/score.ts +22 -11
- package/src/cmi/scorm2004/validation.ts +4 -4
- package/src/constants/api_constants.ts +8 -19
- package/src/constants/default_settings.ts +6 -5
- package/src/constants/error_codes.ts +5 -12
- package/src/constants/regex.ts +4 -10
- package/src/constants/response_constants.ts +1 -2
- package/src/exceptions/aicc_exceptions.ts +29 -0
- package/src/exceptions/scorm12_exceptions.ts +29 -0
- package/src/exceptions/scorm2004_exceptions.ts +29 -0
- package/src/exceptions.ts +0 -81
- package/src/types/api_types.ts +3 -2
- package/test/AICC.spec.ts +114 -43
- package/test/Scorm12API.spec.ts +60 -39
- package/test/Scorm2004API.spec.ts +165 -80
- package/test/cmi/aicc_cmi.spec.ts +6 -9
- package/test/cmi/scorm12_cmi.spec.ts +8 -8
- package/test/cmi/scorm2004_cmi.spec.ts +8 -9
- package/test/exceptions.spec.ts +11 -9
- package/test/types/api_types.spec.ts +3 -3
- package/test/utilities.spec.ts +1 -4
- package/webpack.config.js +5 -1
package/dist/aicc.js
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
/***/ 429:
|
|
6
6
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
7
|
|
|
8
|
+
// ESM COMPAT FLAG
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8
10
|
|
|
9
11
|
// EXPORTS
|
|
10
12
|
__webpack_require__.d(__webpack_exports__, {
|
|
11
|
-
|
|
13
|
+
"default": function() { return /* binding */ src_BaseAPI; }
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
|
|
@@ -17,8 +19,6 @@ var tslib_es6 = __webpack_require__(635);
|
|
|
17
19
|
var array = __webpack_require__(589);
|
|
18
20
|
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
19
21
|
var exceptions = __webpack_require__(784);
|
|
20
|
-
// EXTERNAL MODULE: ./src/constants/error_codes.ts
|
|
21
|
-
var error_codes = __webpack_require__(797);
|
|
22
22
|
// EXTERNAL MODULE: ./src/constants/api_constants.ts
|
|
23
23
|
var api_constants = __webpack_require__(340);
|
|
24
24
|
// EXTERNAL MODULE: ./src/utilities.ts
|
|
@@ -38,7 +38,7 @@ var DefaultSettings = {
|
|
|
38
38
|
dataCommitFormat: "json",
|
|
39
39
|
commitRequestDataType: "application/json;charset=UTF-8",
|
|
40
40
|
autoProgress: false,
|
|
41
|
-
logLevel: enums
|
|
41
|
+
logLevel: enums.LogLevelEnum.ERROR,
|
|
42
42
|
selfReportSessionTime: false,
|
|
43
43
|
alwaysSendTotalTime: false,
|
|
44
44
|
renderCommonCommitFields: false,
|
|
@@ -47,9 +47,9 @@ var DefaultSettings = {
|
|
|
47
47
|
xhrWithCredentials: false,
|
|
48
48
|
fetchMode: "cors",
|
|
49
49
|
responseHandler: function (response) {
|
|
50
|
-
return (0,tslib_es6
|
|
50
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
51
51
|
var responseText, httpResult;
|
|
52
|
-
return (0,tslib_es6
|
|
52
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
53
53
|
switch (_a.label) {
|
|
54
54
|
case 0:
|
|
55
55
|
if (!(typeof response !== "undefined")) return [3, 2];
|
|
@@ -64,13 +64,13 @@ var DefaultSettings = {
|
|
|
64
64
|
!{}.hasOwnProperty.call(httpResult, "result")) {
|
|
65
65
|
if (response.status === 200) {
|
|
66
66
|
return [2, {
|
|
67
|
-
result: api_constants
|
|
67
|
+
result: api_constants.global_constants.SCORM_TRUE,
|
|
68
68
|
errorCode: 0,
|
|
69
69
|
}];
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
72
72
|
return [2, {
|
|
73
|
-
result: api_constants
|
|
73
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
74
74
|
errorCode: 101,
|
|
75
75
|
}];
|
|
76
76
|
}
|
|
@@ -80,14 +80,14 @@ var DefaultSettings = {
|
|
|
80
80
|
result: httpResult.result,
|
|
81
81
|
errorCode: httpResult.errorCode
|
|
82
82
|
? httpResult.errorCode
|
|
83
|
-
: httpResult.result === api_constants
|
|
83
|
+
: httpResult.result === api_constants.global_constants.SCORM_TRUE
|
|
84
84
|
? 0
|
|
85
85
|
: 101,
|
|
86
86
|
}];
|
|
87
87
|
}
|
|
88
88
|
_a.label = 2;
|
|
89
89
|
case 2: return [2, {
|
|
90
|
-
result: api_constants
|
|
90
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
91
91
|
errorCode: 101,
|
|
92
92
|
}];
|
|
93
93
|
}
|
|
@@ -102,25 +102,25 @@ var DefaultSettings = {
|
|
|
102
102
|
case "4":
|
|
103
103
|
case 4:
|
|
104
104
|
case "ERROR":
|
|
105
|
-
case enums
|
|
105
|
+
case enums.LogLevelEnum.ERROR:
|
|
106
106
|
console.error(logMessage);
|
|
107
107
|
break;
|
|
108
108
|
case "3":
|
|
109
109
|
case 3:
|
|
110
110
|
case "WARN":
|
|
111
|
-
case enums
|
|
111
|
+
case enums.LogLevelEnum.WARN:
|
|
112
112
|
console.warn(logMessage);
|
|
113
113
|
break;
|
|
114
114
|
case "2":
|
|
115
115
|
case 2:
|
|
116
116
|
case "INFO":
|
|
117
|
-
case enums
|
|
117
|
+
case enums.LogLevelEnum.INFO:
|
|
118
118
|
console.info(logMessage);
|
|
119
119
|
break;
|
|
120
120
|
case "1":
|
|
121
121
|
case 1:
|
|
122
122
|
case "DEBUG":
|
|
123
|
-
case enums
|
|
123
|
+
case enums.LogLevelEnum.DEBUG:
|
|
124
124
|
if (console.debug) {
|
|
125
125
|
console.debug(logMessage);
|
|
126
126
|
}
|
|
@@ -132,6 +132,7 @@ var DefaultSettings = {
|
|
|
132
132
|
},
|
|
133
133
|
scoItemIds: [],
|
|
134
134
|
scoItemIdValidator: false,
|
|
135
|
+
globalObjectiveIds: [],
|
|
135
136
|
};
|
|
136
137
|
|
|
137
138
|
;// ./src/helpers/scheduled_commit.ts
|
|
@@ -152,7 +153,7 @@ var ScheduledCommit = (function () {
|
|
|
152
153
|
ScheduledCommit.prototype.wrapper = function () {
|
|
153
154
|
var _this = this;
|
|
154
155
|
if (!this._cancelled) {
|
|
155
|
-
(function () { return (0,tslib_es6
|
|
156
|
+
(function () { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () { return (0,tslib_es6.__generator)(this, function (_a) {
|
|
156
157
|
switch (_a.label) {
|
|
157
158
|
case 0: return [4, this._API.commit(this._callback)];
|
|
158
159
|
case 1: return [2, _a.sent()];
|
|
@@ -173,7 +174,6 @@ var ScheduledCommit = (function () {
|
|
|
173
174
|
|
|
174
175
|
|
|
175
176
|
|
|
176
|
-
|
|
177
177
|
var BaseAPI = (function () {
|
|
178
178
|
function BaseAPI(error_codes, settings) {
|
|
179
179
|
var _newTarget = this.constructor;
|
|
@@ -181,7 +181,7 @@ var BaseAPI = (function () {
|
|
|
181
181
|
if (_newTarget === BaseAPI) {
|
|
182
182
|
throw new TypeError("Cannot construct BaseAPI instances directly");
|
|
183
183
|
}
|
|
184
|
-
this.currentState = api_constants
|
|
184
|
+
this.currentState = api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
185
185
|
this.lastErrorCode = "0";
|
|
186
186
|
this.listenerArray = [];
|
|
187
187
|
this._error_codes = error_codes;
|
|
@@ -191,17 +191,20 @@ var BaseAPI = (function () {
|
|
|
191
191
|
this.apiLogLevel = this.settings.logLevel;
|
|
192
192
|
this.selfReportSessionTime = this.settings.selfReportSessionTime;
|
|
193
193
|
if (this.apiLogLevel === undefined) {
|
|
194
|
-
this.apiLogLevel = enums
|
|
194
|
+
this.apiLogLevel = enums.LogLevelEnum.NONE;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
BaseAPI.prototype.commonReset = function (settings) {
|
|
198
|
-
this.
|
|
199
|
-
this.
|
|
198
|
+
this.apiLog("reset", "Called", enums.LogLevelEnum.INFO);
|
|
199
|
+
this.settings = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this.settings), settings);
|
|
200
|
+
this.clearScheduledCommit();
|
|
201
|
+
this.currentState = api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
200
202
|
this.lastErrorCode = "0";
|
|
201
203
|
this.listenerArray = [];
|
|
204
|
+
this.startingData = undefined;
|
|
202
205
|
};
|
|
203
206
|
BaseAPI.prototype.initialize = function (callbackName, initializeMessage, terminationMessage) {
|
|
204
|
-
var returnValue = api_constants
|
|
207
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
205
208
|
if (this.isInitialized()) {
|
|
206
209
|
this.throwSCORMError(this._error_codes.INITIALIZED, initializeMessage);
|
|
207
210
|
}
|
|
@@ -212,17 +215,17 @@ var BaseAPI = (function () {
|
|
|
212
215
|
if (this.selfReportSessionTime) {
|
|
213
216
|
this.cmi.setStartTime();
|
|
214
217
|
}
|
|
215
|
-
this.currentState = api_constants
|
|
218
|
+
this.currentState = api_constants.global_constants.STATE_INITIALIZED;
|
|
216
219
|
this.lastErrorCode = "0";
|
|
217
|
-
returnValue = api_constants
|
|
220
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
218
221
|
this.processListeners(callbackName);
|
|
219
222
|
}
|
|
220
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
223
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
221
224
|
this.clearSCORMError(returnValue);
|
|
222
225
|
return returnValue;
|
|
223
226
|
};
|
|
224
227
|
BaseAPI.prototype.apiLog = function (functionName, logMessage, messageLevel, CMIElement) {
|
|
225
|
-
logMessage = (0,utilities
|
|
228
|
+
logMessage = (0,utilities.formatMessage)(functionName, logMessage, CMIElement);
|
|
226
229
|
if (messageLevel >= this.apiLogLevel) {
|
|
227
230
|
this.settings.onLogMessage(messageLevel, logMessage);
|
|
228
231
|
}
|
|
@@ -239,20 +242,20 @@ var BaseAPI = (function () {
|
|
|
239
242
|
return this._settings;
|
|
240
243
|
},
|
|
241
244
|
set: function (settings) {
|
|
242
|
-
this._settings = (0,tslib_es6
|
|
245
|
+
this._settings = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this._settings), settings);
|
|
243
246
|
},
|
|
244
247
|
enumerable: false,
|
|
245
248
|
configurable: true
|
|
246
249
|
});
|
|
247
250
|
BaseAPI.prototype.terminate = function (callbackName, checkTerminated) {
|
|
248
|
-
return (0,tslib_es6
|
|
251
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
249
252
|
var returnValue, result;
|
|
250
|
-
return (0,tslib_es6
|
|
253
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
251
254
|
switch (_a.label) {
|
|
252
255
|
case 0:
|
|
253
|
-
returnValue = api_constants
|
|
256
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
254
257
|
if (!this.checkState(checkTerminated, this._error_codes.TERMINATION_BEFORE_INIT, this._error_codes.MULTIPLE_TERMINATION)) return [3, 2];
|
|
255
|
-
this.currentState = api_constants
|
|
258
|
+
this.currentState = api_constants.global_constants.STATE_TERMINATED;
|
|
256
259
|
return [4, this.storeData(true)];
|
|
257
260
|
case 1:
|
|
258
261
|
result = _a.sent();
|
|
@@ -262,14 +265,14 @@ var BaseAPI = (function () {
|
|
|
262
265
|
returnValue =
|
|
263
266
|
typeof result !== "undefined" && result.result
|
|
264
267
|
? result.result
|
|
265
|
-
: api_constants
|
|
268
|
+
: api_constants.global_constants.SCORM_FALSE;
|
|
266
269
|
if (checkTerminated)
|
|
267
270
|
this.lastErrorCode = "0";
|
|
268
|
-
returnValue = api_constants
|
|
271
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
269
272
|
this.processListeners(callbackName);
|
|
270
273
|
_a.label = 2;
|
|
271
274
|
case 2:
|
|
272
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
275
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
273
276
|
this.clearSCORMError(returnValue);
|
|
274
277
|
return [2, returnValue];
|
|
275
278
|
}
|
|
@@ -289,7 +292,7 @@ var BaseAPI = (function () {
|
|
|
289
292
|
}
|
|
290
293
|
this.processListeners(callbackName, CMIElement);
|
|
291
294
|
}
|
|
292
|
-
this.apiLog(callbackName, ": returned: " + returnValue, enums
|
|
295
|
+
this.apiLog(callbackName, ": returned: " + returnValue, enums.LogLevelEnum.INFO, CMIElement);
|
|
293
296
|
if (returnValue === undefined) {
|
|
294
297
|
return "";
|
|
295
298
|
}
|
|
@@ -300,7 +303,7 @@ var BaseAPI = (function () {
|
|
|
300
303
|
if (value !== undefined) {
|
|
301
304
|
value = String(value);
|
|
302
305
|
}
|
|
303
|
-
var returnValue = api_constants
|
|
306
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
304
307
|
if (this.checkState(checkTerminated, this._error_codes.STORE_BEFORE_INIT, this._error_codes.STORE_AFTER_TERM)) {
|
|
305
308
|
if (checkTerminated)
|
|
306
309
|
this.lastErrorCode = "0";
|
|
@@ -313,26 +316,26 @@ var BaseAPI = (function () {
|
|
|
313
316
|
this.processListeners(callbackName, CMIElement, value);
|
|
314
317
|
}
|
|
315
318
|
if (returnValue === undefined) {
|
|
316
|
-
returnValue = api_constants
|
|
319
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
317
320
|
}
|
|
318
321
|
if (String(this.lastErrorCode) === "0") {
|
|
319
322
|
if (this.settings.autocommit) {
|
|
320
323
|
this.scheduleCommit(this.settings.autocommitSeconds * 1000, commitCallback);
|
|
321
324
|
}
|
|
322
325
|
}
|
|
323
|
-
this.apiLog(callbackName, ": " + value + ": result: " + returnValue, enums
|
|
326
|
+
this.apiLog(callbackName, ": " + value + ": result: " + returnValue, enums.LogLevelEnum.INFO, CMIElement);
|
|
324
327
|
this.clearSCORMError(returnValue);
|
|
325
328
|
return returnValue;
|
|
326
329
|
};
|
|
327
330
|
BaseAPI.prototype.commit = function (callbackName_1) {
|
|
328
|
-
return (0,tslib_es6
|
|
331
|
+
return (0,tslib_es6.__awaiter)(this, arguments, void 0, function (callbackName, checkTerminated) {
|
|
329
332
|
var returnValue, result;
|
|
330
333
|
if (checkTerminated === void 0) { checkTerminated = false; }
|
|
331
|
-
return (0,tslib_es6
|
|
334
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
332
335
|
switch (_a.label) {
|
|
333
336
|
case 0:
|
|
334
337
|
this.clearScheduledCommit();
|
|
335
|
-
returnValue = api_constants
|
|
338
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
336
339
|
if (!this.checkState(checkTerminated, this._error_codes.COMMIT_BEFORE_INIT, this._error_codes.COMMIT_AFTER_TERM)) return [3, 2];
|
|
337
340
|
return [4, this.storeData(false)];
|
|
338
341
|
case 1:
|
|
@@ -343,14 +346,14 @@ var BaseAPI = (function () {
|
|
|
343
346
|
returnValue =
|
|
344
347
|
typeof result !== "undefined" && result.result
|
|
345
348
|
? result.result
|
|
346
|
-
: api_constants
|
|
347
|
-
this.apiLog(callbackName, " Result: " + returnValue, enums
|
|
349
|
+
: api_constants.global_constants.SCORM_FALSE;
|
|
350
|
+
this.apiLog(callbackName, " Result: " + returnValue, enums.LogLevelEnum.DEBUG, "HttpRequest");
|
|
348
351
|
if (checkTerminated)
|
|
349
352
|
this.lastErrorCode = "0";
|
|
350
353
|
this.processListeners(callbackName);
|
|
351
354
|
_a.label = 2;
|
|
352
355
|
case 2:
|
|
353
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
356
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
354
357
|
this.clearSCORMError(returnValue);
|
|
355
358
|
return [2, returnValue];
|
|
356
359
|
}
|
|
@@ -360,7 +363,7 @@ var BaseAPI = (function () {
|
|
|
360
363
|
BaseAPI.prototype.getLastError = function (callbackName) {
|
|
361
364
|
var returnValue = String(this.lastErrorCode);
|
|
362
365
|
this.processListeners(callbackName);
|
|
363
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
366
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
364
367
|
return returnValue;
|
|
365
368
|
};
|
|
366
369
|
BaseAPI.prototype.getErrorString = function (callbackName, CMIErrorCode) {
|
|
@@ -369,7 +372,7 @@ var BaseAPI = (function () {
|
|
|
369
372
|
returnValue = this.getLmsErrorMessageDetails(CMIErrorCode);
|
|
370
373
|
this.processListeners(callbackName);
|
|
371
374
|
}
|
|
372
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
375
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
373
376
|
return returnValue;
|
|
374
377
|
};
|
|
375
378
|
BaseAPI.prototype.getDiagnostic = function (callbackName, CMIErrorCode) {
|
|
@@ -378,7 +381,7 @@ var BaseAPI = (function () {
|
|
|
378
381
|
returnValue = this.getLmsErrorMessageDetails(CMIErrorCode, true);
|
|
379
382
|
this.processListeners(callbackName);
|
|
380
383
|
}
|
|
381
|
-
this.apiLog(callbackName, "returned: " + returnValue, enums
|
|
384
|
+
this.apiLog(callbackName, "returned: " + returnValue, enums.LogLevelEnum.INFO);
|
|
382
385
|
return returnValue;
|
|
383
386
|
};
|
|
384
387
|
BaseAPI.prototype.checkState = function (checkTerminated, beforeInitError, afterTermError) {
|
|
@@ -404,11 +407,11 @@ var BaseAPI = (function () {
|
|
|
404
407
|
};
|
|
405
408
|
BaseAPI.prototype._commonSetCMIValue = function (methodName, scorm2004, CMIElement, value) {
|
|
406
409
|
if (!CMIElement || CMIElement === "") {
|
|
407
|
-
return api_constants
|
|
410
|
+
return api_constants.global_constants.SCORM_FALSE;
|
|
408
411
|
}
|
|
409
412
|
var structure = CMIElement.split(".");
|
|
410
413
|
var refObject = this;
|
|
411
|
-
var returnValue = api_constants
|
|
414
|
+
var returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
412
415
|
var foundFirstIndex = false;
|
|
413
416
|
var invalidErrorMessage = "The data model element passed to ".concat(methodName, " (").concat(CMIElement, ") is not a valid SCORM data model element.");
|
|
414
417
|
var invalidErrorCode = scorm2004
|
|
@@ -422,20 +425,20 @@ var BaseAPI = (function () {
|
|
|
422
425
|
this.throwSCORMError(this._error_codes.READ_ONLY_ELEMENT);
|
|
423
426
|
}
|
|
424
427
|
else {
|
|
425
|
-
refObject = (0,tslib_es6
|
|
428
|
+
refObject = (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, refObject), { attribute: value });
|
|
426
429
|
}
|
|
427
430
|
}
|
|
428
431
|
else if (!this._checkObjectHasProperty(refObject, attribute)) {
|
|
429
432
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
430
433
|
}
|
|
431
434
|
else {
|
|
432
|
-
if ((0,utilities
|
|
435
|
+
if ((0,utilities.stringMatches)(CMIElement, "\\.correct_responses\\.\\d+") &&
|
|
433
436
|
this.isInitialized()) {
|
|
434
437
|
this.validateCorrectResponse(CMIElement, value);
|
|
435
438
|
}
|
|
436
439
|
if (!scorm2004 || this.lastErrorCode === "0") {
|
|
437
440
|
refObject[attribute] = value;
|
|
438
|
-
returnValue = api_constants
|
|
441
|
+
returnValue = api_constants.global_constants.SCORM_TRUE;
|
|
439
442
|
}
|
|
440
443
|
}
|
|
441
444
|
}
|
|
@@ -445,7 +448,7 @@ var BaseAPI = (function () {
|
|
|
445
448
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
446
449
|
break;
|
|
447
450
|
}
|
|
448
|
-
if (refObject instanceof array
|
|
451
|
+
if (refObject instanceof array.CMIArray) {
|
|
449
452
|
var index = parseInt(structure[idx + 1], 10);
|
|
450
453
|
if (!isNaN(index)) {
|
|
451
454
|
var item = refObject.childArray[index];
|
|
@@ -471,8 +474,8 @@ var BaseAPI = (function () {
|
|
|
471
474
|
}
|
|
472
475
|
}
|
|
473
476
|
}
|
|
474
|
-
if (returnValue === api_constants
|
|
475
|
-
this.apiLog(methodName, "There was an error setting the value for: ".concat(CMIElement, ", value of: ").concat(value), enums
|
|
477
|
+
if (returnValue === api_constants.global_constants.SCORM_FALSE) {
|
|
478
|
+
this.apiLog(methodName, "There was an error setting the value for: ".concat(CMIElement, ", value of: ").concat(value), enums.LogLevelEnum.WARN);
|
|
476
479
|
}
|
|
477
480
|
return returnValue;
|
|
478
481
|
};
|
|
@@ -514,7 +517,7 @@ var BaseAPI = (function () {
|
|
|
514
517
|
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
|
515
518
|
break;
|
|
516
519
|
}
|
|
517
|
-
if (refObject instanceof array
|
|
520
|
+
if (refObject instanceof array.CMIArray) {
|
|
518
521
|
var index = parseInt(structure[idx + 1], 10);
|
|
519
522
|
if (!isNaN(index)) {
|
|
520
523
|
var item = refObject.childArray[index];
|
|
@@ -532,10 +535,10 @@ var BaseAPI = (function () {
|
|
|
532
535
|
if (refObject === null || refObject === undefined) {
|
|
533
536
|
if (!scorm2004) {
|
|
534
537
|
if (attribute === "_children") {
|
|
535
|
-
this.throwSCORMError(
|
|
538
|
+
this.throwSCORMError(this._error_codes.CHILDREN_ERROR);
|
|
536
539
|
}
|
|
537
540
|
else if (attribute === "_count") {
|
|
538
|
-
this.throwSCORMError(
|
|
541
|
+
this.throwSCORMError(this._error_codes.COUNT_ERROR);
|
|
539
542
|
}
|
|
540
543
|
}
|
|
541
544
|
}
|
|
@@ -544,13 +547,13 @@ var BaseAPI = (function () {
|
|
|
544
547
|
}
|
|
545
548
|
};
|
|
546
549
|
BaseAPI.prototype.isInitialized = function () {
|
|
547
|
-
return this.currentState === api_constants
|
|
550
|
+
return this.currentState === api_constants.global_constants.STATE_INITIALIZED;
|
|
548
551
|
};
|
|
549
552
|
BaseAPI.prototype.isNotInitialized = function () {
|
|
550
|
-
return this.currentState === api_constants
|
|
553
|
+
return this.currentState === api_constants.global_constants.STATE_NOT_INITIALIZED;
|
|
551
554
|
};
|
|
552
555
|
BaseAPI.prototype.isTerminated = function () {
|
|
553
|
-
return this.currentState === api_constants
|
|
556
|
+
return this.currentState === api_constants.global_constants.STATE_TERMINATED;
|
|
554
557
|
};
|
|
555
558
|
BaseAPI.prototype.on = function (listenerName, callback) {
|
|
556
559
|
if (!callback)
|
|
@@ -570,7 +573,7 @@ var BaseAPI = (function () {
|
|
|
570
573
|
CMIElement: CMIElement,
|
|
571
574
|
callback: callback,
|
|
572
575
|
});
|
|
573
|
-
this.apiLog("on", "Added event listener: ".concat(this.listenerArray.length), enums
|
|
576
|
+
this.apiLog("on", "Added event listener: ".concat(this.listenerArray.length), enums.LogLevelEnum.INFO, functionName);
|
|
574
577
|
}
|
|
575
578
|
};
|
|
576
579
|
BaseAPI.prototype.off = function (listenerName, callback) {
|
|
@@ -593,7 +596,7 @@ var BaseAPI = (function () {
|
|
|
593
596
|
});
|
|
594
597
|
if (removeIndex !== -1) {
|
|
595
598
|
this_1.listenerArray.splice(removeIndex, 1);
|
|
596
|
-
this_1.apiLog("off", "Removed event listener: ".concat(this_1.listenerArray.length), enums
|
|
599
|
+
this_1.apiLog("off", "Removed event listener: ".concat(this_1.listenerArray.length), enums.LogLevelEnum.INFO, functionName);
|
|
597
600
|
}
|
|
598
601
|
};
|
|
599
602
|
var this_1 = this;
|
|
@@ -626,7 +629,7 @@ var BaseAPI = (function () {
|
|
|
626
629
|
}
|
|
627
630
|
};
|
|
628
631
|
BaseAPI.prototype.processListeners = function (functionName, CMIElement, value) {
|
|
629
|
-
this.apiLog(functionName, value, enums
|
|
632
|
+
this.apiLog(functionName, value, enums.LogLevelEnum.INFO, CMIElement);
|
|
630
633
|
for (var i = 0; i < this.listenerArray.length; i++) {
|
|
631
634
|
var listener = this.listenerArray[i];
|
|
632
635
|
var functionsMatch = listener.functionName === functionName;
|
|
@@ -642,7 +645,7 @@ var BaseAPI = (function () {
|
|
|
642
645
|
CMIElementsMatch = listener.CMIElement === CMIElement;
|
|
643
646
|
}
|
|
644
647
|
if (functionsMatch && (!listenerHasCMIElement || CMIElementsMatch)) {
|
|
645
|
-
this.apiLog("processListeners", "Processing listener: ".concat(listener.functionName), enums
|
|
648
|
+
this.apiLog("processListeners", "Processing listener: ".concat(listener.functionName), enums.LogLevelEnum.INFO, CMIElement);
|
|
646
649
|
listener.callback(CMIElement, value);
|
|
647
650
|
}
|
|
648
651
|
}
|
|
@@ -651,11 +654,11 @@ var BaseAPI = (function () {
|
|
|
651
654
|
if (!message) {
|
|
652
655
|
message = this.getLmsErrorMessageDetails(errorNumber);
|
|
653
656
|
}
|
|
654
|
-
this.apiLog("throwSCORMError", errorNumber + ": " + message, enums
|
|
657
|
+
this.apiLog("throwSCORMError", errorNumber + ": " + message, enums.LogLevelEnum.ERROR);
|
|
655
658
|
this.lastErrorCode = String(errorNumber);
|
|
656
659
|
};
|
|
657
660
|
BaseAPI.prototype.clearSCORMError = function (success) {
|
|
658
|
-
if (success !== undefined && success !== api_constants
|
|
661
|
+
if (success !== undefined && success !== api_constants.global_constants.SCORM_FALSE) {
|
|
659
662
|
this.lastErrorCode = "0";
|
|
660
663
|
}
|
|
661
664
|
};
|
|
@@ -721,11 +724,16 @@ var BaseAPI = (function () {
|
|
|
721
724
|
result.forEach(function (element) {
|
|
722
725
|
obj = {};
|
|
723
726
|
obj[element[0]] = element[1];
|
|
724
|
-
_this.loadFromJSON((0,utilities
|
|
727
|
+
_this.loadFromJSON((0,utilities.unflatten)(obj), CMIElement);
|
|
725
728
|
});
|
|
726
729
|
};
|
|
727
730
|
BaseAPI.prototype.loadFromJSON = function (json, CMIElement) {
|
|
728
731
|
if (CMIElement === void 0) { CMIElement = ""; }
|
|
732
|
+
if ((!CMIElement || CMIElement === "") &&
|
|
733
|
+
!Object.hasOwnProperty.call(json, "cmi") &&
|
|
734
|
+
!Object.hasOwnProperty.call(json, "adl")) {
|
|
735
|
+
CMIElement = "cmi";
|
|
736
|
+
}
|
|
729
737
|
if (!this.isNotInitialized()) {
|
|
730
738
|
console.error("loadFromJSON can only be called before the call to lmsInitialize.");
|
|
731
739
|
return;
|
|
@@ -761,21 +769,21 @@ var BaseAPI = (function () {
|
|
|
761
769
|
return JSON.parse(this.renderCMIToJSONString());
|
|
762
770
|
};
|
|
763
771
|
BaseAPI.prototype.processHttpRequest = function (url_1, params_1) {
|
|
764
|
-
return (0,tslib_es6
|
|
772
|
+
return (0,tslib_es6.__awaiter)(this, arguments, void 0, function (url, params, immediate) {
|
|
765
773
|
var api, genericError, process;
|
|
766
774
|
var _this = this;
|
|
767
775
|
if (immediate === void 0) { immediate = false; }
|
|
768
|
-
return (0,tslib_es6
|
|
776
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
769
777
|
switch (_a.label) {
|
|
770
778
|
case 0:
|
|
771
779
|
api = this;
|
|
772
780
|
genericError = {
|
|
773
|
-
result: api_constants
|
|
781
|
+
result: api_constants.global_constants.SCORM_FALSE,
|
|
774
782
|
errorCode: this.error_codes.GENERAL,
|
|
775
783
|
};
|
|
776
784
|
if (immediate) {
|
|
777
|
-
this.performFetch(url, params).then(function (response) { return (0,tslib_es6
|
|
778
|
-
return (0,tslib_es6
|
|
785
|
+
this.performFetch(url, params).then(function (response) { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () {
|
|
786
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
779
787
|
switch (_a.label) {
|
|
780
788
|
case 0: return [4, this.transformResponse(response)];
|
|
781
789
|
case 1:
|
|
@@ -785,13 +793,13 @@ var BaseAPI = (function () {
|
|
|
785
793
|
});
|
|
786
794
|
}); });
|
|
787
795
|
return [2, {
|
|
788
|
-
result: api_constants
|
|
796
|
+
result: api_constants.global_constants.SCORM_TRUE,
|
|
789
797
|
errorCode: 0,
|
|
790
798
|
}];
|
|
791
799
|
}
|
|
792
|
-
process = function (url, params, settings) { return (0,tslib_es6
|
|
800
|
+
process = function (url, params, settings) { return (0,tslib_es6.__awaiter)(_this, void 0, void 0, function () {
|
|
793
801
|
var response, e_1;
|
|
794
|
-
return (0,tslib_es6
|
|
802
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
795
803
|
switch (_a.label) {
|
|
796
804
|
case 0:
|
|
797
805
|
_a.trys.push([0, 2, , 3]);
|
|
@@ -802,7 +810,7 @@ var BaseAPI = (function () {
|
|
|
802
810
|
return [2, this.transformResponse(response)];
|
|
803
811
|
case 2:
|
|
804
812
|
e_1 = _a.sent();
|
|
805
|
-
this.apiLog("processHttpRequest", e_1, enums
|
|
813
|
+
this.apiLog("processHttpRequest", e_1, enums.LogLevelEnum.ERROR);
|
|
806
814
|
api.processListeners("CommitError");
|
|
807
815
|
return [2, genericError];
|
|
808
816
|
case 3: return [2];
|
|
@@ -818,14 +826,14 @@ var BaseAPI = (function () {
|
|
|
818
826
|
BaseAPI.prototype.scheduleCommit = function (when, callback) {
|
|
819
827
|
if (!this._timeout) {
|
|
820
828
|
this._timeout = new ScheduledCommit(this, when, callback);
|
|
821
|
-
this.apiLog("scheduleCommit", "scheduled", enums
|
|
829
|
+
this.apiLog("scheduleCommit", "scheduled", enums.LogLevelEnum.DEBUG, "");
|
|
822
830
|
}
|
|
823
831
|
};
|
|
824
832
|
BaseAPI.prototype.clearScheduledCommit = function () {
|
|
825
833
|
if (this._timeout) {
|
|
826
834
|
this._timeout.cancel();
|
|
827
835
|
this._timeout = undefined;
|
|
828
|
-
this.apiLog("clearScheduledCommit", "cleared", enums
|
|
836
|
+
this.apiLog("clearScheduledCommit", "cleared", enums.LogLevelEnum.DEBUG, "");
|
|
829
837
|
}
|
|
830
838
|
};
|
|
831
839
|
BaseAPI.prototype._checkObjectHasProperty = function (refObject, attribute) {
|
|
@@ -834,9 +842,9 @@ var BaseAPI = (function () {
|
|
|
834
842
|
attribute in refObject);
|
|
835
843
|
};
|
|
836
844
|
BaseAPI.prototype.handleValueAccessException = function (e, returnValue) {
|
|
837
|
-
if (e instanceof exceptions
|
|
845
|
+
if (e instanceof exceptions.ValidationError) {
|
|
838
846
|
this.lastErrorCode = String(e.errorCode);
|
|
839
|
-
returnValue = api_constants
|
|
847
|
+
returnValue = api_constants.global_constants.SCORM_FALSE;
|
|
840
848
|
}
|
|
841
849
|
else {
|
|
842
850
|
if (e instanceof Error && e.message) {
|
|
@@ -854,20 +862,20 @@ var BaseAPI = (function () {
|
|
|
854
862
|
var commitObject = this.settings.renderCommonCommitFields
|
|
855
863
|
? this.renderCommitObject(shouldTerminateCommit)
|
|
856
864
|
: this.renderCommitCMI(shouldTerminateCommit);
|
|
857
|
-
if ([enums
|
|
865
|
+
if ([enums.LogLevelEnum.DEBUG, "1", 1, "DEBUG"].includes(this.apiLogLevel)) {
|
|
858
866
|
console.debug("Commit (terminated: " + (terminateCommit ? "yes" : "no") + "): ");
|
|
859
867
|
console.debug(commitObject);
|
|
860
868
|
}
|
|
861
869
|
return commitObject;
|
|
862
870
|
};
|
|
863
871
|
BaseAPI.prototype.performFetch = function (url, params) {
|
|
864
|
-
return (0,tslib_es6
|
|
865
|
-
return (0,tslib_es6
|
|
872
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
873
|
+
return (0,tslib_es6.__generator)(this, function (_a) {
|
|
866
874
|
return [2, fetch(url, {
|
|
867
875
|
method: "POST",
|
|
868
876
|
mode: this.settings.fetchMode,
|
|
869
877
|
body: params instanceof Array ? params.join("&") : JSON.stringify(params),
|
|
870
|
-
headers: (0,tslib_es6
|
|
878
|
+
headers: (0,tslib_es6.__assign)((0,tslib_es6.__assign)({}, this.settings.xhrHeaders), { "Content-Type": this.settings.commitRequestDataType }),
|
|
871
879
|
credentials: this.settings.xhrWithCredentials ? "include" : undefined,
|
|
872
880
|
keepalive: true,
|
|
873
881
|
})];
|
|
@@ -875,9 +883,9 @@ var BaseAPI = (function () {
|
|
|
875
883
|
});
|
|
876
884
|
};
|
|
877
885
|
BaseAPI.prototype.transformResponse = function (response) {
|
|
878
|
-
return (0,tslib_es6
|
|
886
|
+
return (0,tslib_es6.__awaiter)(this, void 0, void 0, function () {
|
|
879
887
|
var result, _a;
|
|
880
|
-
return (0,tslib_es6
|
|
888
|
+
return (0,tslib_es6.__generator)(this, function (_c) {
|
|
881
889
|
switch (_c.label) {
|
|
882
890
|
case 0:
|
|
883
891
|
if (!(typeof this.settings.responseHandler === "function")) return [3, 2];
|
|
@@ -893,8 +901,7 @@ var BaseAPI = (function () {
|
|
|
893
901
|
result = _a;
|
|
894
902
|
if (response.status >= 200 &&
|
|
895
903
|
response.status <= 299 &&
|
|
896
|
-
(result.result === true ||
|
|
897
|
-
result.result === api_constants/* default */.A.global.SCORM_TRUE)) {
|
|
904
|
+
(result.result === true || result.result === api_constants.global_constants.SCORM_TRUE)) {
|
|
898
905
|
this.processListeners("CommitSuccess");
|
|
899
906
|
}
|
|
900
907
|
else {
|
|
@@ -915,8 +922,9 @@ var BaseAPI = (function () {
|
|
|
915
922
|
/***/ 941:
|
|
916
923
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
917
924
|
|
|
925
|
+
__webpack_require__.r(__webpack_exports__);
|
|
918
926
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
919
|
-
/* harmony export */
|
|
927
|
+
/* harmony export */ Scorm12API: function() { return /* binding */ Scorm12Impl; }
|
|
920
928
|
/* harmony export */ });
|
|
921
929
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(635);
|
|
922
930
|
/* harmony import */ var _cmi_scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(989);
|
|
@@ -926,9 +934,9 @@ var BaseAPI = (function () {
|
|
|
926
934
|
/* harmony import */ var _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(176);
|
|
927
935
|
/* harmony import */ var _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(833);
|
|
928
936
|
/* harmony import */ var _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(331);
|
|
929
|
-
/* harmony import */ var
|
|
930
|
-
/* harmony import */ var
|
|
931
|
-
/* harmony import */ var
|
|
937
|
+
/* harmony import */ var _constants_enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(56);
|
|
938
|
+
/* harmony import */ var _BaseAPI__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(429);
|
|
939
|
+
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(417);
|
|
932
940
|
|
|
933
941
|
|
|
934
942
|
|
|
@@ -942,7 +950,7 @@ var BaseAPI = (function () {
|
|
|
942
950
|
|
|
943
951
|
|
|
944
952
|
var Scorm12Impl = (function (_super) {
|
|
945
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
953
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_10__.__extends)(Scorm12Impl, _super);
|
|
946
954
|
function Scorm12Impl(settings) {
|
|
947
955
|
var _this = this;
|
|
948
956
|
if (settings) {
|
|
@@ -950,10 +958,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
950
958
|
settings.mastery_override = false;
|
|
951
959
|
}
|
|
952
960
|
}
|
|
953
|
-
_this = _super.call(this, _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__
|
|
961
|
+
_this = _super.call(this, _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors, settings) || this;
|
|
954
962
|
_this.statusSetByModule = false;
|
|
955
|
-
_this.cmi = new _cmi_scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
956
|
-
_this.nav = new _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__
|
|
963
|
+
_this.cmi = new _cmi_scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__.CMI();
|
|
964
|
+
_this.nav = new _cmi_scorm12_nav__WEBPACK_IMPORTED_MODULE_6__.NAV();
|
|
957
965
|
_this.LMSInitialize = _this.lmsInitialize;
|
|
958
966
|
_this.LMSFinish = _this.lmsFinish;
|
|
959
967
|
_this.LMSGetValue = _this.lmsGetValue;
|
|
@@ -965,9 +973,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
965
973
|
return _this;
|
|
966
974
|
}
|
|
967
975
|
Scorm12Impl.prototype.reset = function (settings) {
|
|
976
|
+
var _a, _b;
|
|
968
977
|
this.commonReset(settings);
|
|
969
|
-
this.cmi
|
|
970
|
-
this.nav
|
|
978
|
+
(_a = this.cmi) === null || _a === void 0 ? void 0 : _a.reset();
|
|
979
|
+
(_b = this.nav) === null || _b === void 0 ? void 0 : _b.reset();
|
|
971
980
|
};
|
|
972
981
|
Scorm12Impl.prototype.lmsInitialize = function () {
|
|
973
982
|
this.cmi.initialize();
|
|
@@ -981,8 +990,8 @@ var Scorm12Impl = (function (_super) {
|
|
|
981
990
|
};
|
|
982
991
|
Scorm12Impl.prototype.lmsFinish = function () {
|
|
983
992
|
var _this = this;
|
|
984
|
-
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
985
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
993
|
+
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(_this, void 0, void 0, function () {
|
|
994
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
986
995
|
switch (_a.label) {
|
|
987
996
|
case 0: return [4, this.internalFinish()];
|
|
988
997
|
case 1:
|
|
@@ -991,17 +1000,17 @@ var Scorm12Impl = (function (_super) {
|
|
|
991
1000
|
}
|
|
992
1001
|
});
|
|
993
1002
|
}); })();
|
|
994
|
-
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1003
|
+
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE;
|
|
995
1004
|
};
|
|
996
1005
|
Scorm12Impl.prototype.internalFinish = function () {
|
|
997
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1006
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(this, void 0, void 0, function () {
|
|
998
1007
|
var result;
|
|
999
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1008
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
1000
1009
|
switch (_a.label) {
|
|
1001
1010
|
case 0: return [4, this.terminate("LMSFinish", true)];
|
|
1002
1011
|
case 1:
|
|
1003
1012
|
result = _a.sent();
|
|
1004
|
-
if (result === _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1013
|
+
if (result === _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE) {
|
|
1005
1014
|
if (this.nav.event !== "") {
|
|
1006
1015
|
if (this.nav.event === "continue") {
|
|
1007
1016
|
this.processListeners("SequenceNext");
|
|
@@ -1034,8 +1043,8 @@ var Scorm12Impl = (function (_super) {
|
|
|
1034
1043
|
this.scheduleCommit(500, "LMSCommit");
|
|
1035
1044
|
}
|
|
1036
1045
|
else {
|
|
1037
|
-
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1038
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1046
|
+
(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(_this, void 0, void 0, function () {
|
|
1047
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_a) {
|
|
1039
1048
|
switch (_a.label) {
|
|
1040
1049
|
case 0: return [4, this.commit("LMSCommit", false)];
|
|
1041
1050
|
case 1:
|
|
@@ -1045,7 +1054,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1045
1054
|
});
|
|
1046
1055
|
}); })();
|
|
1047
1056
|
}
|
|
1048
|
-
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1057
|
+
return _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE;
|
|
1049
1058
|
};
|
|
1050
1059
|
Scorm12Impl.prototype.lmsGetLastError = function () {
|
|
1051
1060
|
return this.getLastError("LMSGetLastError");
|
|
@@ -1063,20 +1072,20 @@ var Scorm12Impl = (function (_super) {
|
|
|
1063
1072
|
return this._commonGetCMIValue("getCMIValue", false, CMIElement);
|
|
1064
1073
|
};
|
|
1065
1074
|
Scorm12Impl.prototype.getChildElement = function (CMIElement, _value, foundFirstIndex) {
|
|
1066
|
-
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1067
|
-
return new _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__
|
|
1075
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.objectives\\.\\d+")) {
|
|
1076
|
+
return new _cmi_scorm12_objectives__WEBPACK_IMPORTED_MODULE_4__.CMIObjectivesObject();
|
|
1068
1077
|
}
|
|
1069
1078
|
else if (foundFirstIndex &&
|
|
1070
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1071
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1079
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+")) {
|
|
1080
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsCorrectResponsesObject();
|
|
1072
1081
|
}
|
|
1073
1082
|
else if (foundFirstIndex &&
|
|
1074
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1075
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1083
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+\\.objectives\\.\\d+")) {
|
|
1084
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsObjectivesObject();
|
|
1076
1085
|
}
|
|
1077
1086
|
else if (!foundFirstIndex &&
|
|
1078
|
-
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1079
|
-
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__
|
|
1087
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_1__.stringMatches)(CMIElement, "cmi\\.interactions\\.\\d+")) {
|
|
1088
|
+
return new _cmi_scorm12_interactions__WEBPACK_IMPORTED_MODULE_5__.CMIInteractionsObject();
|
|
1080
1089
|
}
|
|
1081
1090
|
return null;
|
|
1082
1091
|
};
|
|
@@ -1086,11 +1095,11 @@ var Scorm12Impl = (function (_super) {
|
|
|
1086
1095
|
var basicMessage = "No Error";
|
|
1087
1096
|
var detailMessage = "No Error";
|
|
1088
1097
|
errorNumber = String(errorNumber);
|
|
1089
|
-
if (_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1098
|
+
if (_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber]) {
|
|
1090
1099
|
basicMessage =
|
|
1091
|
-
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1100
|
+
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber].basicMessage;
|
|
1092
1101
|
detailMessage =
|
|
1093
|
-
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1102
|
+
_constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.error_descriptions[errorNumber].detailMessage;
|
|
1094
1103
|
}
|
|
1095
1104
|
return detail ? detailMessage : basicMessage;
|
|
1096
1105
|
};
|
|
@@ -1103,10 +1112,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
1103
1112
|
cmiExport.cmi.core.total_time = this.cmi.getCurrentTotalTime();
|
|
1104
1113
|
}
|
|
1105
1114
|
var result = [];
|
|
1106
|
-
var flattened = _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1115
|
+
var flattened = _utilities__WEBPACK_IMPORTED_MODULE_1__.flatten(cmiExport);
|
|
1107
1116
|
switch (this.settings.dataCommitFormat) {
|
|
1108
1117
|
case "flattened":
|
|
1109
|
-
return _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1118
|
+
return _utilities__WEBPACK_IMPORTED_MODULE_1__.flatten(cmiExport);
|
|
1110
1119
|
case "params":
|
|
1111
1120
|
for (var item in flattened) {
|
|
1112
1121
|
if ({}.hasOwnProperty.call(flattened, item)) {
|
|
@@ -1122,20 +1131,20 @@ var Scorm12Impl = (function (_super) {
|
|
|
1122
1131
|
Scorm12Impl.prototype.renderCommitObject = function (terminateCommit) {
|
|
1123
1132
|
var cmiExport = this.renderCommitCMI(terminateCommit);
|
|
1124
1133
|
var totalTimeHHMMSS = this.cmi.getCurrentTotalTime();
|
|
1125
|
-
var totalTimeSeconds = _utilities__WEBPACK_IMPORTED_MODULE_1__
|
|
1134
|
+
var totalTimeSeconds = _utilities__WEBPACK_IMPORTED_MODULE_1__.getTimeAsSeconds(totalTimeHHMMSS, _constants_regex__WEBPACK_IMPORTED_MODULE_9__.scorm12_regex.CMITimespan);
|
|
1126
1135
|
var lessonStatus = this.cmi.core.lesson_status;
|
|
1127
|
-
var completionStatus =
|
|
1128
|
-
var successStatus =
|
|
1136
|
+
var completionStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.unknown;
|
|
1137
|
+
var successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.unknown;
|
|
1129
1138
|
if (lessonStatus) {
|
|
1130
1139
|
completionStatus =
|
|
1131
1140
|
lessonStatus === "completed" || lessonStatus === "passed"
|
|
1132
|
-
?
|
|
1133
|
-
:
|
|
1141
|
+
? _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.completed
|
|
1142
|
+
: _constants_enums__WEBPACK_IMPORTED_MODULE_7__.CompletionStatus.incomplete;
|
|
1134
1143
|
if (lessonStatus === "passed") {
|
|
1135
|
-
successStatus =
|
|
1144
|
+
successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.passed;
|
|
1136
1145
|
}
|
|
1137
1146
|
else if (lessonStatus === "failed") {
|
|
1138
|
-
successStatus =
|
|
1147
|
+
successStatus = _constants_enums__WEBPACK_IMPORTED_MODULE_7__.SuccessStatus.failed;
|
|
1139
1148
|
}
|
|
1140
1149
|
}
|
|
1141
1150
|
var score = this.cmi.core.score;
|
|
@@ -1164,10 +1173,10 @@ var Scorm12Impl = (function (_super) {
|
|
|
1164
1173
|
return commitObject;
|
|
1165
1174
|
};
|
|
1166
1175
|
Scorm12Impl.prototype.storeData = function (terminateCommit) {
|
|
1167
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1176
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__awaiter)(this, void 0, void 0, function () {
|
|
1168
1177
|
var originalStatus, commitObject;
|
|
1169
1178
|
var _a, _b, _c;
|
|
1170
|
-
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__
|
|
1179
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_10__.__generator)(this, function (_d) {
|
|
1171
1180
|
switch (_d.label) {
|
|
1172
1181
|
case 0:
|
|
1173
1182
|
if (terminateCommit) {
|
|
@@ -1202,7 +1211,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1202
1211
|
return [4, this.processHttpRequest(this.settings.lmsCommitUrl, commitObject, terminateCommit)];
|
|
1203
1212
|
case 1: return [2, _d.sent()];
|
|
1204
1213
|
case 2: return [2, {
|
|
1205
|
-
result: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
1214
|
+
result: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.global_constants.SCORM_TRUE,
|
|
1206
1215
|
errorCode: 0,
|
|
1207
1216
|
}];
|
|
1208
1217
|
}
|
|
@@ -1210,7 +1219,7 @@ var Scorm12Impl = (function (_super) {
|
|
|
1210
1219
|
});
|
|
1211
1220
|
};
|
|
1212
1221
|
return Scorm12Impl;
|
|
1213
|
-
}(
|
|
1222
|
+
}(_BaseAPI__WEBPACK_IMPORTED_MODULE_8__["default"]));
|
|
1214
1223
|
|
|
1215
1224
|
|
|
1216
1225
|
|
|
@@ -1219,29 +1228,40 @@ var Scorm12Impl = (function (_super) {
|
|
|
1219
1228
|
/***/ 589:
|
|
1220
1229
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1221
1230
|
|
|
1231
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1222
1232
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1223
|
-
/* harmony export */
|
|
1233
|
+
/* harmony export */ CMIArray: function() { return /* binding */ CMIArray; }
|
|
1224
1234
|
/* harmony export */ });
|
|
1225
|
-
/* unused harmony export scorm12_error_codes */
|
|
1226
1235
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(635);
|
|
1227
1236
|
/* harmony import */ var _base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
1228
|
-
/* harmony import */ var
|
|
1229
|
-
/* harmony import */ var
|
|
1237
|
+
/* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(784);
|
|
1238
|
+
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(797);
|
|
1230
1239
|
|
|
1231
1240
|
|
|
1232
1241
|
|
|
1233
1242
|
|
|
1234
|
-
var scorm12_error_codes = _constants_error_codes__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.scorm12;
|
|
1235
1243
|
var CMIArray = (function (_super) {
|
|
1236
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_3__
|
|
1244
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(CMIArray, _super);
|
|
1237
1245
|
function CMIArray(params) {
|
|
1238
1246
|
var _this = _super.call(this) || this;
|
|
1239
1247
|
_this.__children = params.children;
|
|
1240
|
-
_this._errorCode = params.errorCode ||
|
|
1241
|
-
_this._errorClass = params.errorClass ||
|
|
1248
|
+
_this._errorCode = params.errorCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.GENERAL;
|
|
1249
|
+
_this._errorClass = params.errorClass || _exceptions__WEBPACK_IMPORTED_MODULE_1__.BaseScormValidationError;
|
|
1242
1250
|
_this.childArray = [];
|
|
1243
1251
|
return _this;
|
|
1244
1252
|
}
|
|
1253
|
+
CMIArray.prototype.reset = function (wipe) {
|
|
1254
|
+
if (wipe === void 0) { wipe = false; }
|
|
1255
|
+
this._initialized = false;
|
|
1256
|
+
if (wipe) {
|
|
1257
|
+
this.childArray = [];
|
|
1258
|
+
}
|
|
1259
|
+
else {
|
|
1260
|
+
for (var i = 0; i < this.childArray.length; i++) {
|
|
1261
|
+
this.childArray[i].reset();
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
};
|
|
1245
1265
|
Object.defineProperty(CMIArray.prototype, "_children", {
|
|
1246
1266
|
get: function () {
|
|
1247
1267
|
return this.__children;
|
|
@@ -1272,7 +1292,7 @@ var CMIArray = (function (_super) {
|
|
|
1272
1292
|
return result;
|
|
1273
1293
|
};
|
|
1274
1294
|
return CMIArray;
|
|
1275
|
-
}(_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
1295
|
+
}(_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
1276
1296
|
|
|
1277
1297
|
|
|
1278
1298
|
|
|
@@ -1281,9 +1301,10 @@ var CMIArray = (function (_super) {
|
|
|
1281
1301
|
/***/ 319:
|
|
1282
1302
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1283
1303
|
|
|
1304
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1284
1305
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1285
|
-
/* harmony export */
|
|
1286
|
-
/* harmony export */
|
|
1306
|
+
/* harmony export */ BaseCMI: function() { return /* binding */ BaseCMI; },
|
|
1307
|
+
/* harmony export */ BaseRootCMI: function() { return /* binding */ BaseRootCMI; }
|
|
1287
1308
|
/* harmony export */ });
|
|
1288
1309
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
1289
1310
|
|
|
@@ -1316,7 +1337,7 @@ var BaseCMI = (function () {
|
|
|
1316
1337
|
}());
|
|
1317
1338
|
|
|
1318
1339
|
var BaseRootCMI = (function (_super) {
|
|
1319
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_0__
|
|
1340
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BaseRootCMI, _super);
|
|
1320
1341
|
function BaseRootCMI() {
|
|
1321
1342
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1322
1343
|
}
|
|
@@ -1330,10 +1351,10 @@ var BaseRootCMI = (function (_super) {
|
|
|
1330
1351
|
/***/ 434:
|
|
1331
1352
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1332
1353
|
|
|
1354
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1333
1355
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1334
|
-
/* harmony export */
|
|
1356
|
+
/* harmony export */ CMIScore: function() { return /* binding */ CMIScore; }
|
|
1335
1357
|
/* harmony export */ });
|
|
1336
|
-
/* unused harmony export scorm12_error_codes */
|
|
1337
1358
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(635);
|
|
1338
1359
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(340);
|
|
1339
1360
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(417);
|
|
@@ -1346,30 +1367,30 @@ var BaseRootCMI = (function (_super) {
|
|
|
1346
1367
|
|
|
1347
1368
|
|
|
1348
1369
|
|
|
1349
|
-
var scorm12_constants = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm12;
|
|
1350
|
-
var scorm12_regex = _constants_regex__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.scorm12;
|
|
1351
|
-
var scorm12_error_codes = _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A.scorm12;
|
|
1352
1370
|
var CMIScore = (function (_super) {
|
|
1353
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_4__
|
|
1371
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(CMIScore, _super);
|
|
1354
1372
|
function CMIScore(params) {
|
|
1355
1373
|
var _this = _super.call(this) || this;
|
|
1356
1374
|
_this._raw = "";
|
|
1357
1375
|
_this._min = "";
|
|
1358
|
-
_this.__children = params.score_children || scorm12_constants.score_children;
|
|
1376
|
+
_this.__children = params.score_children || _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__.scorm12_constants.score_children;
|
|
1359
1377
|
_this.__score_range = !params.score_range
|
|
1360
1378
|
? false
|
|
1361
|
-
: scorm12_regex.score_range;
|
|
1379
|
+
: _constants_regex__WEBPACK_IMPORTED_MODULE_1__.scorm12_regex.score_range;
|
|
1362
1380
|
_this._max = params.max || params.max === "" ? params.max : "100";
|
|
1363
1381
|
_this.__invalid_error_code =
|
|
1364
|
-
params.invalidErrorCode ||
|
|
1382
|
+
params.invalidErrorCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.INVALID_SET_VALUE;
|
|
1365
1383
|
_this.__invalid_type_code =
|
|
1366
|
-
params.invalidTypeCode ||
|
|
1384
|
+
params.invalidTypeCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.TYPE_MISMATCH;
|
|
1367
1385
|
_this.__invalid_range_code =
|
|
1368
|
-
params.invalidRangeCode ||
|
|
1369
|
-
_this.__decimal_regex = params.decimalRegex || scorm12_regex.CMIDecimal;
|
|
1386
|
+
params.invalidRangeCode || _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.VALUE_OUT_OF_RANGE;
|
|
1387
|
+
_this.__decimal_regex = params.decimalRegex || _constants_regex__WEBPACK_IMPORTED_MODULE_1__.scorm12_regex.CMIDecimal;
|
|
1370
1388
|
_this.__error_class = params.errorClass;
|
|
1371
1389
|
return _this;
|
|
1372
1390
|
}
|
|
1391
|
+
CMIScore.prototype.reset = function () {
|
|
1392
|
+
this._initialized = false;
|
|
1393
|
+
};
|
|
1373
1394
|
Object.defineProperty(CMIScore.prototype, "_children", {
|
|
1374
1395
|
get: function () {
|
|
1375
1396
|
return this.__children;
|
|
@@ -1385,9 +1406,9 @@ var CMIScore = (function (_super) {
|
|
|
1385
1406
|
return this._raw;
|
|
1386
1407
|
},
|
|
1387
1408
|
set: function (raw) {
|
|
1388
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1409
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(raw, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1389
1410
|
(!this.__score_range ||
|
|
1390
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1411
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(raw, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1391
1412
|
this._raw = raw;
|
|
1392
1413
|
}
|
|
1393
1414
|
},
|
|
@@ -1399,9 +1420,9 @@ var CMIScore = (function (_super) {
|
|
|
1399
1420
|
return this._min;
|
|
1400
1421
|
},
|
|
1401
1422
|
set: function (min) {
|
|
1402
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1423
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(min, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1403
1424
|
(!this.__score_range ||
|
|
1404
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1425
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(min, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1405
1426
|
this._min = min;
|
|
1406
1427
|
}
|
|
1407
1428
|
},
|
|
@@ -1413,9 +1434,9 @@ var CMIScore = (function (_super) {
|
|
|
1413
1434
|
return this._max;
|
|
1414
1435
|
},
|
|
1415
1436
|
set: function (max) {
|
|
1416
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1437
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidFormat)(max, this.__decimal_regex, this.__invalid_type_code, this.__error_class) &&
|
|
1417
1438
|
(!this.__score_range ||
|
|
1418
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
1439
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.checkValidRange)(max, this.__score_range, this.__invalid_range_code, this.__error_class))) {
|
|
1419
1440
|
this._max = max;
|
|
1420
1441
|
}
|
|
1421
1442
|
},
|
|
@@ -1433,7 +1454,7 @@ var CMIScore = (function (_super) {
|
|
|
1433
1454
|
return result;
|
|
1434
1455
|
};
|
|
1435
1456
|
return CMIScore;
|
|
1436
|
-
}(_base_cmi__WEBPACK_IMPORTED_MODULE_2__
|
|
1457
|
+
}(_base_cmi__WEBPACK_IMPORTED_MODULE_2__.BaseCMI));
|
|
1437
1458
|
|
|
1438
1459
|
|
|
1439
1460
|
|
|
@@ -1442,9 +1463,10 @@ var CMIScore = (function (_super) {
|
|
|
1442
1463
|
/***/ 449:
|
|
1443
1464
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1444
1465
|
|
|
1466
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1445
1467
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1446
|
-
/* harmony export */
|
|
1447
|
-
/* harmony export */
|
|
1468
|
+
/* harmony export */ checkValidFormat: function() { return /* binding */ checkValidFormat; },
|
|
1469
|
+
/* harmony export */ checkValidRange: function() { return /* binding */ checkValidRange; }
|
|
1448
1470
|
/* harmony export */ });
|
|
1449
1471
|
function checkValidFormat(value, regexPattern, errorCode, errorClass, allowEmptyString) {
|
|
1450
1472
|
if (typeof value !== "string") {
|
|
@@ -1482,10 +1504,12 @@ function checkValidRange(value, rangePattern, errorCode, errorClass) {
|
|
|
1482
1504
|
/***/ 989:
|
|
1483
1505
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1484
1506
|
|
|
1507
|
+
// ESM COMPAT FLAG
|
|
1508
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1485
1509
|
|
|
1486
1510
|
// EXPORTS
|
|
1487
1511
|
__webpack_require__.d(__webpack_exports__, {
|
|
1488
|
-
|
|
1512
|
+
CMI: function() { return /* binding */ CMI; }
|
|
1489
1513
|
});
|
|
1490
1514
|
|
|
1491
1515
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
|
|
@@ -1496,8 +1520,8 @@ var api_constants = __webpack_require__(340);
|
|
|
1496
1520
|
var error_codes = __webpack_require__(797);
|
|
1497
1521
|
// EXTERNAL MODULE: ./src/constants/regex.ts
|
|
1498
1522
|
var regex = __webpack_require__(417);
|
|
1499
|
-
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
1500
|
-
var
|
|
1523
|
+
// EXTERNAL MODULE: ./src/exceptions/scorm12_exceptions.ts
|
|
1524
|
+
var scorm12_exceptions = __webpack_require__(179);
|
|
1501
1525
|
// EXTERNAL MODULE: ./src/cmi/common/base_cmi.ts
|
|
1502
1526
|
var base_cmi = __webpack_require__(319);
|
|
1503
1527
|
// EXTERNAL MODULE: ./src/cmi/scorm12/validation.ts
|
|
@@ -1517,10 +1541,10 @@ var utilities = __webpack_require__(864);
|
|
|
1517
1541
|
|
|
1518
1542
|
|
|
1519
1543
|
var CMICore = (function (_super) {
|
|
1520
|
-
(0,tslib_es6
|
|
1544
|
+
(0,tslib_es6.__extends)(CMICore, _super);
|
|
1521
1545
|
function CMICore() {
|
|
1522
1546
|
var _this = _super.call(this) || this;
|
|
1523
|
-
_this.__children = api_constants
|
|
1547
|
+
_this.__children = api_constants.scorm12_constants.core_children;
|
|
1524
1548
|
_this._student_id = "";
|
|
1525
1549
|
_this._student_name = "";
|
|
1526
1550
|
_this._lesson_location = "";
|
|
@@ -1532,13 +1556,13 @@ var CMICore = (function (_super) {
|
|
|
1532
1556
|
_this._exit = "";
|
|
1533
1557
|
_this._session_time = "00:00:00";
|
|
1534
1558
|
_this._suspend_data = "";
|
|
1535
|
-
_this.score = new score
|
|
1536
|
-
score_children: api_constants
|
|
1537
|
-
score_range: regex
|
|
1538
|
-
invalidErrorCode: error_codes
|
|
1539
|
-
invalidTypeCode: error_codes
|
|
1540
|
-
invalidRangeCode: error_codes
|
|
1541
|
-
errorClass:
|
|
1559
|
+
_this.score = new score.CMIScore({
|
|
1560
|
+
score_children: api_constants.scorm12_constants.score_children,
|
|
1561
|
+
score_range: regex.scorm12_regex.score_range,
|
|
1562
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
1563
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
1564
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
1565
|
+
errorClass: scorm12_exceptions.Scorm12ValidationError,
|
|
1542
1566
|
});
|
|
1543
1567
|
return _this;
|
|
1544
1568
|
}
|
|
@@ -1547,12 +1571,20 @@ var CMICore = (function (_super) {
|
|
|
1547
1571
|
_super.prototype.initialize.call(this);
|
|
1548
1572
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
1549
1573
|
};
|
|
1574
|
+
CMICore.prototype.reset = function () {
|
|
1575
|
+
var _a;
|
|
1576
|
+
this._initialized = false;
|
|
1577
|
+
this._exit = "";
|
|
1578
|
+
this._entry = "";
|
|
1579
|
+
this._session_time = "00:00:00";
|
|
1580
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
1581
|
+
};
|
|
1550
1582
|
Object.defineProperty(CMICore.prototype, "_children", {
|
|
1551
1583
|
get: function () {
|
|
1552
1584
|
return this.__children;
|
|
1553
1585
|
},
|
|
1554
1586
|
set: function (_children) {
|
|
1555
|
-
throw new
|
|
1587
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1556
1588
|
},
|
|
1557
1589
|
enumerable: false,
|
|
1558
1590
|
configurable: true
|
|
@@ -1563,7 +1595,7 @@ var CMICore = (function (_super) {
|
|
|
1563
1595
|
},
|
|
1564
1596
|
set: function (student_id) {
|
|
1565
1597
|
if (this.initialized) {
|
|
1566
|
-
throw new
|
|
1598
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1567
1599
|
}
|
|
1568
1600
|
else {
|
|
1569
1601
|
this._student_id = student_id;
|
|
@@ -1578,7 +1610,7 @@ var CMICore = (function (_super) {
|
|
|
1578
1610
|
},
|
|
1579
1611
|
set: function (student_name) {
|
|
1580
1612
|
if (this.initialized) {
|
|
1581
|
-
throw new
|
|
1613
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1582
1614
|
}
|
|
1583
1615
|
else {
|
|
1584
1616
|
this._student_name = student_name;
|
|
@@ -1592,7 +1624,7 @@ var CMICore = (function (_super) {
|
|
|
1592
1624
|
return this._lesson_location;
|
|
1593
1625
|
},
|
|
1594
1626
|
set: function (lesson_location) {
|
|
1595
|
-
if ((0,validation
|
|
1627
|
+
if ((0,validation.check12ValidFormat)(lesson_location, regex.scorm12_regex.CMIString256, true)) {
|
|
1596
1628
|
this._lesson_location = lesson_location;
|
|
1597
1629
|
}
|
|
1598
1630
|
},
|
|
@@ -1605,7 +1637,7 @@ var CMICore = (function (_super) {
|
|
|
1605
1637
|
},
|
|
1606
1638
|
set: function (credit) {
|
|
1607
1639
|
if (this.initialized) {
|
|
1608
|
-
throw new
|
|
1640
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1609
1641
|
}
|
|
1610
1642
|
else {
|
|
1611
1643
|
this._credit = credit;
|
|
@@ -1620,12 +1652,12 @@ var CMICore = (function (_super) {
|
|
|
1620
1652
|
},
|
|
1621
1653
|
set: function (lesson_status) {
|
|
1622
1654
|
if (this.initialized) {
|
|
1623
|
-
if ((0,validation
|
|
1655
|
+
if ((0,validation.check12ValidFormat)(lesson_status, regex.scorm12_regex.CMIStatus)) {
|
|
1624
1656
|
this._lesson_status = lesson_status;
|
|
1625
1657
|
}
|
|
1626
1658
|
}
|
|
1627
1659
|
else {
|
|
1628
|
-
if ((0,validation
|
|
1660
|
+
if ((0,validation.check12ValidFormat)(lesson_status, regex.scorm12_regex.CMIStatus2)) {
|
|
1629
1661
|
this._lesson_status = lesson_status;
|
|
1630
1662
|
}
|
|
1631
1663
|
}
|
|
@@ -1639,7 +1671,7 @@ var CMICore = (function (_super) {
|
|
|
1639
1671
|
},
|
|
1640
1672
|
set: function (entry) {
|
|
1641
1673
|
if (this.initialized) {
|
|
1642
|
-
throw new
|
|
1674
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1643
1675
|
}
|
|
1644
1676
|
else {
|
|
1645
1677
|
this._entry = entry;
|
|
@@ -1654,7 +1686,7 @@ var CMICore = (function (_super) {
|
|
|
1654
1686
|
},
|
|
1655
1687
|
set: function (total_time) {
|
|
1656
1688
|
if (this.initialized) {
|
|
1657
|
-
throw new
|
|
1689
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1658
1690
|
}
|
|
1659
1691
|
else {
|
|
1660
1692
|
this._total_time = total_time;
|
|
@@ -1669,7 +1701,7 @@ var CMICore = (function (_super) {
|
|
|
1669
1701
|
},
|
|
1670
1702
|
set: function (lesson_mode) {
|
|
1671
1703
|
if (this.initialized) {
|
|
1672
|
-
throw new
|
|
1704
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1673
1705
|
}
|
|
1674
1706
|
else {
|
|
1675
1707
|
this._lesson_mode = lesson_mode;
|
|
@@ -1681,12 +1713,12 @@ var CMICore = (function (_super) {
|
|
|
1681
1713
|
Object.defineProperty(CMICore.prototype, "exit", {
|
|
1682
1714
|
get: function () {
|
|
1683
1715
|
if (!this.jsonString) {
|
|
1684
|
-
throw new
|
|
1716
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1685
1717
|
}
|
|
1686
1718
|
return this._exit;
|
|
1687
1719
|
},
|
|
1688
1720
|
set: function (exit) {
|
|
1689
|
-
if ((0,validation
|
|
1721
|
+
if ((0,validation.check12ValidFormat)(exit, regex.scorm12_regex.CMIExit, true)) {
|
|
1690
1722
|
this._exit = exit;
|
|
1691
1723
|
}
|
|
1692
1724
|
},
|
|
@@ -1696,12 +1728,12 @@ var CMICore = (function (_super) {
|
|
|
1696
1728
|
Object.defineProperty(CMICore.prototype, "session_time", {
|
|
1697
1729
|
get: function () {
|
|
1698
1730
|
if (!this.jsonString) {
|
|
1699
|
-
throw new
|
|
1731
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1700
1732
|
}
|
|
1701
1733
|
return this._session_time;
|
|
1702
1734
|
},
|
|
1703
1735
|
set: function (session_time) {
|
|
1704
|
-
if ((0,validation
|
|
1736
|
+
if ((0,validation.check12ValidFormat)(session_time, regex.scorm12_regex.CMITimespan)) {
|
|
1705
1737
|
this._session_time = session_time;
|
|
1706
1738
|
}
|
|
1707
1739
|
},
|
|
@@ -1713,7 +1745,7 @@ var CMICore = (function (_super) {
|
|
|
1713
1745
|
return this._suspend_data;
|
|
1714
1746
|
},
|
|
1715
1747
|
set: function (suspend_data) {
|
|
1716
|
-
if ((0,validation
|
|
1748
|
+
if ((0,validation.check12ValidFormat)(suspend_data, regex.scorm12_regex.CMIString4096, true)) {
|
|
1717
1749
|
this._suspend_data = suspend_data;
|
|
1718
1750
|
}
|
|
1719
1751
|
},
|
|
@@ -1725,9 +1757,9 @@ var CMICore = (function (_super) {
|
|
|
1725
1757
|
var startTime = start_time;
|
|
1726
1758
|
if (typeof startTime !== "undefined" && startTime !== null) {
|
|
1727
1759
|
var seconds = new Date().getTime() - startTime;
|
|
1728
|
-
sessionTime = utilities
|
|
1760
|
+
sessionTime = utilities.getSecondsAsHHMMSS(seconds / 1000);
|
|
1729
1761
|
}
|
|
1730
|
-
return utilities
|
|
1762
|
+
return utilities.addHHMMSSTimeStrings(this._total_time, sessionTime, new RegExp(regex.scorm12_regex.CMITimespan));
|
|
1731
1763
|
};
|
|
1732
1764
|
CMICore.prototype.toJSON = function () {
|
|
1733
1765
|
this.jsonString = true;
|
|
@@ -1747,7 +1779,7 @@ var CMICore = (function (_super) {
|
|
|
1747
1779
|
return result;
|
|
1748
1780
|
};
|
|
1749
1781
|
return CMICore;
|
|
1750
|
-
}(base_cmi
|
|
1782
|
+
}(base_cmi.BaseCMI));
|
|
1751
1783
|
|
|
1752
1784
|
|
|
1753
1785
|
// EXTERNAL MODULE: ./src/cmi/scorm12/objectives.ts
|
|
@@ -1772,7 +1804,7 @@ var interactions = __webpack_require__(833);
|
|
|
1772
1804
|
|
|
1773
1805
|
|
|
1774
1806
|
var CMI = (function (_super) {
|
|
1775
|
-
(0,tslib_es6
|
|
1807
|
+
(0,tslib_es6.__extends)(CMI, _super);
|
|
1776
1808
|
function CMI(cmi_children, student_data, initialized) {
|
|
1777
1809
|
var _this = _super.call(this) || this;
|
|
1778
1810
|
_this.__children = "";
|
|
@@ -1784,14 +1816,25 @@ var CMI = (function (_super) {
|
|
|
1784
1816
|
_this.initialize();
|
|
1785
1817
|
_this.__children = cmi_children
|
|
1786
1818
|
? cmi_children
|
|
1787
|
-
: api_constants
|
|
1819
|
+
: api_constants.scorm12_constants.cmi_children;
|
|
1788
1820
|
_this.core = new CMICore();
|
|
1789
|
-
_this.objectives = new objectives
|
|
1790
|
-
_this.student_data = student_data ? student_data : new scorm12_student_data
|
|
1791
|
-
_this.student_preference = new student_preference
|
|
1792
|
-
_this.interactions = new interactions
|
|
1821
|
+
_this.objectives = new objectives.CMIObjectives();
|
|
1822
|
+
_this.student_data = student_data ? student_data : new scorm12_student_data.CMIStudentData();
|
|
1823
|
+
_this.student_preference = new student_preference.CMIStudentPreference();
|
|
1824
|
+
_this.interactions = new interactions.CMIInteractions();
|
|
1793
1825
|
return _this;
|
|
1794
1826
|
}
|
|
1827
|
+
CMI.prototype.reset = function () {
|
|
1828
|
+
var _a, _b, _c;
|
|
1829
|
+
this._initialized = false;
|
|
1830
|
+
this._launch_data = "";
|
|
1831
|
+
this._comments = "";
|
|
1832
|
+
(_a = this.core) === null || _a === void 0 ? void 0 : _a.reset();
|
|
1833
|
+
this.objectives = new objectives.CMIObjectives();
|
|
1834
|
+
this.interactions = new interactions.CMIInteractions();
|
|
1835
|
+
(_b = this.student_data) === null || _b === void 0 ? void 0 : _b.reset();
|
|
1836
|
+
(_c = this.student_preference) === null || _c === void 0 ? void 0 : _c.reset();
|
|
1837
|
+
};
|
|
1795
1838
|
CMI.prototype.initialize = function () {
|
|
1796
1839
|
var _a, _b, _c, _d, _e;
|
|
1797
1840
|
_super.prototype.initialize.call(this);
|
|
@@ -1822,7 +1865,7 @@ var CMI = (function (_super) {
|
|
|
1822
1865
|
return this.__version;
|
|
1823
1866
|
},
|
|
1824
1867
|
set: function (_version) {
|
|
1825
|
-
throw new
|
|
1868
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1826
1869
|
},
|
|
1827
1870
|
enumerable: false,
|
|
1828
1871
|
configurable: true
|
|
@@ -1832,7 +1875,7 @@ var CMI = (function (_super) {
|
|
|
1832
1875
|
return this.__children;
|
|
1833
1876
|
},
|
|
1834
1877
|
set: function (_children) {
|
|
1835
|
-
throw new
|
|
1878
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.INVALID_SET_VALUE);
|
|
1836
1879
|
},
|
|
1837
1880
|
enumerable: false,
|
|
1838
1881
|
configurable: true
|
|
@@ -1856,7 +1899,7 @@ var CMI = (function (_super) {
|
|
|
1856
1899
|
},
|
|
1857
1900
|
set: function (launch_data) {
|
|
1858
1901
|
if (this.initialized) {
|
|
1859
|
-
throw new
|
|
1902
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1860
1903
|
}
|
|
1861
1904
|
else {
|
|
1862
1905
|
this._launch_data = launch_data;
|
|
@@ -1870,7 +1913,7 @@ var CMI = (function (_super) {
|
|
|
1870
1913
|
return this._comments;
|
|
1871
1914
|
},
|
|
1872
1915
|
set: function (comments) {
|
|
1873
|
-
if ((0,validation
|
|
1916
|
+
if ((0,validation.check12ValidFormat)(comments, regex.scorm12_regex.CMIString4096, true)) {
|
|
1874
1917
|
this._comments = comments;
|
|
1875
1918
|
}
|
|
1876
1919
|
},
|
|
@@ -1883,7 +1926,7 @@ var CMI = (function (_super) {
|
|
|
1883
1926
|
},
|
|
1884
1927
|
set: function (comments_from_lms) {
|
|
1885
1928
|
if (this.initialized) {
|
|
1886
|
-
throw new
|
|
1929
|
+
throw new scorm12_exceptions.Scorm12ValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
1887
1930
|
}
|
|
1888
1931
|
else {
|
|
1889
1932
|
this._comments_from_lms = comments_from_lms;
|
|
@@ -1896,7 +1939,7 @@ var CMI = (function (_super) {
|
|
|
1896
1939
|
return this.core.getCurrentTotalTime(this.start_time);
|
|
1897
1940
|
};
|
|
1898
1941
|
return CMI;
|
|
1899
|
-
}(base_cmi
|
|
1942
|
+
}(base_cmi.BaseRootCMI));
|
|
1900
1943
|
|
|
1901
1944
|
|
|
1902
1945
|
|
|
@@ -1905,17 +1948,18 @@ var CMI = (function (_super) {
|
|
|
1905
1948
|
/***/ 833:
|
|
1906
1949
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1907
1950
|
|
|
1951
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1908
1952
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1909
|
-
/* harmony export */
|
|
1910
|
-
/* harmony export */
|
|
1911
|
-
/* harmony export */
|
|
1912
|
-
/* harmony export */
|
|
1953
|
+
/* harmony export */ CMIInteractions: function() { return /* binding */ CMIInteractions; },
|
|
1954
|
+
/* harmony export */ CMIInteractionsCorrectResponsesObject: function() { return /* binding */ CMIInteractionsCorrectResponsesObject; },
|
|
1955
|
+
/* harmony export */ CMIInteractionsObject: function() { return /* binding */ CMIInteractionsObject; },
|
|
1956
|
+
/* harmony export */ CMIInteractionsObjectivesObject: function() { return /* binding */ CMIInteractionsObjectivesObject; }
|
|
1913
1957
|
/* harmony export */ });
|
|
1914
1958
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(635);
|
|
1915
1959
|
/* harmony import */ var _common_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(589);
|
|
1916
1960
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
1917
1961
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(797);
|
|
1918
|
-
/* harmony import */ var
|
|
1962
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(179);
|
|
1919
1963
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(319);
|
|
1920
1964
|
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(915);
|
|
1921
1965
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(417);
|
|
@@ -1928,19 +1972,19 @@ var CMI = (function (_super) {
|
|
|
1928
1972
|
|
|
1929
1973
|
|
|
1930
1974
|
var CMIInteractions = (function (_super) {
|
|
1931
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
1975
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractions, _super);
|
|
1932
1976
|
function CMIInteractions() {
|
|
1933
1977
|
return _super.call(this, {
|
|
1934
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
1935
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1936
|
-
errorClass:
|
|
1978
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.interactions_children,
|
|
1979
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
1980
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
1937
1981
|
}) || this;
|
|
1938
1982
|
}
|
|
1939
1983
|
return CMIInteractions;
|
|
1940
|
-
}(_common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1984
|
+
}(_common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray));
|
|
1941
1985
|
|
|
1942
1986
|
var CMIInteractionsObject = (function (_super) {
|
|
1943
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
1987
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsObject, _super);
|
|
1944
1988
|
function CMIInteractionsObject() {
|
|
1945
1989
|
var _this = _super.call(this) || this;
|
|
1946
1990
|
_this._id = "";
|
|
@@ -1950,15 +1994,15 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1950
1994
|
_this._student_response = "";
|
|
1951
1995
|
_this._result = "";
|
|
1952
1996
|
_this._latency = "";
|
|
1953
|
-
_this.objectives = new _common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1954
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1955
|
-
errorClass:
|
|
1956
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
1997
|
+
_this.objectives = new _common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray({
|
|
1998
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
1999
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
2000
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.objectives_children,
|
|
1957
2001
|
});
|
|
1958
|
-
_this.correct_responses = new _common_array__WEBPACK_IMPORTED_MODULE_0__
|
|
1959
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__
|
|
1960
|
-
errorClass:
|
|
1961
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
2002
|
+
_this.correct_responses = new _common_array__WEBPACK_IMPORTED_MODULE_0__.CMIArray({
|
|
2003
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.INVALID_SET_VALUE,
|
|
2004
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError,
|
|
2005
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.correct_responses_children,
|
|
1962
2006
|
});
|
|
1963
2007
|
return _this;
|
|
1964
2008
|
}
|
|
@@ -1968,15 +2012,28 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1968
2012
|
(_a = this.objectives) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
1969
2013
|
(_b = this.correct_responses) === null || _b === void 0 ? void 0 : _b.initialize();
|
|
1970
2014
|
};
|
|
2015
|
+
CMIInteractionsObject.prototype.reset = function () {
|
|
2016
|
+
var _a, _b;
|
|
2017
|
+
this._initialized = false;
|
|
2018
|
+
this._id = "";
|
|
2019
|
+
this._time = "";
|
|
2020
|
+
this._type = "";
|
|
2021
|
+
this._weighting = "";
|
|
2022
|
+
this._student_response = "";
|
|
2023
|
+
this._result = "";
|
|
2024
|
+
this._latency = "";
|
|
2025
|
+
(_a = this.objectives) === null || _a === void 0 ? void 0 : _a.reset();
|
|
2026
|
+
(_b = this.correct_responses) === null || _b === void 0 ? void 0 : _b.reset();
|
|
2027
|
+
};
|
|
1971
2028
|
Object.defineProperty(CMIInteractionsObject.prototype, "id", {
|
|
1972
2029
|
get: function () {
|
|
1973
2030
|
if (!this.jsonString) {
|
|
1974
|
-
throw new
|
|
2031
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1975
2032
|
}
|
|
1976
2033
|
return this._id;
|
|
1977
2034
|
},
|
|
1978
2035
|
set: function (id) {
|
|
1979
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2036
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIIdentifier)) {
|
|
1980
2037
|
this._id = id;
|
|
1981
2038
|
}
|
|
1982
2039
|
},
|
|
@@ -1986,12 +2043,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
1986
2043
|
Object.defineProperty(CMIInteractionsObject.prototype, "time", {
|
|
1987
2044
|
get: function () {
|
|
1988
2045
|
if (!this.jsonString) {
|
|
1989
|
-
throw new
|
|
2046
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
1990
2047
|
}
|
|
1991
2048
|
return this._time;
|
|
1992
2049
|
},
|
|
1993
2050
|
set: function (time) {
|
|
1994
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2051
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(time, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMITime)) {
|
|
1995
2052
|
this._time = time;
|
|
1996
2053
|
}
|
|
1997
2054
|
},
|
|
@@ -2001,12 +2058,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2001
2058
|
Object.defineProperty(CMIInteractionsObject.prototype, "type", {
|
|
2002
2059
|
get: function () {
|
|
2003
2060
|
if (!this.jsonString) {
|
|
2004
|
-
throw new
|
|
2061
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2005
2062
|
}
|
|
2006
2063
|
return this._type;
|
|
2007
2064
|
},
|
|
2008
2065
|
set: function (type) {
|
|
2009
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2066
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(type, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIType)) {
|
|
2010
2067
|
this._type = type;
|
|
2011
2068
|
}
|
|
2012
2069
|
},
|
|
@@ -2016,13 +2073,13 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2016
2073
|
Object.defineProperty(CMIInteractionsObject.prototype, "weighting", {
|
|
2017
2074
|
get: function () {
|
|
2018
2075
|
if (!this.jsonString) {
|
|
2019
|
-
throw new
|
|
2076
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2020
2077
|
}
|
|
2021
2078
|
return this._weighting;
|
|
2022
2079
|
},
|
|
2023
2080
|
set: function (weighting) {
|
|
2024
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2025
|
-
(0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2081
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(weighting, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIDecimal) &&
|
|
2082
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidRange)(weighting, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.weighting_range)) {
|
|
2026
2083
|
this._weighting = weighting;
|
|
2027
2084
|
}
|
|
2028
2085
|
},
|
|
@@ -2032,12 +2089,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2032
2089
|
Object.defineProperty(CMIInteractionsObject.prototype, "student_response", {
|
|
2033
2090
|
get: function () {
|
|
2034
2091
|
if (!this.jsonString) {
|
|
2035
|
-
throw new
|
|
2092
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2036
2093
|
}
|
|
2037
2094
|
return this._student_response;
|
|
2038
2095
|
},
|
|
2039
2096
|
set: function (student_response) {
|
|
2040
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2097
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(student_response, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIFeedback, true)) {
|
|
2041
2098
|
this._student_response = student_response;
|
|
2042
2099
|
}
|
|
2043
2100
|
},
|
|
@@ -2047,12 +2104,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2047
2104
|
Object.defineProperty(CMIInteractionsObject.prototype, "result", {
|
|
2048
2105
|
get: function () {
|
|
2049
2106
|
if (!this.jsonString) {
|
|
2050
|
-
throw new
|
|
2107
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2051
2108
|
}
|
|
2052
2109
|
return this._result;
|
|
2053
2110
|
},
|
|
2054
2111
|
set: function (result) {
|
|
2055
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2112
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(result, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIResult)) {
|
|
2056
2113
|
this._result = result;
|
|
2057
2114
|
}
|
|
2058
2115
|
},
|
|
@@ -2062,12 +2119,12 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2062
2119
|
Object.defineProperty(CMIInteractionsObject.prototype, "latency", {
|
|
2063
2120
|
get: function () {
|
|
2064
2121
|
if (!this.jsonString) {
|
|
2065
|
-
throw new
|
|
2122
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2066
2123
|
}
|
|
2067
2124
|
return this._latency;
|
|
2068
2125
|
},
|
|
2069
2126
|
set: function (latency) {
|
|
2070
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2127
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(latency, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMITimespan)) {
|
|
2071
2128
|
this._latency = latency;
|
|
2072
2129
|
}
|
|
2073
2130
|
},
|
|
@@ -2091,21 +2148,25 @@ var CMIInteractionsObject = (function (_super) {
|
|
|
2091
2148
|
return result;
|
|
2092
2149
|
};
|
|
2093
2150
|
return CMIInteractionsObject;
|
|
2094
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2151
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2095
2152
|
|
|
2096
2153
|
var CMIInteractionsObjectivesObject = (function (_super) {
|
|
2097
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
2154
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsObjectivesObject, _super);
|
|
2098
2155
|
function CMIInteractionsObjectivesObject() {
|
|
2099
2156
|
var _this = _super.call(this) || this;
|
|
2100
2157
|
_this._id = "";
|
|
2101
2158
|
return _this;
|
|
2102
2159
|
}
|
|
2160
|
+
CMIInteractionsObjectivesObject.prototype.reset = function () {
|
|
2161
|
+
this._initialized = false;
|
|
2162
|
+
this._id = "";
|
|
2163
|
+
};
|
|
2103
2164
|
Object.defineProperty(CMIInteractionsObjectivesObject.prototype, "id", {
|
|
2104
2165
|
get: function () {
|
|
2105
2166
|
return this._id;
|
|
2106
2167
|
},
|
|
2107
2168
|
set: function (id) {
|
|
2108
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2169
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIIdentifier)) {
|
|
2109
2170
|
this._id = id;
|
|
2110
2171
|
}
|
|
2111
2172
|
},
|
|
@@ -2121,24 +2182,28 @@ var CMIInteractionsObjectivesObject = (function (_super) {
|
|
|
2121
2182
|
return result;
|
|
2122
2183
|
};
|
|
2123
2184
|
return CMIInteractionsObjectivesObject;
|
|
2124
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2185
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2125
2186
|
|
|
2126
2187
|
var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
2127
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_7__
|
|
2188
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CMIInteractionsCorrectResponsesObject, _super);
|
|
2128
2189
|
function CMIInteractionsCorrectResponsesObject() {
|
|
2129
2190
|
var _this = _super.call(this) || this;
|
|
2130
2191
|
_this._pattern = "";
|
|
2131
2192
|
return _this;
|
|
2132
2193
|
}
|
|
2194
|
+
CMIInteractionsCorrectResponsesObject.prototype.reset = function () {
|
|
2195
|
+
this._initialized = false;
|
|
2196
|
+
this._pattern = "";
|
|
2197
|
+
};
|
|
2133
2198
|
Object.defineProperty(CMIInteractionsCorrectResponsesObject.prototype, "pattern", {
|
|
2134
2199
|
get: function () {
|
|
2135
2200
|
if (!this.jsonString) {
|
|
2136
|
-
throw new
|
|
2201
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_3__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_2__.scorm12_errors.WRITE_ONLY_ELEMENT);
|
|
2137
2202
|
}
|
|
2138
2203
|
return this._pattern;
|
|
2139
2204
|
},
|
|
2140
2205
|
set: function (pattern) {
|
|
2141
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__
|
|
2206
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_5__.check12ValidFormat)(pattern, _constants_regex__WEBPACK_IMPORTED_MODULE_6__.scorm12_regex.CMIFeedback, true)) {
|
|
2142
2207
|
this._pattern = pattern;
|
|
2143
2208
|
}
|
|
2144
2209
|
},
|
|
@@ -2154,7 +2219,7 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2154
2219
|
return result;
|
|
2155
2220
|
};
|
|
2156
2221
|
return CMIInteractionsCorrectResponsesObject;
|
|
2157
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__
|
|
2222
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_4__.BaseCMI));
|
|
2158
2223
|
|
|
2159
2224
|
|
|
2160
2225
|
|
|
@@ -2163,8 +2228,9 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2163
2228
|
/***/ 331:
|
|
2164
2229
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2165
2230
|
|
|
2231
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2166
2232
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2167
|
-
/* harmony export */
|
|
2233
|
+
/* harmony export */ NAV: function() { return /* binding */ NAV; }
|
|
2168
2234
|
/* harmony export */ });
|
|
2169
2235
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(635);
|
|
2170
2236
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
@@ -2175,18 +2241,22 @@ var CMIInteractionsCorrectResponsesObject = (function (_super) {
|
|
|
2175
2241
|
|
|
2176
2242
|
|
|
2177
2243
|
var NAV = (function (_super) {
|
|
2178
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_3__
|
|
2244
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(NAV, _super);
|
|
2179
2245
|
function NAV() {
|
|
2180
2246
|
var _this = _super.call(this) || this;
|
|
2181
2247
|
_this._event = "";
|
|
2182
2248
|
return _this;
|
|
2183
2249
|
}
|
|
2250
|
+
NAV.prototype.reset = function () {
|
|
2251
|
+
this._event = "";
|
|
2252
|
+
this._initialized = false;
|
|
2253
|
+
};
|
|
2184
2254
|
Object.defineProperty(NAV.prototype, "event", {
|
|
2185
2255
|
get: function () {
|
|
2186
2256
|
return this._event;
|
|
2187
2257
|
},
|
|
2188
2258
|
set: function (event) {
|
|
2189
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_1__
|
|
2259
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_1__.check12ValidFormat)(event, _constants_regex__WEBPACK_IMPORTED_MODULE_2__.scorm12_regex.NAVEvent)) {
|
|
2190
2260
|
this._event = event;
|
|
2191
2261
|
}
|
|
2192
2262
|
},
|
|
@@ -2202,7 +2272,7 @@ var NAV = (function (_super) {
|
|
|
2202
2272
|
return result;
|
|
2203
2273
|
};
|
|
2204
2274
|
return NAV;
|
|
2205
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2275
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2206
2276
|
|
|
2207
2277
|
|
|
2208
2278
|
|
|
@@ -2211,9 +2281,10 @@ var NAV = (function (_super) {
|
|
|
2211
2281
|
/***/ 176:
|
|
2212
2282
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2213
2283
|
|
|
2284
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2214
2285
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2215
|
-
/* harmony export */
|
|
2216
|
-
/* harmony export */
|
|
2286
|
+
/* harmony export */ CMIObjectives: function() { return /* binding */ CMIObjectives; },
|
|
2287
|
+
/* harmony export */ CMIObjectivesObject: function() { return /* binding */ CMIObjectivesObject; }
|
|
2217
2288
|
/* harmony export */ });
|
|
2218
2289
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(635);
|
|
2219
2290
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
@@ -2221,7 +2292,7 @@ var NAV = (function (_super) {
|
|
|
2221
2292
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(340);
|
|
2222
2293
|
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(417);
|
|
2223
2294
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(797);
|
|
2224
|
-
/* harmony import */ var
|
|
2295
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(179);
|
|
2225
2296
|
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(915);
|
|
2226
2297
|
/* harmony import */ var _common_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(589);
|
|
2227
2298
|
|
|
@@ -2234,39 +2305,46 @@ var NAV = (function (_super) {
|
|
|
2234
2305
|
|
|
2235
2306
|
|
|
2236
2307
|
var CMIObjectives = (function (_super) {
|
|
2237
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_8__
|
|
2308
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(CMIObjectives, _super);
|
|
2238
2309
|
function CMIObjectives() {
|
|
2239
2310
|
return _super.call(this, {
|
|
2240
|
-
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
2241
|
-
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2242
|
-
errorClass:
|
|
2311
|
+
children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.objectives_children,
|
|
2312
|
+
errorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.INVALID_SET_VALUE,
|
|
2313
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__.Scorm12ValidationError,
|
|
2243
2314
|
}) || this;
|
|
2244
2315
|
}
|
|
2245
2316
|
return CMIObjectives;
|
|
2246
|
-
}(_common_array__WEBPACK_IMPORTED_MODULE_7__
|
|
2317
|
+
}(_common_array__WEBPACK_IMPORTED_MODULE_7__.CMIArray));
|
|
2247
2318
|
|
|
2248
2319
|
var CMIObjectivesObject = (function (_super) {
|
|
2249
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_8__
|
|
2320
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__.__extends)(CMIObjectivesObject, _super);
|
|
2250
2321
|
function CMIObjectivesObject() {
|
|
2251
2322
|
var _this = _super.call(this) || this;
|
|
2252
2323
|
_this._id = "";
|
|
2253
2324
|
_this._status = "";
|
|
2254
|
-
_this.score = new _common_score__WEBPACK_IMPORTED_MODULE_1__
|
|
2255
|
-
score_children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__
|
|
2256
|
-
score_range: _constants_regex__WEBPACK_IMPORTED_MODULE_3__
|
|
2257
|
-
invalidErrorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2258
|
-
invalidTypeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2259
|
-
invalidRangeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__
|
|
2260
|
-
errorClass:
|
|
2325
|
+
_this.score = new _common_score__WEBPACK_IMPORTED_MODULE_1__.CMIScore({
|
|
2326
|
+
score_children: _constants_api_constants__WEBPACK_IMPORTED_MODULE_2__.scorm12_constants.score_children,
|
|
2327
|
+
score_range: _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.score_range,
|
|
2328
|
+
invalidErrorCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.INVALID_SET_VALUE,
|
|
2329
|
+
invalidTypeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.TYPE_MISMATCH,
|
|
2330
|
+
invalidRangeCode: _constants_error_codes__WEBPACK_IMPORTED_MODULE_4__.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
2331
|
+
errorClass: _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_5__.Scorm12ValidationError,
|
|
2261
2332
|
});
|
|
2262
2333
|
return _this;
|
|
2263
2334
|
}
|
|
2335
|
+
CMIObjectivesObject.prototype.reset = function () {
|
|
2336
|
+
var _a;
|
|
2337
|
+
this._initialized = false;
|
|
2338
|
+
this._id = "";
|
|
2339
|
+
this._status = "";
|
|
2340
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
2341
|
+
};
|
|
2264
2342
|
Object.defineProperty(CMIObjectivesObject.prototype, "id", {
|
|
2265
2343
|
get: function () {
|
|
2266
2344
|
return this._id;
|
|
2267
2345
|
},
|
|
2268
2346
|
set: function (id) {
|
|
2269
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__
|
|
2347
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__.check12ValidFormat)(id, _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.CMIIdentifier)) {
|
|
2270
2348
|
this._id = id;
|
|
2271
2349
|
}
|
|
2272
2350
|
},
|
|
@@ -2278,7 +2356,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2278
2356
|
return this._status;
|
|
2279
2357
|
},
|
|
2280
2358
|
set: function (status) {
|
|
2281
|
-
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__
|
|
2359
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_6__.check12ValidFormat)(status, _constants_regex__WEBPACK_IMPORTED_MODULE_3__.scorm12_regex.CMIStatus2)) {
|
|
2282
2360
|
this._status = status;
|
|
2283
2361
|
}
|
|
2284
2362
|
},
|
|
@@ -2296,7 +2374,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2296
2374
|
return result;
|
|
2297
2375
|
};
|
|
2298
2376
|
return CMIObjectivesObject;
|
|
2299
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2377
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2300
2378
|
|
|
2301
2379
|
|
|
2302
2380
|
|
|
@@ -2305,13 +2383,14 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2305
2383
|
/***/ 532:
|
|
2306
2384
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2307
2385
|
|
|
2386
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2308
2387
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2309
|
-
/* harmony export */
|
|
2388
|
+
/* harmony export */ CMIStudentData: function() { return /* binding */ CMIStudentData; }
|
|
2310
2389
|
/* harmony export */ });
|
|
2311
2390
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(635);
|
|
2312
2391
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
2313
2392
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
2314
|
-
/* harmony import */ var
|
|
2393
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179);
|
|
2315
2394
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(797);
|
|
2316
2395
|
|
|
2317
2396
|
|
|
@@ -2319,7 +2398,7 @@ var CMIObjectivesObject = (function (_super) {
|
|
|
2319
2398
|
|
|
2320
2399
|
|
|
2321
2400
|
var CMIStudentData = (function (_super) {
|
|
2322
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_4__
|
|
2401
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__extends)(CMIStudentData, _super);
|
|
2323
2402
|
function CMIStudentData(student_data_children) {
|
|
2324
2403
|
var _this = _super.call(this) || this;
|
|
2325
2404
|
_this._mastery_score = "";
|
|
@@ -2327,15 +2406,18 @@ var CMIStudentData = (function (_super) {
|
|
|
2327
2406
|
_this._time_limit_action = "";
|
|
2328
2407
|
_this.__children = student_data_children
|
|
2329
2408
|
? student_data_children
|
|
2330
|
-
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
2409
|
+
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.student_data_children;
|
|
2331
2410
|
return _this;
|
|
2332
2411
|
}
|
|
2412
|
+
CMIStudentData.prototype.reset = function () {
|
|
2413
|
+
this._initialized = false;
|
|
2414
|
+
};
|
|
2333
2415
|
Object.defineProperty(CMIStudentData.prototype, "_children", {
|
|
2334
2416
|
get: function () {
|
|
2335
2417
|
return this.__children;
|
|
2336
2418
|
},
|
|
2337
2419
|
set: function (_children) {
|
|
2338
|
-
throw new
|
|
2420
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.INVALID_SET_VALUE);
|
|
2339
2421
|
},
|
|
2340
2422
|
enumerable: false,
|
|
2341
2423
|
configurable: true
|
|
@@ -2346,7 +2428,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2346
2428
|
},
|
|
2347
2429
|
set: function (mastery_score) {
|
|
2348
2430
|
if (this.initialized) {
|
|
2349
|
-
throw new
|
|
2431
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2350
2432
|
}
|
|
2351
2433
|
else {
|
|
2352
2434
|
this._mastery_score = mastery_score;
|
|
@@ -2361,7 +2443,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2361
2443
|
},
|
|
2362
2444
|
set: function (max_time_allowed) {
|
|
2363
2445
|
if (this.initialized) {
|
|
2364
|
-
throw new
|
|
2446
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2365
2447
|
}
|
|
2366
2448
|
else {
|
|
2367
2449
|
this._max_time_allowed = max_time_allowed;
|
|
@@ -2376,7 +2458,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2376
2458
|
},
|
|
2377
2459
|
set: function (time_limit_action) {
|
|
2378
2460
|
if (this.initialized) {
|
|
2379
|
-
throw new
|
|
2461
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_3__.scorm12_errors.READ_ONLY_ELEMENT);
|
|
2380
2462
|
}
|
|
2381
2463
|
else {
|
|
2382
2464
|
this._time_limit_action = time_limit_action;
|
|
@@ -2396,7 +2478,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2396
2478
|
return result;
|
|
2397
2479
|
};
|
|
2398
2480
|
return CMIStudentData;
|
|
2399
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2481
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2400
2482
|
|
|
2401
2483
|
|
|
2402
2484
|
|
|
@@ -2405,16 +2487,17 @@ var CMIStudentData = (function (_super) {
|
|
|
2405
2487
|
/***/ 181:
|
|
2406
2488
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2407
2489
|
|
|
2490
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2408
2491
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2409
|
-
/* harmony export */
|
|
2492
|
+
/* harmony export */ CMIStudentPreference: function() { return /* binding */ CMIStudentPreference; }
|
|
2410
2493
|
/* harmony export */ });
|
|
2411
2494
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(635);
|
|
2412
2495
|
/* harmony import */ var _common_base_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319);
|
|
2413
2496
|
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
2414
|
-
/* harmony import */ var
|
|
2415
|
-
/* harmony import */ var
|
|
2416
|
-
/* harmony import */ var
|
|
2417
|
-
/* harmony import */ var
|
|
2497
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179);
|
|
2498
|
+
/* harmony import */ var _validation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(915);
|
|
2499
|
+
/* harmony import */ var _constants_regex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(417);
|
|
2500
|
+
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(797);
|
|
2418
2501
|
|
|
2419
2502
|
|
|
2420
2503
|
|
|
@@ -2423,7 +2506,7 @@ var CMIStudentData = (function (_super) {
|
|
|
2423
2506
|
|
|
2424
2507
|
|
|
2425
2508
|
var CMIStudentPreference = (function (_super) {
|
|
2426
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_6__
|
|
2509
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__.__extends)(CMIStudentPreference, _super);
|
|
2427
2510
|
function CMIStudentPreference(student_preference_children) {
|
|
2428
2511
|
var _this = _super.call(this) || this;
|
|
2429
2512
|
_this._audio = "";
|
|
@@ -2432,15 +2515,18 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2432
2515
|
_this._text = "";
|
|
2433
2516
|
_this.__children = student_preference_children
|
|
2434
2517
|
? student_preference_children
|
|
2435
|
-
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__
|
|
2518
|
+
: _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.student_preference_children;
|
|
2436
2519
|
return _this;
|
|
2437
2520
|
}
|
|
2521
|
+
CMIStudentPreference.prototype.reset = function () {
|
|
2522
|
+
this._initialized = false;
|
|
2523
|
+
};
|
|
2438
2524
|
Object.defineProperty(CMIStudentPreference.prototype, "_children", {
|
|
2439
2525
|
get: function () {
|
|
2440
2526
|
return this.__children;
|
|
2441
2527
|
},
|
|
2442
2528
|
set: function (_children) {
|
|
2443
|
-
throw new
|
|
2529
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_2__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_5__.scorm12_errors.INVALID_SET_VALUE);
|
|
2444
2530
|
},
|
|
2445
2531
|
enumerable: false,
|
|
2446
2532
|
configurable: true
|
|
@@ -2450,8 +2536,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2450
2536
|
return this._audio;
|
|
2451
2537
|
},
|
|
2452
2538
|
set: function (audio) {
|
|
2453
|
-
if ((0,
|
|
2454
|
-
(0,
|
|
2539
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(audio, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2540
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(audio, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.audio_range)) {
|
|
2455
2541
|
this._audio = audio;
|
|
2456
2542
|
}
|
|
2457
2543
|
},
|
|
@@ -2463,7 +2549,7 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2463
2549
|
return this._language;
|
|
2464
2550
|
},
|
|
2465
2551
|
set: function (language) {
|
|
2466
|
-
if ((0,
|
|
2552
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(language, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMIString256)) {
|
|
2467
2553
|
this._language = language;
|
|
2468
2554
|
}
|
|
2469
2555
|
},
|
|
@@ -2475,8 +2561,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2475
2561
|
return this._speed;
|
|
2476
2562
|
},
|
|
2477
2563
|
set: function (speed) {
|
|
2478
|
-
if ((0,
|
|
2479
|
-
(0,
|
|
2564
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(speed, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2565
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(speed, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.speed_range)) {
|
|
2480
2566
|
this._speed = speed;
|
|
2481
2567
|
}
|
|
2482
2568
|
},
|
|
@@ -2488,8 +2574,8 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2488
2574
|
return this._text;
|
|
2489
2575
|
},
|
|
2490
2576
|
set: function (text) {
|
|
2491
|
-
if ((0,
|
|
2492
|
-
(0,
|
|
2577
|
+
if ((0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidFormat)(text, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.CMISInteger) &&
|
|
2578
|
+
(0,_validation__WEBPACK_IMPORTED_MODULE_3__.check12ValidRange)(text, _constants_regex__WEBPACK_IMPORTED_MODULE_4__.scorm12_regex.text_range)) {
|
|
2493
2579
|
this._text = text;
|
|
2494
2580
|
}
|
|
2495
2581
|
},
|
|
@@ -2508,7 +2594,7 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2508
2594
|
return result;
|
|
2509
2595
|
};
|
|
2510
2596
|
return CMIStudentPreference;
|
|
2511
|
-
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__
|
|
2597
|
+
}(_common_base_cmi__WEBPACK_IMPORTED_MODULE_0__.BaseCMI));
|
|
2512
2598
|
|
|
2513
2599
|
|
|
2514
2600
|
|
|
@@ -2517,24 +2603,25 @@ var CMIStudentPreference = (function (_super) {
|
|
|
2517
2603
|
/***/ 915:
|
|
2518
2604
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2519
2605
|
|
|
2606
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2520
2607
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2521
|
-
/* harmony export */
|
|
2522
|
-
/* harmony export */
|
|
2608
|
+
/* harmony export */ check12ValidFormat: function() { return /* binding */ check12ValidFormat; },
|
|
2609
|
+
/* harmony export */ check12ValidRange: function() { return /* binding */ check12ValidRange; }
|
|
2523
2610
|
/* harmony export */ });
|
|
2524
2611
|
/* harmony import */ var _common_validation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(449);
|
|
2525
2612
|
/* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
|
|
2526
|
-
/* harmony import */ var
|
|
2613
|
+
/* harmony import */ var _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
|
|
2527
2614
|
|
|
2528
2615
|
|
|
2529
2616
|
|
|
2530
2617
|
function check12ValidFormat(value, regexPattern, allowEmptyString) {
|
|
2531
|
-
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__
|
|
2618
|
+
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__.checkValidFormat)(value, regexPattern, _constants_error_codes__WEBPACK_IMPORTED_MODULE_0__.scorm12_errors.TYPE_MISMATCH, _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__.Scorm12ValidationError, allowEmptyString);
|
|
2532
2619
|
}
|
|
2533
2620
|
function check12ValidRange(value, rangePattern, allowEmptyString) {
|
|
2534
2621
|
if (!allowEmptyString && value === "") {
|
|
2535
|
-
throw new
|
|
2622
|
+
throw new _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__.Scorm12ValidationError(_constants_error_codes__WEBPACK_IMPORTED_MODULE_0__.scorm12_errors.VALUE_OUT_OF_RANGE);
|
|
2536
2623
|
}
|
|
2537
|
-
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__
|
|
2624
|
+
return (0,_common_validation__WEBPACK_IMPORTED_MODULE_2__.checkValidRange)(value, rangePattern, _constants_error_codes__WEBPACK_IMPORTED_MODULE_0__.scorm12_errors.VALUE_OUT_OF_RANGE, _exceptions_scorm12_exceptions__WEBPACK_IMPORTED_MODULE_1__.Scorm12ValidationError);
|
|
2538
2625
|
}
|
|
2539
2626
|
|
|
2540
2627
|
|
|
@@ -2543,16 +2630,23 @@ function check12ValidRange(value, rangePattern, allowEmptyString) {
|
|
|
2543
2630
|
/***/ 340:
|
|
2544
2631
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2545
2632
|
|
|
2633
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2634
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2635
|
+
/* harmony export */ aicc_constants: function() { return /* binding */ aicc_constants; },
|
|
2636
|
+
/* harmony export */ global_constants: function() { return /* binding */ global_constants; },
|
|
2637
|
+
/* harmony export */ scorm12_constants: function() { return /* binding */ scorm12_constants; },
|
|
2638
|
+
/* harmony export */ scorm2004_constants: function() { return /* binding */ scorm2004_constants; }
|
|
2639
|
+
/* harmony export */ });
|
|
2546
2640
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2547
2641
|
|
|
2548
|
-
var
|
|
2642
|
+
var global_constants = {
|
|
2549
2643
|
SCORM_TRUE: "true",
|
|
2550
2644
|
SCORM_FALSE: "false",
|
|
2551
2645
|
STATE_NOT_INITIALIZED: 0,
|
|
2552
2646
|
STATE_INITIALIZED: 1,
|
|
2553
2647
|
STATE_TERMINATED: 2,
|
|
2554
2648
|
};
|
|
2555
|
-
var
|
|
2649
|
+
var scorm12_constants = {
|
|
2556
2650
|
cmi_children: "core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions",
|
|
2557
2651
|
core_children: "student_id,student_name,lesson_location,credit,lesson_status,entry,score,total_time,lesson_mode,exit,session_time",
|
|
2558
2652
|
score_children: "raw,min,max",
|
|
@@ -2613,7 +2707,7 @@ var scorm12 = {
|
|
|
2613
2707
|
},
|
|
2614
2708
|
},
|
|
2615
2709
|
};
|
|
2616
|
-
var
|
|
2710
|
+
var aicc_constants = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, scorm12_constants), {
|
|
2617
2711
|
cmi_children: "core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions,evaluation",
|
|
2618
2712
|
student_preference_children: "audio,language,lesson_type,speed,text,text_color,text_location,text_size,video,windows",
|
|
2619
2713
|
student_data_children: "attempt_number,tries,mastery_score,max_time_allowed,time_limit_action",
|
|
@@ -2622,7 +2716,7 @@ var aicc = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .Cl)((0,tslib__W
|
|
|
2622
2716
|
attempt_records_children: "score,lesson_status",
|
|
2623
2717
|
paths_children: "location_id,date,time,status,why_left,time_in_element",
|
|
2624
2718
|
});
|
|
2625
|
-
var
|
|
2719
|
+
var scorm2004_constants = {
|
|
2626
2720
|
cmi_children: "_version,comments_from_learner,comments_from_lms,completion_status,credit,entry,exit,interactions,launch_data,learner_id,learner_name,learner_preference,location,max_time_allowed,mode,objectives,progress_measure,scaled_passing_score,score,session_time,success_status,suspend_data,time_limit_action,total_time",
|
|
2627
2721
|
comments_children: "comment,timestamp,location",
|
|
2628
2722
|
score_children: "max,raw,scaled,min",
|
|
@@ -2631,6 +2725,7 @@ var scorm2004 = {
|
|
|
2631
2725
|
student_data_children: "mastery_score,max_time_allowed,time_limit_action",
|
|
2632
2726
|
student_preference_children: "audio_level,audio_captioning,delivery_speed,language",
|
|
2633
2727
|
interactions_children: "id,type,objectives,timestamp,correct_responses,weighting,learner_response,result,latency,description",
|
|
2728
|
+
adl_data_children: "id,store",
|
|
2634
2729
|
error_descriptions: {
|
|
2635
2730
|
"0": {
|
|
2636
2731
|
basicMessage: "No Error",
|
|
@@ -2738,13 +2833,6 @@ var scorm2004 = {
|
|
|
2738
2833
|
},
|
|
2739
2834
|
},
|
|
2740
2835
|
};
|
|
2741
|
-
var APIConstants = {
|
|
2742
|
-
global: global,
|
|
2743
|
-
scorm12: scorm12,
|
|
2744
|
-
aicc: aicc,
|
|
2745
|
-
scorm2004: scorm2004,
|
|
2746
|
-
};
|
|
2747
|
-
/* harmony default export */ __webpack_exports__.A = (APIConstants);
|
|
2748
2836
|
|
|
2749
2837
|
|
|
2750
2838
|
/***/ }),
|
|
@@ -2752,12 +2840,13 @@ var APIConstants = {
|
|
|
2752
2840
|
/***/ 56:
|
|
2753
2841
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2754
2842
|
|
|
2843
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2755
2844
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2756
|
-
/* harmony export */
|
|
2757
|
-
/* harmony export */
|
|
2758
|
-
/* harmony export */
|
|
2845
|
+
/* harmony export */ CompletionStatus: function() { return /* binding */ CompletionStatus; },
|
|
2846
|
+
/* harmony export */ LogLevelEnum: function() { return /* binding */ LogLevelEnum; },
|
|
2847
|
+
/* harmony export */ NAVBoolean: function() { return /* binding */ NAVBoolean; },
|
|
2848
|
+
/* harmony export */ SuccessStatus: function() { return /* binding */ SuccessStatus; }
|
|
2759
2849
|
/* harmony export */ });
|
|
2760
|
-
/* unused harmony export NAVBoolean */
|
|
2761
2850
|
var NAVBoolean;
|
|
2762
2851
|
(function (NAVBoolean) {
|
|
2763
2852
|
NAVBoolean["unknown"] = "unknown";
|
|
@@ -2792,9 +2881,15 @@ var LogLevelEnum;
|
|
|
2792
2881
|
/***/ 797:
|
|
2793
2882
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2794
2883
|
|
|
2884
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2885
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2886
|
+
/* harmony export */ global_errors: function() { return /* binding */ global_errors; },
|
|
2887
|
+
/* harmony export */ scorm12_errors: function() { return /* binding */ scorm12_errors; },
|
|
2888
|
+
/* harmony export */ scorm2004_errors: function() { return /* binding */ scorm2004_errors; }
|
|
2889
|
+
/* harmony export */ });
|
|
2795
2890
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2796
2891
|
|
|
2797
|
-
var
|
|
2892
|
+
var global_errors = {
|
|
2798
2893
|
GENERAL: 101,
|
|
2799
2894
|
INITIALIZATION_FAILED: 101,
|
|
2800
2895
|
INITIALIZED: 101,
|
|
@@ -2824,13 +2919,8 @@ var global = {
|
|
|
2824
2919
|
VALUE_OUT_OF_RANGE: 101,
|
|
2825
2920
|
DEPENDENCY_NOT_ESTABLISHED: 101,
|
|
2826
2921
|
};
|
|
2827
|
-
var
|
|
2828
|
-
var
|
|
2829
|
-
var ErrorCodes = {
|
|
2830
|
-
scorm12: scorm12,
|
|
2831
|
-
scorm2004: scorm2004,
|
|
2832
|
-
};
|
|
2833
|
-
/* harmony default export */ __webpack_exports__.A = (ErrorCodes);
|
|
2922
|
+
var scorm12_errors = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, global_errors), { RETRIEVE_BEFORE_INIT: 301, STORE_BEFORE_INIT: 301, COMMIT_BEFORE_INIT: 301, ARGUMENT_ERROR: 201, CHILDREN_ERROR: 202, COUNT_ERROR: 203, UNDEFINED_DATA_MODEL: 401, UNIMPLEMENTED_ELEMENT: 401, VALUE_NOT_INITIALIZED: 301, INVALID_SET_VALUE: 402, READ_ONLY_ELEMENT: 403, WRITE_ONLY_ELEMENT: 404, TYPE_MISMATCH: 405, VALUE_OUT_OF_RANGE: 407, DEPENDENCY_NOT_ESTABLISHED: 408 });
|
|
2923
|
+
var scorm2004_errors = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, global_errors), { INITIALIZATION_FAILED: 102, INITIALIZED: 103, TERMINATED: 104, TERMINATION_FAILURE: 111, TERMINATION_BEFORE_INIT: 112, MULTIPLE_TERMINATIONS: 113, RETRIEVE_BEFORE_INIT: 122, RETRIEVE_AFTER_TERM: 123, STORE_BEFORE_INIT: 132, STORE_AFTER_TERM: 133, COMMIT_BEFORE_INIT: 142, COMMIT_AFTER_TERM: 143, ARGUMENT_ERROR: 201, GENERAL_GET_FAILURE: 301, GENERAL_SET_FAILURE: 351, GENERAL_COMMIT_FAILURE: 391, UNDEFINED_DATA_MODEL: 401, UNIMPLEMENTED_ELEMENT: 402, VALUE_NOT_INITIALIZED: 403, READ_ONLY_ELEMENT: 404, WRITE_ONLY_ELEMENT: 405, TYPE_MISMATCH: 406, VALUE_OUT_OF_RANGE: 407, DEPENDENCY_NOT_ESTABLISHED: 408 });
|
|
2834
2924
|
|
|
2835
2925
|
|
|
2836
2926
|
/***/ }),
|
|
@@ -2838,9 +2928,15 @@ var ErrorCodes = {
|
|
|
2838
2928
|
/***/ 417:
|
|
2839
2929
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2840
2930
|
|
|
2931
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2932
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2933
|
+
/* harmony export */ aicc_regex: function() { return /* binding */ aicc_regex; },
|
|
2934
|
+
/* harmony export */ scorm12_regex: function() { return /* binding */ scorm12_regex; },
|
|
2935
|
+
/* harmony export */ scorm2004_regex: function() { return /* binding */ scorm2004_regex; }
|
|
2936
|
+
/* harmony export */ });
|
|
2841
2937
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2842
2938
|
|
|
2843
|
-
var
|
|
2939
|
+
var scorm12_regex = {
|
|
2844
2940
|
CMIString256: "^.{0,255}$",
|
|
2845
2941
|
CMIString4096: "^.{0,4096}$",
|
|
2846
2942
|
CMITime: "^(?:[01]\\d|2[0123]):(?:[012345]\\d):(?:[012345]\\d)$",
|
|
@@ -2863,10 +2959,10 @@ var scorm12 = {
|
|
|
2863
2959
|
weighting_range: "-100#100",
|
|
2864
2960
|
text_range: "-1#1",
|
|
2865
2961
|
};
|
|
2866
|
-
var
|
|
2962
|
+
var aicc_regex = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, scorm12_regex), {
|
|
2867
2963
|
CMIIdentifier: "^\\w{1,255}$",
|
|
2868
2964
|
});
|
|
2869
|
-
var
|
|
2965
|
+
var scorm2004_regex = {
|
|
2870
2966
|
CMIString200: "^[\\u0000-\\uFFFF]{0,200}$",
|
|
2871
2967
|
CMIString250: "^[\\u0000-\\uFFFF]{0,250}$",
|
|
2872
2968
|
CMIString1000: "^[\\u0000-\\uFFFF]{0,1000}$",
|
|
@@ -2902,12 +2998,6 @@ var scorm2004 = {
|
|
|
2902
2998
|
text_range: "-1#1",
|
|
2903
2999
|
progress_range: "0#1",
|
|
2904
3000
|
};
|
|
2905
|
-
var Regex = {
|
|
2906
|
-
aicc: aicc,
|
|
2907
|
-
scorm12: scorm12,
|
|
2908
|
-
scorm2004: scorm2004,
|
|
2909
|
-
};
|
|
2910
|
-
/* harmony default export */ __webpack_exports__.A = (Regex);
|
|
2911
3001
|
|
|
2912
3002
|
|
|
2913
3003
|
/***/ }),
|
|
@@ -2915,22 +3005,15 @@ var Regex = {
|
|
|
2915
3005
|
/***/ 784:
|
|
2916
3006
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2917
3007
|
|
|
3008
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2918
3009
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2919
|
-
/* harmony export */
|
|
2920
|
-
/* harmony export */
|
|
2921
|
-
/* harmony export */ tQ: function() { return /* binding */ Scorm12ValidationError; },
|
|
2922
|
-
/* harmony export */ yI: function() { return /* binding */ ValidationError; }
|
|
3010
|
+
/* harmony export */ BaseScormValidationError: function() { return /* binding */ BaseScormValidationError; },
|
|
3011
|
+
/* harmony export */ ValidationError: function() { return /* binding */ ValidationError; }
|
|
2923
3012
|
/* harmony export */ });
|
|
2924
|
-
/*
|
|
2925
|
-
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(635);
|
|
2926
|
-
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(340);
|
|
2927
|
-
|
|
3013
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(635);
|
|
2928
3014
|
|
|
2929
|
-
var scorm12_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm12.error_descriptions;
|
|
2930
|
-
var aicc_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.aicc.error_descriptions;
|
|
2931
|
-
var scorm2004_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.scorm2004.error_descriptions;
|
|
2932
3015
|
var BaseScormValidationError = (function (_super) {
|
|
2933
|
-
(0,
|
|
3016
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BaseScormValidationError, _super);
|
|
2934
3017
|
function BaseScormValidationError(errorCode) {
|
|
2935
3018
|
var _this = _super.call(this, errorCode.toString()) || this;
|
|
2936
3019
|
_this._errorCode = errorCode;
|
|
@@ -2948,7 +3031,7 @@ var BaseScormValidationError = (function (_super) {
|
|
|
2948
3031
|
}(Error));
|
|
2949
3032
|
|
|
2950
3033
|
var ValidationError = (function (_super) {
|
|
2951
|
-
(0,
|
|
3034
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(ValidationError, _super);
|
|
2952
3035
|
function ValidationError(errorCode, errorMessage, detailedMessage) {
|
|
2953
3036
|
var _this = _super.call(this, errorCode) || this;
|
|
2954
3037
|
_this._detailedMessage = "";
|
|
@@ -2976,8 +3059,26 @@ var ValidationError = (function (_super) {
|
|
|
2976
3059
|
return ValidationError;
|
|
2977
3060
|
}(BaseScormValidationError));
|
|
2978
3061
|
|
|
3062
|
+
|
|
3063
|
+
|
|
3064
|
+
/***/ }),
|
|
3065
|
+
|
|
3066
|
+
/***/ 179:
|
|
3067
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3068
|
+
|
|
3069
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3070
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3071
|
+
/* harmony export */ Scorm12ValidationError: function() { return /* binding */ Scorm12ValidationError; }
|
|
3072
|
+
/* harmony export */ });
|
|
3073
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(635);
|
|
3074
|
+
/* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(784);
|
|
3075
|
+
/* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(340);
|
|
3076
|
+
|
|
3077
|
+
|
|
3078
|
+
|
|
3079
|
+
var scorm12_errors = _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__.scorm12_constants.error_descriptions;
|
|
2979
3080
|
var Scorm12ValidationError = (function (_super) {
|
|
2980
|
-
(0,
|
|
3081
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(Scorm12ValidationError, _super);
|
|
2981
3082
|
function Scorm12ValidationError(errorCode) {
|
|
2982
3083
|
var _this = this;
|
|
2983
3084
|
if ({}.hasOwnProperty.call(scorm12_errors, String(errorCode))) {
|
|
@@ -2989,37 +3090,7 @@ var Scorm12ValidationError = (function (_super) {
|
|
|
2989
3090
|
return _this;
|
|
2990
3091
|
}
|
|
2991
3092
|
return Scorm12ValidationError;
|
|
2992
|
-
}(ValidationError));
|
|
2993
|
-
|
|
2994
|
-
var AICCValidationError = (function (_super) {
|
|
2995
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__extends */ .C6)(AICCValidationError, _super);
|
|
2996
|
-
function AICCValidationError(errorCode) {
|
|
2997
|
-
var _this = this;
|
|
2998
|
-
if ({}.hasOwnProperty.call(aicc_errors, String(errorCode))) {
|
|
2999
|
-
_this = _super.call(this, errorCode, aicc_errors[String(errorCode)].basicMessage, aicc_errors[String(errorCode)].detailMessage) || this;
|
|
3000
|
-
}
|
|
3001
|
-
else {
|
|
3002
|
-
_this = _super.call(this, 101, aicc_errors["101"].basicMessage, aicc_errors["101"].detailMessage) || this;
|
|
3003
|
-
}
|
|
3004
|
-
return _this;
|
|
3005
|
-
}
|
|
3006
|
-
return AICCValidationError;
|
|
3007
|
-
}(ValidationError));
|
|
3008
|
-
|
|
3009
|
-
var Scorm2004ValidationError = (function (_super) {
|
|
3010
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__extends */ .C6)(Scorm2004ValidationError, _super);
|
|
3011
|
-
function Scorm2004ValidationError(errorCode) {
|
|
3012
|
-
var _this = this;
|
|
3013
|
-
if ({}.hasOwnProperty.call(scorm2004_errors, String(errorCode))) {
|
|
3014
|
-
_this = _super.call(this, errorCode, scorm2004_errors[String(errorCode)].basicMessage, scorm2004_errors[String(errorCode)].detailMessage) || this;
|
|
3015
|
-
}
|
|
3016
|
-
else {
|
|
3017
|
-
_this = _super.call(this, 101, scorm2004_errors["101"].basicMessage, scorm2004_errors["101"].detailMessage) || this;
|
|
3018
|
-
}
|
|
3019
|
-
return _this;
|
|
3020
|
-
}
|
|
3021
|
-
return Scorm2004ValidationError;
|
|
3022
|
-
}(ValidationError));
|
|
3093
|
+
}(_exceptions__WEBPACK_IMPORTED_MODULE_0__.ValidationError));
|
|
3023
3094
|
|
|
3024
3095
|
|
|
3025
3096
|
|
|
@@ -3028,16 +3099,24 @@ var Scorm2004ValidationError = (function (_super) {
|
|
|
3028
3099
|
/***/ 864:
|
|
3029
3100
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3030
3101
|
|
|
3102
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3031
3103
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3032
|
-
/* harmony export */
|
|
3033
|
-
/* harmony export */
|
|
3034
|
-
/* harmony export */
|
|
3035
|
-
/* harmony export */
|
|
3036
|
-
/* harmony export */
|
|
3037
|
-
/* harmony export */
|
|
3038
|
-
/* harmony export */
|
|
3104
|
+
/* harmony export */ SECONDS_PER_DAY: function() { return /* binding */ SECONDS_PER_DAY; },
|
|
3105
|
+
/* harmony export */ SECONDS_PER_HOUR: function() { return /* binding */ SECONDS_PER_HOUR; },
|
|
3106
|
+
/* harmony export */ SECONDS_PER_MINUTE: function() { return /* binding */ SECONDS_PER_MINUTE; },
|
|
3107
|
+
/* harmony export */ SECONDS_PER_SECOND: function() { return /* binding */ SECONDS_PER_SECOND; },
|
|
3108
|
+
/* harmony export */ addHHMMSSTimeStrings: function() { return /* binding */ addHHMMSSTimeStrings; },
|
|
3109
|
+
/* harmony export */ addTwoDurations: function() { return /* binding */ addTwoDurations; },
|
|
3110
|
+
/* harmony export */ countDecimals: function() { return /* binding */ countDecimals; },
|
|
3111
|
+
/* harmony export */ flatten: function() { return /* binding */ flatten; },
|
|
3112
|
+
/* harmony export */ formatMessage: function() { return /* binding */ formatMessage; },
|
|
3113
|
+
/* harmony export */ getDurationAsSeconds: function() { return /* binding */ getDurationAsSeconds; },
|
|
3114
|
+
/* harmony export */ getSecondsAsHHMMSS: function() { return /* binding */ getSecondsAsHHMMSS; },
|
|
3115
|
+
/* harmony export */ getSecondsAsISODuration: function() { return /* binding */ getSecondsAsISODuration; },
|
|
3116
|
+
/* harmony export */ getTimeAsSeconds: function() { return /* binding */ getTimeAsSeconds; },
|
|
3117
|
+
/* harmony export */ stringMatches: function() { return /* binding */ stringMatches; },
|
|
3118
|
+
/* harmony export */ unflatten: function() { return /* binding */ unflatten; }
|
|
3039
3119
|
/* harmony export */ });
|
|
3040
|
-
/* unused harmony exports SECONDS_PER_SECOND, SECONDS_PER_MINUTE, SECONDS_PER_HOUR, SECONDS_PER_DAY, getSecondsAsISODuration, getDurationAsSeconds, addTwoDurations, countDecimals */
|
|
3041
3120
|
var SECONDS_PER_SECOND = 1.0;
|
|
3042
3121
|
var SECONDS_PER_MINUTE = 60;
|
|
3043
3122
|
var SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE;
|
|
@@ -3229,13 +3308,40 @@ function stringMatches(str, tester) {
|
|
|
3229
3308
|
/***/ 635:
|
|
3230
3309
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
3231
3310
|
|
|
3311
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3232
3312
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3233
|
-
/* harmony export */
|
|
3234
|
-
/* harmony export */
|
|
3235
|
-
/* harmony export */
|
|
3236
|
-
/* harmony export */
|
|
3313
|
+
/* harmony export */ __addDisposableResource: function() { return /* binding */ __addDisposableResource; },
|
|
3314
|
+
/* harmony export */ __assign: function() { return /* binding */ __assign; },
|
|
3315
|
+
/* harmony export */ __asyncDelegator: function() { return /* binding */ __asyncDelegator; },
|
|
3316
|
+
/* harmony export */ __asyncGenerator: function() { return /* binding */ __asyncGenerator; },
|
|
3317
|
+
/* harmony export */ __asyncValues: function() { return /* binding */ __asyncValues; },
|
|
3318
|
+
/* harmony export */ __await: function() { return /* binding */ __await; },
|
|
3319
|
+
/* harmony export */ __awaiter: function() { return /* binding */ __awaiter; },
|
|
3320
|
+
/* harmony export */ __classPrivateFieldGet: function() { return /* binding */ __classPrivateFieldGet; },
|
|
3321
|
+
/* harmony export */ __classPrivateFieldIn: function() { return /* binding */ __classPrivateFieldIn; },
|
|
3322
|
+
/* harmony export */ __classPrivateFieldSet: function() { return /* binding */ __classPrivateFieldSet; },
|
|
3323
|
+
/* harmony export */ __createBinding: function() { return /* binding */ __createBinding; },
|
|
3324
|
+
/* harmony export */ __decorate: function() { return /* binding */ __decorate; },
|
|
3325
|
+
/* harmony export */ __disposeResources: function() { return /* binding */ __disposeResources; },
|
|
3326
|
+
/* harmony export */ __esDecorate: function() { return /* binding */ __esDecorate; },
|
|
3327
|
+
/* harmony export */ __exportStar: function() { return /* binding */ __exportStar; },
|
|
3328
|
+
/* harmony export */ __extends: function() { return /* binding */ __extends; },
|
|
3329
|
+
/* harmony export */ __generator: function() { return /* binding */ __generator; },
|
|
3330
|
+
/* harmony export */ __importDefault: function() { return /* binding */ __importDefault; },
|
|
3331
|
+
/* harmony export */ __importStar: function() { return /* binding */ __importStar; },
|
|
3332
|
+
/* harmony export */ __makeTemplateObject: function() { return /* binding */ __makeTemplateObject; },
|
|
3333
|
+
/* harmony export */ __metadata: function() { return /* binding */ __metadata; },
|
|
3334
|
+
/* harmony export */ __param: function() { return /* binding */ __param; },
|
|
3335
|
+
/* harmony export */ __propKey: function() { return /* binding */ __propKey; },
|
|
3336
|
+
/* harmony export */ __read: function() { return /* binding */ __read; },
|
|
3337
|
+
/* harmony export */ __rest: function() { return /* binding */ __rest; },
|
|
3338
|
+
/* harmony export */ __runInitializers: function() { return /* binding */ __runInitializers; },
|
|
3339
|
+
/* harmony export */ __setFunctionName: function() { return /* binding */ __setFunctionName; },
|
|
3340
|
+
/* harmony export */ __spread: function() { return /* binding */ __spread; },
|
|
3341
|
+
/* harmony export */ __spreadArray: function() { return /* binding */ __spreadArray; },
|
|
3342
|
+
/* harmony export */ __spreadArrays: function() { return /* binding */ __spreadArrays; },
|
|
3343
|
+
/* harmony export */ __values: function() { return /* binding */ __values; }
|
|
3237
3344
|
/* harmony export */ });
|
|
3238
|
-
/* unused harmony exports __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources */
|
|
3239
3345
|
/******************************************************************************
|
|
3240
3346
|
Copyright (c) Microsoft Corporation.
|
|
3241
3347
|
|
|
@@ -3585,7 +3691,7 @@ function __disposeResources(env) {
|
|
|
3585
3691
|
return next();
|
|
3586
3692
|
}
|
|
3587
3693
|
|
|
3588
|
-
/*
|
|
3694
|
+
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
3589
3695
|
__extends,
|
|
3590
3696
|
__assign,
|
|
3591
3697
|
__rest,
|
|
@@ -3680,7 +3786,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3680
3786
|
|
|
3681
3787
|
// EXPORTS
|
|
3682
3788
|
__webpack_require__.d(__webpack_exports__, {
|
|
3683
|
-
|
|
3789
|
+
AICC: function() { return /* binding */ AICCImpl; }
|
|
3684
3790
|
});
|
|
3685
3791
|
|
|
3686
3792
|
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs
|
|
@@ -3695,6 +3801,27 @@ var api_constants = __webpack_require__(340);
|
|
|
3695
3801
|
var array = __webpack_require__(589);
|
|
3696
3802
|
// EXTERNAL MODULE: ./src/exceptions.ts
|
|
3697
3803
|
var exceptions = __webpack_require__(784);
|
|
3804
|
+
;// ./src/exceptions/aicc_exceptions.ts
|
|
3805
|
+
|
|
3806
|
+
|
|
3807
|
+
|
|
3808
|
+
var aicc_errors = api_constants.aicc_constants.error_descriptions;
|
|
3809
|
+
var AICCValidationError = (function (_super) {
|
|
3810
|
+
(0,tslib_es6.__extends)(AICCValidationError, _super);
|
|
3811
|
+
function AICCValidationError(errorCode) {
|
|
3812
|
+
var _this = this;
|
|
3813
|
+
if ({}.hasOwnProperty.call(aicc_errors, String(errorCode))) {
|
|
3814
|
+
_this = _super.call(this, errorCode, aicc_errors[String(errorCode)].basicMessage, aicc_errors[String(errorCode)].detailMessage) || this;
|
|
3815
|
+
}
|
|
3816
|
+
else {
|
|
3817
|
+
_this = _super.call(this, 101, aicc_errors["101"].basicMessage, aicc_errors["101"].detailMessage) || this;
|
|
3818
|
+
}
|
|
3819
|
+
return _this;
|
|
3820
|
+
}
|
|
3821
|
+
return AICCValidationError;
|
|
3822
|
+
}(exceptions.ValidationError));
|
|
3823
|
+
|
|
3824
|
+
|
|
3698
3825
|
// EXTERNAL MODULE: ./src/cmi/common/base_cmi.ts
|
|
3699
3826
|
var base_cmi = __webpack_require__(319);
|
|
3700
3827
|
// EXTERNAL MODULE: ./src/constants/error_codes.ts
|
|
@@ -3705,9 +3832,8 @@ var validation = __webpack_require__(449);
|
|
|
3705
3832
|
|
|
3706
3833
|
|
|
3707
3834
|
|
|
3708
|
-
var aicc_error_codes = error_codes/* default */.A.scorm12;
|
|
3709
3835
|
function checkAICCValidFormat(value, regexPattern, allowEmptyString) {
|
|
3710
|
-
return (0,validation
|
|
3836
|
+
return (0,validation.checkValidFormat)(value, regexPattern, error_codes.scorm12_errors.TYPE_MISMATCH, AICCValidationError, allowEmptyString);
|
|
3711
3837
|
}
|
|
3712
3838
|
|
|
3713
3839
|
// EXTERNAL MODULE: ./src/constants/regex.ts
|
|
@@ -3722,7 +3848,7 @@ var regex = __webpack_require__(417);
|
|
|
3722
3848
|
|
|
3723
3849
|
|
|
3724
3850
|
var CMIEvaluation = (function (_super) {
|
|
3725
|
-
(0,tslib_es6
|
|
3851
|
+
(0,tslib_es6.__extends)(CMIEvaluation, _super);
|
|
3726
3852
|
function CMIEvaluation() {
|
|
3727
3853
|
var _this = _super.call(this) || this;
|
|
3728
3854
|
_this.comments = new CMIEvaluationComments();
|
|
@@ -3733,6 +3859,11 @@ var CMIEvaluation = (function (_super) {
|
|
|
3733
3859
|
_super.prototype.initialize.call(this);
|
|
3734
3860
|
(_a = this.comments) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
3735
3861
|
};
|
|
3862
|
+
CMIEvaluation.prototype.reset = function () {
|
|
3863
|
+
var _a;
|
|
3864
|
+
this._initialized = false;
|
|
3865
|
+
(_a = this.comments) === null || _a === void 0 ? void 0 : _a.reset();
|
|
3866
|
+
};
|
|
3736
3867
|
CMIEvaluation.prototype.toJSON = function () {
|
|
3737
3868
|
this.jsonString = true;
|
|
3738
3869
|
var result = {
|
|
@@ -3742,21 +3873,21 @@ var CMIEvaluation = (function (_super) {
|
|
|
3742
3873
|
return result;
|
|
3743
3874
|
};
|
|
3744
3875
|
return CMIEvaluation;
|
|
3745
|
-
}(base_cmi
|
|
3876
|
+
}(base_cmi.BaseCMI));
|
|
3746
3877
|
|
|
3747
3878
|
var CMIEvaluationComments = (function (_super) {
|
|
3748
|
-
(0,tslib_es6
|
|
3879
|
+
(0,tslib_es6.__extends)(CMIEvaluationComments, _super);
|
|
3749
3880
|
function CMIEvaluationComments() {
|
|
3750
3881
|
return _super.call(this, {
|
|
3751
|
-
children: api_constants
|
|
3752
|
-
errorCode: error_codes
|
|
3753
|
-
errorClass:
|
|
3882
|
+
children: api_constants.aicc_constants.comments_children,
|
|
3883
|
+
errorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
3884
|
+
errorClass: AICCValidationError,
|
|
3754
3885
|
}) || this;
|
|
3755
3886
|
}
|
|
3756
3887
|
return CMIEvaluationComments;
|
|
3757
|
-
}(array
|
|
3888
|
+
}(array.CMIArray));
|
|
3758
3889
|
var CMIEvaluationCommentsObject = (function (_super) {
|
|
3759
|
-
(0,tslib_es6
|
|
3890
|
+
(0,tslib_es6.__extends)(CMIEvaluationCommentsObject, _super);
|
|
3760
3891
|
function CMIEvaluationCommentsObject() {
|
|
3761
3892
|
var _this = _super.call(this) || this;
|
|
3762
3893
|
_this._content = "";
|
|
@@ -3764,12 +3895,18 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3764
3895
|
_this._time = "";
|
|
3765
3896
|
return _this;
|
|
3766
3897
|
}
|
|
3898
|
+
CMIEvaluationCommentsObject.prototype.reset = function () {
|
|
3899
|
+
this._initialized = false;
|
|
3900
|
+
this._content = "";
|
|
3901
|
+
this._location = "";
|
|
3902
|
+
this._time = "";
|
|
3903
|
+
};
|
|
3767
3904
|
Object.defineProperty(CMIEvaluationCommentsObject.prototype, "content", {
|
|
3768
3905
|
get: function () {
|
|
3769
3906
|
return this._content;
|
|
3770
3907
|
},
|
|
3771
3908
|
set: function (content) {
|
|
3772
|
-
if (checkAICCValidFormat(content, regex
|
|
3909
|
+
if (checkAICCValidFormat(content, regex.aicc_regex.CMIString256)) {
|
|
3773
3910
|
this._content = content;
|
|
3774
3911
|
}
|
|
3775
3912
|
},
|
|
@@ -3781,7 +3918,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3781
3918
|
return this._location;
|
|
3782
3919
|
},
|
|
3783
3920
|
set: function (location) {
|
|
3784
|
-
if (checkAICCValidFormat(location, regex
|
|
3921
|
+
if (checkAICCValidFormat(location, regex.aicc_regex.CMIString256)) {
|
|
3785
3922
|
this._location = location;
|
|
3786
3923
|
}
|
|
3787
3924
|
},
|
|
@@ -3793,7 +3930,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3793
3930
|
return this._time;
|
|
3794
3931
|
},
|
|
3795
3932
|
set: function (time) {
|
|
3796
|
-
if (checkAICCValidFormat(time, regex
|
|
3933
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
3797
3934
|
this._time = time;
|
|
3798
3935
|
}
|
|
3799
3936
|
},
|
|
@@ -3811,7 +3948,7 @@ var CMIEvaluationCommentsObject = (function (_super) {
|
|
|
3811
3948
|
return result;
|
|
3812
3949
|
};
|
|
3813
3950
|
return CMIEvaluationCommentsObject;
|
|
3814
|
-
}(base_cmi
|
|
3951
|
+
}(base_cmi.BaseCMI));
|
|
3815
3952
|
|
|
3816
3953
|
|
|
3817
3954
|
// EXTERNAL MODULE: ./src/cmi/scorm12/student_preference.ts
|
|
@@ -3826,17 +3963,17 @@ var student_preference = __webpack_require__(181);
|
|
|
3826
3963
|
|
|
3827
3964
|
|
|
3828
3965
|
var AICCStudentPreferences = (function (_super) {
|
|
3829
|
-
(0,tslib_es6
|
|
3966
|
+
(0,tslib_es6.__extends)(AICCStudentPreferences, _super);
|
|
3830
3967
|
function AICCStudentPreferences() {
|
|
3831
|
-
var _this = _super.call(this, api_constants
|
|
3968
|
+
var _this = _super.call(this, api_constants.aicc_constants.student_preference_children) || this;
|
|
3832
3969
|
_this._lesson_type = "";
|
|
3833
3970
|
_this._text_color = "";
|
|
3834
3971
|
_this._text_location = "";
|
|
3835
3972
|
_this._text_size = "";
|
|
3836
3973
|
_this._video = "";
|
|
3837
|
-
_this.windows = new array
|
|
3838
|
-
errorCode: error_codes
|
|
3839
|
-
errorClass:
|
|
3974
|
+
_this.windows = new array.CMIArray({
|
|
3975
|
+
errorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
3976
|
+
errorClass: AICCValidationError,
|
|
3840
3977
|
children: "",
|
|
3841
3978
|
});
|
|
3842
3979
|
return _this;
|
|
@@ -3851,7 +3988,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3851
3988
|
return this._lesson_type;
|
|
3852
3989
|
},
|
|
3853
3990
|
set: function (lesson_type) {
|
|
3854
|
-
if (checkAICCValidFormat(lesson_type, regex
|
|
3991
|
+
if (checkAICCValidFormat(lesson_type, regex.aicc_regex.CMIString256)) {
|
|
3855
3992
|
this._lesson_type = lesson_type;
|
|
3856
3993
|
}
|
|
3857
3994
|
},
|
|
@@ -3863,7 +4000,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3863
4000
|
return this._text_color;
|
|
3864
4001
|
},
|
|
3865
4002
|
set: function (text_color) {
|
|
3866
|
-
if (checkAICCValidFormat(text_color, regex
|
|
4003
|
+
if (checkAICCValidFormat(text_color, regex.aicc_regex.CMIString256)) {
|
|
3867
4004
|
this._text_color = text_color;
|
|
3868
4005
|
}
|
|
3869
4006
|
},
|
|
@@ -3875,7 +4012,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3875
4012
|
return this._text_location;
|
|
3876
4013
|
},
|
|
3877
4014
|
set: function (text_location) {
|
|
3878
|
-
if (checkAICCValidFormat(text_location, regex
|
|
4015
|
+
if (checkAICCValidFormat(text_location, regex.aicc_regex.CMIString256)) {
|
|
3879
4016
|
this._text_location = text_location;
|
|
3880
4017
|
}
|
|
3881
4018
|
},
|
|
@@ -3887,7 +4024,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3887
4024
|
return this._text_size;
|
|
3888
4025
|
},
|
|
3889
4026
|
set: function (text_size) {
|
|
3890
|
-
if (checkAICCValidFormat(text_size, regex
|
|
4027
|
+
if (checkAICCValidFormat(text_size, regex.aicc_regex.CMIString256)) {
|
|
3891
4028
|
this._text_size = text_size;
|
|
3892
4029
|
}
|
|
3893
4030
|
},
|
|
@@ -3899,7 +4036,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3899
4036
|
return this._video;
|
|
3900
4037
|
},
|
|
3901
4038
|
set: function (video) {
|
|
3902
|
-
if (checkAICCValidFormat(video, regex
|
|
4039
|
+
if (checkAICCValidFormat(video, regex.aicc_regex.CMIString256)) {
|
|
3903
4040
|
this._video = video;
|
|
3904
4041
|
}
|
|
3905
4042
|
},
|
|
@@ -3924,7 +4061,7 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3924
4061
|
return result;
|
|
3925
4062
|
};
|
|
3926
4063
|
return AICCStudentPreferences;
|
|
3927
|
-
}(student_preference
|
|
4064
|
+
}(student_preference.CMIStudentPreference));
|
|
3928
4065
|
|
|
3929
4066
|
|
|
3930
4067
|
;// ./src/cmi/aicc/student_demographics.ts
|
|
@@ -3934,10 +4071,10 @@ var AICCStudentPreferences = (function (_super) {
|
|
|
3934
4071
|
|
|
3935
4072
|
|
|
3936
4073
|
var CMIStudentDemographics = (function (_super) {
|
|
3937
|
-
(0,tslib_es6
|
|
4074
|
+
(0,tslib_es6.__extends)(CMIStudentDemographics, _super);
|
|
3938
4075
|
function CMIStudentDemographics() {
|
|
3939
4076
|
var _this = _super.call(this) || this;
|
|
3940
|
-
_this.__children = api_constants
|
|
4077
|
+
_this.__children = api_constants.aicc_constants.student_demographics_children;
|
|
3941
4078
|
_this._city = "";
|
|
3942
4079
|
_this._class = "";
|
|
3943
4080
|
_this._company = "";
|
|
@@ -3953,6 +4090,9 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3953
4090
|
_this._years_experience = "";
|
|
3954
4091
|
return _this;
|
|
3955
4092
|
}
|
|
4093
|
+
CMIStudentDemographics.prototype.reset = function () {
|
|
4094
|
+
this._initialized = false;
|
|
4095
|
+
};
|
|
3956
4096
|
Object.defineProperty(CMIStudentDemographics.prototype, "_children", {
|
|
3957
4097
|
get: function () {
|
|
3958
4098
|
return this.__children;
|
|
@@ -3966,7 +4106,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3966
4106
|
},
|
|
3967
4107
|
set: function (city) {
|
|
3968
4108
|
if (this.initialized) {
|
|
3969
|
-
throw new
|
|
4109
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3970
4110
|
}
|
|
3971
4111
|
else {
|
|
3972
4112
|
this._city = city;
|
|
@@ -3981,7 +4121,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3981
4121
|
},
|
|
3982
4122
|
set: function (clazz) {
|
|
3983
4123
|
if (this.initialized) {
|
|
3984
|
-
throw new
|
|
4124
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
3985
4125
|
}
|
|
3986
4126
|
else {
|
|
3987
4127
|
this._class = clazz;
|
|
@@ -3996,7 +4136,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
3996
4136
|
},
|
|
3997
4137
|
set: function (company) {
|
|
3998
4138
|
if (this.initialized) {
|
|
3999
|
-
throw new
|
|
4139
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4000
4140
|
}
|
|
4001
4141
|
else {
|
|
4002
4142
|
this._company = company;
|
|
@@ -4011,7 +4151,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4011
4151
|
},
|
|
4012
4152
|
set: function (country) {
|
|
4013
4153
|
if (this.initialized) {
|
|
4014
|
-
throw new
|
|
4154
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4015
4155
|
}
|
|
4016
4156
|
else {
|
|
4017
4157
|
this._country = country;
|
|
@@ -4026,7 +4166,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4026
4166
|
},
|
|
4027
4167
|
set: function (experience) {
|
|
4028
4168
|
if (this.initialized) {
|
|
4029
|
-
throw new
|
|
4169
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4030
4170
|
}
|
|
4031
4171
|
else {
|
|
4032
4172
|
this._experience = experience;
|
|
@@ -4041,7 +4181,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4041
4181
|
},
|
|
4042
4182
|
set: function (familiar_name) {
|
|
4043
4183
|
if (this.initialized) {
|
|
4044
|
-
throw new
|
|
4184
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4045
4185
|
}
|
|
4046
4186
|
else {
|
|
4047
4187
|
this._familiar_name = familiar_name;
|
|
@@ -4056,7 +4196,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4056
4196
|
},
|
|
4057
4197
|
set: function (instructor_name) {
|
|
4058
4198
|
if (this.initialized) {
|
|
4059
|
-
throw new
|
|
4199
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4060
4200
|
}
|
|
4061
4201
|
else {
|
|
4062
4202
|
this._instructor_name = instructor_name;
|
|
@@ -4071,7 +4211,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4071
4211
|
},
|
|
4072
4212
|
set: function (title) {
|
|
4073
4213
|
if (this.initialized) {
|
|
4074
|
-
throw new
|
|
4214
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4075
4215
|
}
|
|
4076
4216
|
else {
|
|
4077
4217
|
this._title = title;
|
|
@@ -4086,7 +4226,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4086
4226
|
},
|
|
4087
4227
|
set: function (native_language) {
|
|
4088
4228
|
if (this.initialized) {
|
|
4089
|
-
throw new
|
|
4229
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4090
4230
|
}
|
|
4091
4231
|
else {
|
|
4092
4232
|
this._native_language = native_language;
|
|
@@ -4101,7 +4241,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4101
4241
|
},
|
|
4102
4242
|
set: function (state) {
|
|
4103
4243
|
if (this.initialized) {
|
|
4104
|
-
throw new
|
|
4244
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4105
4245
|
}
|
|
4106
4246
|
else {
|
|
4107
4247
|
this._state = state;
|
|
@@ -4116,7 +4256,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4116
4256
|
},
|
|
4117
4257
|
set: function (street_address) {
|
|
4118
4258
|
if (this.initialized) {
|
|
4119
|
-
throw new
|
|
4259
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4120
4260
|
}
|
|
4121
4261
|
else {
|
|
4122
4262
|
this._street_address = street_address;
|
|
@@ -4131,7 +4271,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4131
4271
|
},
|
|
4132
4272
|
set: function (telephone) {
|
|
4133
4273
|
if (this.initialized) {
|
|
4134
|
-
throw new
|
|
4274
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4135
4275
|
}
|
|
4136
4276
|
else {
|
|
4137
4277
|
this._telephone = telephone;
|
|
@@ -4146,7 +4286,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4146
4286
|
},
|
|
4147
4287
|
set: function (years_experience) {
|
|
4148
4288
|
if (this.initialized) {
|
|
4149
|
-
throw new
|
|
4289
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4150
4290
|
}
|
|
4151
4291
|
else {
|
|
4152
4292
|
this._years_experience = years_experience;
|
|
@@ -4176,7 +4316,7 @@ var CMIStudentDemographics = (function (_super) {
|
|
|
4176
4316
|
return result;
|
|
4177
4317
|
};
|
|
4178
4318
|
return CMIStudentDemographics;
|
|
4179
|
-
}(base_cmi
|
|
4319
|
+
}(base_cmi.BaseCMI));
|
|
4180
4320
|
|
|
4181
4321
|
|
|
4182
4322
|
// EXTERNAL MODULE: ./src/cmi/common/score.ts
|
|
@@ -4192,28 +4332,28 @@ var score = __webpack_require__(434);
|
|
|
4192
4332
|
|
|
4193
4333
|
|
|
4194
4334
|
var CMITries = (function (_super) {
|
|
4195
|
-
(0,tslib_es6
|
|
4335
|
+
(0,tslib_es6.__extends)(CMITries, _super);
|
|
4196
4336
|
function CMITries() {
|
|
4197
4337
|
return _super.call(this, {
|
|
4198
|
-
children: api_constants
|
|
4338
|
+
children: api_constants.aicc_constants.tries_children,
|
|
4199
4339
|
}) || this;
|
|
4200
4340
|
}
|
|
4201
4341
|
return CMITries;
|
|
4202
|
-
}(array
|
|
4342
|
+
}(array.CMIArray));
|
|
4203
4343
|
|
|
4204
4344
|
var CMITriesObject = (function (_super) {
|
|
4205
|
-
(0,tslib_es6
|
|
4345
|
+
(0,tslib_es6.__extends)(CMITriesObject, _super);
|
|
4206
4346
|
function CMITriesObject() {
|
|
4207
4347
|
var _this = _super.call(this) || this;
|
|
4208
4348
|
_this._status = "";
|
|
4209
4349
|
_this._time = "";
|
|
4210
|
-
_this.score = new score
|
|
4211
|
-
score_children: api_constants
|
|
4212
|
-
score_range: regex
|
|
4213
|
-
invalidErrorCode: error_codes
|
|
4214
|
-
invalidTypeCode: error_codes
|
|
4215
|
-
invalidRangeCode: error_codes
|
|
4216
|
-
errorClass:
|
|
4350
|
+
_this.score = new score.CMIScore({
|
|
4351
|
+
score_children: api_constants.aicc_constants.score_children,
|
|
4352
|
+
score_range: regex.aicc_regex.score_range,
|
|
4353
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
4354
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
4355
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
4356
|
+
errorClass: AICCValidationError,
|
|
4217
4357
|
});
|
|
4218
4358
|
return _this;
|
|
4219
4359
|
}
|
|
@@ -4222,12 +4362,19 @@ var CMITriesObject = (function (_super) {
|
|
|
4222
4362
|
_super.prototype.initialize.call(this);
|
|
4223
4363
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4224
4364
|
};
|
|
4365
|
+
CMITriesObject.prototype.reset = function () {
|
|
4366
|
+
var _a;
|
|
4367
|
+
this._initialized = false;
|
|
4368
|
+
this._status = "";
|
|
4369
|
+
this._time = "";
|
|
4370
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4371
|
+
};
|
|
4225
4372
|
Object.defineProperty(CMITriesObject.prototype, "status", {
|
|
4226
4373
|
get: function () {
|
|
4227
4374
|
return this._status;
|
|
4228
4375
|
},
|
|
4229
4376
|
set: function (status) {
|
|
4230
|
-
if (checkAICCValidFormat(status, regex
|
|
4377
|
+
if (checkAICCValidFormat(status, regex.aicc_regex.CMIStatus2)) {
|
|
4231
4378
|
this._status = status;
|
|
4232
4379
|
}
|
|
4233
4380
|
},
|
|
@@ -4239,7 +4386,7 @@ var CMITriesObject = (function (_super) {
|
|
|
4239
4386
|
return this._time;
|
|
4240
4387
|
},
|
|
4241
4388
|
set: function (time) {
|
|
4242
|
-
if (checkAICCValidFormat(time, regex
|
|
4389
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
4243
4390
|
this._time = time;
|
|
4244
4391
|
}
|
|
4245
4392
|
},
|
|
@@ -4257,7 +4404,7 @@ var CMITriesObject = (function (_super) {
|
|
|
4257
4404
|
return result;
|
|
4258
4405
|
};
|
|
4259
4406
|
return CMITriesObject;
|
|
4260
|
-
}(base_cmi
|
|
4407
|
+
}(base_cmi.BaseCMI));
|
|
4261
4408
|
|
|
4262
4409
|
|
|
4263
4410
|
// EXTERNAL MODULE: ./src/cmi/scorm12/student_data.ts
|
|
@@ -4273,41 +4420,47 @@ var student_data = __webpack_require__(532);
|
|
|
4273
4420
|
|
|
4274
4421
|
|
|
4275
4422
|
var CMIAttemptRecords = (function (_super) {
|
|
4276
|
-
(0,tslib_es6
|
|
4423
|
+
(0,tslib_es6.__extends)(CMIAttemptRecords, _super);
|
|
4277
4424
|
function CMIAttemptRecords() {
|
|
4278
4425
|
return _super.call(this, {
|
|
4279
|
-
children: api_constants
|
|
4426
|
+
children: api_constants.aicc_constants.attempt_records_children,
|
|
4280
4427
|
}) || this;
|
|
4281
4428
|
}
|
|
4282
4429
|
return CMIAttemptRecords;
|
|
4283
|
-
}(array
|
|
4430
|
+
}(array.CMIArray));
|
|
4284
4431
|
|
|
4285
4432
|
var CMIAttemptRecordsObject = (function (_super) {
|
|
4286
|
-
(0,tslib_es6
|
|
4433
|
+
(0,tslib_es6.__extends)(CMIAttemptRecordsObject, _super);
|
|
4287
4434
|
function CMIAttemptRecordsObject() {
|
|
4288
4435
|
var _this = _super.call(this) || this;
|
|
4289
4436
|
_this._lesson_status = "";
|
|
4290
|
-
_this.score = new score
|
|
4291
|
-
score_children: api_constants
|
|
4292
|
-
score_range: regex
|
|
4293
|
-
invalidErrorCode: error_codes
|
|
4294
|
-
invalidTypeCode: error_codes
|
|
4295
|
-
invalidRangeCode: error_codes
|
|
4296
|
-
errorClass:
|
|
4437
|
+
_this.score = new score.CMIScore({
|
|
4438
|
+
score_children: api_constants.aicc_constants.score_children,
|
|
4439
|
+
score_range: regex.aicc_regex.score_range,
|
|
4440
|
+
invalidErrorCode: error_codes.scorm12_errors.INVALID_SET_VALUE,
|
|
4441
|
+
invalidTypeCode: error_codes.scorm12_errors.TYPE_MISMATCH,
|
|
4442
|
+
invalidRangeCode: error_codes.scorm12_errors.VALUE_OUT_OF_RANGE,
|
|
4443
|
+
errorClass: AICCValidationError,
|
|
4297
4444
|
});
|
|
4298
4445
|
return _this;
|
|
4299
4446
|
}
|
|
4300
4447
|
CMIAttemptRecordsObject.prototype.initialize = function () {
|
|
4301
4448
|
var _a;
|
|
4302
4449
|
_super.prototype.initialize.call(this);
|
|
4450
|
+
this._lesson_status = "";
|
|
4303
4451
|
(_a = this.score) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4304
4452
|
};
|
|
4453
|
+
CMIAttemptRecordsObject.prototype.reset = function () {
|
|
4454
|
+
var _a;
|
|
4455
|
+
this._initialized = false;
|
|
4456
|
+
(_a = this.score) === null || _a === void 0 ? void 0 : _a.reset();
|
|
4457
|
+
};
|
|
4305
4458
|
Object.defineProperty(CMIAttemptRecordsObject.prototype, "lesson_status", {
|
|
4306
4459
|
get: function () {
|
|
4307
4460
|
return this._lesson_status;
|
|
4308
4461
|
},
|
|
4309
4462
|
set: function (lesson_status) {
|
|
4310
|
-
if (checkAICCValidFormat(lesson_status, regex
|
|
4463
|
+
if (checkAICCValidFormat(lesson_status, regex.aicc_regex.CMIStatus2)) {
|
|
4311
4464
|
this._lesson_status = lesson_status;
|
|
4312
4465
|
}
|
|
4313
4466
|
},
|
|
@@ -4324,7 +4477,7 @@ var CMIAttemptRecordsObject = (function (_super) {
|
|
|
4324
4477
|
return result;
|
|
4325
4478
|
};
|
|
4326
4479
|
return CMIAttemptRecordsObject;
|
|
4327
|
-
}(base_cmi
|
|
4480
|
+
}(base_cmi.BaseCMI));
|
|
4328
4481
|
|
|
4329
4482
|
|
|
4330
4483
|
;// ./src/cmi/aicc/student_data.ts
|
|
@@ -4336,9 +4489,9 @@ var CMIAttemptRecordsObject = (function (_super) {
|
|
|
4336
4489
|
|
|
4337
4490
|
|
|
4338
4491
|
var AICCCMIStudentData = (function (_super) {
|
|
4339
|
-
(0,tslib_es6
|
|
4492
|
+
(0,tslib_es6.__extends)(AICCCMIStudentData, _super);
|
|
4340
4493
|
function AICCCMIStudentData() {
|
|
4341
|
-
var _this = _super.call(this, api_constants
|
|
4494
|
+
var _this = _super.call(this, api_constants.aicc_constants.student_data_children) || this;
|
|
4342
4495
|
_this._tries_during_lesson = "";
|
|
4343
4496
|
_this.tries = new CMITries();
|
|
4344
4497
|
_this.attempt_records = new CMIAttemptRecords();
|
|
@@ -4350,13 +4503,19 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4350
4503
|
(_a = this.tries) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
4351
4504
|
(_b = this.attempt_records) === null || _b === void 0 ? void 0 : _b.initialize();
|
|
4352
4505
|
};
|
|
4506
|
+
AICCCMIStudentData.prototype.reset = function () {
|
|
4507
|
+
var _a, _b;
|
|
4508
|
+
this._initialized = false;
|
|
4509
|
+
(_a = this.tries) === null || _a === void 0 ? void 0 : _a.reset(true);
|
|
4510
|
+
(_b = this.attempt_records) === null || _b === void 0 ? void 0 : _b.reset(true);
|
|
4511
|
+
};
|
|
4353
4512
|
Object.defineProperty(AICCCMIStudentData.prototype, "tries_during_lesson", {
|
|
4354
4513
|
get: function () {
|
|
4355
4514
|
return this._tries_during_lesson;
|
|
4356
4515
|
},
|
|
4357
4516
|
set: function (tries_during_lesson) {
|
|
4358
4517
|
if (this.initialized) {
|
|
4359
|
-
throw new
|
|
4518
|
+
throw new AICCValidationError(error_codes.scorm12_errors.READ_ONLY_ELEMENT);
|
|
4360
4519
|
}
|
|
4361
4520
|
else {
|
|
4362
4521
|
this._tries_during_lesson = tries_during_lesson;
|
|
@@ -4378,7 +4537,7 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4378
4537
|
return result;
|
|
4379
4538
|
};
|
|
4380
4539
|
return AICCCMIStudentData;
|
|
4381
|
-
}(student_data
|
|
4540
|
+
}(student_data.CMIStudentData));
|
|
4382
4541
|
|
|
4383
4542
|
|
|
4384
4543
|
;// ./src/cmi/aicc/paths.ts
|
|
@@ -4389,17 +4548,17 @@ var AICCCMIStudentData = (function (_super) {
|
|
|
4389
4548
|
|
|
4390
4549
|
|
|
4391
4550
|
var CMIPaths = (function (_super) {
|
|
4392
|
-
(0,tslib_es6
|
|
4551
|
+
(0,tslib_es6.__extends)(CMIPaths, _super);
|
|
4393
4552
|
function CMIPaths() {
|
|
4394
4553
|
return _super.call(this, {
|
|
4395
|
-
children: api_constants
|
|
4554
|
+
children: api_constants.aicc_constants.paths_children,
|
|
4396
4555
|
}) || this;
|
|
4397
4556
|
}
|
|
4398
4557
|
return CMIPaths;
|
|
4399
|
-
}(array
|
|
4558
|
+
}(array.CMIArray));
|
|
4400
4559
|
|
|
4401
4560
|
var CMIPathsObject = (function (_super) {
|
|
4402
|
-
(0,tslib_es6
|
|
4561
|
+
(0,tslib_es6.__extends)(CMIPathsObject, _super);
|
|
4403
4562
|
function CMIPathsObject() {
|
|
4404
4563
|
var _this = _super.call(this) || this;
|
|
4405
4564
|
_this._location_id = "";
|
|
@@ -4410,12 +4569,21 @@ var CMIPathsObject = (function (_super) {
|
|
|
4410
4569
|
_this._time_in_element = "";
|
|
4411
4570
|
return _this;
|
|
4412
4571
|
}
|
|
4572
|
+
CMIPathsObject.prototype.reset = function () {
|
|
4573
|
+
this._initialized = false;
|
|
4574
|
+
this._location_id = "";
|
|
4575
|
+
this._date = "";
|
|
4576
|
+
this._time = "";
|
|
4577
|
+
this._status = "";
|
|
4578
|
+
this._why_left = "";
|
|
4579
|
+
this._time_in_element = "";
|
|
4580
|
+
};
|
|
4413
4581
|
Object.defineProperty(CMIPathsObject.prototype, "location_id", {
|
|
4414
4582
|
get: function () {
|
|
4415
4583
|
return this._location_id;
|
|
4416
4584
|
},
|
|
4417
4585
|
set: function (location_id) {
|
|
4418
|
-
if (checkAICCValidFormat(location_id, regex
|
|
4586
|
+
if (checkAICCValidFormat(location_id, regex.aicc_regex.CMIString256)) {
|
|
4419
4587
|
this._location_id = location_id;
|
|
4420
4588
|
}
|
|
4421
4589
|
},
|
|
@@ -4427,7 +4595,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4427
4595
|
return this._date;
|
|
4428
4596
|
},
|
|
4429
4597
|
set: function (date) {
|
|
4430
|
-
if (checkAICCValidFormat(date, regex
|
|
4598
|
+
if (checkAICCValidFormat(date, regex.aicc_regex.CMIString256)) {
|
|
4431
4599
|
this._date = date;
|
|
4432
4600
|
}
|
|
4433
4601
|
},
|
|
@@ -4439,7 +4607,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4439
4607
|
return this._time;
|
|
4440
4608
|
},
|
|
4441
4609
|
set: function (time) {
|
|
4442
|
-
if (checkAICCValidFormat(time, regex
|
|
4610
|
+
if (checkAICCValidFormat(time, regex.aicc_regex.CMITime)) {
|
|
4443
4611
|
this._time = time;
|
|
4444
4612
|
}
|
|
4445
4613
|
},
|
|
@@ -4451,7 +4619,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4451
4619
|
return this._status;
|
|
4452
4620
|
},
|
|
4453
4621
|
set: function (status) {
|
|
4454
|
-
if (checkAICCValidFormat(status, regex
|
|
4622
|
+
if (checkAICCValidFormat(status, regex.aicc_regex.CMIStatus2)) {
|
|
4455
4623
|
this._status = status;
|
|
4456
4624
|
}
|
|
4457
4625
|
},
|
|
@@ -4463,7 +4631,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4463
4631
|
return this._why_left;
|
|
4464
4632
|
},
|
|
4465
4633
|
set: function (why_left) {
|
|
4466
|
-
if (checkAICCValidFormat(why_left, regex
|
|
4634
|
+
if (checkAICCValidFormat(why_left, regex.aicc_regex.CMIString256)) {
|
|
4467
4635
|
this._why_left = why_left;
|
|
4468
4636
|
}
|
|
4469
4637
|
},
|
|
@@ -4475,7 +4643,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4475
4643
|
return this._time_in_element;
|
|
4476
4644
|
},
|
|
4477
4645
|
set: function (time_in_element) {
|
|
4478
|
-
if (checkAICCValidFormat(time_in_element, regex
|
|
4646
|
+
if (checkAICCValidFormat(time_in_element, regex.aicc_regex.CMITime)) {
|
|
4479
4647
|
this._time_in_element = time_in_element;
|
|
4480
4648
|
}
|
|
4481
4649
|
},
|
|
@@ -4496,7 +4664,7 @@ var CMIPathsObject = (function (_super) {
|
|
|
4496
4664
|
return result;
|
|
4497
4665
|
};
|
|
4498
4666
|
return CMIPathsObject;
|
|
4499
|
-
}(base_cmi
|
|
4667
|
+
}(base_cmi.BaseCMI));
|
|
4500
4668
|
|
|
4501
4669
|
|
|
4502
4670
|
;// ./src/cmi/aicc/cmi.ts
|
|
@@ -4509,10 +4677,10 @@ var CMIPathsObject = (function (_super) {
|
|
|
4509
4677
|
|
|
4510
4678
|
|
|
4511
4679
|
var CMI = (function (_super) {
|
|
4512
|
-
(0,tslib_es6
|
|
4680
|
+
(0,tslib_es6.__extends)(CMI, _super);
|
|
4513
4681
|
function CMI(initialized) {
|
|
4514
4682
|
if (initialized === void 0) { initialized = false; }
|
|
4515
|
-
var _this = _super.call(this, api_constants
|
|
4683
|
+
var _this = _super.call(this, api_constants.aicc_constants.cmi_children) || this;
|
|
4516
4684
|
if (initialized)
|
|
4517
4685
|
_this.initialize();
|
|
4518
4686
|
_this.student_preference = new AICCStudentPreferences();
|
|
@@ -4551,7 +4719,7 @@ var CMI = (function (_super) {
|
|
|
4551
4719
|
return result;
|
|
4552
4720
|
};
|
|
4553
4721
|
return CMI;
|
|
4554
|
-
}(cmi
|
|
4722
|
+
}(cmi.CMI));
|
|
4555
4723
|
|
|
4556
4724
|
|
|
4557
4725
|
// EXTERNAL MODULE: ./src/cmi/scorm12/nav.ts
|
|
@@ -4569,26 +4737,26 @@ var utilities = __webpack_require__(864);
|
|
|
4569
4737
|
|
|
4570
4738
|
|
|
4571
4739
|
var AICCImpl = (function (_super) {
|
|
4572
|
-
(0,tslib_es6
|
|
4740
|
+
(0,tslib_es6.__extends)(AICCImpl, _super);
|
|
4573
4741
|
function AICCImpl(settings) {
|
|
4574
4742
|
var _this = _super.call(this, settings) || this;
|
|
4575
4743
|
_this.cmi = new CMI();
|
|
4576
|
-
_this.nav = new nav
|
|
4744
|
+
_this.nav = new nav.NAV();
|
|
4577
4745
|
return _this;
|
|
4578
4746
|
}
|
|
4579
4747
|
AICCImpl.prototype.getChildElement = function (CMIElement, value, foundFirstIndex) {
|
|
4580
4748
|
var newChild = _super.prototype.getChildElement.call(this, CMIElement, value, foundFirstIndex);
|
|
4581
4749
|
if (!newChild) {
|
|
4582
|
-
if ((0,utilities
|
|
4750
|
+
if ((0,utilities.stringMatches)(CMIElement, "cmi\\.evaluation\\.comments\\.\\d+")) {
|
|
4583
4751
|
newChild = new CMIEvaluationCommentsObject();
|
|
4584
4752
|
}
|
|
4585
|
-
else if ((0,utilities
|
|
4753
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.student_data\\.tries\\.\\d+")) {
|
|
4586
4754
|
newChild = new CMITriesObject();
|
|
4587
4755
|
}
|
|
4588
|
-
else if ((0,utilities
|
|
4756
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.student_data\\.attempt_records\\.\\d+")) {
|
|
4589
4757
|
newChild = new CMIAttemptRecordsObject();
|
|
4590
4758
|
}
|
|
4591
|
-
else if ((0,utilities
|
|
4759
|
+
else if ((0,utilities.stringMatches)(CMIElement, "cmi\\.paths\\.\\d+")) {
|
|
4592
4760
|
newChild = new CMIPathsObject();
|
|
4593
4761
|
}
|
|
4594
4762
|
}
|
|
@@ -4599,11 +4767,11 @@ var AICCImpl = (function (_super) {
|
|
|
4599
4767
|
this.nav = newAPI.nav;
|
|
4600
4768
|
};
|
|
4601
4769
|
return AICCImpl;
|
|
4602
|
-
}(Scorm12API.
|
|
4770
|
+
}(Scorm12API.Scorm12API));
|
|
4603
4771
|
|
|
4604
4772
|
|
|
4605
|
-
var __webpack_export_target__ =
|
|
4606
|
-
for(var
|
|
4773
|
+
var __webpack_export_target__ = window;
|
|
4774
|
+
for(var __webpack_i__ in __webpack_exports__) __webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
4607
4775
|
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
|
|
4608
4776
|
/******/ })()
|
|
4609
4777
|
;
|