diff --git a/dist/aicc.js b/dist/aicc.js index 6489bdf..b9c2075 100644 --- a/dist/aicc.js +++ b/dist/aicc.js @@ -2369,14 +2369,14 @@ var Scorm12API = /*#__PURE__*/function (_BaseAPI) { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "CMI": function() { return /* binding */ CMI; }, -/* harmony export */ "CMIStudentDemographics": function() { return /* binding */ CMIStudentDemographics; }, -/* harmony export */ "CMIPaths": function() { return /* binding */ CMIPaths; }, -/* harmony export */ "CMIPathsObject": function() { return /* binding */ CMIPathsObject; }, -/* harmony export */ "CMITries": function() { return /* binding */ CMITries; }, -/* harmony export */ "CMITriesObject": function() { return /* binding */ CMITriesObject; }, /* harmony export */ "CMIAttemptRecords": function() { return /* binding */ CMIAttemptRecords; }, /* harmony export */ "CMIAttemptRecordsObject": function() { return /* binding */ CMIAttemptRecordsObject; }, -/* harmony export */ "CMIEvaluationCommentsObject": function() { return /* binding */ CMIEvaluationCommentsObject; } +/* harmony export */ "CMIEvaluationCommentsObject": function() { return /* binding */ CMIEvaluationCommentsObject; }, +/* harmony export */ "CMIPaths": function() { return /* binding */ CMIPaths; }, +/* harmony export */ "CMIPathsObject": function() { return /* binding */ CMIPathsObject; }, +/* harmony export */ "CMIStudentDemographics": function() { return /* binding */ CMIStudentDemographics; }, +/* harmony export */ "CMITries": function() { return /* binding */ CMITries; }, +/* harmony export */ "CMITriesObject": function() { return /* binding */ CMITriesObject; } /* harmony export */ }); /* harmony import */ var _scorm12_cmi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scorm12_cmi */ "./src/cmi/scorm12_cmi.js"); /* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common */ "./src/cmi/common.js"); @@ -3995,11 +3995,11 @@ var CMIEvaluationCommentsObject = /*#__PURE__*/function (_BaseCMI6) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "checkValidFormat": function() { return /* binding */ checkValidFormat; }, -/* harmony export */ "checkValidRange": function() { return /* binding */ checkValidRange; }, /* harmony export */ "BaseCMI": function() { return /* binding */ BaseCMI; }, +/* harmony export */ "CMIArray": function() { return /* binding */ CMIArray; }, /* harmony export */ "CMIScore": function() { return /* binding */ CMIScore; }, -/* harmony export */ "CMIArray": function() { return /* binding */ CMIArray; } +/* harmony export */ "checkValidFormat": function() { return /* binding */ checkValidFormat; }, +/* harmony export */ "checkValidRange": function() { return /* binding */ checkValidRange; } /* harmony export */ }); /* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/api_constants */ "./src/constants/api_constants.js"); /* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/error_codes */ "./src/constants/error_codes.js"); @@ -4525,18 +4525,18 @@ var CMIArray = /*#__PURE__*/function (_BaseCMI2) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "throwReadOnlyError": function() { return /* binding */ throwReadOnlyError; }, -/* harmony export */ "throwWriteOnlyError": function() { return /* binding */ throwWriteOnlyError; }, -/* harmony export */ "check12ValidFormat": function() { return /* binding */ check12ValidFormat; }, -/* harmony export */ "check12ValidRange": function() { return /* binding */ check12ValidRange; }, /* harmony export */ "CMI": function() { return /* binding */ CMI; }, +/* harmony export */ "CMIInteractionsCorrectResponsesObject": function() { return /* binding */ CMIInteractionsCorrectResponsesObject; }, +/* harmony export */ "CMIInteractionsObject": function() { return /* binding */ CMIInteractionsObject; }, +/* harmony export */ "CMIInteractionsObjectivesObject": function() { return /* binding */ CMIInteractionsObjectivesObject; }, +/* harmony export */ "CMIObjectivesObject": function() { return /* binding */ CMIObjectivesObject; }, /* harmony export */ "CMIStudentData": function() { return /* binding */ CMIStudentData; }, /* harmony export */ "CMIStudentPreference": function() { return /* binding */ CMIStudentPreference; }, -/* harmony export */ "CMIInteractionsObject": function() { return /* binding */ CMIInteractionsObject; }, -/* harmony export */ "CMIObjectivesObject": function() { return /* binding */ CMIObjectivesObject; }, -/* harmony export */ "CMIInteractionsObjectivesObject": function() { return /* binding */ CMIInteractionsObjectivesObject; }, -/* harmony export */ "CMIInteractionsCorrectResponsesObject": function() { return /* binding */ CMIInteractionsCorrectResponsesObject; }, -/* harmony export */ "NAV": function() { return /* binding */ NAV; } +/* harmony export */ "NAV": function() { return /* binding */ NAV; }, +/* harmony export */ "check12ValidFormat": function() { return /* binding */ check12ValidFormat; }, +/* harmony export */ "check12ValidRange": function() { return /* binding */ check12ValidRange; }, +/* harmony export */ "throwReadOnlyError": function() { return /* binding */ throwReadOnlyError; }, +/* harmony export */ "throwWriteOnlyError": function() { return /* binding */ throwWriteOnlyError; } /* harmony export */ }); /* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ "./src/cmi/common.js"); /* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/api_constants */ "./src/constants/api_constants.js"); @@ -6764,10 +6764,10 @@ var Regex = { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "ValidationError": function() { return /* binding */ ValidationError; }, -/* harmony export */ "Scorm12ValidationError": function() { return /* binding */ Scorm12ValidationError; }, /* harmony export */ "AICCValidationError": function() { return /* binding */ AICCValidationError; }, -/* harmony export */ "Scorm2004ValidationError": function() { return /* binding */ Scorm2004ValidationError; } +/* harmony export */ "Scorm12ValidationError": function() { return /* binding */ Scorm12ValidationError; }, +/* harmony export */ "Scorm2004ValidationError": function() { return /* binding */ Scorm2004ValidationError; }, +/* harmony export */ "ValidationError": function() { return /* binding */ ValidationError; } /* harmony export */ }); /* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants/api_constants */ "./src/constants/api_constants.js"); function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } @@ -7001,19 +7001,19 @@ var Scorm2004ValidationError = /*#__PURE__*/function (_ValidationError3) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "SECONDS_PER_SECOND": function() { return /* binding */ SECONDS_PER_SECOND; }, -/* harmony export */ "SECONDS_PER_MINUTE": function() { return /* binding */ SECONDS_PER_MINUTE; }, -/* harmony export */ "SECONDS_PER_HOUR": function() { return /* binding */ SECONDS_PER_HOUR; }, /* harmony export */ "SECONDS_PER_DAY": function() { return /* binding */ SECONDS_PER_DAY; }, +/* harmony export */ "SECONDS_PER_HOUR": function() { return /* binding */ SECONDS_PER_HOUR; }, +/* harmony export */ "SECONDS_PER_MINUTE": function() { return /* binding */ SECONDS_PER_MINUTE; }, +/* harmony export */ "SECONDS_PER_SECOND": function() { return /* binding */ SECONDS_PER_SECOND; }, +/* harmony export */ "addHHMMSSTimeStrings": function() { return /* binding */ addHHMMSSTimeStrings; }, +/* harmony export */ "addTwoDurations": function() { return /* binding */ addTwoDurations; }, +/* harmony export */ "countDecimals": function() { return /* binding */ countDecimals; }, +/* harmony export */ "flatten": function() { return /* binding */ flatten; }, +/* harmony export */ "getDurationAsSeconds": function() { return /* binding */ getDurationAsSeconds; }, /* harmony export */ "getSecondsAsHHMMSS": function() { return /* binding */ getSecondsAsHHMMSS; }, /* harmony export */ "getSecondsAsISODuration": function() { return /* binding */ getSecondsAsISODuration; }, /* harmony export */ "getTimeAsSeconds": function() { return /* binding */ getTimeAsSeconds; }, -/* harmony export */ "getDurationAsSeconds": function() { return /* binding */ getDurationAsSeconds; }, -/* harmony export */ "addTwoDurations": function() { return /* binding */ addTwoDurations; }, -/* harmony export */ "addHHMMSSTimeStrings": function() { return /* binding */ addHHMMSSTimeStrings; }, -/* harmony export */ "flatten": function() { return /* binding */ flatten; }, -/* harmony export */ "unflatten": function() { return /* binding */ unflatten; }, -/* harmony export */ "countDecimals": function() { return /* binding */ countDecimals; } +/* harmony export */ "unflatten": function() { return /* binding */ unflatten; } /* harmony export */ }); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } diff --git a/dist/aicc.min.js b/dist/aicc.min.js index 5707134..bf322e6 100644 --- a/dist/aicc.min.js +++ b/dist/aicc.min.js @@ -13,13 +13,13 @@ \***************************/function(r,e,t){"use strict";t.r(e),t.d(e,{default:function(){return y}});var e=t(/*! ./BaseAPI */"./src/BaseAPI.js"),o=t(/*! ./cmi/scorm12_cmi */"./src/cmi/scorm12_cmi.js"),a=t(/*! ./utilities */"./src/utilities.js"),n=t(/*! ./constants/api_constants */"./src/constants/api_constants.js"),t=t(/*! ./constants/error_codes */"./src/constants/error_codes.js");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function f(r){for(var e=1;e=parseFloat(this.cmi.student_data.mastery_score)?this.cmi.core.lesson_status="passed":this.cmi.core.lesson_status="failed"):"browse"===this.cmi.core.lesson_mode&&""===((null===(i=this.startingData)||void 0===i||null===(n=i.cmi)||void 0===n||null===(r=n.core)||void 0===r?void 0:r.lesson_status)||"")&&"not attempted"===t&&(this.cmi.core.lesson_status="browsed"));var t,n,r,i=this.renderCommitCMI(e||this.settings.alwaysSendTotalTime);return this.apiLogLevel===u.LOG_LEVEL_DEBUG&&(console.debug("Commit (terminated: "+(e?"yes":"no")+"): "),console.debug(i)),this.settings.lmsCommitUrl?this.processHttpRequest(this.settings.lmsCommitUrl,i,e):u.SCORM_TRUE}}])&&h(t.prototype,e),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(e.default)},"./src/cmi/aicc_cmi.js": /*!*****************************!*\ !*** ./src/cmi/aicc_cmi.js ***! - \*****************************/function(t,n,h){"use strict";h.r(n),h.d(n,{CMI:function(){return C},CMIStudentDemographics:function(){return K},CMIPaths:function(){return Q},CMIPathsObject:function(){return ae},CMITries:function(){return se},CMITriesObject:function(){return ue},CMIAttemptRecords:function(){return fe},CMIAttemptRecordsObject:function(){return de},CMIEvaluationCommentsObject:function(){return ge}});var d=h(/*! ./scorm12_cmi */"./src/cmi/scorm12_cmi.js"),r=h(/*! ./common */"./src/cmi/common.js"),n=h(/*! ../constants/api_constants */"./src/constants/api_constants.js"),p=h(/*! ../constants/regex */"./src/constants/regex.js"),m=h(/*! ../constants/error_codes */"./src/constants/error_codes.js"),y=h(/*! ../exceptions */"./src/exceptions.js");function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){var r=e;if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function o(e,t,n){var t=_(e,t,"set"),r=n;if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}return n}function e(e,t){t=_(e,t,"get");return t.get?t.get.call(e):t.value}function _(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n=t[0]){if("*"===t[1]||e<=t[1])return!0;throw new r.prototype.constructor(n)}throw new r.prototype.constructor(n)}var C=new WeakMap,T=new WeakMap,j=function(){function r(){var e,t,n;if(v(this,r),n=!(t="jsonString"),t in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,h(this,C,{writable:!0,value:!1}),h(this,T,{writable:!0,value:void 0}),(this instanceof r?this.constructor:void 0)===r)throw new TypeError("Cannot construct BaseCMI instances directly")}return b(r,[{key:"initialized",get:function(){return t(this,C)}},{key:"start_time",get:function(){return t(this,T)}},{key:"initialize",value:function(){d(this,C,!0)}},{key:"setStartTime",value:function(){d(this,T,(new Date).getTime())}}]),r}(),k=new WeakMap,p=new WeakMap,R=new WeakMap,m=new WeakMap,y=new WeakMap,g=new WeakMap,_=new WeakMap,L=new WeakMap,A=new WeakMap,N=new WeakMap,D=function(){a(u,j);var l=c(u);function u(e){var t,n=e.score_children,r=e.score_range,i=e.max,o=e.invalidErrorCode,a=e.invalidTypeCode,s=e.invalidRangeCode,c=e.decimalRegex,e=e.errorClass;return v(this,u),h(f(t=l.call(this)),k,{writable:!0,value:void 0}),h(f(t),p,{writable:!0,value:void 0}),h(f(t),R,{writable:!0,value:void 0}),h(f(t),m,{writable:!0,value:void 0}),h(f(t),y,{writable:!0,value:void 0}),h(f(t),g,{writable:!0,value:void 0}),h(f(t),_,{writable:!0,value:void 0}),h(f(t),L,{writable:!0,value:""}),h(f(t),A,{writable:!0,value:""}),h(f(t),N,{writable:!0,value:void 0}),d(f(t),k,n||M.score_children),d(f(t),p,!!r&&w.score_range),d(f(t),N,i||""===i?i:"100"),d(f(t),R,o||O.INVALID_SET_VALUE),d(f(t),m,a||O.TYPE_MISMATCH),d(f(t),y,s||O.VALUE_OUT_OF_RANGE),d(f(t),g,c||w.CMIDecimal),d(f(t),_,e),t}return b(u,[{key:"_children",get:function(){return t(this,k)},set:function(e){throw new(t(this,_).prototype.constructor)(t(this,R))}},{key:"raw",get:function(){return t(this,L)},set:function(e){!S(e,t(this,g),t(this,m),t(this,_))||t(this,p)&&!I(e,t(this,p),t(this,y),t(this,_))||d(this,L,e)}},{key:"min",get:function(){return t(this,A)},set:function(e){!S(e,t(this,g),t(this,m),t(this,_))||t(this,p)&&!I(e,t(this,p),t(this,y),t(this,_))||d(this,A,e)}},{key:"max",get:function(){return t(this,N)},set:function(e){!S(e,t(this,g),t(this,m),t(this,_))||t(this,p)&&!I(e,t(this,p),t(this,y),t(this,_))||d(this,N,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e}}]),u}(),P=new WeakMap,V=new WeakMap,F=new WeakMap,x=function(){a(o,j);var i=c(o);function o(e){var t,n=e.children,r=e.errorCode,e=e.errorClass;return v(this,o),h(f(t=i.call(this)),P,{writable:!0,value:void 0}),h(f(t),V,{writable:!0,value:void 0}),h(f(t),F,{writable:!0,value:void 0}),d(f(t),F,n),d(f(t),P,r),d(f(t),V,e),t.childArray=[],t}return b(o,[{key:"_children",get:function(){return t(this,F)},set:function(e){throw new(t(this,V).prototype.constructor)(t(this,P))}},{key:"_count",get:function(){return this.childArray.length},set:function(e){throw new(t(this,V).prototype.constructor)(t(this,P))}},{key:"toJSON",value:function(){this.jsonString=!0;for(var e={},t=0;t=t[0]){if("*"===t[1]||e<=t[1])return!0;throw new r.prototype.constructor(n)}throw new r.prototype.constructor(n)}var C=new WeakMap,T=new WeakMap,j=function(){function r(){var e,t,n;if(v(this,r),n=!(t="jsonString"),t in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,h(this,C,{writable:!0,value:!1}),h(this,T,{writable:!0,value:void 0}),(this instanceof r?this.constructor:void 0)===r)throw new TypeError("Cannot construct BaseCMI instances directly")}return b(r,[{key:"initialized",get:function(){return t(this,C)}},{key:"start_time",get:function(){return t(this,T)}},{key:"initialize",value:function(){d(this,C,!0)}},{key:"setStartTime",value:function(){d(this,T,(new Date).getTime())}}]),r}(),k=new WeakMap,p=new WeakMap,R=new WeakMap,m=new WeakMap,y=new WeakMap,g=new WeakMap,_=new WeakMap,L=new WeakMap,A=new WeakMap,N=new WeakMap,D=function(){a(u,j);var l=c(u);function u(e){var t,n=e.score_children,r=e.score_range,i=e.max,o=e.invalidErrorCode,a=e.invalidTypeCode,s=e.invalidRangeCode,c=e.decimalRegex,e=e.errorClass;return v(this,u),h(f(t=l.call(this)),k,{writable:!0,value:void 0}),h(f(t),p,{writable:!0,value:void 0}),h(f(t),R,{writable:!0,value:void 0}),h(f(t),m,{writable:!0,value:void 0}),h(f(t),y,{writable:!0,value:void 0}),h(f(t),g,{writable:!0,value:void 0}),h(f(t),_,{writable:!0,value:void 0}),h(f(t),L,{writable:!0,value:""}),h(f(t),A,{writable:!0,value:""}),h(f(t),N,{writable:!0,value:void 0}),d(f(t),k,n||M.score_children),d(f(t),p,!!r&&w.score_range),d(f(t),N,i||""===i?i:"100"),d(f(t),R,o||O.INVALID_SET_VALUE),d(f(t),m,a||O.TYPE_MISMATCH),d(f(t),y,s||O.VALUE_OUT_OF_RANGE),d(f(t),g,c||w.CMIDecimal),d(f(t),_,e),t}return b(u,[{key:"_children",get:function(){return t(this,k)},set:function(e){throw new(t(this,_).prototype.constructor)(t(this,R))}},{key:"raw",get:function(){return t(this,L)},set:function(e){!S(e,t(this,g),t(this,m),t(this,_))||t(this,p)&&!I(e,t(this,p),t(this,y),t(this,_))||d(this,L,e)}},{key:"min",get:function(){return t(this,A)},set:function(e){!S(e,t(this,g),t(this,m),t(this,_))||t(this,p)&&!I(e,t(this,p),t(this,y),t(this,_))||d(this,A,e)}},{key:"max",get:function(){return t(this,N)},set:function(e){!S(e,t(this,g),t(this,m),t(this,_))||t(this,p)&&!I(e,t(this,p),t(this,y),t(this,_))||d(this,N,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e}}]),u}(),P=new WeakMap,V=new WeakMap,F=new WeakMap,x=function(){a(o,j);var i=c(o);function o(e){var t,n=e.children,r=e.errorCode,e=e.errorClass;return v(this,o),h(f(t=i.call(this)),P,{writable:!0,value:void 0}),h(f(t),V,{writable:!0,value:void 0}),h(f(t),F,{writable:!0,value:void 0}),d(f(t),F,n),d(f(t),P,r),d(f(t),V,e),t.childArray=[],t}return b(o,[{key:"_children",get:function(){return t(this,F)},set:function(e){throw new(t(this,V).prototype.constructor)(t(this,P))}},{key:"_count",get:function(){return this.childArray.length},set:function(e){throw new(t(this,V).prototype.constructor)(t(this,P))}},{key:"toJSON",value:function(){this.jsonString=!0;for(var e={},t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.max&&this.throwSCORMError(u.GENERAL_SET_FAILURE,"Data Model Element Pattern Too Long")}},{key:"checkDuplicateChoiceResponse",value:function(e,t){var n=e.correct_responses._count;if("choice"===e.type)for(var r=0;rNumber(t[1])&&this.throwSCORMError(u.TYPE_MISMATCH);else if(""!==t[o]&&r.unique)for(var s=0;s=this.cmi.completion_threshold?(console.debug("Setting Completion Status: Completed"),this.cmi.completion_status="completed"):(console.debug("Setting Completion Status: Incomplete"),this.cmi.completion_status="incomplete")),this.cmi.scaled_passing_score&&this.cmi.score.scaled&&(this.cmi.score.scaled>=this.cmi.scaled_passing_score?(console.debug("Setting Success Status: Passed"),this.cmi.success_status="passed"):(console.debug("Setting Success Status: Failed"),this.cmi.success_status="failed")));var t,n,r=!1,i=(this.adl.nav.request!==(null===(i=this.startingData)||void 0===i||null===(n=i.adl)||void 0===n||null===(t=n.nav)||void 0===t?void 0:t.request)&&"_none_"!==this.adl.nav.request&&(this.adl.nav.request=encodeURIComponent(this.adl.nav.request),r=!0),this.renderCommitCMI(e||this.settings.alwaysSendTotalTime));return this.apiLogLevel===l.LOG_LEVEL_DEBUG&&(console.debug("Commit (terminated: "+(e?"yes":"no")+"): "),console.debug(i)),this.settings.lmsCommitUrl?(n=this.processHttpRequest(this.settings.lmsCommitUrl,i,e),r&&void 0!==n.navRequest&&""!==n.navRequest&&Function('"use strict";(() => { '.concat(n.navRequest," })()"))(),n):l.SCORM_TRUE}}])&&v(t.prototype,e),n&&v(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(e.default)},"./src/cmi/aicc_cmi.js": /*!*****************************!*\ !*** ./src/cmi/aicc_cmi.js ***! - \*****************************/function(t,n,f){"use strict";f.r(n),f.d(n,{CMI:function(){return C},CMIStudentDemographics:function(){return K},CMIPaths:function(){return Q},CMIPathsObject:function(){return ae},CMITries:function(){return se},CMITriesObject:function(){return ue},CMIAttemptRecords:function(){return he},CMIAttemptRecordsObject:function(){return de},CMIEvaluationCommentsObject:function(){return ge}});var d=f(/*! ./scorm12_cmi */"./src/cmi/scorm12_cmi.js"),r=f(/*! ./common */"./src/cmi/common.js"),n=f(/*! ../constants/api_constants */"./src/constants/api_constants.js"),m=f(/*! ../constants/regex */"./src/constants/regex.js"),p=f(/*! ../constants/error_codes */"./src/constants/error_codes.js"),y=f(/*! ../exceptions */"./src/exceptions.js");function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){var r=e;if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function o(e,t,n){var t=v(e,t,"set"),r=n;if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}return n}function e(e,t){t=v(e,t,"get");return t.get?t.get.call(e):t.value}function v(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n=t[0]){if("*"===t[1]||e<=t[1])return!0;throw new r.prototype.constructor(n)}throw new r.prototype.constructor(n)}var C=new WeakMap,k=new WeakMap,T=function(){function r(){var e,t,n;if(_(this,r),n=!(t="jsonString"),t in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,f(this,C,{writable:!0,value:!1}),f(this,k,{writable:!0,value:void 0}),(this instanceof r?this.constructor:void 0)===r)throw new TypeError("Cannot construct BaseCMI instances directly")}return b(r,[{key:"initialized",get:function(){return t(this,C)}},{key:"start_time",get:function(){return t(this,k)}},{key:"initialize",value:function(){d(this,C,!0)}},{key:"setStartTime",value:function(){d(this,k,(new Date).getTime())}}]),r}(),j=new WeakMap,m=new WeakMap,R=new WeakMap,p=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,L=new WeakMap,A=new WeakMap,N=new WeakMap,D=function(){a(u,T);var l=c(u);function u(e){var t,n=e.score_children,r=e.score_range,i=e.max,o=e.invalidErrorCode,a=e.invalidTypeCode,s=e.invalidRangeCode,c=e.decimalRegex,e=e.errorClass;return _(this,u),f(h(t=l.call(this)),j,{writable:!0,value:void 0}),f(h(t),m,{writable:!0,value:void 0}),f(h(t),R,{writable:!0,value:void 0}),f(h(t),p,{writable:!0,value:void 0}),f(h(t),y,{writable:!0,value:void 0}),f(h(t),g,{writable:!0,value:void 0}),f(h(t),v,{writable:!0,value:void 0}),f(h(t),L,{writable:!0,value:""}),f(h(t),A,{writable:!0,value:""}),f(h(t),N,{writable:!0,value:void 0}),d(h(t),j,n||M.score_children),d(h(t),m,!!r&&E.score_range),d(h(t),N,i||""===i?i:"100"),d(h(t),R,o||S.INVALID_SET_VALUE),d(h(t),p,a||S.TYPE_MISMATCH),d(h(t),y,s||S.VALUE_OUT_OF_RANGE),d(h(t),g,c||E.CMIDecimal),d(h(t),v,e),t}return b(u,[{key:"_children",get:function(){return t(this,j)},set:function(e){throw new(t(this,v).prototype.constructor)(t(this,R))}},{key:"raw",get:function(){return t(this,L)},set:function(e){!I(e,t(this,g),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,y),t(this,v))||d(this,L,e)}},{key:"min",get:function(){return t(this,A)},set:function(e){!I(e,t(this,g),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,y),t(this,v))||d(this,A,e)}},{key:"max",get:function(){return t(this,N)},set:function(e){!I(e,t(this,g),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,y),t(this,v))||d(this,N,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e}}]),u}(),P=new WeakMap,z=new WeakMap,V=new WeakMap,x=function(){a(o,T);var i=c(o);function o(e){var t,n=e.children,r=e.errorCode,e=e.errorClass;return _(this,o),f(h(t=i.call(this)),P,{writable:!0,value:void 0}),f(h(t),z,{writable:!0,value:void 0}),f(h(t),V,{writable:!0,value:void 0}),d(h(t),V,n),d(h(t),P,r),d(h(t),z,e),t.childArray=[],t}return b(o,[{key:"_children",get:function(){return t(this,V)},set:function(e){throw new(t(this,z).prototype.constructor)(t(this,P))}},{key:"_count",get:function(){return this.childArray.length},set:function(e){throw new(t(this,z).prototype.constructor)(t(this,P))}},{key:"toJSON",value:function(){this.jsonString=!0;for(var e={},t=0;t=t[0]){if("*"===t[1]||e<=t[1])return!0;throw new r.prototype.constructor(n)}throw new r.prototype.constructor(n)}var C=new WeakMap,k=new WeakMap,T=function(){function r(){var e,t,n;if(_(this,r),n=!(t="jsonString"),t in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,f(this,C,{writable:!0,value:!1}),f(this,k,{writable:!0,value:void 0}),(this instanceof r?this.constructor:void 0)===r)throw new TypeError("Cannot construct BaseCMI instances directly")}return b(r,[{key:"initialized",get:function(){return t(this,C)}},{key:"start_time",get:function(){return t(this,k)}},{key:"initialize",value:function(){d(this,C,!0)}},{key:"setStartTime",value:function(){d(this,k,(new Date).getTime())}}]),r}(),j=new WeakMap,m=new WeakMap,R=new WeakMap,p=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,L=new WeakMap,A=new WeakMap,N=new WeakMap,D=function(){a(u,T);var l=c(u);function u(e){var t,n=e.score_children,r=e.score_range,i=e.max,o=e.invalidErrorCode,a=e.invalidTypeCode,s=e.invalidRangeCode,c=e.decimalRegex,e=e.errorClass;return _(this,u),f(h(t=l.call(this)),j,{writable:!0,value:void 0}),f(h(t),m,{writable:!0,value:void 0}),f(h(t),R,{writable:!0,value:void 0}),f(h(t),p,{writable:!0,value:void 0}),f(h(t),y,{writable:!0,value:void 0}),f(h(t),g,{writable:!0,value:void 0}),f(h(t),v,{writable:!0,value:void 0}),f(h(t),L,{writable:!0,value:""}),f(h(t),A,{writable:!0,value:""}),f(h(t),N,{writable:!0,value:void 0}),d(h(t),j,n||M.score_children),d(h(t),m,!!r&&E.score_range),d(h(t),N,i||""===i?i:"100"),d(h(t),R,o||S.INVALID_SET_VALUE),d(h(t),p,a||S.TYPE_MISMATCH),d(h(t),y,s||S.VALUE_OUT_OF_RANGE),d(h(t),g,c||E.CMIDecimal),d(h(t),v,e),t}return b(u,[{key:"_children",get:function(){return t(this,j)},set:function(e){throw new(t(this,v).prototype.constructor)(t(this,R))}},{key:"raw",get:function(){return t(this,L)},set:function(e){!I(e,t(this,g),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,y),t(this,v))||d(this,L,e)}},{key:"min",get:function(){return t(this,A)},set:function(e){!I(e,t(this,g),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,y),t(this,v))||d(this,A,e)}},{key:"max",get:function(){return t(this,N)},set:function(e){!I(e,t(this,g),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,y),t(this,v))||d(this,N,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e}}]),u}(),P=new WeakMap,z=new WeakMap,V=new WeakMap,x=function(){a(o,T);var i=c(o);function o(e){var t,n=e.children,r=e.errorCode,e=e.errorClass;return _(this,o),f(h(t=i.call(this)),P,{writable:!0,value:void 0}),f(h(t),z,{writable:!0,value:void 0}),f(h(t),V,{writable:!0,value:void 0}),d(h(t),V,n),d(h(t),P,r),d(h(t),z,e),t.childArray=[],t}return b(o,[{key:"_children",get:function(){return t(this,V)},set:function(e){throw new(t(this,z).prototype.constructor)(t(this,P))}},{key:"_count",get:function(){return this.childArray.length},set:function(e){throw new(t(this,z).prototype.constructor)(t(this,P))}},{key:"toJSON",value:function(){this.jsonString=!0;for(var e={},t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=parseFloat(this.cmi.student_data.mastery_score)?this.cmi.core.lesson_status="passed":this.cmi.core.lesson_status="failed"):"browse"===this.cmi.core.lesson_mode&&""===((null===(i=this.startingData)||void 0===i||null===(r=i.cmi)||void 0===r||null===(n=r.core)||void 0===n?void 0:n.lesson_status)||"")&&"not attempted"===t&&(this.cmi.core.lesson_status="browsed"));var t,r,n,i=this.renderCommitCMI(e||this.settings.alwaysSendTotalTime);return this.apiLogLevel===u.LOG_LEVEL_DEBUG&&(console.debug("Commit (terminated: "+(e?"yes":"no")+"): "),console.debug(i)),this.settings.lmsCommitUrl?this.processHttpRequest(this.settings.lmsCommitUrl,i,e):u.SCORM_TRUE}}])&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(e.default)},"./src/cmi/common.js": /*!***************************!*\ !*** ./src/cmi/common.js ***! - \***************************/function(r,n,e){"use strict";e.r(n),e.d(n,{checkValidFormat:function(){return O},checkValidRange:function(){return I},BaseCMI:function(){return L},CMIScore:function(){return D},CMIArray:function(){return x}});var n=e(/*! ../constants/api_constants */"./src/constants/api_constants.js"),i=e(/*! ../constants/error_codes */"./src/constants/error_codes.js"),e=e(/*! ../constants/regex */"./src/constants/regex.js");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(r){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=l(r),t=(e=n?(e=l(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r=t[0]){if("*"===t[1]||e<=t[1])return!0;throw new n.prototype.constructor(r)}throw new n.prototype.constructor(r)}var C=new WeakMap,T=new WeakMap,L=function(){function n(){var e,t,r;if(E(this,n),r=!(t="jsonString"),t in(e=this)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,d(this,C,{writable:!0,value:!1}),d(this,T,{writable:!0,value:void 0}),(this instanceof n?this.constructor:void 0)===n)throw new TypeError("Cannot construct BaseCMI instances directly")}return v(n,[{key:"initialized",get:function(){return t(this,C)}},{key:"start_time",get:function(){return t(this,T)}},{key:"initialize",value:function(){h(this,C,!0)}},{key:"setStartTime",value:function(){h(this,T,(new Date).getTime())}}]),n}(),R=new WeakMap,m=new WeakMap,A=new WeakMap,p=new WeakMap,y=new WeakMap,g=new WeakMap,_=new WeakMap,j=new WeakMap,N=new WeakMap,k=new WeakMap,D=function(){a(u,L);var l=c(u);function u(e){var t,r=e.score_children,n=e.score_range,i=e.max,o=e.invalidErrorCode,a=e.invalidTypeCode,s=e.invalidRangeCode,c=e.decimalRegex,e=e.errorClass;return E(this,u),d(f(t=l.call(this)),R,{writable:!0,value:void 0}),d(f(t),m,{writable:!0,value:void 0}),d(f(t),A,{writable:!0,value:void 0}),d(f(t),p,{writable:!0,value:void 0}),d(f(t),y,{writable:!0,value:void 0}),d(f(t),g,{writable:!0,value:void 0}),d(f(t),_,{writable:!0,value:void 0}),d(f(t),j,{writable:!0,value:""}),d(f(t),N,{writable:!0,value:""}),d(f(t),k,{writable:!0,value:void 0}),h(f(t),R,r||M.score_children),h(f(t),m,!!n&&w.score_range),h(f(t),k,i||""===i?i:"100"),h(f(t),A,o||S.INVALID_SET_VALUE),h(f(t),p,a||S.TYPE_MISMATCH),h(f(t),y,s||S.VALUE_OUT_OF_RANGE),h(f(t),g,c||w.CMIDecimal),h(f(t),_,e),t}return v(u,[{key:"_children",get:function(){return t(this,R)},set:function(e){throw new(t(this,_).prototype.constructor)(t(this,A))}},{key:"raw",get:function(){return t(this,j)},set:function(e){!O(e,t(this,g),t(this,p),t(this,_))||t(this,m)&&!I(e,t(this,m),t(this,y),t(this,_))||h(this,j,e)}},{key:"min",get:function(){return t(this,N)},set:function(e){!O(e,t(this,g),t(this,p),t(this,_))||t(this,m)&&!I(e,t(this,m),t(this,y),t(this,_))||h(this,N,e)}},{key:"max",get:function(){return t(this,k)},set:function(e){!O(e,t(this,g),t(this,p),t(this,_))||t(this,m)&&!I(e,t(this,m),t(this,y),t(this,_))||h(this,k,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e}}]),u}(),V=new WeakMap,P=new WeakMap,F=new WeakMap,x=function(){a(o,L);var i=c(o);function o(e){var t,r=e.children,n=e.errorCode,e=e.errorClass;return E(this,o),d(f(t=i.call(this)),V,{writable:!0,value:void 0}),d(f(t),P,{writable:!0,value:void 0}),d(f(t),F,{writable:!0,value:void 0}),h(f(t),F,r),h(f(t),V,n),h(f(t),P,e),t.childArray=[],t}return v(o,[{key:"_children",get:function(){return t(this,F)},set:function(e){throw new(t(this,P).prototype.constructor)(t(this,V))}},{key:"_count",get:function(){return this.childArray.length},set:function(e){throw new(t(this,P).prototype.constructor)(t(this,V))}},{key:"toJSON",value:function(){this.jsonString=!0;for(var e={},t=0;t=t[0]){if("*"===t[1]||e<=t[1])return!0;throw new n.prototype.constructor(r)}throw new n.prototype.constructor(r)}var C=new WeakMap,T=new WeakMap,L=function(){function n(){var e,t,r;if(E(this,n),r=!(t="jsonString"),t in(e=this)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,d(this,C,{writable:!0,value:!1}),d(this,T,{writable:!0,value:void 0}),(this instanceof n?this.constructor:void 0)===n)throw new TypeError("Cannot construct BaseCMI instances directly")}return v(n,[{key:"initialized",get:function(){return t(this,C)}},{key:"start_time",get:function(){return t(this,T)}},{key:"initialize",value:function(){h(this,C,!0)}},{key:"setStartTime",value:function(){h(this,T,(new Date).getTime())}}]),n}(),R=new WeakMap,m=new WeakMap,A=new WeakMap,p=new WeakMap,y=new WeakMap,g=new WeakMap,_=new WeakMap,j=new WeakMap,N=new WeakMap,k=new WeakMap,D=function(){a(u,L);var l=c(u);function u(e){var t,r=e.score_children,n=e.score_range,i=e.max,o=e.invalidErrorCode,a=e.invalidTypeCode,s=e.invalidRangeCode,c=e.decimalRegex,e=e.errorClass;return E(this,u),d(f(t=l.call(this)),R,{writable:!0,value:void 0}),d(f(t),m,{writable:!0,value:void 0}),d(f(t),A,{writable:!0,value:void 0}),d(f(t),p,{writable:!0,value:void 0}),d(f(t),y,{writable:!0,value:void 0}),d(f(t),g,{writable:!0,value:void 0}),d(f(t),_,{writable:!0,value:void 0}),d(f(t),j,{writable:!0,value:""}),d(f(t),N,{writable:!0,value:""}),d(f(t),k,{writable:!0,value:void 0}),h(f(t),R,r||M.score_children),h(f(t),m,!!n&&w.score_range),h(f(t),k,i||""===i?i:"100"),h(f(t),A,o||S.INVALID_SET_VALUE),h(f(t),p,a||S.TYPE_MISMATCH),h(f(t),y,s||S.VALUE_OUT_OF_RANGE),h(f(t),g,c||w.CMIDecimal),h(f(t),_,e),t}return v(u,[{key:"_children",get:function(){return t(this,R)},set:function(e){throw new(t(this,_).prototype.constructor)(t(this,A))}},{key:"raw",get:function(){return t(this,j)},set:function(e){!O(e,t(this,g),t(this,p),t(this,_))||t(this,m)&&!I(e,t(this,m),t(this,y),t(this,_))||h(this,j,e)}},{key:"min",get:function(){return t(this,N)},set:function(e){!O(e,t(this,g),t(this,p),t(this,_))||t(this,m)&&!I(e,t(this,m),t(this,y),t(this,_))||h(this,N,e)}},{key:"max",get:function(){return t(this,k)},set:function(e){!O(e,t(this,g),t(this,p),t(this,_))||t(this,m)&&!I(e,t(this,m),t(this,y),t(this,_))||h(this,k,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e}}]),u}(),V=new WeakMap,P=new WeakMap,F=new WeakMap,x=function(){a(o,L);var i=c(o);function o(e){var t,r=e.children,n=e.errorCode,e=e.errorClass;return E(this,o),d(f(t=i.call(this)),V,{writable:!0,value:void 0}),d(f(t),P,{writable:!0,value:void 0}),d(f(t),F,{writable:!0,value:void 0}),h(f(t),F,r),h(f(t),V,n),h(f(t),P,e),t.childArray=[],t}return v(o,[{key:"_children",get:function(){return t(this,F)},set:function(e){throw new(t(this,P).prototype.constructor)(t(this,V))}},{key:"_count",get:function(){return this.childArray.length},set:function(e){throw new(t(this,P).prototype.constructor)(t(this,V))}},{key:"toJSON",value:function(){this.jsonString=!0;for(var e={},t=0;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.max&&this.throwSCORMError(u.GENERAL_SET_FAILURE,"Data Model Element Pattern Too Long")}},{key:"checkDuplicateChoiceResponse",value:function(e,t){var r=e.correct_responses._count;if("choice"===e.type)for(var n=0;nNumber(t[1])&&this.throwSCORMError(u.TYPE_MISMATCH);else if(""!==t[o]&&n.unique)for(var s=0;s=this.cmi.completion_threshold?(console.debug("Setting Completion Status: Completed"),this.cmi.completion_status="completed"):(console.debug("Setting Completion Status: Incomplete"),this.cmi.completion_status="incomplete")),this.cmi.scaled_passing_score&&this.cmi.score.scaled&&(this.cmi.score.scaled>=this.cmi.scaled_passing_score?(console.debug("Setting Success Status: Passed"),this.cmi.success_status="passed"):(console.debug("Setting Success Status: Failed"),this.cmi.success_status="failed")));var t,r,n=!1,i=(this.adl.nav.request!==(null===(i=this.startingData)||void 0===i||null===(r=i.adl)||void 0===r||null===(t=r.nav)||void 0===t?void 0:t.request)&&"_none_"!==this.adl.nav.request&&(this.adl.nav.request=encodeURIComponent(this.adl.nav.request),n=!0),this.renderCommitCMI(e||this.settings.alwaysSendTotalTime));return this.apiLogLevel===c.LOG_LEVEL_DEBUG&&(console.debug("Commit (terminated: "+(e?"yes":"no")+"): "),console.debug(i)),this.settings.lmsCommitUrl?(r=this.processHttpRequest(this.settings.lmsCommitUrl,i,e),n&&void 0!==r.navRequest&&""!==r.navRequest&&Function('"use strict";(() => { '.concat(r.navRequest," })()"))(),r):c.SCORM_TRUE}}])&&v(t.prototype,e),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(e.default)},"./src/cmi/common.js": /*!***************************!*\ !*** ./src/cmi/common.js ***! - \***************************/function(r,n,e){"use strict";e.r(n),e.d(n,{checkValidFormat:function(){return I},checkValidRange:function(){return O},BaseCMI:function(){return k},CMIScore:function(){return D},CMIArray:function(){return z}});var n=e(/*! ../constants/api_constants */"./src/constants/api_constants.js"),i=e(/*! ../constants/error_codes */"./src/constants/error_codes.js"),e=e(/*! ../constants/regex */"./src/constants/regex.js");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(r){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=c(r),t=(e=n?(e=c(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r=t[0]){if("*"===t[1]||e<=t[1])return!0;throw new n.prototype.constructor(r)}throw new n.prototype.constructor(r)}var C=new WeakMap,T=new WeakMap,k=function(){function n(){var e,t,r;if(E(this,n),r=!(t="jsonString"),t in(e=this)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,f(this,C,{writable:!0,value:!1}),f(this,T,{writable:!0,value:void 0}),(this instanceof n?this.constructor:void 0)===n)throw new TypeError("Cannot construct BaseCMI instances directly")}return _(n,[{key:"initialized",get:function(){return t(this,C)}},{key:"start_time",get:function(){return t(this,T)}},{key:"initialize",value:function(){d(this,C,!0)}},{key:"setStartTime",value:function(){d(this,T,(new Date).getTime())}}]),n}(),R=new WeakMap,m=new WeakMap,L=new WeakMap,p=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,j=new WeakMap,A=new WeakMap,N=new WeakMap,D=function(){a(u,k);var c=l(u);function u(e){var t,r=e.score_children,n=e.score_range,i=e.max,o=e.invalidErrorCode,a=e.invalidTypeCode,s=e.invalidRangeCode,l=e.decimalRegex,e=e.errorClass;return E(this,u),f(h(t=c.call(this)),R,{writable:!0,value:void 0}),f(h(t),m,{writable:!0,value:void 0}),f(h(t),L,{writable:!0,value:void 0}),f(h(t),p,{writable:!0,value:void 0}),f(h(t),g,{writable:!0,value:void 0}),f(h(t),y,{writable:!0,value:void 0}),f(h(t),v,{writable:!0,value:void 0}),f(h(t),j,{writable:!0,value:""}),f(h(t),A,{writable:!0,value:""}),f(h(t),N,{writable:!0,value:void 0}),d(h(t),R,r||M.score_children),d(h(t),m,!!n&&w.score_range),d(h(t),N,i||""===i?i:"100"),d(h(t),L,o||S.INVALID_SET_VALUE),d(h(t),p,a||S.TYPE_MISMATCH),d(h(t),g,s||S.VALUE_OUT_OF_RANGE),d(h(t),y,l||w.CMIDecimal),d(h(t),v,e),t}return _(u,[{key:"_children",get:function(){return t(this,R)},set:function(e){throw new(t(this,v).prototype.constructor)(t(this,L))}},{key:"raw",get:function(){return t(this,j)},set:function(e){!I(e,t(this,y),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,g),t(this,v))||d(this,j,e)}},{key:"min",get:function(){return t(this,A)},set:function(e){!I(e,t(this,y),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,g),t(this,v))||d(this,A,e)}},{key:"max",get:function(){return t(this,N)},set:function(e){!I(e,t(this,y),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,g),t(this,v))||d(this,N,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e}}]),u}(),P=new WeakMap,x=new WeakMap,V=new WeakMap,z=function(){a(o,k);var i=l(o);function o(e){var t,r=e.children,n=e.errorCode,e=e.errorClass;return E(this,o),f(h(t=i.call(this)),P,{writable:!0,value:void 0}),f(h(t),x,{writable:!0,value:void 0}),f(h(t),V,{writable:!0,value:void 0}),d(h(t),V,r),d(h(t),P,n),d(h(t),x,e),t.childArray=[],t}return _(o,[{key:"_children",get:function(){return t(this,V)},set:function(e){throw new(t(this,x).prototype.constructor)(t(this,P))}},{key:"_count",get:function(){return this.childArray.length},set:function(e){throw new(t(this,x).prototype.constructor)(t(this,P))}},{key:"toJSON",value:function(){this.jsonString=!0;for(var e={},t=0;t=t[0]){if("*"===t[1]||e<=t[1])return!0;throw new n.prototype.constructor(r)}throw new n.prototype.constructor(r)}var C=new WeakMap,T=new WeakMap,k=function(){function n(){var e,t,r;if(E(this,n),r=!(t="jsonString"),t in(e=this)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,f(this,C,{writable:!0,value:!1}),f(this,T,{writable:!0,value:void 0}),(this instanceof n?this.constructor:void 0)===n)throw new TypeError("Cannot construct BaseCMI instances directly")}return _(n,[{key:"initialized",get:function(){return t(this,C)}},{key:"start_time",get:function(){return t(this,T)}},{key:"initialize",value:function(){d(this,C,!0)}},{key:"setStartTime",value:function(){d(this,T,(new Date).getTime())}}]),n}(),R=new WeakMap,m=new WeakMap,L=new WeakMap,p=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,j=new WeakMap,A=new WeakMap,N=new WeakMap,D=function(){a(u,k);var c=l(u);function u(e){var t,r=e.score_children,n=e.score_range,i=e.max,o=e.invalidErrorCode,a=e.invalidTypeCode,s=e.invalidRangeCode,l=e.decimalRegex,e=e.errorClass;return E(this,u),f(h(t=c.call(this)),R,{writable:!0,value:void 0}),f(h(t),m,{writable:!0,value:void 0}),f(h(t),L,{writable:!0,value:void 0}),f(h(t),p,{writable:!0,value:void 0}),f(h(t),g,{writable:!0,value:void 0}),f(h(t),y,{writable:!0,value:void 0}),f(h(t),v,{writable:!0,value:void 0}),f(h(t),j,{writable:!0,value:""}),f(h(t),A,{writable:!0,value:""}),f(h(t),N,{writable:!0,value:void 0}),d(h(t),R,r||M.score_children),d(h(t),m,!!n&&w.score_range),d(h(t),N,i||""===i?i:"100"),d(h(t),L,o||S.INVALID_SET_VALUE),d(h(t),p,a||S.TYPE_MISMATCH),d(h(t),g,s||S.VALUE_OUT_OF_RANGE),d(h(t),y,l||w.CMIDecimal),d(h(t),v,e),t}return _(u,[{key:"_children",get:function(){return t(this,R)},set:function(e){throw new(t(this,v).prototype.constructor)(t(this,L))}},{key:"raw",get:function(){return t(this,j)},set:function(e){!I(e,t(this,y),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,g),t(this,v))||d(this,j,e)}},{key:"min",get:function(){return t(this,A)},set:function(e){!I(e,t(this,y),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,g),t(this,v))||d(this,A,e)}},{key:"max",get:function(){return t(this,N)},set:function(e){!I(e,t(this,y),t(this,p),t(this,v))||t(this,m)&&!O(e,t(this,m),t(this,g),t(this,v))||d(this,N,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e}}]),u}(),P=new WeakMap,x=new WeakMap,V=new WeakMap,z=function(){a(o,k);var i=l(o);function o(e){var t,r=e.children,n=e.errorCode,e=e.errorClass;return E(this,o),f(h(t=i.call(this)),P,{writable:!0,value:void 0}),f(h(t),x,{writable:!0,value:void 0}),f(h(t),V,{writable:!0,value:void 0}),d(h(t),V,r),d(h(t),P,n),d(h(t),x,e),t.childArray=[],t}return _(o,[{key:"_children",get:function(){return t(this,V)},set:function(e){throw new(t(this,x).prototype.constructor)(t(this,P))}},{key:"_count",get:function(){return this.childArray.length},set:function(e){throw new(t(this,x).prototype.constructor)(t(this,P))}},{key:"toJSON",value:function(){this.jsonString=!0;for(var e={},t=0;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r