scorm-again 1.7.0 → 1.7.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.
@@ -1,19 +1,19 @@
1
1
  !function(){var r={"./node_modules/lodash.debounce/index.js":
2
2
  /*!***********************************************!*\
3
3
  !*** ./node_modules/lodash.debounce/index.js ***!
4
- \***********************************************/function(e,s,t){function r(e){return(r="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 _(){return d.Date.now()}var n=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt,t="object"==(void 0===t.g?"undefined":r(t.g))&&t.g&&t.g.Object===Object&&t.g,f="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,d=t||f||Function("return this")(),h=Object.prototype.toString,b=Math.max,M=Math.min;function E(e){var t=r(e);return e&&("object"==t||"function"==t)}function m(e){return"symbol"==r(e)||!!(t=e)&&"object"==r(t)&&h.call(e)==i;var t}function v(e){if("number"==typeof e)return e;if(m(e))return n;if("string"!=typeof(e=E(e)?E(t="function"==typeof e.valueOf?e.valueOf():e)?t+"":t:e))return 0===e?e:+e;e=e.replace(o,"");var t=c.test(e);return t||l.test(e)?u(e.slice(2),t?2:8):a.test(e)?n:+e}e.exports=function(f,r,e){var n,i,o,a,s,c,l=0,d=!1,u=!1,t=!0;if("function"!=typeof f)throw new TypeError("Expected a function");function h(e){var t=n,r=i;return n=i=void 0,l=e,a=f.apply(r,t)}function m(e){var t=e-c;return void 0===c||r<=t||t<0||u&&o<=e-l}function p(){var e,t=_();if(m(t))return y(t);s=setTimeout(p,(e=r-((t=t)-c),u?M(e,o-(t-l)):e))}function y(e){return s=void 0,t&&n?h(e):(n=i=void 0,a)}function g(){var e=_(),t=m(e);if(n=arguments,i=this,c=e,t){if(void 0===s)return l=e=c,s=setTimeout(p,r),d?h(e):a;if(u)return s=setTimeout(p,r),h(c)}return void 0===s&&(s=setTimeout(p,r)),a}return r=v(r)||0,E(e)&&(d=!!e.leading,u="maxWait"in e,o=u?b(v(e.maxWait)||0,r):o,t="trailing"in e?!!e.trailing:t),g.cancel=function(){void 0!==s&&clearTimeout(s),n=c=i=s=void(l=0)},g.flush=function(){return void 0===s?a:y(_())},g}},"./src/BaseAPI.js":
4
+ \***********************************************/function(e,s,t){function r(e){return(r="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 _(){return d.Date.now()}var n=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt,t="object"==(void 0===t.g?"undefined":r(t.g))&&t.g&&t.g.Object===Object&&t.g,f="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,d=t||f||Function("return this")(),h=Object.prototype.toString,v=Math.max,M=Math.min;function E(e){var t=r(e);return e&&("object"==t||"function"==t)}function m(e){return"symbol"==r(e)||!!(t=e)&&"object"==r(t)&&h.call(e)==i;var t}function b(e){if("number"==typeof e)return e;if(m(e))return n;if("string"!=typeof(e=E(e)?E(t="function"==typeof e.valueOf?e.valueOf():e)?t+"":t:e))return 0===e?e:+e;e=e.replace(o,"");var t=c.test(e);return t||l.test(e)?u(e.slice(2),t?2:8):a.test(e)?n:+e}e.exports=function(f,r,e){var n,i,o,a,s,c,l=0,d=!1,u=!1,t=!0;if("function"!=typeof f)throw new TypeError("Expected a function");function h(e){var t=n,r=i;return n=i=void 0,l=e,a=f.apply(r,t)}function m(e){var t=e-c;return void 0===c||r<=t||t<0||u&&o<=e-l}function p(){var e,t=_();if(m(t))return y(t);s=setTimeout(p,(e=r-((t=t)-c),u?M(e,o-(t-l)):e))}function y(e){return s=void 0,t&&n?h(e):(n=i=void 0,a)}function g(){var e=_(),t=m(e);if(n=arguments,i=this,c=e,t){if(void 0===s)return l=e=c,s=setTimeout(p,r),d?h(e):a;if(u)return s=setTimeout(p,r),h(c)}return void 0===s&&(s=setTimeout(p,r)),a}return r=b(r)||0,E(e)&&(d=!!e.leading,u="maxWait"in e,o=u?v(b(e.maxWait)||0,r):o,t="trailing"in e?!!e.trailing:t),g.cancel=function(){void 0!==s&&clearTimeout(s),n=c=i=s=void(l=0)},g.flush=function(){return void 0===s?a:y(_())},g}},"./src/BaseAPI.js":
5
5
  /*!************************!*\
6
6
  !*** ./src/BaseAPI.js ***!
7
- \************************/function(r,e,t){"use strict";t.r(e),t.d(e,{default:function(){return T}});var p=t(/*! ./cmi/common */"./src/cmi/common.js"),c=t(/*! ./exceptions */"./src/exceptions.js"),e=t(/*! ./constants/error_codes */"./src/constants/error_codes.js"),l=t(/*! ./constants/api_constants */"./src/constants/api_constants.js"),u=t(/*! ./utilities */"./src/utilities.js"),f=t(/*! lodash.debounce */"./node_modules/lodash.debounce/index.js"),y=t.n(f);function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function E(e){return(E="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 v(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach(function(e){O(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function S(e,t,r){return t&&w(e.prototype,t),r&&w(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t,r){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function d(e,t){t=I(e,t,"get");return t.get?t.get.call(e):t.value}function o(e,t,r){var t=I(e,t,"set"),n=r;if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}return r}function I(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var h=l.default.global,C=e.default.scorm12,a=new WeakMap,m=new WeakMap,n=new WeakMap,T=function(){function r(e,t){if(M(this,r),i(this,a,{writable:!0,value:void 0}),i(this,m,{writable:!0,value:void 0}),i(this,n,{writable:!0,value:{autocommit:!1,autocommitSeconds:10,asyncCommit:!1,sendBeaconCommit:!1,lmsCommitUrl:!1,dataCommitFormat:"json",commitRequestDataType:"application/json;charset=UTF-8",autoProgress:!1,logLevel:h.LOG_LEVEL_ERROR,selfReportSessionTime:!1,alwaysSendTotalTime:!1,strict_errors:!0,xhrHeaders:{},xhrWithCredentials:!1,responseHandler:function(e){var t;return void 0!==e&&(null!==(t=JSON.parse(e.responseText))&&{}.hasOwnProperty.call(t,"result")||(t={},200===e.status?(t.result=h.SCORM_TRUE,t.errorCode=0):(t.result=h.SCORM_FALSE,t.errorCode=101))),t},requestHandler:function(e){return e},onLogMessage:function(e,t){switch(e){case h.LOG_LEVEL_ERROR:console.error(t);break;case h.LOG_LEVEL_WARNING:console.warn(t);break;case h.LOG_LEVEL_INFO:console.info(t);break;case h.LOG_LEVEL_DEBUG:console.debug?console.debug(t):console.log(t)}}}}),O(this,"cmi",void 0),O(this,"startingData",void 0),(this instanceof r?this.constructor:void 0)===r)throw new TypeError("Cannot construct BaseAPI instances directly");this.currentState=h.STATE_NOT_INITIALIZED,this.lastErrorCode=0,this.listenerArray=[],o(this,a,null),o(this,m,e),this.settings=t,this.apiLogLevel=this.settings.logLevel,this.selfReportSessionTime=this.settings.selfReportSessionTime}return S(r,[{key:"initialize",value:function(e,t,r){var n=h.SCORM_FALSE;return this.isInitialized()?this.throwSCORMError(d(this,m).INITIALIZED,t):this.isTerminated()?this.throwSCORMError(d(this,m).TERMINATED,r):(this.selfReportSessionTime&&this.cmi.setStartTime(),this.currentState=h.STATE_INITIALIZED,this.lastErrorCode=0,n=h.SCORM_TRUE,this.processListeners(e)),this.apiLog(e,null,"returned: "+n,h.LOG_LEVEL_INFO),this.clearSCORMError(n),n}},{key:"error_codes",get:function(){return d(this,m)}},{key:"settings",get:function(){return d(this,n)},set:function(e){o(this,n,b(b({},d(this,n)),e))}},{key:"terminate",value:function(e,t){var r,n=h.SCORM_FALSE;return this.checkState(t,d(this,m).TERMINATION_BEFORE_INIT,d(this,m).MULTIPLE_TERMINATION)&&(this.currentState=h.STATE_TERMINATED,r=this.storeData(!0),!this.settings.sendBeaconCommit&&!this.settings.asyncCommit&&void 0!==r.errorCode&&0<r.errorCode&&this.throwSCORMError(r.errorCode),n=void 0!==r&&r.result?r.result:h.SCORM_FALSE,t&&(this.lastErrorCode=0),n=h.SCORM_TRUE,this.processListeners(e)),this.apiLog(e,null,"returned: "+n,h.LOG_LEVEL_INFO),this.clearSCORMError(n),n}},{key:"getValue",value:function(e,t,r){var n;if(this.checkState(t,d(this,m).RETRIEVE_BEFORE_INIT,d(this,m).RETRIEVE_AFTER_TERM)){t&&(this.lastErrorCode=0);try{n=this.getCMIValue(r)}catch(e){e instanceof c.ValidationError?(this.lastErrorCode=e.errorCode,n=h.SCORM_FALSE):(e.message?console.error(e.message):console.error(e),this.throwSCORMError(d(this,m).GENERAL))}this.processListeners(e,r)}return this.apiLog(e,r,": returned: "+n,h.LOG_LEVEL_INFO),this.clearSCORMError(n),n}},{key:"setValue",value:function(e,t,r,n,i){void 0!==i&&(i=String(i));var o=h.SCORM_FALSE;if(this.checkState(r,d(this,m).STORE_BEFORE_INIT,d(this,m).STORE_AFTER_TERM)){r&&(this.lastErrorCode=0);try{o=this.setCMIValue(n,i)}catch(e){e instanceof c.ValidationError?(this.lastErrorCode=e.errorCode,o=h.SCORM_FALSE):(e.message?console.error(e.message):console.error(e),this.throwSCORMError(d(this,m).GENERAL))}this.processListeners(e,n,i)}return void 0===o&&(o=h.SCORM_FALSE),"0"===String(this.lastErrorCode)&&this.settings.autocommit&&!d(this,a)&&this.scheduleCommit(1e3*this.settings.autocommitSeconds,t),this.apiLog(e,n,": "+i+": result: "+o,h.LOG_LEVEL_INFO),this.clearSCORMError(o),o}},{key:"commit",value:function(e,t){this.clearScheduledCommit();var r,n=h.SCORM_FALSE;return this.checkState(t,d(this,m).COMMIT_BEFORE_INIT,d(this,m).COMMIT_AFTER_TERM)&&(r=this.storeData(!1),!this.settings.sendBeaconCommit&&!this.settings.asyncCommit&&r.errorCode&&0<r.errorCode&&this.throwSCORMError(r.errorCode),n=void 0!==r&&r.result?r.result:h.SCORM_FALSE,this.apiLog(e,"HttpRequest"," Result: "+n,h.LOG_LEVEL_DEBUG),t&&(this.lastErrorCode=0),this.processListeners(e)),this.apiLog(e,null,"returned: "+n,h.LOG_LEVEL_INFO),this.clearSCORMError(n),n}},{key:"getLastError",value:function(e){var t=String(this.lastErrorCode);return this.processListeners(e),this.apiLog(e,null,"returned: "+t,h.LOG_LEVEL_INFO),t}},{key:"getErrorString",value:function(e,t){var r="";return null!==t&&""!==t&&(r=this.getLmsErrorMessageDetails(t),this.processListeners(e)),this.apiLog(e,null,"returned: "+r,h.LOG_LEVEL_INFO),r}},{key:"getDiagnostic",value:function(e,t){var r="";return null!==t&&""!==t&&(r=this.getLmsErrorMessageDetails(t,!0),this.processListeners(e)),this.apiLog(e,null,"returned: "+r,h.LOG_LEVEL_INFO),r}},{key:"checkState",value:function(e,t,r){return this.isNotInitialized()?(this.throwSCORMError(t),!1):!e||!this.isTerminated()||(this.throwSCORMError(r),!1)}},{key:"apiLog",value:function(e,t,r,n){r=this.formatMessage(e,t,r),n>=this.apiLogLevel&&this.settings.onLogMessage(n,r)}},{key:"formatMessage",value:function(e,t,r){for(var n="",i=20-(n+=e).length,o=0;o<i;o++)n+=" ";if(n+=": ",t)for(var i=70-(n+=t).length,a=0;a<i;a++)n+=" ";return r&&(n+=r),n}},{key:"stringMatches",value:function(e,t){return e&&t&&e.match(t)}},{key:"_checkObjectHasProperty",value:function(e,t){return Object.hasOwnProperty.call(e,t)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||t in e}},{key:"getLmsErrorMessageDetails",value:function(e,t){throw new Error("The getLmsErrorMessageDetails method has not been implemented")}},{key:"getCMIValue",value:function(e){throw new Error("The getCMIValue method has not been implemented")}},{key:"setCMIValue",value:function(e,t){throw new Error("The setCMIValue method has not been implemented")}},{key:"_commonSetCMIValue",value:function(u,e,t,r){if(!t||""===t)return h.SCORM_FALSE;for(var n=t.split("."),i=this,o=h.SCORM_FALSE,a=!1,s="The data model element passed to ".concat(u," (").concat(t,") is not a valid SCORM data model element."),f=e?d(this,m).UNDEFINED_DATA_MODEL:d(this,m).GENERAL,c=0;c<n.length;c++){var l=n[c];if(c===n.length-1)e&&"{target="===l.substr(0,8)&&"function"==typeof i._isTargetValid?this.throwSCORMError(d(this,m).READ_ONLY_ELEMENT):this._checkObjectHasProperty(i,l)?(this.isInitialized()&&this.stringMatches(t,"\\.correct_responses\\.\\d+")&&this.validateCorrectResponse(t,r),e&&0!==this.lastErrorCode||(i[l]=r,o=h.SCORM_TRUE)):this.throwSCORMError(f,s);else{if(!(i=i[l])){this.throwSCORMError(f,s);break}i instanceof p.CMIArray&&(l=parseInt(n[c+1],10),isNaN(l)||((l=i.childArray[l])?(i=l,a=!0):(l=this.getChildElement(t,r,a),a=!0,l?(i.initialized&&l.initialize(),i.childArray.push(l),i=l):this.throwSCORMError(f,s)),c++))}}return o===h.SCORM_FALSE&&this.apiLog(u,null,"There was an error setting the value for: ".concat(t,", value of: ").concat(r),h.LOG_LEVEL_WARNING),o}},{key:"validateCorrectResponse",value:function(e,t){}},{key:"getChildElement",value:function(e,t,r){throw new Error("The getChildElement method has not been implemented")}},{key:"_commonGetCMIValue",value:function(e,t,r){if(!r||""===r)return"";for(var n=r.split("."),i=this,o=null,u="The data model element passed to ".concat(e," (").concat(r,") has not been initialized."),a="The data model element passed to ".concat(e," (").concat(r,") is not a valid SCORM data model element."),s=t?d(this,m).UNDEFINED_DATA_MODEL:d(this,m).GENERAL,c=0;c<n.length;c++){if(o=n[c],t){if("{target="===String(o).substr(0,8)&&"function"==typeof i._isTargetValid)return l=String(o).substr(8,String(o).length-9),i._isTargetValid(l);if(!this._checkObjectHasProperty(i,o))return void this.throwSCORMError(s,a)}else if(c===n.length-1&&!this._checkObjectHasProperty(i,o))return void this.throwSCORMError(s,a);if(void 0===(i=i[o])){this.throwSCORMError(s,a);break}if(i instanceof p.CMIArray){var l=parseInt(n[c+1],10);if(!isNaN(l)){var f=i.childArray[l];if(!f){this.throwSCORMError(d(this,m).VALUE_NOT_INITIALIZED,u);break}i=f,c++}}}if(null!=i)return i;t||("_children"===o?this.throwSCORMError(C.CHILDREN_ERROR):"_count"===o&&this.throwSCORMError(C.COUNT_ERROR))}},{key:"isInitialized",value:function(){return this.currentState===h.STATE_INITIALIZED}},{key:"isNotInitialized",value:function(){return this.currentState===h.STATE_NOT_INITIALIZED}},{key:"isTerminated",value:function(){return this.currentState===h.STATE_TERMINATED}},{key:"on",value:function(e,t){if(t)for(var r=e.split(" "),n=0;n<r.length;n++){var i=r[n].split(".");if(0===i.length)return;var o=i[0],a=null;1<i.length&&(a=e.replace(o+".","")),this.listenerArray.push({functionName:o,CMIElement:a,callback:t}),this.apiLog("on",o,"Added event listener: ".concat(this.listenerArray.length),h.LOG_LEVEL_INFO)}}},{key:"off",value:function(n,i){var o=this;if(i)for(var a=n.split(" "),e=0;e<a.length;e++){var t=function(e){e=a[e].split(".");if(0===e.length)return{v:void 0};var t=e[0],r=null,e=(1<e.length&&(r=n.replace(t+".","")),o.listenerArray.findIndex(function(e){return e.functionName===t&&e.CMIElement===r&&e.callback===i}));-1!==e&&(o.listenerArray.splice(e,1),o.apiLog("off",t,"Removed event listener: ".concat(o.listenerArray.length),h.LOG_LEVEL_INFO))}(e);if("object"===E(t))return t.v}}},{key:"clear",value:function(n){for(var i=this,o=n.split(" "),e=0;e<o.length;e++){var t=function(e){e=o[e].split(".");if(0===e.length)return{v:void 0};var t=e[0],r=null;1<e.length&&(r=n.replace(t+".","")),i.listenerArray=i.listenerArray.filter(function(e){return e.functionName!==t&&e.CMIElement!==r})}(e);if("object"===E(t))return t.v}}},{key:"processListeners",value:function(e,t,r){this.apiLog(e,t,r);for(var n=0;n<this.listenerArray.length;n++){var i=this.listenerArray[n],o=i.functionName===e,a=!!i.CMIElement,s=!1,s=t&&i.CMIElement&&"*"===i.CMIElement.substring(i.CMIElement.length-1)?0===t.indexOf(i.CMIElement.substring(0,i.CMIElement.length-1)):i.CMIElement===t;!o||a&&!s||i.callback(t,r)}}},{key:"throwSCORMError",value:function(e,t){t=t||this.getLmsErrorMessageDetails(e),this.apiLog("throwSCORMError",null,e+": "+t,h.LOG_LEVEL_ERROR),this.lastErrorCode=String(e)}},{key:"clearSCORMError",value:function(e){void 0!==e&&e!==h.SCORM_FALSE&&(this.lastErrorCode=0)}},{key:"storeData",value:function(e){throw new Error("The storeData method has not been implemented")}},{key:"loadFromFlattenedJSON",value:function(t,r){var n,i,e,o,a=this;function s(e,t,r){var n,e=e.match(r);return null!==e&&null!==(n=t.match(r))?(t=Number(e[2]))===(r=Number(n[2]))?"id"!==e[3]&&("type"!==e[3]||"id"===n[3])?1:-1:t-r:null}this.isNotInitialized()?(n=/^(cmi\.interactions\.)(\d+)\.(.*)$/,i=/^(cmi\.objectives\.)(\d+)\.(.*)$/,(e=Object.keys(t).map(function(e){return[String(e),t[e]]})).sort(function(e,t){var e=g(e,2),r=e[0],e=(e[1],g(t,2)),t=e[0];e[1];return null!==(e=s(r,t,n))||null!==(e=s(r,t,i))?e:r<t?-1:t<r?1:0}),e.forEach(function(e){(o={})[e[0]]=e[1],a.loadFromJSON((0,u.unflatten)(o),r)})):console.error("loadFromFlattenedJSON can only be called before the call to lmsInitialize.")}},{key:"loadFromJSON",value:function(e,t){if(this.isNotInitialized()){for(var r in t=void 0!==t?t:"cmi",this.startingData=e)if({}.hasOwnProperty.call(e,r)&&e[r]){var n=(t?t+".":"")+r,i=e[r];if(i.childArray)for(var o=0;o<i.childArray.length;o++)this.loadFromJSON(i.childArray[o],n+"."+o);else i.constructor===Object?this.loadFromJSON(i,n):this.setCMIValue(n,i)}}else console.error("loadFromJSON can only be called before the call to lmsInitialize.")}},{key:"renderCMIToJSONString",value:function(){var e=this.cmi;return JSON.stringify({cmi:e})}},{key:"renderCMIToJSONObject",value:function(){return JSON.parse(this.renderCMIToJSONString())}},{key:"renderCommitCMI",value:function(e){throw new Error("The storeData method has not been implemented")}},{key:"processHttpRequest",value:function(e,t){function r(e,t,r,n){if(n={result:h.SCORM_FALSE,errorCode:n.GENERAL},r.sendBeaconCommit)try{var i={type:r.commitRequestDataType},o=t instanceof Array?new Blob([t.join("&")],i):new Blob([JSON.stringify(t)],i),a={};navigator.sendBeacon(e,o)?(a.result=h.SCORM_TRUE,a.errorCode=0):(a.result=h.SCORM_FALSE,a.errorCode=101)}catch(e){return console.error(e),c.processListeners("CommitError"),n}else{var s=new XMLHttpRequest;s.open("POST",e,r.asyncCommit),Object.keys(r.xhrHeaders).length&&Object.keys(r.xhrHeaders).forEach(function(e){s.setRequestHeader(e,r.xhrHeaders[e])}),s.withCredentials=r.xhrWithCredentials,r.asyncCommit&&(s.onload=function(e){a="function"==typeof r.responseHandler?r.responseHandler(s):JSON.parse(s.responseText)});try{if((t=r.requestHandler(t))instanceof Array?(s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(t.join("&"))):(s.setRequestHeader("Content-Type",r.commitRequestDataType),s.send(JSON.stringify(t))),r.asyncCommit)return(a={}).result=h.SCORM_TRUE,a.errorCode=0,c.processListeners("CommitSuccess"),a;a="function"==typeof r.responseHandler?r.responseHandler(s):JSON.parse(s.responseText)}catch(e){return console.error(e),c.processListeners("CommitError"),n}}return void 0===a?(c.processListeners("CommitError"),n):(!0===a.result||a.result===h.SCORM_TRUE?c.processListeners("CommitSuccess"):c.processListeners("CommitError"),a)}var n,i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],c=this;return void 0!==y()?((n=y()(r,500))(e,t,this.settings,this.error_codes),i&&n.flush(),{result:h.SCORM_TRUE,errorCode:0}):r(e,t,this.settings,this.error_codes)}},{key:"scheduleCommit",value:function(e,t){o(this,a,new j(this,e,t)),this.apiLog("scheduleCommit","","scheduled",h.LOG_LEVEL_DEBUG)}},{key:"clearScheduledCommit",value:function(){d(this,a)&&(d(this,a).cancel(),o(this,a,null),this.apiLog("clearScheduledCommit","","cleared",h.LOG_LEVEL_DEBUG))}}]),r}(),L=new WeakMap,R=new WeakMap,s=new WeakMap,A=new WeakMap,j=function(){function n(e,t,r){M(this,n),i(this,L,{writable:!0,value:void 0}),i(this,R,{writable:!0,value:!1}),i(this,s,{writable:!0,value:void 0}),i(this,A,{writable:!0,value:void 0}),o(this,L,e),o(this,s,setTimeout(this.wrapper.bind(this),t)),o(this,A,r)}return S(n,[{key:"cancel",value:function(){o(this,R,!0),d(this,s)&&clearTimeout(d(this,s))}},{key:"wrapper",value:function(){d(this,R)||d(this,L).commit(d(this,A))}}]),n}()},"./src/Scorm12API.js":
7
+ \************************/function(r,e,t){"use strict";t.r(e),t.d(e,{default:function(){return T}});var p=t(/*! ./cmi/common */"./src/cmi/common.js"),c=t(/*! ./exceptions */"./src/exceptions.js"),e=t(/*! ./constants/error_codes */"./src/constants/error_codes.js"),l=t(/*! ./constants/api_constants */"./src/constants/api_constants.js"),u=t(/*! ./utilities */"./src/utilities.js"),f=t(/*! lodash.debounce */"./node_modules/lodash.debounce/index.js"),y=t.n(f);function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function E(e){return(E="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 b(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach(function(e){S(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t,r){return t&&w(e.prototype,t),r&&w(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t,r){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function d(e,t){t=I(e,t,"get");return t.get?t.get.call(e):t.value}function o(e,t,r){var t=I(e,t,"set"),n=r;if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}return r}function I(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var h=l.default.global,C=e.default.scorm12,a=new WeakMap,m=new WeakMap,n=new WeakMap,T=function(){function r(e,t){if(M(this,r),i(this,a,{writable:!0,value:void 0}),i(this,m,{writable:!0,value:void 0}),i(this,n,{writable:!0,value:{autocommit:!1,autocommitSeconds:10,asyncCommit:!1,sendBeaconCommit:!1,lmsCommitUrl:!1,dataCommitFormat:"json",commitRequestDataType:"application/json;charset=UTF-8",autoProgress:!1,logLevel:h.LOG_LEVEL_ERROR,selfReportSessionTime:!1,alwaysSendTotalTime:!1,strict_errors:!0,xhrHeaders:{},xhrWithCredentials:!1,responseHandler:function(e){var t;return void 0!==e&&(null!==(t=JSON.parse(e.responseText))&&{}.hasOwnProperty.call(t,"result")||(t={},200===e.status?(t.result=h.SCORM_TRUE,t.errorCode=0):(t.result=h.SCORM_FALSE,t.errorCode=101))),t},requestHandler:function(e){return e},onLogMessage:function(e,t){switch(e){case h.LOG_LEVEL_ERROR:console.error(t);break;case h.LOG_LEVEL_WARNING:console.warn(t);break;case h.LOG_LEVEL_INFO:console.info(t);break;case h.LOG_LEVEL_DEBUG:console.debug?console.debug(t):console.log(t)}}}}),S(this,"cmi",void 0),S(this,"startingData",void 0),(this instanceof r?this.constructor:void 0)===r)throw new TypeError("Cannot construct BaseAPI instances directly");this.currentState=h.STATE_NOT_INITIALIZED,this.lastErrorCode=0,this.listenerArray=[],o(this,a,null),o(this,m,e),this.settings=t,this.apiLogLevel=this.settings.logLevel,this.selfReportSessionTime=this.settings.selfReportSessionTime}return O(r,[{key:"initialize",value:function(e,t,r){var n=h.SCORM_FALSE;return this.isInitialized()?this.throwSCORMError(d(this,m).INITIALIZED,t):this.isTerminated()?this.throwSCORMError(d(this,m).TERMINATED,r):(this.selfReportSessionTime&&this.cmi.setStartTime(),this.currentState=h.STATE_INITIALIZED,this.lastErrorCode=0,n=h.SCORM_TRUE,this.processListeners(e)),this.apiLog(e,null,"returned: "+n,h.LOG_LEVEL_INFO),this.clearSCORMError(n),n}},{key:"error_codes",get:function(){return d(this,m)}},{key:"settings",get:function(){return d(this,n)},set:function(e){o(this,n,v(v({},d(this,n)),e))}},{key:"terminate",value:function(e,t){var r,n=h.SCORM_FALSE;return this.checkState(t,d(this,m).TERMINATION_BEFORE_INIT,d(this,m).MULTIPLE_TERMINATION)&&(this.currentState=h.STATE_TERMINATED,r=this.storeData(!0),!this.settings.sendBeaconCommit&&!this.settings.asyncCommit&&void 0!==r.errorCode&&0<r.errorCode&&this.throwSCORMError(r.errorCode),n=void 0!==r&&r.result?r.result:h.SCORM_FALSE,t&&(this.lastErrorCode=0),n=h.SCORM_TRUE,this.processListeners(e)),this.apiLog(e,null,"returned: "+n,h.LOG_LEVEL_INFO),this.clearSCORMError(n),n}},{key:"getValue",value:function(e,t,r){var n;if(this.checkState(t,d(this,m).RETRIEVE_BEFORE_INIT,d(this,m).RETRIEVE_AFTER_TERM)){t&&(this.lastErrorCode=0);try{n=this.getCMIValue(r)}catch(e){e instanceof c.ValidationError?(this.lastErrorCode=e.errorCode,n=h.SCORM_FALSE):(e.message?console.error(e.message):console.error(e),this.throwSCORMError(d(this,m).GENERAL))}this.processListeners(e,r)}return this.apiLog(e,r,": returned: "+n,h.LOG_LEVEL_INFO),this.clearSCORMError(n),n}},{key:"setValue",value:function(e,t,r,n,i){void 0!==i&&(i=String(i));var o=h.SCORM_FALSE;if(this.checkState(r,d(this,m).STORE_BEFORE_INIT,d(this,m).STORE_AFTER_TERM)){r&&(this.lastErrorCode=0);try{o=this.setCMIValue(n,i)}catch(e){e instanceof c.ValidationError?(this.lastErrorCode=e.errorCode,o=h.SCORM_FALSE):(e.message?console.error(e.message):console.error(e),this.throwSCORMError(d(this,m).GENERAL))}this.processListeners(e,n,i)}return void 0===o&&(o=h.SCORM_FALSE),"0"===String(this.lastErrorCode)&&this.settings.autocommit&&!d(this,a)&&this.scheduleCommit(1e3*this.settings.autocommitSeconds,t),this.apiLog(e,n,": "+i+": result: "+o,h.LOG_LEVEL_INFO),this.clearSCORMError(o),o}},{key:"commit",value:function(e,t){this.clearScheduledCommit();var r,n=h.SCORM_FALSE;return this.checkState(t,d(this,m).COMMIT_BEFORE_INIT,d(this,m).COMMIT_AFTER_TERM)&&(r=this.storeData(!1),!this.settings.sendBeaconCommit&&!this.settings.asyncCommit&&r.errorCode&&0<r.errorCode&&this.throwSCORMError(r.errorCode),n=void 0!==r&&r.result?r.result:h.SCORM_FALSE,this.apiLog(e,"HttpRequest"," Result: "+n,h.LOG_LEVEL_DEBUG),t&&(this.lastErrorCode=0),this.processListeners(e)),this.apiLog(e,null,"returned: "+n,h.LOG_LEVEL_INFO),this.clearSCORMError(n),n}},{key:"getLastError",value:function(e){var t=String(this.lastErrorCode);return this.processListeners(e),this.apiLog(e,null,"returned: "+t,h.LOG_LEVEL_INFO),t}},{key:"getErrorString",value:function(e,t){var r="";return null!==t&&""!==t&&(r=this.getLmsErrorMessageDetails(t),this.processListeners(e)),this.apiLog(e,null,"returned: "+r,h.LOG_LEVEL_INFO),r}},{key:"getDiagnostic",value:function(e,t){var r="";return null!==t&&""!==t&&(r=this.getLmsErrorMessageDetails(t,!0),this.processListeners(e)),this.apiLog(e,null,"returned: "+r,h.LOG_LEVEL_INFO),r}},{key:"checkState",value:function(e,t,r){return this.isNotInitialized()?(this.throwSCORMError(t),!1):!e||!this.isTerminated()||(this.throwSCORMError(r),!1)}},{key:"apiLog",value:function(e,t,r,n){r=this.formatMessage(e,t,r),n>=this.apiLogLevel&&this.settings.onLogMessage(n,r)}},{key:"formatMessage",value:function(e,t,r){for(var n="",i=20-(n+=e).length,o=0;o<i;o++)n+=" ";if(n+=": ",t)for(var i=70-(n+=t).length,a=0;a<i;a++)n+=" ";return r&&(n+=r),n}},{key:"stringMatches",value:function(e,t){return e&&t&&e.match(t)}},{key:"_checkObjectHasProperty",value:function(e,t){return Object.hasOwnProperty.call(e,t)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||t in e}},{key:"getLmsErrorMessageDetails",value:function(e,t){throw new Error("The getLmsErrorMessageDetails method has not been implemented")}},{key:"getCMIValue",value:function(e){throw new Error("The getCMIValue method has not been implemented")}},{key:"setCMIValue",value:function(e,t){throw new Error("The setCMIValue method has not been implemented")}},{key:"_commonSetCMIValue",value:function(u,e,t,r){if(!t||""===t)return h.SCORM_FALSE;for(var n=t.split("."),i=this,o=h.SCORM_FALSE,a=!1,s="The data model element passed to ".concat(u," (").concat(t,") is not a valid SCORM data model element."),f=e?d(this,m).UNDEFINED_DATA_MODEL:d(this,m).GENERAL,c=0;c<n.length;c++){var l=n[c];if(c===n.length-1)e&&"{target="===l.substr(0,8)&&"function"==typeof i._isTargetValid?this.throwSCORMError(d(this,m).READ_ONLY_ELEMENT):this._checkObjectHasProperty(i,l)?(this.isInitialized()&&this.stringMatches(t,"\\.correct_responses\\.\\d+")&&this.validateCorrectResponse(t,r),e&&0!==this.lastErrorCode||(i[l]=r,o=h.SCORM_TRUE)):this.throwSCORMError(f,s);else{if(!(i=i[l])){this.throwSCORMError(f,s);break}i instanceof p.CMIArray&&(l=parseInt(n[c+1],10),isNaN(l)||((l=i.childArray[l])?(i=l,a=!0):(l=this.getChildElement(t,r,a),a=!0,l?(i.initialized&&l.initialize(),i.childArray.push(l),i=l):this.throwSCORMError(f,s)),c++))}}return o===h.SCORM_FALSE&&this.apiLog(u,null,"There was an error setting the value for: ".concat(t,", value of: ").concat(r),h.LOG_LEVEL_WARNING),o}},{key:"validateCorrectResponse",value:function(e,t){}},{key:"getChildElement",value:function(e,t,r){throw new Error("The getChildElement method has not been implemented")}},{key:"_commonGetCMIValue",value:function(e,t,r){if(!r||""===r)return"";for(var n=r.split("."),i=this,o=null,u="The data model element passed to ".concat(e," (").concat(r,") has not been initialized."),a="The data model element passed to ".concat(e," (").concat(r,") is not a valid SCORM data model element."),s=t?d(this,m).UNDEFINED_DATA_MODEL:d(this,m).GENERAL,c=0;c<n.length;c++){if(o=n[c],t){if("{target="===String(o).substr(0,8)&&"function"==typeof i._isTargetValid)return l=String(o).substr(8,String(o).length-9),i._isTargetValid(l);if(!this._checkObjectHasProperty(i,o))return void this.throwSCORMError(s,a)}else if(c===n.length-1&&!this._checkObjectHasProperty(i,o))return void this.throwSCORMError(s,a);if(void 0===(i=i[o])){this.throwSCORMError(s,a);break}if(i instanceof p.CMIArray){var l=parseInt(n[c+1],10);if(!isNaN(l)){var f=i.childArray[l];if(!f){this.throwSCORMError(d(this,m).VALUE_NOT_INITIALIZED,u);break}i=f,c++}}}if(null!=i)return i;t||("_children"===o?this.throwSCORMError(C.CHILDREN_ERROR):"_count"===o&&this.throwSCORMError(C.COUNT_ERROR))}},{key:"isInitialized",value:function(){return this.currentState===h.STATE_INITIALIZED}},{key:"isNotInitialized",value:function(){return this.currentState===h.STATE_NOT_INITIALIZED}},{key:"isTerminated",value:function(){return this.currentState===h.STATE_TERMINATED}},{key:"on",value:function(e,t){if(t)for(var r=e.split(" "),n=0;n<r.length;n++){var i=r[n].split(".");if(0===i.length)return;var o=i[0],a=null;1<i.length&&(a=e.replace(o+".","")),this.listenerArray.push({functionName:o,CMIElement:a,callback:t}),this.apiLog("on",o,"Added event listener: ".concat(this.listenerArray.length),h.LOG_LEVEL_INFO)}}},{key:"off",value:function(n,i){var o=this;if(i)for(var a=n.split(" "),e=0;e<a.length;e++){var t=function(e){e=a[e].split(".");if(0===e.length)return{v:void 0};var t=e[0],r=null,e=(1<e.length&&(r=n.replace(t+".","")),o.listenerArray.findIndex(function(e){return e.functionName===t&&e.CMIElement===r&&e.callback===i}));-1!==e&&(o.listenerArray.splice(e,1),o.apiLog("off",t,"Removed event listener: ".concat(o.listenerArray.length),h.LOG_LEVEL_INFO))}(e);if("object"===E(t))return t.v}}},{key:"clear",value:function(n){for(var i=this,o=n.split(" "),e=0;e<o.length;e++){var t=function(e){e=o[e].split(".");if(0===e.length)return{v:void 0};var t=e[0],r=null;1<e.length&&(r=n.replace(t+".","")),i.listenerArray=i.listenerArray.filter(function(e){return e.functionName!==t&&e.CMIElement!==r})}(e);if("object"===E(t))return t.v}}},{key:"processListeners",value:function(e,t,r){this.apiLog(e,t,r);for(var n=0;n<this.listenerArray.length;n++){var i=this.listenerArray[n],o=i.functionName===e,a=!!i.CMIElement,s=!1,s=t&&i.CMIElement&&"*"===i.CMIElement.substring(i.CMIElement.length-1)?0===t.indexOf(i.CMIElement.substring(0,i.CMIElement.length-1)):i.CMIElement===t;!o||a&&!s||i.callback(t,r)}}},{key:"throwSCORMError",value:function(e,t){t=t||this.getLmsErrorMessageDetails(e),this.apiLog("throwSCORMError",null,e+": "+t,h.LOG_LEVEL_ERROR),this.lastErrorCode=String(e)}},{key:"clearSCORMError",value:function(e){void 0!==e&&e!==h.SCORM_FALSE&&(this.lastErrorCode=0)}},{key:"storeData",value:function(e){throw new Error("The storeData method has not been implemented")}},{key:"loadFromFlattenedJSON",value:function(t,r){var n,i,e,o,a=this;function s(e,t,r){var n,e=e.match(r);return null!==e&&null!==(n=t.match(r))?(t=Number(e[2]))===(r=Number(n[2]))?"id"!==e[3]&&("type"!==e[3]||"id"===n[3])?1:-1:t-r:null}this.isNotInitialized()?(n=/^(cmi\.interactions\.)(\d+)\.(.*)$/,i=/^(cmi\.objectives\.)(\d+)\.(.*)$/,(e=Object.keys(t).map(function(e){return[String(e),t[e]]})).sort(function(e,t){var e=g(e,2),r=e[0],e=(e[1],g(t,2)),t=e[0];e[1];return null!==(e=s(r,t,n))||null!==(e=s(r,t,i))?e:r<t?-1:t<r?1:0}),e.forEach(function(e){(o={})[e[0]]=e[1],a.loadFromJSON((0,u.unflatten)(o),r)})):console.error("loadFromFlattenedJSON can only be called before the call to lmsInitialize.")}},{key:"loadFromJSON",value:function(e,t){if(this.isNotInitialized()){for(var r in t=void 0!==t?t:"cmi",this.startingData=e)if({}.hasOwnProperty.call(e,r)&&e[r]){var n=(t?t+".":"")+r,i=e[r];if(i.childArray)for(var o=0;o<i.childArray.length;o++)this.loadFromJSON(i.childArray[o],n+"."+o);else i.constructor===Object?this.loadFromJSON(i,n):this.setCMIValue(n,i)}}else console.error("loadFromJSON can only be called before the call to lmsInitialize.")}},{key:"renderCMIToJSONString",value:function(){var e=this.cmi;return JSON.stringify({cmi:e})}},{key:"renderCMIToJSONObject",value:function(){return JSON.parse(this.renderCMIToJSONString())}},{key:"renderCommitCMI",value:function(e){throw new Error("The storeData method has not been implemented")}},{key:"processHttpRequest",value:function(e,t){function r(e,t,r,n){if(n={result:h.SCORM_FALSE,errorCode:n.GENERAL},r.sendBeaconCommit)try{var i={type:r.commitRequestDataType},o=t instanceof Array?new Blob([t.join("&")],i):new Blob([JSON.stringify(t)],i),a={};navigator.sendBeacon(e,o)?(a.result=h.SCORM_TRUE,a.errorCode=0):(a.result=h.SCORM_FALSE,a.errorCode=101)}catch(e){return console.error(e),c.processListeners("CommitError"),n}else{var s=new XMLHttpRequest;s.open("POST",e,r.asyncCommit),Object.keys(r.xhrHeaders).length&&Object.keys(r.xhrHeaders).forEach(function(e){s.setRequestHeader(e,r.xhrHeaders[e])}),s.withCredentials=r.xhrWithCredentials,r.asyncCommit&&(s.onload=function(e){a="function"==typeof r.responseHandler?r.responseHandler(s):JSON.parse(s.responseText)});try{if((t=r.requestHandler(t))instanceof Array?(s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(t.join("&"))):(s.setRequestHeader("Content-Type",r.commitRequestDataType),s.send(JSON.stringify(t))),r.asyncCommit)return(a={}).result=h.SCORM_TRUE,a.errorCode=0,c.processListeners("CommitSuccess"),a;a="function"==typeof r.responseHandler?r.responseHandler(s):JSON.parse(s.responseText)}catch(e){return console.error(e),c.processListeners("CommitError"),n}}return void 0===a?(c.processListeners("CommitError"),n):(!0===a.result||a.result===h.SCORM_TRUE?c.processListeners("CommitSuccess"):c.processListeners("CommitError"),a)}var n,i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],c=this;return void 0!==y()?((n=y()(r,500))(e,t,this.settings,this.error_codes),i&&n.flush(),{result:h.SCORM_TRUE,errorCode:0}):r(e,t,this.settings,this.error_codes)}},{key:"scheduleCommit",value:function(e,t){o(this,a,new A(this,e,t)),this.apiLog("scheduleCommit","","scheduled",h.LOG_LEVEL_DEBUG)}},{key:"clearScheduledCommit",value:function(){d(this,a)&&(d(this,a).cancel(),o(this,a,null),this.apiLog("clearScheduledCommit","","cleared",h.LOG_LEVEL_DEBUG))}}]),r}(),L=new WeakMap,R=new WeakMap,s=new WeakMap,j=new WeakMap,A=function(){function n(e,t,r){M(this,n),i(this,L,{writable:!0,value:void 0}),i(this,R,{writable:!0,value:!1}),i(this,s,{writable:!0,value:void 0}),i(this,j,{writable:!0,value:void 0}),o(this,L,e),o(this,s,setTimeout(this.wrapper.bind(this),t)),o(this,j,r)}return O(n,[{key:"cancel",value:function(){o(this,R,!0),d(this,s)&&clearTimeout(d(this,s))}},{key:"wrapper",value:function(){d(this,R)||d(this,L).commit(d(this,j))}}]),n}()},"./src/Scorm12API.js":
8
8
  /*!***************************!*\
9
9
  !*** ./src/Scorm12API.js ***!
10
- \***************************/function(n,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"),r=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 r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function f(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(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"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=r.default.scorm12,u=r.default.global,p=t.default.scorm12,y=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e);var r,n=m(i);function i(e){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");var e=f(f({},{mastery_override:!1}),e);return(e=n.call(this,p,e)).cmi=new o.CMI,e.nav=new o.NAV,e.LMSInitialize=e.lmsInitialize,e.LMSFinish=e.lmsFinish,e.LMSGetValue=e.lmsGetValue,e.LMSSetValue=e.lmsSetValue,e.LMSCommit=e.lmsCommit,e.LMSGetLastError=e.lmsGetLastError,e.LMSGetErrorString=e.lmsGetErrorString,e.LMSGetDiagnostic=e.lmsGetDiagnostic,e}return t=i,(e=[{key:"lmsInitialize",value:function(){return this.cmi.initialize(),this.initialize("LMSInitialize","LMS was already initialized!","LMS is already finished!")}},{key:"lmsFinish",value:function(){var e=this.terminate("LMSFinish",!0);return e===u.SCORM_TRUE&&(""!==this.nav.event?"continue"===this.nav.event?this.processListeners("SequenceNext"):this.processListeners("SequencePrevious"):this.settings.autoProgress&&this.processListeners("SequenceNext")),e}},{key:"lmsGetValue",value:function(e){return this.getValue("LMSGetValue",!1,e)}},{key:"lmsSetValue",value:function(e,t){return this.setValue("LMSSetValue","LMSCommit",!1,e,t)}},{key:"lmsCommit",value:function(){return this.commit("LMSCommit",!1)}},{key:"lmsGetLastError",value:function(){return this.getLastError("LMSGetLastError")}},{key:"lmsGetErrorString",value:function(e){return this.getErrorString("LMSGetErrorString",e)}},{key:"lmsGetDiagnostic",value:function(e){return this.getDiagnostic("LMSGetDiagnostic",e)}},{key:"setCMIValue",value:function(e,t){return this._commonSetCMIValue("LMSSetValue",!1,e,t)}},{key:"getCMIValue",value:function(e){return this._commonGetCMIValue("getCMIValue",!1,e)}},{key:"getChildElement",value:function(e,t,r){var n;return this.stringMatches(e,"cmi\\.objectives\\.\\d+")?n=new o.CMIObjectivesObject:r&&this.stringMatches(e,"cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+")?n=new o.CMIInteractionsCorrectResponsesObject:r&&this.stringMatches(e,"cmi\\.interactions\\.\\d+\\.objectives\\.\\d+")?n=new o.CMIInteractionsObjectivesObject:!r&&this.stringMatches(e,"cmi\\.interactions\\.\\d+")&&(n=new o.CMIInteractionsObject),n}},{key:"validateCorrectResponse",value:function(e,t){return!0}},{key:"getLmsErrorMessageDetails",value:function(e,t){var r="No Error",n="No Error";return e=String(e),l.error_descriptions[e]&&(r=l.error_descriptions[e].basicMessage,n=l.error_descriptions[e].detailMessage),t?n:r}},{key:"replaceWithAnotherScormAPI",value:function(e){this.cmi=e.cmi}},{key:"renderCommitCMI",value:function(e){var t=this.renderCMIToJSONObject(),r=(e&&(t.cmi.core.total_time=this.cmi.getCurrentTotalTime()),[]),n=a.flatten(t);switch(this.settings.dataCommitFormat){case"flattened":return a.flatten(t);case"params":for(var i in n)!{}.hasOwnProperty.call(n,i)||r.push("".concat(i,"=").concat(n[i]));return r;default:return t}}},{key:"storeData",value:function(e){e&&("not attempted"===(t=this.cmi.core.lesson_status)&&(this.cmi.core.lesson_status="completed"),"normal"===this.cmi.core.lesson_mode?"credit"===this.cmi.core.credit&&this.settings.mastery_override&&""!==this.cmi.student_data.mastery_score&&""!==this.cmi.core.score.raw&&(parseFloat(this.cmi.core.score.raw)>=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":
10
+ \***************************/function(n,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"),r=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 r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function f(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function m(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"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=r.default.scorm12,u=r.default.global,p=t.default.scorm12,y=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e);var r,n=m(i);function i(e){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");var e=f(f({},{mastery_override:!1}),e);return(e=n.call(this,p,e)).cmi=new o.CMI,e.nav=new o.NAV,e.LMSInitialize=e.lmsInitialize,e.LMSFinish=e.lmsFinish,e.LMSGetValue=e.lmsGetValue,e.LMSSetValue=e.lmsSetValue,e.LMSCommit=e.lmsCommit,e.LMSGetLastError=e.lmsGetLastError,e.LMSGetErrorString=e.lmsGetErrorString,e.LMSGetDiagnostic=e.lmsGetDiagnostic,e}return t=i,(e=[{key:"lmsInitialize",value:function(){return this.cmi.initialize(),this.initialize("LMSInitialize","LMS was already initialized!","LMS is already finished!")}},{key:"lmsFinish",value:function(){var e=this.terminate("LMSFinish",!0);return e===u.SCORM_TRUE&&(""!==this.nav.event?"continue"===this.nav.event?this.processListeners("SequenceNext"):this.processListeners("SequencePrevious"):this.settings.autoProgress&&this.processListeners("SequenceNext")),e}},{key:"lmsGetValue",value:function(e){return this.getValue("LMSGetValue",!1,e)}},{key:"lmsSetValue",value:function(e,t){return this.setValue("LMSSetValue","LMSCommit",!1,e,t)}},{key:"lmsCommit",value:function(){return this.commit("LMSCommit",!1)}},{key:"lmsGetLastError",value:function(){return this.getLastError("LMSGetLastError")}},{key:"lmsGetErrorString",value:function(e){return this.getErrorString("LMSGetErrorString",e)}},{key:"lmsGetDiagnostic",value:function(e){return this.getDiagnostic("LMSGetDiagnostic",e)}},{key:"setCMIValue",value:function(e,t){return this._commonSetCMIValue("LMSSetValue",!1,e,t)}},{key:"getCMIValue",value:function(e){return this._commonGetCMIValue("getCMIValue",!1,e)}},{key:"getChildElement",value:function(e,t,r){var n;return this.stringMatches(e,"cmi\\.objectives\\.\\d+")?n=new o.CMIObjectivesObject:r&&this.stringMatches(e,"cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+")?n=new o.CMIInteractionsCorrectResponsesObject:r&&this.stringMatches(e,"cmi\\.interactions\\.\\d+\\.objectives\\.\\d+")?n=new o.CMIInteractionsObjectivesObject:!r&&this.stringMatches(e,"cmi\\.interactions\\.\\d+")&&(n=new o.CMIInteractionsObject),n}},{key:"validateCorrectResponse",value:function(e,t){return!0}},{key:"getLmsErrorMessageDetails",value:function(e,t){var r="No Error",n="No Error";return e=String(e),l.error_descriptions[e]&&(r=l.error_descriptions[e].basicMessage,n=l.error_descriptions[e].detailMessage),t?n:r}},{key:"replaceWithAnotherScormAPI",value:function(e){this.cmi=e.cmi}},{key:"renderCommitCMI",value:function(e){var t=this.renderCMIToJSONObject(),r=(e&&(t.cmi.core.total_time=this.cmi.getCurrentTotalTime()),[]),n=a.flatten(t);switch(this.settings.dataCommitFormat){case"flattened":return a.flatten(t);case"params":for(var i in n)!{}.hasOwnProperty.call(n,i)||r.push("".concat(i,"=").concat(n[i]));return r;default:return t}}},{key:"storeData",value:function(e){e&&("not attempted"===(t=this.cmi.core.lesson_status)&&(this.cmi.core.lesson_status="completed"),"normal"===this.cmi.core.lesson_mode?"credit"===this.cmi.core.credit&&this.settings.mastery_override&&""!==this.cmi.student_data.mastery_score&&""!==this.cmi.core.score.raw&&(parseFloat(this.cmi.core.score.raw)>=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":
11
11
  /*!***************************!*\
12
12
  !*** ./src/cmi/common.js ***!
13
- \***************************/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.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t,r){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function h(e,t,r){var t=b(e,t,"set"),n=r;if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}return r}function t(e,t){t=b(e,t,"get");return t.get?t.get.call(e):t.value}function b(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var M=n.default.scorm12,w=e.default.scorm12,S=i.default.scorm12;function O(e,t,r,n,i){t=new RegExp(t),t=e.match(t);if(i&&""===e)return!0;if(void 0===e||!t||""===t[0])throw new n.prototype.constructor(r);return!0}function I(e,t,r,n){t=t.split("#");if((e=+e)>=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<this.childArray.length;t++)e[t+""]=this.childArray[t];return delete this.jsonString,e}}]),o}()},"./src/cmi/scorm12_cmi.js":
13
+ \***************************/function(r,n,e){"use strict";e.r(n),e.d(n,{BaseCMI:function(){return L},CMIArray:function(){return x},CMIScore:function(){return D},checkValidFormat:function(){return S},checkValidRange:function(){return I}});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?Object.setPrototypeOf.bind():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.bind():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.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t,r){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function h(e,t,r){var t=v(e,t,"set"),n=r;if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}return r}function t(e,t){t=v(e,t,"get");return t.get?t.get.call(e):t.value}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var M=n.default.scorm12,w=e.default.scorm12,O=i.default.scorm12;function S(e,t,r,n,i){t=new RegExp(t),t=e.match(t);if(i&&""===e)return!0;if(void 0===e||!t||""===t[0])throw new n.prototype.constructor(r);return!0}function I(e,t,r,n){t=t.split("#");if((e=+e)>=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 b(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,j=new WeakMap,p=new WeakMap,y=new WeakMap,g=new WeakMap,_=new WeakMap,A=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),j,{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),A,{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),j,o||O.INVALID_SET_VALUE),h(f(t),p,a||O.TYPE_MISMATCH),h(f(t),y,s||O.VALUE_OUT_OF_RANGE),h(f(t),g,c||w.CMIDecimal),h(f(t),_,e),t}return b(u,[{key:"_children",get:function(){return t(this,R)},set:function(e){throw new(t(this,_).prototype.constructor)(t(this,j))}},{key:"raw",get:function(){return t(this,A)},set:function(e){!S(e,t(this,g),t(this,p),t(this,_))||t(this,m)&&!I(e,t(this,m),t(this,y),t(this,_))||h(this,A,e)}},{key:"min",get:function(){return t(this,N)},set:function(e){!S(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){!S(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 b(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<this.childArray.length;t++)e[t+""]=this.childArray[t];return delete this.jsonString,e}}]),o}()},"./src/cmi/scorm12_cmi.js":
14
14
  /*!********************************!*\
15
15
  !*** ./src/cmi/scorm12_cmi.js ***!
16
- \********************************/function(e,t,r){"use strict";r.r(t),r.d(t,{throwReadOnlyError:function(){return d},throwWriteOnlyError:function(){return C},check12ValidFormat:function(){return h},check12ValidRange:function(){return L},CMI:function(){return D},CMIStudentData:function(){return ee},CMIStudentPreference:function(){return ae},CMIInteractionsObject:function(){return pe},CMIObjectivesObject:function(){return _e},CMIInteractionsObjectivesObject:function(){return ve},CMIInteractionsCorrectResponsesObject:function(){return Me},NAV:function(){return Se}});var i=r(/*! ./common */"./src/cmi/common.js"),t=r(/*! ../constants/api_constants */"./src/constants/api_constants.js"),c=r(/*! ../constants/error_codes */"./src/constants/error_codes.js"),m=r(/*! ../constants/regex */"./src/constants/regex.js"),n=r(/*! ../exceptions */"./src/exceptions.js"),p=r(/*! ../utilities */"./src/utilities.js");function y(e){return(y="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 g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function E(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=S(e)););return e}(e,t);if(n)return n=Object.getOwnPropertyDescriptor(n,t),n.get?n.get.call(arguments.length<3?e:r):n.value}).apply(this,arguments)}function b(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&&M(e,t)}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(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=S(r),t=(e=n?(e=S(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t,r){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function o(e,t){t=O(e,t,"get");return t.get?t.get.call(e):t.value}function f(e,t,r){var t=O(e,t,"set"),n=r;if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}return r}function O(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var I=t.default.scorm12,a=m.default.scorm12,s=c.default.scorm12;function d(){throw new n.Scorm12ValidationError(s.READ_ONLY_ELEMENT)}function C(){throw new n.Scorm12ValidationError(s.WRITE_ONLY_ELEMENT)}function T(){throw new n.Scorm12ValidationError(s.INVALID_SET_VALUE)}function h(e,t,r){return(0,i.checkValidFormat)(e,t,s.TYPE_MISMATCH,n.Scorm12ValidationError,r)}function L(e,t,r){return(0,i.checkValidRange)(e,t,s.VALUE_OUT_OF_RANGE,n.Scorm12ValidationError,r)}var R=new WeakMap,A=new WeakMap,j=new WeakMap,N=new WeakMap,k=new WeakMap,D=function(){b(c,i.BaseCMI);var s=w(c);function c(e,t,r){var n,i,o,a;return g(this,c),u(l(n=s.call(this)),R,{writable:!0,value:""}),u(l(n),A,{writable:!0,value:"3.4"}),u(l(n),j,{writable:!0,value:""}),u(l(n),N,{writable:!0,value:""}),u(l(n),k,{writable:!0,value:""}),i=l(n),a=null,(o="student_data")in i?Object.defineProperty(i,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[o]=a,r&&n.initialize(),f(l(n),R,e||I.cmi_children),n.core=new J,n.objectives=new Y,n.student_data=t||new ee,n.student_preference=new ae,n.interactions=new se,n}return E(c,[{key:"initialize",value:function(){var e;v(S(c.prototype),"initialize",this).call(this),null!==(e=this.core)&&void 0!==e&&e.initialize(),null!==(e=this.objectives)&&void 0!==e&&e.initialize(),null!==(e=this.student_data)&&void 0!==e&&e.initialize(),null!==(e=this.student_preference)&&void 0!==e&&e.initialize(),null!==(e=this.interactions)&&void 0!==e&&e.initialize()}},{key:"toJSON",value:function(){this.jsonString=!0;var e={suspend_data:this.suspend_data,launch_data:this.launch_data,comments:this.comments,comments_from_lms:this.comments_from_lms,core:this.core,objectives:this.objectives,student_data:this.student_data,student_preference:this.student_preference,interactions:this.interactions};return delete this.jsonString,e}},{key:"_version",get:function(){return o(this,A)},set:function(e){T()}},{key:"_children",get:function(){return o(this,R)},set:function(e){T()}},{key:"suspend_data",get:function(){var e;return null===(e=this.core)||void 0===e?void 0:e.suspend_data},set:function(e){this.core&&(this.core.suspend_data=e)}},{key:"launch_data",get:function(){return o(this,j)},set:function(e){this.initialized?d():f(this,j,e)}},{key:"comments",get:function(){return o(this,N)},set:function(e){h(e,a.CMIString4096,!0)&&f(this,N,e)}},{key:"comments_from_lms",get:function(){return o(this,k)},set:function(e){this.initialized?d():f(this,k,e)}},{key:"getCurrentTotalTime",value:function(){return this.core.getCurrentTotalTime(this.start_time)}}]),c}(),V=new WeakMap,P=new WeakMap,F=new WeakMap,x=new WeakMap,G=new WeakMap,z=new WeakMap,U=new WeakMap,W=new WeakMap,B=new WeakMap,$=new WeakMap,H=new WeakMap,Z=new WeakMap,J=function(){b(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),V,{writable:!0,value:I.core_children}),u(l(e),P,{writable:!0,value:""}),u(l(e),F,{writable:!0,value:""}),u(l(e),x,{writable:!0,value:""}),u(l(e),G,{writable:!0,value:""}),u(l(e),z,{writable:!0,value:"not attempted"}),u(l(e),U,{writable:!0,value:""}),u(l(e),W,{writable:!0,value:""}),u(l(e),B,{writable:!0,value:"normal"}),u(l(e),$,{writable:!0,value:""}),u(l(e),H,{writable:!0,value:"00:00:00"}),u(l(e),Z,{writable:!0,value:""}),e.score=new i.CMIScore({score_children:I.score_children,score_range:a.score_range,invalidErrorCode:s.INVALID_SET_VALUE,invalidTypeCode:s.TYPE_MISMATCH,invalidRangeCode:s.VALUE_OUT_OF_RANGE,errorClass:n.Scorm12ValidationError}),e}return E(r,[{key:"initialize",value:function(){var e;v(S(r.prototype),"initialize",this).call(this),null!==(e=this.score)&&void 0!==e&&e.initialize()}},{key:"_children",get:function(){return o(this,V)},set:function(e){T()}},{key:"student_id",get:function(){return o(this,P)},set:function(e){this.initialized?d():f(this,P,e)}},{key:"student_name",get:function(){return o(this,F)},set:function(e){this.initialized?d():f(this,F,e)}},{key:"lesson_location",get:function(){return o(this,x)},set:function(e){h(e,a.CMIString256,!0)&&f(this,x,e)}},{key:"credit",get:function(){return o(this,G)},set:function(e){this.initialized?d():f(this,G,e)}},{key:"lesson_status",get:function(){return o(this,z)},set:function(e){this.initialized?h(e,a.CMIStatus)&&f(this,z,e):h(e,a.CMIStatus2)&&f(this,z,e)}},{key:"entry",get:function(){return o(this,U)},set:function(e){this.initialized?d():f(this,U,e)}},{key:"total_time",get:function(){return o(this,W)},set:function(e){this.initialized?d():f(this,W,e)}},{key:"lesson_mode",get:function(){return o(this,B)},set:function(e){this.initialized?d():f(this,B,e)}},{key:"exit",get:function(){return this.jsonString?o(this,$):C()},set:function(e){h(e,a.CMIExit,!0)&&f(this,$,e)}},{key:"session_time",get:function(){return this.jsonString?o(this,H):C()},set:function(e){h(e,a.CMITimespan)&&f(this,H,e)}},{key:"suspend_data",get:function(){return o(this,Z)},set:function(e){h(e,a.CMIString4096,!0)&&f(this,Z,e)}},{key:"getCurrentTotalTime",value:function(e){var t=o(this,H);return null!=e&&(e=(new Date).getTime()-e,t=p.getSecondsAsHHMMSS(e/1e3)),p.addHHMMSSTimeStrings(o(this,W),t,new RegExp(a.CMITimespan))}},{key:"toJSON",value:function(){this.jsonString=!0;var e={student_id:this.student_id,student_name:this.student_name,lesson_location:this.lesson_location,credit:this.credit,lesson_status:this.lesson_status,entry:this.entry,lesson_mode:this.lesson_mode,exit:this.exit,session_time:this.session_time,score:this.score};return delete this.jsonString,e}}]),r}(),Y=function(){b(t,i.CMIArray);var e=w(t);function t(){return g(this,t),e.call(this,{children:I.objectives_children,errorCode:s.INVALID_SET_VALUE,errorClass:n.Scorm12ValidationError})}return E(t)}(),q=new WeakMap,X=new WeakMap,K=new WeakMap,Q=new WeakMap,ee=function(){b(n,i.BaseCMI);var r=w(n);function n(e){var t;return g(this,n),u(l(t=r.call(this)),q,{writable:!0,value:void 0}),u(l(t),X,{writable:!0,value:""}),u(l(t),K,{writable:!0,value:""}),u(l(t),Q,{writable:!0,value:""}),f(l(t),q,e||I.student_data_children),t}return E(n,[{key:"_children",get:function(){return o(this,q)},set:function(e){T()}},{key:"mastery_score",get:function(){return o(this,X)},set:function(e){this.initialized?d():f(this,X,e)}},{key:"max_time_allowed",get:function(){return o(this,K)},set:function(e){this.initialized?d():f(this,K,e)}},{key:"time_limit_action",get:function(){return o(this,Q)},set:function(e){this.initialized?d():f(this,Q,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={mastery_score:this.mastery_score,max_time_allowed:this.max_time_allowed,time_limit_action:this.time_limit_action};return delete this.jsonString,e}}]),n}(),te=new WeakMap,re=new WeakMap,ne=new WeakMap,ie=new WeakMap,oe=new WeakMap,ae=function(){b(n,i.BaseCMI);var r=w(n);function n(e){var t;return g(this,n),u(l(t=r.call(this)),te,{writable:!0,value:void 0}),u(l(t),re,{writable:!0,value:""}),u(l(t),ne,{writable:!0,value:""}),u(l(t),ie,{writable:!0,value:""}),u(l(t),oe,{writable:!0,value:""}),f(l(t),te,e||I.student_preference_children),t}return E(n,[{key:"_children",get:function(){return o(this,te)},set:function(e){T()}},{key:"audio",get:function(){return o(this,re)},set:function(e){h(e,a.CMISInteger)&&L(e,a.audio_range)&&f(this,re,e)}},{key:"language",get:function(){return o(this,ne)},set:function(e){h(e,a.CMIString256)&&f(this,ne,e)}},{key:"speed",get:function(){return o(this,ie)},set:function(e){h(e,a.CMISInteger)&&L(e,a.speed_range)&&f(this,ie,e)}},{key:"text",get:function(){return o(this,oe)},set:function(e){h(e,a.CMISInteger)&&L(e,a.text_range)&&f(this,oe,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={audio:this.audio,language:this.language,speed:this.speed,text:this.text};return delete this.jsonString,e}}]),n}(),se=function(){b(t,i.CMIArray);var e=w(t);function t(){return g(this,t),e.call(this,{children:I.interactions_children,errorCode:s.INVALID_SET_VALUE,errorClass:n.Scorm12ValidationError})}return E(t)}(),ce=new WeakMap,le=new WeakMap,ue=new WeakMap,fe=new WeakMap,de=new WeakMap,he=new WeakMap,me=new WeakMap,pe=function(){b(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),ce,{writable:!0,value:""}),u(l(e),le,{writable:!0,value:""}),u(l(e),ue,{writable:!0,value:""}),u(l(e),fe,{writable:!0,value:""}),u(l(e),de,{writable:!0,value:""}),u(l(e),he,{writable:!0,value:""}),u(l(e),me,{writable:!0,value:""}),e.objectives=new i.CMIArray({errorCode:s.INVALID_SET_VALUE,errorClass:n.Scorm12ValidationError,children:I.objectives_children}),e.correct_responses=new i.CMIArray({errorCode:s.INVALID_SET_VALUE,errorClass:n.Scorm12ValidationError,children:I.correct_responses_children}),e}return E(r,[{key:"initialize",value:function(){var e;v(S(r.prototype),"initialize",this).call(this),null!==(e=this.objectives)&&void 0!==e&&e.initialize(),null!==(e=this.correct_responses)&&void 0!==e&&e.initialize()}},{key:"id",get:function(){return this.jsonString?o(this,ce):C()},set:function(e){h(e,a.CMIIdentifier)&&f(this,ce,e)}},{key:"time",get:function(){return this.jsonString?o(this,le):C()},set:function(e){h(e,a.CMITime)&&f(this,le,e)}},{key:"type",get:function(){return this.jsonString?o(this,ue):C()},set:function(e){h(e,a.CMIType)&&f(this,ue,e)}},{key:"weighting",get:function(){return this.jsonString?o(this,fe):C()},set:function(e){h(e,a.CMIDecimal)&&L(e,a.weighting_range)&&f(this,fe,e)}},{key:"student_response",get:function(){return this.jsonString?o(this,de):C()},set:function(e){h(e,a.CMIFeedback,!0)&&f(this,de,e)}},{key:"result",get:function(){return this.jsonString?o(this,he):C()},set:function(e){h(e,a.CMIResult)&&f(this,he,e)}},{key:"latency",get:function(){return this.jsonString?o(this,me):C()},set:function(e){h(e,a.CMITimespan)&&f(this,me,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={id:this.id,time:this.time,type:this.type,weighting:this.weighting,student_response:this.student_response,result:this.result,latency:this.latency,objectives:this.objectives,correct_responses:this.correct_responses};return delete this.jsonString,e}}]),r}(),ye=new WeakMap,ge=new WeakMap,_e=function(){b(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),ye,{writable:!0,value:""}),u(l(e),ge,{writable:!0,value:""}),e.score=new i.CMIScore({score_children:I.score_children,score_range:a.score_range,invalidErrorCode:s.INVALID_SET_VALUE,invalidTypeCode:s.TYPE_MISMATCH,invalidRangeCode:s.VALUE_OUT_OF_RANGE,errorClass:n.Scorm12ValidationError}),e}return E(r,[{key:"id",get:function(){return o(this,ye)},set:function(e){h(e,a.CMIIdentifier)&&f(this,ye,e)}},{key:"status",get:function(){return o(this,ge)},set:function(e){h(e,a.CMIStatus2)&&f(this,ge,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={id:this.id,status:this.status,score:this.score};return delete this.jsonString,e}}]),r}(),Ee=new WeakMap,ve=function(){b(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),Ee,{writable:!0,value:""}),e}return E(r,[{key:"id",get:function(){return o(this,Ee)},set:function(e){h(e,a.CMIIdentifier)&&f(this,Ee,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={id:this.id};return delete this.jsonString,e}}]),r}(),be=new WeakMap,Me=function(){b(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),be,{writable:!0,value:""}),e}return E(r,[{key:"pattern",get:function(){return this.jsonString?o(this,be):C()},set:function(e){h(e,a.CMIFeedback,!0)&&f(this,be,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={pattern:this.pattern};return delete this.jsonString,e}}]),r}(),we=new WeakMap,Se=function(){b(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),we,{writable:!0,value:""}),e}return E(r,[{key:"event",get:function(){return o(this,we)},set:function(e){h(e,a.NAVEvent)&&f(this,we,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={event:this.event};return delete this.jsonString,e}}]),r}()},"./src/constants/api_constants.js":
16
+ \********************************/function(e,t,r){"use strict";r.r(t),r.d(t,{CMI:function(){return D},CMIInteractionsCorrectResponsesObject:function(){return Me},CMIInteractionsObject:function(){return pe},CMIInteractionsObjectivesObject:function(){return be},CMIObjectivesObject:function(){return _e},CMIStudentData:function(){return ee},CMIStudentPreference:function(){return ae},NAV:function(){return Oe},check12ValidFormat:function(){return h},check12ValidRange:function(){return L},throwReadOnlyError:function(){return d},throwWriteOnlyError:function(){return C}});var i=r(/*! ./common */"./src/cmi/common.js"),t=r(/*! ../constants/api_constants */"./src/constants/api_constants.js"),c=r(/*! ../constants/error_codes */"./src/constants/error_codes.js"),m=r(/*! ../constants/regex */"./src/constants/regex.js"),n=r(/*! ../exceptions */"./src/exceptions.js"),p=r(/*! ../utilities */"./src/utilities.js");function y(e){return(y="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 g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function E(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(){return(b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(n)return n=Object.getOwnPropertyDescriptor(n,t),n.get?n.get.call(arguments.length<3?e:r):n.value}).apply(this,arguments)}function v(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&&M(e,t)}function M(e,t){return(M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function w(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=O(r),t=(e=n?(e=O(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t,r){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function o(e,t){t=S(e,t,"get");return t.get?t.get.call(e):t.value}function f(e,t,r){var t=S(e,t,"set"),n=r;if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}return r}function S(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var I=t.default.scorm12,a=m.default.scorm12,s=c.default.scorm12;function d(){throw new n.Scorm12ValidationError(s.READ_ONLY_ELEMENT)}function C(){throw new n.Scorm12ValidationError(s.WRITE_ONLY_ELEMENT)}function T(){throw new n.Scorm12ValidationError(s.INVALID_SET_VALUE)}function h(e,t,r){return(0,i.checkValidFormat)(e,t,s.TYPE_MISMATCH,n.Scorm12ValidationError,r)}function L(e,t,r){return(0,i.checkValidRange)(e,t,s.VALUE_OUT_OF_RANGE,n.Scorm12ValidationError,r)}var R=new WeakMap,j=new WeakMap,A=new WeakMap,N=new WeakMap,k=new WeakMap,D=function(){v(c,i.BaseCMI);var s=w(c);function c(e,t,r){var n,i,o,a;return g(this,c),u(l(n=s.call(this)),R,{writable:!0,value:""}),u(l(n),j,{writable:!0,value:"3.4"}),u(l(n),A,{writable:!0,value:""}),u(l(n),N,{writable:!0,value:""}),u(l(n),k,{writable:!0,value:""}),i=l(n),a=null,(o="student_data")in i?Object.defineProperty(i,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[o]=a,r&&n.initialize(),f(l(n),R,e||I.cmi_children),n.core=new J,n.objectives=new Y,n.student_data=t||new ee,n.student_preference=new ae,n.interactions=new se,n}return E(c,[{key:"initialize",value:function(){var e;b(O(c.prototype),"initialize",this).call(this),null!==(e=this.core)&&void 0!==e&&e.initialize(),null!==(e=this.objectives)&&void 0!==e&&e.initialize(),null!==(e=this.student_data)&&void 0!==e&&e.initialize(),null!==(e=this.student_preference)&&void 0!==e&&e.initialize(),null!==(e=this.interactions)&&void 0!==e&&e.initialize()}},{key:"toJSON",value:function(){this.jsonString=!0;var e={suspend_data:this.suspend_data,launch_data:this.launch_data,comments:this.comments,comments_from_lms:this.comments_from_lms,core:this.core,objectives:this.objectives,student_data:this.student_data,student_preference:this.student_preference,interactions:this.interactions};return delete this.jsonString,e}},{key:"_version",get:function(){return o(this,j)},set:function(e){T()}},{key:"_children",get:function(){return o(this,R)},set:function(e){T()}},{key:"suspend_data",get:function(){var e;return null===(e=this.core)||void 0===e?void 0:e.suspend_data},set:function(e){this.core&&(this.core.suspend_data=e)}},{key:"launch_data",get:function(){return o(this,A)},set:function(e){this.initialized?d():f(this,A,e)}},{key:"comments",get:function(){return o(this,N)},set:function(e){h(e,a.CMIString4096,!0)&&f(this,N,e)}},{key:"comments_from_lms",get:function(){return o(this,k)},set:function(e){this.initialized?d():f(this,k,e)}},{key:"getCurrentTotalTime",value:function(){return this.core.getCurrentTotalTime(this.start_time)}}]),c}(),V=new WeakMap,P=new WeakMap,F=new WeakMap,x=new WeakMap,G=new WeakMap,z=new WeakMap,U=new WeakMap,W=new WeakMap,B=new WeakMap,$=new WeakMap,H=new WeakMap,Z=new WeakMap,J=function(){v(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),V,{writable:!0,value:I.core_children}),u(l(e),P,{writable:!0,value:""}),u(l(e),F,{writable:!0,value:""}),u(l(e),x,{writable:!0,value:""}),u(l(e),G,{writable:!0,value:""}),u(l(e),z,{writable:!0,value:"not attempted"}),u(l(e),U,{writable:!0,value:""}),u(l(e),W,{writable:!0,value:""}),u(l(e),B,{writable:!0,value:"normal"}),u(l(e),$,{writable:!0,value:""}),u(l(e),H,{writable:!0,value:"00:00:00"}),u(l(e),Z,{writable:!0,value:""}),e.score=new i.CMIScore({score_children:I.score_children,score_range:a.score_range,invalidErrorCode:s.INVALID_SET_VALUE,invalidTypeCode:s.TYPE_MISMATCH,invalidRangeCode:s.VALUE_OUT_OF_RANGE,errorClass:n.Scorm12ValidationError}),e}return E(r,[{key:"initialize",value:function(){var e;b(O(r.prototype),"initialize",this).call(this),null!==(e=this.score)&&void 0!==e&&e.initialize()}},{key:"_children",get:function(){return o(this,V)},set:function(e){T()}},{key:"student_id",get:function(){return o(this,P)},set:function(e){this.initialized?d():f(this,P,e)}},{key:"student_name",get:function(){return o(this,F)},set:function(e){this.initialized?d():f(this,F,e)}},{key:"lesson_location",get:function(){return o(this,x)},set:function(e){h(e,a.CMIString256,!0)&&f(this,x,e)}},{key:"credit",get:function(){return o(this,G)},set:function(e){this.initialized?d():f(this,G,e)}},{key:"lesson_status",get:function(){return o(this,z)},set:function(e){this.initialized?h(e,a.CMIStatus)&&f(this,z,e):h(e,a.CMIStatus2)&&f(this,z,e)}},{key:"entry",get:function(){return o(this,U)},set:function(e){this.initialized?d():f(this,U,e)}},{key:"total_time",get:function(){return o(this,W)},set:function(e){this.initialized?d():f(this,W,e)}},{key:"lesson_mode",get:function(){return o(this,B)},set:function(e){this.initialized?d():f(this,B,e)}},{key:"exit",get:function(){return this.jsonString?o(this,$):C()},set:function(e){h(e,a.CMIExit,!0)&&f(this,$,e)}},{key:"session_time",get:function(){return this.jsonString?o(this,H):C()},set:function(e){h(e,a.CMITimespan)&&f(this,H,e)}},{key:"suspend_data",get:function(){return o(this,Z)},set:function(e){h(e,a.CMIString4096,!0)&&f(this,Z,e)}},{key:"getCurrentTotalTime",value:function(e){var t=o(this,H);return null!=e&&(e=(new Date).getTime()-e,t=p.getSecondsAsHHMMSS(e/1e3)),p.addHHMMSSTimeStrings(o(this,W),t,new RegExp(a.CMITimespan))}},{key:"toJSON",value:function(){this.jsonString=!0;var e={student_id:this.student_id,student_name:this.student_name,lesson_location:this.lesson_location,credit:this.credit,lesson_status:this.lesson_status,entry:this.entry,lesson_mode:this.lesson_mode,exit:this.exit,session_time:this.session_time,score:this.score};return delete this.jsonString,e}}]),r}(),Y=function(){v(t,i.CMIArray);var e=w(t);function t(){return g(this,t),e.call(this,{children:I.objectives_children,errorCode:s.INVALID_SET_VALUE,errorClass:n.Scorm12ValidationError})}return E(t)}(),q=new WeakMap,X=new WeakMap,K=new WeakMap,Q=new WeakMap,ee=function(){v(n,i.BaseCMI);var r=w(n);function n(e){var t;return g(this,n),u(l(t=r.call(this)),q,{writable:!0,value:void 0}),u(l(t),X,{writable:!0,value:""}),u(l(t),K,{writable:!0,value:""}),u(l(t),Q,{writable:!0,value:""}),f(l(t),q,e||I.student_data_children),t}return E(n,[{key:"_children",get:function(){return o(this,q)},set:function(e){T()}},{key:"mastery_score",get:function(){return o(this,X)},set:function(e){this.initialized?d():f(this,X,e)}},{key:"max_time_allowed",get:function(){return o(this,K)},set:function(e){this.initialized?d():f(this,K,e)}},{key:"time_limit_action",get:function(){return o(this,Q)},set:function(e){this.initialized?d():f(this,Q,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={mastery_score:this.mastery_score,max_time_allowed:this.max_time_allowed,time_limit_action:this.time_limit_action};return delete this.jsonString,e}}]),n}(),te=new WeakMap,re=new WeakMap,ne=new WeakMap,ie=new WeakMap,oe=new WeakMap,ae=function(){v(n,i.BaseCMI);var r=w(n);function n(e){var t;return g(this,n),u(l(t=r.call(this)),te,{writable:!0,value:void 0}),u(l(t),re,{writable:!0,value:""}),u(l(t),ne,{writable:!0,value:""}),u(l(t),ie,{writable:!0,value:""}),u(l(t),oe,{writable:!0,value:""}),f(l(t),te,e||I.student_preference_children),t}return E(n,[{key:"_children",get:function(){return o(this,te)},set:function(e){T()}},{key:"audio",get:function(){return o(this,re)},set:function(e){h(e,a.CMISInteger)&&L(e,a.audio_range)&&f(this,re,e)}},{key:"language",get:function(){return o(this,ne)},set:function(e){h(e,a.CMIString256)&&f(this,ne,e)}},{key:"speed",get:function(){return o(this,ie)},set:function(e){h(e,a.CMISInteger)&&L(e,a.speed_range)&&f(this,ie,e)}},{key:"text",get:function(){return o(this,oe)},set:function(e){h(e,a.CMISInteger)&&L(e,a.text_range)&&f(this,oe,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={audio:this.audio,language:this.language,speed:this.speed,text:this.text};return delete this.jsonString,e}}]),n}(),se=function(){v(t,i.CMIArray);var e=w(t);function t(){return g(this,t),e.call(this,{children:I.interactions_children,errorCode:s.INVALID_SET_VALUE,errorClass:n.Scorm12ValidationError})}return E(t)}(),ce=new WeakMap,le=new WeakMap,ue=new WeakMap,fe=new WeakMap,de=new WeakMap,he=new WeakMap,me=new WeakMap,pe=function(){v(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),ce,{writable:!0,value:""}),u(l(e),le,{writable:!0,value:""}),u(l(e),ue,{writable:!0,value:""}),u(l(e),fe,{writable:!0,value:""}),u(l(e),de,{writable:!0,value:""}),u(l(e),he,{writable:!0,value:""}),u(l(e),me,{writable:!0,value:""}),e.objectives=new i.CMIArray({errorCode:s.INVALID_SET_VALUE,errorClass:n.Scorm12ValidationError,children:I.objectives_children}),e.correct_responses=new i.CMIArray({errorCode:s.INVALID_SET_VALUE,errorClass:n.Scorm12ValidationError,children:I.correct_responses_children}),e}return E(r,[{key:"initialize",value:function(){var e;b(O(r.prototype),"initialize",this).call(this),null!==(e=this.objectives)&&void 0!==e&&e.initialize(),null!==(e=this.correct_responses)&&void 0!==e&&e.initialize()}},{key:"id",get:function(){return this.jsonString?o(this,ce):C()},set:function(e){h(e,a.CMIIdentifier)&&f(this,ce,e)}},{key:"time",get:function(){return this.jsonString?o(this,le):C()},set:function(e){h(e,a.CMITime)&&f(this,le,e)}},{key:"type",get:function(){return this.jsonString?o(this,ue):C()},set:function(e){h(e,a.CMIType)&&f(this,ue,e)}},{key:"weighting",get:function(){return this.jsonString?o(this,fe):C()},set:function(e){h(e,a.CMIDecimal)&&L(e,a.weighting_range)&&f(this,fe,e)}},{key:"student_response",get:function(){return this.jsonString?o(this,de):C()},set:function(e){h(e,a.CMIFeedback,!0)&&f(this,de,e)}},{key:"result",get:function(){return this.jsonString?o(this,he):C()},set:function(e){h(e,a.CMIResult)&&f(this,he,e)}},{key:"latency",get:function(){return this.jsonString?o(this,me):C()},set:function(e){h(e,a.CMITimespan)&&f(this,me,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={id:this.id,time:this.time,type:this.type,weighting:this.weighting,student_response:this.student_response,result:this.result,latency:this.latency,objectives:this.objectives,correct_responses:this.correct_responses};return delete this.jsonString,e}}]),r}(),ye=new WeakMap,ge=new WeakMap,_e=function(){v(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),ye,{writable:!0,value:""}),u(l(e),ge,{writable:!0,value:""}),e.score=new i.CMIScore({score_children:I.score_children,score_range:a.score_range,invalidErrorCode:s.INVALID_SET_VALUE,invalidTypeCode:s.TYPE_MISMATCH,invalidRangeCode:s.VALUE_OUT_OF_RANGE,errorClass:n.Scorm12ValidationError}),e}return E(r,[{key:"id",get:function(){return o(this,ye)},set:function(e){h(e,a.CMIIdentifier)&&f(this,ye,e)}},{key:"status",get:function(){return o(this,ge)},set:function(e){h(e,a.CMIStatus2)&&f(this,ge,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={id:this.id,status:this.status,score:this.score};return delete this.jsonString,e}}]),r}(),Ee=new WeakMap,be=function(){v(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),Ee,{writable:!0,value:""}),e}return E(r,[{key:"id",get:function(){return o(this,Ee)},set:function(e){h(e,a.CMIIdentifier)&&f(this,Ee,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={id:this.id};return delete this.jsonString,e}}]),r}(),ve=new WeakMap,Me=function(){v(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),ve,{writable:!0,value:""}),e}return E(r,[{key:"pattern",get:function(){return this.jsonString?o(this,ve):C()},set:function(e){h(e,a.CMIFeedback,!0)&&f(this,ve,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={pattern:this.pattern};return delete this.jsonString,e}}]),r}(),we=new WeakMap,Oe=function(){v(r,i.BaseCMI);var t=w(r);function r(){var e;return g(this,r),u(l(e=t.call(this)),we,{writable:!0,value:""}),e}return E(r,[{key:"event",get:function(){return o(this,we)},set:function(e){h(e,a.NAVEvent)&&f(this,we,e)}},{key:"toJSON",value:function(){this.jsonString=!0;var e={event:this.event};return delete this.jsonString,e}}]),r}()},"./src/constants/api_constants.js":
17
17
  /*!****************************************!*\
18
18
  !*** ./src/constants/api_constants.js ***!
19
19
  \****************************************/function(e,t,r){"use strict";function o(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function n(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}r.r(t);var r={cmi_children:"core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions",core_children:"student_id,student_name,lesson_location,credit,lesson_status,entry,score,total_time,lesson_mode,exit,session_time",score_children:"raw,min,max",comments_children:"content,location,time",objectives_children:"id,score,status",correct_responses_children:"pattern",student_data_children:"mastery_score,max_time_allowed,time_limit_action",student_preference_children:"audio,language,speed,text",interactions_children:"id,objectives,time,type,correct_responses,weighting,student_response,result,latency",error_descriptions:{101:{basicMessage:"General Exception",detailMessage:"No specific error code exists to describe the error. Use LMSGetDiagnostic for more information"},201:{basicMessage:"Invalid argument error",detailMessage:"Indicates that an argument represents an invalid data model element or is otherwise incorrect."},202:{basicMessage:"Element cannot have children",detailMessage:'Indicates that LMSGetValue was called with a data model element name that ends in "_children" for a data model element that does not support the "_children" suffix.'},203:{basicMessage:"Element not an array - cannot have count",detailMessage:'Indicates that LMSGetValue was called with a data model element name that ends in "_count" for a data model element that does not support the "_count" suffix.'},301:{basicMessage:"Not initialized",detailMessage:"Indicates that an API call was made before the call to lmsInitialize."},401:{basicMessage:"Not implemented error",detailMessage:"The data model element indicated in a call to LMSGetValue or LMSSetValue is valid, but was not implemented by this LMS. SCORM 1.2 defines a set of data model elements as being optional for an LMS to implement."},402:{basicMessage:"Invalid set value, element is a keyword",detailMessage:'Indicates that LMSSetValue was called on a data model element that represents a keyword (elements that end in "_children" and "_count").'},403:{basicMessage:"Element is read only",detailMessage:"LMSSetValue was called with a data model element that can only be read."},404:{basicMessage:"Element is write only",detailMessage:"LMSGetValue was called on a data model element that can only be written to."},405:{basicMessage:"Incorrect Data Type",detailMessage:"LMSSetValue was called with a value that is not consistent with the data format of the supplied data model element."},407:{basicMessage:"Element Value Out Of Range",detailMessage:"The numeric value supplied to a LMSSetValue call is outside of the numeric range allowed for the supplied data model element."},408:{basicMessage:"Data Model Dependency Not Established",detailMessage:"Some data model elements cannot be set until another data model element was set. This error condition indicates that the prerequisite element was not set before the dependent element."}}},i=n(n({},r),{cmi_children:"core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions,evaluation",student_preference_children:"audio,language,lesson_type,speed,text,text_color,text_location,text_size,video,windows",student_data_children:"attempt_number,tries,mastery_score,max_time_allowed,time_limit_action",student_demographics_children:"city,class,company,country,experience,familiar_name,instructor_name,title,native_language,state,street_address,telephone,years_experience",tries_children:"time,status,score",attempt_records_children:"score,lesson_status",paths_children:"location_id,date,time,status,why_left,time_in_element"});t.default={global:{SCORM_TRUE:"true",SCORM_FALSE:"false",STATE_NOT_INITIALIZED:0,STATE_INITIALIZED:1,STATE_TERMINATED:2,LOG_LEVEL_DEBUG:1,LOG_LEVEL_INFO:2,LOG_LEVEL_WARNING:3,LOG_LEVEL_ERROR:4,LOG_LEVEL_NONE:5},scorm12:r,aicc:i,scorm2004:{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",comments_children:"comment,timestamp,location",score_children:"max,raw,scaled,min",objectives_children:"progress_measure,completion_status,success_status,description,score,id",correct_responses_children:"pattern",student_data_children:"mastery_score,max_time_allowed,time_limit_action",student_preference_children:"audio_level,audio_captioning,delivery_speed,language",interactions_children:"id,type,objectives,timestamp,correct_responses,weighting,learner_response,result,latency,description",error_descriptions:{0:{basicMessage:"No Error",detailMessage:"No error occurred, the previous API call was successful."},101:{basicMessage:"General Exception",detailMessage:"No specific error code exists to describe the error. Use GetDiagnostic for more information."},102:{basicMessage:"General Initialization Failure",detailMessage:"Call to Initialize failed for an unknown reason."},103:{basicMessage:"Already Initialized",detailMessage:"Call to Initialize failed because Initialize was already called."},104:{basicMessage:"Content Instance Terminated",detailMessage:"Call to Initialize failed because Terminate was already called."},111:{basicMessage:"General Termination Failure",detailMessage:"Call to Terminate failed for an unknown reason."},112:{basicMessage:"Termination Before Initialization",detailMessage:"Call to Terminate failed because it was made before the call to Initialize."},113:{basicMessage:"Termination After Termination",detailMessage:"Call to Terminate failed because Terminate was already called."},122:{basicMessage:"Retrieve Data Before Initialization",detailMessage:"Call to GetValue failed because it was made before the call to Initialize."},123:{basicMessage:"Retrieve Data After Termination",detailMessage:"Call to GetValue failed because it was made after the call to Terminate."},132:{basicMessage:"Store Data Before Initialization",detailMessage:"Call to SetValue failed because it was made before the call to Initialize."},133:{basicMessage:"Store Data After Termination",detailMessage:"Call to SetValue failed because it was made after the call to Terminate."},142:{basicMessage:"Commit Before Initialization",detailMessage:"Call to Commit failed because it was made before the call to Initialize."},143:{basicMessage:"Commit After Termination",detailMessage:"Call to Commit failed because it was made after the call to Terminate."},201:{basicMessage:"General Argument Error",detailMessage:"An invalid argument was passed to an API method (usually indicates that Initialize, Commit or Terminate did not receive the expected empty string argument."},301:{basicMessage:"General Get Failure",detailMessage:"Indicates a failed GetValue call where no other specific error code is applicable. Use GetDiagnostic for more information."},351:{basicMessage:"General Set Failure",detailMessage:"Indicates a failed SetValue call where no other specific error code is applicable. Use GetDiagnostic for more information."},391:{basicMessage:"General Commit Failure",detailMessage:"Indicates a failed Commit call where no other specific error code is applicable. Use GetDiagnostic for more information."},401:{basicMessage:"Undefined Data Model Element",detailMessage:"The data model element name passed to GetValue or SetValue is not a valid SCORM data model element."},402:{basicMessage:"Unimplemented Data Model Element",detailMessage:"The data model element indicated in a call to GetValue or SetValue is valid, but was not implemented by this LMS. In SCORM 2004, this error would indicate an LMS that is not fully SCORM conformant."},403:{basicMessage:"Data Model Element Value Not Initialized",detailMessage:"Attempt to read a data model element that has not been initialized by the LMS or through a SetValue call. This error condition is often reached during normal execution of a SCO."},404:{basicMessage:"Data Model Element Is Read Only",detailMessage:"SetValue was called with a data model element that can only be read."},405:{basicMessage:"Data Model Element Is Write Only",detailMessage:"GetValue was called on a data model element that can only be written to."},406:{basicMessage:"Data Model Element Type Mismatch",detailMessage:"SetValue was called with a value that is not consistent with the data format of the supplied data model element."},407:{basicMessage:"Data Model Element Value Out Of Range",detailMessage:"The numeric value supplied to a SetValue call is outside of the numeric range allowed for the supplied data model element."},408:{basicMessage:"Data Model Dependency Not Established",detailMessage:"Some data model elements cannot be set until another data model element was set. This error condition indicates that the prerequisite element was not set before the dependent element."}}}}},"./src/constants/error_codes.js":
@@ -25,10 +25,10 @@
25
25
  \********************************/function(e,t,r){"use strict";function o(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function n(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}r.r(t);var r={CMIString256:"^.{0,255}$",CMIString4096:"^.{0,4096}$",CMITime:"^(?:[01]\\d|2[0123]):(?:[012345]\\d):(?:[012345]\\d)$",CMITimespan:"^([0-9]{2,}):([0-9]{2}):([0-9]{2})(.[0-9]{1,2})?$",CMIInteger:"^\\d+$",CMISInteger:"^-?([0-9]+)$",CMIDecimal:"^-?([0-9]{0,3})(.[0-9]*)?$",CMIIdentifier:"^[\\u0021-\\u007E\\s]{0,255}$",CMIFeedback:"^.{0,255}$",CMIIndex:"[._](\\d+).",CMIStatus:"^(passed|completed|failed|incomplete|browsed)$",CMIStatus2:"^(passed|completed|failed|incomplete|browsed|not attempted)$",CMIExit:"^(time-out|suspend|logout|)$",CMIType:"^(true-false|choice|fill-in|matching|performance|sequencing|likert|numeric)$",CMIResult:"^(correct|wrong|unanticipated|neutral|([0-9]{0,3})?(\\.[0-9]*)?)$",NAVEvent:"^(previous|continue)$",score_range:"0#100",audio_range:"-1#100",speed_range:"-100#100",weighting_range:"-100#100",text_range:"-1#1"},i=n(n({},r),{CMIIdentifier:"^\\w{1,255}$"});t.default={aicc:i,scorm12:r,scorm2004:{CMIString200:"^[\\u0000-\\uFFFF]{0,200}$",CMIString250:"^[\\u0000-\\uFFFF]{0,250}$",CMIString1000:"^[\\u0000-\\uFFFF]{0,1000}$",CMIString4000:"^[\\u0000-\\uFFFF]{0,4000}$",CMIString64000:"^[\\u0000-\\uFFFF]{0,64000}$",CMILang:"^([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?$|^$",CMILangString250:"^({lang=([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).{0,250}$)?$",CMILangcr:"^(({lang=([a-zA-Z]{2,3}|i|x)?(-[a-zA-Z0-9-]{2,8})?}))(.*?)$",CMILangString250cr:"^(({lang=([a-zA-Z]{2,3}|i|x)?(-[a-zA-Z0-9-]{2,8})?})?(.{0,250})?)?$",CMILangString4000:"^({lang=([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).{0,4000}$)?$",CMITime:"^(19[7-9]{1}[0-9]{1}|20[0-2]{1}[0-9]{1}|203[0-8]{1})((-(0[1-9]{1}|1[0-2]{1}))((-(0[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]{1}))(T([0-1]{1}[0-9]{1}|2[0-3]{1})((:[0-5]{1}[0-9]{1})((:[0-5]{1}[0-9]{1})((\\.[0-9]{1,2})((Z|([+|-]([0-1]{1}[0-9]{1}|2[0-3]{1})))(:[0-5]{1}[0-9]{1})?)?)?)?)?)?)?)?$",CMITimespan:"^P(?:([.,\\d]+)Y)?(?:([.,\\d]+)M)?(?:([.,\\d]+)W)?(?:([.,\\d]+)D)?(?:T?(?:([.,\\d]+)H)?(?:([.,\\d]+)M)?(?:([.,\\d]+)S)?)?$",CMIInteger:"^\\d+$",CMISInteger:"^-?([0-9]+)$",CMIDecimal:"^-?([0-9]{1,5})(\\.[0-9]{1,18})?$",CMIIdentifier:"^\\S{1,250}[a-zA-Z0-9]$",CMIShortIdentifier:"^[\\w\\.\\-\\_]{1,250}$",CMILongIdentifier:"^(?:(?!urn:)\\S{1,4000}|urn:[A-Za-z0-9-]{1,31}:\\S{1,4000}|.{1,4000})$",CMIFeedback:"^.*$",CMIIndex:"[._](\\d+).",CMIIndexStore:".N(\\d+).",CMICStatus:"^(completed|incomplete|not attempted|unknown)$",CMISStatus:"^(passed|failed|unknown)$",CMIExit:"^(time-out|suspend|logout|normal)$",CMIType:"^(true-false|choice|fill-in|long-fill-in|matching|performance|sequencing|likert|numeric|other)$",CMIResult:"^(correct|incorrect|unanticipated|neutral|-?([0-9]{1,4})(\\.[0-9]{1,18})?)$",NAVEvent:"^(previous|continue|exit|exitAll|abandon|abandonAll|suspendAll|{target=\\S{0,200}[a-zA-Z0-9]}choice|jump)$",NAVBoolean:"^(unknown|true|false$)",NAVTarget:"^(previous|continue|choice.{target=\\S{0,200}[a-zA-Z0-9]})$",scaled_range:"-1#1",audio_range:"0#*",speed_range:"0#*",text_range:"-1#1",progress_range:"0#1"}}},"./src/exceptions.js":
26
26
  /*!***************************!*\
27
27
  !*** ./src/exceptions.js ***!
28
- \***************************/function(t,e,r){"use strict";r.r(e),r.d(e,{ValidationError:function(){return I},Scorm12ValidationError:function(){return C},AICCValidationError:function(){return T},Scorm2004ValidationError:function(){return L}});e=r(/*! ./constants/api_constants */"./src/constants/api_constants.js");function d(e){return(d="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(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(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&&g(e,t)}function c(r){var n=y();return function(){var e,t=_(r);return i(this,n?(e=_(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function i(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){var r="function"==typeof Map?new Map:void 0;return function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return p(e,arguments,_(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),g(t,e)}(e)}function p(e,t,r){return(p=y()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);t=new(Function.bind.apply(e,n));return r&&g(t,r.prototype),t}).apply(null,arguments)}function y(){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}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t,r){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function v(e,t){t=M(e,t,"get");return t.get?t.get.call(e):t.value}function b(e,t,r){var t=M(e,t,"set"),n=r;if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}return r}function M(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var o=e.default.scorm12.error_descriptions,u=e.default.aicc.error_descriptions,f=e.default.scorm2004.error_descriptions,w=new WeakMap,S=new WeakMap,O=new WeakMap,I=function(){s(o,m(Error));var i=c(o);function o(e,t,r){var n;return a(this,o),E(l(n=i.call(this,t)),w,{writable:!0,value:void 0}),E(l(n),S,{writable:!0,value:void 0}),E(l(n),O,{writable:!0,value:void 0}),b(l(n),w,e),b(l(n),S,t),b(l(n),O,r),n}return n(o,[{key:"errorCode",get:function(){return v(this,w)}},{key:"errorMessage",get:function(){return v(this,S)}},{key:"detailedMessage",get:function(){return v(this,O)}}]),o}(),C=function(){s(r,I);var t=c(r);function r(e){return a(this,r),i({}.hasOwnProperty.call(o,String(e))?t.call(this,e,o[String(e)].basicMessage,o[String(e)].detailMessage):t.call(this,101,o[101].basicMessage,o[101].detailMessage))}return n(r)}(),T=function(){s(r,I);var t=c(r);function r(e){return a(this,r),i({}.hasOwnProperty.call(u,String(e))?t.call(this,e,u[String(e)].basicMessage,u[String(e)].detailMessage):t.call(this,101,u[101].basicMessage,u[101].detailMessage))}return n(r)}(),L=function(){s(r,I);var t=c(r);function r(e){return a(this,r),i({}.hasOwnProperty.call(f,String(e))?t.call(this,e,f[String(e)].basicMessage,f[String(e)].detailMessage):t.call(this,101,f[101].basicMessage,f[101].detailMessage))}return n(r)}()},"./src/utilities.js":
28
+ \***************************/function(t,e,r){"use strict";r.r(e),r.d(e,{AICCValidationError:function(){return T},Scorm12ValidationError:function(){return C},Scorm2004ValidationError:function(){return L},ValidationError:function(){return I}});e=r(/*! ./constants/api_constants */"./src/constants/api_constants.js");function d(e){return(d="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(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(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&&g(e,t)}function c(r){var n=y();return function(){var e,t=_(r);return i(this,n?(e=_(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function i(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){var r="function"==typeof Map?new Map:void 0;return function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return p(e,arguments,_(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),g(t,e)}(e)}function p(e,t,r){return(p=y()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);t=new(Function.bind.apply(e,n));return r&&g(t,r.prototype),t}).apply(null,arguments)}function y(){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}}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t,r){var n=e;if(t.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}function b(e,t){t=M(e,t,"get");return t.get?t.get.call(e):t.value}function v(e,t,r){var t=M(e,t,"set"),n=r;if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}return r}function M(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var o=e.default.scorm12.error_descriptions,u=e.default.aicc.error_descriptions,f=e.default.scorm2004.error_descriptions,w=new WeakMap,O=new WeakMap,S=new WeakMap,I=function(){s(o,m(Error));var i=c(o);function o(e,t,r){var n;return a(this,o),E(l(n=i.call(this,t)),w,{writable:!0,value:void 0}),E(l(n),O,{writable:!0,value:void 0}),E(l(n),S,{writable:!0,value:void 0}),v(l(n),w,e),v(l(n),O,t),v(l(n),S,r),n}return n(o,[{key:"errorCode",get:function(){return b(this,w)}},{key:"errorMessage",get:function(){return b(this,O)}},{key:"detailedMessage",get:function(){return b(this,S)}}]),o}(),C=function(){s(r,I);var t=c(r);function r(e){return a(this,r),i({}.hasOwnProperty.call(o,String(e))?t.call(this,e,o[String(e)].basicMessage,o[String(e)].detailMessage):t.call(this,101,o[101].basicMessage,o[101].detailMessage))}return n(r)}(),T=function(){s(r,I);var t=c(r);function r(e){return a(this,r),i({}.hasOwnProperty.call(u,String(e))?t.call(this,e,u[String(e)].basicMessage,u[String(e)].detailMessage):t.call(this,101,u[101].basicMessage,u[101].detailMessage))}return n(r)}(),L=function(){s(r,I);var t=c(r);function r(e){return a(this,r),i({}.hasOwnProperty.call(f,String(e))?t.call(this,e,f[String(e)].basicMessage,f[String(e)].detailMessage):t.call(this,101,f[101].basicMessage,f[101].detailMessage))}return n(r)}()},"./src/utilities.js":
29
29
  /*!**************************!*\
30
30
  !*** ./src/utilities.js ***!
31
- \**************************/function(u,e,t){"use strict";function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}t.r(e),t.d(e,{SECONDS_PER_SECOND:function(){return r},SECONDS_PER_MINUTE:function(){return i},SECONDS_PER_HOUR:function(){return o},SECONDS_PER_DAY:function(){return f},getSecondsAsHHMMSS:function(){return h},getSecondsAsISODuration:function(){return m},getTimeAsSeconds:function(){return s},getDurationAsSeconds:function(){return c},addTwoDurations:function(){return p},addHHMMSSTimeStrings:function(){return y},flatten:function(){return g},unflatten:function(){return _},countDecimals:function(){return l}});var r=1,i=60,o=60*i,f=24*o,d=[["D",f],["H",o],["M",i],["S",r]];function h(e){if(!e||e<=0)return"00:00:00";var t=Math.floor(e/o),r=new Date(1e3*e),n=r.getUTCMinutes(),r=r.getSeconds(),e=e%1,i="";return 0<l(e)&&(i="."+(i=2<l(e)?e.toFixed(2):String(e)).split(".")[1]),(t+":"+n+":"+r).replace(/\b\d\b/g,"0$&")+i}function m(e){if(!e||e<=0)return"PT0S";var n="P",i=e;return d.forEach(function(e){var e=a(e,2),t=e[0],e=e[1],r=Math.floor(i/e);2<l(i%=e)&&(i=Number(Number(i).toFixed(2))),"S"===t&&0<i&&(r+=i),r&&((0<n.indexOf("D")||"H"===t||"M"===t||"S"===t)&&-1===n.indexOf("T")&&(n+="T"),n+="".concat(r).concat(t))}),n}function s(e,t){if(!e||"string"!=typeof e||!e.match(t))return 0;t=e.split(":");return 3600*Number(t[0])+60*Number(t[1])+Number(t[2])}function c(e,t){if(!e||!e.match(t))return 0;var t=a(new RegExp(t).exec(e)||[],8),e=t[1],r=(t[2],t[4]),n=t[5],i=t[6],t=t[7],o=0;return(o+=+Number(t)||0)+(60*Number(i)||0)+(3600*Number(n)||0)+(86400*Number(r)||0)+(31536e3*Number(e)||0)}function p(e,t,r){return m(c(e,r)+c(t,r))}function y(e,t,r){return h(s(e,r)+s(t,r))}function g(e){var s={};return function e(t,r){if(Object(t)!==t)s[r]=t;else if(Array.isArray(t))for(var n=0,i=t.length;n<i;n++)e(t[n],r+"["+n+"]"),0===i&&(s[r]=[]);else{var o,a=!0;for(o in t)!{}.hasOwnProperty.call(t,o)||(a=!1,e(t[o],r?r+"."+o:o));a&&r&&(s[r]={})}}(e,""),s}function _(e){if(Object(e)!==e||Array.isArray(e))return e;var t,r=/\.?([^.[\]]+)|\[(\d+)]/g,n={};for(t in e)if({}.hasOwnProperty.call(e,t)){for(var i=n,o="",a=r.exec(t);a;)i=i[o]||(i[o]=a[2]?[]:{}),o=a[2]||a[1],a=r.exec(t);i[o]=e[t]}return n[""]||n}function l(e){return!(Math.floor(e)===e||String(e).indexOf(".")<0)&&e.toString().split(".")[1].length||0}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;t=n[e]={exports:{}};return r[e](t,t.exports,i),t.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};!function(){"use strict";
31
+ \**************************/function(u,e,t){"use strict";function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}t.r(e),t.d(e,{SECONDS_PER_DAY:function(){return f},SECONDS_PER_HOUR:function(){return o},SECONDS_PER_MINUTE:function(){return i},SECONDS_PER_SECOND:function(){return r},addHHMMSSTimeStrings:function(){return y},addTwoDurations:function(){return p},countDecimals:function(){return l},flatten:function(){return g},getDurationAsSeconds:function(){return c},getSecondsAsHHMMSS:function(){return h},getSecondsAsISODuration:function(){return m},getTimeAsSeconds:function(){return s},unflatten:function(){return _}});var r=1,i=60,o=60*i,f=24*o,d=[["D",f],["H",o],["M",i],["S",r]];function h(e){if(!e||e<=0)return"00:00:00";var t=Math.floor(e/o),r=new Date(1e3*e),n=r.getUTCMinutes(),r=r.getSeconds(),e=e%1,i="";return 0<l(e)&&(i="."+(i=2<l(e)?e.toFixed(2):String(e)).split(".")[1]),(t+":"+n+":"+r).replace(/\b\d\b/g,"0$&")+i}function m(e){if(!e||e<=0)return"PT0S";var n="P",i=e;return d.forEach(function(e){var e=a(e,2),t=e[0],e=e[1],r=Math.floor(i/e);2<l(i%=e)&&(i=Number(Number(i).toFixed(2))),"S"===t&&0<i&&(r+=i),r&&((0<n.indexOf("D")||"H"===t||"M"===t||"S"===t)&&-1===n.indexOf("T")&&(n+="T"),n+="".concat(r).concat(t))}),n}function s(e,t){if(!e||"string"!=typeof e||!e.match(t))return 0;t=e.split(":");return 3600*Number(t[0])+60*Number(t[1])+Number(t[2])}function c(e,t){if(!e||!e.match(t))return 0;var t=a(new RegExp(t).exec(e)||[],8),e=t[1],r=(t[2],t[4]),n=t[5],i=t[6],t=t[7],o=0;return(o+=+Number(t)||0)+(60*Number(i)||0)+(3600*Number(n)||0)+(86400*Number(r)||0)+(31536e3*Number(e)||0)}function p(e,t,r){return m(c(e,r)+c(t,r))}function y(e,t,r){return h(s(e,r)+s(t,r))}function g(e){var s={};return function e(t,r){if(Object(t)!==t)s[r]=t;else if(Array.isArray(t))for(var n=0,i=t.length;n<i;n++)e(t[n],r+"["+n+"]"),0===i&&(s[r]=[]);else{var o,a=!0;for(o in t)!{}.hasOwnProperty.call(t,o)||(a=!1,e(t[o],r?r+"."+o:o));a&&r&&(s[r]={})}}(e,""),s}function _(e){if(Object(e)!==e||Array.isArray(e))return e;var t,r=/\.?([^.[\]]+)|\[(\d+)]/g,n={};for(t in e)if({}.hasOwnProperty.call(e,t)){for(var i=n,o="",a=r.exec(t);a;)i=i[o]||(i[o]=a[2]?[]:{}),o=a[2]||a[1],a=r.exec(t);i[o]=e[t]}return n[""]||n}function l(e){return!(Math.floor(e)===e||String(e).indexOf(".")<0)&&e.toString().split(".")[1].length||0}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;t=n[e]={exports:{}};return r[e](t,t.exports,i),t.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};!function(){"use strict";
32
32
  /*!********************************!*\
33
33
  !*** ./src/exports/scorm12.js ***!
34
34
  \********************************/i.r(t);var e=i(/*! ../Scorm12API */"./src/Scorm12API.js");window.Scorm12API=e.default}()}();
package/dist/scorm2004.js CHANGED
@@ -1876,7 +1876,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
1876
1876
 
1877
1877
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
1878
1878
 
1879
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1879
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1880
1880
 
1881
1881
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
1882
1882
 
@@ -1886,7 +1886,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
1886
1886
 
1887
1887
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1888
1888
 
1889
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1889
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1890
1890
 
1891
1891
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1892
1892
 
@@ -2540,11 +2540,11 @@ var Scorm2004API = /*#__PURE__*/function (_BaseAPI) {
2540
2540
  "use strict";
2541
2541
  __webpack_require__.r(__webpack_exports__);
2542
2542
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2543
- /* harmony export */ "checkValidFormat": function() { return /* binding */ checkValidFormat; },
2544
- /* harmony export */ "checkValidRange": function() { return /* binding */ checkValidRange; },
2545
2543
  /* harmony export */ "BaseCMI": function() { return /* binding */ BaseCMI; },
2544
+ /* harmony export */ "CMIArray": function() { return /* binding */ CMIArray; },
2546
2545
  /* harmony export */ "CMIScore": function() { return /* binding */ CMIScore; },
2547
- /* harmony export */ "CMIArray": function() { return /* binding */ CMIArray; }
2546
+ /* harmony export */ "checkValidFormat": function() { return /* binding */ checkValidFormat; },
2547
+ /* harmony export */ "checkValidRange": function() { return /* binding */ checkValidRange; }
2548
2548
  /* harmony export */ });
2549
2549
  /* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/api_constants */ "./src/constants/api_constants.js");
2550
2550
  /* harmony import */ var _constants_error_codes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/error_codes */ "./src/constants/error_codes.js");
@@ -2553,7 +2553,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2553
2553
 
2554
2554
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
2555
2555
 
2556
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2556
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2557
2557
 
2558
2558
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2559
2559
 
@@ -2563,7 +2563,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
2563
2563
 
2564
2564
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2565
2565
 
2566
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2566
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2567
2567
 
2568
2568
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2569
2569
 
@@ -3070,13 +3070,13 @@ var CMIArray = /*#__PURE__*/function (_BaseCMI2) {
3070
3070
  "use strict";
3071
3071
  __webpack_require__.r(__webpack_exports__);
3072
3072
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3073
+ /* harmony export */ "ADL": function() { return /* binding */ ADL; },
3073
3074
  /* harmony export */ "CMI": function() { return /* binding */ CMI; },
3074
- /* harmony export */ "CMIInteractionsObject": function() { return /* binding */ CMIInteractionsObject; },
3075
- /* harmony export */ "CMIObjectivesObject": function() { return /* binding */ CMIObjectivesObject; },
3076
3075
  /* harmony export */ "CMICommentsObject": function() { return /* binding */ CMICommentsObject; },
3077
- /* harmony export */ "CMIInteractionsObjectivesObject": function() { return /* binding */ CMIInteractionsObjectivesObject; },
3078
3076
  /* harmony export */ "CMIInteractionsCorrectResponsesObject": function() { return /* binding */ CMIInteractionsCorrectResponsesObject; },
3079
- /* harmony export */ "ADL": function() { return /* binding */ ADL; }
3077
+ /* harmony export */ "CMIInteractionsObject": function() { return /* binding */ CMIInteractionsObject; },
3078
+ /* harmony export */ "CMIInteractionsObjectivesObject": function() { return /* binding */ CMIInteractionsObjectivesObject; },
3079
+ /* harmony export */ "CMIObjectivesObject": function() { return /* binding */ CMIObjectivesObject; }
3080
3080
  /* harmony export */ });
3081
3081
  /* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ "./src/cmi/common.js");
3082
3082
  /* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/api_constants */ "./src/constants/api_constants.js");
@@ -3095,13 +3095,13 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
3095
3095
 
3096
3096
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3097
3097
 
3098
- function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
3098
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
3099
3099
 
3100
3100
  function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
3101
3101
 
3102
3102
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
3103
3103
 
3104
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3104
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3105
3105
 
3106
3106
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
3107
3107
 
@@ -3111,7 +3111,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
3111
3111
 
3112
3112
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3113
3113
 
3114
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3114
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3115
3115
 
3116
3116
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
3117
3117
 
@@ -6413,10 +6413,10 @@ var Responses = {
6413
6413
  "use strict";
6414
6414
  __webpack_require__.r(__webpack_exports__);
6415
6415
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6416
- /* harmony export */ "ValidationError": function() { return /* binding */ ValidationError; },
6417
- /* harmony export */ "Scorm12ValidationError": function() { return /* binding */ Scorm12ValidationError; },
6418
6416
  /* harmony export */ "AICCValidationError": function() { return /* binding */ AICCValidationError; },
6419
- /* harmony export */ "Scorm2004ValidationError": function() { return /* binding */ Scorm2004ValidationError; }
6417
+ /* harmony export */ "Scorm12ValidationError": function() { return /* binding */ Scorm12ValidationError; },
6418
+ /* harmony export */ "Scorm2004ValidationError": function() { return /* binding */ Scorm2004ValidationError; },
6419
+ /* harmony export */ "ValidationError": function() { return /* binding */ ValidationError; }
6420
6420
  /* harmony export */ });
6421
6421
  /* harmony import */ var _constants_api_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants/api_constants */ "./src/constants/api_constants.js");
6422
6422
  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); }
@@ -6437,15 +6437,15 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
6437
6437
 
6438
6438
  function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
6439
6439
 
6440
- function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
6440
+ function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
6441
6441
 
6442
6442
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6443
6443
 
6444
6444
  function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
6445
6445
 
6446
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
6446
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
6447
6447
 
6448
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6448
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6449
6449
 
6450
6450
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
6451
6451
 
@@ -6650,19 +6650,19 @@ var Scorm2004ValidationError = /*#__PURE__*/function (_ValidationError3) {
6650
6650
  "use strict";
6651
6651
  __webpack_require__.r(__webpack_exports__);
6652
6652
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6653
- /* harmony export */ "SECONDS_PER_SECOND": function() { return /* binding */ SECONDS_PER_SECOND; },
6654
- /* harmony export */ "SECONDS_PER_MINUTE": function() { return /* binding */ SECONDS_PER_MINUTE; },
6655
- /* harmony export */ "SECONDS_PER_HOUR": function() { return /* binding */ SECONDS_PER_HOUR; },
6656
6653
  /* harmony export */ "SECONDS_PER_DAY": function() { return /* binding */ SECONDS_PER_DAY; },
6654
+ /* harmony export */ "SECONDS_PER_HOUR": function() { return /* binding */ SECONDS_PER_HOUR; },
6655
+ /* harmony export */ "SECONDS_PER_MINUTE": function() { return /* binding */ SECONDS_PER_MINUTE; },
6656
+ /* harmony export */ "SECONDS_PER_SECOND": function() { return /* binding */ SECONDS_PER_SECOND; },
6657
+ /* harmony export */ "addHHMMSSTimeStrings": function() { return /* binding */ addHHMMSSTimeStrings; },
6658
+ /* harmony export */ "addTwoDurations": function() { return /* binding */ addTwoDurations; },
6659
+ /* harmony export */ "countDecimals": function() { return /* binding */ countDecimals; },
6660
+ /* harmony export */ "flatten": function() { return /* binding */ flatten; },
6661
+ /* harmony export */ "getDurationAsSeconds": function() { return /* binding */ getDurationAsSeconds; },
6657
6662
  /* harmony export */ "getSecondsAsHHMMSS": function() { return /* binding */ getSecondsAsHHMMSS; },
6658
6663
  /* harmony export */ "getSecondsAsISODuration": function() { return /* binding */ getSecondsAsISODuration; },
6659
6664
  /* harmony export */ "getTimeAsSeconds": function() { return /* binding */ getTimeAsSeconds; },
6660
- /* harmony export */ "getDurationAsSeconds": function() { return /* binding */ getDurationAsSeconds; },
6661
- /* harmony export */ "addTwoDurations": function() { return /* binding */ addTwoDurations; },
6662
- /* harmony export */ "addHHMMSSTimeStrings": function() { return /* binding */ addHHMMSSTimeStrings; },
6663
- /* harmony export */ "flatten": function() { return /* binding */ flatten; },
6664
- /* harmony export */ "unflatten": function() { return /* binding */ unflatten; },
6665
- /* harmony export */ "countDecimals": function() { return /* binding */ countDecimals; }
6665
+ /* harmony export */ "unflatten": function() { return /* binding */ unflatten; }
6666
6666
  /* harmony export */ });
6667
6667
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6668
6668